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
8b353f54
Commit
8b353f54
authored
Oct 23, 2015
by
Nikolay Sivov
Committed by
Alexandre Julliard
Oct 26, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Added a GetDisplayConfigBufferSizes stub.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
71118846
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
76 additions
and
0 deletions
+76
-0
misc.c
dlls/user32/misc.c
+14
-0
monitor.c
dlls/user32/tests/monitor.c
+55
-0
user32.spec
dlls/user32/user32.spec
+1
-0
wingdi.h
include/wingdi.h
+5
-0
winuser.h
include/winuser.h
+1
-0
No files found.
dlls/user32/misc.c
View file @
8b353f54
...
...
@@ -757,6 +757,20 @@ BOOL WINAPI IsWindowRedirectedForPrint( HWND hwnd )
return
FALSE
;
}
/**********************************************************************
* GetDisplayConfigBufferSizes [USER32.@]
*/
LONG
WINAPI
GetDisplayConfigBufferSizes
(
UINT32
flags
,
UINT32
*
num_path_info
,
UINT32
*
num_mode_info
)
{
FIXME
(
"(0x%x %p %p): stub
\n
"
,
flags
,
num_path_info
,
num_mode_info
);
if
(
!
num_path_info
||
!
num_mode_info
)
return
ERROR_INVALID_PARAMETER
;
*
num_path_info
=
0
;
*
num_mode_info
=
0
;
return
ERROR_NOT_SUPPORTED
;
}
static
const
WCHAR
imeW
[]
=
{
'I'
,
'M'
,
'E'
,
0
};
const
struct
builtin_class_descr
IME_builtin_class
=
...
...
dlls/user32/tests/monitor.c
View file @
8b353f54
...
...
@@ -34,6 +34,7 @@ static BOOL (WINAPI *pGetMonitorInfoW)(HMONITOR,LPMONITORINFO);
static
HMONITOR
(
WINAPI
*
pMonitorFromPoint
)(
POINT
,
DWORD
);
static
HMONITOR
(
WINAPI
*
pMonitorFromRect
)(
LPCRECT
,
DWORD
);
static
HMONITOR
(
WINAPI
*
pMonitorFromWindow
)(
HWND
,
DWORD
);
static
LONG
(
WINAPI
*
pGetDisplayConfigBufferSizes
)(
UINT32
,
UINT32
*
,
UINT32
*
);
static
void
init_function_pointers
(
void
)
{
...
...
@@ -48,6 +49,7 @@ static void init_function_pointers(void)
GET_PROC
(
ChangeDisplaySettingsExW
)
GET_PROC
(
EnumDisplayDevicesA
)
GET_PROC
(
EnumDisplayMonitors
)
GET_PROC
(
GetDisplayConfigBufferSizes
)
GET_PROC
(
GetMonitorInfoA
)
GET_PROC
(
GetMonitorInfoW
)
GET_PROC
(
MonitorFromPoint
)
...
...
@@ -543,6 +545,58 @@ static void test_work_area(void)
DestroyWindow
(
hwnd
);
}
static
void
test_display_config
(
void
)
{
UINT32
paths
,
modes
;
LONG
ret
;
if
(
!
pGetDisplayConfigBufferSizes
)
{
win_skip
(
"GetDisplayConfigBufferSizes is not supported
\n
"
);
return
;
}
ret
=
pGetDisplayConfigBufferSizes
(
QDC_ALL_PATHS
,
NULL
,
NULL
);
ok
(
ret
==
ERROR_INVALID_PARAMETER
,
"got %d
\n
"
,
ret
);
paths
=
100
;
ret
=
pGetDisplayConfigBufferSizes
(
QDC_ALL_PATHS
,
&
paths
,
NULL
);
ok
(
ret
==
ERROR_INVALID_PARAMETER
,
"got %d
\n
"
,
ret
);
ok
(
paths
==
100
,
"got %u
\n
"
,
paths
);
modes
=
100
;
ret
=
pGetDisplayConfigBufferSizes
(
QDC_ALL_PATHS
,
NULL
,
&
modes
);
ok
(
ret
==
ERROR_INVALID_PARAMETER
,
"got %d
\n
"
,
ret
);
ok
(
modes
==
100
,
"got %u
\n
"
,
modes
);
paths
=
modes
=
0
;
ret
=
pGetDisplayConfigBufferSizes
(
QDC_ALL_PATHS
,
&
paths
,
&
modes
);
if
(
!
ret
)
ok
(
paths
>
0
&&
modes
>
0
,
"got %u, %u
\n
"
,
paths
,
modes
);
else
ok
(
ret
==
ERROR_NOT_SUPPORTED
,
"got %d
\n
"
,
ret
);
/* Invalid flags, non-zero invalid flags validation is version (or driver?) dependent,
it's unreliable to use in tests. */
ret
=
pGetDisplayConfigBufferSizes
(
0
,
NULL
,
NULL
);
ok
(
ret
==
ERROR_INVALID_PARAMETER
,
"got %d
\n
"
,
ret
);
paths
=
100
;
ret
=
pGetDisplayConfigBufferSizes
(
0
,
&
paths
,
NULL
);
ok
(
ret
==
ERROR_INVALID_PARAMETER
,
"got %d
\n
"
,
ret
);
ok
(
paths
==
100
,
"got %u
\n
"
,
paths
);
modes
=
100
;
ret
=
pGetDisplayConfigBufferSizes
(
0
,
NULL
,
&
modes
);
ok
(
ret
==
ERROR_INVALID_PARAMETER
,
"got %d
\n
"
,
ret
);
ok
(
modes
==
100
,
"got %u
\n
"
,
modes
);
paths
=
modes
=
100
;
ret
=
pGetDisplayConfigBufferSizes
(
0
,
&
paths
,
&
modes
);
ok
(
ret
==
ERROR_INVALID_PARAMETER
||
ret
==
ERROR_NOT_SUPPORTED
,
"got %d
\n
"
,
ret
);
ok
(
modes
==
0
&&
paths
==
0
,
"got %u, %u
\n
"
,
modes
,
paths
);
}
START_TEST
(
monitor
)
{
init_function_pointers
();
...
...
@@ -550,4 +604,5 @@ START_TEST(monitor)
test_ChangeDisplaySettingsEx
();
test_monitors
();
test_work_area
();
test_display_config
();
}
dlls/user32/user32.spec
View file @
8b353f54
...
...
@@ -281,6 +281,7 @@
@ stdcall GetDCEx(long long long)
@ stdcall GetDesktopWindow()
@ stdcall GetDialogBaseUnits()
@ stdcall GetDisplayConfigBufferSizes(long ptr ptr)
@ stdcall GetDlgCtrlID(long)
@ stdcall GetDlgItem(long long)
@ stdcall GetDlgItemInt(long long ptr long)
...
...
include/wingdi.h
View file @
8b353f54
...
...
@@ -3306,6 +3306,11 @@ DECL_WINELIB_TYPE_AW(LPDISPLAY_DEVICE)
#define DISPLAY_DEVICE_MIRRORING_DRIVER 0x00000008
#define DISPLAY_DEVICE_VGA_COMPATIBLE 0x00000010
/* For GetDisplayConfigBufferSizes */
#define QDC_ALL_PATHS 0x00000001
#define QDC_ONLY_ACTIVE_PATHS 0x00000002
#define QDC_DATABASE_CURRENT 0x00000004
#define GDI_ERROR (~0u)
#define HGDI_ERROR ((HANDLE)~(ULONG_PTR)0)
...
...
include/winuser.h
View file @
8b353f54
...
...
@@ -3267,6 +3267,7 @@ WINUSERAPI BOOL WINAPI EnumDisplaySettingsW(LPCWSTR,DWORD,LPDEVMODEW);
WINUSERAPI
BOOL
WINAPI
EnumDisplaySettingsExA
(
LPCSTR
,
DWORD
,
LPDEVMODEA
,
DWORD
);
WINUSERAPI
BOOL
WINAPI
EnumDisplaySettingsExW
(
LPCWSTR
,
DWORD
,
LPDEVMODEW
,
DWORD
);
#define EnumDisplaySettingsEx WINELIB_NAME_AW(EnumDisplaySettingsEx)
WINUSERAPI
LONG
WINAPI
GetDisplayConfigBufferSizes
(
UINT32
,
UINT32
*
,
UINT32
*
);
WINUSERAPI
BOOL
WINAPI
UpdateLayeredWindow
(
HWND
,
HDC
,
POINT
*
,
SIZE
*
,
HDC
,
POINT
*
,
COLORREF
,
BLENDFUNCTION
*
,
DWORD
);
WINUSERAPI
BOOL
WINAPI
UpdateLayeredWindowIndirect
(
HWND
,
UPDATELAYEREDWINDOWINFO
const
*
);
#endif
/* defined(_WINGDI_) && !defined(NOGDI) */
...
...
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