{-# LINE 2 "./Graphics/UI/Gtk/Layout/Table.chs" #-}
module Graphics.UI.Gtk.Layout.Table (
Table,
TableClass,
castToTable, gTypeTable,
toTable,
tableNew,
tableResize,
AttachOptions(..),
tableAttach,
tableAttachDefaults,
tableSetRowSpacing,
tableGetRowSpacing,
tableSetColSpacing,
tableGetColSpacing,
tableSetRowSpacings,
tableGetDefaultRowSpacing,
tableSetColSpacings,
tableGetDefaultColSpacing,
tableSetHomogeneous,
tableGetHomogeneous,
tableGetSize,
tableNRows,
tableNColumns,
tableRowSpacing,
tableColumnSpacing,
tableHomogeneous,
tableChildLeftAttach,
tableChildRightAttach,
tableChildTopAttach,
tableChildBottomAttach,
tableChildXOptions,
tableChildYOptions,
tableChildXPadding,
tableChildYPadding,
) where
import Control.Monad (liftM)
import System.Glib.FFI
import System.Glib.Flags (fromFlags)
import System.Glib.Attributes
import System.Glib.Properties
import Graphics.UI.Gtk.Abstract.Object (makeNewObject)
import Graphics.UI.Gtk.Types
{-# LINE 114 "./Graphics/UI/Gtk/Layout/Table.chs" #-}
import Graphics.UI.Gtk.General.Enums (AttachOptions(..))
import Graphics.UI.Gtk.Abstract.ContainerChildProperties
{-# LINE 118 "./Graphics/UI/Gtk/Layout/Table.chs" #-}
tableNew ::
Int
-> Int
-> Bool
-> IO Table
tableNew :: Int -> Int -> Bool -> IO Table
tableNew Int
rows Int
columns Bool
homogeneous =
(ForeignPtr Table -> Table, FinalizerPtr Table)
-> IO (Ptr Table) -> IO Table
forall obj.
GObjectClass obj =>
(ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
makeNewObject (ForeignPtr Table -> Table, FinalizerPtr Table)
forall {a}. (ForeignPtr Table -> Table, FinalizerPtr a)
mkTable (IO (Ptr Table) -> IO Table) -> IO (Ptr Table) -> IO Table
forall a b. (a -> b) -> a -> b
$
(Ptr Widget -> Ptr Table) -> IO (Ptr Widget) -> IO (Ptr Table)
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM (Ptr Widget -> Ptr Table
forall a b. Ptr a -> Ptr b
castPtr :: Ptr Widget -> Ptr Table) (IO (Ptr Widget) -> IO (Ptr Table))
-> IO (Ptr Widget) -> IO (Ptr Table)
forall a b. (a -> b) -> a -> b
$
CUInt -> CUInt -> CInt -> IO (Ptr Widget)
gtk_table_new
{-# LINE 137 "./Graphics/UI/Gtk/Layout/Table.chs" #-}
(fromIntegral rows)
(Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
columns)
(Bool -> CInt
forall a. Num a => Bool -> a
fromBool Bool
homogeneous)
tableResize :: TableClass self => self
-> Int
-> Int
-> IO ()
tableResize :: forall self. TableClass self => self -> Int -> Int -> IO ()
tableResize self
self Int
rows Int
columns =
(\(Table ForeignPtr Table
arg1) CUInt
arg2 CUInt
arg3 -> ForeignPtr Table -> (Ptr Table -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Table
arg1 ((Ptr Table -> IO ()) -> IO ()) -> (Ptr Table -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Table
argPtr1 ->Ptr Table -> CUInt -> CUInt -> IO ()
gtk_table_resize Ptr Table
argPtr1 CUInt
arg2 CUInt
arg3)
{-# LINE 152 "./Graphics/UI/Gtk/Layout/Table.chs" #-}
(toTable self)
(Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
rows)
(Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
columns)
tableAttach :: (TableClass self, WidgetClass child) => self
-> child
-> Int
-> Int
-> Int
-> Int
-> [AttachOptions]
-> [AttachOptions]
-> Int
-> Int
-> IO ()
tableAttach :: forall self child.
(TableClass self, WidgetClass child) =>
self
-> child
-> Int
-> Int
-> Int
-> Int
-> [AttachOptions]
-> [AttachOptions]
-> Int
-> Int
-> IO ()
tableAttach self
self child
child Int
leftAttach Int
rightAttach Int
topAttach Int
bottomAttach [AttachOptions]
xoptions
[AttachOptions]
yoptions Int
xpadding Int
ypadding =
(\(Table ForeignPtr Table
arg1) (Widget ForeignPtr Widget
arg2) CUInt
arg3 CUInt
arg4 CUInt
arg5 CUInt
arg6 CInt
arg7 CInt
arg8 CUInt
arg9 CUInt
arg10 -> ForeignPtr Table -> (Ptr Table -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Table
arg1 ((Ptr Table -> IO ()) -> IO ()) -> (Ptr Table -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Table
argPtr1 ->ForeignPtr Widget -> (Ptr Widget -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Widget
arg2 ((Ptr Widget -> IO ()) -> IO ()) -> (Ptr Widget -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Widget
argPtr2 ->Ptr Table
-> Ptr Widget
-> CUInt
-> CUInt
-> CUInt
-> CUInt
-> CInt
-> CInt
-> CUInt
-> CUInt
-> IO ()
gtk_table_attach Ptr Table
argPtr1 Ptr Widget
argPtr2 CUInt
arg3 CUInt
arg4 CUInt
arg5 CUInt
arg6 CInt
arg7 CInt
arg8 CUInt
arg9 CUInt
arg10)
{-# LINE 185 "./Graphics/UI/Gtk/Layout/Table.chs" #-}
(toTable self)
(child -> Widget
forall o. WidgetClass o => o -> Widget
toWidget child
child)
(Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
leftAttach)
(Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
rightAttach)
(Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
topAttach)
(Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
bottomAttach)
((Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt)
-> ([AttachOptions] -> Int) -> [AttachOptions] -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [AttachOptions] -> Int
forall a. Flags a => [a] -> Int
fromFlags) [AttachOptions]
xoptions)
((Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt)
-> ([AttachOptions] -> Int) -> [AttachOptions] -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [AttachOptions] -> Int
forall a. Flags a => [a] -> Int
fromFlags) [AttachOptions]
yoptions)
(Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
xpadding)
(Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
ypadding)
tableAttachDefaults :: (TableClass self, WidgetClass widget) => self
-> widget
-> Int
-> Int
-> Int
-> Int
-> IO ()
tableAttachDefaults :: forall self widget.
(TableClass self, WidgetClass widget) =>
self -> widget -> Int -> Int -> Int -> Int -> IO ()
tableAttachDefaults self
self widget
widget Int
leftAttach Int
rightAttach Int
topAttach Int
bottomAttach =
(\(Table ForeignPtr Table
arg1) (Widget ForeignPtr Widget
arg2) CUInt
arg3 CUInt
arg4 CUInt
arg5 CUInt
arg6 -> ForeignPtr Table -> (Ptr Table -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Table
arg1 ((Ptr Table -> IO ()) -> IO ()) -> (Ptr Table -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Table
argPtr1 ->ForeignPtr Widget -> (Ptr Widget -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Widget
arg2 ((Ptr Widget -> IO ()) -> IO ()) -> (Ptr Widget -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Widget
argPtr2 ->Ptr Table
-> Ptr Widget -> CUInt -> CUInt -> CUInt -> CUInt -> IO ()
gtk_table_attach_defaults Ptr Table
argPtr1 Ptr Widget
argPtr2 CUInt
arg3 CUInt
arg4 CUInt
arg5 CUInt
arg6)
{-# LINE 214 "./Graphics/UI/Gtk/Layout/Table.chs" #-}
(toTable self)
(widget -> Widget
forall o. WidgetClass o => o -> Widget
toWidget widget
widget)
(Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
leftAttach)
(Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
rightAttach)
(Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
topAttach)
(Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
bottomAttach)
tableSetRowSpacing :: TableClass self => self
-> Int
-> Int
-> IO ()
tableSetRowSpacing :: forall self. TableClass self => self -> Int -> Int -> IO ()
tableSetRowSpacing self
self Int
row Int
spacing =
(\(Table ForeignPtr Table
arg1) CUInt
arg2 CUInt
arg3 -> ForeignPtr Table -> (Ptr Table -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Table
arg1 ((Ptr Table -> IO ()) -> IO ()) -> (Ptr Table -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Table
argPtr1 ->Ptr Table -> CUInt -> CUInt -> IO ()
gtk_table_set_row_spacing Ptr Table
argPtr1 CUInt
arg2 CUInt
arg3)
{-# LINE 229 "./Graphics/UI/Gtk/Layout/Table.chs" #-}
(toTable self)
(Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
row)
(Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
spacing)
tableGetRowSpacing :: TableClass self => self
-> Int
-> IO Int
tableGetRowSpacing :: forall self. TableClass self => self -> Int -> IO Int
tableGetRowSpacing self
self Int
row =
(CUInt -> Int) -> IO CUInt -> IO Int
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral (IO CUInt -> IO Int) -> IO CUInt -> IO Int
forall a b. (a -> b) -> a -> b
$
(\(Table ForeignPtr Table
arg1) CUInt
arg2 -> ForeignPtr Table -> (Ptr Table -> IO CUInt) -> IO CUInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Table
arg1 ((Ptr Table -> IO CUInt) -> IO CUInt)
-> (Ptr Table -> IO CUInt) -> IO CUInt
forall a b. (a -> b) -> a -> b
$ \Ptr Table
argPtr1 ->Ptr Table -> CUInt -> IO CUInt
gtk_table_get_row_spacing Ptr Table
argPtr1 CUInt
arg2)
{-# LINE 242 "./Graphics/UI/Gtk/Layout/Table.chs" #-}
(toTable self)
(Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
row)
tableSetColSpacing :: TableClass self => self
-> Int
-> Int
-> IO ()
tableSetColSpacing :: forall self. TableClass self => self -> Int -> Int -> IO ()
tableSetColSpacing self
self Int
column Int
spacing =
(\(Table ForeignPtr Table
arg1) CUInt
arg2 CUInt
arg3 -> ForeignPtr Table -> (Ptr Table -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Table
arg1 ((Ptr Table -> IO ()) -> IO ()) -> (Ptr Table -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Table
argPtr1 ->Ptr Table -> CUInt -> CUInt -> IO ()
gtk_table_set_col_spacing Ptr Table
argPtr1 CUInt
arg2 CUInt
arg3)
{-# LINE 254 "./Graphics/UI/Gtk/Layout/Table.chs" #-}
(toTable self)
(Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
column)
(Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
spacing)
tableGetColSpacing :: TableClass self => self
-> Int
-> IO Int
tableGetColSpacing :: forall self. TableClass self => self -> Int -> IO Int
tableGetColSpacing self
self Int
column =
(CUInt -> Int) -> IO CUInt -> IO Int
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral (IO CUInt -> IO Int) -> IO CUInt -> IO Int
forall a b. (a -> b) -> a -> b
$
(\(Table ForeignPtr Table
arg1) CUInt
arg2 -> ForeignPtr Table -> (Ptr Table -> IO CUInt) -> IO CUInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Table
arg1 ((Ptr Table -> IO CUInt) -> IO CUInt)
-> (Ptr Table -> IO CUInt) -> IO CUInt
forall a b. (a -> b) -> a -> b
$ \Ptr Table
argPtr1 ->Ptr Table -> CUInt -> IO CUInt
gtk_table_get_col_spacing Ptr Table
argPtr1 CUInt
arg2)
{-# LINE 267 "./Graphics/UI/Gtk/Layout/Table.chs" #-}
(toTable self)
(Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
column)
tableSetRowSpacings :: TableClass self => self
-> Int
-> IO ()
tableSetRowSpacings :: forall self. TableClass self => self -> Int -> IO ()
tableSetRowSpacings self
self Int
spacing =
(\(Table ForeignPtr Table
arg1) CUInt
arg2 -> ForeignPtr Table -> (Ptr Table -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Table
arg1 ((Ptr Table -> IO ()) -> IO ()) -> (Ptr Table -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Table
argPtr1 ->Ptr Table -> CUInt -> IO ()
gtk_table_set_row_spacings Ptr Table
argPtr1 CUInt
arg2)
{-# LINE 278 "./Graphics/UI/Gtk/Layout/Table.chs" #-}
(toTable self)
(Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
spacing)
tableGetDefaultRowSpacing :: TableClass self => self
-> IO Int
tableGetDefaultRowSpacing :: forall self. TableClass self => self -> IO Int
tableGetDefaultRowSpacing self
self =
(CUInt -> Int) -> IO CUInt -> IO Int
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral (IO CUInt -> IO Int) -> IO CUInt -> IO Int
forall a b. (a -> b) -> a -> b
$
(\(Table ForeignPtr Table
arg1) -> ForeignPtr Table -> (Ptr Table -> IO CUInt) -> IO CUInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Table
arg1 ((Ptr Table -> IO CUInt) -> IO CUInt)
-> (Ptr Table -> IO CUInt) -> IO CUInt
forall a b. (a -> b) -> a -> b
$ \Ptr Table
argPtr1 ->Ptr Table -> IO CUInt
gtk_table_get_default_row_spacing Ptr Table
argPtr1)
{-# LINE 289 "./Graphics/UI/Gtk/Layout/Table.chs" #-}
(toTable self)
tableSetColSpacings :: TableClass self => self
-> Int
-> IO ()
tableSetColSpacings :: forall self. TableClass self => self -> Int -> IO ()
tableSetColSpacings self
self Int
spacing =
(\(Table ForeignPtr Table
arg1) CUInt
arg2 -> ForeignPtr Table -> (Ptr Table -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Table
arg1 ((Ptr Table -> IO ()) -> IO ()) -> (Ptr Table -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Table
argPtr1 ->Ptr Table -> CUInt -> IO ()
gtk_table_set_col_spacings Ptr Table
argPtr1 CUInt
arg2)
{-# LINE 299 "./Graphics/UI/Gtk/Layout/Table.chs" #-}
(toTable self)
(Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
spacing)
tableGetDefaultColSpacing :: TableClass self => self
-> IO Int
tableGetDefaultColSpacing :: forall self. TableClass self => self -> IO Int
tableGetDefaultColSpacing self
self =
(CUInt -> Int) -> IO CUInt -> IO Int
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral (IO CUInt -> IO Int) -> IO CUInt -> IO Int
forall a b. (a -> b) -> a -> b
$
(\(Table ForeignPtr Table
arg1) -> ForeignPtr Table -> (Ptr Table -> IO CUInt) -> IO CUInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Table
arg1 ((Ptr Table -> IO CUInt) -> IO CUInt)
-> (Ptr Table -> IO CUInt) -> IO CUInt
forall a b. (a -> b) -> a -> b
$ \Ptr Table
argPtr1 ->Ptr Table -> IO CUInt
gtk_table_get_default_col_spacing Ptr Table
argPtr1)
{-# LINE 310 "./Graphics/UI/Gtk/Layout/Table.chs" #-}
(toTable self)
tableSetHomogeneous :: TableClass self => self
-> Bool
-> IO ()
tableSetHomogeneous :: forall self. TableClass self => self -> Bool -> IO ()
tableSetHomogeneous self
self Bool
homogeneous =
(\(Table ForeignPtr Table
arg1) CInt
arg2 -> ForeignPtr Table -> (Ptr Table -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Table
arg1 ((Ptr Table -> IO ()) -> IO ()) -> (Ptr Table -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Table
argPtr1 ->Ptr Table -> CInt -> IO ()
gtk_table_set_homogeneous Ptr Table
argPtr1 CInt
arg2)
{-# LINE 321 "./Graphics/UI/Gtk/Layout/Table.chs" #-}
(toTable self)
(Bool -> CInt
forall a. Num a => Bool -> a
fromBool Bool
homogeneous)
tableGetHomogeneous :: TableClass self => self
-> IO Bool
tableGetHomogeneous :: forall self. TableClass self => self -> IO Bool
tableGetHomogeneous self
self =
(CInt -> Bool) -> IO CInt -> IO Bool
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM CInt -> Bool
forall a. (Eq a, Num a) => a -> Bool
toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
forall a b. (a -> b) -> a -> b
$
(\(Table ForeignPtr Table
arg1) -> ForeignPtr Table -> (Ptr Table -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Table
arg1 ((Ptr Table -> IO CInt) -> IO CInt)
-> (Ptr Table -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Table
argPtr1 ->Ptr Table -> IO CInt
gtk_table_get_homogeneous Ptr Table
argPtr1)
{-# LINE 333 "./Graphics/UI/Gtk/Layout/Table.chs" #-}
(toTable self)
tableGetSize :: TableClass self => self
-> IO (Int, Int)
tableGetSize :: forall self. TableClass self => self -> IO (Int, Int)
tableGetSize self
self =
(Ptr CUInt -> IO (Int, Int)) -> IO (Int, Int)
forall a b. Storable a => (Ptr a -> IO b) -> IO b
alloca ((Ptr CUInt -> IO (Int, Int)) -> IO (Int, Int))
-> (Ptr CUInt -> IO (Int, Int)) -> IO (Int, Int)
forall a b. (a -> b) -> a -> b
$ \ Ptr CUInt
rowsPtr ->
(Ptr CUInt -> IO (Int, Int)) -> IO (Int, Int)
forall a b. Storable a => (Ptr a -> IO b) -> IO b
alloca ((Ptr CUInt -> IO (Int, Int)) -> IO (Int, Int))
-> (Ptr CUInt -> IO (Int, Int)) -> IO (Int, Int)
forall a b. (a -> b) -> a -> b
$ \ Ptr CUInt
columnsPtr -> do
(\(Table ForeignPtr Table
arg1) Ptr CUInt
arg2 Ptr CUInt
arg3 -> ForeignPtr Table -> (Ptr Table -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Table
arg1 ((Ptr Table -> IO ()) -> IO ()) -> (Ptr Table -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Table
argPtr1 ->Ptr Table -> Ptr CUInt -> Ptr CUInt -> IO ()
gtk_table_get_size Ptr Table
argPtr1 Ptr CUInt
arg2 Ptr CUInt
arg3)
{-# LINE 346 "./Graphics/UI/Gtk/Layout/Table.chs" #-}
(toTable self)
Ptr CUInt
rowsPtr
Ptr CUInt
columnsPtr
CUInt
rows <- Ptr CUInt -> IO CUInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CUInt
rowsPtr
CUInt
columns <- Ptr CUInt -> IO CUInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CUInt
columnsPtr
(Int, Int) -> IO (Int, Int)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral CUInt
rows, CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral CUInt
columns)
tableNRows :: TableClass self => Attr self Int
tableNRows :: forall self. TableClass self => Attr self Int
tableNRows = String -> Attr self Int
forall gobj. GObjectClass gobj => String -> Attr gobj Int
newAttrFromUIntProperty String
"n-rows"
tableNColumns :: TableClass self => Attr self Int
tableNColumns :: forall self. TableClass self => Attr self Int
tableNColumns = String -> Attr self Int
forall gobj. GObjectClass gobj => String -> Attr gobj Int
newAttrFromUIntProperty String
"n-columns"
tableRowSpacing :: TableClass self => Attr self Int
tableRowSpacing :: forall self. TableClass self => Attr self Int
tableRowSpacing = String -> Attr self Int
forall gobj. GObjectClass gobj => String -> Attr gobj Int
newAttrFromUIntProperty String
"row-spacing"
tableColumnSpacing :: TableClass self => Attr self Int
tableColumnSpacing :: forall self. TableClass self => Attr self Int
tableColumnSpacing = String -> Attr self Int
forall gobj. GObjectClass gobj => String -> Attr gobj Int
newAttrFromUIntProperty String
"column-spacing"
tableHomogeneous :: TableClass self => Attr self Bool
tableHomogeneous :: forall self. TableClass self => Attr self Bool
tableHomogeneous = (self -> IO Bool)
-> (self -> Bool -> IO ()) -> ReadWriteAttr self Bool Bool
forall o a b.
(o -> IO a) -> (o -> b -> IO ()) -> ReadWriteAttr o a b
newAttr
self -> IO Bool
forall self. TableClass self => self -> IO Bool
tableGetHomogeneous
self -> Bool -> IO ()
forall self. TableClass self => self -> Bool -> IO ()
tableSetHomogeneous
tableChildLeftAttach :: (TableClass self, WidgetClass child) => child -> Attr self Int
tableChildLeftAttach :: forall self child.
(TableClass self, WidgetClass child) =>
child -> Attr self Int
tableChildLeftAttach = String -> child -> Attr self Int
forall container child.
(ContainerClass container, WidgetClass child) =>
String -> child -> Attr container Int
newAttrFromContainerChildUIntProperty String
"left-attach"
tableChildRightAttach :: (TableClass self, WidgetClass child) => child -> Attr self Int
tableChildRightAttach :: forall self child.
(TableClass self, WidgetClass child) =>
child -> Attr self Int
tableChildRightAttach = String -> child -> Attr self Int
forall container child.
(ContainerClass container, WidgetClass child) =>
String -> child -> Attr container Int
newAttrFromContainerChildUIntProperty String
"right-attach"
tableChildTopAttach :: (TableClass self, WidgetClass child) => child -> Attr self Int
tableChildTopAttach :: forall self child.
(TableClass self, WidgetClass child) =>
child -> Attr self Int
tableChildTopAttach = String -> child -> Attr self Int
forall container child.
(ContainerClass container, WidgetClass child) =>
String -> child -> Attr container Int
newAttrFromContainerChildUIntProperty String
"top-attach"
tableChildBottomAttach :: (TableClass self, WidgetClass child) => child -> Attr self Int
tableChildBottomAttach :: forall self child.
(TableClass self, WidgetClass child) =>
child -> Attr self Int
tableChildBottomAttach = String -> child -> Attr self Int
forall container child.
(ContainerClass container, WidgetClass child) =>
String -> child -> Attr container Int
newAttrFromContainerChildUIntProperty String
"bottom-attach"
tableChildXOptions :: (TableClass self, WidgetClass child) => child -> Attr self [AttachOptions]
tableChildXOptions :: forall self child.
(TableClass self, WidgetClass child) =>
child -> Attr self [AttachOptions]
tableChildXOptions = String -> GType -> child -> Attr self [AttachOptions]
forall container child flag.
(ContainerClass container, WidgetClass child, Flags flag) =>
String -> GType -> child -> Attr container [flag]
newAttrFromContainerChildFlagsProperty String
"x-options"
GType
gtk_attach_options_get_type
{-# LINE 441 "./Graphics/UI/Gtk/Layout/Table.chs" #-}
tableChildYOptions :: (TableClass self, WidgetClass child) => child -> Attr self [AttachOptions]
tableChildYOptions :: forall self child.
(TableClass self, WidgetClass child) =>
child -> Attr self [AttachOptions]
tableChildYOptions = String -> GType -> child -> Attr self [AttachOptions]
forall container child flag.
(ContainerClass container, WidgetClass child, Flags flag) =>
String -> GType -> child -> Attr container [flag]
newAttrFromContainerChildFlagsProperty String
"y-options"
GType
gtk_attach_options_get_type
{-# LINE 449 "./Graphics/UI/Gtk/Layout/Table.chs" #-}
tableChildXPadding :: (TableClass self, WidgetClass child) => child -> Attr self Int
tableChildXPadding :: forall self child.
(TableClass self, WidgetClass child) =>
child -> Attr self Int
tableChildXPadding = String -> child -> Attr self Int
forall container child.
(ContainerClass container, WidgetClass child) =>
String -> child -> Attr container Int
newAttrFromContainerChildUIntProperty String
"x-padding"
tableChildYPadding :: (TableClass self, WidgetClass child) => child -> Attr self Int
tableChildYPadding :: forall self child.
(TableClass self, WidgetClass child) =>
child -> Attr self Int
tableChildYPadding = String -> child -> Attr self Int
forall container child.
(ContainerClass container, WidgetClass child) =>
String -> child -> Attr container Int
newAttrFromContainerChildUIntProperty String
"y-padding"
foreign import ccall unsafe "gtk_table_new"
gtk_table_new :: (CUInt -> (CUInt -> (CInt -> (IO (Ptr Widget)))))
foreign import ccall safe "gtk_table_resize"
gtk_table_resize :: ((Ptr Table) -> (CUInt -> (CUInt -> (IO ()))))
foreign import ccall safe "gtk_table_attach"
gtk_table_attach :: ((Ptr Table) -> ((Ptr Widget) -> (CUInt -> (CUInt -> (CUInt -> (CUInt -> (CInt -> (CInt -> (CUInt -> (CUInt -> (IO ())))))))))))
foreign import ccall safe "gtk_table_attach_defaults"
gtk_table_attach_defaults :: ((Ptr Table) -> ((Ptr Widget) -> (CUInt -> (CUInt -> (CUInt -> (CUInt -> (IO ())))))))
foreign import ccall safe "gtk_table_set_row_spacing"
gtk_table_set_row_spacing :: ((Ptr Table) -> (CUInt -> (CUInt -> (IO ()))))
foreign import ccall unsafe "gtk_table_get_row_spacing"
gtk_table_get_row_spacing :: ((Ptr Table) -> (CUInt -> (IO CUInt)))
foreign import ccall safe "gtk_table_set_col_spacing"
gtk_table_set_col_spacing :: ((Ptr Table) -> (CUInt -> (CUInt -> (IO ()))))
foreign import ccall unsafe "gtk_table_get_col_spacing"
gtk_table_get_col_spacing :: ((Ptr Table) -> (CUInt -> (IO CUInt)))
foreign import ccall safe "gtk_table_set_row_spacings"
gtk_table_set_row_spacings :: ((Ptr Table) -> (CUInt -> (IO ())))
foreign import ccall unsafe "gtk_table_get_default_row_spacing"
gtk_table_get_default_row_spacing :: ((Ptr Table) -> (IO CUInt))
foreign import ccall safe "gtk_table_set_col_spacings"
gtk_table_set_col_spacings :: ((Ptr Table) -> (CUInt -> (IO ())))
foreign import ccall unsafe "gtk_table_get_default_col_spacing"
gtk_table_get_default_col_spacing :: ((Ptr Table) -> (IO CUInt))
foreign import ccall safe "gtk_table_set_homogeneous"
gtk_table_set_homogeneous :: ((Ptr Table) -> (CInt -> (IO ())))
foreign import ccall unsafe "gtk_table_get_homogeneous"
gtk_table_get_homogeneous :: ((Ptr Table) -> (IO CInt))
foreign import ccall unsafe "gtk_table_get_size"
gtk_table_get_size :: ((Ptr Table) -> ((Ptr CUInt) -> ((Ptr CUInt) -> (IO ()))))
foreign import ccall unsafe "gtk_attach_options_get_type"
gtk_attach_options_get_type :: CULong