2 * TTY driver definitions
5 #ifndef __WINE_TTYDRV_H
6 #define __WINE_TTYDRV_H
11 #include "wine/winuser16.h"
12 #include "wine/wingdi16.h"
20 struct tagCURSORICONINFO
;
21 struct tagCREATESTRUCTA
;
24 /**************************************************************************
28 extern struct tagGDI_DRIVER TTYDRV_GDI_Driver
;
30 extern BOOL
TTYDRV_GDI_Initialize(void);
31 extern void TTYDRV_GDI_Finalize(void);
33 /* TTY GDI bitmap driver */
35 extern HBITMAP
TTYDRV_BITMAP_CreateDIBSection(struct tagDC
*dc
, BITMAPINFO
*bmi
, UINT usage
, LPVOID
*bits
, HANDLE section
, DWORD offset
);
36 extern HBITMAP16
TTYDRV_BITMAP_CreateDIBSection16(struct tagDC
*dc
, BITMAPINFO
*bmi
, UINT16 usage
, SEGPTR
*bits
, HANDLE section
, DWORD offset
);
38 extern INT
TTYDRV_BITMAP_SetDIBits(struct tagBITMAPOBJ
*bmp
, struct tagDC
*dc
, UINT startscan
, UINT lines
, LPCVOID bits
, const BITMAPINFO
*info
, UINT coloruse
, HBITMAP hbitmap
);
39 extern INT
TTYDRV_BITMAP_GetDIBits(struct tagBITMAPOBJ
*bmp
, struct tagDC
*dc
, UINT startscan
, UINT lines
, LPVOID bits
, BITMAPINFO
*info
, UINT coloruse
, HBITMAP hbitmap
);
40 extern void TTYDRV_BITMAP_DeleteDIBSection(struct tagBITMAPOBJ
*bmp
);
46 extern BOOL
TTYDRV_DC_CreateDC(struct tagDC
*dc
, LPCSTR driver
, LPCSTR device
, LPCSTR output
, const DEVMODEA
*initData
);
47 extern BOOL
TTYDRV_DC_DeleteDC(struct tagDC
*dc
);
48 extern INT
TTYDRV_DC_Escape(struct tagDC
*dc
, INT nEscape
, INT cbInput
, SEGPTR lpInData
, SEGPTR lpOutData
);
50 /* TTY GDI palette driver */
52 extern struct tagPALETTE_DRIVER TTYDRV_PALETTE_Driver
;
54 extern BOOL
TTYDRV_PALETTE_Initialize(void);
55 extern void TTYDRV_PALETTE_Finalize(void);
57 extern int TTYDRV_PALETTE_SetMapping(struct tagPALETTEOBJ
*palPtr
, UINT uStart
, UINT uNum
, BOOL mapOnly
);
58 extern int TTYDRV_PALETTE_UpdateMapping(struct tagPALETTEOBJ
*palPtr
);
59 extern BOOL
TTYDRV_PALETTE_IsDark(int pixel
);
61 /**************************************************************************
65 extern struct tagUSER_DRIVER TTYDRV_USER_Driver
;
67 extern BOOL
TTYDRV_USER_Initialize(void);
68 extern void TTYDRV_USER_Finalize(void);
69 extern void TTYDRV_USER_BeginDebugging(void);
70 extern void TTYDRV_USER_EndDebugging(void);
72 /* TTY clipboard driver */
74 extern struct tagCLIPBOARD_DRIVER TTYDRV_CLIPBOARD_Driver
;
76 extern void TTYDRV_CLIPBOARD_Acquire(void);
77 extern void TTYDRV_CLIPBOARD_Release(void);
78 extern void TTYDRV_CLIPBOARD_SetData(UINT wFormat
);
79 extern BOOL
TTYDRV_CLIPBOARD_GetData(UINT wFormat
);
80 extern BOOL
TTYDRV_CLIPBOARD_IsFormatAvailable(UINT wFormat
);
81 extern BOOL
TTYDRV_CLIPBOARD_RegisterFormat( LPCSTR FormatName
);
82 extern BOOL
TTYDRV_CLIPBOARD_IsSelectionowner();
83 extern void TTYDRV_CLIPBOARD_ResetOwner(struct tagWND
*pWnd
, BOOL bFooBar
);
85 /* TTY desktop driver */
87 extern struct tagDESKTOP_DRIVER TTYDRV_DESKTOP_Driver
;
89 extern void TTYDRV_DESKTOP_Initialize(struct tagDESKTOP
*pDesktop
);
90 extern void TTYDRV_DESKTOP_Finalize(struct tagDESKTOP
*pDesktop
);
91 extern int TTYDRV_DESKTOP_GetScreenWidth(struct tagDESKTOP
*pDesktop
);
92 extern int TTYDRV_DESKTOP_GetScreenHeight(struct tagDESKTOP
*pDesktop
);
93 extern int TTYDRV_DESKTOP_GetScreenDepth(struct tagDESKTOP
*pDesktop
);
95 /* TTY event driver */
97 extern struct tagEVENT_DRIVER TTYDRV_EVENT_Driver
;
99 extern BOOL
TTYDRV_EVENT_Init(void);
100 extern void TTYDRV_EVENT_Synchronize(void);
101 extern BOOL
TTYDRV_EVENT_CheckFocus(void);
102 extern void TTYDRV_EVENT_UserRepaintDisable(BOOL bDisable
);
104 /* TTY keyboard driver */
106 extern struct tagKEYBOARD_DRIVER TTYDRV_KEYBOARD_Driver
;
108 extern void TTYDRV_KEYBOARD_Init(void);
109 extern WORD
TTYDRV_KEYBOARD_VkKeyScan(CHAR cChar
);
110 extern UINT16
TTYDRV_KEYBOARD_MapVirtualKey(UINT16 wCode
, UINT16 wMapType
);
111 extern INT16
TTYDRV_KEYBOARD_GetKeyNameText(LONG lParam
, LPSTR lpBuffer
, INT16 nSize
);
112 extern INT16
TTYDRV_KEYBOARD_ToAscii(UINT16 virtKey
, UINT16 scanCode
, LPBYTE lpKeyState
, LPVOID lpChar
, UINT16 flags
);
113 extern BOOL
TTYDRV_KEYBOARD_GetBeepActive(void);
114 extern void TTYDRV_KEYBOARD_SetBeepActive(BOOL bActivate
);
115 extern void TTYDRV_KEYBOARD_Beep(void);
116 extern BOOL
TTYDRV_KEYBOARD_GetDIState(DWORD len
, LPVOID ptr
);
117 extern BOOL
TTYDRV_KEYBOARD_GetDIData(BYTE
*keystate
, DWORD dodsize
, LPDIDEVICEOBJECTDATA dod
, LPDWORD entries
, DWORD flags
);
119 /* TTY monitor driver */
121 extern struct tagMONITOR_DRIVER TTYDRV_MONITOR_Driver
;
123 typedef struct _TTYDRV_MONITOR_DATA
{
127 } TTYDRV_MONITOR_DATA
;
131 extern void TTYDRV_MONITOR_Initialize(struct tagMONITOR
*pMonitor
);
132 extern void TTYDRV_MONITOR_Finalize(struct tagMONITOR
*pMonitor
);
133 extern BOOL
TTYDRV_MONITOR_IsSingleWindow(struct tagMONITOR
*pMonitor
);
134 extern int TTYDRV_MONITOR_GetWidth(struct tagMONITOR
*pMonitor
);
135 extern int TTYDRV_MONITOR_GetHeight(struct tagMONITOR
*pMonitor
);
136 extern int TTYDRV_MONITOR_GetDepth(struct tagMONITOR
*pMonitor
);
137 extern BOOL
TTYDRV_MONITOR_GetScreenSaveActive(struct tagMONITOR
*pMonitor
);
138 extern void TTYDRV_MONITOR_SetScreenSaveActive(struct tagMONITOR
*pMonitor
, BOOL bActivate
);
139 extern int TTYDRV_MONITOR_GetScreenSaveTimeout(struct tagMONITOR
*pMonitor
);
140 extern void TTYDRV_MONITOR_SetScreenSaveTimeout(struct tagMONITOR
*pMonitor
, int nTimeout
);
142 /* TTY mouse driver */
144 extern struct tagMOUSE_DRIVER TTYDRV_MOUSE_Driver
;
146 extern void TTYDRV_MOUSE_Init();
147 extern void TTYDRV_MOUSE_SetCursor(struct tagCURSORICONINFO
*lpCursor
);
148 extern void TTYDRV_MOUSE_MoveCursor(WORD wAbsX
, WORD wAbsY
);
149 extern BOOL
TTYDRV_MOUSE_EnableWarpPointer(BOOL bEnable
);
151 /* TTY windows driver */
153 extern struct tagWND_DRIVER TTYDRV_WND_Driver
;
155 extern void TTYDRV_WND_Initialize(struct tagWND
*wndPtr
);
156 extern void TTYDRV_WND_Finalize(struct tagWND
*wndPtr
);
157 extern BOOL
TTYDRV_WND_CreateDesktopWindow(struct tagWND
*wndPtr
, struct tagCLASS
*classPtr
, BOOL bUnicode
);
158 extern BOOL
TTYDRV_WND_CreateWindow(struct tagWND
*wndPtr
, struct tagCLASS
*classPtr
, struct tagCREATESTRUCTA
*cs
, BOOL bUnicode
);
159 extern BOOL
TTYDRV_WND_DestroyWindow(struct tagWND
*pWnd
);
160 extern struct tagWND
*TTYDRV_WND_SetParent(struct tagWND
*wndPtr
, struct tagWND
*pWndParent
);
161 extern void TTYDRV_WND_ForceWindowRaise(struct tagWND
*pWnd
);
162 extern void TTYDRV_WND_SetWindowPos(struct tagWND
*wndPtr
, const struct tagWINDOWPOS
*winpos
, BOOL bSMC_SETXPOS
);
163 extern void TTYDRV_WND_SetText(struct tagWND
*wndPtr
, LPCSTR text
);
164 extern void TTYDRV_WND_SetFocus(struct tagWND
*wndPtr
);
165 extern void TTYDRV_WND_PreSizeMove(struct tagWND
*wndPtr
);
166 extern void TTYDRV_WND_PostSizeMove(struct tagWND
*wndPtr
);
167 extern void TTYDRV_WND_ScrollWindow(struct tagWND
*wndPtr
, struct tagDC
*dcPtr
, INT dx
, INT dy
, const RECT
*clipRect
, BOOL bUpdate
);
168 extern void TTYDRV_WND_SetDrawable(struct tagWND
*wndPtr
, struct tagDC
*dc
, WORD flags
, BOOL bSetClipOrigin
);
169 extern BOOL
TTYDRV_WND_SetHostAttr(struct tagWND
*wndPtr
, INT haKey
, INT value
);
170 extern BOOL
TTYDRV_WND_IsSelfClipping(struct tagWND
*wndPtr
);
172 #endif /* !defined(__WINE_TTYDRV_H) */