SDL 2.0
SDL_windowsvideo.h
Go to the documentation of this file.
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21#include "../../SDL_internal.h"
22
23#ifndef SDL_windowsvideo_h_
24#define SDL_windowsvideo_h_
25
26#include "../../core/windows/SDL_windows.h"
27
28#include "../SDL_sysvideo.h"
29
30#if defined(_MSC_VER) && (_MSC_VER >= 1500)
31#include <msctf.h>
32#else
33#include "SDL_msctf.h"
34#endif
35
36#include <imm.h>
37
38#define MAX_CANDLIST 10
39#define MAX_CANDLENGTH 256
40
42#include "SDL_windowsevents.h"
43#include "SDL_windowskeyboard.h"
44#include "SDL_windowsmodes.h"
45#include "SDL_windowsmouse.h"
46#include "SDL_windowsopengl.h"
47#include "SDL_windowsopengles.h"
48#include "SDL_windowswindow.h"
49#include "SDL_events.h"
50#include "SDL_loadso.h"
51
52
53#if WINVER < 0x0601
54/* Touch input definitions */
55#define TWF_FINETOUCH 1
56#define TWF_WANTPALM 2
57
58#define TOUCHEVENTF_MOVE 0x0001
59#define TOUCHEVENTF_DOWN 0x0002
60#define TOUCHEVENTF_UP 0x0004
61
62DECLARE_HANDLE(HTOUCHINPUT);
63
64typedef struct _TOUCHINPUT {
65 LONG x;
66 LONG y;
67 HANDLE hSource;
68 DWORD dwID;
69 DWORD dwFlags;
70 DWORD dwMask;
71 DWORD dwTime;
72 ULONG_PTR dwExtraInfo;
73 DWORD cxContact;
74 DWORD cyContact;
75} TOUCHINPUT, *PTOUCHINPUT;
76
77#endif /* WINVER < 0x0601 */
78
79#if WINVER < 0x0603
80
81typedef enum MONITOR_DPI_TYPE {
87
88#endif /* WINVER < 0x0603 */
89
90typedef BOOL (*PFNSHFullScreen)(HWND, DWORD);
91typedef void (*PFCoordTransform)(SDL_Window*, POINT*);
92
93typedef struct
94{
95 void **lpVtbl;
97 void *data;
98} TSFSink;
99
100/* Definition from Win98DDK version of IMM.H */
101typedef struct tagINPUTCONTEXT2 {
102 HWND hWnd;
103 BOOL fOpen;
108 union {
109 LOGFONTA A;
110 LOGFONTW W;
111 } lfFont;
112 COMPOSITIONFORM cfCompForm;
113 CANDIDATEFORM cfCandForm[4];
114 HIMCC hCompStr;
117 HIMCC hPrivate;
119 HIMCC hMsgBuf;
120 DWORD fdwInit;
121 DWORD dwReserve[3];
122} INPUTCONTEXT2, *PINPUTCONTEXT2, NEAR *NPINPUTCONTEXT2, FAR *LPINPUTCONTEXT2;
123
124/* Private display data */
125
126typedef struct SDL_VideoData
127{
129
131
132 /* Touch input functions */
133 void* userDLL;
134 BOOL (WINAPI *CloseTouchInputHandle)( HTOUCHINPUT );
135 BOOL (WINAPI *GetTouchInputInfo)( HTOUCHINPUT, UINT, PTOUCHINPUT, int );
136 BOOL (WINAPI *RegisterTouchWindow)( HWND, ULONG );
137
139 HRESULT (WINAPI *GetDpiForMonitor)( HMONITOR hmonitor,
143
152
156
165
171
174 UINT (WINAPI *GetReadingString)(HIMC himc, UINT uReadingBufLen, LPWSTR lpwReadingBuf, PINT pnErrorIndex, BOOL *pfIsVertical, PUINT puMaxReadingLen);
175 BOOL (WINAPI *ShowReadingWindow)(HIMC himc, BOOL bShow);
176 LPINPUTCONTEXT2 (WINAPI *ImmLockIMC)(HIMC himc);
177 BOOL (WINAPI *ImmUnlockIMC)(HIMC himc);
178 LPVOID (WINAPI *ImmLockIMCC)(HIMCC himcc);
179 BOOL (WINAPI *ImmUnlockIMCC)(HIMCC himcc);
180
190
193
194typedef struct IDirect3D9 IDirect3D9;
195extern SDL_bool D3D_LoadDLL( void **pD3DDLL, IDirect3D9 **pDirect3D9Interface );
196
197#endif /* SDL_windowsvideo_h_ */
198
199/* vi: set ts=4 sw=4 expandtab: */
#define FAR
Definition: SDL_directx.h:37
SDL_PRINTF_FORMAT_STRING const char int SDL_PRINTF_FORMAT_STRING const char int SDL_PRINTF_FORMAT_STRING const char int SDL_PRINTF_FORMAT_STRING const char const char SDL_SCANF_FORMAT_STRING const char return SDL_ThreadFunction const char void return Uint32 return Uint32 void
#define SDL_TEXTEDITINGEVENT_TEXT_SIZE
Definition: SDL_events.h:223
SDL_bool
Definition: SDL_stdinc.h:162
SDL_bool D3D_LoadDLL(void **pD3DDLL, IDirect3D9 **pDirect3D9Interface)
void(* PFCoordTransform)(SDL_Window *, POINT *)
struct IDirect3D9 IDirect3D9
BOOL(* PFNSHFullScreen)(HWND, DWORD)
MONITOR_DPI_TYPE
@ MDT_RAW_DPI
@ MDT_EFFECTIVE_DPI
@ MDT_ANGULAR_DPI
@ MDT_DEFAULT
SDL_bool g_WindowFrameUsableWhileCursorHidden
#define MAX_CANDLIST
#define MAX_CANDLENGTH
DECLARE_HANDLE(HTOUCHINPUT)
SDL_bool g_WindowsEnableMessageLoop
COMPOSITIONFORM cfCompForm
A rectangle, with the origin at the upper left (integer).
Definition: SDL_rect.h:78
struct ITfThreadMgr * ime_threadmgr
HRESULT(WINAPI *GetDpiForMonitor)(HMONITOR hmonitor
DWORD ime_openmodesinkcookie
BOOL(WINAPI *ImmUnlockIMC)(HIMC himc)
SDL_bool ime_candvertical
TSFSink * ime_ippasink
SDL_bool ime_com_initialized
SDL_bool ime_enabled
UINT LPWSTR PINT BOOL * pfIsVertical
LPVOID(WINAPI *ImmLockIMCC)(HIMCC himcc)
LPINPUTCONTEXT2(WINAPI *ImmLockIMC)(HIMC himc)
BOOL(WINAPI *CloseTouchInputHandle)(HTOUCHINPUT)
UINT LPWSTR lpwReadingBuf
WCHAR ime_candidates[MAX_CANDLIST][MAX_CANDLENGTH]
MONITOR_DPI_TYPE UINT UINT * dpiY
BOOL(WINAPI *ImmUnlockIMCC)(HIMCC himcc)
MONITOR_DPI_TYPE UINT * dpiX
DWORD ime_convmodesinkcookie
SDL_bool ime_candlist
BOOL(WINAPI *GetTouchInputInfo)(HTOUCHINPUT
MONITOR_DPI_TYPE dpiType
UINT LPWSTR PINT pnErrorIndex
SDL_bool ime_available
BOOL(WINAPI *RegisterTouchWindow)(HWND
SDL_Rect ime_candlistrect
UINT LPWSTR PINT BOOL PUINT puMaxReadingLen
WCHAR ime_readingstring[16]
struct ITfThreadMgrEx * ime_threadmgrex
BOOL(WINAPI *ShowReadingWindow)(HIMC himc
TSFSink * ime_uielemsink
DWORD ime_uielemsinkcookie
WCHAR ime_composition[SDL_TEXTEDITINGEVENT_TEXT_SIZE]
SDL_bool ime_initialized
The type used to identify a window.
Definition: SDL_sysvideo.h:74
ULONG_PTR dwExtraInfo
void ** lpVtbl
void * data