Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GI generated callbacks #35

Merged
merged 10 commits into from
Jul 16, 2023
28 changes: 14 additions & 14 deletions Adwaita/src/gen/adw_consts
Original file line number Diff line number Diff line change
Expand Up @@ -9,85 +9,85 @@ $(Expr(:toplevel, quote
begin
@cenum AnimationState::Int32 AnimationState_IDLE = 0 AnimationState_PAUSED = 1 AnimationState_PLAYING = 2 AnimationState_FINISHED = 3
(GLib.g_type(::Type{T}) where T <: AnimationState) = begin
ccall(("adw_animation_state_get_type", "libadwaita-1.so.0"), GType, ())
ccall(("adw_animation_state_get_type", libadwaita), GType, ())
end
end
begin
@cenum CenteringPolicy::Int32 CenteringPolicy_LOOSE = 0 CenteringPolicy_STRICT = 1
(GLib.g_type(::Type{T}) where T <: CenteringPolicy) = begin
ccall(("adw_centering_policy_get_type", "libadwaita-1.so.0"), GType, ())
ccall(("adw_centering_policy_get_type", libadwaita), GType, ())
end
end
begin
@cenum ColorScheme::Int32 ColorScheme_DEFAULT = 0 ColorScheme_FORCE_LIGHT = 1 ColorScheme_PREFER_LIGHT = 2 ColorScheme_PREFER_DARK = 3 ColorScheme_FORCE_DARK = 4
(GLib.g_type(::Type{T}) where T <: ColorScheme) = begin
ccall(("adw_color_scheme_get_type", "libadwaita-1.so.0"), GType, ())
ccall(("adw_color_scheme_get_type", libadwaita), GType, ())
end
end
begin
@cenum Easing::Int32 Easing_LINEAR = 0 Easing_EASE_IN_QUAD = 1 Easing_EASE_OUT_QUAD = 2 Easing_EASE_IN_OUT_QUAD = 3 Easing_EASE_IN_CUBIC = 4 Easing_EASE_OUT_CUBIC = 5 Easing_EASE_IN_OUT_CUBIC = 6 Easing_EASE_IN_QUART = 7 Easing_EASE_OUT_QUART = 8 Easing_EASE_IN_OUT_QUART = 9 Easing_EASE_IN_QUINT = 10 Easing_EASE_OUT_QUINT = 11 Easing_EASE_IN_OUT_QUINT = 12 Easing_EASE_IN_SINE = 13 Easing_EASE_OUT_SINE = 14 Easing_EASE_IN_OUT_SINE = 15 Easing_EASE_IN_EXPO = 16 Easing_EASE_OUT_EXPO = 17 Easing_EASE_IN_OUT_EXPO = 18 Easing_EASE_IN_CIRC = 19 Easing_EASE_OUT_CIRC = 20 Easing_EASE_IN_OUT_CIRC = 21 Easing_EASE_IN_ELASTIC = 22 Easing_EASE_OUT_ELASTIC = 23 Easing_EASE_IN_OUT_ELASTIC = 24 Easing_EASE_IN_BACK = 25 Easing_EASE_OUT_BACK = 26 Easing_EASE_IN_OUT_BACK = 27 Easing_EASE_IN_BOUNCE = 28 Easing_EASE_OUT_BOUNCE = 29 Easing_EASE_IN_OUT_BOUNCE = 30
(GLib.g_type(::Type{T}) where T <: Easing) = begin
ccall(("adw_easing_get_type", "libadwaita-1.so.0"), GType, ())
ccall(("adw_easing_get_type", libadwaita), GType, ())
end
end
begin
@cenum FlapFoldPolicy::Int32 FlapFoldPolicy_NEVER = 0 FlapFoldPolicy_ALWAYS = 1 FlapFoldPolicy_AUTO = 2
(GLib.g_type(::Type{T}) where T <: FlapFoldPolicy) = begin
ccall(("adw_flap_fold_policy_get_type", "libadwaita-1.so.0"), GType, ())
ccall(("adw_flap_fold_policy_get_type", libadwaita), GType, ())
end
end
begin
@cenum FlapTransitionType::Int32 FlapTransitionType_OVER = 0 FlapTransitionType_UNDER = 1 FlapTransitionType_SLIDE = 2
(GLib.g_type(::Type{T}) where T <: FlapTransitionType) = begin
ccall(("adw_flap_transition_type_get_type", "libadwaita-1.so.0"), GType, ())
ccall(("adw_flap_transition_type_get_type", libadwaita), GType, ())
end
end
begin
@cenum FoldThresholdPolicy::Int32 FoldThresholdPolicy_MINIMUM = 0 FoldThresholdPolicy_NATURAL = 1
(GLib.g_type(::Type{T}) where T <: FoldThresholdPolicy) = begin
ccall(("adw_fold_threshold_policy_get_type", "libadwaita-1.so.0"), GType, ())
ccall(("adw_fold_threshold_policy_get_type", libadwaita), GType, ())
end
end
begin
@cenum LeafletTransitionType::Int32 LeafletTransitionType_OVER = 0 LeafletTransitionType_UNDER = 1 LeafletTransitionType_SLIDE = 2
(GLib.g_type(::Type{T}) where T <: LeafletTransitionType) = begin
ccall(("adw_leaflet_transition_type_get_type", "libadwaita-1.so.0"), GType, ())
ccall(("adw_leaflet_transition_type_get_type", libadwaita), GType, ())
end
end
begin
@cenum NavigationDirection::Int32 NavigationDirection_BACK = 0 NavigationDirection_FORWARD = 1
(GLib.g_type(::Type{T}) where T <: NavigationDirection) = begin
ccall(("adw_navigation_direction_get_type", "libadwaita-1.so.0"), GType, ())
ccall(("adw_navigation_direction_get_type", libadwaita), GType, ())
end
end
begin
@cenum ResponseAppearance::Int32 ResponseAppearance_DEFAULT = 0 ResponseAppearance_SUGGESTED = 1 ResponseAppearance_DESTRUCTIVE = 2
(GLib.g_type(::Type{T}) where T <: ResponseAppearance) = begin
ccall(("adw_response_appearance_get_type", "libadwaita-1.so.0"), GType, ())
ccall(("adw_response_appearance_get_type", libadwaita), GType, ())
end
end
begin
@cenum SqueezerTransitionType::Int32 SqueezerTransitionType_NONE = 0 SqueezerTransitionType_CROSSFADE = 1
(GLib.g_type(::Type{T}) where T <: SqueezerTransitionType) = begin
ccall(("adw_squeezer_transition_type_get_type", "libadwaita-1.so.0"), GType, ())
ccall(("adw_squeezer_transition_type_get_type", libadwaita), GType, ())
end
end
begin
@cenum ToastPriority::Int32 ToastPriority_NORMAL = 0 ToastPriority_HIGH = 1
(GLib.g_type(::Type{T}) where T <: ToastPriority) = begin
ccall(("adw_toast_priority_get_type", "libadwaita-1.so.0"), GType, ())
ccall(("adw_toast_priority_get_type", libadwaita), GType, ())
end
end
begin
@cenum ViewSwitcherPolicy::Int32 ViewSwitcherPolicy_NARROW = 0 ViewSwitcherPolicy_WIDE = 1
(GLib.g_type(::Type{T}) where T <: ViewSwitcherPolicy) = begin
ccall(("adw_view_switcher_policy_get_type", "libadwaita-1.so.0"), GType, ())
ccall(("adw_view_switcher_policy_get_type", libadwaita), GType, ())
end
end
begin
@bitflag TabViewShortcuts::UInt32 TabViewShortcuts_NONE = 0 TabViewShortcuts_CONTROL_TAB = 1 TabViewShortcuts_CONTROL_SHIFT_TAB = 2 TabViewShortcuts_CONTROL_PAGE_UP = 4 TabViewShortcuts_CONTROL_PAGE_DOWN = 8 TabViewShortcuts_CONTROL_HOME = 16 TabViewShortcuts_CONTROL_END = 32 TabViewShortcuts_CONTROL_SHIFT_PAGE_UP = 64 TabViewShortcuts_CONTROL_SHIFT_PAGE_DOWN = 128 TabViewShortcuts_CONTROL_SHIFT_HOME = 256 TabViewShortcuts_CONTROL_SHIFT_END = 512 TabViewShortcuts_ALT_DIGITS = 1024 TabViewShortcuts_ALT_ZERO = 2048
(GLib.g_type(::Type{T}) where T <: TabViewShortcuts) = begin
ccall(("adw_tab_view_shortcuts_get_type", "libadwaita-1.so.0"), GType, ())
ccall(("adw_tab_view_shortcuts_get_type", libadwaita), GType, ())
end
end
end
Expand Down
16 changes: 8 additions & 8 deletions Adwaita/src/gen/adw_functions
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
quote
$(Expr(:toplevel, quote
function easing_ease(_self, _value::Real)
ret = ccall(("adw_easing_ease", "libadwaita-1.so.0"), Float64, (UInt32, Float64), _self, _value)
ret = ccall(("adw_easing_ease", libadwaita), Float64, (UInt32, Float64), _self, _value)
ret
end
function get_enable_animations(_widget::GtkWidget)
ret = ccall(("adw_get_enable_animations", "libadwaita-1.so.0"), Cint, (Ptr{GObject},), _widget)
ret = ccall(("adw_get_enable_animations", libadwaita), Cint, (Ptr{GObject},), _widget)
ret2 = convert(Bool, ret)
ret2
end
function get_major_version()
ret = ccall(("adw_get_major_version", "libadwaita-1.so.0"), UInt32, ())
ret = ccall(("adw_get_major_version", libadwaita), UInt32, ())
ret
end
function get_micro_version()
ret = ccall(("adw_get_micro_version", "libadwaita-1.so.0"), UInt32, ())
ret = ccall(("adw_get_micro_version", libadwaita), UInt32, ())
ret
end
function get_minor_version()
ret = ccall(("adw_get_minor_version", "libadwaita-1.so.0"), UInt32, ())
ret = ccall(("adw_get_minor_version", libadwaita), UInt32, ())
ret
end
function init()
ret = ccall(("adw_init", "libadwaita-1.so.0"), Nothing, ())
ret = ccall(("adw_init", libadwaita), Nothing, ())
nothing
end
function is_initialized()
ret = ccall(("adw_is_initialized", "libadwaita-1.so.0"), Cint, ())
ret = ccall(("adw_is_initialized", libadwaita), Cint, ())
ret2 = convert(Bool, ret)
ret2
end
function lerp(_a::Real, _b::Real, _t::Real)
ret = ccall(("adw_lerp", "libadwaita-1.so.0"), Float64, (Float64, Float64, Float64), _a, _b, _t)
ret = ccall(("adw_lerp", libadwaita), Float64, (Float64, Float64, Float64), _a, _b, _t)
ret
end
end))
Expand Down
Loading