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
29a63472
Commit
29a63472
authored
Sep 20, 2007
by
Mikolaj Zalewski
Committed by
Alexandre Julliard
Sep 21, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11.drv/wintab32: Make wintab strings in winex11.drv Unicode, implement WTInfoW.
parent
5d0dc481
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
135 additions
and
49 deletions
+135
-49
winex11.drv.spec
dlls/winex11.drv/winex11.drv.spec
+1
-1
wintab.c
dlls/winex11.drv/wintab.c
+64
-29
context.c
dlls/wintab32/context.c
+67
-16
wintab32.c
dlls/wintab32/wintab32.c
+2
-2
wintab_internal.h
dlls/wintab32/wintab_internal.h
+1
-1
No files found.
dlls/winex11.drv/winex11.drv.spec
View file @
29a63472
...
...
@@ -119,7 +119,7 @@
@ cdecl AttachEventQueueToTablet(long) X11DRV_AttachEventQueueToTablet
@ cdecl GetCurrentPacket(ptr) X11DRV_GetCurrentPacket
@ cdecl LoadTabletInfo(long) X11DRV_LoadTabletInfo
@ cdecl WTInfo
A(long long ptr) X11DRV_WTInfoA
@ cdecl WTInfo
W(long long ptr) X11DRV_WTInfoW
# X11 locks
@ cdecl -norelay wine_tsx11_lock()
...
...
dlls/winex11.drv/wintab.c
View file @
29a63472
This diff is collapsed.
Click to expand it.
dlls/wintab32/context.c
View file @
29a63472
...
...
@@ -28,6 +28,7 @@
#include "winerror.h"
#include "winbase.h"
#include "winuser.h"
#include "winnls.h"
#include "wintab.h"
#include "wintab_internal.h"
...
...
@@ -45,6 +46,32 @@ static BOOL gLoaded;
static
LPOPENCONTEXT
gOpenContexts
;
static
HCTX
gTopContext
=
(
HCTX
)
0xc00
;
static
void
LOGCONTEXTWtoA
(
const
LOGCONTEXTW
*
in
,
LOGCONTEXTA
*
out
)
{
WideCharToMultiByte
(
CP_ACP
,
0
,
in
->
lcName
,
LCNAMELEN
,
out
->
lcName
,
LCNAMELEN
,
NULL
,
NULL
);
out
->
lcName
[
LCNAMELEN
-
1
]
=
0
;
/* we use the fact that the fields after lcName are the same in LOGCONTEXTA and W */
memcpy
(
&
out
->
lcOptions
,
&
in
->
lcOptions
,
sizeof
(
LOGCONTEXTW
)
-
FIELD_OFFSET
(
LOGCONTEXTW
,
lcOptions
));
}
static
BOOL
is_logcontext_category
(
UINT
wCategory
)
{
return
wCategory
==
WTI_DEFSYSCTX
||
wCategory
==
WTI_DEFCONTEXT
||
wCategory
==
WTI_DDCTXS
;
}
static
BOOL
is_string_field
(
UINT
wCategory
,
UINT
nIndex
)
{
if
(
wCategory
==
WTI_INTERFACE
&&
nIndex
==
IFC_WINTABID
)
return
TRUE
;
if
(
is_logcontext_category
(
wCategory
)
&&
nIndex
==
CTX_NAME
)
return
TRUE
;
if
(
wCategory
>=
WTI_CURSORS
&&
wCategory
<=
WTI_CURSORS
+
9
)
return
TRUE
;
if
(
wCategory
==
WTI_DEVICES
&&
(
nIndex
==
DVC_NAME
||
nIndex
==
DVC_PNPID
))
return
TRUE
;
return
FALSE
;
}
static
char
*
DUMPBITS
(
int
x
,
char
*
buf
)
{
strcpy
(
buf
,
"{"
);
...
...
@@ -346,10 +373,7 @@ static VOID TABLET_BlankPacketData(LPOPENCONTEXT context, LPVOID lpPkt, INT n)
}
/***********************************************************************
* WTInfoA (WINTAB32.20)
*/
UINT
WINAPI
WTInfoA
(
UINT
wCategory
,
UINT
nIndex
,
LPVOID
lpOutput
)
UINT
WINAPI
WTInfoT
(
UINT
wCategory
,
UINT
nIndex
,
LPVOID
lpOutput
,
BOOL
bUnicode
)
{
UINT
result
;
if
(
gLoaded
==
FALSE
)
...
...
@@ -374,30 +398,57 @@ UINT WINAPI WTInfoA(UINT wCategory, UINT nIndex, LPVOID lpOutput)
}
}
result
=
pWTInfoA
(
wCategory
,
nIndex
,
lpOutput
);
if
(
is_logcontext_category
(
wCategory
)
&&
nIndex
==
0
)
{
if
(
lpOutput
)
{
LOGCONTEXTW
buf
;
pWTInfoW
(
wCategory
,
nIndex
,
&
buf
);
/*
* Handle system extents here, as we can use user32.dll code to set them.
*/
/* Handle system extents here, as we can use user32.dll code to set them */
if
(
wCategory
==
WTI_DEFSYSCTX
&&
nIndex
==
0
)
{
LPLOGCONTEXTA
lpCtx
=
(
LPLOGCONTEXTA
)
lpOutput
;
lpCtx
->
lcSysExtX
=
GetSystemMetrics
(
SM_CXSCREEN
);
lpCtx
->
lcSysExtY
=
GetSystemMetrics
(
SM_CYSCREEN
);
buf
.
lcSysExtX
=
GetSystemMetrics
(
SM_CXSCREEN
);
buf
.
lcSysExtY
=
GetSystemMetrics
(
SM_CYSCREEN
);
}
if
(
bUnicode
)
memcpy
(
lpOutput
,
&
buf
,
sizeof
(
buf
));
else
LOGCONTEXTWtoA
(
&
buf
,
lpOutput
);
}
return
bUnicode
?
sizeof
(
LOGCONTEXTW
)
:
sizeof
(
LOGCONTEXTA
);
}
else
if
(
is_string_field
(
wCategory
,
nIndex
)
&&
!
bUnicode
)
{
int
size
=
pWTInfoW
(
wCategory
,
nIndex
,
NULL
);
WCHAR
*
buf
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
pWTInfoW
(
wCategory
,
nIndex
,
buf
);
result
=
WideCharToMultiByte
(
CP_ACP
,
0
,
buf
,
size
/
sizeof
(
WCHAR
),
lpOutput
,
lpOutput
?
2
*
size
:
0
,
NULL
,
NULL
);
HeapFree
(
GetProcessHeap
(),
0
,
buf
);
}
else
result
=
pWTInfoW
(
wCategory
,
nIndex
,
lpOutput
);
return
result
;
}
/***********************************************************************
* WTInfo
W (WINTAB32.10
20)
* WTInfo
A (WINTAB32.
20)
*/
UINT
WINAPI
WTInfo
W
(
UINT
wCategory
,
UINT
nIndex
,
LPVOID
lpOutput
)
UINT
WINAPI
WTInfo
A
(
UINT
wCategory
,
UINT
nIndex
,
LPVOID
lpOutput
)
{
FIXME
(
"(%u, %u, %p): stub
\n
"
,
wCategory
,
nIndex
,
lpOutput
);
return
WTInfoT
(
wCategory
,
nIndex
,
lpOutput
,
FALSE
);
}
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
return
0
;
/***********************************************************************
* WTInfoW (WINTAB32.1020)
*/
UINT
WINAPI
WTInfoW
(
UINT
wCategory
,
UINT
nIndex
,
LPVOID
lpOutput
)
{
return
WTInfoT
(
wCategory
,
nIndex
,
lpOutput
,
TRUE
);
}
/***********************************************************************
...
...
dlls/wintab32/wintab32.c
View file @
29a63472
...
...
@@ -39,7 +39,7 @@ CRITICAL_SECTION csTablet;
int
(
*
pLoadTabletInfo
)(
HWND
hwnddefault
)
=
NULL
;
int
(
*
pGetCurrentPacket
)(
LPWTPACKET
packet
)
=
NULL
;
int
(
*
pAttachEventQueueToTablet
)(
HWND
hOwner
)
=
NULL
;
UINT
(
*
pWTInfo
A
)(
UINT
wCategory
,
UINT
nIndex
,
LPVOID
lpOutput
)
=
NULL
;
UINT
(
*
pWTInfo
W
)(
UINT
wCategory
,
UINT
nIndex
,
LPVOID
lpOutput
)
=
NULL
;
static
LRESULT
WINAPI
TABLET_WindowProc
(
HWND
hwnd
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
);
...
...
@@ -81,7 +81,7 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpReserved)
pLoadTabletInfo
=
(
void
*
)
GetProcAddress
(
hx11drv
,
"LoadTabletInfo"
);
pAttachEventQueueToTablet
=
(
void
*
)
GetProcAddress
(
hx11drv
,
"AttachEventQueueToTablet"
);
pGetCurrentPacket
=
(
void
*
)
GetProcAddress
(
hx11drv
,
"GetCurrentPacket"
);
pWTInfo
A
=
(
void
*
)
GetProcAddress
(
hx11drv
,
"WTInfoA
"
);
pWTInfo
W
=
(
void
*
)
GetProcAddress
(
hx11drv
,
"WTInfoW
"
);
TABLET_Register
();
hwndDefault
=
CreateWindowW
(
WC_TABLETCLASSNAME
,
name
,
WS_POPUPWINDOW
,
0
,
0
,
0
,
0
,
0
,
0
,
hInstDLL
,
0
);
...
...
dlls/wintab32/wintab_internal.h
View file @
29a63472
...
...
@@ -155,7 +155,7 @@ LPOPENCONTEXT FindOpenContext(HWND hwnd);
extern
int
(
*
pLoadTabletInfo
)(
HWND
hwnddefault
);
extern
int
(
*
pGetCurrentPacket
)(
LPWTPACKET
packet
);
extern
int
(
*
pAttachEventQueueToTablet
)(
HWND
hOwner
);
extern
UINT
(
*
pWTInfo
A
)(
UINT
wCategory
,
UINT
nIndex
,
LPVOID
lpOutput
);
extern
UINT
(
*
pWTInfo
W
)(
UINT
wCategory
,
UINT
nIndex
,
LPVOID
lpOutput
);
extern
HWND
hwndDefault
;
extern
CRITICAL_SECTION
csTablet
;
...
...
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