#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.Poppler.Objects.Layer
(
Layer(..) ,
IsLayer ,
toLayer ,
noLayer ,
#if ENABLE_OVERLOADING
LayerGetRadioButtonGroupIdMethodInfo ,
#endif
layerGetRadioButtonGroupId ,
#if ENABLE_OVERLOADING
LayerGetTitleMethodInfo ,
#endif
layerGetTitle ,
#if ENABLE_OVERLOADING
LayerHideMethodInfo ,
#endif
layerHide ,
#if ENABLE_OVERLOADING
LayerIsParentMethodInfo ,
#endif
layerIsParent ,
#if ENABLE_OVERLOADING
LayerIsVisibleMethodInfo ,
#endif
layerIsVisible ,
#if ENABLE_OVERLOADING
LayerShowMethodInfo ,
#endif
layerShow ,
) 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.ManagedPtr as B.ManagedPtr
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.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 GI.GObject.Objects.Object as GObject.Object
newtype Layer = Layer (ManagedPtr Layer)
foreign import ccall "poppler_layer_get_type"
c_poppler_layer_get_type :: IO GType
instance GObject Layer where
gobjectType = c_poppler_layer_get_type
class (GObject o, O.IsDescendantOf Layer o) => IsLayer o
instance (GObject o, O.IsDescendantOf Layer o) => IsLayer o
instance O.HasParentTypes Layer
type instance O.ParentTypes Layer = '[GObject.Object.Object]
toLayer :: (MonadIO m, IsLayer o) => o -> m Layer
toLayer = liftIO . unsafeCastTo Layer
noLayer :: Maybe Layer
noLayer = Nothing
#if ENABLE_OVERLOADING
type family ResolveLayerMethod (t :: Symbol) (o :: *) :: * where
ResolveLayerMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveLayerMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveLayerMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveLayerMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveLayerMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveLayerMethod "hide" o = LayerHideMethodInfo
ResolveLayerMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveLayerMethod "isParent" o = LayerIsParentMethodInfo
ResolveLayerMethod "isVisible" o = LayerIsVisibleMethodInfo
ResolveLayerMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveLayerMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveLayerMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveLayerMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveLayerMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveLayerMethod "show" o = LayerShowMethodInfo
ResolveLayerMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveLayerMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveLayerMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveLayerMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveLayerMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveLayerMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveLayerMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveLayerMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveLayerMethod "getRadioButtonGroupId" o = LayerGetRadioButtonGroupIdMethodInfo
ResolveLayerMethod "getTitle" o = LayerGetTitleMethodInfo
ResolveLayerMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveLayerMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveLayerMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveLayerMethod t Layer, O.MethodInfo info Layer p) => OL.IsLabel t (Layer -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#else
fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif
#endif
#if ENABLE_OVERLOADING
instance O.HasAttributeList Layer
type instance O.AttributeList Layer = LayerAttributeList
type LayerAttributeList = ('[ ] :: [(Symbol, *)])
#endif
#if ENABLE_OVERLOADING
#endif
#if ENABLE_OVERLOADING
type instance O.SignalList Layer = LayerSignalList
type LayerSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "poppler_layer_get_radio_button_group_id" poppler_layer_get_radio_button_group_id ::
Ptr Layer ->
IO Int32
layerGetRadioButtonGroupId ::
(B.CallStack.HasCallStack, MonadIO m, IsLayer a) =>
a
-> m Int32
layerGetRadioButtonGroupId layer = liftIO $ do
layer' <- unsafeManagedPtrCastPtr layer
result <- poppler_layer_get_radio_button_group_id layer'
touchManagedPtr layer
return result
#if ENABLE_OVERLOADING
data LayerGetRadioButtonGroupIdMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsLayer a) => O.MethodInfo LayerGetRadioButtonGroupIdMethodInfo a signature where
overloadedMethod _ = layerGetRadioButtonGroupId
#endif
foreign import ccall "poppler_layer_get_title" poppler_layer_get_title ::
Ptr Layer ->
IO CString
layerGetTitle ::
(B.CallStack.HasCallStack, MonadIO m, IsLayer a) =>
a
-> m T.Text
layerGetTitle layer = liftIO $ do
layer' <- unsafeManagedPtrCastPtr layer
result <- poppler_layer_get_title layer'
checkUnexpectedReturnNULL "layerGetTitle" result
result' <- cstringToText result
touchManagedPtr layer
return result'
#if ENABLE_OVERLOADING
data LayerGetTitleMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsLayer a) => O.MethodInfo LayerGetTitleMethodInfo a signature where
overloadedMethod _ = layerGetTitle
#endif
foreign import ccall "poppler_layer_hide" poppler_layer_hide ::
Ptr Layer ->
IO ()
layerHide ::
(B.CallStack.HasCallStack, MonadIO m, IsLayer a) =>
a
-> m ()
layerHide layer = liftIO $ do
layer' <- unsafeManagedPtrCastPtr layer
poppler_layer_hide layer'
touchManagedPtr layer
return ()
#if ENABLE_OVERLOADING
data LayerHideMethodInfo
instance (signature ~ (m ()), MonadIO m, IsLayer a) => O.MethodInfo LayerHideMethodInfo a signature where
overloadedMethod _ = layerHide
#endif
foreign import ccall "poppler_layer_is_parent" poppler_layer_is_parent ::
Ptr Layer ->
IO CInt
layerIsParent ::
(B.CallStack.HasCallStack, MonadIO m, IsLayer a) =>
a
-> m Bool
layerIsParent layer = liftIO $ do
layer' <- unsafeManagedPtrCastPtr layer
result <- poppler_layer_is_parent layer'
let result' = (/= 0) result
touchManagedPtr layer
return result'
#if ENABLE_OVERLOADING
data LayerIsParentMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsLayer a) => O.MethodInfo LayerIsParentMethodInfo a signature where
overloadedMethod _ = layerIsParent
#endif
foreign import ccall "poppler_layer_is_visible" poppler_layer_is_visible ::
Ptr Layer ->
IO CInt
layerIsVisible ::
(B.CallStack.HasCallStack, MonadIO m, IsLayer a) =>
a
-> m Bool
layerIsVisible layer = liftIO $ do
layer' <- unsafeManagedPtrCastPtr layer
result <- poppler_layer_is_visible layer'
let result' = (/= 0) result
touchManagedPtr layer
return result'
#if ENABLE_OVERLOADING
data LayerIsVisibleMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsLayer a) => O.MethodInfo LayerIsVisibleMethodInfo a signature where
overloadedMethod _ = layerIsVisible
#endif
foreign import ccall "poppler_layer_show" poppler_layer_show ::
Ptr Layer ->
IO ()
layerShow ::
(B.CallStack.HasCallStack, MonadIO m, IsLayer a) =>
a
-> m ()
layerShow layer = liftIO $ do
layer' <- unsafeManagedPtrCastPtr layer
poppler_layer_show layer'
touchManagedPtr layer
return ()
#if ENABLE_OVERLOADING
data LayerShowMethodInfo
instance (signature ~ (m ()), MonadIO m, IsLayer a) => O.MethodInfo LayerShowMethodInfo a signature where
overloadedMethod _ = layerShow
#endif