Fixed background redrawing when control is covered. Fixed a really
[wine] / include / sqltypes.h
1 /*
2  * sqltypes.h
3  */
4 #ifndef __SQLTYPES_H
5 #define __SQLTYPES_H
6
7 #ifndef ODBCVER
8 #define ODBCVER 0x0351
9 #endif
10
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14
15 typedef unsigned char   SQLCHAR;
16
17 #if (ODBCVER >= 0x0300)
18 typedef unsigned char   SQLDATE;
19 typedef unsigned char   SQLDECIMAL;
20 typedef double          SQLDOUBLE;
21 typedef double          SQLFLOAT;
22 #endif
23
24 typedef long            SQLINTEGER;
25
26 #if (ODBCVER >= 0x0300)
27 typedef unsigned char   SQLNUMERIC;
28 #endif
29
30 typedef void *          SQLPOINTER;
31
32 #if (ODBCVER >= 0x0300)
33 typedef float           SQLREAL;
34 #endif
35
36 typedef signed short int   SQLSMALLINT;
37 typedef unsigned short  SQLUSMALLINT;
38
39 #if (ODBCVER >= 0x0300)
40 typedef unsigned char   SQLTIME;
41 typedef unsigned char   SQLTIMESTAMP;
42 typedef unsigned char   SQLVARCHAR;
43 #endif
44
45 typedef SQLSMALLINT     SQLRETURN;
46
47 /* typedef void *                       SQLHANDLE; */
48
49 typedef SQLINTEGER              SQLHANDLE;
50 #if (ODBCVER >= 0x0300)
51
52 typedef SQLHANDLE               SQLHENV;
53 typedef SQLHANDLE               SQLHDBC;
54 typedef SQLHANDLE               SQLHSTMT;
55 typedef SQLHANDLE               SQLHDESC;
56
57 #else
58 typedef SQLINTEGER              SQLHENV;
59 typedef SQLINTEGER              SQLHDBC;
60 typedef SQLINTEGER              SQLHSTMT;
61 #endif
62
63 typedef signed char             SCHAR;
64 typedef SCHAR                   SQLSCHAR;
65 typedef long int                SDWORD;
66 typedef signed short int        SWORD;
67 typedef unsigned long int       UDWORD;
68 typedef unsigned short int      UWORD;
69 typedef UDWORD                  SQLUINTEGER;
70 typedef signed long             SLONG;
71 typedef signed short            SSHORT;
72 typedef double                  SDOUBLE;
73 typedef double                          LDOUBLE;
74 typedef float                   SFLOAT;
75 typedef void*                           PTR;
76 typedef signed short            RETCODE;
77 typedef void*                   SQLHWND;
78
79 typedef SQLHANDLE                       HENV;
80 typedef SQLHANDLE                       HDBC;
81 typedef SQLHANDLE                       HSTMT;
82
83 #ifndef __SQLDATE
84 #define __SQLDATE
85 typedef struct tagDATE_STRUCT
86 {
87         SQLSMALLINT    year;
88         SQLUSMALLINT   month;
89         SQLUSMALLINT   day;
90 } DATE_STRUCT;
91
92 #if (ODBCVER >= 0x0300)
93 typedef DATE_STRUCT     SQL_DATE_STRUCT;
94 #endif
95
96 typedef struct tagTIME_STRUCT
97 {
98         SQLUSMALLINT   hour;
99         SQLUSMALLINT   minute;
100         SQLUSMALLINT   second;
101 } TIME_STRUCT;
102
103 #if (ODBCVER >= 0x0300)
104 typedef TIME_STRUCT     SQL_TIME_STRUCT;
105 #endif
106
107 typedef struct tagTIMESTAMP_STRUCT
108 {
109         SQLSMALLINT    year;
110         SQLUSMALLINT   month;
111         SQLUSMALLINT   day;
112         SQLUSMALLINT   hour;
113         SQLUSMALLINT   minute;
114         SQLUSMALLINT   second;
115         SQLUINTEGER    fraction;
116 } TIMESTAMP_STRUCT;
117
118 #if (ODBCVER >= 0x0300)
119 typedef TIMESTAMP_STRUCT        SQL_TIMESTAMP_STRUCT;
120 #endif
121
122
123 #if (ODBCVER >= 0x0300)
124 typedef enum
125 {
126         SQL_IS_YEAR                                             = 1,
127         SQL_IS_MONTH                                    = 2,
128         SQL_IS_DAY                                              = 3,
129         SQL_IS_HOUR                                             = 4,
130         SQL_IS_MINUTE                                   = 5,
131         SQL_IS_SECOND                                   = 6,
132         SQL_IS_YEAR_TO_MONTH                    = 7,
133         SQL_IS_DAY_TO_HOUR                              = 8,
134         SQL_IS_DAY_TO_MINUTE                    = 9,
135         SQL_IS_DAY_TO_SECOND                    = 10,
136         SQL_IS_HOUR_TO_MINUTE                   = 11,
137         SQL_IS_HOUR_TO_SECOND                   = 12,
138         SQL_IS_MINUTE_TO_SECOND                 = 13
139 } SQLINTERVAL;
140
141 #endif
142
143 #if (ODBCVER >= 0x0300)
144 typedef struct tagSQL_YEAR_MONTH
145 {
146                 SQLUINTEGER             year;
147                 SQLUINTEGER             month;
148 } SQL_YEAR_MONTH_STRUCT;
149
150 typedef struct tagSQL_DAY_SECOND
151 {
152                 SQLUINTEGER             day;
153                 SQLUINTEGER             hour;
154                 SQLUINTEGER             minute;
155                 SQLUINTEGER             second;
156                 SQLUINTEGER             fraction;
157 } SQL_DAY_SECOND_STRUCT;
158
159 typedef struct tagSQL_INTERVAL_STRUCT
160 {
161         SQLINTERVAL             interval_type;
162         SQLSMALLINT             interval_sign;
163         union {
164                 SQL_YEAR_MONTH_STRUCT           year_month;
165                 SQL_DAY_SECOND_STRUCT           day_second;
166         } intval;
167
168 } SQL_INTERVAL_STRUCT;
169
170 #endif
171
172 #endif
173
174 #if (ODBCVER >= 0x0300)
175 #define ODBCINT64       long
176 #ifdef ODBCINT64
177 typedef ODBCINT64       SQLBIGINT;
178 typedef unsigned ODBCINT64      SQLUBIGINT;
179 #endif
180 #endif
181
182 #if (ODBCVER >= 0x0300)
183 #define SQL_MAX_NUMERIC_LEN             16
184 typedef struct tagSQL_NUMERIC_STRUCT
185 {
186         SQLCHAR         precision;
187         SQLSCHAR        scale;
188         SQLCHAR         sign;   /* 1=pos 0=neg */
189         SQLCHAR         val[SQL_MAX_NUMERIC_LEN];
190 } SQL_NUMERIC_STRUCT;
191 #endif
192
193 #if (ODBCVER >= 0x0350)
194 #ifdef GUID_DEFINED
195 typedef GUID    SQLGUID;
196 #else
197 typedef struct  tagSQLGUID
198 {
199     DWORD Data1;
200     WORD Data2;
201     WORD Data3;
202     BYTE Data4[ 8 ];
203 } SQLGUID;
204 #endif
205 #endif
206
207
208 typedef unsigned long int       BOOKMARK;
209
210 #define SQL_WCHAR             (-8)
211 #define SQL_C_WCHAR            SQL_WCHAR
212
213 #ifdef __cplusplus
214 }
215 #endif
216
217 #endif