mCtrl
propset.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 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_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 
52 #define MC_PSIM_TEXT (0x00000001)
53 
55 #define MC_PSIM_VALUE (0x00000002)
56 
57 #define MC_PSIM_LPARAM (0x00000004)
58 
59 #define MC_PSIM_FLAGS (0x00000008)
60 
68 
69 // TODO
70 
84 typedef struct MC_PROPSETITEMW_tag {
86  DWORD fMask;
88  int iItem;
90  LPWSTR pszText;
98  LPARAM lParam;
100  DWORD dwFlags;
102 
113 typedef struct MC_PROPSETITEMA_tag {
115  DWORD fMask;
117  int iItem;
119  LPSTR pszText;
127  LPARAM lParam;
129  DWORD dwFlags;
131 
132 
133 
134 
140 
142 #define MC_PSF_SORTITEMS (0x00000004L)
143 
153 MC_HPROPSET MCTRL_API mcPropSet_Create(DWORD dwFlags);
154 
161 BOOL MCTRL_API mcPropSet_AddRef(MC_HPROPSET hPropSet);
162 
172 BOOL MCTRL_API mcPropSet_Release(MC_HPROPSET hPropSet);
173 
180 int MCTRL_API mcPropSet_GetItemCount(MC_HPROPSET hPropSet);
181 
193 int MCTRL_API mcPropSet_InsertItemW(MC_HPROPSET hPropSet, MC_PROPSETITEMW* pItem);
194 
206 int MCTRL_API mcPropSet_InsertItemA(MC_HPROPSET hPropSet, MC_PROPSETITEMA* pItem);
207 
215 BOOL MCTRL_API mcPropSet_GetItemW(MC_HPROPSET hPropSet, MC_PROPSETITEMW* pItem);
216 
224 BOOL MCTRL_API mcPropSet_GetItemA(MC_HPROPSET hPropSet, MC_PROPSETITEMA* pItem);
225 
237 int MCTRL_API mcPropSet_SetItemW(MC_HPROPSET hPropSet, MC_PROPSETITEMW* pItem);
238 
250 int MCTRL_API mcPropSet_SetItemA(MC_HPROPSET hPropSet, MC_PROPSETITEMA* pItem);
251 
259 BOOL MCTRL_API mcPropSet_DeleteItem(MC_HPROPSET hPropSet, int iItem);
260 
267 BOOL MCTRL_API mcPropSet_DeleteAllItems(MC_HPROPSET hPropSet);
268 
269 
274 
276 #define MC_PROPSETITEM MCTRL_NAME_AW(MC_PROPSETITEM)
277 
278 #define mcPropSet_InsertItem MCTRL_NAME_AW(mcPropSet_InsertItem)
279 
280 #define mcPropSet_SetItem MCTRL_NAME_AW(mcPropSet_SetItem)
281 
282 #define mcPropSet_GetItem MCTRL_NAME_AW(mcPropSet_GetItem)
283 
287 #ifdef __cplusplus
288 } /* extern "C" */
289 #endif
290 
291 #endif /* MCTRL_PROPSET_H */