libui 0.0.3.alpha → 0.0.4.alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +15 -4
- data/lib/libui/ffi.rb +320 -17
- data/lib/libui/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a74f99e290fdd8cddcd933eea2a41dd3ca6949c385feb496f3991df6cdbc730f
|
4
|
+
data.tar.gz: d329a9c983c42281a4897f91c84c562a200d231b75dd8f7bee44763b3c719ad8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 715cd016369cce7a28b4f4789f3b42fbe383b13d97c7bd8debda929cabefba2672487c5ecbdef8f9b621fae22228e17c39914de3c99b67da659b6a6fd0b976bf
|
7
|
+
data.tar.gz: 7271aad7f11b22d39f82ef693d3e0be914cf6c33e851872b6b0eef6e080890f7854192dcb104550de6f0e626b5793c916caf3d415618084b86dd4a987bc9754d
|
data/README.md
CHANGED
@@ -5,15 +5,25 @@
|
|
5
5
|
|
6
6
|
## Installation
|
7
7
|
|
8
|
-
```
|
8
|
+
```sh
|
9
9
|
gem install libui --pre
|
10
10
|
```
|
11
11
|
|
12
12
|
## Usage
|
13
13
|
|
14
|
+
See [examples](https://github.com/kojix2/libui/tree/main/examples) directory.
|
15
|
+
|
14
16
|
## Development
|
15
17
|
|
16
|
-
|
18
|
+
```sh
|
19
|
+
git clone https://github.com/kojix2/libui
|
20
|
+
cd libui
|
21
|
+
bundle install
|
22
|
+
bundle exec rake vendor:all
|
23
|
+
bundle exec rake test
|
24
|
+
```
|
25
|
+
|
26
|
+
* Keep it simple.
|
17
27
|
|
18
28
|
## Contributing
|
19
29
|
|
@@ -21,10 +31,11 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/kojix2
|
|
21
31
|
|
22
32
|
## Acknowledgement
|
23
33
|
|
24
|
-
libui-ruby
|
34
|
+
This project is inspired by libui-ruby.
|
35
|
+
|
25
36
|
* https://github.com/jamescook/libui-ruby
|
26
37
|
|
27
|
-
While libui-ruby uses FFI, this gem uses Fiddle.
|
38
|
+
While libui-ruby uses [Ruby-FFI](https://github.com/ffi/ffi), this gem uses [Fiddle](https://github.com/ruby/fiddle).
|
28
39
|
|
29
40
|
## License
|
30
41
|
|
data/lib/libui/ffi.rb
CHANGED
@@ -32,7 +32,9 @@ module LibUI
|
|
32
32
|
|
33
33
|
typealias('uint32_t', 'unsigned int')
|
34
34
|
|
35
|
-
InitOptions = struct
|
35
|
+
InitOptions = struct [
|
36
|
+
'size_t Size'
|
37
|
+
]
|
36
38
|
|
37
39
|
try_extern 'const char *uiInit(uiInitOptions *options)'
|
38
40
|
try_extern 'void uiUninit(void)'
|
@@ -47,20 +49,22 @@ module LibUI
|
|
47
49
|
try_extern 'void uiOnShouldQuit(int (*f)(void *data), void *data)'
|
48
50
|
try_extern 'void uiFreeText(char *text)'
|
49
51
|
|
50
|
-
struct [
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
52
|
+
Control = struct [
|
53
|
+
'uint32_t Signature',
|
54
|
+
'uint32_t OSSignature',
|
55
|
+
'uint32_t TypeSignature',
|
56
|
+
'void (*Destroy)(uiControl *)',
|
57
|
+
'uintptr_t (*Handle)(uiControl *)',
|
58
|
+
'uiControl *(*Parent)(uiControl *)',
|
59
|
+
'void (*SetParent)(uiControl *, uiControl *)',
|
60
|
+
'int (*Toplevel)(uiControl *)',
|
61
|
+
'int (*Visible)(uiControl *)',
|
62
|
+
'void (*Show)(uiControl *)',
|
63
|
+
'void (*Hide)(uiControl *)',
|
64
|
+
'int (*Enabled)(uiControl *)',
|
65
|
+
'void (*Enable)(uiControl *)',
|
66
|
+
'void (*Disable)(uiControl *)'
|
67
|
+
]
|
64
68
|
|
65
69
|
try_extern 'void uiControlDestroy(uiControl *)'
|
66
70
|
try_extern 'uintptr_t uiControlHandle(uiControl *)'
|
@@ -83,6 +87,7 @@ module LibUI
|
|
83
87
|
try_extern 'void uiUserBugCannotSetParentOnToplevel(const char *type)'
|
84
88
|
|
85
89
|
# uiWindow
|
90
|
+
|
86
91
|
try_extern 'char *uiWindowTitle(uiWindow *w)'
|
87
92
|
try_extern 'void uiWindowSetTitle(uiWindow *w, const char *title)'
|
88
93
|
try_extern 'void uiWindowContentSize(uiWindow *w, int *width, int *height)'
|
@@ -99,12 +104,14 @@ module LibUI
|
|
99
104
|
try_extern 'uiWindow *uiNewWindow(const char *title, int width, int height, int hasMenubar)'
|
100
105
|
|
101
106
|
# uiButton
|
107
|
+
|
102
108
|
try_extern 'char *uiButtonText(uiButton *b)'
|
103
109
|
try_extern 'void uiButtonSetText(uiButton *b, const char *text)'
|
104
110
|
try_extern 'void uiButtonOnClicked(uiButton *b, void (*f)(uiButton *b, void *data), void *data)'
|
105
111
|
try_extern 'uiButton *uiNewButton(const char *text)'
|
106
112
|
|
107
113
|
# uiBox
|
114
|
+
|
108
115
|
try_extern 'void uiBoxAppend(uiBox *b, uiControl *child, int stretchy)'
|
109
116
|
try_extern 'void uiBoxDelete(uiBox *b, int index)'
|
110
117
|
try_extern 'int uiBoxPadded(uiBox *b)'
|
@@ -113,6 +120,7 @@ module LibUI
|
|
113
120
|
try_extern 'uiBox *uiNewVerticalBox(void)'
|
114
121
|
|
115
122
|
# uiCheckbox
|
123
|
+
|
116
124
|
try_extern 'char *uiCheckboxText(uiCheckbox *c)'
|
117
125
|
try_extern 'void uiCheckboxSetText(uiCheckbox *c, const char *text)'
|
118
126
|
try_extern 'void uiCheckboxOnToggled(uiCheckbox *c, void (*f)(uiCheckbox *c, void *data), void *data)'
|
@@ -121,6 +129,7 @@ module LibUI
|
|
121
129
|
try_extern 'uiCheckbox *uiNewCheckbox(const char *text)'
|
122
130
|
|
123
131
|
# uiEntry
|
132
|
+
|
124
133
|
try_extern 'char *uiEntryText(uiEntry *e)'
|
125
134
|
try_extern 'void uiEntrySetText(uiEntry *e, const char *text)'
|
126
135
|
try_extern 'void uiEntryOnChanged(uiEntry *e, void (*f)(uiEntry *e, void *data), void *data)'
|
@@ -131,11 +140,13 @@ module LibUI
|
|
131
140
|
try_extern 'uiEntry *uiNewSearchEntry(void)'
|
132
141
|
|
133
142
|
# uiLabel
|
143
|
+
|
134
144
|
try_extern 'char *uiLabelText(uiLabel *l)'
|
135
145
|
try_extern 'void uiLabelSetText(uiLabel *l, const char *text)'
|
136
146
|
try_extern 'uiLabel *uiNewLabel(const char *text)'
|
137
147
|
|
138
148
|
# uiTab
|
149
|
+
|
139
150
|
try_extern 'void uiTabAppend(uiTab *t, const char *name, uiControl *c)'
|
140
151
|
try_extern 'void uiTabInsertAt(uiTab *t, const char *name, int before, uiControl *c)'
|
141
152
|
try_extern 'void uiTabDelete(uiTab *t, int index)'
|
@@ -145,6 +156,7 @@ module LibUI
|
|
145
156
|
try_extern 'uiTab *uiNewTab(void)'
|
146
157
|
|
147
158
|
# uiGroup
|
159
|
+
|
148
160
|
try_extern 'char *uiGroupTitle(uiGroup *g)'
|
149
161
|
try_extern 'void uiGroupSetTitle(uiGroup *g, const char *title)'
|
150
162
|
try_extern 'void uiGroupSetChild(uiGroup *g, uiControl *c)'
|
@@ -153,27 +165,32 @@ module LibUI
|
|
153
165
|
try_extern 'uiGroup *uiNewGroup(const char *title)'
|
154
166
|
|
155
167
|
# uiSpinbox
|
168
|
+
|
156
169
|
try_extern 'int uiSpinboxValue(uiSpinbox *s)'
|
157
170
|
try_extern 'void uiSpinboxSetValue(uiSpinbox *s, int value)'
|
158
171
|
try_extern 'void uiSpinboxOnChanged(uiSpinbox *s, void (*f)(uiSpinbox *s, void *data), void *data)'
|
159
172
|
try_extern 'uiSpinbox *uiNewSpinbox(int min, int max)'
|
160
173
|
|
161
174
|
# uiSlider
|
175
|
+
|
162
176
|
try_extern 'int uiSliderValue(uiSlider *s)'
|
163
177
|
try_extern 'void uiSliderSetValue(uiSlider *s, int value)'
|
164
178
|
try_extern 'void uiSliderOnChanged(uiSlider *s, void (*f)(uiSlider *s, void *data), void *data)'
|
165
179
|
try_extern 'uiSlider *uiNewSlider(int min, int max)'
|
166
180
|
|
167
181
|
# uiProgressBar
|
182
|
+
|
168
183
|
try_extern 'int uiProgressBarValue(uiProgressBar *p)'
|
169
184
|
try_extern 'void uiProgressBarSetValue(uiProgressBar *p, int n)'
|
170
185
|
try_extern 'uiProgressBar *uiNewProgressBar(void)'
|
171
186
|
|
172
187
|
# uiSeparator
|
188
|
+
|
173
189
|
try_extern 'uiSeparator *uiNewHorizontalSeparator(void)'
|
174
190
|
try_extern 'uiSeparator *uiNewVerticalSeparator(void)'
|
175
191
|
|
176
192
|
# uiCombobox
|
193
|
+
|
177
194
|
try_extern 'void uiComboboxAppend(uiCombobox *c, const char *text)'
|
178
195
|
try_extern 'int uiComboboxSelected(uiCombobox *c)'
|
179
196
|
try_extern 'void uiComboboxSetSelected(uiCombobox *c, int n)'
|
@@ -181,6 +198,7 @@ module LibUI
|
|
181
198
|
try_extern 'uiCombobox *uiNewCombobox(void)'
|
182
199
|
|
183
200
|
# uiEditableCombobox
|
201
|
+
|
184
202
|
try_extern 'void uiEditableComboboxAppend(uiEditableCombobox *c, const char *text)'
|
185
203
|
try_extern 'char *uiEditableComboboxText(uiEditableCombobox *c)'
|
186
204
|
try_extern 'void uiEditableComboboxSetText(uiEditableCombobox *c, const char *text)'
|
@@ -188,13 +206,15 @@ module LibUI
|
|
188
206
|
try_extern 'uiEditableCombobox *uiNewEditableCombobox(void)'
|
189
207
|
|
190
208
|
# uiRadioButtons
|
209
|
+
|
191
210
|
try_extern 'void uiRadioButtonsAppend(uiRadioButtons *r, const char *text)'
|
192
211
|
try_extern 'int uiRadioButtonsSelected(uiRadioButtons *r)'
|
193
212
|
try_extern 'void uiRadioButtonsSetSelected(uiRadioButtons *r, int n)'
|
194
213
|
try_extern 'void uiRadioButtonsOnSelected(uiRadioButtons *r, void (*f)(uiRadioButtons *, void *), void *data)'
|
195
214
|
try_extern 'uiRadioButtons *uiNewRadioButtons(void)'
|
196
215
|
|
197
|
-
#
|
216
|
+
# uiDateTimePicker # Fixme: struct tm
|
217
|
+
|
198
218
|
try_extern 'void uiDateTimePickerTime(uiDateTimePicker *d, struct tm *time)'
|
199
219
|
try_extern 'void uiDateTimePickerSetTime(uiDateTimePicker *d, const struct tm *time)'
|
200
220
|
try_extern 'void uiDateTimePickerOnChanged(uiDateTimePicker *d, void (*f)(uiDateTimePicker *, void *), void *data)'
|
@@ -203,6 +223,7 @@ module LibUI
|
|
203
223
|
try_extern 'uiDateTimePicker *uiNewTimePicker(void)'
|
204
224
|
|
205
225
|
# uiMultilineEntry
|
226
|
+
|
206
227
|
try_extern 'char *uiMultilineEntryText(uiMultilineEntry *e)'
|
207
228
|
try_extern 'void uiMultilineEntrySetText(uiMultilineEntry *e, const char *text)'
|
208
229
|
try_extern 'void uiMultilineEntryAppend(uiMultilineEntry *e, const char *text)'
|
@@ -213,6 +234,7 @@ module LibUI
|
|
213
234
|
try_extern 'uiMultilineEntry *uiNewNonWrappingMultilineEntry(void)'
|
214
235
|
|
215
236
|
# uiMenuItem
|
237
|
+
|
216
238
|
try_extern 'void uiMenuItemEnable(uiMenuItem *m)'
|
217
239
|
try_extern 'void uiMenuItemDisable(uiMenuItem *m)'
|
218
240
|
try_extern 'void uiMenuItemOnClicked(uiMenuItem *m, void (*f)(uiMenuItem *sender, uiWindow *window, void *data), void *data)'
|
@@ -220,6 +242,7 @@ module LibUI
|
|
220
242
|
try_extern 'void uiMenuItemSetChecked(uiMenuItem *m, int checked)'
|
221
243
|
|
222
244
|
# uiMenu
|
245
|
+
|
223
246
|
try_extern 'uiMenuItem *uiMenuAppendItem(uiMenu *m, const char *name)'
|
224
247
|
try_extern 'uiMenuItem *uiMenuAppendCheckItem(uiMenu *m, const char *name)'
|
225
248
|
try_extern 'uiMenuItem *uiMenuAppendQuitItem(uiMenu *m)'
|
@@ -234,25 +257,305 @@ module LibUI
|
|
234
257
|
try_extern 'void uiMsgBoxError(uiWindow *parent, const char *title, const char *description)'
|
235
258
|
|
236
259
|
# uiArea
|
260
|
+
|
261
|
+
AreaHandler = struct [
|
262
|
+
'void (*Draw)(uiAreaHandler *, uiArea *, uiAreaDrawParams *)',
|
263
|
+
'void (*MouseEvent)(uiAreaHandler *, uiArea *, uiAreaMouseEvent *)',
|
264
|
+
'void (*MouseCrossed)(uiAreaHandler *, uiArea *, int left)',
|
265
|
+
'void (*DragBroken)(uiAreaHandler *, uiArea *)',
|
266
|
+
'int (*KeyEvent)(uiAreaHandler *, uiArea *, uiAreaKeyEvent *)'
|
267
|
+
]
|
268
|
+
|
269
|
+
typealias 'uiWindowResizeEdge', 'int'
|
270
|
+
|
237
271
|
try_extern 'void uiAreaSetSize(uiArea *a, int width, int height)'
|
238
272
|
try_extern 'void uiAreaQueueRedrawAll(uiArea *a)'
|
239
273
|
try_extern 'void uiAreaScrollTo(uiArea *a, double x, double y, double width, double height)'
|
240
274
|
try_extern 'void uiAreaBeginUserWindowMove(uiArea *a)'
|
241
|
-
typealias 'uiWindowResizeEdge', 'char' # FIXME: uint8
|
242
275
|
try_extern 'void uiAreaBeginUserWindowResize(uiArea *a, uiWindowResizeEdge edge)'
|
243
276
|
try_extern 'uiArea *uiNewArea(uiAreaHandler *ah)'
|
244
277
|
try_extern 'uiArea *uiNewScrollingArea(uiAreaHandler *ah, int width, int height)'
|
245
278
|
|
279
|
+
AreaDrawParams = struct [
|
280
|
+
'uiDrawContext *Context',
|
281
|
+
'double AreaWidth',
|
282
|
+
'double AreaHeight',
|
283
|
+
'double ClipX',
|
284
|
+
'double ClipY',
|
285
|
+
'double ClipWidth',
|
286
|
+
'double ClipHeight'
|
287
|
+
]
|
288
|
+
typealias 'uiDrawBrushType', 'int'
|
289
|
+
typealias 'uiDrawLineCap', 'int'
|
290
|
+
typealias 'uiDrawLineJoin', 'int'
|
291
|
+
typealias 'uiDrawFillMode', 'int'
|
292
|
+
|
293
|
+
DrawMatrix = struct [
|
294
|
+
'double M11',
|
295
|
+
'double M12',
|
296
|
+
'double M21',
|
297
|
+
'double M22',
|
298
|
+
'double M31',
|
299
|
+
'double M32'
|
300
|
+
]
|
301
|
+
|
302
|
+
DrawBrush = struct [
|
303
|
+
'uiDrawBrushType Type',
|
304
|
+
'double R',
|
305
|
+
'double G',
|
306
|
+
'double B',
|
307
|
+
'double A',
|
308
|
+
'double X0',
|
309
|
+
'double Y0',
|
310
|
+
'double X1',
|
311
|
+
'double Y1',
|
312
|
+
'double OuterRadius',
|
313
|
+
'uiDrawBrushGradientStop *Stops',
|
314
|
+
'size_t NumStops'
|
315
|
+
]
|
316
|
+
|
317
|
+
DrawBrushGradientStop = struct [
|
318
|
+
'double Pos',
|
319
|
+
'double R',
|
320
|
+
'double G',
|
321
|
+
'double B',
|
322
|
+
'double A'
|
323
|
+
]
|
324
|
+
|
325
|
+
DrawStrokeParams = struct [
|
326
|
+
'uiDrawLineCap Cap',
|
327
|
+
'uiDrawLineJoin Join',
|
328
|
+
'double Thickness',
|
329
|
+
'double MiterLimit',
|
330
|
+
'double *Dashes',
|
331
|
+
'size_t NumDashes',
|
332
|
+
'double DashPhase'
|
333
|
+
]
|
334
|
+
|
335
|
+
# uiDrawPath
|
336
|
+
try_extern 'uiDrawPath *uiDrawNewPath(uiDrawFillMode fillMode)'
|
337
|
+
try_extern 'void uiDrawFreePath(uiDrawPath *p)'
|
338
|
+
try_extern 'void uiDrawPathNewFigure(uiDrawPath *p, double x, double y)'
|
339
|
+
try_extern 'void uiDrawPathNewFigureWithArc(uiDrawPath *p, double xCenter, double yCenter, double radius, double startAngle, double sweep, int negative)'
|
340
|
+
try_extern 'void uiDrawPathLineTo(uiDrawPath *p, double x, double y)'
|
341
|
+
try_extern 'void uiDrawPathArcTo(uiDrawPath *p, double xCenter, double yCenter, double radius, double startAngle, double sweep, int negative)'
|
342
|
+
try_extern 'void uiDrawPathBezierTo(uiDrawPath *p, double c1x, double c1y, double c2x, double c2y, double endX, double endY)'
|
343
|
+
try_extern 'void uiDrawPathCloseFigure(uiDrawPath *p)'
|
344
|
+
try_extern 'void uiDrawPathAddRectangle(uiDrawPath *p, double x, double y, double width, double height)'
|
345
|
+
try_extern 'void uiDrawPathEnd(uiDrawPath *p)'
|
346
|
+
try_extern 'void uiDrawStroke(uiDrawContext *c, uiDrawPath *path, uiDrawBrush *b, uiDrawStrokeParams *p)'
|
347
|
+
try_extern 'void uiDrawFill(uiDrawContext *c, uiDrawPath *path, uiDrawBrush *b)'
|
348
|
+
|
349
|
+
# uiDrawMatrix
|
350
|
+
try_extern 'void uiDrawMatrixSetIdentity(uiDrawMatrix *m)'
|
351
|
+
try_extern 'void uiDrawMatrixTranslate(uiDrawMatrix *m, double x, double y)'
|
352
|
+
try_extern 'void uiDrawMatrixScale(uiDrawMatrix *m, double xCenter, double yCenter, double x, double y)'
|
353
|
+
try_extern 'void uiDrawMatrixRotate(uiDrawMatrix *m, double x, double y, double amount)'
|
354
|
+
try_extern 'void uiDrawMatrixSkew(uiDrawMatrix *m, double x, double y, double xamount, double yamount)'
|
355
|
+
try_extern 'void uiDrawMatrixMultiply(uiDrawMatrix *dest, uiDrawMatrix *src)'
|
356
|
+
try_extern 'int uiDrawMatrixInvertible(uiDrawMatrix *m)'
|
357
|
+
try_extern 'int uiDrawMatrixInvert(uiDrawMatrix *m)'
|
358
|
+
try_extern 'void uiDrawMatrixTransformPoint(uiDrawMatrix *m, double *x, double *y)'
|
359
|
+
try_extern 'void uiDrawMatrixTransformSize(uiDrawMatrix *m, double *x, double *y)'
|
360
|
+
|
361
|
+
try_extern 'void uiDrawTransform(uiDrawContext *c, uiDrawMatrix *m)'
|
362
|
+
try_extern 'void uiDrawClip(uiDrawContext *c, uiDrawPath *path)'
|
363
|
+
try_extern 'void uiDrawSave(uiDrawContext *c)'
|
364
|
+
try_extern 'void uiDrawRestore(uiDrawContext *c)'
|
365
|
+
|
366
|
+
# uiAttribute
|
367
|
+
try_extern 'void uiFreeAttribute(uiAttribute *a)'
|
368
|
+
|
369
|
+
typealias 'uiAttributeType', 'int'
|
370
|
+
|
371
|
+
try_extern 'uiAttributeType uiAttributeGetType(const uiAttribute *a)'
|
372
|
+
try_extern 'uiAttribute *uiNewFamilyAttribute(const char *family)'
|
373
|
+
try_extern 'const char *uiAttributeFamily(const uiAttribute *a)'
|
374
|
+
try_extern 'uiAttribute *uiNewSizeAttribute(double size)'
|
375
|
+
try_extern 'double uiAttributeSize(const uiAttribute *a)'
|
376
|
+
|
377
|
+
typealias 'uiTextWeight', 'int'
|
378
|
+
|
379
|
+
try_extern 'uiAttribute *uiNewWeightAttribute(uiTextWeight weight)'
|
380
|
+
try_extern 'uiTextWeight uiAttributeWeight(const uiAttribute *a)'
|
381
|
+
|
382
|
+
typealias 'uiTextItalic', 'int'
|
383
|
+
|
384
|
+
try_extern 'uiAttribute *uiNewItalicAttribute(uiTextItalic italic)'
|
385
|
+
try_extern 'uiTextItalic uiAttributeItalic(const uiAttribute *a)'
|
386
|
+
|
387
|
+
typealias 'uiTextStretch', 'int'
|
388
|
+
|
389
|
+
try_extern 'uiAttribute *uiNewStretchAttribute(uiTextStretch stretch)'
|
390
|
+
try_extern 'uiTextStretch uiAttributeStretch(const uiAttribute *a)'
|
391
|
+
try_extern 'uiAttribute *uiNewColorAttribute(double r, double g, double b, double a)'
|
392
|
+
try_extern 'void uiAttributeColor(const uiAttribute *a, double *r, double *g, double *b, double *alpha)'
|
393
|
+
try_extern 'uiAttribute *uiNewBackgroundAttribute(double r, double g, double b, double a)'
|
394
|
+
|
395
|
+
typealias 'uiUnderline', 'int'
|
396
|
+
|
397
|
+
try_extern 'uiAttribute *uiNewUnderlineAttribute(uiUnderline u)'
|
398
|
+
try_extern 'uiUnderline uiAttributeUnderline(const uiAttribute *a)'
|
399
|
+
|
400
|
+
typealias 'uiUnderlineColor', 'int'
|
401
|
+
|
402
|
+
try_extern 'uiAttribute *uiNewUnderlineColorAttribute(uiUnderlineColor u, double r, double g, double b, double a)'
|
403
|
+
try_extern 'void uiAttributeUnderlineColor(const uiAttribute *a, uiUnderlineColor *u, double *r, double *g, double *b, double *alpha)'
|
404
|
+
try_extern 'uiOpenTypeFeatures *uiNewOpenTypeFeatures(void)'
|
405
|
+
try_extern 'void uiFreeOpenTypeFeatures(uiOpenTypeFeatures *otf)'
|
406
|
+
try_extern 'uiOpenTypeFeatures *uiOpenTypeFeaturesClone(const uiOpenTypeFeatures *otf)'
|
407
|
+
try_extern 'void uiOpenTypeFeaturesAdd(uiOpenTypeFeatures *otf, char a, char b, char c, char d, uint32_t value)'
|
408
|
+
try_extern 'void uiOpenTypeFeaturesRemove(uiOpenTypeFeatures *otf, char a, char b, char c, char d)'
|
409
|
+
try_extern 'int uiOpenTypeFeaturesGet(const uiOpenTypeFeatures *otf, char a, char b, char c, char d, uint32_t *value)'
|
410
|
+
try_extern 'void uiOpenTypeFeaturesForEach(const uiOpenTypeFeatures *otf, uiOpenTypeFeaturesForEachFunc f, void *data)'
|
411
|
+
try_extern 'uiAttribute *uiNewFeaturesAttribute(const uiOpenTypeFeatures *otf)'
|
412
|
+
try_extern 'const uiOpenTypeFeatures *uiAttributeFeatures(const uiAttribute *a)'
|
413
|
+
try_extern 'uiAttributedString *uiNewAttributedString(const char *initialString)'
|
414
|
+
try_extern 'void uiFreeAttributedString(uiAttributedString *s)'
|
415
|
+
try_extern 'const char *uiAttributedStringString(const uiAttributedString *s)'
|
416
|
+
try_extern 'size_t uiAttributedStringLen(const uiAttributedString *s)'
|
417
|
+
try_extern 'void uiAttributedStringAppendUnattributed(uiAttributedString *s, const char *str)'
|
418
|
+
try_extern 'void uiAttributedStringInsertAtUnattributed(uiAttributedString *s, const char *str, size_t at)'
|
419
|
+
try_extern 'void uiAttributedStringDelete(uiAttributedString *s, size_t start, size_t end)'
|
420
|
+
try_extern 'void uiAttributedStringSetAttribute(uiAttributedString *s, uiAttribute *a, size_t start, size_t end)'
|
421
|
+
try_extern 'void uiAttributedStringForEachAttribute(const uiAttributedString *s, uiAttributedStringForEachAttributeFunc f, void *data)'
|
422
|
+
try_extern 'size_t uiAttributedStringNumGraphemes(uiAttributedString *s)'
|
423
|
+
try_extern 'size_t uiAttributedStringByteIndexToGrapheme(uiAttributedString *s, size_t pos)'
|
424
|
+
try_extern 'size_t uiAttributedStringGraphemeToByteIndex(uiAttributedString *s, size_t pos)'
|
425
|
+
|
426
|
+
# uiFont
|
427
|
+
|
428
|
+
FontDescriptor = struct [
|
429
|
+
'char *Family',
|
430
|
+
'double Size',
|
431
|
+
'uiTextWeight Weight',
|
432
|
+
'uiTextItalic Italic',
|
433
|
+
'uiTextStretch Stretch'
|
434
|
+
]
|
435
|
+
|
436
|
+
typealias 'uiDrawTextAlign', 'int'
|
437
|
+
|
438
|
+
DrawTextLayoutParams = struct [
|
439
|
+
'uiAttributedString *String',
|
440
|
+
'uiFontDescriptor *DefaultFont',
|
441
|
+
'double Width',
|
442
|
+
'uiDrawTextAlign Align'
|
443
|
+
]
|
444
|
+
|
445
|
+
try_extern 'uiDrawTextLayout *uiDrawNewTextLayout(uiDrawTextLayoutParams *params)'
|
446
|
+
try_extern 'void uiDrawFreeTextLayout(uiDrawTextLayout *tl)'
|
447
|
+
try_extern 'void uiDrawText(uiDrawContext *c, uiDrawTextLayout *tl, double x, double y)'
|
448
|
+
try_extern 'void uiDrawTextLayoutExtents(uiDrawTextLayout *tl, double *width, double *height)'
|
449
|
+
|
246
450
|
# uiFontButton
|
451
|
+
|
247
452
|
try_extern 'void uiFontButtonFont(uiFontButton *b, uiFontDescriptor *desc)'
|
248
453
|
try_extern 'void uiFontButtonOnChanged(uiFontButton *b, void (*f)(uiFontButton *, void *), void *data)'
|
249
454
|
try_extern 'uiFontButton *uiNewFontButton(void)'
|
250
455
|
try_extern 'void uiFreeFontButtonFont(uiFontDescriptor *desc)'
|
251
456
|
|
457
|
+
typealias 'uiModifiers', 'int'
|
458
|
+
|
459
|
+
AreaMouseEvent = struct [
|
460
|
+
'double X',
|
461
|
+
'double Y',
|
462
|
+
'double AreaWidth',
|
463
|
+
'double AreaHeight',
|
464
|
+
'int Down',
|
465
|
+
'int Up',
|
466
|
+
'int Count',
|
467
|
+
'uiModifiers Modifiers',
|
468
|
+
'uint64_t Held1To64'
|
469
|
+
]
|
470
|
+
|
471
|
+
typealias 'uiExtKey', 'int'
|
472
|
+
|
473
|
+
AreaKeyEvent = struct [
|
474
|
+
'char Key',
|
475
|
+
'uiExtKey ExtKey',
|
476
|
+
'uiModifiers Modifier',
|
477
|
+
'uiModifiers Modifiers',
|
478
|
+
'int Up'
|
479
|
+
]
|
480
|
+
|
252
481
|
# uiColorButton
|
482
|
+
|
253
483
|
try_extern 'void uiColorButtonColor(uiColorButton *b, double *r, double *g, double *bl, double *a)'
|
254
484
|
try_extern 'void uiColorButtonSetColor(uiColorButton *b, double r, double g, double bl, double a)'
|
255
485
|
try_extern 'void uiColorButtonOnChanged(uiColorButton *b, void (*f)(uiColorButton *, void *), void *data)'
|
256
486
|
try_extern 'uiColorButton *uiNewColorButton(void)'
|
487
|
+
|
488
|
+
# uiForm
|
489
|
+
|
490
|
+
try_extern 'void uiFormAppend(uiForm *f, const char *label, uiControl *c, int stretchy)'
|
491
|
+
try_extern 'void uiFormDelete(uiForm *f, int index)'
|
492
|
+
try_extern 'int uiFormPadded(uiForm *f)'
|
493
|
+
try_extern 'void uiFormSetPadded(uiForm *f, int padded)'
|
494
|
+
try_extern 'uiForm *uiNewForm(void)'
|
495
|
+
|
496
|
+
typealias 'uiAlign', 'int'
|
497
|
+
|
498
|
+
typealias 'uiAt', 'int'
|
499
|
+
|
500
|
+
# uiGrid
|
501
|
+
|
502
|
+
try_extern 'void uiGridAppend(uiGrid *g, uiControl *c, int left, int top, int xspan, int yspan, int hexpand, uiAlign halign, int vexpand, uiAlign valign)'
|
503
|
+
try_extern 'void uiGridInsertAt(uiGrid *g, uiControl *c, uiControl *existing, uiAt at, int xspan, int yspan, int hexpand, uiAlign halign, int vexpand, uiAlign valign)'
|
504
|
+
try_extern 'int uiGridPadded(uiGrid *g)'
|
505
|
+
try_extern 'void uiGridSetPadded(uiGrid *g, int padded)'
|
506
|
+
try_extern 'uiGrid *uiNewGrid(void)'
|
507
|
+
|
508
|
+
# uiImage
|
509
|
+
|
510
|
+
try_extern 'uiImage *uiNewImage(double width, double height)'
|
511
|
+
try_extern 'void uiFreeImage(uiImage *i)'
|
512
|
+
try_extern 'void uiImageAppend(uiImage *i, void *pixels, int pixelWidth, int pixelHeight, int byteStride)'
|
513
|
+
|
514
|
+
# uiTable
|
515
|
+
try_extern 'void uiFreeTableValue(uiTableValue *v)'
|
516
|
+
|
517
|
+
typealias 'uiTableValueType', 'int'
|
518
|
+
|
519
|
+
try_extern 'uiTableValueType uiTableValueGetType(const uiTableValue *v)'
|
520
|
+
try_extern 'uiTableValue *uiNewTableValueString(const char *str)'
|
521
|
+
try_extern 'const char *uiTableValueString(const uiTableValue *v)'
|
522
|
+
try_extern 'uiTableValue *uiNewTableValueImage(uiImage *img)'
|
523
|
+
try_extern 'uiImage *uiTableValueImage(const uiTableValue *v)'
|
524
|
+
try_extern 'uiTableValue *uiNewTableValueInt(int i)'
|
525
|
+
try_extern 'int uiTableValueInt(const uiTableValue *v)'
|
526
|
+
try_extern 'uiTableValue *uiNewTableValueColor(double r, double g, double b, double a)'
|
527
|
+
try_extern 'void uiTableValueColor(const uiTableValue *v, double *r, double *g, double *b, double *a)'
|
528
|
+
|
529
|
+
TableModelHandler = struct [
|
530
|
+
'int (*NumColumns)(uiTableModelHandler *, uiTableModel *)',
|
531
|
+
'uiTableValueType (*ColumnType)(uiTableModelHandler *, uiTableModel *, int)',
|
532
|
+
'int (*NumRows)(uiTableModelHandler *, uiTableModel *)',
|
533
|
+
'uiTableValue *(*CellValue)(uiTableModelHandler *mh, uiTableModel *m, int row, int column)',
|
534
|
+
'void (*SetCellValue)(uiTableModelHandler *, uiTableModel *, int, int, const uiTableValue *)'
|
535
|
+
]
|
536
|
+
|
537
|
+
try_extern 'uiTableModel *uiNewTableModel(uiTableModelHandler *mh)'
|
538
|
+
try_extern 'void uiFreeTableModel(uiTableModel *m)'
|
539
|
+
try_extern 'void uiTableModelRowInserted(uiTableModel *m, int newIndex)'
|
540
|
+
try_extern 'void uiTableModelRowChanged(uiTableModel *m, int index)'
|
541
|
+
try_extern 'void uiTableModelRowDeleted(uiTableModel *m, int oldIndex)'
|
542
|
+
|
543
|
+
TableTextColumnOptionalParams = struct [
|
544
|
+
'int ColorModelColumn'
|
545
|
+
]
|
546
|
+
|
547
|
+
TableParams = struct [
|
548
|
+
'uiTableModel *Model',
|
549
|
+
'int RowBackgroundColorModelColumn'
|
550
|
+
]
|
551
|
+
|
552
|
+
try_extern 'void uiTableAppendTextColumn(uiTable *t, const char *name, int textModelColumn, int textEditableModelColumn, uiTableTextColumnOptionalParams *textParams)'
|
553
|
+
try_extern 'void uiTableAppendImageColumn(uiTable *t, const char *name, int imageModelColumn)'
|
554
|
+
try_extern 'void uiTableAppendImageTextColumn(uiTable *t, const char *name, int imageModelColumn, int textModelColumn, int textEditableModelColumn, uiTableTextColumnOptionalParams *textParams)'
|
555
|
+
try_extern 'void uiTableAppendCheckboxColumn(uiTable *t, const char *name, int checkboxModelColumn, int checkboxEditableModelColumn)'
|
556
|
+
try_extern 'void uiTableAppendCheckboxTextColumn(uiTable *t, const char *name, int checkboxModelColumn, int checkboxEditableModelColumn, int textModelColumn, int textEditableModelColumn, uiTableTextColumnOptionalParams *textParams)'
|
557
|
+
try_extern 'void uiTableAppendProgressBarColumn(uiTable *t, const char *name, int progressModelColumn)'
|
558
|
+
try_extern 'void uiTableAppendButtonColumn(uiTable *t, const char *name, int buttonModelColumn, int buttonClickableModelColumn)'
|
559
|
+
try_extern 'uiTable *uiNewTable(uiTableParams *params)'
|
257
560
|
end
|
258
561
|
end
|
data/lib/libui/version.rb
CHANGED