You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-04-13 14:42:51 -07:00
Compare commits
43 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
2ecd3b8b8e | ||
|
3dd8d0e647 | ||
|
3f3a05f91c | ||
|
f48f106853 | ||
|
2e111fae10 | ||
|
9cca205cc2 | ||
|
502c444d9c | ||
|
215d78f8e1 | ||
|
cbdc68f558 | ||
|
6125243d3a | ||
|
262df397ef | ||
|
f904ca32a3 | ||
|
70f6f6d7e4 | ||
|
4995d0d3af | ||
|
40099e26bf | ||
|
70d8178927 | ||
|
b6c2818755 | ||
|
37fc290f77 | ||
|
82cff8bbdb | ||
|
df2fd22e4d | ||
|
60074b960f | ||
|
97fbe3fe04 | ||
|
f2686a1537 | ||
|
7766c17912 | ||
|
8402c95961 | ||
|
6274392d27 | ||
|
102af10c89 | ||
|
3d9a927266 | ||
|
8e5546184f | ||
|
d799e8fd82 | ||
|
02913f754f | ||
|
03f5adcafb | ||
|
984d402240 | ||
|
32fcc0d75b | ||
|
b6595d9e28 | ||
|
eb4f9db59c | ||
|
11f545447b | ||
|
7934e14fc0 | ||
|
5306e1df11 | ||
|
938c0aa155 | ||
|
cb2a6551bc | ||
|
9a4c8c5631 | ||
|
044cb93066 |
@@ -1,4 +1,4 @@
|
||||
From 90474eb9f6583f2e8fe0314cfa0b0dc04797833b Mon Sep 17 00:00:00 2001
|
||||
From 2588eb4eb5fe56aca7d229ea42b0eaa3786ff600 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sat, 5 Aug 2017 01:45:29 +0200
|
||||
Subject: [PATCH] ntdll: Add function to create new tokens for elevation
|
||||
@@ -14,10 +14,10 @@ Subject: [PATCH] ntdll: Add function to create new tokens for elevation
|
||||
6 files changed, 117 insertions(+)
|
||||
|
||||
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
|
||||
index 1ebe07fc08c..7a19674b2f3 100644
|
||||
index e5db07f0a4e..d52f6b76aa4 100644
|
||||
--- a/dlls/ntdll/ntdll.spec
|
||||
+++ b/dlls/ntdll/ntdll.spec
|
||||
@@ -1586,6 +1586,9 @@
|
||||
@@ -1594,6 +1594,9 @@
|
||||
# Virtual memory
|
||||
@ cdecl __wine_locked_recvmsg(long ptr long)
|
||||
|
||||
@@ -25,27 +25,27 @@ index 1ebe07fc08c..7a19674b2f3 100644
|
||||
+@ cdecl __wine_create_default_token(long)
|
||||
+
|
||||
# Version
|
||||
@ cdecl wine_get_version() NTDLL_wine_get_version
|
||||
@ cdecl wine_get_build_id() NTDLL_wine_get_build_id
|
||||
@ cdecl wine_get_version()
|
||||
@ cdecl wine_get_build_id()
|
||||
diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h
|
||||
index 27e7141bc65..4baf8a3967b 100644
|
||||
index 92fcde95a8a..80be882e76d 100644
|
||||
--- a/dlls/ntdll/ntdll_misc.h
|
||||
+++ b/dlls/ntdll/ntdll_misc.h
|
||||
@@ -107,6 +107,9 @@ extern int __wine_main_argc;
|
||||
extern char **__wine_main_argv;
|
||||
extern WCHAR **__wine_main_wargv;
|
||||
@@ -69,6 +69,9 @@ extern void init_locale( HMODULE module ) DECLSPEC_HIDDEN;
|
||||
extern void init_user_process_params(void) DECLSPEC_HIDDEN;
|
||||
extern NTSTATUS restart_process( RTL_USER_PROCESS_PARAMETERS *params, NTSTATUS status ) DECLSPEC_HIDDEN;
|
||||
|
||||
+/* token */
|
||||
+extern HANDLE CDECL __wine_create_default_token(BOOL admin);
|
||||
+
|
||||
/* server support */
|
||||
extern const char *build_dir DECLSPEC_HIDDEN;
|
||||
extern const char *data_dir DECLSPEC_HIDDEN;
|
||||
extern BOOL is_wow64 DECLSPEC_HIDDEN;
|
||||
extern NTSTATUS alloc_object_attributes( const OBJECT_ATTRIBUTES *attr, struct object_attributes **ret,
|
||||
diff --git a/dlls/ntdll/process.c b/dlls/ntdll/process.c
|
||||
index 6c5f722b2a6..df81e061e7b 100644
|
||||
index 992721d133f..24cb8f53de2 100644
|
||||
--- a/dlls/ntdll/process.c
|
||||
+++ b/dlls/ntdll/process.c
|
||||
@@ -119,6 +119,24 @@ HANDLE CDECL __wine_make_process_system(void)
|
||||
@@ -82,6 +82,24 @@ HANDLE CDECL __wine_make_process_system(void)
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -67,14 +67,14 @@ index 6c5f722b2a6..df81e061e7b 100644
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
static UINT process_error_mode;
|
||||
|
||||
#define UNIMPLEMENTED_INFO_CLASS(c) \
|
||||
/******************************************************************************
|
||||
* NtQueryInformationProcess [NTDLL.@]
|
||||
* ZwQueryInformationProcess [NTDLL.@]
|
||||
diff --git a/server/protocol.def b/server/protocol.def
|
||||
index c53ceb50d50..947a3c971f5 100644
|
||||
index 96bc9250ab0..14b811684d8 100644
|
||||
--- a/server/protocol.def
|
||||
+++ b/server/protocol.def
|
||||
@@ -3755,6 +3755,14 @@ struct handle_info
|
||||
@@ -3759,6 +3759,14 @@ struct handle_info
|
||||
@END
|
||||
|
||||
|
||||
@@ -215,5 +215,5 @@ index c4f1cd943c2..970ed1838da 100644
|
||||
+ }
|
||||
+}
|
||||
--
|
||||
2.26.2
|
||||
2.27.0
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 0e9d9a6aa1b65dae1c8dc34d6d5fb27aa73f96ea Mon Sep 17 00:00:00 2001
|
||||
From 1f2b1bafabfd457836f18741f178b3745e129c36 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sat, 5 Aug 2017 03:39:55 +0200
|
||||
Subject: [PATCH] ntdll: Implement process token elevation through manifests.
|
||||
@@ -12,10 +12,10 @@ Subject: [PATCH] ntdll: Implement process token elevation through manifests.
|
||||
5 files changed, 67 insertions(+)
|
||||
|
||||
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
|
||||
index 51addaaf983..71efed5fa32 100644
|
||||
index 0c8f05285c4..92ae87c6e6d 100644
|
||||
--- a/dlls/ntdll/loader.c
|
||||
+++ b/dlls/ntdll/loader.c
|
||||
@@ -3903,6 +3903,32 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, void **entry, ULONG_PTR unknow
|
||||
@@ -3898,6 +3898,32 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, void **entry, ULONG_PTR unknow
|
||||
}
|
||||
|
||||
|
||||
@@ -48,15 +48,15 @@ index 51addaaf983..71efed5fa32 100644
|
||||
/***********************************************************************
|
||||
* load_global_options
|
||||
*/
|
||||
@@ -4363,6 +4389,7 @@ void __wine_process_init(void)
|
||||
's','y','s','t','e','m','3','2','\\',
|
||||
@@ -4359,6 +4385,7 @@ void __wine_process_init(void)
|
||||
'k','e','r','n','e','l','3','2','.','d','l','l',0};
|
||||
void (WINAPI *kernel32_start_process)(LPTHREAD_START_ROUTINE,void*) = NULL;
|
||||
RTL_USER_PROCESS_PARAMETERS *params;
|
||||
+ ACTIVATION_CONTEXT_RUN_LEVEL_INFORMATION runlevel;
|
||||
WINE_MODREF *wm;
|
||||
NTSTATUS status;
|
||||
ANSI_STRING func_name;
|
||||
@@ -4466,6 +4493,16 @@ void __wine_process_init(void)
|
||||
@@ -4453,6 +4480,16 @@ void __wine_process_init(void)
|
||||
|
||||
unix_funcs->virtual_set_large_address_space();
|
||||
|
||||
@@ -74,10 +74,10 @@ index 51addaaf983..71efed5fa32 100644
|
||||
RemoveEntryList( &wm->ldr.InLoadOrderLinks );
|
||||
InsertHeadList( &peb->LdrData->InLoadOrderModuleList, &wm->ldr.InLoadOrderLinks );
|
||||
diff --git a/server/process.c b/server/process.c
|
||||
index 80a091b0c72..34010b301c3 100644
|
||||
index ac85cace95d..52604ec4d61 100644
|
||||
--- a/server/process.c
|
||||
+++ b/server/process.c
|
||||
@@ -1112,6 +1112,14 @@ struct process_snapshot *process_snap( int *count )
|
||||
@@ -1115,6 +1115,14 @@ struct process_snapshot *process_snap( int *count )
|
||||
return snapshot;
|
||||
}
|
||||
|
||||
@@ -105,10 +105,10 @@ index 5b83e111a6f..dfe5c4e52d8 100644
|
||||
/* console functions */
|
||||
extern void inherit_console( struct thread *parent_thread, struct process *parent,
|
||||
diff --git a/server/protocol.def b/server/protocol.def
|
||||
index d8618a5c964..89adc93305c 100644
|
||||
index 7315f8ac4ea..901c380b721 100644
|
||||
--- a/server/protocol.def
|
||||
+++ b/server/protocol.def
|
||||
@@ -3762,6 +3762,13 @@ struct handle_info
|
||||
@@ -3763,6 +3763,13 @@ struct handle_info
|
||||
@END
|
||||
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 51830c6683b199e79cb9e782ee51555054a4da7c Mon Sep 17 00:00:00 2001
|
||||
From 9c61f6acfa2c43e43f07fae1a5cd447573b9529b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sun, 6 Aug 2017 02:08:05 +0200
|
||||
Subject: [PATCH] server: Implement support for creating processes using a
|
||||
@@ -6,20 +6,20 @@ Subject: [PATCH] server: Implement support for creating processes using a
|
||||
|
||||
---
|
||||
dlls/kernelbase/process.c | 24 +++++++++++++-----------
|
||||
dlls/ntdll/process.c | 3 ++-
|
||||
dlls/ntdll/unix/process.c | 1 +
|
||||
server/process.c | 39 +++++++++++++++++++++++++++++++++++----
|
||||
server/process.h | 2 +-
|
||||
server/protocol.def | 1 +
|
||||
server/request.c | 2 +-
|
||||
server/security.h | 2 ++
|
||||
server/token.c | 11 +++++++++++
|
||||
8 files changed, 66 insertions(+), 18 deletions(-)
|
||||
8 files changed, 65 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/dlls/kernelbase/process.c b/dlls/kernelbase/process.c
|
||||
index a07dddb1f..99985ab89 100644
|
||||
index a3b168543fc..b5c8b47239d 100644
|
||||
--- a/dlls/kernelbase/process.c
|
||||
+++ b/dlls/kernelbase/process.c
|
||||
@@ -242,7 +242,7 @@ static RTL_USER_PROCESS_PARAMETERS *create_process_params( const WCHAR *filename
|
||||
@@ -244,7 +244,7 @@ static RTL_USER_PROCESS_PARAMETERS *create_process_params( const WCHAR *filename
|
||||
/***********************************************************************
|
||||
* create_nt_process
|
||||
*/
|
||||
@@ -28,7 +28,7 @@ index a07dddb1f..99985ab89 100644
|
||||
BOOL inherit, DWORD flags, RTL_USER_PROCESS_PARAMETERS *params,
|
||||
RTL_USER_PROCESS_INFORMATION *info, HANDLE parent )
|
||||
{
|
||||
@@ -257,7 +257,7 @@ static NTSTATUS create_nt_process( SECURITY_ATTRIBUTES *psa, SECURITY_ATTRIBUTES
|
||||
@@ -259,7 +259,7 @@ static NTSTATUS create_nt_process( SECURITY_ATTRIBUTES *psa, SECURITY_ATTRIBUTES
|
||||
status = RtlCreateUserProcess( &nameW, OBJ_CASE_INSENSITIVE, params,
|
||||
psa ? psa->lpSecurityDescriptor : NULL,
|
||||
tsa ? tsa->lpSecurityDescriptor : NULL,
|
||||
@@ -37,7 +37,7 @@ index a07dddb1f..99985ab89 100644
|
||||
RtlFreeUnicodeString( &nameW );
|
||||
}
|
||||
return status;
|
||||
@@ -267,7 +267,7 @@ static NTSTATUS create_nt_process( SECURITY_ATTRIBUTES *psa, SECURITY_ATTRIBUTES
|
||||
@@ -269,7 +269,7 @@ static NTSTATUS create_nt_process( SECURITY_ATTRIBUTES *psa, SECURITY_ATTRIBUTES
|
||||
/***********************************************************************
|
||||
* create_vdm_process
|
||||
*/
|
||||
@@ -46,7 +46,7 @@ index a07dddb1f..99985ab89 100644
|
||||
BOOL inherit, DWORD flags, RTL_USER_PROCESS_PARAMETERS *params,
|
||||
RTL_USER_PROCESS_INFORMATION *info )
|
||||
{
|
||||
@@ -288,7 +288,7 @@ static NTSTATUS create_vdm_process( SECURITY_ATTRIBUTES *psa, SECURITY_ATTRIBUTE
|
||||
@@ -290,7 +290,7 @@ static NTSTATUS create_vdm_process( SECURITY_ATTRIBUTES *psa, SECURITY_ATTRIBUTE
|
||||
winevdm, params->ImagePathName.Buffer, params->CommandLine.Buffer );
|
||||
RtlInitUnicodeString( ¶ms->ImagePathName, winevdm );
|
||||
RtlInitUnicodeString( ¶ms->CommandLine, newcmdline );
|
||||
@@ -55,7 +55,7 @@ index a07dddb1f..99985ab89 100644
|
||||
HeapFree( GetProcessHeap(), 0, newcmdline );
|
||||
return status;
|
||||
}
|
||||
@@ -297,7 +297,7 @@ static NTSTATUS create_vdm_process( SECURITY_ATTRIBUTES *psa, SECURITY_ATTRIBUTE
|
||||
@@ -299,7 +299,7 @@ static NTSTATUS create_vdm_process( SECURITY_ATTRIBUTES *psa, SECURITY_ATTRIBUTE
|
||||
/***********************************************************************
|
||||
* create_cmd_process
|
||||
*/
|
||||
@@ -64,7 +64,7 @@ index a07dddb1f..99985ab89 100644
|
||||
BOOL inherit, DWORD flags, RTL_USER_PROCESS_PARAMETERS *params,
|
||||
RTL_USER_PROCESS_INFORMATION *info )
|
||||
{
|
||||
@@ -316,7 +316,7 @@ static NTSTATUS create_cmd_process( SECURITY_ATTRIBUTES *psa, SECURITY_ATTRIBUTE
|
||||
@@ -318,7 +318,7 @@ static NTSTATUS create_cmd_process( SECURITY_ATTRIBUTES *psa, SECURITY_ATTRIBUTE
|
||||
swprintf( newcmdline, len, L"%s /s/c \"%s\"", comspec, params->CommandLine.Buffer );
|
||||
RtlInitUnicodeString( ¶ms->ImagePathName, comspec );
|
||||
RtlInitUnicodeString( ¶ms->CommandLine, newcmdline );
|
||||
@@ -73,7 +73,7 @@ index a07dddb1f..99985ab89 100644
|
||||
RtlFreeHeap( GetProcessHeap(), 0, newcmdline );
|
||||
return status;
|
||||
}
|
||||
@@ -448,7 +448,9 @@ BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessInternalW( HANDLE token, const WCHAR
|
||||
@@ -450,7 +450,9 @@ BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessInternalW( HANDLE token, const WCHAR
|
||||
|
||||
TRACE( "app %s cmdline %s\n", debugstr_w(app_name), debugstr_w(cmd_line) );
|
||||
|
||||
@@ -84,7 +84,7 @@ index a07dddb1f..99985ab89 100644
|
||||
if (new_token) FIXME( "No support for returning created process token\n" );
|
||||
|
||||
if (app_name)
|
||||
@@ -521,7 +523,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessInternalW( HANDLE token, const WCHAR
|
||||
@@ -523,7 +525,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessInternalW( HANDLE token, const WCHAR
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ index a07dddb1f..99985ab89 100644
|
||||
switch (status)
|
||||
{
|
||||
case STATUS_SUCCESS:
|
||||
@@ -530,7 +532,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessInternalW( HANDLE token, const WCHAR
|
||||
@@ -532,7 +534,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessInternalW( HANDLE token, const WCHAR
|
||||
case STATUS_INVALID_IMAGE_NE_FORMAT:
|
||||
case STATUS_INVALID_IMAGE_PROTECT:
|
||||
TRACE( "starting %s as Win16/DOS binary\n", debugstr_w(app_name) );
|
||||
@@ -102,7 +102,7 @@ index a07dddb1f..99985ab89 100644
|
||||
break;
|
||||
case STATUS_INVALID_IMAGE_NOT_MZ:
|
||||
/* check for .com or .bat extension */
|
||||
@@ -538,12 +540,12 @@ BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessInternalW( HANDLE token, const WCHAR
|
||||
@@ -540,12 +542,12 @@ BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessInternalW( HANDLE token, const WCHAR
|
||||
if (!wcsicmp( p, L".com" ) || !wcsicmp( p, L".pif" ))
|
||||
{
|
||||
TRACE( "starting %s as DOS binary\n", debugstr_w(app_name) );
|
||||
@@ -117,21 +117,12 @@ index a07dddb1f..99985ab89 100644
|
||||
}
|
||||
break;
|
||||
}
|
||||
diff --git a/dlls/ntdll/process.c b/dlls/ntdll/process.c
|
||||
index f3d9079f8..2fa553091 100644
|
||||
--- a/dlls/ntdll/process.c
|
||||
+++ b/dlls/ntdll/process.c
|
||||
@@ -1667,7 +1667,7 @@ NTSTATUS WINAPI RtlCreateUserProcess( UNICODE_STRING *path, ULONG attributes,
|
||||
RTL_USER_PROCESS_PARAMETERS *params,
|
||||
SECURITY_DESCRIPTOR *process_descr,
|
||||
SECURITY_DESCRIPTOR *thread_descr,
|
||||
- HANDLE parent, BOOLEAN inherit, HANDLE debug, HANDLE exception,
|
||||
+ HANDLE parent, BOOLEAN inherit, HANDLE debug, HANDLE token,
|
||||
RTL_USER_PROCESS_INFORMATION *info )
|
||||
{
|
||||
NTSTATUS status;
|
||||
@@ -1735,6 +1735,7 @@ NTSTATUS WINAPI RtlCreateUserProcess( UNICODE_STRING *path, ULONG attributes,
|
||||
req->access = PROCESS_ALL_ACCESS;
|
||||
diff --git a/dlls/ntdll/unix/process.c b/dlls/ntdll/unix/process.c
|
||||
index cca6c2747bf..379a0036b63 100644
|
||||
--- a/dlls/ntdll/unix/process.c
|
||||
+++ b/dlls/ntdll/unix/process.c
|
||||
@@ -827,6 +827,7 @@ NTSTATUS WINAPI NtCreateUserProcess( HANDLE *process_handle_ptr, HANDLE *thread_
|
||||
req->access = process_access;
|
||||
req->cpu = pe_info.cpu;
|
||||
req->info_size = startup_info_size;
|
||||
+ req->token = wine_server_obj_handle( token );
|
||||
@@ -139,10 +130,10 @@ index f3d9079f8..2fa553091 100644
|
||||
wine_server_add_data( req, startup_info, startup_info_size );
|
||||
wine_server_add_data( req, params->Environment, env_size );
|
||||
diff --git a/server/process.c b/server/process.c
|
||||
index d6f71a774..aa66814d8 100644
|
||||
index 52604ec4d61..047916ffd09 100644
|
||||
--- a/server/process.c
|
||||
+++ b/server/process.c
|
||||
@@ -491,7 +491,7 @@ static void start_sigkill_timer( struct process *process )
|
||||
@@ -499,7 +499,7 @@ static void start_sigkill_timer( struct process *process )
|
||||
/* create a new process */
|
||||
/* if the function fails the fd is closed */
|
||||
struct process *create_process( int fd, struct process *parent, int inherit_all,
|
||||
@@ -151,7 +142,7 @@ index d6f71a774..aa66814d8 100644
|
||||
{
|
||||
struct process *process;
|
||||
|
||||
@@ -568,7 +568,7 @@ struct process *create_process( int fd, struct process *parent, int inherit_all,
|
||||
@@ -576,7 +576,7 @@ struct process *create_process( int fd, struct process *parent, int inherit_all,
|
||||
: alloc_handle_table( process, 0 );
|
||||
/* Note: for security reasons, starting a new process does not attempt
|
||||
* to use the current impersonation token for the new process */
|
||||
@@ -160,7 +151,7 @@ index d6f71a774..aa66814d8 100644
|
||||
process->affinity = parent->affinity;
|
||||
}
|
||||
if (!process->handles || !process->token) goto error;
|
||||
@@ -1124,6 +1124,7 @@ DECL_HANDLER(new_process)
|
||||
@@ -1132,6 +1132,7 @@ DECL_HANDLER(new_process)
|
||||
const struct security_descriptor *sd;
|
||||
const struct object_attributes *objattr = get_req_object_attributes( &sd, &name, NULL );
|
||||
struct process *process = NULL;
|
||||
@@ -168,7 +159,7 @@ index d6f71a774..aa66814d8 100644
|
||||
struct process *parent;
|
||||
struct thread *parent_thread = current;
|
||||
int socket_fd = thread_get_inflight_fd( current, req->socket_fd );
|
||||
@@ -1177,10 +1178,39 @@ DECL_HANDLER(new_process)
|
||||
@@ -1185,10 +1186,39 @@ DECL_HANDLER(new_process)
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -208,7 +199,7 @@ index d6f71a774..aa66814d8 100644
|
||||
release_object( parent );
|
||||
return;
|
||||
}
|
||||
@@ -1228,7 +1258,7 @@ DECL_HANDLER(new_process)
|
||||
@@ -1236,7 +1266,7 @@ DECL_HANDLER(new_process)
|
||||
#undef FIXUP_LEN
|
||||
}
|
||||
|
||||
@@ -217,7 +208,7 @@ index d6f71a774..aa66814d8 100644
|
||||
|
||||
process->startup_info = (struct startup_info *)grab_object( info );
|
||||
|
||||
@@ -1289,6 +1319,7 @@ DECL_HANDLER(new_process)
|
||||
@@ -1297,6 +1327,7 @@ DECL_HANDLER(new_process)
|
||||
reply->handle = alloc_handle_no_access_check( current->process, process, req->access, objattr->attributes );
|
||||
|
||||
done:
|
||||
@@ -225,7 +216,7 @@ index d6f71a774..aa66814d8 100644
|
||||
if (process) release_object( process );
|
||||
release_object( parent );
|
||||
release_object( info );
|
||||
@@ -1322,7 +1353,7 @@ DECL_HANDLER(exec_process)
|
||||
@@ -1330,7 +1361,7 @@ DECL_HANDLER(exec_process)
|
||||
close( socket_fd );
|
||||
return;
|
||||
}
|
||||
@@ -235,7 +226,7 @@ index d6f71a774..aa66814d8 100644
|
||||
release_object( process );
|
||||
}
|
||||
diff --git a/server/process.h b/server/process.h
|
||||
index dfe5c4e52..61b83abf6 100644
|
||||
index dfe5c4e52d8..61b83abf693 100644
|
||||
--- a/server/process.h
|
||||
+++ b/server/process.h
|
||||
@@ -118,7 +118,7 @@ extern unsigned int alloc_ptid( void *ptr );
|
||||
@@ -248,10 +239,10 @@ index dfe5c4e52..61b83abf6 100644
|
||||
extern struct thread *get_process_first_thread( struct process *process );
|
||||
extern struct process *get_process_from_id( process_id_t id );
|
||||
diff --git a/server/protocol.def b/server/protocol.def
|
||||
index 45ab670ea..c763da4ca 100644
|
||||
index 901c380b721..8c86967609f 100644
|
||||
--- a/server/protocol.def
|
||||
+++ b/server/protocol.def
|
||||
@@ -791,6 +791,7 @@ struct rawinput_device
|
||||
@@ -801,6 +801,7 @@ struct rawinput_device
|
||||
unsigned int access; /* access rights for process object */
|
||||
client_cpu_t cpu; /* CPU that the new process will use */
|
||||
data_size_t info_size; /* size of startup info */
|
||||
@@ -260,7 +251,7 @@ index 45ab670ea..c763da4ca 100644
|
||||
VARARG(info,startup_info,info_size); /* startup information */
|
||||
VARARG(env,unicode_str); /* environment for new process */
|
||||
diff --git a/server/request.c b/server/request.c
|
||||
index 200c2697d..f743b720a 100644
|
||||
index 4c1f30a5fe7..321bb6cfa81 100644
|
||||
--- a/server/request.c
|
||||
+++ b/server/request.c
|
||||
@@ -582,7 +582,7 @@ static void master_socket_poll_event( struct fd *fd, int event )
|
||||
@@ -273,7 +264,7 @@ index 200c2697d..f743b720a 100644
|
||||
create_thread( -1, process, NULL );
|
||||
release_object( process );
|
||||
diff --git a/server/security.h b/server/security.h
|
||||
index 21e90ccf2..32dfe5f8d 100644
|
||||
index 21e90ccf23f..32dfe5f8db9 100644
|
||||
--- a/server/security.h
|
||||
+++ b/server/security.h
|
||||
@@ -67,6 +67,8 @@ extern const ACL *token_get_default_dacl( struct token *token );
|
||||
@@ -286,10 +277,10 @@ index 21e90ccf2..32dfe5f8d 100644
|
||||
static inline const ACE_HEADER *ace_next( const ACE_HEADER *ace )
|
||||
{
|
||||
diff --git a/server/token.c b/server/token.c
|
||||
index 181219d21..858ec25d7 100644
|
||||
index 1c1d49989b3..2f466aa1b25 100644
|
||||
--- a/server/token.c
|
||||
+++ b/server/token.c
|
||||
@@ -845,6 +845,12 @@ int token_assign_label( struct token *token, PSID label )
|
||||
@@ -843,6 +843,12 @@ int token_assign_label( struct token *token, PSID label )
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -302,7 +293,7 @@ index 181219d21..858ec25d7 100644
|
||||
struct token *token_create_admin( void )
|
||||
{
|
||||
struct token *token = NULL;
|
||||
@@ -1271,6 +1277,11 @@ const SID *token_get_primary_group( struct token *token )
|
||||
@@ -1269,6 +1275,11 @@ const SID *token_get_primary_group( struct token *token )
|
||||
return token->primary_group;
|
||||
}
|
||||
|
||||
@@ -315,5 +306,5 @@ index 181219d21..858ec25d7 100644
|
||||
{
|
||||
GENERIC_MAPPING mapping;
|
||||
--
|
||||
2.24.0
|
||||
2.27.0
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 8a5768bc4dc64dd9a0df5d7b781a569622b8c9b6 Mon Sep 17 00:00:00 2001
|
||||
From 38d4fa059ffd4ecba4e7d04e2a5edd2bcff3c7df Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Wed, 27 Aug 2014 00:31:23 +0200
|
||||
Subject: [PATCH] configure: Also add the absolute RPATH when linking against
|
||||
@@ -9,11 +9,11 @@ Subject: [PATCH] configure: Also add the absolute RPATH when linking against
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index e6acb786a4d..bd3fe968839 100644
|
||||
index c88013910af..a7f1866bf0d 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -956,10 +956,10 @@ case $host_os in
|
||||
WINEPRELOADER_LDFLAGS="-static -nostartfiles -nodefaultlibs -Wl,-Ttext=0x7c400000"
|
||||
@@ -969,10 +969,10 @@ case $host_os in
|
||||
WINEPRELOADER_LDFLAGS="-static -nostartfiles -nodefaultlibs -Wl,-Ttext=0x7d400000"
|
||||
|
||||
WINE_TRY_CFLAGS([-Wl,--rpath,\$ORIGIN/../lib],
|
||||
- [LDRPATH_INSTALL="-Wl,--rpath,\\\$\$ORIGIN/\`\$(MAKEDEP) -R \${bindir} \${libdir}\`"
|
||||
@@ -26,5 +26,5 @@ index e6acb786a4d..bd3fe968839 100644
|
||||
|
||||
WINE_TRY_CFLAGS([-Wl,--enable-new-dtags],
|
||||
--
|
||||
2.20.1
|
||||
2.27.0
|
||||
|
||||
|
@@ -1,198 +0,0 @@
|
||||
From 3c3fd497486e624cbc8ab3a98e2fd02cdf6dc2ba Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Wed, 17 Jul 2019 09:26:16 +1000
|
||||
Subject: [PATCH 2/6] directmanipulation: New dll
|
||||
|
||||
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
---
|
||||
configure | 2 +
|
||||
configure.ac | 1 +
|
||||
dlls/directmanipulation/Makefile.in | 8 +++
|
||||
dlls/directmanipulation/directmanip.idl | 38 +++++++++++
|
||||
dlls/directmanipulation/directmanipulation.c | 67 +++++++++++++++++++
|
||||
.../directmanipulation.spec | 6 ++
|
||||
6 files changed, 122 insertions(+)
|
||||
create mode 100644 dlls/directmanipulation/Makefile.in
|
||||
create mode 100644 dlls/directmanipulation/directmanip.idl
|
||||
create mode 100644 dlls/directmanipulation/directmanipulation.c
|
||||
create mode 100644 dlls/directmanipulation/directmanipulation.spec
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index f1de2c4052..bc376a6686 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -1231,6 +1231,7 @@ enable_dhtmled_ocx
|
||||
enable_difxapi
|
||||
enable_dinput
|
||||
enable_dinput8
|
||||
+enable_directmanipulation
|
||||
enable_dispex
|
||||
enable_dmband
|
||||
enable_dmcompos
|
||||
@@ -20162,6 +20163,7 @@ wine_fn_config_makefile dlls/dinput enable_dinput
|
||||
wine_fn_config_makefile dlls/dinput/tests enable_tests
|
||||
wine_fn_config_makefile dlls/dinput8 enable_dinput8
|
||||
wine_fn_config_makefile dlls/dinput8/tests enable_tests
|
||||
+wine_fn_config_makefile dlls/directmanipulation enable_directmanipulation
|
||||
wine_fn_config_makefile dlls/dispdib.dll16 enable_win16
|
||||
wine_fn_config_makefile dlls/dispex enable_dispex
|
||||
wine_fn_config_makefile dlls/dispex/tests enable_tests
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index a7c45ace73..51519fdd9b 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -3148,6 +3148,7 @@ WINE_CONFIG_MAKEFILE(dlls/dinput)
|
||||
WINE_CONFIG_MAKEFILE(dlls/dinput/tests)
|
||||
WINE_CONFIG_MAKEFILE(dlls/dinput8)
|
||||
WINE_CONFIG_MAKEFILE(dlls/dinput8/tests)
|
||||
+WINE_CONFIG_MAKEFILE(dlls/directmanipulation)
|
||||
WINE_CONFIG_MAKEFILE(dlls/dispdib.dll16,enable_win16)
|
||||
WINE_CONFIG_MAKEFILE(dlls/dispex)
|
||||
WINE_CONFIG_MAKEFILE(dlls/dispex/tests)
|
||||
diff --git a/dlls/directmanipulation/Makefile.in b/dlls/directmanipulation/Makefile.in
|
||||
new file mode 100644
|
||||
index 0000000000..331c2a8420
|
||||
--- /dev/null
|
||||
+++ b/dlls/directmanipulation/Makefile.in
|
||||
@@ -0,0 +1,8 @@
|
||||
+MODULE = directmanipulation.dll
|
||||
+
|
||||
+EXTRADLLFLAGS = -mno-cygwin
|
||||
+
|
||||
+IDL_SRCS = directmanip.idl
|
||||
+
|
||||
+C_SRCS = \
|
||||
+ directmanipulation.c
|
||||
diff --git a/dlls/directmanipulation/directmanip.idl b/dlls/directmanipulation/directmanip.idl
|
||||
new file mode 100644
|
||||
index 0000000000..ff00668ba5
|
||||
--- /dev/null
|
||||
+++ b/dlls/directmanipulation/directmanip.idl
|
||||
@@ -0,0 +1,38 @@
|
||||
+/*
|
||||
+ * Copyright 2019 Alistair Leslie-Hughes
|
||||
+ *
|
||||
+ * This library is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU Lesser General Public
|
||||
+ * License as published by the Free Software Foundation; either
|
||||
+ * version 2.1 of the License, or (at your option) any later version.
|
||||
+ *
|
||||
+ * This library is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ * Lesser General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU Lesser General Public
|
||||
+ * License along with this library; if not, write to the Free Software
|
||||
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
+ */
|
||||
+#pragma makedep register
|
||||
+
|
||||
+[
|
||||
+ uuid(54e211b6-3650-4f75-8334-fa359598e1c5),
|
||||
+ threading(both)
|
||||
+]
|
||||
+coclass DirectManipulationManager
|
||||
+{
|
||||
+ interface IDirectManipulationManager2;
|
||||
+ [default] interface IDirectManipulationManager;
|
||||
+}
|
||||
+
|
||||
+[
|
||||
+ uuid(99793286-77cc-4b57-96db-3b354f6f9fb5),
|
||||
+ threading(both)
|
||||
+]
|
||||
+coclass DirectManipulationSharedManager
|
||||
+{
|
||||
+ interface IDirectManipulationManager2;
|
||||
+ [default] interface IDirectManipulationManager;
|
||||
+}
|
||||
diff --git a/dlls/directmanipulation/directmanipulation.c b/dlls/directmanipulation/directmanipulation.c
|
||||
new file mode 100644
|
||||
index 0000000000..136b2976a4
|
||||
--- /dev/null
|
||||
+++ b/dlls/directmanipulation/directmanipulation.c
|
||||
@@ -0,0 +1,67 @@
|
||||
+/*
|
||||
+ * Copyright 2019 Alistair Leslie-Hughes
|
||||
+ *
|
||||
+ * This library is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU Lesser General Public
|
||||
+ * License as published by the Free Software Foundation; either
|
||||
+ * version 2.1 of the License, or (at your option) any later version.
|
||||
+ *
|
||||
+ * This library is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ * Lesser General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU Lesser General Public
|
||||
+ * License along with this library; if not, write to the Free Software
|
||||
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
+ */
|
||||
+
|
||||
+#include <stdarg.h>
|
||||
+
|
||||
+#include "windef.h"
|
||||
+#include "winbase.h"
|
||||
+#include "oleidl.h"
|
||||
+#include "rpcproxy.h"
|
||||
+#include "wine/debug.h"
|
||||
+
|
||||
+WINE_DEFAULT_DEBUG_CHANNEL(manipulation);
|
||||
+
|
||||
+static HINSTANCE dm_instance;
|
||||
+
|
||||
+BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved)
|
||||
+{
|
||||
+ TRACE("(%p, %u, %p)\n", instance, reason, reserved);
|
||||
+
|
||||
+ switch (reason)
|
||||
+ {
|
||||
+ case DLL_WINE_PREATTACH:
|
||||
+ return FALSE; /* prefer native version */
|
||||
+ case DLL_PROCESS_ATTACH:
|
||||
+ dm_instance = instance;
|
||||
+ DisableThreadLibraryCalls(instance);
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ return TRUE;
|
||||
+}
|
||||
+
|
||||
+HRESULT WINAPI DllRegisterServer(void)
|
||||
+{
|
||||
+ return __wine_register_resources( dm_instance );
|
||||
+}
|
||||
+
|
||||
+HRESULT WINAPI DllUnregisterServer(void)
|
||||
+{
|
||||
+ return __wine_unregister_resources( dm_instance );
|
||||
+}
|
||||
+
|
||||
+HRESULT WINAPI DllCanUnloadNow(void)
|
||||
+{
|
||||
+ return S_FALSE;
|
||||
+}
|
||||
+
|
||||
+HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
|
||||
+{
|
||||
+ FIXME("(%s,%s,%p): no interface found.\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
|
||||
+ return CLASS_E_CLASSNOTAVAILABLE;
|
||||
+}
|
||||
\ No newline at end of file
|
||||
diff --git a/dlls/directmanipulation/directmanipulation.spec b/dlls/directmanipulation/directmanipulation.spec
|
||||
new file mode 100644
|
||||
index 0000000000..3f0004daeb
|
||||
--- /dev/null
|
||||
+++ b/dlls/directmanipulation/directmanipulation.spec
|
||||
@@ -0,0 +1,6 @@
|
||||
+@ stub InitializeDManipHook
|
||||
+@ stdcall -private DllCanUnloadNow()
|
||||
+@ stub DllGetActivationFactory
|
||||
+@ stdcall -private DllGetClassObject(ptr ptr ptr)
|
||||
+@ stdcall -private DllRegisterServer()
|
||||
+@ stdcall -private DllUnregisterServer()
|
||||
--
|
||||
2.17.1
|
||||
|
@@ -1,25 +0,0 @@
|
||||
From 528186d14bef47f9afdbee2e323445f14191c858 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Thu, 18 Jul 2019 09:46:30 +1000
|
||||
Subject: [PATCH 3/6] uuid: Add directmanipulation.h
|
||||
|
||||
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
---
|
||||
dlls/uuid/uuid.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/dlls/uuid/uuid.c b/dlls/uuid/uuid.c
|
||||
index aa3b30c3c7..eacb83301d 100644
|
||||
--- a/dlls/uuid/uuid.c
|
||||
+++ b/dlls/uuid/uuid.c
|
||||
@@ -90,6 +90,7 @@ DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0);
|
||||
#include "netcfgx.h"
|
||||
#include "shimgdata.h"
|
||||
#include "comsvcs.h"
|
||||
+#include "directmanipulation.h"
|
||||
|
||||
/* FIXME: cguids declares GUIDs but does not define their values */
|
||||
|
||||
--
|
||||
2.17.1
|
||||
|
@@ -1,259 +0,0 @@
|
||||
From d7ab064f1040d0031a0f277f16d2ef7bfe5b1944 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Wed, 17 Jul 2019 16:33:21 +1000
|
||||
Subject: [PATCH 4/6] directmanipulation: Create
|
||||
DirectManipulationManager/DirectManipulationSharedManager objects
|
||||
|
||||
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=44865
|
||||
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
---
|
||||
dlls/directmanipulation/Makefile.in | 1 +
|
||||
dlls/directmanipulation/directmanipulation.c | 205 ++++++++++++++++++-
|
||||
2 files changed, 204 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/directmanipulation/Makefile.in b/dlls/directmanipulation/Makefile.in
|
||||
index 331c2a8420..d67a21eb77 100644
|
||||
--- a/dlls/directmanipulation/Makefile.in
|
||||
+++ b/dlls/directmanipulation/Makefile.in
|
||||
@@ -1,4 +1,5 @@
|
||||
MODULE = directmanipulation.dll
|
||||
+IMPORTS = uuid
|
||||
|
||||
EXTRADLLFLAGS = -mno-cygwin
|
||||
|
||||
diff --git a/dlls/directmanipulation/directmanipulation.c b/dlls/directmanipulation/directmanipulation.c
|
||||
index 136b2976a4..81efa3688b 100644
|
||||
--- a/dlls/directmanipulation/directmanipulation.c
|
||||
+++ b/dlls/directmanipulation/directmanipulation.c
|
||||
@@ -15,6 +15,7 @@
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
+#define COBJMACROS
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
@@ -22,8 +23,11 @@
|
||||
#include "winbase.h"
|
||||
#include "oleidl.h"
|
||||
#include "rpcproxy.h"
|
||||
+#include "wine/heap.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
+#include "directmanipulation.h"
|
||||
+
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(manipulation);
|
||||
|
||||
static HINSTANCE dm_instance;
|
||||
@@ -60,8 +64,205 @@ HRESULT WINAPI DllCanUnloadNow(void)
|
||||
return S_FALSE;
|
||||
}
|
||||
|
||||
+
|
||||
+struct directmanipulation
|
||||
+{
|
||||
+ IDirectManipulationManager2 IDirectManipulationManager2_iface;
|
||||
+ LONG ref;
|
||||
+};
|
||||
+
|
||||
+static inline struct directmanipulation *impl_from_IDirectManipulationManager2(IDirectManipulationManager2 *iface)
|
||||
+{
|
||||
+ return CONTAINING_RECORD(iface, struct directmanipulation, IDirectManipulationManager2_iface);
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI direct_manip_QueryInterface(IDirectManipulationManager2 *iface, REFIID riid, void **ppv)
|
||||
+{
|
||||
+ if (IsEqualGUID(riid, &IID_IUnknown) ||
|
||||
+ IsEqualGUID(riid, &IID_IDirectManipulationManager) ||
|
||||
+ IsEqualGUID(riid, &IID_IDirectManipulationManager2)) {
|
||||
+ IUnknown_AddRef(iface);
|
||||
+ *ppv = iface;
|
||||
+ return S_OK;
|
||||
+ }
|
||||
+
|
||||
+ FIXME("(%p)->(%s,%p),not found\n", iface, debugstr_guid(riid), ppv);
|
||||
+ return E_NOINTERFACE;
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI direct_manip_AddRef(IDirectManipulationManager2 *iface)
|
||||
+{
|
||||
+ struct directmanipulation *This = impl_from_IDirectManipulationManager2(iface);
|
||||
+ ULONG ref = InterlockedIncrement(&This->ref);
|
||||
+
|
||||
+ TRACE("(%p) ref=%u\n", This, ref);
|
||||
+
|
||||
+ return ref;
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI direct_manip_Release(IDirectManipulationManager2 *iface)
|
||||
+{
|
||||
+ struct directmanipulation *This = impl_from_IDirectManipulationManager2(iface);
|
||||
+ ULONG ref = InterlockedDecrement(&This->ref);
|
||||
+
|
||||
+ TRACE("(%p) ref=%u\n", This, ref);
|
||||
+
|
||||
+ if (!ref)
|
||||
+ {
|
||||
+ heap_free(This);
|
||||
+ }
|
||||
+ return ref;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI direct_manip_Activate(IDirectManipulationManager2 *iface, HWND window)
|
||||
+{
|
||||
+ struct directmanipulation *This = impl_from_IDirectManipulationManager2(iface);
|
||||
+ FIXME("%p, %p\n", This, window);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI direct_manip_Deactivate(IDirectManipulationManager2 *iface, HWND window)
|
||||
+{
|
||||
+ struct directmanipulation *This = impl_from_IDirectManipulationManager2(iface);
|
||||
+ FIXME("%p, %p\n", This, window);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI direct_manip_RegisterHitTestTarget(IDirectManipulationManager2 *iface, HWND window,
|
||||
+ HWND hittest, DIRECTMANIPULATION_HITTEST_TYPE type)
|
||||
+{
|
||||
+ struct directmanipulation *This = impl_from_IDirectManipulationManager2(iface);
|
||||
+ FIXME("%p, %p, %p, %d\n", This, window, hittest, type);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI direct_manip_ProcessInput(IDirectManipulationManager2 *iface, const MSG *msg, BOOL *handled)
|
||||
+{
|
||||
+ struct directmanipulation *This = impl_from_IDirectManipulationManager2(iface);
|
||||
+ FIXME("%p, %p, %p\n", This, msg, handled);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI direct_manip_GetUpdateManager(IDirectManipulationManager2 *iface, REFIID riid, void **obj)
|
||||
+{
|
||||
+ struct directmanipulation *This = impl_from_IDirectManipulationManager2(iface);
|
||||
+ FIXME("%p, %s, %p\n", This, debugstr_guid(riid), obj);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI direct_manip_CreateViewport(IDirectManipulationManager2 *iface, IDirectManipulationFrameInfoProvider *frame,
|
||||
+ HWND window, REFIID riid, void **obj)
|
||||
+{
|
||||
+ struct directmanipulation *This = impl_from_IDirectManipulationManager2(iface);
|
||||
+ FIXME("%p, %p, %p, %s, %p\n", This, frame, window, debugstr_guid(riid), obj);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI direct_manip_CreateContent(IDirectManipulationManager2 *iface, IDirectManipulationFrameInfoProvider *frame,
|
||||
+ REFCLSID clsid, REFIID riid, void **obj)
|
||||
+{
|
||||
+ struct directmanipulation *This = impl_from_IDirectManipulationManager2(iface);
|
||||
+ FIXME("%p, %p, %s, %p\n", This, frame, debugstr_guid(riid), obj);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI direct_manip_CreateBehavior(IDirectManipulationManager2 *iface, REFCLSID clsid, REFIID riid, void **obj)
|
||||
+{
|
||||
+ struct directmanipulation *This = impl_from_IDirectManipulationManager2(iface);
|
||||
+ FIXME("%p, %s, %s, %p\n", This, debugstr_guid(clsid), debugstr_guid(riid), obj);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static const struct IDirectManipulationManager2Vtbl directmanipVtbl =
|
||||
+{
|
||||
+ direct_manip_QueryInterface,
|
||||
+ direct_manip_AddRef,
|
||||
+ direct_manip_Release,
|
||||
+ direct_manip_Activate,
|
||||
+ direct_manip_Deactivate,
|
||||
+ direct_manip_RegisterHitTestTarget,
|
||||
+ direct_manip_ProcessInput,
|
||||
+ direct_manip_GetUpdateManager,
|
||||
+ direct_manip_CreateViewport,
|
||||
+ direct_manip_CreateContent,
|
||||
+ direct_manip_CreateBehavior
|
||||
+};
|
||||
+
|
||||
+static HRESULT WINAPI DirectManipulation_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv)
|
||||
+{
|
||||
+ struct directmanipulation *object;
|
||||
+ HRESULT ret;
|
||||
+
|
||||
+ TRACE("(%p, %s, %p)\n", outer, debugstr_guid(riid), ppv);
|
||||
+
|
||||
+ *ppv = NULL;
|
||||
+
|
||||
+ object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object));
|
||||
+ if (!object)
|
||||
+ return E_OUTOFMEMORY;
|
||||
+
|
||||
+ object->IDirectManipulationManager2_iface.lpVtbl = &directmanipVtbl;
|
||||
+ object->ref = 1;
|
||||
+
|
||||
+ ret = direct_manip_QueryInterface(&object->IDirectManipulationManager2_iface, riid, ppv);
|
||||
+ direct_manip_Release(&object->IDirectManipulationManager2_iface);
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFIID riid, void **ppv)
|
||||
+{
|
||||
+ *ppv = NULL;
|
||||
+
|
||||
+ if(IsEqualGUID(&IID_IUnknown, riid) || IsEqualGUID(&IID_IClassFactory, riid)) {
|
||||
+ *ppv = iface;
|
||||
+ }
|
||||
+
|
||||
+ if(*ppv) {
|
||||
+ IUnknown_AddRef((IUnknown*)*ppv);
|
||||
+ return S_OK;
|
||||
+ }
|
||||
+
|
||||
+ WARN("(%p)->(%s %p)\n", iface, debugstr_guid(riid), ppv);
|
||||
+ return E_NOINTERFACE;
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI ClassFactory_AddRef(IClassFactory *iface)
|
||||
+{
|
||||
+ TRACE("(%p)\n", iface);
|
||||
+ return 2;
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI ClassFactory_Release(IClassFactory *iface)
|
||||
+{
|
||||
+ TRACE("(%p)\n", iface);
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ClassFactory_LockServer(IClassFactory *iface, BOOL fLock)
|
||||
+{
|
||||
+ TRACE("(%p)->(%x)\n", iface, fLock);
|
||||
+ return S_OK;
|
||||
+}
|
||||
+
|
||||
+static const IClassFactoryVtbl DirectFactoryVtbl = {
|
||||
+ ClassFactory_QueryInterface,
|
||||
+ ClassFactory_AddRef,
|
||||
+ ClassFactory_Release,
|
||||
+ DirectManipulation_CreateInstance,
|
||||
+ ClassFactory_LockServer
|
||||
+};
|
||||
+
|
||||
+static IClassFactory direct_factory = { &DirectFactoryVtbl };
|
||||
+
|
||||
HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
|
||||
{
|
||||
- FIXME("(%s,%s,%p): no interface found.\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
|
||||
+ if(IsEqualGUID(&CLSID_DirectManipulationManager, rclsid) ||
|
||||
+ IsEqualGUID(&CLSID_DirectManipulationSharedManager, rclsid) ) {
|
||||
+ TRACE("(CLSID_DirectManipulationManager %s %p)\n", debugstr_guid(riid), ppv);
|
||||
+ return IClassFactory_QueryInterface(&direct_factory, riid, ppv);
|
||||
+ }
|
||||
+
|
||||
+ FIXME("%s %s %p\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
|
||||
return CLASS_E_CLASSNOTAVAILABLE;
|
||||
-}
|
||||
\ No newline at end of file
|
||||
+}
|
||||
--
|
||||
2.17.1
|
||||
|
@@ -1,182 +0,0 @@
|
||||
From 4e92430f5d923dba1aa6174957b3d589b38d5fd7 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Fri, 19 Jul 2019 08:49:51 +1000
|
||||
Subject: [PATCH 6/6] directmanipulation: Support DCompManipulationCompositor
|
||||
interface
|
||||
|
||||
---
|
||||
dlls/directmanipulation/directmanip.idl | 10 ++
|
||||
dlls/directmanipulation/directmanipulation.c | 124 +++++++++++++++++++
|
||||
2 files changed, 134 insertions(+)
|
||||
|
||||
diff --git a/dlls/directmanipulation/directmanip.idl b/dlls/directmanipulation/directmanip.idl
|
||||
index ff00668ba5..9e1efa48ed 100644
|
||||
--- a/dlls/directmanipulation/directmanip.idl
|
||||
+++ b/dlls/directmanipulation/directmanip.idl
|
||||
@@ -36,3 +36,13 @@ coclass DirectManipulationSharedManager
|
||||
interface IDirectManipulationManager2;
|
||||
[default] interface IDirectManipulationManager;
|
||||
}
|
||||
+
|
||||
+[
|
||||
+ uuid(79dea627-a08a-43ac-8ef5-6900b9299126),
|
||||
+ threading(both)
|
||||
+]
|
||||
+coclass DCompManipulationCompositor
|
||||
+{
|
||||
+ [default] interface IDirectManipulationCompositor;
|
||||
+ interface IDirectManipulationFrameInfoProvider;
|
||||
+}
|
||||
diff --git a/dlls/directmanipulation/directmanipulation.c b/dlls/directmanipulation/directmanipulation.c
|
||||
index 81efa3688b..0fe5c4be34 100644
|
||||
--- a/dlls/directmanipulation/directmanipulation.c
|
||||
+++ b/dlls/directmanipulation/directmanipulation.c
|
||||
@@ -210,6 +210,117 @@ static HRESULT WINAPI DirectManipulation_CreateInstance(IClassFactory *iface, IU
|
||||
return ret;
|
||||
}
|
||||
|
||||
+struct directcompositor
|
||||
+{
|
||||
+ IDirectManipulationCompositor IDirectManipulationCompositor_iface;
|
||||
+ LONG ref;
|
||||
+};
|
||||
+
|
||||
+static inline struct directcompositor *impl_from_IDirectManipulationCompositor(IDirectManipulationCompositor *iface)
|
||||
+{
|
||||
+ return CONTAINING_RECORD(iface, struct directcompositor, IDirectManipulationCompositor_iface);
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI compositor_QueryInterface(IDirectManipulationCompositor *iface, REFIID riid, void **ppv)
|
||||
+{
|
||||
+ if (IsEqualGUID(riid, &IID_IUnknown) ||
|
||||
+ IsEqualGUID(riid, &IID_IDirectManipulationCompositor))
|
||||
+ {
|
||||
+ IUnknown_AddRef(iface);
|
||||
+ *ppv = iface;
|
||||
+ return S_OK;
|
||||
+ }
|
||||
+
|
||||
+ FIXME("(%p)->(%s,%p),not found\n", iface, debugstr_guid(riid), ppv);
|
||||
+ return E_NOINTERFACE;
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI compositor_AddRef(IDirectManipulationCompositor *iface)
|
||||
+{
|
||||
+ struct directcompositor *This = impl_from_IDirectManipulationCompositor(iface);
|
||||
+ ULONG ref = InterlockedIncrement(&This->ref);
|
||||
+
|
||||
+ TRACE("(%p) ref=%u\n", This, ref);
|
||||
+
|
||||
+ return ref;
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI compositor_Release(IDirectManipulationCompositor *iface)
|
||||
+{
|
||||
+ struct directcompositor *This = impl_from_IDirectManipulationCompositor(iface);
|
||||
+ ULONG ref = InterlockedDecrement(&This->ref);
|
||||
+
|
||||
+ TRACE("(%p) ref=%u\n", This, ref);
|
||||
+
|
||||
+ if (!ref)
|
||||
+ {
|
||||
+ heap_free(This);
|
||||
+ }
|
||||
+ return ref;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI compositor_AddContent(IDirectManipulationCompositor *iface, IDirectManipulationContent *content,
|
||||
+ IUnknown *device, IUnknown *parent, IUnknown *child)
|
||||
+{
|
||||
+ struct directcompositor *This = impl_from_IDirectManipulationCompositor(iface);
|
||||
+ FIXME("%p, %p, %p, %p, %p\n", This, content, device, parent, child);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI compositor_RemoveContent(IDirectManipulationCompositor *iface, IDirectManipulationContent *content)
|
||||
+{
|
||||
+ struct directcompositor *This = impl_from_IDirectManipulationCompositor(iface);
|
||||
+ FIXME("%p, %p\n", This, content);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI compositor_SetUpdateManager(IDirectManipulationCompositor *iface, IDirectManipulationUpdateManager *manager)
|
||||
+{
|
||||
+ struct directcompositor *This = impl_from_IDirectManipulationCompositor(iface);
|
||||
+ FIXME("%p, %p\n", This, manager);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI compositor_Flush(IDirectManipulationCompositor *iface)
|
||||
+{
|
||||
+ struct directcompositor *This = impl_from_IDirectManipulationCompositor(iface);
|
||||
+ FIXME("%p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static const struct IDirectManipulationCompositorVtbl compositorVtbl =
|
||||
+{
|
||||
+ compositor_QueryInterface,
|
||||
+ compositor_AddRef,
|
||||
+ compositor_Release,
|
||||
+ compositor_AddContent,
|
||||
+ compositor_RemoveContent,
|
||||
+ compositor_SetUpdateManager,
|
||||
+ compositor_Flush
|
||||
+};
|
||||
+
|
||||
+static HRESULT WINAPI DirectCompositor_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv)
|
||||
+{
|
||||
+ struct directcompositor *object;
|
||||
+ HRESULT ret;
|
||||
+
|
||||
+ TRACE("(%p, %s, %p)\n", outer, debugstr_guid(riid), ppv);
|
||||
+
|
||||
+ *ppv = NULL;
|
||||
+
|
||||
+ object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object));
|
||||
+ if (!object)
|
||||
+ return E_OUTOFMEMORY;
|
||||
+
|
||||
+ object->IDirectManipulationCompositor_iface.lpVtbl = &compositorVtbl;
|
||||
+ object->ref = 1;
|
||||
+
|
||||
+ ret = compositor_QueryInterface(&object->IDirectManipulationCompositor_iface, riid, ppv);
|
||||
+ compositor_Release(&object->IDirectManipulationCompositor_iface);
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFIID riid, void **ppv)
|
||||
{
|
||||
*ppv = NULL;
|
||||
@@ -253,7 +364,16 @@ static const IClassFactoryVtbl DirectFactoryVtbl = {
|
||||
ClassFactory_LockServer
|
||||
};
|
||||
|
||||
+static const IClassFactoryVtbl DirectCompositorVtbl = {
|
||||
+ ClassFactory_QueryInterface,
|
||||
+ ClassFactory_AddRef,
|
||||
+ ClassFactory_Release,
|
||||
+ DirectCompositor_CreateInstance,
|
||||
+ ClassFactory_LockServer
|
||||
+};
|
||||
+
|
||||
static IClassFactory direct_factory = { &DirectFactoryVtbl };
|
||||
+static IClassFactory compositor_factory = { &DirectCompositorVtbl };
|
||||
|
||||
HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
|
||||
{
|
||||
@@ -262,6 +382,10 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
|
||||
TRACE("(CLSID_DirectManipulationManager %s %p)\n", debugstr_guid(riid), ppv);
|
||||
return IClassFactory_QueryInterface(&direct_factory, riid, ppv);
|
||||
}
|
||||
+ else if(IsEqualGUID(&CLSID_DCompManipulationCompositor, rclsid)) {
|
||||
+ TRACE("(CLSID_DCompManipulationCompositor %s %p)\n", debugstr_guid(riid), ppv);
|
||||
+ return IClassFactory_QueryInterface(&compositor_factory, riid, ppv);
|
||||
+ }
|
||||
|
||||
FIXME("%s %s %p\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
|
||||
return CLASS_E_CLASSNOTAVAILABLE;
|
||||
--
|
||||
2.17.1
|
||||
|
@@ -1,104 +0,0 @@
|
||||
From c7190485c2cc3ccc4d6480d0621552aa488154bd Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Tue, 23 Jul 2019 08:37:12 +1000
|
||||
Subject: [PATCH] directmanipulation: Supprot
|
||||
IDirectManipulationFrameInfoProvider interface in
|
||||
IDirectManipulationCompositor.
|
||||
|
||||
---
|
||||
dlls/directmanipulation/directmanipulation.c | 49 ++++++++++++++++++++
|
||||
1 file changed, 49 insertions(+)
|
||||
|
||||
diff --git a/dlls/directmanipulation/directmanipulation.c b/dlls/directmanipulation/directmanipulation.c
|
||||
index 44d74b368d0..f5a8aee5de2 100644
|
||||
--- a/dlls/directmanipulation/directmanipulation.c
|
||||
+++ b/dlls/directmanipulation/directmanipulation.c
|
||||
@@ -213,6 +213,7 @@ static HRESULT WINAPI DirectManipulation_CreateInstance(IClassFactory *iface, IU
|
||||
struct directcompositor
|
||||
{
|
||||
IDirectManipulationCompositor IDirectManipulationCompositor_iface;
|
||||
+ IDirectManipulationFrameInfoProvider IDirectManipulationFrameInfoProvider_iface;
|
||||
LONG ref;
|
||||
};
|
||||
|
||||
@@ -221,8 +222,15 @@ static inline struct directcompositor *impl_from_IDirectManipulationCompositor(I
|
||||
return CONTAINING_RECORD(iface, struct directcompositor, IDirectManipulationCompositor_iface);
|
||||
}
|
||||
|
||||
+static inline struct directcompositor *impl_from_IDirectManipulationFrameInfoProvider(IDirectManipulationFrameInfoProvider *iface)
|
||||
+{
|
||||
+ return CONTAINING_RECORD(iface, struct directcompositor, IDirectManipulationFrameInfoProvider_iface);
|
||||
+}
|
||||
+
|
||||
static HRESULT WINAPI compositor_QueryInterface(IDirectManipulationCompositor *iface, REFIID riid, void **ppv)
|
||||
{
|
||||
+ struct directcompositor *This = impl_from_IDirectManipulationCompositor(iface);
|
||||
+
|
||||
if (IsEqualGUID(riid, &IID_IUnknown) ||
|
||||
IsEqualGUID(riid, &IID_IDirectManipulationCompositor))
|
||||
{
|
||||
@@ -230,6 +238,12 @@ static HRESULT WINAPI compositor_QueryInterface(IDirectManipulationCompositor *i
|
||||
*ppv = iface;
|
||||
return S_OK;
|
||||
}
|
||||
+ else if(IsEqualGUID(riid, &IID_IDirectManipulationFrameInfoProvider))
|
||||
+ {
|
||||
+ IUnknown_AddRef(iface);
|
||||
+ *ppv = &This->IDirectManipulationFrameInfoProvider_iface;
|
||||
+ return S_OK;
|
||||
+ }
|
||||
|
||||
FIXME("(%p)->(%s,%p),not found\n", iface, debugstr_guid(riid), ppv);
|
||||
return E_NOINTERFACE;
|
||||
@@ -299,6 +313,40 @@ static const struct IDirectManipulationCompositorVtbl compositorVtbl =
|
||||
compositor_Flush
|
||||
};
|
||||
|
||||
+static HRESULT WINAPI provider_QueryInterface(IDirectManipulationFrameInfoProvider *iface, REFIID riid, void **ppv)
|
||||
+{
|
||||
+ struct directcompositor *This = impl_from_IDirectManipulationFrameInfoProvider(iface);
|
||||
+ return IDirectManipulationCompositor_QueryInterface(&This->IDirectManipulationCompositor_iface, riid, ppv);
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI provider_AddRef(IDirectManipulationFrameInfoProvider *iface)
|
||||
+{
|
||||
+ struct directcompositor *This = impl_from_IDirectManipulationFrameInfoProvider(iface);
|
||||
+ return IDirectManipulationCompositor_AddRef(&This->IDirectManipulationCompositor_iface);
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI provider_Release(IDirectManipulationFrameInfoProvider *iface)
|
||||
+{
|
||||
+ struct directcompositor *This = impl_from_IDirectManipulationFrameInfoProvider(iface);
|
||||
+ return IDirectManipulationCompositor_Release(&This->IDirectManipulationCompositor_iface);
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI provider_GetNextFrameInfo(IDirectManipulationFrameInfoProvider *iface, ULONGLONG *time,
|
||||
+ ULONGLONG *process, ULONGLONG *composition)
|
||||
+{
|
||||
+ struct directcompositor *This = impl_from_IDirectManipulationFrameInfoProvider(iface);
|
||||
+ FIXME("%p, %p, %p, %p\n", This, time, process, composition);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static const struct IDirectManipulationFrameInfoProviderVtbl providerVtbl =
|
||||
+{
|
||||
+ provider_QueryInterface,
|
||||
+ provider_AddRef,
|
||||
+ provider_Release,
|
||||
+ provider_GetNextFrameInfo
|
||||
+};
|
||||
+
|
||||
static HRESULT WINAPI DirectCompositor_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv)
|
||||
{
|
||||
struct directcompositor *object;
|
||||
@@ -313,6 +361,7 @@ static HRESULT WINAPI DirectCompositor_CreateInstance(IClassFactory *iface, IUnk
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
object->IDirectManipulationCompositor_iface.lpVtbl = &compositorVtbl;
|
||||
+ object->IDirectManipulationFrameInfoProvider_iface.lpVtbl = &providerVtbl;
|
||||
object->ref = 1;
|
||||
|
||||
ret = compositor_QueryInterface(&object->IDirectManipulationCompositor_iface, riid, ppv);
|
||||
--
|
||||
2.17.1
|
||||
|
@@ -1,176 +0,0 @@
|
||||
From 3b024e2861712c7fd833c77a2de71b025102309f Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Mon, 22 Jul 2019 10:36:34 +1000
|
||||
Subject: [PATCH] directmanipulation: Implement IDirectManipulationManager2
|
||||
GetUpdateManager.
|
||||
|
||||
---
|
||||
dlls/directmanipulation/directmanipulation.c | 131 ++++++++++++++++++-
|
||||
1 file changed, 129 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/directmanipulation/directmanipulation.c b/dlls/directmanipulation/directmanipulation.c
|
||||
index edfdda980e..c67d3ff956 100644
|
||||
--- a/dlls/directmanipulation/directmanipulation.c
|
||||
+++ b/dlls/directmanipulation/directmanipulation.c
|
||||
@@ -68,6 +68,13 @@ HRESULT WINAPI DllCanUnloadNow(void)
|
||||
struct directmanipulation
|
||||
{
|
||||
IDirectManipulationManager2 IDirectManipulationManager2_iface;
|
||||
+ IDirectManipulationUpdateManager *updatemanager;
|
||||
+ LONG ref;
|
||||
+};
|
||||
+
|
||||
+struct directupdatemanager
|
||||
+{
|
||||
+ IDirectManipulationUpdateManager IDirectManipulationUpdateManager_iface;
|
||||
LONG ref;
|
||||
};
|
||||
|
||||
@@ -76,6 +83,100 @@ static inline struct directmanipulation *impl_from_IDirectManipulationManager2(I
|
||||
return CONTAINING_RECORD(iface, struct directmanipulation, IDirectManipulationManager2_iface);
|
||||
}
|
||||
|
||||
+static inline struct directupdatemanager *impl_from_IDirectManipulationUpdateManager(IDirectManipulationUpdateManager *iface)
|
||||
+{
|
||||
+ return CONTAINING_RECORD(iface, struct directupdatemanager, IDirectManipulationUpdateManager_iface);
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI update_manager_QueryInterface(IDirectManipulationUpdateManager *iface, REFIID riid,void **ppv)
|
||||
+{
|
||||
+ struct directupdatemanager *This = impl_from_IDirectManipulationUpdateManager(iface);
|
||||
+
|
||||
+ TRACE("(%p)->(%s,%p)\n", This, debugstr_guid(riid), ppv);
|
||||
+
|
||||
+ if (IsEqualGUID(riid, &IID_IUnknown) ||
|
||||
+ IsEqualGUID(riid, &IID_IDirectManipulationUpdateManager)) {
|
||||
+ IUnknown_AddRef(iface);
|
||||
+ *ppv = iface;
|
||||
+ return S_OK;
|
||||
+ }
|
||||
+
|
||||
+ FIXME("(%p)->(%s,%p), not found\n", This, debugstr_guid(riid), ppv);
|
||||
+ return E_NOINTERFACE;
|
||||
+}
|
||||
+
|
||||
+ULONG WINAPI update_manager_AddRef(IDirectManipulationUpdateManager *iface)
|
||||
+{
|
||||
+ struct directupdatemanager *This = impl_from_IDirectManipulationUpdateManager(iface);
|
||||
+ ULONG ref = InterlockedIncrement(&This->ref);
|
||||
+
|
||||
+ TRACE("(%p) ref=%u\n", This, ref);
|
||||
+
|
||||
+ return ref;
|
||||
+}
|
||||
+
|
||||
+ULONG WINAPI update_manager_Release(IDirectManipulationUpdateManager *iface)
|
||||
+{
|
||||
+ struct directupdatemanager *This = impl_from_IDirectManipulationUpdateManager(iface);
|
||||
+ ULONG ref = InterlockedDecrement(&This->ref);
|
||||
+
|
||||
+ TRACE("(%p) ref=%u\n", This, ref);
|
||||
+
|
||||
+ if (!ref)
|
||||
+ {
|
||||
+ heap_free(This);
|
||||
+ }
|
||||
+ return ref;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI update_manager_RegisterWaitHandleCallback(IDirectManipulationUpdateManager *iface, HANDLE handle,
|
||||
+ IDirectManipulationUpdateHandler *handler, DWORD *cookie)
|
||||
+{
|
||||
+ struct directupdatemanager *This = impl_from_IDirectManipulationUpdateManager(iface);
|
||||
+ FIXME("%p, %p, %p, %p\n", This, handle, handler, cookie);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI update_manager_UnregisterWaitHandleCallback(IDirectManipulationUpdateManager *iface, DWORD cookie)
|
||||
+{
|
||||
+ struct directupdatemanager *This = impl_from_IDirectManipulationUpdateManager(iface);
|
||||
+ FIXME("%p, %x\n", This, cookie);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI update_manager_Update(IDirectManipulationUpdateManager *iface, IDirectManipulationFrameInfoProvider *provider)
|
||||
+{
|
||||
+ struct directupdatemanager *This = impl_from_IDirectManipulationUpdateManager(iface);
|
||||
+ FIXME("%p, %p\n", This, provider);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+struct IDirectManipulationUpdateManagerVtbl updatemanagerVtbl =
|
||||
+{
|
||||
+ update_manager_QueryInterface,
|
||||
+ update_manager_AddRef,
|
||||
+ update_manager_Release,
|
||||
+ update_manager_RegisterWaitHandleCallback,
|
||||
+ update_manager_UnregisterWaitHandleCallback,
|
||||
+ update_manager_Update
|
||||
+};
|
||||
+
|
||||
+static HRESULT create_update_manager(IDirectManipulationUpdateManager **obj)
|
||||
+{
|
||||
+ struct directupdatemanager *object;
|
||||
+
|
||||
+ object = heap_alloc(sizeof(*object));
|
||||
+ if(!object)
|
||||
+ return E_OUTOFMEMORY;
|
||||
+
|
||||
+ object->IDirectManipulationUpdateManager_iface.lpVtbl = &updatemanagerVtbl;
|
||||
+ object->ref = 1;
|
||||
+
|
||||
+ *obj = &object->IDirectManipulationUpdateManager_iface;
|
||||
+
|
||||
+ return S_OK;
|
||||
+}
|
||||
+
|
||||
static HRESULT WINAPI direct_manip_QueryInterface(IDirectManipulationManager2 *iface, REFIID riid, void **ppv)
|
||||
{
|
||||
if (IsEqualGUID(riid, &IID_IUnknown) ||
|
||||
@@ -109,6 +210,8 @@ static ULONG WINAPI direct_manip_Release(IDirectManipulationManager2 *iface)
|
||||
|
||||
if (!ref)
|
||||
{
|
||||
+ if(This->updatemanager)
|
||||
+ IDirectManipulationUpdateManager_Release(This->updatemanager);
|
||||
heap_free(This);
|
||||
}
|
||||
return ref;
|
||||
@@ -146,8 +249,32 @@ static HRESULT WINAPI direct_manip_ProcessInput(IDirectManipulationManager2 *ifa
|
||||
static HRESULT WINAPI direct_manip_GetUpdateManager(IDirectManipulationManager2 *iface, REFIID riid, void **obj)
|
||||
{
|
||||
struct directmanipulation *This = impl_from_IDirectManipulationManager2(iface);
|
||||
- FIXME("%p, %s, %p\n", This, debugstr_guid(riid), obj);
|
||||
- return E_NOTIMPL;
|
||||
+ HRESULT hr = E_FAIL;
|
||||
+
|
||||
+ TRACE("%p, %s, %p\n", This, debugstr_guid(riid), obj);
|
||||
+
|
||||
+ *obj = NULL;
|
||||
+ if(IsEqualGUID(riid, &IID_IDirectManipulationUpdateManager))
|
||||
+ {
|
||||
+ if(!This->updatemanager)
|
||||
+ {
|
||||
+ hr = create_update_manager(&This->updatemanager);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ hr = S_OK;
|
||||
+ }
|
||||
+
|
||||
+ if(hr == S_OK)
|
||||
+ {
|
||||
+ IDirectManipulationUpdateManager_AddRef(This->updatemanager);
|
||||
+ *obj = This->updatemanager;
|
||||
+ }
|
||||
+ }
|
||||
+ else
|
||||
+ FIXME("Interface %s currently not supported.\n", debugstr_guid(riid));
|
||||
+
|
||||
+ return hr;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI direct_manip_CreateViewport(IDirectManipulationManager2 *iface, IDirectManipulationFrameInfoProvider *frame,
|
||||
--
|
||||
2.17.1
|
||||
|
@@ -1,51 +0,0 @@
|
||||
From 6f2fd8dc5086a0c0982f71416b8a2b1e25ac6433 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Wed, 24 Jul 2019 09:15:18 +1000
|
||||
Subject: [PATCH] directmanipulation: Implement IDirectManipulationCompositor
|
||||
SetUpdateManager.
|
||||
|
||||
---
|
||||
dlls/directmanipulation/directmanipulation.c | 13 +++++++++++--
|
||||
1 file changed, 11 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/directmanipulation/directmanipulation.c b/dlls/directmanipulation/directmanipulation.c
|
||||
index 7d00354963..629a41c845 100644
|
||||
--- a/dlls/directmanipulation/directmanipulation.c
|
||||
+++ b/dlls/directmanipulation/directmanipulation.c
|
||||
@@ -339,6 +339,7 @@ struct directcompositor
|
||||
{
|
||||
IDirectManipulationCompositor IDirectManipulationCompositor_iface;
|
||||
IDirectManipulationFrameInfoProvider IDirectManipulationFrameInfoProvider_iface;
|
||||
+ IDirectManipulationUpdateManager *manager;
|
||||
LONG ref;
|
||||
};
|
||||
|
||||
@@ -393,6 +394,8 @@ static ULONG WINAPI compositor_Release(IDirectManipulationCompositor *iface)
|
||||
|
||||
if (!ref)
|
||||
{
|
||||
+ if(This->manager)
|
||||
+ IDirectManipulationUpdateManager_Release(This->manager);
|
||||
heap_free(This);
|
||||
}
|
||||
return ref;
|
||||
@@ -416,8 +419,14 @@ static HRESULT WINAPI compositor_RemoveContent(IDirectManipulationCompositor *if
|
||||
static HRESULT WINAPI compositor_SetUpdateManager(IDirectManipulationCompositor *iface, IDirectManipulationUpdateManager *manager)
|
||||
{
|
||||
struct directcompositor *This = impl_from_IDirectManipulationCompositor(iface);
|
||||
- FIXME("%p, %p\n", This, manager);
|
||||
- return E_NOTIMPL;
|
||||
+ TRACE("%p, %p\n", This, manager);
|
||||
+
|
||||
+ if(!manager)
|
||||
+ return E_INVALIDARG;
|
||||
+
|
||||
+ This->manager = manager;
|
||||
+ IDirectManipulationUpdateManager_AddRef(This->manager);
|
||||
+ return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI compositor_Flush(IDirectManipulationCompositor *iface)
|
||||
--
|
||||
2.17.1
|
||||
|
@@ -1,373 +0,0 @@
|
||||
From 7d82a3f5a5bcdbf2b362c456080e59f882842b85 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Fri, 26 Jul 2019 09:51:05 +1000
|
||||
Subject: [PATCH] directmanipulation: Implement IDirectManipulationManager2
|
||||
CreateViewport
|
||||
|
||||
---
|
||||
dlls/directmanipulation/directmanipulation.c | 341 ++++++++++++++++++-
|
||||
1 file changed, 339 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/directmanipulation/directmanipulation.c b/dlls/directmanipulation/directmanipulation.c
|
||||
index 629a41c845..86e9556e70 100644
|
||||
--- a/dlls/directmanipulation/directmanipulation.c
|
||||
+++ b/dlls/directmanipulation/directmanipulation.c
|
||||
@@ -177,6 +177,334 @@ static HRESULT create_update_manager(IDirectManipulationUpdateManager **obj)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
+struct directviewport
|
||||
+{
|
||||
+ IDirectManipulationViewport2 IDirectManipulationViewport2_iface;
|
||||
+ LONG ref;
|
||||
+};
|
||||
+
|
||||
+static inline struct directviewport *impl_from_IDirectManipulationViewport2(IDirectManipulationViewport2 *iface)
|
||||
+{
|
||||
+ return CONTAINING_RECORD(iface, struct directviewport, IDirectManipulationViewport2_iface);
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI viewport_QueryInterface(IDirectManipulationViewport2 *iface, REFIID riid, void **ppv)
|
||||
+{
|
||||
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
|
||||
+ TRACE("(%p)->(%s,%p)\n", This, debugstr_guid(riid), ppv);
|
||||
+
|
||||
+ if (IsEqualGUID(riid, &IID_IUnknown) ||
|
||||
+ IsEqualGUID(riid, &IID_IDirectManipulationViewport) ||
|
||||
+ IsEqualGUID(riid, &IID_IDirectManipulationViewport2))
|
||||
+ {
|
||||
+ IDirectManipulationViewport2_AddRef(&This->IDirectManipulationViewport2_iface);
|
||||
+ *ppv = &This->IDirectManipulationViewport2_iface;
|
||||
+ return S_OK;
|
||||
+ }
|
||||
+
|
||||
+ FIXME("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppv);
|
||||
+ return E_NOINTERFACE;
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI viewport_AddRef(IDirectManipulationViewport2 *iface)
|
||||
+{
|
||||
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
|
||||
+ ULONG ref = InterlockedIncrement(&This->ref);
|
||||
+
|
||||
+ TRACE("(%p) ref=%u\n", This, ref);
|
||||
+
|
||||
+ return ref;
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI viewport_Release(IDirectManipulationViewport2 *iface)
|
||||
+{
|
||||
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
|
||||
+ ULONG ref = InterlockedDecrement(&This->ref);
|
||||
+
|
||||
+ TRACE("(%p) ref=%u\n", This, ref);
|
||||
+
|
||||
+ if (!ref)
|
||||
+ {
|
||||
+ heap_free(This);
|
||||
+ }
|
||||
+ return ref;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI viewport_Enable(IDirectManipulationViewport2 *iface)
|
||||
+{
|
||||
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
|
||||
+ FIXME("%p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI viewport_Disable(IDirectManipulationViewport2 *iface)
|
||||
+{
|
||||
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
|
||||
+ FIXME("%p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI viewport_SetContact(IDirectManipulationViewport2 *iface, UINT32 id)
|
||||
+{
|
||||
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
|
||||
+ FIXME("%p, %d\n", This, id);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI viewport_ReleaseContact(IDirectManipulationViewport2 *iface, UINT32 id)
|
||||
+{
|
||||
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
|
||||
+ FIXME("%p, %d\n", This, id);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI viewport_ReleaseAllContacts(IDirectManipulationViewport2 *iface)
|
||||
+{
|
||||
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
|
||||
+ FIXME("%p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI viewport_GetStatus(IDirectManipulationViewport2 *iface, DIRECTMANIPULATION_STATUS *status)
|
||||
+{
|
||||
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
|
||||
+ FIXME("%p, %p\n", This, status);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI viewport_GetTag(IDirectManipulationViewport2 *iface, REFIID riid, void **object, UINT32 *id)
|
||||
+{
|
||||
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
|
||||
+ FIXME("%p, %s, %p, %p\n", This, debugstr_guid(riid), object, id);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI viewport_SetTag(IDirectManipulationViewport2 *iface, IUnknown *object, UINT32 id)
|
||||
+{
|
||||
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
|
||||
+ FIXME("%p, %p, %p\n", This, object, id);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI viewport_GetViewportRect(IDirectManipulationViewport2 *iface, RECT *viewport)
|
||||
+{
|
||||
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
|
||||
+ FIXME("%p, %p\n", This, viewport);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI viewport_SetViewportRect(IDirectManipulationViewport2 *iface, const RECT *viewport)
|
||||
+{
|
||||
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
|
||||
+ FIXME("%p, %p\n", This, viewport);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI viewport_ZoomToRect(IDirectManipulationViewport2 *iface, const float left,
|
||||
+ const float top, const float right, const float bottom, BOOL animate)
|
||||
+{
|
||||
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
|
||||
+ FIXME("%p, %f, %f, %f, %f, %d\n", This, left, top, right, bottom, animate);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI viewport_SetViewportTransform(IDirectManipulationViewport2 *iface,
|
||||
+ const float *matrix, DWORD count)
|
||||
+{
|
||||
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
|
||||
+ FIXME("%p, %p, %d\n", This, matrix, count);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI viewport_SyncDisplayTransform(IDirectManipulationViewport2 *iface,
|
||||
+ const float *matrix, DWORD count)
|
||||
+{
|
||||
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
|
||||
+ FIXME("%p, %p, %d\n", This, matrix, count);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI viewport_GetPrimaryContent(IDirectManipulationViewport2 *iface, REFIID riid, void **object)
|
||||
+{
|
||||
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
|
||||
+ FIXME("%p, %s, %p\n", This, debugstr_guid(riid), object);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI viewport_AddContent(IDirectManipulationViewport2 *iface, IDirectManipulationContent *content)
|
||||
+{
|
||||
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
|
||||
+ FIXME("%p, %p\n", This, content);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI viewport_RemoveContent(IDirectManipulationViewport2 *iface, IDirectManipulationContent *content)
|
||||
+{
|
||||
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
|
||||
+ FIXME("%p, %p\n", This, content);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI viewport_SetViewportOptions(IDirectManipulationViewport2 *iface, DIRECTMANIPULATION_VIEWPORT_OPTIONS options)
|
||||
+{
|
||||
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
|
||||
+ FIXME("%p, %d\n", This, options);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI viewport_AddConfiguration(IDirectManipulationViewport2 *iface, DIRECTMANIPULATION_CONFIGURATION configuration)
|
||||
+{
|
||||
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
|
||||
+ FIXME("%p, %d\n", This, configuration);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI viewport_RemoveConfiguration(IDirectManipulationViewport2 *iface, DIRECTMANIPULATION_CONFIGURATION configuration)
|
||||
+{
|
||||
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
|
||||
+ FIXME("%p, %d\n", This, configuration);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI viewport_ActivateConfiguration(IDirectManipulationViewport2 *iface, DIRECTMANIPULATION_CONFIGURATION configuration)
|
||||
+{
|
||||
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
|
||||
+ FIXME("%p, %d\n", This, configuration);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI viewport_SetManualGesture(IDirectManipulationViewport2 *iface, DIRECTMANIPULATION_GESTURE_CONFIGURATION configuration)
|
||||
+{
|
||||
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
|
||||
+ FIXME("%p, %d\n", This, configuration);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI viewport_SetChaining(IDirectManipulationViewport2 *iface, DIRECTMANIPULATION_MOTION_TYPES enabledTypes)
|
||||
+{
|
||||
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
|
||||
+ FIXME("%p, %d\n", This, enabledTypes);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI viewport_AddEventHandler(IDirectManipulationViewport2 *iface, HWND window,
|
||||
+ IDirectManipulationViewportEventHandler *eventHandler, DWORD *cookie)
|
||||
+{
|
||||
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
|
||||
+ FIXME("%p, %p, %p, %p\n", This, window, eventHandler, cookie);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI viewport_RemoveEventHandler(IDirectManipulationViewport2 *iface, DWORD cookie)
|
||||
+{
|
||||
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
|
||||
+ FIXME("%p, %d\n", This, cookie);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI viewport_SetInputMode(IDirectManipulationViewport2 *iface, DIRECTMANIPULATION_INPUT_MODE mode)
|
||||
+{
|
||||
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
|
||||
+ FIXME("%p, %d\n", This, mode);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI viewport_SetUpdateMode(IDirectManipulationViewport2 *iface, DIRECTMANIPULATION_INPUT_MODE mode)
|
||||
+{
|
||||
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
|
||||
+ FIXME("%p, %d\n", This, mode);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI viewport_Stop(IDirectManipulationViewport2 *iface)
|
||||
+{
|
||||
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
|
||||
+ FIXME("%p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI viewport_Abandon(IDirectManipulationViewport2 *iface)
|
||||
+{
|
||||
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
|
||||
+ FIXME("%p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI viewport_AddBehavior(IDirectManipulationViewport2 *iface, IUnknown *behavior, DWORD *cookie)
|
||||
+{
|
||||
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
|
||||
+ FIXME("%p, %p, %p\n", This, behavior, cookie);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI viewport_RemoveBehavior(IDirectManipulationViewport2 *iface, DWORD cookie)
|
||||
+{
|
||||
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
|
||||
+ FIXME("%p, %d\n", This, cookie);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI viewport_RemoveAllBehaviors(IDirectManipulationViewport2 *iface)
|
||||
+{
|
||||
+ struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
|
||||
+ FIXME("%p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static const IDirectManipulationViewport2Vtbl viewportVtbl =
|
||||
+{
|
||||
+ viewport_QueryInterface,
|
||||
+ viewport_AddRef,
|
||||
+ viewport_Release,
|
||||
+ viewport_Enable,
|
||||
+ viewport_Disable,
|
||||
+ viewport_SetContact,
|
||||
+ viewport_ReleaseContact,
|
||||
+ viewport_ReleaseAllContacts,
|
||||
+ viewport_GetStatus,
|
||||
+ viewport_GetTag,
|
||||
+ viewport_SetTag,
|
||||
+ viewport_GetViewportRect,
|
||||
+ viewport_SetViewportRect,
|
||||
+ viewport_ZoomToRect,
|
||||
+ viewport_SetViewportTransform,
|
||||
+ viewport_SyncDisplayTransform,
|
||||
+ viewport_GetPrimaryContent,
|
||||
+ viewport_AddContent,
|
||||
+ viewport_RemoveContent,
|
||||
+ viewport_SetViewportOptions,
|
||||
+ viewport_AddConfiguration,
|
||||
+ viewport_RemoveConfiguration,
|
||||
+ viewport_ActivateConfiguration,
|
||||
+ viewport_SetManualGesture,
|
||||
+ viewport_SetChaining,
|
||||
+ viewport_AddEventHandler,
|
||||
+ viewport_RemoveEventHandler,
|
||||
+ viewport_SetInputMode,
|
||||
+ viewport_SetUpdateMode,
|
||||
+ viewport_Stop,
|
||||
+ viewport_Abandon,
|
||||
+ viewport_AddBehavior,
|
||||
+ viewport_RemoveBehavior,
|
||||
+ viewport_RemoveAllBehaviors
|
||||
+};
|
||||
+
|
||||
+static HRESULT create_viewport(IDirectManipulationViewport2 **obj)
|
||||
+{
|
||||
+ struct directviewport *object;
|
||||
+
|
||||
+ object = heap_alloc(sizeof(*object));
|
||||
+ if(!object)
|
||||
+ return E_OUTOFMEMORY;
|
||||
+
|
||||
+ object->IDirectManipulationViewport2_iface.lpVtbl = &viewportVtbl;
|
||||
+ object->ref = 1;
|
||||
+
|
||||
+ *obj = &object->IDirectManipulationViewport2_iface;
|
||||
+
|
||||
+ return S_OK;
|
||||
+}
|
||||
+
|
||||
static HRESULT WINAPI direct_manip_QueryInterface(IDirectManipulationManager2 *iface, REFIID riid, void **ppv)
|
||||
{
|
||||
if (IsEqualGUID(riid, &IID_IUnknown) ||
|
||||
@@ -278,9 +606,18 @@ static HRESULT WINAPI direct_manip_GetUpdateManager(IDirectManipulationManager2
|
||||
static HRESULT WINAPI direct_manip_CreateViewport(IDirectManipulationManager2 *iface, IDirectManipulationFrameInfoProvider *frame,
|
||||
HWND window, REFIID riid, void **obj)
|
||||
{
|
||||
+ HRESULT hr = E_NOTIMPL;
|
||||
struct directmanipulation *This = impl_from_IDirectManipulationManager2(iface);
|
||||
- FIXME("%p, %p, %p, %s, %p\n", This, frame, window, debugstr_guid(riid), obj);
|
||||
- return E_NOTIMPL;
|
||||
+ TRACE("%p, %p, %p, %s, %p\n", This, frame, window, debugstr_guid(riid), obj);
|
||||
+
|
||||
+ if(IsEqualGUID(riid, &IID_IDirectManipulationViewport) ||
|
||||
+ IsEqualGUID(riid, &IID_IDirectManipulationViewport2) )
|
||||
+ {
|
||||
+ hr = create_viewport( (IDirectManipulationViewport2**)obj);
|
||||
+ }
|
||||
+ else
|
||||
+ FIXME("Unsupported interface %s\n", debugstr_guid(riid));
|
||||
+ return hr;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI direct_manip_CreateContent(IDirectManipulationManager2 *iface, IDirectManipulationFrameInfoProvider *frame,
|
||||
--
|
||||
2.17.1
|
||||
|
@@ -1,118 +0,0 @@
|
||||
From efa0cbb8de357cf24f6eb4d15c638dd3c26819ba Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Mon, 29 Jul 2019 09:09:41 +1000
|
||||
Subject: [PATCH] directmanipulation/tests: Initial tests
|
||||
|
||||
---
|
||||
configure | 1 +
|
||||
configure.ac | 1 +
|
||||
dlls/directmanipulation/tests/Makefile.in | 5 ++
|
||||
dlls/directmanipulation/tests/manipulation.c | 60 ++++++++++++++++++++
|
||||
4 files changed, 67 insertions(+)
|
||||
create mode 100644 dlls/directmanipulation/tests/Makefile.in
|
||||
create mode 100644 dlls/directmanipulation/tests/manipulation.c
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index 2ae3710ebb0..da201f4ffef 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -20370,6 +20370,7 @@ wine_fn_config_makefile dlls/dinput/tests enable_tests
|
||||
wine_fn_config_makefile dlls/dinput8 enable_dinput8
|
||||
wine_fn_config_makefile dlls/dinput8/tests enable_tests
|
||||
wine_fn_config_makefile dlls/directmanipulation enable_directmanipulation
|
||||
+wine_fn_config_makefile dlls/directmanipulation/tests enable_tests
|
||||
wine_fn_config_makefile dlls/dispdib.dll16 enable_win16
|
||||
wine_fn_config_makefile dlls/dispex enable_dispex
|
||||
wine_fn_config_makefile dlls/dispex/tests enable_tests
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 7c0044c8872..b2a913132c2 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -3186,6 +3186,7 @@ WINE_CONFIG_MAKEFILE(dlls/dinput/tests)
|
||||
WINE_CONFIG_MAKEFILE(dlls/dinput8)
|
||||
WINE_CONFIG_MAKEFILE(dlls/dinput8/tests)
|
||||
WINE_CONFIG_MAKEFILE(dlls/directmanipulation)
|
||||
+WINE_CONFIG_MAKEFILE(dlls/directmanipulation/tests)
|
||||
WINE_CONFIG_MAKEFILE(dlls/dispdib.dll16,enable_win16)
|
||||
WINE_CONFIG_MAKEFILE(dlls/dispex)
|
||||
WINE_CONFIG_MAKEFILE(dlls/dispex/tests)
|
||||
diff --git a/dlls/directmanipulation/tests/Makefile.in b/dlls/directmanipulation/tests/Makefile.in
|
||||
new file mode 100644
|
||||
index 00000000000..29ec0db511a
|
||||
--- /dev/null
|
||||
+++ b/dlls/directmanipulation/tests/Makefile.in
|
||||
@@ -0,0 +1,5 @@
|
||||
+TESTDLL = directmanipulation.dll
|
||||
+IMPORTS = uuid ole32
|
||||
+
|
||||
+C_SRCS = \
|
||||
+ manipulation.c
|
||||
diff --git a/dlls/directmanipulation/tests/manipulation.c b/dlls/directmanipulation/tests/manipulation.c
|
||||
new file mode 100644
|
||||
index 00000000000..93b692729b3
|
||||
--- /dev/null
|
||||
+++ b/dlls/directmanipulation/tests/manipulation.c
|
||||
@@ -0,0 +1,60 @@
|
||||
+/*
|
||||
+ *
|
||||
+ * Copyright 2019 Alistair Leslie-Hughes
|
||||
+ *
|
||||
+ * This library is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU Lesser General Public
|
||||
+ * License as published by the Free Software Foundation; either
|
||||
+ * version 2.1 of the License, or (at your option) any later version.
|
||||
+ *
|
||||
+ * This library is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ * Lesser General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU Lesser General Public
|
||||
+ * License along with this library; if not, write to the Free Software
|
||||
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
+ *
|
||||
+ */
|
||||
+#define COBJMACROS
|
||||
+
|
||||
+#include <stdarg.h>
|
||||
+
|
||||
+#include "windows.h"
|
||||
+#include "directmanipulation.h"
|
||||
+
|
||||
+#include "wine/test.h"
|
||||
+
|
||||
+static void test_IDirectManipulationManager2(void)
|
||||
+{
|
||||
+ IDirectManipulationManager2 *manager2;
|
||||
+ IDirectManipulationUpdateManager *update;
|
||||
+ HRESULT hres;
|
||||
+
|
||||
+ hres = CoCreateInstance(&CLSID_DirectManipulationManager, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
|
||||
+ &IID_IDirectManipulationManager2, (void**)&manager2);
|
||||
+ if(FAILED(hres))
|
||||
+ {
|
||||
+ win_skip("Failed to create XMLView instance\n");
|
||||
+ return;
|
||||
+ }
|
||||
+ ok(hres == S_OK, "CoCreateInstance returned %x, expected S_OK\n", hres);
|
||||
+
|
||||
+ hres = IDirectManipulationManager2_GetUpdateManager(manager2, &IID_IDirectManipulationUpdateManager, (void**)&update);
|
||||
+ ok(hres == S_OK, "returned %x, expected S_OK\n", hres);
|
||||
+
|
||||
+ if(update)
|
||||
+ IDirectManipulationUpdateManager_Release(update);
|
||||
+
|
||||
+ IDirectManipulationManager2_Release(manager2);
|
||||
+}
|
||||
+
|
||||
+START_TEST(manipulation)
|
||||
+{
|
||||
+ CoInitialize(NULL);
|
||||
+
|
||||
+ test_IDirectManipulationManager2();
|
||||
+
|
||||
+ CoUninitialize();
|
||||
+}
|
||||
--
|
||||
2.24.1
|
||||
|
@@ -1,26 +0,0 @@
|
||||
From 5d5892c9403b77bd3f17acebfee1acc7e95003a0 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Tue, 30 Jul 2019 09:30:41 +1000
|
||||
Subject: [PATCH 1/4] directmanipulation: Fake success from
|
||||
IDirectManipulationViewport2 ActivateConfiguration.
|
||||
|
||||
---
|
||||
dlls/directmanipulation/directmanipulation.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/directmanipulation/directmanipulation.c b/dlls/directmanipulation/directmanipulation.c
|
||||
index 4f16963d42..f1e008bc7f 100644
|
||||
--- a/dlls/directmanipulation/directmanipulation.c
|
||||
+++ b/dlls/directmanipulation/directmanipulation.c
|
||||
@@ -370,7 +370,7 @@ static HRESULT WINAPI viewport_ActivateConfiguration(IDirectManipulationViewport
|
||||
{
|
||||
struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
|
||||
FIXME("%p, %d\n", This, configuration);
|
||||
- return E_NOTIMPL;
|
||||
+ return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI viewport_SetManualGesture(IDirectManipulationViewport2 *iface, DIRECTMANIPULATION_GESTURE_CONFIGURATION configuration)
|
||||
--
|
||||
2.17.1
|
||||
|
@@ -1,186 +0,0 @@
|
||||
From 52d03476a908684bb201ae69032f39bf2a745190 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Fri, 23 Aug 2019 11:34:16 +1000
|
||||
Subject: [PATCH 3/4] directmanipulation: Implement
|
||||
IDirectManipulationViewport2 GetPrimaryContent
|
||||
|
||||
---
|
||||
dlls/directmanipulation/directmanipulation.c | 155 ++++++++++++++++++-
|
||||
1 file changed, 154 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/directmanipulation/directmanipulation.c b/dlls/directmanipulation/directmanipulation.c
|
||||
index f1e008bc7f..ca60e76db6 100644
|
||||
--- a/dlls/directmanipulation/directmanipulation.c
|
||||
+++ b/dlls/directmanipulation/directmanipulation.c
|
||||
@@ -177,6 +177,142 @@ static HRESULT create_update_manager(IDirectManipulationUpdateManager **obj)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
+
|
||||
+struct primarycontext
|
||||
+{
|
||||
+ IDirectManipulationPrimaryContent IDirectManipulationPrimaryContent_iface;
|
||||
+ LONG ref;
|
||||
+};
|
||||
+
|
||||
+static inline struct primarycontext *impl_from_IDirectManipulationPrimaryContent(IDirectManipulationPrimaryContent *iface)
|
||||
+{
|
||||
+ return CONTAINING_RECORD(iface, struct primarycontext, IDirectManipulationPrimaryContent_iface);
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI primary_QueryInterface(IDirectManipulationPrimaryContent *iface, REFIID riid, void **ppv)
|
||||
+{
|
||||
+ struct primarycontext *This = impl_from_IDirectManipulationPrimaryContent(iface);
|
||||
+ TRACE("(%p)->(%s,%p)\n", This, debugstr_guid(riid), ppv);
|
||||
+
|
||||
+ if (IsEqualGUID(riid, &IID_IUnknown) ||
|
||||
+ IsEqualGUID(riid, &IID_IDirectManipulationPrimaryContent))
|
||||
+ {
|
||||
+ IDirectManipulationPrimaryContent_AddRef(&This->IDirectManipulationPrimaryContent_iface);
|
||||
+ *ppv = &This->IDirectManipulationPrimaryContent_iface;
|
||||
+ return S_OK;
|
||||
+ }
|
||||
+
|
||||
+ FIXME("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppv);
|
||||
+ return E_NOINTERFACE;
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI primary_AddRef(IDirectManipulationPrimaryContent *iface)
|
||||
+{
|
||||
+ struct primarycontext *This = impl_from_IDirectManipulationPrimaryContent(iface);
|
||||
+ ULONG ref = InterlockedIncrement(&This->ref);
|
||||
+
|
||||
+ TRACE("(%p) ref=%u\n", This, ref);
|
||||
+
|
||||
+ return ref;
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI primary_Release(IDirectManipulationPrimaryContent *iface)
|
||||
+{
|
||||
+ struct primarycontext *This = impl_from_IDirectManipulationPrimaryContent(iface);
|
||||
+ ULONG ref = InterlockedDecrement(&This->ref);
|
||||
+
|
||||
+ TRACE("(%p) ref=%u\n", This, ref);
|
||||
+
|
||||
+ if (!ref)
|
||||
+ {
|
||||
+ heap_free(This);
|
||||
+ }
|
||||
+ return ref;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI primary_SetSnapInterval(IDirectManipulationPrimaryContent *iface, DIRECTMANIPULATION_MOTION_TYPES motion,
|
||||
+ float interval, float offset)
|
||||
+{
|
||||
+ struct primarycontext *This = impl_from_IDirectManipulationPrimaryContent(iface);
|
||||
+ FIXME("%p, %d, %f, %f\n", This, motion, interval, offset);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI primary_SetSnapPoints(IDirectManipulationPrimaryContent *iface, DIRECTMANIPULATION_MOTION_TYPES motion,
|
||||
+ const float *points, DWORD count)
|
||||
+{
|
||||
+ struct primarycontext *This = impl_from_IDirectManipulationPrimaryContent(iface);
|
||||
+ FIXME("%p, %d, %p, %d\n", This, motion, points, count);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI primary_SetSnapType(IDirectManipulationPrimaryContent *iface, DIRECTMANIPULATION_MOTION_TYPES motion,
|
||||
+ DIRECTMANIPULATION_SNAPPOINT_TYPE type)
|
||||
+{
|
||||
+ struct primarycontext *This = impl_from_IDirectManipulationPrimaryContent(iface);
|
||||
+ FIXME("%p, %d, %d\n", This, motion, type);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI primary_SetSnapCoordinate(IDirectManipulationPrimaryContent *iface, DIRECTMANIPULATION_MOTION_TYPES motion,
|
||||
+ DIRECTMANIPULATION_SNAPPOINT_COORDINATE coordinate, float origin)
|
||||
+{
|
||||
+ struct primarycontext *This = impl_from_IDirectManipulationPrimaryContent(iface);
|
||||
+ FIXME("%p, %d, %d, %f\n", This, motion, coordinate, origin);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI primary_SetZoomBoundaries(IDirectManipulationPrimaryContent *iface, float minimum, float maximum)
|
||||
+{
|
||||
+ struct primarycontext *This = impl_from_IDirectManipulationPrimaryContent(iface);
|
||||
+ FIXME("%p, %f, %f\n", This, minimum, maximum);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI primary_SetHorizontalAlignment(IDirectManipulationPrimaryContent *iface, DIRECTMANIPULATION_HORIZONTALALIGNMENT alignment)
|
||||
+{
|
||||
+ struct primarycontext *This = impl_from_IDirectManipulationPrimaryContent(iface);
|
||||
+ FIXME("%p, %d\n", This, alignment);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI primary_SetVerticalAlignment(IDirectManipulationPrimaryContent *iface, DIRECTMANIPULATION_VERTICALALIGNMENT alignment)
|
||||
+{
|
||||
+ struct primarycontext *This = impl_from_IDirectManipulationPrimaryContent(iface);
|
||||
+ FIXME("%p, %d\n", This, alignment);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI primary_GetInertiaEndTransform(IDirectManipulationPrimaryContent *iface, float *matrix, DWORD count)
|
||||
+{
|
||||
+ struct primarycontext *This = impl_from_IDirectManipulationPrimaryContent(iface);
|
||||
+ FIXME("%p, %p, %d\n", This, matrix, count);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI primary_GetCenterPoint(IDirectManipulationPrimaryContent *iface, float *x, float *y)
|
||||
+{
|
||||
+ struct primarycontext *This = impl_from_IDirectManipulationPrimaryContent(iface);
|
||||
+ FIXME("%p, %p, %p\n", This, x, y);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static const IDirectManipulationPrimaryContentVtbl primaryVtbl =
|
||||
+{
|
||||
+ primary_QueryInterface,
|
||||
+ primary_AddRef,
|
||||
+ primary_Release,
|
||||
+ primary_SetSnapInterval,
|
||||
+ primary_SetSnapPoints,
|
||||
+ primary_SetSnapType,
|
||||
+ primary_SetSnapCoordinate,
|
||||
+ primary_SetZoomBoundaries,
|
||||
+ primary_SetHorizontalAlignment,
|
||||
+ primary_SetVerticalAlignment,
|
||||
+ primary_GetInertiaEndTransform,
|
||||
+ primary_GetCenterPoint
|
||||
+};
|
||||
+
|
||||
struct directviewport
|
||||
{
|
||||
IDirectManipulationViewport2 IDirectManipulationViewport2_iface;
|
||||
@@ -327,7 +463,24 @@ static HRESULT WINAPI viewport_SyncDisplayTransform(IDirectManipulationViewport2
|
||||
static HRESULT WINAPI viewport_GetPrimaryContent(IDirectManipulationViewport2 *iface, REFIID riid, void **object)
|
||||
{
|
||||
struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
|
||||
- FIXME("%p, %s, %p\n", This, debugstr_guid(riid), object);
|
||||
+ TRACE("%p, %s, %p\n", This, debugstr_guid(riid), object);
|
||||
+ if(IsEqualGUID(riid, &IID_IDirectManipulationPrimaryContent))
|
||||
+ {
|
||||
+ struct primarycontext *primary;
|
||||
+ TRACE("IDirectManipulationPrimaryContent\n");
|
||||
+ primary = heap_alloc( sizeof(*primary));
|
||||
+ if(!primary)
|
||||
+ return E_OUTOFMEMORY;
|
||||
+
|
||||
+ primary->IDirectManipulationPrimaryContent_iface.lpVtbl = &primaryVtbl;
|
||||
+ primary->ref = 1;
|
||||
+
|
||||
+ *object = &primary->IDirectManipulationPrimaryContent_iface;
|
||||
+
|
||||
+ return S_OK;
|
||||
+ }
|
||||
+ else
|
||||
+ FIXME("Unsupported interface %s\n", debugstr_guid(riid));
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
--
|
||||
2.17.1
|
||||
|
@@ -1,166 +0,0 @@
|
||||
From b86977f6822d286b595c756c814c2cc986968050 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Sun, 22 Dec 2019 19:35:25 +1100
|
||||
Subject: [PATCH 1/2] directmanipulation: Support IDirectManipulationContent in
|
||||
IDirectManipulationPrimaryContent interface
|
||||
|
||||
Based of patch by Gijs Vermeulen.
|
||||
---
|
||||
dlls/directmanipulation/directmanipulation.c | 110 ++++++++++++++++++-
|
||||
1 file changed, 109 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/directmanipulation/directmanipulation.c b/dlls/directmanipulation/directmanipulation.c
|
||||
index ca60e76db6e..05601abbd45 100644
|
||||
--- a/dlls/directmanipulation/directmanipulation.c
|
||||
+++ b/dlls/directmanipulation/directmanipulation.c
|
||||
@@ -177,10 +177,10 @@ static HRESULT create_update_manager(IDirectManipulationUpdateManager **obj)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
-
|
||||
struct primarycontext
|
||||
{
|
||||
IDirectManipulationPrimaryContent IDirectManipulationPrimaryContent_iface;
|
||||
+ IDirectManipulationContent IDirectManipulationContent_iface;
|
||||
LONG ref;
|
||||
};
|
||||
|
||||
@@ -189,6 +189,11 @@ static inline struct primarycontext *impl_from_IDirectManipulationPrimaryContent
|
||||
return CONTAINING_RECORD(iface, struct primarycontext, IDirectManipulationPrimaryContent_iface);
|
||||
}
|
||||
|
||||
+static inline struct primarycontext *impl_from_IDirectManipulationContent(IDirectManipulationContent *iface)
|
||||
+{
|
||||
+ return CONTAINING_RECORD(iface, struct primarycontext, IDirectManipulationContent_iface);
|
||||
+}
|
||||
+
|
||||
static HRESULT WINAPI primary_QueryInterface(IDirectManipulationPrimaryContent *iface, REFIID riid, void **ppv)
|
||||
{
|
||||
struct primarycontext *This = impl_from_IDirectManipulationPrimaryContent(iface);
|
||||
@@ -201,6 +206,12 @@ static HRESULT WINAPI primary_QueryInterface(IDirectManipulationPrimaryContent *
|
||||
*ppv = &This->IDirectManipulationPrimaryContent_iface;
|
||||
return S_OK;
|
||||
}
|
||||
+ else if(IsEqualGUID(riid, &IID_IDirectManipulationContent))
|
||||
+ {
|
||||
+ IUnknown_AddRef(iface);
|
||||
+ *ppv = &This->IDirectManipulationContent_iface;
|
||||
+ return S_OK;
|
||||
+ }
|
||||
|
||||
FIXME("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppv);
|
||||
return E_NOINTERFACE;
|
||||
@@ -313,6 +324,102 @@ static const IDirectManipulationPrimaryContentVtbl primaryVtbl =
|
||||
primary_GetCenterPoint
|
||||
};
|
||||
|
||||
+
|
||||
+static HRESULT WINAPI content_QueryInterface(IDirectManipulationContent *iface, REFIID riid, void **ppv)
|
||||
+{
|
||||
+ struct primarycontext *This = impl_from_IDirectManipulationContent(iface);
|
||||
+ TRACE("(%p)->(%s,%p)\n", This, debugstr_guid(riid), ppv);
|
||||
+
|
||||
+ return IDirectManipulationPrimaryContent_QueryInterface(&This->IDirectManipulationPrimaryContent_iface,
|
||||
+ riid, ppv);
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI content_AddRef(IDirectManipulationContent *iface)
|
||||
+{
|
||||
+ struct primarycontext *This = impl_from_IDirectManipulationContent(iface);
|
||||
+ return IDirectManipulationPrimaryContent_AddRef(&This->IDirectManipulationPrimaryContent_iface);
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI content_Release(IDirectManipulationContent *iface)
|
||||
+{
|
||||
+ struct primarycontext *This = impl_from_IDirectManipulationContent(iface);
|
||||
+ return IDirectManipulationPrimaryContent_Release(&This->IDirectManipulationPrimaryContent_iface);
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI content_GetContentRect(IDirectManipulationContent *iface, RECT *size)
|
||||
+{
|
||||
+ struct primarycontext *This = impl_from_IDirectManipulationContent(iface);
|
||||
+ FIXME("%p, %p\n", This, size);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI content_SetContentRect(IDirectManipulationContent *iface, const RECT *size)
|
||||
+{
|
||||
+ struct primarycontext *This = impl_from_IDirectManipulationContent(iface);
|
||||
+ FIXME("%p, %p\n", This, size);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI content_GetViewport(IDirectManipulationContent *iface, REFIID riid, void **object)
|
||||
+{
|
||||
+ struct primarycontext *This = impl_from_IDirectManipulationContent(iface);
|
||||
+ FIXME("%p, %p, %p\n", This, debugstr_guid(riid), object);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI content_GetTag(IDirectManipulationContent *iface, REFIID riid, void **object, UINT32 *id)
|
||||
+{
|
||||
+ struct primarycontext *This = impl_from_IDirectManipulationContent(iface);
|
||||
+ FIXME("%p, %p, %p, %p\n", This, debugstr_guid(riid), object, id);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI content_SetTag(IDirectManipulationContent *iface, IUnknown *object, UINT32 id)
|
||||
+{
|
||||
+ struct primarycontext *This = impl_from_IDirectManipulationContent(iface);
|
||||
+ FIXME("%p, %p, %d\n", This, object, id);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI content_GetOutputTransform(IDirectManipulationContent *iface,
|
||||
+ float *matrix, DWORD count)
|
||||
+{
|
||||
+ struct primarycontext *This = impl_from_IDirectManipulationContent(iface);
|
||||
+ FIXME("%p, %p, %d\n", This, matrix, count);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI content_GetContentTransform(IDirectManipulationContent *iface,
|
||||
+ float *matrix, DWORD count)
|
||||
+{
|
||||
+ struct primarycontext *This = impl_from_IDirectManipulationContent(iface);
|
||||
+ FIXME("%p, %p, %d\n", This, matrix, count);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI content_SyncContentTransform(IDirectManipulationContent *iface,
|
||||
+ const float *matrix, DWORD count)
|
||||
+{
|
||||
+ struct primarycontext *This = impl_from_IDirectManipulationContent(iface);
|
||||
+ FIXME("%p, %p, %d\n", This, matrix, count);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static const IDirectManipulationContentVtbl contentVtbl =
|
||||
+{
|
||||
+ content_QueryInterface,
|
||||
+ content_AddRef,
|
||||
+ content_Release,
|
||||
+ content_GetContentRect,
|
||||
+ content_SetContentRect,
|
||||
+ content_GetViewport,
|
||||
+ content_GetTag,
|
||||
+ content_SetTag,
|
||||
+ content_GetOutputTransform,
|
||||
+ content_GetContentTransform,
|
||||
+ content_SyncContentTransform
|
||||
+};
|
||||
+
|
||||
struct directviewport
|
||||
{
|
||||
IDirectManipulationViewport2 IDirectManipulationViewport2_iface;
|
||||
@@ -473,6 +580,7 @@ static HRESULT WINAPI viewport_GetPrimaryContent(IDirectManipulationViewport2 *i
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
primary->IDirectManipulationPrimaryContent_iface.lpVtbl = &primaryVtbl;
|
||||
+ primary->IDirectManipulationContent_iface.lpVtbl = &contentVtbl;
|
||||
primary->ref = 1;
|
||||
|
||||
*object = &primary->IDirectManipulationPrimaryContent_iface;
|
||||
--
|
||||
2.24.0
|
||||
|
@@ -1,34 +0,0 @@
|
||||
From 8e284d9f96e2f3c623d6f520c530aaadad943fcd Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Sun, 22 Dec 2019 20:54:43 +1100
|
||||
Subject: [PATCH 2/2] directmanipulation: Fake success in some functions
|
||||
|
||||
---
|
||||
dlls/directmanipulation/directmanipulation.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/directmanipulation/directmanipulation.c b/dlls/directmanipulation/directmanipulation.c
|
||||
index 05601abbd45..b42c1f84387 100644
|
||||
--- a/dlls/directmanipulation/directmanipulation.c
|
||||
+++ b/dlls/directmanipulation/directmanipulation.c
|
||||
@@ -357,7 +357,7 @@ static HRESULT WINAPI content_SetContentRect(IDirectManipulationContent *iface,
|
||||
{
|
||||
struct primarycontext *This = impl_from_IDirectManipulationContent(iface);
|
||||
FIXME("%p, %p\n", This, size);
|
||||
- return E_NOTIMPL;
|
||||
+ return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI content_GetViewport(IDirectManipulationContent *iface, REFIID riid, void **object)
|
||||
@@ -540,7 +540,7 @@ static HRESULT WINAPI viewport_SetViewportRect(IDirectManipulationViewport2 *ifa
|
||||
{
|
||||
struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
|
||||
FIXME("%p, %p\n", This, viewport);
|
||||
- return E_NOTIMPL;
|
||||
+ return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI viewport_ZoomToRect(IDirectManipulationViewport2 *iface, const float left,
|
||||
--
|
||||
2.24.0
|
||||
|
@@ -1 +0,0 @@
|
||||
Fixes: [44865] directmanipulation: New DLL.
|
@@ -1,305 +0,0 @@
|
||||
From 32344f3d3cb10c07b4dc2c5547d2226e293f730b Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Tue, 10 Feb 2015 16:34:05 +0100
|
||||
Subject: [PATCH] dxva2: Implement semi-stub for Direct3DDeviceManager9
|
||||
interface.
|
||||
|
||||
---
|
||||
dlls/dxva2/Makefile.in | 2 +
|
||||
dlls/dxva2/devicemanager.c | 213 +++++++++++++++++++++++++++++++++++++
|
||||
dlls/dxva2/dxva2_private.h | 21 ++++
|
||||
dlls/dxva2/main.c | 7 +-
|
||||
4 files changed, 241 insertions(+), 2 deletions(-)
|
||||
create mode 100644 dlls/dxva2/devicemanager.c
|
||||
create mode 100644 dlls/dxva2/dxva2_private.h
|
||||
|
||||
diff --git a/dlls/dxva2/Makefile.in b/dlls/dxva2/Makefile.in
|
||||
index 44e125e9b5..5c3e3842d7 100644
|
||||
--- a/dlls/dxva2/Makefile.in
|
||||
+++ b/dlls/dxva2/Makefile.in
|
||||
@@ -1,6 +1,8 @@
|
||||
MODULE = dxva2.dll
|
||||
+IMPORTS = ole32
|
||||
|
||||
EXTRADLLFLAGS = -mno-cygwin
|
||||
|
||||
C_SRCS = \
|
||||
+ devicemanager.c \
|
||||
main.c
|
||||
diff --git a/dlls/dxva2/devicemanager.c b/dlls/dxva2/devicemanager.c
|
||||
new file mode 100644
|
||||
index 0000000000..bba0fbc619
|
||||
--- /dev/null
|
||||
+++ b/dlls/dxva2/devicemanager.c
|
||||
@@ -0,0 +1,213 @@
|
||||
+/*
|
||||
+ * Copyright 2014 Sebastian Lackner for Pipelight
|
||||
+ *
|
||||
+ * This library is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU Lesser General Public
|
||||
+ * License as published by the Free Software Foundation; either
|
||||
+ * version 2.1 of the License, or (at your option) any later version.
|
||||
+ *
|
||||
+ * This library is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ * Lesser General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU Lesser General Public
|
||||
+ * License along with this library; if not, write to the Free Software
|
||||
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
+ */
|
||||
+
|
||||
+#include <stdarg.h>
|
||||
+#include "windef.h"
|
||||
+#include "winbase.h"
|
||||
+
|
||||
+#include "wine/debug.h"
|
||||
+
|
||||
+#define COBJMACROS
|
||||
+#include "d3d9.h"
|
||||
+#include "dxva2api.h"
|
||||
+#include "dxva2_private.h"
|
||||
+
|
||||
+WINE_DEFAULT_DEBUG_CHANNEL(dxva2);
|
||||
+
|
||||
+typedef struct
|
||||
+{
|
||||
+ IDirect3DDeviceManager9 IDirect3DDeviceManager9_iface;
|
||||
+ LONG refCount;
|
||||
+ UINT token;
|
||||
+ IDirect3DDevice9 *device;
|
||||
+} Direct3DDeviceManager9Impl;
|
||||
+
|
||||
+static inline Direct3DDeviceManager9Impl *impl_from_Direct3DDeviceManager9( IDirect3DDeviceManager9 *iface )
|
||||
+{
|
||||
+ return CONTAINING_RECORD(iface, Direct3DDeviceManager9Impl, IDirect3DDeviceManager9_iface);
|
||||
+}
|
||||
+
|
||||
+/*****************************************************************************
|
||||
+ * IDirect3DDeviceManager9 interface
|
||||
+ */
|
||||
+
|
||||
+static HRESULT WINAPI Direct3DDeviceManager9_QueryInterface( IDirect3DDeviceManager9 *iface, REFIID riid, LPVOID *ppv )
|
||||
+{
|
||||
+ Direct3DDeviceManager9Impl *This = impl_from_Direct3DDeviceManager9(iface);
|
||||
+ TRACE("(%p/%p)->(%s, %p)\n", iface, This, debugstr_guid(riid), ppv);
|
||||
+
|
||||
+ *ppv = NULL;
|
||||
+
|
||||
+ if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IDirect3DDeviceManager9))
|
||||
+ *ppv = &This->IDirect3DDeviceManager9_iface;
|
||||
+
|
||||
+ if (*ppv)
|
||||
+ {
|
||||
+ IUnknown_AddRef((IUnknown *)(*ppv));
|
||||
+ return S_OK;
|
||||
+ }
|
||||
+
|
||||
+ FIXME("No interface for %s\n", debugstr_guid(riid));
|
||||
+ return E_NOINTERFACE;
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI Direct3DDeviceManager9_AddRef( IDirect3DDeviceManager9 *iface )
|
||||
+{
|
||||
+ Direct3DDeviceManager9Impl *This = impl_from_Direct3DDeviceManager9(iface);
|
||||
+ ULONG refCount = InterlockedIncrement(&This->refCount);
|
||||
+
|
||||
+ TRACE("(%p)->() AddRef from %d\n", This, refCount - 1);
|
||||
+
|
||||
+ return refCount;
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI Direct3DDeviceManager9_Release( IDirect3DDeviceManager9 *iface )
|
||||
+{
|
||||
+ Direct3DDeviceManager9Impl *This = impl_from_Direct3DDeviceManager9(iface);
|
||||
+ ULONG refCount = InterlockedDecrement(&This->refCount);
|
||||
+
|
||||
+ TRACE("(%p)->() Release from %d\n", This, refCount + 1);
|
||||
+
|
||||
+ if (!refCount)
|
||||
+ {
|
||||
+ TRACE("Destroying\n");
|
||||
+
|
||||
+ if (This->device)
|
||||
+ IDirect3DDevice9_Release(This->device);
|
||||
+
|
||||
+ CoTaskMemFree(This);
|
||||
+ }
|
||||
+
|
||||
+ return refCount;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI Direct3DDeviceManager9_ResetDevice( IDirect3DDeviceManager9 *iface, IDirect3DDevice9 *pDevice, UINT resetToken )
|
||||
+{
|
||||
+ Direct3DDeviceManager9Impl *This = impl_from_Direct3DDeviceManager9(iface);
|
||||
+
|
||||
+ FIXME("(%p)->(%p, %u): semi-stub\n", This, pDevice, resetToken);
|
||||
+
|
||||
+ if (This->device)
|
||||
+ return E_FAIL;
|
||||
+
|
||||
+ if (resetToken != This->token)
|
||||
+ return E_INVALIDARG;
|
||||
+
|
||||
+ This->device = pDevice;
|
||||
+ IDirect3DDevice9_AddRef(This->device);
|
||||
+
|
||||
+ /* TODO: Reset the device, verify token ... */
|
||||
+
|
||||
+ return S_OK;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI Direct3DDeviceManager9_OpenDeviceHandle( IDirect3DDeviceManager9 *iface, HANDLE *phDevice )
|
||||
+{
|
||||
+ Direct3DDeviceManager9Impl *This = impl_from_Direct3DDeviceManager9(iface);
|
||||
+
|
||||
+ FIXME("(%p)->(%p): semi-stub\n", This, phDevice);
|
||||
+
|
||||
+ *phDevice = (HANDLE)This->device;
|
||||
+ return S_OK;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI Direct3DDeviceManager9_CloseDeviceHandle( IDirect3DDeviceManager9 *iface, HANDLE hDevice )
|
||||
+{
|
||||
+ Direct3DDeviceManager9Impl *This = impl_from_Direct3DDeviceManager9(iface);
|
||||
+
|
||||
+ FIXME("(%p)->(%p): stub\n", This, hDevice);
|
||||
+
|
||||
+ return S_OK;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI Direct3DDeviceManager9_TestDevice( IDirect3DDeviceManager9 *iface, HANDLE hDevice )
|
||||
+{
|
||||
+ Direct3DDeviceManager9Impl *This = impl_from_Direct3DDeviceManager9(iface);
|
||||
+ static int once = 0;
|
||||
+
|
||||
+ if (!once++)
|
||||
+ FIXME("(%p)->(%p): stub\n", This, hDevice);
|
||||
+
|
||||
+ return S_OK;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI Direct3DDeviceManager9_LockDevice( IDirect3DDeviceManager9 *iface, HANDLE hDevice, IDirect3DDevice9 **ppDevice, BOOL fBlock )
|
||||
+{
|
||||
+ Direct3DDeviceManager9Impl *This = impl_from_Direct3DDeviceManager9(iface);
|
||||
+
|
||||
+ FIXME("(%p)->(%p, %p, %d): semi-stub\n", This, hDevice, ppDevice, fBlock);
|
||||
+
|
||||
+ *ppDevice = (IDirect3DDevice9 *)hDevice;
|
||||
+ IDirect3DDevice9_AddRef(*ppDevice);
|
||||
+ return S_OK;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI Direct3DDeviceManager9_UnlockDevice( IDirect3DDeviceManager9 *iface, HANDLE hDevice, BOOL fSaveState )
|
||||
+{
|
||||
+ Direct3DDeviceManager9Impl *This = impl_from_Direct3DDeviceManager9(iface);
|
||||
+
|
||||
+ FIXME("(%p)->(%p, %d): stub\n", This, hDevice, fSaveState);
|
||||
+
|
||||
+ return S_OK;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI Direct3DDeviceManager9_GetVideoService( IDirect3DDeviceManager9 *iface, HANDLE hDevice, REFIID riid, void **ppService )
|
||||
+{
|
||||
+ Direct3DDeviceManager9Impl *This = impl_from_Direct3DDeviceManager9(iface);
|
||||
+
|
||||
+ FIXME("(%p)->(%p, %p, %p): stub\n", This, hDevice, riid, ppService);
|
||||
+
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static const IDirect3DDeviceManager9Vtbl Direct3DDeviceManager9_VTable =
|
||||
+{
|
||||
+ Direct3DDeviceManager9_QueryInterface,
|
||||
+ Direct3DDeviceManager9_AddRef,
|
||||
+ Direct3DDeviceManager9_Release,
|
||||
+ Direct3DDeviceManager9_ResetDevice,
|
||||
+ Direct3DDeviceManager9_OpenDeviceHandle,
|
||||
+ Direct3DDeviceManager9_CloseDeviceHandle,
|
||||
+ Direct3DDeviceManager9_TestDevice,
|
||||
+ Direct3DDeviceManager9_LockDevice,
|
||||
+ Direct3DDeviceManager9_UnlockDevice,
|
||||
+ Direct3DDeviceManager9_GetVideoService
|
||||
+};
|
||||
+
|
||||
+HRESULT devicemanager_create( UINT *resetToken, void **ppv )
|
||||
+{
|
||||
+ Direct3DDeviceManager9Impl *devicemanager;
|
||||
+
|
||||
+ if (!resetToken || !ppv)
|
||||
+ return E_INVALIDARG;
|
||||
+
|
||||
+ *ppv = NULL;
|
||||
+
|
||||
+ devicemanager = CoTaskMemAlloc(sizeof(Direct3DDeviceManager9Impl));
|
||||
+ if (!devicemanager)
|
||||
+ return E_OUTOFMEMORY;
|
||||
+
|
||||
+ devicemanager->IDirect3DDeviceManager9_iface.lpVtbl = &Direct3DDeviceManager9_VTable;
|
||||
+ devicemanager->refCount = 1;
|
||||
+ devicemanager->token = 0xdeadbeef; /* FIXME: provide some better value? */
|
||||
+ devicemanager->device = NULL;
|
||||
+
|
||||
+ *resetToken = devicemanager->token;
|
||||
+ *ppv = devicemanager;
|
||||
+ return S_OK;
|
||||
+}
|
||||
diff --git a/dlls/dxva2/dxva2_private.h b/dlls/dxva2/dxva2_private.h
|
||||
new file mode 100644
|
||||
index 0000000000..d6e59fc6da
|
||||
--- /dev/null
|
||||
+++ b/dlls/dxva2/dxva2_private.h
|
||||
@@ -0,0 +1,21 @@
|
||||
+/*
|
||||
+ * Copyright 2014 Michael Müller for Pipelight
|
||||
+ *
|
||||
+ * This library is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU Lesser General Public
|
||||
+ * License as published by the Free Software Foundation; either
|
||||
+ * version 2.1 of the License, or (at your option) any later version.
|
||||
+ *
|
||||
+ * This library is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ * Lesser General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU Lesser General Public
|
||||
+ * License along with this library; if not, write to the Free Software
|
||||
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
+ */
|
||||
+
|
||||
+#include "dxva2api.h"
|
||||
+
|
||||
+extern HRESULT devicemanager_create( UINT *resetToken, void **ppv ) DECLSPEC_HIDDEN;
|
||||
diff --git a/dlls/dxva2/main.c b/dlls/dxva2/main.c
|
||||
index 782f0dfa3d..df8f203010 100644
|
||||
--- a/dlls/dxva2/main.c
|
||||
+++ b/dlls/dxva2/main.c
|
||||
@@ -19,8 +19,11 @@
|
||||
#include <stdarg.h>
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
+
|
||||
+#define INITGUID
|
||||
#include "d3d9.h"
|
||||
#include "dxva2api.h"
|
||||
+#include "dxva2_private.h"
|
||||
#include "physicalmonitorenumerationapi.h"
|
||||
#include "lowlevelmonitorconfigurationapi.h"
|
||||
#include "highlevelmonitorconfigurationapi.h"
|
||||
@@ -39,9 +42,9 @@ BOOL WINAPI CapabilitiesRequestAndCapabilitiesReply( HMONITOR monitor, LPSTR buf
|
||||
|
||||
HRESULT WINAPI DXVA2CreateDirect3DDeviceManager9( UINT *resetToken, IDirect3DDeviceManager9 **dxvManager )
|
||||
{
|
||||
- FIXME("(%p, %p): stub\n", resetToken, dxvManager);
|
||||
+ TRACE("(%p, %p)\n", resetToken, dxvManager);
|
||||
|
||||
- return E_NOTIMPL;
|
||||
+ return devicemanager_create( resetToken, (void **)dxvManager );
|
||||
}
|
||||
|
||||
HRESULT WINAPI DXVA2CreateVideoService( IDirect3DDevice9 *device, REFIID riid, void **ppv )
|
||||
--
|
||||
2.17.1
|
||||
|
@@ -1,2 +1,4 @@
|
||||
Fixes: Support for MPEG2 DXVA2 GPU video decoding through vaapi
|
||||
Fixes: Support for H264 DXVA2 GPU video decoding through vaapi
|
||||
# In the process of upstreaming...
|
||||
Disabled: true
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user