class Adw::Application

Overview

A base class for Adw::aita applications.

Adw::Application handles library initialization by calling #init in the default Gio::Application::#startup signal handler, in turn chaining up as required by Gtk::Application. Therefore, any subclass of Adw::Application should always chain up its startup handler before using any Adw::aita or GTK API.

Automatic Resources

Adw::Application will automatically load stylesheets located in the application's resource base path (see Gio::Application#resource_base_path=, if they're present.

They can be used to add custom styles to the application, as follows:

Included Modules

Defined in:

lib/gi-crystal/src/auto/adw-1/application.cr

Constructors

Class Method Summary

Instance Method Summary

Instance methods inherited from module Gio::ActionMap

add_action(action : Gio::Action) : Nil add_action, add_action_entries(entries : Enumerable(Gio::ActionEntry), user_data : Pointer(Void)?) : Nil add_action_entries, lookup_action(action_name : String) : Gio::Action? lookup_action, remove_action(action_name : String) : Nil remove_action, to_unsafe to_unsafe

Class methods inherited from module Gio::ActionMap

g_type : UInt64 g_type

Instance methods inherited from module Gio::ActionGroup

action_added(action_name : String) : Nil action_added, action_added_signal action_added_signal, action_enabled(action_name : String) : Bool action_enabled, action_enabled_changed(action_name : String, enabled : Bool) : Nil action_enabled_changed, action_enabled_changed_signal action_enabled_changed_signal, action_parameter_type(action_name : String) : GLib::VariantType? action_parameter_type, action_removed(action_name : String) : Nil action_removed, action_removed_signal action_removed_signal, action_state(action_name : String) : GLib::Variant? action_state, action_state_changed(action_name : String, state : _) : Nil action_state_changed, action_state_changed_signal action_state_changed_signal, action_state_hint(action_name : String) : GLib::Variant? action_state_hint, action_state_type(action_name : String) : GLib::VariantType? action_state_type, activate_action(action_name : String, parameter : _?) : Nil activate_action, change_action_state(action_name : String, value : _) : Nil change_action_state, has_action(action_name : String) : Bool has_action, list_actions : Enumerable(String) list_actions, query_action(action_name : String, enabled : Bool) : Bool query_action, to_unsafe to_unsafe

Class methods inherited from module Gio::ActionGroup

g_type : UInt64 g_type

Instance methods inherited from class Gtk::Application

accels_for_action(detailed_action_name : String) : Enumerable(String) accels_for_action, actions_for_accel(accel : String) : Enumerable(String) actions_for_accel, active_window : Gtk::Window? active_window, add_window(window : Gtk::Window) : Nil add_window, inhibit(window : Gtk::Window?, flags : Gtk::ApplicationInhibitFlags, reason : String?) : UInt32 inhibit, list_action_descriptions : Enumerable(String) list_action_descriptions, menu_by_id(id : String) : Gio::Menu? menu_by_id, menubar : Gio::MenuModel? menubar, menubar=(menubar : Gio::MenuModel?) : Nil menubar=, query_end_signal query_end_signal, register_session=(value : Bool) : Bool register_session=, register_session? : Bool register_session?, remove_window(window : Gtk::Window) : Nil remove_window, screensaver_active? : Bool screensaver_active?, set_accels_for_action(detailed_action_name : String, accels : Enumerable(String)) : Nil set_accels_for_action, uninhibit(cookie : UInt32) : Nil uninhibit, window_added_signal window_added_signal, window_by_id(id : UInt32) : Gtk::Window? window_by_id, window_removed_signal window_removed_signal, windows : GLib::List windows

Constructor methods inherited from class Gtk::Application

new(application_id : String?, flags : Gio::ApplicationFlags) : self
new
new(*, action_group : Gio::ActionGroup? = nil, active_window : Gtk::Window? = nil, application_id : String? = nil, flags : Gio::ApplicationFlags? = nil, inactivity_timeout : UInt32? = nil, is_busy : Bool? = nil, is_registered : Bool? = nil, is_remote : Bool? = nil, menubar : Gio::MenuModel? = nil, register_session : Bool? = nil, resource_base_path : String? = nil, screensaver_active : Bool? = nil)
new

Class methods inherited from class Gtk::Application

g_type : UInt64 g_type

Instance methods inherited from module Gio::ActionMap

add_action(action : Gio::Action) : Nil add_action, add_action_entries(entries : Enumerable(Gio::ActionEntry), user_data : Pointer(Void)?) : Nil add_action_entries, lookup_action(action_name : String) : Gio::Action? lookup_action, remove_action(action_name : String) : Nil remove_action, to_unsafe to_unsafe

Class methods inherited from module Gio::ActionMap

g_type : UInt64 g_type

Instance methods inherited from module Gio::ActionGroup

action_added(action_name : String) : Nil action_added, action_added_signal action_added_signal, action_enabled(action_name : String) : Bool action_enabled, action_enabled_changed(action_name : String, enabled : Bool) : Nil action_enabled_changed, action_enabled_changed_signal action_enabled_changed_signal, action_parameter_type(action_name : String) : GLib::VariantType? action_parameter_type, action_removed(action_name : String) : Nil action_removed, action_removed_signal action_removed_signal, action_state(action_name : String) : GLib::Variant? action_state, action_state_changed(action_name : String, state : _) : Nil action_state_changed, action_state_changed_signal action_state_changed_signal, action_state_hint(action_name : String) : GLib::Variant? action_state_hint, action_state_type(action_name : String) : GLib::VariantType? action_state_type, activate_action(action_name : String, parameter : _?) : Nil activate_action, change_action_state(action_name : String, value : _) : Nil change_action_state, has_action(action_name : String) : Bool has_action, list_actions : Enumerable(String) list_actions, query_action(action_name : String, enabled : Bool) : Bool query_action, to_unsafe to_unsafe

Class methods inherited from module Gio::ActionGroup

g_type : UInt64 g_type

Instance methods inherited from class Gio::Application

action_group=(action_group : Gio::ActionGroup?) : Nil action_group=, activate : Nil activate, activate_signal activate_signal, add_main_option(long_name : String, short_name : Int8, flags : GLib::OptionFlags, arg : GLib::OptionArg, description : String, arg_description : String?) : Nil add_main_option, add_main_option_entries(entries : Enumerable(GLib::OptionEntry)) : Nil
add_main_option_entries(*entries : GLib::OptionEntry)
add_main_option_entries
, add_option_group(group : GLib::OptionGroup) : Nil add_option_group, application_id : String? application_id, application_id=(value : String) : String
application_id=(application_id : String?) : Nil
application_id=
, bind_busy_property(object : GObject::Object, property : String) : Nil bind_busy_property, command_line_signal command_line_signal, dbus_connection : Gio::DBusConnection? dbus_connection, dbus_object_path : String? dbus_object_path, flags : Gio::ApplicationFlags flags, flags=(flags : Gio::ApplicationFlags) : Nil flags=, handle_local_options_signal handle_local_options_signal, hold : Nil hold, inactivity_timeout : UInt32 inactivity_timeout, inactivity_timeout=(inactivity_timeout : UInt32) : Nil inactivity_timeout=, is_busy : Bool is_busy, is_busy? : Bool is_busy?, is_registered : Bool is_registered, is_registered? : Bool is_registered?, is_remote : Bool is_remote, is_remote? : Bool is_remote?, mark_busy : Nil mark_busy, name_lost_signal name_lost_signal, open(files : Enumerable(Gio::File), hint : String) : Nil open, open_signal open_signal, option_context_description=(description : String?) : Nil option_context_description=, option_context_parameter_string=(parameter_string : String?) : Nil option_context_parameter_string=, option_context_summary=(summary : String?) : Nil option_context_summary=, quit : Nil quit, register(cancellable : Gio::Cancellable?) : Bool register, release : Nil release, resource_base_path : String? resource_base_path, resource_base_path=(value : String) : String
resource_base_path=(resource_path : String?) : Nil
resource_base_path=
, run(*argv : String) run, send_notification(id : String?, notification : Gio::Notification) : Nil send_notification, set_default : Nil set_default, shutdown_signal shutdown_signal, startup_signal startup_signal, unbind_busy_property(object : GObject::Object, property : String) : Nil unbind_busy_property, unmark_busy : Nil unmark_busy, withdraw_notification(id : String) : Nil withdraw_notification

Constructor methods inherited from class Gio::Application

new(application_id : String?, flags : Gio::ApplicationFlags) : self
new
new(*, action_group : Gio::ActionGroup? = nil, application_id : String? = nil, flags : Gio::ApplicationFlags? = nil, inactivity_timeout : UInt32? = nil, is_busy : Bool? = nil, is_registered : Bool? = nil, is_remote : Bool? = nil, resource_base_path : String? = nil)
new

Class methods inherited from class Gio::Application

default : Gio::Application? default, g_type : UInt64 g_type, id_is_valid(application_id : String) : Bool id_is_valid

Instance methods inherited from module Gio::ActionMap

add_action(action : Gio::Action) : Nil add_action, add_action_entries(entries : Enumerable(Gio::ActionEntry), user_data : Pointer(Void)?) : Nil add_action_entries, lookup_action(action_name : String) : Gio::Action? lookup_action, remove_action(action_name : String) : Nil remove_action, to_unsafe to_unsafe

Class methods inherited from module Gio::ActionMap

g_type : UInt64 g_type

Instance methods inherited from module Gio::ActionGroup

action_added(action_name : String) : Nil action_added, action_added_signal action_added_signal, action_enabled(action_name : String) : Bool action_enabled, action_enabled_changed(action_name : String, enabled : Bool) : Nil action_enabled_changed, action_enabled_changed_signal action_enabled_changed_signal, action_parameter_type(action_name : String) : GLib::VariantType? action_parameter_type, action_removed(action_name : String) : Nil action_removed, action_removed_signal action_removed_signal, action_state(action_name : String) : GLib::Variant? action_state, action_state_changed(action_name : String, state : _) : Nil action_state_changed, action_state_changed_signal action_state_changed_signal, action_state_hint(action_name : String) : GLib::Variant? action_state_hint, action_state_type(action_name : String) : GLib::VariantType? action_state_type, activate_action(action_name : String, parameter : _?) : Nil activate_action, change_action_state(action_name : String, value : _) : Nil change_action_state, has_action(action_name : String) : Bool has_action, list_actions : Enumerable(String) list_actions, query_action(action_name : String, enabled : Bool) : Bool query_action, to_unsafe to_unsafe

Class methods inherited from module Gio::ActionGroup

g_type : UInt64 g_type

Instance methods inherited from class GObject::Object

bind_property(source_property : String, target : GObject::Object, target_property : String, flags : GObject::BindingFlags) : GObject::Binding bind_property, bind_property_full(source_property : String, target : GObject::Object, target_property : String, flags : GObject::BindingFlags, transform_to : GObject::Closure, transform_from : GObject::Closure) : GObject::Binding bind_property_full, data(key : String) : Pointer(Void)? data, finalize finalize, freeze_notify : Nil freeze_notify, getv(names : Enumerable(String), values : Enumerable(_)) : Nil getv, notify(property_name : String) : Nil notify, notify_by_pspec(pspec : GObject::ParamSpec) : Nil notify_by_pspec, notify_signal notify_signal, property(property_name : String, value : _) : Nil property, qdata(quark : UInt32) : Pointer(Void)? qdata, ref_count : UInt32 ref_count, run_dispose : Nil run_dispose, set_data(key : String, data : Pointer(Void)?) : Nil set_data, set_property(property_name : String, value : _) : Nil set_property, steal_data(key : String) : Pointer(Void)? steal_data, steal_qdata(quark : UInt32) : Pointer(Void)? steal_qdata, thaw_notify : Nil thaw_notify, to_unsafe : Pointer(Void) to_unsafe, watch_closure(closure : GObject::Closure) : Nil watch_closure

Constructor methods inherited from class GObject::Object

cast(obj : GObject::Object) : self cast, cast?(obj : GObject::Object) : self? cast?, new(pointer : Pointer(Void), transfer : GICrystal::Transfer)
new
new
, newv(object_type : UInt64, parameters : Enumerable(GObject::Parameter)) : self newv

Class methods inherited from class GObject::Object

compat_control(what : UInt64, data : Pointer(Void)?) : UInt64 compat_control, g_type : UInt64 g_type, interface_find_property(g_iface : GObject::TypeInterface, property_name : String) : GObject::ParamSpec interface_find_property, interface_list_properties(g_iface : GObject::TypeInterface) : Enumerable(GObject::ParamSpec) interface_list_properties

Constructor Detail

def self.new(application_id : String?, flags : Gio::ApplicationFlags) : self #

Creates a new Adw::Application.

If application_id is not NULL, then it must be valid. See Gio::Application#id_is_valid.

If no application ID is given then some features (most notably application uniqueness) will be disabled.


def self.new #

Initialize a new Application.


def self.new(*, action_group : Gio::ActionGroup? = nil, active_window : Gtk::Window? = nil, application_id : String? = nil, flags : Gio::ApplicationFlags? = nil, inactivity_timeout : UInt32? = nil, is_busy : Bool? = nil, is_registered : Bool? = nil, is_remote : Bool? = nil, menubar : Gio::MenuModel? = nil, register_session : Bool? = nil, resource_base_path : String? = nil, screensaver_active : Bool? = nil, style_manager : Adw::StyleManager? = nil) #

Class Method Detail

def self.g_type : UInt64 #

Returns the type id (GType) registered in GLib type system.


Instance Method Detail

def style_manager : Adw::StyleManager #

Gets the style manager for @self.

This is a convenience property allowing to access Adw::StyleManager through property bindings or expressions.