mCtrl  0.9.0
value.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2010-2013 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 
112 typedef const void* MC_HVALUETYPE;
113 
118 typedef void* MC_HVALUE;
119 
120 
127 
128 #define MC_VALUETYPEID_UNDEFINED 0
129 
130 #define MC_VALUETYPEID_INT32 1
131 
132 #define MC_VALUETYPEID_UINT32 2
133 
134 #define MC_VALUETYPEID_INT64 3
135 
136 #define MC_VALUETYPEID_UINT64 4
137 
138 #define MC_VALUETYPEID_STRINGW 5
139 
140 #define MC_VALUETYPEID_STRINGA 6
141 
142 #define MC_VALUETYPEID_IMMSTRINGW 7
143 
144 #define MC_VALUETYPEID_IMMSTRINGA 8
145 
146 #define MC_VALUETYPEID_COLOR 9
147 
148 #define MC_VALUETYPEID_ICON 10
149 
157 
164 MC_HVALUETYPE MCTRL_API mcValueType_GetBuiltin(int id);
165 
173 
179 MC_HVALUETYPE MCTRL_API mcValue_Type(const MC_HVALUE hValue);
180 
186 MC_HVALUE MCTRL_API mcValue_Duplicate(const MC_HVALUE hValue);
187 
192 void MCTRL_API mcValue_Destroy(MC_HVALUE hValue);
193 
201 
207 MC_HVALUE MCTRL_API mcValue_CreateInt32(INT iValue);
208 
217 INT MCTRL_API mcValue_GetInt32(const MC_HVALUE hValue);
218 
226 
232 MC_HVALUE MCTRL_API mcValue_CreateUInt32(UINT uValue);
233 
242 UINT MCTRL_API mcValue_GetUInt32(const MC_HVALUE hValue);
243 
251 
257 MC_HVALUE MCTRL_API mcValue_CreateInt64(INT iValue);
258 
267 INT MCTRL_API mcValue_GetInt64(const MC_HVALUE hValue);
268 
276 
282 MC_HVALUE MCTRL_API mcValue_CreateUInt64(UINT uValue);
283 
292 UINT MCTRL_API mcValue_GetUInt64(const MC_HVALUE hValue);
293 
301 
307 MC_HVALUE MCTRL_API mcValue_CreateStringW(const WCHAR* lpszStr);
308 
314 const WCHAR* MCTRL_API mcValue_GetStringW(const MC_HVALUE hValue);
315 
323 
329 MC_HVALUE MCTRL_API mcValue_CreateStringA(const char* lpszStr);
330 
336 const char* MCTRL_API mcValue_GetStringA(const MC_HVALUE hValue);
337 
345 
351 MC_HVALUE MCTRL_API mcValue_CreateImmStringW(const WCHAR* lpszStr);
352 
358 const WCHAR* MCTRL_API mcValue_GetImmStringW(const MC_HVALUE hValue);
359 
367 
373 MC_HVALUE MCTRL_API mcValue_CreateImmStringA(const char* lpszStr);
374 
380 const char* MCTRL_API mcValue_GetImmStringA(const MC_HVALUE hValue);
381 
389 
395 MC_HVALUE MCTRL_API mcValue_CreateColor(COLORREF color);
396 
402 COLORREF MCTRL_API mcValue_GetColor(const MC_HVALUE hValue);
403 
411 
417 MC_HVALUE MCTRL_API mcValue_CreateIcon(HICON hIcon);
418 
424 HICON MCTRL_API mcValue_GetIcon(const MC_HVALUE hValue);
425 
434 
436 #define MC_VALUETYPEID_STRING MCTRL_NAME_AW(MC_VALUETYPEID_STRING)
437 
438 #define MC_VALUETYPEID_IMMSTRING MCTRL_NAME_AW(MC_VALUETYPEID_IMMSTRING)
439 
440 #define mcValue_CreateString MCTRL_NAME_AW(mcValue_CreateString)
441 
442 #define mcValue_GetString MCTRL_NAME_AW(mcValue_GetString)
443 
444 #define mcValue_CreateImmString MCTRL_NAME_AW(mcValue_CreateImmString)
445 
446 #define mcValue_GetImmString MCTRL_NAME_AW(mcValue_GetImmString)
447 
451 #ifdef __cplusplus
452 } /* extern "C" */
453 #endif
454 
455 #endif /* MCTRL_VALUE_H */