Fri, 06 Dec 2024 13:11:09 +0100
add sourcelist widget (GTK)
0 | 1 | /* |
2 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. | |
3 | * | |
140
c03c338a7dcf
refactors value binding system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
133
diff
changeset
|
4 | * Copyright 2017 Olaf Wintermann. All rights reserved. |
0 | 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 | ||
144
29d98cff4f56
UiInteger uses int64 now
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
142
diff
changeset
|
32 | #include <inttypes.h> |
29d98cff4f56
UiInteger uses int64 now
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
142
diff
changeset
|
33 | |
0 | 34 | #ifdef UI_COCOA |
35 | ||
404
384f6d1f5784
add first working cocoa code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
394
diff
changeset
|
36 | #include <stdlib.h> |
0 | 37 | #ifdef __OBJC__ |
38 | #import <Cocoa/Cocoa.h> | |
39 | #endif | |
404
384f6d1f5784
add first working cocoa code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
394
diff
changeset
|
40 | typedef void* UIWIDGET; // NSView* |
384f6d1f5784
add first working cocoa code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
394
diff
changeset
|
41 | typedef void* UIWINDOW; // NSWindow* |
384f6d1f5784
add first working cocoa code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
394
diff
changeset
|
42 | typedef void* UIMENU; // NSMenu* |
0 | 43 | |
292
8e5e7adf5372
add gtk4 option to the build system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
265
diff
changeset
|
44 | #elif UI_GTK2 || UI_GTK3 || UI_GTK4 |
0 | 45 | |
46 | #include <gtk/gtk.h> | |
47 | #define UIWIDGET GtkWidget* | |
293
736c962f1011
initial gtk4 porting, incomplete
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
292
diff
changeset
|
48 | |
736c962f1011
initial gtk4 porting, incomplete
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
292
diff
changeset
|
49 | #if UI_GTK2 || UI_GTK3 |
115
102fc0b8fe3e
improved context menus
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
111
diff
changeset
|
50 | #define UIMENU GtkMenu* |
293
736c962f1011
initial gtk4 porting, incomplete
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
292
diff
changeset
|
51 | #endif |
736c962f1011
initial gtk4 porting, incomplete
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
292
diff
changeset
|
52 | #ifdef UI_GTK4 |
736c962f1011
initial gtk4 porting, incomplete
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
292
diff
changeset
|
53 | #define UIMENU GtkPopoverMenu* |
736c962f1011
initial gtk4 porting, incomplete
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
292
diff
changeset
|
54 | #endif |
736c962f1011
initial gtk4 porting, incomplete
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
292
diff
changeset
|
55 | |
18
06be29a56f8b
added menu accelerators
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
16
diff
changeset
|
56 | #define UI_GTK |
0 | 57 | |
302
b00cbbfeec7a
add libadwaita toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
293
diff
changeset
|
58 | #ifdef UI_LIBADWAITA |
b00cbbfeec7a
add libadwaita toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
293
diff
changeset
|
59 | #include <adwaita.h> |
b00cbbfeec7a
add libadwaita toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
293
diff
changeset
|
60 | #endif |
b00cbbfeec7a
add libadwaita toolkit option
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
293
diff
changeset
|
61 | |
0 | 62 | #elif UI_MOTIF |
63 | ||
64 | #include <Xm/XmAll.h> | |
65 | #define UIWIDGET Widget | |
115
102fc0b8fe3e
improved context menus
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
111
diff
changeset
|
66 | #define UIMENU Widget |
0 | 67 | |
33
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
29
diff
changeset
|
68 | #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
|
69 | #ifdef __cplusplus |
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
29
diff
changeset
|
70 | #include <QApplication> |
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
29
diff
changeset
|
71 | #include <QWidget> |
115
102fc0b8fe3e
improved context menus
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
111
diff
changeset
|
72 | #include <QMenu> |
33
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
29
diff
changeset
|
73 | #define UIWIDGET QWidget* |
115
102fc0b8fe3e
improved context menus
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
111
diff
changeset
|
74 | #define UIMENU QMenu* |
33
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
29
diff
changeset
|
75 | #else /* __cplusplus */ |
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
29
diff
changeset
|
76 | #define UIWIDGET void* |
115
102fc0b8fe3e
improved context menus
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
111
diff
changeset
|
77 | #define UIMENU void* |
33
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
29
diff
changeset
|
78 | #endif |
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
29
diff
changeset
|
79 | |
173 | 80 | #elif UI_WINUI |
181
c52d88ea020b
redefine UIWIDGET, remove widget abstraction class (WinUI)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
177
diff
changeset
|
81 | |
201
7f67ebbb0c1c
add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
196
diff
changeset
|
82 | #define UIEXPORT __declspec(dllexport) |
7f67ebbb0c1c
add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
196
diff
changeset
|
83 | |
181
c52d88ea020b
redefine UIWIDGET, remove widget abstraction class (WinUI)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
177
diff
changeset
|
84 | #ifdef __cplusplus |
183
3ce2eb11913b
create WinUI wrapper classes for usage in UiObject and widget creation functions
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
181
diff
changeset
|
85 | |
379
958bae372271
implement ui_dialog_window (WINUI)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
378
diff
changeset
|
86 | #include <functional> |
205
b1ac0dd1d38b
new winui vs project, add toolbar
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
201
diff
changeset
|
87 | #ifndef UI_WINUI_PCH |
181
c52d88ea020b
redefine UIWIDGET, remove widget abstraction class (WinUI)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
177
diff
changeset
|
88 | #include <Windows.h> |
c52d88ea020b
redefine UIWIDGET, remove widget abstraction class (WinUI)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
177
diff
changeset
|
89 | #undef GetCurrentTime |
c52d88ea020b
redefine UIWIDGET, remove widget abstraction class (WinUI)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
177
diff
changeset
|
90 | #include <winrt/Windows.Foundation.Collections.h> |
c52d88ea020b
redefine UIWIDGET, remove widget abstraction class (WinUI)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
177
diff
changeset
|
91 | #include <winrt/Windows.UI.Xaml.Interop.h> |
c52d88ea020b
redefine UIWIDGET, remove widget abstraction class (WinUI)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
177
diff
changeset
|
92 | #include <winrt/Microsoft.UI.Xaml.Controls.h> |
205
b1ac0dd1d38b
new winui vs project, add toolbar
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
201
diff
changeset
|
93 | #endif |
181
c52d88ea020b
redefine UIWIDGET, remove widget abstraction class (WinUI)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
177
diff
changeset
|
94 | |
183
3ce2eb11913b
create WinUI wrapper classes for usage in UiObject and widget creation functions
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
181
diff
changeset
|
95 | class UiWindow { |
3ce2eb11913b
create WinUI wrapper classes for usage in UiObject and widget creation functions
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
181
diff
changeset
|
96 | public: |
3ce2eb11913b
create WinUI wrapper classes for usage in UiObject and widget creation functions
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
181
diff
changeset
|
97 | winrt::Microsoft::UI::Xaml::Window window { nullptr }; |
3ce2eb11913b
create WinUI wrapper classes for usage in UiObject and widget creation functions
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
181
diff
changeset
|
98 | |
3ce2eb11913b
create WinUI wrapper classes for usage in UiObject and widget creation functions
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
181
diff
changeset
|
99 | UiWindow(winrt::Microsoft::UI::Xaml::Window& win); |
3ce2eb11913b
create WinUI wrapper classes for usage in UiObject and widget creation functions
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
181
diff
changeset
|
100 | }; |
3ce2eb11913b
create WinUI wrapper classes for usage in UiObject and widget creation functions
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
181
diff
changeset
|
101 | |
3ce2eb11913b
create WinUI wrapper classes for usage in UiObject and widget creation functions
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
181
diff
changeset
|
102 | class UiWidget { |
3ce2eb11913b
create WinUI wrapper classes for usage in UiObject and widget creation functions
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
181
diff
changeset
|
103 | public: |
3ce2eb11913b
create WinUI wrapper classes for usage in UiObject and widget creation functions
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
181
diff
changeset
|
104 | winrt::Microsoft::UI::Xaml::UIElement uielement; |
196
320d85f3cd14
add listview (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
192
diff
changeset
|
105 | void* data1 = nullptr; |
320d85f3cd14
add listview (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
192
diff
changeset
|
106 | void* data2 = nullptr; |
320d85f3cd14
add listview (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
192
diff
changeset
|
107 | void* data3 = nullptr; |
379
958bae372271
implement ui_dialog_window (WINUI)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
378
diff
changeset
|
108 | std::function<void()> Show; |
183
3ce2eb11913b
create WinUI wrapper classes for usage in UiObject and widget creation functions
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
181
diff
changeset
|
109 | UiWidget(winrt::Microsoft::UI::Xaml::UIElement& elm); |
184
8c9b4b28aaa9
implement ui_button (WinUI)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
183
diff
changeset
|
110 | |
183
3ce2eb11913b
create WinUI wrapper classes for usage in UiObject and widget creation functions
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
181
diff
changeset
|
111 | }; |
3ce2eb11913b
create WinUI wrapper classes for usage in UiObject and widget creation functions
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
181
diff
changeset
|
112 | |
3ce2eb11913b
create WinUI wrapper classes for usage in UiObject and widget creation functions
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
181
diff
changeset
|
113 | #define UIWIDGET UiWidget* |
3ce2eb11913b
create WinUI wrapper classes for usage in UiObject and widget creation functions
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
181
diff
changeset
|
114 | #define UIWINDOW UiWindow* |
181
c52d88ea020b
redefine UIWIDGET, remove widget abstraction class (WinUI)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
177
diff
changeset
|
115 | #define UIMENU void* |
c52d88ea020b
redefine UIWIDGET, remove widget abstraction class (WinUI)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
177
diff
changeset
|
116 | |
183
3ce2eb11913b
create WinUI wrapper classes for usage in UiObject and widget creation functions
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
181
diff
changeset
|
117 | /* |
3ce2eb11913b
create WinUI wrapper classes for usage in UiObject and widget creation functions
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
181
diff
changeset
|
118 | // winrt::Microsoft::UI::Xaml::UIElement |
3ce2eb11913b
create WinUI wrapper classes for usage in UiObject and widget creation functions
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
181
diff
changeset
|
119 | #define UIWIDGET void* |
3ce2eb11913b
create WinUI wrapper classes for usage in UiObject and widget creation functions
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
181
diff
changeset
|
120 | // winrt::Microsoft::UI::Xaml::Window |
3ce2eb11913b
create WinUI wrapper classes for usage in UiObject and widget creation functions
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
181
diff
changeset
|
121 | #define UIWINDOW void* |
3ce2eb11913b
create WinUI wrapper classes for usage in UiObject and widget creation functions
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
181
diff
changeset
|
122 | #define UIMENU void* |
3ce2eb11913b
create WinUI wrapper classes for usage in UiObject and widget creation functions
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
181
diff
changeset
|
123 | */ |
3ce2eb11913b
create WinUI wrapper classes for usage in UiObject and widget creation functions
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
181
diff
changeset
|
124 | |
181
c52d88ea020b
redefine UIWIDGET, remove widget abstraction class (WinUI)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
177
diff
changeset
|
125 | #else |
78
135920fe441b
added initial WPF code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
66
diff
changeset
|
126 | #define UIWIDGET void* |
181
c52d88ea020b
redefine UIWIDGET, remove widget abstraction class (WinUI)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
177
diff
changeset
|
127 | #define UIWINDOW void* |
115
102fc0b8fe3e
improved context menus
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
111
diff
changeset
|
128 | #define UIMENU void* |
0 | 129 | #endif |
130 | ||
181
c52d88ea020b
redefine UIWIDGET, remove widget abstraction class (WinUI)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
177
diff
changeset
|
131 | |
c52d88ea020b
redefine UIWIDGET, remove widget abstraction class (WinUI)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
177
diff
changeset
|
132 | #endif |
c52d88ea020b
redefine UIWIDGET, remove widget abstraction class (WinUI)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
177
diff
changeset
|
133 | |
66
8d490d97aab8
added button and box container (Qt)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
64
diff
changeset
|
134 | #ifndef TRUE |
8d490d97aab8
added button and box container (Qt)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
64
diff
changeset
|
135 | #define TRUE 1 |
8d490d97aab8
added button and box container (Qt)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
64
diff
changeset
|
136 | #endif |
8d490d97aab8
added button and box container (Qt)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
64
diff
changeset
|
137 | #ifndef FALSE |
8d490d97aab8
added button and box container (Qt)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
64
diff
changeset
|
138 | #define FALSE 0 |
8d490d97aab8
added button and box container (Qt)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
64
diff
changeset
|
139 | #endif |
8d490d97aab8
added button and box container (Qt)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
64
diff
changeset
|
140 | |
177
e79a60b3a7cb
minimal working winui app
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
173
diff
changeset
|
141 | #ifndef UIEXPORT |
e79a60b3a7cb
minimal working winui app
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
173
diff
changeset
|
142 | #define UIEXPORT |
e79a60b3a7cb
minimal working winui app
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
173
diff
changeset
|
143 | #endif |
e79a60b3a7cb
minimal working winui app
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
173
diff
changeset
|
144 | |
0 | 145 | #ifdef __cplusplus |
146 | extern "C" { | |
147 | #endif | |
148 | ||
90
2019fdbaadfd
persistent textarea cursor position
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
78
diff
changeset
|
149 | #define UI_GROUP_SELECTION 20000 |
208 | 150 | |
343
54f5d7eb1335
implement widget groups for buttons (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
342
diff
changeset
|
151 | #define UI_GROUPS(...) (const int[]){ __VA_ARGS__, -1 } |
22
bcf880b29bc3
textarea automatically sets selection group (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
21
diff
changeset
|
152 | |
0 | 153 | /* public types */ |
411
3e91b7aff6a1
add sourcelist widget (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
406
diff
changeset
|
154 | typedef _Bool UiBool; |
59
eb6611be50c7
added box container (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
54
diff
changeset
|
155 | |
90
2019fdbaadfd
persistent textarea cursor position
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
78
diff
changeset
|
156 | typedef struct UiObject UiObject; |
404
384f6d1f5784
add first working cocoa code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
394
diff
changeset
|
157 | typedef struct UiContainerX UiContainerX; |
90
2019fdbaadfd
persistent textarea cursor position
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
78
diff
changeset
|
158 | typedef struct UiEvent UiEvent; |
95
29f5cd5f5367
added drawing area (Gtk)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
94
diff
changeset
|
159 | typedef struct UiMouseEvent UiMouseEvent; |
90
2019fdbaadfd
persistent textarea cursor position
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
78
diff
changeset
|
160 | typedef struct UiObserver UiObserver; |
0 | 161 | |
90
2019fdbaadfd
persistent textarea cursor position
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
78
diff
changeset
|
162 | typedef struct UiInteger UiInteger; |
145
853685152c1d
adds spinner widget (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
144
diff
changeset
|
163 | typedef struct UiDouble UiDouble; |
90
2019fdbaadfd
persistent textarea cursor position
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
78
diff
changeset
|
164 | typedef struct UiString UiString; |
2019fdbaadfd
persistent textarea cursor position
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
78
diff
changeset
|
165 | typedef struct UiText UiText; |
2019fdbaadfd
persistent textarea cursor position
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
78
diff
changeset
|
166 | typedef struct UiList UiList; |
118
bb21210e9cac
added scrollbar (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
116
diff
changeset
|
167 | typedef struct UiRange UiRange; |
337
2904fba2708b
add UiGeneric var type
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
302
diff
changeset
|
168 | typedef struct UiGeneric UiGeneric; |
0 | 169 | |
141
cc2170ea05ad
improves doc detach and string value handling
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
140
diff
changeset
|
170 | typedef struct UiStr UiStr; |
cc2170ea05ad
improves doc detach and string value handling
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
140
diff
changeset
|
171 | |
243
9f66c31a27ed
implement table dnd drop
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
241
diff
changeset
|
172 | typedef struct UiFileList UiFileList; |
9f66c31a27ed
implement table dnd drop
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
241
diff
changeset
|
173 | |
248
22257f5f4019
add getter for list selections (Common, WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
247
diff
changeset
|
174 | typedef struct UiListSelection UiListSelection; |
22257f5f4019
add getter for list selections (Common, WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
247
diff
changeset
|
175 | |
140
c03c338a7dcf
refactors value binding system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
133
diff
changeset
|
176 | /* begin opaque types */ |
388
473c03f85197
add menu builder API
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
387
diff
changeset
|
177 | typedef struct UiContext UiContext; |
473c03f85197
add menu builder API
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
387
diff
changeset
|
178 | typedef struct UiContainer UiContainer; |
473c03f85197
add menu builder API
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
387
diff
changeset
|
179 | typedef struct UiMenuBuilder UiMenuBuilder; |
146
dd0ae1c62a72
new icon/image api and pixbuf support in treeview (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
145
diff
changeset
|
180 | |
388
473c03f85197
add menu builder API
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
387
diff
changeset
|
181 | typedef struct UiIcon UiIcon; |
473c03f85197
add menu builder API
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
387
diff
changeset
|
182 | typedef struct UiImage UiImage; |
147
2e384acc89a6
adds simple drag and drop support (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
146
diff
changeset
|
183 | |
388
473c03f85197
add menu builder API
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
387
diff
changeset
|
184 | typedef struct UiDnD UiDnD; |
235
9c79f00fbf36
add threadpool (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
234
diff
changeset
|
185 | |
388
473c03f85197
add menu builder API
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
387
diff
changeset
|
186 | typedef struct UiThreadpool UiThreadpool; |
140
c03c338a7dcf
refactors value binding system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
133
diff
changeset
|
187 | /* end opaque types */ |
0 | 188 | |
52
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
38
diff
changeset
|
189 | typedef struct UiTabbedPane UiTabbedPane; |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
38
diff
changeset
|
190 | |
186
5db4979bf482
implement new api style for ui_button (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
184
diff
changeset
|
191 | typedef enum UiTri UiTri; |
230
4f5b32a2a60f
add icon parameter for buttons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
224
diff
changeset
|
192 | typedef enum UiLabelType UiLabelType; |
186
5db4979bf482
implement new api style for ui_button (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
184
diff
changeset
|
193 | |
394
bedd499b640d
implement table dnd (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
388
diff
changeset
|
194 | typedef enum UiDnDAction UiDnDAction; |
bedd499b640d
implement table dnd (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
388
diff
changeset
|
195 | |
95
29f5cd5f5367
added drawing area (Gtk)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
94
diff
changeset
|
196 | enum UiMouseEventType { UI_PRESS = 0, UI_PRESS2 }; |
29f5cd5f5367
added drawing area (Gtk)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
94
diff
changeset
|
197 | |
230
4f5b32a2a60f
add icon parameter for buttons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
224
diff
changeset
|
198 | enum UiLabelType { UI_LABEL_DEFAULT, UI_LABEL_TEXT, UI_LABEL_ICON, UI_LABEL_TEXT_ICON }; |
4f5b32a2a60f
add icon parameter for buttons (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
224
diff
changeset
|
199 | |
394
bedd499b640d
implement table dnd (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
388
diff
changeset
|
200 | enum UiDnDAction { UI_DND_ACTION_NONE, UI_DND_ACTION_COPY, UI_DND_ACTION_MOVE, UI_DND_ACTION_LINK, UI_DND_ACTION_CUSTOM }; |
33
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
29
diff
changeset
|
201 | |
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
29
diff
changeset
|
202 | 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
|
203 | |
142
46448d38885c
new checkbox and radionbutton features and more refactoring
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
141
diff
changeset
|
204 | typedef void*(*ui_getvaluefunc)(void*, int); |
33
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
29
diff
changeset
|
205 | |
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
29
diff
changeset
|
206 | typedef int(*ui_threadfunc)(void*); |
0 | 207 | |
141
cc2170ea05ad
improves doc detach and string value handling
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
140
diff
changeset
|
208 | typedef void(*ui_freefunc)(void*); |
cc2170ea05ad
improves doc detach and string value handling
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
140
diff
changeset
|
209 | |
343
54f5d7eb1335
implement widget groups for buttons (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
342
diff
changeset
|
210 | typedef void(*ui_enablefunc)(void*, int); |
168
1b99acacc5bb
refactor widget groups
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
167
diff
changeset
|
211 | |
0 | 212 | struct UiObject { |
2
eeb50c534497
added support for replaceable documents
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
1
diff
changeset
|
213 | /* |
eeb50c534497
added support for replaceable documents
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
1
diff
changeset
|
214 | * native widget |
eeb50c534497
added support for replaceable documents
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
1
diff
changeset
|
215 | */ |
33
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
29
diff
changeset
|
216 | UIWIDGET widget; |
181
c52d88ea020b
redefine UIWIDGET, remove widget abstraction class (WinUI)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
177
diff
changeset
|
217 | |
404
384f6d1f5784
add first working cocoa code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
394
diff
changeset
|
218 | #if defined(UI_COCOA) || defined(UI_WINUI) |
181
c52d88ea020b
redefine UIWIDGET, remove widget abstraction class (WinUI)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
177
diff
changeset
|
219 | /* |
c52d88ea020b
redefine UIWIDGET, remove widget abstraction class (WinUI)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
177
diff
changeset
|
220 | * native window object |
c52d88ea020b
redefine UIWIDGET, remove widget abstraction class (WinUI)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
177
diff
changeset
|
221 | */ |
c52d88ea020b
redefine UIWIDGET, remove widget abstraction class (WinUI)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
177
diff
changeset
|
222 | UIWINDOW wobj; |
c52d88ea020b
redefine UIWIDGET, remove widget abstraction class (WinUI)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
177
diff
changeset
|
223 | #endif |
2
eeb50c534497
added support for replaceable documents
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
1
diff
changeset
|
224 | |
eeb50c534497
added support for replaceable documents
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
1
diff
changeset
|
225 | /* |
eeb50c534497
added support for replaceable documents
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
1
diff
changeset
|
226 | * user window data |
eeb50c534497
added support for replaceable documents
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
1
diff
changeset
|
227 | */ |
33
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
29
diff
changeset
|
228 | void *window; |
2
eeb50c534497
added support for replaceable documents
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
1
diff
changeset
|
229 | |
eeb50c534497
added support for replaceable documents
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
1
diff
changeset
|
230 | /* |
140
c03c338a7dcf
refactors value binding system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
133
diff
changeset
|
231 | * window context |
4
39b9b86ec452
added simple container
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
2
diff
changeset
|
232 | */ |
33
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
29
diff
changeset
|
233 | UiContext *ctx; |
4
39b9b86ec452
added simple container
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
2
diff
changeset
|
234 | |
39b9b86ec452
added simple container
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
2
diff
changeset
|
235 | /* |
404
384f6d1f5784
add first working cocoa code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
394
diff
changeset
|
236 | * container interface (deprecated) |
4
39b9b86ec452
added simple container
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
2
diff
changeset
|
237 | */ |
39b9b86ec452
added simple container
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
2
diff
changeset
|
238 | UiContainer *container; |
33
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
29
diff
changeset
|
239 | |
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
29
diff
changeset
|
240 | /* |
404
384f6d1f5784
add first working cocoa code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
394
diff
changeset
|
241 | * container list |
384f6d1f5784
add first working cocoa code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
394
diff
changeset
|
242 | * TODO: remove old UiContainer and rename UiContainerX to UiContainer |
384f6d1f5784
add first working cocoa code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
394
diff
changeset
|
243 | */ |
384f6d1f5784
add first working cocoa code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
394
diff
changeset
|
244 | UiContainerX *container_begin; |
384f6d1f5784
add first working cocoa code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
394
diff
changeset
|
245 | UiContainerX *container_end; |
384f6d1f5784
add first working cocoa code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
394
diff
changeset
|
246 | |
384f6d1f5784
add first working cocoa code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
394
diff
changeset
|
247 | /* |
33
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
29
diff
changeset
|
248 | * next container object |
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
29
diff
changeset
|
249 | */ |
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
29
diff
changeset
|
250 | UiObject *next; |
383
03599608d555
add UiObject reference counting (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
379
diff
changeset
|
251 | |
03599608d555
add UiObject reference counting (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
379
diff
changeset
|
252 | /* |
03599608d555
add UiObject reference counting (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
379
diff
changeset
|
253 | * obj destroy func |
03599608d555
add UiObject reference counting (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
379
diff
changeset
|
254 | */ |
03599608d555
add UiObject reference counting (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
379
diff
changeset
|
255 | void (*destroy)(UiObject *obj); |
03599608d555
add UiObject reference counting (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
379
diff
changeset
|
256 | |
03599608d555
add UiObject reference counting (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
379
diff
changeset
|
257 | /* |
03599608d555
add UiObject reference counting (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
379
diff
changeset
|
258 | * reference counter |
03599608d555
add UiObject reference counting (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
379
diff
changeset
|
259 | */ |
03599608d555
add UiObject reference counting (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
379
diff
changeset
|
260 | unsigned int ref; |
0 | 261 | }; |
262 | ||
52
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
38
diff
changeset
|
263 | struct UiTabbedPane { |
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 | * native widget |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
38
diff
changeset
|
266 | */ |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
38
diff
changeset
|
267 | UIWIDGET widget; |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
38
diff
changeset
|
268 | |
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 | * current document |
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 | void *document; |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
38
diff
changeset
|
273 | |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
38
diff
changeset
|
274 | /* |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
38
diff
changeset
|
275 | * parent context |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
38
diff
changeset
|
276 | */ |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
38
diff
changeset
|
277 | UiContext *ctx; |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
38
diff
changeset
|
278 | }; |
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
38
diff
changeset
|
279 | |
0 | 280 | struct UiEvent { |
281 | UiObject *obj; | |
282 | void *document; | |
283 | void *window; | |
16
a499c8a72c15
added menu item lists (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
14
diff
changeset
|
284 | void *eventdata; |
0 | 285 | int intval; |
286 | }; | |
287 | ||
95
29f5cd5f5367
added drawing area (Gtk)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
94
diff
changeset
|
288 | struct UiMouseEvent { |
29f5cd5f5367
added drawing area (Gtk)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
94
diff
changeset
|
289 | int x; |
29f5cd5f5367
added drawing area (Gtk)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
94
diff
changeset
|
290 | int y; |
29f5cd5f5367
added drawing area (Gtk)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
94
diff
changeset
|
291 | enum UiMouseEventType type; |
29f5cd5f5367
added drawing area (Gtk)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
94
diff
changeset
|
292 | int button; |
29f5cd5f5367
added drawing area (Gtk)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
94
diff
changeset
|
293 | }; |
29f5cd5f5367
added drawing area (Gtk)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
94
diff
changeset
|
294 | |
14
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
295 | struct UiObserver { |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
296 | ui_callback callback; |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
297 | void *data; |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
298 | UiObserver *next; |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
299 | }; |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
300 | |
141
cc2170ea05ad
improves doc detach and string value handling
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
140
diff
changeset
|
301 | struct UiStr { |
cc2170ea05ad
improves doc detach and string value handling
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
140
diff
changeset
|
302 | char *ptr; |
cc2170ea05ad
improves doc detach and string value handling
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
140
diff
changeset
|
303 | void (*free)(void *v); |
cc2170ea05ad
improves doc detach and string value handling
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
140
diff
changeset
|
304 | }; |
cc2170ea05ad
improves doc detach and string value handling
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
140
diff
changeset
|
305 | |
0 | 306 | struct UiInteger { |
144
29d98cff4f56
UiInteger uses int64 now
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
142
diff
changeset
|
307 | int64_t (*get)(UiInteger*); |
29d98cff4f56
UiInteger uses int64 now
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
142
diff
changeset
|
308 | void (*set)(UiInteger*, int64_t); |
140
c03c338a7dcf
refactors value binding system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
133
diff
changeset
|
309 | void *obj; |
c03c338a7dcf
refactors value binding system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
133
diff
changeset
|
310 | |
145
853685152c1d
adds spinner widget (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
144
diff
changeset
|
311 | int64_t value; |
853685152c1d
adds spinner widget (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
144
diff
changeset
|
312 | UiObserver *observers; |
853685152c1d
adds spinner widget (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
144
diff
changeset
|
313 | }; |
853685152c1d
adds spinner widget (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
144
diff
changeset
|
314 | |
853685152c1d
adds spinner widget (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
144
diff
changeset
|
315 | struct UiDouble { |
853685152c1d
adds spinner widget (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
144
diff
changeset
|
316 | double (*get)(UiDouble*); |
853685152c1d
adds spinner widget (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
144
diff
changeset
|
317 | void (*set)(UiDouble*, double); |
853685152c1d
adds spinner widget (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
144
diff
changeset
|
318 | void *obj; |
853685152c1d
adds spinner widget (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
144
diff
changeset
|
319 | |
853685152c1d
adds spinner widget (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
144
diff
changeset
|
320 | double value; |
140
c03c338a7dcf
refactors value binding system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
133
diff
changeset
|
321 | UiObserver *observers; |
0 | 322 | }; |
323 | ||
324 | struct UiString { | |
325 | char* (*get)(UiString*); | |
192
bcacd00ea955
implement textfield (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
186
diff
changeset
|
326 | void (*set)(UiString*, const char*); |
140
c03c338a7dcf
refactors value binding system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
133
diff
changeset
|
327 | void *obj; |
c03c338a7dcf
refactors value binding system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
133
diff
changeset
|
328 | |
141
cc2170ea05ad
improves doc detach and string value handling
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
140
diff
changeset
|
329 | UiStr value; |
140
c03c338a7dcf
refactors value binding system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
133
diff
changeset
|
330 | UiObserver *observers; |
0 | 331 | }; |
332 | ||
5 | 333 | struct UiText { |
253
087cc9216f28
initial newapi GTK port
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
251
diff
changeset
|
334 | void (*set)(UiText*, const char*); |
5 | 335 | char* (*get)(UiText*); |
140
c03c338a7dcf
refactors value binding system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
133
diff
changeset
|
336 | char* (*getsubstr)(UiText*, int, int); /* text, begin, end */ |
12
fe94e0fb9ef3
added some text functions
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
6
diff
changeset
|
337 | void (*insert)(UiText*, int, char*); |
90
2019fdbaadfd
persistent textarea cursor position
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
78
diff
changeset
|
338 | void (*setposition)(UiText*,int); |
26
a137277f9173
added copy & paste (Cocoa)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
24
diff
changeset
|
339 | int (*position)(UiText*); |
140
c03c338a7dcf
refactors value binding system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
133
diff
changeset
|
340 | 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
|
341 | int (*length)(UiText*); |
140
c03c338a7dcf
refactors value binding system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
133
diff
changeset
|
342 | void (*remove)(UiText*, int, int); /* text, begin, end */ |
141
cc2170ea05ad
improves doc detach and string value handling
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
140
diff
changeset
|
343 | UiStr value; |
90
2019fdbaadfd
persistent textarea cursor position
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
78
diff
changeset
|
344 | int pos; |
5 | 345 | void *obj; |
6
05a18c56d9ca
added undo for text
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
5
diff
changeset
|
346 | void *undomgr; |
140
c03c338a7dcf
refactors value binding system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
133
diff
changeset
|
347 | // TODO: replacefunc, ... |
c03c338a7dcf
refactors value binding system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
133
diff
changeset
|
348 | UiObserver *observers; |
5 | 349 | }; |
337
2904fba2708b
add UiGeneric var type
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
302
diff
changeset
|
350 | |
2904fba2708b
add UiGeneric var type
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
302
diff
changeset
|
351 | struct UiGeneric { |
2904fba2708b
add UiGeneric var type
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
302
diff
changeset
|
352 | void* (*get)(UiGeneric*); |
2904fba2708b
add UiGeneric var type
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
302
diff
changeset
|
353 | const char* (*get_type)(UiGeneric*); |
339
b68b5f984074
add minimally working image viewer (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
337
diff
changeset
|
354 | int (*set)(UiGeneric*, void *, const char *type); |
337
2904fba2708b
add UiGeneric var type
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
302
diff
changeset
|
355 | void *obj; |
2904fba2708b
add UiGeneric var type
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
302
diff
changeset
|
356 | |
2904fba2708b
add UiGeneric var type
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
302
diff
changeset
|
357 | void *value; |
2904fba2708b
add UiGeneric var type
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
302
diff
changeset
|
358 | const char *type; |
2904fba2708b
add UiGeneric var type
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
302
diff
changeset
|
359 | UiObserver *observers; |
2904fba2708b
add UiGeneric var type
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
302
diff
changeset
|
360 | }; |
14
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
361 | |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
362 | /* |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
363 | * abstract list |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
364 | */ |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
365 | struct UiList { |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
366 | /* get the first element */ |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
367 | void*(*first)(UiList *list); |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
368 | /* get the next element */ |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
369 | void*(*next)(UiList *list); |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
370 | /* get the nth element */ |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
371 | void*(*get)(UiList *list, int i); |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
372 | /* get the number of elements */ |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
373 | int(*count)(UiList *list); |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
374 | /* iterator changes after first() next() and get() */ |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
375 | void *iter; |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
376 | /* private - implementation dependent */ |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
377 | void *data; |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
378 | |
248
22257f5f4019
add getter for list selections (Common, WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
247
diff
changeset
|
379 | /* binding functions */ |
140
c03c338a7dcf
refactors value binding system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
133
diff
changeset
|
380 | void (*update)(UiList *list, int i); |
248
22257f5f4019
add getter for list selections (Common, WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
247
diff
changeset
|
381 | UiListSelection (*getselection)(UiList *list); |
360
681b930abe84
implement combobox get/set selection (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
347
diff
changeset
|
382 | void (*setselection)(UiList *list, UiListSelection selection); |
140
c03c338a7dcf
refactors value binding system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
133
diff
changeset
|
383 | /* binding object */ |
c03c338a7dcf
refactors value binding system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
133
diff
changeset
|
384 | void *obj; |
c03c338a7dcf
refactors value binding system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
133
diff
changeset
|
385 | |
c03c338a7dcf
refactors value binding system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
133
diff
changeset
|
386 | /* list of observers */ |
c03c338a7dcf
refactors value binding system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
133
diff
changeset
|
387 | UiObserver *observers; |
14
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
388 | }; |
5 | 389 | |
248
22257f5f4019
add getter for list selections (Common, WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
247
diff
changeset
|
390 | |
22257f5f4019
add getter for list selections (Common, WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
247
diff
changeset
|
391 | struct UiListSelection { |
22257f5f4019
add getter for list selections (Common, WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
247
diff
changeset
|
392 | /* |
22257f5f4019
add getter for list selections (Common, WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
247
diff
changeset
|
393 | * number of selected items |
22257f5f4019
add getter for list selections (Common, WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
247
diff
changeset
|
394 | */ |
22257f5f4019
add getter for list selections (Common, WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
247
diff
changeset
|
395 | int count; |
22257f5f4019
add getter for list selections (Common, WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
247
diff
changeset
|
396 | |
22257f5f4019
add getter for list selections (Common, WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
247
diff
changeset
|
397 | /* |
22257f5f4019
add getter for list selections (Common, WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
247
diff
changeset
|
398 | * indices of selected rows |
22257f5f4019
add getter for list selections (Common, WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
247
diff
changeset
|
399 | */ |
22257f5f4019
add getter for list selections (Common, WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
247
diff
changeset
|
400 | int *rows; |
22257f5f4019
add getter for list selections (Common, WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
247
diff
changeset
|
401 | }; |
22257f5f4019
add getter for list selections (Common, WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
247
diff
changeset
|
402 | |
118
bb21210e9cac
added scrollbar (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
116
diff
changeset
|
403 | struct UiRange { |
bb21210e9cac
added scrollbar (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
116
diff
changeset
|
404 | double (*get)(UiRange *range); |
bb21210e9cac
added scrollbar (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
116
diff
changeset
|
405 | void (*set)(UiRange *range, double value); |
bb21210e9cac
added scrollbar (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
116
diff
changeset
|
406 | void (*setrange)(UiRange *range, double min, double max); |
bb21210e9cac
added scrollbar (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
116
diff
changeset
|
407 | void (*setextent)(UiRange *range, double extent); |
bb21210e9cac
added scrollbar (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
116
diff
changeset
|
408 | double value; |
bb21210e9cac
added scrollbar (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
116
diff
changeset
|
409 | double min; |
bb21210e9cac
added scrollbar (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
116
diff
changeset
|
410 | double max; |
bb21210e9cac
added scrollbar (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
116
diff
changeset
|
411 | double extent; |
bb21210e9cac
added scrollbar (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
116
diff
changeset
|
412 | void *obj; |
140
c03c338a7dcf
refactors value binding system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
133
diff
changeset
|
413 | /* list of observers */ |
c03c338a7dcf
refactors value binding system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
133
diff
changeset
|
414 | UiObserver *observers; |
118
bb21210e9cac
added scrollbar (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
116
diff
changeset
|
415 | }; |
bb21210e9cac
added scrollbar (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
116
diff
changeset
|
416 | |
186
5db4979bf482
implement new api style for ui_button (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
184
diff
changeset
|
417 | enum UiTri { |
5db4979bf482
implement new api style for ui_button (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
184
diff
changeset
|
418 | UI_DEFAULT = 0, |
5db4979bf482
implement new api style for ui_button (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
184
diff
changeset
|
419 | UI_ON, |
5db4979bf482
implement new api style for ui_button (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
184
diff
changeset
|
420 | UI_OFF |
5db4979bf482
implement new api style for ui_button (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
184
diff
changeset
|
421 | }; |
5db4979bf482
implement new api style for ui_button (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
184
diff
changeset
|
422 | |
243
9f66c31a27ed
implement table dnd drop
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
241
diff
changeset
|
423 | struct UiFileList { |
9f66c31a27ed
implement table dnd drop
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
241
diff
changeset
|
424 | char **files; |
9f66c31a27ed
implement table dnd drop
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
241
diff
changeset
|
425 | size_t nfiles; |
9f66c31a27ed
implement table dnd drop
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
241
diff
changeset
|
426 | }; |
9f66c31a27ed
implement table dnd drop
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
241
diff
changeset
|
427 | |
347
6f0d0b0d97f5
add conditional variable API
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
343
diff
changeset
|
428 | typedef struct UiCondVar { |
6f0d0b0d97f5
add conditional variable API
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
343
diff
changeset
|
429 | void *data; |
6f0d0b0d97f5
add conditional variable API
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
343
diff
changeset
|
430 | int intdata; |
6f0d0b0d97f5
add conditional variable API
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
343
diff
changeset
|
431 | } UiCondVar; |
6f0d0b0d97f5
add conditional variable API
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
343
diff
changeset
|
432 | |
33
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
29
diff
changeset
|
433 | |
201
7f67ebbb0c1c
add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
196
diff
changeset
|
434 | UIEXPORT void ui_init(const char *appname, int argc, char **argv); |
7f67ebbb0c1c
add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
196
diff
changeset
|
435 | UIEXPORT const char* ui_appname(); |
0 | 436 | |
201
7f67ebbb0c1c
add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
196
diff
changeset
|
437 | UIEXPORT UiContext* ui_global_context(void); |
167
161511838ea6
add new toolbar toggle button
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
163
diff
changeset
|
438 | |
201
7f67ebbb0c1c
add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
196
diff
changeset
|
439 | UIEXPORT void ui_context_closefunc(UiContext *ctx, ui_callback fnc, void *udata); |
111
40dbf1a7526a
added close handler to UiContext (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
109
diff
changeset
|
440 | |
247
4b21af9d8c5a
call context close handler on window close (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
246
diff
changeset
|
441 | UIEXPORT void ui_context_destroy(UiContext *ctx); |
4b21af9d8c5a
call context close handler on window close (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
246
diff
changeset
|
442 | |
383
03599608d555
add UiObject reference counting (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
379
diff
changeset
|
443 | UIEXPORT void ui_object_ref(UiObject *obj); |
406
0ebf9d7b23e8
add first code of the new Motif implementation, implement buttons
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
404
diff
changeset
|
444 | UIEXPORT int ui_object_unref(UiObject *obj); |
383
03599608d555
add UiObject reference counting (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
379
diff
changeset
|
445 | |
201
7f67ebbb0c1c
add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
196
diff
changeset
|
446 | UIEXPORT void ui_onstartup(ui_callback f, void *userdata); |
7f67ebbb0c1c
add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
196
diff
changeset
|
447 | UIEXPORT void ui_onopen(ui_callback f, void *userdata); |
7f67ebbb0c1c
add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
196
diff
changeset
|
448 | UIEXPORT void ui_onexit(ui_callback f, void *userdata); |
133
6dd780cbc8c6
using GtkApplication now
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
129
diff
changeset
|
449 | |
404
384f6d1f5784
add first working cocoa code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
394
diff
changeset
|
450 | UIEXPORT void ui_main(void); |
201
7f67ebbb0c1c
add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
196
diff
changeset
|
451 | UIEXPORT void ui_show(UiObject *obj); |
7f67ebbb0c1c
add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
196
diff
changeset
|
452 | UIEXPORT void ui_close(UiObject *obj); |
33
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
29
diff
changeset
|
453 | |
201
7f67ebbb0c1c
add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
196
diff
changeset
|
454 | UIEXPORT void ui_job(UiObject *obj, ui_threadfunc tf, void *td, ui_callback f, void *fd); |
234
9036b346cd66
implement ui_job() and add ui_call_mainthread (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
231
diff
changeset
|
455 | UIEXPORT void ui_call_mainthread(ui_threadfunc tf, void* td); |
235
9c79f00fbf36
add threadpool (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
234
diff
changeset
|
456 | UIEXPORT UiThreadpool* ui_threadpool_create(int nthreads); |
9c79f00fbf36
add threadpool (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
234
diff
changeset
|
457 | UIEXPORT void ui_threadpool_destroy(UiThreadpool* pool); |
9c79f00fbf36
add threadpool (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
234
diff
changeset
|
458 | UIEXPORT void ui_threadpool_job(UiThreadpool* pool, 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
|
459 | |
201
7f67ebbb0c1c
add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
196
diff
changeset
|
460 | UIEXPORT void* ui_document_new(size_t size); |
7f67ebbb0c1c
add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
196
diff
changeset
|
461 | UIEXPORT void ui_document_destroy(void *doc); |
52
25e5390cce41
added document tabview (GTK, Motif)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
38
diff
changeset
|
462 | |
201
7f67ebbb0c1c
add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
196
diff
changeset
|
463 | UIEXPORT void ui_set_document(UiObject *obj, void *document); // deprecated |
7f67ebbb0c1c
add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
196
diff
changeset
|
464 | UIEXPORT void ui_detach_document(UiObject *obj); // deprecated |
7f67ebbb0c1c
add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
196
diff
changeset
|
465 | UIEXPORT void* ui_get_document(UiObject *obj); // deprecated |
7f67ebbb0c1c
add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
196
diff
changeset
|
466 | UIEXPORT void ui_set_subdocument(void *document, void *sub); // deprecated |
7f67ebbb0c1c
add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
196
diff
changeset
|
467 | UIEXPORT void ui_detach_subdocument(void *document, void *sub); // deprecated |
7f67ebbb0c1c
add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
196
diff
changeset
|
468 | UIEXPORT void* ui_get_subdocument(void *document); // deprecated |
2
eeb50c534497
added support for replaceable documents
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
1
diff
changeset
|
469 | |
201
7f67ebbb0c1c
add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
196
diff
changeset
|
470 | UIEXPORT UiContext* ui_document_context(void *doc); |
37
56016468753d
refactored value binding system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
35
diff
changeset
|
471 | |
201
7f67ebbb0c1c
add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
196
diff
changeset
|
472 | UIEXPORT void ui_attach_document(UiContext *ctx, void *document); |
7f67ebbb0c1c
add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
196
diff
changeset
|
473 | UIEXPORT void ui_detach_document2(UiContext *ctx, void *document); |
38
8ccdde37275b
added some allocation functions
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
37
diff
changeset
|
474 | |
201
7f67ebbb0c1c
add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
196
diff
changeset
|
475 | UIEXPORT void ui_widget_set_groups(UiContext *ctx, UIWIDGET widget, ui_enablefunc enable, ...); |
168
1b99acacc5bb
refactor widget groups
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
167
diff
changeset
|
476 | |
201
7f67ebbb0c1c
add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
196
diff
changeset
|
477 | UIEXPORT void ui_set_group(UiContext *ctx, int group); |
7f67ebbb0c1c
add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
196
diff
changeset
|
478 | UIEXPORT void ui_unset_group(UiContext *ctx, int group); |
7f67ebbb0c1c
add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
196
diff
changeset
|
479 | UIEXPORT 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
|
480 | |
342
99f83fbf48e9
implement context destroy
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
341
diff
changeset
|
481 | UIEXPORT void* ui_allocator(UiContext *ctx); |
387
80edb1a93f7a
add public function for getting the UiContext UCX mempool
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
383
diff
changeset
|
482 | UIEXPORT void* ui_cx_mempool(UiContext *ctx); |
80edb1a93f7a
add public function for getting the UiContext UCX mempool
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
383
diff
changeset
|
483 | |
201
7f67ebbb0c1c
add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
196
diff
changeset
|
484 | UIEXPORT void* ui_malloc(UiContext *ctx, size_t size); |
7f67ebbb0c1c
add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
196
diff
changeset
|
485 | UIEXPORT void* ui_calloc(UiContext *ctx, size_t nelem, size_t elsize); |
7f67ebbb0c1c
add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
196
diff
changeset
|
486 | UIEXPORT void ui_free(UiContext *ctx, void *ptr); |
7f67ebbb0c1c
add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
196
diff
changeset
|
487 | UIEXPORT void* ui_realloc(UiContext *ctx, void *ptr, size_t size); |
342
99f83fbf48e9
implement context destroy
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
341
diff
changeset
|
488 | UIEXPORT char* ui_strdup(UiContext *ctx, const char *str); |
38
8ccdde37275b
added some allocation functions
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
37
diff
changeset
|
489 | |
14
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
490 | // types |
140
c03c338a7dcf
refactors value binding system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
133
diff
changeset
|
491 | |
201
7f67ebbb0c1c
add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
196
diff
changeset
|
492 | UIEXPORT UiInteger* ui_int_new(UiContext *ctx, char *name); |
7f67ebbb0c1c
add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
196
diff
changeset
|
493 | UIEXPORT UiDouble* ui_double_new(UiContext *ctx, char *name); |
7f67ebbb0c1c
add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
196
diff
changeset
|
494 | UIEXPORT UiString* ui_string_new(UiContext *ctx, char *name); |
7f67ebbb0c1c
add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
196
diff
changeset
|
495 | UIEXPORT UiText* ui_text_new(UiContext *ctx, char *name); |
7f67ebbb0c1c
add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
196
diff
changeset
|
496 | UIEXPORT UiRange* ui_range_new(UiContext *ctx, char *name); |
337
2904fba2708b
add UiGeneric var type
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
302
diff
changeset
|
497 | UIEXPORT UiGeneric* ui_generic_new(UiContext *ctx, char *name); |
140
c03c338a7dcf
refactors value binding system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
133
diff
changeset
|
498 | |
231
e160bb392148
add getter/setter for ui number/string types
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
230
diff
changeset
|
499 | #define ui_get(v) _Generic(v, \ |
e160bb392148
add getter/setter for ui number/string types
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
230
diff
changeset
|
500 | UiInteger*: ui_int_get, \ |
e160bb392148
add getter/setter for ui number/string types
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
230
diff
changeset
|
501 | UiDouble*: ui_double_get, \ |
e160bb392148
add getter/setter for ui number/string types
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
230
diff
changeset
|
502 | UiString*: ui_string_get, \ |
e160bb392148
add getter/setter for ui number/string types
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
230
diff
changeset
|
503 | UiText*:ui_text_get) (v) |
e160bb392148
add getter/setter for ui number/string types
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
230
diff
changeset
|
504 | |
e160bb392148
add getter/setter for ui number/string types
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
230
diff
changeset
|
505 | #define ui_set(v, n) _Generic(v, \ |
e160bb392148
add getter/setter for ui number/string types
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
230
diff
changeset
|
506 | UiInteger*: ui_int_set, \ |
e160bb392148
add getter/setter for ui number/string types
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
230
diff
changeset
|
507 | UiDouble*: ui_double_set, \ |
e160bb392148
add getter/setter for ui number/string types
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
230
diff
changeset
|
508 | UiString*: ui_string_set, \ |
e160bb392148
add getter/setter for ui number/string types
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
230
diff
changeset
|
509 | UiText*:ui_text_set) (v, n) |
e160bb392148
add getter/setter for ui number/string types
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
230
diff
changeset
|
510 | |
e160bb392148
add getter/setter for ui number/string types
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
230
diff
changeset
|
511 | UIEXPORT void ui_int_set(UiInteger *i, int64_t value); |
e160bb392148
add getter/setter for ui number/string types
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
230
diff
changeset
|
512 | UIEXPORT int64_t ui_int_get(UiInteger *i); |
e160bb392148
add getter/setter for ui number/string types
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
230
diff
changeset
|
513 | UIEXPORT void ui_double_set(UiDouble *d, double value); |
e160bb392148
add getter/setter for ui number/string types
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
230
diff
changeset
|
514 | UIEXPORT double ui_double_get(UiDouble *d); |
e160bb392148
add getter/setter for ui number/string types
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
230
diff
changeset
|
515 | UIEXPORT void ui_string_set(UiString *s, const char *value); |
e160bb392148
add getter/setter for ui number/string types
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
230
diff
changeset
|
516 | UIEXPORT char* ui_string_get(UiString *s); |
e160bb392148
add getter/setter for ui number/string types
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
230
diff
changeset
|
517 | UIEXPORT void ui_text_set(UiText *s, const char* value); |
e160bb392148
add getter/setter for ui number/string types
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
230
diff
changeset
|
518 | UIEXPORT char* ui_text_get(UiText *s); |
e160bb392148
add getter/setter for ui number/string types
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
230
diff
changeset
|
519 | |
341
c7427cadabd3
make ui_getappdir() and ui_configfile() public
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
339
diff
changeset
|
520 | UIEXPORT void ui_var_set_int(UiContext *ctx, const char *name, int64_t value); |
c7427cadabd3
make ui_getappdir() and ui_configfile() public
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
339
diff
changeset
|
521 | UIEXPORT int64_t ui_var_get_int(UiContext *ctx, const char *name); |
c7427cadabd3
make ui_getappdir() and ui_configfile() public
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
339
diff
changeset
|
522 | UIEXPORT void ui_var_set_double(UiContext *ctx, const char *name, double value); |
c7427cadabd3
make ui_getappdir() and ui_configfile() public
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
339
diff
changeset
|
523 | UIEXPORT double ui_var_get_double(UiContext *ctx, const char *name); |
c7427cadabd3
make ui_getappdir() and ui_configfile() public
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
339
diff
changeset
|
524 | UIEXPORT void ui_var_set_string(UiContext *ctx, const char *name, char *value); |
c7427cadabd3
make ui_getappdir() and ui_configfile() public
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
339
diff
changeset
|
525 | UIEXPORT char* ui_var_get_string(UiContext *ctx, const char *name); |
231
e160bb392148
add getter/setter for ui number/string types
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
230
diff
changeset
|
526 | |
201
7f67ebbb0c1c
add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
196
diff
changeset
|
527 | UIEXPORT UiObserver* ui_observer_new(ui_callback f, void *data); |
7f67ebbb0c1c
add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
196
diff
changeset
|
528 | UIEXPORT UiObserver* ui_obsvlist_add(UiObserver *list, UiObserver *observer); |
7f67ebbb0c1c
add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
196
diff
changeset
|
529 | UIEXPORT UiObserver* ui_add_observer(UiObserver *list, ui_callback f, void *data); |
7f67ebbb0c1c
add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
196
diff
changeset
|
530 | UIEXPORT void ui_notify(UiObserver *observer, void *data); |
7f67ebbb0c1c
add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
196
diff
changeset
|
531 | UIEXPORT void ui_notify_except(UiObserver *observer, UiObserver *exc, void *data); |
7f67ebbb0c1c
add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
196
diff
changeset
|
532 | UIEXPORT void ui_notify_evt(UiObserver *observer, UiEvent *event); |
14
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
533 | |
e2fd132ab781
added menu item lists (Cocoa implementation)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
12
diff
changeset
|
534 | |
201
7f67ebbb0c1c
add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
196
diff
changeset
|
535 | UIEXPORT UiList* ui_list_new(UiContext *ctx, char *name); |
7f67ebbb0c1c
add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
196
diff
changeset
|
536 | UIEXPORT void* ui_list_first(UiList *list); |
7f67ebbb0c1c
add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
196
diff
changeset
|
537 | UIEXPORT void* ui_list_next(UiList *list); |
7f67ebbb0c1c
add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
196
diff
changeset
|
538 | UIEXPORT void* ui_list_get(UiList *list, int i); |
342
99f83fbf48e9
implement context destroy
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
341
diff
changeset
|
539 | UIEXPORT int ui_list_count(UiList *list); |
99f83fbf48e9
implement context destroy
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
341
diff
changeset
|
540 | UIEXPORT void ui_list_append(UiList *list, void *data); |
99f83fbf48e9
implement context destroy
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
341
diff
changeset
|
541 | UIEXPORT void ui_list_prepend(UiList *list, void *data); |
251
22dc0b739dd8
add list remove function
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
249
diff
changeset
|
542 | UIEXPORT void ui_list_remove(UiList *list, int i); |
201
7f67ebbb0c1c
add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
196
diff
changeset
|
543 | UIEXPORT void ui_list_clear(UiList *list); |
342
99f83fbf48e9
implement context destroy
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
341
diff
changeset
|
544 | UIEXPORT void ui_list_update(UiList *list); |
99f83fbf48e9
implement context destroy
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
341
diff
changeset
|
545 | UIEXPORT void ui_list_addobsv(UiList *list, ui_callback f, void *data); |
99f83fbf48e9
implement context destroy
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
341
diff
changeset
|
546 | UIEXPORT void ui_list_notify(UiList *list); |
2
eeb50c534497
added support for replaceable documents
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
1
diff
changeset
|
547 | |
248
22257f5f4019
add getter for list selections (Common, WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
247
diff
changeset
|
548 | UIEXPORT UiListSelection ui_list_getselection(UiList *list); |
360
681b930abe84
implement combobox get/set selection (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
347
diff
changeset
|
549 | UIEXPORT void ui_list_setselection(UiList *list, int index); |
248
22257f5f4019
add getter for list selections (Common, WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
247
diff
changeset
|
550 | |
246
b19f3098dd11
add missing UIEXPORT
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
243
diff
changeset
|
551 | UIEXPORT UiFileList ui_filelist_copy(UiFileList list); |
b19f3098dd11
add missing UIEXPORT
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
243
diff
changeset
|
552 | UIEXPORT void ui_filelist_free(UiFileList list); |
243
9f66c31a27ed
implement table dnd drop
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
241
diff
changeset
|
553 | |
201
7f67ebbb0c1c
add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
196
diff
changeset
|
554 | UIEXPORT void ui_clipboard_set(char *str); |
7f67ebbb0c1c
add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
196
diff
changeset
|
555 | UIEXPORT char* ui_clipboard_get(); |
1
eb5269000bc8
added some document functions
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
0
diff
changeset
|
556 | |
201
7f67ebbb0c1c
add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
196
diff
changeset
|
557 | UIEXPORT void ui_add_image(char *imgname, char *filename); // TODO: remove? |
33
458831c574f4
added listview, sidebar and toolbar image button (GTK)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
29
diff
changeset
|
558 | |
140
c03c338a7dcf
refactors value binding system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
133
diff
changeset
|
559 | // general widget functions |
201
7f67ebbb0c1c
add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
196
diff
changeset
|
560 | UIEXPORT void ui_set_enabled(UIWIDGET widget, int enabled); |
7f67ebbb0c1c
add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
196
diff
changeset
|
561 | UIEXPORT void ui_set_show_all(UIWIDGET widget, int value); |
7f67ebbb0c1c
add UIEXPORT macro to create a dll
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
196
diff
changeset
|
562 | UIEXPORT void ui_set_visible(UIWIDGET widget, int visible); |
140
c03c338a7dcf
refactors value binding system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
133
diff
changeset
|
563 | |
c03c338a7dcf
refactors value binding system
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
133
diff
changeset
|
564 | |
215
1bd5534c395d
add support for icons in the table widget (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
208
diff
changeset
|
565 | |
249
4df7c366cff7
copy UiList getselection fptr in uic_copy_binding
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
248
diff
changeset
|
566 | UIEXPORT void ui_listselection_free(UiListSelection selection); |
215
1bd5534c395d
add support for icons in the table widget (WinUI3)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
208
diff
changeset
|
567 | |
241
c51dd0e9ecb7
add support for table string values, that need to be freed
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
235
diff
changeset
|
568 | |
246
b19f3098dd11
add missing UIEXPORT
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
243
diff
changeset
|
569 | UIEXPORT UiStr ui_str(char *cstr); |
b19f3098dd11
add missing UIEXPORT
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
243
diff
changeset
|
570 | UIEXPORT UiStr ui_str_free(char *str, void (*free)(void *v)); |
241
c51dd0e9ecb7
add support for table string values, that need to be freed
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
235
diff
changeset
|
571 | |
341
c7427cadabd3
make ui_getappdir() and ui_configfile() public
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
339
diff
changeset
|
572 | |
378
d41b1ffc5f77
implement some missing WinUI functions
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
360
diff
changeset
|
573 | UIEXPORT char* ui_getappdir(void); |
341
c7427cadabd3
make ui_getappdir() and ui_configfile() public
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
339
diff
changeset
|
574 | UIEXPORT char* ui_configfile(char *name); |
c7427cadabd3
make ui_getappdir() and ui_configfile() public
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
339
diff
changeset
|
575 | |
347
6f0d0b0d97f5
add conditional variable API
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
343
diff
changeset
|
576 | UIEXPORT UiCondVar* ui_condvar_create(void); |
6f0d0b0d97f5
add conditional variable API
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
343
diff
changeset
|
577 | UIEXPORT void ui_condvar_wait(UiCondVar *var); |
6f0d0b0d97f5
add conditional variable API
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
343
diff
changeset
|
578 | UIEXPORT void ui_condvar_signal(UiCondVar *var, void *data, int intdata); |
6f0d0b0d97f5
add conditional variable API
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
343
diff
changeset
|
579 | UIEXPORT void ui_condvar_destroy(UiCondVar *var); |
6f0d0b0d97f5
add conditional variable API
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
343
diff
changeset
|
580 | |
0 | 581 | #ifdef __cplusplus |
582 | } | |
583 | #endif | |
584 | ||
585 | #endif /* UI_TOOLKIT_H */ | |
586 |