2 * TTY driver definitions
5 #ifndef __WINE_TTYDRV_H
6 #define __WINE_TTYDRV_H
10 #include "wine/wingdi16.h"
18 struct tagCURSORICONINFO;
19 struct tagCREATESTRUCTA;
22 /**************************************************************************
26 extern struct tagGDI_DRIVER TTYDRV_GDI_Driver;
28 extern BOOL TTYDRV_GDI_Initialize(void);
29 extern void TTYDRV_GDI_Finalize(void);
31 /* TTY GDI bitmap driver */
33 extern HBITMAP TTYDRV_BITMAP_CreateDIBSection(struct tagDC *dc, BITMAPINFO *bmi, UINT usage, LPVOID *bits, HANDLE section, DWORD offset);
34 extern HBITMAP16 TTYDRV_BITMAP_CreateDIBSection16(struct tagDC *dc, BITMAPINFO *bmi, UINT16 usage, SEGPTR *bits, HANDLE section, DWORD offset);
36 extern INT TTYDRV_BITMAP_SetDIBits(struct tagBITMAPOBJ *bmp, struct tagDC *dc, UINT startscan, UINT lines, LPCVOID bits, const BITMAPINFO *info, UINT coloruse, HBITMAP hbitmap);
37 extern INT TTYDRV_BITMAP_GetDIBits(struct tagBITMAPOBJ *bmp, struct tagDC *dc, UINT startscan, UINT lines, LPVOID bits, BITMAPINFO *info, UINT coloruse, HBITMAP hbitmap);
38 extern void TTYDRV_BITMAP_DeleteDIBSection(struct tagBITMAPOBJ *bmp);
44 extern BOOL TTYDRV_DC_CreateDC(struct tagDC *dc, LPCSTR driver, LPCSTR device, LPCSTR output, const DEVMODEA *initData);
45 extern BOOL TTYDRV_DC_DeleteDC(struct tagDC *dc);
46 extern INT TTYDRV_DC_Escape(struct tagDC *dc, INT nEscape, INT cbInput, SEGPTR lpInData, SEGPTR lpOutData);
48 /* TTY GDI palette driver */
50 extern struct tagPALETTE_DRIVER TTYDRV_PALETTE_Driver;
52 extern BOOL TTYDRV_PALETTE_Initialize(void);
53 extern void TTYDRV_PALETTE_Finalize(void);
55 extern int TTYDRV_PALETTE_SetMapping(struct tagPALETTEOBJ *palPtr, UINT uStart, UINT uNum, BOOL mapOnly);
56 extern int TTYDRV_PALETTE_UpdateMapping(struct tagPALETTEOBJ *palPtr);
57 extern BOOL TTYDRV_PALETTE_IsDark(int pixel);
59 /**************************************************************************
63 extern struct tagUSER_DRIVER TTYDRV_USER_Driver;
65 extern BOOL TTYDRV_USER_Initialize(void);
66 extern void TTYDRV_USER_Finalize(void);
67 extern void TTYDRV_USER_BeginDebugging(void);
68 extern void TTYDRV_USER_EndDebugging(void);
70 /* TTY clipboard driver */
72 extern struct tagCLIPBOARD_DRIVER TTYDRV_CLIPBOARD_Driver;
74 extern void TTYDRV_CLIPBOARD_Empty(void);
75 extern void TTYDRV_CLIPBOARD_SetData(UINT wFormat);
76 extern BOOL TTYDRV_CLIPBOARD_GetData(UINT wFormat);
77 extern void TTYDRV_CLIPBOARD_ResetOwner(struct tagWND *pWnd, BOOL bFooBar);
79 /* TTY desktop driver */
81 extern struct tagDESKTOP_DRIVER TTYDRV_DESKTOP_Driver;
83 extern void TTYDRV_DESKTOP_Initialize(struct tagDESKTOP *pDesktop);
84 extern void TTYDRV_DESKTOP_Finalize(struct tagDESKTOP *pDesktop);
85 extern int TTYDRV_DESKTOP_GetScreenWidth(struct tagDESKTOP *pDesktop);
86 extern int TTYDRV_DESKTOP_GetScreenHeight(struct tagDESKTOP *pDesktop);
87 extern int TTYDRV_DESKTOP_GetScreenDepth(struct tagDESKTOP *pDesktop);
89 /* TTY event driver */
91 extern struct tagEVENT_DRIVER TTYDRV_EVENT_Driver;
93 extern BOOL TTYDRV_EVENT_Init(void);
94 extern void TTYDRV_EVENT_Synchronize(BOOL bProcessEvents);
95 extern BOOL TTYDRV_EVENT_CheckFocus(void);
96 extern BOOL TTYDRV_EVENT_QueryPointer(DWORD *posX, DWORD *posY, DWORD *state);
97 extern void TTYDRV_EVENT_UserRepaintDisable(BOOL bDisable);
99 /* TTY keyboard driver */
101 extern struct tagKEYBOARD_DRIVER TTYDRV_KEYBOARD_Driver;
103 extern void TTYDRV_KEYBOARD_Init(void);
104 extern WORD TTYDRV_KEYBOARD_VkKeyScan(CHAR cChar);
105 extern UINT16 TTYDRV_KEYBOARD_MapVirtualKey(UINT16 wCode, UINT16 wMapType);
106 extern INT16 TTYDRV_KEYBOARD_GetKeyNameText(LONG lParam, LPSTR lpBuffer, INT16 nSize);
107 extern INT16 TTYDRV_KEYBOARD_ToAscii(UINT16 virtKey, UINT16 scanCode, LPBYTE lpKeyState, LPVOID lpChar, UINT16 flags);
108 extern BOOL TTYDRV_KEYBOARD_GetBeepActive(void);
109 extern void TTYDRV_KEYBOARD_SetBeepActive(BOOL bActivate);
110 extern void TTYDRV_KEYBOARD_Beep(void);
112 /* TTY monitor driver */
114 extern struct tagMONITOR_DRIVER TTYDRV_MONITOR_Driver;
116 typedef struct _TTYDRV_MONITOR_DATA {
120 } TTYDRV_MONITOR_DATA;
124 extern void TTYDRV_MONITOR_Initialize(struct tagMONITOR *pMonitor);
125 extern void TTYDRV_MONITOR_Finalize(struct tagMONITOR *pMonitor);
126 extern BOOL TTYDRV_MONITOR_IsSingleWindow(struct tagMONITOR *pMonitor);
127 extern int TTYDRV_MONITOR_GetWidth(struct tagMONITOR *pMonitor);
128 extern int TTYDRV_MONITOR_GetHeight(struct tagMONITOR *pMonitor);
129 extern int TTYDRV_MONITOR_GetDepth(struct tagMONITOR *pMonitor);
130 extern BOOL TTYDRV_MONITOR_GetScreenSaveActive(struct tagMONITOR *pMonitor);
131 extern void TTYDRV_MONITOR_SetScreenSaveActive(struct tagMONITOR *pMonitor, BOOL bActivate);
132 extern int TTYDRV_MONITOR_GetScreenSaveTimeout(struct tagMONITOR *pMonitor);
133 extern void TTYDRV_MONITOR_SetScreenSaveTimeout(struct tagMONITOR *pMonitor, int nTimeout);
135 /* TTY mouse driver */
137 extern struct tagMOUSE_DRIVER TTYDRV_MOUSE_Driver;
139 extern void TTYDRV_MOUSE_SetCursor(struct tagCURSORICONINFO *lpCursor);
140 extern void TTYDRV_MOUSE_MoveCursor(WORD wAbsX, WORD wAbsY);
141 extern BOOL TTYDRV_MOUSE_EnableWarpPointer(BOOL bEnable);
143 /* TTY windows driver */
145 extern struct tagWND_DRIVER TTYDRV_WND_Driver;
147 extern void TTYDRV_WND_Initialize(struct tagWND *wndPtr);
148 extern void TTYDRV_WND_Finalize(struct tagWND *wndPtr);
149 extern BOOL TTYDRV_WND_CreateDesktopWindow(struct tagWND *wndPtr, struct tagCLASS *classPtr, BOOL bUnicode);
150 extern BOOL TTYDRV_WND_CreateWindow(struct tagWND *wndPtr, struct tagCLASS *classPtr, struct tagCREATESTRUCTA *cs, BOOL bUnicode);
151 extern BOOL TTYDRV_WND_DestroyWindow(struct tagWND *pWnd);
152 extern struct tagWND *TTYDRV_WND_SetParent(struct tagWND *wndPtr, struct tagWND *pWndParent);
153 extern void TTYDRV_WND_ForceWindowRaise(struct tagWND *pWnd);
154 extern void TTYDRV_WND_SetWindowPos(struct tagWND *wndPtr, const struct tagWINDOWPOS *winpos, BOOL bSMC_SETXPOS);
155 extern void TTYDRV_WND_SetText(struct tagWND *wndPtr, LPCSTR text);
156 extern void TTYDRV_WND_SetFocus(struct tagWND *wndPtr);
157 extern void TTYDRV_WND_PreSizeMove(struct tagWND *wndPtr);
158 extern void TTYDRV_WND_PostSizeMove(struct tagWND *wndPtr);
159 extern void TTYDRV_WND_ScrollWindow(struct tagWND *wndPtr, struct tagDC *dcPtr, INT dx, INT dy, const RECT *clipRect, BOOL bUpdate);
160 extern void TTYDRV_WND_SetDrawable(struct tagWND *wndPtr, struct tagDC *dc, WORD flags, BOOL bSetClipOrigin);
161 extern BOOL TTYDRV_WND_SetHostAttr(struct tagWND *wndPtr, INT haKey, INT value);
162 extern BOOL TTYDRV_WND_IsSelfClipping(struct tagWND *wndPtr);
164 #endif /* !defined(__WINE_TTYDRV_H) */