Sun, 29 Nov 2015 17:22:15 +0100
added drawing area (Gtk)
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 | ||
33
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
29
diff
changeset
|
52 | #elif defined(UI_QT4) || defined(UI_QT5) |
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
29
diff
changeset
|
53 | #ifdef __cplusplus |
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
29
diff
changeset
|
54 | #include <QApplication> |
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
29
diff
changeset
|
55 | #include <QWidget> |
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
29
diff
changeset
|
56 | #define UIWIDGET QWidget* |
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
29
diff
changeset
|
57 | #else /* __cplusplus */ |
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
29
diff
changeset
|
58 | #define UIWIDGET void* |
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
29
diff
changeset
|
59 | #endif |
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
29
diff
changeset
|
60 | |
78
135920fe441b
added initial WPF code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
61 | #elif UI_WPF |
135920fe441b
added initial WPF code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
62 | #define UIWIDGET void* |
0 | 63 | #endif |
64 | ||
66
8d490d97aab8
added button and box container (Qt)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
64
diff
changeset
|
65 | #ifndef TRUE |
8d490d97aab8
added button and box container (Qt)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
64
diff
changeset
|
66 | #define TRUE 1 |
8d490d97aab8
added button and box container (Qt)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
64
diff
changeset
|
67 | #endif |
8d490d97aab8
added button and box container (Qt)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
64
diff
changeset
|
68 | #ifndef FALSE |
8d490d97aab8
added button and box container (Qt)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
64
diff
changeset
|
69 | #define FALSE 0 |
8d490d97aab8
added button and box container (Qt)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
64
diff
changeset
|
70 | #endif |
8d490d97aab8
added button and box container (Qt)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
64
diff
changeset
|
71 | |
0 | 72 | #ifdef __cplusplus |
73 | extern "C" { | |
74 | #endif | |
75 | ||
90
2019fdbaadfd
persistent textarea cursor position
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
78
diff
changeset
|
76 | #define UI_GROUP_SELECTION 20000 |
22
bcf880b29bc3
textarea automatically sets selection group (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
21
diff
changeset
|
77 | |
0 | 78 | /* public types */ |
59
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
54
diff
changeset
|
79 | typedef int UiBool; |
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
54
diff
changeset
|
80 | |
90
2019fdbaadfd
persistent textarea cursor position
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
78
diff
changeset
|
81 | typedef struct UiObject UiObject; |
2019fdbaadfd
persistent textarea cursor position
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
78
diff
changeset
|
82 | typedef struct UiEvent UiEvent; |
95
29f5cd5f5367
added drawing area (Gtk)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
94
diff
changeset
|
83 | typedef struct UiMouseEvent UiMouseEvent; |
90
2019fdbaadfd
persistent textarea cursor position
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
78
diff
changeset
|
84 | typedef struct UiObserver UiObserver; |
0 | 85 | |
90
2019fdbaadfd
persistent textarea cursor position
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
78
diff
changeset
|
86 | typedef struct UiInteger UiInteger; |
2019fdbaadfd
persistent textarea cursor position
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
78
diff
changeset
|
87 | typedef struct UiString UiString; |
2019fdbaadfd
persistent textarea cursor position
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
78
diff
changeset
|
88 | typedef struct UiText UiText; |
2019fdbaadfd
persistent textarea cursor position
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
78
diff
changeset
|
89 | typedef struct UiList UiList; |
0 | 90 | |
91 | /* private types */ | |
90
2019fdbaadfd
persistent textarea cursor position
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
78
diff
changeset
|
92 | typedef struct UiContext UiContext; |
2019fdbaadfd
persistent textarea cursor position
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
78
diff
changeset
|
93 | typedef struct UiContainer UiContainer; |
0 | 94 | |
52
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
38
diff
changeset
|
95 | typedef struct UiTabbedPane UiTabbedPane; |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
38
diff
changeset
|
96 | |
95
29f5cd5f5367
added drawing area (Gtk)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
94
diff
changeset
|
97 | enum UiMouseEventType { UI_PRESS = 0, UI_PRESS2 }; |
29f5cd5f5367
added drawing area (Gtk)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
94
diff
changeset
|
98 | |
0 | 99 | #define ui_getval(val) (val).get(&(val)) |
100 | #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
|
101 | |
33
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
29
diff
changeset
|
102 | #define ui_getsubstr(text, begin, end) (text).getsubstr(&(text), begin, end) |
12
fe94e0fb9ef3
added some text functions
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
103 | #define ui_insert(text, begin, str) (text).insert(&(text), begin, str) |
33
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
29
diff
changeset
|
104 | #define ui_length(text) (text).length(&(text)) |
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
29
diff
changeset
|
105 | #define ui_selection(text, begin, end) (text).selection(&(text), begin, end) |
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
29
diff
changeset
|
106 | #define ui_position(text) (text).position(&(text)) |
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
29
diff
changeset
|
107 | #define ui_remove(text, begin, end) (text).remove(&(text), begin, end) |
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
29
diff
changeset
|
108 | |
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
29
diff
changeset
|
109 | typedef void(*ui_callback)(UiEvent*, void*); /* event, user data */ |
12
fe94e0fb9ef3
added some text functions
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
110 | |
33
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
29
diff
changeset
|
111 | typedef void*(*ui_model_getvalue_f)(void*, int); |
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
29
diff
changeset
|
112 | |
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
29
diff
changeset
|
113 | typedef int(*ui_threadfunc)(void*); |
0 | 114 | |
115 | struct UiObject { | |
2
eeb50c534497
added support for replaceable documents
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
1
diff
changeset
|
116 | /* |
eeb50c534497
added support for replaceable documents
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
1
diff
changeset
|
117 | * native widget |
eeb50c534497
added support for replaceable documents
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
1
diff
changeset
|
118 | */ |
33
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
29
diff
changeset
|
119 | UIWIDGET widget; |
2
eeb50c534497
added support for replaceable documents
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
1
diff
changeset
|
120 | |
eeb50c534497
added support for replaceable documents
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
1
diff
changeset
|
121 | /* |
eeb50c534497
added support for replaceable documents
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
1
diff
changeset
|
122 | * user window data |
eeb50c534497
added support for replaceable documents
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
1
diff
changeset
|
123 | */ |
33
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
29
diff
changeset
|
124 | void *window; |
2
eeb50c534497
added support for replaceable documents
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
1
diff
changeset
|
125 | |
eeb50c534497
added support for replaceable documents
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
1
diff
changeset
|
126 | /* |
4
39b9b86ec452
added simple container
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
2
diff
changeset
|
127 | * window context (private) |
39b9b86ec452
added simple container
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
2
diff
changeset
|
128 | */ |
33
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
29
diff
changeset
|
129 | UiContext *ctx; |
4
39b9b86ec452
added simple container
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
2
diff
changeset
|
130 | |
39b9b86ec452
added simple container
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
2
diff
changeset
|
131 | /* |
39b9b86ec452
added simple container
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
2
diff
changeset
|
132 | * container interface (private) |
39b9b86ec452
added simple container
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
2
diff
changeset
|
133 | */ |
39b9b86ec452
added simple container
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
2
diff
changeset
|
134 | UiContainer *container; |
33
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
29
diff
changeset
|
135 | |
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
29
diff
changeset
|
136 | /* |
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
29
diff
changeset
|
137 | * next container object |
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
29
diff
changeset
|
138 | */ |
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
29
diff
changeset
|
139 | UiObject *next; |
0 | 140 | }; |
141 | ||
52
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
38
diff
changeset
|
142 | struct UiTabbedPane { |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
38
diff
changeset
|
143 | /* |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
38
diff
changeset
|
144 | * native widget |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
38
diff
changeset
|
145 | */ |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
38
diff
changeset
|
146 | UIWIDGET widget; |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
38
diff
changeset
|
147 | |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
38
diff
changeset
|
148 | /* |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
38
diff
changeset
|
149 | * current document |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
38
diff
changeset
|
150 | */ |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
38
diff
changeset
|
151 | void *document; |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
38
diff
changeset
|
152 | |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
38
diff
changeset
|
153 | /* |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
38
diff
changeset
|
154 | * parent context |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
38
diff
changeset
|
155 | */ |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
38
diff
changeset
|
156 | UiContext *ctx; |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
38
diff
changeset
|
157 | }; |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
38
diff
changeset
|
158 | |
0 | 159 | struct UiEvent { |
160 | UiObject *obj; | |
161 | void *document; | |
162 | void *window; | |
16
a499c8a72c15
added menu item lists (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
14
diff
changeset
|
163 | void *eventdata; |
0 | 164 | int intval; |
165 | }; | |
166 | ||
95
29f5cd5f5367
added drawing area (Gtk)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
94
diff
changeset
|
167 | struct UiMouseEvent { |
29f5cd5f5367
added drawing area (Gtk)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
94
diff
changeset
|
168 | int x; |
29f5cd5f5367
added drawing area (Gtk)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
94
diff
changeset
|
169 | int y; |
29f5cd5f5367
added drawing area (Gtk)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
94
diff
changeset
|
170 | enum UiMouseEventType type; |
29f5cd5f5367
added drawing area (Gtk)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
94
diff
changeset
|
171 | int button; |
29f5cd5f5367
added drawing area (Gtk)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
94
diff
changeset
|
172 | }; |
29f5cd5f5367
added drawing area (Gtk)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
94
diff
changeset
|
173 | |
14
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
174 | struct UiObserver { |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
175 | ui_callback callback; |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
176 | void *data; |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
177 | UiObserver *next; |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
178 | }; |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
179 | |
0 | 180 | struct UiInteger { |
181 | int (*get)(UiInteger*); | |
182 | void (*set)(UiInteger*, int); | |
183 | int value; | |
184 | void *obj; | |
185 | }; | |
186 | ||
187 | struct UiString { | |
188 | char* (*get)(UiString*); | |
189 | void (*set)(UiString*, char*); | |
190 | char* value; | |
191 | void *obj; | |
192 | }; | |
193 | ||
5 | 194 | struct UiText { |
12
fe94e0fb9ef3
added some text functions
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
195 | void (*set)(UiText*, char*); |
5 | 196 | char* (*get)(UiText*); |
12
fe94e0fb9ef3
added some text functions
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
197 | char* (*getsubstr)(UiText*, int, int); // text, begin, end |
fe94e0fb9ef3
added some text functions
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
198 | void (*insert)(UiText*, int, char*); |
90
2019fdbaadfd
persistent textarea cursor position
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
78
diff
changeset
|
199 | void (*setposition)(UiText*,int); |
26
a137277f9173
added copy & paste (Cocoa)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
24
diff
changeset
|
200 | int (*position)(UiText*); |
a137277f9173
added copy & paste (Cocoa)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
24
diff
changeset
|
201 | void (*selection)(UiText*, int*, int*); // text, begin, end |
29
c96169444d88
added locale support (Cocoa) and ucx update
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
26
diff
changeset
|
202 | int (*length)(UiText*); |
33
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
29
diff
changeset
|
203 | void (*remove)(UiText*, int, int); // text, begin, end |
14
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
204 | char *value; |
90
2019fdbaadfd
persistent textarea cursor position
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
78
diff
changeset
|
205 | int pos; |
5 | 206 | void *obj; |
6
05a18c56d9ca
added undo for text
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
5
diff
changeset
|
207 | void *undomgr; |
33
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
29
diff
changeset
|
208 | // TODO: replace, ... |
5 | 209 | }; |
14
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 | /* |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
212 | * abstract list |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
213 | */ |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
214 | struct UiList { |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
215 | /* get the first element */ |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
216 | void*(*first)(UiList *list); |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
217 | /* get the next element */ |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
218 | void*(*next)(UiList *list); |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
219 | /* get the nth element */ |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
220 | void*(*get)(UiList *list, int i); |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
221 | /* get the number of elements */ |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
222 | int(*count)(UiList *list); |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
223 | /* list of observers */ |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
224 | UiObserver *observers; |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
225 | /* iterator changes after first() next() and get() */ |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
226 | void *iter; |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
227 | /* private - implementation dependent */ |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
228 | void *data; |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
229 | |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
230 | }; |
5 | 231 | |
33
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
29
diff
changeset
|
232 | |
0 | 233 | void ui_init(char *appname, int argc, char **argv); |
24
06bceda81a03
added application properties
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
22
diff
changeset
|
234 | char* ui_appname(); |
0 | 235 | |
29
c96169444d88
added locale support (Cocoa) and ucx update
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
26
diff
changeset
|
236 | void ui_exitfunc(ui_callback f, void *userdata); |
c96169444d88
added locale support (Cocoa) and ucx update
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
26
diff
changeset
|
237 | void ui_openfilefunc(ui_callback f, void *userdata); |
c96169444d88
added locale support (Cocoa) and ucx update
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
26
diff
changeset
|
238 | |
0 | 239 | void ui_main(); |
240 | void ui_show(UiObject *obj); | |
33
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
29
diff
changeset
|
241 | void ui_close(UiObject *obj); |
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
29
diff
changeset
|
242 | |
35 | 243 | void ui_job(UiObject *obj, ui_threadfunc tf, void *td, ui_callback f, void *fd); |
33
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
29
diff
changeset
|
244 | |
21
012418e7dc90
added groups for menu items (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
20
diff
changeset
|
245 | void ui_set_enabled(UIWIDGET widget, int enabled); |
33
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
29
diff
changeset
|
246 | void ui_set_show_all(UIWIDGET widget, int value); |
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
29
diff
changeset
|
247 | void ui_set_visible(UIWIDGET widget, int visible); |
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
29
diff
changeset
|
248 | |
61
7ee124a58fe3
improved box (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
59
diff
changeset
|
249 | UIWIDGET ui_vbox(UiObject *obj); |
7ee124a58fe3
improved box (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
59
diff
changeset
|
250 | UIWIDGET ui_hbox(UiObject *obj); |
94
d51e334c1439
added checkbox and labels with alignment (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
90
diff
changeset
|
251 | |
62
70d2aee84432
added grid container (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
61
diff
changeset
|
252 | UIWIDGET ui_grid(UiObject *obj); |
94
d51e334c1439
added checkbox and labels with alignment (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
90
diff
changeset
|
253 | UIWIDGET ui_grid_sp(UiObject *obj, int columnspacing, int rowspacing); |
d51e334c1439
added checkbox and labels with alignment (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
90
diff
changeset
|
254 | |
33
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
29
diff
changeset
|
255 | UIWIDGET ui_sidebar(UiObject *obj); |
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
29
diff
changeset
|
256 | void ui_end(UiObject *obj); |
0 | 257 | |
64
6ef2c7f73a30
added simple tabview (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
63
diff
changeset
|
258 | UIWIDGET ui_tabview(UiObject *obj); |
6ef2c7f73a30
added simple tabview (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
63
diff
changeset
|
259 | void ui_tab(UiObject *obj, char *title); |
6ef2c7f73a30
added simple tabview (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
63
diff
changeset
|
260 | void ui_select_tab(UIWIDGET tabview, int tab); |
6ef2c7f73a30
added simple tabview (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
63
diff
changeset
|
261 | |
59
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
54
diff
changeset
|
262 | void ui_layout_fill(UiObject *obj, UiBool fill); |
62
70d2aee84432
added grid container (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
61
diff
changeset
|
263 | void ui_newline(UiObject *obj); |
52
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
38
diff
changeset
|
264 | |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
38
diff
changeset
|
265 | |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
38
diff
changeset
|
266 | UiTabbedPane* ui_tabbed_document_view(UiObject *obj); |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
38
diff
changeset
|
267 | |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
38
diff
changeset
|
268 | UiObject* ui_document_tab(UiTabbedPane *view); |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
38
diff
changeset
|
269 | |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
38
diff
changeset
|
270 | |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
38
diff
changeset
|
271 | |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
38
diff
changeset
|
272 | |
2
eeb50c534497
added support for replaceable documents
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
1
diff
changeset
|
273 | void ui_set_document(UiObject *obj, void *document); |
eeb50c534497
added support for replaceable documents
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
1
diff
changeset
|
274 | void ui_detach_document(UiObject *obj, void *document); |
52
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
38
diff
changeset
|
275 | void* ui_get_document(UiObject *obj); |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
38
diff
changeset
|
276 | void ui_set_subdocument(void *document, void *sub); |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
38
diff
changeset
|
277 | void ui_detach_subdocument(void *document, void *sub); |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
38
diff
changeset
|
278 | void* ui_get_subdocument(void *document); |
2
eeb50c534497
added support for replaceable documents
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
1
diff
changeset
|
279 | |
eeb50c534497
added support for replaceable documents
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
1
diff
changeset
|
280 | void* ui_document_new(size_t size); |
1
eb5269000bc8
added some document functions
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
0
diff
changeset
|
281 | void ui_document_destroy(void *doc); |
eb5269000bc8
added some document functions
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
0
diff
changeset
|
282 | |
37
56016468753d
refactored value binding system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
35
diff
changeset
|
283 | UiContext* ui_document_context(void *doc); |
56016468753d
refactored value binding system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
35
diff
changeset
|
284 | |
38
8ccdde37275b
added some allocation functions
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
37
diff
changeset
|
285 | // TODO: remove |
0 | 286 | void* ui_document_malloc(void *doc, size_t size); |
287 | void* ui_document_calloc(void *doc, size_t nelem, size_t elsize); | |
288 | void ui_document_free(void *doc, void *ptr); | |
289 | void* ui_document_realloc(void *doc, void *ptr, size_t size); | |
290 | ||
2
eeb50c534497
added support for replaceable documents
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
1
diff
changeset
|
291 | // TODO: remove (or not) |
1
eb5269000bc8
added some document functions
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
0
diff
changeset
|
292 | void ui_document_addint(void *doc, char *name); |
eb5269000bc8
added some document functions
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
0
diff
changeset
|
293 | 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
|
294 | 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
|
295 | int ui_document_getint(void *doc, char *name); |
eb5269000bc8
added some document functions
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
0
diff
changeset
|
296 | |
33
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
29
diff
changeset
|
297 | void ui_document_regtext(void *doc, char *name, UiText *text); |
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
29
diff
changeset
|
298 | void ui_document_reglist(void *doc, char *name, UiList *list); |
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
29
diff
changeset
|
299 | |
2
eeb50c534497
added support for replaceable documents
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
1
diff
changeset
|
300 | // new: |
eeb50c534497
added support for replaceable documents
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
1
diff
changeset
|
301 | int ui_getint(UiObject *obj, char *name); |
52
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
38
diff
changeset
|
302 | char *ui_getstr(UiObject *obj, char *name); |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
38
diff
changeset
|
303 | char* ui_gettext(UiObject *obj, char *name); |
2
eeb50c534497
added support for replaceable documents
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
1
diff
changeset
|
304 | |
38
8ccdde37275b
added some allocation functions
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
37
diff
changeset
|
305 | |
20
2dda1ad6dc7a
added groups for menu items (Cocoa)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
18
diff
changeset
|
306 | 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
|
307 | 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
|
308 | 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
|
309 | |
38
8ccdde37275b
added some allocation functions
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
37
diff
changeset
|
310 | void* ui_malloc(UiContext *ctx, size_t size); |
8ccdde37275b
added some allocation functions
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
37
diff
changeset
|
311 | void* ui_calloc(UiContext *ctx, size_t nelem, size_t elsize); |
8ccdde37275b
added some allocation functions
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
37
diff
changeset
|
312 | void ui_free(UiContext *ctx, void *ptr); |
8ccdde37275b
added some allocation functions
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
37
diff
changeset
|
313 | void* ui_realloc(UiContext *ctx, void *ptr, size_t size); |
8ccdde37275b
added some allocation functions
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
37
diff
changeset
|
314 | |
14
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
315 | // types |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
316 | 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
|
317 | 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
|
318 | 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
|
319 | void ui_notify(UiObserver *observer, void *data); |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
320 | 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
|
321 | |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
322 | |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
323 | UiList* ui_list_new(); |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
324 | void* ui_list_first(UiList *list); |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
325 | void* ui_list_next(UiList *list); |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
326 | 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
|
327 | int ui_list_count(UiList *list); |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
328 | 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
|
329 | 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
|
330 | 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
|
331 | void ui_list_notify(UiList *list); |
2
eeb50c534497
added support for replaceable documents
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
1
diff
changeset
|
332 | |
26
a137277f9173
added copy & paste (Cocoa)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
24
diff
changeset
|
333 | void ui_clipboard_set(char *str); |
a137277f9173
added copy & paste (Cocoa)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
24
diff
changeset
|
334 | char* ui_clipboard_get(); |
1
eb5269000bc8
added some document functions
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
0
diff
changeset
|
335 | |
33
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
29
diff
changeset
|
336 | void ui_add_image(char *imgname, char *filename); |
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
29
diff
changeset
|
337 | |
95
29f5cd5f5367
added drawing area (Gtk)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
94
diff
changeset
|
338 | // common widget functions |
29f5cd5f5367
added drawing area (Gtk)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
94
diff
changeset
|
339 | void ui_mouse_handler(UiObject *obj, UIWIDGET widget, ui_callback f, void *u); |
62
70d2aee84432
added grid container (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
61
diff
changeset
|
340 | |
95
29f5cd5f5367
added drawing area (Gtk)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
94
diff
changeset
|
341 | // label widgets |
62
70d2aee84432
added grid container (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
61
diff
changeset
|
342 | UIWIDGET ui_label(UiObject *obj, char *label); |
94
d51e334c1439
added checkbox and labels with alignment (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
90
diff
changeset
|
343 | UIWIDGET ui_llabel(UiObject *obj, char *label); |
d51e334c1439
added checkbox and labels with alignment (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
90
diff
changeset
|
344 | UIWIDGET ui_rlabel(UiObject *obj, char *label); |
63
46a42f0c4f93
added textfield and some container fixes (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
62
diff
changeset
|
345 | UIWIDGET ui_space(UiObject *obj); |
94
d51e334c1439
added checkbox and labels with alignment (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
90
diff
changeset
|
346 | UIWIDGET ui_separator(UiObject *obj); |
62
70d2aee84432
added grid container (Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
61
diff
changeset
|
347 | |
0 | 348 | #ifdef __cplusplus |
349 | } | |
350 | #endif | |
351 | ||
352 | #endif /* UI_TOOLKIT_H */ | |
353 |