mCtrl  0.9.8
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 #include <mCtrl/_common.h>
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
29 
113 typedef const void* MC_HVALUETYPE;
114 
119 typedef void* MC_HVALUE;
120 
121 
128 
129 #define MC_VALUETYPEID_UNDEFINED 0
130 
131 #define MC_VALUETYPEID_INT32 1
132 
133 #define MC_VALUETYPEID_UINT32 2
134 
135 #define MC_VALUETYPEID_INT64 3
136 
137 #define MC_VALUETYPEID_UINT64 4
138 
139 #define MC_VALUETYPEID_STRINGW 5
140 
141 #define MC_VALUETYPEID_STRINGA 6
142 
143 #define MC_VALUETYPEID_IMMSTRINGW 7
144 
145 #define MC_VALUETYPEID_IMMSTRINGA 8
146 
147 #define MC_VALUETYPEID_COLOR 9
148 
149 #define MC_VALUETYPEID_ICON 10
150 
158 
165 MC_HVALUETYPE MCTRL_API mcValueType_GetBuiltin(int id);
166 
174 
180 MC_HVALUETYPE MCTRL_API mcValue_Type(const MC_HVALUE hValue);
181 
187 MC_HVALUE MCTRL_API mcValue_Duplicate(const MC_HVALUE hValue);
188 
193 void MCTRL_API mcValue_Destroy(MC_HVALUE hValue);
194 
202 
208 MC_HVALUE MCTRL_API mcValue_CreateInt32(INT iValue);
209 
218 INT MCTRL_API mcValue_GetInt32(const MC_HVALUE hValue);
219 
227 
233 MC_HVALUE MCTRL_API mcValue_CreateUInt32(UINT uValue);
234 
243 UINT MCTRL_API mcValue_GetUInt32(const MC_HVALUE hValue);
244 
252 
258 MC_HVALUE MCTRL_API mcValue_CreateInt64(INT iValue);
259 
268 INT MCTRL_API mcValue_GetInt64(const MC_HVALUE hValue);
269 
277 
283 MC_HVALUE MCTRL_API mcValue_CreateUInt64(UINT uValue);
284 
293 UINT MCTRL_API mcValue_GetUInt64(const MC_HVALUE hValue);
294 
302 
308 MC_HVALUE MCTRL_API mcValue_CreateStringW(const WCHAR* lpszStr);
309 
315 const WCHAR* MCTRL_API mcValue_GetStringW(const MC_HVALUE hValue);
316 
324 
330 MC_HVALUE MCTRL_API mcValue_CreateStringA(const char* lpszStr);
331 
337 const char* MCTRL_API mcValue_GetStringA(const MC_HVALUE hValue);
338 
346 
352 MC_HVALUE MCTRL_API mcValue_CreateImmStringW(const WCHAR* lpszStr);
353 
359 const WCHAR* MCTRL_API mcValue_GetImmStringW(const MC_HVALUE hValue);
360 
368 
374 MC_HVALUE MCTRL_API mcValue_CreateImmStringA(const char* lpszStr);
375 
381 const char* MCTRL_API mcValue_GetImmStringA(const MC_HVALUE hValue);
382 
390 
396 MC_HVALUE MCTRL_API mcValue_CreateColor(COLORREF color);
397 
403 COLORREF MCTRL_API mcValue_GetColor(const MC_HVALUE hValue);
404 
412 
418 MC_HVALUE MCTRL_API mcValue_CreateIcon(HICON hIcon);
419 
425 HICON MCTRL_API mcValue_GetIcon(const MC_HVALUE hValue);
426 
435 
437 #define MC_VALUETYPEID_STRING MCTRL_NAME_AW(MC_VALUETYPEID_STRING)
438 
439 #define MC_VALUETYPEID_IMMSTRING MCTRL_NAME_AW(MC_VALUETYPEID_IMMSTRING)
440 
441 #define mcValue_CreateString MCTRL_NAME_AW(mcValue_CreateString)
442 
443 #define mcValue_GetString MCTRL_NAME_AW(mcValue_GetString)
444 
445 #define mcValue_CreateImmString MCTRL_NAME_AW(mcValue_CreateImmString)
446 
447 #define mcValue_GetImmString MCTRL_NAME_AW(mcValue_GetImmString)
448 
452 #ifdef __cplusplus
453 } /* extern "C" */
454 #endif
455 
456 #endif /* MCTRL_VALUE_H */
void mcValue_Destroy(MC_HVALUE hValue)
Destroys a value.
#define MCTRL_API
Definition: _defs.h:46
const WCHAR * mcValue_GetImmStringW(const MC_HVALUE hValue)
Unicode immutable string getter function.
MC_HVALUE mcValue_CreateImmStringA(const char *lpszStr)
ANSI immutable string factory function.
const char * mcValue_GetImmStringA(const MC_HVALUE hValue)
ANSI immutable string getter function.
COLORREF mcValue_GetColor(const MC_HVALUE hValue)
Color getter function.
UINT mcValue_GetUInt64(const MC_HVALUE hValue)
UInt64 getter function.
MC_HVALUETYPE mcValue_Type(const MC_HVALUE hValue)
Gets a type of the value.
MC_HVALUE mcValue_CreateUInt32(UINT uValue)
UInt32 factory function.
UINT mcValue_GetUInt32(const MC_HVALUE hValue)
UInt32 getter function.
MC_HVALUE mcValue_CreateColor(COLORREF color)
Color factory function.
const void * MC_HVALUETYPE
Definition: value.h:113
MC_HVALUE mcValue_CreateUInt64(UINT uValue)
UInt64 factory function.
MC_HVALUETYPE mcValueType_GetBuiltin(int id)
Retrieve Handle of a value type implemented in mCtrl.
MC_HVALUE mcValue_Duplicate(const MC_HVALUE hValue)
Creates a duplicate of the value.
MC_HVALUE mcValue_CreateInt32(INT iValue)
Int32 factory function.
MC_HVALUE mcValue_CreateStringA(const char *lpszStr)
ANSI string factory function.
MC_HVALUE mcValue_CreateIcon(HICON hIcon)
Icon factory function.
const char * mcValue_GetStringA(const MC_HVALUE hValue)
ANSI string getter function.
MC_HVALUE mcValue_CreateStringW(const WCHAR *lpszStr)
Unicode string factory function.
HICON mcValue_GetIcon(const MC_HVALUE hValue)
Icon getter function.
MC_HVALUE mcValue_CreateInt64(INT iValue)
Int64 factory function.
INT mcValue_GetInt32(const MC_HVALUE hValue)
Int32 getter function.
void * MC_HVALUE
Definition: value.h:119
INT mcValue_GetInt64(const MC_HVALUE hValue)
Int64 getter function.
MC_HVALUE mcValue_CreateImmStringW(const WCHAR *lpszStr)
Unicode immutable string factory function.
const WCHAR * mcValue_GetStringW(const MC_HVALUE hValue)
Unicode string getter function.
Common definitions.
Common constants and types.