{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Adw.Objects.LeafletPage
(
LeafletPage(..) ,
IsLeafletPage ,
toLeafletPage ,
#if defined(ENABLE_OVERLOADING)
ResolveLeafletPageMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
LeafletPageGetChildMethodInfo ,
#endif
leafletPageGetChild ,
#if defined(ENABLE_OVERLOADING)
LeafletPageGetNameMethodInfo ,
#endif
leafletPageGetName ,
#if defined(ENABLE_OVERLOADING)
LeafletPageGetNavigatableMethodInfo ,
#endif
leafletPageGetNavigatable ,
#if defined(ENABLE_OVERLOADING)
LeafletPageSetNameMethodInfo ,
#endif
leafletPageSetName ,
#if defined(ENABLE_OVERLOADING)
LeafletPageSetNavigatableMethodInfo ,
#endif
leafletPageSetNavigatable ,
#if defined(ENABLE_OVERLOADING)
LeafletPageChildPropertyInfo ,
#endif
constructLeafletPageChild ,
getLeafletPageChild ,
#if defined(ENABLE_OVERLOADING)
leafletPageChild ,
#endif
#if defined(ENABLE_OVERLOADING)
LeafletPageNamePropertyInfo ,
#endif
clearLeafletPageName ,
constructLeafletPageName ,
getLeafletPageName ,
#if defined(ENABLE_OVERLOADING)
leafletPageName ,
#endif
setLeafletPageName ,
#if defined(ENABLE_OVERLOADING)
LeafletPageNavigatablePropertyInfo ,
#endif
constructLeafletPageNavigatable ,
getLeafletPageNavigatable ,
#if defined(ENABLE_OVERLOADING)
leafletPageNavigatable ,
#endif
setLeafletPageNavigatable ,
) 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.Coerce as Coerce
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 qualified GI.Gtk.Objects.Widget as Gtk.Widget
newtype LeafletPage = LeafletPage (SP.ManagedPtr LeafletPage)
deriving (LeafletPage -> LeafletPage -> Bool
(LeafletPage -> LeafletPage -> Bool)
-> (LeafletPage -> LeafletPage -> Bool) -> Eq LeafletPage
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LeafletPage -> LeafletPage -> Bool
$c/= :: LeafletPage -> LeafletPage -> Bool
== :: LeafletPage -> LeafletPage -> Bool
$c== :: LeafletPage -> LeafletPage -> Bool
Eq)
instance SP.ManagedPtrNewtype LeafletPage where
toManagedPtr :: LeafletPage -> ManagedPtr LeafletPage
toManagedPtr (LeafletPage ManagedPtr LeafletPage
p) = ManagedPtr LeafletPage
p
foreign import ccall "adw_leaflet_page_get_type"
c_adw_leaflet_page_get_type :: IO B.Types.GType
instance B.Types.TypedObject LeafletPage where
glibType :: IO GType
glibType = IO GType
c_adw_leaflet_page_get_type
instance B.Types.GObject LeafletPage
class (SP.GObject o, O.IsDescendantOf LeafletPage o) => IsLeafletPage o
instance (SP.GObject o, O.IsDescendantOf LeafletPage o) => IsLeafletPage o
instance O.HasParentTypes LeafletPage
type instance O.ParentTypes LeafletPage = '[GObject.Object.Object]
toLeafletPage :: (MIO.MonadIO m, IsLeafletPage o) => o -> m LeafletPage
toLeafletPage :: forall (m :: * -> *) o.
(MonadIO m, IsLeafletPage o) =>
o -> m LeafletPage
toLeafletPage = IO LeafletPage -> m LeafletPage
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO LeafletPage -> m LeafletPage)
-> (o -> IO LeafletPage) -> o -> m LeafletPage
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr LeafletPage -> LeafletPage) -> o -> IO LeafletPage
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr LeafletPage -> LeafletPage
LeafletPage
instance B.GValue.IsGValue (Maybe LeafletPage) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_adw_leaflet_page_get_type
gvalueSet_ :: Ptr GValue -> Maybe LeafletPage -> IO ()
gvalueSet_ Ptr GValue
gv Maybe LeafletPage
P.Nothing = Ptr GValue -> Ptr LeafletPage -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr LeafletPage
forall a. Ptr a
FP.nullPtr :: FP.Ptr LeafletPage)
gvalueSet_ Ptr GValue
gv (P.Just LeafletPage
obj) = LeafletPage -> (Ptr LeafletPage -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr LeafletPage
obj (Ptr GValue -> Ptr LeafletPage -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe LeafletPage)
gvalueGet_ Ptr GValue
gv = do
Ptr LeafletPage
ptr <- Ptr GValue -> IO (Ptr LeafletPage)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr LeafletPage)
if Ptr LeafletPage
ptr Ptr LeafletPage -> Ptr LeafletPage -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr LeafletPage
forall a. Ptr a
FP.nullPtr
then LeafletPage -> Maybe LeafletPage
forall a. a -> Maybe a
P.Just (LeafletPage -> Maybe LeafletPage)
-> IO LeafletPage -> IO (Maybe LeafletPage)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr LeafletPage -> LeafletPage)
-> Ptr LeafletPage -> IO LeafletPage
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr LeafletPage -> LeafletPage
LeafletPage Ptr LeafletPage
ptr
else Maybe LeafletPage -> IO (Maybe LeafletPage)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe LeafletPage
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveLeafletPageMethod (t :: Symbol) (o :: *) :: * where
ResolveLeafletPageMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveLeafletPageMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveLeafletPageMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveLeafletPageMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveLeafletPageMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveLeafletPageMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveLeafletPageMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveLeafletPageMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveLeafletPageMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveLeafletPageMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveLeafletPageMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveLeafletPageMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveLeafletPageMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveLeafletPageMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveLeafletPageMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveLeafletPageMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveLeafletPageMethod "getChild" o = LeafletPageGetChildMethodInfo
ResolveLeafletPageMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveLeafletPageMethod "getName" o = LeafletPageGetNameMethodInfo
ResolveLeafletPageMethod "getNavigatable" o = LeafletPageGetNavigatableMethodInfo
ResolveLeafletPageMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveLeafletPageMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveLeafletPageMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveLeafletPageMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveLeafletPageMethod "setName" o = LeafletPageSetNameMethodInfo
ResolveLeafletPageMethod "setNavigatable" o = LeafletPageSetNavigatableMethodInfo
ResolveLeafletPageMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveLeafletPageMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveLeafletPageMethod t LeafletPage, O.OverloadedMethod info LeafletPage p) => OL.IsLabel t (LeafletPage -> 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 ~ ResolveLeafletPageMethod t LeafletPage, O.OverloadedMethod info LeafletPage p, R.HasField t LeafletPage p) => R.HasField t LeafletPage p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveLeafletPageMethod t LeafletPage, O.OverloadedMethodInfo info LeafletPage) => OL.IsLabel t (O.MethodProxy info LeafletPage) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
getLeafletPageChild :: (MonadIO m, IsLeafletPage o) => o -> m Gtk.Widget.Widget
getLeafletPageChild :: forall (m :: * -> *) o.
(MonadIO m, IsLeafletPage o) =>
o -> m Widget
getLeafletPageChild o
obj = IO Widget -> m Widget
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Widget -> m Widget) -> IO Widget -> m Widget
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe Widget) -> IO Widget
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getLeafletPageChild" (IO (Maybe Widget) -> IO Widget) -> IO (Maybe Widget) -> IO Widget
forall a b. (a -> b) -> a -> b
$ o -> String -> (ManagedPtr Widget -> Widget) -> IO (Maybe Widget)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"child" ManagedPtr Widget -> Widget
Gtk.Widget.Widget
constructLeafletPageChild :: (IsLeafletPage o, MIO.MonadIO m, Gtk.Widget.IsWidget a) => a -> m (GValueConstruct o)
constructLeafletPageChild :: forall o (m :: * -> *) a.
(IsLeafletPage o, MonadIO m, IsWidget a) =>
a -> m (GValueConstruct o)
constructLeafletPageChild a
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 -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject String
"child" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)
#if defined(ENABLE_OVERLOADING)
data LeafletPageChildPropertyInfo
instance AttrInfo LeafletPageChildPropertyInfo where
type AttrAllowedOps LeafletPageChildPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint LeafletPageChildPropertyInfo = IsLeafletPage
type AttrSetTypeConstraint LeafletPageChildPropertyInfo = Gtk.Widget.IsWidget
type AttrTransferTypeConstraint LeafletPageChildPropertyInfo = Gtk.Widget.IsWidget
type AttrTransferType LeafletPageChildPropertyInfo = Gtk.Widget.Widget
type AttrGetType LeafletPageChildPropertyInfo = Gtk.Widget.Widget
type AttrLabel LeafletPageChildPropertyInfo = "child"
type AttrOrigin LeafletPageChildPropertyInfo = LeafletPage
attrGet = getLeafletPageChild
attrSet = undefined
attrTransfer _ v = do
unsafeCastTo Gtk.Widget.Widget v
attrConstruct = constructLeafletPageChild
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Adw.Objects.LeafletPage.child"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-adwaita-1.0.1/docs/GI-Adw-Objects-LeafletPage.html#g:attr:child"
})
#endif
getLeafletPageName :: (MonadIO m, IsLeafletPage o) => o -> m (Maybe T.Text)
getLeafletPageName :: forall (m :: * -> *) o.
(MonadIO m, IsLeafletPage o) =>
o -> m (Maybe Text)
getLeafletPageName 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
"name"
setLeafletPageName :: (MonadIO m, IsLeafletPage o) => o -> T.Text -> m ()
setLeafletPageName :: forall (m :: * -> *) o.
(MonadIO m, IsLeafletPage o) =>
o -> Text -> m ()
setLeafletPageName o
obj Text
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 -> Maybe Text -> IO ()
forall a. GObject a => a -> String -> Maybe Text -> IO ()
B.Properties.setObjectPropertyString o
obj String
"name" (Text -> Maybe Text
forall a. a -> Maybe a
Just Text
val)
constructLeafletPageName :: (IsLeafletPage o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructLeafletPageName :: forall o (m :: * -> *).
(IsLeafletPage o, MonadIO m) =>
Text -> m (GValueConstruct o)
constructLeafletPageName Text
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 -> Maybe Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString String
"name" (Text -> Maybe Text
forall a. a -> Maybe a
P.Just Text
val)
clearLeafletPageName :: (MonadIO m, IsLeafletPage o) => o -> m ()
clearLeafletPageName :: forall (m :: * -> *) o. (MonadIO m, IsLeafletPage o) => o -> m ()
clearLeafletPageName o
obj = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe Text -> IO ()
forall a. GObject a => a -> String -> Maybe Text -> IO ()
B.Properties.setObjectPropertyString o
obj String
"name" (Maybe Text
forall a. Maybe a
Nothing :: Maybe T.Text)
#if defined(ENABLE_OVERLOADING)
data LeafletPageNamePropertyInfo
instance AttrInfo LeafletPageNamePropertyInfo where
type AttrAllowedOps LeafletPageNamePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint LeafletPageNamePropertyInfo = IsLeafletPage
type AttrSetTypeConstraint LeafletPageNamePropertyInfo = (~) T.Text
type AttrTransferTypeConstraint LeafletPageNamePropertyInfo = (~) T.Text
type AttrTransferType LeafletPageNamePropertyInfo = T.Text
type AttrGetType LeafletPageNamePropertyInfo = (Maybe T.Text)
type AttrLabel LeafletPageNamePropertyInfo = "name"
type AttrOrigin LeafletPageNamePropertyInfo = LeafletPage
attrGet = getLeafletPageName
attrSet = setLeafletPageName
attrTransfer _ v = do
return v
attrConstruct = constructLeafletPageName
attrClear = clearLeafletPageName
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Adw.Objects.LeafletPage.name"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-adwaita-1.0.1/docs/GI-Adw-Objects-LeafletPage.html#g:attr:name"
})
#endif
getLeafletPageNavigatable :: (MonadIO m, IsLeafletPage o) => o -> m Bool
getLeafletPageNavigatable :: forall (m :: * -> *) o. (MonadIO m, IsLeafletPage o) => o -> m Bool
getLeafletPageNavigatable 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
"navigatable"
setLeafletPageNavigatable :: (MonadIO m, IsLeafletPage o) => o -> Bool -> m ()
setLeafletPageNavigatable :: forall (m :: * -> *) o.
(MonadIO m, IsLeafletPage o) =>
o -> Bool -> m ()
setLeafletPageNavigatable 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
"navigatable" Bool
val
constructLeafletPageNavigatable :: (IsLeafletPage o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructLeafletPageNavigatable :: forall o (m :: * -> *).
(IsLeafletPage o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructLeafletPageNavigatable 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
"navigatable" Bool
val
#if defined(ENABLE_OVERLOADING)
data LeafletPageNavigatablePropertyInfo
instance AttrInfo LeafletPageNavigatablePropertyInfo where
type AttrAllowedOps LeafletPageNavigatablePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint LeafletPageNavigatablePropertyInfo = IsLeafletPage
type AttrSetTypeConstraint LeafletPageNavigatablePropertyInfo = (~) Bool
type AttrTransferTypeConstraint LeafletPageNavigatablePropertyInfo = (~) Bool
type AttrTransferType LeafletPageNavigatablePropertyInfo = Bool
type AttrGetType LeafletPageNavigatablePropertyInfo = Bool
type AttrLabel LeafletPageNavigatablePropertyInfo = "navigatable"
type AttrOrigin LeafletPageNavigatablePropertyInfo = LeafletPage
attrGet = getLeafletPageNavigatable
attrSet = setLeafletPageNavigatable
attrTransfer _ v = do
return v
attrConstruct = constructLeafletPageNavigatable
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Adw.Objects.LeafletPage.navigatable"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-adwaita-1.0.1/docs/GI-Adw-Objects-LeafletPage.html#g:attr:navigatable"
})
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList LeafletPage
type instance O.AttributeList LeafletPage = LeafletPageAttributeList
type LeafletPageAttributeList = ('[ '("child", LeafletPageChildPropertyInfo), '("name", LeafletPageNamePropertyInfo), '("navigatable", LeafletPageNavigatablePropertyInfo)] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
leafletPageChild :: AttrLabelProxy "child"
leafletPageChild = AttrLabelProxy
leafletPageName :: AttrLabelProxy "name"
leafletPageName = AttrLabelProxy
leafletPageNavigatable :: AttrLabelProxy "navigatable"
leafletPageNavigatable = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList LeafletPage = LeafletPageSignalList
type LeafletPageSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "adw_leaflet_page_get_child" adw_leaflet_page_get_child ::
Ptr LeafletPage ->
IO (Ptr Gtk.Widget.Widget)
leafletPageGetChild ::
(B.CallStack.HasCallStack, MonadIO m, IsLeafletPage a) =>
a
-> m Gtk.Widget.Widget
leafletPageGetChild :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsLeafletPage a) =>
a -> m Widget
leafletPageGetChild a
self = 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 LeafletPage
self' <- a -> IO (Ptr LeafletPage)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr Widget
result <- Ptr LeafletPage -> IO (Ptr Widget)
adw_leaflet_page_get_child Ptr LeafletPage
self'
Text -> Ptr Widget -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"leafletPageGetChild" Ptr Widget
result
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
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
Widget -> IO Widget
forall (m :: * -> *) a. Monad m => a -> m a
return Widget
result'
#if defined(ENABLE_OVERLOADING)
data LeafletPageGetChildMethodInfo
instance (signature ~ (m Gtk.Widget.Widget), MonadIO m, IsLeafletPage a) => O.OverloadedMethod LeafletPageGetChildMethodInfo a signature where
overloadedMethod = leafletPageGetChild
instance O.OverloadedMethodInfo LeafletPageGetChildMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Adw.Objects.LeafletPage.leafletPageGetChild",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-adwaita-1.0.1/docs/GI-Adw-Objects-LeafletPage.html#v:leafletPageGetChild"
})
#endif
foreign import ccall "adw_leaflet_page_get_name" adw_leaflet_page_get_name ::
Ptr LeafletPage ->
IO CString
leafletPageGetName ::
(B.CallStack.HasCallStack, MonadIO m, IsLeafletPage a) =>
a
-> m (Maybe T.Text)
leafletPageGetName :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsLeafletPage a) =>
a -> m (Maybe Text)
leafletPageGetName a
self = IO (Maybe Text) -> m (Maybe Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ do
Ptr LeafletPage
self' <- a -> IO (Ptr LeafletPage)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
result <- Ptr LeafletPage -> IO CString
adw_leaflet_page_get_name Ptr LeafletPage
self'
Maybe Text
maybeResult <- CString -> (CString -> IO Text) -> IO (Maybe Text)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull CString
result ((CString -> IO Text) -> IO (Maybe Text))
-> (CString -> IO Text) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \CString
result' -> do
Text
result'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result'
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
Maybe Text -> IO (Maybe Text)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
maybeResult
#if defined(ENABLE_OVERLOADING)
data LeafletPageGetNameMethodInfo
instance (signature ~ (m (Maybe T.Text)), MonadIO m, IsLeafletPage a) => O.OverloadedMethod LeafletPageGetNameMethodInfo a signature where
overloadedMethod = leafletPageGetName
instance O.OverloadedMethodInfo LeafletPageGetNameMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Adw.Objects.LeafletPage.leafletPageGetName",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-adwaita-1.0.1/docs/GI-Adw-Objects-LeafletPage.html#v:leafletPageGetName"
})
#endif
foreign import ccall "adw_leaflet_page_get_navigatable" adw_leaflet_page_get_navigatable ::
Ptr LeafletPage ->
IO CInt
leafletPageGetNavigatable ::
(B.CallStack.HasCallStack, MonadIO m, IsLeafletPage a) =>
a
-> m Bool
leafletPageGetNavigatable :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsLeafletPage a) =>
a -> m Bool
leafletPageGetNavigatable a
self = 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 LeafletPage
self' <- a -> IO (Ptr LeafletPage)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CInt
result <- Ptr LeafletPage -> IO CInt
adw_leaflet_page_get_navigatable Ptr LeafletPage
self'
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
self
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data LeafletPageGetNavigatableMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsLeafletPage a) => O.OverloadedMethod LeafletPageGetNavigatableMethodInfo a signature where
overloadedMethod = leafletPageGetNavigatable
instance O.OverloadedMethodInfo LeafletPageGetNavigatableMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Adw.Objects.LeafletPage.leafletPageGetNavigatable",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-adwaita-1.0.1/docs/GI-Adw-Objects-LeafletPage.html#v:leafletPageGetNavigatable"
})
#endif
foreign import ccall "adw_leaflet_page_set_name" adw_leaflet_page_set_name ::
Ptr LeafletPage ->
CString ->
IO ()
leafletPageSetName ::
(B.CallStack.HasCallStack, MonadIO m, IsLeafletPage a) =>
a
-> Maybe (T.Text)
-> m ()
leafletPageSetName :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsLeafletPage a) =>
a -> Maybe Text -> m ()
leafletPageSetName a
self Maybe Text
name = 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 LeafletPage
self' <- a -> IO (Ptr LeafletPage)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
CString
maybeName <- case Maybe Text
name of
Maybe Text
Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
Just Text
jName -> do
CString
jName' <- Text -> IO CString
textToCString Text
jName
CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jName'
Ptr LeafletPage -> CString -> IO ()
adw_leaflet_page_set_name Ptr LeafletPage
self' CString
maybeName
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeName
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data LeafletPageSetNameMethodInfo
instance (signature ~ (Maybe (T.Text) -> m ()), MonadIO m, IsLeafletPage a) => O.OverloadedMethod LeafletPageSetNameMethodInfo a signature where
overloadedMethod = leafletPageSetName
instance O.OverloadedMethodInfo LeafletPageSetNameMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Adw.Objects.LeafletPage.leafletPageSetName",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-adwaita-1.0.1/docs/GI-Adw-Objects-LeafletPage.html#v:leafletPageSetName"
})
#endif
foreign import ccall "adw_leaflet_page_set_navigatable" adw_leaflet_page_set_navigatable ::
Ptr LeafletPage ->
CInt ->
IO ()
leafletPageSetNavigatable ::
(B.CallStack.HasCallStack, MonadIO m, IsLeafletPage a) =>
a
-> Bool
-> m ()
leafletPageSetNavigatable :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsLeafletPage a) =>
a -> Bool -> m ()
leafletPageSetNavigatable a
self Bool
navigatable = 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 LeafletPage
self' <- a -> IO (Ptr LeafletPage)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
let navigatable' :: CInt
navigatable' = (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
navigatable
Ptr LeafletPage -> CInt -> IO ()
adw_leaflet_page_set_navigatable Ptr LeafletPage
self' CInt
navigatable'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data LeafletPageSetNavigatableMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsLeafletPage a) => O.OverloadedMethod LeafletPageSetNavigatableMethodInfo a signature where
overloadedMethod = leafletPageSetNavigatable
instance O.OverloadedMethodInfo LeafletPageSetNavigatableMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Adw.Objects.LeafletPage.leafletPageSetNavigatable",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-adwaita-1.0.1/docs/GI-Adw-Objects-LeafletPage.html#v:leafletPageSetNavigatable"
})
#endif