#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.Wnck.Structs.WorkspaceLayout
(
WorkspaceLayout(..) ,
newZeroWorkspaceLayout ,
noWorkspaceLayout ,
getWorkspaceLayoutCols ,
setWorkspaceLayoutCols ,
#if ENABLE_OVERLOADING
workspaceLayout_cols ,
#endif
getWorkspaceLayoutCurrentCol ,
setWorkspaceLayoutCurrentCol ,
#if ENABLE_OVERLOADING
workspaceLayout_currentCol ,
#endif
getWorkspaceLayoutCurrentRow ,
setWorkspaceLayoutCurrentRow ,
#if ENABLE_OVERLOADING
workspaceLayout_currentRow ,
#endif
getWorkspaceLayoutGrid ,
setWorkspaceLayoutGrid ,
#if ENABLE_OVERLOADING
workspaceLayout_grid ,
#endif
getWorkspaceLayoutGridArea ,
setWorkspaceLayoutGridArea ,
#if ENABLE_OVERLOADING
workspaceLayout_gridArea ,
#endif
getWorkspaceLayoutRows ,
setWorkspaceLayoutRows ,
#if ENABLE_OVERLOADING
workspaceLayout_rows ,
#endif
) 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
newtype WorkspaceLayout = WorkspaceLayout (ManagedPtr WorkspaceLayout)
instance WrappedPtr WorkspaceLayout where
wrappedPtrCalloc = callocBytes 32
wrappedPtrCopy = \p -> withManagedPtr p (copyBytes 32 >=> wrapPtr WorkspaceLayout)
wrappedPtrFree = Just ptr_to_g_free
newZeroWorkspaceLayout :: MonadIO m => m WorkspaceLayout
newZeroWorkspaceLayout = liftIO $ wrappedPtrCalloc >>= wrapPtr WorkspaceLayout
instance tag ~ 'AttrSet => Constructible WorkspaceLayout tag where
new _ attrs = do
o <- newZeroWorkspaceLayout
GI.Attributes.set o attrs
return o
noWorkspaceLayout :: Maybe WorkspaceLayout
noWorkspaceLayout = Nothing
getWorkspaceLayoutRows :: MonadIO m => WorkspaceLayout -> m Int32
getWorkspaceLayoutRows s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 0) :: IO Int32
return val
setWorkspaceLayoutRows :: MonadIO m => WorkspaceLayout -> Int32 -> m ()
setWorkspaceLayoutRows s val = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 0) (val :: Int32)
#if ENABLE_OVERLOADING
data WorkspaceLayoutRowsFieldInfo
instance AttrInfo WorkspaceLayoutRowsFieldInfo where
type AttrAllowedOps WorkspaceLayoutRowsFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint WorkspaceLayoutRowsFieldInfo = (~) Int32
type AttrBaseTypeConstraint WorkspaceLayoutRowsFieldInfo = (~) WorkspaceLayout
type AttrGetType WorkspaceLayoutRowsFieldInfo = Int32
type AttrLabel WorkspaceLayoutRowsFieldInfo = "rows"
type AttrOrigin WorkspaceLayoutRowsFieldInfo = WorkspaceLayout
attrGet _ = getWorkspaceLayoutRows
attrSet _ = setWorkspaceLayoutRows
attrConstruct = undefined
attrClear _ = undefined
workspaceLayout_rows :: AttrLabelProxy "rows"
workspaceLayout_rows = AttrLabelProxy
#endif
getWorkspaceLayoutCols :: MonadIO m => WorkspaceLayout -> m Int32
getWorkspaceLayoutCols s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 4) :: IO Int32
return val
setWorkspaceLayoutCols :: MonadIO m => WorkspaceLayout -> Int32 -> m ()
setWorkspaceLayoutCols s val = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 4) (val :: Int32)
#if ENABLE_OVERLOADING
data WorkspaceLayoutColsFieldInfo
instance AttrInfo WorkspaceLayoutColsFieldInfo where
type AttrAllowedOps WorkspaceLayoutColsFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint WorkspaceLayoutColsFieldInfo = (~) Int32
type AttrBaseTypeConstraint WorkspaceLayoutColsFieldInfo = (~) WorkspaceLayout
type AttrGetType WorkspaceLayoutColsFieldInfo = Int32
type AttrLabel WorkspaceLayoutColsFieldInfo = "cols"
type AttrOrigin WorkspaceLayoutColsFieldInfo = WorkspaceLayout
attrGet _ = getWorkspaceLayoutCols
attrSet _ = setWorkspaceLayoutCols
attrConstruct = undefined
attrClear _ = undefined
workspaceLayout_cols :: AttrLabelProxy "cols"
workspaceLayout_cols = AttrLabelProxy
#endif
getWorkspaceLayoutGrid :: MonadIO m => WorkspaceLayout -> m Int32
getWorkspaceLayoutGrid s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 8) :: IO Int32
return val
setWorkspaceLayoutGrid :: MonadIO m => WorkspaceLayout -> Int32 -> m ()
setWorkspaceLayoutGrid s val = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 8) (val :: Int32)
#if ENABLE_OVERLOADING
data WorkspaceLayoutGridFieldInfo
instance AttrInfo WorkspaceLayoutGridFieldInfo where
type AttrAllowedOps WorkspaceLayoutGridFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint WorkspaceLayoutGridFieldInfo = (~) Int32
type AttrBaseTypeConstraint WorkspaceLayoutGridFieldInfo = (~) WorkspaceLayout
type AttrGetType WorkspaceLayoutGridFieldInfo = Int32
type AttrLabel WorkspaceLayoutGridFieldInfo = "grid"
type AttrOrigin WorkspaceLayoutGridFieldInfo = WorkspaceLayout
attrGet _ = getWorkspaceLayoutGrid
attrSet _ = setWorkspaceLayoutGrid
attrConstruct = undefined
attrClear _ = undefined
workspaceLayout_grid :: AttrLabelProxy "grid"
workspaceLayout_grid = AttrLabelProxy
#endif
getWorkspaceLayoutGridArea :: MonadIO m => WorkspaceLayout -> m Int32
getWorkspaceLayoutGridArea s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 16) :: IO Int32
return val
setWorkspaceLayoutGridArea :: MonadIO m => WorkspaceLayout -> Int32 -> m ()
setWorkspaceLayoutGridArea s val = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 16) (val :: Int32)
#if ENABLE_OVERLOADING
data WorkspaceLayoutGridAreaFieldInfo
instance AttrInfo WorkspaceLayoutGridAreaFieldInfo where
type AttrAllowedOps WorkspaceLayoutGridAreaFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint WorkspaceLayoutGridAreaFieldInfo = (~) Int32
type AttrBaseTypeConstraint WorkspaceLayoutGridAreaFieldInfo = (~) WorkspaceLayout
type AttrGetType WorkspaceLayoutGridAreaFieldInfo = Int32
type AttrLabel WorkspaceLayoutGridAreaFieldInfo = "grid_area"
type AttrOrigin WorkspaceLayoutGridAreaFieldInfo = WorkspaceLayout
attrGet _ = getWorkspaceLayoutGridArea
attrSet _ = setWorkspaceLayoutGridArea
attrConstruct = undefined
attrClear _ = undefined
workspaceLayout_gridArea :: AttrLabelProxy "gridArea"
workspaceLayout_gridArea = AttrLabelProxy
#endif
getWorkspaceLayoutCurrentRow :: MonadIO m => WorkspaceLayout -> m Int32
getWorkspaceLayoutCurrentRow s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 20) :: IO Int32
return val
setWorkspaceLayoutCurrentRow :: MonadIO m => WorkspaceLayout -> Int32 -> m ()
setWorkspaceLayoutCurrentRow s val = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 20) (val :: Int32)
#if ENABLE_OVERLOADING
data WorkspaceLayoutCurrentRowFieldInfo
instance AttrInfo WorkspaceLayoutCurrentRowFieldInfo where
type AttrAllowedOps WorkspaceLayoutCurrentRowFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint WorkspaceLayoutCurrentRowFieldInfo = (~) Int32
type AttrBaseTypeConstraint WorkspaceLayoutCurrentRowFieldInfo = (~) WorkspaceLayout
type AttrGetType WorkspaceLayoutCurrentRowFieldInfo = Int32
type AttrLabel WorkspaceLayoutCurrentRowFieldInfo = "current_row"
type AttrOrigin WorkspaceLayoutCurrentRowFieldInfo = WorkspaceLayout
attrGet _ = getWorkspaceLayoutCurrentRow
attrSet _ = setWorkspaceLayoutCurrentRow
attrConstruct = undefined
attrClear _ = undefined
workspaceLayout_currentRow :: AttrLabelProxy "currentRow"
workspaceLayout_currentRow = AttrLabelProxy
#endif
getWorkspaceLayoutCurrentCol :: MonadIO m => WorkspaceLayout -> m Int32
getWorkspaceLayoutCurrentCol s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 24) :: IO Int32
return val
setWorkspaceLayoutCurrentCol :: MonadIO m => WorkspaceLayout -> Int32 -> m ()
setWorkspaceLayoutCurrentCol s val = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 24) (val :: Int32)
#if ENABLE_OVERLOADING
data WorkspaceLayoutCurrentColFieldInfo
instance AttrInfo WorkspaceLayoutCurrentColFieldInfo where
type AttrAllowedOps WorkspaceLayoutCurrentColFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint WorkspaceLayoutCurrentColFieldInfo = (~) Int32
type AttrBaseTypeConstraint WorkspaceLayoutCurrentColFieldInfo = (~) WorkspaceLayout
type AttrGetType WorkspaceLayoutCurrentColFieldInfo = Int32
type AttrLabel WorkspaceLayoutCurrentColFieldInfo = "current_col"
type AttrOrigin WorkspaceLayoutCurrentColFieldInfo = WorkspaceLayout
attrGet _ = getWorkspaceLayoutCurrentCol
attrSet _ = setWorkspaceLayoutCurrentCol
attrConstruct = undefined
attrClear _ = undefined
workspaceLayout_currentCol :: AttrLabelProxy "currentCol"
workspaceLayout_currentCol = AttrLabelProxy
#endif
#if ENABLE_OVERLOADING
instance O.HasAttributeList WorkspaceLayout
type instance O.AttributeList WorkspaceLayout = WorkspaceLayoutAttributeList
type WorkspaceLayoutAttributeList = ('[ '("rows", WorkspaceLayoutRowsFieldInfo), '("cols", WorkspaceLayoutColsFieldInfo), '("grid", WorkspaceLayoutGridFieldInfo), '("gridArea", WorkspaceLayoutGridAreaFieldInfo), '("currentRow", WorkspaceLayoutCurrentRowFieldInfo), '("currentCol", WorkspaceLayoutCurrentColFieldInfo)] :: [(Symbol, *)])
#endif
#if ENABLE_OVERLOADING
type family ResolveWorkspaceLayoutMethod (t :: Symbol) (o :: *) :: * where
ResolveWorkspaceLayoutMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveWorkspaceLayoutMethod t WorkspaceLayout, O.MethodInfo info WorkspaceLayout p) => OL.IsLabel t (WorkspaceLayout -> 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