mCtrl  0.9.0
propset.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2011-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_PROPSET_H
20 #define MCTRL_PROPSET_H
21 
22 #include <mCtrl/defs.h>
23 #include <mCtrl/value.h>
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
29 
42 typedef void* MC_HPROPSET;
43 
44 
50 
53 #define MC_PSIMF_TEXT (0x00000001)
54 
55 #define MC_PSIMF_VALUE (0x00000002)
56 
57 #define MC_PSIMF_LPARAM (0x00000004)
58 
59 #define MC_PSIMF_FLAGS (0x00000008)
60 
69 
70 // TODO
71 
79 
90 typedef struct MC_PROPSETITEMW_tag {
92  DWORD fMask;
94  int iItem;
96  LPWSTR pszText;
102  LPARAM lParam;
104  DWORD dwFlags;
106 
117 typedef struct MC_PROPSETITEMA_tag {
119  DWORD fMask;
121  int iItem;
123  LPSTR pszText;
129  LPARAM lParam;
131  DWORD dwFlags;
133 
142 
144 #define MC_PSF_SORTITEMS (0x00000004L)
145 
153 
160 MC_HPROPSET MCTRL_API mcPropSet_Create(DWORD dwFlags);
161 
168 BOOL MCTRL_API mcPropSet_AddRef(MC_HPROPSET hPropSet);
169 
179 BOOL MCTRL_API mcPropSet_Release(MC_HPROPSET hPropSet);
180 
187 int MCTRL_API mcPropSet_GetItemCount(MC_HPROPSET hPropSet);
188 
200 int MCTRL_API mcPropSet_InsertItemW(MC_HPROPSET hPropSet, MC_PROPSETITEMW* pItem);
201 
213 int MCTRL_API mcPropSet_InsertItemA(MC_HPROPSET hPropSet, MC_PROPSETITEMA* pItem);
214 
228 BOOL MCTRL_API mcPropSet_GetItemW(MC_HPROPSET hPropSet, MC_PROPSETITEMW* pItem);
229 
243 BOOL MCTRL_API mcPropSet_GetItemA(MC_HPROPSET hPropSet, MC_PROPSETITEMA* pItem);
244 
256 int MCTRL_API mcPropSet_SetItemW(MC_HPROPSET hPropSet, MC_PROPSETITEMW* pItem);
257 
269 int MCTRL_API mcPropSet_SetItemA(MC_HPROPSET hPropSet, MC_PROPSETITEMA* pItem);
270 
278 BOOL MCTRL_API mcPropSet_DeleteItem(MC_HPROPSET hPropSet, int iItem);
279 
286 BOOL MCTRL_API mcPropSet_DeleteAllItems(MC_HPROPSET hPropSet);
287 
295 
297 #define MC_PROPSETITEM MCTRL_NAME_AW(MC_PROPSETITEM)
298 
299 #define mcPropSet_InsertItem MCTRL_NAME_AW(mcPropSet_InsertItem)
300 
301 #define mcPropSet_SetItem MCTRL_NAME_AW(mcPropSet_SetItem)
302 
303 #define mcPropSet_GetItem MCTRL_NAME_AW(mcPropSet_GetItem)
304 
308 #ifdef __cplusplus
309 } /* extern "C" */
310 #endif
311 
312 #endif /* MCTRL_PROPSET_H */