Init basesystem source codes.
[staging/basesystem.git] / nsframework / framework_unified / client / include / native_service / wpf_legacy.h
1 /*
2  * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 /**
17  * @file
18  * @brief \~english This file define primary types to use
19  */
20 /** @addtogroup BaseSystem
21  *  @{
22  */
23 /** @addtogroup native_service
24  *  @ingroup BaseSystem
25  *  @{
26  */
27 /** @addtogroup framework_unified
28  *  @ingroup native_service
29  *  @{
30  */
31 /** @addtogroup framework
32  *  @ingroup framework_unified
33  *  @{
34  */
35 #ifndef __WPF_LEGACY_H__  // NOLINT  (build/header_guard)
36 #define __WPF_LEGACY_H__
37
38 // these are legacy definitions.
39 // these were defined at Windows_Def.h ... in the past.
40 // if you make new code , you should not use these.
41 // you should use definitions in frameworkunified_types.h.
42
43 #include <native_service/frameworkunified_types.h>
44
45
46 // Windows_Def.h
47 #define CALLBACK
48 #define INVALID_HANDLE_VALUE  ((void*)(-1))
49 #define INFINITE        0xFFFFFFFF
50
51 typedef int         INT;
52 typedef unsigned int    UINT;
53 typedef unsigned int    *PUINT;
54 #define VOID        void
55 typedef char        CHAR;
56 typedef short       SHORT;  // NOLINT  (readability/nolint)
57 typedef long        LONG;  // NOLINT  (readability/nolint)
58 typedef SHORT       *PSHORT;
59 typedef LONG        *PLONG;
60 typedef unsigned long   ULONG;  // NOLINT  (readability/nolint)
61 typedef ULONG       *PULONG;
62 typedef unsigned short    USHORT;  // NOLINT  (readability/nolint)
63 typedef USHORT        *PUSHORT;
64 typedef unsigned char   UCHAR;
65 typedef UCHAR       *PUCHAR;
66 typedef unsigned long       DWORD;  // NOLINT  (readability/nolint)
67 // defined in kernelmoduleevklibdd.h typedef int                 BOOL;
68 typedef unsigned char       BYTE;
69 typedef unsigned short      WORD;  // NOLINT  (readability/nolint)
70 typedef float               FLOAT;
71 typedef FLOAT               *PFLOAT;
72 typedef BOOL        *PBOOL;
73 typedef BOOL        *LPBOOL;
74 typedef BYTE        *PBYTE;
75 typedef BYTE        *LPBYTE;
76 typedef int         *PINT;
77 typedef int         *LPINT;
78 typedef WORD        *PWORD;
79 typedef WORD        *LPWORD;
80 typedef long        *LPLONG;  // NOLINT  (readability/nolint)
81 typedef DWORD       *PDWORD;
82 typedef DWORD       *LPDWORD;
83 typedef void        *PVOID;
84 typedef void        *LPVOID;
85 typedef const void      *LPCVOID;
86 typedef wchar_t       WCHAR;
87 typedef size_t        SIZE_T;
88 typedef DWORD   COLORREF;
89 typedef DWORD   *LPCOLORREF;
90 typedef CHAR *PCHAR, *LPCH, *PCH;
91 typedef CONST CHAR *LPCCH, *PCCH;
92 typedef CHAR *NPSTR, *LPSTR, *PSTR;
93 typedef PSTR *PZPSTR;
94 typedef CONST PSTR *PCZPSTR;
95 typedef CONST CHAR *LPCSTR, *PCSTR;
96 typedef PCSTR *PZPCSTR;
97 typedef void *HGDIOBJ;
98 typedef int INT_PTR, *PINT_PTR;
99 typedef unsigned int UINT_PTR, *PUINT_PTR;
100 typedef long LONG_PTR, *PLONG_PTR;  // NOLINT  (readability/nolint)
101 typedef unsigned long ULONG_PTR, *PULONG_PTR;  // NOLINT  (readability/nolint)
102 typedef unsigned long ULONGLONG;  // NOLINT  (readability/nolint)
103 typedef char CCHAR;
104 typedef DWORD LCID;
105 typedef PDWORD PLCID;
106 typedef WORD   LANGID;
107 typedef long LONGLONG;  // NOLINT  (readability/nolint)
108 typedef WORD                ATOM;
109
110 typedef pthread_mutex_t   CRITICAL_SECTION;
111 typedef CRITICAL_SECTION *LPCRITICAL_SECTION;
112
113 #define __readableTo(extent)
114 #define __nullterminated __readableTo(sentinel(0))
115
116 typedef __nullterminated WCHAR *NWPSTR, *LPWSTR, *PWSTR;
117 typedef __nullterminated PWSTR *PZPWSTR;
118 typedef __nullterminated CONST PWSTR *PCZPWSTR;
119 typedef __nullterminated CONST WCHAR *LPCWSTR, *PCWSTR;
120 typedef __nullterminated PCWSTR *PZPCWSTR;
121
122 #ifdef  UNICODE
123 #define wsprintf    swprintf
124 typedef WCHAR *PWCHAR, *LPWCH, *PWCH;
125 typedef LPWSTR PTSTR, LPTSTR;
126 typedef LPCWSTR PCTSTR, LPCTSTR;
127 #else /* UNICODE */
128 #define wsprintf    sprintf
129 typedef LPSTR PTSTR, LPTSTR, PUTSTR, LPUTSTR;
130 typedef LPCSTR PCTSTR, LPCTSTR, PCUTSTR, LPCUTSTR;
131 typedef WCHAR *LPWCH;
132 typedef WCHAR *PWCHAR;  // 110509 chg
133 #endif  /* UNICODE */
134
135 #define DECLARE_HANDLE(name) struct name##__ { int unused; }; typedef struct name##__ *name
136
137 typedef struct _SYSTEMTIME {
138   WORD wYear;
139   WORD wMonth;
140   WORD wDayOfWeek;
141   WORD wDay;
142   WORD wHour;
143   WORD wMinute;
144   WORD wSecond;
145   WORD wMilliseconds;
146 } SYSTEMTIME, *PSYSTEMTIME, *LPSYSTEMTIME;
147
148 #endif /* __WPF_LEGACY_H__ */   // NOLINT  (build/header_guard)
149 /** @}*/
150 /** @}*/
151 /** @}*/
152 /** @}*/