// GENERATED — DO NOT EDIT
///|
/// [Upstream documentation](https://docs.gtk.org/gio/iface.ActionGroup.html).
pub type ActionGroup
///|
pub(open) trait IActionGroup {
fn as_action_group(Self) -> ActionGroup
fn action_added(Self, String) -> Unit = _
fn action_enabled_changed(Self, String, Bool) -> Unit = _
fn action_removed(Self, String) -> Unit = _
fn action_state_changed(Self, String, &@glib.IVariant) -> Unit = _
fn activate_action(Self, String, &@glib.IVariant?) -> Unit = _
fn change_action_state(Self, String, &@glib.IVariant) -> Unit = _
fn get_action_enabled(Self, String) -> Bool = _
fn get_action_state(Self, String) -> @glib.Variant? = _
fn get_action_state_hint(Self, String) -> @glib.Variant? = _
fn has_action(Self, String) -> Bool = _
}
///|
pub impl IActionGroup for ActionGroup with fn as_action_group(self) {
self
}
///|
/// Implementation contract for ActionGroup.action_added. Self is the retained MoonBit state; the second parameter is the invoked ActionGroup object.
pub(open) trait VActionGroupActionAdded {
fn action_added(Self, ActionGroup, String) -> Unit
}
///|
/// Implementation contract for ActionGroup.action_enabled_changed. Self is the retained MoonBit state; the second parameter is the invoked ActionGroup object.
pub(open) trait VActionGroupActionEnabledChanged {
fn action_enabled_changed(Self, ActionGroup, String, Bool) -> Unit
}
///|
/// Implementation contract for ActionGroup.action_removed. Self is the retained MoonBit state; the second parameter is the invoked ActionGroup object.
pub(open) trait VActionGroupActionRemoved {
fn action_removed(Self, ActionGroup, String) -> Unit
}
///|
/// Implementation contract for ActionGroup.action_state_changed. Self is the retained MoonBit state; the second parameter is the invoked ActionGroup object.
pub(open) trait VActionGroupActionStateChanged {
fn action_state_changed(Self, ActionGroup, String, &@glib.IVariant) -> Unit
}
///|
/// Implementation contract for ActionGroup.activate_action. Self is the retained MoonBit state; the second parameter is the invoked ActionGroup object.
pub(open) trait VActionGroupActivateAction {
fn activate_action(Self, ActionGroup, String, &@glib.IVariant?) -> Unit
}
///|
/// Implementation contract for ActionGroup.change_action_state. Self is the retained MoonBit state; the second parameter is the invoked ActionGroup object.
pub(open) trait VActionGroupChangeActionState {
fn change_action_state(Self, ActionGroup, String, &@glib.IVariant) -> Unit
}
///|
#borrow(self_, action_name)
extern "c" fn moonbit_g_action_group_action_added(
self_ : ActionGroup,
action_name : Bytes,
) = "moonbit_g_action_group_action_added"
///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.ActionGroup.action_added.html).
pub fn ActionGroup::action_added(
self : ActionGroup,
action_name : String,
) -> Unit {
moonbit_g_action_group_action_added(self, @encoding/utf8.encode(action_name))
}
///|
#borrow(self_, action_name)
extern "c" fn moonbit_g_action_group_action_enabled_changed(
self_ : ActionGroup,
action_name : Bytes,
enabled : Bool,
) = "moonbit_g_action_group_action_enabled_changed"
///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.ActionGroup.action_enabled_changed.html).
pub fn ActionGroup::action_enabled_changed(
self : ActionGroup,
action_name : String,
enabled : Bool,
) -> Unit {
moonbit_g_action_group_action_enabled_changed(
self,
@encoding/utf8.encode(action_name),
enabled,
)
}
///|
#borrow(self_, action_name)
extern "c" fn moonbit_g_action_group_action_removed(
self_ : ActionGroup,
action_name : Bytes,
) = "moonbit_g_action_group_action_removed"
///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.ActionGroup.action_removed.html).
pub fn ActionGroup::action_removed(
self : ActionGroup,
action_name : String,
) -> Unit {
moonbit_g_action_group_action_removed(
self,
@encoding/utf8.encode(action_name),
)
}
///|
#borrow(self_, action_name, state)
extern "c" fn moonbit_g_action_group_action_state_changed(
self_ : ActionGroup,
action_name : Bytes,
state : @glib.Variant,
) = "moonbit_g_action_group_action_state_changed"
///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.ActionGroup.action_state_changed.html).
pub fn ActionGroup::action_state_changed(
self : ActionGroup,
action_name : String,
state : &@glib.IVariant,
) -> Unit {
moonbit_g_action_group_action_state_changed(
self,
@encoding/utf8.encode(action_name),
state.as_variant(),
)
}
///|
#borrow(self_, action_name, parameter)
extern "c" fn moonbit_g_action_group_activate_action(
self_ : ActionGroup,
action_name : Bytes,
parameter : @glib.Nullable[@glib.Variant],
) = "moonbit_g_action_group_activate_action"
///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.ActionGroup.activate_action.html).
pub fn ActionGroup::activate_action(
self : ActionGroup,
action_name : String,
parameter : &@glib.IVariant?,
) -> Unit {
moonbit_g_action_group_activate_action(
self,
@encoding/utf8.encode(action_name),
match parameter {
Some(v) => @glib.Nullable::some(v.as_variant())
None => @glib.Nullable::null()
},
)
}
///|
#borrow(self_, action_name, value)
extern "c" fn moonbit_g_action_group_change_action_state(
self_ : ActionGroup,
action_name : Bytes,
value : @glib.Variant,
) = "moonbit_g_action_group_change_action_state"
///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.ActionGroup.change_action_state.html).
pub fn ActionGroup::change_action_state(
self : ActionGroup,
action_name : String,
value : &@glib.IVariant,
) -> Unit {
moonbit_g_action_group_change_action_state(
self,
@encoding/utf8.encode(action_name),
value.as_variant(),
)
}
///|
#borrow(self_, action_name)
extern "c" fn moonbit_g_action_group_get_action_enabled(
self_ : ActionGroup,
action_name : Bytes,
) -> Bool = "moonbit_g_action_group_get_action_enabled"
///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.ActionGroup.get_action_enabled.html).
pub fn ActionGroup::get_action_enabled(
self : ActionGroup,
action_name : String,
) -> Bool {
moonbit_g_action_group_get_action_enabled(
self,
@encoding/utf8.encode(action_name),
)
}
///|
#borrow(self_, action_name)
extern "c" fn moonbit_g_action_group_get_action_state(
self_ : ActionGroup,
action_name : Bytes,
) -> @glib.Nullable[@glib.Variant] = "moonbit_g_action_group_get_action_state"
///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.ActionGroup.get_action_state.html).
pub fn ActionGroup::get_action_state(
self : ActionGroup,
action_name : String,
) -> @glib.Variant? {
let raw_result = moonbit_g_action_group_get_action_state(
self,
@encoding/utf8.encode(action_name),
)
raw_result.to_option()
}
///|
#borrow(self_, action_name)
extern "c" fn moonbit_g_action_group_get_action_state_hint(
self_ : ActionGroup,
action_name : Bytes,
) -> @glib.Nullable[@glib.Variant] = "moonbit_g_action_group_get_action_state_hint"
///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.ActionGroup.get_action_state_hint.html).
pub fn ActionGroup::get_action_state_hint(
self : ActionGroup,
action_name : String,
) -> @glib.Variant? {
let raw_result = moonbit_g_action_group_get_action_state_hint(
self,
@encoding/utf8.encode(action_name),
)
raw_result.to_option()
}
///|
#borrow(self_, action_name)
extern "c" fn moonbit_g_action_group_has_action(
self_ : ActionGroup,
action_name : Bytes,
) -> Bool = "moonbit_g_action_group_has_action"
///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.ActionGroup.has_action.html).
pub fn ActionGroup::has_action(
self : ActionGroup,
action_name : String,
) -> Bool {
moonbit_g_action_group_has_action(self, @encoding/utf8.encode(action_name))
}
///|
impl IActionGroup with fn action_added(self, action_name) -> Unit {
self.as_action_group().action_added(action_name)
}
///|
impl IActionGroup with fn action_enabled_changed(self, action_name, enabled) -> Unit {
self.as_action_group().action_enabled_changed(action_name, enabled)
}
///|
impl IActionGroup with fn action_removed(self, action_name) -> Unit {
self.as_action_group().action_removed(action_name)
}
///|
impl IActionGroup with fn action_state_changed(self, action_name, state) -> Unit {
self.as_action_group().action_state_changed(action_name, state)
}
///|
impl IActionGroup with fn activate_action(self, action_name, parameter) -> Unit {
self.as_action_group().activate_action(action_name, parameter)
}
///|
impl IActionGroup with fn change_action_state(self, action_name, value) -> Unit {
self.as_action_group().change_action_state(action_name, value)
}
///|
impl IActionGroup with fn get_action_enabled(self, action_name) -> Bool {
self.as_action_group().get_action_enabled(action_name)
}
///|
impl IActionGroup with fn get_action_state(self, action_name) -> @glib.Variant? {
self.as_action_group().get_action_state(action_name)
}
///|
impl IActionGroup with fn get_action_state_hint(self, action_name) -> @glib.Variant? {
self.as_action_group().get_action_state_hint(action_name)
}
///|
impl IActionGroup with fn has_action(self, action_name) -> Bool {
self.as_action_group().has_action(action_name)
}