- New implementation of SendMessage, ReceiveMessage, ReplyMessage functions
[wine] / windows / ttydrv / monitor.c
1 /*
2  * TTY monitor driver
3  *
4  * Copyright 1998,1999 Patrik Stridvall
5  *
6  */
7
8 #include "heap.h"
9 #include "monitor.h"
10 #include "wintypes.h"
11 #include "ttydrv.h"
12
13 /***********************************************************************
14  *              TTYDRV_MONITOR_Initialize
15  */
16 void TTYDRV_MONITOR_Initialize(MONITOR *pMonitor)
17 {
18   TTYDRV_MONITOR_DATA *pTTYMonitor = (TTYDRV_MONITOR_DATA *) 
19     HeapAlloc(SystemHeap, 0, sizeof(TTYDRV_MONITOR_DATA));
20
21   pMonitor->pDriverData = pTTYMonitor;
22
23   pTTYMonitor->width  = 640; /* FIXME: Screen width in pixels */
24   pTTYMonitor->height = 480; /* FIXME: Screen height in pixels */
25   pTTYMonitor->depth  = 1;   /* FIXME: Screen depth */
26 }
27
28 /***********************************************************************
29  *              TTYDRV_MONITOR_Finalize
30  */
31 void TTYDRV_MONITOR_Finalize(MONITOR *pMonitor)
32 {
33   HeapFree(SystemHeap, 0, pMonitor->pDriverData);
34 }
35
36 /***********************************************************************
37  *              TTYDRV_MONITOR_GetWidth
38  *
39  * Return the width of the monitor
40  */
41 int TTYDRV_MONITOR_GetWidth(MONITOR *pMonitor)
42 {
43   TTYDRV_MONITOR_DATA *pTTYMonitor =
44     (TTYDRV_MONITOR_DATA *) pMonitor->pDriverData;
45
46   return pTTYMonitor->width;
47 }
48
49 /***********************************************************************
50  *              TTYDRV_MONITOR_GetHeight
51  *
52  * Return the height of the monitor
53  */
54 int TTYDRV_MONITOR_GetHeight(MONITOR *pMonitor)
55 {
56   TTYDRV_MONITOR_DATA *pTTYMonitor =
57     (TTYDRV_MONITOR_DATA *) pMonitor->pDriverData;
58
59   return pTTYMonitor->height;
60 }
61
62 /***********************************************************************
63  *              TTYDRV_MONITOR_GetDepth
64  *
65  * Return the depth of the monitor
66  */
67 int TTYDRV_MONITOR_GetDepth(MONITOR *pMonitor)
68 {
69   TTYDRV_MONITOR_DATA *pTTYMonitor =
70     (TTYDRV_MONITOR_DATA *) pMonitor->pDriverData;
71
72   return pTTYMonitor->depth;
73 }