Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
af34ef12
Commit
af34ef12
authored
Oct 15, 2006
by
Vitaliy Margolen
Committed by
Alexandre Julliard
Oct 17, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: Move SetEventNotification and associated event into base class.
parent
7d838d9e
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
20 additions
and
69 deletions
+20
-69
device.c
dlls/dinput/device.c
+9
-3
device_private.h
dlls/dinput/device_private.h
+1
-0
joystick_linux.c
dlls/dinput/joystick_linux.c
+2
-16
joystick_linuxinput.c
dlls/dinput/joystick_linuxinput.c
+2
-16
keyboard.c
dlls/dinput/keyboard.c
+3
-14
mouse.c
dlls/dinput/mouse.c
+3
-20
No files found.
dlls/dinput/device.c
View file @
af34ef12
...
@@ -475,11 +475,17 @@ HRESULT WINAPI IDirectInputDevice2AImpl_SetCooperativeLevel(
...
@@ -475,11 +475,17 @@ HRESULT WINAPI IDirectInputDevice2AImpl_SetCooperativeLevel(
return
DI_OK
;
return
DI_OK
;
}
}
/******************************************************************************
* SetEventNotification : specifies event to be sent on state change
*/
HRESULT
WINAPI
IDirectInputDevice2AImpl_SetEventNotification
(
HRESULT
WINAPI
IDirectInputDevice2AImpl_SetEventNotification
(
LPDIRECTINPUTDEVICE8A
iface
,
HANDLE
hnd
LPDIRECTINPUTDEVICE8A
iface
,
HANDLE
event
)
)
{
{
IDirectInputDevice2AImpl
*
This
=
(
IDirectInputDevice2AImpl
*
)
iface
;
IDirectInputDevice2AImpl
*
This
=
(
IDirectInputDevice2AImpl
*
)
iface
;
FIXME
(
"(this=%p,%p): stub
\n
"
,
This
,
hnd
);
TRACE
(
"(%p) %p
\n
"
,
This
,
event
);
This
->
hEvent
=
event
;
return
DI_OK
;
return
DI_OK
;
}
}
...
...
dlls/dinput/device_private.h
View file @
af34ef12
...
@@ -33,6 +33,7 @@ struct IDirectInputDevice2AImpl
...
@@ -33,6 +33,7 @@ struct IDirectInputDevice2AImpl
const
void
*
lpVtbl
;
const
void
*
lpVtbl
;
LONG
ref
;
LONG
ref
;
GUID
guid
;
GUID
guid
;
HANDLE
hEvent
;
};
};
/* Routines to do DataFormat / WineFormat conversions */
/* Routines to do DataFormat / WineFormat conversions */
...
...
dlls/dinput/joystick_linux.c
View file @
af34ef12
...
@@ -103,7 +103,6 @@ struct JoystickImpl
...
@@ -103,7 +103,6 @@ struct JoystickImpl
DataFormat
*
transform
;
/* wine to user format converter */
DataFormat
*
transform
;
/* wine to user format converter */
int
*
offsets
;
/* object offsets */
int
*
offsets
;
/* object offsets */
ObjProps
*
props
;
ObjProps
*
props
;
HANDLE
hEvent
;
LPDIDEVICEOBJECTDATA
data_queue
;
LPDIDEVICEOBJECTDATA
data_queue
;
int
queue_head
,
queue_tail
,
queue_len
;
int
queue_head
,
queue_tail
,
queue_len
;
BOOL
acquired
;
BOOL
acquired
;
...
@@ -1213,19 +1212,6 @@ static HRESULT WINAPI JoystickAImpl_SetProperty(
...
@@ -1213,19 +1212,6 @@ static HRESULT WINAPI JoystickAImpl_SetProperty(
return
DI_OK
;
return
DI_OK
;
}
}
/******************************************************************************
* SetEventNotification : specifies event to be sent on state change
*/
static
HRESULT
WINAPI
JoystickAImpl_SetEventNotification
(
LPDIRECTINPUTDEVICE8A
iface
,
HANDLE
hnd
)
{
JoystickImpl
*
This
=
(
JoystickImpl
*
)
iface
;
TRACE
(
"(this=%p,%p)
\n
"
,
This
,
hnd
);
This
->
hEvent
=
hnd
;
return
DI_OK
;
}
static
HRESULT
WINAPI
JoystickAImpl_GetCapabilities
(
static
HRESULT
WINAPI
JoystickAImpl_GetCapabilities
(
LPDIRECTINPUTDEVICE8A
iface
,
LPDIRECTINPUTDEVICE8A
iface
,
LPDIDEVCAPS
lpDIDevCaps
)
LPDIDEVCAPS
lpDIDevCaps
)
...
@@ -1662,7 +1648,7 @@ static const IDirectInputDevice8AVtbl JoystickAvt =
...
@@ -1662,7 +1648,7 @@ static const IDirectInputDevice8AVtbl JoystickAvt =
JoystickAImpl_GetDeviceState
,
JoystickAImpl_GetDeviceState
,
JoystickAImpl_GetDeviceData
,
JoystickAImpl_GetDeviceData
,
JoystickAImpl_SetDataFormat
,
JoystickAImpl_SetDataFormat
,
Joystick
AImpl_SetEventNotification
,
IDirectInputDevice2
AImpl_SetEventNotification
,
IDirectInputDevice2AImpl_SetCooperativeLevel
,
IDirectInputDevice2AImpl_SetCooperativeLevel
,
JoystickAImpl_GetObjectInfo
,
JoystickAImpl_GetObjectInfo
,
JoystickAImpl_GetDeviceInfo
,
JoystickAImpl_GetDeviceInfo
,
...
@@ -1704,7 +1690,7 @@ static const IDirectInputDevice8WVtbl SysJoystickWvt =
...
@@ -1704,7 +1690,7 @@ static const IDirectInputDevice8WVtbl SysJoystickWvt =
XCAST
(
GetDeviceState
)
JoystickAImpl_GetDeviceState
,
XCAST
(
GetDeviceState
)
JoystickAImpl_GetDeviceState
,
XCAST
(
GetDeviceData
)
JoystickAImpl_GetDeviceData
,
XCAST
(
GetDeviceData
)
JoystickAImpl_GetDeviceData
,
XCAST
(
SetDataFormat
)
JoystickAImpl_SetDataFormat
,
XCAST
(
SetDataFormat
)
JoystickAImpl_SetDataFormat
,
XCAST
(
SetEventNotification
)
Joystick
AImpl_SetEventNotification
,
XCAST
(
SetEventNotification
)
IDirectInputDevice2
AImpl_SetEventNotification
,
XCAST
(
SetCooperativeLevel
)
IDirectInputDevice2AImpl_SetCooperativeLevel
,
XCAST
(
SetCooperativeLevel
)
IDirectInputDevice2AImpl_SetCooperativeLevel
,
IDirectInputDevice2WImpl_GetObjectInfo
,
IDirectInputDevice2WImpl_GetObjectInfo
,
JoystickWImpl_GetDeviceInfo
,
JoystickWImpl_GetDeviceInfo
,
...
...
dlls/dinput/joystick_linuxinput.c
View file @
af34ef12
...
@@ -137,7 +137,6 @@ struct JoystickImpl
...
@@ -137,7 +137,6 @@ struct JoystickImpl
LPDIDATAFORMAT
df
;
LPDIDATAFORMAT
df
;
DataFormat
*
transform
;
/* wine to user format converter */
DataFormat
*
transform
;
/* wine to user format converter */
int
*
offsets
;
/* object offsets */
int
*
offsets
;
/* object offsets */
HANDLE
hEvent
;
LPDIDEVICEOBJECTDATA
data_queue
;
LPDIDEVICEOBJECTDATA
data_queue
;
int
queue_head
,
queue_tail
,
queue_len
;
int
queue_head
,
queue_tail
,
queue_len
;
BOOL
overflow
;
BOOL
overflow
;
...
@@ -1167,19 +1166,6 @@ static HRESULT WINAPI JoystickAImpl_SetProperty(LPDIRECTINPUTDEVICE8A iface,
...
@@ -1167,19 +1166,6 @@ static HRESULT WINAPI JoystickAImpl_SetProperty(LPDIRECTINPUTDEVICE8A iface,
return
0
;
return
0
;
}
}
/******************************************************************************
* SetEventNotification : specifies event to be sent on state change
*/
static
HRESULT
WINAPI
JoystickAImpl_SetEventNotification
(
LPDIRECTINPUTDEVICE8A
iface
,
HANDLE
hnd
)
{
JoystickImpl
*
This
=
(
JoystickImpl
*
)
iface
;
TRACE
(
"(this=%p,%p)
\n
"
,
This
,
hnd
);
This
->
hEvent
=
hnd
;
return
DI_OK
;
}
static
HRESULT
WINAPI
JoystickAImpl_GetCapabilities
(
static
HRESULT
WINAPI
JoystickAImpl_GetCapabilities
(
LPDIRECTINPUTDEVICE8A
iface
,
LPDIRECTINPUTDEVICE8A
iface
,
LPDIDEVCAPS
lpDIDevCaps
)
LPDIDEVCAPS
lpDIDevCaps
)
...
@@ -1808,7 +1794,7 @@ static const IDirectInputDevice8AVtbl JoystickAvt =
...
@@ -1808,7 +1794,7 @@ static const IDirectInputDevice8AVtbl JoystickAvt =
JoystickAImpl_GetDeviceState
,
JoystickAImpl_GetDeviceState
,
JoystickAImpl_GetDeviceData
,
JoystickAImpl_GetDeviceData
,
JoystickAImpl_SetDataFormat
,
JoystickAImpl_SetDataFormat
,
Joystick
AImpl_SetEventNotification
,
IDirectInputDevice2
AImpl_SetEventNotification
,
IDirectInputDevice2AImpl_SetCooperativeLevel
,
IDirectInputDevice2AImpl_SetCooperativeLevel
,
IDirectInputDevice2AImpl_GetObjectInfo
,
IDirectInputDevice2AImpl_GetObjectInfo
,
IDirectInputDevice2AImpl_GetDeviceInfo
,
IDirectInputDevice2AImpl_GetDeviceInfo
,
...
@@ -1850,7 +1836,7 @@ static const IDirectInputDevice8WVtbl JoystickWvt =
...
@@ -1850,7 +1836,7 @@ static const IDirectInputDevice8WVtbl JoystickWvt =
XCAST
(
GetDeviceState
)
JoystickAImpl_GetDeviceState
,
XCAST
(
GetDeviceState
)
JoystickAImpl_GetDeviceState
,
XCAST
(
GetDeviceData
)
JoystickAImpl_GetDeviceData
,
XCAST
(
GetDeviceData
)
JoystickAImpl_GetDeviceData
,
XCAST
(
SetDataFormat
)
JoystickAImpl_SetDataFormat
,
XCAST
(
SetDataFormat
)
JoystickAImpl_SetDataFormat
,
XCAST
(
SetEventNotification
)
Joystick
AImpl_SetEventNotification
,
XCAST
(
SetEventNotification
)
IDirectInputDevice2
AImpl_SetEventNotification
,
XCAST
(
SetCooperativeLevel
)
IDirectInputDevice2AImpl_SetCooperativeLevel
,
XCAST
(
SetCooperativeLevel
)
IDirectInputDevice2AImpl_SetCooperativeLevel
,
IDirectInputDevice2WImpl_GetObjectInfo
,
IDirectInputDevice2WImpl_GetObjectInfo
,
IDirectInputDevice2WImpl_GetDeviceInfo
,
IDirectInputDevice2WImpl_GetDeviceInfo
,
...
...
dlls/dinput/keyboard.c
View file @
af34ef12
...
@@ -50,7 +50,6 @@ struct SysKeyboardImpl
...
@@ -50,7 +50,6 @@ struct SysKeyboardImpl
IDirectInputImpl
*
dinput
;
IDirectInputImpl
*
dinput
;
HANDLE
hEvent
;
/* SysKeyboardAImpl */
/* SysKeyboardAImpl */
int
acquired
;
int
acquired
;
...
@@ -101,7 +100,7 @@ LRESULT CALLBACK KeyboardCallback( int code, WPARAM wparam, LPARAM lparam )
...
@@ -101,7 +100,7 @@ LRESULT CALLBACK KeyboardCallback( int code, WPARAM wparam, LPARAM lparam )
GEN_EVENT
(
dik_code
,
new_diks
,
hook
->
time
,
This
->
dinput
->
evsequence
++
);
GEN_EVENT
(
dik_code
,
new_diks
,
hook
->
time
,
This
->
dinput
->
evsequence
++
);
LeaveCriticalSection
(
&
This
->
crit
);
LeaveCriticalSection
(
&
This
->
crit
);
if
(
This
->
hEvent
)
SetEvent
(
This
->
hEvent
);
if
(
This
->
base
.
hEvent
)
SetEvent
(
This
->
base
.
hEvent
);
return
CallNextHookEx
(
0
,
code
,
wparam
,
lparam
);
return
CallNextHookEx
(
0
,
code
,
wparam
,
lparam
);
}
}
...
@@ -531,16 +530,6 @@ static HRESULT WINAPI SysKeyboardAImpl_Unacquire(LPDIRECTINPUTDEVICE8A iface)
...
@@ -531,16 +530,6 @@ static HRESULT WINAPI SysKeyboardAImpl_Unacquire(LPDIRECTINPUTDEVICE8A iface)
return
DI_OK
;
return
DI_OK
;
}
}
static
HRESULT
WINAPI
SysKeyboardAImpl_SetEventNotification
(
LPDIRECTINPUTDEVICE8A
iface
,
HANDLE
hnd
)
{
SysKeyboardImpl
*
This
=
(
SysKeyboardImpl
*
)
iface
;
TRACE
(
"(this=%p,%p)
\n
"
,
This
,
hnd
);
This
->
hEvent
=
hnd
;
return
DI_OK
;
}
/******************************************************************************
/******************************************************************************
* GetCapabilities : get the device capablitites
* GetCapabilities : get the device capablitites
*/
*/
...
@@ -699,7 +688,7 @@ static const IDirectInputDevice8AVtbl SysKeyboardAvt =
...
@@ -699,7 +688,7 @@ static const IDirectInputDevice8AVtbl SysKeyboardAvt =
SysKeyboardAImpl_GetDeviceState
,
SysKeyboardAImpl_GetDeviceState
,
SysKeyboardAImpl_GetDeviceData
,
SysKeyboardAImpl_GetDeviceData
,
IDirectInputDevice2AImpl_SetDataFormat
,
IDirectInputDevice2AImpl_SetDataFormat
,
SysKeyboard
AImpl_SetEventNotification
,
IDirectInputDevice2
AImpl_SetEventNotification
,
IDirectInputDevice2AImpl_SetCooperativeLevel
,
IDirectInputDevice2AImpl_SetCooperativeLevel
,
SysKeyboardAImpl_GetObjectInfo
,
SysKeyboardAImpl_GetObjectInfo
,
SysKeyboardAImpl_GetDeviceInfo
,
SysKeyboardAImpl_GetDeviceInfo
,
...
@@ -741,7 +730,7 @@ static const IDirectInputDevice8WVtbl SysKeyboardWvt =
...
@@ -741,7 +730,7 @@ static const IDirectInputDevice8WVtbl SysKeyboardWvt =
XCAST
(
GetDeviceState
)
SysKeyboardAImpl_GetDeviceState
,
XCAST
(
GetDeviceState
)
SysKeyboardAImpl_GetDeviceState
,
XCAST
(
GetDeviceData
)
SysKeyboardAImpl_GetDeviceData
,
XCAST
(
GetDeviceData
)
SysKeyboardAImpl_GetDeviceData
,
XCAST
(
SetDataFormat
)
IDirectInputDevice2AImpl_SetDataFormat
,
XCAST
(
SetDataFormat
)
IDirectInputDevice2AImpl_SetDataFormat
,
XCAST
(
SetEventNotification
)
SysKeyboard
AImpl_SetEventNotification
,
XCAST
(
SetEventNotification
)
IDirectInputDevice2
AImpl_SetEventNotification
,
XCAST
(
SetCooperativeLevel
)
IDirectInputDevice2AImpl_SetCooperativeLevel
,
XCAST
(
SetCooperativeLevel
)
IDirectInputDevice2AImpl_SetCooperativeLevel
,
SysKeyboardWImpl_GetObjectInfo
,
SysKeyboardWImpl_GetObjectInfo
,
SysKeyboardWImpl_GetDeviceInfo
,
SysKeyboardWImpl_GetDeviceInfo
,
...
...
dlls/dinput/mouse.c
View file @
af34ef12
...
@@ -136,7 +136,6 @@ struct SysMouseImpl
...
@@ -136,7 +136,6 @@ struct SysMouseImpl
WARP_STATUS
need_warp
;
WARP_STATUS
need_warp
;
DWORD
last_warped
;
DWORD
last_warped
;
int
acquired
;
int
acquired
;
HANDLE
hEvent
;
CRITICAL_SECTION
crit
;
CRITICAL_SECTION
crit
;
/* This is for mouse reporting. */
/* This is for mouse reporting. */
...
@@ -538,7 +537,7 @@ static LRESULT CALLBACK dinput_mouse_hook( int code, WPARAM wparam, LPARAM lpara
...
@@ -538,7 +537,7 @@ static LRESULT CALLBACK dinput_mouse_hook( int code, WPARAM wparam, LPARAM lpara
end:
end:
/* Mouse moved -> send event if asked */
/* Mouse moved -> send event if asked */
if
(
This
->
hEvent
)
SetEvent
(
This
->
hEvent
);
if
(
This
->
base
.
hEvent
)
SetEvent
(
This
->
base
.
hEvent
);
LeaveCriticalSection
(
&
(
This
->
crit
));
LeaveCriticalSection
(
&
(
This
->
crit
));
...
@@ -911,22 +910,6 @@ static HRESULT WINAPI SysMouseAImpl_GetProperty(LPDIRECTINPUTDEVICE8A iface,
...
@@ -911,22 +910,6 @@ static HRESULT WINAPI SysMouseAImpl_GetProperty(LPDIRECTINPUTDEVICE8A iface,
return
DI_OK
;
return
DI_OK
;
}
}
/******************************************************************************
* SetEventNotification : specifies event to be sent on state change
*/
static
HRESULT
WINAPI
SysMouseAImpl_SetEventNotification
(
LPDIRECTINPUTDEVICE8A
iface
,
HANDLE
hnd
)
{
SysMouseImpl
*
This
=
(
SysMouseImpl
*
)
iface
;
TRACE
(
"(this=%p,%p)
\n
"
,
This
,
hnd
);
This
->
hEvent
=
hnd
;
return
DI_OK
;
}
/******************************************************************************
/******************************************************************************
* GetCapabilities : get the device capablitites
* GetCapabilities : get the device capablitites
*/
*/
...
@@ -1107,7 +1090,7 @@ static const IDirectInputDevice8AVtbl SysMouseAvt =
...
@@ -1107,7 +1090,7 @@ static const IDirectInputDevice8AVtbl SysMouseAvt =
SysMouseAImpl_GetDeviceState
,
SysMouseAImpl_GetDeviceState
,
SysMouseAImpl_GetDeviceData
,
SysMouseAImpl_GetDeviceData
,
SysMouseAImpl_SetDataFormat
,
SysMouseAImpl_SetDataFormat
,
SysMouse
AImpl_SetEventNotification
,
IDirectInputDevice2
AImpl_SetEventNotification
,
SysMouseAImpl_SetCooperativeLevel
,
SysMouseAImpl_SetCooperativeLevel
,
IDirectInputDevice2AImpl_GetObjectInfo
,
IDirectInputDevice2AImpl_GetObjectInfo
,
SysMouseAImpl_GetDeviceInfo
,
SysMouseAImpl_GetDeviceInfo
,
...
@@ -1149,7 +1132,7 @@ static const IDirectInputDevice8WVtbl SysMouseWvt =
...
@@ -1149,7 +1132,7 @@ static const IDirectInputDevice8WVtbl SysMouseWvt =
XCAST
(
GetDeviceState
)
SysMouseAImpl_GetDeviceState
,
XCAST
(
GetDeviceState
)
SysMouseAImpl_GetDeviceState
,
XCAST
(
GetDeviceData
)
SysMouseAImpl_GetDeviceData
,
XCAST
(
GetDeviceData
)
SysMouseAImpl_GetDeviceData
,
XCAST
(
SetDataFormat
)
SysMouseAImpl_SetDataFormat
,
XCAST
(
SetDataFormat
)
SysMouseAImpl_SetDataFormat
,
XCAST
(
SetEventNotification
)
SysMouse
AImpl_SetEventNotification
,
XCAST
(
SetEventNotification
)
IDirectInputDevice2
AImpl_SetEventNotification
,
XCAST
(
SetCooperativeLevel
)
SysMouseAImpl_SetCooperativeLevel
,
XCAST
(
SetCooperativeLevel
)
SysMouseAImpl_SetCooperativeLevel
,
IDirectInputDevice2WImpl_GetObjectInfo
,
IDirectInputDevice2WImpl_GetObjectInfo
,
SysMouseWImpl_GetDeviceInfo
,
SysMouseWImpl_GetDeviceInfo
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment