| Copyright | Will Thompson and Iñaki García Etxebarria |
|---|---|
| License | LGPL-2.1 |
| Maintainer | Iñaki García Etxebarria |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
GI.Adw.Objects.Application
Description
A base class for Adwaita applications.
AdwApplication handles library initialization by calling [funcinit] in the
default Application::startup signal handler, in turn chaining up
as required by Application. Therefore, any subclass of
AdwApplication should always chain up its startup handler before using
any Adwaita or GTK API.
Automatic Resources
AdwApplication will automatically load stylesheets located in the
application's resource base path (see
applicationSetResourceBasePath, if they're present.
They can be used to add custom styles to the application, as follows:
style.csscontains styles that are always present.style-dark.csscontains styles only used when
- property
styleManager:dark - is
TRUE.
style-hc.csscontains styles used when the system high contrast preference is enabled.style-hc-dark.csscontains styles used when the system high contrast preference is enabled and [propertystyleManager:dark] isTRUE.
Since: 1.0
Synopsis
- newtype Application = Application (ManagedPtr Application)
- class (GObject o, IsDescendantOf Application o) => IsApplication o
- toApplication :: (MonadIO m, IsApplication o) => o -> m Application
- applicationGetStyleManager :: (HasCallStack, MonadIO m, IsApplication a) => a -> m StyleManager
- applicationNew :: (HasCallStack, MonadIO m) => Maybe Text -> [ApplicationFlags] -> m Application
- getApplicationStyleManager :: (MonadIO m, IsApplication o) => o -> m StyleManager
Exported types
newtype Application Source #
Memory-managed wrapper type.
Constructors
| Application (ManagedPtr Application) |
Instances
| Eq Application Source # | |
Defined in GI.Adw.Objects.Application | |
| GObject Application Source # | |
Defined in GI.Adw.Objects.Application | |
| ManagedPtrNewtype Application Source # | |
Defined in GI.Adw.Objects.Application Methods toManagedPtr :: Application -> ManagedPtr Application | |
| TypedObject Application Source # | |
Defined in GI.Adw.Objects.Application | |
| HasParentTypes Application Source # | |
Defined in GI.Adw.Objects.Application | |
| IsGValue (Maybe Application) Source # | Convert |
Defined in GI.Adw.Objects.Application Methods gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe Application -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe Application) | |
| type ParentTypes Application Source # | |
Defined in GI.Adw.Objects.Application type ParentTypes Application = '[Application, Application, Object, ActionGroup, ActionMap] | |
class (GObject o, IsDescendantOf Application o) => IsApplication o Source #
Type class for types which can be safely cast to Application, for instance with toApplication.
Instances
| (GObject o, IsDescendantOf Application o) => IsApplication o Source # | |
Defined in GI.Adw.Objects.Application | |
toApplication :: (MonadIO m, IsApplication o) => o -> m Application Source #
Cast to Application, for types for which this is known to be safe. For general casts, use castTo.
Methods
Click to display all available methods, including inherited ones
Methods
actionAdded, actionEnabledChanged, actionRemoved, actionStateChanged, activate, activateAction, addAction, addActionEntries, addMainOption, addMainOptionEntries, addOptionGroup, addWindow, bindBusyProperty, bindProperty, bindPropertyFull, changeActionState, forceFloating, freezeNotify, getv, hasAction, hold, inhibit, isFloating, listActionDescriptions, listActions, lookupAction, markBusy, notify, notifyByPspec, open, queryAction, quit, ref, refSink, register, release, removeAction, removeWindow, run, runDispose, sendNotification, stealData, stealQdata, thawNotify, unbindBusyProperty, uninhibit, unmarkBusy, unref, watchClosure, withdrawNotification.
Getters
getAccelsForAction, getActionEnabled, getActionParameterType, getActionState, getActionStateHint, getActionStateType, getActionsForAccel, getActiveWindow, getApplicationId, getData, getDbusConnection, getDbusObjectPath, getFlags, getInactivityTimeout, getIsBusy, getIsRegistered, getIsRemote, getMenuById, getMenubar, getProperty, getQdata, getResourceBasePath, getStyleManager, getWindowById, getWindows.
Setters
setAccelsForAction, setActionGroup, setApplicationId, setData, setDataFull, setDefault, setFlags, setInactivityTimeout, setMenubar, setOptionContextDescription, setOptionContextParameterString, setOptionContextSummary, setProperty, setResourceBasePath.
getStyleManager
applicationGetStyleManager Source #
Arguments
| :: (HasCallStack, MonadIO m, IsApplication a) | |
| => a |
|
| -> m StyleManager | Returns: the style manager |
Gets the style manager for self.
This is a convenience property allowing to access AdwStyleManager through
property bindings or expressions.
Since: 1.0
new
Arguments
| :: (HasCallStack, MonadIO m) | |
| => Maybe Text |
|
| -> [ApplicationFlags] |
|
| -> m Application | Returns: the newly created |
Creates a new AdwApplication.
If application_id is not NULL, then it must be valid. See
[funcgio.Application.id_is_valid].
If no application ID is given then some features (most notably application uniqueness) will be disabled.
Since: 1.0
Properties
styleManager
The style manager for this application.
This is a convenience property allowing to access AdwStyleManager through
property bindings or expressions.
Since: 1.0
getApplicationStyleManager :: (MonadIO m, IsApplication o) => o -> m StyleManager Source #
Get the value of the “style-manager” property.
When overloading is enabled, this is equivalent to
get application #styleManager