2 * TTY driver definitions
5 #ifndef __WINE_TTYDRV_H
6 #define __WINE_TTYDRV_H
10 #include "wine/winuser16.h"
19 /**************************************************************************
23 extern struct tagGDI_DRIVER TTYDRV_GDI_Driver;
25 extern BOOL TTYDRV_GDI_Initialize(void);
26 extern void TTYDRV_GDI_Finalize(void);
28 /* TTY GDI bitmap driver */
30 extern HBITMAP TTYDRV_BITMAP_CreateDIBSection(struct tagDC *dc, BITMAPINFO *bmi, UINT usage, LPVOID *bits, HANDLE section, DWORD offset);
31 extern HBITMAP16 TTYDRV_BITMAP_CreateDIBSection16(struct tagDC *dc, BITMAPINFO *bmi, UINT16 usage, SEGPTR *bits, HANDLE section, DWORD offset);
33 extern INT TTYDRV_BITMAP_SetDIBits(struct tagBITMAPOBJ *bmp, struct tagDC *dc, UINT startscan, UINT lines, LPCVOID bits, const BITMAPINFO *info, UINT coloruse, HBITMAP hbitmap);
34 extern INT TTYDRV_BITMAP_GetDIBits(struct tagBITMAPOBJ *bmp, struct tagDC *dc, UINT startscan, UINT lines, LPVOID bits, BITMAPINFO *info, UINT coloruse, HBITMAP hbitmap);
35 extern void TTYDRV_BITMAP_DeleteDIBSection(struct tagBITMAPOBJ *bmp);
41 extern BOOL TTYDRV_DC_CreateDC(struct tagDC *dc, LPCSTR driver, LPCSTR device, LPCSTR output, const DEVMODE16 *initData);
42 extern BOOL TTYDRV_DC_DeleteDC(struct tagDC *dc);
43 extern INT TTYDRV_DC_Escape(struct tagDC *dc, INT nEscape, INT cbInput, SEGPTR lpInData, SEGPTR lpOutData);
45 /* TTY GDI palette driver */
47 extern struct tagPALETTE_DRIVER TTYDRV_PALETTE_Driver;
49 extern BOOL TTYDRV_PALETTE_Initialize(void);
50 extern void TTYDRV_PALETTE_Finalize(void);
52 extern int TTYDRV_PALETTE_SetMapping(struct tagPALETTEOBJ *palPtr, UINT uStart, UINT uNum, BOOL mapOnly);
53 extern int TTYDRV_PALETTE_UpdateMapping(struct tagPALETTEOBJ *palPtr);
54 extern BOOL TTYDRV_PALETTE_IsDark(int pixel);
56 /**************************************************************************
60 extern struct tagUSER_DRIVER TTYDRV_USER_Driver;
62 extern BOOL TTYDRV_USER_Initialize(void);
63 extern void TTYDRV_USER_Finalize(void);
64 extern void TTYDRV_USER_BeginDebugging(void);
65 extern void TTYDRV_USER_EndDebugging(void);
67 /* TTY clipboard driver */
69 extern struct tagCLIPBOARD_DRIVER TTYDRV_CLIPBOARD_Driver;
71 extern void TTYDRV_CLIPBOARD_Empty(void);
72 extern void TTYDRV_CLIPBOARD_SetData(UINT wFormat);
73 extern BOOL TTYDRV_CLIPBOARD_GetData(UINT wFormat);
74 extern void TTYDRV_CLIPBOARD_ResetOwner(struct tagWND *pWnd, BOOL bFooBar);
76 /* TTY desktop driver */
78 extern struct tagDESKTOP_DRIVER TTYDRV_DESKTOP_Driver;
80 extern void TTYDRV_DESKTOP_Initialize(struct tagDESKTOP *pDesktop);
81 extern void TTYDRV_DESKTOP_Finalize(struct tagDESKTOP *pDesktop);
82 extern int TTYDRV_DESKTOP_GetScreenWidth(struct tagDESKTOP *pDesktop);
83 extern int TTYDRV_DESKTOP_GetScreenHeight(struct tagDESKTOP *pDesktop);
84 extern int TTYDRV_DESKTOP_GetScreenDepth(struct tagDESKTOP *pDesktop);
86 /* TTY event driver */
88 extern struct tagEVENT_DRIVER TTYDRV_EVENT_Driver;
90 extern BOOL TTYDRV_EVENT_Init(void);
91 extern void TTYDRV_EVENT_AddIO(int fd, unsigned flag);
92 extern void TTYDRV_EVENT_DeleteIO(int fd, unsigned flag);
93 extern BOOL TTYDRV_EVENT_WaitNetEvent(BOOL sleep, BOOL peek);
94 extern void TTYDRV_EVENT_Synchronize(void);
95 extern BOOL TTYDRV_EVENT_CheckFocus(void);
96 extern BOOL TTYDRV_EVENT_QueryPointer(DWORD *posX, DWORD *posY, DWORD *state);
97 extern void TTYDRV_EVENT_DummyMotionNotify(void);
98 extern BOOL TTYDRV_EVENT_Pending(void);
99 extern BOOL16 TTYDRV_EVENT_IsUserIdle(void);
100 extern void TTYDRV_EVENT_WakeUp(void);
102 /* TTY keyboard driver */
104 extern struct tagKEYBOARD_DRIVER TTYDRV_KEYBOARD_Driver;
106 extern void TTYDRV_KEYBOARD_Init(void);
107 extern WORD TTYDRV_KEYBOARD_VkKeyScan(CHAR cChar);
108 extern UINT16 TTYDRV_KEYBOARD_MapVirtualKey(UINT16 wCode, UINT16 wMapType);
109 extern INT16 TTYDRV_KEYBOARD_GetKeyNameText(LONG lParam, LPSTR lpBuffer, INT16 nSize);
110 extern INT16 TTYDRV_KEYBOARD_ToAscii(UINT16 virtKey, UINT16 scanCode, LPBYTE lpKeyState, LPVOID lpChar, UINT16 flags);
111 extern BOOL TTYDRV_KEYBOARD_GetBeepActive(void);
112 extern void TTYDRV_KEYBOARD_SetBeepActive(BOOL bActivate);
113 extern void TTYDRV_KEYBOARD_Beep(void);
115 /* TTY monitor driver */
117 extern struct tagMONITOR_DRIVER TTYDRV_MONITOR_Driver;
119 typedef struct _TTYDRV_MONITOR_DATA {
123 } TTYDRV_MONITOR_DATA;
127 extern void TTYDRV_MONITOR_Initialize(struct tagMONITOR *pMonitor);
128 extern void TTYDRV_MONITOR_Finalize(struct tagMONITOR *pMonitor);
129 extern BOOL TTYDRV_MONITOR_IsSingleWindow(struct tagMONITOR *pMonitor);
130 extern int TTYDRV_MONITOR_GetWidth(struct tagMONITOR *pMonitor);
131 extern int TTYDRV_MONITOR_GetHeight(struct tagMONITOR *pMonitor);
132 extern int TTYDRV_MONITOR_GetDepth(struct tagMONITOR *pMonitor);
133 extern BOOL TTYDRV_MONITOR_GetScreenSaveActive(struct tagMONITOR *pMonitor);
134 extern void TTYDRV_MONITOR_SetScreenSaveActive(struct tagMONITOR *pMonitor, BOOL bActivate);
135 extern int TTYDRV_MONITOR_GetScreenSaveTimeout(struct tagMONITOR *pMonitor);
136 extern void TTYDRV_MONITOR_SetScreenSaveTimeout(struct tagMONITOR *pMonitor, int nTimeout);
138 /* TTY mouse driver */
140 extern struct tagMOUSE_DRIVER TTYDRV_MOUSE_Driver;
142 extern void TTYDRV_MOUSE_SetCursor(CURSORICONINFO *lpCursor);
143 extern void TTYDRV_MOUSE_MoveCursor(WORD wAbsX, WORD wAbsY);
144 extern BOOL TTYDRV_MOUSE_EnableWarpPointer(BOOL bEnable);
146 /* TTY windows driver */
148 extern struct tagWND_DRIVER TTYDRV_WND_Driver;
150 extern void TTYDRV_WND_Initialize(struct tagWND *wndPtr);
151 extern void TTYDRV_WND_Finalize(struct tagWND *wndPtr);
152 extern BOOL TTYDRV_WND_CreateDesktopWindow(struct tagWND *wndPtr, struct tagCLASS *classPtr, BOOL bUnicode);
153 extern BOOL TTYDRV_WND_CreateWindow(struct tagWND *wndPtr, struct tagCLASS *classPtr, CREATESTRUCTA *cs, BOOL bUnicode);
154 extern BOOL TTYDRV_WND_DestroyWindow(struct tagWND *pWnd);
155 extern struct tagWND *TTYDRV_WND_SetParent(struct tagWND *wndPtr, struct tagWND *pWndParent);
156 extern void TTYDRV_WND_ForceWindowRaise(struct tagWND *pWnd);
157 extern void TTYDRV_WND_SetWindowPos(struct tagWND *wndPtr, const WINDOWPOS *winpos, BOOL bSMC_SETXPOS);
158 extern void TTYDRV_WND_SetText(struct tagWND *wndPtr, LPCSTR text);
159 extern void TTYDRV_WND_SetFocus(struct tagWND *wndPtr);
160 extern void TTYDRV_WND_PreSizeMove(struct tagWND *wndPtr);
161 extern void TTYDRV_WND_PostSizeMove(struct tagWND *wndPtr);
162 extern void TTYDRV_WND_ScrollWindow(struct tagWND *wndPtr, struct tagDC *dcPtr, INT dx, INT dy, const RECT *clipRect, BOOL bUpdate);
163 extern void TTYDRV_WND_SetDrawable(struct tagWND *wndPtr, struct tagDC *dc, WORD flags, BOOL bSetClipOrigin);
164 extern BOOL TTYDRV_WND_SetHostAttr(struct tagWND *wndPtr, INT haKey, INT value);
165 extern BOOL TTYDRV_WND_IsSelfClipping(struct tagWND *wndPtr);
167 #endif /* !defined(__WINE_TTYDRV_H) */