Authors: Chris Morgan <cmorgan@wpi.edu>, James Abbatiello <abbeyj@wpi.edu>
[wine.git] / windows / x11drv / desktop.c
blob6e8e2dd26d93a45c2ea854cf7b801f881ed50862
1 /*
2 * X11 desktop driver
4 * Copyright 1998 Patrik Stridvall
6 */
8 #include "config.h"
10 #ifndef X_DISPLAY_MISSING
12 #include "debug.h"
13 #include "desktop.h"
14 #include "monitor.h"
15 #include "options.h"
16 #include "win.h"
17 #include "windef.h"
18 #include "x11drv.h"
20 /***********************************************************************
21 * X11DRV_DESKTOP_GetXScreen
23 * Return the X screen associated to the desktop.
25 Screen *X11DRV_DESKTOP_GetXScreen(DESKTOP *pDesktop)
27 return X11DRV_MONITOR_GetXScreen(pDesktop->pPrimaryMonitor);
30 /***********************************************************************
31 * X11DRV_DESKTOP_GetXRootWindow
33 * Return the X root window associated to the desktop.
35 Window X11DRV_DESKTOP_GetXRootWindow(DESKTOP *pDesktop)
37 return X11DRV_MONITOR_GetXRootWindow(pDesktop->pPrimaryMonitor);
40 /***********************************************************************
41 * X11DRV_DESKTOP_Initialize
43 void X11DRV_DESKTOP_Initialize(DESKTOP *pDesktop)
45 pDesktop->pPrimaryMonitor = &MONITOR_PrimaryMonitor;
48 /***********************************************************************
49 * X11DRV_DESKTOP_Finalize
51 void X11DRV_DESKTOP_Finalize(DESKTOP *pDesktop)
55 /***********************************************************************
56 * X11DRV_DESKTOP_GetScreenWidth
58 * Return the width of the screen associated to the desktop.
60 int X11DRV_DESKTOP_GetScreenWidth(DESKTOP *pDesktop)
62 return MONITOR_GetWidth(pDesktop->pPrimaryMonitor);
65 /***********************************************************************
66 * X11DRV_DESKTOP_GetScreenHeight
68 * Return the width of the screen associated to the desktop.
70 int X11DRV_DESKTOP_GetScreenHeight(DESKTOP *pDesktop)
72 return MONITOR_GetHeight(pDesktop->pPrimaryMonitor);
75 /***********************************************************************
76 * X11DRV_DESKTOP_GetScreenDepth
78 * Return the depth of the screen associated to the desktop.
80 int X11DRV_DESKTOP_GetScreenDepth(DESKTOP *pDesktop)
82 return MONITOR_GetDepth(pDesktop->pPrimaryMonitor);
85 #endif /* X_DISPLAY_MISSING */