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:
-
style.css
contains styles that are always present. -
style-dark.css
contains styles only used whenStyleManager::dark
isTRUE
. -
style-hc.css
contains styles used when the system high contrast preference is enabled. -
style-hc-dark.css
contains styles used when the system high contrast preference is enabled andStyleManager::dark
isTRUE
.
Included Modules
Defined in:
lib/gi-crystal/src/auto/adw-1/application.crConstructors
-
.new(application_id : String | Nil, flags : Gio::ApplicationFlags) : self
Creates a new
Adw::Application
. -
.new
Initialize a new
Application
. - .new(*, action_group : Gio::ActionGroup | Nil = nil, active_window : Gtk::Window | Nil = nil, application_id : String | Nil = nil, flags : Gio::ApplicationFlags | Nil = nil, inactivity_timeout : UInt32 | Nil = nil, is_busy : Bool | Nil = nil, is_registered : Bool | Nil = nil, is_remote : Bool | Nil = nil, menubar : Gio::MenuModel | Nil = nil, register_session : Bool | Nil = nil, resource_base_path : String | Nil = nil, screensaver_active : Bool | Nil = nil, style_manager : Adw::StyleManager | Nil = nil, version : String | Nil = nil)
Class Method Summary
-
.g_type : UInt64
Returns the type id (GType) registered in GLib type system.
Instance Method Summary
-
#==(other : self)
Returns
true
if this reference is the same as other. -
#hash(hasher)
See
Object#hash(hasher)
-
#style_manager : Adw::StyleManager
Gets the style manager for self.
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) : Nil
add_action_entries,
lookup_action(action_name : String) : Gio::Action | Nil
lookup_action,
remove_action(action_name : String) : Nil
remove_action,
remove_action_entries(entries : Enumerable(Gio::ActionEntry)) : Nilremove_action_entries(*entries : Gio::ActionEntry) remove_action_entries, to_unsafe to_unsafe
Constructor methods inherited from module Gio::ActionMap
cast(obj : GObject::Object) : self
cast
Class methods inherited from module Gio::ActionMap
cast?(obj : GObject::Object) : self | Nil
cast?,
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 | Nil
action_parameter_type,
action_removed(action_name : String) : Nil
action_removed,
action_removed_signal
action_removed_signal,
action_state(action_name : String) : GLib::Variant | Nil
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 | Nil
action_state_hint,
action_state_type(action_name : String) : GLib::VariantType | Nil
action_state_type,
activate_action(action_name : String, parameter : _ | Nil) : 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
Constructor methods inherited from module Gio::ActionGroup
cast(obj : GObject::Object) : self
cast
Class methods inherited from module Gio::ActionGroup
cast?(obj : GObject::Object) : self | Nil
cast?,
g_type : UInt64
g_type
Instance methods inherited from class Gtk::Application
==(other : self)
==,
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 | Nil
active_window,
add_window(window : Gtk::Window) : Nil
add_window,
hash(hasher)
hash,
inhibit(window : Gtk::Window | Nil, flags : Gtk::ApplicationInhibitFlags, reason : String | Nil) : UInt32
inhibit,
list_action_descriptions : Enumerable(String)
list_action_descriptions,
menu_by_id(id : String) : Gio::Menu | Nil
menu_by_id,
menubar : Gio::MenuModel | Nil
menubar,
menubar=(menubar : Gio::MenuModel | Nil) : 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 | Nil
window_by_id,
window_removed_signal
window_removed_signal,
windows : GLib::List
windows
Constructor methods inherited from class Gtk::Application
new(application_id : String | Nil, flags : Gio::ApplicationFlags) : selfnew
new(*, action_group : Gio::ActionGroup | Nil = nil, active_window : Gtk::Window | Nil = nil, application_id : String | Nil = nil, flags : Gio::ApplicationFlags | Nil = nil, inactivity_timeout : UInt32 | Nil = nil, is_busy : Bool | Nil = nil, is_registered : Bool | Nil = nil, is_remote : Bool | Nil = nil, menubar : Gio::MenuModel | Nil = nil, register_session : Bool | Nil = nil, resource_base_path : String | Nil = nil, screensaver_active : Bool | Nil = nil, version : String | Nil = 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) : Nil
add_action_entries,
lookup_action(action_name : String) : Gio::Action | Nil
lookup_action,
remove_action(action_name : String) : Nil
remove_action,
remove_action_entries(entries : Enumerable(Gio::ActionEntry)) : Nilremove_action_entries(*entries : Gio::ActionEntry) remove_action_entries, to_unsafe to_unsafe
Constructor methods inherited from module Gio::ActionMap
cast(obj : GObject::Object) : self
cast
Class methods inherited from module Gio::ActionMap
cast?(obj : GObject::Object) : self | Nil
cast?,
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 | Nil
action_parameter_type,
action_removed(action_name : String) : Nil
action_removed,
action_removed_signal
action_removed_signal,
action_state(action_name : String) : GLib::Variant | Nil
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 | Nil
action_state_hint,
action_state_type(action_name : String) : GLib::VariantType | Nil
action_state_type,
activate_action(action_name : String, parameter : _ | Nil) : 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
Constructor methods inherited from module Gio::ActionGroup
cast(obj : GObject::Object) : self
cast
Class methods inherited from module Gio::ActionGroup
cast?(obj : GObject::Object) : self | Nil
cast?,
g_type : UInt64
g_type
Instance methods inherited from class Gio::Application
==(other : self)
==,
action_group=(action_group : Gio::ActionGroup | Nil) : 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) : Nil
add_main_option,
add_main_option_entries(entries : Enumerable(GLib::OptionEntry)) : Niladd_main_option_entries(*entries : GLib::OptionEntry) add_main_option_entries, add_option_group(group : GLib::OptionGroup) : Nil add_option_group, application_id : String | Nil application_id, application_id=(value : String) : String
application_id=(value : Nil) : Nil
application_id=(application_id : String | Nil) : Nil 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 | Nil dbus_connection, dbus_object_path : String | Nil dbus_object_path, flags : Gio::ApplicationFlags flags, flags=(flags : Gio::ApplicationFlags) : Nil flags=, handle_local_options_signal handle_local_options_signal, hash(hasher) hash, 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) : Nil option_context_description=, option_context_parameter_string=(parameter_string : String | Nil) : Nil option_context_parameter_string=, option_context_summary=(summary : String | Nil) : Nil option_context_summary=, quit : Nil quit, register(cancellable : Gio::Cancellable | Nil) : Bool register, release : Nil release, resource_base_path : String | Nil resource_base_path, resource_base_path=(value : String) : String
resource_base_path=(value : Nil) : Nil
resource_base_path=(resource_path : String | Nil) : Nil resource_base_path=, resource_base_path? : String | Nil resource_base_path?, run(argv : Enumerable(String) | Nil) : Int32
run(argv : Enumerable(String) | Nil) : Int32
run : Int32
run(*argv : String) run, send_notification(id : String | Nil, 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, version : String | Nil version, version=(version : String) : Nil
version=(value : Nil) : Nil version=, version? : String | Nil version?, withdraw_notification(id : String) : Nil withdraw_notification
Constructor methods inherited from class Gio::Application
new(application_id : String | Nil, flags : Gio::ApplicationFlags) : selfnew
new(*, action_group : Gio::ActionGroup | Nil = nil, application_id : String | Nil = nil, flags : Gio::ApplicationFlags | Nil = nil, inactivity_timeout : UInt32 | Nil = nil, is_busy : Bool | Nil = nil, is_registered : Bool | Nil = nil, is_remote : Bool | Nil = nil, resource_base_path : String | Nil = nil, version : String | Nil = nil) new
Class methods inherited from class Gio::Application
default : Gio::Application | Nil
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) : Nil
add_action_entries,
lookup_action(action_name : String) : Gio::Action | Nil
lookup_action,
remove_action(action_name : String) : Nil
remove_action,
remove_action_entries(entries : Enumerable(Gio::ActionEntry)) : Nilremove_action_entries(*entries : Gio::ActionEntry) remove_action_entries, to_unsafe to_unsafe
Constructor methods inherited from module Gio::ActionMap
cast(obj : GObject::Object) : self
cast
Class methods inherited from module Gio::ActionMap
cast?(obj : GObject::Object) : self | Nil
cast?,
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 | Nil
action_parameter_type,
action_removed(action_name : String) : Nil
action_removed,
action_removed_signal
action_removed_signal,
action_state(action_name : String) : GLib::Variant | Nil
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 | Nil
action_state_hint,
action_state_type(action_name : String) : GLib::VariantType | Nil
action_state_type,
activate_action(action_name : String, parameter : _ | Nil) : 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
Constructor methods inherited from module Gio::ActionGroup
cast(obj : GObject::Object) : self
cast
Class methods inherited from module Gio::ActionGroup
cast?(obj : GObject::Object) : self | Nil
cast?,
g_type : UInt64
g_type
Instance methods inherited from class GObject::Object
==(other : self)
==,
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) | Nil
data,
finalize
finalize,
freeze_notify : Nil
freeze_notify,
getv(names : Enumerable(String), values : Enumerable(_)) : Nil
getv,
hash(hasher)
hash,
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) | Nil
qdata,
ref_count : UInt32
ref_count,
run_dispose : Nil
run_dispose,
set_data(key : String, data : Pointer(Void) | Nil) : Nil
set_data,
set_property(property_name : String, value : _) : Nil
set_property,
steal_data(key : String) : Pointer(Void) | Nil
steal_data,
steal_qdata(quark : UInt32) : Pointer(Void) | Nil
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,
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
cast?(obj : GObject::Object) : self | Nil
cast?,
compat_control(what : UInt64, data : Pointer(Void) | Nil) : 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
Macros inherited from class GObject::Object
previous_vfunc(*args)
previous_vfunc,
previous_vfunc!(*args)
previous_vfunc!,
signal(signature)
signal
Constructor Detail
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.
Class Method Detail
Instance Method Detail
Returns true
if this reference is the same as other. Invokes same?
.
Gets the style manager for self.
This is a convenience property allowing to access Adw::StyleManager
through
property bindings or expressions.