Needed for Minecraft Legends.
-- v4: apisetschema: Add api-ms-win-core-psm-appnotify-l1-1-0. twinapi.appcore: Add UnregisterAppStateChangeNotification stub. twinapi.appcore: Add RegisterAppStateChangeNotification stub. twinapi.appcore: Add stub DLL. include: Add appnotify.h file.
From: Mohamad Al-Jaf mohamadaljaf@gmail.com
--- include/Makefile.in | 1 + include/appnotify.h | 49 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 include/appnotify.h
diff --git a/include/Makefile.in b/include/Makefile.in index 7a6e5d62763..c957fed884c 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -19,6 +19,7 @@ SOURCES = \ appcompatapi.h \ appmgmt.h \ appmodel.h \ + appnotify.h \ asferr.h \ asptlb.idl \ asyncinfo.idl \ diff --git a/include/appnotify.h b/include/appnotify.h new file mode 100644 index 00000000000..882b0342afb --- /dev/null +++ b/include/appnotify.h @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2023 Mohamad Al-Jaf + * + * 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 + */ + +#ifndef _WINE_APISET_PSMAPPNOTIFY_H_ +#define _WINE_APISET_PSMAPPNOTIFY_H_ + +#include <windows.h> + +#ifdef _CONTRACT_GEN +#define PSM_APP_API_HOST +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +#if defined(PSM_APP_API_HOST) +#define APICONTRACT +#else +#define APICONTRACT DECLSPEC_IMPORT +#endif + +typedef void (__cdecl *PAPPSTATE_CHANGE_ROUTINE)(BOOLEAN quiesced, void *context); + +typedef struct _APPSTATE_REGISTRATION *PAPPSTATE_REGISTRATION; + +APICONTRACT ULONG NTAPI RegisterAppStateChangeNotification(PAPPSTATE_CHANGE_ROUTINE,void *,PAPPSTATE_REGISTRATION *); +APICONTRACT void NTAPI UnregisterAppStateChangeNotification(PAPPSTATE_REGISTRATION); + +#ifdef __cplusplus +} +#endif + +#endif /* _WINE_APISET_PSMAPPNOTIFY_H_ */
From: Mohamad Al-Jaf mohamadaljaf@gmail.com
--- configure.ac | 1 + dlls/twinapi.appcore/Makefile.in | 1 + dlls/twinapi.appcore/twinapi.appcore.spec | 127 ++++++++++++++++++++++ 3 files changed, 129 insertions(+) create mode 100644 dlls/twinapi.appcore/Makefile.in create mode 100644 dlls/twinapi.appcore/twinapi.appcore.spec
diff --git a/configure.ac b/configure.ac index fde3f29c770..479bf5d06af 100644 --- a/configure.ac +++ b/configure.ac @@ -3038,6 +3038,7 @@ WINE_CONFIG_MAKEFILE(dlls/traffic) WINE_CONFIG_MAKEFILE(dlls/twain.dll16,enable_win16) WINE_CONFIG_MAKEFILE(dlls/twain_32) WINE_CONFIG_MAKEFILE(dlls/twain_32/tests) +WINE_CONFIG_MAKEFILE(dlls/twinapi.appcore) WINE_CONFIG_MAKEFILE(dlls/typelib.dll16,enable_win16) WINE_CONFIG_MAKEFILE(dlls/tzres) WINE_CONFIG_MAKEFILE(dlls/ucrtbase) diff --git a/dlls/twinapi.appcore/Makefile.in b/dlls/twinapi.appcore/Makefile.in new file mode 100644 index 00000000000..b6e31708d9d --- /dev/null +++ b/dlls/twinapi.appcore/Makefile.in @@ -0,0 +1 @@ +MODULE = twinapi.appcore.dll diff --git a/dlls/twinapi.appcore/twinapi.appcore.spec b/dlls/twinapi.appcore/twinapi.appcore.spec new file mode 100644 index 00000000000..cda1c38103f --- /dev/null +++ b/dlls/twinapi.appcore/twinapi.appcore.spec @@ -0,0 +1,127 @@ +@ stub ValidateSystemShutdown +@ stub BiActivateWorkItemForUser +@ stub BiChangeApplicationStateForPackageName +@ stub BiChangeApplicationStateForPackageNameForUser +@ stub BiChangeApplicationStateForPsmKey +@ stub BiChangeApplicationStateForPsmKeyForUser +@ stub BiChangeSessionState +@ stub BiChangeUserState +@ stub BiEnumerateWorkItemsForPackageNameAndUser +@ stub BiGetActiveBackgroundTasksEvent +@ stub BiGetActiveBackgroundTasksEventForUser +@ stub BiGetCancellationTimeoutInMs +@ stub BiIsApplicationTerminateSensitive +@ stub BiIsApplicationTerminateSensitiveForUser +@ stub BiNotifyNewSession +@ stub BiNotifyNewSessionComplete +@ stub BiNotifyNewUser +@ stub BiPlmFreeMemory +@ stub BiPtActivateDeferredWorkItem +@ stub BiPtActivateInBackground +@ stub BiPtActivateInBackgroundEx +@ stub BiPtActivateWorkItem +@ stub BiPtAssociateActivationProxy +@ stub BiPtAssociateApplicationEntryPoint +@ stub BiPtAssociateApplicationExtensionClass +@ stub BiPtCancelWorkItem +@ stub BiPtCancelWorkItemEx +@ stub BiPtCreateEvent +@ stub BiPtCreateEventForApp +@ stub BiPtCreateEventForPackageName +@ stub BiPtDeleteEvent +@ stub BiPtDisableWorkItem +@ stub BiPtDisassociateWorkItem +@ stub BiPtDisassociateWorkItemEx +@ stub BiPtEnableWorkItem +@ stub BiPtEnumerateBrokeredEvents +@ stub BiPtEnumerateBrokeredEventsEx +@ stub BiPtEnumerateWorkItemsForPackageName +@ stub BiPtEnumerateWorkItemsForPackageNameEx +@ stub BiPtFreeMemory +@ stub BiPtGetStatusStateNameFromBrokerEventId +@ stub BiPtQueryBrokerEventId +@ stub BiPtQueryBrokeredEvent +@ stub BiPtQuerySystemStateBroadcastChannels +@ stub BiPtQueryWorkItem +@ stub BiPtQueryWorkItemEx +@ stub BiPtQueryWorkItemStatusStateName +@ stub BiPtSignalEvent +@ stub BiPtSignalEventEx +@ stub BiPtSignalMultipleEvents +@ stub BiPtSignalTriggerEvent +@ stub BiPtSignalTriggerEventEx +@ stub BiQueryWorkItemForUser +@ stub BiResetActiveSessionForPackage +@ stub BiResetActiveUserForPackage +@ stub BiSetActiveSessionForPackage +@ stub BiSetActiveUserForPackage +@ stub BiTerminateApplicationHost +@ stub BiTerminateApplicationHost2 +@ stub BiTerminateApplicationHostForUser +@ stub BiUpdateBackgroundAccessApplicationsForUser +@ stub BiUpdateLockScreenApplications +@ stdcall -private DllCanUnloadNow() +@ stub DllGetActivationFactory +@ stub DllGetClassObject +@ stub PsmApplyTaskCompletion +@ stub PsmBlockAppStateChangeCompletion +@ stub PsmDisconnect +@ stub PsmGetSessionInfo +@ stub PsmInitializeExtension +@ stub PsmIsProcessInApplication +@ stub PsmIsProcessInApplication2 +@ stub PsmQueryApplicationInformation +@ stub PsmQueryApplicationInformation2 +@ stub PsmQueryApplicationInterferenceCount +@ stub PsmQueryApplicationInterferenceCount2 +@ stub PsmQueryApplicationList +@ stub PsmQueryApplicationList2 +@ stub PsmQueryApplicationProperties +@ stub PsmQueryApplicationProperties2 +@ stub PsmQueryApplicationProperties3 +@ stub PsmQueryApplicationPropertiesByUser +@ stub PsmQueryApplicationResourceUsage +@ stub PsmQueryApplicationResourceUsage2 +@ stub PsmQueryApplicationResourceUsageForTimer +@ stub PsmQueryCurrentAppState +@ stub PsmQueryMaxMemoryUsage +@ stub PsmQueryMaxMemoryUsage2 +@ stub PsmQueryMemoryUsage +@ stub PsmQueryMemoryUsage2 +@ stub PsmQueryMemoryUsageByUser +@ stub PsmQueryProcessList +@ stub PsmQueryProcessList2 +@ stub PsmQuerySharedCommitByUser +@ stub PsmQueryTaskCompletionInformation +@ stub PsmQueryTaskCompletionInformation2 +@ stub PsmRegisterAppPriorityNotification +@ stub PsmRegisterAppStateChangeNotification +@ stub PsmRegisterApplicationNotification +@ stub PsmRegisterApplicationNotification2 +@ stub PsmRegisterDynamicProcess +@ stub PsmRegisterKeyNotification +@ stub PsmRegisterManagerType +@ stub PsmResetMaxMemoryUsage +@ stub PsmResetMaxMemoryUsage2 +@ stub PsmResetMaxMemoryUsageByUser +@ stub PsmSetApplicationPriority +@ stub PsmSetApplicationPriority2 +@ stub PsmSetApplicationProperties +@ stub PsmSetApplicationProperties2 +@ stub PsmSetApplicationProperties3 +@ stub PsmSetApplicationPropertiesByUser +@ stub PsmSetApplicationState +@ stub PsmSetApplicationState2 +@ stub PsmShutdownApplication +@ stub PsmTimerCleanup +@ stub PsmTimerElapsedResourceTimeGet +@ stub PsmTimerInitialize +@ stub PsmTimerRemainingResourceTimeGet +@ stub PsmTimerStart +@ stub PsmUnblockAppStateChangeCompletion +@ stub PsmUnregisterAppStateChangeNotification +@ stub PsmWaitForAppResume +@ stub RegisterAppConstrainedChangeNotification +@ stub RegisterAppStateChangeNotification +@ stub UnregisterAppConstrainedChangeNotification +@ stub UnregisterAppStateChangeNotification
From: Mohamad Al-Jaf mohamadaljaf@gmail.com
Needed for Minecraft Legends. --- dlls/twinapi.appcore/Makefile.in | 4 +++ dlls/twinapi.appcore/main.c | 31 +++++++++++++++++++++++ dlls/twinapi.appcore/twinapi.appcore.spec | 2 +- 3 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 dlls/twinapi.appcore/main.c
diff --git a/dlls/twinapi.appcore/Makefile.in b/dlls/twinapi.appcore/Makefile.in index b6e31708d9d..a0095988f7f 100644 --- a/dlls/twinapi.appcore/Makefile.in +++ b/dlls/twinapi.appcore/Makefile.in @@ -1 +1,5 @@ +EXTRADEFS = -D_CONTRACT_GEN MODULE = twinapi.appcore.dll + +C_SRCS = \ + main.c diff --git a/dlls/twinapi.appcore/main.c b/dlls/twinapi.appcore/main.c new file mode 100644 index 00000000000..dcaee58c5ef --- /dev/null +++ b/dlls/twinapi.appcore/main.c @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2023 Mohamad Al-Jaf + * + * 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 "appnotify.h" +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(twinapi); + +/*********************************************************************** + * RegisterAppStateChangeNotification (twinapi.appcore.@) + */ +ULONG WINAPI RegisterAppStateChangeNotification( PAPPSTATE_CHANGE_ROUTINE routine, void *context, PAPPSTATE_REGISTRATION *reg ) +{ + FIXME( "routine %p, context %p, reg %p - stub.\n", routine, context, reg ); + return ERROR_CALL_NOT_IMPLEMENTED; +} diff --git a/dlls/twinapi.appcore/twinapi.appcore.spec b/dlls/twinapi.appcore/twinapi.appcore.spec index cda1c38103f..9052c4e7cf5 100644 --- a/dlls/twinapi.appcore/twinapi.appcore.spec +++ b/dlls/twinapi.appcore/twinapi.appcore.spec @@ -122,6 +122,6 @@ @ stub PsmUnregisterAppStateChangeNotification @ stub PsmWaitForAppResume @ stub RegisterAppConstrainedChangeNotification -@ stub RegisterAppStateChangeNotification +@ stdcall RegisterAppStateChangeNotification(ptr ptr ptr) @ stub UnregisterAppConstrainedChangeNotification @ stub UnregisterAppStateChangeNotification
From: Mohamad Al-Jaf mohamadaljaf@gmail.com
--- dlls/twinapi.appcore/main.c | 8 ++++++++ dlls/twinapi.appcore/twinapi.appcore.spec | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/dlls/twinapi.appcore/main.c b/dlls/twinapi.appcore/main.c index dcaee58c5ef..99e413f8946 100644 --- a/dlls/twinapi.appcore/main.c +++ b/dlls/twinapi.appcore/main.c @@ -29,3 +29,11 @@ ULONG WINAPI RegisterAppStateChangeNotification( PAPPSTATE_CHANGE_ROUTINE routin FIXME( "routine %p, context %p, reg %p - stub.\n", routine, context, reg ); return ERROR_CALL_NOT_IMPLEMENTED; } + +/*********************************************************************** + * UnregisterAppStateChangeNotification (twinapi.appcore.@) + */ +void WINAPI UnregisterAppStateChangeNotification( PAPPSTATE_REGISTRATION reg ) +{ + FIXME( "reg %p - stub.\n", reg ); +} diff --git a/dlls/twinapi.appcore/twinapi.appcore.spec b/dlls/twinapi.appcore/twinapi.appcore.spec index 9052c4e7cf5..0b2d8d2055e 100644 --- a/dlls/twinapi.appcore/twinapi.appcore.spec +++ b/dlls/twinapi.appcore/twinapi.appcore.spec @@ -124,4 +124,4 @@ @ stub RegisterAppConstrainedChangeNotification @ stdcall RegisterAppStateChangeNotification(ptr ptr ptr) @ stub UnregisterAppConstrainedChangeNotification -@ stub UnregisterAppStateChangeNotification +@ stdcall UnregisterAppStateChangeNotification(ptr)
From: Mohamad Al-Jaf mohamadaljaf@gmail.com
Needed for Minecraft Legends. --- dlls/apisetschema/apisetschema.spec | 1 + 1 file changed, 1 insertion(+)
diff --git a/dlls/apisetschema/apisetschema.spec b/dlls/apisetschema/apisetschema.spec index 981b80c6976..122cd1209ba 100644 --- a/dlls/apisetschema/apisetschema.spec +++ b/dlls/apisetschema/apisetschema.spec @@ -99,6 +99,7 @@ apiset api-ms-win-core-psapi-ansi-l1-1-0 = kernelbase.dll apiset api-ms-win-core-psapi-l1-1-0 = kernelbase.dll apiset api-ms-win-core-psapi-obsolete-l1-1-0 = kernelbase.dll apiset api-ms-win-core-psapiansi-l1-1-0 = kernelbase.dll +apiset api-ms-win-core-psm-appnotify-l1-1-0 = twinapi.appcore.dll apiset api-ms-win-core-psm-key-l1-1-1 = kernelbase.dll apiset api-ms-win-core-quirks-l1-1-0 = kernelbase.dll apiset api-ms-win-core-realtime-l1-1-0 = kernelbase.dll
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=132168
Your paranoid android.
=== debian11 (32 bit report) ===
user32: win.c:10983: Test failed: GetForegroundWindow() = 00210148
This merge request was approved by Rémi Bernon.