From aeec287775b2b881ab7dd161bb302cb4ef4f4c33 Mon Sep 17 00:00:00 2001 From: ocoursiere Date: Fri, 10 Jan 2003 19:59:31 +0000 Subject: [PATCH] BButton is now wrapped ! Be GUI apps in pascal are comming soon. --- bepascal/bepascal/be/app/Application.cpp | 25 +- bepascal/bepascal/be/app/Handler.cpp | 13 +- bepascal/bepascal/be/app/Looper.cpp | 18 + bepascal/bepascal/be/app/application.h | 5 +- bepascal/bepascal/be/app/handler.h | 5 + bepascal/bepascal/be/app/handler.pp | 2 + bepascal/bepascal/be/app/looper.h | 3 + bepascal/bepascal/be/interface/Button.cpp | 135 +- bepascal/bepascal/be/interface/Control.cpp | 18 + bepascal/bepascal/be/interface/View.cpp | 19 +- bepascal/bepascal/be/interface/Window.cpp | 2001 ++++++++++++++++- bepascal/bepascal/be/interface/button.pp | 32 +- bepascal/bepascal/be/interface/control.h | 3 + bepascal/bepascal/be/interface/control.pp | 26 +- bepascal/bepascal/be/interface/graphicdefs.pp | 5 +- bepascal/bepascal/be/interface/view.h | 5 +- bepascal/bepascal/be/interface/view.pp | 28 +- bepascal/bepascal/be/interface/window.h | 8 +- bepascal/bepascal/be/interface/window.pp | 1252 ++++++++++- bepascal/bepascal/be/kernel/os.pp | 45 + bepascal/bepascal/bepascal/bepascal.proj | Bin 16316 -> 16964 bytes bepascal/bepascal/test_app/hello.pp | 25 +- 22 files changed, 3595 insertions(+), 78 deletions(-) diff --git a/bepascal/bepascal/be/app/Application.cpp b/bepascal/bepascal/be/app/Application.cpp index 15890fc..064dd70 100644 --- a/bepascal/bepascal/be/app/Application.cpp +++ b/bepascal/bepascal/be/app/Application.cpp @@ -73,23 +73,44 @@ BPApplication::BPApplication(TPasObject PasObject, const char *signature, } void BPApplication::AppActivated(bool active) +{ + AppActivated_hookCall(active); + BApplication::AppActivated(active); +} + +void BPApplication::AppActivated_hookCall(bool active) { Application_AppActivated_hook(GetPasObject(), active); } void BPApplication::ReadyToRun(void) +{ + ReadyToRun_hookCall(); + BApplication::ReadyToRun(); +} + +void BPApplication::ReadyToRun_hookCall(void) { Application_ReadyToRun_hook(GetPasObject()); } bool BPApplication::QuitRequested(void) { - return BPLooper::QuitRequested(); + return QuitRequested_hookCall(); +// return BApplication::QuitRequested(); } void BPApplication::MessageReceived(BMessage *message) { - BPHandler::MessageReceived(message); + MessageReceived_hookCall(message); + BApplication::MessageReceived(message); +} + +void BPApplication::DispatchMessage(BMessage *message, BHandler *target) +{ + DispatchMessage_hookCall(message, target); +// message->PrintToStream(); + BApplication::DispatchMessage(message, target); } #if defined(__cplusplus) diff --git a/bepascal/bepascal/be/app/Handler.cpp b/bepascal/bepascal/be/app/Handler.cpp index f67fe0f..1ab1574 100644 --- a/bepascal/bepascal/be/app/Handler.cpp +++ b/bepascal/bepascal/be/app/Handler.cpp @@ -24,10 +24,6 @@ #include #include -// definition of callback function in BHandler - -typedef void (*BHandler_MessageReceived_hook) (TPasObject PasObject, TCPlusObject message); - #if defined(__cplusplus) extern "C" { #endif @@ -43,6 +39,7 @@ BPHandler::BPHandler(TPasObject PasObject, const char *name) { } + BPHandler::BPHandler(TPasObject PasObject, BMessage *archive) : BHandler(archive), BPasObject(PasObject) { @@ -55,7 +52,13 @@ BPHandler::~BPHandler() void BPHandler::MessageReceived(BMessage *message) { - Handler_MessageReceived_hook(GetPasObject(), message); + MessageReceived_hookCall(message); + BHandler::MessageReceived(message); +} + +void BPHandler::MessageReceived_hookCall(BMessage *message) +{ + Handler_MessageReceived_hook(GetPasObject(), message); } diff --git a/bepascal/bepascal/be/app/Looper.cpp b/bepascal/bepascal/be/app/Looper.cpp index fcf7ad5..2c9d04e 100644 --- a/bepascal/bepascal/be/app/Looper.cpp +++ b/bepascal/bepascal/be/app/Looper.cpp @@ -61,15 +61,33 @@ BPLooper::~BPLooper() } void BPLooper::DispatchMessage(BMessage *message, BHandler *target) +{ + DispatchMessage_hookCall(message, target); + BLooper::DispatchMessage(message, target); +} + +void BPLooper::DispatchMessage_hookCall(BMessage *message, BHandler *target) { Looper_DispatchMessage_hook(GetPasObject(), message, target); } bool BPLooper::QuitRequested(void) { + QuitRequested_hookCall(); return Looper_QuitRequested_hook(GetPasObject()); } +bool BPLooper::QuitRequested_hookCall(void) +{ + return Looper_QuitRequested_hook(GetPasObject()); +} + +void BPLooper::MessageReceived(BMessage *message) +{ + MessageReceived_hookCall(message); + BLooper::MessageReceived(message); +} + #if defined(__cplusplus) extern "C" { #endif diff --git a/bepascal/bepascal/be/app/application.h b/bepascal/bepascal/be/app/application.h index 7a808cf..9446f8c 100644 --- a/bepascal/bepascal/be/app/application.h +++ b/bepascal/bepascal/be/app/application.h @@ -46,7 +46,10 @@ class BPApplication : public BApplication, public virtual BPLooper virtual void AppActivated(bool active); virtual void ReadyToRun(void); virtual bool QuitRequested(void); - virtual void MessageReceived(BMessage *message); + virtual void MessageReceived(BMessage *message); + virtual void DispatchMessage(BMessage *message, BHandler *target); + virtual void AppActivated_hookCall(bool active); + virtual void ReadyToRun_hookCall(void); private: }; diff --git a/bepascal/bepascal/be/app/handler.h b/bepascal/bepascal/be/app/handler.h index 47ff37e..eba51dd 100644 --- a/bepascal/bepascal/be/app/handler.h +++ b/bepascal/bepascal/be/app/handler.h @@ -23,6 +23,10 @@ #include +// definition of callback function in BHandler + +typedef void (*BHandler_MessageReceived_hook) (TPasObject PasObject, TCPlusObject message); + class BPHandler : public BHandler, public virtual BPasObject { public: @@ -30,6 +34,7 @@ class BPHandler : public BHandler, public virtual BPasObject BPHandler(TPasObject PasObject, BMessage *archive); virtual ~BPHandler(void); virtual void MessageReceived(BMessage *message); + virtual void MessageReceived_hookCall(BMessage *message); private: }; diff --git a/bepascal/bepascal/be/app/handler.pp b/bepascal/bepascal/be/app/handler.pp index 64a79f7..7980fce 100644 --- a/bepascal/bepascal/be/app/handler.pp +++ b/bepascal/bepascal/be/app/handler.pp @@ -39,7 +39,9 @@ var procedure THandler.MessageReceived(aMessage : TMessage); begin + WriteLn(ClassName + '.MessageReceived'); WriteLn('Message reçue'); + aMessage.PrintToStream; end; procedure Handler_MessageReceived_hook_func(Handler : THandler; aMessage : TCPlusObject); cdecl; diff --git a/bepascal/bepascal/be/app/looper.h b/bepascal/bepascal/be/app/looper.h index a5b5d58..4722c59 100644 --- a/bepascal/bepascal/be/app/looper.h +++ b/bepascal/bepascal/be/app/looper.h @@ -37,6 +37,9 @@ class BPLooper : public BLooper, public virtual BPHandler virtual ~BPLooper(); virtual void DispatchMessage(BMessage *message, BHandler *target); virtual bool QuitRequested(void); + virtual void MessageReceived(BMessage *message); + virtual void DispatchMessage_hookCall(BMessage *message, BHandler *target); + virtual bool QuitRequested_hookCall(void); private: }; diff --git a/bepascal/bepascal/be/interface/Button.cpp b/bepascal/bepascal/be/interface/Button.cpp index d886bae..8e6f23f 100644 --- a/bepascal/bepascal/be/interface/Button.cpp +++ b/bepascal/bepascal/be/interface/Button.cpp @@ -42,7 +42,7 @@ BButton_MakeDefault_hook Button_MakeDefault_hook; } #endif -class BPButton : public BButton, virtual public BPControl +class BPButton : public BButton, virtual public BPControl { public: // @@ -54,7 +54,29 @@ class BPButton : public BButton, virtual public BPControl uint32 resizeMask, uint32 flags); BPButton(TPasObject PasObject, BMessage *archive); + virtual void MessageReceived(BMessage *message); + virtual void Draw(BRect updateRect); + virtual void AttachedToWindow(void); virtual void MakeDefault(bool flag); + virtual void WindowActivated(bool active); + + virtual void AllAttached(void); + virtual void AllDetached(void); + virtual void DetachedFromWindow(void); + 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 SetEnabled(bool enabled); + virtual void SetValue(int32 value); private: }; @@ -83,11 +105,120 @@ BPButton::BPButton(TPasObject PasObject, BMessage *archive) BPHandler(PasObject, archive), BPasObject(PasObject) { + +} + +void BPButton::MessageReceived(BMessage *message) +{ + MessageReceived_hookCall(message); + BButton::MessageReceived(message); +} + +void BPButton::Draw(BRect updateRect) +{ + BButton::Draw(updateRect); + Draw_hookCall(updateRect); +} + +void BPButton::AttachedToWindow(void) +{ + BButton::AttachedToWindow(); + AttachedToWindow_hookCall(); } void BPButton::MakeDefault(bool flag) { - Button_MakeDefault_hook(GetPasObject(), flag); +// Button_MakeDefault_hook(GetPasObject(), flag); +} + +void BPButton::WindowActivated(bool active) +{ + BButton::WindowActivated(active); +} + +void BPButton::AllAttached(void) +{ + BButton::AllAttached(); +} + +void BPButton::AllDetached(void) +{ + BButton::AllDetached(); +} + +void BPButton::DetachedFromWindow(void) +{ + BButton::DetachedFromWindow(); +} + +void BPButton::DrawAfterChildren(BRect updateRect) +{ + BButton::DrawAfterChildren(updateRect); +} + +void BPButton::FrameMoved(BPoint parentPoint) +{ + BButton::FrameMoved(parentPoint); +} + +void BPButton::FrameResized(float width, float height) +{ + BButton::FrameResized(width, height); +} + +void BPButton::GetPreferredSize(float *width, float *height) +{ + BButton::GetPreferredSize(width, height); +} + +void BPButton::ResizeToPreferred(void) +{ + BButton::ResizeToPreferred(); +} + +void BPButton::KeyDown(const char *bytes, int32 numBytes) +{ + BButton::KeyDown(bytes, numBytes); +} + +void BPButton::KeyUp(const char *bytes, int32 numBytes) +{ + BButton::KeyUp(bytes, numBytes); +} + +void BPButton::MouseDown(BPoint point) +{ + BButton::MouseDown(point); +} + +void BPButton::MouseMoved(BPoint point, uint32 transit, const BMessage *message) +{ + BButton::MouseMoved(point, transit, message); +} + +void BPButton::MouseUp(BPoint point) +{ + BButton::MouseUp(point); +} + +void BPButton::Pulse(void) +{ + BButton::Pulse(); +} + +//void BPButton::TargetedByScrollView(BScrollView *scroller) +//{ +// BButton::TargetedByScrollView(scroller); +//} + +void BPButton::SetEnabled(bool enabled) +{ + BButton::SetEnabled(enabled); +} + +void BPButton::SetValue(int32 value) +{ + BButton::SetValue(value); } #if defined(__cplusplus) diff --git a/bepascal/bepascal/be/interface/Control.cpp b/bepascal/bepascal/be/interface/Control.cpp index 4e580a8..98408b4 100644 --- a/bepascal/bepascal/be/interface/Control.cpp +++ b/bepascal/bepascal/be/interface/Control.cpp @@ -65,6 +65,24 @@ BPControl::BPControl(TPasObject PasObject, BMessage *message): { } +void BPControl::MessageReceived(BMessage *message) +{ + MessageReceived_hookCall(message); + BControl::MessageReceived(message); +} + +void BPControl::Draw(BRect updateRect) +{ + BControl::Draw(updateRect); + Draw_hookCall(updateRect); +} + +void BPControl::AttachedToWindow(void) +{ + BControl::AttachedToWindow(); + AttachedToWindow_hookCall(); +} + void BPControl::SetEnabled(bool enabled) { Control_SetEnabled_hook(GetPasObject(), enabled); diff --git a/bepascal/bepascal/be/interface/View.cpp b/bepascal/bepascal/be/interface/View.cpp index d2176fd..0158d92 100644 --- a/bepascal/bepascal/be/interface/View.cpp +++ b/bepascal/bepascal/be/interface/View.cpp @@ -106,6 +106,12 @@ BPView::BPView(TPasObject PasObject, BMessage *archive) { } +void BPView::MessageReceived(BMessage *message) +{ + MessageReceived_hookCall(message); + BView::MessageReceived(message); +} + void BPView::AllAttached(void) { View_AllAttached_hook(GetPasObject()); @@ -113,7 +119,13 @@ void BPView::AllAttached(void) void BPView::AttachedToWindow(void) { - View_AttachedToWindow_hook(GetPasObject()); + BView::AttachedToWindow(); + AttachedToWindow_hookCall(); +} + +void BPView::AttachedToWindow_hookCall(void) +{ + View_AttachedToWindow_hook(GetPasObject()); } void BPView::AllDetached(void) @@ -129,6 +141,11 @@ void BPView::DetachedFromWindow(void) void BPView::Draw(BRect updateRect) { BView::Draw(updateRect); + Draw_hookCall(updateRect); +} + +void BPView::Draw_hookCall(BRect updateRect) +{ View_Draw_hook(GetPasObject(), &updateRect); } diff --git a/bepascal/bepascal/be/interface/Window.cpp b/bepascal/bepascal/be/interface/Window.cpp index 2e0f2fa..bb338d0 100644 --- a/bepascal/bepascal/be/interface/Window.cpp +++ b/bepascal/bepascal/be/interface/Window.cpp @@ -23,17 +23,17 @@ #include +#include #include #include // definition of callback function in BWindow - +#include #if defined(__cplusplus) extern "C" { #endif - #if defined(__cplusplus) } #endif @@ -51,6 +51,29 @@ BPWindow::BPWindow(TPasObject PasObject, { } +void BPWindow::MessageReceived(BMessage *message) +{ + MessageReceived_hookCall(message); + BWindow::MessageReceived(message); + message->PrintToStream(); +} + +void BPWindow::DispatchMessage(BMessage *message, BHandler *target) +{ + DispatchMessage_hookCall(message, target); + BWindow::DispatchMessage(message, target); +} + +bool BPWindow::QuitRequested(void) +{ + return QuitRequested_hookCall(); +} + +void BPWindow::WindowActivated(bool active) +{ + BWindow::WindowActivated(active); +} + #if defined(__cplusplus) extern "C" { #endif @@ -73,7 +96,6 @@ void BWindow_Free(TCPlusObject Window) void BWindow_Show(TCPlusObject Window) { reinterpret_cast(Window)->Show(); - reinterpret_cast(Window)->UpdateIfNeeded(); } void BWindow_Hide(TCPlusObject Window) @@ -101,6 +123,1979 @@ int32 BWindow_CountChildren(BWindow* Window, void) return Window->CountChildren(); } +//********************************* + +/* BePascal - A pascal wrapper around the BeOS API + Copyright (C) 2002 Olivier Coursiere + Eric Jourde + + 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 +*/ +/*********************************************************************** + * Method: BWindow::BWindow + * Params: BRect frame, const char *title, window_type type, uint32 flags, uint32 workspace + * Effects: + ***********************************************************************/ +TCPlusObject BWindow_Create(TPasObject PasObject, BRect frame, const char *title, window_type type, uint32 flags, uint32 workspace) +{ + return new BPWindow(PasObject, frame, title, type, flags, workspace); +} + + +/*********************************************************************** + * Method: BWindow::BWindow + * Params: BRect frame, const char *title, window_look look, window_feel feel, uint32 flags, uint32 workspace + * Effects: + ***********************************************************************/ +/*TCPlusObject BWindow_Create_1 +(TPasObject PasObject, BRect frame, const char *title, window_look look, window_feel feel, uint32 flags, uint32 workspace) +{ + return new BPWindow(PasObject, frame, title, look, feel, flags, workspace); +} +*/ + +/*********************************************************************** + * Method: BWindow::BWindow + * Params: BMessage *data + * Effects: + ***********************************************************************/ +TCPlusObject BWindow_Create_2(TPasObject PasObject, BMessage *data) +{ +// return new BPWindow(PasObject, data); +} + + +/*********************************************************************** + * Method: BWindow::Instantiate + * Params: BMessage *data + * Returns: BArchivable * + * Effects: + ***********************************************************************/ +BArchivable * +BWindow_Instantiate(BWindow *Window, BMessage *data) +{ + return Window->Instantiate(data); +} + + +/*********************************************************************** + * Method: BWindow::Archive + * Params: BMessage *data, bool deep + * Returns: status_t + * Effects: + ***********************************************************************/ +status_t +BWindow_Archive(BWindow *Window, BMessage *data, bool deep) +{ + return Window->Archive(data, deep); +} + + +/*********************************************************************** + * Method: BWindow::Quit + * Params: + * Returns: void + * Effects: + ***********************************************************************/ +void +BWindow_Quit(BWindow *Window) +{ + Window->Quit(); +} + + +/*********************************************************************** + * Method: BWindow::AddChild + * Params: BView *child, BView *before + * Returns: void + * Effects: + ***********************************************************************/ +/*void +BWindow_AddChild(BWindow *Window, BView *child, BView *before) +{ + Window->AddChild(child, before); +} +*/ + +/*********************************************************************** + * Method: BWindow::RemoveChild + * Params: BView *child + * Returns: bool + * Effects: + ***********************************************************************/ +/*bool +BWindow_RemoveChild(BWindow *Window, BView *child) +{ + return Window->RemoveChild(child); +} +*/ + + +/*********************************************************************** + * Method: BWindow::CountChildren + * Params: + * Returns: int32 + * Effects: + ***********************************************************************/ +/*int32 +BWindow_CountChildren(BWindow *Window) +{ + return Window->CountChildren(); +} +*/ + + +/*********************************************************************** + * Method: BWindow::ChildAt + * Params: int32 index + * Returns: BView * + * Effects: + ***********************************************************************/ +/*BView * +BWindow_ChildAt(BWindow *Window, int32 index) +{ + return Window->ChildAt(index); +} +*/ + +/*********************************************************************** + * Method: BWindow::DispatchMessage + * Params: BMessage *message, BHandler *handler + * Returns: void + * Effects: + ***********************************************************************/ +void +BWindow_DispatchMessage(BWindow *Window, BMessage *message, BHandler *handler) +{ + Window->DispatchMessage(message, handler); +} + + +/*********************************************************************** + * Method: BWindow::MessageReceived + * Params: BMessage *message + * Returns: void + * Effects: + ***********************************************************************/ +void +BWindow_MessageReceived(BWindow *Window, BMessage *message) +{ + Window->MessageReceived(message); +} + + +/*********************************************************************** + * Method: BWindow::FrameMoved + * Params: BPoint new_position + * Returns: void + * Effects: + ***********************************************************************/ +void +BWindow_FrameMoved(BWindow *Window, BPoint new_position) +{ + Window->FrameMoved(new_position); +} + + +/*********************************************************************** + * Method: BWindow::WorkspacesChanged + * Params: uint32 old_ws, uint32 new_ws + * Returns: void + * Effects: + ***********************************************************************/ +void +BWindow_WorkspacesChanged(BWindow *Window, uint32 old_ws, uint32 new_ws) +{ + Window->WorkspacesChanged(old_ws, new_ws); +} + + +/*********************************************************************** + * Method: BWindow::WorkspaceActivated + * Params: int32 ws, bool state + * Returns: void + * Effects: + ***********************************************************************/ +void +BWindow_WorkspaceActivated(BWindow *Window, int32 ws, bool state) +{ + Window->WorkspaceActivated(ws, state); +} + + +/*********************************************************************** + * Method: BWindow::FrameResized + * Params: float new_width, float new_height + * Returns: void + * Effects: + ***********************************************************************/ +void +BWindow_FrameResized(BWindow *Window, float new_width, float new_height) +{ + Window->FrameResized(new_width, new_height); +} + + +/*********************************************************************** + * Method: BWindow::Minimize + * Params: bool minimize + * Returns: void + * Effects: + ***********************************************************************/ +void +BWindow_Minimize(BWindow *Window, bool minimize) +{ + Window->Minimize(minimize); +} + + +/*********************************************************************** + * Method: BWindow::Zoom + * Params: BPoint rec_position, float rec_width, float rec_height + * Returns: void + * Effects: + ***********************************************************************/ +void +BWindow_Zoom(BWindow *Window, BPoint rec_position, float rec_width, float rec_height) +{ + Window->Zoom(rec_position, rec_width, rec_height); +} + + +/*********************************************************************** + * Method: BWindow::Zoom + * Params: + * Returns: void + * Effects: + ***********************************************************************/ +void +BWindow_Zoom_1 +(BWindow *Window) +{ + Window->Zoom(); +} + + +/*********************************************************************** + * Method: BWindow::SetZoomLimits + * Params: float max_h, float max_v + * Returns: void + * Effects: + ***********************************************************************/ +void +BWindow_SetZoomLimits(BWindow *Window, float max_h, float max_v) +{ + Window->SetZoomLimits(max_h, max_v); +} + + +/*********************************************************************** + * Method: BWindow::ScreenChanged + * Params: BRect screen_size, color_space depth + * Returns: void + * Effects: + ***********************************************************************/ +void +BWindow_ScreenChanged(BWindow *Window, BRect screen_size, color_space depth) +{ + Window->ScreenChanged(screen_size, depth); +} + + +/*********************************************************************** + * Method: BWindow::SetPulseRate + * Params: bigtime_t rate + * Returns: void + * Effects: + ***********************************************************************/ +void +BWindow_SetPulseRate(BWindow *Window, bigtime_t rate) +{ + Window->SetPulseRate(rate); +} + + +/*********************************************************************** + * Method: BWindow::PulseRate + * Params: + * Returns: bigtime_t + * Effects: + ***********************************************************************/ +bigtime_t +BWindow_PulseRate(BWindow *Window) +{ + return Window->PulseRate(); +} + + +/*********************************************************************** + * Method: BWindow::AddShortcut + * Params: uint32 key, uint32 modifiers, BMessage *msg + * Returns: void + * Effects: + ***********************************************************************/ +void +BWindow_AddShortcut(BWindow *Window, uint32 key, uint32 modifiers, BMessage *msg) +{ + Window->AddShortcut(key, modifiers, msg); +} + + +/*********************************************************************** + * Method: BWindow::AddShortcut + * Params: uint32 key, uint32 modifiers, BMessage *msg, BHandler *target + * Returns: void + * Effects: + ***********************************************************************/ +void +BWindow_AddShortcut_1 +(BWindow *Window, uint32 key, uint32 modifiers, BMessage *msg, BHandler *target) +{ + Window->AddShortcut(key, modifiers, msg, target); +} + + +/*********************************************************************** + * Method: BWindow::RemoveShortcut + * Params: uint32 key, uint32 modifiers + * Returns: void + * Effects: + ***********************************************************************/ +void +BWindow_RemoveShortcut(BWindow *Window, uint32 key, uint32 modifiers) +{ + Window->RemoveShortcut(key, modifiers); +} + + +/*********************************************************************** + * Method: BWindow::SetDefaultButton + * Params: BButton *button + * Returns: void + * Effects: + ***********************************************************************/ +void +BWindow_SetDefaultButton(BWindow *Window, BButton *button) +{ + Window->SetDefaultButton(button); +} + + +/*********************************************************************** + * Method: BWindow::DefaultButton + * Params: + * Returns: BButton * + * Effects: + ***********************************************************************/ +BButton * +BWindow_DefaultButton(BWindow *Window) +{ + return Window->DefaultButton(); +} + + +/*********************************************************************** + * Method: BWindow::MenusBeginning + * Params: + * Returns: void + * Effects: + ***********************************************************************/ +void +BWindow_MenusBeginning(BWindow *Window) +{ + Window->MenusBeginning(); +} + + +/*********************************************************************** + * Method: BWindow::MenusEnded + * Params: + * Returns: void + * Effects: + ***********************************************************************/ +void +BWindow_MenusEnded(BWindow *Window) +{ + Window->MenusEnded(); +} + + +/*********************************************************************** + * Method: BWindow::NeedsUpdate + * Params: + * Returns: bool + * Effects: + ***********************************************************************/ +bool +BWindow_NeedsUpdate(BWindow *Window) +{ + return Window->NeedsUpdate(); +} + + +/*********************************************************************** + * Method: BWindow::UpdateIfNeeded + * Params: + * Returns: void + * Effects: + ***********************************************************************/ +void +BWindow_UpdateIfNeeded(BWindow *Window) +{ + Window->UpdateIfNeeded(); +} + + +/*********************************************************************** + * Method: BWindow::FindView + * Params: const char *view_name + * Returns: BView * + * Effects: + ***********************************************************************/ +BView * +BWindow_FindView(BWindow *Window, const char *view_name) +{ + return Window->FindView(view_name); +} + + +/*********************************************************************** + * Method: BWindow::FindView + * Params: BPoint + * Returns: BView * + * Effects: + ***********************************************************************/ +BView * +BWindow_FindView_1 +(BWindow *Window, BPoint aPoint) +{ + return Window->FindView(aPoint); +} + + +/*********************************************************************** + * Method: BWindow::CurrentFocus + * Params: + * Returns: BView * + * Effects: + ***********************************************************************/ +BView * +BWindow_CurrentFocus(BWindow *Window) +{ + return Window->CurrentFocus(); +} + + +/*********************************************************************** + * Method: BWindow::Activate + * Params: bool + * Returns: void + * Effects: + ***********************************************************************/ +void +BWindow_Activate(BWindow *Window, bool) +{ + Window->Activate(); +} + + +/*********************************************************************** + * Method: BWindow::WindowActivated + * Params: bool state + * Returns: void + * Effects: + ***********************************************************************/ +void +BWindow_WindowActivated(BWindow *Window, bool state) +{ + Window->WindowActivated(state); +} + + +/*********************************************************************** + * Method: BWindow::ConvertToScreen + * Params: BPoint *pt + * Returns: void + * Effects: + ***********************************************************************/ +void +BWindow_ConvertToScreen_3(BWindow *Window, BPoint *pt) +{ + Window->ConvertToScreen(pt); +} + + +/*********************************************************************** + * Method: BWindow::ConvertToScreen + * Params: BPoint pt + * Returns: BPoint + * Effects: + ***********************************************************************/ +BPoint +BWindow_ConvertToScreen_1 +(BWindow *Window, BPoint pt) +{ + return Window->ConvertToScreen(pt); +} + + +/*********************************************************************** + * Method: BWindow::ConvertFromScreen + * Params: BPoint *pt + * Returns: void + * Effects: + ***********************************************************************/ +void +BWindow_ConvertFromScreen(BWindow *Window, BPoint *pt) +{ + Window->ConvertFromScreen(pt); +} + + +/*********************************************************************** + * Method: BWindow::ConvertFromScreen + * Params: BPoint pt + * Returns: BPoint + * Effects: + ***********************************************************************/ +BPoint +BWindow_ConvertFromScreen_1 +(BWindow *Window, BPoint pt) +{ + return Window->ConvertFromScreen(pt); +} + + +/*********************************************************************** + * Method: BWindow::ConvertToScreen + * Params: BRect *rect + * Returns: void + * Effects: + ***********************************************************************/ +void +BWindow_ConvertToScreen_2(BWindow *Window, BRect *rect) +{ + Window->ConvertToScreen(rect); +} + + +/*********************************************************************** + * Method: BWindow::ConvertToScreen + * Params: BRect rect + * Returns: BRect + * Effects: + ***********************************************************************/ +BRect +BWindow_ConvertToScreen_5 +(BWindow *Window, BRect rect) +{ + return Window->ConvertToScreen(rect); +} + + +/*********************************************************************** + * Method: BWindow::ConvertFromScreen + * Params: BRect *rect + * Returns: void + * Effects: + ***********************************************************************/ +void +BWindow_ConvertFromScreen_6(BWindow *Window, BRect *rect) +{ + Window->ConvertFromScreen(rect); +} + + +/*********************************************************************** + * Method: BWindow::ConvertFromScreen + * Params: BRect rect + * Returns: BRect + * Effects: + ***********************************************************************/ +BRect +BWindow_ConvertFromScreen_7 +(BWindow *Window, BRect rect) +{ + return Window->ConvertFromScreen(rect); +} + + +/*********************************************************************** + * Method: BWindow::MoveBy + * Params: float dx, float dy + * Returns: void + * Effects: + ***********************************************************************/ +void +BWindow_MoveBy(BWindow *Window, float dx, float dy) +{ + Window->MoveBy(dx, dy); +} + + +/*********************************************************************** + * Method: BWindow::MoveTo + * Params: BPoint + * Returns: void + * Effects: + ***********************************************************************/ +void +BWindow_MoveTo(BWindow *Window, BPoint aPoint) +{ + Window->MoveTo(aPoint); +} + + +/*********************************************************************** + * Method: BWindow::MoveTo + * Params: float x, float y + * Returns: void + * Effects: + ***********************************************************************/ +void +BWindow_MoveTo_1 +(BWindow *Window, float x, float y) +{ + Window->MoveTo(x, y); +} + + +/*********************************************************************** + * Method: BWindow::ResizeBy + * Params: float dx, float dy + * Returns: void + * Effects: + ***********************************************************************/ +void +BWindow_ResizeBy(BWindow *Window, float dx, float dy) +{ + Window->ResizeBy(dx, dy); +} + + +/*********************************************************************** + * Method: BWindow::ResizeTo + * Params: float width, float height + * Returns: void + * Effects: + ***********************************************************************/ +void +BWindow_ResizeTo(BWindow *Window, float width, float height) +{ + Window->ResizeTo(width, height); +} + + +/*********************************************************************** + * Method: BWindow::Show + * Params: + * Returns: void + * Effects: + ***********************************************************************/ +/*void +BWindow_Show(BWindow *Window) +{ + Window->Show(); +} +*/ + +/*********************************************************************** + * Method: BWindow::Hide + * Params: + * Returns: void + * Effects: + ***********************************************************************/ +/*void +BWindow_Hide(BWindow *Window) +{ + Window->Hide(); +} +*/ + + +/*********************************************************************** + * Method: BWindow::IsHidden + * Params: + * Returns: bool + * Effects: + ***********************************************************************/ +bool +BWindow_IsHidden(BWindow *Window) +{ + return Window->IsHidden(); +} + + +/*********************************************************************** + * Method: BWindow::IsMinimized + * Params: + * Returns: bool + * Effects: + ***********************************************************************/ +bool +BWindow_IsMinimized(BWindow *Window) +{ + return Window->IsMinimized(); +} + + +/*********************************************************************** + * Method: BWindow::Flush + * Params: + * Returns: void + * Effects: + ***********************************************************************/ +void +BWindow_Flush(BWindow *Window) +{ + Window->Flush(); +} + + +/*********************************************************************** + * Method: BWindow::Sync + * Params: + * Returns: void + * Effects: + ***********************************************************************/ +void +BWindow_Sync(BWindow *Window) +{ + Window->Sync(); +} + + +/*********************************************************************** + * Method: BWindow::SendBehind + * Params: const BWindow *window + * Returns: status_t + * Effects: + ***********************************************************************/ +status_t +BWindow_SendBehind(BWindow *Window, const BWindow *window) +{ + return Window->SendBehind(window); +} + + +/*********************************************************************** + * Method: BWindow::DisableUpdates + * Params: + * Returns: void + * Effects: + ***********************************************************************/ +void +BWindow_DisableUpdates(BWindow *Window) +{ + Window->DisableUpdates(); +} + + +/*********************************************************************** + * Method: BWindow::EnableUpdates + * Params: + * Returns: void + * Effects: + ***********************************************************************/ +void +BWindow_EnableUpdates(BWindow *Window) +{ + Window->EnableUpdates(); +} + + +/*********************************************************************** + * Method: BWindow::BeginViewTransaction + * Params: + * Returns: void + * Effects: + ***********************************************************************/ +void +BWindow_BeginViewTransaction(BWindow *Window) +{ + Window->BeginViewTransaction(); +} + + +/*********************************************************************** + * Method: BWindow::EndViewTransaction + * Params: + * Returns: void + * Effects: + ***********************************************************************/ +void +BWindow_EndViewTransaction(BWindow *Window) +{ + Window->EndViewTransaction(); +} + + +/*********************************************************************** + * Method: BWindow::Bounds + * Params: + * Returns: BRect + * Effects: + ***********************************************************************/ +BRect +BWindow_Bounds(BWindow *Window) +{ + return Window->Bounds(); +} + + +/*********************************************************************** + * Method: BWindow::Frame + * Params: + * Returns: BRect + * Effects: + ***********************************************************************/ +BRect +BWindow_Frame(BWindow *Window) +{ + return Window->Frame(); +} + + +/*********************************************************************** + * Method: BWindow::Title + * Params: + * Returns: const char * + * Effects: + ***********************************************************************/ +const char * +BWindow_Title(BWindow *Window) +{ + return Window->Title(); +} + + +/*********************************************************************** + * Method: BWindow::SetTitle + * Params: const char *title + * Returns: void + * Effects: + ***********************************************************************/ +void +BWindow_SetTitle(BWindow *Window, const char *title) +{ + Window->SetTitle(title); +} + + +/*********************************************************************** + * Method: BWindow::IsFront + * Params: + * Returns: bool + * Effects: + ***********************************************************************/ +bool +BWindow_IsFront(BWindow *Window) +{ + return Window->IsFront(); +} + + +/*********************************************************************** + * Method: BWindow::IsActive + * Params: + * Returns: bool + * Effects: + ***********************************************************************/ +bool +BWindow_IsActive(BWindow *Window) +{ + return Window->IsActive(); +} + + +/*********************************************************************** + * Method: BWindow::SetKeyMenuBar + * Params: BMenuBar *bar + * Returns: void + * Effects: + ***********************************************************************/ +void +BWindow_SetKeyMenuBar(BWindow *Window, BMenuBar *bar) +{ + Window->SetKeyMenuBar(bar); +} + + +/*********************************************************************** + * Method: BWindow::KeyMenuBar + * Params: + * Returns: BMenuBar * + * Effects: + ***********************************************************************/ +BMenuBar * +BWindow_KeyMenuBar(BWindow *Window) +{ + return Window->KeyMenuBar(); +} + + +/*********************************************************************** + * Method: BWindow::SetSizeLimits + * Params: float min_h, float max_h, float min_v, float max_v + * Returns: void + * Effects: + ***********************************************************************/ +void +BWindow_SetSizeLimits(BWindow *Window, float min_h, float max_h, float min_v, float max_v) +{ + Window->SetSizeLimits(min_h, max_h, min_v, max_v); +} + + +/*********************************************************************** + * Method: BWindow::GetSizeLimits + * Params: float *min_h, float *max_h, float *min_v, float *max_v + * Returns: void + * Effects: + ***********************************************************************/ +void +BWindow_GetSizeLimits(BWindow *Window, float *min_h, float *max_h, float *min_v, float *max_v) +{ + Window->GetSizeLimits(min_h, max_h, min_v, max_v); +} + + +/*********************************************************************** + * Method: BWindow::Workspaces + * Params: + * Returns: uint32 + * Effects: + ***********************************************************************/ +uint32 +BWindow_Workspaces(BWindow *Window) +{ + return Window->Workspaces(); +} + + +/*********************************************************************** + * Method: BWindow::SetWorkspaces + * Params: uint32 + * Returns: void + * Effects: + ***********************************************************************/ +void +BWindow_SetWorkspaces(BWindow *Window, uint32 index) +{ + Window->SetWorkspaces(index); +} + + +/*********************************************************************** + * Method: BWindow::LastMouseMovedView + * Params: + * Returns: BView * + * Effects: + ***********************************************************************/ +BView * +BWindow_LastMouseMovedView(BWindow *Window) +{ + return Window->LastMouseMovedView(); +} + + +/*********************************************************************** + * Method: BWindow::ResolveSpecifier + * Params: BMessage *msg, int32 index, BMessage *specifier, int32 form, const char *property + * Returns: BHandler * + * Effects: + ***********************************************************************/ +BHandler * +BWindow_ResolveSpecifier(BWindow *Window, BMessage *msg, int32 index, BMessage *specifier, int32 form, const char *property) +{ + return Window->ResolveSpecifier(msg, index, specifier, form, property); +} + + +/*********************************************************************** + * Method: BWindow::GetSupportedSuites + * Params: BMessage *data + * Returns: status_t + * Effects: + ***********************************************************************/ +status_t +BWindow_GetSupportedSuites(BWindow *Window, BMessage *data) +{ + return Window->GetSupportedSuites(data); +} + + +/*********************************************************************** + * Method: BWindow::AddToSubset + * Params: BWindow *window + * Returns: status_t + * Effects: + ***********************************************************************/ +status_t +BWindow_AddToSubset(BWindow *Window, BWindow *window) +{ + return Window->AddToSubset(window); +} + + +/*********************************************************************** + * Method: BWindow::RemoveFromSubset + * Params: BWindow *window + * Returns: status_t + * Effects: + ***********************************************************************/ +status_t +BWindow_RemoveFromSubset(BWindow *Window, BWindow *window) +{ + return Window->RemoveFromSubset(window); +} + + +/*********************************************************************** + * Method: BWindow::Perform + * Params: perform_code d, void *arg + * Returns: status_t + * Effects: + ***********************************************************************/ +status_t +BWindow_Perform(BWindow *Window, perform_code d, void *arg) +{ + return Window->Perform(d, arg); +} + + +/*********************************************************************** + * Method: BWindow::SetType + * Params: window_type type + * Returns: status_t + * Effects: + ***********************************************************************/ +status_t +BWindow_SetType(BWindow *Window, window_type type) +{ + return Window->SetType(type); +} + + +/*********************************************************************** + * Method: BWindow::Type + * Params: + * Returns: window_type + * Effects: + ***********************************************************************/ +window_type +BWindow_Type(BWindow *Window) +{ + return Window->Type(); +} + + +/*********************************************************************** + * Method: BWindow::SetLook + * Params: window_look look + * Returns: status_t + * Effects: + ***********************************************************************/ +status_t +BWindow_SetLook(BWindow *Window, window_look look) +{ + return Window->SetLook(look); +} + + +/*********************************************************************** + * Method: BWindow::Look + * Params: + * Returns: window_look + * Effects: + ***********************************************************************/ +window_look +BWindow_Look(BWindow *Window) +{ + return Window->Look(); +} + + +/*********************************************************************** + * Method: BWindow::SetFeel + * Params: window_feel feel + * Returns: status_t + * Effects: + ***********************************************************************/ +status_t +BWindow_SetFeel(BWindow *Window, window_feel feel) +{ + return Window->SetFeel(feel); +} + + +/*********************************************************************** + * Method: BWindow::Feel + * Params: + * Returns: window_feel + * Effects: + ***********************************************************************/ +window_feel +BWindow_Feel(BWindow *Window) +{ + return Window->Feel(); +} + + +/*********************************************************************** + * Method: BWindow::SetFlags + * Params: uint32 + * Returns: status_t + * Effects: + ***********************************************************************/ +status_t +BWindow_SetFlags(BWindow *Window, uint32 Flags) +{ + return Window->SetFlags(Flags); +} + + +/*********************************************************************** + * Method: BWindow::Flags + * Params: + * Returns: uint32 + * Effects: + ***********************************************************************/ +uint32 +BWindow_Flags(BWindow *Window) +{ + return Window->Flags(); +} + + +/*********************************************************************** + * Method: BWindow::IsModal + * Params: + * Returns: bool + * Effects: + ***********************************************************************/ +bool +BWindow_IsModal(BWindow *Window) +{ + return Window->IsModal(); +} + + +/*********************************************************************** + * Method: BWindow::IsFloating + * Params: + * Returns: bool + * Effects: + ***********************************************************************/ +bool +BWindow_IsFloating(BWindow *Window) +{ + return Window->IsFloating(); +} + + +/*********************************************************************** + * Method: BWindow::SetWindowAlignment + * Params: window_alignment mode, int32 h, int32 hOffset, int32 width, int32 widthOffset, int32 v, int32 vOffset, int32 height, int32 heightOffset + * Returns: status_t + * Effects: + ***********************************************************************/ +status_t +BWindow_SetWindowAlignment(BWindow *Window, window_alignment mode, int32 h, int32 hOffset, int32 width, int32 widthOffset, int32 v, int32 vOffset, int32 height, int32 heightOffset) +{ + return Window->SetWindowAlignment(mode, h, hOffset, width, widthOffset, v, vOffset, height, heightOffset); +} + + +/*********************************************************************** + * Method: BWindow::GetWindowAlignment + * Params: window_alignment *mode, int32 *h, int32 *hOffset, int32 *width, int32 *widthOffset, int32 *v, int32 *vOffset, int32 *height, int32 *heightOffset + * Returns: status_t + * Effects: + ***********************************************************************/ +status_t +BWindow_GetWindowAlignment(BWindow *Window, window_alignment *mode, int32 *h, int32 *hOffset, int32 *width, int32 *widthOffset, int32 *v, int32 *vOffset, int32 *height, int32 *heightOffset) +{ + return Window->GetWindowAlignment(mode, h, hOffset, width, widthOffset, v, vOffset, height, heightOffset); +} + + +/*********************************************************************** + * Method: BWindow::QuitRequested + * Params: + * Returns: bool + * Effects: + ***********************************************************************/ +bool +BWindow_QuitRequested(BWindow *Window) +{ + return Window->QuitRequested(); +} + + +/*********************************************************************** + * Method: BWindow::Run + * Params: + * Returns: thread_id + * Effects: + ***********************************************************************/ +thread_id +BWindow_Run(BWindow *Window) +{ + return Window->Run(); +} + + +/*********************************************************************** + * Method: BWindow::_ReservedWindow1 + * Params: + * Returns: void + * Effects: + ***********************************************************************/ +/*void +BWindow__ReservedWindow1(BWindow *Window) +{ + Window->_ReservedWindow1(); +} +*/ + +/*********************************************************************** + * Method: BWindow::_ReservedWindow2 + * Params: + * Returns: void + * Effects: + ***********************************************************************/ +/*void +BWindow__ReservedWindow2(BWindow *Window) +{ + Window->_ReservedWindow2(); +} +*/ + +/*********************************************************************** + * Method: BWindow::_ReservedWindow3 + * Params: + * Returns: void + * Effects: + ***********************************************************************/ +/*void +BWindow__ReservedWindow3(BWindow *Window) +{ + Window->_ReservedWindow3(); +} +*/ + +/*********************************************************************** + * Method: BWindow::_ReservedWindow4 + * Params: + * Returns: void + * Effects: + ***********************************************************************/ +/*void +BWindow__ReservedWindow4(BWindow *Window) +{ + Window->_ReservedWindow4(); +} +*/ + +/*********************************************************************** + * Method: BWindow::_ReservedWindow5 + * Params: + * Returns: void + * Effects: + ***********************************************************************/ +/*void +BWindow__ReservedWindow5(BWindow *Window) +{ + Window->_ReservedWindow5(); +} +*/ + +/*********************************************************************** + * Method: BWindow::_ReservedWindow6 + * Params: + * Returns: void + * Effects: + ***********************************************************************/ +/*void +BWindow__ReservedWindow6(BWindow *Window) +{ + Window->_ReservedWindow6(); +} +*/ + +/*********************************************************************** + * Method: BWindow::_ReservedWindow7 + * Params: + * Returns: void + * Effects: + ***********************************************************************/ +/*void +BWindow__ReservedWindow7(BWindow *Window) +{ + Window->_ReservedWindow7(); +} +*/ + +/*********************************************************************** + * Method: BWindow::_ReservedWindow8 + * Params: + * Returns: void + * Effects: + ***********************************************************************/ +/*void +BWindow__ReservedWindow8(BWindow *Window) +{ + Window->_ReservedWindow8(); +} +*/ + +/*********************************************************************** + * Method: BWindow::BWindow + * Params: + * Effects: + ***********************************************************************/ +/*TCPlusObject BWindow_Create(TPasObject PasObject) +{ + return new BPWindow(PasObject); +} +*/ + +/*********************************************************************** + * Method: BWindow::BWindow + * Params: BWindow & + * Effects: + ***********************************************************************/ +/*TCPlusObject BWindow_Create_1 +(TPasObject PasObject, BWindow &) +{ + return new BPWindow(PasObject, ); +} +*/ + +/*********************************************************************** + * Method: BWindow::operator= + * Params: BWindow & + * Returns: BWindow & + * Effects: + ***********************************************************************/ +/*BWindow & +BWindow_operator=(BWindow *Window, BWindow &) +{ + return Window->operator=(); +} +*/ + +/*********************************************************************** + * Method: BWindow::BWindow + * Params: BRect frame, color_space depth, uint32 bitmapFlags, int32 rowBytes + * Effects: + ***********************************************************************/ +/*TCPlusObject BWindow_Create(TPasObject PasObject, BRect frame, color_space depth, uint32 bitmapFlags, int32 rowBytes) +{ + return new BPWindow(PasObject, frame, depth, bitmapFlags, rowBytes); +} +*/ + +/*********************************************************************** + * Method: BWindow::InitData + * Params: BRect frame, const char *title, window_look look, window_feel feel, uint32 flags, uint32 workspace + * Returns: void + * Effects: + ***********************************************************************/ +/*void +BWindow_InitData(BWindow *Window, BRect frame, const char *title, window_look look, window_feel feel, uint32 flags, uint32 workspace) +{ + Window->InitData(frame, title, look, feel, flags, workspace); +} +*/ + +/*********************************************************************** + * Method: BWindow::ArchiveChildren + * Params: BMessage *data, bool deep + * Returns: status_t + * Effects: + ***********************************************************************/ +/*status_t +BWindow_ArchiveChildren(BWindow *Window, BMessage *data, bool deep) +{ + return Window->ArchiveChildren(data, deep); +} +*/ + +/*********************************************************************** + * Method: BWindow::UnarchiveChildren + * Params: BMessage *data + * Returns: status_t + * Effects: + ***********************************************************************/ +/*status_t +BWindow_UnarchiveChildren(BWindow *Window, BMessage *data) +{ + return Window->UnarchiveChildren(data); +} +*/ + +/*********************************************************************** + * Method: BWindow::BitmapClose + * Params: + * Returns: void + * Effects: + ***********************************************************************/ +/*void +BWindow_BitmapClose(BWindow *Window) +{ + Window->BitmapClose(); +} +*/ + +/*********************************************************************** + * Method: BWindow::task_looper + * Params: + * Returns: void + * Effects: + ***********************************************************************/ +/*void +BWindow_task_looper(BWindow *Window) +{ + Window->task_looper(); +} +*/ + +/*********************************************************************** + * Method: BWindow::start_drag + * Params: BMessage *msg, int32 token, BPoint offset, BRect track_rect, BHandler *reply_to + * Returns: void + * Effects: + ***********************************************************************/ +/*void +BWindow_start_drag(BWindow *Window, BMessage *msg, int32 token, BPoint offset, BRect track_rect, BHandler *reply_to) +{ + Window->start_drag(msg, token, offset, track_rect, reply_to); +} +*/ + +/*********************************************************************** + * Method: BWindow::start_drag + * Params: BMessage *msg, int32 token, BPoint offset, int32 bitmap_token, drawing_mode dragMode, BHandler *reply_to + * Returns: void + * Effects: + ***********************************************************************/ +/*void +BWindow_start_drag_1 +(BWindow *Window, BMessage *msg, int32 token, BPoint offset, int32 bitmap_token, drawing_mode dragMode, BHandler *reply_to) +{ + Window->start_drag(msg, token, offset, bitmap_token, dragMode, reply_to); +} +*/ + +/*********************************************************************** + * Method: BWindow::view_builder + * Params: BView *a_view + * Returns: void + * Effects: + ***********************************************************************/ +/*void +BWindow_view_builder(BWindow *Window, BView *a_view) +{ + Window->view_builder(a_view); +} +*/ + +/*********************************************************************** + * Method: BWindow::attach_builder + * Params: BView *a_view + * Returns: void + * Effects: + ***********************************************************************/ +/*void +BWindow_attach_builder(BWindow *Window, BView *a_view) +{ + Window->attach_builder(a_view); +} +*/ + +/*********************************************************************** + * Method: BWindow::detach_builder + * Params: BView *a_view + * Returns: void + * Effects: + ***********************************************************************/ +/*void +BWindow_detach_builder(BWindow *Window, BView *a_view) +{ + Window->detach_builder(a_view); +} +*/ + +/*********************************************************************** + * Method: BWindow::get_server_token + * Params: + * Returns: int32 + * Effects: + ***********************************************************************/ +/*int32 +BWindow_get_server_token(BWindow *Window) const +{ + return Window->get_server_token(); +} +*/ + +/*********************************************************************** + * Method: BWindow::extract_drop + * Params: BMessage *an_event, BHandler **target + * Returns: BMessage * + * Effects: + ***********************************************************************/ +/*BMessage * +BWindow_extract_drop(BWindow *Window, BMessage *an_event, BHandler **target) +{ + return Window->extract_drop(an_event, target); +} +*/ + +/*********************************************************************** + * Method: BWindow::movesize + * Params: uint32 opcode, float h, float v + * Returns: void + * Effects: + ***********************************************************************/ +/*void +BWindow_movesize(BWindow *Window, uint32 opcode, float h, float v) +{ + Window->movesize(opcode, h, v); +} +*/ + +/*********************************************************************** + * Method: BWindow::ReadMessageFromPort + * Params: bigtime_t tout + * Returns: BMessage * + * Effects: + ***********************************************************************/ +/*BMessage * +BWindow_ReadMessageFromPort(BWindow *Window, bigtime_t tout) +{ + return Window->ReadMessageFromPort(tout); +} +*/ + +/*********************************************************************** + * Method: BWindow::MessagesWaiting + * Params: + * Returns: int32 + * Effects: + ***********************************************************************/ +/*int32 +BWindow_MessagesWaiting(BWindow *Window) +{ + return Window->MessagesWaiting(); +} +*/ + +/*********************************************************************** + * Method: BWindow::handle_activate + * Params: BMessage *an_event + * Returns: void + * Effects: + ***********************************************************************/ +/*void +BWindow_handle_activate(BWindow *Window, BMessage *an_event) +{ + Window->handle_activate(an_event); +} +*/ + +/*********************************************************************** + * Method: BWindow::do_view_frame + * Params: BMessage *an_event + * Returns: void + * Effects: + ***********************************************************************/ +/*void +BWindow_do_view_frame(BWindow *Window, BMessage *an_event) +{ + Window->do_view_frame(an_event); +} +*/ + +/*********************************************************************** + * Method: BWindow::do_value_change + * Params: BMessage *an_event, BHandler *handler + * Returns: void + * Effects: + ***********************************************************************/ +/*void +BWindow_do_value_change(BWindow *Window, BMessage *an_event, BHandler *handler) +{ + Window->do_value_change(an_event, handler); +} +*/ + +/*********************************************************************** + * Method: BWindow::do_mouse_down + * Params: BMessage *an_event, BView *target + * Returns: void + * Effects: + ***********************************************************************/ +/*void +BWindow_do_mouse_down(BWindow *Window, BMessage *an_event, BView *target) +{ + Window->do_mouse_down(an_event, target); +} +*/ + +/*********************************************************************** + * Method: BWindow::do_mouse_moved + * Params: BMessage *an_event, BView *target + * Returns: void + * Effects: + ***********************************************************************/ +/*void +BWindow_do_mouse_moved(BWindow *Window, BMessage *an_event, BView *target) +{ + Window->do_mouse_moved(an_event, target); +} +*/ + +/*********************************************************************** + * Method: BWindow::do_key_down + * Params: BMessage *an_event, BHandler *handler + * Returns: void + * Effects: + ***********************************************************************/ +/*void +BWindow_do_key_down(BWindow *Window, BMessage *an_event, BHandler *handler) +{ + Window->do_key_down(an_event, handler); +} +*/ + +/*********************************************************************** + * Method: BWindow::do_key_up + * Params: BMessage *an_event, BHandler *handler + * Returns: void + * Effects: + ***********************************************************************/ +/*void +BWindow_do_key_up(BWindow *Window, BMessage *an_event, BHandler *handler) +{ + Window->do_key_up(an_event, handler); +} +*/ + +/*********************************************************************** + * Method: BWindow::do_menu_event + * Params: BMessage *an_event + * Returns: void + * Effects: + ***********************************************************************/ +/*void +BWindow_do_menu_event(BWindow *Window, BMessage *an_event) +{ + Window->do_menu_event(an_event); +} +*/ + +/*********************************************************************** + * Method: BWindow::do_draw_views + * Params: + * Returns: void + * Effects: + ***********************************************************************/ +/*void +BWindow_do_draw_views(BWindow *Window) +{ + Window->do_draw_views(); +} +*/ + +/*********************************************************************** + * Method: BWindow::ConvertToMessage + * Params: void *raw, int32 code + * Returns: BMessage * + * Effects: + ***********************************************************************/ +/*BMessage * +BWindow_ConvertToMessage(BWindow *Window, void *raw, int32 code) +{ + return Window->ConvertToMessage(raw, code); +} +*/ + +/*********************************************************************** + * Method: BWindow::allocShortcut + * Params: uint32 key, uint32 modifiers + * Returns: _cmd_key_ * + * Effects: + ***********************************************************************/ +/*_cmd_key_ * +BWindow_allocShortcut(BWindow *Window, uint32 key, uint32 modifiers) +{ + return Window->allocShortcut(key, modifiers); +} +*/ + +/*********************************************************************** + * Method: BWindow::FindShortcut + * Params: uint32 key, uint32 modifiers + * Returns: _cmd_key_ * + * Effects: + ***********************************************************************/ +/*_cmd_key_ * +BWindow_FindShortcut(BWindow *Window, uint32 key, uint32 modifiers) +{ + return Window->FindShortcut(key, modifiers); +} +*/ + +/*********************************************************************** + * Method: BWindow::AddShortcut + * Params: uint32 key, uint32 modifiers, BMenuItem *item + * Returns: void + * Effects: + ***********************************************************************/ +/*void +BWindow_AddShortcut(BWindow *Window, uint32 key, uint32 modifiers, BMenuItem *item) +{ + Window->AddShortcut(key, modifiers, item); +} +*/ + +/*********************************************************************** + * Method: BWindow::post_message + * Params: BMessage *message + * Returns: void + * Effects: + ***********************************************************************/ +/*void +BWindow_post_message(BWindow *Window, BMessage *message) +{ + Window->post_message(message); +} +*/ + +/*********************************************************************** + * Method: BWindow::SetLocalTitle + * Params: const char *new_title + * Returns: void + * Effects: + ***********************************************************************/ +/*void +BWindow_SetLocalTitle(BWindow *Window, const char *new_title) +{ + Window->SetLocalTitle(new_title); +} +*/ + +/*********************************************************************** + * Method: BWindow::enable_pulsing + * Params: bool enable + * Returns: void + * Effects: + ***********************************************************************/ +/*void +BWindow_enable_pulsing(BWindow *Window, bool enable) +{ + Window->enable_pulsing(enable); +} +*/ + +/*********************************************************************** + * Method: BWindow::determine_target + * Params: BMessage *msg, BHandler *target, bool pref + * Returns: BHandler * + * Effects: + ***********************************************************************/ +/*BHandler * +BWindow_determine_target(BWindow *Window, BMessage *msg, BHandler *target, bool pref) +{ + return Window->determine_target(msg, target, pref); +} +*/ + +/*********************************************************************** + * Method: BWindow::kb_navigate + * Params: + * Returns: void + * Effects: + ***********************************************************************/ +/*void +BWindow_kb_navigate(BWindow *Window) +{ + Window->kb_navigate(); +} +*/ + +/*********************************************************************** + * Method: BWindow::navigate_to_next + * Params: int32 direction, bool group + * Returns: void + * Effects: + ***********************************************************************/ +/*void +BWindow_navigate_to_next(BWindow *Window, int32 direction, bool group) +{ + Window->navigate_to_next(direction, group); +} +*/ + +/*********************************************************************** + * Method: BWindow::set_focus + * Params: BView *focus, bool notify_input_server + * Returns: void + * Effects: + ***********************************************************************/ +/*void +BWindow_set_focus(BWindow *Window, BView *focus, bool notify_input_server) +{ + Window->set_focus(focus, notify_input_server); +} +*/ + +/*********************************************************************** + * Method: BWindow::InUpdate + * Params: + * Returns: bool + * Effects: + ***********************************************************************/ +/*bool +BWindow_InUpdate(BWindow *Window) +{ + return Window->InUpdate(); +} +*/ + +/*********************************************************************** + * Method: BWindow::DequeueAll + * Params: + * Returns: void + * Effects: + ***********************************************************************/ +/*void +BWindow_DequeueAll(BWindow *Window) +{ + Window->DequeueAll(); +} +*/ + +/*********************************************************************** + * Method: BWindow::find_token_and_handler + * Params: BMessage *msg, int32 *token, BHandler **handler + * Returns: bool + * Effects: + ***********************************************************************/ +/*bool +BWindow_find_token_and_handler(BWindow *Window, BMessage *msg, int32 *token, BHandler **handler) +{ + return Window->find_token_and_handler(msg, token, handler); +} +*/ + +/*********************************************************************** + * Method: BWindow::compose_type + * Params: window_look look, window_feel feel + * Returns: window_type + * Effects: + ***********************************************************************/ +/*window_type +BWindow_compose_type(BWindow *Window, window_look look, window_feel feel) const +{ + return Window->compose_type(look, feel); +} +*/ + +/*********************************************************************** + * Method: BWindow::decompose_type + * Params: window_type type, window_look *look, window_feel *feel + * Returns: void + * Effects: + ***********************************************************************/ +/*void +BWindow_decompose_type(BWindow *Window, window_type type, window_look *look, window_feel *feel) const +{ + Window->decompose_type(type, look, feel); +} +*/ + +/*********************************************************************** + * Method: BWindow::SetIsFilePanel + * Params: bool panel + * Returns: void + * Effects: + ***********************************************************************/ +/*void +BWindow_SetIsFilePanel(BWindow *Window, bool panel) +{ + Window->SetIsFilePanel(panel); +} +*/ + +/*********************************************************************** + * Method: BWindow::IsFilePanel + * Params: + * Returns: bool + * Effects: + ***********************************************************************/ +/*bool +BWindow_IsFilePanel(BWindow *Window) const +{ + return Window->IsFilePanel(); +} +*/ + +/*********************************************************************** + * Method: BWindow::AddFloater + * Params: BWindow *a_floating_window + * Returns: void + * Effects: + ***********************************************************************/ +/*void +BWindow_AddFloater(BWindow *Window, BWindow *a_floating_window) +{ + Window->AddFloater(a_floating_window); +} +*/ + +/*********************************************************************** + * Method: BWindow::RemoveFloater + * Params: BWindow *a_floating_window + * Returns: void + * Effects: + ***********************************************************************/ +/*void +BWindow_RemoveFloater(BWindow *Window, BWindow *a_floating_window) +{ + Window->RemoveFloater(a_floating_window); +} +*/ + +/*********************************************************************** + * Method: BWindow::WindowType + * Params: + * Returns: window_type + * Effects: + ***********************************************************************/ +/*window_type +BWindow_WindowType(BWindow *Window) const +{ + return Window->WindowType(); +} +*/ +//********************************* + #if defined(__cplusplus) } #endif diff --git a/bepascal/bepascal/be/interface/button.pp b/bepascal/bepascal/be/interface/button.pp index bc2dfa0..dc5a097 100644 --- a/bepascal/bepascal/be/interface/button.pp +++ b/bepascal/bepascal/be/interface/button.pp @@ -147,27 +147,27 @@ end; procedure TButton.Draw(updateRect : TRect); begin - BButton_Draw(CPlusObject, updateRect.CPlusObject); + end; procedure TButton.MouseDown(where : TPoint); begin - BButton_MouseDown(CPlusObject, where.CPlusObject); + end; procedure TButton.AttachedToWindow; begin - BButton_AttachedToWindow(CPlusObject); + end; procedure TButton.KeyDown(bytes : PChar; numBytes : integer); begin - BButton_KeyDown(CPlusObject, bytes, numBytes); + end; procedure TButton.MakeDefault(state : boolean); begin - BButton_MakeDefault(CPlusObject, state); + end; procedure TButton.SetLabel(text : PChar); @@ -188,37 +188,37 @@ end; procedure TButton.WindowActivated(state : boolean); begin - BButton_WindowActivated(CPlusObject, state); +// BButton_WindowActivated(CPlusObject, state); end; procedure TButton.MouseUp(pt : TPoint); begin - BButton_MouseUp(CPlusObject, pt.CPlusObject); +// BButton_MouseUp(CPlusObject, pt.CPlusObject); end; procedure TButton.MouseMoved(pt : TPoint; code : Cardinal; msg : TMessage); begin - BButton_MouseMoved(CPlusObject, pt.CPlusObject, code, msg); +// BButton_MouseMoved(CPlusObject, pt.CPlusObject, code, msg); end; procedure TButton.DetachedFromWindow; begin - BButton_DetachedFromWindow(CPlusObject); +// BButton_DetachedFromWindow(CPlusObject); end; procedure TButton.SetValue(aValue : integer); begin - BButton_SetValue(CPlusObject, aValue); +// BButton_SetValue(CPlusObject, aValue); end; procedure TButton.GetPreferredSize(width : double; height : double); begin - BButton_GetPreferredSize(CPlusObject, width, height); +// BButton_GetPreferredSize(CPlusObject, width, height); end; procedure TButton.ResizeToPreferred; begin - BButton_ResizeToPreferred(CPlusObject); +// BButton_ResizeToPreferred(CPlusObject); end; function TButton.Invoke(msg : TMessage) : TStatus_t; @@ -228,12 +228,12 @@ end; procedure TButton.FrameMoved(new_position : TPoint); begin - BButton_FrameMoved(CPlusObject, new_position.CPlusObject); +// BButton_FrameMoved(CPlusObject, new_position.CPlusObject); end; procedure TButton.FrameResized(new_width : double; new_height : double); begin - BButton_FrameResized(CPlusObject, new_width, new_height); +// BButton_FrameResized(CPlusObject, new_width, new_height); end; procedure TButton.MakeFocus(state : boolean); @@ -243,12 +243,12 @@ end; procedure TButton.AllAttached; begin - BButton_AllAttached(CPlusObject); +// BButton_AllAttached(CPlusObject); end; procedure TButton.AllDetached; begin - BButton_AllDetached(CPlusObject); +// BButton_AllDetached(CPlusObject); end; function TButton.ResolveSpecifier(msg : TMessage; index : integer; specifier : TMessage; form : integer; properti : PChar) : THandler; diff --git a/bepascal/bepascal/be/interface/control.h b/bepascal/bepascal/be/interface/control.h index 9fe88f7..f17f450 100644 --- a/bepascal/bepascal/be/interface/control.h +++ b/bepascal/bepascal/be/interface/control.h @@ -38,6 +38,9 @@ class BPControl : public BControl, virtual public BPView uint32 resizeMask, uint32 flags); BPControl(TPasObject PasObject, BMessage *message); + virtual void MessageReceived(BMessage *message); + virtual void Draw(BRect updateRect); + virtual void AttachedToWindow(void); virtual void SetEnabled(bool enabled); virtual void SetValue(int32 value); private: diff --git a/bepascal/bepascal/be/interface/control.pp b/bepascal/bepascal/be/interface/control.pp index 17cf37b..cf8ca8f 100644 --- a/bepascal/bepascal/be/interface/control.pp +++ b/bepascal/bepascal/be/interface/control.pp @@ -156,47 +156,47 @@ end; procedure TControl.WindowActivated(state : boolean); begin - BControl_WindowActivated(CPlusObject, state); +// BControl_WindowActivated(CPlusObject, state); end; procedure TControl.AttachedToWindow; begin - BControl_AttachedToWindow(CPlusObject); +// BControl_AttachedToWindow(CPlusObject); end; procedure TControl.MessageReceived(msg : TMessage); begin - BControl_MessageReceived(CPlusObject, msg.CPlusObject); +// BControl_MessageReceived(CPlusObject, msg.CPlusObject); end; procedure TControl.MakeFocus(state : boolean); begin - BControl_MakeFocus(CPlusObject, state); +// BControl_MakeFocus(CPlusObject, state); end; procedure TControl.KeyDown(bytes : PChar; numBytes : integer); begin - BControl_KeyDown(CPlusObject, bytes, numBytes); +// BControl_KeyDown(CPlusObject, bytes, numBytes); end; procedure TControl.MouseDown(pt : TPoint); begin - BControl_MouseDown(CPlusObject, pt.CPlusObject); +// BControl_MouseDown(CPlusObject, pt.CPlusObject); end; procedure TControl.MouseUp(pt : TPoint); begin - BControl_MouseUp(CPlusObject, pt.CPlusObject); +// BControl_MouseUp(CPlusObject, pt.CPlusObject); end; procedure TControl.MouseMoved(pt : TPoint; code : Cardinal; msg : TMessage); begin - BControl_MouseMoved(CPlusObject, pt.CPlusObject, code, msg); +// BControl_MouseMoved(CPlusObject, pt.CPlusObject, code, msg); end; procedure TControl.DetachedFromWindow; begin - BControl_DetachedFromWindow(CPlusObject); +// BControl_DetachedFromWindow(CPlusObject); end; procedure TControl.SetLabel(text : PChar); @@ -231,12 +231,12 @@ end; procedure TControl.GetPreferredSize(width : double; height : double); begin - BControl_GetPreferredSize(CPlusObject, width, height); +// BControl_GetPreferredSize(CPlusObject, width, height); end; procedure TControl.ResizeToPreferred; begin - BControl_ResizeToPreferred(CPlusObject); +// BControl_ResizeToPreferred(CPlusObject); end; function TControl.Invoke(msg : TMessage) : TStatus_t; @@ -256,12 +256,12 @@ end; procedure TControl.AllAttached; begin - BControl_AllAttached(CPlusObject); +// BControl_AllAttached(CPlusObject); end; procedure TControl.AllDetached; begin - BControl_AllDetached(CPlusObject); +// BControl_AllDetached(CPlusObject); end; function TControl.Perform(d : TPerform_code; arg : Pointer) : TStatus_t; diff --git a/bepascal/bepascal/be/interface/graphicdefs.pp b/bepascal/bepascal/be/interface/graphicdefs.pp index 60262a5..889ccdf 100644 --- a/bepascal/bepascal/be/interface/graphicdefs.pp +++ b/bepascal/bepascal/be/interface/graphicdefs.pp @@ -11,9 +11,10 @@ type blue : byte; alpha : byte; end; - + TColor_space = Cardinal; + implementation initialization -end. \ No newline at end of file +end. diff --git a/bepascal/bepascal/be/interface/view.h b/bepascal/bepascal/be/interface/view.h index 5988808..9f50241 100644 --- a/bepascal/bepascal/be/interface/view.h +++ b/bepascal/bepascal/be/interface/view.h @@ -35,8 +35,7 @@ class BPView : public BView, public virtual BPHandler uint32 resizingMode, uint32 flags); BPView(TPasObject PasObject, BMessage *archive); -// virtual void DispatchMessage(BMessage *message, BHandler *target); -// virtual bool QuitRequested(void); + virtual void MessageReceived(BMessage *message); virtual void AllAttached(void); virtual void AttachedToWindow(void); virtual void AllDetached(void); @@ -55,6 +54,8 @@ class BPView : public BView, public virtual BPHandler virtual void Pulse(void); // virtual void TargetedByScrollView(BScrollView *scroller); virtual void WindowActivated(bool active); + virtual void Draw_hookCall(BRect updateRect); + virtual void AttachedToWindow_hookCall(void); private: }; diff --git a/bepascal/bepascal/be/interface/view.pp b/bepascal/bepascal/be/interface/view.pp index 322feaa..8f59f44 100644 --- a/bepascal/bepascal/be/interface/view.pp +++ b/bepascal/bepascal/be/interface/view.pp @@ -49,6 +49,7 @@ type procedure Pulse; virtual; // procedure TargetedByScrollView(scroller : TScrollView); virtual; // Need BScrollView procedure WindowActivated(active : boolean); virtual; + procedure MessageReceived(aMessage : TMessage); override; // End hook functions function RemoveSelf : boolean; procedure AddChild(aView, before : TView); @@ -94,16 +95,16 @@ var const // flags - B_FULL_UPDATE_ON_RESIZE : Cardinal = 31; - _B_RESERVED1_ : Cardinal = 30; - B_WILL_DRAW : Cardinal = 29; - B_PULSE_NEEDED : Cardinal = 28; - B_NAVIGABLE_JUMP : Cardinal = 27; - B_FRAME_EVENTS : Cardinal = 26; - B_NAVIGABLE : Cardinal = 25; - B_SUBPIXEL_PRECISE : Cardinal = 24; - B_DRAW_ON_CHILDREN : Cardinal = 23; - _B_RESERVED7_ : Cardinal = 22; + B_FULL_UPDATE_ON_RESIZE : Cardinal = $80000000;//31; + _B_RESERVED1_ : Cardinal = $40000000;//30; + B_WILL_DRAW : Cardinal = $20000000;//29; + B_PULSE_NEEDED : Cardinal = $10000000;//28; + B_NAVIGABLE_JUMP : Cardinal = $08000000;//27; + B_FRAME_EVENTS : Cardinal = $04000000;//26; + B_NAVIGABLE : Cardinal = $02000000;//25; + B_SUBPIXEL_PRECISE : Cardinal = $00800000;//24; + B_DRAW_ON_CHILDREN : Cardinal = $00400000;//23; + _B_RESERVED7_ : Cardinal = $00200000;//22; implementation @@ -234,9 +235,14 @@ end; procedure TView.WindowActivated(active : boolean); begin - Writeln('WindowActivated in View'); +// WriteLn('WindowActivated in View'); end; +procedure TView.MessageReceived(aMessage : TMessage); +begin + inherited; + WriteLn('View.MessageReceived, PASCAL'); +end; function TView.RemoveSelf : boolean; begin diff --git a/bepascal/bepascal/be/interface/window.h b/bepascal/bepascal/be/interface/window.h index aa1d58b..72ef636 100644 --- a/bepascal/bepascal/be/interface/window.h +++ b/bepascal/bepascal/be/interface/window.h @@ -13,7 +13,7 @@ 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 + Foundation, Inc., s59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef _WINDOW_H_ @@ -36,8 +36,10 @@ class BPWindow : public BWindow, public BPLooper window_type type, uint32 flags, uint32 workspaces = B_CURRENT_WORKSPACE); -// virtual void DispatchMessage(BMessage *message, BHandler *target); -// virtual bool QuitRequested(void); + virtual void MessageReceived(BMessage *message); + virtual void DispatchMessage(BMessage *message, BHandler *target); + virtual bool QuitRequested(void); + virtual void WindowActivated(bool active); private: }; diff --git a/bepascal/bepascal/be/interface/window.pp b/bepascal/bepascal/be/interface/window.pp index 6eeda3e..48b8186 100644 --- a/bepascal/bepascal/be/interface/window.pp +++ b/bepascal/bepascal/be/interface/window.pp @@ -21,7 +21,8 @@ unit Window; interface uses - beobj, looper, rect, os, application, view, appdefs; + beobj, looper, rect, os, application, view, message, handler, appdefs, + button, archivable, supportDefs, GraphicDefs; const // window_type @@ -70,15 +71,113 @@ const B_ALL_WORKSPACES = $ffffffff; type + PCardinal = ^Cardinal; +// PInteger = ^Integer; TWindow = class(TLooper) public - constructor Create(frame : TRect; title : PChar; atype, flags, workspaces : Cardinal); virtual; + constructor Create(aFrame : TRect; aTitle : PChar; aNewType, SomeFlags, AWorkspaces : Cardinal); virtual; destructor Destroy; override; procedure Show; procedure Hide; - procedure AddChild(aView : TView; sibling : TCPlusObject); + procedure AddChild(aView : TView; sibling : TView); function QuitRequested : boolean; override; function RemoveChild(aView : TView) : boolean; + // New + // constructor Create; + // constructor Create(frame : TRect; title : PChar; look : PCardinal; feel : Cardinal; flags : Cardinal; workspace : Cardinal); + // destructor Destroy; + // constructor Create(data : TMessage); + function Instantiate(data : TMessage) : TArchivable; + function Archive(data : TMessage; deep : boolean) : TStatus_t; + procedure Quit; +// procedure Close; + // procedure AddChild(child : TView; before : TView); + // function RemoveChild(child : TView) : boolean; + function CountChildren : integer; + function ChildAt(index : integer) : TView; + procedure DispatchMessage(message : TMessage; handler : THandler); override; + procedure MessageReceived(message : TMessage); override; + procedure FrameMoved(new_position : TPoint); + procedure WorkspacesChanged(old_ws : Cardinal; new_ws : Cardinal); + procedure WorkspaceActivated(ws : integer; state : boolean); + procedure FrameResized(new_width : double; new_height : double); + procedure Minimize(aMinimize : boolean); + procedure Zoom(rec_position : TPoint; rec_width : double; rec_height : double); + procedure Zoom; + procedure SetZoomLimits(max_h : double; max_v : double); + procedure ScreenChanged(screen_size : TRect; depth : TColor_Space); + procedure SetPulseRate(rate : TBigtime_t); + function PulseRate : TBigtime_t; + procedure AddShortcut(key : Cardinal; modifiers : Cardinal; msg : TMessage); + procedure AddShortcut(key : Cardinal; modifiers : Cardinal; msg : TMessage; target : THandler); + procedure RemoveShortcut(key : Cardinal; modifiers : Cardinal); + procedure SetDefaultButton(button : TButton); + function DefaultButton : TButton; + procedure MenusBeginning; + procedure MenusEnded; + function NeedsUpdate : boolean; + procedure UpdateIfNeeded; + function FindView(view_name : PChar) : TView; + function FindView(aPoint : TPoint) : TView; + function CurrentFocus : TView; + procedure Activate(aValue : boolean); + procedure WindowActivated(state : boolean); +// procedure ConvertToScreen(var pt : TPoint); overload; + function ConvertToScreen(pt : TPoint) : TPoint; overload; +// procedure ConvertFromScreen(var pt : TPoint); + function ConvertFromScreen(pt : TPoint) : TPoint; +// procedure ConvertToScreen(var rect : TRect); +// function ConvertToScreen(rect : TRect) : TRect; +// procedure ConvertFromScreen(var rect : TRect); +// function ConvertFromScreen(rect : TRect) : TRect; + procedure MoveBy(dx : double; dy : double); + procedure MoveTo(aPoint : TPoint); + procedure MoveTo(x : double; y : double); + procedure ResizeBy(dx : double; dy : double); + procedure ResizeTo(width : double; height : double); + // procedure Show; + // procedure Hide; + function IsHidden : boolean; + function IsMinimized : boolean; + procedure Flush; + procedure Sync; + function SendBehind(window : TWindow) : TStatus_t; + procedure DisableUpdates; + procedure EnableUpdates; + procedure BeginViewTransaction; + procedure EndViewTransaction; + function Bounds : TRect; + function GetFrame : TRect; + function GetTitle : PChar; + procedure SetTitle(title : PChar); + function IsFront : boolean; + function IsActive : boolean; +// procedure SetKeyMenuBar(bar : TMenuBar); +// function KeyMenuBar : TMenuBar; + procedure SetSizeLimits(min_h : double; max_h : double; min_v : double; max_v : double); + procedure GetSizeLimits(min_h : double; max_h : double; min_v : double; max_v : double); + function Workspaces : Cardinal; + procedure SetWorkspaces(aWorkspace : Cardinal); + function LastMouseMovedView : TView; + function ResolveSpecifier(msg : TMessage; index : integer; specifier : TMessage; form : integer; aProperty : PChar) : THandler; + function GetSupportedSuites(data : TMessage) : TStatus_t; + function AddToSubset(window : TWindow) : TStatus_t; + function RemoveFromSubset(window : TWindow) : TStatus_t; + function Perform(d : TPerform_code; arg : Pointer) : TStatus_t; + function SetType(aType : Cardinal) : TStatus_t; + function GetType : Cardinal; + function SetLook(look : PCardinal) : TStatus_t; + function GetLook : PCardinal; + function SetFeel(feel : Cardinal) : TStatus_t; + function GetFeel : Cardinal; + function SetFlags(aFlags : Cardinal) : TStatus_t; + function GetFlags : Cardinal; + function IsModal : boolean; + function IsFloating : boolean; + function SetWindowAlignment(mode : Cardinal; h : integer; hOffset : integer; width : integer; widthOffset : integer; v : integer; vOffset : integer; height : integer; heightOffset : integer) : TStatus_t; + function GetWindowAlignment(mode : PCardinal; var h : integer; var hOffset : integer; var width : integer; var widthOffset : integer; var v : integer; var vOffset : integer; var height : integer; var heightOffset : integer) : TStatus_t; +// function QuitRequested : boolean; + function Run : TThread_id; end; function BWindow_Create(AObject : TObject; frame : TCPlusObject; title : PChar; @@ -88,7 +187,199 @@ procedure BWindow_Show(CPlusObject : TCPlusObject); cdecl; external BePascalLibN procedure BWindow_Hide(CPlusObject : TCPlusObject); cdecl; external BePascalLibName name 'BWindow_Hide'; procedure BWindow_AddChild(CPlusObject : TCPlusObject; aView : TCPlusObject; sibling : TCPlusObject); cdecl; external BePascalLibName name 'BWindow_AddChild'; function BWindow_RemoveChild(CPlusObject : TCPlusObject; aView : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BWindow_RemoveChild'; - + +// New +//function BWindow_Create(AObject : TBeObject; data : TMessage); cdecl; external BePascalLibName name 'BWindow_Create'; +function BWindow_Instantiate(AObject : TCPlusObject; data : TCPlusObject) : TArchivable; cdecl; external BePascalLibName name 'BWindow_Instantiate'; +function BWindow_Archive(AObject : TCPlusObject; data : TCPlusObject; deep : boolean) : TStatus_t; cdecl; external BePascalLibName name 'BWindow_Archive'; +procedure BWindow_Quit(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BWindow_Quit'; +//procedure BWindow_Close(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BWindow_Close'; +//procedure BWindow_AddChild(AObject : TCPlusObject; child : TCPlusObject; before : TCPlusObject); cdecl; external BePascalLibName name 'BWindow_AddChild'; +function BWindow_RemoveChild(AObject : TCPlusObject; child : TView) : boolean; cdecl; external BePascalLibName name 'BWindow_RemoveChild'; +function BWindow_CountChildren(AObject : TCPlusObject) : integer; cdecl; external BePascalLibName name 'BWindow_CountChildren'; +function BWindow_ChildAt(AObject : TCPlusObject; index : integer) : TView; cdecl; external BePascalLibName name 'BWindow_ChildAt'; +procedure BWindow_DispatchMessage(AObject : TCPlusObject; message : TMessage; handler : THandler); cdecl; external BePascalLibName name 'BWindow_DispatchMessage'; +procedure BWindow_MessageReceived(AObject : TCPlusObject; message : TMessage); cdecl; external BePascalLibName name 'BWindow_MessageReceived'; +procedure BWindow_FrameMoved(AObject : TCPlusObject; new_position : TCPlusObject); cdecl; external BePascalLibName name 'BWindow_FrameMoved'; +procedure BWindow_WorkspacesChanged(AObject : TCPlusObject; old_ws : Cardinal; new_ws : Cardinal); cdecl; external BePascalLibName name 'BWindow_WorkspacesChanged'; +procedure BWindow_WorkspaceActivated(AObject : TCPlusObject; ws : integer; state : boolean); cdecl; external BePascalLibName name 'BWindow_WorkspaceActivated'; +procedure BWindow_FrameResized(AObject : TCPlusObject; new_width : double; new_height : double); cdecl; external BePascalLibName name 'BWindow_FrameResized'; +procedure BWindow_Minimize(AObject : TCPlusObject; minimize : boolean); cdecl; external BePascalLibName name 'BWindow_Minimize'; +procedure BWindow_Zoom(AObject : TCPlusObject; rec_position : TCPlusObject; rec_width : double; rec_height : double); cdecl; external BePascalLibName name 'BWindow_Zoom'; +procedure BWindow_Zoom(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BWindow_Zoom'; +procedure BWindow_SetZoomLimits(AObject : TCPlusObject; max_h : double; max_v : double); cdecl; external BePascalLibName name 'BWindow_SetZoomLimits'; +procedure BWindow_ScreenChanged(AObject : TCPlusObject; screen_size : TCPlusObject; depth : TColor_Space); cdecl; external BePascalLibName name 'BWindow_ScreenChanged'; +procedure BWindow_SetPulseRate(AObject : TCPlusObject; rate : TBigtime_t); cdecl; external BePascalLibName name 'BWindow_SetPulseRate'; +function BWindow_PulseRate(AObject : TCPlusObject) : TBigtime_t; cdecl; external BePascalLibName name 'BWindow_PulseRate'; +procedure BWindow_AddShortcut(AObject : TCPlusObject; key : Cardinal; modifiers : Cardinal; msg : TCPlusObject); cdecl; external BePascalLibName name 'BWindow_AddShortcut'; +procedure BWindow_AddShortcut(AObject : TCPlusObject; key : Cardinal; modifiers : Cardinal; msg : TCPlusObject; target : TCPlusObject); cdecl; external BePascalLibName name 'BWindow_AddShortcut'; +procedure BWindow_RemoveShortcut(AObject : TCPlusObject; key : Cardinal; modifiers : Cardinal); cdecl; external BePascalLibName name 'BWindow_RemoveShortcut'; +procedure BWindow_SetDefaultButton(AObject : TCPlusObject; button : TCPlusObject); cdecl; external BePascalLibName name 'BWindow_SetDefaultButton'; +function BWindow_DefaultButton(AObject : TCPlusObject) : TButton; cdecl; external BePascalLibName name 'BWindow_DefaultButton'; +procedure BWindow_MenusBeginning(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BWindow_MenusBeginning'; +procedure BWindow_MenusEnded(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BWindow_MenusEnded'; +function BWindow_NeedsUpdate(AObject : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BWindow_NeedsUpdate'; +procedure BWindow_UpdateIfNeeded(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BWindow_UpdateIfNeeded'; +function BWindow_FindView(AObject : TCPlusObject; view_name : PChar) : TView; cdecl; external BePascalLibName name 'BWindow_FindView'; +function BWindow_FindView(AObject : TCPlusObject; aPoint : TPoint) : TView; cdecl; external BePascalLibName name 'BWindow_FindView'; +function BWindow_CurrentFocus(AObject : TCPlusObject) : TView; cdecl; external BePascalLibName name 'BWindow_CurrentFocus'; +procedure BWindow_Activate(AObject : TCPlusObject; aState : boolean); cdecl; external BePascalLibName name 'BWindow_Activate'; +procedure BWindow_WindowActivated(AObject : TCPlusObject; state : boolean); cdecl; external BePascalLibName name 'BWindow_WindowActivated'; +//procedure BWindow_ConvertToScreen(AObject : TCPlusObject; var pt : TCPlusObject); cdecl; external BePascalLibName name 'BWindow_ConvertToScreen'; +function BWindow_ConvertToScreen(AObject : TCPlusObject; pt : TCPlusObject) : TPoint; cdecl; external BePascalLibName name 'BWindow_ConvertToScreen_1'; +//procedure BWindow_ConvertFromScreen(AObject : TCPlusObject; var pt : TCPlusObject); cdecl; external BePascalLibName name 'BWindow_ConvertFromScreen'; +function BWindow_ConvertFromScreen(AObject : TCPlusObject; pt : TCPlusObject) : TPoint; cdecl; external BePascalLibName name 'BWindow_ConvertFromScreen_1'; +//procedure BWindow_ConvertToScreen(AObject : TCPlusObject; var rect : TCPlusObject); cdecl; external BePascalLibName name 'BWindow_ConvertToScreen'; +//function BWindow_ConvertToScreen(AObject : TCPlusObject; rect : TCPlusObject) : TRect; cdecl; external BePascalLibName name 'BWindow_ConvertToScreen'; +//procedure BWindow_ConvertFromScreen(AObject : TCPlusObject; var rect : TRect); cdecl; external BePascalLibName name 'BWindow_ConvertFromScreen'; +//function BWindow_ConvertFromScreen(AObject : TCPlusObject; rect : TRect) : TRect; cdecl; external BePascalLibName name 'BWindow_ConvertFromScreen'; +procedure BWindow_MoveBy(AObject : TCPlusObject; dx : double; dy : double); cdecl; external BePascalLibName name 'BWindow_MoveBy'; +procedure BWindow_MoveTo(AObject : TCPlusObject; aPoint : TCPlusObject); cdecl; external BePascalLibName name 'BWindow_MoveTo'; +procedure BWindow_MoveTo(AObject : TCPlusObject; x : double; y : double); cdecl; external BePascalLibName name 'BWindow_MoveTo'; +procedure BWindow_ResizeBy(AObject : TCPlusObject; dx : double; dy : double); cdecl; external BePascalLibName name 'BWindow_ResizeBy'; +procedure BWindow_ResizeTo(AObject : TCPlusObject; width : double; height : double); cdecl; external BePascalLibName name 'BWindow_ResizeTo'; +//procedure BWindow_Show(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BWindow_Show'; +//procedure BWindow_Hide(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BWindow_Hide'; +function BWindow_IsHidden(AObject : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BWindow_IsHidden'; +function BWindow_IsMinimized(AObject : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BWindow_IsMinimized'; +procedure BWindow_Flush(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BWindow_Flush'; +procedure BWindow_Sync(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BWindow_Sync'; +function BWindow_SendBehind(AObject : TCPlusObject; window : TWindow) : TStatus_t; cdecl; external BePascalLibName name 'BWindow_SendBehind'; +procedure BWindow_DisableUpdates(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BWindow_DisableUpdates'; +procedure BWindow_EnableUpdates(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BWindow_EnableUpdates'; +procedure BWindow_BeginViewTransaction(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BWindow_BeginViewTransaction'; +procedure BWindow_EndViewTransaction(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BWindow_EndViewTransaction'; +function BWindow_Bounds(AObject : TCPlusObject) : TRect; cdecl; external BePascalLibName name 'BWindow_Bounds'; +function BWindow_Frame(AObject : TCPlusObject) : TRect; cdecl; external BePascalLibName name 'BWindow_Frame'; +function BWindow_Title(AObject : TCPlusObject) : PChar; cdecl; external BePascalLibName name 'BWindow_Title'; +procedure BWindow_SetTitle(AObject : TCPlusObject; title : PChar); cdecl; external BePascalLibName name 'BWindow_SetTitle'; +function BWindow_IsFront(AObject : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BWindow_IsFront'; +function BWindow_IsActive(AObject : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BWindow_IsActive'; +//procedure BWindow_SetKeyMenuBar(AObject : TCPlusObject; bar : TMenuBar); cdecl; external BePascalLibName name 'BWindow_SetKeyMenuBar'; +//function BWindow_KeyMenuBar(AObject : TCPlusObject) : TMenuBar; cdecl; external BePascalLibName name 'BWindow_KeyMenuBar'; +procedure BWindow_SetSizeLimits(AObject : TCPlusObject; min_h : double; max_h : double; min_v : double; max_v : double); cdecl; external BePascalLibName name 'BWindow_SetSizeLimits'; +procedure BWindow_GetSizeLimits(AObject : TCPlusObject; min_h : double; max_h : double; min_v : double; max_v : double); cdecl; external BePascalLibName name 'BWindow_GetSizeLimits'; +function BWindow_Workspaces(AObject : TCPlusObject) : Cardinal; cdecl; external BePascalLibName name 'BWindow_Workspaces'; +procedure BWindow_SetWorkspaces(AObject : TCPlusObject; Workspaces : Cardinal); cdecl; external BePascalLibName name 'BWindow_SetWorkspaces'; +function BWindow_LastMouseMovedView(AObject : TCPlusObject) : TView; cdecl; external BePascalLibName name 'BWindow_LastMouseMovedView'; +function BWindow_ResolveSpecifier(AObject : TCPlusObject; msg : TCPlusObject; index : integer; specifier : TCPlusObject; form : integer; aProperty : PChar) : THandler; cdecl; external BePascalLibName name 'BWindow_ResolveSpecifier'; +function BWindow_GetSupportedSuites(AObject : TCPlusObject; data : TCPlusObject) : TStatus_t; cdecl; external BePascalLibName name 'BWindow_GetSupportedSuites'; +function BWindow_AddToSubset(AObject : TCPlusObject; window : TCPlusObject) : TStatus_t; cdecl; external BePascalLibName name 'BWindow_AddToSubset'; +function BWindow_RemoveFromSubset(AObject : TCPlusObject; window : TCPlusObject) : TStatus_t; cdecl; external BePascalLibName name 'BWindow_RemoveFromSubset'; +function BWindow_Perform(AObject : TCPlusObject; d : TPerform_code; arg : Pointer) : TStatus_t; cdecl; external BePascalLibName name 'BWindow_Perform'; +function BWindow_SetType(AObject : TCPlusObject; aType : Cardinal) : TStatus_t; cdecl; external BePascalLibName name 'BWindow_SetType'; +function BWindow_Type(AObject : TCPlusObject) : Cardinal; cdecl; external BePascalLibName name 'BWindow_Type'; +function BWindow_SetLook(AObject : TCPlusObject; look : PCardinal) : TStatus_t; cdecl; external BePascalLibName name 'BWindow_SetLook'; +function BWindow_Look(AObject : TCPlusObject) : PCardinal; cdecl; external BePascalLibName name 'BWindow_Look'; +function BWindow_SetFeel(AObject : TCPlusObject; feel : Cardinal) : TStatus_t; cdecl; external BePascalLibName name 'BWindow_SetFeel'; +function BWindow_Feel(AObject : TCPlusObject) : Cardinal; cdecl; external BePascalLibName name 'BWindow_Feel'; +function BWindow_SetFlags(AObject : TCPlusObject; aFlags : Cardinal) : TStatus_t; cdecl; external BePascalLibName name 'BWindow_SetFlags'; +function BWindow_Flags(AObject : TCPlusObject) : Cardinal; cdecl; external BePascalLibName name 'BWindow_Flags'; +function BWindow_IsModal(AObject : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BWindow_IsModal'; +function BWindow_IsFloating(AObject : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BWindow_IsFloating'; +function BWindow_SetWindowAlignment(AObject : TCPlusObject; mode : Cardinal; h : integer; hOffset : integer; width : integer; widthOffset : integer; v : integer; vOffset : integer; height : integer; heightOffset : integer) : TStatus_t; cdecl; external BePascalLibName name 'BWindow_SetWindowAlignment'; +function BWindow_GetWindowAlignment(AObject : TCPlusObject; mode : PCardinal; var h : integer; var hOffset : integer; var width : integer; widthOffset : integer; var v : integer; var vOffset : integer; var height : integer; var heightOffset : integer) : TStatus_t; cdecl; external BePascalLibName name 'BWindow_GetWindowAlignment'; +function BWindow_QuitRequested(AObject : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BWindow_QuitRequested'; +function BWindow_Run(AObject : TCPlusObject) : TThread_id; cdecl; external BePascalLibName name 'BWindow_Run'; +procedure BWindow_BLooper(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BWindow_BLooper inherited'; +//procedure BWindow__ReservedWindow1(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BWindow__ReservedWindow1'; +//procedure BWindow__ReservedWindow2(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BWindow__ReservedWindow2'; +//procedure BWindow__ReservedWindow3(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BWindow__ReservedWindow3'; +//procedure BWindow__ReservedWindow4(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BWindow__ReservedWindow4'; +//procedure BWindow__ReservedWindow5(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BWindow__ReservedWindow5'; +//procedure BWindow__ReservedWindow6(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BWindow__ReservedWindow6'; +//procedure BWindow__ReservedWindow7(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BWindow__ReservedWindow7'; +//procedure BWindow__ReservedWindow8(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BWindow__ReservedWindow8'; +//function BWindow_Create(AObject : TBeObject); cdecl; external BePascalLibName name 'BWindow_Create'; +//function BWindow_Create(AObject : TBeObject; : TWindow); cdecl; external BePascalLibName name 'BWindow_Create'; +//function BWindow_operator=(AObject : TCPlusObject; : TWindow) : TWindow; cdecl; external BePascalLibName name 'BWindow_operator='; +//function BWindow_Create(AObject : TBeObject; frame : TRect; depth : TColor_Space; bitmapFlags : Cardinal; rowBytes : integer); cdecl; external BePascalLibName name 'BWindow_Create'; +//procedure BWindow_InitData(AObject : TCPlusObject; frame : TRect; title : PChar; look : PCadinal; feel : Cardinal; flags : Cardinal; workspace : Cardinal); cdecl; external BePascalLibName name 'BWindow_InitData'; +//function BWindow_ArchiveChildren(AObject : TCPlusObject; data : TMessage; deep : boolean) : TStatus_t; cdecl; external BePascalLibName name 'BWindow_ArchiveChildren'; +//function BWindow_UnarchiveChildren(AObject : TCPlusObject; data : TMessage) : TStatus_t; cdecl; external BePascalLibName name 'BWindow_UnarchiveChildren'; +//procedure BWindow_BitmapClose(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BWindow_BitmapClose'; +//procedure BWindow_task_looper(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BWindow_task_looper'; +//procedure BWindow_start_drag(AObject : TCPlusObject; msg : TMessage; token : integer; offset : TPoint; track_rect : TRect; reply_to : THandler); cdecl; external BePascalLibName name 'BWindow_start_drag'; +//procedure BWindow_start_drag(AObject : TCPlusObject; msg : TMessage; token : integer; offset : TPoint; bitmap_token : integer; dragMode : TDrawing_Mode; reply_to : THandler); cdecl; external BePascalLibName name 'BWindow_start_drag'; +//procedure BWindow_view_builder(AObject : TCPlusObject; a_view : TView); cdecl; external BePascalLibName name 'BWindow_view_builder'; +//procedure BWindow_attach_builder(AObject : TCPlusObject; a_view : TView); cdecl; external BePascalLibName name 'BWindow_attach_builder'; +//procedure BWindow_detach_builder(AObject : TCPlusObject; a_view : TView); cdecl; external BePascalLibName name 'BWindow_detach_builder'; +//function BWindow_get_server_token(AObject : TCPlusObject) : integer; cdecl; external BePascalLibName name 'BWindow_get_server_token'; +//function BWindow_extract_drop(AObject : TCPlusObject; an_event : TMessage; target : THandler) : TMessage; cdecl; external BePascalLibName name 'BWindow_extract_drop'; +//procedure BWindow_movesize(AObject : TCPlusObject; opcode : Cardinal; h : double; v : double); cdecl; external BePascalLibName name 'BWindow_movesize'; +//function BWindow_ReadMessageFromPort(AObject : TCPlusObject; tout : TBigtime_t) : TMessage; cdecl; external BePascalLibName name 'BWindow_ReadMessageFromPort'; +//function BWindow_MessagesWaiting(AObject : TCPlusObject) : integer; cdecl; external BePascalLibName name 'BWindow_MessagesWaiting'; +//procedure BWindow_handle_activate(AObject : TCPlusObject; an_event : TMessage); cdecl; external BePascalLibName name 'BWindow_handle_activate'; +//procedure BWindow_do_view_frame(AObject : TCPlusObject; an_event : TMessage); cdecl; external BePascalLibName name 'BWindow_do_view_frame'; +//procedure BWindow_do_value_change(AObject : TCPlusObject; an_event : TMessage; handler : THandler); cdecl; external BePascalLibName name 'BWindow_do_value_change'; +//procedure BWindow_do_mouse_down(AObject : TCPlusObject; an_event : TMessage; target : TView); cdecl; external BePascalLibName name 'BWindow_do_mouse_down'; +//procedure BWindow_do_mouse_moved(AObject : TCPlusObject; an_event : TMessage; target : TView); cdecl; external BePascalLibName name 'BWindow_do_mouse_moved'; +//procedure BWindow_do_key_down(AObject : TCPlusObject; an_event : TMessage; handler : THandler); cdecl; external BePascalLibName name 'BWindow_do_key_down'; +//procedure BWindow_do_key_up(AObject : TCPlusObject; an_event : TMessage; handler : THandler); cdecl; external BePascalLibName name 'BWindow_do_key_up'; +//procedure BWindow_do_menu_event(AObject : TCPlusObject; an_event : TMessage); cdecl; external BePascalLibName name 'BWindow_do_menu_event'; +//procedure BWindow_do_draw_views(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BWindow_do_draw_views'; +//function BWindow_ConvertToMessage(AObject : TCPlusObject; raw : Pointer; code : integer) : TMessage; cdecl; external BePascalLibName name 'BWindow_ConvertToMessage'; +//function BWindow_allocShortcut(AObject : TCPlusObject; key : Cardinal; modifiers : Cardinal) : TCmd_Key; cdecl; external BePascalLibName name 'BWindow_allocShortcut'; +//function BWindow_FindShortcut(AObject : TCPlusObject; key : Cardinal; modifiers : Cardinal) : TCmd_Key; cdecl; external BePascalLibName name 'BWindow_FindShortcut'; +//procedure BWindow_AddShortcut(AObject : TCPlusObject; key : Cardinal; modifiers : Cardinal; item : TMenuItem); cdecl; external BePascalLibName name 'BWindow_AddShortcut'; +//procedure BWindow_post_message(AObject : TCPlusObject; message : TMessage); cdecl; external BePascalLibName name 'BWindow_post_message'; +//procedure BWindow_SetLocalTitle(AObject : TCPlusObject; new_title : PChar); cdecl; external BePascalLibName name 'BWindow_SetLocalTitle'; +//procedure BWindow_enable_pulsing(AObject : TCPlusObject; enable : boolean); cdecl; external BePascalLibName name 'BWindow_enable_pulsing'; +//function BWindow_determine_target(AObject : TCPlusObject; msg : TMessage; target : THandler; pref : boolean) : THandler; cdecl; external BePascalLibName name 'BWindow_determine_target'; +//procedure BWindow_kb_navigate(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BWindow_kb_navigate'; +//procedure BWindow_navigate_to_next(AObject : TCPlusObject; direction : integer; group : boolean); cdecl; external BePascalLibName name 'BWindow_navigate_to_next'; +//procedure BWindow_set_focus(AObject : TCPlusObject; focus : TView; notify_input_server : boolean); cdecl; external BePascalLibName name 'BWindow_set_focus'; +//function BWindow_InUpdate(AObject : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BWindow_InUpdate'; +//procedure BWindow_DequeueAll(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BWindow_DequeueAll'; +//function BWindow_find_token_and_handler(AObject : TCPlusObject; msg : TMessage; token : ^integer; handler : THandler) : boolean; cdecl; external BePascalLibName name 'BWindow_find_token_and_handler'; +//function BWindow_compose_type(AObject : TCPlusObject; look : PCadinal; feel : Cardinal) : Cardinal; cdecl; external BePascalLibName name 'BWindow_compose_type'; +//procedure BWindow_decompose_type(AObject : TCPlusObject; type : Cardinal; look : PCardinal; feel : PCardinal); cdecl; external BePascalLibName name 'BWindow_decompose_type'; +//procedure BWindow_SetIsFilePanel(AObject : TCPlusObject; panel : boolean); cdecl; external BePascalLibName name 'BWindow_SetIsFilePanel'; +//function BWindow_IsFilePanel(AObject : TCPlusObject) : boolean; cdecl; external BePascalLibName name 'BWindow_IsFilePanel'; +//procedure BWindow_AddFloater(AObject : TCPlusObject; a_floating_window : TWindow); cdecl; external BePascalLibName name 'BWindow_AddFloater'; +//procedure BWindow_RemoveFloater(AObject : TCPlusObject; a_floating_window : TWindow); cdecl; external BePascalLibName name 'BWindow_RemoveFloater'; +//function BWindow_WindowType(AObject : TCPlusObject) : Cardinal; cdecl; external BePascalLibName name 'BWindow_WindowType'; +//procedure BWindow_char *fTitle(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BWindow_char *fTitle'; +//procedure BWindow_int32 server_token(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BWindow_int32 server_token'; +//procedure BWindow_char fInUpdate(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BWindow_char fInUpdate'; +//procedure BWindow_char f_active(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BWindow_char f_active'; +//procedure BWindow_short fShowLevel(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BWindow_short fShowLevel'; +//procedure BWindow_uint32 fFlags(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BWindow_uint32 fFlags'; +//procedure BWindow_port_id send_port(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BWindow_port_id send_port'; +//procedure BWindow_port_id receive_port(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BWindow_port_id receive_port'; +//procedure BWindow_BView *top_view(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BWindow_BView *top_view'; +//procedure BWindow_BView *fFocus(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BWindow_BView *fFocus'; +//procedure BWindow_BView *fLastMouseMovedView(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BWindow_BView *fLastMouseMovedView'; +//procedure BWindow__BSession_ *a_session(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BWindow__BSession_ *a_session'; +//procedure BWindow_BMenuBar *fKeyMenuBar(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BWindow_BMenuBar *fKeyMenuBar'; +//procedure BWindow_BButton *fDefaultButton(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BWindow_BButton *fDefaultButton'; +//procedure BWindow_BList accelList(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BWindow_BList accelList'; +//procedure BWindow_int32 top_view_token(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BWindow_int32 top_view_token'; +//procedure BWindow_bool pulse_enabled(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BWindow_bool pulse_enabled'; +//procedure BWindow_bool fViewsNeedPulse(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BWindow_bool fViewsNeedPulse'; +//procedure BWindow_bool fIsFilePanel(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BWindow_bool fIsFilePanel'; +//procedure BWindow_bool fUnused1(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BWindow_bool fUnused1'; +//procedure BWindow_bigtime_t pulse_rate(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BWindow_bigtime_t pulse_rate'; +//procedure BWindow_bool fWaitingForMenu(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BWindow_bool fWaitingForMenu'; +//procedure BWindow_bool fOffscreen(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BWindow_bool fOffscreen'; +//procedure BWindow_sem_id fMenuSem(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BWindow_sem_id fMenuSem'; +//procedure BWindow_float fMaxZoomH(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BWindow_float fMaxZoomH'; +//procedure BWindow_float fMaxZoomV(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BWindow_float fMaxZoomV'; +//procedure BWindow_float fMinWindH(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BWindow_float fMinWindH'; +//procedure BWindow_float fMinWindV(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BWindow_float fMinWindV'; +//procedure BWindow_float fMaxWindH(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BWindow_float fMaxWindH'; +//procedure BWindow_float fMaxWindV(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BWindow_float fMaxWindV'; +//procedure BWindow_BRect fFrame(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BWindow_BRect fFrame'; +//procedure BWindow_window_look fLook(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BWindow_window_look fLook'; +//procedure BWindow__view_attr_ *fCurDrawViewState(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BWindow__view_attr_ *fCurDrawViewState'; +//procedure BWindow_window_feel fFeel(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BWindow_window_feel fFeel'; +//procedure BWindow_int32 fLastViewToken(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BWindow_int32 fLastViewToken'; +//procedure BWindow__CEventPort_ *fEventPort(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BWindow__CEventPort_ *fEventPort'; +//procedure BWindow_BMessageRunner *fPulseRunner(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BWindow_BMessageRunner *fPulseRunner'; +//procedure BWindow_BRect fCurrentFrame(AObject : TCPlusObject); cdecl; external BePascalLibName name 'BWindow_BRect fCurrentFrame'; +//procedure BWindow_uint32 _reserved[2](AObject : TCPlusObject); cdecl; external BePascalLibName name 'BWindow_uint32 _reserved[2]'; +//procedure BWindow_uint32 _more_reserved[4](AObject : TCPlusObject); cdecl; external BePascalLibName name 'BWindow_uint32 _more_reserved[4]'; +// implementation function TWindow.QuitRequested : boolean; @@ -97,10 +388,10 @@ begin be_app.PostMessage(B_QUIT_REQUESTED); end; -constructor TWindow.Create(frame : TRect; title : PChar; atype, flags, workspaces : Cardinal); +constructor TWindow.Create(aFrame : TRect; aTitle : PChar; aNewType, SomeFlags, aWorkspaces : Cardinal); begin inherited Create; - CPlusObject := BWindow_Create(Self, frame.CPlusObject, title, atype, flags, workspaces); + CPlusObject := BWindow_Create(Self, aFrame.CPlusObject, aTitle, aNewType, SomeFlags, aWorkspaces); end; destructor TWindow.Destroy; @@ -119,9 +410,9 @@ begin BWindow_Hide(Self.CPlusObject); end; -procedure TWindow.AddChild(aView : TView; sibling : TCPlusObject); +procedure TWindow.AddChild(aView : TView; sibling : TView); begin - BWindow_AddChild(Self.CPlusObject, aView.CPlusObject, sibling); + BWindow_AddChild(Self.CPlusObject, aView.CPlusObject, nil{sibling.CPlusObject}); end; function TWindow.RemoveChild(aView : TView) : boolean; @@ -129,6 +420,949 @@ begin result := BWindow_RemoveChild(Self.CPlusObject, aView.CPlusObject); end; +function TWindow.Instantiate(data : TMessage) : TArchivable; +begin + Result := BWindow_Instantiate(CPlusObject, data.CPlusObject); +end; + +function TWindow.Archive(data : TMessage; deep : boolean) : TStatus_t; +begin + Result := BWindow_Archive(CPlusObject, data.CPlusObject, deep); +end; + +procedure TWindow.Quit; +begin + BWindow_Quit(CPlusObject); +end; + +//procedure TWindow.Close; +//begin +// BWindow_Close(CPlusObject); +//end; + +//procedure TWindow.AddChild(child : TView; before : TView); +//begin +// BWindow_AddChild(CPlusObject, child.CPlusObject, before.CPlusObject); +//end; + +//function TWindow.RemoveChild(child : TView) : boolean; +//begin +// Result := BWindow_RemoveChild(CPlusObject, child.CPlusObject); +//end; + +function TWindow.CountChildren : integer; +begin + Result := BWindow_CountChildren(CPlusObject); +end; + +function TWindow.ChildAt(index : integer) : TView; +begin + Result := BWindow_ChildAt(CPlusObject, index); +end; + +procedure TWindow.DispatchMessage(message : TMessage; handler : THandler); +begin + WriteLn(ClassName); + message.PrintToStream; +end; + +procedure TWindow.MessageReceived(message : TMessage); +begin + +end; + +procedure TWindow.FrameMoved(new_position : TPoint); +begin + BWindow_FrameMoved(CPlusObject, new_position.CPlusObject); +end; + +procedure TWindow.WorkspacesChanged(old_ws : Cardinal; new_ws : Cardinal); +begin + BWindow_WorkspacesChanged(CPlusObject, old_ws, new_ws); +end; + +procedure TWindow.WorkspaceActivated(ws : integer; state : boolean); +begin + BWindow_WorkspaceActivated(CPlusObject, ws, state); +end; + +procedure TWindow.FrameResized(new_width : double; new_height : double); +begin + BWindow_FrameResized(CPlusObject, new_width, new_height); +end; + +procedure TWindow.Minimize(aMinimize : boolean); +begin + BWindow_Minimize(CPlusObject, aMinimize); +end; + +procedure TWindow.Zoom(rec_position : TPoint; rec_width : double; rec_height : double); +begin + BWindow_Zoom(CPlusObject, rec_position.CPlusObject, rec_width, rec_height); +end; + +procedure TWindow.Zoom; +begin + BWindow_Zoom(CPlusObject); +end; + +procedure TWindow.SetZoomLimits(max_h : double; max_v : double); +begin + BWindow_SetZoomLimits(CPlusObject, max_h, max_v); +end; + +procedure TWindow.ScreenChanged(screen_size : TRect; depth : TColor_Space); +begin + BWindow_ScreenChanged(CPlusObject, screen_size.CPlusObject, depth); +end; + +procedure TWindow.SetPulseRate(rate : TBigtime_t); +begin + BWindow_SetPulseRate(CPlusObject, rate); +end; + +function TWindow.PulseRate : TBigtime_t; +begin + Result := BWindow_PulseRate(CPlusObject); +end; + +procedure TWindow.AddShortcut(key : Cardinal; modifiers : Cardinal; msg : TMessage); +begin + BWindow_AddShortcut(CPlusObject, key, modifiers, msg.CPlusObject); +end; + +procedure TWindow.AddShortcut(key : Cardinal; modifiers : Cardinal; msg : TMessage; target : THandler); +begin + BWindow_AddShortcut(CPlusObject, key, modifiers, msg.CPlusObject, target.CPlusObject); +end; + +procedure TWindow.RemoveShortcut(key : Cardinal; modifiers : Cardinal); +begin + BWindow_RemoveShortcut(CPlusObject, key, modifiers); +end; + +procedure TWindow.SetDefaultButton(button : TButton); +begin + BWindow_SetDefaultButton(CPlusObject, button.CPlusObject); +end; + +function TWindow.DefaultButton : TButton; +begin + Result := BWindow_DefaultButton(CPlusObject); +end; + +procedure TWindow.MenusBeginning; +begin + BWindow_MenusBeginning(CPlusObject); +end; + +procedure TWindow.MenusEnded; +begin + BWindow_MenusEnded(CPlusObject); +end; + +function TWindow.NeedsUpdate : boolean; +begin +// Result := BWindow_NeedsUpdate(CPlusObject); + Result := True; +end; + +procedure TWindow.UpdateIfNeeded; +begin + BWindow_UpdateIfNeeded(CPlusObject); +end; + +function TWindow.FindView(view_name : PChar) : TView; +begin + Result := BWindow_FindView(CPlusObject, view_name); +end; + +function TWindow.FindView(aPoint : TPoint) : TView; +begin + Result := BWindow_FindView(CPlusObject, aPoint.CPlusObject); +end; + +function TWindow.CurrentFocus : TView; +begin + Result := BWindow_CurrentFocus(CPlusObject); +end; + +procedure TWindow.Activate(aValue : boolean); +begin + BWindow_Activate(CPlusObject, aValue); +end; + +procedure TWindow.WindowActivated(state : boolean); +begin +// BWindow_WindowActivated(CPlusObject, state); +end; + +//procedure TWindow.ConvertToScreen(pt : TPoint); +//begin +// BWindow_ConvertToScreen(CPlusObject, pt.CPlusObject); +//end; + +function TWindow.ConvertToScreen(pt : TPoint) : TPoint; +begin + Result := BWindow_ConvertToScreen(CPlusObject, pt.CPlusObject); +end; + +//procedure TWindow.ConvertFromScreen(pt : TPoint); +//begin +// BWindow_ConvertFromScreen(CPlusObject, pt.CPlusObject); +//end; + +function TWindow.ConvertFromScreen(pt : TPoint) : TPoint; +begin + Result := BWindow_ConvertFromScreen(CPlusObject, pt.CPlusObject); +end; + +//procedure TWindow.ConvertToScreen(rect : TRect); +//begin +// BWindow_ConvertToScreen(CPlusObject, rect.CPlusObject); +//end; + +//function TWindow.ConvertToScreen(rect : TRect) : TRect; +//begin +// Result := BWindow_ConvertToScreen(CPlusObject, rect.CPlusObject); +//end; + +//procedure TWindow.ConvertFromScreen(rect : TRect); +//begin +// BWindow_ConvertFromScreen(CPlusObject, rect.CPlusObject); +//end; + +//function TWindow.ConvertFromScreen(rect : TRect) : TRect; +//begin +// Result := BWindow_ConvertFromScreen(CPlusObject, rect.CPlusObject); +//end; + +procedure TWindow.MoveBy(dx : double; dy : double); +begin + BWindow_MoveBy(CPlusObject, dx, dy); +end; + +procedure TWindow.MoveTo(aPoint : TPoint); +begin + BWindow_MoveTo(CPlusObject, aPoint.CPlusObject); +end; + +procedure TWindow.MoveTo(x : double; y : double); +begin + BWindow_MoveTo(CPlusObject, x, y); +end; + +procedure TWindow.ResizeBy(dx : double; dy : double); +begin + BWindow_ResizeBy(CPlusObject, dx, dy); +end; + +procedure TWindow.ResizeTo(width : double; height : double); +begin + BWindow_ResizeTo(CPlusObject, width, height); +end; + +//procedure TWindow.Show; +//begin +// BWindow_Show(CPlusObject); +//end; + +//procedure TWindow.Hide; +//begin +// BWindow_Hide(CPlusObject); +//end; + +function TWindow.IsHidden : boolean; +begin + Result := BWindow_IsHidden(CPlusObject); +end; + +function TWindow.IsMinimized : boolean; +begin + Result := BWindow_IsMinimized(CPlusObject); +end; + +procedure TWindow.Flush; +begin + BWindow_Flush(CPlusObject); +end; + +procedure TWindow.Sync; +begin + BWindow_Sync(CPlusObject); +end; + +function TWindow.SendBehind(window : TWindow) : TStatus_t; +begin + Result := BWindow_SendBehind(CPlusObject, window); +end; + +procedure TWindow.DisableUpdates; +begin + BWindow_DisableUpdates(CPlusObject); +end; + +procedure TWindow.EnableUpdates; +begin + BWindow_EnableUpdates(CPlusObject); +end; + +procedure TWindow.BeginViewTransaction; +begin + BWindow_BeginViewTransaction(CPlusObject); +end; + +procedure TWindow.EndViewTransaction; +begin + BWindow_EndViewTransaction(CPlusObject); +end; + +function TWindow.Bounds : TRect; +begin + Result := BWindow_Bounds(CPlusObject); +end; + +function TWindow.GetFrame : TRect; +begin + Result := BWindow_Frame(CPlusObject); +end; + +function TWindow.GetTitle : PChar; +begin + Result := BWindow_Title(CPlusObject); +end; + +procedure TWindow.SetTitle(title : PChar); +begin + BWindow_SetTitle(CPlusObject, title); +end; + +function TWindow.IsFront : boolean; +begin + Result := BWindow_IsFront(CPlusObject); +end; + +function TWindow.IsActive : boolean; +begin + Result := BWindow_IsActive(CPlusObject); +end; + +//procedure TWindow.SetKeyMenuBar(bar : TMenuBar); +//begin +// BWindow_SetKeyMenuBar(CPlusObject, bar.CPlusObject); +//end; + +//function TWindow.KeyMenuBar : TMenuBar; +//begin +// Result := BWindow_KeyMenuBar(CPlusObject); +//end; + +procedure TWindow.SetSizeLimits(min_h : double; max_h : double; min_v : double; max_v : double); +begin + BWindow_SetSizeLimits(CPlusObject, min_h, max_h, min_v, max_v); +end; + +procedure TWindow.GetSizeLimits(min_h : double; max_h : double; min_v : double; max_v : double); +begin + BWindow_GetSizeLimits(CPlusObject, min_h, max_h, min_v, max_v); +end; + +function TWindow.Workspaces : Cardinal; +begin + Result := BWindow_Workspaces(CPlusObject); +end; + +procedure TWindow.SetWorkspaces(aWorkspace : Cardinal); +begin + BWindow_SetWorkspaces(CPlusObject, aWorkspace); +end; + +function TWindow.LastMouseMovedView : TView; +begin + Result := BWindow_LastMouseMovedView(CPlusObject); +end; + +function TWindow.ResolveSpecifier(msg : TMessage; index : integer; specifier : TMessage; form : integer; aProperty : PChar) : THandler; +begin + Result := BWindow_ResolveSpecifier(CPlusObject, msg.CPlusObject, index, specifier.CPlusObject, form, aProperty); +end; + +function TWindow.GetSupportedSuites(data : TMessage) : TStatus_t; +begin + Result := BWindow_GetSupportedSuites(CPlusObject, data.CPlusObject); +end; + +function TWindow.AddToSubset(window : TWindow) : TStatus_t; +begin + Result := BWindow_AddToSubset(CPlusObject, window.CPlusObject); +end; + +function TWindow.RemoveFromSubset(window : TWindow) : TStatus_t; +begin + Result := BWindow_RemoveFromSubset(CPlusObject, window.CPlusObject); +end; + +function TWindow.Perform(d : TPerform_code; arg : Pointer) : TStatus_t; +begin + Result := BWindow_Perform(CPlusObject, d, arg); +end; + +function TWindow.SetType(aType : Cardinal) : TStatus_t; +begin + Result := BWindow_SetType(CPlusObject, aType); +end; + +function TWindow.GetType : Cardinal; +begin + Result := BWindow_Type(CPlusObject); +end; + +function TWindow.SetLook(look : PCardinal) : TStatus_t; +begin + Result := BWindow_SetLook(CPlusObject, look); +end; + +function TWindow.GetLook : PCardinal; +begin + Result := BWindow_Look(CPlusObject); +end; + +function TWindow.SetFeel(feel : Cardinal) : TStatus_t; +begin + Result := BWindow_SetFeel(CPlusObject, feel); +end; + +function TWindow.GetFeel : Cardinal; +begin + Result := BWindow_Feel(CPlusObject); +end; + +function TWindow.SetFlags(aFlags : Cardinal) : TStatus_t; +begin + Result := BWindow_SetFlags(CPlusObject, aFlags); +end; + +function TWindow.GetFlags : Cardinal; +begin + Result := BWindow_Flags(CPlusObject); +end; + +function TWindow.IsModal : boolean; +begin + Result := BWindow_IsModal(CPlusObject); +end; + +function TWindow.IsFloating : boolean; +begin + Result := BWindow_IsFloating(CPlusObject); +end; + +function TWindow.SetWindowAlignment(mode : Cardinal; h : integer; hOffset : integer; width : integer; widthOffset : integer; v : integer; vOffset : integer; height : integer; heightOffset : integer) : TStatus_t; +begin + Result := BWindow_SetWindowAlignment(CPlusObject, mode, h, hOffset, width, widthOffset, v, vOffset, height, heightOffset); +end; + +function TWindow.GetWindowAlignment(mode : PCardinal; var h : integer; var hOffset : integer; var width : integer; var widthOffset : integer; var v : integer; var vOffset : integer; var height : integer; var heightOffset : integer) : TStatus_t; +begin + Result := BWindow_GetWindowAlignment(CPlusObject, mode, h, hOffset, width, widthOffset, v, vOffset, height, heightOffset); +end; + +function TWindow.Run : TThread_id; +begin + Result := BWindow_Run(CPlusObject); +end; + +//procedure TWindow.BLooper; +//begin +// BWindow_BLooper inherited(CPlusObject); +//end; + +//procedure TWindow._ReservedWindow1; +//begin +// BWindow__ReservedWindow1(CPlusObject); +//end; +// +//procedure TWindow._ReservedWindow2; +//begin +// BWindow__ReservedWindow2(CPlusObject); +//end; +// +//procedure TWindow._ReservedWindow3; +//begin +// BWindow__ReservedWindow3(CPlusObject); +//end; +// +//procedure TWindow._ReservedWindow4; +//begin +// BWindow__ReservedWindow4(CPlusObject); +//end; +// +//procedure TWindow._ReservedWindow5; +//begin +// BWindow__ReservedWindow5(CPlusObject); +//end; +// +//procedure TWindow._ReservedWindow6; +//begin +// BWindow__ReservedWindow6(CPlusObject); +//end; +// +//procedure TWindow._ReservedWindow7; +//begin +// BWindow__ReservedWindow7(CPlusObject); +//end; +// +//procedure TWindow._ReservedWindow8; +//begin +// BWindow__ReservedWindow8(CPlusObject); +//end; +// +//constructor TWindow.Create; +//begin +// CPlusObject := BWindow_Create(Self); +//end; +// +//constructor TWindow.Create( : TWindow); +//begin +// CPlusObject := BWindow_Create(Self, .CPlusObject); +//end; +// +//function TWindow.operator=( : TWindow) : TWindow; +//begin +// Result := BWindow_operator=(CPlusObject, .CPlusObject); +//end; +// +//constructor TWindow.Create(frame : TRect; depth : TColor_Space; bitmapFlags : Cardinal; rowBytes : integer); +//begin +// CPlusObject := BWindow_Create(Self, frame.CPlusObject, depth, bitmapFlags, rowBytes); +//end; +// +//procedure TWindow.InitData(frame : TRect; title : PChar; look : PCadinal; feel : Cardinal; flags : Cardinal; workspace : Cardinal); +//begin +// BWindow_InitData(CPlusObject, frame.CPlusObject, title, look, feel, flags, workspace); +//end; +// +//function TWindow.ArchiveChildren(data : TMessage; deep : boolean) : TStatus_t; +//begin +// Result := BWindow_ArchiveChildren(CPlusObject, data.CPlusObject, deep); +//end; +// +//function TWindow.UnarchiveChildren(data : TMessage) : TStatus_t; +//begin +// Result := BWindow_UnarchiveChildren(CPlusObject, data.CPlusObject); +//end; +// +//procedure TWindow.BitmapClose; +//begin +// BWindow_BitmapClose(CPlusObject); +//end; +// +//procedure TWindow.task_looper; +//begin +// BWindow_task_looper(CPlusObject); +//end; +// +//procedure TWindow.start_drag(msg : TMessage; token : integer; offset : TPoint; track_rect : TRect; reply_to : THandler); +//begin +// BWindow_start_drag(CPlusObject, msg.CPlusObject, token, offset.CPlusObject, track_rect.CPlusObject, reply_to.CPlusObject); +//end; +// +//procedure TWindow.start_drag(msg : TMessage; token : integer; offset : TPoint; bitmap_token : integer; dragMode : TDrawing_Mode; reply_to : THandler); +//begin +// BWindow_start_drag(CPlusObject, msg.CPlusObject, token, offset.CPlusObject, bitmap_token, dragMode, reply_to.CPlusObject); +//end; +// +//procedure TWindow.view_builder(a_view : TView); +//begin +// BWindow_view_builder(CPlusObject, a_view.CPlusObject); +//end; +// +//procedure TWindow.attach_builder(a_view : TView); +//begin +// BWindow_attach_builder(CPlusObject, a_view.CPlusObject); +//end; +// +//procedure TWindow.detach_builder(a_view : TView); +//begin +// BWindow_detach_builder(CPlusObject, a_view.CPlusObject); +//end; +// +//function TWindow.get_server_token : integer; +//begin +// Result := BWindow_get_server_token(CPlusObject); +//end; +// +//function TWindow.extract_drop(an_event : TMessage; target : THandler) : TMessage; +//begin +// Result := BWindow_extract_drop(CPlusObject, an_event.CPlusObject, target.CPlusObject); +//end; +// +//procedure TWindow.movesize(opcode : Cardinal; h : double; v : double); +//begin +// BWindow_movesize(CPlusObject, opcode, h, v); +//end; +// +//function TWindow.ReadMessageFromPort(tout : TBigtime_t) : TMessage; +//begin +// Result := BWindow_ReadMessageFromPort(CPlusObject, tout); +//end; +// +//function TWindow.MessagesWaiting : integer; +//begin +// Result := BWindow_MessagesWaiting(CPlusObject); +//end; +// +//procedure TWindow.handle_activate(an_event : TMessage); +//begin +// BWindow_handle_activate(CPlusObject, an_event.CPlusObject); +//end; +// +//procedure TWindow.do_view_frame(an_event : TMessage); +//begin +// BWindow_do_view_frame(CPlusObject, an_event.CPlusObject); +//end; +// +//procedure TWindow.do_value_change(an_event : TMessage; handler : THandler); +//begin +// BWindow_do_value_change(CPlusObject, an_event.CPlusObject, handler.CPlusObject); +//end; +// +//procedure TWindow.do_mouse_down(an_event : TMessage; target : TView); +//begin +// BWindow_do_mouse_down(CPlusObject, an_event.CPlusObject, target.CPlusObject); +//end; +// +//procedure TWindow.do_mouse_moved(an_event : TMessage; target : TView); +//begin +// BWindow_do_mouse_moved(CPlusObject, an_event.CPlusObject, target.CPlusObject); +//end; +// +//procedure TWindow.do_key_down(an_event : TMessage; handler : THandler); +//begin +// BWindow_do_key_down(CPlusObject, an_event.CPlusObject, handler.CPlusObject); +//end; +// +//procedure TWindow.do_key_up(an_event : TMessage; handler : THandler); +//begin +// BWindow_do_key_up(CPlusObject, an_event.CPlusObject, handler.CPlusObject); +//end; +// +//procedure TWindow.do_menu_event(an_event : TMessage); +//begin +// BWindow_do_menu_event(CPlusObject, an_event.CPlusObject); +//end; +// +//procedure TWindow.do_draw_views; +//begin +// BWindow_do_draw_views(CPlusObject); +//end; +// +//function TWindow.ConvertToMessage(raw : Pointer; code : integer) : TMessage; +//begin +// Result := BWindow_ConvertToMessage(CPlusObject, raw, code); +//end; +// +//function TWindow.allocShortcut(key : Cardinal; modifiers : Cardinal) : TCmd_Key; +//begin +// Result := BWindow_allocShortcut(CPlusObject, key, modifiers); +//end; +// +//function TWindow.FindShortcut(key : Cardinal; modifiers : Cardinal) : TCmd_Key; +//begin +// Result := BWindow_FindShortcut(CPlusObject, key, modifiers); +//end; +// +//procedure TWindow.AddShortcut(key : Cardinal; modifiers : Cardinal; item : TMenuItem); +//begin +// BWindow_AddShortcut(CPlusObject, key, modifiers, item.CPlusObject); +//end; +// +//procedure TWindow.post_message(message : TMessage); +//begin +// BWindow_post_message(CPlusObject, message.CPlusObject); +//end; +// +//procedure TWindow.SetLocalTitle(new_title : PChar); +//begin +// BWindow_SetLocalTitle(CPlusObject, new_title); +//end; +// +//procedure TWindow.enable_pulsing(enable : boolean); +//begin +// BWindow_enable_pulsing(CPlusObject, enable); +//end; +// +//function TWindow.determine_target(msg : TMessage; target : THandler; pref : boolean) : THandler; +//begin +// Result := BWindow_determine_target(CPlusObject, msg.CPlusObject, target.CPlusObject, pref); +//end; +// +//procedure TWindow.kb_navigate; +//begin +// BWindow_kb_navigate(CPlusObject); +//end; +// +//procedure TWindow.navigate_to_next(direction : integer; group : boolean); +//begin +// BWindow_navigate_to_next(CPlusObject, direction, group); +//end; +// +//procedure TWindow.set_focus(focus : TView; notify_input_server : boolean); +//begin +// BWindow_set_focus(CPlusObject, focus.CPlusObject, notify_input_server); +//end; +// +//function TWindow.InUpdate : boolean; +//begin +// Result := BWindow_InUpdate(CPlusObject); +//end; +// +//procedure TWindow.DequeueAll; +//begin +// BWindow_DequeueAll(CPlusObject); +//end; +// +//function TWindow.find_token_and_handler(msg : TMessage; token : ^integer; handler : THandler) : boolean; +//begin +// Result := BWindow_find_token_and_handler(CPlusObject, msg.CPlusObject, token, handler.CPlusObject); +//end; +// +//function TWindow.compose_type(look : PCadinal; feel : Cardinal) : Cardinal; +//begin +// Result := BWindow_compose_type(CPlusObject, look, feel); +//end; +// +//procedure TWindow.decompose_type(type : Cardinal; look : PCardinal; feel : PCardinal); +//begin +// BWindow_decompose_type(CPlusObject, type, look, feel); +//end; +// +//procedure TWindow.SetIsFilePanel(panel : boolean); +//begin +// BWindow_SetIsFilePanel(CPlusObject, panel); +//end; +// +//function TWindow.IsFilePanel : boolean; +//begin +// Result := BWindow_IsFilePanel(CPlusObject); +//end; +// +//procedure TWindow.AddFloater(a_floating_window : TWindow); +//begin +// BWindow_AddFloater(CPlusObject, a_floating_window.CPlusObject); +//end; +// +//procedure TWindow.RemoveFloater(a_floating_window : TWindow); +//begin +// BWindow_RemoveFloater(CPlusObject, a_floating_window.CPlusObject); +//end; +// +//function TWindow.WindowType : Cardinal; +//begin +// Result := BWindow_WindowType(CPlusObject); +//end; +// +//procedure TWindow.char *fTitle; +//begin +// BWindow_char *fTitle(CPlusObject); +//end; +// +//procedure TWindow.int32 server_token; +//begin +// BWindow_int32 server_token(CPlusObject); +//end; +// +//procedure TWindow.char fInUpdate; +//begin +// BWindow_char fInUpdate(CPlusObject); +//end; +// +//procedure TWindow.char f_active; +//begin +// BWindow_char f_active(CPlusObject); +//end; +// +//procedure TWindow.short fShowLevel; +//begin +// BWindow_short fShowLevel(CPlusObject); +//end; +// +//procedure TWindow.uint32 fFlags; +//begin +// BWindow_uint32 fFlags(CPlusObject); +//end; +// +//procedure TWindow.port_id send_port; +//begin +// BWindow_port_id send_port(CPlusObject); +//end; +// +//procedure TWindow.port_id receive_port; +//begin +// BWindow_port_id receive_port(CPlusObject); +//end; +// +//procedure TWindow.BView *top_view; +//begin +// BWindow_BView *top_view(CPlusObject); +//end; +// +//procedure TWindow.BView *fFocus; +//begin +// BWindow_BView *fFocus(CPlusObject); +//end; +// +//procedure TWindow.BView *fLastMouseMovedView; +//begin +// BWindow_BView *fLastMouseMovedView(CPlusObject); +//end; +// +//procedure TWindow._BSession_ *a_session; +//begin +// BWindow__BSession_ *a_session(CPlusObject); +//end; +// +//procedure TWindow.BMenuBar *fKeyMenuBar; +//begin +// BWindow_BMenuBar *fKeyMenuBar(CPlusObject); +//end; +// +//procedure TWindow.BButton *fDefaultButton; +//begin +// BWindow_BButton *fDefaultButton(CPlusObject); +//end; +// +//procedure TWindow.BList accelList; +//begin +// BWindow_BList accelList(CPlusObject); +//end; +// +//procedure TWindow.int32 top_view_token; +//begin +// BWindow_int32 top_view_token(CPlusObject); +//end; +// +//procedure TWindow.bool pulse_enabled; +//begin +// BWindow_bool pulse_enabled(CPlusObject); +//end; +// +//procedure TWindow.bool fViewsNeedPulse; +//begin +// BWindow_bool fViewsNeedPulse(CPlusObject); +//end; +// +//procedure TWindow.bool fIsFilePanel; +//begin +// BWindow_bool fIsFilePanel(CPlusObject); +//end; +// +//procedure TWindow.bool fUnused1; +//begin +// BWindow_bool fUnused1(CPlusObject); +//end; +// +//procedure TWindow.bigtime_t pulse_rate; +//begin +// BWindow_bigtime_t pulse_rate(CPlusObject); +//end; +// +//procedure TWindow.bool fWaitingForMenu; +//begin +// BWindow_bool fWaitingForMenu(CPlusObject); +//end; +// +//procedure TWindow.bool fOffscreen; +//begin +// BWindow_bool fOffscreen(CPlusObject); +//end; +// +//procedure TWindow.sem_id fMenuSem; +//begin +// BWindow_sem_id fMenuSem(CPlusObject); +//end; +// +//procedure TWindow.float fMaxZoomH; +//begin +// BWindow_float fMaxZoomH(CPlusObject); +//end; +// +//procedure TWindow.float fMaxZoomV; +//begin +// BWindow_float fMaxZoomV(CPlusObject); +//end; +// +//procedure TWindow.float fMinWindH; +//begin +// BWindow_float fMinWindH(CPlusObject); +//end; +// +//procedure TWindow.float fMinWindV; +//begin +// BWindow_float fMinWindV(CPlusObject); +//end; +// +//procedure TWindow.float fMaxWindH; +//begin +// BWindow_float fMaxWindH(CPlusObject); +//end; +// +//procedure TWindow.float fMaxWindV; +//begin +// BWindow_float fMaxWindV(CPlusObject); +//end; +// +//procedure TWindow.BRect fFrame; +//begin +// BWindow_BRect fFrame(CPlusObject); +//end; +// +//procedure TWindow.window_look fLook; +//begin +// BWindow_window_look fLook(CPlusObject); +//end; +// +//procedure TWindow._view_attr_ *fCurDrawViewState; +//begin +// BWindow__view_attr_ *fCurDrawViewState(CPlusObject); +//end; +// +//procedure TWindow.window_feel fFeel; +//begin +// BWindow_window_feel fFeel(CPlusObject); +//end; +// +//procedure TWindow.int32 fLastViewToken; +//begin +// BWindow_int32 fLastViewToken(CPlusObject); +//end; +// +//procedure TWindow._CEventPort_ *fEventPort; +//begin +// BWindow__CEventPort_ *fEventPort(CPlusObject); +//end; +// +//procedure TWindow.BMessageRunner *fPulseRunner; +//begin +// BWindow_BMessageRunner *fPulseRunner(CPlusObject); +//end; +// +//procedure TWindow.BRect fCurrentFrame; +//begin +// BWindow_BRect fCurrentFrame(CPlusObject); +//end; +// +//{procedure TWindow.uint32 _reserved[2]; +//begin +// BWindow_uint32 _reserved[2](CPlusObject); +//end; +// +//procedure TWindow.uint32 _more_reserved[4]; +//begin +// BWindow_uint32 _more_reserved[4](CPlusObject); +//end;} + + initialization -end. \ No newline at end of file +end. diff --git a/bepascal/bepascal/be/kernel/os.pp b/bepascal/bepascal/be/kernel/os.pp index 09684e9..15a8590 100644 --- a/bepascal/bepascal/be/kernel/os.pp +++ b/bepascal/bepascal/be/kernel/os.pp @@ -20,6 +20,9 @@ unit os; interface +uses + SupportDefs; + const B_LOW_LATENCY = 5; B_LOW_PRIORITY = 5; @@ -42,6 +45,48 @@ type TThread_id = Longint; TTeam_id = Longint; +const + B_NO_LOCK = 0; + B_LAZY_LOCK = 1; + B_FULL_LOCK = 2; + B_CONTIGUOUS = 3; + B_LOMEM = 4; + + B_ANY_ADDRESS = 0; + B_EXACT_ADDRESS = 1; + B_BASE_ADDRESS = 2; + B_CLONE_ADDRESS = 3; + B_ANY_KERNEL_ADDRESS = 4; + + B_READ_AREA = 1; + B_WRITE_AREA = 2; + +// area +type + TArea_Info = record + area : TArea_id; + name : array [0..B_OS_NAME_LENGTH] of char; + size : TSize_t; + lock : Cardinal; + protection : Cardinal; + team : TTeam_id; + ram_size : Cardinal; + copy_count : Cardinal; + in_count : Cardinal; + out_count : Cardinal; + address : Pointer; + end; + +// Semaphores +type + TSem_Info = record + sem : TSem_id; + team : TTeam_id; + name : array [0..B_OS_NAME_LENGTH] of char; + count : integer; + latest_holder : TThread_id; + end; + implementation end. \ No newline at end of file diff --git a/bepascal/bepascal/bepascal/bepascal.proj b/bepascal/bepascal/bepascal/bepascal.proj index d7d8aea4c4da3bdeb550a863d19199c9beb5f2c4..fbc7588b6a2c58931a0fae86d2152c968a80f7e9 100644 GIT binary patch delta 1106 zcmdl}f24(x!`IWrm4U&@W+TT7P8JPk>4wP{1ROV;a{W|c<~gCX*-*coX|k^!*W^Qn z+8}|+hWerkp6PBm3=9mx|DgcL27?9$21XELa)O1NtqfQQ$oEUkO$D-ffS4mGH9sj! zFN47?Gsh6f4+Y|_K+FQfV9)?0ZGW|X1e#zxIl@Skk$ZBUkqNrRk@zfjRsx%ZuviGl z=SwUo$jMAjEXmBzLs%cpz`)%JlwASV0VEoL*iNSLGspvze;7G2|7!g*`GbwxU&CbmFt{(#%1iKom2s*eOQ zW`i}}wvdAbSP;Gdo2+7?EExiH!*8GkQ-Bx@8i1soL<}d?DACD2mYgu-$O!-P%)FHR zazuOs!(U=K&B!Jq+1+R5>jg6+EjOj;`}y$!1A6}jzBg$ zJOEBuX#n{gV7{bv9FWZkm1{*Y!^H+<1{YY)(@J#m44Y6OpBu?)C|$d bLUsix@(b-i^1NXA2X;w7HXoRsZ662#Mg27j delta 668 zcmX@o!nmiN!`IWrm4U&2%SMhDoGd3qr5h$+5OCaV%Jox)`OQ6@&4&8zOpJ_^cN&_2 zxRVX_MJL-kuuo1m5@Vj4cxv)OYq`k*R-%(P8;LS{Qzt7HM3=& zwp4W$s5eY7}+KtH%IZ9j~tq1