31#include "wine/winternl.h"
40#include "wine/unicode.h"
45#define WINE_MOUSE_X_AXIS_INSTANCE 0
46#define WINE_MOUSE_Y_AXIS_INSTANCE 1
47#define WINE_MOUSE_Z_AXIS_INSTANCE 2
48#define WINE_MOUSE_BUTTONS_INSTANCE 3
92 return &
This->base.IDirectInputDevice8W_iface;
103 TRACE(
"(X: %d Y: %d Z: %d", m_state->
lX, m_state->
lY, m_state->
lZ);
117 memset(&ddi, 0,
sizeof(ddi));
141 memset(&ddi, 0,
sizeof(ddi));
164 if ((dwDevType == 0) ||
167 TRACE(
"Enumerating the mouse device\n");
185 if ((dwDevType == 0) ||
188 TRACE(
"Enumerating the mouse device\n");
207 if (!newDevice)
return NULL;
210 newDevice->
base.ref = 1;
212 newDevice->
base.guid = *rguid;
214 newDevice->
base.crit.DebugInfo->Spare[0] = (
DWORD_PTR)(__FILE__
": SysMouseImpl*->base.crit");
242 newDevice->
base.data_format.wine_df = df;
285 WARN(
"no interface\n");
290 TRACE(
"Created a Mouse device (%p)\n",
This);
295 *pdev = &
This->base.IDirectInputDevice8W_iface;
297 *pdev = &
This->base.IDirectInputDevice8A_iface;
321 int wdata = 0, inst_id = -1,
ret = 0;
338 pt1.
x =
This->m_state.lX;
339 pt1.
y =
This->m_state.lY;
375 This->m_state.rgbButtons[0] = wdata = 0x80;
379 This->m_state.rgbButtons[0] = wdata = 0x00;
383 This->m_state.rgbButtons[1] = wdata = 0x80;
387 This->m_state.rgbButtons[1] = wdata = 0x00;
391 This->m_state.rgbButtons[2] = wdata = 0x80;
395 This->m_state.rgbButtons[2] = wdata = 0x00;
399 This->m_state.rgbButtons[2 +
HIWORD(
hook->mouseData)] = wdata = 0x80;
403 This->m_state.rgbButtons[2 +
HIWORD(
hook->mouseData)] = wdata = 0x00;
435 mapped_center.
x = (
rect.left +
rect.right) / 2;
436 mapped_center.
y = (
rect.top +
rect.bottom) / 2;
437 TRACE(
"Warping mouse to %d - %d\n", mapped_center.
x, mapped_center.
y);
475 This->m_state.lX = 0;
476 This->m_state.lY = 0;
479 This->m_state.lZ = 0;
495 else if (
This->clipped)
569 This->m_state.lX = 0;
570 This->m_state.lY = 0;
571 This->m_state.lZ = 0;
678 TRACE(
"(this=%p,%p)\n",
This,lpDIDevCaps);
681 WARN(
"invalid parameter\n");
687 if (
This->base.dinput->dwVersion >= 0x0800)
718 static const WCHAR x_axisW[] = {
'X',
'-',
'A',
'x',
'i',
's',0};
719 static const WCHAR y_axisW[] = {
'Y',
'-',
'A',
'x',
'i',
's',0};
720 static const WCHAR wheelW[] = {
'W',
'h',
'e',
'e',
'l',0};
721 static const WCHAR buttonW[] = {
'B',
'u',
't',
't',
'o',
'n',
' ',
'%',
'd',0};
748 didoiW.
dwSize =
sizeof(didoiW);
782 WARN(
" dinput3 not supported yet...\n");
815 if (lpszUserName !=
NULL)
856 if (lpszUserName !=
NULL)
char * strcpy(char *DstString, const char *SrcString)
static const char * wine_dbgstr_point(const POINT *ppt)
static const char * wine_dbgstr_rect(const RECT *prc)
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
static void list_add_tail(struct list_entry *head, struct list_entry *entry)
#define RegCloseKey(hKey)
void _copy_diactionformatWtoA(LPDIACTIONFORMATA to, LPDIACTIONFORMATW from)
void check_dinput_events(void)
void _copy_diactionformatAtoW(LPDIACTIONFORMATW to, LPDIACTIONFORMATA from)
#define _strnicmp(_String1, _String2, _MaxCount)
#define HeapFree(x, y, z)
#define WideCharToMultiByte
#define MultiByteToWideChar
static const WCHAR version[]
unsigned short(__cdecl typeof(TIFFCurrentDirectory))(struct tiff *)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
static const WCHAR buttonW[]
#define memcpy(s1, s2, n)
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
#define IsEqualGUID(rguid1, rguid2)
DWORD dwFFMinTimeResolution
CHAR tszInstanceName[MAX_PATH]
CHAR tszProductName[MAX_PATH]
WCHAR tszProductName[MAX_PATH]
WCHAR tszInstanceName[MAX_PATH]
struct IDirectInputDeviceImpl base
VOID WINAPI InitializeCriticalSection(OUT LPCRITICAL_SECTION lpCriticalSection)
#define FIELD_OFFSET(t, f)
#define CONTAINING_RECORD(address, type, field)
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
#define SM_CYVIRTUALSCREEN
BOOL WINAPI GetClipCursor(_Out_ LPRECT)
int WINAPIV wsprintfW(_Out_ LPWSTR, _In_ _Printf_format_string_ LPCWSTR,...)
BOOL WINAPI ClipCursor(_In_opt_ LPCRECT)
BOOL WINAPI GetCursorPos(_Out_ LPPOINT)
int WINAPI ShowCursor(_In_ BOOL)
BOOL WINAPI SetCursorPos(_In_ int, _In_ int)
int WINAPI MapWindowPoints(_In_opt_ HWND hWndFrom, _In_opt_ HWND hWndTo, _Inout_updates_(cPoints) LPPOINT lpPoints, _In_ UINT cPoints)
HWND WINAPI GetDesktopWindow(void)
#define SM_CXVIRTUALSCREEN
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
#define SM_XVIRTUALSCREEN
BOOL WINAPI EqualRect(_In_ LPCRECT, _In_ LPCRECT)
int WINAPI GetSystemMetrics(_In_ int)
#define SM_YVIRTUALSCREEN
SHORT WINAPI GetKeyState(_In_ int)