While handling the X FocusIn message in managed mode, if the window
[wine] / windows / x11drv / desktop.c
1 /*
2  * X11 desktop driver
3  *
4  * Copyright 1998 Patrik Stridvall
5  *
6  */
7
8 #include "config.h"
9
10 #ifndef X_DISPLAY_MISSING
11
12 #include "debugtools.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"
19
20 /***********************************************************************
21  *              X11DRV_DESKTOP_GetXScreen
22  *
23  * Return the X screen associated to the desktop.
24  */
25 Screen *X11DRV_DESKTOP_GetXScreen(DESKTOP *pDesktop)
26 {
27   return X11DRV_MONITOR_GetXScreen(pDesktop->pPrimaryMonitor);
28 }
29
30 /***********************************************************************
31  *              X11DRV_DESKTOP_GetXRootWindow
32  *
33  * Return the X root window associated to the desktop.
34  */
35 Window X11DRV_DESKTOP_GetXRootWindow(DESKTOP *pDesktop)
36 {
37   return X11DRV_MONITOR_GetXRootWindow(pDesktop->pPrimaryMonitor);
38 }
39
40 /***********************************************************************
41  *              X11DRV_DESKTOP_Initialize
42  */
43 void X11DRV_DESKTOP_Initialize(DESKTOP *pDesktop)
44 {
45   pDesktop->pPrimaryMonitor = &MONITOR_PrimaryMonitor;
46 }
47
48 /***********************************************************************
49  *              X11DRV_DESKTOP_Finalize
50  */
51 void X11DRV_DESKTOP_Finalize(DESKTOP *pDesktop)
52 {
53 }
54
55 /***********************************************************************
56  *              X11DRV_DESKTOP_GetScreenWidth
57  *
58  * Return the width of the screen associated to the desktop.
59  */
60 int X11DRV_DESKTOP_GetScreenWidth(DESKTOP *pDesktop)
61 {
62   return MONITOR_GetWidth(pDesktop->pPrimaryMonitor);
63 }
64
65 /***********************************************************************
66  *              X11DRV_DESKTOP_GetScreenHeight
67  *
68  * Return the width of the screen associated to the desktop.
69  */
70 int X11DRV_DESKTOP_GetScreenHeight(DESKTOP *pDesktop)
71 {
72   return MONITOR_GetHeight(pDesktop->pPrimaryMonitor);
73 }
74
75 /***********************************************************************
76  *              X11DRV_DESKTOP_GetScreenDepth
77  *
78  * Return the depth of the screen associated to the desktop.
79  */
80 int X11DRV_DESKTOP_GetScreenDepth(DESKTOP *pDesktop)
81 {
82   return MONITOR_GetDepth(pDesktop->pPrimaryMonitor);
83 }
84
85 #endif /* X_DISPLAY_MISSING */