mCtrl  0.8.4
value.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2010-2011 Martin Mitas
3  *
4  * This library is free software; you can redistribute it and/or modify it
5  * under the terms of the GNU Lesser General Public License as published by
6  * the Free Software Foundation; either version 2.1 of the License, or
7  * (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public License
15  * along with this library; if not, write to the Free Software Foundation,
16  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17  */
18 
19 #ifndef MCTRL_VALUE_H
20 #define MCTRL_VALUE_H
21 
22 #include <mCtrl/defs.h>
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
28 
136 typedef const void* MC_HVALUETYPE;
137 
142 typedef void* MC_HVALUE;
143 
144 
151 #define MC_VALUETYPEID_UNDEFINED 0
152 
153 #define MC_VALUETYPEID_INT32 1
154 
155 #define MC_VALUETYPEID_UINT32 2
156 
157 #define MC_VALUETYPEID_INT64 3
158 
159 #define MC_VALUETYPEID_UINT64 4
160 
161 #define MC_VALUETYPEID_STRINGW 5
162 
163 #define MC_VALUETYPEID_STRINGA 6
164 
165 #define MC_VALUETYPEID_IMMSTRINGW 7
166 
167 #define MC_VALUETYPEID_IMMSTRINGA 8
168 
169 #define MC_VALUETYPEID_COLORREF 9
170 
171 #define MC_VALUETYPEID_HICON 10
172 
181 MC_HVALUETYPE MCTRL_API mcValueType_GetBuiltin(int id);
182 
183 
188 
195 BOOL MCTRL_API mcValue_CreateFromInt32(MC_HVALUE* phValue, INT iValue);
196 
203 BOOL MCTRL_API mcValue_CreateFromUInt32(MC_HVALUE* phValue, UINT uValue);
204 
211 BOOL MCTRL_API mcValue_CreateFromInt64(MC_HVALUE* phValue, INT64 i64Value);
212 
219 BOOL MCTRL_API mcValue_CreateFromUInt64(MC_HVALUE* phValue, UINT64 u64Value);
220 
227 BOOL MCTRL_API mcValue_CreateFromStringW(MC_HVALUE* phValue, LPCWSTR lpStr);
228 
235 BOOL MCTRL_API mcValue_CreateFromStringA(MC_HVALUE* phValue, LPCSTR lpStr);
236 
243 BOOL MCTRL_API mcValue_CreateFromImmStringW(MC_HVALUE* phValue, LPCWSTR lpStr);
244 
251 BOOL MCTRL_API mcValue_CreateFromImmStringA(MC_HVALUE* phValue, LPCSTR lpStr);
252 
259 BOOL MCTRL_API mcValue_CreateFromColorref(MC_HVALUE* phValue, COLORREF crColor);
260 
267 BOOL MCTRL_API mcValue_CreateFromHIcon(MC_HVALUE* phValue, HICON hIcon);
268 
276 
282 INT MCTRL_API mcValue_GetInt32(const MC_HVALUE hValue);
283 
289 UINT MCTRL_API mcValue_GetUInt32(const MC_HVALUE hValue);
290 
296 INT64 MCTRL_API mcValue_GetInt64(const MC_HVALUE hValue);
297 
303 UINT64 MCTRL_API mcValue_GetUInt64(const MC_HVALUE hValue);
304 
310 LPCWSTR MCTRL_API mcValue_GetStringW(const MC_HVALUE hValue);
311 
317 LPCSTR MCTRL_API mcValue_GetStringA(const MC_HVALUE hValue);
318 
324 LPCWSTR MCTRL_API mcValue_GetImmStringW(const MC_HVALUE hValue);
325 
331 LPCSTR MCTRL_API mcValue_GetImmStringA(const MC_HVALUE hValue);
332 
338 COLORREF MCTRL_API mcValue_GetColorref(const MC_HVALUE hValue);
339 
345 HICON MCTRL_API mcValue_GetHIcon(const MC_HVALUE hValue);
346 
354 
362 BOOL MCTRL_API mcValue_Duplicate(MC_HVALUETYPE hType, MC_HVALUE* phDest, const MC_HVALUE hSrc);
363 
369 void MCTRL_API mcValue_Destroy(MC_HVALUETYPE hType, MC_HVALUE hValue);
370 
378 
380 #define MC_VALUETYPEID_STRING MCTRL_NAME_AW(MC_VALUETYPEID_STRING)
381 
382 #define MC_VALUETYPEID_IMMSTRING MCTRL_NAME_AW(MC_VALUETYPEID_IMMSTRING)
383 
384 #define mcValue_CreateFromString MCTRL_NAME_AW(mcValue_CreateFromString)
385 
386 #define mcValue_CreateFromImmString MCTRL_NAME_AW(mcValue_CreateFromImmString)
387 
388 #define mcValue_GetString MCTRL_NAME_AW(mcValue_GetString)
389 
390 #define mcValue_GetImmString MCTRL_NAME_AW(mcValue_GetImmString)
391 
395 #ifdef __cplusplus
396 } /* extern "C" */
397 #endif
398 
399 #endif /* MCTRL_VALUE_H */