Fri, 04 Apr 2014 17:45:36 +0200
added application properties
0 | 1 | /* |
2 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. | |
3 | * | |
4 | * Copyright 2014 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 UI_TOOLKIT_H | |
30 | #define UI_TOOLKIT_H | |
31 | ||
32 | #ifdef UI_COCOA | |
33 | ||
34 | #ifdef __OBJC__ | |
35 | #import <Cocoa/Cocoa.h> | |
36 | #define UIWIDGET NSView* | |
37 | #else | |
38 | typedef void* UIWIDGET; | |
39 | #endif | |
40 | ||
41 | #elif UI_GTK2 || UI_GTK3 | |
42 | ||
43 | #include <gtk/gtk.h> | |
44 | #define UIWIDGET GtkWidget* | |
18
06be29a56f8b
added menu accelerators
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
16
diff
changeset
|
45 | #define UI_GTK |
0 | 46 | |
47 | #elif UI_MOTIF | |
48 | ||
49 | #include <Xm/XmAll.h> | |
50 | #define UIWIDGET Widget | |
51 | ||
52 | #endif | |
53 | ||
54 | #ifdef __cplusplus | |
55 | extern "C" { | |
56 | #endif | |
57 | ||
22
bcf880b29bc3
textarea automatically sets selection group (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
21
diff
changeset
|
58 | #define UI_GROUP_SELECTION 20000 |
bcf880b29bc3
textarea automatically sets selection group (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
21
diff
changeset
|
59 | |
0 | 60 | /* public types */ |
14
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
61 | typedef struct UiObject UiObject; |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
62 | typedef struct UiEvent UiEvent; |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
63 | typedef struct UiObserver UiObserver; |
0 | 64 | |
65 | typedef struct UiInteger UiInteger; | |
66 | typedef struct UiString UiString; | |
5 | 67 | typedef struct UiText UiText; |
14
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
68 | typedef struct UiList UiList; |
0 | 69 | |
70 | /* private types */ | |
4
39b9b86ec452
added simple container
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
2
diff
changeset
|
71 | typedef struct UiContext UiContext; |
39b9b86ec452
added simple container
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
2
diff
changeset
|
72 | typedef struct UiContainer UiContainer; |
0 | 73 | |
74 | #define ui_getval(val) (val).get(&(val)) | |
75 | #define ui_setval(val, v) (val).set(&(val), v) | |
12
fe94e0fb9ef3
added some text functions
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
76 | |
fe94e0fb9ef3
added some text functions
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
77 | #define ui_getsubstr(text, begin, end) (text).getsubstr(&(val), begin, end) |
fe94e0fb9ef3
added some text functions
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
78 | #define ui_insert(text, begin, str) (text).insert(&(text), begin, str) |
fe94e0fb9ef3
added some text functions
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
79 | |
0 | 80 | |
14
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
81 | typedef void(*ui_callback)(UiEvent*, void*); /* event, user data */ |
0 | 82 | |
83 | struct UiObject { | |
2
eeb50c534497
added support for replaceable documents
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
1
diff
changeset
|
84 | /* |
eeb50c534497
added support for replaceable documents
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
1
diff
changeset
|
85 | * native widget |
eeb50c534497
added support for replaceable documents
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
1
diff
changeset
|
86 | */ |
0 | 87 | UIWIDGET widget; |
2
eeb50c534497
added support for replaceable documents
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
1
diff
changeset
|
88 | |
eeb50c534497
added support for replaceable documents
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
1
diff
changeset
|
89 | /* |
eeb50c534497
added support for replaceable documents
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
1
diff
changeset
|
90 | * user window data |
eeb50c534497
added support for replaceable documents
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
1
diff
changeset
|
91 | */ |
0 | 92 | void *window; |
2
eeb50c534497
added support for replaceable documents
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
1
diff
changeset
|
93 | |
eeb50c534497
added support for replaceable documents
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
1
diff
changeset
|
94 | /* |
eeb50c534497
added support for replaceable documents
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
1
diff
changeset
|
95 | * current document |
eeb50c534497
added support for replaceable documents
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
1
diff
changeset
|
96 | */ |
0 | 97 | void *document; |
4
39b9b86ec452
added simple container
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
2
diff
changeset
|
98 | |
39b9b86ec452
added simple container
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
2
diff
changeset
|
99 | /* |
39b9b86ec452
added simple container
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
2
diff
changeset
|
100 | * window context (private) |
39b9b86ec452
added simple container
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
2
diff
changeset
|
101 | */ |
39b9b86ec452
added simple container
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
2
diff
changeset
|
102 | UiContext *ctx; |
39b9b86ec452
added simple container
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
2
diff
changeset
|
103 | |
39b9b86ec452
added simple container
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
2
diff
changeset
|
104 | /* |
39b9b86ec452
added simple container
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
2
diff
changeset
|
105 | * container interface (private) |
39b9b86ec452
added simple container
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
2
diff
changeset
|
106 | */ |
39b9b86ec452
added simple container
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
2
diff
changeset
|
107 | UiContainer *container; |
0 | 108 | }; |
109 | ||
110 | struct UiEvent { | |
111 | UiObject *obj; | |
112 | void *document; | |
113 | void *window; | |
16
a499c8a72c15
added menu item lists (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
14
diff
changeset
|
114 | void *eventdata; |
0 | 115 | int intval; |
116 | }; | |
117 | ||
14
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
118 | struct UiObserver { |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
119 | ui_callback callback; |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
120 | void *data; |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
121 | UiObserver *next; |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
122 | }; |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
123 | |
0 | 124 | struct UiInteger { |
125 | int (*get)(UiInteger*); | |
126 | void (*set)(UiInteger*, int); | |
127 | int value; | |
128 | void *obj; | |
129 | }; | |
130 | ||
131 | struct UiString { | |
132 | char* (*get)(UiString*); | |
133 | void (*set)(UiString*, char*); | |
134 | char* value; | |
135 | void *obj; | |
136 | }; | |
137 | ||
5 | 138 | struct UiText { |
12
fe94e0fb9ef3
added some text functions
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
139 | void (*set)(UiText*, char*); |
5 | 140 | char* (*get)(UiText*); |
12
fe94e0fb9ef3
added some text functions
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
141 | char* (*getsubstr)(UiText*, int, int); // text, begin, end |
fe94e0fb9ef3
added some text functions
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
142 | void (*insert)(UiText*, int, char*); |
14
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
143 | char *value; |
5 | 144 | void *obj; |
6
05a18c56d9ca
added undo for text
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
5
diff
changeset
|
145 | void *undomgr; |
5 | 146 | // TODO: selection, undo, replace, ... |
147 | }; | |
14
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
148 | |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
149 | /* |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
150 | * abstract list |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
151 | */ |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
152 | struct UiList { |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
153 | /* get the first element */ |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
154 | void*(*first)(UiList *list); |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
155 | /* get the next element */ |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
156 | void*(*next)(UiList *list); |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
157 | /* get the nth element */ |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
158 | void*(*get)(UiList *list, int i); |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
159 | /* get the number of elements */ |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
160 | int(*count)(UiList *list); |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
161 | /* list of observers */ |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
162 | UiObserver *observers; |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
163 | /* iterator changes after first() next() and get() */ |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
164 | void *iter; |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
165 | /* private - implementation dependent */ |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
166 | void *data; |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
167 | |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
168 | }; |
5 | 169 | |
0 | 170 | void ui_init(char *appname, int argc, char **argv); |
171 | void ui_exitfunc(ui_callback f, void *udata); | |
24
06bceda81a03
added application properties
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
22
diff
changeset
|
172 | char* ui_appname(); |
0 | 173 | |
174 | void ui_main(); | |
175 | void ui_show(UiObject *obj); | |
21
012418e7dc90
added groups for menu items (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
20
diff
changeset
|
176 | void ui_set_enabled(UIWIDGET widget, int enabled); |
0 | 177 | |
2
eeb50c534497
added support for replaceable documents
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
1
diff
changeset
|
178 | void ui_set_document(UiObject *obj, void *document); |
eeb50c534497
added support for replaceable documents
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
1
diff
changeset
|
179 | void ui_detach_document(UiObject *obj, void *document); |
eeb50c534497
added support for replaceable documents
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
1
diff
changeset
|
180 | |
eeb50c534497
added support for replaceable documents
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
1
diff
changeset
|
181 | void* ui_document_new(size_t size); |
1
eb5269000bc8
added some document functions
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
0
diff
changeset
|
182 | void ui_document_destroy(void *doc); |
eb5269000bc8
added some document functions
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
0
diff
changeset
|
183 | |
0 | 184 | void* ui_document_malloc(void *doc, size_t size); |
185 | void* ui_document_calloc(void *doc, size_t nelem, size_t elsize); | |
186 | void ui_document_free(void *doc, void *ptr); | |
187 | void* ui_document_realloc(void *doc, void *ptr, size_t size); | |
188 | ||
2
eeb50c534497
added support for replaceable documents
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
1
diff
changeset
|
189 | // TODO: remove (or not) |
1
eb5269000bc8
added some document functions
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
0
diff
changeset
|
190 | void ui_document_addint(void *doc, char *name); |
eb5269000bc8
added some document functions
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
0
diff
changeset
|
191 | void ui_document_regint(void *doc, char *name, UiInteger *i); |
eb5269000bc8
added some document functions
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
0
diff
changeset
|
192 | void ui_document_setint(void *doc, char *name, int val); |
eb5269000bc8
added some document functions
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
0
diff
changeset
|
193 | int ui_document_getint(void *doc, char *name); |
eb5269000bc8
added some document functions
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
0
diff
changeset
|
194 | |
2
eeb50c534497
added support for replaceable documents
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
1
diff
changeset
|
195 | // new: |
eeb50c534497
added support for replaceable documents
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
1
diff
changeset
|
196 | int ui_getint(UiObject *obj, char *name); |
eeb50c534497
added support for replaceable documents
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
1
diff
changeset
|
197 | |
14
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
198 | |
20
2dda1ad6dc7a
added groups for menu items (Cocoa)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
18
diff
changeset
|
199 | void ui_set_group(UiContext *ctx, int group); |
2dda1ad6dc7a
added groups for menu items (Cocoa)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
18
diff
changeset
|
200 | void ui_unset_group(UiContext *ctx, int group); |
2dda1ad6dc7a
added groups for menu items (Cocoa)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
18
diff
changeset
|
201 | int* ui_active_groups(UiContext *ctx, int *ngroups); |
14
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
202 | |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
203 | // types |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
204 | UiObserver* ui_observer_new(ui_callback f, void *data); |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
205 | UiObserver* ui_obsvlist_add(UiObserver *list, UiObserver *observer); |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
206 | UiObserver* ui_add_observer(UiObserver *list, ui_callback f, void *data); |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
207 | void ui_notify(UiObserver *observer, void *data); |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
208 | void ui_notify_except(UiObserver *observer, UiObserver *exc, void *data); |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
209 | |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
210 | |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
211 | UiList* ui_list_new(); |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
212 | void* ui_list_first(UiList *list); |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
213 | void* ui_list_next(UiList *list); |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
214 | void* ui_list_get(UiList *list, int i); |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
215 | int ui_list_count(UiList *list); |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
216 | void ui_list_append(UiList *list, void *data); |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
217 | void ui_list_prepend(UiList *list, void *data); |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
218 | void ui_list_addobsv(UiList *list, ui_callback f, void *data); |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
219 | void ui_list_notify(UiList *list); |
2
eeb50c534497
added support for replaceable documents
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
1
diff
changeset
|
220 | |
1
eb5269000bc8
added some document functions
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
0
diff
changeset
|
221 | |
0 | 222 | #ifdef __cplusplus |
223 | } | |
224 | #endif | |
225 | ||
226 | #endif /* UI_TOOLKIT_H */ | |
227 |