diff --git a/bepascal/bepascal/be/app/Clipboard.cpp b/bepascal/bepascal/be/app/Clipboard.cpp new file mode 100644 index 0000000..548832a --- /dev/null +++ b/bepascal/bepascal/be/app/Clipboard.cpp @@ -0,0 +1,273 @@ +#ifndef _CLIPBOARD_CPP_ +#define _CLIPBOARD_CPP_ + +/*********************************************************************** + * AUTHOR: nobody + * FILE: Clipboard.cpp + * DATE: Fri Sep 27 23:26:07 2002 + * DESCR: + ***********************************************************************/ +#include "Clipboard.h" + +#include + +#if defined(__cplusplus) +extern "C" { +#endif + +/* + * Method: BClipboard::BClipboard() + * Descr: + */ +TCPlusObject BClipboard_Create(const char *name, + bool transient) +{ + return new BClipboard(name, + transient); +} + + +/* + * Method: BClipboard::~BClipboard() + * Descr: + */ +void BClipboard_Free(BClipboard *Clipboard) +{ + delete Clipboard; +} + + +/* + * Method: BClipboard::Name() + * Descr: + */ +const char * +BClipboard_Name(BClipboard *Clipboard) +{ + return Clipboard->Name(); +} + + +/* + * Method: BClipboard::LocalCount() + * Descr: + */ +uint32 +BClipboard_LocalCount(BClipboard *Clipboard) +{ + return Clipboard->LocalCount(); +} + + +/* + * Method: BClipboard::SystemCount() + * Descr: + */ +uint32 +BClipboard_SystemCount(BClipboard *Clipboard) +{ + return Clipboard->SystemCount(); +} + + +/* + * Method: BClipboard::StartWatching() + * Descr: + */ +status_t +BClipboard_StartWatching(BClipboard *Clipboard, BMessenger target) +{ + return Clipboard->StartWatching(target); +} + + +/* + * Method: BClipboard::StopWatching() + * Descr: + */ +status_t +BClipboard_StopWatching(BClipboard *Clipboard, BMessenger target) +{ + return Clipboard->StopWatching(target); +} + + +/* + * Method: BClipboard::Lock() + * Descr: + */ +bool +BClipboard_Lock(BClipboard *Clipboard) +{ + return Clipboard->Lock(); +} + + +/* + * Method: BClipboard::Unlock() + * Descr: + */ +void +BClipboard_Unlock(BClipboard *Clipboard) +{ + Clipboard->Unlock(); +} + + +/* + * Method: BClipboard::IsLocked() + * Descr: + */ +bool +BClipboard_IsLocked(BClipboard *Clipboard) +{ + return Clipboard->IsLocked(); +} + + +/* + * Method: BClipboard::Clear() + * Descr: + */ +status_t +BClipboard_Clear(BClipboard *Clipboard) +{ + return Clipboard->Clear(); +} + + +/* + * Method: BClipboard::Commit() + * Descr: + */ +status_t +BClipboard_Commit(BClipboard *Clipboard) +{ + return Clipboard->Commit(); +} + + +/* + * Method: BClipboard::Revert() + * Descr: + */ +status_t +BClipboard_Revert(BClipboard *Clipboard) +{ + return Clipboard->Revert(); +} + + +/* + * Method: BClipboard::DataSource() + * Descr: + */ +BMessenger +BClipboard_DataSource(BClipboard *Clipboard) +{ + return Clipboard->DataSource(); +} + + +/* + * Method: BClipboard::Data() + * Descr: + */ +BMessage * +BClipboard_Data(BClipboard *Clipboard) +{ + return Clipboard->Data(); +} + + +/* + * Method: BClipboard::BClipboard() + * Descr: + */ +/*TCPlusObject BClipboard_Create(TPasObject PasObject, const BClipboard &) +{ + return new BPClipboard(PasObject, ); +}*/ + + +/* + * Method: BClipboard::operator=() + * Descr: + */ +/*BClipboard & +BClipboard_operator=(BClipboard *Clipboard, const BClipboard &) +{ + return Clipboard->operator=(); +}*/ + + +/* + * Method: BClipboard::_ReservedClipboard1() + * Descr: + */ +/*void +BClipboard__ReservedClipboard1(BClipboard *Clipboard) +{ + Clipboard->_ReservedClipboard1(); +}*/ + + +/* + * Method: BClipboard::_ReservedClipboard2() + * Descr: + */ +/*void +BClipboard__ReservedClipboard2(BClipboard *Clipboard) +{ + Clipboard->_ReservedClipboard2(); +}*/ + + +/* + * Method: BClipboard::_ReservedClipboard3() + * Descr: + */ +/*void +BClipboard__ReservedClipboard3(BClipboard *Clipboard) +{ + Clipboard->_ReservedClipboard3(); +}*/ + + +/* + * Method: BClipboard::AssertLocked() + * Descr: + */ +/*bool +BClipboard_AssertLocked(BClipboard *Clipboard) +{ + return Clipboard->AssertLocked(); +}*/ + + +/* + * Method: BClipboard::DownloadFromSystem() + * Descr: + */ +/*status_t +BClipboard_DownloadFromSystem(BClipboard *Clipboard, bool force) +{ + return Clipboard->DownloadFromSystem(force); +}*/ + + +/* + * Method: BClipboard::UploadToSystem() + * Descr: + */ +/*status_t +BClipboard_UploadToSystem(BClipboard *Clipboard) +{ + return Clipboard->UploadToSystem(); +}*/ + +#if defined(__cplusplus) +} +#endif + +#endif /* _CLIPBOARD_CPP_ */ \ No newline at end of file diff --git a/bepascal/bepascal/be/app/application.h b/bepascal/bepascal/be/app/application.h new file mode 100644 index 0000000..7a808cf --- /dev/null +++ b/bepascal/bepascal/be/app/application.h @@ -0,0 +1,53 @@ +/* BePascal - A pascal wrapper around the BeOS API + Copyright (C) 2002 Olivier Coursiere + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef _APPLICATION_H_ +#define _APPLICATION_H_ + +#include +#include +#include + +// #include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +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: +}; + +#endif /* _APPLICATION_H_ */ \ No newline at end of file diff --git a/bepascal/bepascal/be/app/handler.h b/bepascal/bepascal/be/app/handler.h new file mode 100644 index 0000000..47ff37e --- /dev/null +++ b/bepascal/bepascal/be/app/handler.h @@ -0,0 +1,36 @@ +/* BePascal - A pascal wrapper around the BeOS API + Copyright (C) 2002 Olivier Coursiere + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef _HANDLER_H_ +#define _HANDLER_H_ + +#include + +#include + +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: +}; + +#endif /* _HANDLER_H_ */ \ No newline at end of file diff --git a/bepascal/bepascal/be/app/looper.h b/bepascal/bepascal/be/app/looper.h new file mode 100644 index 0000000..a5b5d58 --- /dev/null +++ b/bepascal/bepascal/be/app/looper.h @@ -0,0 +1,43 @@ +/* BePascal - A pascal wrapper around the BeOS API + Copyright (C) 2002 Olivier Coursiere + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef _LOOPER_H_ +#define _LOOPER_H_ + +#include +#include + +#include + +#include + +#include + +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: +}; + +#endif /* _LOOPER_H_ */ \ No newline at end of file diff --git a/bepascal/bepascal/be/app/message.h b/bepascal/bepascal/be/app/message.h new file mode 100644 index 0000000..3acc37c --- /dev/null +++ b/bepascal/bepascal/be/app/message.h @@ -0,0 +1,38 @@ +/* BePascal - A pascal wrapper around the BeOS API + Copyright (C) 2002 Olivier Coursiere + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef _MESSAGE_H_ +#define _MESSAGE_H_ + +#include +#include + +#include + +#include + +class BPMessage : public BMessage, private BPasObject +{ + public: + BPMessage(TPasObject PasObject); + BPMessage(TPasObject PasObject, uint32 what); + BPMessage(TPasObject PasObject, TCPlusObject message); + private: +}; + +#endif /* _MESSAGE_H_ */ \ No newline at end of file diff --git a/bepascal/bepascal/be/app/roster.h b/bepascal/bepascal/be/app/roster.h new file mode 100644 index 0000000..db1a1f3 --- /dev/null +++ b/bepascal/bepascal/be/app/roster.h @@ -0,0 +1,24 @@ +/* BePascal - A pascal wrapper around the BeOS API + Copyright (C) 2002 Olivier Coursiere + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef _ROSTER_H_ +#define _ROSTER_H_ + +#include + +#endif /* _ROSTER_H_ */ \ No newline at end of file diff --git a/bepascal/bepascal/be/bepas_kernel/beobj.h b/bepascal/bepascal/be/bepas_kernel/beobj.h new file mode 100644 index 0000000..cad0ad4 --- /dev/null +++ b/bepascal/bepascal/be/bepas_kernel/beobj.h @@ -0,0 +1,38 @@ +/* BePascal - A pascal wrapper around the BeOS API + Copyright (C) 2002 Olivier Coursiere + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef _BEOBJ_H_ +#define _BEOBJ_H_ + +typedef void* TPasObject; +typedef void* TCPlusObject; + +typedef char *(*BPasObject_GetPasClassName_hook)(TPasObject PasObject); + +class BPasObject +{ + public: + BPasObject(TPasObject PasObject); + TPasObject GetPasObject(void) const; + virtual ~BPasObject(void); + char *GetPasClassName(void); + private: + TPasObject FPasObject; +}; + +#endif /* _BEOBJ_H_ */ \ No newline at end of file diff --git a/bepascal/bepascal/be/interface/graphicdefs.pp b/bepascal/bepascal/be/interface/graphicdefs.pp new file mode 100644 index 0000000..60262a5 --- /dev/null +++ b/bepascal/bepascal/be/interface/graphicdefs.pp @@ -0,0 +1,19 @@ +unit graphicdefs; + +interface + +{$PACKRECORDS C} + +type + TRGB_color = record + red : byte; + green : byte; + blue : byte; + alpha : byte; + end; + +implementation + +initialization + +end. \ No newline at end of file diff --git a/bepascal/bepascal/be/interface/point.h b/bepascal/bepascal/be/interface/point.h new file mode 100644 index 0000000..481ada5 --- /dev/null +++ b/bepascal/bepascal/be/interface/point.h @@ -0,0 +1,34 @@ +/* BePascal - A pascal wrapper around the BeOS API + Copyright (C) 2002 Olivier Coursiere + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef _POINT_H_ +#define _POINT_H_ + +#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); +}; + +#endif _POINT_H_ /* _POINT_H_ */ \ No newline at end of file diff --git a/bepascal/bepascal/be/interface/rect.h b/bepascal/bepascal/be/interface/rect.h new file mode 100644 index 0000000..03b0fad --- /dev/null +++ b/bepascal/bepascal/be/interface/rect.h @@ -0,0 +1,37 @@ +/* BePascal - A pascal wrapper around the BeOS API + Copyright (C) 2002 Olivier Coursiere + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef _RECT_H_ +#define _RECT_H_ + +#include +#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); +}; + +#endif _RECT_H_ /* _RECT_H_ */ \ No newline at end of file diff --git a/bepascal/bepascal/be/interface/view.h b/bepascal/bepascal/be/interface/view.h new file mode 100644 index 0000000..5988808 --- /dev/null +++ b/bepascal/bepascal/be/interface/view.h @@ -0,0 +1,61 @@ +/* BePascal - A pascal wrapper around the BeOS API + Copyright (C) 2002 Olivier Coursiere + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef _VIEW_H_ +#define _VIEW_H_ + +#include + +#include + +#include +#include + +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: +}; + +#endif /* _VIEW_H_ */ \ No newline at end of file diff --git a/bepascal/bepascal/be/interface/window.h b/bepascal/bepascal/be/interface/window.h new file mode 100644 index 0000000..aa1d58b --- /dev/null +++ b/bepascal/bepascal/be/interface/window.h @@ -0,0 +1,44 @@ +/* BePascal - A pascal wrapper around the BeOS API + Copyright (C) 2002 Olivier Coursiere + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef _WINDOW_H_ +#define _WINDOW_H_ + +#include + +#include + +#include +#include +#include + +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: +}; + +#endif /* _WINDOW_H_ */ \ No newline at end of file diff --git a/bepascal/bepascal/be/support/archivable.h b/bepascal/bepascal/be/support/archivable.h new file mode 100644 index 0000000..0af6221 --- /dev/null +++ b/bepascal/bepascal/be/support/archivable.h @@ -0,0 +1,42 @@ +/* BePascal - A pascal wrapper around the BeOS API + Copyright (C) 2002 Olivier Coursiere + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#ifndef _ARCHIVABLE_H_ +#define _ARCHIVABLE_H_ + +#include + +#include + +#include + + +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: +}; + +#endif /* _ARCHIVABLE_H_ */ \ No newline at end of file diff --git a/bepascal/bepascal/bepascal/bepascal.proj b/bepascal/bepascal/bepascal/bepascal.proj index 0e75068..eaa3e3a 100644 Binary files a/bepascal/bepascal/bepascal/bepascal.proj and b/bepascal/bepascal/bepascal/bepascal.proj differ