| |
1 /* |
| |
2 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. |
| |
3 * |
| |
4 * Copyright 2025 Olaf Wintermann. All rights reserved. |
| |
5 * |
| |
6 * Redistribution and use in source and binary forms, with or without |
| |
7 * modification, are permitted provided that the following conditions are met: |
| |
8 * |
| |
9 * 1. Redistributions of source code must retain the above copyright |
| |
10 * notice, this list of conditions and the following disclaimer. |
| |
11 * |
| |
12 * 2. Redistributions in binary form must reproduce the above copyright |
| |
13 * notice, this list of conditions and the following disclaimer in the |
| |
14 * documentation and/or other materials provided with the distribution. |
| |
15 * |
| |
16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
| |
17 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| |
18 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| |
19 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE |
| |
20 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| |
21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| |
22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
| |
23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
| |
24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
| |
25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
| |
26 * POSSIBILITY OF SUCH DAMAGE. |
| |
27 */ |
| |
28 |
| |
29 #ifndef UIC_WRAPPER_H |
| |
30 #define UIC_WRAPPER_H |
| |
31 |
| |
32 #include "../ui/toolkit.h" |
| |
33 #include "../ui/tree.h" |
| |
34 |
| |
35 #ifdef __cplusplus |
| |
36 extern "C" { |
| |
37 #endif |
| |
38 |
| |
39 UIEXPORT UiContext* ui_object_get_context(UiObject *obj); |
| |
40 UIEXPORT void* ui_object_get_windowdata(UiObject *obj); |
| |
41 UIEXPORT void ui_object_set_windowdata(UiObject *obj, void *windowdata); |
| |
42 |
| |
43 UIEXPORT void* ui_list_get_data(UiList *list); |
| |
44 UIEXPORT void* ui_list_get_iter(UiList *list); |
| |
45 UIEXPORT void ui_list_set_iter(UiList *list, void *iter); |
| |
46 |
| |
47 UIEXPORT UiSubList* ui_sublist_new(void); |
| |
48 UIEXPORT void ui_sublist_set_value(UiSubList *sublist, UiList *value); |
| |
49 UIEXPORT void ui_sublist_set_varname(UiSubList *sublist, const char *varname); |
| |
50 UIEXPORT void ui_sublist_set_header(UiSubList *sublist, const char *header); |
| |
51 UIEXPORT void ui_sublist_set_separator(UiSubList *sublist, UiBool separator); |
| |
52 UIEXPORT void ui_sublist_set_userdata(UiSubList *sublist, void *userdata); |
| |
53 UIEXPORT void ui_sublist_free(UiSubList *sublist); |
| |
54 |
| |
55 UIEXPORT UiList* ui_srclist_new(UiContext *ctx, const char *name); |
| |
56 UIEXPORT void ui_srclist_add(UiList *list, UiSubList *item); |
| |
57 UIEXPORT void ui_srclist_insert(UiList *list, int index, UiSubList *item); |
| |
58 UIEXPORT void ui_srclist_remove(UiList *list, int index); |
| |
59 UIEXPORT void ui_srclist_clear(UiList *list); |
| |
60 UIEXPORT int ui_srclist_size(UiList *list); |
| |
61 |
| |
62 UIEXPORT UiList* ui_sublist_event_get_list(UiSubListEventData *event); |
| |
63 UIEXPORT int ui_sublist_event_get_sublist_index(UiSubListEventData *event); |
| |
64 UIEXPORT int ui_sublist_event_get_row_index(UiSubListEventData *event); |
| |
65 UIEXPORT void* ui_sublist_event_get_row_data(UiSubListEventData *event); |
| |
66 UIEXPORT void* ui_sublist_event_get_sublist_userdata(UiSubListEventData *event); |
| |
67 UIEXPORT void* ui_sublist_event_get_event_data(UiSubListEventData *event); |
| |
68 |
| |
69 UIEXPORT UiObject* ui_event_get_obj(UiEvent *event); |
| |
70 UIEXPORT void* ui_event_get_document(UiEvent *event); |
| |
71 UIEXPORT void* ui_event_get_windowdata(UiEvent *event); |
| |
72 UIEXPORT void* ui_event_get_eventdata(UiEvent *event); |
| |
73 UIEXPORT int ui_event_get_eventdatatype(UiEvent *event); |
| |
74 UIEXPORT int ui_event_get_int(UiEvent *event); |
| |
75 UIEXPORT int ui_event_get_set(UiEvent *event); |
| |
76 |
| |
77 |
| |
78 |
| |
79 #ifdef __cplusplus |
| |
80 } |
| |
81 #endif |
| |
82 |
| |
83 #endif /* UIC_WRAPPER_H */ |
| |
84 |