summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--project/common.mk1
-rw-r--r--project/tree.mk1
-rw-r--r--src/internal/w32lib_impl.h12
-rw-r--r--src/pkey/w32lib_pkey_app_user_model.c50
4 files changed, 64 insertions, 0 deletions
diff --git a/project/common.mk b/project/common.mk
index 2eb5032..9d3d3ca 100644
--- a/project/common.mk
+++ b/project/common.mk
@@ -1,6 +1,7 @@
API_SRCS = \
src/guid/w32lib_guid_clsid.c \
src/guid/w32lib_guid_iid.c \
+ src/pkey/w32lib_pkey_app_user_model.c \
INTERNAL_SRCS = \
diff --git a/project/tree.mk b/project/tree.mk
index 30a553c..7f28349 100644
--- a/project/tree.mk
+++ b/project/tree.mk
@@ -2,4 +2,5 @@ tree.tag:
mkdir -p lib
mkdir -p src
mkdir -p src/guid
+ mkdir -p src/pkey
touch tree.tag
diff --git a/src/internal/w32lib_impl.h b/src/internal/w32lib_impl.h
index 9e5bcec..1033652 100644
--- a/src/internal/w32lib_impl.h
+++ b/src/internal/w32lib_impl.h
@@ -7,6 +7,11 @@ struct w32lib_guid {
unsigned char data4[8];
};
+struct w32lib_pkey {
+ struct w32lib_guid guid;
+ uint32_t propid;
+};
+
#define W32LIB_QUOTE(name) #name
#define W32LIB_HIDDEN_JOIN(prefix,name) __ ## prefix ## _ ## name
@@ -23,3 +28,10 @@ static const struct w32lib_guid hname = {u32,u16a,u16b,{u8a,u8b,u8c,u8d,u8e,u8f,
extern const struct w32lib_guid mname __attribute((weak,alias(W32LIB_QUOTE(hname)))); \
extern const struct w32lib_guid lname __attribute((weak,alias(W32LIB_QUOTE(hname)))); \
/************************************************************************************************/
+
+/************************************************************************************************/
+#define W32LIB_PKEY(hname,mname,lname,u32,u16a,u16b,u8a,u8b,u8c,u8d,u8e,u8f,u8g,u8h,id) \
+static const struct w32lib_pkey hname = {{u32,u16a,u16b,{u8a,u8b,u8c,u8d,u8e,u8f,u8g,u8h}},id}; \
+extern const struct w32lib_pkey mname __attribute((weak,alias(W32LIB_QUOTE(hname)))); \
+extern const struct w32lib_pkey lname __attribute((weak,alias(W32LIB_QUOTE(hname)))); \
+/************************************************************************************************/
diff --git a/src/pkey/w32lib_pkey_app_user_model.c b/src/pkey/w32lib_pkey_app_user_model.c
new file mode 100644
index 0000000..43d9517
--- /dev/null
+++ b/src/pkey/w32lib_pkey_app_user_model.c
@@ -0,0 +1,50 @@
+#include <w32lib/w32lib.h>
+#include "w32lib_impl.h"
+
+/***************************************************************************/
+#define W32LIB_APP_USER_MODEL_PKEY( \
+ mname,lname, \
+ u32,u16a,u16b, \
+ u8a,u8b,u8c,u8d,u8e,u8f,u8g,u8h, \
+ id) \
+ W32LIB_PKEY (W32LIB_HIDDEN_NAME(pkey_app_user_model,mname), \
+ W32LIB_NAMESPACE_NAME(pkey_app_user_model,mname), \
+ W32LIB_LEGACY_NAME(PKEY_AppUserModel,lname), \
+ u32,u16a,u16b, \
+ u8a,u8b,u8c,u8d,u8e,u8f,u8g,u8h, \
+ id) \
+/***************************************************************************/
+
+W32LIB_APP_USER_MODEL_PKEY( \
+ id,ID, \
+ 0x9f4c2855,0x9f79,0x4b39, \
+ 0xa8,0xd0,0xe1,0xd4,0x2d,0xe1,0xd5,0xf3, \
+ 5)
+
+W32LIB_APP_USER_MODEL_PKEY( \
+ prevent_pinning, \
+ PreventPinning, \
+ 0x9f4c2855,0x9f79,0x4b39, \
+ 0xa8,0xd0,0xe1,0xd4,0x2d,0xe1,0xd5,0xf3, \
+ 9)
+
+W32LIB_APP_USER_MODEL_PKEY( \
+ relaunch_command, \
+ RelaunchCommand, \
+ 0x9f4c2855,0x9f79,0x4b39, \
+ 0xa8,0xd0,0xe1,0xd4,0x2d,0xe1,0xd5,0xf3, \
+ 2)
+
+W32LIB_APP_USER_MODEL_PKEY( \
+ relaunch_icon_resource, \
+ RelaunchIconResource, \
+ 0x9f4c2855,0x9f79,0x4b39, \
+ 0xa8,0xd0,0xe1,0xd4,0x2d,0xe1,0xd5,0xf3, \
+ 3)
+
+W32LIB_APP_USER_MODEL_PKEY( \
+ relaunch_display_name_resource, \
+ RelaunchDisplayNameResource, \
+ 0x9f4c2855,0x9f79,0x4b39, \
+ 0xa8,0xd0,0xe1,0xd4,0x2d,0xe1,0xd5,0xf3, \
+ 4)