gi-adwaita-1.0.3: Adwaita bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

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.css contains styles that are always present.
  • style-dark.css contains styles only used when
propertystyleManager:dark
is TRUE.
  • 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 and [propertystyleManager:dark] is TRUE.

Since: 1.0

Synopsis

Exported types

newtype Application Source #

Memory-managed wrapper type.

Constructors

Application (ManagedPtr Application) 

Instances

Instances details
Eq Application Source # 
Instance details

Defined in GI.Adw.Objects.Application

GObject Application Source # 
Instance details

Defined in GI.Adw.Objects.Application

ManagedPtrNewtype Application Source # 
Instance details

Defined in GI.Adw.Objects.Application

Methods

toManagedPtr :: Application -> ManagedPtr Application

TypedObject Application Source # 
Instance details

Defined in GI.Adw.Objects.Application

Methods

glibType :: IO GType

HasParentTypes Application Source # 
Instance details

Defined in GI.Adw.Objects.Application

IsGValue (Maybe Application) Source #

Convert Application to and from GValue. See toGValue and fromGValue.

Instance details

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 # 
Instance details

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

Instances details
(GObject o, IsDescendantOf Application o) => IsApplication o Source # 
Instance details

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

getStyleManager

applicationGetStyleManager Source #

Arguments

:: (HasCallStack, MonadIO m, IsApplication a) 
=> a

self: an application

-> 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

applicationNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Maybe Text

applicationId: The application ID

-> [ApplicationFlags]

flags: The application flags

-> m Application

Returns: the newly created AdwApplication

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