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
d96e1f13
Commit
d96e1f13
authored
Jul 04, 1999
by
Patrik Stridvall
Committed by
Alexandre Julliard
Jul 04, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved code to the X11 driver.
parent
a49bb266
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
200 additions
and
127 deletions
+200
-127
ddraw.c
graphics/ddraw.c
+73
-60
keyboard.h
include/keyboard.h
+4
-1
ttydrv.h
include/ttydrv.h
+4
-0
x11drv.h
include/x11drv.h
+4
-1
dc.c
objects/dc.c
+2
-0
gdiobj.c
objects/gdiobj.c
+2
-0
dinput.c
windows/dinput.c
+11
-58
init.c
windows/ttydrv/init.c
+3
-1
keyboard.c
windows/ttydrv/keyboard.c
+17
-3
init.c
windows/x11drv/init.c
+3
-1
keyboard.c
windows/x11drv/keyboard.c
+77
-2
No files found.
graphics/ddraw.c
View file @
d96e1f13
...
@@ -4978,66 +4978,6 @@ HRESULT WINAPI DirectDrawCreate( LPGUID lpGUID, LPDIRECTDRAW *lplpDD, LPUNKNOWN
...
@@ -4978,66 +4978,6 @@ HRESULT WINAPI DirectDrawCreate( LPGUID lpGUID, LPDIRECTDRAW *lplpDD, LPUNKNOWN
return
DDERR_INVALIDDIRECTDRAWGUID
;
return
DDERR_INVALIDDIRECTDRAWGUID
;
}
}
#else
/* !defined(X_DISPLAY_MISSING) */
#include "windef.h"
#define DD_OK 0
typedef
void
*
LPGUID
;
typedef
void
*
LPUNKNOWN
;
typedef
void
*
LPDIRECTDRAW
;
typedef
void
*
LPDIRECTDRAWCLIPPER
;
typedef
void
*
LPDDENUMCALLBACKA
;
typedef
void
*
LPDDENUMCALLBACKEXA
;
typedef
void
*
LPDDENUMCALLBACKEXW
;
typedef
void
*
LPDDENUMCALLBACKW
;
HRESULT
WINAPI
DSoundHelp
(
DWORD
x
,
DWORD
y
,
DWORD
z
)
{
return
DD_OK
;
}
HRESULT
WINAPI
DirectDrawCreate
(
LPGUID
lpGUID
,
LPDIRECTDRAW
*
lplpDD
,
LPUNKNOWN
pUnkOuter
)
{
return
DD_OK
;
}
HRESULT
WINAPI
DirectDrawCreateClipper
(
DWORD
dwFlags
,
LPDIRECTDRAWCLIPPER
*
lplpDDClipper
,
LPUNKNOWN
pUnkOuter
)
{
return
DD_OK
;
}
HRESULT
WINAPI
DirectDrawEnumerateA
(
LPDDENUMCALLBACKA
lpCallback
,
LPVOID
lpContext
)
{
return
DD_OK
;
}
HRESULT
WINAPI
DirectDrawEnumerateExA
(
LPDDENUMCALLBACKEXA
lpCallback
,
LPVOID
lpContext
,
DWORD
dwFlags
)
{
return
DD_OK
;
}
HRESULT
WINAPI
DirectDrawEnumerateExW
(
LPDDENUMCALLBACKEXW
lpCallback
,
LPVOID
lpContext
,
DWORD
dwFlags
)
{
return
DD_OK
;
}
HRESULT
WINAPI
DirectDrawEnumerateW
(
LPDDENUMCALLBACKW
lpCallback
,
LPVOID
lpContext
)
{
return
DD_OK
;
}
#endif
/* !defined(X_DISPLAY_MISSING) */
/*******************************************************************************
/*******************************************************************************
* DirectDraw ClassFactory
* DirectDraw ClassFactory
*
*
...
@@ -5163,3 +5103,76 @@ DWORD WINAPI DDRAW_DllCanUnloadNow(void)
...
@@ -5163,3 +5103,76 @@ DWORD WINAPI DDRAW_DllCanUnloadNow(void)
FIXME
(
"(void): stub
\n
"
);
FIXME
(
"(void): stub
\n
"
);
return
S_FALSE
;
return
S_FALSE
;
}
}
#else
/* !defined(X_DISPLAY_MISSING) */
#include "windef.h"
#include "winerror.h"
#include "wtypes.h"
#define DD_OK 0
typedef
void
*
LPUNKNOWN
;
typedef
void
*
LPDIRECTDRAW
;
typedef
void
*
LPDIRECTDRAWCLIPPER
;
typedef
void
*
LPDDENUMCALLBACKA
;
typedef
void
*
LPDDENUMCALLBACKEXA
;
typedef
void
*
LPDDENUMCALLBACKEXW
;
typedef
void
*
LPDDENUMCALLBACKW
;
HRESULT
WINAPI
DSoundHelp
(
DWORD
x
,
DWORD
y
,
DWORD
z
)
{
return
DD_OK
;
}
HRESULT
WINAPI
DirectDrawCreate
(
LPGUID
lpGUID
,
LPDIRECTDRAW
*
lplpDD
,
LPUNKNOWN
pUnkOuter
)
{
return
DD_OK
;
}
HRESULT
WINAPI
DirectDrawCreateClipper
(
DWORD
dwFlags
,
LPDIRECTDRAWCLIPPER
*
lplpDDClipper
,
LPUNKNOWN
pUnkOuter
)
{
return
DD_OK
;
}
HRESULT
WINAPI
DirectDrawEnumerateA
(
LPDDENUMCALLBACKA
lpCallback
,
LPVOID
lpContext
)
{
return
DD_OK
;
}
HRESULT
WINAPI
DirectDrawEnumerateExA
(
LPDDENUMCALLBACKEXA
lpCallback
,
LPVOID
lpContext
,
DWORD
dwFlags
)
{
return
DD_OK
;
}
HRESULT
WINAPI
DirectDrawEnumerateExW
(
LPDDENUMCALLBACKEXW
lpCallback
,
LPVOID
lpContext
,
DWORD
dwFlags
)
{
return
DD_OK
;
}
HRESULT
WINAPI
DirectDrawEnumerateW
(
LPDDENUMCALLBACKW
lpCallback
,
LPVOID
lpContext
)
{
return
DD_OK
;
}
DWORD
WINAPI
DDRAW_DllGetClassObject
(
REFCLSID
rclsid
,
REFIID
riid
,
LPVOID
*
ppv
)
{
return
E_NOINTERFACE
;
}
DWORD
WINAPI
DDRAW_DllCanUnloadNow
(
void
)
{
return
DD_OK
;
}
#endif
/* !defined(X_DISPLAY_MISSING) */
include/keyboard.h
View file @
d96e1f13
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
#ifndef __WINE_KEYBOARD_H
#ifndef __WINE_KEYBOARD_H
#define __WINE_KEYBOARD_H
#define __WINE_KEYBOARD_H
#include "dinput.h"
#include "windef.h"
#include "windef.h"
#include "pshpack1.h"
#include "pshpack1.h"
...
@@ -36,8 +37,10 @@ typedef struct tagKEYBOARD_DRIVER {
...
@@ -36,8 +37,10 @@ typedef struct tagKEYBOARD_DRIVER {
INT16
(
*
pGetKeyNameText
)(
LONG
,
LPSTR
,
INT16
);
INT16
(
*
pGetKeyNameText
)(
LONG
,
LPSTR
,
INT16
);
INT16
(
*
pToAscii
)(
UINT16
,
UINT16
,
LPBYTE
,
LPVOID
,
UINT16
);
INT16
(
*
pToAscii
)(
UINT16
,
UINT16
,
LPBYTE
,
LPVOID
,
UINT16
);
BOOL
(
*
pGetBeepActive
)(
void
);
BOOL
(
*
pGetBeepActive
)(
void
);
void
(
*
pSetBeepActive
)(
BOOL
bActivate
);
void
(
*
pSetBeepActive
)(
BOOL
);
void
(
*
pBeep
)(
void
);
void
(
*
pBeep
)(
void
);
BOOL
(
*
pGetDIState
)(
DWORD
,
LPVOID
);
BOOL
(
*
pGetDIData
)(
BYTE
*
,
DWORD
,
LPDIDEVICEOBJECTDATA
,
LPDWORD
,
DWORD
);
}
KEYBOARD_DRIVER
;
}
KEYBOARD_DRIVER
;
extern
KEYBOARD_DRIVER
*
KEYBOARD_Driver
;
extern
KEYBOARD_DRIVER
*
KEYBOARD_Driver
;
...
...
include/ttydrv.h
View file @
d96e1f13
...
@@ -7,6 +7,8 @@
...
@@ -7,6 +7,8 @@
#include "windef.h"
#include "windef.h"
#include "wingdi.h"
#include "wingdi.h"
#include "dinput.h"
#include "wine/winuser16.h"
#include "wine/wingdi16.h"
#include "wine/wingdi16.h"
struct
tagBITMAPOBJ
;
struct
tagBITMAPOBJ
;
...
@@ -108,6 +110,8 @@ extern INT16 TTYDRV_KEYBOARD_ToAscii(UINT16 virtKey, UINT16 scanCode, LPBYTE lpK
...
@@ -108,6 +110,8 @@ extern INT16 TTYDRV_KEYBOARD_ToAscii(UINT16 virtKey, UINT16 scanCode, LPBYTE lpK
extern
BOOL
TTYDRV_KEYBOARD_GetBeepActive
(
void
);
extern
BOOL
TTYDRV_KEYBOARD_GetBeepActive
(
void
);
extern
void
TTYDRV_KEYBOARD_SetBeepActive
(
BOOL
bActivate
);
extern
void
TTYDRV_KEYBOARD_SetBeepActive
(
BOOL
bActivate
);
extern
void
TTYDRV_KEYBOARD_Beep
(
void
);
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
);
/* TTY monitor driver */
/* TTY monitor driver */
...
...
include/x11drv.h
View file @
d96e1f13
...
@@ -14,8 +14,9 @@
...
@@ -14,8 +14,9 @@
#include <X11/Xatom.h>
#include <X11/Xatom.h>
#endif
/* !defined(X_DISPLAY_MISSING) */
#endif
/* !defined(X_DISPLAY_MISSING) */
#include "
winbase
.h"
#include "
dinput
.h"
#include "gdi.h"
#include "gdi.h"
#include "winbase.h"
#include "windef.h"
#include "windef.h"
struct
tagBITMAPOBJ
;
struct
tagBITMAPOBJ
;
...
@@ -359,6 +360,8 @@ extern INT16 X11DRV_KEYBOARD_ToAscii(UINT16 virtKey, UINT16 scanCode, LPBYTE lpK
...
@@ -359,6 +360,8 @@ extern INT16 X11DRV_KEYBOARD_ToAscii(UINT16 virtKey, UINT16 scanCode, LPBYTE lpK
extern
BOOL
X11DRV_KEYBOARD_GetBeepActive
(
void
);
extern
BOOL
X11DRV_KEYBOARD_GetBeepActive
(
void
);
extern
void
X11DRV_KEYBOARD_SetBeepActive
(
BOOL
bActivate
);
extern
void
X11DRV_KEYBOARD_SetBeepActive
(
BOOL
bActivate
);
extern
void
X11DRV_KEYBOARD_Beep
(
void
);
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_HandleEvent
(
struct
tagWND
*
pWnd
,
XKeyEvent
*
event
);
extern
void
X11DRV_KEYBOARD_HandleEvent
(
struct
tagWND
*
pWnd
,
XKeyEvent
*
event
);
...
...
objects/dc.c
View file @
d96e1f13
...
@@ -5,6 +5,8 @@
...
@@ -5,6 +5,8 @@
*
*
*/
*/
#include "config.h"
#ifndef X_DISPLAY_MISSING
#ifndef X_DISPLAY_MISSING
#include "ts_xlib.h"
#include "ts_xlib.h"
#include "x11drv.h"
#include "x11drv.h"
...
...
objects/gdiobj.c
View file @
d96e1f13
...
@@ -4,6 +4,8 @@
...
@@ -4,6 +4,8 @@
* Copyright 1993 Alexandre Julliard
* Copyright 1993 Alexandre Julliard
*/
*/
#include "config.h"
#ifndef X_DISPLAY_MISSING
#ifndef X_DISPLAY_MISSING
#include "x11drv.h"
#include "x11drv.h"
#else
/* !defined(X_DISPLAY_MISSING) */
#else
/* !defined(X_DISPLAY_MISSING) */
...
...
windows/dinput.c
View file @
d96e1f13
...
@@ -24,14 +24,16 @@
...
@@ -24,14 +24,16 @@
#include <assert.h>
#include <assert.h>
#include <sys/signal.h>
#include <sys/signal.h>
#include "winuser.h"
#include "winerror.h"
#include "wine/obj_base.h"
#include "wine/obj_base.h"
#include "dinput.h"
#include "debug.h"
#include "debug.h"
#include "
message
.h"
#include "
dinput
.h"
#include "display.h"
#include "display.h"
#include "keyboard.h"
#include "message.h"
#include "mouse.h"
#include "mouse.h"
#include "sysmetrics.h"
#include "winerror.h"
#include "winuser.h"
DEFAULT_DEBUG_CHANNEL
(
dinput
)
DEFAULT_DEBUG_CHANNEL
(
dinput
)
...
@@ -399,24 +401,7 @@ static HRESULT WINAPI SysKeyboardAImpl_GetDeviceState(
...
@@ -399,24 +401,7 @@ static HRESULT WINAPI SysKeyboardAImpl_GetDeviceState(
LPDIRECTINPUTDEVICE2A
iface
,
DWORD
len
,
LPVOID
ptr
LPDIRECTINPUTDEVICE2A
iface
,
DWORD
len
,
LPVOID
ptr
)
)
{
{
if
(
len
==
256
)
{
return
KEYBOARD_Driver
->
pGetDIState
(
len
,
ptr
)
?
DI_OK
:
E_FAIL
;
int
keyc
,
vkey
;
memset
(
ptr
,
0
,
256
);
for
(
keyc
=
min_keycode
;
keyc
<
max_keycode
;
keyc
++
)
{
/* X keycode to virtual key */
vkey
=
keyc2vkey
[
keyc
]
&
0xFF
;
/* The windows scancode is keyc-min_keycode */
if
(
InputKeyStateTable
[
vkey
]
&
0x80
)
{
((
LPBYTE
)
ptr
)[
keyc
-
min_keycode
]
=
0x80
;
((
LPBYTE
)
ptr
)[(
keyc
-
min_keycode
)
|
0x80
]
=
0x80
;
}
}
return
0
;
}
WARN
(
dinput
,
"whoops, SysKeyboardAImpl_GetDeviceState got len %ld?
\n
"
,
len
);
return
0
;
}
}
static
HRESULT
WINAPI
SysKeyboardAImpl_GetDeviceData
(
static
HRESULT
WINAPI
SysKeyboardAImpl_GetDeviceData
(
...
@@ -425,44 +410,12 @@ static HRESULT WINAPI SysKeyboardAImpl_GetDeviceData(
...
@@ -425,44 +410,12 @@ static HRESULT WINAPI SysKeyboardAImpl_GetDeviceData(
)
)
{
{
ICOM_THIS
(
SysKeyboardAImpl
,
iface
);
ICOM_THIS
(
SysKeyboardAImpl
,
iface
);
int
keyc
,
n
,
vkey
,
xentries
;
TRACE
(
dinput
,
"(this=%p,%ld,%p,%p(%ld)),0x%08lx)
\n
"
,
This
,
dodsize
,
dod
,
entries
,
entries
?*
entries
:
0
,
flags
);
/* FIXME !!! */
TRACE
(
dinput
,
"(this=%p,%ld,%p,%p(%ld)),0x%08lx)
\n
"
,
This
,
dodsize
,
dod
,
entries
,
entries
?*
entries
:
0
,
flags
);
EVENT_Synchronize
(
FALSE
);
return
KEYBOARD_Driver
->
pGetDIData
(
This
->
keystate
,
dodsize
,
dod
,
entries
,
flags
)
?
DI_OK
:
E_FAIL
;
if
(
entries
)
xentries
=
*
entries
;
else
xentries
=
1
;
n
=
0
;
for
(
keyc
=
min_keycode
;(
keyc
<
max_keycode
)
&&
(
n
<*
entries
);
keyc
++
)
{
/* X keycode to virtual key */
vkey
=
keyc2vkey
[
keyc
]
&
0xFF
;
if
(
This
->
keystate
[
vkey
]
==
(
InputKeyStateTable
[
vkey
]
&
0x80
))
continue
;
if
(
dod
)
{
/* add an entry */
dod
[
n
].
dwOfs
=
keyc
-
min_keycode
;
/* scancode */
dod
[
n
].
dwData
=
InputKeyStateTable
[
vkey
]
&
0x80
;
dod
[
n
].
dwTimeStamp
=
0
;
/* umm */
dod
[
n
].
dwSequence
=
0
;
/* umm */
n
++
;
}
if
(
!
(
flags
&
DIGDD_PEEK
))
This
->
keystate
[
vkey
]
=
InputKeyStateTable
[
vkey
]
&
0x80
;
}
if
(
n
)
fprintf
(
stderr
,
"%d entries
\n
"
,
n
);
*
entries
=
n
;
return
0
;
}
}
static
HRESULT
WINAPI
SysKeyboardAImpl_Acquire
(
LPDIRECTINPUTDEVICE2A
iface
)
static
HRESULT
WINAPI
SysKeyboardAImpl_Acquire
(
LPDIRECTINPUTDEVICE2A
iface
)
...
...
windows/ttydrv/init.c
View file @
d96e1f13
...
@@ -54,7 +54,9 @@ KEYBOARD_DRIVER TTYDRV_KEYBOARD_Driver =
...
@@ -54,7 +54,9 @@ KEYBOARD_DRIVER TTYDRV_KEYBOARD_Driver =
TTYDRV_KEYBOARD_ToAscii
,
TTYDRV_KEYBOARD_ToAscii
,
TTYDRV_KEYBOARD_GetBeepActive
,
TTYDRV_KEYBOARD_GetBeepActive
,
TTYDRV_KEYBOARD_SetBeepActive
,
TTYDRV_KEYBOARD_SetBeepActive
,
TTYDRV_KEYBOARD_Beep
TTYDRV_KEYBOARD_Beep
,
TTYDRV_KEYBOARD_GetDIState
,
TTYDRV_KEYBOARD_GetDIData
};
};
MONITOR_DRIVER
TTYDRV_MONITOR_Driver
=
MONITOR_DRIVER
TTYDRV_MONITOR_Driver
=
...
...
windows/ttydrv/keyboard.c
View file @
d96e1f13
...
@@ -75,7 +75,21 @@ void TTYDRV_KEYBOARD_Beep()
...
@@ -75,7 +75,21 @@ void TTYDRV_KEYBOARD_Beep()
{
{
}
}
/***********************************************************************
* X11DRV_KEYBOARD_GetDIState
*/
BOOL
TTYDRV_KEYBOARD_GetDIState
(
DWORD
len
,
LPVOID
ptr
)
{
return
TRUE
;
}
/***********************************************************************
* TTYDRV_KEYBOARD_GetDIData
*/
BOOL
TTYDRV_KEYBOARD_GetDIData
(
BYTE
*
keystate
,
DWORD
dodsize
,
LPDIDEVICEOBJECTDATA
dod
,
LPDWORD
entries
,
DWORD
flags
)
{
return
TRUE
;
}
windows/x11drv/init.c
View file @
d96e1f13
...
@@ -58,7 +58,9 @@ KEYBOARD_DRIVER X11DRV_KEYBOARD_Driver =
...
@@ -58,7 +58,9 @@ KEYBOARD_DRIVER X11DRV_KEYBOARD_Driver =
X11DRV_KEYBOARD_ToAscii
,
X11DRV_KEYBOARD_ToAscii
,
X11DRV_KEYBOARD_GetBeepActive
,
X11DRV_KEYBOARD_GetBeepActive
,
X11DRV_KEYBOARD_SetBeepActive
,
X11DRV_KEYBOARD_SetBeepActive
,
X11DRV_KEYBOARD_Beep
X11DRV_KEYBOARD_Beep
,
X11DRV_KEYBOARD_GetDIState
,
X11DRV_KEYBOARD_GetDIData
};
};
MONITOR_DRIVER
X11DRV_MONITOR_Driver
=
MONITOR_DRIVER
X11DRV_MONITOR_Driver
=
...
...
windows/x11drv/keyboard.c
View file @
d96e1f13
...
@@ -9,11 +9,11 @@
...
@@ -9,11 +9,11 @@
* Copyright 1999 Ove Kven
* Copyright 1999 Ove Kven
*/
*/
#include <ctype.h>
#include "config.h"
#include "config.h"
#ifndef X_DISPLAY_MISSING
#ifndef X_DISPLAY_MISSING
#include <ctype.h>
#include <X11/Xatom.h>
#include <X11/Xatom.h>
#include <X11/keysym.h>
#include <X11/keysym.h>
#include "ts_xlib.h"
#include "ts_xlib.h"
...
@@ -21,15 +21,19 @@
...
@@ -21,15 +21,19 @@
#include "ts_xutil.h"
#include "ts_xutil.h"
#include "wine/winuser16.h"
#include "wine/winuser16.h"
#include "dinput.h"
#include "debugtools.h"
#include "debugtools.h"
#include "keyboard.h"
#include "keyboard.h"
#include "message.h"
#include "message.h"
#include "windef.h"
#include "windef.h"
#include "x11drv.h"
#include "winnls.h"
#include "winnls.h"
#include "x11drv.h"
DECLARE_DEBUG_CHANNEL
(
key
)
DECLARE_DEBUG_CHANNEL
(
key
)
DECLARE_DEBUG_CHANNEL
(
keyboard
)
DECLARE_DEBUG_CHANNEL
(
keyboard
)
DECLARE_DEBUG_CHANNEL
(
x11drv
)
extern
BYTE
InputKeyStateTable
[
256
];
extern
LPBYTE
pKeyStateTable
;
extern
LPBYTE
pKeyStateTable
;
...
@@ -1333,5 +1337,76 @@ void X11DRV_KEYBOARD_Beep()
...
@@ -1333,5 +1337,76 @@ void X11DRV_KEYBOARD_Beep()
TSXBell
(
display
,
0
);
TSXBell
(
display
,
0
);
}
}
/***********************************************************************
* X11DRV_KEYBOARD_GetDIState
*/
BOOL
X11DRV_KEYBOARD_GetDIState
(
DWORD
len
,
LPVOID
ptr
)
{
if
(
len
==
256
)
{
int
keyc
,
vkey
;
memset
(
ptr
,
0
,
256
);
for
(
keyc
=
min_keycode
;
keyc
<
max_keycode
;
keyc
++
)
{
/* X keycode to virtual key */
vkey
=
keyc2vkey
[
keyc
]
&
0xFF
;
/* The windows scancode is keyc-min_keycode */
if
(
InputKeyStateTable
[
vkey
]
&
0x80
)
{
((
LPBYTE
)
ptr
)[
keyc
-
min_keycode
]
=
0x80
;
((
LPBYTE
)
ptr
)[(
keyc
-
min_keycode
)
|
0x80
]
=
0x80
;
}
}
return
TRUE
;
}
WARN_
(
x11drv
)(
"whoops, X11DRV_KEYBOARD_GetState got len %ld?
\n
"
,
len
);
return
TRUE
;
}
/***********************************************************************
* X11DRV_KEYBOARD_GetDIData
*/
BOOL
X11DRV_KEYBOARD_GetDIData
(
BYTE
*
keystate
,
DWORD
dodsize
,
LPDIDEVICEOBJECTDATA
dod
,
LPDWORD
entries
,
DWORD
flags
)
{
int
keyc
,
n
,
vkey
,
xentries
;
/* FIXME !!! */
EVENT_Synchronize
(
FALSE
);
if
(
entries
)
xentries
=
*
entries
;
else
xentries
=
1
;
n
=
0
;
for
(
keyc
=
min_keycode
;(
keyc
<
max_keycode
)
&&
(
n
<*
entries
);
keyc
++
)
{
/* X keycode to virtual key */
vkey
=
keyc2vkey
[
keyc
]
&
0xFF
;
if
(
keystate
[
vkey
]
==
(
InputKeyStateTable
[
vkey
]
&
0x80
))
continue
;
if
(
dod
)
{
/* add an entry */
dod
[
n
].
dwOfs
=
keyc
-
min_keycode
;
/* scancode */
dod
[
n
].
dwData
=
InputKeyStateTable
[
vkey
]
&
0x80
;
dod
[
n
].
dwTimeStamp
=
0
;
/* umm */
dod
[
n
].
dwSequence
=
0
;
/* umm */
n
++
;
}
if
(
!
(
flags
&
DIGDD_PEEK
))
keystate
[
vkey
]
=
InputKeyStateTable
[
vkey
]
&
0x80
;
}
if
(
n
)
fprintf
(
stderr
,
"%d entries
\n
"
,
n
);
*
entries
=
n
;
return
TRUE
;
}
#endif
/* !defined(X_DISPLAY_MISSING) */
#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