{-# LINE 2 "./Graphics/UI/Gtk/Layout/Grid.chs" #-}
module Graphics.UI.Gtk.Layout.Grid (
Grid,
GridClass,
castToGrid,
gTypeGrid,
toGrid,
gridNew,
gridAttach,
gridAttachNextTo,
gridSetRowHomogeneous,
gridGetRowHomogeneous,
gridSetRowSpacing,
gridGetRowSpacing,
gridSetColumnHomogeneous,
gridGetColumnHomogeneous,
gridSetColumnSpacing,
gridGetColumnSpacing,
gridGetChildAt,
gridInsertRow,
gridInsertColumn,
gridInsertNextTo,
gridRemoveRow,
gridRemoveColumn,
gridGetBaselineRow,
gridSetBaselineRow,
gridGetRowBaselinePosition,
gridSetRowBaselinePosition
) where
import Control.Monad (liftM)
import System.Glib.FFI
import Graphics.UI.Gtk.Abstract.Object (makeNewObject)
import Graphics.UI.Gtk.Types
{-# LINE 88 "./Graphics/UI/Gtk/Layout/Grid.chs" #-}
import Graphics.UI.Gtk.General.Enums (PositionType)
import Graphics.UI.Gtk.General.Enums (BaselinePosition)
{-# LINE 95 "./Graphics/UI/Gtk/Layout/Grid.chs" #-}
gridNew :: IO Grid
gridNew :: IO Grid
gridNew =
(ForeignPtr Grid -> Grid, FinalizerPtr Grid)
-> IO (Ptr Grid) -> IO Grid
forall obj.
GObjectClass obj =>
(ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
makeNewObject (ForeignPtr Grid -> Grid, FinalizerPtr Grid)
forall {a}. (ForeignPtr Grid -> Grid, FinalizerPtr a)
mkGrid (IO (Ptr Grid) -> IO Grid) -> IO (Ptr Grid) -> IO Grid
forall a b. (a -> b) -> a -> b
$
(Ptr Widget -> Ptr Grid) -> IO (Ptr Widget) -> IO (Ptr Grid)
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM (Ptr Widget -> Ptr Grid
forall a b. Ptr a -> Ptr b
castPtr :: Ptr Widget -> Ptr Grid) (IO (Ptr Widget) -> IO (Ptr Grid))
-> IO (Ptr Widget) -> IO (Ptr Grid)
forall a b. (a -> b) -> a -> b
$
IO (Ptr Widget)
gtk_grid_new
{-# LINE 106 "./Graphics/UI/Gtk/Layout/Grid.chs" #-}
gridAttach :: (GridClass self, WidgetClass child)
=> self
-> child
-> Int
-> Int
-> Int
-> Int
-> IO ()
gridAttach :: forall self child.
(GridClass self, WidgetClass child) =>
self -> child -> Int -> Int -> Int -> Int -> IO ()
gridAttach self
self child
child Int
left Int
top Int
width Int
height =
(\(Grid ForeignPtr Grid
arg1) (Widget ForeignPtr Widget
arg2) CInt
arg3 CInt
arg4 CInt
arg5 CInt
arg6 -> ForeignPtr Grid -> (Ptr Grid -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Grid
arg1 ((Ptr Grid -> IO ()) -> IO ()) -> (Ptr Grid -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Grid
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 Grid -> Ptr Widget -> CInt -> CInt -> CInt -> CInt -> IO ()
gtk_grid_attach Ptr Grid
argPtr1 Ptr Widget
argPtr2 CInt
arg3 CInt
arg4 CInt
arg5 CInt
arg6)
{-# LINE 123 "./Graphics/UI/Gtk/Layout/Grid.chs" #-}
(toGrid self)
(child -> Widget
forall o. WidgetClass o => o -> Widget
toWidget child
child)
(Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
left)
(Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
top)
(Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
width)
(Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
height)
gridAttachNextTo :: (GridClass self, WidgetClass child, WidgetClass sibling)
=> self
-> child
-> Maybe sibling
-> PositionType
-> Int
-> Int
-> IO()
gridAttachNextTo :: forall self child sibling.
(GridClass self, WidgetClass child, WidgetClass sibling) =>
self
-> child -> Maybe sibling -> PositionType -> Int -> Int -> IO ()
gridAttachNextTo self
self child
child Maybe sibling
sib PositionType
pos Int
width Int
height =
(\(Grid ForeignPtr Grid
arg1) (Widget ForeignPtr Widget
arg2) (Widget ForeignPtr Widget
arg3) CInt
arg4 CInt
arg5 CInt
arg6 -> ForeignPtr Grid -> (Ptr Grid -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Grid
arg1 ((Ptr Grid -> IO ()) -> IO ()) -> (Ptr Grid -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Grid
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 ->ForeignPtr Widget -> (Ptr Widget -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Widget
arg3 ((Ptr Widget -> IO ()) -> IO ()) -> (Ptr Widget -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Widget
argPtr3 ->Ptr Grid
-> Ptr Widget -> Ptr Widget -> CInt -> CInt -> CInt -> IO ()
gtk_grid_attach_next_to Ptr Grid
argPtr1 Ptr Widget
argPtr2 Ptr Widget
argPtr3 CInt
arg4 CInt
arg5 CInt
arg6)
{-# LINE 148 "./Graphics/UI/Gtk/Layout/Grid.chs" #-}
(toGrid self)
(child -> Widget
forall o. WidgetClass o => o -> Widget
toWidget child
child)
(Widget -> (sibling -> Widget) -> Maybe sibling -> Widget
forall b a. b -> (a -> b) -> Maybe a -> b
maybe (ForeignPtr Widget -> Widget
Widget ForeignPtr Widget
forall a. ForeignPtr a
nullForeignPtr) sibling -> Widget
forall o. WidgetClass o => o -> Widget
toWidget Maybe sibling
sib)
(Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> Int -> CInt
forall a b. (a -> b) -> a -> b
$ PositionType -> Int
forall a. Enum a => a -> Int
fromEnum PositionType
pos)
(Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
width)
(Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
height)
gridSetRowHomogeneous :: GridClass self
=> self
-> Bool
-> IO ()
gridSetRowHomogeneous :: forall self. GridClass self => self -> Bool -> IO ()
gridSetRowHomogeneous self
self Bool
homogeneous =
(\(Grid ForeignPtr Grid
arg1) CInt
arg2 -> ForeignPtr Grid -> (Ptr Grid -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Grid
arg1 ((Ptr Grid -> IO ()) -> IO ()) -> (Ptr Grid -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Grid
argPtr1 ->Ptr Grid -> CInt -> IO ()
gtk_grid_set_row_homogeneous Ptr Grid
argPtr1 CInt
arg2)
{-# LINE 163 "./Graphics/UI/Gtk/Layout/Grid.chs" #-}
(toGrid self)
(Bool -> CInt
forall a. Num a => Bool -> a
fromBool Bool
homogeneous)
gridGetRowHomogeneous :: GridClass self
=> self
-> IO Bool
gridGetRowHomogeneous :: forall self. GridClass self => self -> IO Bool
gridGetRowHomogeneous 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
$
(\(Grid ForeignPtr Grid
arg1) -> ForeignPtr Grid -> (Ptr Grid -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Grid
arg1 ((Ptr Grid -> IO CInt) -> IO CInt)
-> (Ptr Grid -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Grid
argPtr1 ->Ptr Grid -> IO CInt
gtk_grid_get_row_homogeneous Ptr Grid
argPtr1)
{-# LINE 174 "./Graphics/UI/Gtk/Layout/Grid.chs" #-}
(toGrid self)
gridSetRowSpacing :: GridClass self
=> self
-> Int
-> IO ()
gridSetRowSpacing :: forall self. GridClass self => self -> Int -> IO ()
gridSetRowSpacing self
self Int
spacing =
(\(Grid ForeignPtr Grid
arg1) CUInt
arg2 -> ForeignPtr Grid -> (Ptr Grid -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Grid
arg1 ((Ptr Grid -> IO ()) -> IO ()) -> (Ptr Grid -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Grid
argPtr1 ->Ptr Grid -> CUInt -> IO ()
gtk_grid_set_row_spacing Ptr Grid
argPtr1 CUInt
arg2)
{-# LINE 184 "./Graphics/UI/Gtk/Layout/Grid.chs" #-}
(toGrid self)
(Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
spacing)
gridGetRowSpacing :: GridClass self
=> self
-> IO Int
gridGetRowSpacing :: forall self. GridClass self => self -> IO Int
gridGetRowSpacing 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
$
(\(Grid ForeignPtr Grid
arg1) -> ForeignPtr Grid -> (Ptr Grid -> IO CUInt) -> IO CUInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Grid
arg1 ((Ptr Grid -> IO CUInt) -> IO CUInt)
-> (Ptr Grid -> IO CUInt) -> IO CUInt
forall a b. (a -> b) -> a -> b
$ \Ptr Grid
argPtr1 ->Ptr Grid -> IO CUInt
gtk_grid_get_row_spacing Ptr Grid
argPtr1)
{-# LINE 195 "./Graphics/UI/Gtk/Layout/Grid.chs" #-}
(toGrid self)
gridSetColumnHomogeneous :: GridClass self
=> self
-> Bool
-> IO ()
gridSetColumnHomogeneous :: forall self. GridClass self => self -> Bool -> IO ()
gridSetColumnHomogeneous self
self Bool
homogeneous =
(\(Grid ForeignPtr Grid
arg1) CInt
arg2 -> ForeignPtr Grid -> (Ptr Grid -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Grid
arg1 ((Ptr Grid -> IO ()) -> IO ()) -> (Ptr Grid -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Grid
argPtr1 ->Ptr Grid -> CInt -> IO ()
gtk_grid_set_column_homogeneous Ptr Grid
argPtr1 CInt
arg2)
{-# LINE 205 "./Graphics/UI/Gtk/Layout/Grid.chs" #-}
(toGrid self)
(Bool -> CInt
forall a. Num a => Bool -> a
fromBool Bool
homogeneous)
gridGetColumnHomogeneous :: GridClass self
=> self
-> IO Bool
gridGetColumnHomogeneous :: forall self. GridClass self => self -> IO Bool
gridGetColumnHomogeneous 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
$
(\(Grid ForeignPtr Grid
arg1) -> ForeignPtr Grid -> (Ptr Grid -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Grid
arg1 ((Ptr Grid -> IO CInt) -> IO CInt)
-> (Ptr Grid -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Grid
argPtr1 ->Ptr Grid -> IO CInt
gtk_grid_get_column_homogeneous Ptr Grid
argPtr1)
{-# LINE 216 "./Graphics/UI/Gtk/Layout/Grid.chs" #-}
(toGrid self)
gridSetColumnSpacing :: GridClass self
=> self
-> Int
-> IO ()
gridSetColumnSpacing :: forall self. GridClass self => self -> Int -> IO ()
gridSetColumnSpacing self
self Int
spacing =
(\(Grid ForeignPtr Grid
arg1) CUInt
arg2 -> ForeignPtr Grid -> (Ptr Grid -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Grid
arg1 ((Ptr Grid -> IO ()) -> IO ()) -> (Ptr Grid -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Grid
argPtr1 ->Ptr Grid -> CUInt -> IO ()
gtk_grid_set_column_spacing Ptr Grid
argPtr1 CUInt
arg2)
{-# LINE 226 "./Graphics/UI/Gtk/Layout/Grid.chs" #-}
(toGrid self)
(Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
spacing)
gridGetColumnSpacing :: GridClass self
=> self
-> IO Int
gridGetColumnSpacing :: forall self. GridClass self => self -> IO Int
gridGetColumnSpacing 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
$
(\(Grid ForeignPtr Grid
arg1) -> ForeignPtr Grid -> (Ptr Grid -> IO CUInt) -> IO CUInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Grid
arg1 ((Ptr Grid -> IO CUInt) -> IO CUInt)
-> (Ptr Grid -> IO CUInt) -> IO CUInt
forall a b. (a -> b) -> a -> b
$ \Ptr Grid
argPtr1 ->Ptr Grid -> IO CUInt
gtk_grid_get_column_spacing Ptr Grid
argPtr1)
{-# LINE 237 "./Graphics/UI/Gtk/Layout/Grid.chs" #-}
(toGrid self)
gridGetChildAt :: GridClass self
=> self
-> Int
-> Int
-> IO (Maybe Widget)
gridGetChildAt :: forall self.
GridClass self =>
self -> Int -> Int -> IO (Maybe Widget)
gridGetChildAt self
self Int
left Int
top = do
Ptr Widget
ptr <- (\(Grid ForeignPtr Grid
arg1) CInt
arg2 CInt
arg3 -> ForeignPtr Grid -> (Ptr Grid -> IO (Ptr Widget)) -> IO (Ptr Widget)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Grid
arg1 ((Ptr Grid -> IO (Ptr Widget)) -> IO (Ptr Widget))
-> (Ptr Grid -> IO (Ptr Widget)) -> IO (Ptr Widget)
forall a b. (a -> b) -> a -> b
$ \Ptr Grid
argPtr1 ->Ptr Grid -> CInt -> CInt -> IO (Ptr Widget)
gtk_grid_get_child_at Ptr Grid
argPtr1 CInt
arg2 CInt
arg3)
{-# LINE 251 "./Graphics/UI/Gtk/Layout/Grid.chs" #-}
(self -> Grid
forall o. GridClass o => o -> Grid
toGrid self
self)
(Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
left)
(Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
top)
if Ptr Widget
ptr Ptr Widget -> Ptr Widget -> Bool
forall a. Eq a => a -> a -> Bool
== Ptr Widget
forall a. Ptr a
nullPtr
then Maybe Widget -> IO (Maybe Widget)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Widget
forall a. Maybe a
Nothing
else (Widget -> Maybe Widget) -> IO Widget -> IO (Maybe Widget)
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM Widget -> Maybe Widget
forall a. a -> Maybe a
Just (IO Widget -> IO (Maybe Widget)) -> IO Widget -> IO (Maybe Widget)
forall a b. (a -> b) -> a -> b
$ (ForeignPtr Widget -> Widget, FinalizerPtr Widget)
-> IO (Ptr Widget) -> IO Widget
forall obj.
GObjectClass obj =>
(ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
makeNewObject (ForeignPtr Widget -> Widget, FinalizerPtr Widget)
forall {a}. (ForeignPtr Widget -> Widget, FinalizerPtr a)
mkWidget (Ptr Widget -> IO (Ptr Widget)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Widget
ptr)
gridInsertRow :: GridClass self
=> self
-> Int
-> IO ()
gridInsertRow :: forall self. GridClass self => self -> Int -> IO ()
gridInsertRow self
self Int
pos =
(\(Grid ForeignPtr Grid
arg1) CInt
arg2 -> ForeignPtr Grid -> (Ptr Grid -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Grid
arg1 ((Ptr Grid -> IO ()) -> IO ()) -> (Ptr Grid -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Grid
argPtr1 ->Ptr Grid -> CInt -> IO ()
gtk_grid_insert_row Ptr Grid
argPtr1 CInt
arg2)
{-# LINE 268 "./Graphics/UI/Gtk/Layout/Grid.chs" #-}
(toGrid self)
(Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
pos)
gridInsertColumn :: GridClass self
=> self
-> Int
-> IO ()
gridInsertColumn :: forall self. GridClass self => self -> Int -> IO ()
gridInsertColumn self
self Int
pos =
(\(Grid ForeignPtr Grid
arg1) CInt
arg2 -> ForeignPtr Grid -> (Ptr Grid -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Grid
arg1 ((Ptr Grid -> IO ()) -> IO ()) -> (Ptr Grid -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Grid
argPtr1 ->Ptr Grid -> CInt -> IO ()
gtk_grid_insert_column Ptr Grid
argPtr1 CInt
arg2)
{-# LINE 281 "./Graphics/UI/Gtk/Layout/Grid.chs" #-}
(toGrid self)
(Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
pos)
gridInsertNextTo :: (GridClass self, WidgetClass sibling)
=> self
-> sibling
-> PositionType
-> IO ()
gridInsertNextTo :: forall self sibling.
(GridClass self, WidgetClass sibling) =>
self -> sibling -> PositionType -> IO ()
gridInsertNextTo self
self sibling
sib PositionType
pos =
(\(Grid ForeignPtr Grid
arg1) (Widget ForeignPtr Widget
arg2) CInt
arg3 -> ForeignPtr Grid -> (Ptr Grid -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Grid
arg1 ((Ptr Grid -> IO ()) -> IO ()) -> (Ptr Grid -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Grid
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 Grid -> Ptr Widget -> CInt -> IO ()
gtk_grid_insert_next_to Ptr Grid
argPtr1 Ptr Widget
argPtr2 CInt
arg3)
{-# LINE 296 "./Graphics/UI/Gtk/Layout/Grid.chs" #-}
(toGrid self)
(sibling -> Widget
forall o. WidgetClass o => o -> Widget
toWidget sibling
sib)
(Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> Int -> CInt
forall a b. (a -> b) -> a -> b
$ PositionType -> Int
forall a. Enum a => a -> Int
fromEnum PositionType
pos)
gridRemoveRow :: GridClass self
=> self
-> Int
-> IO ()
gridRemoveRow :: forall self. GridClass self => self -> Int -> IO ()
gridRemoveRow self
self Int
pos =
(\(Grid ForeignPtr Grid
arg1) CInt
arg2 -> ForeignPtr Grid -> (Ptr Grid -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Grid
arg1 ((Ptr Grid -> IO ()) -> IO ()) -> (Ptr Grid -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Grid
argPtr1 ->Ptr Grid -> CInt -> IO ()
gtk_grid_remove_row Ptr Grid
argPtr1 CInt
arg2)
{-# LINE 314 "./Graphics/UI/Gtk/Layout/Grid.chs" #-}
(toGrid self)
(Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
pos)
gridRemoveColumn :: GridClass self
=> self
-> Int
-> IO ()
gridRemoveColumn :: forall self. GridClass self => self -> Int -> IO ()
gridRemoveColumn self
self Int
pos =
(\(Grid ForeignPtr Grid
arg1) CInt
arg2 -> ForeignPtr Grid -> (Ptr Grid -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Grid
arg1 ((Ptr Grid -> IO ()) -> IO ()) -> (Ptr Grid -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Grid
argPtr1 ->Ptr Grid -> CInt -> IO ()
gtk_grid_remove_column Ptr Grid
argPtr1 CInt
arg2)
{-# LINE 327 "./Graphics/UI/Gtk/Layout/Grid.chs" #-}
(toGrid self)
(Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
pos)
gridGetBaselineRow :: GridClass self
=> self
-> IO Int
gridGetBaselineRow :: forall self. GridClass self => self -> IO Int
gridGetBaselineRow self
self =
(CInt -> Int) -> IO CInt -> IO Int
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral (IO CInt -> IO Int) -> IO CInt -> IO Int
forall a b. (a -> b) -> a -> b
$
(\(Grid ForeignPtr Grid
arg1) -> ForeignPtr Grid -> (Ptr Grid -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Grid
arg1 ((Ptr Grid -> IO CInt) -> IO CInt)
-> (Ptr Grid -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Grid
argPtr1 ->Ptr Grid -> IO CInt
gtk_grid_get_baseline_row Ptr Grid
argPtr1)
{-# LINE 338 "./Graphics/UI/Gtk/Layout/Grid.chs" #-}
(toGrid self)
gridSetBaselineRow :: GridClass self
=> self
-> Int
-> IO ()
gridSetBaselineRow :: forall self. GridClass self => self -> Int -> IO ()
gridSetBaselineRow self
self Int
row =
(\(Grid ForeignPtr Grid
arg1) CInt
arg2 -> ForeignPtr Grid -> (Ptr Grid -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Grid
arg1 ((Ptr Grid -> IO ()) -> IO ()) -> (Ptr Grid -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Grid
argPtr1 ->Ptr Grid -> CInt -> IO ()
gtk_grid_set_baseline_row Ptr Grid
argPtr1 CInt
arg2)
{-# LINE 350 "./Graphics/UI/Gtk/Layout/Grid.chs" #-}
(toGrid self)
(Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
row)
gridGetRowBaselinePosition :: GridClass self
=> self
-> Int
-> IO BaselinePosition
gridGetRowBaselinePosition :: forall self. GridClass self => self -> Int -> IO BaselinePosition
gridGetRowBaselinePosition self
self Int
row =
(CInt -> BaselinePosition) -> IO CInt -> IO BaselinePosition
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM (Int -> BaselinePosition
forall a. Enum a => Int -> a
toEnum (Int -> BaselinePosition)
-> (CInt -> Int) -> CInt -> BaselinePosition
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) (IO CInt -> IO BaselinePosition) -> IO CInt -> IO BaselinePosition
forall a b. (a -> b) -> a -> b
$
(\(Grid ForeignPtr Grid
arg1) CInt
arg2 -> ForeignPtr Grid -> (Ptr Grid -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Grid
arg1 ((Ptr Grid -> IO CInt) -> IO CInt)
-> (Ptr Grid -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Grid
argPtr1 ->Ptr Grid -> CInt -> IO CInt
gtk_grid_get_row_baseline_position Ptr Grid
argPtr1 CInt
arg2)
{-# LINE 363 "./Graphics/UI/Gtk/Layout/Grid.chs" #-}
(toGrid self)
(Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
row)
gridSetRowBaselinePosition :: GridClass self
=> self
-> Int
-> BaselinePosition
-> IO ()
gridSetRowBaselinePosition :: forall self.
GridClass self =>
self -> Int -> BaselinePosition -> IO ()
gridSetRowBaselinePosition self
self Int
row BaselinePosition
pos =
(\(Grid ForeignPtr Grid
arg1) CInt
arg2 CInt
arg3 -> ForeignPtr Grid -> (Ptr Grid -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Grid
arg1 ((Ptr Grid -> IO ()) -> IO ()) -> (Ptr Grid -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Grid
argPtr1 ->Ptr Grid -> CInt -> CInt -> IO ()
gtk_grid_set_row_baseline_position Ptr Grid
argPtr1 CInt
arg2 CInt
arg3)
{-# LINE 376 "./Graphics/UI/Gtk/Layout/Grid.chs" #-}
(toGrid self)
(Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
row)
(Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> Int -> CInt
forall a b. (a -> b) -> a -> b
$ BaselinePosition -> Int
forall a. Enum a => a -> Int
fromEnum BaselinePosition
pos)
foreign import ccall unsafe "gtk_grid_new"
gtk_grid_new :: (IO (Ptr Widget))
foreign import ccall safe "gtk_grid_attach"
gtk_grid_attach :: ((Ptr Grid) -> ((Ptr Widget) -> (CInt -> (CInt -> (CInt -> (CInt -> (IO ())))))))
foreign import ccall safe "gtk_grid_attach_next_to"
gtk_grid_attach_next_to :: ((Ptr Grid) -> ((Ptr Widget) -> ((Ptr Widget) -> (CInt -> (CInt -> (CInt -> (IO ())))))))
foreign import ccall safe "gtk_grid_set_row_homogeneous"
gtk_grid_set_row_homogeneous :: ((Ptr Grid) -> (CInt -> (IO ())))
foreign import ccall safe "gtk_grid_get_row_homogeneous"
gtk_grid_get_row_homogeneous :: ((Ptr Grid) -> (IO CInt))
foreign import ccall safe "gtk_grid_set_row_spacing"
gtk_grid_set_row_spacing :: ((Ptr Grid) -> (CUInt -> (IO ())))
foreign import ccall safe "gtk_grid_get_row_spacing"
gtk_grid_get_row_spacing :: ((Ptr Grid) -> (IO CUInt))
foreign import ccall safe "gtk_grid_set_column_homogeneous"
gtk_grid_set_column_homogeneous :: ((Ptr Grid) -> (CInt -> (IO ())))
foreign import ccall safe "gtk_grid_get_column_homogeneous"
gtk_grid_get_column_homogeneous :: ((Ptr Grid) -> (IO CInt))
foreign import ccall safe "gtk_grid_set_column_spacing"
gtk_grid_set_column_spacing :: ((Ptr Grid) -> (CUInt -> (IO ())))
foreign import ccall safe "gtk_grid_get_column_spacing"
gtk_grid_get_column_spacing :: ((Ptr Grid) -> (IO CUInt))
foreign import ccall safe "gtk_grid_get_child_at"
gtk_grid_get_child_at :: ((Ptr Grid) -> (CInt -> (CInt -> (IO (Ptr Widget)))))
foreign import ccall safe "gtk_grid_insert_row"
gtk_grid_insert_row :: ((Ptr Grid) -> (CInt -> (IO ())))
foreign import ccall safe "gtk_grid_insert_column"
gtk_grid_insert_column :: ((Ptr Grid) -> (CInt -> (IO ())))
foreign import ccall safe "gtk_grid_insert_next_to"
gtk_grid_insert_next_to :: ((Ptr Grid) -> ((Ptr Widget) -> (CInt -> (IO ()))))
foreign import ccall safe "gtk_grid_remove_row"
gtk_grid_remove_row :: ((Ptr Grid) -> (CInt -> (IO ())))
foreign import ccall safe "gtk_grid_remove_column"
gtk_grid_remove_column :: ((Ptr Grid) -> (CInt -> (IO ())))
foreign import ccall safe "gtk_grid_get_baseline_row"
gtk_grid_get_baseline_row :: ((Ptr Grid) -> (IO CInt))
foreign import ccall safe "gtk_grid_set_baseline_row"
gtk_grid_set_baseline_row :: ((Ptr Grid) -> (CInt -> (IO ())))
foreign import ccall safe "gtk_grid_get_row_baseline_position"
gtk_grid_get_row_baseline_position :: ((Ptr Grid) -> (CInt -> (IO CInt)))
foreign import ccall safe "gtk_grid_set_row_baseline_position"
gtk_grid_set_row_baseline_position :: ((Ptr Grid) -> (CInt -> (CInt -> (IO ()))))