{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gtk.Objects.UIManager
(
UIManager(..) ,
IsUIManager ,
toUIManager ,
#if defined(ENABLE_OVERLOADING)
ResolveUIManagerMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
UIManagerAddUiMethodInfo ,
#endif
uIManagerAddUi ,
#if defined(ENABLE_OVERLOADING)
UIManagerAddUiFromFileMethodInfo ,
#endif
uIManagerAddUiFromFile ,
#if defined(ENABLE_OVERLOADING)
UIManagerAddUiFromResourceMethodInfo ,
#endif
uIManagerAddUiFromResource ,
#if defined(ENABLE_OVERLOADING)
UIManagerAddUiFromStringMethodInfo ,
#endif
uIManagerAddUiFromString ,
#if defined(ENABLE_OVERLOADING)
UIManagerEnsureUpdateMethodInfo ,
#endif
uIManagerEnsureUpdate ,
#if defined(ENABLE_OVERLOADING)
UIManagerGetAccelGroupMethodInfo ,
#endif
uIManagerGetAccelGroup ,
#if defined(ENABLE_OVERLOADING)
UIManagerGetActionMethodInfo ,
#endif
uIManagerGetAction ,
#if defined(ENABLE_OVERLOADING)
UIManagerGetActionGroupsMethodInfo ,
#endif
uIManagerGetActionGroups ,
#if defined(ENABLE_OVERLOADING)
UIManagerGetAddTearoffsMethodInfo ,
#endif
uIManagerGetAddTearoffs ,
#if defined(ENABLE_OVERLOADING)
UIManagerGetToplevelsMethodInfo ,
#endif
uIManagerGetToplevels ,
#if defined(ENABLE_OVERLOADING)
UIManagerGetUiMethodInfo ,
#endif
uIManagerGetUi ,
#if defined(ENABLE_OVERLOADING)
UIManagerGetWidgetMethodInfo ,
#endif
uIManagerGetWidget ,
#if defined(ENABLE_OVERLOADING)
UIManagerInsertActionGroupMethodInfo ,
#endif
uIManagerInsertActionGroup ,
uIManagerNew ,
#if defined(ENABLE_OVERLOADING)
UIManagerNewMergeIdMethodInfo ,
#endif
uIManagerNewMergeId ,
#if defined(ENABLE_OVERLOADING)
UIManagerRemoveActionGroupMethodInfo ,
#endif
uIManagerRemoveActionGroup ,
#if defined(ENABLE_OVERLOADING)
UIManagerRemoveUiMethodInfo ,
#endif
uIManagerRemoveUi ,
#if defined(ENABLE_OVERLOADING)
UIManagerSetAddTearoffsMethodInfo ,
#endif
uIManagerSetAddTearoffs ,
#if defined(ENABLE_OVERLOADING)
UIManagerAddTearoffsPropertyInfo ,
#endif
constructUIManagerAddTearoffs ,
getUIManagerAddTearoffs ,
setUIManagerAddTearoffs ,
#if defined(ENABLE_OVERLOADING)
uIManagerAddTearoffs ,
#endif
#if defined(ENABLE_OVERLOADING)
UIManagerUiPropertyInfo ,
#endif
getUIManagerUi ,
#if defined(ENABLE_OVERLOADING)
uIManagerUi ,
#endif
C_UIManagerActionsChangedCallback ,
UIManagerActionsChangedCallback ,
#if defined(ENABLE_OVERLOADING)
UIManagerActionsChangedSignalInfo ,
#endif
afterUIManagerActionsChanged ,
genClosure_UIManagerActionsChanged ,
mk_UIManagerActionsChangedCallback ,
noUIManagerActionsChangedCallback ,
onUIManagerActionsChanged ,
wrap_UIManagerActionsChangedCallback ,
C_UIManagerAddWidgetCallback ,
UIManagerAddWidgetCallback ,
#if defined(ENABLE_OVERLOADING)
UIManagerAddWidgetSignalInfo ,
#endif
afterUIManagerAddWidget ,
genClosure_UIManagerAddWidget ,
mk_UIManagerAddWidgetCallback ,
noUIManagerAddWidgetCallback ,
onUIManagerAddWidget ,
wrap_UIManagerAddWidgetCallback ,
C_UIManagerConnectProxyCallback ,
UIManagerConnectProxyCallback ,
#if defined(ENABLE_OVERLOADING)
UIManagerConnectProxySignalInfo ,
#endif
afterUIManagerConnectProxy ,
genClosure_UIManagerConnectProxy ,
mk_UIManagerConnectProxyCallback ,
noUIManagerConnectProxyCallback ,
onUIManagerConnectProxy ,
wrap_UIManagerConnectProxyCallback ,
C_UIManagerDisconnectProxyCallback ,
UIManagerDisconnectProxyCallback ,
#if defined(ENABLE_OVERLOADING)
UIManagerDisconnectProxySignalInfo ,
#endif
afterUIManagerDisconnectProxy ,
genClosure_UIManagerDisconnectProxy ,
mk_UIManagerDisconnectProxyCallback ,
noUIManagerDisconnectProxyCallback ,
onUIManagerDisconnectProxy ,
wrap_UIManagerDisconnectProxyCallback ,
C_UIManagerPostActivateCallback ,
UIManagerPostActivateCallback ,
#if defined(ENABLE_OVERLOADING)
UIManagerPostActivateSignalInfo ,
#endif
afterUIManagerPostActivate ,
genClosure_UIManagerPostActivate ,
mk_UIManagerPostActivateCallback ,
noUIManagerPostActivateCallback ,
onUIManagerPostActivate ,
wrap_UIManagerPostActivateCallback ,
C_UIManagerPreActivateCallback ,
UIManagerPreActivateCallback ,
#if defined(ENABLE_OVERLOADING)
UIManagerPreActivateSignalInfo ,
#endif
afterUIManagerPreActivate ,
genClosure_UIManagerPreActivate ,
mk_UIManagerPreActivateCallback ,
noUIManagerPreActivateCallback ,
onUIManagerPreActivate ,
wrap_UIManagerPreActivateCallback ,
) 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.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.Text as T
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 GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.Gtk.Flags as Gtk.Flags
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.Buildable as Gtk.Buildable
import {-# SOURCE #-} qualified GI.Gtk.Objects.AccelGroup as Gtk.AccelGroup
import {-# SOURCE #-} qualified GI.Gtk.Objects.Action as Gtk.Action
import {-# SOURCE #-} qualified GI.Gtk.Objects.ActionGroup as Gtk.ActionGroup
import {-# SOURCE #-} qualified GI.Gtk.Objects.Widget as Gtk.Widget
newtype UIManager = UIManager (SP.ManagedPtr UIManager)
deriving (UIManager -> UIManager -> Bool
(UIManager -> UIManager -> Bool)
-> (UIManager -> UIManager -> Bool) -> Eq UIManager
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UIManager -> UIManager -> Bool
$c/= :: UIManager -> UIManager -> Bool
== :: UIManager -> UIManager -> Bool
$c== :: UIManager -> UIManager -> Bool
Eq)
instance SP.ManagedPtrNewtype UIManager where
toManagedPtr :: UIManager -> ManagedPtr UIManager
toManagedPtr (UIManager ManagedPtr UIManager
p) = ManagedPtr UIManager
p
foreign import ccall "gtk_ui_manager_get_type"
c_gtk_ui_manager_get_type :: IO B.Types.GType
instance B.Types.TypedObject UIManager where
glibType :: IO GType
glibType = IO GType
c_gtk_ui_manager_get_type
instance B.Types.GObject UIManager
class (SP.GObject o, O.IsDescendantOf UIManager o) => IsUIManager o
instance (SP.GObject o, O.IsDescendantOf UIManager o) => IsUIManager o
instance O.HasParentTypes UIManager
type instance O.ParentTypes UIManager = '[GObject.Object.Object, Gtk.Buildable.Buildable]
toUIManager :: (MIO.MonadIO m, IsUIManager o) => o -> m UIManager
toUIManager :: forall (m :: * -> *) o.
(MonadIO m, IsUIManager o) =>
o -> m UIManager
toUIManager = IO UIManager -> m UIManager
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO UIManager -> m UIManager)
-> (o -> IO UIManager) -> o -> m UIManager
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr UIManager -> UIManager) -> o -> IO UIManager
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr UIManager -> UIManager
UIManager
instance B.GValue.IsGValue (Maybe UIManager) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_gtk_ui_manager_get_type
gvalueSet_ :: Ptr GValue -> Maybe UIManager -> IO ()
gvalueSet_ Ptr GValue
gv Maybe UIManager
P.Nothing = Ptr GValue -> Ptr UIManager -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr UIManager
forall a. Ptr a
FP.nullPtr :: FP.Ptr UIManager)
gvalueSet_ Ptr GValue
gv (P.Just UIManager
obj) = UIManager -> (Ptr UIManager -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr UIManager
obj (Ptr GValue -> Ptr UIManager -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe UIManager)
gvalueGet_ Ptr GValue
gv = do
Ptr UIManager
ptr <- Ptr GValue -> IO (Ptr UIManager)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr UIManager)
if Ptr UIManager
ptr Ptr UIManager -> Ptr UIManager -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr UIManager
forall a. Ptr a
FP.nullPtr
then UIManager -> Maybe UIManager
forall a. a -> Maybe a
P.Just (UIManager -> Maybe UIManager)
-> IO UIManager -> IO (Maybe UIManager)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr UIManager -> UIManager)
-> Ptr UIManager -> IO UIManager
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr UIManager -> UIManager
UIManager Ptr UIManager
ptr
else Maybe UIManager -> IO (Maybe UIManager)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe UIManager
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveUIManagerMethod (t :: Symbol) (o :: *) :: * where
ResolveUIManagerMethod "addChild" o = Gtk.Buildable.BuildableAddChildMethodInfo
ResolveUIManagerMethod "addUi" o = UIManagerAddUiMethodInfo
ResolveUIManagerMethod "addUiFromFile" o = UIManagerAddUiFromFileMethodInfo
ResolveUIManagerMethod "addUiFromResource" o = UIManagerAddUiFromResourceMethodInfo
ResolveUIManagerMethod "addUiFromString" o = UIManagerAddUiFromStringMethodInfo
ResolveUIManagerMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveUIManagerMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveUIManagerMethod "constructChild" o = Gtk.Buildable.BuildableConstructChildMethodInfo
ResolveUIManagerMethod "customFinished" o = Gtk.Buildable.BuildableCustomFinishedMethodInfo
ResolveUIManagerMethod "customTagEnd" o = Gtk.Buildable.BuildableCustomTagEndMethodInfo
ResolveUIManagerMethod "customTagStart" o = Gtk.Buildable.BuildableCustomTagStartMethodInfo
ResolveUIManagerMethod "ensureUpdate" o = UIManagerEnsureUpdateMethodInfo
ResolveUIManagerMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveUIManagerMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveUIManagerMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveUIManagerMethod "insertActionGroup" o = UIManagerInsertActionGroupMethodInfo
ResolveUIManagerMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveUIManagerMethod "newMergeId" o = UIManagerNewMergeIdMethodInfo
ResolveUIManagerMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveUIManagerMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveUIManagerMethod "parserFinished" o = Gtk.Buildable.BuildableParserFinishedMethodInfo
ResolveUIManagerMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveUIManagerMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveUIManagerMethod "removeActionGroup" o = UIManagerRemoveActionGroupMethodInfo
ResolveUIManagerMethod "removeUi" o = UIManagerRemoveUiMethodInfo
ResolveUIManagerMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveUIManagerMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveUIManagerMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveUIManagerMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveUIManagerMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveUIManagerMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveUIManagerMethod "getAccelGroup" o = UIManagerGetAccelGroupMethodInfo
ResolveUIManagerMethod "getAction" o = UIManagerGetActionMethodInfo
ResolveUIManagerMethod "getActionGroups" o = UIManagerGetActionGroupsMethodInfo
ResolveUIManagerMethod "getAddTearoffs" o = UIManagerGetAddTearoffsMethodInfo
ResolveUIManagerMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveUIManagerMethod "getInternalChild" o = Gtk.Buildable.BuildableGetInternalChildMethodInfo
ResolveUIManagerMethod "getName" o = Gtk.Buildable.BuildableGetNameMethodInfo
ResolveUIManagerMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveUIManagerMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveUIManagerMethod "getToplevels" o = UIManagerGetToplevelsMethodInfo
ResolveUIManagerMethod "getUi" o = UIManagerGetUiMethodInfo
ResolveUIManagerMethod "getWidget" o = UIManagerGetWidgetMethodInfo
ResolveUIManagerMethod "setAddTearoffs" o = UIManagerSetAddTearoffsMethodInfo
ResolveUIManagerMethod "setBuildableProperty" o = Gtk.Buildable.BuildableSetBuildablePropertyMethodInfo
ResolveUIManagerMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveUIManagerMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveUIManagerMethod "setName" o = Gtk.Buildable.BuildableSetNameMethodInfo
ResolveUIManagerMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveUIManagerMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveUIManagerMethod t UIManager, O.OverloadedMethod info UIManager p) => OL.IsLabel t (UIManager -> 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 ~ ResolveUIManagerMethod t UIManager, O.OverloadedMethod info UIManager p, R.HasField t UIManager p) => R.HasField t UIManager p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveUIManagerMethod t UIManager, O.OverloadedMethodInfo info UIManager) => OL.IsLabel t (O.MethodProxy info UIManager) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
{-# DEPRECATED UIManagerActionsChangedCallback ["(Since version 3.10)"] #-}
type UIManagerActionsChangedCallback =
IO ()
noUIManagerActionsChangedCallback :: Maybe UIManagerActionsChangedCallback
noUIManagerActionsChangedCallback :: Maybe (IO ())
noUIManagerActionsChangedCallback = Maybe (IO ())
forall a. Maybe a
Nothing
type C_UIManagerActionsChangedCallback =
Ptr () ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_UIManagerActionsChangedCallback :: C_UIManagerActionsChangedCallback -> IO (FunPtr C_UIManagerActionsChangedCallback)
genClosure_UIManagerActionsChanged :: MonadIO m => UIManagerActionsChangedCallback -> m (GClosure C_UIManagerActionsChangedCallback)
genClosure_UIManagerActionsChanged :: forall (m :: * -> *).
MonadIO m =>
IO () -> m (GClosure C_UIManagerActionsChangedCallback)
genClosure_UIManagerActionsChanged IO ()
cb = IO (GClosure C_UIManagerActionsChangedCallback)
-> m (GClosure C_UIManagerActionsChangedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_UIManagerActionsChangedCallback)
-> m (GClosure C_UIManagerActionsChangedCallback))
-> IO (GClosure C_UIManagerActionsChangedCallback)
-> m (GClosure C_UIManagerActionsChangedCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_UIManagerActionsChangedCallback
cb' = IO () -> C_UIManagerActionsChangedCallback
wrap_UIManagerActionsChangedCallback IO ()
cb
C_UIManagerActionsChangedCallback
-> IO (FunPtr C_UIManagerActionsChangedCallback)
mk_UIManagerActionsChangedCallback C_UIManagerActionsChangedCallback
cb' IO (FunPtr C_UIManagerActionsChangedCallback)
-> (FunPtr C_UIManagerActionsChangedCallback
-> IO (GClosure C_UIManagerActionsChangedCallback))
-> IO (GClosure C_UIManagerActionsChangedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_UIManagerActionsChangedCallback
-> IO (GClosure C_UIManagerActionsChangedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_UIManagerActionsChangedCallback ::
UIManagerActionsChangedCallback ->
C_UIManagerActionsChangedCallback
wrap_UIManagerActionsChangedCallback :: IO () -> C_UIManagerActionsChangedCallback
wrap_UIManagerActionsChangedCallback IO ()
_cb Ptr ()
_ Ptr ()
_ = do
IO ()
_cb
onUIManagerActionsChanged :: (IsUIManager a, MonadIO m) => a -> UIManagerActionsChangedCallback -> m SignalHandlerId
onUIManagerActionsChanged :: forall a (m :: * -> *).
(IsUIManager a, MonadIO m) =>
a -> IO () -> m SignalHandlerId
onUIManagerActionsChanged a
obj IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
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 cb' :: C_UIManagerActionsChangedCallback
cb' = IO () -> C_UIManagerActionsChangedCallback
wrap_UIManagerActionsChangedCallback IO ()
cb
FunPtr C_UIManagerActionsChangedCallback
cb'' <- C_UIManagerActionsChangedCallback
-> IO (FunPtr C_UIManagerActionsChangedCallback)
mk_UIManagerActionsChangedCallback C_UIManagerActionsChangedCallback
cb'
a
-> Text
-> FunPtr C_UIManagerActionsChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"actions-changed" FunPtr C_UIManagerActionsChangedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterUIManagerActionsChanged :: (IsUIManager a, MonadIO m) => a -> UIManagerActionsChangedCallback -> m SignalHandlerId
afterUIManagerActionsChanged :: forall a (m :: * -> *).
(IsUIManager a, MonadIO m) =>
a -> IO () -> m SignalHandlerId
afterUIManagerActionsChanged a
obj IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
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 cb' :: C_UIManagerActionsChangedCallback
cb' = IO () -> C_UIManagerActionsChangedCallback
wrap_UIManagerActionsChangedCallback IO ()
cb
FunPtr C_UIManagerActionsChangedCallback
cb'' <- C_UIManagerActionsChangedCallback
-> IO (FunPtr C_UIManagerActionsChangedCallback)
mk_UIManagerActionsChangedCallback C_UIManagerActionsChangedCallback
cb'
a
-> Text
-> FunPtr C_UIManagerActionsChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"actions-changed" FunPtr C_UIManagerActionsChangedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data UIManagerActionsChangedSignalInfo
instance SignalInfo UIManagerActionsChangedSignalInfo where
type HaskellCallbackType UIManagerActionsChangedSignalInfo = UIManagerActionsChangedCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_UIManagerActionsChangedCallback cb
cb'' <- mk_UIManagerActionsChangedCallback cb'
connectSignalFunPtr obj "actions-changed" cb'' connectMode detail
#endif
{-# DEPRECATED UIManagerAddWidgetCallback ["(Since version 3.10)"] #-}
type UIManagerAddWidgetCallback =
Gtk.Widget.Widget
-> IO ()
noUIManagerAddWidgetCallback :: Maybe UIManagerAddWidgetCallback
noUIManagerAddWidgetCallback :: Maybe UIManagerAddWidgetCallback
noUIManagerAddWidgetCallback = Maybe UIManagerAddWidgetCallback
forall a. Maybe a
Nothing
type C_UIManagerAddWidgetCallback =
Ptr () ->
Ptr Gtk.Widget.Widget ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_UIManagerAddWidgetCallback :: C_UIManagerAddWidgetCallback -> IO (FunPtr C_UIManagerAddWidgetCallback)
genClosure_UIManagerAddWidget :: MonadIO m => UIManagerAddWidgetCallback -> m (GClosure C_UIManagerAddWidgetCallback)
genClosure_UIManagerAddWidget :: forall (m :: * -> *).
MonadIO m =>
UIManagerAddWidgetCallback
-> m (GClosure C_UIManagerAddWidgetCallback)
genClosure_UIManagerAddWidget UIManagerAddWidgetCallback
cb = IO (GClosure C_UIManagerAddWidgetCallback)
-> m (GClosure C_UIManagerAddWidgetCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_UIManagerAddWidgetCallback)
-> m (GClosure C_UIManagerAddWidgetCallback))
-> IO (GClosure C_UIManagerAddWidgetCallback)
-> m (GClosure C_UIManagerAddWidgetCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_UIManagerAddWidgetCallback
cb' = UIManagerAddWidgetCallback -> C_UIManagerAddWidgetCallback
wrap_UIManagerAddWidgetCallback UIManagerAddWidgetCallback
cb
C_UIManagerAddWidgetCallback
-> IO (FunPtr C_UIManagerAddWidgetCallback)
mk_UIManagerAddWidgetCallback C_UIManagerAddWidgetCallback
cb' IO (FunPtr C_UIManagerAddWidgetCallback)
-> (FunPtr C_UIManagerAddWidgetCallback
-> IO (GClosure C_UIManagerAddWidgetCallback))
-> IO (GClosure C_UIManagerAddWidgetCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_UIManagerAddWidgetCallback
-> IO (GClosure C_UIManagerAddWidgetCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_UIManagerAddWidgetCallback ::
UIManagerAddWidgetCallback ->
C_UIManagerAddWidgetCallback
wrap_UIManagerAddWidgetCallback :: UIManagerAddWidgetCallback -> C_UIManagerAddWidgetCallback
wrap_UIManagerAddWidgetCallback UIManagerAddWidgetCallback
_cb Ptr ()
_ Ptr Widget
widget Ptr ()
_ = do
Widget
widget' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Gtk.Widget.Widget) Ptr Widget
widget
UIManagerAddWidgetCallback
_cb Widget
widget'
onUIManagerAddWidget :: (IsUIManager a, MonadIO m) => a -> UIManagerAddWidgetCallback -> m SignalHandlerId
onUIManagerAddWidget :: forall a (m :: * -> *).
(IsUIManager a, MonadIO m) =>
a -> UIManagerAddWidgetCallback -> m SignalHandlerId
onUIManagerAddWidget a
obj UIManagerAddWidgetCallback
cb = IO SignalHandlerId -> m SignalHandlerId
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 cb' :: C_UIManagerAddWidgetCallback
cb' = UIManagerAddWidgetCallback -> C_UIManagerAddWidgetCallback
wrap_UIManagerAddWidgetCallback UIManagerAddWidgetCallback
cb
FunPtr C_UIManagerAddWidgetCallback
cb'' <- C_UIManagerAddWidgetCallback
-> IO (FunPtr C_UIManagerAddWidgetCallback)
mk_UIManagerAddWidgetCallback C_UIManagerAddWidgetCallback
cb'
a
-> Text
-> FunPtr C_UIManagerAddWidgetCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"add-widget" FunPtr C_UIManagerAddWidgetCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterUIManagerAddWidget :: (IsUIManager a, MonadIO m) => a -> UIManagerAddWidgetCallback -> m SignalHandlerId
afterUIManagerAddWidget :: forall a (m :: * -> *).
(IsUIManager a, MonadIO m) =>
a -> UIManagerAddWidgetCallback -> m SignalHandlerId
afterUIManagerAddWidget a
obj UIManagerAddWidgetCallback
cb = IO SignalHandlerId -> m SignalHandlerId
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 cb' :: C_UIManagerAddWidgetCallback
cb' = UIManagerAddWidgetCallback -> C_UIManagerAddWidgetCallback
wrap_UIManagerAddWidgetCallback UIManagerAddWidgetCallback
cb
FunPtr C_UIManagerAddWidgetCallback
cb'' <- C_UIManagerAddWidgetCallback
-> IO (FunPtr C_UIManagerAddWidgetCallback)
mk_UIManagerAddWidgetCallback C_UIManagerAddWidgetCallback
cb'
a
-> Text
-> FunPtr C_UIManagerAddWidgetCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"add-widget" FunPtr C_UIManagerAddWidgetCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data UIManagerAddWidgetSignalInfo
instance SignalInfo UIManagerAddWidgetSignalInfo where
type HaskellCallbackType UIManagerAddWidgetSignalInfo = UIManagerAddWidgetCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_UIManagerAddWidgetCallback cb
cb'' <- mk_UIManagerAddWidgetCallback cb'
connectSignalFunPtr obj "add-widget" cb'' connectMode detail
#endif
{-# DEPRECATED UIManagerConnectProxyCallback ["(Since version 3.10)"] #-}
type UIManagerConnectProxyCallback =
Gtk.Action.Action
-> Gtk.Widget.Widget
-> IO ()
noUIManagerConnectProxyCallback :: Maybe UIManagerConnectProxyCallback
noUIManagerConnectProxyCallback :: Maybe UIManagerConnectProxyCallback
noUIManagerConnectProxyCallback = Maybe UIManagerConnectProxyCallback
forall a. Maybe a
Nothing
type C_UIManagerConnectProxyCallback =
Ptr () ->
Ptr Gtk.Action.Action ->
Ptr Gtk.Widget.Widget ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_UIManagerConnectProxyCallback :: C_UIManagerConnectProxyCallback -> IO (FunPtr C_UIManagerConnectProxyCallback)
genClosure_UIManagerConnectProxy :: MonadIO m => UIManagerConnectProxyCallback -> m (GClosure C_UIManagerConnectProxyCallback)
genClosure_UIManagerConnectProxy :: forall (m :: * -> *).
MonadIO m =>
UIManagerConnectProxyCallback
-> m (GClosure C_UIManagerConnectProxyCallback)
genClosure_UIManagerConnectProxy UIManagerConnectProxyCallback
cb = IO (GClosure C_UIManagerConnectProxyCallback)
-> m (GClosure C_UIManagerConnectProxyCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_UIManagerConnectProxyCallback)
-> m (GClosure C_UIManagerConnectProxyCallback))
-> IO (GClosure C_UIManagerConnectProxyCallback)
-> m (GClosure C_UIManagerConnectProxyCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_UIManagerConnectProxyCallback
cb' = UIManagerConnectProxyCallback -> C_UIManagerConnectProxyCallback
wrap_UIManagerConnectProxyCallback UIManagerConnectProxyCallback
cb
C_UIManagerConnectProxyCallback
-> IO (FunPtr C_UIManagerConnectProxyCallback)
mk_UIManagerConnectProxyCallback C_UIManagerConnectProxyCallback
cb' IO (FunPtr C_UIManagerConnectProxyCallback)
-> (FunPtr C_UIManagerConnectProxyCallback
-> IO (GClosure C_UIManagerConnectProxyCallback))
-> IO (GClosure C_UIManagerConnectProxyCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_UIManagerConnectProxyCallback
-> IO (GClosure C_UIManagerConnectProxyCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_UIManagerConnectProxyCallback ::
UIManagerConnectProxyCallback ->
C_UIManagerConnectProxyCallback
wrap_UIManagerConnectProxyCallback :: UIManagerConnectProxyCallback -> C_UIManagerConnectProxyCallback
wrap_UIManagerConnectProxyCallback UIManagerConnectProxyCallback
_cb Ptr ()
_ Ptr Action
action Ptr Widget
proxy Ptr ()
_ = do
Action
action' <- ((ManagedPtr Action -> Action) -> Ptr Action -> IO Action
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Action -> Action
Gtk.Action.Action) Ptr Action
action
Widget
proxy' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Gtk.Widget.Widget) Ptr Widget
proxy
UIManagerConnectProxyCallback
_cb Action
action' Widget
proxy'
onUIManagerConnectProxy :: (IsUIManager a, MonadIO m) => a -> UIManagerConnectProxyCallback -> m SignalHandlerId
onUIManagerConnectProxy :: forall a (m :: * -> *).
(IsUIManager a, MonadIO m) =>
a -> UIManagerConnectProxyCallback -> m SignalHandlerId
onUIManagerConnectProxy a
obj UIManagerConnectProxyCallback
cb = IO SignalHandlerId -> m SignalHandlerId
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 cb' :: C_UIManagerConnectProxyCallback
cb' = UIManagerConnectProxyCallback -> C_UIManagerConnectProxyCallback
wrap_UIManagerConnectProxyCallback UIManagerConnectProxyCallback
cb
FunPtr C_UIManagerConnectProxyCallback
cb'' <- C_UIManagerConnectProxyCallback
-> IO (FunPtr C_UIManagerConnectProxyCallback)
mk_UIManagerConnectProxyCallback C_UIManagerConnectProxyCallback
cb'
a
-> Text
-> FunPtr C_UIManagerConnectProxyCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"connect-proxy" FunPtr C_UIManagerConnectProxyCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterUIManagerConnectProxy :: (IsUIManager a, MonadIO m) => a -> UIManagerConnectProxyCallback -> m SignalHandlerId
afterUIManagerConnectProxy :: forall a (m :: * -> *).
(IsUIManager a, MonadIO m) =>
a -> UIManagerConnectProxyCallback -> m SignalHandlerId
afterUIManagerConnectProxy a
obj UIManagerConnectProxyCallback
cb = IO SignalHandlerId -> m SignalHandlerId
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 cb' :: C_UIManagerConnectProxyCallback
cb' = UIManagerConnectProxyCallback -> C_UIManagerConnectProxyCallback
wrap_UIManagerConnectProxyCallback UIManagerConnectProxyCallback
cb
FunPtr C_UIManagerConnectProxyCallback
cb'' <- C_UIManagerConnectProxyCallback
-> IO (FunPtr C_UIManagerConnectProxyCallback)
mk_UIManagerConnectProxyCallback C_UIManagerConnectProxyCallback
cb'
a
-> Text
-> FunPtr C_UIManagerConnectProxyCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"connect-proxy" FunPtr C_UIManagerConnectProxyCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data UIManagerConnectProxySignalInfo
instance SignalInfo UIManagerConnectProxySignalInfo where
type HaskellCallbackType UIManagerConnectProxySignalInfo = UIManagerConnectProxyCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_UIManagerConnectProxyCallback cb
cb'' <- mk_UIManagerConnectProxyCallback cb'
connectSignalFunPtr obj "connect-proxy" cb'' connectMode detail
#endif
{-# DEPRECATED UIManagerDisconnectProxyCallback ["(Since version 3.10)"] #-}
type UIManagerDisconnectProxyCallback =
Gtk.Action.Action
-> Gtk.Widget.Widget
-> IO ()
noUIManagerDisconnectProxyCallback :: Maybe UIManagerDisconnectProxyCallback
noUIManagerDisconnectProxyCallback :: Maybe UIManagerConnectProxyCallback
noUIManagerDisconnectProxyCallback = Maybe UIManagerConnectProxyCallback
forall a. Maybe a
Nothing
type C_UIManagerDisconnectProxyCallback =
Ptr () ->
Ptr Gtk.Action.Action ->
Ptr Gtk.Widget.Widget ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_UIManagerDisconnectProxyCallback :: C_UIManagerDisconnectProxyCallback -> IO (FunPtr C_UIManagerDisconnectProxyCallback)
genClosure_UIManagerDisconnectProxy :: MonadIO m => UIManagerDisconnectProxyCallback -> m (GClosure C_UIManagerDisconnectProxyCallback)
genClosure_UIManagerDisconnectProxy :: forall (m :: * -> *).
MonadIO m =>
UIManagerConnectProxyCallback
-> m (GClosure C_UIManagerConnectProxyCallback)
genClosure_UIManagerDisconnectProxy UIManagerConnectProxyCallback
cb = IO (GClosure C_UIManagerConnectProxyCallback)
-> m (GClosure C_UIManagerConnectProxyCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_UIManagerConnectProxyCallback)
-> m (GClosure C_UIManagerConnectProxyCallback))
-> IO (GClosure C_UIManagerConnectProxyCallback)
-> m (GClosure C_UIManagerConnectProxyCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_UIManagerConnectProxyCallback
cb' = UIManagerConnectProxyCallback -> C_UIManagerConnectProxyCallback
wrap_UIManagerDisconnectProxyCallback UIManagerConnectProxyCallback
cb
C_UIManagerConnectProxyCallback
-> IO (FunPtr C_UIManagerConnectProxyCallback)
mk_UIManagerDisconnectProxyCallback C_UIManagerConnectProxyCallback
cb' IO (FunPtr C_UIManagerConnectProxyCallback)
-> (FunPtr C_UIManagerConnectProxyCallback
-> IO (GClosure C_UIManagerConnectProxyCallback))
-> IO (GClosure C_UIManagerConnectProxyCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_UIManagerConnectProxyCallback
-> IO (GClosure C_UIManagerConnectProxyCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_UIManagerDisconnectProxyCallback ::
UIManagerDisconnectProxyCallback ->
C_UIManagerDisconnectProxyCallback
wrap_UIManagerDisconnectProxyCallback :: UIManagerConnectProxyCallback -> C_UIManagerConnectProxyCallback
wrap_UIManagerDisconnectProxyCallback UIManagerConnectProxyCallback
_cb Ptr ()
_ Ptr Action
action Ptr Widget
proxy Ptr ()
_ = do
Action
action' <- ((ManagedPtr Action -> Action) -> Ptr Action -> IO Action
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Action -> Action
Gtk.Action.Action) Ptr Action
action
Widget
proxy' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Gtk.Widget.Widget) Ptr Widget
proxy
UIManagerConnectProxyCallback
_cb Action
action' Widget
proxy'
onUIManagerDisconnectProxy :: (IsUIManager a, MonadIO m) => a -> UIManagerDisconnectProxyCallback -> m SignalHandlerId
onUIManagerDisconnectProxy :: forall a (m :: * -> *).
(IsUIManager a, MonadIO m) =>
a -> UIManagerConnectProxyCallback -> m SignalHandlerId
onUIManagerDisconnectProxy a
obj UIManagerConnectProxyCallback
cb = IO SignalHandlerId -> m SignalHandlerId
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 cb' :: C_UIManagerConnectProxyCallback
cb' = UIManagerConnectProxyCallback -> C_UIManagerConnectProxyCallback
wrap_UIManagerDisconnectProxyCallback UIManagerConnectProxyCallback
cb
FunPtr C_UIManagerConnectProxyCallback
cb'' <- C_UIManagerConnectProxyCallback
-> IO (FunPtr C_UIManagerConnectProxyCallback)
mk_UIManagerDisconnectProxyCallback C_UIManagerConnectProxyCallback
cb'
a
-> Text
-> FunPtr C_UIManagerConnectProxyCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"disconnect-proxy" FunPtr C_UIManagerConnectProxyCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterUIManagerDisconnectProxy :: (IsUIManager a, MonadIO m) => a -> UIManagerDisconnectProxyCallback -> m SignalHandlerId
afterUIManagerDisconnectProxy :: forall a (m :: * -> *).
(IsUIManager a, MonadIO m) =>
a -> UIManagerConnectProxyCallback -> m SignalHandlerId
afterUIManagerDisconnectProxy a
obj UIManagerConnectProxyCallback
cb = IO SignalHandlerId -> m SignalHandlerId
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 cb' :: C_UIManagerConnectProxyCallback
cb' = UIManagerConnectProxyCallback -> C_UIManagerConnectProxyCallback
wrap_UIManagerDisconnectProxyCallback UIManagerConnectProxyCallback
cb
FunPtr C_UIManagerConnectProxyCallback
cb'' <- C_UIManagerConnectProxyCallback
-> IO (FunPtr C_UIManagerConnectProxyCallback)
mk_UIManagerDisconnectProxyCallback C_UIManagerConnectProxyCallback
cb'
a
-> Text
-> FunPtr C_UIManagerConnectProxyCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"disconnect-proxy" FunPtr C_UIManagerConnectProxyCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data UIManagerDisconnectProxySignalInfo
instance SignalInfo UIManagerDisconnectProxySignalInfo where
type HaskellCallbackType UIManagerDisconnectProxySignalInfo = UIManagerDisconnectProxyCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_UIManagerDisconnectProxyCallback cb
cb'' <- mk_UIManagerDisconnectProxyCallback cb'
connectSignalFunPtr obj "disconnect-proxy" cb'' connectMode detail
#endif
{-# DEPRECATED UIManagerPostActivateCallback ["(Since version 3.10)"] #-}
type UIManagerPostActivateCallback =
Gtk.Action.Action
-> IO ()
noUIManagerPostActivateCallback :: Maybe UIManagerPostActivateCallback
noUIManagerPostActivateCallback :: Maybe UIManagerPostActivateCallback
noUIManagerPostActivateCallback = Maybe UIManagerPostActivateCallback
forall a. Maybe a
Nothing
type C_UIManagerPostActivateCallback =
Ptr () ->
Ptr Gtk.Action.Action ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_UIManagerPostActivateCallback :: C_UIManagerPostActivateCallback -> IO (FunPtr C_UIManagerPostActivateCallback)
genClosure_UIManagerPostActivate :: MonadIO m => UIManagerPostActivateCallback -> m (GClosure C_UIManagerPostActivateCallback)
genClosure_UIManagerPostActivate :: forall (m :: * -> *).
MonadIO m =>
UIManagerPostActivateCallback
-> m (GClosure C_UIManagerPostActivateCallback)
genClosure_UIManagerPostActivate UIManagerPostActivateCallback
cb = IO (GClosure C_UIManagerPostActivateCallback)
-> m (GClosure C_UIManagerPostActivateCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_UIManagerPostActivateCallback)
-> m (GClosure C_UIManagerPostActivateCallback))
-> IO (GClosure C_UIManagerPostActivateCallback)
-> m (GClosure C_UIManagerPostActivateCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_UIManagerPostActivateCallback
cb' = UIManagerPostActivateCallback -> C_UIManagerPostActivateCallback
wrap_UIManagerPostActivateCallback UIManagerPostActivateCallback
cb
C_UIManagerPostActivateCallback
-> IO (FunPtr C_UIManagerPostActivateCallback)
mk_UIManagerPostActivateCallback C_UIManagerPostActivateCallback
cb' IO (FunPtr C_UIManagerPostActivateCallback)
-> (FunPtr C_UIManagerPostActivateCallback
-> IO (GClosure C_UIManagerPostActivateCallback))
-> IO (GClosure C_UIManagerPostActivateCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_UIManagerPostActivateCallback
-> IO (GClosure C_UIManagerPostActivateCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_UIManagerPostActivateCallback ::
UIManagerPostActivateCallback ->
C_UIManagerPostActivateCallback
wrap_UIManagerPostActivateCallback :: UIManagerPostActivateCallback -> C_UIManagerPostActivateCallback
wrap_UIManagerPostActivateCallback UIManagerPostActivateCallback
_cb Ptr ()
_ Ptr Action
action Ptr ()
_ = do
Action
action' <- ((ManagedPtr Action -> Action) -> Ptr Action -> IO Action
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Action -> Action
Gtk.Action.Action) Ptr Action
action
UIManagerPostActivateCallback
_cb Action
action'
onUIManagerPostActivate :: (IsUIManager a, MonadIO m) => a -> UIManagerPostActivateCallback -> m SignalHandlerId
onUIManagerPostActivate :: forall a (m :: * -> *).
(IsUIManager a, MonadIO m) =>
a -> UIManagerPostActivateCallback -> m SignalHandlerId
onUIManagerPostActivate a
obj UIManagerPostActivateCallback
cb = IO SignalHandlerId -> m SignalHandlerId
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 cb' :: C_UIManagerPostActivateCallback
cb' = UIManagerPostActivateCallback -> C_UIManagerPostActivateCallback
wrap_UIManagerPostActivateCallback UIManagerPostActivateCallback
cb
FunPtr C_UIManagerPostActivateCallback
cb'' <- C_UIManagerPostActivateCallback
-> IO (FunPtr C_UIManagerPostActivateCallback)
mk_UIManagerPostActivateCallback C_UIManagerPostActivateCallback
cb'
a
-> Text
-> FunPtr C_UIManagerPostActivateCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"post-activate" FunPtr C_UIManagerPostActivateCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterUIManagerPostActivate :: (IsUIManager a, MonadIO m) => a -> UIManagerPostActivateCallback -> m SignalHandlerId
afterUIManagerPostActivate :: forall a (m :: * -> *).
(IsUIManager a, MonadIO m) =>
a -> UIManagerPostActivateCallback -> m SignalHandlerId
afterUIManagerPostActivate a
obj UIManagerPostActivateCallback
cb = IO SignalHandlerId -> m SignalHandlerId
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 cb' :: C_UIManagerPostActivateCallback
cb' = UIManagerPostActivateCallback -> C_UIManagerPostActivateCallback
wrap_UIManagerPostActivateCallback UIManagerPostActivateCallback
cb
FunPtr C_UIManagerPostActivateCallback
cb'' <- C_UIManagerPostActivateCallback
-> IO (FunPtr C_UIManagerPostActivateCallback)
mk_UIManagerPostActivateCallback C_UIManagerPostActivateCallback
cb'
a
-> Text
-> FunPtr C_UIManagerPostActivateCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"post-activate" FunPtr C_UIManagerPostActivateCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data UIManagerPostActivateSignalInfo
instance SignalInfo UIManagerPostActivateSignalInfo where
type HaskellCallbackType UIManagerPostActivateSignalInfo = UIManagerPostActivateCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_UIManagerPostActivateCallback cb
cb'' <- mk_UIManagerPostActivateCallback cb'
connectSignalFunPtr obj "post-activate" cb'' connectMode detail
#endif
{-# DEPRECATED UIManagerPreActivateCallback ["(Since version 3.10)"] #-}
type UIManagerPreActivateCallback =
Gtk.Action.Action
-> IO ()
noUIManagerPreActivateCallback :: Maybe UIManagerPreActivateCallback
noUIManagerPreActivateCallback :: Maybe UIManagerPostActivateCallback
noUIManagerPreActivateCallback = Maybe UIManagerPostActivateCallback
forall a. Maybe a
Nothing
type C_UIManagerPreActivateCallback =
Ptr () ->
Ptr Gtk.Action.Action ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_UIManagerPreActivateCallback :: C_UIManagerPreActivateCallback -> IO (FunPtr C_UIManagerPreActivateCallback)
genClosure_UIManagerPreActivate :: MonadIO m => UIManagerPreActivateCallback -> m (GClosure C_UIManagerPreActivateCallback)
genClosure_UIManagerPreActivate :: forall (m :: * -> *).
MonadIO m =>
UIManagerPostActivateCallback
-> m (GClosure C_UIManagerPostActivateCallback)
genClosure_UIManagerPreActivate UIManagerPostActivateCallback
cb = IO (GClosure C_UIManagerPostActivateCallback)
-> m (GClosure C_UIManagerPostActivateCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_UIManagerPostActivateCallback)
-> m (GClosure C_UIManagerPostActivateCallback))
-> IO (GClosure C_UIManagerPostActivateCallback)
-> m (GClosure C_UIManagerPostActivateCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_UIManagerPostActivateCallback
cb' = UIManagerPostActivateCallback -> C_UIManagerPostActivateCallback
wrap_UIManagerPreActivateCallback UIManagerPostActivateCallback
cb
C_UIManagerPostActivateCallback
-> IO (FunPtr C_UIManagerPostActivateCallback)
mk_UIManagerPreActivateCallback C_UIManagerPostActivateCallback
cb' IO (FunPtr C_UIManagerPostActivateCallback)
-> (FunPtr C_UIManagerPostActivateCallback
-> IO (GClosure C_UIManagerPostActivateCallback))
-> IO (GClosure C_UIManagerPostActivateCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_UIManagerPostActivateCallback
-> IO (GClosure C_UIManagerPostActivateCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_UIManagerPreActivateCallback ::
UIManagerPreActivateCallback ->
C_UIManagerPreActivateCallback
wrap_UIManagerPreActivateCallback :: UIManagerPostActivateCallback -> C_UIManagerPostActivateCallback
wrap_UIManagerPreActivateCallback UIManagerPostActivateCallback
_cb Ptr ()
_ Ptr Action
action Ptr ()
_ = do
Action
action' <- ((ManagedPtr Action -> Action) -> Ptr Action -> IO Action
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Action -> Action
Gtk.Action.Action) Ptr Action
action
UIManagerPostActivateCallback
_cb Action
action'
onUIManagerPreActivate :: (IsUIManager a, MonadIO m) => a -> UIManagerPreActivateCallback -> m SignalHandlerId
onUIManagerPreActivate :: forall a (m :: * -> *).
(IsUIManager a, MonadIO m) =>
a -> UIManagerPostActivateCallback -> m SignalHandlerId
onUIManagerPreActivate a
obj UIManagerPostActivateCallback
cb = IO SignalHandlerId -> m SignalHandlerId
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 cb' :: C_UIManagerPostActivateCallback
cb' = UIManagerPostActivateCallback -> C_UIManagerPostActivateCallback
wrap_UIManagerPreActivateCallback UIManagerPostActivateCallback
cb
FunPtr C_UIManagerPostActivateCallback
cb'' <- C_UIManagerPostActivateCallback
-> IO (FunPtr C_UIManagerPostActivateCallback)
mk_UIManagerPreActivateCallback C_UIManagerPostActivateCallback
cb'
a
-> Text
-> FunPtr C_UIManagerPostActivateCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"pre-activate" FunPtr C_UIManagerPostActivateCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterUIManagerPreActivate :: (IsUIManager a, MonadIO m) => a -> UIManagerPreActivateCallback -> m SignalHandlerId
afterUIManagerPreActivate :: forall a (m :: * -> *).
(IsUIManager a, MonadIO m) =>
a -> UIManagerPostActivateCallback -> m SignalHandlerId
afterUIManagerPreActivate a
obj UIManagerPostActivateCallback
cb = IO SignalHandlerId -> m SignalHandlerId
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 cb' :: C_UIManagerPostActivateCallback
cb' = UIManagerPostActivateCallback -> C_UIManagerPostActivateCallback
wrap_UIManagerPreActivateCallback UIManagerPostActivateCallback
cb
FunPtr C_UIManagerPostActivateCallback
cb'' <- C_UIManagerPostActivateCallback
-> IO (FunPtr C_UIManagerPostActivateCallback)
mk_UIManagerPreActivateCallback C_UIManagerPostActivateCallback
cb'
a
-> Text
-> FunPtr C_UIManagerPostActivateCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"pre-activate" FunPtr C_UIManagerPostActivateCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data UIManagerPreActivateSignalInfo
instance SignalInfo UIManagerPreActivateSignalInfo where
type HaskellCallbackType UIManagerPreActivateSignalInfo = UIManagerPreActivateCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_UIManagerPreActivateCallback cb
cb'' <- mk_UIManagerPreActivateCallback cb'
connectSignalFunPtr obj "pre-activate" cb'' connectMode detail
#endif
getUIManagerAddTearoffs :: (MonadIO m, IsUIManager o) => o -> m Bool
getUIManagerAddTearoffs :: forall (m :: * -> *) o. (MonadIO m, IsUIManager o) => o -> m Bool
getUIManagerAddTearoffs o
obj = IO Bool -> m Bool
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
"add-tearoffs"
setUIManagerAddTearoffs :: (MonadIO m, IsUIManager o) => o -> Bool -> m ()
setUIManagerAddTearoffs :: forall (m :: * -> *) o.
(MonadIO m, IsUIManager o) =>
o -> Bool -> m ()
setUIManagerAddTearoffs o
obj Bool
val = IO () -> m ()
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
"add-tearoffs" Bool
val
constructUIManagerAddTearoffs :: (IsUIManager o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructUIManagerAddTearoffs :: forall o (m :: * -> *).
(IsUIManager o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructUIManagerAddTearoffs Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
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 (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
"add-tearoffs" Bool
val
#if defined(ENABLE_OVERLOADING)
data UIManagerAddTearoffsPropertyInfo
instance AttrInfo UIManagerAddTearoffsPropertyInfo where
type AttrAllowedOps UIManagerAddTearoffsPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint UIManagerAddTearoffsPropertyInfo = IsUIManager
type AttrSetTypeConstraint UIManagerAddTearoffsPropertyInfo = (~) Bool
type AttrTransferTypeConstraint UIManagerAddTearoffsPropertyInfo = (~) Bool
type AttrTransferType UIManagerAddTearoffsPropertyInfo = Bool
type AttrGetType UIManagerAddTearoffsPropertyInfo = Bool
type AttrLabel UIManagerAddTearoffsPropertyInfo = "add-tearoffs"
type AttrOrigin UIManagerAddTearoffsPropertyInfo = UIManager
attrGet = getUIManagerAddTearoffs
attrSet = setUIManagerAddTearoffs
attrTransfer _ v = do
return v
attrConstruct = constructUIManagerAddTearoffs
attrClear = undefined
#endif
getUIManagerUi :: (MonadIO m, IsUIManager o) => o -> m (Maybe T.Text)
getUIManagerUi :: forall (m :: * -> *) o.
(MonadIO m, IsUIManager o) =>
o -> m (Maybe Text)
getUIManagerUi o
obj = IO (Maybe Text) -> m (Maybe Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"ui"
#if defined(ENABLE_OVERLOADING)
data UIManagerUiPropertyInfo
instance AttrInfo UIManagerUiPropertyInfo where
type AttrAllowedOps UIManagerUiPropertyInfo = '[ 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint UIManagerUiPropertyInfo = IsUIManager
type AttrSetTypeConstraint UIManagerUiPropertyInfo = (~) ()
type AttrTransferTypeConstraint UIManagerUiPropertyInfo = (~) ()
type AttrTransferType UIManagerUiPropertyInfo = ()
type AttrGetType UIManagerUiPropertyInfo = (Maybe T.Text)
type AttrLabel UIManagerUiPropertyInfo = "ui"
type AttrOrigin UIManagerUiPropertyInfo = UIManager
attrGet = getUIManagerUi
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList UIManager
type instance O.AttributeList UIManager = UIManagerAttributeList
type UIManagerAttributeList = ('[ '("addTearoffs", UIManagerAddTearoffsPropertyInfo), '("ui", UIManagerUiPropertyInfo)] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
uIManagerAddTearoffs :: AttrLabelProxy "addTearoffs"
uIManagerAddTearoffs = AttrLabelProxy
uIManagerUi :: AttrLabelProxy "ui"
uIManagerUi = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList UIManager = UIManagerSignalList
type UIManagerSignalList = ('[ '("actionsChanged", UIManagerActionsChangedSignalInfo), '("addWidget", UIManagerAddWidgetSignalInfo), '("connectProxy", UIManagerConnectProxySignalInfo), '("disconnectProxy", UIManagerDisconnectProxySignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("postActivate", UIManagerPostActivateSignalInfo), '("preActivate", UIManagerPreActivateSignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "gtk_ui_manager_new" gtk_ui_manager_new ::
IO (Ptr UIManager)
{-# DEPRECATED uIManagerNew ["(Since version 3.10)"] #-}
uIManagerNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
m UIManager
uIManagerNew :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m UIManager
uIManagerNew = IO UIManager -> m UIManager
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO UIManager -> m UIManager) -> IO UIManager -> m UIManager
forall a b. (a -> b) -> a -> b
$ do
Ptr UIManager
result <- IO (Ptr UIManager)
gtk_ui_manager_new
Text -> Ptr UIManager -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"uIManagerNew" Ptr UIManager
result
UIManager
result' <- ((ManagedPtr UIManager -> UIManager)
-> Ptr UIManager -> IO UIManager
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr UIManager -> UIManager
UIManager) Ptr UIManager
result
UIManager -> IO UIManager
forall (m :: * -> *) a. Monad m => a -> m a
return UIManager
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gtk_ui_manager_add_ui" gtk_ui_manager_add_ui ::
Ptr UIManager ->
Word32 ->
CString ->
CString ->
CString ->
CUInt ->
CInt ->
IO ()
{-# DEPRECATED uIManagerAddUi ["(Since version 3.10)"] #-}
uIManagerAddUi ::
(B.CallStack.HasCallStack, MonadIO m, IsUIManager a) =>
a
-> Word32
-> T.Text
-> T.Text
-> Maybe (T.Text)
-> [Gtk.Flags.UIManagerItemType]
-> Bool
-> m ()
uIManagerAddUi :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsUIManager a) =>
a
-> Word32
-> Text
-> Text
-> Maybe Text
-> [UIManagerItemType]
-> Bool
-> m ()
uIManagerAddUi a
manager Word32
mergeId Text
path Text
name Maybe Text
action [UIManagerItemType]
type_ Bool
top = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr UIManager
manager' <- a -> IO (Ptr UIManager)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
manager
CString
path' <- Text -> IO CString
textToCString Text
path
CString
name' <- Text -> IO CString
textToCString Text
name
CString
maybeAction <- case Maybe Text
action of
Maybe Text
Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
Just Text
jAction -> do
CString
jAction' <- Text -> IO CString
textToCString Text
jAction
CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jAction'
let type_' :: CUInt
type_' = [UIManagerItemType] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [UIManagerItemType]
type_
let top' :: CInt
top' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
top
Ptr UIManager
-> Word32
-> CString
-> CString
-> CString
-> CUInt
-> CInt
-> IO ()
gtk_ui_manager_add_ui Ptr UIManager
manager' Word32
mergeId CString
path' CString
name' CString
maybeAction CUInt
type_' CInt
top'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
manager
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
path'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeAction
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data UIManagerAddUiMethodInfo
instance (signature ~ (Word32 -> T.Text -> T.Text -> Maybe (T.Text) -> [Gtk.Flags.UIManagerItemType] -> Bool -> m ()), MonadIO m, IsUIManager a) => O.OverloadedMethod UIManagerAddUiMethodInfo a signature where
overloadedMethod = uIManagerAddUi
instance O.OverloadedMethodInfo UIManagerAddUiMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.UIManager.uIManagerAddUi",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-UIManager.html#v:uIManagerAddUi"
}
#endif
foreign import ccall "gtk_ui_manager_add_ui_from_file" gtk_ui_manager_add_ui_from_file ::
Ptr UIManager ->
CString ->
Ptr (Ptr GError) ->
IO Word32
{-# DEPRECATED uIManagerAddUiFromFile ["(Since version 3.10)"] #-}
uIManagerAddUiFromFile ::
(B.CallStack.HasCallStack, MonadIO m, IsUIManager a) =>
a
-> [Char]
-> m Word32
uIManagerAddUiFromFile :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsUIManager a) =>
a -> String -> m Word32
uIManagerAddUiFromFile a
manager String
filename = IO Word32 -> m Word32
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 UIManager
manager' <- a -> IO (Ptr UIManager)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
manager
CString
filename' <- String -> IO CString
stringToCString String
filename
IO Word32 -> IO () -> IO Word32
forall a b. IO a -> IO b -> IO a
onException (do
Word32
result <- (Ptr (Ptr GError) -> IO Word32) -> IO Word32
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO Word32) -> IO Word32)
-> (Ptr (Ptr GError) -> IO Word32) -> IO Word32
forall a b. (a -> b) -> a -> b
$ Ptr UIManager -> CString -> Ptr (Ptr GError) -> IO Word32
gtk_ui_manager_add_ui_from_file Ptr UIManager
manager' CString
filename'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
manager
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
filename'
Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
filename'
)
#if defined(ENABLE_OVERLOADING)
data UIManagerAddUiFromFileMethodInfo
instance (signature ~ ([Char] -> m Word32), MonadIO m, IsUIManager a) => O.OverloadedMethod UIManagerAddUiFromFileMethodInfo a signature where
overloadedMethod = uIManagerAddUiFromFile
instance O.OverloadedMethodInfo UIManagerAddUiFromFileMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.UIManager.uIManagerAddUiFromFile",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-UIManager.html#v:uIManagerAddUiFromFile"
}
#endif
foreign import ccall "gtk_ui_manager_add_ui_from_resource" gtk_ui_manager_add_ui_from_resource ::
Ptr UIManager ->
CString ->
Ptr (Ptr GError) ->
IO Word32
{-# DEPRECATED uIManagerAddUiFromResource ["(Since version 3.10)"] #-}
uIManagerAddUiFromResource ::
(B.CallStack.HasCallStack, MonadIO m, IsUIManager a) =>
a
-> T.Text
-> m Word32
uIManagerAddUiFromResource :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsUIManager a) =>
a -> Text -> m Word32
uIManagerAddUiFromResource a
manager Text
resourcePath = IO Word32 -> m Word32
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 UIManager
manager' <- a -> IO (Ptr UIManager)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
manager
CString
resourcePath' <- Text -> IO CString
textToCString Text
resourcePath
IO Word32 -> IO () -> IO Word32
forall a b. IO a -> IO b -> IO a
onException (do
Word32
result <- (Ptr (Ptr GError) -> IO Word32) -> IO Word32
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO Word32) -> IO Word32)
-> (Ptr (Ptr GError) -> IO Word32) -> IO Word32
forall a b. (a -> b) -> a -> b
$ Ptr UIManager -> CString -> Ptr (Ptr GError) -> IO Word32
gtk_ui_manager_add_ui_from_resource Ptr UIManager
manager' CString
resourcePath'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
manager
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
resourcePath'
Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
resourcePath'
)
#if defined(ENABLE_OVERLOADING)
data UIManagerAddUiFromResourceMethodInfo
instance (signature ~ (T.Text -> m Word32), MonadIO m, IsUIManager a) => O.OverloadedMethod UIManagerAddUiFromResourceMethodInfo a signature where
overloadedMethod = uIManagerAddUiFromResource
instance O.OverloadedMethodInfo UIManagerAddUiFromResourceMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.UIManager.uIManagerAddUiFromResource",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-UIManager.html#v:uIManagerAddUiFromResource"
}
#endif
foreign import ccall "gtk_ui_manager_add_ui_from_string" gtk_ui_manager_add_ui_from_string ::
Ptr UIManager ->
CString ->
Int64 ->
Ptr (Ptr GError) ->
IO Word32
{-# DEPRECATED uIManagerAddUiFromString ["(Since version 3.10)"] #-}
uIManagerAddUiFromString ::
(B.CallStack.HasCallStack, MonadIO m, IsUIManager a) =>
a
-> T.Text
-> Int64
-> m Word32
uIManagerAddUiFromString :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsUIManager a) =>
a -> Text -> Int64 -> m Word32
uIManagerAddUiFromString a
manager Text
buffer Int64
length_ = IO Word32 -> m Word32
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 UIManager
manager' <- a -> IO (Ptr UIManager)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
manager
CString
buffer' <- Text -> IO CString
textToCString Text
buffer
IO Word32 -> IO () -> IO Word32
forall a b. IO a -> IO b -> IO a
onException (do
Word32
result <- (Ptr (Ptr GError) -> IO Word32) -> IO Word32
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO Word32) -> IO Word32)
-> (Ptr (Ptr GError) -> IO Word32) -> IO Word32
forall a b. (a -> b) -> a -> b
$ Ptr UIManager -> CString -> Int64 -> Ptr (Ptr GError) -> IO Word32
gtk_ui_manager_add_ui_from_string Ptr UIManager
manager' CString
buffer' Int64
length_
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
manager
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
buffer'
Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result
) (do
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
buffer'
)
#if defined(ENABLE_OVERLOADING)
data UIManagerAddUiFromStringMethodInfo
instance (signature ~ (T.Text -> Int64 -> m Word32), MonadIO m, IsUIManager a) => O.OverloadedMethod UIManagerAddUiFromStringMethodInfo a signature where
overloadedMethod = uIManagerAddUiFromString
instance O.OverloadedMethodInfo UIManagerAddUiFromStringMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.UIManager.uIManagerAddUiFromString",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-UIManager.html#v:uIManagerAddUiFromString"
}
#endif
foreign import ccall "gtk_ui_manager_ensure_update" gtk_ui_manager_ensure_update ::
Ptr UIManager ->
IO ()
{-# DEPRECATED uIManagerEnsureUpdate ["(Since version 3.10)"] #-}
uIManagerEnsureUpdate ::
(B.CallStack.HasCallStack, MonadIO m, IsUIManager a) =>
a
-> m ()
uIManagerEnsureUpdate :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsUIManager a) =>
a -> m ()
uIManagerEnsureUpdate a
manager = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr UIManager
manager' <- a -> IO (Ptr UIManager)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
manager
Ptr UIManager -> IO ()
gtk_ui_manager_ensure_update Ptr UIManager
manager'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
manager
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data UIManagerEnsureUpdateMethodInfo
instance (signature ~ (m ()), MonadIO m, IsUIManager a) => O.OverloadedMethod UIManagerEnsureUpdateMethodInfo a signature where
overloadedMethod = uIManagerEnsureUpdate
instance O.OverloadedMethodInfo UIManagerEnsureUpdateMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.UIManager.uIManagerEnsureUpdate",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-UIManager.html#v:uIManagerEnsureUpdate"
}
#endif
foreign import ccall "gtk_ui_manager_get_accel_group" gtk_ui_manager_get_accel_group ::
Ptr UIManager ->
IO (Ptr Gtk.AccelGroup.AccelGroup)
{-# DEPRECATED uIManagerGetAccelGroup ["(Since version 3.10)"] #-}
uIManagerGetAccelGroup ::
(B.CallStack.HasCallStack, MonadIO m, IsUIManager a) =>
a
-> m Gtk.AccelGroup.AccelGroup
uIManagerGetAccelGroup :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsUIManager a) =>
a -> m AccelGroup
uIManagerGetAccelGroup a
manager = IO AccelGroup -> m AccelGroup
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO AccelGroup -> m AccelGroup) -> IO AccelGroup -> m AccelGroup
forall a b. (a -> b) -> a -> b
$ do
Ptr UIManager
manager' <- a -> IO (Ptr UIManager)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
manager
Ptr AccelGroup
result <- Ptr UIManager -> IO (Ptr AccelGroup)
gtk_ui_manager_get_accel_group Ptr UIManager
manager'
Text -> Ptr AccelGroup -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"uIManagerGetAccelGroup" Ptr AccelGroup
result
AccelGroup
result' <- ((ManagedPtr AccelGroup -> AccelGroup)
-> Ptr AccelGroup -> IO AccelGroup
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr AccelGroup -> AccelGroup
Gtk.AccelGroup.AccelGroup) Ptr AccelGroup
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
manager
AccelGroup -> IO AccelGroup
forall (m :: * -> *) a. Monad m => a -> m a
return AccelGroup
result'
#if defined(ENABLE_OVERLOADING)
data UIManagerGetAccelGroupMethodInfo
instance (signature ~ (m Gtk.AccelGroup.AccelGroup), MonadIO m, IsUIManager a) => O.OverloadedMethod UIManagerGetAccelGroupMethodInfo a signature where
overloadedMethod = uIManagerGetAccelGroup
instance O.OverloadedMethodInfo UIManagerGetAccelGroupMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.UIManager.uIManagerGetAccelGroup",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-UIManager.html#v:uIManagerGetAccelGroup"
}
#endif
foreign import ccall "gtk_ui_manager_get_action" gtk_ui_manager_get_action ::
Ptr UIManager ->
CString ->
IO (Ptr Gtk.Action.Action)
{-# DEPRECATED uIManagerGetAction ["(Since version 3.10)"] #-}
uIManagerGetAction ::
(B.CallStack.HasCallStack, MonadIO m, IsUIManager a) =>
a
-> T.Text
-> m (Maybe Gtk.Action.Action)
uIManagerGetAction :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsUIManager a) =>
a -> Text -> m (Maybe Action)
uIManagerGetAction a
manager Text
path = IO (Maybe Action) -> m (Maybe Action)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Action) -> m (Maybe Action))
-> IO (Maybe Action) -> m (Maybe Action)
forall a b. (a -> b) -> a -> b
$ do
Ptr UIManager
manager' <- a -> IO (Ptr UIManager)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
manager
CString
path' <- Text -> IO CString
textToCString Text
path
Ptr Action
result <- Ptr UIManager -> CString -> IO (Ptr Action)
gtk_ui_manager_get_action Ptr UIManager
manager' CString
path'
Maybe Action
maybeResult <- Ptr Action -> (Ptr Action -> IO Action) -> IO (Maybe Action)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Action
result ((Ptr Action -> IO Action) -> IO (Maybe Action))
-> (Ptr Action -> IO Action) -> IO (Maybe Action)
forall a b. (a -> b) -> a -> b
$ \Ptr Action
result' -> do
Action
result'' <- ((ManagedPtr Action -> Action) -> Ptr Action -> IO Action
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Action -> Action
Gtk.Action.Action) Ptr Action
result'
Action -> IO Action
forall (m :: * -> *) a. Monad m => a -> m a
return Action
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
manager
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
path'
Maybe Action -> IO (Maybe Action)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Action
maybeResult
#if defined(ENABLE_OVERLOADING)
data UIManagerGetActionMethodInfo
instance (signature ~ (T.Text -> m (Maybe Gtk.Action.Action)), MonadIO m, IsUIManager a) => O.OverloadedMethod UIManagerGetActionMethodInfo a signature where
overloadedMethod = uIManagerGetAction
instance O.OverloadedMethodInfo UIManagerGetActionMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.UIManager.uIManagerGetAction",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-UIManager.html#v:uIManagerGetAction"
}
#endif
foreign import ccall "gtk_ui_manager_get_action_groups" gtk_ui_manager_get_action_groups ::
Ptr UIManager ->
IO (Ptr (GList (Ptr Gtk.ActionGroup.ActionGroup)))
{-# DEPRECATED uIManagerGetActionGroups ["(Since version 3.10)"] #-}
uIManagerGetActionGroups ::
(B.CallStack.HasCallStack, MonadIO m, IsUIManager a) =>
a
-> m [Gtk.ActionGroup.ActionGroup]
uIManagerGetActionGroups :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsUIManager a) =>
a -> m [ActionGroup]
uIManagerGetActionGroups a
manager = IO [ActionGroup] -> m [ActionGroup]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [ActionGroup] -> m [ActionGroup])
-> IO [ActionGroup] -> m [ActionGroup]
forall a b. (a -> b) -> a -> b
$ do
Ptr UIManager
manager' <- a -> IO (Ptr UIManager)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
manager
Ptr (GList (Ptr ActionGroup))
result <- Ptr UIManager -> IO (Ptr (GList (Ptr ActionGroup)))
gtk_ui_manager_get_action_groups Ptr UIManager
manager'
[Ptr ActionGroup]
result' <- Ptr (GList (Ptr ActionGroup)) -> IO [Ptr ActionGroup]
forall a. Ptr (GList (Ptr a)) -> IO [Ptr a]
unpackGList Ptr (GList (Ptr ActionGroup))
result
[ActionGroup]
result'' <- (Ptr ActionGroup -> IO ActionGroup)
-> [Ptr ActionGroup] -> IO [ActionGroup]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM ((ManagedPtr ActionGroup -> ActionGroup)
-> Ptr ActionGroup -> IO ActionGroup
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr ActionGroup -> ActionGroup
Gtk.ActionGroup.ActionGroup) [Ptr ActionGroup]
result'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
manager
[ActionGroup] -> IO [ActionGroup]
forall (m :: * -> *) a. Monad m => a -> m a
return [ActionGroup]
result''
#if defined(ENABLE_OVERLOADING)
data UIManagerGetActionGroupsMethodInfo
instance (signature ~ (m [Gtk.ActionGroup.ActionGroup]), MonadIO m, IsUIManager a) => O.OverloadedMethod UIManagerGetActionGroupsMethodInfo a signature where
overloadedMethod = uIManagerGetActionGroups
instance O.OverloadedMethodInfo UIManagerGetActionGroupsMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.UIManager.uIManagerGetActionGroups",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-UIManager.html#v:uIManagerGetActionGroups"
}
#endif
foreign import ccall "gtk_ui_manager_get_add_tearoffs" gtk_ui_manager_get_add_tearoffs ::
Ptr UIManager ->
IO CInt
{-# DEPRECATED uIManagerGetAddTearoffs ["(Since version 3.4)","Tearoff menus are deprecated and should not"," be used in newly written code."] #-}
uIManagerGetAddTearoffs ::
(B.CallStack.HasCallStack, MonadIO m, IsUIManager a) =>
a
-> m Bool
uIManagerGetAddTearoffs :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsUIManager a) =>
a -> m Bool
uIManagerGetAddTearoffs a
manager = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr UIManager
manager' <- a -> IO (Ptr UIManager)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
manager
CInt
result <- Ptr UIManager -> IO CInt
gtk_ui_manager_get_add_tearoffs Ptr UIManager
manager'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
manager
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data UIManagerGetAddTearoffsMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsUIManager a) => O.OverloadedMethod UIManagerGetAddTearoffsMethodInfo a signature where
overloadedMethod = uIManagerGetAddTearoffs
instance O.OverloadedMethodInfo UIManagerGetAddTearoffsMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.UIManager.uIManagerGetAddTearoffs",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-UIManager.html#v:uIManagerGetAddTearoffs"
}
#endif
foreign import ccall "gtk_ui_manager_get_toplevels" gtk_ui_manager_get_toplevels ::
Ptr UIManager ->
CUInt ->
IO (Ptr (GSList (Ptr Gtk.Widget.Widget)))
{-# DEPRECATED uIManagerGetToplevels ["(Since version 3.10)"] #-}
uIManagerGetToplevels ::
(B.CallStack.HasCallStack, MonadIO m, IsUIManager a) =>
a
-> [Gtk.Flags.UIManagerItemType]
-> m [Gtk.Widget.Widget]
uIManagerGetToplevels :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsUIManager a) =>
a -> [UIManagerItemType] -> m [Widget]
uIManagerGetToplevels a
manager [UIManagerItemType]
types = IO [Widget] -> m [Widget]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Widget] -> m [Widget]) -> IO [Widget] -> m [Widget]
forall a b. (a -> b) -> a -> b
$ do
Ptr UIManager
manager' <- a -> IO (Ptr UIManager)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
manager
let types' :: CUInt
types' = [UIManagerItemType] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [UIManagerItemType]
types
Ptr (GSList (Ptr Widget))
result <- Ptr UIManager -> CUInt -> IO (Ptr (GSList (Ptr Widget)))
gtk_ui_manager_get_toplevels Ptr UIManager
manager' CUInt
types'
[Ptr Widget]
result' <- Ptr (GSList (Ptr Widget)) -> IO [Ptr Widget]
forall a. Ptr (GSList (Ptr a)) -> IO [Ptr a]
unpackGSList Ptr (GSList (Ptr Widget))
result
[Widget]
result'' <- (Ptr Widget -> IO Widget) -> [Ptr Widget] -> IO [Widget]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Gtk.Widget.Widget) [Ptr Widget]
result'
Ptr (GSList (Ptr Widget)) -> IO ()
forall a. Ptr (GSList a) -> IO ()
g_slist_free Ptr (GSList (Ptr Widget))
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
manager
[Widget] -> IO [Widget]
forall (m :: * -> *) a. Monad m => a -> m a
return [Widget]
result''
#if defined(ENABLE_OVERLOADING)
data UIManagerGetToplevelsMethodInfo
instance (signature ~ ([Gtk.Flags.UIManagerItemType] -> m [Gtk.Widget.Widget]), MonadIO m, IsUIManager a) => O.OverloadedMethod UIManagerGetToplevelsMethodInfo a signature where
overloadedMethod = uIManagerGetToplevels
instance O.OverloadedMethodInfo UIManagerGetToplevelsMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.UIManager.uIManagerGetToplevels",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-UIManager.html#v:uIManagerGetToplevels"
}
#endif
foreign import ccall "gtk_ui_manager_get_ui" gtk_ui_manager_get_ui ::
Ptr UIManager ->
IO CString
{-# DEPRECATED uIManagerGetUi ["(Since version 3.10)"] #-}
uIManagerGetUi ::
(B.CallStack.HasCallStack, MonadIO m, IsUIManager a) =>
a
-> m T.Text
uIManagerGetUi :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsUIManager a) =>
a -> m Text
uIManagerGetUi a
manager = IO Text -> m Text
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 UIManager
manager' <- a -> IO (Ptr UIManager)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
manager
CString
result <- Ptr UIManager -> IO CString
gtk_ui_manager_get_ui Ptr UIManager
manager'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"uIManagerGetUi" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
manager
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data UIManagerGetUiMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsUIManager a) => O.OverloadedMethod UIManagerGetUiMethodInfo a signature where
overloadedMethod = uIManagerGetUi
instance O.OverloadedMethodInfo UIManagerGetUiMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.UIManager.uIManagerGetUi",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-UIManager.html#v:uIManagerGetUi"
}
#endif
foreign import ccall "gtk_ui_manager_get_widget" gtk_ui_manager_get_widget ::
Ptr UIManager ->
CString ->
IO (Ptr Gtk.Widget.Widget)
{-# DEPRECATED uIManagerGetWidget ["(Since version 3.10)"] #-}
uIManagerGetWidget ::
(B.CallStack.HasCallStack, MonadIO m, IsUIManager a) =>
a
-> T.Text
-> m (Maybe Gtk.Widget.Widget)
uIManagerGetWidget :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsUIManager a) =>
a -> Text -> m (Maybe Widget)
uIManagerGetWidget a
manager Text
path = IO (Maybe Widget) -> m (Maybe Widget)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Widget) -> m (Maybe Widget))
-> IO (Maybe Widget) -> m (Maybe Widget)
forall a b. (a -> b) -> a -> b
$ do
Ptr UIManager
manager' <- a -> IO (Ptr UIManager)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
manager
CString
path' <- Text -> IO CString
textToCString Text
path
Ptr Widget
result <- Ptr UIManager -> CString -> IO (Ptr Widget)
gtk_ui_manager_get_widget Ptr UIManager
manager' CString
path'
Maybe Widget
maybeResult <- Ptr Widget -> (Ptr Widget -> IO Widget) -> IO (Maybe Widget)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Widget
result ((Ptr Widget -> IO Widget) -> IO (Maybe Widget))
-> (Ptr Widget -> IO Widget) -> IO (Maybe Widget)
forall a b. (a -> b) -> a -> b
$ \Ptr Widget
result' -> do
Widget
result'' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Gtk.Widget.Widget) Ptr Widget
result'
Widget -> IO Widget
forall (m :: * -> *) a. Monad m => a -> m a
return Widget
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
manager
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
path'
Maybe Widget -> IO (Maybe Widget)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Widget
maybeResult
#if defined(ENABLE_OVERLOADING)
data UIManagerGetWidgetMethodInfo
instance (signature ~ (T.Text -> m (Maybe Gtk.Widget.Widget)), MonadIO m, IsUIManager a) => O.OverloadedMethod UIManagerGetWidgetMethodInfo a signature where
overloadedMethod = uIManagerGetWidget
instance O.OverloadedMethodInfo UIManagerGetWidgetMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.UIManager.uIManagerGetWidget",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-UIManager.html#v:uIManagerGetWidget"
}
#endif
foreign import ccall "gtk_ui_manager_insert_action_group" gtk_ui_manager_insert_action_group ::
Ptr UIManager ->
Ptr Gtk.ActionGroup.ActionGroup ->
Int32 ->
IO ()
{-# DEPRECATED uIManagerInsertActionGroup ["(Since version 3.10)"] #-}
uIManagerInsertActionGroup ::
(B.CallStack.HasCallStack, MonadIO m, IsUIManager a, Gtk.ActionGroup.IsActionGroup b) =>
a
-> b
-> Int32
-> m ()
uIManagerInsertActionGroup :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsUIManager a, IsActionGroup b) =>
a -> b -> Int32 -> m ()
uIManagerInsertActionGroup a
manager b
actionGroup Int32
pos = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr UIManager
manager' <- a -> IO (Ptr UIManager)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
manager
Ptr ActionGroup
actionGroup' <- b -> IO (Ptr ActionGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
actionGroup
Ptr UIManager -> Ptr ActionGroup -> Int32 -> IO ()
gtk_ui_manager_insert_action_group Ptr UIManager
manager' Ptr ActionGroup
actionGroup' Int32
pos
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
manager
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
actionGroup
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data UIManagerInsertActionGroupMethodInfo
instance (signature ~ (b -> Int32 -> m ()), MonadIO m, IsUIManager a, Gtk.ActionGroup.IsActionGroup b) => O.OverloadedMethod UIManagerInsertActionGroupMethodInfo a signature where
overloadedMethod = uIManagerInsertActionGroup
instance O.OverloadedMethodInfo UIManagerInsertActionGroupMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.UIManager.uIManagerInsertActionGroup",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-UIManager.html#v:uIManagerInsertActionGroup"
}
#endif
foreign import ccall "gtk_ui_manager_new_merge_id" gtk_ui_manager_new_merge_id ::
Ptr UIManager ->
IO Word32
{-# DEPRECATED uIManagerNewMergeId ["(Since version 3.10)"] #-}
uIManagerNewMergeId ::
(B.CallStack.HasCallStack, MonadIO m, IsUIManager a) =>
a
-> m Word32
uIManagerNewMergeId :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsUIManager a) =>
a -> m Word32
uIManagerNewMergeId a
manager = IO Word32 -> m Word32
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 UIManager
manager' <- a -> IO (Ptr UIManager)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
manager
Word32
result <- Ptr UIManager -> IO Word32
gtk_ui_manager_new_merge_id Ptr UIManager
manager'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
manager
Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result
#if defined(ENABLE_OVERLOADING)
data UIManagerNewMergeIdMethodInfo
instance (signature ~ (m Word32), MonadIO m, IsUIManager a) => O.OverloadedMethod UIManagerNewMergeIdMethodInfo a signature where
overloadedMethod = uIManagerNewMergeId
instance O.OverloadedMethodInfo UIManagerNewMergeIdMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.UIManager.uIManagerNewMergeId",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-UIManager.html#v:uIManagerNewMergeId"
}
#endif
foreign import ccall "gtk_ui_manager_remove_action_group" gtk_ui_manager_remove_action_group ::
Ptr UIManager ->
Ptr Gtk.ActionGroup.ActionGroup ->
IO ()
{-# DEPRECATED uIManagerRemoveActionGroup ["(Since version 3.10)"] #-}
uIManagerRemoveActionGroup ::
(B.CallStack.HasCallStack, MonadIO m, IsUIManager a, Gtk.ActionGroup.IsActionGroup b) =>
a
-> b
-> m ()
uIManagerRemoveActionGroup :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsUIManager a, IsActionGroup b) =>
a -> b -> m ()
uIManagerRemoveActionGroup a
manager b
actionGroup = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr UIManager
manager' <- a -> IO (Ptr UIManager)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
manager
Ptr ActionGroup
actionGroup' <- b -> IO (Ptr ActionGroup)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
actionGroup
Ptr UIManager -> Ptr ActionGroup -> IO ()
gtk_ui_manager_remove_action_group Ptr UIManager
manager' Ptr ActionGroup
actionGroup'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
manager
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
actionGroup
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data UIManagerRemoveActionGroupMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsUIManager a, Gtk.ActionGroup.IsActionGroup b) => O.OverloadedMethod UIManagerRemoveActionGroupMethodInfo a signature where
overloadedMethod = uIManagerRemoveActionGroup
instance O.OverloadedMethodInfo UIManagerRemoveActionGroupMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.UIManager.uIManagerRemoveActionGroup",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-UIManager.html#v:uIManagerRemoveActionGroup"
}
#endif
foreign import ccall "gtk_ui_manager_remove_ui" gtk_ui_manager_remove_ui ::
Ptr UIManager ->
Word32 ->
IO ()
{-# DEPRECATED uIManagerRemoveUi ["(Since version 3.10)"] #-}
uIManagerRemoveUi ::
(B.CallStack.HasCallStack, MonadIO m, IsUIManager a) =>
a
-> Word32
-> m ()
uIManagerRemoveUi :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsUIManager a) =>
a -> Word32 -> m ()
uIManagerRemoveUi a
manager Word32
mergeId = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr UIManager
manager' <- a -> IO (Ptr UIManager)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
manager
Ptr UIManager -> Word32 -> IO ()
gtk_ui_manager_remove_ui Ptr UIManager
manager' Word32
mergeId
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
manager
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data UIManagerRemoveUiMethodInfo
instance (signature ~ (Word32 -> m ()), MonadIO m, IsUIManager a) => O.OverloadedMethod UIManagerRemoveUiMethodInfo a signature where
overloadedMethod = uIManagerRemoveUi
instance O.OverloadedMethodInfo UIManagerRemoveUiMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.UIManager.uIManagerRemoveUi",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-UIManager.html#v:uIManagerRemoveUi"
}
#endif
foreign import ccall "gtk_ui_manager_set_add_tearoffs" gtk_ui_manager_set_add_tearoffs ::
Ptr UIManager ->
CInt ->
IO ()
{-# DEPRECATED uIManagerSetAddTearoffs ["(Since version 3.4)","Tearoff menus are deprecated and should not"," be used in newly written code."] #-}
uIManagerSetAddTearoffs ::
(B.CallStack.HasCallStack, MonadIO m, IsUIManager a) =>
a
-> Bool
-> m ()
uIManagerSetAddTearoffs :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsUIManager a) =>
a -> Bool -> m ()
uIManagerSetAddTearoffs a
manager Bool
addTearoffs = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr UIManager
manager' <- a -> IO (Ptr UIManager)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
manager
let addTearoffs' :: CInt
addTearoffs' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
addTearoffs
Ptr UIManager -> CInt -> IO ()
gtk_ui_manager_set_add_tearoffs Ptr UIManager
manager' CInt
addTearoffs'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
manager
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data UIManagerSetAddTearoffsMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsUIManager a) => O.OverloadedMethod UIManagerSetAddTearoffsMethodInfo a signature where
overloadedMethod = uIManagerSetAddTearoffs
instance O.OverloadedMethodInfo UIManagerSetAddTearoffsMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.UIManager.uIManagerSetAddTearoffs",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-UIManager.html#v:uIManagerSetAddTearoffs"
}
#endif