xref: /reactos/sdk/include/psdk/winapifamily.h (revision 99489553)
1 #ifndef _WINAPIFAMILY_H_
2 #define _WINAPIFAMILY_H_
3 
4 #include <winpackagefamily.h>
5 
6 #define WINAPI_FAMILY_PC_APP      2
7 #define WINAPI_FAMILY_PHONE_APP   3
8 #define WINAPI_FAMILY_SYSTEM      4
9 #define WINAPI_FAMILY_SERVER      5
10 #define WINAPI_FAMILY_GAMES       6
11 #define WINAPI_FAMILY_DESKTOP_APP 100
12 
13 #define WINAPI_FAMILY_APP  WINAPI_FAMILY_PC_APP
14 
15 #ifndef WINAPI_FAMILY
16 #define WINAPI_FAMILY WINAPI_FAMILY_DESKTOP_APP
17 #endif
18 
19 #if WINAPI_FAMILY != WINAPI_FAMILY_DESKTOP_APP &&     \
20     WINAPI_FAMILY != WINAPI_FAMILY_PC_APP &&          \
21     WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP &&       \
22     WINAPI_FAMILY != WINAPI_FAMILY_SYSTEM &&          \
23     WINAPI_FAMILY != WINAPI_FAMILY_GAMES &&           \
24     WINAPI_FAMILY != WINAPI_FAMILY_SERVER
25 #error Unknown WINAPI_FAMILY value?
26 #endif
27 
28 #ifndef WINAPI_PARTITION_DESKTOP
29 #define WINAPI_PARTITION_DESKTOP (WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP)
30 #endif
31 
32 #ifndef WINAPI_PARTITION_APP
33 #define WINAPI_PARTITION_APP                          \
34   (WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP ||      \
35    WINAPI_FAMILY == WINAPI_FAMILY_PC_APP ||           \
36    WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP)
37 #endif
38 
39 #ifndef WINAPI_PARTITION_PC_APP
40 #define WINAPI_PARTITION_PC_APP                       \
41   (WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP ||      \
42    WINAPI_FAMILY == WINAPI_FAMILY_PC_APP)
43 #endif
44 
45 #ifndef WINAPI_PARTITION_PHONE_APP
46 #define WINAPI_PARTITION_PHONE_APP (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP)
47 #endif
48 
49 #ifndef WINAPI_PARTITION_GAMES
50 #define WINAPI_PARTITION_GAMES                        \
51   (WINAPI_FAMILY == WINAPI_FAMILY_GAMES ||            \
52    WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP)
53 #endif
54 
55 #ifndef WINAPI_PARTITION_SYSTEM
56 #define WINAPI_PARTITION_SYSTEM                       \
57   (WINAPI_FAMILY == WINAPI_FAMILY_SYSTEM ||           \
58    WINAPI_FAMILY == WINAPI_FAMILY_SERVER)
59 #endif
60 
61 #define WINAPI_PARTITION_PHONE  WINAPI_PARTITION_PHONE_APP
62 
63 #define WINAPI_FAMILY_PARTITION(Partitions)     (Partitions)
64 
65 #define _WINAPI_DEPRECATED_DECLARATION
66 
67 #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
68 #define APP_DEPRECATED_HRESULT    HRESULT _WINAPI_DEPRECATED_DECLARATION
69 #endif
70 
71 #endif // _WINAPIFAMILY_H_
72