diff --git a/src/uing.cr b/src/uing.cr index ee324a1..3128709 100644 --- a/src/uing.cr +++ b/src/uing.cr @@ -1,23 +1,9 @@ require "./uing/version" require "./uing/lib_ui" - -require "./uing/area_handler" -require "./uing/area_draw_params" -require "./uing/area_mouse_event" -require "./uing/area_key_event" -require "./uing/draw_brush" -require "./uing/draw_stroke_params" -require "./uing/draw_matrix" -require "./uing/draw_brush_gradient_stop" -require "./uing/font_descriptor" -require "./uing/draw_text_layout_params" -require "./uing/table_model_handler" -require "./uing/table_text_column_optional_params" -require "./uing/table_params" -require "./uing/table_selection" - require "./uing/tm" +require "./uing/*" + module UIng # uiInitOptions is not used (but it is required) # See https://github.com/libui-ng/libui-ng/issues/208 @@ -70,28 +56,28 @@ module UIng end def self.queue_main(&callback : -> Void) : Nil - boxed_data = Box.box(callback) + boxed_data = ::Box.box(callback) @@box = boxed_data LibUI.queue_main(->(data) do - data_as_callback = Box(typeof(callback)).unbox(data) + data_as_callback = ::Box(typeof(callback)).unbox(data) data_as_callback.call end, boxed_data) end def self.timer(sender, &callback : -> LibC::Int) : Nil - boxed_data = Box.box(callback) + boxed_data = ::Box.box(callback) @@box = boxed_data LibUI.timer(sender, ->(sender, data) do - data_as_callback = Box(typeof(callback)).unbox(data) + data_as_callback = ::Box(typeof(callback)).unbox(data) data_as_callback.call end, boxed_data) end def self.on_should_quit(&callback : -> LibC::Int) : Nil - boxed_data = Box.box(callback) + boxed_data = ::Box.box(callback) @@box = boxed_data LibUI.on_should_quit(->(data) do - data_as_callback = Box(typeof(callback)).unbox(data) + data_as_callback = ::Box(typeof(callback)).unbox(data) data_as_callback.call end, boxed_data) end @@ -182,10 +168,10 @@ module UIng end def self.window_on_position_changed(sender, &callback : -> Void) : Nil - boxed_data = Box.box(callback) + boxed_data = ::Box.box(callback) @@box = boxed_data LibUI.window_on_position_changed(sender, ->(sender, data) do - data_as_callback = Box(typeof(callback)).unbox(data) + data_as_callback = ::Box(typeof(callback)).unbox(data) data_as_callback.call end, boxed_data) end @@ -207,28 +193,28 @@ module UIng end def self.window_on_content_size_changed(sender, &callback : -> Void) : Nil - boxed_data = Box.box(callback) + boxed_data = ::Box.box(callback) @@box = boxed_data LibUI.window_on_content_size_changed(sender, ->(sender, data) do - data_as_callback = Box(typeof(callback)).unbox(data) + data_as_callback = ::Box(typeof(callback)).unbox(data) data_as_callback.call end, boxed_data) end def self.window_on_closing(sender, &callback : -> LibC::Int) : Nil - boxed_data = Box.box(callback) + boxed_data = ::Box.box(callback) @@box = boxed_data LibUI.window_on_closing(sender, ->(sender, data) do - data_as_callback = Box(typeof(callback)).unbox(data) + data_as_callback = ::Box(typeof(callback)).unbox(data) data_as_callback.call end, boxed_data) end def self.window_on_focus_changed(sender, &callback : -> Void) : Nil - boxed_data = Box.box(callback) + boxed_data = ::Box.box(callback) @@box = boxed_data LibUI.window_on_focus_changed(sender, ->(sender, data) do - data_as_callback = Box(typeof(callback)).unbox(data) + data_as_callback = ::Box(typeof(callback)).unbox(data) data_as_callback.call end, boxed_data) end @@ -279,10 +265,10 @@ module UIng end def self.button_on_clicked(sender, &callback : -> Void) : Nil - boxed_data = Box.box(callback) + boxed_data = ::Box.box(callback) @@box = boxed_data LibUI.button_on_clicked(sender, ->(sender, data) do - data_as_callback = Box(typeof(callback)).unbox(data) + data_as_callback = ::Box(typeof(callback)).unbox(data) data_as_callback.call end, boxed_data) end @@ -329,10 +315,10 @@ module UIng end def self.checkbox_on_toggled(sender, &callback : -> Void) : Nil - boxed_data = Box.box(callback) + boxed_data = ::Box.box(callback) @@box = boxed_data LibUI.checkbox_on_toggled(sender, ->(sender, data) do - data_as_callback = Box(typeof(callback)).unbox(data) + data_as_callback = ::Box(typeof(callback)).unbox(data) data_as_callback.call end, boxed_data) end @@ -359,10 +345,10 @@ module UIng end def self.entry_on_changed(sender, &callback : -> Void) : Nil - boxed_data = Box.box(callback) + boxed_data = ::Box.box(callback) @@box = boxed_data LibUI.entry_on_changed(sender, ->(sender, data) do - data_as_callback = Box(typeof(callback)).unbox(data) + data_as_callback = ::Box(typeof(callback)).unbox(data) data_as_callback.call end, boxed_data) end @@ -462,10 +448,10 @@ module UIng end def self.spinbox_on_changed(sender, &callback : -> Void) : Nil - boxed_data = Box.box(callback) + boxed_data = ::Box.box(callback) @@box = boxed_data LibUI.spinbox_on_changed(sender, ->(sender, data) do - data_as_callback = Box(typeof(callback)).unbox(data) + data_as_callback = ::Box(typeof(callback)).unbox(data) data_as_callback.call end, boxed_data) end @@ -491,19 +477,19 @@ module UIng end def self.slider_on_changed(sender, &callback : -> Void) : Nil - boxed_data = Box.box(callback) + boxed_data = ::Box.box(callback) @@box = boxed_data LibUI.slider_on_changed(sender, ->(sender, data) do - data_as_callback = Box(typeof(callback)).unbox(data) + data_as_callback = ::Box(typeof(callback)).unbox(data) data_as_callback.call end, boxed_data) end def self.slider_on_released(sender, &callback : -> Void) : Nil - boxed_data = Box.box(callback) + boxed_data = ::Box.box(callback) @@box = boxed_data LibUI.slider_on_released(sender, ->(sender, data) do - data_as_callback = Box(typeof(callback)).unbox(data) + data_as_callback = ::Box(typeof(callback)).unbox(data) data_as_callback.call end, boxed_data) end @@ -565,10 +551,10 @@ module UIng end def self.combobox_on_selected(sender, &callback : -> Void) : Nil - boxed_data = Box.box(callback) + boxed_data = ::Box.box(callback) @@box = boxed_data LibUI.combobox_on_selected(sender, ->(sender, data) do - data_as_callback = Box(typeof(callback)).unbox(data) + data_as_callback = ::Box(typeof(callback)).unbox(data) data_as_callback.call end, boxed_data) end @@ -591,10 +577,10 @@ module UIng end def self.editable_combobox_on_changed(sender, &callback : -> Void) : Nil - boxed_data = Box.box(callback) + boxed_data = ::Box.box(callback) @@box = boxed_data LibUI.editable_combobox_on_changed(sender, ->(sender, data) do - data_as_callback = Box(typeof(callback)).unbox(data) + data_as_callback = ::Box(typeof(callback)).unbox(data) data_as_callback.call end, boxed_data) end @@ -616,10 +602,10 @@ module UIng end def self.radio_buttons_on_selected(sender, &callback : -> Void) : Nil - boxed_data = Box.box(callback) + boxed_data = ::Box.box(callback) @@box = boxed_data LibUI.radio_buttons_on_selected(sender, ->(sender, data) do - data_as_callback = Box(typeof(callback)).unbox(data) + data_as_callback = ::Box(typeof(callback)).unbox(data) data_as_callback.call end, boxed_data) end @@ -637,10 +623,10 @@ module UIng end def self.date_time_picker_on_changed(sender, &callback : -> Void) : Nil - boxed_data = Box.box(callback) + boxed_data = ::Box.box(callback) @@box = boxed_data LibUI.date_time_picker_on_changed(sender, ->(sender, data) do - data_as_callback = Box(typeof(callback)).unbox(data) + data_as_callback = ::Box(typeof(callback)).unbox(data) data_as_callback.call end, boxed_data) end @@ -671,10 +657,10 @@ module UIng end def self.multiline_entry_on_changed(sender, &callback : -> Void) : Nil - boxed_data = Box.box(callback) + boxed_data = ::Box.box(callback) @@box = boxed_data LibUI.multiline_entry_on_changed(sender, ->(sender, data) do - data_as_callback = Box(typeof(callback)).unbox(data) + data_as_callback = ::Box(typeof(callback)).unbox(data) data_as_callback.call end, boxed_data) end @@ -704,10 +690,10 @@ module UIng end def self.menu_item_on_clicked(sender, &callback : Pointer(LibUI::Window) -> Void) - boxed_data = Box.box(callback) + boxed_data = ::Box.box(callback) @@box = boxed_data LibUI.menu_item_on_clicked(sender, ->(sender, window, data) do - data_as_callback = Box(typeof(callback)).unbox(data) + data_as_callback = ::Box(typeof(callback)).unbox(data) data_as_callback.call(window) end, boxed_data) end @@ -1012,10 +998,10 @@ module UIng end def self.open_type_features_for_each(sender, &callback : (Pointer(Void), LibC::Char, LibC::Char, LibC::Char, LibC::Char, Int32) -> Void) - boxed_data = Box.box(callback) + boxed_data = ::Box.box(callback) @@box = boxed_data LibUI.open_type_features_for_each(sender, ->(otf, a, b, c, d, value, data) do - data_as_callback = Box(typeof(callback)).unbox(data) + data_as_callback = ::Box(typeof(callback)).unbox(data) data_as_callback.call(otf) end, boxed_data) end @@ -1062,10 +1048,10 @@ module UIng end def self.attributed_string_for_each_attribute(sender, &callback : (Pointer(Void), Pointer(LibUI::Attribute), SizeT, SizeT, Pointer(Void)) -> Void) - boxed_data = Box.box(callback) + boxed_data = ::Box.box(callback) @@box = boxed_data LibUI.attributed_string_for_each_attribute(sender, ->(sender, attr, start, end_, data) do - data_as_callback = Box(typeof(callback)).unbox(data) + data_as_callback = ::Box(typeof(callback)).unbox(data) data_as_callback.call(attr, start, end_) end, boxed_data) end @@ -1111,10 +1097,10 @@ module UIng end def self.font_button_on_changed(sender, &callback : -> Void) : Nil - boxed_data = Box.box(callback) + boxed_data = ::Box.box(callback) @@box = boxed_data LibUI.font_button_on_changed(sender, ->(sender, data) do - data_as_callback = Box(typeof(callback)).unbox(data) + data_as_callback = ::Box(typeof(callback)).unbox(data) data_as_callback.call end, boxed_data) end @@ -1136,10 +1122,10 @@ module UIng end def self.color_button_on_changed(sender, &callback : -> Void) : Nil - boxed_data = Box.box(callback) + boxed_data = ::Box.box(callback) @@box = boxed_data LibUI.color_button_on_changed(sender, ->(sender, data) do - data_as_callback = Box(typeof(callback)).unbox(data) + data_as_callback = ::Box(typeof(callback)).unbox(data) data_as_callback.call end, boxed_data) end @@ -1306,19 +1292,19 @@ module UIng end def self.table_on_row_clicked(sender, &callback : LibC::Int -> Void) : Nil - boxed_data = Box.box(callback) + boxed_data = ::Box.box(callback) @@box = boxed_data LibUI.table_on_row_clicked(sender, ->(sender, row, data) do - data_as_callback = Box(typeof(callback)).unbox(data) + data_as_callback = ::Box(typeof(callback)).unbox(data) data_as_callback.call(row) end, boxed_data) end def self.table_on_row_double_clicked(sender, &callback : LibC::Int -> Void) : Nil - boxed_data = Box.box(callback) + boxed_data = ::Box.box(callback) @@box = boxed_data LibUI.table_on_row_double_clicked(sender, ->(sender, row, data) do - data_as_callback = Box(typeof(callback)).unbox(data) + data_as_callback = ::Box(typeof(callback)).unbox(data) data_as_callback.call(row) end, boxed_data) end @@ -1332,10 +1318,10 @@ module UIng end def self.table_header_on_clicked(sender, &callback : LibC::Int -> Void) : Nil - boxed_data = Box.box(callback) + boxed_data = ::Box.box(callback) @@box = boxed_data LibUI.table_header_on_clicked(sender, ->(sender, column, data) do - data_as_callback = Box(typeof(callback)).unbox(data) + data_as_callback = ::Box(typeof(callback)).unbox(data) data_as_callback.call(column) end, boxed_data) end @@ -1357,10 +1343,10 @@ module UIng end def self.table_on_selection_changed(sender, &callback : -> Void) : Nil - boxed_data = Box.box(callback) + boxed_data = ::Box.box(callback) @@box = boxed_data LibUI.table_on_selection_changed(sender, ->(sender, data) do - data_as_callback = Box(typeof(callback)).unbox(data) + data_as_callback = ::Box(typeof(callback)).unbox(data) data_as_callback.call end, boxed_data) end diff --git a/src/uing/area.cr b/src/uing/area.cr new file mode 100644 index 0000000..22ad05a --- /dev/null +++ b/src/uing/area.cr @@ -0,0 +1,16 @@ +module UIng + class Area + def initialize(@ref_ptr : Pointer(LibUI::Area)) + end + + def initialize + @ref_ptr = LibUI.new_area + end + + forward_missing_to(@ref_ptr) + + def to_unsafe + @ref_ptr + end + end +end diff --git a/src/uing/attribute.cr b/src/uing/attribute.cr new file mode 100644 index 0000000..f28279a --- /dev/null +++ b/src/uing/attribute.cr @@ -0,0 +1,16 @@ +module UIng + class Attribute + def initialize(@ref_ptr : Pointer(LibUI::Attribute)) + end + + def initialize + @ref_ptr = LibUI.new_attribute + end + + forward_missing_to(@ref_ptr) + + def to_unsafe + @ref_ptr + end + end +end diff --git a/src/uing/attributed_string.cr b/src/uing/attributed_string.cr new file mode 100644 index 0000000..a44865c --- /dev/null +++ b/src/uing/attributed_string.cr @@ -0,0 +1,16 @@ +module UIng + class AttributedString + def initialize(@ref_ptr : Pointer(LibUI::AttributedString)) + end + + def initialize + @ref_ptr = LibUI.new_attributed_string + end + + forward_missing_to(@ref_ptr) + + def to_unsafe + @ref_ptr + end + end +end diff --git a/src/uing/box.cr b/src/uing/box.cr new file mode 100644 index 0000000..064e0ad --- /dev/null +++ b/src/uing/box.cr @@ -0,0 +1,17 @@ +module UIng + # Note: The name Box is already taken by Crystal's built-in class Box. + class Box + def initialize(@ref_ptr : Pointer(LibUI::Box)) + end + + def initialize + @ref_ptr = LibUI.new_box + end + + forward_missing_to(@ref_ptr) + + def to_unsafe + @ref_ptr + end + end +end diff --git a/src/uing/button.cr b/src/uing/button.cr new file mode 100644 index 0000000..6dba078 --- /dev/null +++ b/src/uing/button.cr @@ -0,0 +1,16 @@ +module UIng + class Button + def initialize(@ref_ptr : Pointer(LibUI::Button)) + end + + def initialize + @ref_ptr = LibUI.new_button + end + + forward_missing_to(@ref_ptr) + + def to_unsafe + @ref_ptr + end + end +end diff --git a/src/uing/checkbox.cr b/src/uing/checkbox.cr new file mode 100644 index 0000000..8824939 --- /dev/null +++ b/src/uing/checkbox.cr @@ -0,0 +1,16 @@ +module UIng + class Checkbox + def initialize(@ref_ptr : Pointer(LibUI::Checkbox)) + end + + def initialize + @ref_ptr = LibUI.new_checkbox + end + + forward_missing_to(@ref_ptr) + + def to_unsafe + @ref_ptr + end + end +end diff --git a/src/uing/color_button.cr b/src/uing/color_button.cr new file mode 100644 index 0000000..dd23f9c --- /dev/null +++ b/src/uing/color_button.cr @@ -0,0 +1,16 @@ +module UIng + class ColorButton + def initialize(@ref_ptr : Pointer(LibUI::ColorButton)) + end + + def initialize + @ref_ptr = LibUI.new_color_button + end + + forward_missing_to(@ref_ptr) + + def to_unsafe + @ref_ptr + end + end +end diff --git a/src/uing/combobox.cr b/src/uing/combobox.cr new file mode 100644 index 0000000..01534fd --- /dev/null +++ b/src/uing/combobox.cr @@ -0,0 +1,16 @@ +module UIng + class Combobox + def initialize(@ref_ptr : Pointer(LibUI::Combobox)) + end + + def initialize + @ref_ptr = LibUI.new_combobox + end + + forward_missing_to(@ref_ptr) + + def to_unsafe + @ref_ptr + end + end +end diff --git a/src/uing/date_time_picker.cr b/src/uing/date_time_picker.cr new file mode 100644 index 0000000..0b84351 --- /dev/null +++ b/src/uing/date_time_picker.cr @@ -0,0 +1,16 @@ +module UIng + class DateTimePicker + def initialize(@ref_ptr : Pointer(LibUI::DateTimePicker)) + end + + def initialize + @ref_ptr = LibUI.new_date_time_picker + end + + forward_missing_to(@ref_ptr) + + def to_unsafe + @ref_ptr + end + end +end diff --git a/src/uing/draw_context.cr b/src/uing/draw_context.cr new file mode 100644 index 0000000..b8d2b7f --- /dev/null +++ b/src/uing/draw_context.cr @@ -0,0 +1,16 @@ +module UIng + class DrawContext + def initialize(@ref_ptr : Pointer(LibUI::DrawContext)) + end + + def initialize + @ref_ptr = LibUI.new_draw_context + end + + forward_missing_to(@ref_ptr) + + def to_unsafe + @ref_ptr + end + end +end diff --git a/src/uing/draw_path.cr b/src/uing/draw_path.cr new file mode 100644 index 0000000..e62072a --- /dev/null +++ b/src/uing/draw_path.cr @@ -0,0 +1,16 @@ +module UIng + class DrawPath + def initialize(@ref_ptr : Pointer(LibUI::DrawPath)) + end + + def initialize + @ref_ptr = LibUI.new_draw_path + end + + forward_missing_to(@ref_ptr) + + def to_unsafe + @ref_ptr + end + end +end diff --git a/src/uing/draw_text_layout.cr b/src/uing/draw_text_layout.cr new file mode 100644 index 0000000..9f1b22a --- /dev/null +++ b/src/uing/draw_text_layout.cr @@ -0,0 +1,16 @@ +module UIng + class DrawTextLayout + def initialize(@ref_ptr : Pointer(LibUI::DrawTextLayout)) + end + + def initialize + @ref_ptr = LibUI.new_draw_text_layout + end + + forward_missing_to(@ref_ptr) + + def to_unsafe + @ref_ptr + end + end +end diff --git a/src/uing/editable_combobox.cr b/src/uing/editable_combobox.cr new file mode 100644 index 0000000..54709e4 --- /dev/null +++ b/src/uing/editable_combobox.cr @@ -0,0 +1,16 @@ +module UIng + class EditableCombobox + def initialize(@ref_ptr : Pointer(LibUI::EditableCombobox)) + end + + def initialize + @ref_ptr = LibUI.new_editable_combobox + end + + forward_missing_to(@ref_ptr) + + def to_unsafe + @ref_ptr + end + end +end diff --git a/src/uing/entry.cr b/src/uing/entry.cr new file mode 100644 index 0000000..36e5ea2 --- /dev/null +++ b/src/uing/entry.cr @@ -0,0 +1,16 @@ +module UIng + class Entry + def initialize(@ref_ptr : Pointer(LibUI::Entry)) + end + + def initialize + @ref_ptr = LibUI.new_entry + end + + forward_missing_to(@ref_ptr) + + def to_unsafe + @ref_ptr + end + end +end diff --git a/src/uing/font_button.cr b/src/uing/font_button.cr new file mode 100644 index 0000000..bc37bdb --- /dev/null +++ b/src/uing/font_button.cr @@ -0,0 +1,16 @@ +module UIng + class FontButton + def initialize(@ref_ptr : Pointer(LibUI::FontButton)) + end + + def initialize + @ref_ptr = LibUI.new_font_button + end + + forward_missing_to(@ref_ptr) + + def to_unsafe + @ref_ptr + end + end +end diff --git a/src/uing/form.cr b/src/uing/form.cr new file mode 100644 index 0000000..3bdf6c3 --- /dev/null +++ b/src/uing/form.cr @@ -0,0 +1,16 @@ +module UIng + class Form + def initialize(@ref_ptr : Pointer(LibUI::Form)) + end + + def initialize + @ref_ptr = LibUI.new_form + end + + forward_missing_to(@ref_ptr) + + def to_unsafe + @ref_ptr + end + end +end diff --git a/src/uing/grid.cr b/src/uing/grid.cr new file mode 100644 index 0000000..6b5e668 --- /dev/null +++ b/src/uing/grid.cr @@ -0,0 +1,16 @@ +module UIng + class Grid + def initialize(@ref_ptr : Pointer(LibUI::Grid)) + end + + def initialize + @ref_ptr = LibUI.new_grid + end + + forward_missing_to(@ref_ptr) + + def to_unsafe + @ref_ptr + end + end +end diff --git a/src/uing/group.cr b/src/uing/group.cr new file mode 100644 index 0000000..433a561 --- /dev/null +++ b/src/uing/group.cr @@ -0,0 +1,16 @@ +module UIng + class Group + def initialize(@ref_ptr : Pointer(LibUI::Group)) + end + + def initialize + @ref_ptr = LibUI.new_group + end + + forward_missing_to(@ref_ptr) + + def to_unsafe + @ref_ptr + end + end +end diff --git a/src/uing/image.cr b/src/uing/image.cr new file mode 100644 index 0000000..43d4caa --- /dev/null +++ b/src/uing/image.cr @@ -0,0 +1,16 @@ +module UIng + class Image + def initialize(@ref_ptr : Pointer(LibUI::Image)) + end + + def initialize + @ref_ptr = LibUI.new_image + end + + forward_missing_to(@ref_ptr) + + def to_unsafe + @ref_ptr + end + end +end diff --git a/src/uing/label.cr b/src/uing/label.cr new file mode 100644 index 0000000..0019cd2 --- /dev/null +++ b/src/uing/label.cr @@ -0,0 +1,16 @@ +module UIng + class Label + def initialize(@ref_ptr : Pointer(LibUI::Label)) + end + + def initialize + @ref_ptr = LibUI.new_label + end + + forward_missing_to(@ref_ptr) + + def to_unsafe + @ref_ptr + end + end +end diff --git a/src/uing/menu.cr b/src/uing/menu.cr new file mode 100644 index 0000000..95c92c1 --- /dev/null +++ b/src/uing/menu.cr @@ -0,0 +1,16 @@ +module UIng + class Menu + def initialize(@ref_ptr : Pointer(LibUI::Menu)) + end + + def initialize + @ref_ptr = LibUI.new_menu + end + + forward_missing_to(@ref_ptr) + + def to_unsafe + @ref_ptr + end + end +end diff --git a/src/uing/menu_item.cr b/src/uing/menu_item.cr new file mode 100644 index 0000000..3e7fc2f --- /dev/null +++ b/src/uing/menu_item.cr @@ -0,0 +1,16 @@ +module UIng + class MenuItem + def initialize(@ref_ptr : Pointer(LibUI::MenuItem)) + end + + def initialize + @ref_ptr = LibUI.new_menu_item + end + + forward_missing_to(@ref_ptr) + + def to_unsafe + @ref_ptr + end + end +end diff --git a/src/uing/multiline_entry.cr b/src/uing/multiline_entry.cr new file mode 100644 index 0000000..c5ec63c --- /dev/null +++ b/src/uing/multiline_entry.cr @@ -0,0 +1,16 @@ +module UIng + class MultilineEntry + def initialize(@ref_ptr : Pointer(LibUI::MultilineEntry)) + end + + def initialize + @ref_ptr = LibUI.new_multiline_entry + end + + forward_missing_to(@ref_ptr) + + def to_unsafe + @ref_ptr + end + end +end diff --git a/src/uing/open_type_features.cr b/src/uing/open_type_features.cr new file mode 100644 index 0000000..d5fb4d6 --- /dev/null +++ b/src/uing/open_type_features.cr @@ -0,0 +1,16 @@ +module UIng + class OpenTypeFeatures + def initialize(@ref_ptr : Pointer(LibUI::OpenTypeFeatures)) + end + + def initialize + @ref_ptr = LibUI.new_open_type_features + end + + forward_missing_to(@ref_ptr) + + def to_unsafe + @ref_ptr + end + end +end diff --git a/src/uing/progress_bar.cr b/src/uing/progress_bar.cr new file mode 100644 index 0000000..e117a1f --- /dev/null +++ b/src/uing/progress_bar.cr @@ -0,0 +1,16 @@ +module UIng + class ProgressBar + def initialize(@ref_ptr : Pointer(LibUI::ProgressBar)) + end + + def initialize + @ref_ptr = LibUI.new_progress_bar + end + + forward_missing_to(@ref_ptr) + + def to_unsafe + @ref_ptr + end + end +end diff --git a/src/uing/radio_buttons.cr b/src/uing/radio_buttons.cr new file mode 100644 index 0000000..9312a41 --- /dev/null +++ b/src/uing/radio_buttons.cr @@ -0,0 +1,16 @@ +module UIng + class RadioButtons + def initialize(@ref_ptr : Pointer(LibUI::RadioButtons)) + end + + def initialize + @ref_ptr = LibUI.new_radio_buttons + end + + forward_missing_to(@ref_ptr) + + def to_unsafe + @ref_ptr + end + end +end diff --git a/src/uing/separator.cr b/src/uing/separator.cr new file mode 100644 index 0000000..6bddc00 --- /dev/null +++ b/src/uing/separator.cr @@ -0,0 +1,16 @@ +module UIng + class Separator + def initialize(@ref_ptr : Pointer(LibUI::Separator)) + end + + def initialize + @ref_ptr = LibUI.new_separator + end + + forward_missing_to(@ref_ptr) + + def to_unsafe + @ref_ptr + end + end +end diff --git a/src/uing/slider.cr b/src/uing/slider.cr new file mode 100644 index 0000000..3472cde --- /dev/null +++ b/src/uing/slider.cr @@ -0,0 +1,16 @@ +module UIng + class Slider + def initialize(@ref_ptr : Pointer(LibUI::Slider)) + end + + def initialize + @ref_ptr = LibUI.new_slider + end + + forward_missing_to(@ref_ptr) + + def to_unsafe + @ref_ptr + end + end +end diff --git a/src/uing/spinbox.cr b/src/uing/spinbox.cr new file mode 100644 index 0000000..e00addb --- /dev/null +++ b/src/uing/spinbox.cr @@ -0,0 +1,16 @@ +module UIng + class Spinbox + def initialize(@ref_ptr : Pointer(LibUI::Spinbox)) + end + + def initialize + @ref_ptr = LibUI.new_spinbox + end + + forward_missing_to(@ref_ptr) + + def to_unsafe + @ref_ptr + end + end +end diff --git a/src/uing/tab.cr b/src/uing/tab.cr new file mode 100644 index 0000000..d43ae23 --- /dev/null +++ b/src/uing/tab.cr @@ -0,0 +1,16 @@ +module UIng + class Tab + def initialize(@ref_ptr : Pointer(LibUI::Tab)) + end + + def initialize + @ref_ptr = LibUI.new_tab + end + + forward_missing_to(@ref_ptr) + + def to_unsafe + @ref_ptr + end + end +end diff --git a/src/uing/table.cr b/src/uing/table.cr new file mode 100644 index 0000000..e9d57ba --- /dev/null +++ b/src/uing/table.cr @@ -0,0 +1,16 @@ +module UIng + class Table + def initialize(@ref_ptr : Pointer(LibUI::Table)) + end + + def initialize + @ref_ptr = LibUI.new_table + end + + forward_missing_to(@ref_ptr) + + def to_unsafe + @ref_ptr + end + end +end diff --git a/src/uing/table_model.cr b/src/uing/table_model.cr new file mode 100644 index 0000000..17f05aa --- /dev/null +++ b/src/uing/table_model.cr @@ -0,0 +1,16 @@ +module UIng + class TableModel + def initialize(@ref_ptr : Pointer(LibUI::TableModel)) + end + + def initialize + @ref_ptr = LibUI.new_table_model + end + + forward_missing_to(@ref_ptr) + + def to_unsafe + @ref_ptr + end + end +end diff --git a/src/uing/table_value.cr b/src/uing/table_value.cr new file mode 100644 index 0000000..78d58ef --- /dev/null +++ b/src/uing/table_value.cr @@ -0,0 +1,16 @@ +module UIng + class TableValue + def initialize(@ref_ptr : Pointer(LibUI::TableValue)) + end + + def initialize + @ref_ptr = LibUI.new_table_value + end + + forward_missing_to(@ref_ptr) + + def to_unsafe + @ref_ptr + end + end +end diff --git a/src/uing/window.cr b/src/uing/window.cr new file mode 100644 index 0000000..74a655f --- /dev/null +++ b/src/uing/window.cr @@ -0,0 +1,16 @@ +module UIng + class Window + def initialize(@ref_ptr : Pointer(LibUI::Window)) + end + + def initialize + @ref_ptr = LibUI.new_window + end + + forward_missing_to(@ref_ptr) + + def to_unsafe + @ref_ptr + end + end +end