diff --git a/bepascal/bepascal/be/app/Application.cpp b/bepascal/bepascal/be/app/Application.cpp index 7cfdcc6..baf792b 100644 --- a/bepascal/bepascal/be/app/Application.cpp +++ b/bepascal/bepascal/be/app/Application.cpp @@ -21,21 +21,22 @@ #include #include - -#include #include -#include -#include -#include -#include -#include -#include -#include -#include + +#include // #include -#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include // definition of callback function in BApplication typedef void (*BApplication_AppActivated_hook) (TPasObject PasObject, bool active); @@ -56,19 +57,6 @@ BApplication_ReadyToRun_hook Application_ReadyToRun_hook; } #endif -class BPApplication : public BApplication, public virtual BPLooper -{ - public: - BPApplication(TPasObject PasObject, const char *signature); - BPApplication(TPasObject PasObject, const char *signature, - status_t *error); - virtual void AppActivated(bool active); - virtual void ReadyToRun(void); - virtual bool QuitRequested(void); - virtual void MessageReceived(BMessage *message); - private: -}; - BPApplication::BPApplication(TPasObject PasObject, const char *signature) : BApplication(signature), BPLooper(PasObject), BPHandler(PasObject), BPasObject(PasObject) diff --git a/bepascal/bepascal/be/app/Handler.cpp b/bepascal/bepascal/be/app/Handler.cpp index 283023b..f67fe0f 100644 --- a/bepascal/bepascal/be/app/Handler.cpp +++ b/bepascal/bepascal/be/app/Handler.cpp @@ -21,7 +21,8 @@ #include -#include +#include +#include // definition of callback function in BHandler @@ -37,16 +38,6 @@ BHandler_MessageReceived_hook Handler_MessageReceived_hook; } #endif -class BPHandler : public BHandler, public virtual BPasObject -{ - public: - BPHandler(TPasObject PasObject, const char *name = NULL); - BPHandler(TPasObject PasObject, BMessage *archive); - virtual ~BPHandler(void); - virtual void MessageReceived(BMessage *message); - private: -}; - BPHandler::BPHandler(TPasObject PasObject, const char *name) : BHandler(name), BPasObject(PasObject) { diff --git a/bepascal/bepascal/be/app/Looper.cpp b/bepascal/bepascal/be/app/Looper.cpp index ce08216..fcf7ad5 100644 --- a/bepascal/bepascal/be/app/Looper.cpp +++ b/bepascal/bepascal/be/app/Looper.cpp @@ -24,7 +24,10 @@ #include -#include +#include + +#include +#include // definition of callback function in BLooper @@ -44,18 +47,6 @@ BLooper_QuitRequested_hook Looper_QuitRequested_hook; } #endif -class BPLooper : public BLooper, public virtual BPHandler -{ - public: - BPLooper(TPasObject PasObject, const char *name = NULL, - int32 priority = B_NORMAL_PRIORITY, - int32 portCapacity = B_LOOPER_PORT_DEFAULT_CAPACITY); - virtual ~BPLooper(); - virtual void DispatchMessage(BMessage *message, BHandler *target); - virtual bool QuitRequested(void); - private: -}; - BPLooper::BPLooper(TPasObject PasObject, const char *name = NULL, int32 priority = B_NORMAL_PRIORITY, int32 portCapacity = B_LOOPER_PORT_DEFAULT_CAPACITY) diff --git a/bepascal/bepascal/be/app/Message.cpp b/bepascal/bepascal/be/app/Message.cpp index d8d3692..6e8e9f8 100644 --- a/bepascal/bepascal/be/app/Message.cpp +++ b/bepascal/bepascal/be/app/Message.cpp @@ -24,7 +24,8 @@ #include -#include +#include +#include #if defined(__cplusplus) extern "C" { @@ -34,17 +35,6 @@ extern "C" { } #endif -class BPMessage; - -class BPMessage : public BMessage, private BPasObject -{ - public: - BPMessage(TPasObject PasObject); - BPMessage(TPasObject PasObject, uint32 what); - BPMessage(TPasObject PasObject, TCPlusObject message); - private: -}; - BPMessage::BPMessage(TPasObject PasObject) : BMessage(), BPasObject(PasObject) { diff --git a/bepascal/bepascal/be/app/Roster.cpp b/bepascal/bepascal/be/app/Roster.cpp index b0b770e..758cbc9 100644 --- a/bepascal/bepascal/be/app/Roster.cpp +++ b/bepascal/bepascal/be/app/Roster.cpp @@ -20,9 +20,10 @@ #define _ROSTER_CPP_ #include +#include -#include -#include +#include +#include #if defined(__cplusplus) extern "C" { diff --git a/bepascal/bepascal/be/bepas_kernel/beobj.cpp b/bepascal/bepascal/be/bepas_kernel/beobj.cpp index 389b101..76fbe59 100644 --- a/bepascal/bepascal/be/bepas_kernel/beobj.cpp +++ b/bepascal/bepascal/be/bepas_kernel/beobj.cpp @@ -19,10 +19,7 @@ #ifndef _BEOBJ_CPP_ #define _BEOBJ_CPP_ -typedef void* TPasObject; -typedef void* TCPlusObject; - -typedef char *(*BPasObject_GetPasClassName_hook)(TPasObject PasObject); +#include #if defined(__cplusplus) extern "C" { @@ -34,17 +31,6 @@ BPasObject_GetPasClassName_hook PasObject_GetPasClassName_hook; } #endif -class BPasObject -{ - public: - BPasObject(TPasObject PasObject); - TPasObject GetPasObject(void) const; - virtual ~BPasObject(void); - char *GetPasClassName(void); - private: - TPasObject FPasObject; -}; - BPasObject::BPasObject(TPasObject PasObject) { FPasObject = PasObject; diff --git a/bepascal/bepascal/be/device/SerialPort.cpp b/bepascal/bepascal/be/device/SerialPort.cpp index 667eea8..0f08fff 100644 --- a/bepascal/bepascal/be/device/SerialPort.cpp +++ b/bepascal/bepascal/be/device/SerialPort.cpp @@ -21,7 +21,7 @@ #include "SerialPort.h" -#include +#include #if defined(__cplusplus) extern "C" { diff --git a/bepascal/bepascal/be/device/serialport.pp b/bepascal/bepascal/be/device/serialport.pp index 40ae257..51e97ba 100644 --- a/bepascal/bepascal/be/device/serialport.pp +++ b/bepascal/bepascal/be/device/serialport.pp @@ -88,7 +88,7 @@ type property ParityMode : TParityMode read GetParityMode write SetParityMode; end; -function BSerialPort_Create(AObject : TCPlusObject) : TCPlusObject; cdecl; external BePascalLibName name 'BSerialPort_Create'; +function BSerialPort_Create(AObject : TBeObject) : TCPlusObject; cdecl; external BePascalLibName name 'BSerialPort_Create'; procedure BSerialPort_Free(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BSerialPort_Free'; function BSerialPort_Open(AObject : TCPlusObject; portName : PChar) : TStatus_t; cdecl; external BePascalLibName name 'BSerialPort_Open'; procedure BSerialPort_Close(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BSerialPort_Close'; diff --git a/bepascal/bepascal/be/interface/Point.cpp b/bepascal/bepascal/be/interface/Point.cpp index 2e5afab..a1fd6a8 100644 --- a/bepascal/bepascal/be/interface/Point.cpp +++ b/bepascal/bepascal/be/interface/Point.cpp @@ -16,20 +16,14 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef _POINT_CPP -#define _POINT_CPP +#ifndef _POINT_CPP_ +#define _POINT_CPP_ #include +#include -#include - -class BPPoint : public BPoint, public BPasObject -{ - public: - BPPoint(TPasObject PasObject, float x, float y); - BPPoint(TPasObject PasObject, const BPoint& point); - BPPoint(TPasObject PasObject); -}; +#include +#include BPPoint::BPPoint(TPasObject PasObject, float x, float y) : BPoint(x, y), BPasObject(PasObject) { @@ -87,4 +81,4 @@ void BPoint_Set(TCPlusObject Point, float x, float y) #endif -#endif _POINT_CPP /* _POINT_CPP */ \ No newline at end of file +#endif _POINT_CPP_ /* _POINT_CPP_ */ \ No newline at end of file diff --git a/bepascal/bepascal/be/interface/Rect.cpp b/bepascal/bepascal/be/interface/Rect.cpp index f933253..b8ecb01 100644 --- a/bepascal/bepascal/be/interface/Rect.cpp +++ b/bepascal/bepascal/be/interface/Rect.cpp @@ -16,22 +16,14 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef _RECT_CPP -#define _RECT_CPP +#ifndef _RECT_CPP_ +#define _RECT_CPP_ #include #include -#include - -class BPRect : public BRect, public BPasObject -{ - public: - BPRect(TPasObject PasObject); - BPRect(TPasObject PasObject, const BRect & rect); - BPRect(TPasObject PasObject, float l, float t, float r, float b); - BPRect(TPasObject PasObject, BPoint leftTop, BPoint rightBottom); -}; +#include +#include BPRect::BPRect(TPasObject PasObject) : BRect(), BPasObject(PasObject) { @@ -89,4 +81,4 @@ void BRect_PrintToStream(TCPlusObject rect) #endif -#endif _RECT_CPP /* _RECT_CPP */ \ No newline at end of file +#endif _RECT_CPP_ /* _RECT_CPP_ */ \ No newline at end of file diff --git a/bepascal/bepascal/be/interface/View.cpp b/bepascal/bepascal/be/interface/View.cpp index 506e3ef..8139113 100644 --- a/bepascal/bepascal/be/interface/View.cpp +++ b/bepascal/bepascal/be/interface/View.cpp @@ -23,7 +23,9 @@ #include -#include +#include +#include +#include // definition of callback function in BView typedef void (*BView_AllAttached_hook) (TPasObject PasObject); @@ -86,38 +88,6 @@ BView_WindowActivated_hook View_WindowActivated_hook; } #endif -class BPView : public BView, public virtual BPHandler -{ - public: - BPView(TPasObject PasObject, - BRect frame, - const char *name, - uint32 resizingMode, - uint32 flags); - BPView(TPasObject PasObject, BMessage *archive); -// virtual void DispatchMessage(BMessage *message, BHandler *target); -// virtual bool QuitRequested(void); - virtual void AllAttached(void); - virtual void AttachedToWindow(void); - virtual void AllDetached(void); - virtual void DetachedFromWindow(void); - virtual void Draw(BRect updateRect); - virtual void DrawAfterChildren(BRect updateRect); - virtual void FrameMoved(BPoint parentPoint); - virtual void FrameResized(float width, float height); - virtual void GetPreferredSize(float *width, float *height); - virtual void ResizeToPreferred(void); - virtual void KeyDown(const char *bytes, int32 numBytes); - virtual void KeyUp(const char *bytes, int32 numBytes); - virtual void MouseDown(BPoint point); - virtual void MouseMoved(BPoint point, uint32 transit, const BMessage *message); - virtual void MouseUp(BPoint point); - virtual void Pulse(void); -// virtual void TargetedByScrollView(BScrollView *scroller); - virtual void WindowActivated(bool active); - private: -}; - BPView::BPView(TPasObject PasObject, BRect frame, const char *name, diff --git a/bepascal/bepascal/be/interface/Window.cpp b/bepascal/bepascal/be/interface/Window.cpp index dbe0a6e..c39af06 100644 --- a/bepascal/bepascal/be/interface/Window.cpp +++ b/bepascal/bepascal/be/interface/Window.cpp @@ -23,7 +23,8 @@ #include -#include +#include +#include // definition of callback function in BWindow @@ -37,20 +38,6 @@ extern "C" { } #endif -class BPWindow : public BWindow, public BPLooper -{ - public: - BPWindow(TPasObject PasObject, - BRect frame, - const char *title, - window_type type, - uint32 flags, - uint32 workspaces = B_CURRENT_WORKSPACE); -// virtual void DispatchMessage(BMessage *message, BHandler *target); -// virtual bool QuitRequested(void); - private: -}; - BPWindow::BPWindow(TPasObject PasObject, BRect frame, const char *title, diff --git a/bepascal/bepascal/be/support/Archivable.cpp b/bepascal/bepascal/be/support/Archivable.cpp index 0146ed7..e7e3c0f 100644 --- a/bepascal/bepascal/be/support/Archivable.cpp +++ b/bepascal/bepascal/be/support/Archivable.cpp @@ -21,9 +21,9 @@ #include -#include - -#include +#include +#include +#include typedef TCPlusObject (*BArchivable_Instantiate_hook) (BMessage *from); typedef status_t (*BArchivable_Archive_hook)(TPasObject PasObject, BMessage *into, bool deep); @@ -39,19 +39,6 @@ BArchivable_Archive_hook Archivable_Archive_hook; } #endif -class _EXPORT BPArchivable : public BArchivable, private BPasObject -{ - public: - BPArchivable(TPasObject PasObject); - BPArchivable(TPasObject PasObject, BMessage *from); - ~BPArchivable(void); -virtual status_t Archive(BMessage *into, bool deep = true) const; -virtual status_t ArchiveFromPascal(BMessage *into, bool deep = true); -static BArchivable *Instantiate(BMessage *from); - - private: -}; - BPArchivable::BPArchivable(TPasObject PasObject) : BArchivable(), BPasObject(PasObject) {