Cleaner BeIDE project
This commit is contained in:
@@ -21,21 +21,22 @@
|
||||
|
||||
#include <Application.h>
|
||||
#include <Archivable.h>
|
||||
|
||||
#include <Roster.cpp>
|
||||
#include <Message.h>
|
||||
#include <Archivable.cpp>
|
||||
#include <Handler.cpp>
|
||||
#include <Looper.cpp>
|
||||
#include <Window.cpp>
|
||||
#include <View.cpp>
|
||||
#include <Point.cpp>
|
||||
#include <Rect.cpp>
|
||||
#include <SerialPort.cpp>
|
||||
|
||||
#include <application.h>
|
||||
|
||||
// #include <Control.cpp>
|
||||
|
||||
#include <beobj.cpp>
|
||||
#include <window.h>
|
||||
#include <view.h>
|
||||
#include <point.h>
|
||||
#include <rect.h>
|
||||
|
||||
#include <handler.h>
|
||||
#include <looper.h>
|
||||
#include <archivable.h>
|
||||
#include <message.h>
|
||||
#include <beobj.h>
|
||||
|
||||
// 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)
|
||||
|
||||
@@ -21,7 +21,8 @@
|
||||
|
||||
#include <Handler.h>
|
||||
|
||||
#include <beobj.cpp>
|
||||
#include <handler.h>
|
||||
#include <beobj.h>
|
||||
|
||||
// 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)
|
||||
{
|
||||
|
||||
@@ -24,7 +24,10 @@
|
||||
|
||||
#include <OS.h>
|
||||
|
||||
#include <beobj.cpp>
|
||||
#include <beobj.h>
|
||||
|
||||
#include <looper.h>
|
||||
#include <handler.h>
|
||||
|
||||
// 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)
|
||||
|
||||
@@ -24,7 +24,8 @@
|
||||
|
||||
#include <SupportDefs.h>
|
||||
|
||||
#include <beobj.cpp>
|
||||
#include <message.h>
|
||||
#include <beobj.h>
|
||||
|
||||
#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)
|
||||
{
|
||||
|
||||
@@ -20,9 +20,10 @@
|
||||
#define _ROSTER_CPP_
|
||||
|
||||
#include <Roster.h>
|
||||
#include <Message.h>
|
||||
|
||||
#include <beobj.cpp>
|
||||
#include <Message.cpp>
|
||||
#include <beobj.h>
|
||||
#include <roster.h>
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
|
||||
@@ -19,10 +19,7 @@
|
||||
#ifndef _BEOBJ_CPP_
|
||||
#define _BEOBJ_CPP_
|
||||
|
||||
typedef void* TPasObject;
|
||||
typedef void* TCPlusObject;
|
||||
|
||||
typedef char *(*BPasObject_GetPasClassName_hook)(TPasObject PasObject);
|
||||
#include <beobj.h>
|
||||
|
||||
#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;
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
#include "SerialPort.h"
|
||||
|
||||
#include <beobj.cpp>
|
||||
#include <beobj.h>
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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 <Point.h>
|
||||
#include <Rect.h>
|
||||
|
||||
#include <beobj.cpp>
|
||||
|
||||
class BPPoint : public BPoint, public BPasObject
|
||||
{
|
||||
public:
|
||||
BPPoint(TPasObject PasObject, float x, float y);
|
||||
BPPoint(TPasObject PasObject, const BPoint& point);
|
||||
BPPoint(TPasObject PasObject);
|
||||
};
|
||||
#include <point.h>
|
||||
#include <beobj.h>
|
||||
|
||||
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 */
|
||||
#endif _POINT_CPP_ /* _POINT_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 <Point.h>
|
||||
#include <Rect.h>
|
||||
|
||||
#include <beobj.cpp>
|
||||
|
||||
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 <rect.h>
|
||||
#include <beobj.h>
|
||||
|
||||
BPRect::BPRect(TPasObject PasObject) : BRect(), BPasObject(PasObject)
|
||||
{
|
||||
@@ -89,4 +81,4 @@ void BRect_PrintToStream(TCPlusObject rect)
|
||||
#endif
|
||||
|
||||
|
||||
#endif _RECT_CPP /* _RECT_CPP */
|
||||
#endif _RECT_CPP_ /* _RECT_CPP_ */
|
||||
@@ -23,7 +23,9 @@
|
||||
|
||||
#include <OS.h>
|
||||
|
||||
#include <beobj.cpp>
|
||||
#include <handler.h>
|
||||
#include <view.h>
|
||||
#include <beobj.h>
|
||||
|
||||
// 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,
|
||||
|
||||
@@ -23,7 +23,8 @@
|
||||
|
||||
#include <OS.h>
|
||||
|
||||
#include <beobj.cpp>
|
||||
#include <window.h>
|
||||
#include <beobj.h>
|
||||
|
||||
// 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,
|
||||
|
||||
@@ -21,9 +21,9 @@
|
||||
|
||||
#include <Archivable.h>
|
||||
|
||||
#include <Message.cpp>
|
||||
|
||||
#include <beobj.cpp>
|
||||
#include <message.h>
|
||||
#include <archivable.h>
|
||||
#include <beobj.h>
|
||||
|
||||
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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user