{-# LANGUAGE ImplicitParams, RankNTypes, TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gtk.Objects.Application
(
Application(..) ,
IsApplication ,
toApplication ,
#if defined(ENABLE_OVERLOADING)
ResolveApplicationMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
ApplicationAddWindowMethodInfo ,
#endif
applicationAddWindow ,
#if defined(ENABLE_OVERLOADING)
ApplicationGetAccelsForActionMethodInfo ,
#endif
applicationGetAccelsForAction ,
#if defined(ENABLE_OVERLOADING)
ApplicationGetActionsForAccelMethodInfo ,
#endif
applicationGetActionsForAccel ,
#if defined(ENABLE_OVERLOADING)
ApplicationGetActiveWindowMethodInfo ,
#endif
applicationGetActiveWindow ,
#if defined(ENABLE_OVERLOADING)
ApplicationGetMenuByIdMethodInfo ,
#endif
applicationGetMenuById ,
#if defined(ENABLE_OVERLOADING)
ApplicationGetMenubarMethodInfo ,
#endif
applicationGetMenubar ,
#if defined(ENABLE_OVERLOADING)
ApplicationGetWindowByIdMethodInfo ,
#endif
applicationGetWindowById ,
#if defined(ENABLE_OVERLOADING)
ApplicationGetWindowsMethodInfo ,
#endif
applicationGetWindows ,
#if defined(ENABLE_OVERLOADING)
ApplicationInhibitMethodInfo ,
#endif
applicationInhibit ,
#if defined(ENABLE_OVERLOADING)
ApplicationListActionDescriptionsMethodInfo,
#endif
applicationListActionDescriptions ,
applicationNew ,
#if defined(ENABLE_OVERLOADING)
ApplicationRemoveWindowMethodInfo ,
#endif
applicationRemoveWindow ,
#if defined(ENABLE_OVERLOADING)
ApplicationSetAccelsForActionMethodInfo ,
#endif
applicationSetAccelsForAction ,
#if defined(ENABLE_OVERLOADING)
ApplicationSetMenubarMethodInfo ,
#endif
applicationSetMenubar ,
#if defined(ENABLE_OVERLOADING)
ApplicationUninhibitMethodInfo ,
#endif
applicationUninhibit ,
#if defined(ENABLE_OVERLOADING)
ApplicationActiveWindowPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
applicationActiveWindow ,
#endif
getApplicationActiveWindow ,
#if defined(ENABLE_OVERLOADING)
ApplicationMenubarPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
applicationMenubar ,
#endif
clearApplicationMenubar ,
constructApplicationMenubar ,
getApplicationMenubar ,
setApplicationMenubar ,
#if defined(ENABLE_OVERLOADING)
ApplicationRegisterSessionPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
applicationRegisterSession ,
#endif
constructApplicationRegisterSession ,
getApplicationRegisterSession ,
setApplicationRegisterSession ,
#if defined(ENABLE_OVERLOADING)
ApplicationScreensaverActivePropertyInfo,
#endif
#if defined(ENABLE_OVERLOADING)
applicationScreensaverActive ,
#endif
getApplicationScreensaverActive ,
ApplicationQueryEndCallback ,
#if defined(ENABLE_OVERLOADING)
ApplicationQueryEndSignalInfo ,
#endif
afterApplicationQueryEnd ,
onApplicationQueryEnd ,
ApplicationWindowAddedCallback ,
#if defined(ENABLE_OVERLOADING)
ApplicationWindowAddedSignalInfo ,
#endif
afterApplicationWindowAdded ,
onApplicationWindowAdded ,
ApplicationWindowRemovedCallback ,
#if defined(ENABLE_OVERLOADING)
ApplicationWindowRemovedSignalInfo ,
#endif
afterApplicationWindowRemoved ,
onApplicationWindowRemoved ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GHashTable as B.GHT
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.Kind as DK
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GHC.Records as R
import qualified Data.Word as DW
import qualified Data.Int as DI
import qualified System.Posix.Types as SPT
import qualified Foreign.C.Types as FCT
#if MIN_VERSION_base(4,18,0)
import qualified GI.Cairo.Structs.Context as Cairo.Context
import qualified GI.Cairo.Structs.FontOptions as Cairo.FontOptions
import qualified GI.GLib.Callbacks as GLib.Callbacks
import qualified GI.GLib.Structs.Bytes as GLib.Bytes
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gdk.Flags as Gdk.Flags
import qualified GI.Gdk.Interfaces.Paintable as Gdk.Paintable
import qualified GI.Gdk.Objects.Clipboard as Gdk.Clipboard
import qualified GI.Gdk.Objects.Cursor as Gdk.Cursor
import qualified GI.Gdk.Objects.Device as Gdk.Device
import qualified GI.Gdk.Objects.Display as Gdk.Display
import qualified GI.Gdk.Objects.Event as Gdk.Event
import qualified GI.Gdk.Objects.FrameClock as Gdk.FrameClock
import qualified GI.Gdk.Objects.Monitor as Gdk.Monitor
import qualified GI.Gdk.Objects.Snapshot as Gdk.Snapshot
import qualified GI.Gdk.Objects.Surface as Gdk.Surface
import qualified GI.Gdk.Objects.Texture as Gdk.Texture
import qualified GI.Gdk.Structs.RGBA as Gdk.RGBA
import qualified GI.Gdk.Structs.Rectangle as Gdk.Rectangle
import qualified GI.Gio.Flags as Gio.Flags
import qualified GI.Gio.Interfaces.ActionGroup as Gio.ActionGroup
import qualified GI.Gio.Interfaces.ActionMap as Gio.ActionMap
import qualified GI.Gio.Interfaces.Icon as Gio.Icon
import qualified GI.Gio.Interfaces.ListModel as Gio.ListModel
import qualified GI.Gio.Objects.Application as Gio.Application
import qualified GI.Gio.Objects.Menu as Gio.Menu
import qualified GI.Gio.Objects.MenuModel as Gio.MenuModel
import qualified GI.Graphene.Structs.Matrix as Graphene.Matrix
import qualified GI.Graphene.Structs.Point as Graphene.Point
import qualified GI.Graphene.Structs.Point3D as Graphene.Point3D
import qualified GI.Graphene.Structs.Rect as Graphene.Rect
import qualified GI.Graphene.Structs.Size as Graphene.Size
import qualified GI.Graphene.Structs.Vec3 as Graphene.Vec3
import qualified GI.Graphene.Structs.Vec4 as Graphene.Vec4
import qualified GI.Gsk.Enums as Gsk.Enums
import qualified GI.Gsk.Objects.GLShader as Gsk.GLShader
import qualified GI.Gsk.Objects.RenderNode as Gsk.RenderNode
import qualified GI.Gsk.Objects.Renderer as Gsk.Renderer
import qualified GI.Gsk.Structs.ColorStop as Gsk.ColorStop
import qualified GI.Gsk.Structs.Path as Gsk.Path
import qualified GI.Gsk.Structs.RoundedRect as Gsk.RoundedRect
import qualified GI.Gsk.Structs.Shadow as Gsk.Shadow
import qualified GI.Gsk.Structs.Stroke as Gsk.Stroke
import qualified GI.Gsk.Structs.Transform as Gsk.Transform
import qualified GI.Gtk.Callbacks as Gtk.Callbacks
import {-# SOURCE #-} qualified GI.Gtk.Enums as Gtk.Enums
import {-# SOURCE #-} qualified GI.Gtk.Flags as Gtk.Flags
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.Accessible as Gtk.Accessible
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.Buildable as Gtk.Buildable
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.ConstraintTarget as Gtk.ConstraintTarget
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.Native as Gtk.Native
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.Root as Gtk.Root
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.ShortcutManager as Gtk.ShortcutManager
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.StyleProvider as Gtk.StyleProvider
import {-# SOURCE #-} qualified GI.Gtk.Objects.ATContext as Gtk.ATContext
import {-# SOURCE #-} qualified GI.Gtk.Objects.EventController as Gtk.EventController
import {-# SOURCE #-} qualified GI.Gtk.Objects.LayoutChild as Gtk.LayoutChild
import {-# SOURCE #-} qualified GI.Gtk.Objects.LayoutManager as Gtk.LayoutManager
import {-# SOURCE #-} qualified GI.Gtk.Objects.Settings as Gtk.Settings
import {-# SOURCE #-} qualified GI.Gtk.Objects.Snapshot as Gtk.Snapshot
import {-# SOURCE #-} qualified GI.Gtk.Objects.StyleContext as Gtk.StyleContext
import {-# SOURCE #-} qualified GI.Gtk.Objects.Tooltip as Gtk.Tooltip
import {-# SOURCE #-} qualified GI.Gtk.Objects.Widget as Gtk.Widget
import {-# SOURCE #-} qualified GI.Gtk.Objects.Window as Gtk.Window
import {-# SOURCE #-} qualified GI.Gtk.Objects.WindowGroup as Gtk.WindowGroup
import {-# SOURCE #-} qualified GI.Gtk.Structs.Border as Gtk.Border
import {-# SOURCE #-} qualified GI.Gtk.Structs.Requisition as Gtk.Requisition
import qualified GI.Pango.Enums as Pango.Enums
import qualified GI.Pango.Objects.Context as Pango.Context
import qualified GI.Pango.Objects.FontMap as Pango.FontMap
import qualified GI.Pango.Objects.Layout as Pango.Layout
#else
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gio.Flags as Gio.Flags
import qualified GI.Gio.Interfaces.ActionGroup as Gio.ActionGroup
import qualified GI.Gio.Interfaces.ActionMap as Gio.ActionMap
import qualified GI.Gio.Objects.Application as Gio.Application
import qualified GI.Gio.Objects.Menu as Gio.Menu
import qualified GI.Gio.Objects.MenuModel as Gio.MenuModel
import {-# SOURCE #-} qualified GI.Gtk.Flags as Gtk.Flags
import {-# SOURCE #-} qualified GI.Gtk.Objects.Window as Gtk.Window
#endif
newtype Application = Application (SP.ManagedPtr Application)
deriving (Application -> Application -> Bool
(Application -> Application -> Bool)
-> (Application -> Application -> Bool) -> Eq Application
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Application -> Application -> Bool
== :: Application -> Application -> Bool
$c/= :: Application -> Application -> Bool
/= :: Application -> Application -> Bool
Eq)
instance SP.ManagedPtrNewtype Application where
toManagedPtr :: Application -> ManagedPtr Application
toManagedPtr (Application ManagedPtr Application
p) = ManagedPtr Application
p
foreign import ccall "gtk_application_get_type"
c_gtk_application_get_type :: IO B.Types.GType
instance B.Types.TypedObject Application where
glibType :: IO GType
glibType = IO GType
c_gtk_application_get_type
instance B.Types.GObject Application
class (SP.GObject o, O.IsDescendantOf Application o) => IsApplication o
instance (SP.GObject o, O.IsDescendantOf Application o) => IsApplication o
instance O.HasParentTypes Application
type instance O.ParentTypes Application = '[Gio.Application.Application, GObject.Object.Object, Gio.ActionGroup.ActionGroup, Gio.ActionMap.ActionMap]
toApplication :: (MIO.MonadIO m, IsApplication o) => o -> m Application
toApplication :: forall (m :: * -> *) o.
(MonadIO m, IsApplication o) =>
o -> m Application
toApplication = IO Application -> m Application
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Application -> m Application)
-> (o -> IO Application) -> o -> m Application
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr Application -> Application) -> o -> IO Application
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr Application -> Application
Application
instance B.GValue.IsGValue (Maybe Application) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_gtk_application_get_type
gvalueSet_ :: Ptr GValue -> Maybe Application -> IO ()
gvalueSet_ Ptr GValue
gv Maybe Application
P.Nothing = Ptr GValue -> Ptr Application -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr Application
forall a. Ptr a
FP.nullPtr :: FP.Ptr Application)
gvalueSet_ Ptr GValue
gv (P.Just Application
obj) = Application -> (Ptr Application -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr Application
obj (Ptr GValue -> Ptr Application -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe Application)
gvalueGet_ Ptr GValue
gv = do
Ptr Application
ptr <- Ptr GValue -> IO (Ptr Application)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr Application)
if Ptr Application
ptr Ptr Application -> Ptr Application -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr Application
forall a. Ptr a
FP.nullPtr
then Application -> Maybe Application
forall a. a -> Maybe a
P.Just (Application -> Maybe Application)
-> IO Application -> IO (Maybe Application)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr Application -> Application)
-> Ptr Application -> IO Application
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr Application -> Application
Application Ptr Application
ptr
else Maybe Application -> IO (Maybe Application)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Application
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveApplicationMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveApplicationMethod "actionAdded" o = Gio.ActionGroup.ActionGroupActionAddedMethodInfo
ResolveApplicationMethod "actionEnabledChanged" o = Gio.ActionGroup.ActionGroupActionEnabledChangedMethodInfo
ResolveApplicationMethod "actionRemoved" o = Gio.ActionGroup.ActionGroupActionRemovedMethodInfo
ResolveApplicationMethod "actionStateChanged" o = Gio.ActionGroup.ActionGroupActionStateChangedMethodInfo
ResolveApplicationMethod "activate" o = Gio.Application.ApplicationActivateMethodInfo
ResolveApplicationMethod "activateAction" o = Gio.ActionGroup.ActionGroupActivateActionMethodInfo
ResolveApplicationMethod "addAction" o = Gio.ActionMap.ActionMapAddActionMethodInfo
ResolveApplicationMethod "addActionEntries" o = Gio.ActionMap.ActionMapAddActionEntriesMethodInfo
ResolveApplicationMethod "addMainOption" o = Gio.Application.ApplicationAddMainOptionMethodInfo
ResolveApplicationMethod "addMainOptionEntries" o = Gio.Application.ApplicationAddMainOptionEntriesMethodInfo
ResolveApplicationMethod "addOptionGroup" o = Gio.Application.ApplicationAddOptionGroupMethodInfo
ResolveApplicationMethod "addWindow" o = ApplicationAddWindowMethodInfo
ResolveApplicationMethod "bindBusyProperty" o = Gio.Application.ApplicationBindBusyPropertyMethodInfo
ResolveApplicationMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveApplicationMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveApplicationMethod "changeActionState" o = Gio.ActionGroup.ActionGroupChangeActionStateMethodInfo
ResolveApplicationMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveApplicationMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveApplicationMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveApplicationMethod "hasAction" o = Gio.ActionGroup.ActionGroupHasActionMethodInfo
ResolveApplicationMethod "hold" o = Gio.Application.ApplicationHoldMethodInfo
ResolveApplicationMethod "inhibit" o = ApplicationInhibitMethodInfo
ResolveApplicationMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveApplicationMethod "listActionDescriptions" o = ApplicationListActionDescriptionsMethodInfo
ResolveApplicationMethod "listActions" o = Gio.ActionGroup.ActionGroupListActionsMethodInfo
ResolveApplicationMethod "lookupAction" o = Gio.ActionMap.ActionMapLookupActionMethodInfo
ResolveApplicationMethod "markBusy" o = Gio.Application.ApplicationMarkBusyMethodInfo
ResolveApplicationMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveApplicationMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveApplicationMethod "open" o = Gio.Application.ApplicationOpenMethodInfo
ResolveApplicationMethod "queryAction" o = Gio.ActionGroup.ActionGroupQueryActionMethodInfo
ResolveApplicationMethod "quit" o = Gio.Application.ApplicationQuitMethodInfo
ResolveApplicationMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveApplicationMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveApplicationMethod "register" o = Gio.Application.ApplicationRegisterMethodInfo
ResolveApplicationMethod "release" o = Gio.Application.ApplicationReleaseMethodInfo
ResolveApplicationMethod "removeAction" o = Gio.ActionMap.ActionMapRemoveActionMethodInfo
ResolveApplicationMethod "removeActionEntries" o = Gio.ActionMap.ActionMapRemoveActionEntriesMethodInfo
ResolveApplicationMethod "removeWindow" o = ApplicationRemoveWindowMethodInfo
ResolveApplicationMethod "run" o = Gio.Application.ApplicationRunMethodInfo
ResolveApplicationMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveApplicationMethod "sendNotification" o = Gio.Application.ApplicationSendNotificationMethodInfo
ResolveApplicationMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveApplicationMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveApplicationMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveApplicationMethod "unbindBusyProperty" o = Gio.Application.ApplicationUnbindBusyPropertyMethodInfo
ResolveApplicationMethod "uninhibit" o = ApplicationUninhibitMethodInfo
ResolveApplicationMethod "unmarkBusy" o = Gio.Application.ApplicationUnmarkBusyMethodInfo
ResolveApplicationMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveApplicationMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveApplicationMethod "withdrawNotification" o = Gio.Application.ApplicationWithdrawNotificationMethodInfo
ResolveApplicationMethod "getAccelsForAction" o = ApplicationGetAccelsForActionMethodInfo
ResolveApplicationMethod "getActionEnabled" o = Gio.ActionGroup.ActionGroupGetActionEnabledMethodInfo
ResolveApplicationMethod "getActionParameterType" o = Gio.ActionGroup.ActionGroupGetActionParameterTypeMethodInfo
ResolveApplicationMethod "getActionState" o = Gio.ActionGroup.ActionGroupGetActionStateMethodInfo
ResolveApplicationMethod "getActionStateHint" o = Gio.ActionGroup.ActionGroupGetActionStateHintMethodInfo
ResolveApplicationMethod "getActionStateType" o = Gio.ActionGroup.ActionGroupGetActionStateTypeMethodInfo
ResolveApplicationMethod "getActionsForAccel" o = ApplicationGetActionsForAccelMethodInfo
ResolveApplicationMethod "getActiveWindow" o = ApplicationGetActiveWindowMethodInfo
ResolveApplicationMethod "getApplicationId" o = Gio.Application.ApplicationGetApplicationIdMethodInfo
ResolveApplicationMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveApplicationMethod "getDbusConnection" o = Gio.Application.ApplicationGetDbusConnectionMethodInfo
ResolveApplicationMethod "getDbusObjectPath" o = Gio.Application.ApplicationGetDbusObjectPathMethodInfo
ResolveApplicationMethod "getFlags" o = Gio.Application.ApplicationGetFlagsMethodInfo
ResolveApplicationMethod "getInactivityTimeout" o = Gio.Application.ApplicationGetInactivityTimeoutMethodInfo
ResolveApplicationMethod "getIsBusy" o = Gio.Application.ApplicationGetIsBusyMethodInfo
ResolveApplicationMethod "getIsRegistered" o = Gio.Application.ApplicationGetIsRegisteredMethodInfo
ResolveApplicationMethod "getIsRemote" o = Gio.Application.ApplicationGetIsRemoteMethodInfo
ResolveApplicationMethod "getMenuById" o = ApplicationGetMenuByIdMethodInfo
ResolveApplicationMethod "getMenubar" o = ApplicationGetMenubarMethodInfo
ResolveApplicationMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveApplicationMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveApplicationMethod "getResourceBasePath" o = Gio.Application.ApplicationGetResourceBasePathMethodInfo
ResolveApplicationMethod "getVersion" o = Gio.Application.ApplicationGetVersionMethodInfo
ResolveApplicationMethod "getWindowById" o = ApplicationGetWindowByIdMethodInfo
ResolveApplicationMethod "getWindows" o = ApplicationGetWindowsMethodInfo
ResolveApplicationMethod "setAccelsForAction" o = ApplicationSetAccelsForActionMethodInfo
ResolveApplicationMethod "setActionGroup" o = Gio.Application.ApplicationSetActionGroupMethodInfo
ResolveApplicationMethod "setApplicationId" o = Gio.Application.ApplicationSetApplicationIdMethodInfo
ResolveApplicationMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveApplicationMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveApplicationMethod "setDefault" o = Gio.Application.ApplicationSetDefaultMethodInfo
ResolveApplicationMethod "setFlags" o = Gio.Application.ApplicationSetFlagsMethodInfo
ResolveApplicationMethod "setInactivityTimeout" o = Gio.Application.ApplicationSetInactivityTimeoutMethodInfo
ResolveApplicationMethod "setMenubar" o = ApplicationSetMenubarMethodInfo
ResolveApplicationMethod "setOptionContextDescription" o = Gio.Application.ApplicationSetOptionContextDescriptionMethodInfo
ResolveApplicationMethod "setOptionContextParameterString" o = Gio.Application.ApplicationSetOptionContextParameterStringMethodInfo
ResolveApplicationMethod "setOptionContextSummary" o = Gio.Application.ApplicationSetOptionContextSummaryMethodInfo
ResolveApplicationMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveApplicationMethod "setResourceBasePath" o = Gio.Application.ApplicationSetResourceBasePathMethodInfo
ResolveApplicationMethod "setVersion" o = Gio.Application.ApplicationSetVersionMethodInfo
ResolveApplicationMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveApplicationMethod t Application, O.OverloadedMethod info Application p) => OL.IsLabel t (Application -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveApplicationMethod t Application, O.OverloadedMethod info Application p, R.HasField t Application p) => R.HasField t Application p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveApplicationMethod t Application, O.OverloadedMethodInfo info Application) => OL.IsLabel t (O.MethodProxy info Application) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
type ApplicationQueryEndCallback =
IO ()
type C_ApplicationQueryEndCallback =
Ptr Application ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_ApplicationQueryEndCallback :: C_ApplicationQueryEndCallback -> IO (FunPtr C_ApplicationQueryEndCallback)
wrap_ApplicationQueryEndCallback ::
GObject a => (a -> ApplicationQueryEndCallback) ->
C_ApplicationQueryEndCallback
wrap_ApplicationQueryEndCallback :: forall a.
GObject a =>
(a -> IO ()) -> C_ApplicationQueryEndCallback
wrap_ApplicationQueryEndCallback a -> IO ()
gi'cb Ptr Application
gi'selfPtr Ptr ()
_ = do
Ptr Application -> (Application -> IO ()) -> IO ()
forall o b.
(HasCallStack, GObject o) =>
Ptr o -> (o -> IO b) -> IO b
B.ManagedPtr.withNewObject Ptr Application
gi'selfPtr ((Application -> IO ()) -> IO ())
-> (Application -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Application
gi'self -> a -> IO ()
gi'cb (Application -> a
forall a b. Coercible a b => a -> b
Coerce.coerce Application
gi'self)
onApplicationQueryEnd :: (IsApplication a, MonadIO m) => a -> ((?self :: a) => ApplicationQueryEndCallback) -> m SignalHandlerId
onApplicationQueryEnd :: forall a (m :: * -> *).
(IsApplication a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
onApplicationQueryEnd a
obj (?self::a) => IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
let wrapped' :: C_ApplicationQueryEndCallback
wrapped' = (a -> IO ()) -> C_ApplicationQueryEndCallback
forall a.
GObject a =>
(a -> IO ()) -> C_ApplicationQueryEndCallback
wrap_ApplicationQueryEndCallback a -> IO ()
wrapped
FunPtr C_ApplicationQueryEndCallback
wrapped'' <- C_ApplicationQueryEndCallback
-> IO (FunPtr C_ApplicationQueryEndCallback)
mk_ApplicationQueryEndCallback C_ApplicationQueryEndCallback
wrapped'
a
-> Text
-> FunPtr C_ApplicationQueryEndCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"query-end" FunPtr C_ApplicationQueryEndCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterApplicationQueryEnd :: (IsApplication a, MonadIO m) => a -> ((?self :: a) => ApplicationQueryEndCallback) -> m SignalHandlerId
afterApplicationQueryEnd :: forall a (m :: * -> *).
(IsApplication a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
afterApplicationQueryEnd a
obj (?self::a) => IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
let wrapped' :: C_ApplicationQueryEndCallback
wrapped' = (a -> IO ()) -> C_ApplicationQueryEndCallback
forall a.
GObject a =>
(a -> IO ()) -> C_ApplicationQueryEndCallback
wrap_ApplicationQueryEndCallback a -> IO ()
wrapped
FunPtr C_ApplicationQueryEndCallback
wrapped'' <- C_ApplicationQueryEndCallback
-> IO (FunPtr C_ApplicationQueryEndCallback)
mk_ApplicationQueryEndCallback C_ApplicationQueryEndCallback
wrapped'
a
-> Text
-> FunPtr C_ApplicationQueryEndCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"query-end" FunPtr C_ApplicationQueryEndCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data ApplicationQueryEndSignalInfo
instance SignalInfo ApplicationQueryEndSignalInfo where
type HaskellCallbackType ApplicationQueryEndSignalInfo = ApplicationQueryEndCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_ApplicationQueryEndCallback cb
cb'' <- mk_ApplicationQueryEndCallback cb'
connectSignalFunPtr obj "query-end" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Application::query-end"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.10/docs/GI-Gtk-Objects-Application.html#g:signal:queryEnd"})
#endif
type ApplicationWindowAddedCallback =
Gtk.Window.Window
-> IO ()
type C_ApplicationWindowAddedCallback =
Ptr Application ->
Ptr Gtk.Window.Window ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_ApplicationWindowAddedCallback :: C_ApplicationWindowAddedCallback -> IO (FunPtr C_ApplicationWindowAddedCallback)
wrap_ApplicationWindowAddedCallback ::
GObject a => (a -> ApplicationWindowAddedCallback) ->
C_ApplicationWindowAddedCallback
wrap_ApplicationWindowAddedCallback :: forall a.
GObject a =>
(a -> ApplicationWindowAddedCallback)
-> C_ApplicationWindowAddedCallback
wrap_ApplicationWindowAddedCallback a -> ApplicationWindowAddedCallback
gi'cb Ptr Application
gi'selfPtr Ptr Window
window Ptr ()
_ = do
Window
window' <- ((ManagedPtr Window -> Window) -> Ptr Window -> IO Window
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Window -> Window
Gtk.Window.Window) Ptr Window
window
Ptr Application -> (Application -> IO ()) -> IO ()
forall o b.
(HasCallStack, GObject o) =>
Ptr o -> (o -> IO b) -> IO b
B.ManagedPtr.withNewObject Ptr Application
gi'selfPtr ((Application -> IO ()) -> IO ())
-> (Application -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Application
gi'self -> a -> ApplicationWindowAddedCallback
gi'cb (Application -> a
forall a b. Coercible a b => a -> b
Coerce.coerce Application
gi'self) Window
window'
onApplicationWindowAdded :: (IsApplication a, MonadIO m) => a -> ((?self :: a) => ApplicationWindowAddedCallback) -> m SignalHandlerId
onApplicationWindowAdded :: forall a (m :: * -> *).
(IsApplication a, MonadIO m) =>
a
-> ((?self::a) => ApplicationWindowAddedCallback)
-> m SignalHandlerId
onApplicationWindowAdded a
obj (?self::a) => ApplicationWindowAddedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> ApplicationWindowAddedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => ApplicationWindowAddedCallback
ApplicationWindowAddedCallback
cb
let wrapped' :: C_ApplicationWindowAddedCallback
wrapped' = (a -> ApplicationWindowAddedCallback)
-> C_ApplicationWindowAddedCallback
forall a.
GObject a =>
(a -> ApplicationWindowAddedCallback)
-> C_ApplicationWindowAddedCallback
wrap_ApplicationWindowAddedCallback a -> ApplicationWindowAddedCallback
wrapped
FunPtr C_ApplicationWindowAddedCallback
wrapped'' <- C_ApplicationWindowAddedCallback
-> IO (FunPtr C_ApplicationWindowAddedCallback)
mk_ApplicationWindowAddedCallback C_ApplicationWindowAddedCallback
wrapped'
a
-> Text
-> FunPtr C_ApplicationWindowAddedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"window-added" FunPtr C_ApplicationWindowAddedCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterApplicationWindowAdded :: (IsApplication a, MonadIO m) => a -> ((?self :: a) => ApplicationWindowAddedCallback) -> m SignalHandlerId
afterApplicationWindowAdded :: forall a (m :: * -> *).
(IsApplication a, MonadIO m) =>
a
-> ((?self::a) => ApplicationWindowAddedCallback)
-> m SignalHandlerId
afterApplicationWindowAdded a
obj (?self::a) => ApplicationWindowAddedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> ApplicationWindowAddedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => ApplicationWindowAddedCallback
ApplicationWindowAddedCallback
cb
let wrapped' :: C_ApplicationWindowAddedCallback
wrapped' = (a -> ApplicationWindowAddedCallback)
-> C_ApplicationWindowAddedCallback
forall a.
GObject a =>
(a -> ApplicationWindowAddedCallback)
-> C_ApplicationWindowAddedCallback
wrap_ApplicationWindowAddedCallback a -> ApplicationWindowAddedCallback
wrapped
FunPtr C_ApplicationWindowAddedCallback
wrapped'' <- C_ApplicationWindowAddedCallback
-> IO (FunPtr C_ApplicationWindowAddedCallback)
mk_ApplicationWindowAddedCallback C_ApplicationWindowAddedCallback
wrapped'
a
-> Text
-> FunPtr C_ApplicationWindowAddedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"window-added" FunPtr C_ApplicationWindowAddedCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data ApplicationWindowAddedSignalInfo
instance SignalInfo ApplicationWindowAddedSignalInfo where
type HaskellCallbackType ApplicationWindowAddedSignalInfo = ApplicationWindowAddedCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_ApplicationWindowAddedCallback cb
cb'' <- mk_ApplicationWindowAddedCallback cb'
connectSignalFunPtr obj "window-added" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Application::window-added"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.10/docs/GI-Gtk-Objects-Application.html#g:signal:windowAdded"})
#endif
type ApplicationWindowRemovedCallback =
Gtk.Window.Window
-> IO ()
type C_ApplicationWindowRemovedCallback =
Ptr Application ->
Ptr Gtk.Window.Window ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_ApplicationWindowRemovedCallback :: C_ApplicationWindowRemovedCallback -> IO (FunPtr C_ApplicationWindowRemovedCallback)
wrap_ApplicationWindowRemovedCallback ::
GObject a => (a -> ApplicationWindowRemovedCallback) ->
C_ApplicationWindowRemovedCallback
wrap_ApplicationWindowRemovedCallback :: forall a.
GObject a =>
(a -> ApplicationWindowAddedCallback)
-> C_ApplicationWindowAddedCallback
wrap_ApplicationWindowRemovedCallback a -> ApplicationWindowAddedCallback
gi'cb Ptr Application
gi'selfPtr Ptr Window
window Ptr ()
_ = do
Window
window' <- ((ManagedPtr Window -> Window) -> Ptr Window -> IO Window
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Window -> Window
Gtk.Window.Window) Ptr Window
window
Ptr Application -> (Application -> IO ()) -> IO ()
forall o b.
(HasCallStack, GObject o) =>
Ptr o -> (o -> IO b) -> IO b
B.ManagedPtr.withNewObject Ptr Application
gi'selfPtr ((Application -> IO ()) -> IO ())
-> (Application -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Application
gi'self -> a -> ApplicationWindowAddedCallback
gi'cb (Application -> a
forall a b. Coercible a b => a -> b
Coerce.coerce Application
gi'self) Window
window'
onApplicationWindowRemoved :: (IsApplication a, MonadIO m) => a -> ((?self :: a) => ApplicationWindowRemovedCallback) -> m SignalHandlerId
onApplicationWindowRemoved :: forall a (m :: * -> *).
(IsApplication a, MonadIO m) =>
a
-> ((?self::a) => ApplicationWindowAddedCallback)
-> m SignalHandlerId
onApplicationWindowRemoved a
obj (?self::a) => ApplicationWindowAddedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> ApplicationWindowAddedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => ApplicationWindowAddedCallback
ApplicationWindowAddedCallback
cb
let wrapped' :: C_ApplicationWindowAddedCallback
wrapped' = (a -> ApplicationWindowAddedCallback)
-> C_ApplicationWindowAddedCallback
forall a.
GObject a =>
(a -> ApplicationWindowAddedCallback)
-> C_ApplicationWindowAddedCallback
wrap_ApplicationWindowRemovedCallback a -> ApplicationWindowAddedCallback
wrapped
FunPtr C_ApplicationWindowAddedCallback
wrapped'' <- C_ApplicationWindowAddedCallback
-> IO (FunPtr C_ApplicationWindowAddedCallback)
mk_ApplicationWindowRemovedCallback C_ApplicationWindowAddedCallback
wrapped'
a
-> Text
-> FunPtr C_ApplicationWindowAddedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"window-removed" FunPtr C_ApplicationWindowAddedCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterApplicationWindowRemoved :: (IsApplication a, MonadIO m) => a -> ((?self :: a) => ApplicationWindowRemovedCallback) -> m SignalHandlerId
afterApplicationWindowRemoved :: forall a (m :: * -> *).
(IsApplication a, MonadIO m) =>
a
-> ((?self::a) => ApplicationWindowAddedCallback)
-> m SignalHandlerId
afterApplicationWindowRemoved a
obj (?self::a) => ApplicationWindowAddedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> ApplicationWindowAddedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => ApplicationWindowAddedCallback
ApplicationWindowAddedCallback
cb
let wrapped' :: C_ApplicationWindowAddedCallback
wrapped' = (a -> ApplicationWindowAddedCallback)
-> C_ApplicationWindowAddedCallback
forall a.
GObject a =>
(a -> ApplicationWindowAddedCallback)
-> C_ApplicationWindowAddedCallback
wrap_ApplicationWindowRemovedCallback a -> ApplicationWindowAddedCallback
wrapped
FunPtr C_ApplicationWindowAddedCallback
wrapped'' <- C_ApplicationWindowAddedCallback
-> IO (FunPtr C_ApplicationWindowAddedCallback)
mk_ApplicationWindowRemovedCallback C_ApplicationWindowAddedCallback
wrapped'
a
-> Text
-> FunPtr C_ApplicationWindowAddedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"window-removed" FunPtr C_ApplicationWindowAddedCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data ApplicationWindowRemovedSignalInfo
instance SignalInfo ApplicationWindowRemovedSignalInfo where
type HaskellCallbackType ApplicationWindowRemovedSignalInfo = ApplicationWindowRemovedCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_ApplicationWindowRemovedCallback cb
cb'' <- mk_ApplicationWindowRemovedCallback cb'
connectSignalFunPtr obj "window-removed" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Application::window-removed"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.10/docs/GI-Gtk-Objects-Application.html#g:signal:windowRemoved"})
#endif
getApplicationActiveWindow :: (MonadIO m, IsApplication o) => o -> m (Maybe Gtk.Window.Window)
getApplicationActiveWindow :: forall (m :: * -> *) o.
(MonadIO m, IsApplication o) =>
o -> m (Maybe Window)
getApplicationActiveWindow o
obj = IO (Maybe Window) -> m (Maybe Window)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe Window) -> m (Maybe Window))
-> IO (Maybe Window) -> m (Maybe Window)
forall a b. (a -> b) -> a -> b
$ o -> String -> (ManagedPtr Window -> Window) -> IO (Maybe Window)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"active-window" ManagedPtr Window -> Window
Gtk.Window.Window
#if defined(ENABLE_OVERLOADING)
data ApplicationActiveWindowPropertyInfo
instance AttrInfo ApplicationActiveWindowPropertyInfo where
type AttrAllowedOps ApplicationActiveWindowPropertyInfo = '[ 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint ApplicationActiveWindowPropertyInfo = IsApplication
type AttrSetTypeConstraint ApplicationActiveWindowPropertyInfo = (~) ()
type AttrTransferTypeConstraint ApplicationActiveWindowPropertyInfo = (~) ()
type AttrTransferType ApplicationActiveWindowPropertyInfo = ()
type AttrGetType ApplicationActiveWindowPropertyInfo = (Maybe Gtk.Window.Window)
type AttrLabel ApplicationActiveWindowPropertyInfo = "active-window"
type AttrOrigin ApplicationActiveWindowPropertyInfo = Application
attrGet = getApplicationActiveWindow
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Application.activeWindow"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.10/docs/GI-Gtk-Objects-Application.html#g:attr:activeWindow"
})
#endif
getApplicationMenubar :: (MonadIO m, IsApplication o) => o -> m (Maybe Gio.MenuModel.MenuModel)
o
obj = IO (Maybe MenuModel) -> m (Maybe MenuModel)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe MenuModel) -> m (Maybe MenuModel))
-> IO (Maybe MenuModel) -> m (Maybe MenuModel)
forall a b. (a -> b) -> a -> b
$ o
-> String
-> (ManagedPtr MenuModel -> MenuModel)
-> IO (Maybe MenuModel)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"menubar" ManagedPtr MenuModel -> MenuModel
Gio.MenuModel.MenuModel
setApplicationMenubar :: (MonadIO m, IsApplication o, Gio.MenuModel.IsMenuModel a) => o -> a -> m ()
o
obj a
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> Maybe a -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"menubar" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)
constructApplicationMenubar :: (IsApplication o, MIO.MonadIO m, Gio.MenuModel.IsMenuModel a) => a -> m (GValueConstruct o)
a
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject String
"menubar" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)
clearApplicationMenubar :: (MonadIO m, IsApplication o) => o -> m ()
o
obj = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe MenuModel -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"menubar" (Maybe MenuModel
forall a. Maybe a
Nothing :: Maybe Gio.MenuModel.MenuModel)
#if defined(ENABLE_OVERLOADING)
data ApplicationMenubarPropertyInfo
instance AttrInfo ApplicationMenubarPropertyInfo where
type AttrAllowedOps ApplicationMenubarPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint ApplicationMenubarPropertyInfo = IsApplication
type AttrSetTypeConstraint ApplicationMenubarPropertyInfo = Gio.MenuModel.IsMenuModel
type AttrTransferTypeConstraint ApplicationMenubarPropertyInfo = Gio.MenuModel.IsMenuModel
type AttrTransferType ApplicationMenubarPropertyInfo = Gio.MenuModel.MenuModel
type AttrGetType ApplicationMenubarPropertyInfo = (Maybe Gio.MenuModel.MenuModel)
type AttrLabel ApplicationMenubarPropertyInfo = "menubar"
type AttrOrigin ApplicationMenubarPropertyInfo = Application
attrGet = getApplicationMenubar
attrSet = setApplicationMenubar
attrTransfer _ v = do
unsafeCastTo Gio.MenuModel.MenuModel v
attrConstruct = constructApplicationMenubar
attrClear = clearApplicationMenubar
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Application.menubar"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.10/docs/GI-Gtk-Objects-Application.html#g:attr:menubar"
})
#endif
getApplicationRegisterSession :: (MonadIO m, IsApplication o) => o -> m Bool
getApplicationRegisterSession :: forall (m :: * -> *) o. (MonadIO m, IsApplication o) => o -> m Bool
getApplicationRegisterSession o
obj = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"register-session"
setApplicationRegisterSession :: (MonadIO m, IsApplication o) => o -> Bool -> m ()
setApplicationRegisterSession :: forall (m :: * -> *) o.
(MonadIO m, IsApplication o) =>
o -> Bool -> m ()
setApplicationRegisterSession o
obj Bool
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> Bool -> IO ()
forall a. GObject a => a -> String -> Bool -> IO ()
B.Properties.setObjectPropertyBool o
obj String
"register-session" Bool
val
constructApplicationRegisterSession :: (IsApplication o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructApplicationRegisterSession :: forall o (m :: * -> *).
(IsApplication o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructApplicationRegisterSession Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"register-session" Bool
val
#if defined(ENABLE_OVERLOADING)
data ApplicationRegisterSessionPropertyInfo
instance AttrInfo ApplicationRegisterSessionPropertyInfo where
type AttrAllowedOps ApplicationRegisterSessionPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint ApplicationRegisterSessionPropertyInfo = IsApplication
type AttrSetTypeConstraint ApplicationRegisterSessionPropertyInfo = (~) Bool
type AttrTransferTypeConstraint ApplicationRegisterSessionPropertyInfo = (~) Bool
type AttrTransferType ApplicationRegisterSessionPropertyInfo = Bool
type AttrGetType ApplicationRegisterSessionPropertyInfo = Bool
type AttrLabel ApplicationRegisterSessionPropertyInfo = "register-session"
type AttrOrigin ApplicationRegisterSessionPropertyInfo = Application
attrGet = getApplicationRegisterSession
attrSet = setApplicationRegisterSession
attrTransfer _ v = do
return v
attrConstruct = constructApplicationRegisterSession
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Application.registerSession"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.10/docs/GI-Gtk-Objects-Application.html#g:attr:registerSession"
})
#endif
getApplicationScreensaverActive :: (MonadIO m, IsApplication o) => o -> m Bool
getApplicationScreensaverActive :: forall (m :: * -> *) o. (MonadIO m, IsApplication o) => o -> m Bool
getApplicationScreensaverActive o
obj = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"screensaver-active"
#if defined(ENABLE_OVERLOADING)
data ApplicationScreensaverActivePropertyInfo
instance AttrInfo ApplicationScreensaverActivePropertyInfo where
type AttrAllowedOps ApplicationScreensaverActivePropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint ApplicationScreensaverActivePropertyInfo = IsApplication
type AttrSetTypeConstraint ApplicationScreensaverActivePropertyInfo = (~) ()
type AttrTransferTypeConstraint ApplicationScreensaverActivePropertyInfo = (~) ()
type AttrTransferType ApplicationScreensaverActivePropertyInfo = ()
type AttrGetType ApplicationScreensaverActivePropertyInfo = Bool
type AttrLabel ApplicationScreensaverActivePropertyInfo = "screensaver-active"
type AttrOrigin ApplicationScreensaverActivePropertyInfo = Application
attrGet = getApplicationScreensaverActive
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Application.screensaverActive"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.10/docs/GI-Gtk-Objects-Application.html#g:attr:screensaverActive"
})
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Application
type instance O.AttributeList Application = ApplicationAttributeList
type ApplicationAttributeList = ('[ '("actionGroup", Gio.Application.ApplicationActionGroupPropertyInfo), '("activeWindow", ApplicationActiveWindowPropertyInfo), '("applicationId", Gio.Application.ApplicationApplicationIdPropertyInfo), '("flags", Gio.Application.ApplicationFlagsPropertyInfo), '("inactivityTimeout", Gio.Application.ApplicationInactivityTimeoutPropertyInfo), '("isBusy", Gio.Application.ApplicationIsBusyPropertyInfo), '("isRegistered", Gio.Application.ApplicationIsRegisteredPropertyInfo), '("isRemote", Gio.Application.ApplicationIsRemotePropertyInfo), '("menubar", ApplicationMenubarPropertyInfo), '("registerSession", ApplicationRegisterSessionPropertyInfo), '("resourceBasePath", Gio.Application.ApplicationResourceBasePathPropertyInfo), '("screensaverActive", ApplicationScreensaverActivePropertyInfo), '("version", Gio.Application.ApplicationVersionPropertyInfo)] :: [(Symbol, DK.Type)])
#endif
#if defined(ENABLE_OVERLOADING)
applicationActiveWindow :: AttrLabelProxy "activeWindow"
applicationActiveWindow = AttrLabelProxy
applicationMenubar :: AttrLabelProxy "menubar"
applicationMenubar = AttrLabelProxy
applicationRegisterSession :: AttrLabelProxy "registerSession"
applicationRegisterSession = AttrLabelProxy
applicationScreensaverActive :: AttrLabelProxy "screensaverActive"
applicationScreensaverActive = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList Application = ApplicationSignalList
type ApplicationSignalList = ('[ '("actionAdded", Gio.ActionGroup.ActionGroupActionAddedSignalInfo), '("actionEnabledChanged", Gio.ActionGroup.ActionGroupActionEnabledChangedSignalInfo), '("actionRemoved", Gio.ActionGroup.ActionGroupActionRemovedSignalInfo), '("actionStateChanged", Gio.ActionGroup.ActionGroupActionStateChangedSignalInfo), '("activate", Gio.Application.ApplicationActivateSignalInfo), '("commandLine", Gio.Application.ApplicationCommandLineSignalInfo), '("handleLocalOptions", Gio.Application.ApplicationHandleLocalOptionsSignalInfo), '("nameLost", Gio.Application.ApplicationNameLostSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("open", Gio.Application.ApplicationOpenSignalInfo), '("queryEnd", ApplicationQueryEndSignalInfo), '("shutdown", Gio.Application.ApplicationShutdownSignalInfo), '("startup", Gio.Application.ApplicationStartupSignalInfo), '("windowAdded", ApplicationWindowAddedSignalInfo), '("windowRemoved", ApplicationWindowRemovedSignalInfo)] :: [(Symbol, DK.Type)])
#endif
foreign import ccall "gtk_application_new" gtk_application_new ::
CString ->
CUInt ->
IO (Ptr Application)
applicationNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
Maybe (T.Text)
-> [Gio.Flags.ApplicationFlags]
-> m Application
applicationNew :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Maybe Text -> [ApplicationFlags] -> m Application
applicationNew Maybe Text
applicationId [ApplicationFlags]
flags = IO Application -> m Application
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Application -> m Application)
-> IO Application -> m Application
forall a b. (a -> b) -> a -> b
$ do
Ptr CChar
maybeApplicationId <- case Maybe Text
applicationId of
Maybe Text
Nothing -> Ptr CChar -> IO (Ptr CChar)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CChar
forall a. Ptr a
FP.nullPtr
Just Text
jApplicationId -> do
Ptr CChar
jApplicationId' <- Text -> IO (Ptr CChar)
textToCString Text
jApplicationId
Ptr CChar -> IO (Ptr CChar)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CChar
jApplicationId'
let flags' :: CUInt
flags' = [ApplicationFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [ApplicationFlags]
flags
Ptr Application
result <- Ptr CChar -> CUInt -> IO (Ptr Application)
gtk_application_new Ptr CChar
maybeApplicationId CUInt
flags'
Text -> Ptr Application -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"applicationNew" Ptr Application
result
Application
result' <- ((ManagedPtr Application -> Application)
-> Ptr Application -> IO Application
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Application -> Application
Application) Ptr Application
result
Ptr CChar -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CChar
maybeApplicationId
Application -> IO Application
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Application
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gtk_application_add_window" gtk_application_add_window ::
Ptr Application ->
Ptr Gtk.Window.Window ->
IO ()
applicationAddWindow ::
(B.CallStack.HasCallStack, MonadIO m, IsApplication a, Gtk.Window.IsWindow b) =>
a
-> b
-> m ()
applicationAddWindow :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsApplication a, IsWindow b) =>
a -> b -> m ()
applicationAddWindow a
application b
window = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Application
application' <- a -> IO (Ptr Application)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
application
Ptr Window
window' <- b -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
window
Ptr Application -> Ptr Window -> IO ()
gtk_application_add_window Ptr Application
application' Ptr Window
window'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
application
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
window
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ApplicationAddWindowMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsApplication a, Gtk.Window.IsWindow b) => O.OverloadedMethod ApplicationAddWindowMethodInfo a signature where
overloadedMethod = applicationAddWindow
instance O.OverloadedMethodInfo ApplicationAddWindowMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Application.applicationAddWindow",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.10/docs/GI-Gtk-Objects-Application.html#v:applicationAddWindow"
})
#endif
foreign import ccall "gtk_application_get_accels_for_action" gtk_application_get_accels_for_action ::
Ptr Application ->
CString ->
IO (Ptr CString)
applicationGetAccelsForAction ::
(B.CallStack.HasCallStack, MonadIO m, IsApplication a) =>
a
-> T.Text
-> m [T.Text]
applicationGetAccelsForAction :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsApplication a) =>
a -> Text -> m [Text]
applicationGetAccelsForAction a
application Text
detailedActionName = IO [Text] -> m [Text]
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Text] -> m [Text]) -> IO [Text] -> m [Text]
forall a b. (a -> b) -> a -> b
$ do
Ptr Application
application' <- a -> IO (Ptr Application)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
application
Ptr CChar
detailedActionName' <- Text -> IO (Ptr CChar)
textToCString Text
detailedActionName
Ptr (Ptr CChar)
result <- Ptr Application -> Ptr CChar -> IO (Ptr (Ptr CChar))
gtk_application_get_accels_for_action Ptr Application
application' Ptr CChar
detailedActionName'
Text -> Ptr (Ptr CChar) -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"applicationGetAccelsForAction" Ptr (Ptr CChar)
result
[Text]
result' <- HasCallStack => Ptr (Ptr CChar) -> IO [Text]
Ptr (Ptr CChar) -> IO [Text]
unpackZeroTerminatedUTF8CArray Ptr (Ptr CChar)
result
(Ptr CChar -> IO ()) -> Ptr (Ptr CChar) -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray Ptr CChar -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr CChar)
result
Ptr (Ptr CChar) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr CChar)
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
application
Ptr CChar -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CChar
detailedActionName'
[Text] -> IO [Text]
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return [Text]
result'
#if defined(ENABLE_OVERLOADING)
data ApplicationGetAccelsForActionMethodInfo
instance (signature ~ (T.Text -> m [T.Text]), MonadIO m, IsApplication a) => O.OverloadedMethod ApplicationGetAccelsForActionMethodInfo a signature where
overloadedMethod = applicationGetAccelsForAction
instance O.OverloadedMethodInfo ApplicationGetAccelsForActionMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Application.applicationGetAccelsForAction",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.10/docs/GI-Gtk-Objects-Application.html#v:applicationGetAccelsForAction"
})
#endif
foreign import ccall "gtk_application_get_actions_for_accel" gtk_application_get_actions_for_accel ::
Ptr Application ->
CString ->
IO (Ptr CString)
applicationGetActionsForAccel ::
(B.CallStack.HasCallStack, MonadIO m, IsApplication a) =>
a
-> T.Text
-> m [T.Text]
applicationGetActionsForAccel :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsApplication a) =>
a -> Text -> m [Text]
applicationGetActionsForAccel a
application Text
accel = IO [Text] -> m [Text]
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Text] -> m [Text]) -> IO [Text] -> m [Text]
forall a b. (a -> b) -> a -> b
$ do
Ptr Application
application' <- a -> IO (Ptr Application)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
application
Ptr CChar
accel' <- Text -> IO (Ptr CChar)
textToCString Text
accel
Ptr (Ptr CChar)
result <- Ptr Application -> Ptr CChar -> IO (Ptr (Ptr CChar))
gtk_application_get_actions_for_accel Ptr Application
application' Ptr CChar
accel'
Text -> Ptr (Ptr CChar) -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"applicationGetActionsForAccel" Ptr (Ptr CChar)
result
[Text]
result' <- HasCallStack => Ptr (Ptr CChar) -> IO [Text]
Ptr (Ptr CChar) -> IO [Text]
unpackZeroTerminatedUTF8CArray Ptr (Ptr CChar)
result
(Ptr CChar -> IO ()) -> Ptr (Ptr CChar) -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray Ptr CChar -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr CChar)
result
Ptr (Ptr CChar) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr CChar)
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
application
Ptr CChar -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CChar
accel'
[Text] -> IO [Text]
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return [Text]
result'
#if defined(ENABLE_OVERLOADING)
data ApplicationGetActionsForAccelMethodInfo
instance (signature ~ (T.Text -> m [T.Text]), MonadIO m, IsApplication a) => O.OverloadedMethod ApplicationGetActionsForAccelMethodInfo a signature where
overloadedMethod = applicationGetActionsForAccel
instance O.OverloadedMethodInfo ApplicationGetActionsForAccelMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Application.applicationGetActionsForAccel",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.10/docs/GI-Gtk-Objects-Application.html#v:applicationGetActionsForAccel"
})
#endif
foreign import ccall "gtk_application_get_active_window" gtk_application_get_active_window ::
Ptr Application ->
IO (Ptr Gtk.Window.Window)
applicationGetActiveWindow ::
(B.CallStack.HasCallStack, MonadIO m, IsApplication a) =>
a
-> m (Maybe Gtk.Window.Window)
applicationGetActiveWindow :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsApplication a) =>
a -> m (Maybe Window)
applicationGetActiveWindow a
application = IO (Maybe Window) -> m (Maybe Window)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Window) -> m (Maybe Window))
-> IO (Maybe Window) -> m (Maybe Window)
forall a b. (a -> b) -> a -> b
$ do
Ptr Application
application' <- a -> IO (Ptr Application)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
application
Ptr Window
result <- Ptr Application -> IO (Ptr Window)
gtk_application_get_active_window Ptr Application
application'
Maybe Window
maybeResult <- Ptr Window -> (Ptr Window -> IO Window) -> IO (Maybe Window)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Window
result ((Ptr Window -> IO Window) -> IO (Maybe Window))
-> (Ptr Window -> IO Window) -> IO (Maybe Window)
forall a b. (a -> b) -> a -> b
$ \Ptr Window
result' -> do
Window
result'' <- ((ManagedPtr Window -> Window) -> Ptr Window -> IO Window
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Window -> Window
Gtk.Window.Window) Ptr Window
result'
Window -> IO Window
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Window
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
application
Maybe Window -> IO (Maybe Window)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Window
maybeResult
#if defined(ENABLE_OVERLOADING)
data ApplicationGetActiveWindowMethodInfo
instance (signature ~ (m (Maybe Gtk.Window.Window)), MonadIO m, IsApplication a) => O.OverloadedMethod ApplicationGetActiveWindowMethodInfo a signature where
overloadedMethod = applicationGetActiveWindow
instance O.OverloadedMethodInfo ApplicationGetActiveWindowMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Application.applicationGetActiveWindow",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.10/docs/GI-Gtk-Objects-Application.html#v:applicationGetActiveWindow"
})
#endif
foreign import ccall "gtk_application_get_menu_by_id" ::
Ptr Application ->
CString ->
IO (Ptr Gio.Menu.Menu)
applicationGetMenuById ::
(B.CallStack.HasCallStack, MonadIO m, IsApplication a) =>
a
-> T.Text
-> m (Maybe Gio.Menu.Menu)
a
application Text
id = IO (Maybe Menu) -> m (Maybe Menu)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Menu) -> m (Maybe Menu))
-> IO (Maybe Menu) -> m (Maybe Menu)
forall a b. (a -> b) -> a -> b
$ do
Ptr Application
application' <- a -> IO (Ptr Application)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
application
Ptr CChar
id' <- Text -> IO (Ptr CChar)
textToCString Text
id
Ptr Menu
result <- Ptr Application -> Ptr CChar -> IO (Ptr Menu)
gtk_application_get_menu_by_id Ptr Application
application' Ptr CChar
id'
Maybe Menu
maybeResult <- Ptr Menu -> (Ptr Menu -> IO Menu) -> IO (Maybe Menu)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Menu
result ((Ptr Menu -> IO Menu) -> IO (Maybe Menu))
-> (Ptr Menu -> IO Menu) -> IO (Maybe Menu)
forall a b. (a -> b) -> a -> b
$ \Ptr Menu
result' -> do
Menu
result'' <- ((ManagedPtr Menu -> Menu) -> Ptr Menu -> IO Menu
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Menu -> Menu
Gio.Menu.Menu) Ptr Menu
result'
Menu -> IO Menu
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Menu
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
application
Ptr CChar -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CChar
id'
Maybe Menu -> IO (Maybe Menu)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Menu
maybeResult
#if defined(ENABLE_OVERLOADING)
data ApplicationGetMenuByIdMethodInfo
instance (signature ~ (T.Text -> m (Maybe Gio.Menu.Menu)), MonadIO m, IsApplication a) => O.OverloadedMethod ApplicationGetMenuByIdMethodInfo a signature where
overloadedMethod = applicationGetMenuById
instance O.OverloadedMethodInfo ApplicationGetMenuByIdMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Application.applicationGetMenuById",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.10/docs/GI-Gtk-Objects-Application.html#v:applicationGetMenuById"
})
#endif
foreign import ccall "gtk_application_get_menubar" ::
Ptr Application ->
IO (Ptr Gio.MenuModel.MenuModel)
applicationGetMenubar ::
(B.CallStack.HasCallStack, MonadIO m, IsApplication a) =>
a
-> m (Maybe Gio.MenuModel.MenuModel)
a
application = IO (Maybe MenuModel) -> m (Maybe MenuModel)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe MenuModel) -> m (Maybe MenuModel))
-> IO (Maybe MenuModel) -> m (Maybe MenuModel)
forall a b. (a -> b) -> a -> b
$ do
Ptr Application
application' <- a -> IO (Ptr Application)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
application
Ptr MenuModel
result <- Ptr Application -> IO (Ptr MenuModel)
gtk_application_get_menubar Ptr Application
application'
Maybe MenuModel
maybeResult <- Ptr MenuModel
-> (Ptr MenuModel -> IO MenuModel) -> IO (Maybe MenuModel)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr MenuModel
result ((Ptr MenuModel -> IO MenuModel) -> IO (Maybe MenuModel))
-> (Ptr MenuModel -> IO MenuModel) -> IO (Maybe MenuModel)
forall a b. (a -> b) -> a -> b
$ \Ptr MenuModel
result' -> do
MenuModel
result'' <- ((ManagedPtr MenuModel -> MenuModel)
-> Ptr MenuModel -> IO MenuModel
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr MenuModel -> MenuModel
Gio.MenuModel.MenuModel) Ptr MenuModel
result'
MenuModel -> IO MenuModel
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return MenuModel
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
application
Maybe MenuModel -> IO (Maybe MenuModel)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe MenuModel
maybeResult
#if defined(ENABLE_OVERLOADING)
data ApplicationGetMenubarMethodInfo
instance (signature ~ (m (Maybe Gio.MenuModel.MenuModel)), MonadIO m, IsApplication a) => O.OverloadedMethod ApplicationGetMenubarMethodInfo a signature where
overloadedMethod = applicationGetMenubar
instance O.OverloadedMethodInfo ApplicationGetMenubarMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Application.applicationGetMenubar",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.10/docs/GI-Gtk-Objects-Application.html#v:applicationGetMenubar"
})
#endif
foreign import ccall "gtk_application_get_window_by_id" gtk_application_get_window_by_id ::
Ptr Application ->
Word32 ->
IO (Ptr Gtk.Window.Window)
applicationGetWindowById ::
(B.CallStack.HasCallStack, MonadIO m, IsApplication a) =>
a
-> Word32
-> m (Maybe Gtk.Window.Window)
applicationGetWindowById :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsApplication a) =>
a -> Word32 -> m (Maybe Window)
applicationGetWindowById a
application Word32
id = IO (Maybe Window) -> m (Maybe Window)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Window) -> m (Maybe Window))
-> IO (Maybe Window) -> m (Maybe Window)
forall a b. (a -> b) -> a -> b
$ do
Ptr Application
application' <- a -> IO (Ptr Application)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
application
Ptr Window
result <- Ptr Application -> Word32 -> IO (Ptr Window)
gtk_application_get_window_by_id Ptr Application
application' Word32
id
Maybe Window
maybeResult <- Ptr Window -> (Ptr Window -> IO Window) -> IO (Maybe Window)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Window
result ((Ptr Window -> IO Window) -> IO (Maybe Window))
-> (Ptr Window -> IO Window) -> IO (Maybe Window)
forall a b. (a -> b) -> a -> b
$ \Ptr Window
result' -> do
Window
result'' <- ((ManagedPtr Window -> Window) -> Ptr Window -> IO Window
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Window -> Window
Gtk.Window.Window) Ptr Window
result'
Window -> IO Window
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Window
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
application
Maybe Window -> IO (Maybe Window)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Window
maybeResult
#if defined(ENABLE_OVERLOADING)
data ApplicationGetWindowByIdMethodInfo
instance (signature ~ (Word32 -> m (Maybe Gtk.Window.Window)), MonadIO m, IsApplication a) => O.OverloadedMethod ApplicationGetWindowByIdMethodInfo a signature where
overloadedMethod = applicationGetWindowById
instance O.OverloadedMethodInfo ApplicationGetWindowByIdMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Application.applicationGetWindowById",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.10/docs/GI-Gtk-Objects-Application.html#v:applicationGetWindowById"
})
#endif
foreign import ccall "gtk_application_get_windows" gtk_application_get_windows ::
Ptr Application ->
IO (Ptr (GList (Ptr Gtk.Window.Window)))
applicationGetWindows ::
(B.CallStack.HasCallStack, MonadIO m, IsApplication a) =>
a
-> m [Gtk.Window.Window]
applicationGetWindows :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsApplication a) =>
a -> m [Window]
applicationGetWindows a
application = IO [Window] -> m [Window]
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Window] -> m [Window]) -> IO [Window] -> m [Window]
forall a b. (a -> b) -> a -> b
$ do
Ptr Application
application' <- a -> IO (Ptr Application)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
application
Ptr (GList (Ptr Window))
result <- Ptr Application -> IO (Ptr (GList (Ptr Window)))
gtk_application_get_windows Ptr Application
application'
[Ptr Window]
result' <- Ptr (GList (Ptr Window)) -> IO [Ptr Window]
forall a. Ptr (GList (Ptr a)) -> IO [Ptr a]
unpackGList Ptr (GList (Ptr Window))
result
[Window]
result'' <- (Ptr Window -> IO Window) -> [Ptr Window] -> IO [Window]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
forall (m :: * -> *) a b. Monad m => (a -> m b) -> [a] -> m [b]
mapM ((ManagedPtr Window -> Window) -> Ptr Window -> IO Window
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Window -> Window
Gtk.Window.Window) [Ptr Window]
result'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
application
[Window] -> IO [Window]
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return [Window]
result''
#if defined(ENABLE_OVERLOADING)
data ApplicationGetWindowsMethodInfo
instance (signature ~ (m [Gtk.Window.Window]), MonadIO m, IsApplication a) => O.OverloadedMethod ApplicationGetWindowsMethodInfo a signature where
overloadedMethod = applicationGetWindows
instance O.OverloadedMethodInfo ApplicationGetWindowsMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Application.applicationGetWindows",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.10/docs/GI-Gtk-Objects-Application.html#v:applicationGetWindows"
})
#endif
foreign import ccall "gtk_application_inhibit" gtk_application_inhibit ::
Ptr Application ->
Ptr Gtk.Window.Window ->
CUInt ->
CString ->
IO Word32
applicationInhibit ::
(B.CallStack.HasCallStack, MonadIO m, IsApplication a, Gtk.Window.IsWindow b) =>
a
-> Maybe (b)
-> [Gtk.Flags.ApplicationInhibitFlags]
-> Maybe (T.Text)
-> m Word32
applicationInhibit :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsApplication a, IsWindow b) =>
a -> Maybe b -> [ApplicationInhibitFlags] -> Maybe Text -> m Word32
applicationInhibit a
application Maybe b
window [ApplicationInhibitFlags]
flags Maybe Text
reason = IO Word32 -> m Word32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
Ptr Application
application' <- a -> IO (Ptr Application)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
application
Ptr Window
maybeWindow <- case Maybe b
window of
Maybe b
Nothing -> Ptr Window -> IO (Ptr Window)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Window
forall a. Ptr a
FP.nullPtr
Just b
jWindow -> do
Ptr Window
jWindow' <- b -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jWindow
Ptr Window -> IO (Ptr Window)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Window
jWindow'
let flags' :: CUInt
flags' = [ApplicationInhibitFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [ApplicationInhibitFlags]
flags
Ptr CChar
maybeReason <- case Maybe Text
reason of
Maybe Text
Nothing -> Ptr CChar -> IO (Ptr CChar)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CChar
forall a. Ptr a
FP.nullPtr
Just Text
jReason -> do
Ptr CChar
jReason' <- Text -> IO (Ptr CChar)
textToCString Text
jReason
Ptr CChar -> IO (Ptr CChar)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CChar
jReason'
Word32
result <- Ptr Application -> Ptr Window -> CUInt -> Ptr CChar -> IO Word32
gtk_application_inhibit Ptr Application
application' Ptr Window
maybeWindow CUInt
flags' Ptr CChar
maybeReason
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
application
Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
window b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Ptr CChar -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CChar
maybeReason
Word32 -> IO Word32
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result
#if defined(ENABLE_OVERLOADING)
data ApplicationInhibitMethodInfo
instance (signature ~ (Maybe (b) -> [Gtk.Flags.ApplicationInhibitFlags] -> Maybe (T.Text) -> m Word32), MonadIO m, IsApplication a, Gtk.Window.IsWindow b) => O.OverloadedMethod ApplicationInhibitMethodInfo a signature where
overloadedMethod = applicationInhibit
instance O.OverloadedMethodInfo ApplicationInhibitMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Application.applicationInhibit",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.10/docs/GI-Gtk-Objects-Application.html#v:applicationInhibit"
})
#endif
foreign import ccall "gtk_application_list_action_descriptions" gtk_application_list_action_descriptions ::
Ptr Application ->
IO (Ptr CString)
applicationListActionDescriptions ::
(B.CallStack.HasCallStack, MonadIO m, IsApplication a) =>
a
-> m [T.Text]
applicationListActionDescriptions :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsApplication a) =>
a -> m [Text]
applicationListActionDescriptions a
application = IO [Text] -> m [Text]
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Text] -> m [Text]) -> IO [Text] -> m [Text]
forall a b. (a -> b) -> a -> b
$ do
Ptr Application
application' <- a -> IO (Ptr Application)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
application
Ptr (Ptr CChar)
result <- Ptr Application -> IO (Ptr (Ptr CChar))
gtk_application_list_action_descriptions Ptr Application
application'
Text -> Ptr (Ptr CChar) -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"applicationListActionDescriptions" Ptr (Ptr CChar)
result
[Text]
result' <- HasCallStack => Ptr (Ptr CChar) -> IO [Text]
Ptr (Ptr CChar) -> IO [Text]
unpackZeroTerminatedUTF8CArray Ptr (Ptr CChar)
result
(Ptr CChar -> IO ()) -> Ptr (Ptr CChar) -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray Ptr CChar -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr CChar)
result
Ptr (Ptr CChar) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr CChar)
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
application
[Text] -> IO [Text]
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return [Text]
result'
#if defined(ENABLE_OVERLOADING)
data ApplicationListActionDescriptionsMethodInfo
instance (signature ~ (m [T.Text]), MonadIO m, IsApplication a) => O.OverloadedMethod ApplicationListActionDescriptionsMethodInfo a signature where
overloadedMethod = applicationListActionDescriptions
instance O.OverloadedMethodInfo ApplicationListActionDescriptionsMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Application.applicationListActionDescriptions",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.10/docs/GI-Gtk-Objects-Application.html#v:applicationListActionDescriptions"
})
#endif
foreign import ccall "gtk_application_remove_window" gtk_application_remove_window ::
Ptr Application ->
Ptr Gtk.Window.Window ->
IO ()
applicationRemoveWindow ::
(B.CallStack.HasCallStack, MonadIO m, IsApplication a, Gtk.Window.IsWindow b) =>
a
-> b
-> m ()
applicationRemoveWindow :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsApplication a, IsWindow b) =>
a -> b -> m ()
applicationRemoveWindow a
application b
window = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Application
application' <- a -> IO (Ptr Application)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
application
Ptr Window
window' <- b -> IO (Ptr Window)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
window
Ptr Application -> Ptr Window -> IO ()
gtk_application_remove_window Ptr Application
application' Ptr Window
window'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
application
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
window
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ApplicationRemoveWindowMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsApplication a, Gtk.Window.IsWindow b) => O.OverloadedMethod ApplicationRemoveWindowMethodInfo a signature where
overloadedMethod = applicationRemoveWindow
instance O.OverloadedMethodInfo ApplicationRemoveWindowMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Application.applicationRemoveWindow",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.10/docs/GI-Gtk-Objects-Application.html#v:applicationRemoveWindow"
})
#endif
foreign import ccall "gtk_application_set_accels_for_action" gtk_application_set_accels_for_action ::
Ptr Application ->
CString ->
Ptr CString ->
IO ()
applicationSetAccelsForAction ::
(B.CallStack.HasCallStack, MonadIO m, IsApplication a) =>
a
-> T.Text
-> [T.Text]
-> m ()
applicationSetAccelsForAction :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsApplication a) =>
a -> Text -> [Text] -> m ()
applicationSetAccelsForAction a
application Text
detailedActionName [Text]
accels = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Application
application' <- a -> IO (Ptr Application)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
application
Ptr CChar
detailedActionName' <- Text -> IO (Ptr CChar)
textToCString Text
detailedActionName
Ptr (Ptr CChar)
accels' <- [Text] -> IO (Ptr (Ptr CChar))
packZeroTerminatedUTF8CArray [Text]
accels
Ptr Application -> Ptr CChar -> Ptr (Ptr CChar) -> IO ()
gtk_application_set_accels_for_action Ptr Application
application' Ptr CChar
detailedActionName' Ptr (Ptr CChar)
accels'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
application
Ptr CChar -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CChar
detailedActionName'
(Ptr CChar -> IO ()) -> Ptr (Ptr CChar) -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray Ptr CChar -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr CChar)
accels'
Ptr (Ptr CChar) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr CChar)
accels'
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ApplicationSetAccelsForActionMethodInfo
instance (signature ~ (T.Text -> [T.Text] -> m ()), MonadIO m, IsApplication a) => O.OverloadedMethod ApplicationSetAccelsForActionMethodInfo a signature where
overloadedMethod = applicationSetAccelsForAction
instance O.OverloadedMethodInfo ApplicationSetAccelsForActionMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Application.applicationSetAccelsForAction",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.10/docs/GI-Gtk-Objects-Application.html#v:applicationSetAccelsForAction"
})
#endif
foreign import ccall "gtk_application_set_menubar" ::
Ptr Application ->
Ptr Gio.MenuModel.MenuModel ->
IO ()
applicationSetMenubar ::
(B.CallStack.HasCallStack, MonadIO m, IsApplication a, Gio.MenuModel.IsMenuModel b) =>
a
-> Maybe (b)
-> m ()
a
application Maybe b
menubar = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Application
application' <- a -> IO (Ptr Application)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
application
Ptr MenuModel
maybeMenubar <- case Maybe b
menubar of
Maybe b
Nothing -> Ptr MenuModel -> IO (Ptr MenuModel)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr MenuModel
forall a. Ptr a
FP.nullPtr
Just b
jMenubar -> do
Ptr MenuModel
jMenubar' <- b -> IO (Ptr MenuModel)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jMenubar
Ptr MenuModel -> IO (Ptr MenuModel)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr MenuModel
jMenubar'
Ptr Application -> Ptr MenuModel -> IO ()
gtk_application_set_menubar Ptr Application
application' Ptr MenuModel
maybeMenubar
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
application
Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
menubar b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ApplicationSetMenubarMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsApplication a, Gio.MenuModel.IsMenuModel b) => O.OverloadedMethod ApplicationSetMenubarMethodInfo a signature where
overloadedMethod = applicationSetMenubar
instance O.OverloadedMethodInfo ApplicationSetMenubarMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Application.applicationSetMenubar",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.10/docs/GI-Gtk-Objects-Application.html#v:applicationSetMenubar"
})
#endif
foreign import ccall "gtk_application_uninhibit" gtk_application_uninhibit ::
Ptr Application ->
Word32 ->
IO ()
applicationUninhibit ::
(B.CallStack.HasCallStack, MonadIO m, IsApplication a) =>
a
-> Word32
-> m ()
applicationUninhibit :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsApplication a) =>
a -> Word32 -> m ()
applicationUninhibit a
application Word32
cookie = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Application
application' <- a -> IO (Ptr Application)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
application
Ptr Application -> Word32 -> IO ()
gtk_application_uninhibit Ptr Application
application' Word32
cookie
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
application
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ApplicationUninhibitMethodInfo
instance (signature ~ (Word32 -> m ()), MonadIO m, IsApplication a) => O.OverloadedMethod ApplicationUninhibitMethodInfo a signature where
overloadedMethod = applicationUninhibit
instance O.OverloadedMethodInfo ApplicationUninhibitMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Application.applicationUninhibit",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.10/docs/GI-Gtk-Objects-Application.html#v:applicationUninhibit"
})
#endif