Moved keyboard message handling from AppServer to Desktop class
Moved style to more like OpenTracker in Deskbar class git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6221 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -90,7 +90,6 @@ AppServer::AppServer(void)
|
|||||||
fAppList= new BList(0);
|
fAppList= new BList(0);
|
||||||
fQuittingServer= false;
|
fQuittingServer= false;
|
||||||
fExitPoller= false;
|
fExitPoller= false;
|
||||||
fScreenShotIndex= 1;
|
|
||||||
make_decorator= NULL;
|
make_decorator= NULL;
|
||||||
|
|
||||||
// We need this in order for new_decorator to be able to instantiate new decorators
|
// We need this in order for new_decorator to be able to instantiate new decorators
|
||||||
@@ -773,274 +772,6 @@ void AppServer::Broadcast(int32 code)
|
|||||||
release_sem(fAppListLock);
|
release_sem(fAppListLock);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
|
||||||
\brief Handles all incoming key messages
|
|
||||||
\param code ID code of the key message
|
|
||||||
\param buffer Attachment buffer of the keyboard message. Always non-NULL.
|
|
||||||
|
|
||||||
This function handles 5 message codes: B_KEY_UP, B_KEY_DOWN,
|
|
||||||
B_UNMAPPED_KEY_UP, B_UNMAPPED_KEY_DOWN, and B_MODIFIERS_CHANGED. It filters
|
|
||||||
out any combinations which are app_server specific:
|
|
||||||
# Left Ctrl+Alt+Shift+F12 - set to 640x480x256@60Hz
|
|
||||||
# Alt + Function Key - Change workspace
|
|
||||||
# Control+Tab - Send to Deskbar for the Twitcher
|
|
||||||
*/
|
|
||||||
void AppServer::HandleKeyMessage(int32 code, int8 *buffer)
|
|
||||||
{
|
|
||||||
int8 *index=buffer;
|
|
||||||
|
|
||||||
switch(code)
|
|
||||||
{
|
|
||||||
case B_KEY_DOWN:
|
|
||||||
{
|
|
||||||
// Attached Data:
|
|
||||||
// 1) int64 bigtime_t object of when the message was sent
|
|
||||||
// 2) int32 raw key code (scancode)
|
|
||||||
// 3) int32 modifier-independent ASCII code for the character
|
|
||||||
// 4) int32 repeat count
|
|
||||||
// 5) int32 modifiers
|
|
||||||
// 6) int8[3] UTF-8 data generated
|
|
||||||
// 7) int8 number of bytes to follow containing the
|
|
||||||
// generated string
|
|
||||||
// 8) Character string generated by the keystroke
|
|
||||||
// 9) int8[16] state of all keys
|
|
||||||
|
|
||||||
// Obtain only what data which we'll need
|
|
||||||
index+=sizeof(int64);
|
|
||||||
int32 scancode=*((int32*)index); index+=sizeof(int32) * 3;
|
|
||||||
int32 modifiers=*((int32*)index); index+=sizeof(int32) + (sizeof(int8) * 3);
|
|
||||||
int8 stringlength=*index; index+=stringlength;
|
|
||||||
STRACE(("Key Down: 0x%lx\n",scancode));
|
|
||||||
if(DISPLAYDRIVER==HWDRIVER)
|
|
||||||
{
|
|
||||||
// Check for workspace change or safe video mode
|
|
||||||
if(scancode>0x01 && scancode<0x0e)
|
|
||||||
{
|
|
||||||
if(scancode==0x0d)
|
|
||||||
{
|
|
||||||
if(modifiers & (B_LEFT_COMMAND_KEY |
|
|
||||||
B_LEFT_CONTROL_KEY | B_LEFT_SHIFT_KEY))
|
|
||||||
{
|
|
||||||
// TODO: Set to Safe Mode here. (DisplayDriver API change)
|
|
||||||
STRACE(("Safe Video Mode invoked - code unimplemented\n"));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(modifiers & B_CONTROL_KEY)
|
|
||||||
{
|
|
||||||
STRACE(("Set Workspace %ld\n",scancode-1));
|
|
||||||
//TODO: change
|
|
||||||
//SetWorkspace(scancode-2);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Tab key
|
|
||||||
if(scancode==0x26 && (modifiers & B_CONTROL_KEY))
|
|
||||||
{
|
|
||||||
ServerApp *deskbar=FindApp("application/x-vnd.Be-TSKB");
|
|
||||||
if(deskbar)
|
|
||||||
{
|
|
||||||
printf("Send Twitcher message key to Deskbar - unimplmemented\n");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// PrintScreen
|
|
||||||
if(scancode==0xe)
|
|
||||||
{
|
|
||||||
if(fDriver)
|
|
||||||
{
|
|
||||||
char filename[128];
|
|
||||||
BEntry entry;
|
|
||||||
|
|
||||||
sprintf(filename,"/boot/home/screen%ld.png",fScreenShotIndex);
|
|
||||||
entry.SetTo(filename);
|
|
||||||
|
|
||||||
while(entry.Exists())
|
|
||||||
{
|
|
||||||
fScreenShotIndex++;
|
|
||||||
sprintf(filename,"/boot/home/screen%ld.png",fScreenShotIndex);
|
|
||||||
}
|
|
||||||
fScreenShotIndex++;
|
|
||||||
fDriver->DumpToFile(filename);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// F12
|
|
||||||
if(scancode>0x1 && scancode<0xe)
|
|
||||||
{
|
|
||||||
if(scancode==0xd)
|
|
||||||
{
|
|
||||||
if(modifiers & (B_LEFT_CONTROL_KEY | B_LEFT_SHIFT_KEY | B_LEFT_OPTION_KEY))
|
|
||||||
{
|
|
||||||
// TODO: Set to Safe Mode here. (DisplayDriver API change)
|
|
||||||
STRACE(("Safe Video Mode invoked - code unimplemented\n"));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(modifiers & (B_LEFT_SHIFT_KEY | B_LEFT_CONTROL_KEY))
|
|
||||||
{
|
|
||||||
STRACE(("Set Workspace %ld\n",scancode-1));
|
|
||||||
//TODO: resolve
|
|
||||||
//SetWorkspace(scancode-2);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//Tab
|
|
||||||
if(scancode==0x26 && (modifiers & B_SHIFT_KEY))
|
|
||||||
{
|
|
||||||
STRACE(("Twitcher\n"));
|
|
||||||
ServerApp *deskbar=FindApp("application/x-vnd.Be-TSKB");
|
|
||||||
if(deskbar)
|
|
||||||
{
|
|
||||||
printf("Send Twitcher message key to Deskbar - unimplmemented\n");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Pause/Break
|
|
||||||
if(scancode==0x7f)
|
|
||||||
{
|
|
||||||
if(fDriver)
|
|
||||||
{
|
|
||||||
char filename[128];
|
|
||||||
BEntry entry;
|
|
||||||
|
|
||||||
sprintf(filename,"/boot/home/screen%ld.png",fScreenShotIndex);
|
|
||||||
entry.SetTo(filename);
|
|
||||||
|
|
||||||
while(entry.Exists())
|
|
||||||
{
|
|
||||||
fScreenShotIndex++;
|
|
||||||
sprintf(filename,"/boot/home/screen%ld.png",fScreenShotIndex);
|
|
||||||
}
|
|
||||||
fScreenShotIndex++;
|
|
||||||
|
|
||||||
fDriver->DumpToFile(filename);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// We got this far, so apparently it's safe to pass to the active
|
|
||||||
// window.
|
|
||||||
ServerWindow::HandleKeyEvent(code, buffer);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case B_KEY_UP:
|
|
||||||
{
|
|
||||||
// Attached Data:
|
|
||||||
// 1) int64 bigtime_t object of when the message was sent
|
|
||||||
// 2) int32 raw key code (scancode)
|
|
||||||
// 3) int32 modifier-independent ASCII code for the character
|
|
||||||
// 4) int32 modifiers
|
|
||||||
// 5) int8[3] UTF-8 data generated
|
|
||||||
// 6) int8 number of bytes to follow containing the
|
|
||||||
// generated string
|
|
||||||
// 7) Character string generated by the keystroke
|
|
||||||
// 8) int8[16] state of all keys
|
|
||||||
|
|
||||||
// Obtain only what data which we'll need
|
|
||||||
index+=sizeof(int64);
|
|
||||||
int32 scancode=*((int32*)index); index+=sizeof(int32) * 3;
|
|
||||||
int32 modifiers=*((int32*)index); index+=sizeof(int8) * 3;
|
|
||||||
int8 stringlength=*index; index+=stringlength + sizeof(int8);
|
|
||||||
STRACE(("Key Up: 0x%lx\n",scancode));
|
|
||||||
|
|
||||||
if(DISPLAYDRIVER==HWDRIVER)
|
|
||||||
{
|
|
||||||
// Tab key
|
|
||||||
if(scancode==0x26 && (modifiers & B_CONTROL_KEY))
|
|
||||||
{
|
|
||||||
ServerApp *deskbar=FindApp("application/x-vnd.Be-TSKB");
|
|
||||||
if(deskbar)
|
|
||||||
{
|
|
||||||
printf("Send Twitcher message key to Deskbar - unimplmemented\n");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if(scancode==0x26 && (modifiers & B_LEFT_SHIFT_KEY))
|
|
||||||
{
|
|
||||||
ServerApp *deskbar=FindApp("application/x-vnd.Be-TSKB");
|
|
||||||
if(deskbar)
|
|
||||||
{
|
|
||||||
printf("Send Twitcher message key to Deskbar - unimplmemented\n");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// We got this far, so apparently it's safe to pass to the active
|
|
||||||
// window.
|
|
||||||
|
|
||||||
// fall through to the next case
|
|
||||||
ServerWindow::HandleKeyEvent(code,buffer);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case B_UNMAPPED_KEY_DOWN:
|
|
||||||
{
|
|
||||||
// Attached Data:
|
|
||||||
// 1) int64 bigtime_t object of when the message was sent
|
|
||||||
// 2) int32 raw key code (scancode)
|
|
||||||
// 3) int32 modifiers
|
|
||||||
// 4) int32 number of elements in the key state array to follow
|
|
||||||
// 5) int8 state of all keys
|
|
||||||
|
|
||||||
// fall through to the next case
|
|
||||||
#ifdef DEBUG_KEYHANDLING
|
|
||||||
index+=sizeof(bigtime_t);
|
|
||||||
printf("Unmapped Key Down: 0x%lx\n",*((int32*)index));
|
|
||||||
#endif
|
|
||||||
ServerWindow::HandleKeyEvent(code,buffer);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case B_UNMAPPED_KEY_UP:
|
|
||||||
{
|
|
||||||
// Attached Data:
|
|
||||||
// 1) int64 bigtime_t object of when the message was sent
|
|
||||||
// 2) int32 raw key code (scancode)
|
|
||||||
// 3) int32 modifiers
|
|
||||||
// 4) int32 number of elements in the key state array to follow
|
|
||||||
// 5) int8 state of all keys
|
|
||||||
|
|
||||||
// fall through to the next case
|
|
||||||
#ifdef DEBUG_KEYHANDLING
|
|
||||||
index+=sizeof(bigtime_t);
|
|
||||||
printf("Unmapped Key Up: 0x%lx\n",*((int32*)index));
|
|
||||||
#endif
|
|
||||||
ServerWindow::HandleKeyEvent(code,buffer);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case B_MODIFIERS_CHANGED:
|
|
||||||
{
|
|
||||||
// Attached Data:
|
|
||||||
// 1) int64 bigtime_t object of when the message was sent
|
|
||||||
// 2) int32 modifiers
|
|
||||||
// 3) int32 old modifiers
|
|
||||||
// 4) int32 number of elements in the key state array to follow
|
|
||||||
// 5) int8 state of all keys
|
|
||||||
|
|
||||||
#ifdef DEBUG_KEYHANDLING
|
|
||||||
index+=sizeof(bigtime_t);
|
|
||||||
printf("Modifiers Changed\n");
|
|
||||||
#endif
|
|
||||||
ServerWindow::HandleKeyEvent(code,buffer);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\brief Finds the application with the given signature
|
\brief Finds the application with the given signature
|
||||||
\param sig MIME signature of the application to find
|
\param sig MIME signature of the application to find
|
||||||
|
|||||||
@@ -39,19 +39,16 @@ public:
|
|||||||
|
|
||||||
static int32 PollerThread(void *data);
|
static int32 PollerThread(void *data);
|
||||||
static int32 PicassoThread(void *data);
|
static int32 PicassoThread(void *data);
|
||||||
thread_id Run(void);
|
thread_id Run(void);
|
||||||
void MainLoop(void);
|
void MainLoop(void);
|
||||||
|
|
||||||
bool LoadDecorator(const char *path);
|
bool LoadDecorator(const char *path);
|
||||||
void InitDecorators(void);
|
void InitDecorators(void);
|
||||||
|
|
||||||
void DispatchMessage(PortMessage *msg);
|
void DispatchMessage(PortMessage *msg);
|
||||||
void Broadcast(int32 code);
|
void Broadcast(int32 code);
|
||||||
|
|
||||||
// TODO: remove shortly!
|
ServerApp* FindApp(const char *sig);
|
||||||
void HandleKeyMessage(int32 code, int8 *buffer);
|
|
||||||
|
|
||||||
ServerApp* FindApp(const char *sig);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend Decorator* new_decorator(BRect rect, const char *title,
|
friend Decorator* new_decorator(BRect rect, const char *title,
|
||||||
@@ -79,8 +76,6 @@ private:
|
|||||||
fDecoratorLock;
|
fDecoratorLock;
|
||||||
|
|
||||||
DisplayDriver *fDriver;
|
DisplayDriver *fDriver;
|
||||||
|
|
||||||
int32 fScreenShotIndex;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
Decorator *new_decorator(BRect rect, const char *title, int32 wlook, int32 wfeel,
|
Decorator *new_decorator(BRect rect, const char *title, int32 wlook, int32 wfeel,
|
||||||
@@ -89,5 +84,6 @@ Decorator *new_decorator(BRect rect, const char *title, int32 wlook, int32 wfeel
|
|||||||
extern CursorManager *cursormanager;
|
extern CursorManager *cursormanager;
|
||||||
extern BitmapManager *bitmapmanager;
|
extern BitmapManager *bitmapmanager;
|
||||||
extern ColorSet gui_colorset;
|
extern ColorSet gui_colorset;
|
||||||
|
extern AppServer *app_server;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
+501
-176
@@ -25,81 +25,98 @@
|
|||||||
//
|
//
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <Entry.h>
|
||||||
#include <Region.h>
|
#include <Region.h>
|
||||||
#include <Message.h>
|
#include <Message.h>
|
||||||
|
|
||||||
|
#include "AccelerantDriver.h"
|
||||||
|
#include "AppServer.h"
|
||||||
#include "Desktop.h"
|
#include "Desktop.h"
|
||||||
#include "RootLayer.h"
|
#include "DisplayDriver.h"
|
||||||
#include "ServerScreen.h"
|
#include "Globals.h"
|
||||||
#include "Layer.h"
|
#include "Layer.h"
|
||||||
#include "PortMessage.h"
|
#include "PortMessage.h"
|
||||||
#include "DisplayDriver.h"
|
#include "RootLayer.h"
|
||||||
#include "AccelerantDriver.h"
|
#include "ServerConfig.h"
|
||||||
|
#include "ServerScreen.h"
|
||||||
|
#include "ServerWindow.h"
|
||||||
#include "ViewDriver.h"
|
#include "ViewDriver.h"
|
||||||
#include "WinBorder.h"
|
#include "WinBorder.h"
|
||||||
#include "Workspace.h"
|
#include "Workspace.h"
|
||||||
#include "Globals.h"
|
|
||||||
#include "ServerWindow.h"
|
|
||||||
|
|
||||||
//#define REAL_MODE
|
//#define DEBUG_DESKTOP
|
||||||
|
#define DEBUG_KEYHANDLING
|
||||||
|
|
||||||
Desktop::Desktop(void){
|
#ifdef DEBUG_DESKTOP
|
||||||
// desktop = this;
|
#define STRACE(a) printf(a)
|
||||||
|
#else
|
||||||
|
#define STRACE(a) /* nothing */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
Desktop::Desktop(void)
|
||||||
|
{
|
||||||
fDragMessage = NULL;
|
fDragMessage = NULL;
|
||||||
fActiveRootLayer = NULL;
|
fActiveRootLayer = NULL;
|
||||||
fFrontWinBorder = NULL;
|
fFrontWinBorder = NULL;
|
||||||
fFocusWinBorder = NULL;
|
fFocusWinBorder = NULL;
|
||||||
fActiveScreen = NULL;
|
fActiveScreen = NULL;
|
||||||
|
fScreenShotIndex = 1;
|
||||||
}
|
}
|
||||||
//---------------------------------------------------------------------------
|
|
||||||
Desktop::~Desktop(void){
|
Desktop::~Desktop(void)
|
||||||
//printf("~Desktop()\n");
|
{
|
||||||
if (fDragMessage)
|
if (fDragMessage)
|
||||||
delete fDragMessage;
|
delete fDragMessage;
|
||||||
|
|
||||||
void *ptr;
|
void *ptr;
|
||||||
for(int32 i=0; (ptr=fRootLayerList.ItemAt(i)); i++){
|
for(int32 i=0; (ptr=fRootLayerList.ItemAt(i)); i++)
|
||||||
delete (RootLayer*)ptr;
|
delete (RootLayer*)ptr;
|
||||||
}
|
|
||||||
|
|
||||||
for(int32 i=0; (ptr=fScreenList.ItemAt(i)); i++){
|
for(int32 i=0; (ptr=fScreenList.ItemAt(i)); i++)
|
||||||
delete (Screen*)ptr;
|
delete (Screen*)ptr;
|
||||||
}
|
|
||||||
|
|
||||||
for(int32 i=0; (ptr=fWinBorderList.ItemAt(i)); i++){
|
for(int32 i=0; (ptr=fWinBorderList.ItemAt(i)); i++)
|
||||||
delete (WinBorder*)ptr;
|
delete (WinBorder*)ptr;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
//---------------------------------------------------------------------------
|
|
||||||
void Desktop::Init(void){
|
void Desktop::Init(void)
|
||||||
|
{
|
||||||
DisplayDriver *driver = NULL;
|
DisplayDriver *driver = NULL;
|
||||||
int32 driverCount = 0;
|
int32 driverCount = 0;
|
||||||
bool initDrivers = true;
|
bool initDrivers = true;
|
||||||
|
|
||||||
while(initDrivers){
|
while(initDrivers)
|
||||||
|
{
|
||||||
|
|
||||||
#ifdef REAL_MODE
|
if(DISPLAYDRIVER == HWDRIVER)
|
||||||
// If we're using the AccelerantDriver for rendering, eventually we will loop through
|
{
|
||||||
// drivers until one can't initialize in order to support multiple monitors. For now,
|
// If we're using the AccelerantDriver for rendering, eventually we will loop through
|
||||||
// we'll just load one and be done with it.
|
// drivers until one can't initialize in order to support multiple monitors. For now,
|
||||||
driver = new AccelerantDriver();
|
// we'll just load one and be done with it.
|
||||||
#else
|
driver = new AccelerantDriver();
|
||||||
driver = new ViewDriver();
|
}
|
||||||
#endif
|
else
|
||||||
|
{
|
||||||
|
// Eventually, it would be nice to do away with ViewDriver and replace it with
|
||||||
|
// one which uses a double-buffered BDirectWindow as a rendering context
|
||||||
|
driver = new ViewDriver();
|
||||||
|
}
|
||||||
|
|
||||||
if(driver->Initialize()){
|
if(driver->Initialize())
|
||||||
|
{
|
||||||
driverCount++;
|
driverCount++;
|
||||||
|
|
||||||
Screen *sc = new Screen(driver, BPoint(640, 480), B_RGB32, driverCount);
|
Screen *sc = new Screen(driver, BPoint(640, 480), B_RGB32, driverCount);
|
||||||
// TODO: be careful, it may fail to initialize! - Monitor may not support 640x480
|
|
||||||
|
// TODO: be careful, it may fail to initialize! - Monitor may not support 640x480
|
||||||
fScreenList.AddItem(sc);
|
fScreenList.AddItem(sc);
|
||||||
|
|
||||||
// TODO: remove this when you have a real Driver.
|
// TODO: remove this when you have a real Driver.
|
||||||
if (driverCount == 1)//2)
|
if (driverCount == 1)
|
||||||
initDrivers = false;
|
initDrivers = false;
|
||||||
}
|
}
|
||||||
else{
|
else
|
||||||
|
{
|
||||||
driver->Shutdown();
|
driver->Shutdown();
|
||||||
delete driver;
|
delete driver;
|
||||||
driver = NULL;
|
driver = NULL;
|
||||||
@@ -107,19 +124,20 @@ void Desktop::Init(void){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (driverCount < 1){
|
if (driverCount < 1)
|
||||||
delete this;
|
delete this;
|
||||||
}
|
|
||||||
|
|
||||||
InitMode();
|
InitMode();
|
||||||
|
|
||||||
SetActiveRootLayerByIndex(0);
|
SetActiveRootLayerByIndex(0);
|
||||||
}
|
}
|
||||||
//---------------------------------------------------------------------------
|
|
||||||
void Desktop::InitMode(void){
|
void Desktop::InitMode(void)
|
||||||
// this is init mode for n-SS.
|
{
|
||||||
|
// this is init mode for n-SS.
|
||||||
fActiveScreen = fScreenList.ItemAt(0)? (Screen*)fScreenList.ItemAt(0): NULL;
|
fActiveScreen = fScreenList.ItemAt(0)? (Screen*)fScreenList.ItemAt(0): NULL;
|
||||||
for (int32 i=0; i<fScreenList.CountItems(); i++){
|
for (int32 i=0; i<fScreenList.CountItems(); i++)
|
||||||
|
{
|
||||||
char name[32];
|
char name[32];
|
||||||
sprintf(name, "RootLayer %ld", i+1);
|
sprintf(name, "RootLayer %ld", i+1);
|
||||||
|
|
||||||
@@ -133,38 +151,45 @@ void Desktop::InitMode(void){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Methods for multiple monitors.
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
Screen* Desktop::ScreenAt(int32 index) const{
|
// Methods for multiple monitors.
|
||||||
Screen *sc;
|
//---------------------------------------------------------------------------
|
||||||
sc = static_cast<Screen*>(fScreenList.ItemAt(index));
|
|
||||||
|
|
||||||
|
Screen* Desktop::ScreenAt(int32 index) const
|
||||||
|
{
|
||||||
|
Screen *sc= static_cast<Screen*>(fScreenList.ItemAt(index));
|
||||||
|
|
||||||
return sc;
|
return sc;
|
||||||
}
|
}
|
||||||
//---------------------------------------------------------------------------
|
|
||||||
int32 Desktop::ScreenCount() const{
|
int32 Desktop::ScreenCount(void) const
|
||||||
|
{
|
||||||
return fScreenList.CountItems();
|
return fScreenList.CountItems();
|
||||||
}
|
}
|
||||||
//---------------------------------------------------------------------------
|
|
||||||
Screen* Desktop::ActiveScreen() const{
|
Screen* Desktop::ActiveScreen(void) const
|
||||||
|
{
|
||||||
return fActiveScreen;
|
return fActiveScreen;
|
||||||
}
|
}
|
||||||
//---------------------------------------------------------------------------
|
|
||||||
void Desktop::SetActiveRootLayerByIndex(int32 listIndex){
|
void Desktop::SetActiveRootLayerByIndex(int32 listIndex)
|
||||||
RootLayer *rl;
|
{
|
||||||
rl = RootLayerAt(listIndex);
|
RootLayer *rl=RootLayerAt(listIndex);
|
||||||
|
|
||||||
if (rl)
|
if (rl)
|
||||||
SetActiveRootLayer(rl);
|
SetActiveRootLayer(rl);
|
||||||
}
|
}
|
||||||
//---------------------------------------------------------------------------
|
|
||||||
void Desktop::SetActiveRootLayer(RootLayer* rl){
|
void Desktop::SetActiveRootLayer(RootLayer* rl)
|
||||||
|
{
|
||||||
if (fActiveRootLayer == rl)
|
if (fActiveRootLayer == rl)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
fActiveRootLayer = rl;
|
fActiveRootLayer = rl;
|
||||||
|
|
||||||
// TODO: fix!!!!!!!!!!!!!!!!!!!!!!!! or not?
|
// TODO: fix!!!!!!!!!!!!!!!!!!!!!!!! or not?
|
||||||
// also set he new front and focus
|
// also set the new front and focus
|
||||||
// SetFrontWinBorder(fActiveRootLayer->ActiveWorkspace()->FrontLayer());
|
// SetFrontWinBorder(fActiveRootLayer->ActiveWorkspace()->FrontLayer());
|
||||||
// SetFocusWinBorder(fActiveRootLayer->ActiveWorkspace()->FocusLayer());
|
// SetFocusWinBorder(fActiveRootLayer->ActiveWorkspace()->FocusLayer());
|
||||||
|
|
||||||
@@ -173,52 +198,62 @@ void Desktop::SetActiveRootLayer(RootLayer* rl){
|
|||||||
// hide the mouse in the old ActiveRootLayer
|
// hide the mouse in the old ActiveRootLayer
|
||||||
// show the mouse in new ActiveRootLayer
|
// show the mouse in new ActiveRootLayer
|
||||||
}
|
}
|
||||||
//---------------------------------------------------------------------------
|
|
||||||
RootLayer* Desktop::ActiveRootLayer() const{
|
RootLayer* Desktop::ActiveRootLayer(void) const
|
||||||
|
{
|
||||||
return fActiveRootLayer;
|
return fActiveRootLayer;
|
||||||
}
|
}
|
||||||
//---------------------------------------------------------------------------
|
|
||||||
int32 Desktop::ActiveRootLayerIndex() const{
|
int32 Desktop::ActiveRootLayerIndex(void) const
|
||||||
|
{
|
||||||
int32 rootLayerCount = CountRootLayers();
|
int32 rootLayerCount = CountRootLayers();
|
||||||
for(int32 i=0; i<rootLayerCount; i++){
|
for(int32 i=0; i<rootLayerCount; i++)
|
||||||
|
{
|
||||||
if(fActiveRootLayer == (RootLayer*)(fRootLayerList.ItemAt(i)))
|
if(fActiveRootLayer == (RootLayer*)(fRootLayerList.ItemAt(i)))
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
//---------------------------------------------------------------------------
|
|
||||||
RootLayer* Desktop::RootLayerAt(int32 index){
|
RootLayer* Desktop::RootLayerAt(int32 index)
|
||||||
RootLayer *rl;
|
{
|
||||||
rl = static_cast<RootLayer*>(fRootLayerList.ItemAt(index));
|
RootLayer *rl=static_cast<RootLayer*>(fRootLayerList.ItemAt(index));
|
||||||
|
|
||||||
return rl;
|
return rl;
|
||||||
}
|
}
|
||||||
//---------------------------------------------------------------------------
|
|
||||||
int32 Desktop::CountRootLayers() const{
|
int32 Desktop::CountRootLayers() const
|
||||||
|
{
|
||||||
return fRootLayerList.CountItems();
|
return fRootLayerList.CountItems();
|
||||||
}
|
}
|
||||||
|
|
||||||
DisplayDriver* Desktop::GetDisplayDriver() const{
|
DisplayDriver* Desktop::GetDisplayDriver() const
|
||||||
|
{
|
||||||
return ScreenAt(0)->DDriver();
|
return ScreenAt(0)->DDriver();
|
||||||
}
|
}
|
||||||
// Methods for layer(WinBorder) manipulation.
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
void Desktop::AddWinBorder(WinBorder* winBorder){
|
// Methods for layer(WinBorder) manipulation.
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
void Desktop::AddWinBorder(WinBorder* winBorder)
|
||||||
|
{
|
||||||
if(fWinBorderList.HasItem(winBorder))
|
if(fWinBorderList.HasItem(winBorder))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// special case for Tracker background window.
|
// special case for Tracker background window.
|
||||||
if (winBorder->_level == B_SYSTEM_LAST){
|
if (winBorder->_level == B_SYSTEM_LAST)
|
||||||
// it's added in all RottLayers
|
{
|
||||||
for(int32 i=0; i<fRootLayerList.CountItems(); i++){
|
// it's added in all RottLayers
|
||||||
|
for(int32 i=0; i<fRootLayerList.CountItems(); i++)
|
||||||
((RootLayer*)fRootLayerList.ItemAt(i))->AddWinBorder(winBorder);
|
((RootLayer*)fRootLayerList.ItemAt(i))->AddWinBorder(winBorder);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// other windows are added to the current RootLayer only.
|
|
||||||
else
|
else
|
||||||
|
// other windows are added to the current RootLayer only.
|
||||||
ActiveRootLayer()->AddWinBorder(winBorder);
|
ActiveRootLayer()->AddWinBorder(winBorder);
|
||||||
|
|
||||||
// add that pointer to user winboder list so that we can keep track of them.
|
// add that pointer to user winboder list so that we can keep track of them.
|
||||||
fLayerLock.Lock();
|
fLayerLock.Lock();
|
||||||
fWinBorderList.AddItem(winBorder);
|
fWinBorderList.AddItem(winBorder);
|
||||||
fLayerLock.Unlock();
|
fLayerLock.Unlock();
|
||||||
@@ -227,15 +262,16 @@ void Desktop::AddWinBorder(WinBorder* winBorder){
|
|||||||
// SetFrontWinBorder(fActiveRootLayer->ActiveWorkspace()->FrontLayer());
|
// SetFrontWinBorder(fActiveRootLayer->ActiveWorkspace()->FrontLayer());
|
||||||
// SetFocusWinBorder(fActiveRootLayer->ActiveWorkspace()->FocusLayer());
|
// SetFocusWinBorder(fActiveRootLayer->ActiveWorkspace()->FocusLayer());
|
||||||
}
|
}
|
||||||
//---------------------------------------------------------------------------
|
|
||||||
void Desktop::RemoveWinBorder(WinBorder* winBorder){
|
void Desktop::RemoveWinBorder(WinBorder* winBorder)
|
||||||
if(winBorder->_level == B_SYSTEM_LAST){
|
{
|
||||||
|
if(winBorder->_level == B_SYSTEM_LAST)
|
||||||
|
{
|
||||||
for(int32 i=0; i<fRootLayerList.CountItems(); i++)
|
for(int32 i=0; i<fRootLayerList.CountItems(); i++)
|
||||||
((RootLayer*)fRootLayerList.ItemAt(i))->RemoveWinBorder(winBorder);
|
((RootLayer*)fRootLayerList.ItemAt(i))->RemoveWinBorder(winBorder);
|
||||||
}
|
}
|
||||||
else{
|
else
|
||||||
winBorder->GetRootLayer()->RemoveWinBorder(winBorder);
|
winBorder->GetRootLayer()->RemoveWinBorder(winBorder);
|
||||||
}
|
|
||||||
|
|
||||||
// TODO: remove those 4? I vote for: YES! still... have to think...
|
// TODO: remove those 4? I vote for: YES! still... have to think...
|
||||||
// if (winBorder == fFrontWinBorder)
|
// if (winBorder == fFrontWinBorder)
|
||||||
@@ -247,18 +283,22 @@ void Desktop::RemoveWinBorder(WinBorder* winBorder){
|
|||||||
fWinBorderList.RemoveItem(winBorder);
|
fWinBorderList.RemoveItem(winBorder);
|
||||||
fLayerLock.Unlock();
|
fLayerLock.Unlock();
|
||||||
}
|
}
|
||||||
//---------------------------------------------------------------------------
|
|
||||||
bool Desktop::HasWinBorder(WinBorder* winBorder){
|
bool Desktop::HasWinBorder(WinBorder* winBorder)
|
||||||
|
{
|
||||||
return fWinBorderList.HasItem(winBorder);
|
return fWinBorderList.HasItem(winBorder);
|
||||||
}
|
}
|
||||||
//---------------------------------------------------------------------------
|
|
||||||
void Desktop::SetFrontWinBorder(WinBorder* winBorder){
|
void Desktop::SetFrontWinBorder(WinBorder* winBorder)
|
||||||
|
{
|
||||||
fFrontWinBorder = winBorder;
|
fFrontWinBorder = winBorder;
|
||||||
// TODO: implement
|
STRACE(("Desktop::SetFrontWinBorder() unimplemented!\n"));
|
||||||
|
// TODO: implement
|
||||||
}
|
}
|
||||||
//---------------------------------------------------------------------------
|
|
||||||
// TODO: remove shortly?
|
// TODO: remove shortly?
|
||||||
void Desktop::SetFocusWinBorder(WinBorder* winBorder){
|
void Desktop::SetFocusWinBorder(WinBorder* winBorder)
|
||||||
|
{
|
||||||
if (FocusWinBorder() == winBorder && (winBorder && !winBorder->IsHidden()))
|
if (FocusWinBorder() == winBorder && (winBorder && !winBorder->IsHidden()))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -267,51 +307,55 @@ void Desktop::SetFocusWinBorder(WinBorder* winBorder){
|
|||||||
// NOTE: we assume both, the old and new focus layer are in the active workspace
|
// NOTE: we assume both, the old and new focus layer are in the active workspace
|
||||||
WinBorder *newFocus = NULL;
|
WinBorder *newFocus = NULL;
|
||||||
|
|
||||||
if(fFocusWinBorder){
|
if(fFocusWinBorder)
|
||||||
fFocusWinBorder->SetFocus(false);
|
fFocusWinBorder->SetFocus(false);
|
||||||
}
|
|
||||||
|
|
||||||
if(winBorder){
|
if(winBorder)
|
||||||
// TODO: NO! this call is to determine the correct order! NOT to rebuild/redraw anything!
|
{
|
||||||
// TODO: WinBorder::SetFront... will do that - both!
|
// TODO: NO! this call is to determine the correct order! NOT to rebuild/redraw anything!
|
||||||
// TODO: modify later
|
// TODO: WinBorder::SetFront... will do that - both!
|
||||||
// TODO: same applies for the focus state - RootLayer::SetFocus also does redraw
|
// TODO: modify later
|
||||||
// Workspace::SetFocus - Only determines the focus! Just like above!
|
// TODO: same applies for the focus state - RootLayer::SetFocus also does redraw
|
||||||
/*
|
// Workspace::SetFocus - Only determines the focus! Just like above!
|
||||||
newFocus = winBorder->GetRootLayer()->ActiveWorkspace()->SetFocusLayer(winBorder);
|
|
||||||
newFocus->SetFocus(true);
|
|
||||||
*/
|
|
||||||
Workspace *aws;
|
|
||||||
|
|
||||||
aws = winBorder->GetRootLayer()->ActiveWorkspace();
|
// newFocus = winBorder->GetRootLayer()->ActiveWorkspace()->SetFocusLayer(winBorder);
|
||||||
|
// newFocus->SetFocus(true);
|
||||||
|
|
||||||
|
Workspace *aws;
|
||||||
|
|
||||||
|
aws = winBorder->GetRootLayer()->ActiveWorkspace();
|
||||||
aws->SearchAndSetNewFocus(winBorder);
|
aws->SearchAndSetNewFocus(winBorder);
|
||||||
|
|
||||||
//why do put this line? Eh... I will remove it later...
|
//why do put this line? Eh... I will remove it later...
|
||||||
newFocus = aws->FocusLayer();
|
newFocus = aws->FocusLayer();
|
||||||
|
|
||||||
aws->FocusLayer()->SetFocus(true);
|
aws->FocusLayer()->SetFocus(true);
|
||||||
|
|
||||||
aws->Invalidate();
|
aws->Invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
fFocusWinBorder = newFocus;
|
fFocusWinBorder = newFocus;
|
||||||
}
|
}
|
||||||
//---------------------------------------------------------------------------
|
|
||||||
WinBorder* Desktop::FrontWinBorder(void) const{
|
WinBorder* Desktop::FrontWinBorder(void) const
|
||||||
return fActiveRootLayer->ActiveWorkspace()->FrontLayer();
|
{
|
||||||
// return fFrontWinBorder;
|
return fActiveRootLayer->ActiveWorkspace()->FrontLayer();
|
||||||
}
|
}
|
||||||
//---------------------------------------------------------------------------
|
|
||||||
WinBorder* Desktop::FocusWinBorder(void) const{
|
WinBorder* Desktop::FocusWinBorder(void) const
|
||||||
return fActiveRootLayer->ActiveWorkspace()->FocusLayer();
|
{
|
||||||
// return fFocusWinBorder;
|
return fActiveRootLayer->ActiveWorkspace()->FocusLayer();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Input related methods
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
void Desktop::MouseEventHandler(PortMessage *msg){
|
// Input related methods
|
||||||
switch(msg->Code()){
|
//---------------------------------------------------------------------------
|
||||||
case B_MOUSE_DOWN:{
|
void Desktop::MouseEventHandler(PortMessage *msg)
|
||||||
|
{
|
||||||
|
switch(msg->Code())
|
||||||
|
{
|
||||||
|
case B_MOUSE_DOWN:
|
||||||
|
{
|
||||||
// Attached data:
|
// Attached data:
|
||||||
// 1) int64 - time of mouse click
|
// 1) int64 - time of mouse click
|
||||||
// 2) float - x coordinate of mouse click
|
// 2) float - x coordinate of mouse click
|
||||||
@@ -353,7 +397,8 @@ void Desktop::MouseEventHandler(PortMessage *msg){
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case B_MOUSE_UP:{
|
case B_MOUSE_UP:
|
||||||
|
{
|
||||||
// Attached data:
|
// Attached data:
|
||||||
// 1) int64 - time of mouse click
|
// 1) int64 - time of mouse click
|
||||||
// 2) float - x coordinate of mouse click
|
// 2) float - x coordinate of mouse click
|
||||||
@@ -377,7 +422,8 @@ void Desktop::MouseEventHandler(PortMessage *msg){
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case B_MOUSE_MOVED:{
|
case B_MOUSE_MOVED:
|
||||||
|
{
|
||||||
// Attached data:
|
// Attached data:
|
||||||
// 1) int64 - time of mouse click
|
// 1) int64 - time of mouse click
|
||||||
// 2) float - x coordinate of mouse click
|
// 2) float - x coordinate of mouse click
|
||||||
@@ -402,21 +448,280 @@ void Desktop::MouseEventHandler(PortMessage *msg){
|
|||||||
target->MouseMoved(pt,buttons);
|
target->MouseMoved(pt,buttons);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case B_MOUSE_WHEEL_CHANGED:{
|
case B_MOUSE_WHEEL_CHANGED:
|
||||||
|
{
|
||||||
// TODO: Later on, this will need to be passed onto the client ServerWindow
|
// TODO: Later on, this will need to be passed onto the client ServerWindow
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:{
|
default:
|
||||||
|
{
|
||||||
printf("\nDesktop::MouseEventHandler(): WARNING: unknown message\n\n");
|
printf("\nDesktop::MouseEventHandler(): WARNING: unknown message\n\n");
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//---------------------------------------------------------------------------
|
|
||||||
void Desktop::KeyboardEventHandler(PortMessage *msg){
|
void Desktop::KeyboardEventHandler(PortMessage *msg)
|
||||||
|
{
|
||||||
|
int8 *index=(int8*)msg->Buffer();
|
||||||
|
|
||||||
|
switch(msg->Code())
|
||||||
|
{
|
||||||
|
case B_KEY_DOWN:
|
||||||
|
{
|
||||||
|
// Attached Data:
|
||||||
|
// 1) int64 bigtime_t object of when the message was sent
|
||||||
|
// 2) int32 raw key code (scancode)
|
||||||
|
// 3) int32 modifier-independent ASCII code for the character
|
||||||
|
// 4) int32 repeat count
|
||||||
|
// 5) int32 modifiers
|
||||||
|
// 6) int8[3] UTF-8 data generated
|
||||||
|
// 7) int8 number of bytes to follow containing the
|
||||||
|
// generated string
|
||||||
|
// 8) Character string generated by the keystroke
|
||||||
|
// 9) int8[16] state of all keys
|
||||||
|
|
||||||
|
// Obtain only what data which we'll need
|
||||||
|
STRACE(("Key Down: 0x%lx\n",scancode));
|
||||||
|
index+=sizeof(int64);
|
||||||
|
int32 scancode=*((int32*)index); index+=sizeof(int32) * 3;
|
||||||
|
int32 modifiers=*((int32*)index); index+=sizeof(int32) + (sizeof(int8) * 3);
|
||||||
|
int8 stringlength=*index; index+=stringlength;
|
||||||
|
if(DISPLAYDRIVER==HWDRIVER)
|
||||||
|
{
|
||||||
|
// Check for workspace change or safe video mode
|
||||||
|
if(scancode>0x01 && scancode<0x0e)
|
||||||
|
{
|
||||||
|
if(scancode==0x0d)
|
||||||
|
{
|
||||||
|
if(modifiers & (B_LEFT_COMMAND_KEY |
|
||||||
|
B_LEFT_CONTROL_KEY | B_LEFT_SHIFT_KEY))
|
||||||
|
{
|
||||||
|
// TODO: Set to Safe Mode here. (DisplayDriver API change)
|
||||||
|
STRACE(("Safe Video Mode invoked - code unimplemented\n"));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(modifiers & B_CONTROL_KEY)
|
||||||
|
{
|
||||||
|
STRACE(("Set Workspace %ld\n",scancode-1));
|
||||||
|
|
||||||
|
//TODO: change
|
||||||
|
//SetWorkspace(scancode-2);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Tab key
|
||||||
|
if(scancode==0x26 && (modifiers & B_CONTROL_KEY))
|
||||||
|
{
|
||||||
|
ServerApp *deskbar=app_server->FindApp("application/x-vnd.Be-TSKB");
|
||||||
|
if(deskbar)
|
||||||
|
{
|
||||||
|
printf("Send Twitcher message key to Deskbar - unimplmemented\n");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// PrintScreen
|
||||||
|
if(scancode==0xe)
|
||||||
|
{
|
||||||
|
if(GetDisplayDriver())
|
||||||
|
{
|
||||||
|
char filename[128];
|
||||||
|
BEntry entry;
|
||||||
|
|
||||||
|
sprintf(filename,"/boot/home/screen%ld.png",fScreenShotIndex);
|
||||||
|
entry.SetTo(filename);
|
||||||
|
|
||||||
|
while(entry.Exists())
|
||||||
|
{
|
||||||
|
fScreenShotIndex++;
|
||||||
|
sprintf(filename,"/boot/home/screen%ld.png",fScreenShotIndex);
|
||||||
|
}
|
||||||
|
fScreenShotIndex++;
|
||||||
|
GetDisplayDriver()->DumpToFile(filename);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// F12
|
||||||
|
if(scancode>0x1 && scancode<0xe)
|
||||||
|
{
|
||||||
|
if(scancode==0xd)
|
||||||
|
{
|
||||||
|
if(modifiers & (B_LEFT_CONTROL_KEY | B_LEFT_SHIFT_KEY | B_LEFT_OPTION_KEY))
|
||||||
|
{
|
||||||
|
// TODO: Set to Safe Mode here. (DisplayDriver API change)
|
||||||
|
STRACE(("Safe Video Mode invoked - code unimplemented\n"));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(modifiers & (B_LEFT_SHIFT_KEY | B_LEFT_CONTROL_KEY))
|
||||||
|
{
|
||||||
|
STRACE(("Set Workspace %ld\n",scancode-1));
|
||||||
|
//TODO: resolve
|
||||||
|
//SetWorkspace(scancode-2);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Tab
|
||||||
|
if(scancode==0x26 && (modifiers & B_SHIFT_KEY))
|
||||||
|
{
|
||||||
|
STRACE(("Twitcher\n"));
|
||||||
|
ServerApp *deskbar=app_server->FindApp("application/x-vnd.Be-TSKB");
|
||||||
|
if(deskbar)
|
||||||
|
{
|
||||||
|
printf("Send Twitcher message key to Deskbar - unimplmemented\n");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Pause/Break
|
||||||
|
if(scancode==0x7f)
|
||||||
|
{
|
||||||
|
if(GetDisplayDriver())
|
||||||
|
{
|
||||||
|
char filename[128];
|
||||||
|
BEntry entry;
|
||||||
|
|
||||||
|
sprintf(filename,"/boot/home/screen%ld.png",fScreenShotIndex);
|
||||||
|
entry.SetTo(filename);
|
||||||
|
|
||||||
|
while(entry.Exists())
|
||||||
|
{
|
||||||
|
fScreenShotIndex++;
|
||||||
|
sprintf(filename,"/boot/home/screen%ld.png",fScreenShotIndex);
|
||||||
|
}
|
||||||
|
fScreenShotIndex++;
|
||||||
|
|
||||||
|
GetDisplayDriver()->DumpToFile(filename);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// We got this far, so apparently it's safe to pass to the active
|
||||||
|
// window.
|
||||||
|
|
||||||
|
// TODO: Pass on to ServerWindow? WinBorder? Client window?
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case B_KEY_UP:
|
||||||
|
{
|
||||||
|
// Attached Data:
|
||||||
|
// 1) int64 bigtime_t object of when the message was sent
|
||||||
|
// 2) int32 raw key code (scancode)
|
||||||
|
// 3) int32 modifier-independent ASCII code for the character
|
||||||
|
// 4) int32 modifiers
|
||||||
|
// 5) int8[3] UTF-8 data generated
|
||||||
|
// 6) int8 number of bytes to follow containing the
|
||||||
|
// generated string
|
||||||
|
// 7) Character string generated by the keystroke
|
||||||
|
// 8) int8[16] state of all keys
|
||||||
|
|
||||||
|
// Obtain only what data which we'll need
|
||||||
|
index+=sizeof(int64);
|
||||||
|
int32 scancode=*((int32*)index); index+=sizeof(int32) * 3;
|
||||||
|
int32 modifiers=*((int32*)index); index+=sizeof(int8) * 3;
|
||||||
|
int8 stringlength=*index; index+=stringlength + sizeof(int8);
|
||||||
|
STRACE(("Key Up: 0x%lx\n",scancode));
|
||||||
|
|
||||||
|
if(DISPLAYDRIVER==HWDRIVER)
|
||||||
|
{
|
||||||
|
// Tab key
|
||||||
|
if(scancode==0x26 && (modifiers & B_CONTROL_KEY))
|
||||||
|
{
|
||||||
|
ServerApp *deskbar=app_server->FindApp("application/x-vnd.Be-TSKB");
|
||||||
|
if(deskbar)
|
||||||
|
{
|
||||||
|
printf("Send Twitcher message key to Deskbar - unimplmemented\n");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(scancode==0x26 && (modifiers & B_LEFT_SHIFT_KEY))
|
||||||
|
{
|
||||||
|
ServerApp *deskbar=app_server->FindApp("application/x-vnd.Be-TSKB");
|
||||||
|
if(deskbar)
|
||||||
|
{
|
||||||
|
printf("Send Twitcher message key to Deskbar - unimplmemented\n");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// We got this far, so apparently it's safe to pass to the active
|
||||||
|
// window.
|
||||||
|
|
||||||
|
// TODO: Pass on to ServerWindow? WinBorder? Client window?
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case B_UNMAPPED_KEY_DOWN:
|
||||||
|
{
|
||||||
|
// Attached Data:
|
||||||
|
// 1) int64 bigtime_t object of when the message was sent
|
||||||
|
// 2) int32 raw key code (scancode)
|
||||||
|
// 3) int32 modifiers
|
||||||
|
// 4) int32 number of elements in the key state array to follow
|
||||||
|
// 5) int8 state of all keys
|
||||||
|
|
||||||
|
#ifdef DEBUG_KEYHANDLING
|
||||||
|
index+=sizeof(bigtime_t);
|
||||||
|
printf("Unmapped Key Down: 0x%lx\n",*((int32*)index));
|
||||||
|
#endif
|
||||||
|
// TODO: Pass on to ServerWindow? WinBorder? Client window?
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case B_UNMAPPED_KEY_UP:
|
||||||
|
{
|
||||||
|
// Attached Data:
|
||||||
|
// 1) int64 bigtime_t object of when the message was sent
|
||||||
|
// 2) int32 raw key code (scancode)
|
||||||
|
// 3) int32 modifiers
|
||||||
|
// 4) int32 number of elements in the key state array to follow
|
||||||
|
// 5) int8 state of all keys
|
||||||
|
|
||||||
|
#ifdef DEBUG_KEYHANDLING
|
||||||
|
index+=sizeof(bigtime_t);
|
||||||
|
printf("Unmapped Key Up: 0x%lx\n",*((int32*)index));
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// TODO: Pass on to ServerWindow? WinBorder? Client window?
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case B_MODIFIERS_CHANGED:
|
||||||
|
{
|
||||||
|
// Attached Data:
|
||||||
|
// 1) int64 bigtime_t object of when the message was sent
|
||||||
|
// 2) int32 modifiers
|
||||||
|
// 3) int32 old modifiers
|
||||||
|
// 4) int32 number of elements in the key state array to follow
|
||||||
|
// 5) int8 state of all keys
|
||||||
|
|
||||||
|
#ifdef DEBUG_KEYHANDLING
|
||||||
|
index+=sizeof(bigtime_t);
|
||||||
|
printf("Modifiers Changed\n");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// TODO: Pass on to ServerWindow? WinBorder? Client window?
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//---------------------------------------------------------------------------
|
|
||||||
void Desktop::SetDragMessage(BMessage* msg){
|
void Desktop::SetDragMessage(BMessage* msg)
|
||||||
if (fDragMessage){
|
{
|
||||||
|
if (fDragMessage)
|
||||||
|
{
|
||||||
delete fDragMessage;
|
delete fDragMessage;
|
||||||
fDragMessage = NULL;
|
fDragMessage = NULL;
|
||||||
}
|
}
|
||||||
@@ -424,82 +729,100 @@ void Desktop::SetDragMessage(BMessage* msg){
|
|||||||
if (msg)
|
if (msg)
|
||||||
fDragMessage = new BMessage(*msg);
|
fDragMessage = new BMessage(*msg);
|
||||||
}
|
}
|
||||||
//---------------------------------------------------------------------------
|
|
||||||
BMessage* Desktop::DragMessage(void) const{
|
BMessage* Desktop::DragMessage(void) const
|
||||||
|
{
|
||||||
return fDragMessage;
|
return fDragMessage;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Methods for various desktop stuff handled by the server
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
void Desktop::SetScrollBarInfo(const scroll_bar_info &info){
|
// Methods for various desktop stuff handled by the server
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
void Desktop::SetScrollBarInfo(const scroll_bar_info &info)
|
||||||
|
{
|
||||||
fScrollBarInfo = info;
|
fScrollBarInfo = info;
|
||||||
}
|
}
|
||||||
//---------------------------------------------------------------------------
|
|
||||||
scroll_bar_info Desktop::ScrollBarInfo(void) const{
|
scroll_bar_info Desktop::ScrollBarInfo(void) const
|
||||||
|
{
|
||||||
return fScrollBarInfo;
|
return fScrollBarInfo;
|
||||||
}
|
}
|
||||||
//---------------------------------------------------------------------------
|
|
||||||
void Desktop::SetMenuInfo(const menu_info &info){
|
void Desktop::SetMenuInfo(const menu_info &info)
|
||||||
|
{
|
||||||
fMenuInfo = info;
|
fMenuInfo = info;
|
||||||
}
|
}
|
||||||
//---------------------------------------------------------------------------
|
|
||||||
menu_info Desktop::MenuInfo(void) const{
|
menu_info Desktop::MenuInfo(void) const
|
||||||
|
{
|
||||||
return fMenuInfo;
|
return fMenuInfo;
|
||||||
}
|
}
|
||||||
//---------------------------------------------------------------------------
|
|
||||||
void Desktop::UseFFMouse(const bool &useffm){
|
void Desktop::UseFFMouse(const bool &useffm)
|
||||||
|
{
|
||||||
fFFMouseMode = useffm;
|
fFFMouseMode = useffm;
|
||||||
}
|
}
|
||||||
//---------------------------------------------------------------------------
|
|
||||||
bool Desktop::FFMouseInUse(void) const{
|
bool Desktop::FFMouseInUse(void) const
|
||||||
|
{
|
||||||
return fFFMouseMode;
|
return fFFMouseMode;
|
||||||
}
|
}
|
||||||
//---------------------------------------------------------------------------
|
|
||||||
void Desktop::SetFFMouseMode(const mode_mouse &value){
|
void Desktop::SetFFMouseMode(const mode_mouse &value)
|
||||||
|
{
|
||||||
fMouseMode = value;
|
fMouseMode = value;
|
||||||
}
|
}
|
||||||
//---------------------------------------------------------------------------
|
|
||||||
mode_mouse Desktop::FFMouseMode(void) const{
|
mode_mouse Desktop::FFMouseMode(void) const
|
||||||
|
{
|
||||||
return fMouseMode;
|
return fMouseMode;
|
||||||
}
|
}
|
||||||
//---------------------------------------------------------------------------
|
|
||||||
bool Desktop::ReadWorkspaceData(void){
|
bool Desktop::ReadWorkspaceData(void)
|
||||||
// TODO: implement
|
{
|
||||||
|
// TODO: implement
|
||||||
|
STRACE(("Desktop::ReadWorkspaceData unimplemented\n"));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
//---------------------------------------------------------------------------
|
|
||||||
void Desktop::SaveWorkspaceData(void){
|
void Desktop::SaveWorkspaceData(void)
|
||||||
// TODO: implement
|
{
|
||||||
|
// TODO: implement
|
||||||
|
STRACE(("Desktop::ReadWorkspaceData unimplemented\n"));
|
||||||
}
|
}
|
||||||
//---------------------------------------------------------------------------
|
|
||||||
void Desktop::RemoveSubsetWindow(WinBorder* wb){
|
void Desktop::RemoveSubsetWindow(WinBorder* wb)
|
||||||
|
{
|
||||||
WinBorder *winBorder = NULL;
|
WinBorder *winBorder = NULL;
|
||||||
|
|
||||||
fLayerLock.Lock();
|
fLayerLock.Lock();
|
||||||
int32 count = fWinBorderList.CountItems();
|
int32 count = fWinBorderList.CountItems();
|
||||||
for(int32 i=0; i < count; i++){
|
for(int32 i=0; i < count; i++)
|
||||||
|
{
|
||||||
winBorder = static_cast<WinBorder*>(fWinBorderList.ItemAt(i));
|
winBorder = static_cast<WinBorder*>(fWinBorderList.ItemAt(i));
|
||||||
if (winBorder->_level == B_NORMAL_FEEL)
|
if (winBorder->_level == B_NORMAL_FEEL)
|
||||||
winBorder->Window()->fWinFMWList.RemoveItem(wb);
|
winBorder->Window()->fWinFMWList.RemoveItem(wb);
|
||||||
}
|
}
|
||||||
fLayerLock.Unlock();
|
fLayerLock.Unlock();
|
||||||
|
|
||||||
RootLayer *rl = winBorder->GetRootLayer();
|
RootLayer *rl = winBorder->GetRootLayer();
|
||||||
|
|
||||||
if (!fGeneralLock.IsLocked())
|
if (!fGeneralLock.IsLocked())
|
||||||
debugger("Desktop::RemoveWinBorder() - fGeneralLock must be locked!\n");
|
debugger("Desktop::RemoveWinBorder() - fGeneralLock must be locked!\n");
|
||||||
if (!(rl->fMainLock.IsLocked()))
|
if (!(rl->fMainLock.IsLocked()))
|
||||||
debugger("Desktop::RemoveWinBorder() - fMainLock must be locked!\n");
|
debugger("Desktop::RemoveWinBorder() - fMainLock must be locked!\n");
|
||||||
|
|
||||||
int32 countWKs = rl->WorkspaceCount();
|
int32 countWKs = rl->WorkspaceCount();
|
||||||
for (int32 i=0; i < countWKs; i++){
|
for (int32 i=0; i < countWKs; i++)
|
||||||
rl->WorkspaceAt(i+1)->RemoveLayerPtr(wb);
|
rl->WorkspaceAt(i+1)->RemoveLayerPtr(wb);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
//---------------------------------------------------------------------------
|
|
||||||
void Desktop::PrintToStream(){
|
void Desktop::PrintToStream(void)
|
||||||
|
{
|
||||||
printf("RootLayer List:\n=======\n");
|
printf("RootLayer List:\n=======\n");
|
||||||
for(int32 i=0; i<fRootLayerList.CountItems(); i++){
|
for(int32 i=0; i<fRootLayerList.CountItems(); i++)
|
||||||
|
{
|
||||||
printf("\t%s\n", ((RootLayer*)fRootLayerList.ItemAt(i))->GetName());
|
printf("\t%s\n", ((RootLayer*)fRootLayerList.ItemAt(i))->GetName());
|
||||||
((RootLayer*)fRootLayerList.ItemAt(i))->PrintToStream();
|
((RootLayer*)fRootLayerList.ItemAt(i))->PrintToStream();
|
||||||
printf("-------\n");
|
printf("-------\n");
|
||||||
@@ -508,16 +831,16 @@ void Desktop::PrintToStream(){
|
|||||||
// printf("Active WinBorder: %s\n", fActiveWinBorder? fActiveWinBorder->Name(): "NULL");
|
// printf("Active WinBorder: %s\n", fActiveWinBorder? fActiveWinBorder->Name(): "NULL");
|
||||||
|
|
||||||
printf("Screen List:\n");
|
printf("Screen List:\n");
|
||||||
for(int32 i=0; i<fScreenList.CountItems(); i++){
|
for(int32 i=0; i<fScreenList.CountItems(); i++)
|
||||||
printf("\t%ld\n", ((Screen*)fScreenList.ItemAt(i))->ScreenNumber());
|
printf("\t%ld\n", ((Screen*)fScreenList.ItemAt(i))->ScreenNumber());
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
//---------------------------------------------------------------------------
|
|
||||||
WinBorder* Desktop::FindWinBorderByServerWindowTokenAndTeamID(int32 token, team_id teamID){
|
WinBorder* Desktop::FindWinBorderByServerWindowTokenAndTeamID(int32 token, team_id teamID)
|
||||||
|
{
|
||||||
WinBorder* wb;
|
WinBorder* wb;
|
||||||
fLayerLock.Lock();
|
fLayerLock.Lock();
|
||||||
for (int32 i = 0; (wb = (WinBorder*)fWinBorderList.ItemAt(i)); i++){
|
for (int32 i = 0; (wb = (WinBorder*)fWinBorderList.ItemAt(i)); i++)
|
||||||
|
{
|
||||||
if (wb->Window()->ClientToken() == token
|
if (wb->Window()->ClientToken() == token
|
||||||
&& wb->Window()->ClientTeamID() == teamID)
|
&& wb->Window()->ClientTeamID() == teamID)
|
||||||
break;
|
break;
|
||||||
@@ -526,16 +849,18 @@ WinBorder* Desktop::FindWinBorderByServerWindowTokenAndTeamID(int32 token, team_
|
|||||||
|
|
||||||
return wb;
|
return wb;
|
||||||
}
|
}
|
||||||
//---------------------------------------------------------------------------
|
|
||||||
void Desktop::PrintVisibleInRootLayerNo(int32 no){
|
void Desktop::PrintVisibleInRootLayerNo(int32 no)
|
||||||
|
{
|
||||||
if (no<0 || no>=fRootLayerList.CountItems())
|
if (no<0 || no>=fRootLayerList.CountItems())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
printf("Visible windows in RootLayer %ld, Workspace %ld\n",
|
printf("Visible windows in RootLayer %ld, Workspace %ld\n",
|
||||||
ActiveRootLayerIndex(), ActiveRootLayer()->ActiveWorkspaceIndex());
|
ActiveRootLayerIndex(), ActiveRootLayer()->ActiveWorkspaceIndex());
|
||||||
WinBorder *wb = NULL;
|
WinBorder *wb = NULL;
|
||||||
Workspace *ws = ActiveRootLayer()->ActiveWorkspace();
|
Workspace *ws = ActiveRootLayer()->ActiveWorkspace();
|
||||||
for(wb = (WinBorder*)ws->GoToTopItem(); wb != NULL; wb = (WinBorder*)ws->GoToLowerItem()){
|
for(wb = (WinBorder*)ws->GoToTopItem(); wb != NULL; wb = (WinBorder*)ws->GoToLowerItem())
|
||||||
|
{
|
||||||
if (!wb->IsHidden())
|
if (!wb->IsHidden())
|
||||||
wb->PrintToStream();
|
wb->PrintToStream();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,86 +43,90 @@ class DisplayDriver;
|
|||||||
class Desktop
|
class Desktop
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// startup methods
|
// startup methods
|
||||||
Desktop(void);
|
Desktop(void);
|
||||||
~Desktop(void);
|
~Desktop(void);
|
||||||
void Init(void);
|
void Init(void);
|
||||||
void InitMode(void); // 1-BigScreen or n-SmallScreens
|
|
||||||
|
|
||||||
// Methods for multiple monitors.
|
|
||||||
Screen* ScreenAt(int32 index) const;
|
|
||||||
int32 ScreenCount() const;
|
|
||||||
Screen* ActiveScreen() const;
|
|
||||||
|
|
||||||
void SetActiveRootLayerByIndex(int32 listIndex);
|
|
||||||
void SetActiveRootLayer(RootLayer* rl);
|
|
||||||
RootLayer* RootLayerAt(int32 index);
|
|
||||||
RootLayer* ActiveRootLayer() const;
|
|
||||||
int32 ActiveRootLayerIndex() const;
|
|
||||||
int32 CountRootLayers() const;
|
|
||||||
DisplayDriver* GetDisplayDriver() const;
|
|
||||||
|
|
||||||
// Methods for layer(WinBorder) manipulation.
|
|
||||||
void AddWinBorder(WinBorder* winBorder);
|
|
||||||
void RemoveWinBorder(WinBorder* winBorder);
|
|
||||||
bool HasWinBorder(WinBorder* winBorder);
|
|
||||||
void SetFrontWinBorder(WinBorder* winBorder);
|
|
||||||
void SetFocusWinBorder(WinBorder* winBorder);
|
|
||||||
WinBorder* FrontWinBorder(void) const;
|
|
||||||
WinBorder* FocusWinBorder(void) const;
|
|
||||||
|
|
||||||
// Input related methods
|
|
||||||
void MouseEventHandler(PortMessage *msg);
|
|
||||||
void KeyboardEventHandler(PortMessage *msg);
|
|
||||||
|
|
||||||
void SetDragMessage(BMessage* msg);
|
|
||||||
BMessage* DragMessage(void) const;
|
|
||||||
|
|
||||||
// Methods for various desktop stuff handled by the server
|
|
||||||
void SetScrollBarInfo(const scroll_bar_info &info);
|
|
||||||
scroll_bar_info ScrollBarInfo(void) const;
|
|
||||||
|
|
||||||
void SetMenuInfo(const menu_info &info);
|
|
||||||
menu_info MenuInfo(void) const;
|
|
||||||
|
|
||||||
|
|
||||||
void UseFFMouse(const bool &useffm);
|
|
||||||
bool FFMouseInUse(void) const;
|
|
||||||
void SetFFMouseMode(const mode_mouse &value);
|
|
||||||
mode_mouse FFMouseMode(void) const;
|
|
||||||
|
|
||||||
bool ReadWorkspaceData(void);
|
|
||||||
void SaveWorkspaceData(void);
|
|
||||||
|
|
||||||
// Debugging methods
|
|
||||||
void PrintToStream();
|
|
||||||
void PrintVisibleInRootLayerNo(int32 no);
|
|
||||||
|
|
||||||
// "Private" to app_server :-) - means they should not be used very much
|
|
||||||
void RemoveSubsetWindow(WinBorder* wb);
|
|
||||||
WinBorder* FindWinBorderByServerWindowTokenAndTeamID(int32 token, team_id teamID);
|
|
||||||
|
|
||||||
BLocker fGeneralLock;
|
|
||||||
BLocker fLayerLock;
|
|
||||||
BList fWinBorderList;
|
|
||||||
|
|
||||||
|
// 1-BigScreen or n-SmallScreens
|
||||||
|
void InitMode(void);
|
||||||
|
|
||||||
|
// Methods for multiple monitors.
|
||||||
|
Screen *ScreenAt(int32 index) const;
|
||||||
|
int32 ScreenCount(void) const;
|
||||||
|
Screen* ActiveScreen(void) const;
|
||||||
|
|
||||||
|
void SetActiveRootLayerByIndex(int32 listIndex);
|
||||||
|
void SetActiveRootLayer(RootLayer* rl);
|
||||||
|
RootLayer* RootLayerAt(int32 index);
|
||||||
|
RootLayer* ActiveRootLayer(void) const;
|
||||||
|
int32 ActiveRootLayerIndex(void) const;
|
||||||
|
int32 CountRootLayers(void) const;
|
||||||
|
DisplayDriver* GetDisplayDriver(void) const;
|
||||||
|
|
||||||
|
// Methods for layer(WinBorder) manipulation.
|
||||||
|
void AddWinBorder(WinBorder* winBorder);
|
||||||
|
void RemoveWinBorder(WinBorder* winBorder);
|
||||||
|
bool HasWinBorder(WinBorder* winBorder);
|
||||||
|
void SetFrontWinBorder(WinBorder* winBorder);
|
||||||
|
void SetFocusWinBorder(WinBorder* winBorder);
|
||||||
|
WinBorder* FrontWinBorder(void) const;
|
||||||
|
WinBorder* FocusWinBorder(void) const;
|
||||||
|
|
||||||
|
// Input related methods
|
||||||
|
void MouseEventHandler(PortMessage *msg);
|
||||||
|
void KeyboardEventHandler(PortMessage *msg);
|
||||||
|
|
||||||
|
void SetDragMessage(BMessage* msg);
|
||||||
|
BMessage* DragMessage(void) const;
|
||||||
|
|
||||||
|
// Methods for various desktop stuff handled by the server
|
||||||
|
void SetScrollBarInfo(const scroll_bar_info &info);
|
||||||
|
scroll_bar_info ScrollBarInfo(void) const;
|
||||||
|
|
||||||
|
void SetMenuInfo(const menu_info &info);
|
||||||
|
menu_info MenuInfo(void) const;
|
||||||
|
|
||||||
|
|
||||||
|
void UseFFMouse(const bool &useffm);
|
||||||
|
bool FFMouseInUse(void) const;
|
||||||
|
void SetFFMouseMode(const mode_mouse &value);
|
||||||
|
mode_mouse FFMouseMode(void) const;
|
||||||
|
|
||||||
|
bool ReadWorkspaceData(void);
|
||||||
|
void SaveWorkspaceData(void);
|
||||||
|
|
||||||
|
// Debugging methods
|
||||||
|
void PrintToStream(void);
|
||||||
|
void PrintVisibleInRootLayerNo(int32 no);
|
||||||
|
|
||||||
|
// "Private" to app_server :-) - means they should not be used very much
|
||||||
|
void RemoveSubsetWindow(WinBorder* wb);
|
||||||
|
WinBorder* FindWinBorderByServerWindowTokenAndTeamID(int32 token, team_id teamID);
|
||||||
|
|
||||||
|
BLocker fGeneralLock;
|
||||||
|
BLocker fLayerLock;
|
||||||
|
BList fWinBorderList;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
BMessage *fDragMessage;
|
||||||
|
|
||||||
|
BList fRootLayerList;
|
||||||
|
RootLayer* fActiveRootLayer;
|
||||||
|
WinBorder* fFrontWinBorder;
|
||||||
|
WinBorder* fFocusWinBorder;
|
||||||
|
|
||||||
|
BList fScreenList;
|
||||||
|
|
||||||
BMessage *fDragMessage;
|
// '1' or 'n' Screen(s). Not sure it's needed though.
|
||||||
|
int32 fScreenMode;
|
||||||
BList fRootLayerList;
|
Screen* fActiveScreen;
|
||||||
RootLayer* fActiveRootLayer;
|
|
||||||
WinBorder* fFrontWinBorder;
|
scroll_bar_info fScrollBarInfo;
|
||||||
WinBorder* fFocusWinBorder;
|
menu_info fMenuInfo;
|
||||||
|
mode_mouse fMouseMode;
|
||||||
BList fScreenList;
|
bool fFFMouseMode;
|
||||||
int32 fScreenMode; // '1' or 'n' Screen(s). Not sure it's needed though.
|
int32 fScreenShotIndex;
|
||||||
Screen* fActiveScreen;
|
|
||||||
|
|
||||||
scroll_bar_info fScrollBarInfo;
|
|
||||||
menu_info fMenuInfo;
|
|
||||||
mode_mouse fMouseMode;
|
|
||||||
bool fFFMouseMode;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
extern Desktop* desktop;
|
extern Desktop* desktop;
|
||||||
|
|||||||
Reference in New Issue
Block a user