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
383d8ac1
Commit
383d8ac1
authored
Mar 03, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Remove GetClipboardFormatName from the user driver interface.
parent
57921fec
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
11 additions
and
57 deletions
+11
-57
clipboard.c
dlls/user32/clipboard.c
+4
-11
driver.c
dlls/user32/driver.c
+0
-13
clipboard.c
dlls/user32/tests/clipboard.c
+2
-10
user_private.h
dlls/user32/user_private.h
+0
-1
clipboard.c
dlls/winex11.drv/clipboard.c
+5
-21
winex11.drv.spec
dlls/winex11.drv/winex11.drv.spec
+0
-1
No files found.
dlls/user32/clipboard.c
View file @
383d8ac1
...
...
@@ -243,7 +243,8 @@ UINT WINAPI RegisterClipboardFormatA(LPCSTR formatName)
*/
INT
WINAPI
GetClipboardFormatNameW
(
UINT
wFormat
,
LPWSTR
retStr
,
INT
maxlen
)
{
return
USER_Driver
->
pGetClipboardFormatName
(
wFormat
,
retStr
,
maxlen
);
if
(
wFormat
<
MAXINTATOM
)
return
0
;
return
GlobalGetAtomNameW
(
wFormat
,
retStr
,
maxlen
);
}
...
...
@@ -252,16 +253,8 @@ INT WINAPI GetClipboardFormatNameW(UINT wFormat, LPWSTR retStr, INT maxlen)
*/
INT
WINAPI
GetClipboardFormatNameA
(
UINT
wFormat
,
LPSTR
retStr
,
INT
maxlen
)
{
INT
ret
;
LPWSTR
p
=
HeapAlloc
(
GetProcessHeap
(),
0
,
maxlen
*
sizeof
(
WCHAR
)
);
if
(
p
==
NULL
)
return
0
;
/* FIXME: is this the correct failure value? */
ret
=
GetClipboardFormatNameW
(
wFormat
,
p
,
maxlen
);
if
(
ret
&&
maxlen
>
0
&&
!
WideCharToMultiByte
(
CP_ACP
,
0
,
p
,
-
1
,
retStr
,
maxlen
,
0
,
0
))
retStr
[
maxlen
-
1
]
=
0
;
HeapFree
(
GetProcessHeap
(),
0
,
p
);
return
ret
;
if
(
wFormat
<
MAXINTATOM
)
return
0
;
return
GlobalGetAtomNameA
(
wFormat
,
retStr
,
maxlen
);
}
...
...
dlls/user32/driver.c
View file @
383d8ac1
...
...
@@ -99,7 +99,6 @@ static const USER_DRIVER *load_driver(void)
GET_USER_FUNC
(
EnumClipboardFormats
);
GET_USER_FUNC
(
IsClipboardFormatAvailable
);
GET_USER_FUNC
(
RegisterClipboardFormat
);
GET_USER_FUNC
(
GetClipboardFormatName
);
GET_USER_FUNC
(
EndClipboardUpdate
);
GET_USER_FUNC
(
ChangeDisplaySettingsEx
);
GET_USER_FUNC
(
EnumDisplayMonitors
);
...
...
@@ -275,11 +274,6 @@ static HANDLE CDECL nulldrv_GetClipboardData( UINT format )
return
0
;
}
static
INT
CDECL
nulldrv_GetClipboardFormatName
(
UINT
format
,
LPWSTR
buffer
,
UINT
len
)
{
return
FALSE
;
}
static
BOOL
CDECL
nulldrv_IsClipboardFormatAvailable
(
UINT
format
)
{
return
FALSE
;
...
...
@@ -462,7 +456,6 @@ static USER_DRIVER null_driver =
nulldrv_EndClipboardUpdate
,
nulldrv_EnumClipboardFormats
,
nulldrv_GetClipboardData
,
nulldrv_GetClipboardFormatName
,
nulldrv_IsClipboardFormatAvailable
,
nulldrv_RegisterClipboardFormat
,
nulldrv_SetClipboardData
,
...
...
@@ -628,11 +621,6 @@ static HANDLE CDECL loaderdrv_GetClipboardData( UINT format )
return
load_driver
()
->
pGetClipboardData
(
format
);
}
static
INT
CDECL
loaderdrv_GetClipboardFormatName
(
UINT
format
,
LPWSTR
buffer
,
UINT
len
)
{
return
load_driver
()
->
pGetClipboardFormatName
(
format
,
buffer
,
len
);
}
static
BOOL
CDECL
loaderdrv_IsClipboardFormatAvailable
(
UINT
format
)
{
return
load_driver
()
->
pIsClipboardFormatAvailable
(
format
);
...
...
@@ -809,7 +797,6 @@ static USER_DRIVER lazy_load_driver =
loaderdrv_EndClipboardUpdate
,
loaderdrv_EnumClipboardFormats
,
loaderdrv_GetClipboardData
,
loaderdrv_GetClipboardFormatName
,
loaderdrv_IsClipboardFormatAvailable
,
loaderdrv_RegisterClipboardFormat
,
loaderdrv_SetClipboardData
,
...
...
dlls/user32/tests/clipboard.c
View file @
383d8ac1
...
...
@@ -140,6 +140,7 @@ todo_wine
atom_id
=
GlobalFindAtomA
(
"my_cool_clipboard_format"
);
ok
(
atom_id
==
0
,
"GlobalFindAtomA should fail
\n
"
);
test_last_error
(
ERROR_FILE_NOT_FOUND
);
}
for
(
format_id
=
0
;
format_id
<
0xffff
;
format_id
++
)
{
...
...
@@ -147,18 +148,9 @@ todo_wine
len
=
GetClipboardFormatNameA
(
format_id
,
buf
,
256
);
if
(
format_id
<
0xc000
)
{
ok
(
!
len
,
"GetClipboardFormatNameA should fail, but it returned %d (%s)
\n
"
,
len
,
buf
);
test_last_error
(
ERROR_INVALID_PARAMETER
);
}
else
{
if
(
len
)
trace
(
"%04x: %s
\n
"
,
format_id
,
len
?
buf
:
""
);
else
test_last_error
(
ERROR_INVALID_HANDLE
);
}
}
if
(
len
)
trace
(
"%04x: %s
\n
"
,
format_id
,
len
?
buf
:
""
);
}
ret
=
OpenClipboard
(
0
);
...
...
dlls/user32/user_private.h
View file @
383d8ac1
...
...
@@ -81,7 +81,6 @@ typedef struct tagUSER_DRIVER {
void
(
CDECL
*
pEndClipboardUpdate
)(
void
);
/* End clipboard update */
UINT
(
CDECL
*
pEnumClipboardFormats
)(
UINT
);
/* Enumerate clipboard formats */
HANDLE
(
CDECL
*
pGetClipboardData
)(
UINT
);
/* Get specified selection data */
INT
(
CDECL
*
pGetClipboardFormatName
)(
UINT
,
LPWSTR
,
UINT
);
/* Get a clipboard format name */
BOOL
(
CDECL
*
pIsClipboardFormatAvailable
)(
UINT
);
/* Check if specified format is available */
UINT
(
CDECL
*
pRegisterClipboardFormat
)(
LPCWSTR
);
/* Register a clipboard format */
BOOL
(
CDECL
*
pSetClipboardData
)(
UINT
,
HANDLE
,
BOOL
);
/* Set specified selection data */
...
...
dlls/winex11.drv/clipboard.c
View file @
383d8ac1
...
...
@@ -283,12 +283,11 @@ static Window thread_selection_wnd(void)
static
const
char
*
debugstr_format
(
UINT
id
)
{
if
(
id
>=
0xc000
)
{
WCHAR
buffer
[
256
];
GlobalGetAtomNameW
(
id
,
buffer
,
256
);
WCHAR
buffer
[
256
];
if
(
GetClipboardFormatNameW
(
id
,
buffer
,
256
))
return
wine_dbg_sprintf
(
"%04x %s"
,
id
,
debugstr_w
(
buffer
)
);
}
switch
(
id
)
{
#define BUILTIN(id) case id: return #id;
...
...
@@ -378,7 +377,7 @@ static void intern_atoms(void)
i
=
0
;
LIST_FOR_EACH_ENTRY
(
format
,
&
format_list
,
WINE_CLIPFORMAT
,
entry
)
if
(
!
format
->
drvData
)
{
G
lobalGetAtom
NameW
(
format
->
wFormatID
,
buffer
,
256
);
G
etClipboardFormat
NameW
(
format
->
wFormatID
,
buffer
,
256
);
len
=
WideCharToMultiByte
(
CP_UNIXCP
,
0
,
buffer
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
names
[
i
]
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
WideCharToMultiByte
(
CP_UNIXCP
,
0
,
buffer
,
-
1
,
names
[
i
++
],
len
,
NULL
,
NULL
);
...
...
@@ -2501,21 +2500,6 @@ UINT CDECL X11DRV_RegisterClipboardFormat(LPCWSTR FormatName)
}
/**************************************************************************
* X11DRV_GetClipboardFormatName
*/
INT
CDECL
X11DRV_GetClipboardFormatName
(
UINT
wFormat
,
LPWSTR
retStr
,
INT
maxlen
)
{
TRACE
(
"(%04X, %p, %d) !
\n
"
,
wFormat
,
retStr
,
maxlen
);
if
(
wFormat
<
0xc000
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
0
;
}
return
GlobalGetAtomNameW
(
wFormat
,
retStr
,
maxlen
);
}
static
void
selection_acquire
(
void
)
{
Window
owner
;
...
...
dlls/winex11.drv/winex11.drv.spec
View file @
383d8ac1
...
...
@@ -91,7 +91,6 @@
@ cdecl EndClipboardUpdate() X11DRV_EndClipboardUpdate
@ cdecl EnumClipboardFormats(long) X11DRV_EnumClipboardFormats
@ cdecl GetClipboardData(long) X11DRV_GetClipboardData
@ cdecl GetClipboardFormatName(long ptr long) X11DRV_GetClipboardFormatName
@ cdecl GetDC(long long long ptr ptr long) X11DRV_GetDC
@ cdecl IsClipboardFormatAvailable(long) X11DRV_IsClipboardFormatAvailable
@ cdecl MsgWaitForMultipleObjectsEx(long ptr long long long) X11DRV_MsgWaitForMultipleObjectsEx
...
...
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