2 * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
18 * @brief \~english This file define primary types to use
20 /** @addtogroup BaseSystem
23 /** @addtogroup native_service
27 /** @addtogroup framework_unified
28 * @ingroup native_service
31 /** @addtogroup framework
32 * @ingroup framework_unified
35 #ifndef __WPF_LEGACY_H__ // NOLINT (build/header_guard)
36 #define __WPF_LEGACY_H__
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.
43 #include <native_service/frameworkunified_types.h>
48 #define INVALID_HANDLE_VALUE ((void*)(-1))
49 #define INFINITE 0xFFFFFFFF
52 typedef unsigned int UINT;
53 typedef unsigned int *PUINT;
56 typedef short SHORT; // NOLINT (readability/nolint)
57 typedef long LONG; // NOLINT (readability/nolint)
58 typedef SHORT *PSHORT;
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)
71 typedef FLOAT *PFLOAT;
80 typedef long *LPLONG; // NOLINT (readability/nolint)
81 typedef DWORD *PDWORD;
82 typedef DWORD *LPDWORD;
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;
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)
105 typedef PDWORD PLCID;
107 typedef long LONGLONG; // NOLINT (readability/nolint)
110 typedef pthread_mutex_t CRITICAL_SECTION;
111 typedef CRITICAL_SECTION *LPCRITICAL_SECTION;
113 #define __readableTo(extent)
114 #define __nullterminated __readableTo(sentinel(0))
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;
123 #define wsprintf swprintf
124 typedef WCHAR *PWCHAR, *LPWCH, *PWCH;
125 typedef LPWSTR PTSTR, LPTSTR;
126 typedef LPCWSTR PCTSTR, LPCTSTR;
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
135 #define DECLARE_HANDLE(name) struct name##__ { int unused; }; typedef struct name##__ *name
137 typedef struct _SYSTEMTIME {
146 } SYSTEMTIME, *PSYSTEMTIME, *LPSYSTEMTIME;
148 #endif /* __WPF_LEGACY_H__ */ // NOLINT (build/header_guard)