Skip to content

Commit 0e41607

Browse files
committed
Add UIGrid bindings to ui-sys
1 parent 48f7b9e commit 0e41607

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

ui-sys/src/lib.rs

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -761,3 +761,32 @@ extern {
761761
xScale: c_double,
762762
yScale: c_double);
763763
}
764+
765+
#[repr(C)]
766+
#[derive(Clone, Copy, PartialEq)]
767+
pub enum uiAlign {
768+
uiAlignFill,
769+
uiAlignStart,
770+
uiAlignCenter,
771+
uiAlignEnd,
772+
}
773+
774+
#[repr(C)]
775+
#[derive(Clone, Copy, PartialEq)]
776+
pub enum uiAt {
777+
uiAtLeading,
778+
uiAtTop,
779+
uiAtTrailing,
780+
uiAtBottom,
781+
}
782+
783+
pub enum uiGrid {}
784+
785+
extern {
786+
pub fn uiGridAppend(g: *mut uiGrid, c: *mut uiControl, left: c_int, height: c_int, xspan: c_int, yspan: c_int, hexpand: c_int, halign: uiAlign, vexpand: c_int, valign: uiAlign);
787+
pub fn uiGridInsertAt(g: *mut uiGrid, c: *mut uiControl, existing: *mut uiControl, at: uiAt, left: c_int, height: c_int, xspan: c_int, yspan: c_int, hexpand: c_int, halign: uiAlign, vexpand: c_int, valign: uiAlign);
788+
pub fn uiGridPadded(g: *mut uiGrid) -> c_int;
789+
pub fn uiGridSetPadded(g: *mut uiGrid, padded: c_int);
790+
pub fn uiNewGrid() -> *mut uiGrid;
791+
}
792+

0 commit comments

Comments
 (0)