Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
c9713e58
Commit
c9713e58
authored
Dec 05, 1999
by
Lionel Ulmer
Committed by
Alexandre Julliard
Dec 05, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- removed keyboard auto-repeat when DInput acquires it
- removed some (now) obsolete fixme's
parent
8b7c1906
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
87 additions
and
11 deletions
+87
-11
keyboard.h
include/keyboard.h
+7
-0
ttydrv.h
include/ttydrv.h
+4
-0
x11drv.h
include/x11drv.h
+4
-0
dinput.c
windows/dinput.c
+22
-8
init.c
windows/ttydrv/init.c
+3
-1
keyboard.c
windows/ttydrv/keyboard.c
+15
-0
init.c
windows/x11drv/init.c
+3
-1
keyboard.c
windows/x11drv/keyboard.c
+29
-1
No files found.
include/keyboard.h
View file @
c9713e58
...
...
@@ -30,6 +30,11 @@ VOID WINAPI KEYBOARD_Disable(VOID);
/* Wine internals */
#define WINE_KEYBOARD_CONFIG_AUTO_REPEAT 0x00000001
typedef
struct
tagKEYBOARD_CONFIG
{
BOOL
auto_repeat
;
}
KEYBOARD_CONFIG
;
typedef
struct
tagKEYBOARD_DRIVER
{
void
(
*
pInit
)(
void
);
WORD
(
*
pVkKeyScan
)(
CHAR
);
...
...
@@ -41,6 +46,8 @@ typedef struct tagKEYBOARD_DRIVER {
void
(
*
pBeep
)(
void
);
BOOL
(
*
pGetDIState
)(
DWORD
,
LPVOID
);
BOOL
(
*
pGetDIData
)(
BYTE
*
,
DWORD
,
LPDIDEVICEOBJECTDATA
,
LPDWORD
,
DWORD
);
void
(
*
pGetKeyboardConfig
)(
KEYBOARD_CONFIG
*
);
void
(
*
pSetKeyboardConfig
)(
KEYBOARD_CONFIG
*
,
DWORD
);
}
KEYBOARD_DRIVER
;
extern
KEYBOARD_DRIVER
*
KEYBOARD_Driver
;
...
...
include/ttydrv.h
View file @
c9713e58
...
...
@@ -20,6 +20,8 @@
#include "wine/winuser16.h"
#include "wine/wingdi16.h"
#include "keyboard.h"
struct
tagBITMAPOBJ
;
struct
tagCLASS
;
struct
tagDC
;
...
...
@@ -164,6 +166,8 @@ extern void TTYDRV_KEYBOARD_SetBeepActive(BOOL bActivate);
extern
void
TTYDRV_KEYBOARD_Beep
(
void
);
extern
BOOL
TTYDRV_KEYBOARD_GetDIState
(
DWORD
len
,
LPVOID
ptr
);
extern
BOOL
TTYDRV_KEYBOARD_GetDIData
(
BYTE
*
keystate
,
DWORD
dodsize
,
LPDIDEVICEOBJECTDATA
dod
,
LPDWORD
entries
,
DWORD
flags
);
extern
void
TTYDRV_KEYBOARD_GetKeyboardConfig
(
KEYBOARD_CONFIG
*
cfg
);
extern
void
TTYDRV_KEYBOARD_SetKeyboardConfig
(
KEYBOARD_CONFIG
*
cfg
,
DWORD
mask
);
/* TTY monitor driver */
...
...
include/x11drv.h
View file @
c9713e58
...
...
@@ -19,6 +19,8 @@
#include "winbase.h"
#include "windef.h"
#include "keyboard.h"
#include <X11/extensions/XShm.h>
struct
tagBITMAPOBJ
;
...
...
@@ -396,6 +398,8 @@ extern void X11DRV_KEYBOARD_SetBeepActive(BOOL bActivate);
extern
void
X11DRV_KEYBOARD_Beep
(
void
);
extern
BOOL
X11DRV_KEYBOARD_GetDIState
(
DWORD
len
,
LPVOID
ptr
);
extern
BOOL
X11DRV_KEYBOARD_GetDIData
(
BYTE
*
keystate
,
DWORD
dodsize
,
LPDIDEVICEOBJECTDATA
dod
,
LPDWORD
entries
,
DWORD
flags
);
extern
void
X11DRV_KEYBOARD_GetKeyboardConfig
(
KEYBOARD_CONFIG
*
cfg
);
extern
void
X11DRV_KEYBOARD_SetKeyboardConfig
(
KEYBOARD_CONFIG
*
cfg
,
DWORD
mask
);
extern
void
X11DRV_KEYBOARD_HandleEvent
(
struct
tagWND
*
pWnd
,
XKeyEvent
*
event
);
...
...
windows/dinput.c
View file @
c9713e58
...
...
@@ -81,6 +81,7 @@ struct SysKeyboardAImpl
GUID
guid
;
/* SysKeyboardAImpl */
BYTE
keystate
[
256
];
KEYBOARD_CONFIG
initial_config
;
};
#ifdef HAVE_LINUX_22_JOYSTICK_API
...
...
@@ -294,7 +295,7 @@ static HRESULT WINAPI IDirectInputAImpl_CreateDevice(
char
xbuf
[
50
];
WINE_StringFromCLSID
(
rguid
,
xbuf
);
FIXME
(
"(this=%p,%s,%p,%p): stub
\n
"
,
This
,
xbuf
,
pdev
,
punk
);
TRACE
(
"(this=%p,%s,%p,%p)
\n
"
,
This
,
xbuf
,
pdev
,
punk
);
if
((
!
memcmp
(
&
GUID_SysKeyboard
,
rguid
,
sizeof
(
GUID_SysKeyboard
)))
||
/* Generic Keyboard */
(
!
memcmp
(
&
DInput_Wine_Keyboard_GUID
,
rguid
,
sizeof
(
GUID_SysKeyboard
))))
{
/* Wine Keyboard */
SysKeyboardAImpl
*
newDevice
;
...
...
@@ -431,7 +432,7 @@ static HRESULT WINAPI IDirectInputDevice2AImpl_SetCooperativeLevel(
LPDIRECTINPUTDEVICE2A
iface
,
HWND
hwnd
,
DWORD
dwflags
)
{
ICOM_THIS
(
IDirectInputDevice2AImpl
,
iface
);
FIXME
(
"(this=%p,0x%08lx,0x%08lx): stub
\n
"
,
This
,(
DWORD
)
hwnd
,
dwflags
);
TRACE
(
"(this=%p,0x%08lx,0x%08lx)
\n
"
,
This
,(
DWORD
)
hwnd
,
dwflags
);
if
(
TRACE_ON
(
dinput
))
_dump_cooperativelevel
(
dwflags
);
return
0
;
...
...
@@ -507,7 +508,7 @@ static HRESULT WINAPI SysKeyboardAImpl_GetDeviceData(
ret
=
KEYBOARD_Driver
->
pGetDIData
(
This
->
keystate
,
dodsize
,
dod
,
entries
,
flags
)
?
DI_OK
:
E_FAIL
;
for
(
i
=
0
;
i
<*
entries
;
i
++
)
{
dod
[
i
].
dwTimeStamp
=
time
(
NULL
);
dod
[
i
].
dwTimeStamp
=
GetTickCount
(
);
dod
[
i
].
dwSequence
=
evsequence
++
;
}
return
ret
;
...
...
@@ -516,15 +517,28 @@ static HRESULT WINAPI SysKeyboardAImpl_GetDeviceData(
static
HRESULT
WINAPI
SysKeyboardAImpl_Acquire
(
LPDIRECTINPUTDEVICE2A
iface
)
{
ICOM_THIS
(
SysKeyboardAImpl
,
iface
);
TRACE
(
"(this=%p): stub
\n
"
,
This
);
return
0
;
KEYBOARD_CONFIG
no_auto
;
TRACE
(
"(this=%p)
\n
"
,
This
);
/* Save the original config */
KEYBOARD_Driver
->
pGetKeyboardConfig
(
&
(
This
->
initial_config
));
/* Now, remove auto-repeat */
no_auto
.
auto_repeat
=
FALSE
;
KEYBOARD_Driver
->
pSetKeyboardConfig
(
&
no_auto
,
WINE_KEYBOARD_CONFIG_AUTO_REPEAT
);
return
DI_OK
;
}
static
HRESULT
WINAPI
SysKeyboardAImpl_Unacquire
(
LPDIRECTINPUTDEVICE2A
iface
)
{
ICOM_THIS
(
SysKeyboardAImpl
,
iface
);
TRACE
(
"(this=%p): stub
\n
"
,
This
);
return
0
;
TRACE
(
"(this=%p)
\n
"
,
This
);
/* Restore the original configuration */
KEYBOARD_Driver
->
pSetKeyboardConfig
(
&
(
This
->
initial_config
),
0xFFFFFFFF
);
return
DI_OK
;
}
static
HRESULT
WINAPI
IDirectInputDevice2AImpl_QueryInterface
(
...
...
@@ -760,7 +774,7 @@ static HRESULT WINAPI SysMouseAImpl_SetCooperativeLevel(
{
ICOM_THIS
(
SysMouseAImpl
,
iface
);
TRACE
(
"(this=%p,0x%08lx,0x%08lx)
: stub
\n
"
,
This
,(
DWORD
)
hwnd
,
dwflags
);
TRACE
(
"(this=%p,0x%08lx,0x%08lx)
\n
"
,
This
,(
DWORD
)
hwnd
,
dwflags
);
if
(
TRACE_ON
(
dinput
))
_dump_cooperativelevel
(
dwflags
);
...
...
windows/ttydrv/init.c
View file @
c9713e58
...
...
@@ -59,7 +59,9 @@ KEYBOARD_DRIVER TTYDRV_KEYBOARD_Driver =
TTYDRV_KEYBOARD_SetBeepActive
,
TTYDRV_KEYBOARD_Beep
,
TTYDRV_KEYBOARD_GetDIState
,
TTYDRV_KEYBOARD_GetDIData
TTYDRV_KEYBOARD_GetDIData
,
TTYDRV_KEYBOARD_GetKeyboardConfig
,
TTYDRV_KEYBOARD_SetKeyboardConfig
};
MONITOR_DRIVER
TTYDRV_MONITOR_Driver
=
...
...
windows/ttydrv/keyboard.c
View file @
c9713e58
...
...
@@ -93,3 +93,18 @@ BOOL TTYDRV_KEYBOARD_GetDIData(
{
return
TRUE
;
}
/***********************************************************************
* TTYDRV_KEYBOARD_GetKeyboardConfig
*/
void
TTYDRV_KEYBOARD_GetKeyboardConfig
(
KEYBOARD_CONFIG
*
cfg
)
{
}
/***********************************************************************
* TTYDRV_KEYBOARD_SetKeyboardConfig
*/
extern
void
TTYDRV_KEYBOARD_SetKeyboardConfig
(
KEYBOARD_CONFIG
*
cfg
,
DWORD
mask
)
{
}
windows/x11drv/init.c
View file @
c9713e58
...
...
@@ -63,7 +63,9 @@ KEYBOARD_DRIVER X11DRV_KEYBOARD_Driver =
X11DRV_KEYBOARD_SetBeepActive
,
X11DRV_KEYBOARD_Beep
,
X11DRV_KEYBOARD_GetDIState
,
X11DRV_KEYBOARD_GetDIData
X11DRV_KEYBOARD_GetDIData
,
X11DRV_KEYBOARD_GetKeyboardConfig
,
X11DRV_KEYBOARD_SetKeyboardConfig
};
MONITOR_DRIVER
X11DRV_MONITOR_Driver
=
...
...
windows/x11drv/keyboard.c
View file @
c9713e58
...
...
@@ -33,6 +33,7 @@
DECLARE_DEBUG_CHANNEL
(
key
)
DECLARE_DEBUG_CHANNEL
(
keyboard
)
DECLARE_DEBUG_CHANNEL
(
x11drv
)
DECLARE_DEBUG_CHANNEL
(
dinput
)
extern
BYTE
InputKeyStateTable
[
256
];
...
...
@@ -1480,11 +1481,38 @@ BOOL X11DRV_KEYBOARD_GetDIData(
}
if
(
n
)
fprintf
(
stderr
,
"%d entries
\n
"
,
n
);
if
(
n
)
TRACE_
(
dinput
)(
"%d entries
\n
"
,
n
);
*
entries
=
n
;
return
TRUE
;
}
/***********************************************************************
* X11DRV_KEYBOARD_GetKeyboardConfig
*/
void
X11DRV_KEYBOARD_GetKeyboardConfig
(
KEYBOARD_CONFIG
*
cfg
)
{
XKeyboardState
xks
;
/* For the moment, only get the auto-repeat mode */
TSXGetKeyboardControl
(
display
,
&
xks
);
cfg
->
auto_repeat
=
xks
.
global_auto_repeat
;
}
/***********************************************************************
* X11DRV_KEYBOARD_SetKeyboardConfig
*/
extern
void
X11DRV_KEYBOARD_SetKeyboardConfig
(
KEYBOARD_CONFIG
*
cfg
,
DWORD
mask
)
{
XKeyboardControl
xkc
;
unsigned
long
X_mask
=
0
;
if
(
mask
&
WINE_KEYBOARD_CONFIG_AUTO_REPEAT
)
{
X_mask
|=
KBAutoRepeatMode
;
xkc
.
auto_repeat_mode
=
cfg
->
auto_repeat
;
}
if
(
X_mask
)
TSXChangeKeyboardControl
(
display
,
X_mask
,
&
xkc
);
}
#endif
/* !defined(X_DISPLAY_MISSING) */
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