gi-gtk-0.3.18.13: GI/Gtk/Structs/TableRowCol.hs
{- |
Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte
License : LGPL-2.1
Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)
-}
module GI.Gtk.Structs.TableRowCol
(
-- * Exported types
TableRowCol(..) ,
newZeroTableRowCol ,
noTableRowCol ,
-- * Properties
-- ** Allocation
tableRowColReadAllocation ,
-- ** Empty
tableRowColReadEmpty ,
-- ** Expand
tableRowColReadExpand ,
-- ** NeedExpand
tableRowColReadNeedExpand ,
-- ** NeedShrink
tableRowColReadNeedShrink ,
-- ** Requisition
tableRowColReadRequisition ,
-- ** Shrink
tableRowColReadShrink ,
-- ** Spacing
tableRowColReadSpacing ,
) where
import Prelude ()
import Data.GI.Base.ShortPrelude
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import GI.Gtk.Types
import GI.Gtk.Callbacks
newtype TableRowCol = TableRowCol (ForeignPtr TableRowCol)
-- | Construct a `TableRowCol` struct initialized to zero.
newZeroTableRowCol :: MonadIO m => m TableRowCol
newZeroTableRowCol = liftIO $ callocBytes 28 >>= wrapPtr TableRowCol
noTableRowCol :: Maybe TableRowCol
noTableRowCol = Nothing
tableRowColReadRequisition :: TableRowCol -> IO Word16
tableRowColReadRequisition s = withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 0) :: IO Word16
return val
tableRowColReadAllocation :: TableRowCol -> IO Word16
tableRowColReadAllocation s = withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 2) :: IO Word16
return val
tableRowColReadSpacing :: TableRowCol -> IO Word16
tableRowColReadSpacing s = withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 4) :: IO Word16
return val
tableRowColReadNeedExpand :: TableRowCol -> IO Word32
tableRowColReadNeedExpand s = withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 8) :: IO Word32
return val
tableRowColReadNeedShrink :: TableRowCol -> IO Word32
tableRowColReadNeedShrink s = withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 12) :: IO Word32
return val
tableRowColReadExpand :: TableRowCol -> IO Word32
tableRowColReadExpand s = withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 16) :: IO Word32
return val
tableRowColReadShrink :: TableRowCol -> IO Word32
tableRowColReadShrink s = withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 20) :: IO Word32
return val
tableRowColReadEmpty :: TableRowCol -> IO Word32
tableRowColReadEmpty s = withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 24) :: IO Word32
return val
type family ResolveTableRowColMethod (t :: Symbol) (o :: *) :: * where
ResolveTableRowColMethod l o = MethodResolutionFailed l o
instance (info ~ ResolveTableRowColMethod t TableRowCol, MethodInfo info TableRowCol p) => IsLabelProxy t (TableRowCol -> p) where
fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)
#if MIN_VERSION_base(4,9,0)
instance (info ~ ResolveTableRowColMethod t TableRowCol, MethodInfo info TableRowCol p) => IsLabel t (TableRowCol -> p) where
fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)
#endif