Finished up ServerApp
Implemented most of and documented all of ServerWindow Miscellaneous necessary tweaks to other classes git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2833 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -322,12 +322,12 @@ void AppServer::MainLoop(void)
|
|||||||
{
|
{
|
||||||
switch(msgcode)
|
switch(msgcode)
|
||||||
{
|
{
|
||||||
case CREATE_APP:
|
case AS_CREATE_APP:
|
||||||
case DELETE_APP:
|
case AS_DELETE_APP:
|
||||||
case GET_SCREEN_MODE:
|
case AS_GET_SCREEN_MODE:
|
||||||
case B_QUIT_REQUESTED:
|
case B_QUIT_REQUESTED:
|
||||||
case UPDATED_CLIENT_FONTLIST:
|
case AS_UPDATED_CLIENT_FONTLIST:
|
||||||
case QUERY_FONTS_CHANGED:
|
case AS_QUERY_FONTS_CHANGED:
|
||||||
DispatchMessage(msgcode,msgbuffer);
|
DispatchMessage(msgcode,msgbuffer);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -341,7 +341,7 @@ void AppServer::MainLoop(void)
|
|||||||
|
|
||||||
if(buffersize>0)
|
if(buffersize>0)
|
||||||
delete msgbuffer;
|
delete msgbuffer;
|
||||||
if(msgcode==DELETE_APP || msgcode==B_QUIT_REQUESTED && DISPLAYDRIVER!=HWDRIVER)
|
if(msgcode==AS_DELETE_APP || msgcode==B_QUIT_REQUESTED && DISPLAYDRIVER!=HWDRIVER)
|
||||||
{
|
{
|
||||||
if(_quitting_server==true && _applist->CountItems()==0)
|
if(_quitting_server==true && _applist->CountItems()==0)
|
||||||
break;
|
break;
|
||||||
@@ -402,7 +402,7 @@ void AppServer::DispatchMessage(int32 code, int8 *buffer)
|
|||||||
int8 *index=buffer;
|
int8 *index=buffer;
|
||||||
switch(code)
|
switch(code)
|
||||||
{
|
{
|
||||||
case CREATE_APP:
|
case AS_CREATE_APP:
|
||||||
{
|
{
|
||||||
// Create the ServerApp to node monitor a new BApplication
|
// Create the ServerApp to node monitor a new BApplication
|
||||||
|
|
||||||
@@ -436,7 +436,7 @@ void AppServer::DispatchMessage(int32 code, int8 *buffer)
|
|||||||
_active_app=_applist->CountItems()-1;
|
_active_app=_applist->CountItems()-1;
|
||||||
|
|
||||||
PortLink *replylink=new PortLink(reply_port);
|
PortLink *replylink=new PortLink(reply_port);
|
||||||
replylink->SetOpCode(SET_SERVER_PORT);
|
replylink->SetOpCode(AS_SET_SERVER_PORT);
|
||||||
replylink->Attach((int32)newapp->_receiver);
|
replylink->Attach((int32)newapp->_receiver);
|
||||||
replylink->Flush();
|
replylink->Flush();
|
||||||
|
|
||||||
@@ -447,7 +447,7 @@ void AppServer::DispatchMessage(int32 code, int8 *buffer)
|
|||||||
newapp->Run();
|
newapp->Run();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DELETE_APP:
|
case AS_DELETE_APP:
|
||||||
{
|
{
|
||||||
// Delete a ServerApp. Received only from the respective ServerApp when a
|
// Delete a ServerApp. Received only from the respective ServerApp when a
|
||||||
// BApplication asks it to quit.
|
// BApplication asks it to quit.
|
||||||
@@ -497,7 +497,7 @@ void AppServer::DispatchMessage(int32 code, int8 *buffer)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case UPDATED_CLIENT_FONTLIST:
|
case AS_UPDATED_CLIENT_FONTLIST:
|
||||||
{
|
{
|
||||||
// received when the client-side global font list has been
|
// received when the client-side global font list has been
|
||||||
// refreshed
|
// refreshed
|
||||||
@@ -506,7 +506,7 @@ void AppServer::DispatchMessage(int32 code, int8 *buffer)
|
|||||||
fontserver->Unlock();
|
fontserver->Unlock();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case QUERY_FONTS_CHANGED:
|
case AS_QUERY_FONTS_CHANGED:
|
||||||
{
|
{
|
||||||
// Client application is asking if the font list has changed since
|
// Client application is asking if the font list has changed since
|
||||||
// the last client-side refresh
|
// the last client-side refresh
|
||||||
@@ -525,7 +525,7 @@ void AppServer::DispatchMessage(int32 code, int8 *buffer)
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case GET_SCREEN_MODE:
|
case AS_GET_SCREEN_MODE:
|
||||||
{
|
{
|
||||||
// Synchronous message call to get the stats on the current screen mode
|
// Synchronous message call to get the stats on the current screen mode
|
||||||
// in the app_server. Simply a hack in place for the Input Server until
|
// in the app_server. Simply a hack in place for the Input Server until
|
||||||
@@ -540,7 +540,7 @@ void AppServer::DispatchMessage(int32 code, int8 *buffer)
|
|||||||
// 3) int depth
|
// 3) int depth
|
||||||
|
|
||||||
PortLink *replylink=new PortLink(*((port_id*)index));
|
PortLink *replylink=new PortLink(*((port_id*)index));
|
||||||
replylink->SetOpCode(GET_SCREEN_MODE);
|
replylink->SetOpCode(AS_GET_SCREEN_MODE);
|
||||||
replylink->Attach((int16)_driver->GetWidth());
|
replylink->Attach((int16)_driver->GetWidth());
|
||||||
replylink->Attach((int16)_driver->GetHeight());
|
replylink->Attach((int16)_driver->GetHeight());
|
||||||
replylink->Attach((int16)_driver->GetDepth());
|
replylink->Attach((int16)_driver->GetDepth());
|
||||||
@@ -559,7 +559,7 @@ void AppServer::DispatchMessage(int32 code, int8 *buffer)
|
|||||||
if(DISPLAYDRIVER==HWDRIVER)
|
if(DISPLAYDRIVER==HWDRIVER)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
Broadcast(QUIT_APP);
|
Broadcast(AS_QUIT_APP);
|
||||||
|
|
||||||
// So when we delete the last ServerApp, we can exit the server
|
// So when we delete the last ServerApp, we can exit the server
|
||||||
_quitting_server=true;
|
_quitting_server=true;
|
||||||
|
|||||||
@@ -131,6 +131,7 @@ void InitDesktop(void)
|
|||||||
{
|
{
|
||||||
s->Activate();
|
s->Activate();
|
||||||
desktop_private::activescreen=s;
|
desktop_private::activescreen=s;
|
||||||
|
s->SetSpace(0,B_32_BIT_640x480,true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -247,6 +248,17 @@ int32 CurrentWorkspace(void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\brief Returns the workspace object for the active screen at the given index
|
||||||
|
*/
|
||||||
|
Workspace *WorkspaceAt(int32 index)
|
||||||
|
{
|
||||||
|
if(desktop_private::activescreen)
|
||||||
|
return desktop_private::activescreen->GetWorkspace(index);
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\brief Sets the active workspace
|
\brief Sets the active workspace
|
||||||
\param workspace Index of the workspace to activate
|
\param workspace Index of the workspace to activate
|
||||||
|
|||||||
@@ -38,13 +38,14 @@ TokenHandler screen_id_handler;
|
|||||||
\param fbinfo The frame buffer info
|
\param fbinfo The frame buffer info
|
||||||
\param gfxdriver DisplayDriver for the associated RootLayer
|
\param gfxdriver DisplayDriver for the associated RootLayer
|
||||||
*/
|
*/
|
||||||
Workspace::Workspace(const graphics_card_info &gcinfo, const frame_buffer_info &fbinfo, DisplayDriver *gfxdriver)
|
Workspace::Workspace(const graphics_card_info &gcinfo, const frame_buffer_info &fbinfo, Screen *screen)
|
||||||
{
|
{
|
||||||
_gcinfo=gcinfo;
|
_gcinfo=gcinfo;
|
||||||
_fbinfo=fbinfo;
|
_fbinfo=fbinfo;
|
||||||
|
|
||||||
|
_screen=screen;
|
||||||
_rootlayer=new RootLayer(BRect(0,0,fbinfo.display_width-1,fbinfo.display_height-1),
|
_rootlayer=new RootLayer(BRect(0,0,fbinfo.display_width-1,fbinfo.display_height-1),
|
||||||
"Workspace Root",gfxdriver);
|
"Workspace Root",_screen->GetGfxDriver());
|
||||||
_rootlayer->SetColor(workspace_default_color);
|
_rootlayer->SetColor(workspace_default_color);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -170,7 +171,7 @@ Screen::Screen(DisplayDriver *gfxmodule, uint8 workspaces)
|
|||||||
_workspacecount = workspaces;
|
_workspacecount = workspaces;
|
||||||
for (int i=0; i<workspaces; i++)
|
for (int i=0; i<workspaces; i++)
|
||||||
{
|
{
|
||||||
_workspacelist->AddItem(new Workspace(_gcinfo,_fbinfo,_driver));
|
_workspacelist->AddItem(new Workspace(_gcinfo,_fbinfo,this));
|
||||||
}
|
}
|
||||||
_resolution=_driver->GetMode();
|
_resolution=_driver->GetMode();
|
||||||
_currentworkspace=0;
|
_currentworkspace=0;
|
||||||
@@ -203,7 +204,7 @@ Screen::~Screen(void)
|
|||||||
*/
|
*/
|
||||||
void Screen::AddWorkspace(int32 index)
|
void Screen::AddWorkspace(int32 index)
|
||||||
{
|
{
|
||||||
Workspace *workspace = new Workspace(_gcinfo,_fbinfo,_driver);
|
Workspace *workspace = new Workspace(_gcinfo,_fbinfo,this);
|
||||||
if ( (index == -1) || !_workspacelist->AddItem(workspace,index) )
|
if ( (index == -1) || !_workspacelist->AddItem(workspace,index) )
|
||||||
_workspacelist->AddItem(workspace);
|
_workspacelist->AddItem(workspace);
|
||||||
}
|
}
|
||||||
@@ -398,3 +399,14 @@ Workspace *Screen::GetActiveWorkspace(void)
|
|||||||
return _activeworkspace;
|
return _activeworkspace;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\brief Returns a pointer to the Workspace at the specified index
|
||||||
|
\return A pointer to the Workspace at the specified index
|
||||||
|
*/
|
||||||
|
Workspace *Screen::GetWorkspace(int32 index)
|
||||||
|
{
|
||||||
|
if(index==_currentworkspace)
|
||||||
|
return _activeworkspace;
|
||||||
|
|
||||||
|
return (Workspace*)_workspacelist->ItemAt(index);
|
||||||
|
}
|
||||||
|
|||||||
@@ -36,6 +36,7 @@
|
|||||||
class DisplayDriver;
|
class DisplayDriver;
|
||||||
class ServerWindow;
|
class ServerWindow;
|
||||||
class RGBColor;
|
class RGBColor;
|
||||||
|
class Screen;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\class Workspace DesktopClasses.h
|
\class Workspace DesktopClasses.h
|
||||||
@@ -47,7 +48,7 @@ class RGBColor;
|
|||||||
class Workspace
|
class Workspace
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Workspace(const graphics_card_info &gcinfo, const frame_buffer_info &fbinfo, DisplayDriver *gfxdriver);
|
Workspace(const graphics_card_info &gcinfo, const frame_buffer_info &fbinfo, Screen *screen);
|
||||||
~Workspace(void);
|
~Workspace(void);
|
||||||
void SetBGColor(const RGBColor &c);
|
void SetBGColor(const RGBColor &c);
|
||||||
RGBColor BGColor();
|
RGBColor BGColor();
|
||||||
@@ -55,10 +56,13 @@ public:
|
|||||||
void SetData(const graphics_card_info &gcinfo, const frame_buffer_info &fbinfo);
|
void SetData(const graphics_card_info &gcinfo, const frame_buffer_info &fbinfo);
|
||||||
void GetData(graphics_card_info *gcinfo, frame_buffer_info *fbinfo);
|
void GetData(graphics_card_info *gcinfo, frame_buffer_info *fbinfo);
|
||||||
void SetSpace(int32 res);
|
void SetSpace(int32 res);
|
||||||
|
//! Returns the screen to which the workspace belongs
|
||||||
|
Screen *GetScreen(void) { return _screen; }
|
||||||
protected:
|
protected:
|
||||||
RootLayer *_rootlayer;
|
RootLayer *_rootlayer;
|
||||||
graphics_card_info _gcinfo;
|
graphics_card_info _gcinfo;
|
||||||
frame_buffer_info _fbinfo;
|
frame_buffer_info _fbinfo;
|
||||||
|
Screen *_screen;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -88,6 +92,7 @@ public:
|
|||||||
void SetActiveWindow(ServerWindow *win);
|
void SetActiveWindow(ServerWindow *win);
|
||||||
Layer *GetRootLayer(int32 workspace=B_CURRENT_WORKSPACE);
|
Layer *GetRootLayer(int32 workspace=B_CURRENT_WORKSPACE);
|
||||||
bool IsInitialized(void);
|
bool IsInitialized(void);
|
||||||
|
Workspace *GetWorkspace(int32 index);
|
||||||
Workspace *GetActiveWorkspace(void);
|
Workspace *GetActiveWorkspace(void);
|
||||||
//! Returns the unique identifier for the screen
|
//! Returns the unique identifier for the screen
|
||||||
int32 GetID(void) { return _id; }
|
int32 GetID(void) { return _id; }
|
||||||
|
|||||||
@@ -515,6 +515,15 @@ void Layer::Hide(void)
|
|||||||
child->Hide();
|
child->Hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\brief Determines whether the layer is hidden or not
|
||||||
|
\return true if hidden, false if not.
|
||||||
|
*/
|
||||||
|
bool Layer::IsHidden(void)
|
||||||
|
{
|
||||||
|
return (_hidecount==0)?false:true;
|
||||||
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\brief Counts the number of children the layer has
|
\brief Counts the number of children the layer has
|
||||||
\return the number of children the layer has, not including grandchildren
|
\return the number of children the layer has, not including grandchildren
|
||||||
|
|||||||
@@ -75,6 +75,7 @@ public:
|
|||||||
|
|
||||||
void Show(void);
|
void Show(void);
|
||||||
void Hide(void);
|
void Hide(void);
|
||||||
|
bool IsHidden(void);
|
||||||
|
|
||||||
BRect Bounds(void);
|
BRect Bounds(void);
|
||||||
BRect Frame(void);
|
BRect Frame(void);
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ bool ServerApp::PingTarget(void)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
_applink->SetPort(serverport);
|
_applink->SetPort(serverport);
|
||||||
_applink->SetOpCode(DELETE_APP);
|
_applink->SetOpCode(AS_DELETE_APP);
|
||||||
_applink->Attach(&_monitor_thread,sizeof(thread_id));
|
_applink->Attach(&_monitor_thread,sizeof(thread_id));
|
||||||
_applink->Flush();
|
_applink->Flush();
|
||||||
return false;
|
return false;
|
||||||
@@ -213,17 +213,7 @@ int32 ServerApp::MonitorApp(void *data)
|
|||||||
switch(msgcode)
|
switch(msgcode)
|
||||||
{
|
{
|
||||||
// -------------- Messages received from the Server ------------------------
|
// -------------- Messages received from the Server ------------------------
|
||||||
// Mouse messages simply get passed onto the active app for now
|
case AS_QUIT_APP:
|
||||||
case B_MOUSE_UP:
|
|
||||||
case B_MOUSE_DOWN:
|
|
||||||
case B_MOUSE_MOVED:
|
|
||||||
{
|
|
||||||
// everything is formatted as it should be, so just call
|
|
||||||
// write_port.
|
|
||||||
write_port(app->_sender, msgcode, msgbuffer, buffersize);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case QUIT_APP:
|
|
||||||
{
|
{
|
||||||
// If we are using the real, accelerated version of the
|
// If we are using the real, accelerated version of the
|
||||||
// DisplayDriver, we do NOT want the user to be able shut down
|
// DisplayDriver, we do NOT want the user to be able shut down
|
||||||
@@ -251,7 +241,7 @@ int32 ServerApp::MonitorApp(void *data)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
app->_applink->SetPort(serverport);
|
app->_applink->SetPort(serverport);
|
||||||
app->_applink->SetOpCode(DELETE_APP);
|
app->_applink->SetOpCode(AS_DELETE_APP);
|
||||||
app->_applink->Attach(&app->_monitor_thread,sizeof(thread_id));
|
app->_applink->Attach(&app->_monitor_thread,sizeof(thread_id));
|
||||||
app->_applink->Flush();
|
app->_applink->Flush();
|
||||||
break;
|
break;
|
||||||
@@ -292,7 +282,7 @@ void ServerApp::DispatchMessage(int32 code, int8 *buffer)
|
|||||||
|
|
||||||
switch(code)
|
switch(code)
|
||||||
{
|
{
|
||||||
case UPDATED_CLIENT_FONTLIST:
|
case AS_UPDATED_CLIENT_FONTLIST:
|
||||||
{
|
{
|
||||||
// received when the client-side global font list has been
|
// received when the client-side global font list has been
|
||||||
// refreshed
|
// refreshed
|
||||||
@@ -301,7 +291,7 @@ void ServerApp::DispatchMessage(int32 code, int8 *buffer)
|
|||||||
fontserver->Unlock();
|
fontserver->Unlock();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case CREATE_WINDOW:
|
case AS_CREATE_WINDOW:
|
||||||
{
|
{
|
||||||
// Create the ServerWindow to node monitor a new OBWindow
|
// Create the ServerWindow to node monitor a new OBWindow
|
||||||
|
|
||||||
@@ -332,25 +322,26 @@ void ServerApp::DispatchMessage(int32 code, int8 *buffer)
|
|||||||
// Window looper is waiting for our reply. Send back the
|
// Window looper is waiting for our reply. Send back the
|
||||||
// ServerWindow's message port
|
// ServerWindow's message port
|
||||||
PortLink *replylink=new PortLink(reply_port);
|
PortLink *replylink=new PortLink(reply_port);
|
||||||
replylink->SetOpCode(SET_SERVER_PORT);
|
replylink->SetOpCode(AS_SET_SERVER_PORT);
|
||||||
replylink->Attach((int32)newwin->_receiver);
|
replylink->Attach((int32)newwin->_receiver);
|
||||||
replylink->Flush();
|
replylink->Flush();
|
||||||
|
|
||||||
delete replylink;
|
delete replylink;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DELETE_WINDOW:
|
case AS_DELETE_WINDOW:
|
||||||
{
|
{
|
||||||
// Received from a ServerWindow when its window quits
|
// Received from a ServerWindow when its window quits
|
||||||
|
|
||||||
// Attached data:
|
// Attached data:
|
||||||
// 1) thread_id ServerWindow ID
|
// 1) uint32 ServerWindow ID token
|
||||||
thread_id winid;
|
|
||||||
ServerWindow *w;
|
ServerWindow *w;
|
||||||
|
uint32 winid=*((uint32*)index);
|
||||||
|
|
||||||
for(int32 i=0;i<_winlist->CountItems();i++)
|
for(int32 i=0;i<_winlist->CountItems();i++)
|
||||||
{
|
{
|
||||||
w=(ServerWindow*)_winlist->ItemAt(i);
|
w=(ServerWindow*)_winlist->ItemAt(i);
|
||||||
if(w->_monitorthread==winid)
|
if(w->_token==winid)
|
||||||
{
|
{
|
||||||
_winlist->RemoveItem(w);
|
_winlist->RemoveItem(w);
|
||||||
delete w;
|
delete w;
|
||||||
@@ -359,7 +350,7 @@ void ServerApp::DispatchMessage(int32 code, int8 *buffer)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case GFX_SET_SCREEN_MODE:
|
case AS_SET_SCREEN_MODE:
|
||||||
{
|
{
|
||||||
// Attached data
|
// Attached data
|
||||||
// 1) int32 workspace #
|
// 1) int32 workspace #
|
||||||
@@ -372,7 +363,7 @@ void ServerApp::DispatchMessage(int32 code, int8 *buffer)
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case GFX_ACTIVATE_WORKSPACE:
|
case AS_ACTIVATE_WORKSPACE:
|
||||||
{
|
{
|
||||||
// Attached data
|
// Attached data
|
||||||
// 1) int32 workspace index
|
// 1) int32 workspace index
|
||||||
@@ -384,39 +375,34 @@ void ServerApp::DispatchMessage(int32 code, int8 *buffer)
|
|||||||
|
|
||||||
// Theoretically, we could just call the driver directly, but we will
|
// Theoretically, we could just call the driver directly, but we will
|
||||||
// call the CursorManager's version to allow for future expansion
|
// call the CursorManager's version to allow for future expansion
|
||||||
case SHOW_CURSOR:
|
case AS_SHOW_CURSOR:
|
||||||
{
|
{
|
||||||
cursormanager->ShowCursor();
|
cursormanager->ShowCursor();
|
||||||
_cursorhidden=false;
|
_cursorhidden=false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case HIDE_CURSOR:
|
case AS_HIDE_CURSOR:
|
||||||
{
|
{
|
||||||
cursormanager->HideCursor();
|
cursormanager->HideCursor();
|
||||||
_cursorhidden=true;
|
_cursorhidden=true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case OBSCURE_CURSOR:
|
case AS_OBSCURE_CURSOR:
|
||||||
{
|
{
|
||||||
cursormanager->ObscureCursor();
|
cursormanager->ObscureCursor();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case QUERY_CURSOR_HIDDEN:
|
case AS_QUERY_CURSOR_HIDDEN:
|
||||||
{
|
{
|
||||||
// Attached data
|
// Attached data
|
||||||
// 1) int32 port to reply to
|
// 1) int32 port to reply to
|
||||||
if(_cursorhidden)
|
write_port(*((port_id*)index),(_cursorhidden)?SERVER_TRUE:SERVER_FALSE,NULL,0);
|
||||||
write_port(*((port_id*)index),SERVER_TRUE,NULL,0);
|
|
||||||
else
|
|
||||||
write_port(*((port_id*)index),SERVER_FALSE,NULL,0);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SET_CURSOR_DATA:
|
case AS_SET_CURSOR_DATA:
|
||||||
{
|
{
|
||||||
// Attached data: 68 bytes of _appcursor data
|
// Attached data: 68 bytes of _appcursor data
|
||||||
|
|
||||||
// Get the data, update the app's _appcursor, and update the
|
|
||||||
// app's _appcursor if active.
|
|
||||||
int8 cdata[68];
|
int8 cdata[68];
|
||||||
memcpy(cdata, buffer, 68);
|
memcpy(cdata, buffer, 68);
|
||||||
|
|
||||||
@@ -428,13 +414,33 @@ void ServerApp::DispatchMessage(int32 code, int8 *buffer)
|
|||||||
cursormanager->DeleteCursor(_appcursor->ID());
|
cursormanager->DeleteCursor(_appcursor->ID());
|
||||||
|
|
||||||
_appcursor=new ServerCursor(cdata);
|
_appcursor=new ServerCursor(cdata);
|
||||||
|
_appcursor->SetAppSignature(_signature.String());
|
||||||
cursormanager->AddCursor(_appcursor);
|
cursormanager->AddCursor(_appcursor);
|
||||||
cursormanager->SetCursor(_appcursor->ID());
|
cursormanager->SetCursor(_appcursor->ID());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SET_CURSOR_BCURSOR:
|
case AS_SET_CURSOR_BCURSOR:
|
||||||
{
|
{
|
||||||
// TODO: Implement
|
// Attached data:
|
||||||
|
// 1) port_id reply port
|
||||||
|
// 2) 68 bytes of _appcursor data
|
||||||
|
|
||||||
|
port_id replyport=*((port_id*)index);
|
||||||
|
index+=sizeof(port_id);
|
||||||
|
|
||||||
|
int8 cdata[68];
|
||||||
|
memcpy(cdata, index, 68);
|
||||||
|
|
||||||
|
_appcursor=new ServerCursor(cdata);
|
||||||
|
_appcursor->SetAppSignature(_signature.String());
|
||||||
|
cursormanager->AddCursor(_appcursor);
|
||||||
|
cursormanager->SetCursor(_appcursor->ID());
|
||||||
|
|
||||||
|
// Synchronous message - BApplication is waiting on the cursor's ID
|
||||||
|
PortLink replylink(replyport);
|
||||||
|
replylink.SetOpCode(AS_SET_CURSOR_BCURSOR);
|
||||||
|
replylink.Attach(_appcursor->ID());
|
||||||
|
replylink.Flush();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -26,6 +26,7 @@
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
#include "ServerCursor.h"
|
#include "ServerCursor.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
/*!
|
/*!
|
||||||
\brief Constructor
|
\brief Constructor
|
||||||
\param r Size of the cursor
|
\param r Size of the cursor
|
||||||
@@ -92,9 +93,7 @@ ServerCursor::ServerCursor(int8 *data)
|
|||||||
cursorval=cursorflip & powval;
|
cursorval=cursorflip & powval;
|
||||||
maskval=maskflip & powval;
|
maskval=maskflip & powval;
|
||||||
bmppos[i]=((cursorval!=0)?black:white) & ((maskval>0)?0xFFFFFFFF:0x00FFFFFF);
|
bmppos[i]=((cursorval!=0)?black:white) & ((maskval>0)?0xFFFFFFFF:0x00FFFFFF);
|
||||||
printf("%c",((cursorval!=0)?'*':'-'));
|
|
||||||
}
|
}
|
||||||
printf("\n");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -143,3 +142,15 @@ void ServerCursor::SetHotSpot(BPoint pt)
|
|||||||
_hotspot=pt;
|
_hotspot=pt;
|
||||||
_hotspot.ConstrainTo(Bounds());
|
_hotspot.ConstrainTo(Bounds());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ServerCursor::SetAppSignature(const char *signature)
|
||||||
|
{
|
||||||
|
if(_app_signature)
|
||||||
|
delete _app_signature;
|
||||||
|
|
||||||
|
if(signature)
|
||||||
|
{
|
||||||
|
_app_signature=new char[strlen(signature)];
|
||||||
|
strcpy(_app_signature, signature);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ public:
|
|||||||
BPoint GetHotSpot(void);
|
BPoint GetHotSpot(void);
|
||||||
void SetHotSpot(BPoint pt);
|
void SetHotSpot(BPoint pt);
|
||||||
const char *GetAppSignature(void) { return _app_signature; }
|
const char *GetAppSignature(void) { return _app_signature; }
|
||||||
|
void SetAppSignature(const char *signature);
|
||||||
|
|
||||||
//! Returns the cursor's ID
|
//! Returns the cursor's ID
|
||||||
int32 ID(void) { return _token; }
|
int32 ID(void) { return _token; }
|
||||||
|
|||||||
@@ -7,114 +7,127 @@
|
|||||||
#define SERVER_PORT_NAME "OBappserver"
|
#define SERVER_PORT_NAME "OBappserver"
|
||||||
#define SERVER_INPUT_PORT "OBinputport"
|
#define SERVER_INPUT_PORT "OBinputport"
|
||||||
|
|
||||||
#define CREATE_APP 'drca'
|
enum
|
||||||
#define DELETE_APP 'drda'
|
{
|
||||||
#define QUIT_APP 'srqa'
|
|
||||||
|
|
||||||
#define SET_SERVER_PORT 'srsp'
|
|
||||||
|
|
||||||
#define CREATE_WINDOW 'drcw'
|
|
||||||
#define DELETE_WINDOW 'drdw'
|
|
||||||
#define SHOW_WINDOW 'drsw'
|
|
||||||
#define HIDE_WINDOW 'drhw'
|
|
||||||
#define QUIT_WINDOW 'srqw'
|
|
||||||
|
|
||||||
// Used for quick replies from the app_server
|
// Used for quick replies from the app_server
|
||||||
#define SERVER_TRUE 'svtr'
|
SERVER_TRUE='_srt',
|
||||||
#define SERVER_FALSE 'svfl'
|
SERVER_FALSE,
|
||||||
|
|
||||||
|
// Application definitions
|
||||||
|
AS_CREATE_APP,
|
||||||
|
AS_DELETE_APP,
|
||||||
|
AS_QUIT_APP,
|
||||||
|
|
||||||
|
AS_SET_SERVER_PORT,
|
||||||
|
|
||||||
|
AS_CREATE_WINDOW,
|
||||||
|
AS_DELETE_WINDOW,
|
||||||
|
|
||||||
|
AS_SET_CURSOR_DATA,
|
||||||
|
AS_SET_CURSOR_BCURSOR,
|
||||||
|
AS_SET_CURSOR_BBITMAP,
|
||||||
|
AS_SHOW_CURSOR,
|
||||||
|
AS_HIDE_CURSOR,
|
||||||
|
AS_OBSCURE_CURSOR,
|
||||||
|
AS_QUERY_CURSOR_HIDDEN,
|
||||||
|
|
||||||
|
AS_BEGIN_RECT_TRACKING,
|
||||||
|
AS_END_RECT_TRACKING,
|
||||||
|
|
||||||
|
// Window definitions
|
||||||
|
AS_SHOW_WINDOW,
|
||||||
|
AS_HIDE_WINDOW,
|
||||||
|
AS_QUIT_WINDOW,
|
||||||
|
AS_SEND_BEHIND,
|
||||||
|
AS_SET_LOOK,
|
||||||
|
AS_SET_FEEL,
|
||||||
|
AS_SET_FLAGS,
|
||||||
|
|
||||||
// Font-related server communications
|
// Font-related server communications
|
||||||
#define QUERY_FONTS_CHANGED 'qfch'
|
AS_QUERY_FONTS_CHANGED,
|
||||||
#define UPDATED_CLIENT_FONTLIST 'ucfl'
|
AS_UPDATED_CLIENT_FONTLIST,
|
||||||
#define GET_FAMILY_ID 'fmid'
|
AS_GET_FAMILY_ID,
|
||||||
#define GET_STYLE_ID 'stid'
|
AS_GET_STYLE_ID,
|
||||||
#define GET_STYLE_FOR_FACE 'stff'
|
AS_GET_STYLE_FOR_FACE,
|
||||||
|
|
||||||
// This will be modified. Currently a kludge for the input server until
|
// This will be modified. Currently a kludge for the input server until
|
||||||
// BScreens are implemented by the IK Taeam
|
// BScreens are implemented by the IK Taeam
|
||||||
#define GET_SCREEN_MODE 'gsmd'
|
AS_GET_SCREEN_MODE,
|
||||||
|
|
||||||
#define SET_UI_COLORS 'suic'
|
// Global function call defs
|
||||||
#define GET_UI_COLOR 'guic'
|
AS_SET_UI_COLORS,
|
||||||
#define SET_DECORATOR 'sdec'
|
AS_GET_UI_COLOR,
|
||||||
#define GET_DECORATOR 'gdec'
|
AS_SET_DECORATOR,
|
||||||
|
AS_GET_DECORATOR,
|
||||||
|
|
||||||
// Cursor-related communications
|
AS_COUNT_WORKSPACES,
|
||||||
#define SET_CURSOR_DATA 'sscd'
|
AS_SET_WORKSPACE_COUNT,
|
||||||
#define SET_CURSOR_BCURSOR 'sscb'
|
AS_CURRENT_WORKSPACE,
|
||||||
#define SET_CURSOR_BBITMAP 'sscB'
|
AS_ACTIVATE_WORKSPACE,
|
||||||
#define SHOW_CURSOR 'srsc'
|
AS_SET_SCREEN_MODE,
|
||||||
#define HIDE_CURSOR 'srhc'
|
AS_GET_SCROLLBAR_INFO,
|
||||||
#define OBSCURE_CURSOR 'sroc'
|
AS_SET_SCROLLBAR_INFO,
|
||||||
#define QUERY_CURSOR_HIDDEN 'sqch'
|
AS_IDLE_TIME,
|
||||||
|
AS_SELECT_PRINTER_PANEL,
|
||||||
|
AS_ADD_PRINTER_PANEL,
|
||||||
|
AS_RUN_BE_ABOUT,
|
||||||
|
AS_SET_FOCUS_FOLLOWS_MOUSE,
|
||||||
|
AS_FOCUS_FOLLOWS_MOUSE,
|
||||||
|
|
||||||
#define BEGIN_RECT_TRACKING 'sbrt'
|
// Graphics calls
|
||||||
#define END_RECT_TRACKING 'sert'
|
AS_BEGIN_TRANSACTION,
|
||||||
|
AS_END_TRANSACTION,
|
||||||
|
AS_SET_HIGH_COLOR,
|
||||||
|
AS_SET_LOW_COLOR,
|
||||||
|
AS_SET_VIEW_COLOR,
|
||||||
|
|
||||||
#define GFX_COUNT_WORKSPACES 'gcws'
|
AS_STROKE_ARC,
|
||||||
#define GFX_SET_WORKSPACE_COUNT 'ggwc'
|
AS_STROKE_BEZIER,
|
||||||
#define GFX_CURRENT_WORKSPACE 'ggcw'
|
AS_STROKE_ELLIPSE,
|
||||||
#define GFX_ACTIVATE_WORKSPACE 'gaws'
|
AS_STROKE_LINE,
|
||||||
#define GFX_GET_SYSTEM_COLORS 'gsyc'
|
AS_STROKE_LINEARRAY,
|
||||||
#define GFX_SET_SYSTEM_COLORS 'gsyc'
|
AS_STROKE_POLYGON,
|
||||||
#define GFX_SET_SCREEN_MODE 'gssm'
|
AS_STROKE_RECT,
|
||||||
#define GFX_GET_SCROLLBAR_INFO 'ggsi'
|
AS_STROKE_ROUNDRECT,
|
||||||
#define GFX_SET_SCROLLBAR_INFO 'gssi'
|
AS_STROKE_SHAPE,
|
||||||
#define GFX_IDLE_TIME 'gidt'
|
AS_STROKE_TRIANGLE,
|
||||||
#define GFX_SELECT_PRINTER_PANEL 'gspp'
|
|
||||||
#define GFX_ADD_PRINTER_PANEL 'gapp'
|
|
||||||
#define GFX_RUN_BE_ABOUT 'grba'
|
|
||||||
#define GFX_SET_FOCUS_FOLLOWS_MOUSE 'gsfm'
|
|
||||||
#define GFX_FOCUS_FOLLOWS_MOUSE 'gffm'
|
|
||||||
|
|
||||||
#define GFX_SET_HIGH_COLOR 'gshc'
|
AS_FILL_ARC,
|
||||||
#define GFX_SET_LOW_COLOR 'gslc'
|
AS_FILL_BEZIER,
|
||||||
#define GFX_SET_VIEW_COLOR 'gsvc'
|
AS_FILL_ELLIPSE,
|
||||||
|
AS_FILL_POLYGON,
|
||||||
|
AS_FILL_RECT,
|
||||||
|
AS_FILL_REGION,
|
||||||
|
AS_FILL_ROUNDRECT,
|
||||||
|
AS_FILL_SHAPE,
|
||||||
|
AS_FILL_TRIANGLE,
|
||||||
|
|
||||||
#define GFX_STROKE_ARC 'gsar'
|
AS_MOVEPENBY,
|
||||||
#define GFX_STROKE_BEZIER 'gsbz'
|
AS_MOVEPENTO,
|
||||||
#define GFX_STROKE_ELLIPSE 'gsel'
|
AS_SETPENSIZE,
|
||||||
#define GFX_STROKE_LINE 'gsln'
|
|
||||||
#define GFX_STROKE_POLYGON 'gspy'
|
|
||||||
#define GFX_STROKE_RECT 'gsrc'
|
|
||||||
#define GFX_STROKE_ROUNDRECT 'gsrr'
|
|
||||||
#define GFX_STROKE_SHAPE 'gssh'
|
|
||||||
#define GFX_STROKE_TRIANGLE 'gstr'
|
|
||||||
|
|
||||||
#define GFX_FILL_ARC 'gfar'
|
AS_DRAW_STRING,
|
||||||
#define GFX_FILL_BEZIER 'gfbz'
|
AS_SET_FONT,
|
||||||
#define GFX_FILL_ELLIPSE 'gfel'
|
AS_SET_FONT_SIZE,
|
||||||
#define GFX_FILL_POLYGON 'gfpy'
|
|
||||||
#define GFX_FILL_RECT 'gfrc'
|
|
||||||
#define GFX_FILL_REGION 'gfrg'
|
|
||||||
#define GFX_FILL_ROUNDRECT 'gfrr'
|
|
||||||
#define GFX_FILL_SHAPE 'gfsh'
|
|
||||||
#define GFX_FILL_TRIANGLE 'gftr'
|
|
||||||
|
|
||||||
#define GFX_MOVEPENBY 'gmpb'
|
AS_FLUSH,
|
||||||
#define GFX_MOVEPENTO 'gmpt'
|
AS_SYNC,
|
||||||
#define GFX_SETPENSIZE 'gsps'
|
|
||||||
|
|
||||||
#define GFX_DRAW_STRING 'gdst'
|
AS_LAYER_CREATE,
|
||||||
#define GFX_SET_FONT 'gsft'
|
AS_LAYER_DELETE,
|
||||||
#define GFX_SET_FONT_SIZE 'gsfs'
|
AS_LAYER_ADD_CHILD,
|
||||||
|
AS_LAYER_REMOVE_CHILD,
|
||||||
|
AS_LAYER_REMOVE_SELF,
|
||||||
|
AS_LAYER_SHOW,
|
||||||
|
AS_LAYER_HIDE,
|
||||||
|
AS_LAYER_MOVE,
|
||||||
|
AS_LAYER_RESIZE,
|
||||||
|
AS_LAYER_INVALIDATE,
|
||||||
|
AS_LAYER_DRAW,
|
||||||
|
|
||||||
#define GFX_FLUSH 'gfsh'
|
AS_LAYER_GET_TOKEN,
|
||||||
#define GFX_SYNC 'gsyn'
|
AS_LAYER_ADD,
|
||||||
|
AS_LAYER_REMOVE
|
||||||
|
};
|
||||||
|
|
||||||
#define LAYER_CREATE 'lycr'
|
|
||||||
#define LAYER_DELETE 'lydl'
|
|
||||||
#define LAYER_ADD_CHILD 'lyac'
|
|
||||||
#define LAYER_REMOVE_CHILD 'lyrc'
|
|
||||||
#define LAYER_REMOVE_SELF 'lyrs'
|
|
||||||
#define LAYER_SHOW 'lysh'
|
|
||||||
#define LAYER_HIDE 'lyhd'
|
|
||||||
#define LAYER_MOVE 'lymv'
|
|
||||||
#define LAYER_RESIZE 'lyre'
|
|
||||||
#define LAYER_INVALIDATE 'lyin'
|
|
||||||
#define LAYER_DRAW 'lydr'
|
|
||||||
|
|
||||||
#define VIEW_GET_TOKEN 'vgtk'
|
|
||||||
#define VIEW_ADD 'vadd'
|
|
||||||
#define VIEW_REMOVE 'vrem'
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -28,7 +28,6 @@
|
|||||||
#include <Rect.h>
|
#include <Rect.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <Debug.h>
|
|
||||||
#include <View.h> // for B_XXXXX_MOUSE_BUTTON defines
|
#include <View.h> // for B_XXXXX_MOUSE_BUTTON defines
|
||||||
#include "AppServer.h"
|
#include "AppServer.h"
|
||||||
#include "Layer.h"
|
#include "Layer.h"
|
||||||
@@ -38,52 +37,40 @@
|
|||||||
#include "ServerProtocol.h"
|
#include "ServerProtocol.h"
|
||||||
#include "WinBorder.h"
|
#include "WinBorder.h"
|
||||||
#include "Desktop.h"
|
#include "Desktop.h"
|
||||||
|
#include "DesktopClasses.h"
|
||||||
#include "TokenHandler.h"
|
#include "TokenHandler.h"
|
||||||
|
|
||||||
//! Handler to get BWindow tokens from
|
//! Handler to get BWindow tokens from
|
||||||
TokenHandler win_token_handler;
|
TokenHandler win_token_handler;
|
||||||
|
|
||||||
// defined in WinBorder.cpp. Locking is not necessary - the only
|
|
||||||
// _monitorthread which accesses them is the Poller _monitorthread
|
|
||||||
|
|
||||||
//! Used in window focus management
|
|
||||||
ServerWindow *active_serverwindow=NULL;
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\brief Contructor
|
\brief Contructor
|
||||||
|
|
||||||
Sets up a lot of the stuff
|
Does a lot of stuff to set up for the window - new decorator, new winborder, spawn a
|
||||||
|
monitor thread.
|
||||||
*/
|
*/
|
||||||
ServerWindow::ServerWindow(BRect rect, const char *string, uint32 wlook,
|
ServerWindow::ServerWindow(BRect rect, const char *string, uint32 wlook,
|
||||||
uint32 wfeel, uint32 wflags, ServerApp *winapp, port_id winport, uint32 index)
|
uint32 wfeel, uint32 wflags, ServerApp *winapp, port_id winport, uint32 index)
|
||||||
{
|
{
|
||||||
_title=new BString;
|
_title=new BString;
|
||||||
_title->SetTo( (string)?string:"Window" );
|
_title->SetTo( (string)?string:"Window" );
|
||||||
|
|
||||||
// This must happen before the WinBorder object - it needs this object's _frame
|
|
||||||
// to be valid
|
|
||||||
_frame=rect;
|
_frame=rect;
|
||||||
|
|
||||||
// set these early also - the _decorator will also need them
|
|
||||||
_flags=wflags;
|
_flags=wflags;
|
||||||
_look=wlook;
|
_look=wlook;
|
||||||
_feel=wfeel;
|
_feel=wfeel;
|
||||||
|
|
||||||
_decorator=new_decorator(_frame,_title->String(),_look,_feel,_flags,GetGfxDriver());
|
|
||||||
|
|
||||||
_winborder=new WinBorder(_frame,_title->String(),0,wflags,this);
|
_winborder=new WinBorder(_frame,_title->String(),0,wflags,this);
|
||||||
|
|
||||||
// _sender is the monitored _app's event port
|
// _sender is the monitored window's event port
|
||||||
_sender=winport;
|
_sender=winport;
|
||||||
_winlink=new PortLink(_sender);
|
_winlink=new PortLink(_sender);
|
||||||
|
|
||||||
_applink= (winapp)? new PortLink(winapp->_receiver) : NULL;
|
_applink= (winapp)? new PortLink(winapp->_receiver) : NULL;
|
||||||
|
|
||||||
// _receiver is the port to which the _app sends messages for the server
|
// _receiver is the port to which the app sends messages for the server
|
||||||
_receiver=create_port(30,_title->String());
|
_receiver=create_port(30,_title->String());
|
||||||
|
|
||||||
_active=false;
|
_active=false;
|
||||||
_hidecount=0;
|
|
||||||
|
|
||||||
// Spawn our message monitoring _monitorthread
|
// Spawn our message monitoring _monitorthread
|
||||||
_monitorthread=spawn_thread(MonitorWin,_title->String(),B_NORMAL_PRIORITY,this);
|
_monitorthread=spawn_thread(MonitorWin,_title->String(),B_NORMAL_PRIORITY,this);
|
||||||
@@ -96,6 +83,7 @@ ServerWindow::ServerWindow(BRect rect, const char *string, uint32 wlook,
|
|||||||
AddWindowToDesktop(this,index);
|
AddWindowToDesktop(this,index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//!Tears down all connections with the user application, kills the monitoring thread.
|
||||||
ServerWindow::~ServerWindow(void)
|
ServerWindow::~ServerWindow(void)
|
||||||
{
|
{
|
||||||
RemoveWindowFromDesktop(this);
|
RemoveWindowFromDesktop(this);
|
||||||
@@ -105,192 +93,299 @@ ServerWindow::~ServerWindow(void)
|
|||||||
_applink=NULL;
|
_applink=NULL;
|
||||||
delete _title;
|
delete _title;
|
||||||
delete _winlink;
|
delete _winlink;
|
||||||
delete _decorator;
|
delete _winborder;
|
||||||
// TODO: uncomment this when we have WinBorder.h
|
|
||||||
// delete _winborder;
|
|
||||||
}
|
}
|
||||||
kill_thread(_monitorthread);
|
kill_thread(_monitorthread);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\brief Requests an update of the specified rectangle
|
||||||
|
\param rect The area to update, in the parent's coordinates
|
||||||
|
|
||||||
|
This could be considered equivalent to BView::Invalidate()
|
||||||
|
*/
|
||||||
void ServerWindow::RequestDraw(BRect rect)
|
void ServerWindow::RequestDraw(BRect rect)
|
||||||
{
|
{
|
||||||
_winlink->SetOpCode(LAYER_DRAW);
|
_winlink->SetOpCode(AS_LAYER_DRAW);
|
||||||
_winlink->Attach(&rect,sizeof(BRect));
|
_winlink->Attach(&rect,sizeof(BRect));
|
||||||
_winlink->Flush();
|
_winlink->Flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! Requests an update for the entire window
|
||||||
|
void ServerWindow::RequestDraw(void)
|
||||||
|
{
|
||||||
|
RequestDraw(_frame);
|
||||||
|
}
|
||||||
|
|
||||||
|
//! Forces the window border to update its decorator
|
||||||
void ServerWindow::ReplaceDecorator(void)
|
void ServerWindow::ReplaceDecorator(void)
|
||||||
{
|
{
|
||||||
|
_winborder->UpdateDecorator();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! Requests that the ServerWindow's BWindow quit
|
||||||
void ServerWindow::Quit(void)
|
void ServerWindow::Quit(void)
|
||||||
{
|
{
|
||||||
|
_winlink->SetOpCode(B_QUIT_REQUESTED);
|
||||||
|
_winlink->Flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\brief Gets the title for the window
|
||||||
|
\return The title for the window
|
||||||
|
*/
|
||||||
const char *ServerWindow::GetTitle(void)
|
const char *ServerWindow::GetTitle(void)
|
||||||
{
|
{
|
||||||
return _title->String();
|
return _title->String();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\brief Gets the window's ServerApp
|
||||||
|
\return The ServerApp for the window
|
||||||
|
*/
|
||||||
ServerApp *ServerWindow::GetApp(void)
|
ServerApp *ServerWindow::GetApp(void)
|
||||||
{
|
{
|
||||||
return _app;
|
return _app;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! Shows the window's WinBorder
|
||||||
void ServerWindow::Show(void)
|
void ServerWindow::Show(void)
|
||||||
{
|
{
|
||||||
/* if(_winborder)
|
if(_winborder)
|
||||||
{
|
_winborder->Show();
|
||||||
_winborder->ShowLayer();
|
|
||||||
ActivateWindow(this);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! Hides the window's WinBorder
|
||||||
void ServerWindow::Hide(void)
|
void ServerWindow::Hide(void)
|
||||||
{
|
{
|
||||||
// TODO: uncomment this when we have WinBorder.h
|
if(_winborder)
|
||||||
// if(_winborder)
|
_winborder->Hide();
|
||||||
// _winborder->HideLayer();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
\brief Determines whether the window is hidden or not
|
||||||
|
\return true if hidden, false if not
|
||||||
|
*/
|
||||||
bool ServerWindow::IsHidden(void)
|
bool ServerWindow::IsHidden(void)
|
||||||
{
|
{
|
||||||
return (_hidecount==0)?true:false;
|
if(_winborder)
|
||||||
|
return _winborder->IsHidden();
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\brief Handles focus and redrawing when changing focus states
|
||||||
|
|
||||||
|
The ServerWindow is set to (in)active and its decorator is redrawn based on its active status
|
||||||
|
*/
|
||||||
void ServerWindow::SetFocus(bool value)
|
void ServerWindow::SetFocus(bool value)
|
||||||
{
|
{
|
||||||
if(_active!=value)
|
if(_active!=value)
|
||||||
{
|
{
|
||||||
_active=value;
|
_active=value;
|
||||||
_decorator->SetFocus(value);
|
_winborder->RequestDraw();
|
||||||
_decorator->Draw();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\brief Determines whether or not the window is active
|
||||||
|
\return true if active, false if not
|
||||||
|
*/
|
||||||
bool ServerWindow::HasFocus(void)
|
bool ServerWindow::HasFocus(void)
|
||||||
{
|
{
|
||||||
return _active;
|
return _active;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ServerWindow::WorkspaceActivated(int32 newworkspace, const BPoint reso, color_space cspace)
|
/*!
|
||||||
|
\brief Notifies window of workspace (de)activation
|
||||||
|
\param workspace Index of the workspace changed
|
||||||
|
\param active New active status of the workspace
|
||||||
|
*/
|
||||||
|
void ServerWindow::WorkspaceActivated(int32 workspace, bool active)
|
||||||
{
|
{
|
||||||
|
// TODO: implement
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\brief Notifies window of a workspace switch
|
||||||
|
\param oldone index of the previous workspace
|
||||||
|
\param newone index of the new workspace
|
||||||
|
*/
|
||||||
|
void ServerWindow::WorkspacesChanged(int32 oldone,int32 newone)
|
||||||
|
{
|
||||||
|
// TODO: implement
|
||||||
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\brief Notifies window of a change in focus
|
||||||
|
\param active New active status of the window
|
||||||
|
*/
|
||||||
void ServerWindow::WindowActivated(bool active)
|
void ServerWindow::WindowActivated(bool active)
|
||||||
{
|
{
|
||||||
|
// TODO: implement
|
||||||
}
|
}
|
||||||
|
|
||||||
void ServerWindow::ScreenModeChanged(const BPoint res, color_space cspace)
|
/*!
|
||||||
|
\brief Notifies window of a change in screen resolution
|
||||||
|
\param frame Size of the new resolution
|
||||||
|
\param color_space Color space of the new screen mode
|
||||||
|
*/
|
||||||
|
void ServerWindow::ScreenModeChanged(const BRect frame, const color_space cspace)
|
||||||
{
|
{
|
||||||
|
// TODO: implement
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
\brief Sets the frame size of the window
|
||||||
|
\rect New window size
|
||||||
|
*/
|
||||||
void ServerWindow::SetFrame(const BRect &rect)
|
void ServerWindow::SetFrame(const BRect &rect)
|
||||||
{
|
{
|
||||||
_frame=rect;
|
_frame=rect;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\brief Returns the frame of the window in screen coordinates
|
||||||
|
\return The frame of the window in screen coordinates
|
||||||
|
*/
|
||||||
BRect ServerWindow::Frame(void)
|
BRect ServerWindow::Frame(void)
|
||||||
{
|
{
|
||||||
return _frame;
|
return _frame;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\brief Locks the window
|
||||||
|
\return B_OK if everything is ok, B_ERROR if something went wrong
|
||||||
|
*/
|
||||||
status_t ServerWindow::Lock(void)
|
status_t ServerWindow::Lock(void)
|
||||||
{
|
{
|
||||||
#ifdef DEBUG_SERVERWIN
|
return (_locker.Lock())?B_OK:B_ERROR;
|
||||||
printf("%s::Lock()\n",_title->String());
|
|
||||||
#endif
|
|
||||||
return _locker.Lock();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! Unlocks the window
|
||||||
void ServerWindow::Unlock(void)
|
void ServerWindow::Unlock(void)
|
||||||
{
|
{
|
||||||
#ifdef DEBUG_SERVERWIN
|
|
||||||
printf("%s::Unlock()\n",_title->String());
|
|
||||||
#endif
|
|
||||||
_locker.Unlock();
|
_locker.Unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\brief Determines whether or not the window is locked
|
||||||
|
\return True if locked, false if not.
|
||||||
|
*/
|
||||||
bool ServerWindow::IsLocked(void)
|
bool ServerWindow::IsLocked(void)
|
||||||
{
|
{
|
||||||
return _locker.IsLocked();
|
return _locker.IsLocked();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ServerWindow::Loop(void)
|
void ServerWindow::DispatchMessage(int32 code, int8 *msgbuffer)
|
||||||
{
|
{
|
||||||
// Message-dispatching loop for the ServerWindow
|
switch(code)
|
||||||
|
{
|
||||||
|
case AS_LAYER_CREATE:
|
||||||
|
{
|
||||||
|
// Received when a view is attached to a window. This will require
|
||||||
|
// us to attach a layer in the tree in the same manner and invalidate
|
||||||
|
// the area in which the new layer resides assuming that it is
|
||||||
|
// visible.
|
||||||
|
|
||||||
|
// Attached Data:
|
||||||
|
// 1) (int32) id of the parent view
|
||||||
|
// 2) (BRect) frame in parent's coordinates
|
||||||
|
// 3) (int32) resize flags
|
||||||
|
// 4) (int32) view flags
|
||||||
|
// 5) (uint16) view's hide level
|
||||||
|
|
||||||
|
// This is a synchronous call, so reply immediately with the ID of the layer
|
||||||
|
// so the BView can identify itself
|
||||||
|
|
||||||
|
// TODO: Implement
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case AS_LAYER_DELETE:
|
||||||
|
{
|
||||||
|
// Received when a view is detached from a window. This is definitely
|
||||||
|
// the less taxing operation - we call PruneTree() on the removed
|
||||||
|
// layer, detach the layer itself, delete it, and invalidate the
|
||||||
|
// area assuming that the view was visible when removed
|
||||||
|
|
||||||
|
// Attached Data:
|
||||||
|
// 1) (int32) id of the removed view
|
||||||
|
|
||||||
|
// TODO: Implement
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case AS_SHOW_WINDOW:
|
||||||
|
{
|
||||||
|
Show();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case AS_HIDE_WINDOW:
|
||||||
|
{
|
||||||
|
Hide();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case B_MINIMIZE:
|
||||||
|
case B_WINDOW_ACTIVATED:
|
||||||
|
case B_ZOOM:
|
||||||
|
case B_WINDOW_MOVE_TO:
|
||||||
|
case B_WINDOW_MOVE_BY:
|
||||||
|
case AS_SET_LOOK:
|
||||||
|
case AS_SET_FEEL:
|
||||||
|
case AS_SET_FLAGS:
|
||||||
|
case AS_SEND_BEHIND:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
printf("ServerWindow %s received unexpected code %lx",_title->String(),code);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\brief Message-dispatching loop for the ServerWindow
|
||||||
|
|
||||||
|
MonitorWin() watches the ServerWindow's message port and dispatches as necessary
|
||||||
|
\param data The thread's ServerWindow
|
||||||
|
\return Throwaway code. Always 0.
|
||||||
|
*/
|
||||||
|
int32 ServerWindow::MonitorWin(void *data)
|
||||||
|
{
|
||||||
|
ServerWindow *win=(ServerWindow *)data;
|
||||||
|
|
||||||
int32 msgcode;
|
int32 msgcode;
|
||||||
int8 *msgbuffer=NULL;
|
int8 *msgbuffer=NULL;
|
||||||
ssize_t buffersize,bytesread;
|
ssize_t buffersize,bytesread;
|
||||||
|
|
||||||
for(;;)
|
for(;;)
|
||||||
{
|
{
|
||||||
buffersize=port_buffer_size(_receiver);
|
buffersize=port_buffer_size(win->_receiver);
|
||||||
|
|
||||||
if(buffersize>0)
|
if(buffersize>0)
|
||||||
{
|
{
|
||||||
msgbuffer=new int8[buffersize];
|
msgbuffer=new int8[buffersize];
|
||||||
bytesread=read_port(_receiver,&msgcode,msgbuffer,buffersize);
|
bytesread=read_port(win->_receiver,&msgcode,msgbuffer,buffersize);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
bytesread=read_port(_receiver,&msgcode,NULL,0);
|
bytesread=read_port(win->_receiver,&msgcode,NULL,0);
|
||||||
|
|
||||||
if (bytesread != B_BAD_PORT_ID && bytesread != B_TIMED_OUT && bytesread != B_WOULD_BLOCK)
|
if (bytesread != B_BAD_PORT_ID && bytesread != B_TIMED_OUT && bytesread != B_WOULD_BLOCK)
|
||||||
{
|
{
|
||||||
switch(msgcode)
|
switch(msgcode)
|
||||||
{
|
{
|
||||||
case LAYER_CREATE:
|
case B_QUIT_REQUESTED:
|
||||||
{
|
{
|
||||||
// Received when a view is attached to a window. This will require
|
// Our BWindow sent us this message when it quit.
|
||||||
// us to attach a layer in the tree in the same manner and invalidate
|
// We need to ask its ServerApp to delete our monitor
|
||||||
// the area in which the new layer resides assuming that it is
|
win->_applink->SetOpCode(AS_DELETE_WINDOW);
|
||||||
// visible.
|
win->_applink->Attach((int32)win->_token);
|
||||||
|
win->_applink->Flush();
|
||||||
// Attached Data:
|
|
||||||
// 1) (int32) id of the parent view
|
|
||||||
// 2) (BRect) frame in parent's coordinates
|
|
||||||
// 3) (int32) resize flags
|
|
||||||
// 4) (int32) view flags
|
|
||||||
// 5) (uint16) view's hide level
|
|
||||||
|
|
||||||
// This is a synchronous call, so reply immediately with the ID of the layer
|
|
||||||
// so the BView can identify itself
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case LAYER_DELETE:
|
|
||||||
{
|
|
||||||
// Received when a view is detached from a window. This is definitely
|
|
||||||
// the less taxing operation - we call PruneTree() on the removed
|
|
||||||
// layer, detach the layer itself, delete it, and invalidate the
|
|
||||||
// area assuming that the view was visible when removed
|
|
||||||
|
|
||||||
// Attached Data:
|
|
||||||
// 1) (int32) id of the removed view
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case SHOW_WINDOW:
|
|
||||||
{
|
|
||||||
Show();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case HIDE_WINDOW:
|
|
||||||
{
|
|
||||||
Hide();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case DELETE_WINDOW:
|
|
||||||
{
|
|
||||||
// Received from our window when it is told to quit, so tell our
|
|
||||||
// application to delete this object
|
|
||||||
_applink->SetOpCode(DELETE_WINDOW);
|
|
||||||
_applink->Attach((int32)_monitorthread);
|
|
||||||
_applink->Flush();
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
DispatchMessage(msgcode,msgbuffer);
|
win->DispatchMessage(msgcode,msgbuffer);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -302,31 +397,16 @@ void ServerWindow::Loop(void)
|
|||||||
if(msgcode==B_QUIT_REQUESTED)
|
if(msgcode==B_QUIT_REQUESTED)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void ServerWindow::DispatchMessage(int32 code, int8 *msgbuffer)
|
|
||||||
{
|
|
||||||
switch(code)
|
|
||||||
{
|
|
||||||
default:
|
|
||||||
{
|
|
||||||
#ifdef DEBUG_SERVERWIN
|
|
||||||
printf("%s::ServerWindow(): Received unexpected code: ",_title->String());
|
|
||||||
PrintMessageCode(code);
|
|
||||||
#endif
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
int32 ServerWindow::MonitorWin(void *data)
|
|
||||||
{
|
|
||||||
ServerWindow *win=(ServerWindow *)data;
|
|
||||||
win->Loop();
|
|
||||||
exit_thread(0);
|
exit_thread(0);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\brief Passes mouse event messages to the appropriate window
|
||||||
|
\param code Message code of the mouse message
|
||||||
|
\param buffer Attachment buffer for the mouse message
|
||||||
|
*/
|
||||||
void ServerWindow::HandleMouseEvent(int32 code, int8 *buffer)
|
void ServerWindow::HandleMouseEvent(int32 code, int8 *buffer)
|
||||||
{
|
{
|
||||||
/* ServerWindow *mousewin=NULL;
|
/* ServerWindow *mousewin=NULL;
|
||||||
@@ -445,22 +525,53 @@ void ServerWindow::HandleMouseEvent(int32 code, int8 *buffer)
|
|||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\brief Passes key event messages to the appropriate window
|
||||||
|
\param code Message code of the key message
|
||||||
|
\param buffer Attachment buffer for the key message
|
||||||
|
*/
|
||||||
void ServerWindow::HandleKeyEvent(int32 code, int8 *buffer)
|
void ServerWindow::HandleKeyEvent(int32 code, int8 *buffer)
|
||||||
{
|
{
|
||||||
}
|
/* ServerWindow *keywin=NULL;
|
||||||
|
int8 *index=buffer;
|
||||||
|
|
||||||
void ServerWindow::SetWorkspace(Workspace *wkspc)
|
// Dispatch the key event to the active window
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void ActivateWindow(ServerWindow *oldwin,ServerWindow *newwin)
|
|
||||||
{
|
|
||||||
/* if(active_serverwindow==win)
|
|
||||||
return;
|
|
||||||
if(active_serverwindow)
|
|
||||||
active_serverwindow->SetFocus(false);
|
|
||||||
active_serverwindow=win;
|
|
||||||
if(win)
|
|
||||||
win->SetFocus(true);
|
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\brief Returns the Workspace object to which the window belongs
|
||||||
|
|
||||||
|
If the window belongs to all workspaces, it returns the current workspace
|
||||||
|
*/
|
||||||
|
Workspace *ServerWindow::GetWorkspace(void)
|
||||||
|
{
|
||||||
|
if(_workspace_index==B_ALL_WORKSPACES)
|
||||||
|
return _workspace->GetScreen()->GetActiveWorkspace();
|
||||||
|
|
||||||
|
return _workspace;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\brief Assign the window to a particular workspace object
|
||||||
|
\param The ServerWindow's new workspace
|
||||||
|
*/
|
||||||
|
void ServerWindow::SetWorkspace(Workspace *wkspc)
|
||||||
|
{
|
||||||
|
_workspace=wkspc;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\brief Handles window activation stuff. Called by Desktop functions
|
||||||
|
*/
|
||||||
|
void ActivateWindow(ServerWindow *oldwin,ServerWindow *newwin)
|
||||||
|
{
|
||||||
|
if(oldwin==newwin)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if(oldwin)
|
||||||
|
oldwin->SetFocus(false);
|
||||||
|
|
||||||
|
if(newwin)
|
||||||
|
newwin->SetFocus(true);
|
||||||
|
}
|
||||||
|
|||||||
@@ -33,6 +33,7 @@
|
|||||||
#include <Locker.h>
|
#include <Locker.h>
|
||||||
#include <Rect.h>
|
#include <Rect.h>
|
||||||
#include <String.h>
|
#include <String.h>
|
||||||
|
#include <Window.h>
|
||||||
|
|
||||||
class BString;
|
class BString;
|
||||||
class BMessenger;
|
class BMessenger;
|
||||||
@@ -43,6 +44,15 @@ class PortLink;
|
|||||||
class WinBorder;
|
class WinBorder;
|
||||||
class Workspace;
|
class Workspace;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\class ServerWindow ServerWindow.h
|
||||||
|
\brief Shadow BWindow class
|
||||||
|
|
||||||
|
A ServerWindow handles all the intraserver tasks required of it by its BWindow. There are
|
||||||
|
too many tasks to list as being done by them, but they include handling View transactions,
|
||||||
|
coordinating and linking a window's WinBorder half with its messaging half, dispatching
|
||||||
|
mouse and key events from the server to its window, and other such things.
|
||||||
|
*/
|
||||||
class ServerWindow
|
class ServerWindow
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -60,10 +70,12 @@ public:
|
|||||||
void SetFocus(bool value);
|
void SetFocus(bool value);
|
||||||
bool HasFocus(void);
|
bool HasFocus(void);
|
||||||
void RequestDraw(BRect rect);
|
void RequestDraw(BRect rect);
|
||||||
|
void RequestDraw(void);
|
||||||
|
|
||||||
void WorkspaceActivated(int32 NewDesktop, const BPoint Resolution, color_space CSpace);
|
void WorkspaceActivated(int32 workspace, bool active);
|
||||||
void WindowActivated(bool Active);
|
void WorkspacesChanged(int32 oldone,int32 newone);
|
||||||
void ScreenModeChanged(const BPoint Resolution, color_space CSpace);
|
void WindowActivated(bool active);
|
||||||
|
void ScreenModeChanged(const BRect frame, const color_space cspace);
|
||||||
|
|
||||||
void SetFrame(const BRect &rect);
|
void SetFrame(const BRect &rect);
|
||||||
BRect Frame(void);
|
BRect Frame(void);
|
||||||
@@ -76,10 +88,10 @@ public:
|
|||||||
static int32 MonitorWin(void *data);
|
static int32 MonitorWin(void *data);
|
||||||
static void HandleMouseEvent(int32 code, int8 *buffer);
|
static void HandleMouseEvent(int32 code, int8 *buffer);
|
||||||
static void HandleKeyEvent(int32 code, int8 *buffer);
|
static void HandleKeyEvent(int32 code, int8 *buffer);
|
||||||
void Loop(void);
|
|
||||||
|
|
||||||
|
//! Returns the index of the workspaces to which it belongs
|
||||||
int32 GetWorkspaceIndex(void) { return _workspace_index; }
|
int32 GetWorkspaceIndex(void) { return _workspace_index; }
|
||||||
Workspace *GetWorkspace(void) { return _workspace; }
|
Workspace *GetWorkspace(void);
|
||||||
void SetWorkspace(Workspace *wkspc);
|
void SetWorkspace(Workspace *wkspc);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
@@ -88,13 +100,11 @@ protected:
|
|||||||
|
|
||||||
BString *_title;
|
BString *_title;
|
||||||
int32 _look, _feel, _flags;
|
int32 _look, _feel, _flags;
|
||||||
int32 _workspace_index;
|
uint32 _workspace_index;
|
||||||
Workspace *_workspace;
|
Workspace *_workspace;
|
||||||
bool _active;
|
bool _active;
|
||||||
|
|
||||||
ServerApp *_app;
|
ServerApp *_app;
|
||||||
|
|
||||||
Decorator *_decorator;
|
|
||||||
WinBorder *_winborder;
|
WinBorder *_winborder;
|
||||||
|
|
||||||
thread_id _monitorthread;
|
thread_id _monitorthread;
|
||||||
@@ -103,7 +113,6 @@ protected:
|
|||||||
PortLink *_winlink,*_applink;
|
PortLink *_winlink,*_applink;
|
||||||
BLocker _locker;
|
BLocker _locker;
|
||||||
BRect _frame;
|
BRect _frame;
|
||||||
bool _hidecount;
|
|
||||||
uint32 _token;
|
uint32 _token;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -328,3 +328,19 @@ void WinBorder::ResizeBy(BPoint pt)
|
|||||||
void WinBorder::ResizeBy(float x, float y)
|
void WinBorder::ResizeBy(float x, float y)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void WinBorder::UpdateColors(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void WinBorder::UpdateDecorator(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void WinBorder::UpdateFont(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void WinBorder::UpdateScreen(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ public:
|
|||||||
void RebuildRegions(bool recursive=true);
|
void RebuildRegions(bool recursive=true);
|
||||||
void Activate(bool active=false);
|
void Activate(bool active=false);
|
||||||
ServerWindow *Window(void) { return _win; }
|
ServerWindow *Window(void) { return _win; }
|
||||||
|
Decorator *GetDecorator(void) { return _decorator; }
|
||||||
protected:
|
protected:
|
||||||
ServerWindow *_win;
|
ServerWindow *_win;
|
||||||
BString *_title;
|
BString *_title;
|
||||||
|
|||||||
Reference in New Issue
Block a user