Checkin for Adrian Oanca
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3069 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
+180
-165
@@ -20,7 +20,7 @@
|
|||||||
// DEALINGS IN THE SOFTWARE.
|
// DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
// File Name: Window.h
|
// File Name: Window.h
|
||||||
// Author: Erik Jaesler (erik@cgsoftware.com)
|
// Author: Adrian Oanca (e2joseph@hotpop.com)
|
||||||
// Description: BWindow is the base class for all windows (graphic areas
|
// Description: BWindow is the base class for all windows (graphic areas
|
||||||
// displayed on-screen).
|
// displayed on-screen).
|
||||||
//
|
//
|
||||||
@@ -48,6 +48,8 @@
|
|||||||
// Project Includes ------------------------------------------------------------
|
// Project Includes ------------------------------------------------------------
|
||||||
|
|
||||||
// Local Includes --------------------------------------------------------------
|
// Local Includes --------------------------------------------------------------
|
||||||
|
//#include <PortLink.h>
|
||||||
|
class PortLink; // tweak for compatibility with our build system --DW
|
||||||
|
|
||||||
// Local Defines ---------------------------------------------------------------
|
// Local Defines ---------------------------------------------------------------
|
||||||
|
|
||||||
@@ -137,142 +139,142 @@ struct _view_attr_;
|
|||||||
class BWindow : public BLooper {
|
class BWindow : public BLooper {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
BWindow(BRect frame, //done
|
BWindow(BRect frame,
|
||||||
const char* title,
|
const char* title,
|
||||||
window_type type,
|
window_type type,
|
||||||
uint32 flags,
|
uint32 flags,
|
||||||
uint32 workspace = B_CURRENT_WORKSPACE);
|
uint32 workspace = B_CURRENT_WORKSPACE);
|
||||||
BWindow(BRect frame, //done, but must be maintained - call InitData(...)
|
BWindow(BRect frame,
|
||||||
const char* title,
|
const char* title,
|
||||||
window_look look,
|
window_look look,
|
||||||
window_feel feel,
|
window_feel feel,
|
||||||
uint32 flags,
|
uint32 flags,
|
||||||
uint32 workspace = B_CURRENT_WORKSPACE);
|
uint32 workspace = B_CURRENT_WORKSPACE);
|
||||||
virtual ~BWindow(); //done
|
virtual ~BWindow();
|
||||||
|
|
||||||
BWindow(BMessage* data); //done
|
BWindow(BMessage* data);
|
||||||
static BArchivable *Instantiate(BMessage* data); //done
|
static BArchivable *Instantiate(BMessage* data);
|
||||||
virtual status_t Archive(BMessage* data, bool deep = true) const; //done
|
virtual status_t Archive(BMessage* data, bool deep = true) const;
|
||||||
|
|
||||||
virtual void Quit(); //done
|
virtual void Quit();
|
||||||
void Close(); // Synonym of Quit()
|
void Close(); // Synonym of Quit()
|
||||||
|
|
||||||
void AddChild(BView* child, BView* before = NULL); //done
|
void AddChild(BView* child, BView* before = NULL);
|
||||||
bool RemoveChild(BView* child); //done
|
bool RemoveChild(BView* child);
|
||||||
int32 CountChildren() const; //done
|
int32 CountChildren() const;
|
||||||
BView *ChildAt(int32 index) const; //done
|
BView *ChildAt(int32 index) const;
|
||||||
|
|
||||||
virtual void DispatchMessage(BMessage* message, BHandler* handler); //done
|
virtual void DispatchMessage(BMessage* message, BHandler* handler);
|
||||||
virtual void MessageReceived(BMessage* message); //done
|
virtual void MessageReceived(BMessage* message);
|
||||||
virtual void FrameMoved(BPoint new_position); //done
|
virtual void FrameMoved(BPoint new_position);
|
||||||
virtual void WorkspacesChanged(uint32 old_ws, uint32 new_ws); //done
|
virtual void WorkspacesChanged(uint32 old_ws, uint32 new_ws);
|
||||||
virtual void WorkspaceActivated(int32 ws, bool state); //done
|
virtual void WorkspaceActivated(int32 ws, bool state);
|
||||||
virtual void FrameResized(float new_width, float new_height); //done
|
virtual void FrameResized(float new_width, float new_height);
|
||||||
virtual void Minimize(bool minimize); //done
|
virtual void Minimize(bool minimize);
|
||||||
virtual void Zoom( BPoint rec_position, //done
|
virtual void Zoom( BPoint rec_position,
|
||||||
float rec_width,
|
float rec_width,
|
||||||
float rec_height);
|
float rec_height);
|
||||||
void Zoom(); //done
|
void Zoom();
|
||||||
void SetZoomLimits(float maxWidth, float maxHeight); //done // changed from: SetZoomLimits(float max_h, float max_v);
|
void SetZoomLimits(float maxWidth, float maxHeight); // changed from: SetZoomLimits(float max_h, float max_v);
|
||||||
virtual void ScreenChanged(BRect screen_size, color_space depth); //done
|
virtual void ScreenChanged(BRect screen_size, color_space depth);
|
||||||
void SetPulseRate(bigtime_t rate); //done
|
void SetPulseRate(bigtime_t rate);
|
||||||
bigtime_t PulseRate() const; //done
|
bigtime_t PulseRate() const;
|
||||||
void AddShortcut( uint32 key, //done
|
void AddShortcut( uint32 key,
|
||||||
uint32 modifiers,
|
uint32 modifiers,
|
||||||
BMessage* msg);
|
BMessage* msg);
|
||||||
void AddShortcut( uint32 key, //done
|
void AddShortcut( uint32 key,
|
||||||
uint32 modifiers,
|
uint32 modifiers,
|
||||||
BMessage* msg,
|
BMessage* msg,
|
||||||
BHandler* target);
|
BHandler* target);
|
||||||
void RemoveShortcut(uint32 key, uint32 modifiers); //done
|
void RemoveShortcut(uint32 key, uint32 modifiers);
|
||||||
void SetDefaultButton(BButton* button); //done
|
void SetDefaultButton(BButton* button);
|
||||||
BButton *DefaultButton() const; //done
|
BButton *DefaultButton() const;
|
||||||
virtual void MenusBeginning(); //done
|
virtual void MenusBeginning();
|
||||||
virtual void MenusEnded(); //done
|
virtual void MenusEnded();
|
||||||
bool NeedsUpdate() const; //done
|
bool NeedsUpdate() const;
|
||||||
void UpdateIfNeeded(); //done
|
void UpdateIfNeeded();
|
||||||
BView *FindView(const char* viewName) const; //done // changed from: FindView( const char* view_name );
|
BView *FindView(const char* viewName) const; // changed from: FindView( const char* view_name );
|
||||||
BView *FindView(BPoint) const; //done
|
BView *FindView(BPoint) const;
|
||||||
BView *CurrentFocus() const; //done
|
BView *CurrentFocus() const;
|
||||||
void Activate(bool = true); //done
|
void Activate(bool = true);
|
||||||
virtual void WindowActivated(bool state); //done
|
virtual void WindowActivated(bool state);
|
||||||
void ConvertToScreen(BPoint* pt) const; //done
|
void ConvertToScreen(BPoint* pt) const;
|
||||||
BPoint ConvertToScreen(BPoint pt) const; //done
|
BPoint ConvertToScreen(BPoint pt) const;
|
||||||
void ConvertFromScreen(BPoint* pt) const; //done
|
void ConvertFromScreen(BPoint* pt) const;
|
||||||
BPoint ConvertFromScreen(BPoint pt) const; //done
|
BPoint ConvertFromScreen(BPoint pt) const;
|
||||||
void ConvertToScreen(BRect* rect) const; //done
|
void ConvertToScreen(BRect* rect) const;
|
||||||
BRect ConvertToScreen(BRect rect) const; //done
|
BRect ConvertToScreen(BRect rect) const;
|
||||||
void ConvertFromScreen(BRect* rect) const; //done
|
void ConvertFromScreen(BRect* rect) const;
|
||||||
BRect ConvertFromScreen(BRect rect) const; //done
|
BRect ConvertFromScreen(BRect rect) const;
|
||||||
void MoveBy(float dx, float dy); //done
|
void MoveBy(float dx, float dy);
|
||||||
void MoveTo(BPoint); //done
|
void MoveTo(BPoint);
|
||||||
void MoveTo(float x, float y); //done
|
void MoveTo(float x, float y);
|
||||||
void ResizeBy(float dx, float dy); //done
|
void ResizeBy(float dx, float dy);
|
||||||
void ResizeTo(float width, float height); //done
|
void ResizeTo(float width, float height);
|
||||||
virtual void Show(); //done
|
virtual void Show();
|
||||||
virtual void Hide(); //done
|
virtual void Hide();
|
||||||
bool IsHidden() const; //done
|
bool IsHidden() const;
|
||||||
bool IsMinimized() const; //done
|
bool IsMinimized() const;
|
||||||
|
|
||||||
void Flush() const; //done
|
void Flush() const;
|
||||||
void Sync() const; //done
|
void Sync() const;
|
||||||
|
|
||||||
status_t SendBehind(const BWindow* window); //done
|
status_t SendBehind(const BWindow* window);
|
||||||
|
|
||||||
void DisableUpdates(); //done
|
void DisableUpdates();
|
||||||
void EnableUpdates(); //done
|
void EnableUpdates();
|
||||||
|
|
||||||
void BeginViewTransaction(); //done // referred as OpenViewTransaction() in BeBook
|
void BeginViewTransaction(); // referred as OpenViewTransaction() in BeBook
|
||||||
void EndViewTransaction(); //done // referred as CommitViewTransaction() in BeBook
|
void EndViewTransaction(); // referred as CommitViewTransaction() in BeBook
|
||||||
|
|
||||||
BRect Bounds() const; //done
|
BRect Bounds() const;
|
||||||
BRect Frame() const; //done
|
BRect Frame() const;
|
||||||
const char *Title() const; //done
|
const char *Title() const;
|
||||||
void SetTitle(const char* title); //done
|
void SetTitle(const char* title);
|
||||||
bool IsFront() const; //done
|
bool IsFront() const;
|
||||||
bool IsActive() const; //done
|
bool IsActive() const;
|
||||||
void SetKeyMenuBar(BMenuBar* bar); //done
|
void SetKeyMenuBar(BMenuBar* bar);
|
||||||
BMenuBar *KeyMenuBar() const; //done
|
BMenuBar *KeyMenuBar() const;
|
||||||
void SetSizeLimits( float minWidth, //done // changed from: SetSizeLimits(float min_h, float max_h, float min_v, float max_v);
|
void SetSizeLimits( float minWidth, // changed from: SetSizeLimits(float min_h, float max_h, float min_v, float max_v);
|
||||||
float maxWidth,
|
float maxWidth,
|
||||||
float minHeight,
|
float minHeight,
|
||||||
float maxHeight);
|
float maxHeight);
|
||||||
void GetSizeLimits( float *minWidth, //done // changed from: SetSizeLimits(float* min_h, float* max_h, float* min_v, float* max_v);
|
void GetSizeLimits( float *minWidth, // changed from: SetSizeLimits(float* min_h, float* max_h, float* min_v, float* max_v);
|
||||||
float *maxWidth,
|
float *maxWidth,
|
||||||
float *minHeight,
|
float *minHeight,
|
||||||
float *maxHeight);
|
float *maxHeight);
|
||||||
uint32 Workspaces() const; //done
|
uint32 Workspaces() const;
|
||||||
void SetWorkspaces(uint32); //done
|
void SetWorkspaces(uint32);
|
||||||
BView *LastMouseMovedView() const; //done
|
BView *LastMouseMovedView() const;
|
||||||
|
|
||||||
virtual BHandler *ResolveSpecifier(BMessage* msg, //done
|
virtual BHandler *ResolveSpecifier(BMessage* msg,
|
||||||
int32 index,
|
int32 index,
|
||||||
BMessage* specifier,
|
BMessage* specifier,
|
||||||
int32 form,
|
int32 form,
|
||||||
const char* property);
|
const char* property);
|
||||||
virtual status_t GetSupportedSuites(BMessage* data); //done
|
virtual status_t GetSupportedSuites(BMessage* data);
|
||||||
|
|
||||||
status_t AddToSubset(BWindow* window); //done
|
status_t AddToSubset(BWindow* window);
|
||||||
status_t RemoveFromSubset(BWindow* window); //done
|
status_t RemoveFromSubset(BWindow* window);
|
||||||
|
|
||||||
virtual status_t Perform(perform_code d, void* arg); //done
|
virtual status_t Perform(perform_code d, void* arg);
|
||||||
|
|
||||||
status_t SetType(window_type type); //done
|
status_t SetType(window_type type);
|
||||||
window_type Type() const; //done
|
window_type Type() const;
|
||||||
|
|
||||||
status_t SetLook(window_look look); //done
|
status_t SetLook(window_look look);
|
||||||
window_look Look() const; //done
|
window_look Look() const;
|
||||||
|
|
||||||
status_t SetFeel(window_feel feel); //done
|
status_t SetFeel(window_feel feel);
|
||||||
window_feel Feel() const; //done
|
window_feel Feel() const;
|
||||||
|
|
||||||
status_t SetFlags(uint32); //done
|
status_t SetFlags(uint32);
|
||||||
uint32 Flags() const; //done
|
uint32 Flags() const;
|
||||||
|
|
||||||
bool IsModal() const; //done
|
bool IsModal() const;
|
||||||
bool IsFloating() const; //done
|
bool IsFloating() const;
|
||||||
|
|
||||||
status_t SetWindowAlignment(window_alignment mode, //done
|
status_t SetWindowAlignment(window_alignment mode,
|
||||||
int32 h,
|
int32 h,
|
||||||
int32 hOffset = 0,
|
int32 hOffset = 0,
|
||||||
int32 width = 0,
|
int32 width = 0,
|
||||||
@@ -281,7 +283,7 @@ virtual status_t Perform(perform_code d, void* arg); //done
|
|||||||
int32 vOffset = 0,
|
int32 vOffset = 0,
|
||||||
int32 height = 0,
|
int32 height = 0,
|
||||||
int32 heightOffset = 0);
|
int32 heightOffset = 0);
|
||||||
status_t GetWindowAlignment(window_alignment* mode = NULL, //done
|
status_t GetWindowAlignment(window_alignment* mode = NULL,
|
||||||
int32* h = NULL,
|
int32* h = NULL,
|
||||||
int32* hOffset = NULL,
|
int32* hOffset = NULL,
|
||||||
int32* width = NULL,
|
int32* width = NULL,
|
||||||
@@ -291,8 +293,8 @@ virtual status_t Perform(perform_code d, void* arg); //done
|
|||||||
int32* height = NULL,
|
int32* height = NULL,
|
||||||
int32* heightOffset = NULL) const;
|
int32* heightOffset = NULL) const;
|
||||||
|
|
||||||
virtual bool QuitRequested(); //done
|
virtual bool QuitRequested();
|
||||||
virtual thread_id Run(); //done
|
virtual thread_id Run();
|
||||||
|
|
||||||
// Private or reserved ---------------------------------------------------------
|
// Private or reserved ---------------------------------------------------------
|
||||||
private:
|
private:
|
||||||
@@ -308,7 +310,7 @@ friend class BWindowScreen;
|
|||||||
friend class BDirectWindow;
|
friend class BDirectWindow;
|
||||||
friend class BFilePanel;
|
friend class BFilePanel;
|
||||||
friend class BHandler;
|
friend class BHandler;
|
||||||
friend class _BEventMask_;
|
friend class _BEventMask;
|
||||||
friend void _set_menu_sem_(BWindow* w, sem_id sem);
|
friend void _set_menu_sem_(BWindow* w, sem_id sem);
|
||||||
friend status_t _safe_get_server_token_(const BLooper* , int32* );
|
friend status_t _safe_get_server_token_(const BLooper* , int32* );
|
||||||
|
|
||||||
@@ -325,8 +327,8 @@ virtual void _ReservedWindow8();
|
|||||||
BWindow(BWindow&);
|
BWindow(BWindow&);
|
||||||
BWindow &operator=(BWindow&);
|
BWindow &operator=(BWindow&);
|
||||||
|
|
||||||
BWindow(BRect frame, color_space depth, // I'm realllly curious in the things that this funtion does
|
BWindow(BRect frame, color_space depth, // to be implemented
|
||||||
uint32 bitmapFlags, int32 rowBytes); // I think it's called from every constructor and sends its server counterpart (ServerWindow) the message for creating a surface(BBitmap) with certain parameters.
|
uint32 bitmapFlags, int32 rowBytes);
|
||||||
void InitData(BRect frame,
|
void InitData(BRect frame,
|
||||||
const char* title,
|
const char* title,
|
||||||
window_look look,
|
window_look look,
|
||||||
@@ -335,9 +337,9 @@ virtual void _ReservedWindow8();
|
|||||||
uint32 workspace);
|
uint32 workspace);
|
||||||
status_t ArchiveChildren(BMessage* data, bool deep) const; // call made from within Archive
|
status_t ArchiveChildren(BMessage* data, bool deep) const; // call made from within Archive
|
||||||
status_t UnarchiveChildren(BMessage* data); // Instantiate(BMessage* data)->BWindow(BMessage)->UnarchiveChildren(BMessage* data)
|
status_t UnarchiveChildren(BMessage* data); // Instantiate(BMessage* data)->BWindow(BMessage)->UnarchiveChildren(BMessage* data)
|
||||||
void BitmapClose();
|
void BitmapClose(); // to be implemented
|
||||||
virtual void task_looper(); // thread function - it's here where app_server messages are received and converted to BMessages
|
virtual void task_looper(); // thread function - it's here where app_server messages are received
|
||||||
void start_drag( BMessage* msg,
|
/* void start_drag( BMessage* msg,
|
||||||
int32 token,
|
int32 token,
|
||||||
BPoint offset,
|
BPoint offset,
|
||||||
BRect track_rect,
|
BRect track_rect,
|
||||||
@@ -348,43 +350,42 @@ virtual void task_looper(); // thread function - it's here where app_serv
|
|||||||
int32 bitmap_token,
|
int32 bitmap_token,
|
||||||
drawing_mode dragMode,
|
drawing_mode dragMode,
|
||||||
BHandler* reply_to);
|
BHandler* reply_to);
|
||||||
void view_builder(BView* a_view); // It passes needed parameters to a BView allready created.
|
*/
|
||||||
void attach_builder(BView* a_view); // Attaches the view
|
void prepareView(BView* aView); // changed from view_builder(BView* a_view);
|
||||||
void detach_builder(BView* a_view); // Detaches the view
|
void attachView(BView* aView); // changed from attach_builder(BView* a_view);
|
||||||
int32 get_server_token() const;
|
void detachView(BView* aView); // changed from detach_builder(BView* a_view);
|
||||||
|
//int32 get_server_token() const;
|
||||||
BMessage *extract_drop(BMessage* an_event, BHandler* *target);
|
BMessage *extract_drop(BMessage* an_event, BHandler* *target);
|
||||||
void movesize(uint32 opcode, float h, float v);
|
//void movesize(uint32 opcode, float h, float v);
|
||||||
|
|
||||||
BMessage* ReadMessageFromPort(bigtime_t tout = B_INFINITE_TIMEOUT); // reads a message from receive_port and passes it along with the message body to CreateMessage(void*, int32) function
|
BMessage* ReadMessageFromPort(bigtime_t tout = B_INFINITE_TIMEOUT);
|
||||||
int32 MessagesWaiting(); // (?)# of messages waiting in the port queue
|
//int32 MessagesWaiting();
|
||||||
|
|
||||||
void handle_activate(BMessage* an_event);
|
void handle_activate(BMessage* an_event);
|
||||||
void do_view_frame(BMessage* an_event);
|
//void do_view_frame(BMessage* an_event);
|
||||||
void do_value_change(BMessage* an_event, BHandler* handler);
|
//void do_value_change(BMessage* an_event, BHandler* handler);
|
||||||
void do_mouse_down(BMessage* an_event, BView* target);
|
//void do_mouse_down(BMessage* an_event, BView* target);
|
||||||
void do_mouse_moved(BMessage* an_event, BView* target);
|
//void do_mouse_moved(BMessage* an_event, BView* target);
|
||||||
void do_key_down(BMessage* an_event, BHandler* handler);
|
//void do_key_down(BMessage* an_event, BHandler* handler);
|
||||||
void do_key_up(BMessage* an_event, BHandler* handler);
|
//void do_key_up(BMessage* an_event, BHandler* handler);
|
||||||
void do_menu_event(BMessage* an_event);
|
void do_menu_event(BMessage* an_event);
|
||||||
void do_draw_views();
|
//void do_draw_views();
|
||||||
virtual BMessage *ConvertToMessage(void* raw, int32 code); // HUGE function - it convers PortLink messages into BMessage messages
|
virtual BMessage *ConvertToMessage(void* raw, int32 code); // HUGE function - it converts PortLink messages into BMessages
|
||||||
_cmd_key_ *allocShortcut(uint32 key, uint32 modifiers);
|
//_cmd_key_ *allocShortcut(uint32 key, uint32 modifiers);
|
||||||
_cmd_key_ *FindShortcut(uint32 key, uint32 modifiers);
|
//_cmd_key_ *FindShortcut(uint32 key, uint32 modifiers);
|
||||||
void AddShortcut(uint32 key, // !!! - and menu shortcuts to list when a menu is added
|
void AddShortcut(uint32 key, // !!! - and menu shortcuts to list when a menu is added
|
||||||
uint32 modifiers,
|
uint32 modifiers,
|
||||||
BMenuItem* item);
|
BMenuItem* item);
|
||||||
void post_message(BMessage* message);
|
//void post_message(BMessage* message);
|
||||||
void SetLocalTitle(const char* new_title);
|
//void SetLocalTitle(const char* new_title);
|
||||||
void enable_pulsing(bool enable);
|
//void enable_pulsing(bool enable);
|
||||||
BHandler *determine_target(BMessage* msg, BHandler* target, bool pref);
|
BHandler *determine_target(BMessage* msg, BHandler* target, bool pref);
|
||||||
void kb_navigate();
|
//void kb_navigate();
|
||||||
void navigate_to_next(int32 direction, bool group = false);
|
//void navigate_to_next(int32 direction, bool group = false);
|
||||||
void set_focus(BView* focus, bool notify_input_server); // what does notify_input_server mean??? why???
|
//void set_focus(BView* focus, bool notify_input_server); // what does notify_input_server mean??? why???
|
||||||
bool InUpdate();
|
bool InUpdate();
|
||||||
void DequeueAll();
|
void DequeueAll();
|
||||||
bool find_token_and_handler(BMessage* msg,
|
//bool find_token_and_handler(BMessage* msg, int32* token, BHandler* *handler);
|
||||||
int32* token,
|
|
||||||
BHandler* *handler);
|
|
||||||
window_type composeType(window_look look, // changed from: compose_type(...)
|
window_type composeType(window_look look, // changed from: compose_type(...)
|
||||||
window_feel feel) const;
|
window_feel feel) const;
|
||||||
void decomposeType(window_type type, // changed from: decompose_type(...)
|
void decomposeType(window_type type, // changed from: decompose_type(...)
|
||||||
@@ -399,70 +400,84 @@ virtual BMessage *ConvertToMessage(void* raw, int32 code); // HUGE function
|
|||||||
BView* buildTopView();
|
BView* buildTopView();
|
||||||
void attachTopView();
|
void attachTopView();
|
||||||
void detachTopView();
|
void detachTopView();
|
||||||
void setFocus(BView *focusView, bool notifyIputServer);
|
void stopConnection();
|
||||||
|
void setFocus(BView *focusView, bool notifyIputServer=false);
|
||||||
|
|
||||||
bool handleBWindowKeys( BString, uint32);
|
bool handleKeyDown( uint32 key, uint32 modifiers);
|
||||||
|
|
||||||
// message: B_MOUSE_UP, B_MOUSE_DOWN, B_MOUSE_MOVED
|
// message: B_MOUSE_UP, B_MOUSE_DOWN, B_MOUSE_MOVED
|
||||||
void sendMessageUsingEventMask( int32 message, BPoint where );
|
void sendMessageUsingEventMask( int32 message, BPoint where );
|
||||||
void sendWillingBViewsPulseMsg( BView* );
|
BView* sendMessageUsingEventMask2( BView* aView, int32 message, BPoint where );
|
||||||
int32 findShortcut(int32 key, int32 modifiers);
|
void sendPulse( BView* );
|
||||||
|
int32 findShortcut(uint32 key, int32 modifiers);
|
||||||
bool findHandler( BView* start, BHandler* handler );
|
bool findHandler( BView* start, BHandler* handler );
|
||||||
BView* findView(BView* aView, const char* viewName) const;
|
BView* findView(BView* aView, const char* viewName) const;
|
||||||
BView* findView(BView* aView, BPoint point) const;
|
BView* findView(BView* aView, BPoint point) const;
|
||||||
BView* findView(BView* aView, int32 token);
|
BView* findView(BView* aView, int32 token);
|
||||||
|
|
||||||
|
BView* findNextView( BView *focus, uint32 flags);
|
||||||
|
BView* findPrevView( BView *focus, uint32 flags);
|
||||||
|
BView* findLastChild(BView *parent);
|
||||||
|
bool handleKeyDown( int32 raw_char, uint32 modifiers);
|
||||||
|
void handleActivation( bool active );
|
||||||
|
void activateView( BView *aView, bool active );
|
||||||
|
|
||||||
void drawAllViews(BView* aView);
|
void drawAllViews(BView* aView);
|
||||||
|
void drawView(BView* aView, BRect area);
|
||||||
|
|
||||||
|
uint8* ReadRawFromPort(int32* code,
|
||||||
|
bigtime_t tout = B_INFINITE_TIMEOUT);
|
||||||
|
|
||||||
// END: OBOS addon functions
|
// END: OBOS addon functions
|
||||||
|
|
||||||
// 3 deprecated calls
|
// 3 deprecated calls
|
||||||
void AddFloater(BWindow* a_floating_window);
|
//void AddFloater(BWindow* a_floating_window);
|
||||||
void RemoveFloater(BWindow* a_floating_window);
|
//void RemoveFloater(BWindow* a_floating_window);
|
||||||
window_type WindowType() const;
|
//window_type WindowType() const;
|
||||||
|
|
||||||
char *fTitle; // set
|
char *fTitle; // used
|
||||||
int32 server_token;
|
int32 server_token;
|
||||||
bool fInTransaction; // set // changed from: char fInUpdate;
|
bool fInTransaction; // used // changed from: char fInUpdate;
|
||||||
bool fActive; // changed from: char f_active;
|
bool fActive; // used // changed from: char f_active;
|
||||||
short fShowLevel;
|
short fShowLevel; // used
|
||||||
uint32 fFlags; // set
|
uint32 fFlags; // used
|
||||||
|
|
||||||
port_id send_port; // set
|
port_id send_port; // used
|
||||||
port_id receive_port; // set
|
port_id receive_port; // used
|
||||||
|
|
||||||
BView *top_view;
|
BView *top_view; // used
|
||||||
BView *fFocus;
|
BView *fFocus; // used
|
||||||
BView *fLastMouseMovedView; // set
|
BView *fLastMouseMovedView; // used
|
||||||
PortLink *serverLink;
|
PortLink *serverLink; // used
|
||||||
BMenuBar *fKeyMenuBar; // set
|
BMenuBar *fKeyMenuBar; // used
|
||||||
BButton *fDefaultButton; // set
|
BButton *fDefaultButton; // used
|
||||||
BList accelList; // set
|
BList accelList; // used
|
||||||
int32 fTopViewToken; // // changed from: int32 top_view_token;
|
int32 fTopViewToken; // // changed from: int32 top_view_token;
|
||||||
bool fPulseEnabled; // // changed from: bool pulse_enabled;
|
bool fPulseEnabled; // used // changed from: bool pulse_enabled;
|
||||||
bool fViewsNeedPulse;
|
bool fViewsNeedPulse;
|
||||||
bool fIsFilePanel;
|
bool fIsFilePanel; // used
|
||||||
bool fUnused1;
|
bool fMaskActivated;
|
||||||
bigtime_t fPulseRate; // // changed from: bigtime_t pulse_rate;
|
bigtime_t fPulseRate; // used // changed from: bigtime_t pulse_rate;
|
||||||
bool fWaitingForMenu;
|
bool fWaitingForMenu;
|
||||||
bool fMinimized; // // changed from: bool fOffscreen;
|
bool fMinimized; // used // changed from: bool fOffscreen;
|
||||||
sem_id fMenuSem;
|
sem_id fMenuSem;
|
||||||
float fMaxZoomHeight; // set // changed from: float fMaxZoomH;
|
float fMaxZoomHeight; // used // changed from: float fMaxZoomH;
|
||||||
float fMaxZoomWidth; // set // changed from: float fMaxZoomV;
|
float fMaxZoomWidth; // used // changed from: float fMaxZoomV;
|
||||||
float fMinWindHeight; // set // changed from: float fMinWindH;
|
float fMinWindHeight; // used // changed from: float fMinWindH;
|
||||||
float fMinWindWidth; // set // changed from: float fMinWindV;
|
float fMinWindWidth; // used // changed from: float fMinWindV;
|
||||||
float fMaxWindHeight; // set // changed from: float fMaxWindH;
|
float fMaxWindHeight; // used // changed from: float fMaxWindH;
|
||||||
float fMaxWindWidth; // set // changed from: float fMaxWindV;
|
float fMaxWindWidth; // used // changed from: float fMaxWindV;
|
||||||
BRect fFrame; // set
|
BRect fFrame; // used
|
||||||
window_look fLook; // set
|
window_look fLook; // used
|
||||||
_view_attr_ *fCurDrawViewState;
|
_view_attr_ *fCurDrawViewState;
|
||||||
window_feel fFeel; // set
|
window_feel fFeel; // used
|
||||||
int32 fLastViewToken;
|
int32 fLastViewToken;
|
||||||
_BEventMask_* fEventMask; // changed from: _CEventPort_* fEventPort;
|
uint32 fUnused1; // changed from: _CEventPort_* fEventPort;
|
||||||
BMessageRunner *fPulseRunner;
|
BMessageRunner *fPulseRunner; // used
|
||||||
BRect fCurrentFrame;
|
BRect fCurrentFrame;
|
||||||
|
|
||||||
// dedicated for graphic calls
|
// dedicated for graphic calls
|
||||||
PortLink *srvGfxLink; // set
|
PortLink *srvGfxLink; // used
|
||||||
uint32 _reserved;
|
uint32 _reserved;
|
||||||
|
|
||||||
// uint32 _reserved[2]; // was 8
|
// uint32 _reserved[2]; // was 8
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ struct _BCmdKey{
|
|||||||
uint32 modifiers;
|
uint32 modifiers;
|
||||||
BMessage* message;
|
BMessage* message;
|
||||||
BHandler* target;
|
BHandler* target;
|
||||||
|
int32 targetToken;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // _WINDOWAUX_H
|
#endif // _WINDOWAUX_H
|
||||||
|
|||||||
@@ -1,157 +1,165 @@
|
|||||||
#ifndef _APPSERVER_PROTOCOL_
|
#ifndef _APPSERVER_PROTOCOL_
|
||||||
#define _APPSERVER_PROTOCOL_
|
#define _APPSERVER_PROTOCOL_
|
||||||
|
|
||||||
// Server port names. The input port is the port which is used to receive
|
// Server port names. The input port is the port which is used to receive
|
||||||
// input messages from the Input Server. The other is the "main" port for
|
// input messages from the Input Server. The other is the "main" port for
|
||||||
// the server and is utilized mostly by BApplication objects.
|
// the server and is utilized mostly by BApplication objects.
|
||||||
#define SERVER_PORT_NAME "OBappserver"
|
#define SERVER_PORT_NAME "OBappserver"
|
||||||
#define SERVER_INPUT_PORT "OBinputport"
|
#define SERVER_INPUT_PORT "OBinputport"
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
// Used for quick replies from the app_server
|
// Used for quick replies from the app_server
|
||||||
SERVER_TRUE='_srt',
|
SERVER_TRUE='_srt',
|
||||||
SERVER_FALSE,
|
SERVER_FALSE,
|
||||||
|
|
||||||
// Application definitions
|
// Application definitions
|
||||||
AS_CREATE_APP,
|
AS_CREATE_APP,
|
||||||
AS_DELETE_APP,
|
AS_DELETE_APP,
|
||||||
AS_QUIT_APP,
|
AS_QUIT_APP,
|
||||||
|
|
||||||
AS_SET_SERVER_PORT,
|
AS_SET_SERVER_PORT,
|
||||||
|
|
||||||
AS_CREATE_WINDOW,
|
AS_CREATE_WINDOW,
|
||||||
AS_DELETE_WINDOW,
|
AS_DELETE_WINDOW,
|
||||||
AS_CREATE_BITMAP,
|
AS_CREATE_BITMAP,
|
||||||
AS_DELETE_BITMAP,
|
AS_DELETE_BITMAP,
|
||||||
|
|
||||||
AS_SET_CURSOR_DATA,
|
AS_SET_CURSOR_DATA,
|
||||||
AS_SET_CURSOR_BCURSOR,
|
AS_SET_CURSOR_BCURSOR,
|
||||||
AS_SET_CURSOR_BBITMAP,
|
AS_SET_CURSOR_BBITMAP,
|
||||||
AS_SHOW_CURSOR,
|
AS_SHOW_CURSOR,
|
||||||
AS_HIDE_CURSOR,
|
AS_HIDE_CURSOR,
|
||||||
AS_OBSCURE_CURSOR,
|
AS_OBSCURE_CURSOR,
|
||||||
AS_QUERY_CURSOR_HIDDEN,
|
AS_QUERY_CURSOR_HIDDEN,
|
||||||
|
|
||||||
AS_BEGIN_RECT_TRACKING,
|
AS_BEGIN_RECT_TRACKING,
|
||||||
AS_END_RECT_TRACKING,
|
AS_END_RECT_TRACKING,
|
||||||
|
|
||||||
// Window definitions
|
// Window definitions
|
||||||
AS_SHOW_WINDOW,
|
AS_SHOW_WINDOW,
|
||||||
AS_HIDE_WINDOW,
|
AS_HIDE_WINDOW,
|
||||||
AS_QUIT_WINDOW,
|
AS_QUIT_WINDOW,
|
||||||
AS_SEND_BEHIND,
|
AS_SEND_BEHIND,
|
||||||
AS_SET_LOOK,
|
AS_SET_LOOK,
|
||||||
AS_SET_FEEL,
|
AS_SET_FEEL,
|
||||||
AS_SET_FLAGS,
|
AS_SET_FLAGS,
|
||||||
AS_DISABLE_UPDATES,
|
AS_DISABLE_UPDATES,
|
||||||
AS_ENABLE_UPDATES,
|
AS_ENABLE_UPDATES,
|
||||||
AS_BEGIN_UPDATE,
|
AS_BEGIN_UPDATE,
|
||||||
AS_END_UPDATE,
|
AS_END_UPDATE,
|
||||||
AS_NEEDS_UPDATE,
|
AS_NEEDS_UPDATE,
|
||||||
AS_WINDOW_TITLE,
|
AS_WINDOW_TITLE,
|
||||||
AS_ADD_TO_SUBSET,
|
AS_ADD_TO_SUBSET,
|
||||||
AS_REM_FROM_SUBSET,
|
AS_REM_FROM_SUBSET,
|
||||||
AS_SET_ALIGNMENT,
|
AS_SET_ALIGNMENT,
|
||||||
AS_GET_ALIGNMENT,
|
AS_GET_ALIGNMENT,
|
||||||
AS_GET_WORKSPACES,
|
AS_GET_WORKSPACES,
|
||||||
AS_SET_WORKSPACES,
|
AS_SET_WORKSPACES,
|
||||||
AS_WINDOW_RESIZEBY,
|
AS_WINDOW_RESIZE,
|
||||||
AS_WINDOW_RESIZETO,
|
AS_WINDOW_MOVE,
|
||||||
|
AS_SET_SIZE_LIMITS,
|
||||||
// BPicture definitions
|
AS_ACTIVATE_WINDOW,
|
||||||
AS_CREATE_PICTURE,
|
AS_WINDOW_MINIMIZE,
|
||||||
AS_DELETE_PICTURE,
|
AS_UPDATE_IF_NEEDED,
|
||||||
AS_CLONE_PICTURE,
|
_ALL_UPDATED_, // this should be moved in place of _UPDATE_IF_NEEDED_ in AppDefs.h
|
||||||
AS_DOWNLOAD_PICTURE,
|
|
||||||
|
|
||||||
// Font-related server communications
|
// BPicture definitions
|
||||||
AS_QUERY_FONTS_CHANGED,
|
AS_CREATE_PICTURE,
|
||||||
AS_UPDATED_CLIENT_FONTLIST,
|
AS_DELETE_PICTURE,
|
||||||
AS_GET_FAMILY_ID,
|
AS_CLONE_PICTURE,
|
||||||
AS_GET_STYLE_ID,
|
AS_DOWNLOAD_PICTURE,
|
||||||
AS_GET_STYLE_FOR_FACE,
|
|
||||||
|
// Font-related server communications
|
||||||
// This will be modified. Currently a kludge for the input server until
|
AS_QUERY_FONTS_CHANGED,
|
||||||
// BScreens are implemented by the IK Taeam
|
AS_UPDATED_CLIENT_FONTLIST,
|
||||||
AS_GET_SCREEN_MODE,
|
AS_GET_FAMILY_ID,
|
||||||
|
AS_GET_STYLE_ID,
|
||||||
// Global function call defs
|
AS_GET_STYLE_FOR_FACE,
|
||||||
AS_SET_UI_COLORS,
|
|
||||||
AS_GET_UI_COLOR,
|
// This will be modified. Currently a kludge for the input server until
|
||||||
AS_SET_DECORATOR,
|
// BScreens are implemented by the IK Taeam
|
||||||
AS_GET_DECORATOR,
|
AS_GET_SCREEN_MODE,
|
||||||
|
|
||||||
AS_COUNT_WORKSPACES,
|
// Global function call defs
|
||||||
AS_SET_WORKSPACE_COUNT,
|
AS_SET_UI_COLORS,
|
||||||
AS_CURRENT_WORKSPACE,
|
AS_GET_UI_COLOR,
|
||||||
AS_ACTIVATE_WORKSPACE,
|
AS_SET_DECORATOR,
|
||||||
AS_SET_SCREEN_MODE,
|
AS_GET_DECORATOR,
|
||||||
AS_GET_SCROLLBAR_INFO,
|
|
||||||
AS_SET_SCROLLBAR_INFO,
|
AS_COUNT_WORKSPACES,
|
||||||
AS_IDLE_TIME,
|
AS_SET_WORKSPACE_COUNT,
|
||||||
AS_SELECT_PRINTER_PANEL,
|
AS_CURRENT_WORKSPACE,
|
||||||
AS_ADD_PRINTER_PANEL,
|
AS_ACTIVATE_WORKSPACE,
|
||||||
AS_RUN_BE_ABOUT,
|
AS_SET_SCREEN_MODE,
|
||||||
AS_SET_FOCUS_FOLLOWS_MOUSE,
|
AS_GET_SCROLLBAR_INFO,
|
||||||
AS_FOCUS_FOLLOWS_MOUSE,
|
AS_SET_SCROLLBAR_INFO,
|
||||||
AS_SET_MOUSE_MODE,
|
AS_IDLE_TIME,
|
||||||
AS_GET_MOUSE_MODE,
|
AS_SELECT_PRINTER_PANEL,
|
||||||
|
AS_ADD_PRINTER_PANEL,
|
||||||
// Graphics calls
|
AS_RUN_BE_ABOUT,
|
||||||
AS_BEGIN_TRANSACTION,
|
AS_SET_FOCUS_FOLLOWS_MOUSE,
|
||||||
AS_END_TRANSACTION,
|
AS_FOCUS_FOLLOWS_MOUSE,
|
||||||
AS_SET_HIGH_COLOR,
|
AS_SET_MOUSE_MODE,
|
||||||
AS_SET_LOW_COLOR,
|
AS_GET_MOUSE_MODE,
|
||||||
AS_SET_VIEW_COLOR,
|
|
||||||
|
// Graphics calls
|
||||||
AS_STROKE_ARC,
|
AS_BEGIN_TRANSACTION,
|
||||||
AS_STROKE_BEZIER,
|
AS_END_TRANSACTION,
|
||||||
AS_STROKE_ELLIPSE,
|
AS_SET_HIGH_COLOR,
|
||||||
AS_STROKE_LINE,
|
AS_SET_LOW_COLOR,
|
||||||
AS_STROKE_LINEARRAY,
|
AS_SET_VIEW_COLOR,
|
||||||
AS_STROKE_POLYGON,
|
|
||||||
AS_STROKE_RECT,
|
AS_STROKE_ARC,
|
||||||
AS_STROKE_ROUNDRECT,
|
AS_STROKE_BEZIER,
|
||||||
AS_STROKE_SHAPE,
|
AS_STROKE_ELLIPSE,
|
||||||
AS_STROKE_TRIANGLE,
|
AS_STROKE_LINE,
|
||||||
|
AS_STROKE_LINEARRAY,
|
||||||
AS_FILL_ARC,
|
AS_STROKE_POLYGON,
|
||||||
AS_FILL_BEZIER,
|
AS_STROKE_RECT,
|
||||||
AS_FILL_ELLIPSE,
|
AS_STROKE_ROUNDRECT,
|
||||||
AS_FILL_POLYGON,
|
AS_STROKE_SHAPE,
|
||||||
AS_FILL_RECT,
|
AS_STROKE_TRIANGLE,
|
||||||
AS_FILL_REGION,
|
|
||||||
AS_FILL_ROUNDRECT,
|
AS_FILL_ARC,
|
||||||
AS_FILL_SHAPE,
|
AS_FILL_BEZIER,
|
||||||
AS_FILL_TRIANGLE,
|
AS_FILL_ELLIPSE,
|
||||||
|
AS_FILL_POLYGON,
|
||||||
AS_MOVEPENBY,
|
AS_FILL_RECT,
|
||||||
AS_MOVEPENTO,
|
AS_FILL_REGION,
|
||||||
AS_SETPENSIZE,
|
AS_FILL_ROUNDRECT,
|
||||||
|
AS_FILL_SHAPE,
|
||||||
AS_DRAW_STRING,
|
AS_FILL_TRIANGLE,
|
||||||
AS_SET_FONT,
|
|
||||||
AS_SET_FONT_SIZE,
|
AS_MOVEPENBY,
|
||||||
|
AS_MOVEPENTO,
|
||||||
AS_FLUSH,
|
AS_SETPENSIZE,
|
||||||
AS_SYNC,
|
|
||||||
|
AS_DRAW_STRING,
|
||||||
AS_LAYER_CREATE,
|
AS_SET_FONT,
|
||||||
AS_LAYER_DELETE,
|
AS_SET_FONT_SIZE,
|
||||||
AS_LAYER_ADD_CHILD,
|
|
||||||
AS_LAYER_REMOVE_CHILD,
|
AS_FLUSH,
|
||||||
AS_LAYER_REMOVE_SELF,
|
AS_SYNC,
|
||||||
AS_LAYER_SHOW,
|
|
||||||
AS_LAYER_HIDE,
|
AS_LAYER_CREATE,
|
||||||
AS_LAYER_MOVE,
|
AS_LAYER_DELETE,
|
||||||
AS_LAYER_RESIZE,
|
AS_LAYER_CREATE_ROOT,
|
||||||
AS_LAYER_INVALIDATE,
|
AS_LAYER_DELETE_ROOT,
|
||||||
AS_LAYER_DRAW,
|
AS_LAYER_ADD_CHILD,
|
||||||
|
AS_LAYER_REMOVE_CHILD,
|
||||||
AS_LAYER_GET_TOKEN,
|
AS_LAYER_REMOVE_SELF,
|
||||||
AS_LAYER_ADD,
|
AS_LAYER_SHOW,
|
||||||
AS_LAYER_REMOVE
|
AS_LAYER_HIDE,
|
||||||
};
|
AS_LAYER_MOVE,
|
||||||
|
AS_LAYER_RESIZE,
|
||||||
#endif
|
AS_LAYER_INVALIDATE,
|
||||||
|
AS_LAYER_DRAW,
|
||||||
|
|
||||||
|
AS_LAYER_GET_TOKEN,
|
||||||
|
AS_LAYER_ADD,
|
||||||
|
AS_LAYER_REMOVE
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|||||||
+1186
-694
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user