Sun, 19 Oct 2025 21:20:08 +0200
update toolkit
|
0
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
1 | /* |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
2 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
3 | * |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
4 | * Copyright 2017 Olaf Wintermann. All rights reserved. |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
5 | * |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
6 | * Redistribution and use in source and binary forms, with or without |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
7 | * modification, are permitted provided that the following conditions are met: |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
8 | * |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
9 | * 1. Redistributions of source code must retain the above copyright |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
10 | * notice, this list of conditions and the following disclaimer. |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
11 | * |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
12 | * 2. Redistributions in binary form must reproduce the above copyright |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
13 | * notice, this list of conditions and the following disclaimer in the |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
14 | * documentation and/or other materials provided with the distribution. |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
15 | * |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
17 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
18 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
20 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
23 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
24 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
25 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
26 | * POSSIBILITY OF SUCH DAMAGE. |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
27 | */ |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
28 | |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
29 | #ifndef UI_TOOLKIT_H |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
30 | #define UI_TOOLKIT_H |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
31 | |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
32 | #include <inttypes.h> |
|
103
6606616eca9f
update uwproj, toolkit, libidav
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
102
diff
changeset
|
33 | #include <stdlib.h> |
|
0
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
34 | |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
35 | #ifdef UI_COCOA |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
36 | |
| 100 | 37 | #include <stdlib.h> |
|
0
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
38 | #ifdef __OBJC__ |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
39 | #import <Cocoa/Cocoa.h> |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
40 | #endif |
| 100 | 41 | typedef void* UIWIDGET; // NSView* |
| 42 | typedef void* UIWINDOW; // NSWindow* | |
| 43 | typedef void* UIMENU; // NSMenu* | |
|
0
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
44 | |
| 42 | 45 | #elif UI_GTK2 || UI_GTK3 || UI_GTK4 |
|
102
64ded9f6a6c6
update libs (ucx, toolkit, libidav)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
100
diff
changeset
|
46 | #define UI_GTK |
|
0
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
47 | |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
48 | #include <gtk/gtk.h> |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
49 | #define UIWIDGET GtkWidget* |
| 42 | 50 | |
| 51 | #if UI_GTK2 || UI_GTK3 | |
|
0
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
52 | #define UIMENU GtkMenu* |
| 42 | 53 | #endif |
| 54 | #ifdef UI_GTK4 | |
| 55 | #define UIMENU GtkPopoverMenu* | |
| 56 | #endif | |
| 57 | ||
|
0
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
58 | #define UI_GTK |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
59 | |
|
44
473954dc6b74
update toolkit: gtk4 improvements
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
42
diff
changeset
|
60 | #ifdef UI_LIBADWAITA |
|
473954dc6b74
update toolkit: gtk4 improvements
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
42
diff
changeset
|
61 | #include <adwaita.h> |
|
473954dc6b74
update toolkit: gtk4 improvements
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
42
diff
changeset
|
62 | #endif |
|
473954dc6b74
update toolkit: gtk4 improvements
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
42
diff
changeset
|
63 | |
|
103
6606616eca9f
update uwproj, toolkit, libidav
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
102
diff
changeset
|
64 | #elif defined(UI_QT4) || defined(UI_QT5) |
|
6606616eca9f
update uwproj, toolkit, libidav
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
102
diff
changeset
|
65 | #define UI_QT |
|
6606616eca9f
update uwproj, toolkit, libidav
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
102
diff
changeset
|
66 | |
|
6606616eca9f
update uwproj, toolkit, libidav
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
102
diff
changeset
|
67 | #ifdef __cplusplus |
|
6606616eca9f
update uwproj, toolkit, libidav
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
102
diff
changeset
|
68 | |
|
6606616eca9f
update uwproj, toolkit, libidav
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
102
diff
changeset
|
69 | #include <QApplication> |
|
6606616eca9f
update uwproj, toolkit, libidav
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
102
diff
changeset
|
70 | #include <QWidget> |
|
6606616eca9f
update uwproj, toolkit, libidav
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
102
diff
changeset
|
71 | #include <QMenu> |
|
6606616eca9f
update uwproj, toolkit, libidav
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
102
diff
changeset
|
72 | |
|
6606616eca9f
update uwproj, toolkit, libidav
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
102
diff
changeset
|
73 | #define UIWIDGET QWidget* |
|
6606616eca9f
update uwproj, toolkit, libidav
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
102
diff
changeset
|
74 | #define UIWINDOW QWidget* |
|
6606616eca9f
update uwproj, toolkit, libidav
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
102
diff
changeset
|
75 | #define UIMENU QMenu* |
|
6606616eca9f
update uwproj, toolkit, libidav
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
102
diff
changeset
|
76 | #else /* __cplusplus */ |
|
6606616eca9f
update uwproj, toolkit, libidav
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
102
diff
changeset
|
77 | #define UIWIDGET void* |
|
6606616eca9f
update uwproj, toolkit, libidav
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
102
diff
changeset
|
78 | #define UIWINDOW void* |
|
6606616eca9f
update uwproj, toolkit, libidav
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
102
diff
changeset
|
79 | #define UIMENU void* |
|
6606616eca9f
update uwproj, toolkit, libidav
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
102
diff
changeset
|
80 | #endif |
|
6606616eca9f
update uwproj, toolkit, libidav
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
102
diff
changeset
|
81 | |
|
0
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
82 | #elif UI_MOTIF |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
83 | |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
84 | #include <Xm/XmAll.h> |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
85 | #define UIWIDGET Widget |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
86 | #define UIMENU Widget |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
87 | |
|
103
6606616eca9f
update uwproj, toolkit, libidav
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
102
diff
changeset
|
88 | |
|
6606616eca9f
update uwproj, toolkit, libidav
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
102
diff
changeset
|
89 | #elif UI_WIN32 |
|
6606616eca9f
update uwproj, toolkit, libidav
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
102
diff
changeset
|
90 | |
| 112 | 91 | #include "win32.h" |
|
108
77254bd6dccb
update toolkit, adjust UI code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
103
diff
changeset
|
92 | |
|
77254bd6dccb
update toolkit, adjust UI code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
103
diff
changeset
|
93 | #define UIWIDGET W32Widget* |
|
103
6606616eca9f
update uwproj, toolkit, libidav
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
102
diff
changeset
|
94 | #define UIWINDOW void* |
|
0
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
95 | #define UIMENU void* |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
96 | |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
97 | #elif UI_WINUI |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
98 | |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
99 | #define UIEXPORT __declspec(dllexport) |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
100 | |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
101 | #ifdef __cplusplus |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
102 | |
|
79
483d7342b439
update toolkit (winui dialog window)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
76
diff
changeset
|
103 | #include <functional> |
|
0
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
104 | #ifndef UI_WINUI_PCH |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
105 | #include <Windows.h> |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
106 | #undef GetCurrentTime |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
107 | #include <winrt/Windows.Foundation.Collections.h> |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
108 | #include <winrt/Windows.UI.Xaml.Interop.h> |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
109 | #include <winrt/Microsoft.UI.Xaml.Controls.h> |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
110 | #endif |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
111 | |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
112 | class UiWindow { |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
113 | public: |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
114 | winrt::Microsoft::UI::Xaml::Window window { nullptr }; |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
115 | |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
116 | UiWindow(winrt::Microsoft::UI::Xaml::Window& win); |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
117 | }; |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
118 | |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
119 | class UiWidget { |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
120 | public: |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
121 | winrt::Microsoft::UI::Xaml::UIElement uielement; |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
122 | void* data1 = nullptr; |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
123 | void* data2 = nullptr; |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
124 | void* data3 = nullptr; |
|
79
483d7342b439
update toolkit (winui dialog window)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
76
diff
changeset
|
125 | std::function<void()> Show; |
|
0
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
126 | UiWidget(winrt::Microsoft::UI::Xaml::UIElement& elm); |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
127 | |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
128 | }; |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
129 | |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
130 | #define UIWIDGET UiWidget* |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
131 | #define UIWINDOW UiWindow* |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
132 | #define UIMENU void* |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
133 | |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
134 | /* |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
135 | // winrt::Microsoft::UI::Xaml::UIElement |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
136 | #define UIWIDGET void* |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
137 | // winrt::Microsoft::UI::Xaml::Window |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
138 | #define UIWINDOW void* |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
139 | #define UIMENU void* |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
140 | */ |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
141 | |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
142 | #else |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
143 | #define UIWIDGET void* |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
144 | #define UIWINDOW void* |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
145 | #define UIMENU void* |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
146 | #endif |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
147 | |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
148 | |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
149 | #endif |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
150 | |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
151 | #ifndef TRUE |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
152 | #define TRUE 1 |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
153 | #endif |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
154 | #ifndef FALSE |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
155 | #define FALSE 0 |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
156 | #endif |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
157 | |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
158 | #ifndef UIEXPORT |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
159 | #define UIEXPORT |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
160 | #endif |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
161 | |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
162 | #ifdef __cplusplus |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
163 | extern "C" { |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
164 | #endif |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
165 | |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
166 | #define UI_GROUP_SELECTION 20000 |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
167 | |
|
56
294d5515583a
add authentication dialog
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
168 | #define UI_GROUPS(...) (const int[]){ __VA_ARGS__, -1 } |
|
0
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
169 | |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
170 | /* public types */ |
|
103
6606616eca9f
update uwproj, toolkit, libidav
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
102
diff
changeset
|
171 | #ifndef __cplusplus |
| 100 | 172 | typedef _Bool UiBool; |
|
103
6606616eca9f
update uwproj, toolkit, libidav
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
102
diff
changeset
|
173 | #else |
|
6606616eca9f
update uwproj, toolkit, libidav
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
102
diff
changeset
|
174 | typedef bool UiBool; |
|
6606616eca9f
update uwproj, toolkit, libidav
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
102
diff
changeset
|
175 | #endif |
|
0
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
176 | |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
177 | typedef struct UiObject UiObject; |
| 100 | 178 | typedef struct UiContainerX UiContainerX; |
|
0
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
179 | typedef struct UiEvent UiEvent; |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
180 | typedef struct UiMouseEvent UiMouseEvent; |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
181 | typedef struct UiObserver UiObserver; |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
182 | |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
183 | typedef struct UiInteger UiInteger; |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
184 | typedef struct UiDouble UiDouble; |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
185 | typedef struct UiString UiString; |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
186 | typedef struct UiText UiText; |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
187 | typedef struct UiList UiList; |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
188 | typedef struct UiRange UiRange; |
|
51
e324291ca9f8
add resource preview window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
44
diff
changeset
|
189 | typedef struct UiGeneric UiGeneric; |
|
0
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
190 | |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
191 | typedef struct UiStr UiStr; |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
192 | |
|
18
af411868ab9b
implement dnd upload (without progressbar)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
13
diff
changeset
|
193 | typedef struct UiFileList UiFileList; |
|
af411868ab9b
implement dnd upload (without progressbar)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
13
diff
changeset
|
194 | |
|
26
40d6af793c1a
implement resource deletion
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
21
diff
changeset
|
195 | typedef struct UiListSelection UiListSelection; |
|
40d6af793c1a
implement resource deletion
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
21
diff
changeset
|
196 | |
|
110
c00e968d018b
fix repolist menu button
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
109
diff
changeset
|
197 | typedef struct UiTextStyle UiTextStyle; |
|
c00e968d018b
fix repolist menu button
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
109
diff
changeset
|
198 | typedef struct UiColor UiColor; |
|
c00e968d018b
fix repolist menu button
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
109
diff
changeset
|
199 | |
|
0
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
200 | /* begin opaque types */ |
|
88
e27526429d85
add context menu, implement 'Select All'
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
87
diff
changeset
|
201 | typedef struct UiContext UiContext; |
|
e27526429d85
add context menu, implement 'Select All'
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
87
diff
changeset
|
202 | typedef struct UiContainer UiContainer; |
|
e27526429d85
add context menu, implement 'Select All'
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
87
diff
changeset
|
203 | typedef struct UiMenuBuilder UiMenuBuilder; |
|
0
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
204 | |
|
88
e27526429d85
add context menu, implement 'Select All'
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
87
diff
changeset
|
205 | typedef struct UiIcon UiIcon; |
|
e27526429d85
add context menu, implement 'Select All'
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
87
diff
changeset
|
206 | typedef struct UiImage UiImage; |
|
0
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
207 | |
|
88
e27526429d85
add context menu, implement 'Select All'
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
87
diff
changeset
|
208 | typedef struct UiDnD UiDnD; |
|
5
83263002816f
update toolkit (job/threadpool)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
3
diff
changeset
|
209 | |
|
88
e27526429d85
add context menu, implement 'Select All'
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
87
diff
changeset
|
210 | typedef struct UiThreadpool UiThreadpool; |
|
0
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
211 | /* end opaque types */ |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
212 | |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
213 | typedef struct UiTabbedPane UiTabbedPane; |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
214 | |
|
103
6606616eca9f
update uwproj, toolkit, libidav
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
102
diff
changeset
|
215 | typedef enum UiTri { |
|
6606616eca9f
update uwproj, toolkit, libidav
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
102
diff
changeset
|
216 | UI_DEFAULT = 0, |
|
6606616eca9f
update uwproj, toolkit, libidav
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
102
diff
changeset
|
217 | UI_ON, |
|
6606616eca9f
update uwproj, toolkit, libidav
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
102
diff
changeset
|
218 | UI_OFF |
|
6606616eca9f
update uwproj, toolkit, libidav
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
102
diff
changeset
|
219 | } UiTri; |
|
0
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
220 | |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
221 | enum UiMouseEventType { UI_PRESS = 0, UI_PRESS2 }; |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
222 | |
|
103
6606616eca9f
update uwproj, toolkit, libidav
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
102
diff
changeset
|
223 | typedef enum UiLabelType { |
|
6606616eca9f
update uwproj, toolkit, libidav
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
102
diff
changeset
|
224 | UI_LABEL_DEFAULT, |
|
6606616eca9f
update uwproj, toolkit, libidav
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
102
diff
changeset
|
225 | UI_LABEL_TEXT, |
|
6606616eca9f
update uwproj, toolkit, libidav
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
102
diff
changeset
|
226 | UI_LABEL_ICON, |
|
6606616eca9f
update uwproj, toolkit, libidav
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
102
diff
changeset
|
227 | UI_LABEL_TEXT_ICON |
|
6606616eca9f
update uwproj, toolkit, libidav
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
102
diff
changeset
|
228 | } UiLabelType; |
|
3
f154867f54dc
add nav buttons, update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
2
diff
changeset
|
229 | |
|
103
6606616eca9f
update uwproj, toolkit, libidav
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
102
diff
changeset
|
230 | typedef enum UiDnDAction { |
|
6606616eca9f
update uwproj, toolkit, libidav
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
102
diff
changeset
|
231 | UI_DND_ACTION_NONE, |
|
6606616eca9f
update uwproj, toolkit, libidav
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
102
diff
changeset
|
232 | UI_DND_ACTION_COPY, |
|
6606616eca9f
update uwproj, toolkit, libidav
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
102
diff
changeset
|
233 | UI_DND_ACTION_MOVE, |
|
6606616eca9f
update uwproj, toolkit, libidav
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
102
diff
changeset
|
234 | UI_DND_ACTION_LINK, |
|
6606616eca9f
update uwproj, toolkit, libidav
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
102
diff
changeset
|
235 | UI_DND_ACTION_CUSTOM |
|
6606616eca9f
update uwproj, toolkit, libidav
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
102
diff
changeset
|
236 | } UiDnDAction; |
|
109
c3dfcb8f0be7
update toolkit, remove getvalue func from model to table/listview args
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
108
diff
changeset
|
237 | |
|
c3dfcb8f0be7
update toolkit, remove getvalue func from model to table/listview args
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
108
diff
changeset
|
238 | enum UiAlignment { |
|
c3dfcb8f0be7
update toolkit, remove getvalue func from model to table/listview args
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
108
diff
changeset
|
239 | UI_ALIGN_DEFAULT = 0, |
|
c3dfcb8f0be7
update toolkit, remove getvalue func from model to table/listview args
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
108
diff
changeset
|
240 | UI_ALIGN_LEFT, |
|
c3dfcb8f0be7
update toolkit, remove getvalue func from model to table/listview args
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
108
diff
changeset
|
241 | UI_ALIGN_RIGHT, |
|
c3dfcb8f0be7
update toolkit, remove getvalue func from model to table/listview args
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
108
diff
changeset
|
242 | UI_ALIGN_CENTER |
|
c3dfcb8f0be7
update toolkit, remove getvalue func from model to table/listview args
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
108
diff
changeset
|
243 | }; |
|
c3dfcb8f0be7
update toolkit, remove getvalue func from model to table/listview args
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
108
diff
changeset
|
244 | |
|
c3dfcb8f0be7
update toolkit, remove getvalue func from model to table/listview args
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
108
diff
changeset
|
245 | typedef enum UiAlignment UiAlignment; |
|
c3dfcb8f0be7
update toolkit, remove getvalue func from model to table/listview args
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
108
diff
changeset
|
246 | |
|
0
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
247 | typedef void(*ui_callback)(UiEvent*, void*); /* event, user data */ |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
248 | |
|
108
77254bd6dccb
update toolkit, adjust UI code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
103
diff
changeset
|
249 | typedef void*(*ui_getvaluefunc)(void *elm, int col); |
|
77254bd6dccb
update toolkit, adjust UI code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
103
diff
changeset
|
250 | typedef void*(*ui_getvaluefunc2)(UiList *list, void *elm, int row, int col, void *userdata, UiBool *freeResult); |
|
110
c00e968d018b
fix repolist menu button
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
109
diff
changeset
|
251 | typedef UiBool(*ui_getstylefunc)(UiList *list, void *elm, int row, int col, void *userdata, UiTextStyle *style); |
|
0
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
252 | |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
253 | typedef int(*ui_threadfunc)(void*); |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
254 | |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
255 | typedef void(*ui_freefunc)(void*); |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
256 | |
|
56
294d5515583a
add authentication dialog
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
257 | typedef void(*ui_enablefunc)(void*, int); |
|
0
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
258 | |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
259 | struct UiObject { |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
260 | /* |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
261 | * native widget |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
262 | */ |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
263 | UIWIDGET widget; |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
264 | |
| 100 | 265 | #if defined(UI_COCOA) || defined(UI_WINUI) |
|
0
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
266 | /* |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
267 | * native window object |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
268 | */ |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
269 | UIWINDOW wobj; |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
270 | #endif |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
271 | |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
272 | /* |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
273 | * user window data |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
274 | */ |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
275 | void *window; |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
276 | |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
277 | /* |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
278 | * window context |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
279 | */ |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
280 | UiContext *ctx; |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
281 | |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
282 | /* |
| 100 | 283 | * container list |
| 284 | * TODO: remove old UiContainer and rename UiContainerX to UiContainer | |
| 285 | */ | |
| 286 | UiContainerX *container_begin; | |
| 287 | UiContainerX *container_end; | |
| 288 | ||
| 289 | /* | |
|
0
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
290 | * next container object |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
291 | */ |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
292 | UiObject *next; |
|
86
8e7c57c23133
add reference counting to download window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
79
diff
changeset
|
293 | |
|
8e7c57c23133
add reference counting to download window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
79
diff
changeset
|
294 | /* |
|
8e7c57c23133
add reference counting to download window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
79
diff
changeset
|
295 | * obj destroy func |
|
8e7c57c23133
add reference counting to download window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
79
diff
changeset
|
296 | */ |
|
8e7c57c23133
add reference counting to download window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
79
diff
changeset
|
297 | void (*destroy)(UiObject *obj); |
|
8e7c57c23133
add reference counting to download window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
79
diff
changeset
|
298 | |
|
8e7c57c23133
add reference counting to download window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
79
diff
changeset
|
299 | /* |
|
8e7c57c23133
add reference counting to download window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
79
diff
changeset
|
300 | * reference counter |
|
8e7c57c23133
add reference counting to download window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
79
diff
changeset
|
301 | */ |
|
8e7c57c23133
add reference counting to download window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
79
diff
changeset
|
302 | unsigned int ref; |
|
0
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
303 | }; |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
304 | |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
305 | struct UiTabbedPane { |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
306 | /* |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
307 | * native widget |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
308 | */ |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
309 | UIWIDGET widget; |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
310 | |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
311 | /* |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
312 | * current document |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
313 | */ |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
314 | void *document; |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
315 | |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
316 | /* |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
317 | * parent context |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
318 | */ |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
319 | UiContext *ctx; |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
320 | }; |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
321 | |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
322 | struct UiEvent { |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
323 | UiObject *obj; |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
324 | void *document; |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
325 | void *window; |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
326 | void *eventdata; |
|
108
77254bd6dccb
update toolkit, adjust UI code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
103
diff
changeset
|
327 | int eventdatatype; |
|
0
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
328 | int intval; |
|
103
6606616eca9f
update uwproj, toolkit, libidav
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
102
diff
changeset
|
329 | int set; |
|
0
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
330 | }; |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
331 | |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
332 | struct UiMouseEvent { |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
333 | int x; |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
334 | int y; |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
335 | enum UiMouseEventType type; |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
336 | int button; |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
337 | }; |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
338 | |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
339 | struct UiObserver { |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
340 | ui_callback callback; |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
341 | void *data; |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
342 | UiObserver *next; |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
343 | }; |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
344 | |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
345 | struct UiStr { |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
346 | char *ptr; |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
347 | void (*free)(void *v); |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
348 | }; |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
349 | |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
350 | struct UiInteger { |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
351 | int64_t (*get)(UiInteger*); |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
352 | void (*set)(UiInteger*, int64_t); |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
353 | void *obj; |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
354 | |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
355 | int64_t value; |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
356 | UiObserver *observers; |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
357 | }; |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
358 | |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
359 | struct UiDouble { |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
360 | double (*get)(UiDouble*); |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
361 | void (*set)(UiDouble*, double); |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
362 | void *obj; |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
363 | |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
364 | double value; |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
365 | UiObserver *observers; |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
366 | }; |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
367 | |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
368 | struct UiString { |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
369 | char* (*get)(UiString*); |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
370 | void (*set)(UiString*, const char*); |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
371 | void *obj; |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
372 | |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
373 | UiStr value; |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
374 | UiObserver *observers; |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
375 | }; |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
376 | |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
377 | struct UiText { |
|
103
6606616eca9f
update uwproj, toolkit, libidav
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
102
diff
changeset
|
378 | void (*save)(UiText*); |
|
6606616eca9f
update uwproj, toolkit, libidav
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
102
diff
changeset
|
379 | void (*destroy)(UiText*); |
|
6606616eca9f
update uwproj, toolkit, libidav
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
102
diff
changeset
|
380 | void (*restore)(UiText*); |
|
29
3fc287f06305
add minimal working download
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
27
diff
changeset
|
381 | void (*set)(UiText*, const char*); |
|
0
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
382 | char* (*get)(UiText*); |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
383 | char* (*getsubstr)(UiText*, int, int); /* text, begin, end */ |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
384 | void (*insert)(UiText*, int, char*); |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
385 | void (*setposition)(UiText*,int); |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
386 | int (*position)(UiText*); |
|
103
6606616eca9f
update uwproj, toolkit, libidav
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
102
diff
changeset
|
387 | void (*setselection)(UiText*, int, int); /* text, begin, end */ |
|
0
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
388 | void (*selection)(UiText*, int*, int*); /* text, begin, end */ |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
389 | int (*length)(UiText*); |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
390 | void (*remove)(UiText*, int, int); /* text, begin, end */ |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
391 | UiStr value; |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
392 | int pos; |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
393 | void *obj; |
|
103
6606616eca9f
update uwproj, toolkit, libidav
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
102
diff
changeset
|
394 | int datatype; |
|
6606616eca9f
update uwproj, toolkit, libidav
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
102
diff
changeset
|
395 | void *data1; |
|
6606616eca9f
update uwproj, toolkit, libidav
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
102
diff
changeset
|
396 | void *data2; |
|
0
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
397 | // TODO: replacefunc, ... |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
398 | UiObserver *observers; |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
399 | }; |
|
51
e324291ca9f8
add resource preview window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
44
diff
changeset
|
400 | |
|
103
6606616eca9f
update uwproj, toolkit, libidav
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
102
diff
changeset
|
401 | /* UiText.datatype */ |
|
6606616eca9f
update uwproj, toolkit, libidav
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
102
diff
changeset
|
402 | #define UI_TEXT_TYPE_BUFFER 1 |
|
6606616eca9f
update uwproj, toolkit, libidav
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
102
diff
changeset
|
403 | |
|
51
e324291ca9f8
add resource preview window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
44
diff
changeset
|
404 | struct UiGeneric { |
|
e324291ca9f8
add resource preview window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
44
diff
changeset
|
405 | void* (*get)(UiGeneric*); |
|
e324291ca9f8
add resource preview window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
44
diff
changeset
|
406 | const char* (*get_type)(UiGeneric*); |
|
e324291ca9f8
add resource preview window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
44
diff
changeset
|
407 | int (*set)(UiGeneric*, void *, const char *type); |
|
e324291ca9f8
add resource preview window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
44
diff
changeset
|
408 | void *obj; |
|
e324291ca9f8
add resource preview window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
44
diff
changeset
|
409 | |
|
e324291ca9f8
add resource preview window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
44
diff
changeset
|
410 | void *value; |
|
e324291ca9f8
add resource preview window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
44
diff
changeset
|
411 | const char *type; |
|
e324291ca9f8
add resource preview window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
44
diff
changeset
|
412 | UiObserver *observers; |
|
e324291ca9f8
add resource preview window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
44
diff
changeset
|
413 | }; |
|
0
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
414 | |
|
108
77254bd6dccb
update toolkit, adjust UI code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
103
diff
changeset
|
415 | typedef void (*ui_list_init_func)(UiContext *ctx, UiList *list, void *userdata); |
|
77254bd6dccb
update toolkit, adjust UI code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
103
diff
changeset
|
416 | |
|
0
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
417 | /* |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
418 | * abstract list |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
419 | */ |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
420 | struct UiList { |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
421 | /* get the first element */ |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
422 | void*(*first)(UiList *list); |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
423 | /* get the next element */ |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
424 | void*(*next)(UiList *list); |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
425 | /* get the nth element */ |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
426 | void*(*get)(UiList *list, int i); |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
427 | /* get the number of elements */ |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
428 | int(*count)(UiList *list); |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
429 | /* iterator changes after first() next() and get() */ |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
430 | void *iter; |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
431 | /* private - implementation dependent */ |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
432 | void *data; |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
433 | |
|
26
40d6af793c1a
implement resource deletion
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
21
diff
changeset
|
434 | /* binding functions */ |
|
0
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
435 | void (*update)(UiList *list, int i); |
|
26
40d6af793c1a
implement resource deletion
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
21
diff
changeset
|
436 | UiListSelection (*getselection)(UiList *list); |
|
60
ee4e4742391e
add settings window and implement repository editing
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
56
diff
changeset
|
437 | void (*setselection)(UiList *list, UiListSelection selection); |
|
0
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
438 | /* binding object */ |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
439 | void *obj; |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
440 | |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
441 | /* list of observers */ |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
442 | UiObserver *observers; |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
443 | }; |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
444 | |
|
26
40d6af793c1a
implement resource deletion
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
21
diff
changeset
|
445 | |
|
40d6af793c1a
implement resource deletion
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
21
diff
changeset
|
446 | struct UiListSelection { |
|
40d6af793c1a
implement resource deletion
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
21
diff
changeset
|
447 | /* |
|
40d6af793c1a
implement resource deletion
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
21
diff
changeset
|
448 | * number of selected items |
|
40d6af793c1a
implement resource deletion
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
21
diff
changeset
|
449 | */ |
|
40d6af793c1a
implement resource deletion
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
21
diff
changeset
|
450 | int count; |
|
40d6af793c1a
implement resource deletion
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
21
diff
changeset
|
451 | |
|
40d6af793c1a
implement resource deletion
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
21
diff
changeset
|
452 | /* |
|
40d6af793c1a
implement resource deletion
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
21
diff
changeset
|
453 | * indices of selected rows |
|
40d6af793c1a
implement resource deletion
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
21
diff
changeset
|
454 | */ |
|
40d6af793c1a
implement resource deletion
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
21
diff
changeset
|
455 | int *rows; |
|
40d6af793c1a
implement resource deletion
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
21
diff
changeset
|
456 | }; |
|
40d6af793c1a
implement resource deletion
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
21
diff
changeset
|
457 | |
|
0
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
458 | struct UiRange { |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
459 | double (*get)(UiRange *range); |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
460 | void (*set)(UiRange *range, double value); |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
461 | void (*setrange)(UiRange *range, double min, double max); |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
462 | void (*setextent)(UiRange *range, double extent); |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
463 | double value; |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
464 | double min; |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
465 | double max; |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
466 | double extent; |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
467 | void *obj; |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
468 | /* list of observers */ |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
469 | UiObserver *observers; |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
470 | }; |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
471 | |
|
18
af411868ab9b
implement dnd upload (without progressbar)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
13
diff
changeset
|
472 | struct UiFileList { |
|
af411868ab9b
implement dnd upload (without progressbar)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
13
diff
changeset
|
473 | char **files; |
|
af411868ab9b
implement dnd upload (without progressbar)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
13
diff
changeset
|
474 | size_t nfiles; |
|
af411868ab9b
implement dnd upload (without progressbar)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
13
diff
changeset
|
475 | }; |
|
af411868ab9b
implement dnd upload (without progressbar)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
13
diff
changeset
|
476 | |
|
56
294d5515583a
add authentication dialog
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
477 | typedef struct UiCondVar { |
|
294d5515583a
add authentication dialog
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
478 | void *data; |
|
294d5515583a
add authentication dialog
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
479 | int intdata; |
|
294d5515583a
add authentication dialog
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
480 | } UiCondVar; |
|
294d5515583a
add authentication dialog
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
481 | |
|
108
77254bd6dccb
update toolkit, adjust UI code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
103
diff
changeset
|
482 | enum UiEventType { |
|
77254bd6dccb
update toolkit, adjust UI code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
103
diff
changeset
|
483 | UI_EVENT_DATA_NULL = 0, |
|
77254bd6dccb
update toolkit, adjust UI code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
103
diff
changeset
|
484 | UI_EVENT_DATA_POINTER, |
|
77254bd6dccb
update toolkit, adjust UI code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
103
diff
changeset
|
485 | UI_EVENT_DATA_STRING, |
|
77254bd6dccb
update toolkit, adjust UI code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
103
diff
changeset
|
486 | UI_EVENT_DATA_INTEGER_VALUE, |
|
77254bd6dccb
update toolkit, adjust UI code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
103
diff
changeset
|
487 | UI_EVENT_DATA_STRING_VALUE, |
|
77254bd6dccb
update toolkit, adjust UI code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
103
diff
changeset
|
488 | UI_EVENT_DATA_TEXT_VALUE, |
|
77254bd6dccb
update toolkit, adjust UI code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
103
diff
changeset
|
489 | UI_EVENT_DATA_DOUBLE_VALUE, |
|
77254bd6dccb
update toolkit, adjust UI code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
103
diff
changeset
|
490 | UI_EVENT_DATA_RANGE_VALUE, |
|
77254bd6dccb
update toolkit, adjust UI code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
103
diff
changeset
|
491 | UI_EVENT_DATA_LIST_SELECTION, |
|
77254bd6dccb
update toolkit, adjust UI code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
103
diff
changeset
|
492 | UI_EVENT_DATA_LIST_ELM, |
|
77254bd6dccb
update toolkit, adjust UI code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
103
diff
changeset
|
493 | UI_EVENT_DATA_DND, |
|
77254bd6dccb
update toolkit, adjust UI code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
103
diff
changeset
|
494 | UI_EVENT_DATA_SUBLIST, |
|
77254bd6dccb
update toolkit, adjust UI code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
103
diff
changeset
|
495 | UI_EVENT_DATA_FILE_LIST |
|
77254bd6dccb
update toolkit, adjust UI code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
103
diff
changeset
|
496 | }; |
|
77254bd6dccb
update toolkit, adjust UI code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
103
diff
changeset
|
497 | |
|
110
c00e968d018b
fix repolist menu button
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
109
diff
changeset
|
498 | #define UI_COLOR(r, g, b) (UiColor){r, g, b} |
|
c00e968d018b
fix repolist menu button
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
109
diff
changeset
|
499 | struct UiColor { |
|
c00e968d018b
fix repolist menu button
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
109
diff
changeset
|
500 | uint8_t red; |
|
c00e968d018b
fix repolist menu button
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
109
diff
changeset
|
501 | uint8_t green; |
|
c00e968d018b
fix repolist menu button
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
109
diff
changeset
|
502 | uint8_t blue; |
|
c00e968d018b
fix repolist menu button
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
109
diff
changeset
|
503 | }; |
|
c00e968d018b
fix repolist menu button
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
109
diff
changeset
|
504 | |
|
c00e968d018b
fix repolist menu button
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
109
diff
changeset
|
505 | #define UI_TEXT_STYLE_BOLD 1 |
|
c00e968d018b
fix repolist menu button
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
109
diff
changeset
|
506 | #define UI_TEXT_STYLE_ITALIC 2 |
|
c00e968d018b
fix repolist menu button
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
109
diff
changeset
|
507 | #define UI_TEXT_STYLE_UNDERLINE 4 |
|
c00e968d018b
fix repolist menu button
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
109
diff
changeset
|
508 | |
|
c00e968d018b
fix repolist menu button
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
109
diff
changeset
|
509 | struct UiTextStyle { |
|
c00e968d018b
fix repolist menu button
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
109
diff
changeset
|
510 | uint32_t text_style; |
|
c00e968d018b
fix repolist menu button
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
109
diff
changeset
|
511 | UiColor fg; |
|
c00e968d018b
fix repolist menu button
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
109
diff
changeset
|
512 | UiBool fg_set; |
|
c00e968d018b
fix repolist menu button
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
109
diff
changeset
|
513 | }; |
|
c00e968d018b
fix repolist menu button
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
109
diff
changeset
|
514 | |
|
0
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
515 | |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
516 | UIEXPORT void ui_init(const char *appname, int argc, char **argv); |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
517 | UIEXPORT const char* ui_appname(); |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
518 | |
|
103
6606616eca9f
update uwproj, toolkit, libidav
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
102
diff
changeset
|
519 | UIEXPORT void ui_add_styledata(const char *styledata, int len); |
|
6606616eca9f
update uwproj, toolkit, libidav
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
102
diff
changeset
|
520 | |
|
0
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
521 | UIEXPORT UiContext* ui_global_context(void); |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
522 | |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
523 | UIEXPORT void ui_context_closefunc(UiContext *ctx, ui_callback fnc, void *udata); |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
524 | |
|
21
3060a5a1d5fd
don't crash when the upload is in progress and the window is closed
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
19
diff
changeset
|
525 | UIEXPORT void ui_context_destroy(UiContext *ctx); |
|
3060a5a1d5fd
don't crash when the upload is in progress and the window is closed
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
19
diff
changeset
|
526 | |
|
108
77254bd6dccb
update toolkit, adjust UI code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
103
diff
changeset
|
527 | UIEXPORT UiContext* ui_context_parent(UiContext *ctx); |
|
77254bd6dccb
update toolkit, adjust UI code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
103
diff
changeset
|
528 | |
|
86
8e7c57c23133
add reference counting to download window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
79
diff
changeset
|
529 | UIEXPORT void ui_object_ref(UiObject *obj); |
| 100 | 530 | UIEXPORT int ui_object_unref(UiObject *obj); |
|
86
8e7c57c23133
add reference counting to download window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
79
diff
changeset
|
531 | |
|
0
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
532 | UIEXPORT void ui_onstartup(ui_callback f, void *userdata); |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
533 | UIEXPORT void ui_onopen(ui_callback f, void *userdata); |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
534 | UIEXPORT void ui_onexit(ui_callback f, void *userdata); |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
535 | |
|
108
77254bd6dccb
update toolkit, adjust UI code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
103
diff
changeset
|
536 | UIEXPORT int ui_app_save_settings(void); |
|
77254bd6dccb
update toolkit, adjust UI code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
103
diff
changeset
|
537 | UIEXPORT void ui_app_exit_on_shutdown(UiBool exitapp); |
|
77254bd6dccb
update toolkit, adjust UI code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
103
diff
changeset
|
538 | |
| 100 | 539 | UIEXPORT void ui_main(void); |
|
0
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
540 | UIEXPORT void ui_show(UiObject *obj); |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
541 | UIEXPORT void ui_close(UiObject *obj); |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
542 | |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
543 | UIEXPORT void ui_job(UiObject *obj, ui_threadfunc tf, void *td, ui_callback f, void *fd); |
|
5
83263002816f
update toolkit (job/threadpool)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
3
diff
changeset
|
544 | UIEXPORT void ui_call_mainthread(ui_threadfunc tf, void* td); |
|
83263002816f
update toolkit (job/threadpool)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
3
diff
changeset
|
545 | UIEXPORT UiThreadpool* ui_threadpool_create(int nthreads); |
|
83263002816f
update toolkit (job/threadpool)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
3
diff
changeset
|
546 | UIEXPORT void ui_threadpool_destroy(UiThreadpool* pool); |
|
83263002816f
update toolkit (job/threadpool)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
3
diff
changeset
|
547 | UIEXPORT void ui_threadpool_job(UiThreadpool* pool, UiObject* obj, ui_threadfunc tf, void* td, ui_callback f, void* fd); |
|
0
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
548 | |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
549 | UIEXPORT void* ui_document_new(size_t size); |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
550 | UIEXPORT void ui_document_destroy(void *doc); |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
551 | |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
552 | UIEXPORT void* ui_get_subdocument(void *document); // deprecated |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
553 | |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
554 | UIEXPORT UiContext* ui_document_context(void *doc); |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
555 | |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
556 | UIEXPORT void ui_attach_document(UiContext *ctx, void *document); |
|
108
77254bd6dccb
update toolkit, adjust UI code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
103
diff
changeset
|
557 | UIEXPORT void ui_detach_document(UiContext *ctx, void *document); |
|
0
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
558 | |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
559 | UIEXPORT void ui_widget_set_groups(UiContext *ctx, UIWIDGET widget, ui_enablefunc enable, ...); |
|
110
c00e968d018b
fix repolist menu button
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
109
diff
changeset
|
560 | UIEXPORT void ui_widget_set_groups2(UiContext *ctx, UIWIDGET widget, ui_enablefunc enable, int *groups, int ngroups); |
|
c00e968d018b
fix repolist menu button
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
109
diff
changeset
|
561 | UIEXPORT void ui_widget_set_visibility_states(UiContext *ctx, UIWIDGET widget, int *states, int nstates); |
|
0
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
562 | |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
563 | UIEXPORT void ui_set_group(UiContext *ctx, int group); |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
564 | UIEXPORT void ui_unset_group(UiContext *ctx, int group); |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
565 | UIEXPORT int* ui_active_groups(UiContext *ctx, int *ngroups); |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
566 | |
|
52
0c881944fa10
add resourceviewer info and properties
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
51
diff
changeset
|
567 | UIEXPORT void* ui_allocator(UiContext *ctx); |
|
87
5360027fb282
download/upload refactoring, add cancel button, resolves #498 fixes #506
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
86
diff
changeset
|
568 | UIEXPORT void* ui_cx_mempool(UiContext *ctx); |
|
5360027fb282
download/upload refactoring, add cancel button, resolves #498 fixes #506
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
86
diff
changeset
|
569 | |
|
0
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
570 | UIEXPORT void* ui_malloc(UiContext *ctx, size_t size); |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
571 | UIEXPORT void* ui_calloc(UiContext *ctx, size_t nelem, size_t elsize); |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
572 | UIEXPORT void ui_free(UiContext *ctx, void *ptr); |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
573 | UIEXPORT void* ui_realloc(UiContext *ctx, void *ptr, size_t size); |
|
52
0c881944fa10
add resourceviewer info and properties
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
51
diff
changeset
|
574 | UIEXPORT char* ui_strdup(UiContext *ctx, const char *str); |
|
0
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
575 | |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
576 | // types |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
577 | |
|
108
77254bd6dccb
update toolkit, adjust UI code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
103
diff
changeset
|
578 | UIEXPORT UiInteger* ui_int_new(UiContext *ctx, const char *name); |
|
77254bd6dccb
update toolkit, adjust UI code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
103
diff
changeset
|
579 | UIEXPORT UiDouble* ui_double_new(UiContext *ctx, const char *name); |
|
77254bd6dccb
update toolkit, adjust UI code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
103
diff
changeset
|
580 | UIEXPORT UiString* ui_string_new(UiContext *ctx, const char *name); |
|
77254bd6dccb
update toolkit, adjust UI code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
103
diff
changeset
|
581 | UIEXPORT UiText* ui_text_new(UiContext *ctx, const char *name); |
|
77254bd6dccb
update toolkit, adjust UI code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
103
diff
changeset
|
582 | UIEXPORT UiRange* ui_range_new(UiContext *ctx, const char *name); |
|
77254bd6dccb
update toolkit, adjust UI code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
103
diff
changeset
|
583 | UIEXPORT UiGeneric* ui_generic_new(UiContext *ctx, const char *name); |
|
0
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
584 | |
|
3
f154867f54dc
add nav buttons, update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
2
diff
changeset
|
585 | #define ui_get(v) _Generic(v, \ |
|
f154867f54dc
add nav buttons, update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
2
diff
changeset
|
586 | UiInteger*: ui_int_get, \ |
|
f154867f54dc
add nav buttons, update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
2
diff
changeset
|
587 | UiDouble*: ui_double_get, \ |
|
f154867f54dc
add nav buttons, update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
2
diff
changeset
|
588 | UiString*: ui_string_get, \ |
|
f154867f54dc
add nav buttons, update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
2
diff
changeset
|
589 | UiText*:ui_text_get) (v) |
|
f154867f54dc
add nav buttons, update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
2
diff
changeset
|
590 | |
|
f154867f54dc
add nav buttons, update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
2
diff
changeset
|
591 | #define ui_set(v, n) _Generic(v, \ |
|
f154867f54dc
add nav buttons, update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
2
diff
changeset
|
592 | UiInteger*: ui_int_set, \ |
|
f154867f54dc
add nav buttons, update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
2
diff
changeset
|
593 | UiDouble*: ui_double_set, \ |
|
f154867f54dc
add nav buttons, update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
2
diff
changeset
|
594 | UiString*: ui_string_set, \ |
|
f154867f54dc
add nav buttons, update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
2
diff
changeset
|
595 | UiText*:ui_text_set) (v, n) |
|
f154867f54dc
add nav buttons, update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
2
diff
changeset
|
596 | |
|
f154867f54dc
add nav buttons, update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
2
diff
changeset
|
597 | UIEXPORT void ui_int_set(UiInteger *i, int64_t value); |
|
f154867f54dc
add nav buttons, update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
2
diff
changeset
|
598 | UIEXPORT int64_t ui_int_get(UiInteger *i); |
|
f154867f54dc
add nav buttons, update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
2
diff
changeset
|
599 | UIEXPORT void ui_double_set(UiDouble *d, double value); |
|
f154867f54dc
add nav buttons, update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
2
diff
changeset
|
600 | UIEXPORT double ui_double_get(UiDouble *d); |
|
f154867f54dc
add nav buttons, update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
2
diff
changeset
|
601 | UIEXPORT void ui_string_set(UiString *s, const char *value); |
|
f154867f54dc
add nav buttons, update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
2
diff
changeset
|
602 | UIEXPORT char* ui_string_get(UiString *s); |
|
f154867f54dc
add nav buttons, update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
2
diff
changeset
|
603 | UIEXPORT void ui_text_set(UiText *s, const char* value); |
|
f154867f54dc
add nav buttons, update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
2
diff
changeset
|
604 | UIEXPORT char* ui_text_get(UiText *s); |
|
110
c00e968d018b
fix repolist menu button
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
109
diff
changeset
|
605 | UIEXPORT void ui_range_set(UiRange *r, double value); |
|
c00e968d018b
fix repolist menu button
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
109
diff
changeset
|
606 | UIEXPORT void ui_range_set_range(UiRange *r, double min, double max); |
|
c00e968d018b
fix repolist menu button
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
109
diff
changeset
|
607 | UIEXPORT void ui_range_set_extent(UiRange *r, double extent); |
|
c00e968d018b
fix repolist menu button
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
109
diff
changeset
|
608 | UIEXPORT double ui_range_get(UiRange *r); |
|
c00e968d018b
fix repolist menu button
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
109
diff
changeset
|
609 | UIEXPORT double ui_range_get_min(UiRange *r); |
|
c00e968d018b
fix repolist menu button
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
109
diff
changeset
|
610 | UIEXPORT double ui_range_get_max(UiRange *r); |
|
c00e968d018b
fix repolist menu button
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
109
diff
changeset
|
611 | UIEXPORT double ui_range_get_extent(UiRange *r); |
|
108
77254bd6dccb
update toolkit, adjust UI code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
103
diff
changeset
|
612 | UIEXPORT void ui_generic_set_image(UiGeneric *g, void *img); |
|
77254bd6dccb
update toolkit, adjust UI code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
103
diff
changeset
|
613 | UIEXPORT void* ui_generic_get_image(UiGeneric *g); |
|
3
f154867f54dc
add nav buttons, update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
2
diff
changeset
|
614 | |
|
51
e324291ca9f8
add resource preview window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
44
diff
changeset
|
615 | UIEXPORT void ui_var_set_int(UiContext *ctx, const char *name, int64_t value); |
|
e324291ca9f8
add resource preview window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
44
diff
changeset
|
616 | UIEXPORT int64_t ui_var_get_int(UiContext *ctx, const char *name); |
|
e324291ca9f8
add resource preview window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
44
diff
changeset
|
617 | UIEXPORT void ui_var_set_double(UiContext *ctx, const char *name, double value); |
|
e324291ca9f8
add resource preview window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
44
diff
changeset
|
618 | UIEXPORT double ui_var_get_double(UiContext *ctx, const char *name); |
|
e324291ca9f8
add resource preview window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
44
diff
changeset
|
619 | UIEXPORT void ui_var_set_string(UiContext *ctx, const char *name, char *value); |
|
e324291ca9f8
add resource preview window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
44
diff
changeset
|
620 | UIEXPORT char* ui_var_get_string(UiContext *ctx, const char *name); |
|
3
f154867f54dc
add nav buttons, update toolkit
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
2
diff
changeset
|
621 | |
|
0
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
622 | UIEXPORT UiObserver* ui_observer_new(ui_callback f, void *data); |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
623 | UIEXPORT UiObserver* ui_obsvlist_add(UiObserver *list, UiObserver *observer); |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
624 | UIEXPORT UiObserver* ui_add_observer(UiObserver *list, ui_callback f, void *data); |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
625 | UIEXPORT void ui_notify(UiObserver *observer, void *data); |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
626 | UIEXPORT void ui_notify_except(UiObserver *observer, UiObserver *exc, void *data); |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
627 | UIEXPORT void ui_notify_evt(UiObserver *observer, UiEvent *event); |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
628 | |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
629 | |
|
108
77254bd6dccb
update toolkit, adjust UI code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
103
diff
changeset
|
630 | UIEXPORT UiList* ui_list_new(UiContext *ctx, const char *name); |
|
77254bd6dccb
update toolkit, adjust UI code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
103
diff
changeset
|
631 | UIEXPORT UiList* ui_list_new2(UiContext *ctx, const char *name, ui_list_init_func init, void *userdata); |
|
102
64ded9f6a6c6
update libs (ucx, toolkit, libidav)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
100
diff
changeset
|
632 | UIEXPORT void ui_list_free(UiList *list); |
|
0
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
633 | UIEXPORT void* ui_list_first(UiList *list); |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
634 | UIEXPORT void* ui_list_next(UiList *list); |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
635 | UIEXPORT void* ui_list_get(UiList *list, int i); |
|
52
0c881944fa10
add resourceviewer info and properties
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
51
diff
changeset
|
636 | UIEXPORT int ui_list_count(UiList *list); |
|
0c881944fa10
add resourceviewer info and properties
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
51
diff
changeset
|
637 | UIEXPORT void ui_list_append(UiList *list, void *data); |
|
0c881944fa10
add resourceviewer info and properties
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
51
diff
changeset
|
638 | UIEXPORT void ui_list_prepend(UiList *list, void *data); |
|
27
c254ed644edf
remove deleted resources from the browser list
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
26
diff
changeset
|
639 | UIEXPORT void ui_list_remove(UiList *list, int i); |
|
0
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
640 | UIEXPORT void ui_list_clear(UiList *list); |
|
52
0c881944fa10
add resourceviewer info and properties
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
51
diff
changeset
|
641 | UIEXPORT void ui_list_update(UiList *list); |
|
109
c3dfcb8f0be7
update toolkit, remove getvalue func from model to table/listview args
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
108
diff
changeset
|
642 | UIEXPORT void ui_list_update_row(UiList *list, int row); |
|
c3dfcb8f0be7
update toolkit, remove getvalue func from model to table/listview args
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
108
diff
changeset
|
643 | UIEXPORT UiListSelection ui_list_get_selection(UiList *list); |
|
52
0c881944fa10
add resourceviewer info and properties
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
51
diff
changeset
|
644 | UIEXPORT void ui_list_addobsv(UiList *list, ui_callback f, void *data); |
|
0c881944fa10
add resourceviewer info and properties
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
51
diff
changeset
|
645 | UIEXPORT void ui_list_notify(UiList *list); |
|
0
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
646 | |
|
26
40d6af793c1a
implement resource deletion
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
21
diff
changeset
|
647 | UIEXPORT UiListSelection ui_list_getselection(UiList *list); |
|
60
ee4e4742391e
add settings window and implement repository editing
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
56
diff
changeset
|
648 | UIEXPORT void ui_list_setselection(UiList *list, int index); |
|
26
40d6af793c1a
implement resource deletion
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
21
diff
changeset
|
649 | |
|
19
813c97c5b6d3
add a very basic upload progress bar
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
18
diff
changeset
|
650 | UIEXPORT UiFileList ui_filelist_copy(UiFileList list); |
|
813c97c5b6d3
add a very basic upload progress bar
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
18
diff
changeset
|
651 | UIEXPORT void ui_filelist_free(UiFileList list); |
|
18
af411868ab9b
implement dnd upload (without progressbar)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
13
diff
changeset
|
652 | |
|
0
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
653 | UIEXPORT void ui_clipboard_set(char *str); |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
654 | UIEXPORT char* ui_clipboard_get(); |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
655 | |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
656 | UIEXPORT void ui_add_image(char *imgname, char *filename); // TODO: remove? |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
657 | |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
658 | |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
659 | |
|
26
40d6af793c1a
implement resource deletion
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
21
diff
changeset
|
660 | UIEXPORT void ui_listselection_free(UiListSelection selection); |
|
0
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
661 | |
|
13
5a8762fcfecc
update toolkit / set window size
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
5
diff
changeset
|
662 | |
|
19
813c97c5b6d3
add a very basic upload progress bar
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
18
diff
changeset
|
663 | UIEXPORT UiStr ui_str(char *cstr); |
|
813c97c5b6d3
add a very basic upload progress bar
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
18
diff
changeset
|
664 | UIEXPORT UiStr ui_str_free(char *str, void (*free)(void *v)); |
|
13
5a8762fcfecc
update toolkit / set window size
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
5
diff
changeset
|
665 | |
|
51
e324291ca9f8
add resource preview window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
44
diff
changeset
|
666 | |
| 76 | 667 | UIEXPORT char* ui_getappdir(void); |
|
110
c00e968d018b
fix repolist menu button
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
109
diff
changeset
|
668 | UIEXPORT char* ui_configfile(const char *name); |
|
51
e324291ca9f8
add resource preview window
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
44
diff
changeset
|
669 | |
|
56
294d5515583a
add authentication dialog
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
670 | UIEXPORT UiCondVar* ui_condvar_create(void); |
|
294d5515583a
add authentication dialog
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
671 | UIEXPORT void ui_condvar_wait(UiCondVar *var); |
|
294d5515583a
add authentication dialog
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
672 | UIEXPORT void ui_condvar_signal(UiCondVar *var, void *data, int intdata); |
|
294d5515583a
add authentication dialog
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
673 | UIEXPORT void ui_condvar_destroy(UiCondVar *var); |
|
294d5515583a
add authentication dialog
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
52
diff
changeset
|
674 | |
|
103
6606616eca9f
update uwproj, toolkit, libidav
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
102
diff
changeset
|
675 | UIEXPORT void ui_setop_enable(int set); |
|
6606616eca9f
update uwproj, toolkit, libidav
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
102
diff
changeset
|
676 | UIEXPORT int ui_get_setop(void); |
|
6606616eca9f
update uwproj, toolkit, libidav
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
102
diff
changeset
|
677 | |
|
108
77254bd6dccb
update toolkit, adjust UI code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
103
diff
changeset
|
678 | |
|
77254bd6dccb
update toolkit, adjust UI code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
103
diff
changeset
|
679 | UIEXPORT void ui_global_list_initializer(ui_list_init_func func, void *userdata); |
|
77254bd6dccb
update toolkit, adjust UI code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
103
diff
changeset
|
680 | UIEXPORT void ui_list_class_set_first(UiList *list, void*(*first)(UiList *list)); |
|
77254bd6dccb
update toolkit, adjust UI code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
103
diff
changeset
|
681 | UIEXPORT void ui_list_class_set_next(UiList *list, void*(*next)(UiList *list)); |
|
77254bd6dccb
update toolkit, adjust UI code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
103
diff
changeset
|
682 | UIEXPORT void ui_list_class_set_get(UiList *list, void*(*get)(UiList *list, int i)); |
|
77254bd6dccb
update toolkit, adjust UI code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
103
diff
changeset
|
683 | UIEXPORT void ui_list_class_set_count(UiList *list, int(*count)(UiList *list)); |
|
77254bd6dccb
update toolkit, adjust UI code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
103
diff
changeset
|
684 | UIEXPORT void ui_list_class_set_data(UiList *list, void *data); |
|
77254bd6dccb
update toolkit, adjust UI code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
103
diff
changeset
|
685 | UIEXPORT void ui_list_class_set_iter(UiList *list, void *iter); |
|
77254bd6dccb
update toolkit, adjust UI code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
103
diff
changeset
|
686 | |
|
0
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
687 | #ifdef __cplusplus |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
688 | } |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
689 | #endif |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
690 | |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
691 | #endif /* UI_TOOLKIT_H */ |
|
2483f517c562
add existing toolkit code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff
changeset
|
692 |