{-# LINE 2 "./Graphics/UI/Gtk/MenuComboToolbar/ToolItem.chs" #-}
module Graphics.UI.Gtk.MenuComboToolbar.ToolItem (
ToolItem,
ToolItemClass,
castToToolItem, gTypeToolItem,
toToolItem,
toolItemNew,
toolItemSetHomogeneous,
toolItemGetHomogeneous,
toolItemSetExpand,
toolItemGetExpand,
toolItemSetTooltip,
toolItemSetUseDragWindow,
toolItemGetUseDragWindow,
toolItemSetVisibleHorizontal,
toolItemGetVisibleHorizontal,
toolItemSetVisibleVertical,
toolItemGetVisibleVertical,
toolItemSetIsImportant,
toolItemGetIsImportant,
IconSize,
toolItemGetIconSize,
Orientation(..),
toolItemGetOrientation,
ToolbarStyle(..),
toolItemGetToolbarStyle,
ReliefStyle(..),
toolItemGetReliefStyle,
toolItemRetrieveProxyMenuItem,
toolItemGetProxyMenuItem,
toolItemSetProxyMenuItem,
toolItemGetEllipsizeMode,
toolItemGetTextAlignment,
toolItemGetTextOrientation,
toolItemGetTextSizeGroup,
toolItemVisibleHorizontal,
toolItemVisibleVertical,
toolItemIsImportant,
toolItemExpand,
toolItemHomogeneous,
toolItemUseDragWindow,
) where
import Control.Monad (liftM)
import System.Glib.FFI
import System.Glib.UTFString
import System.Glib.Attributes
import Graphics.UI.Gtk.Abstract.Object (makeNewObject)
import Graphics.Rendering.Pango.Enums (EllipsizeMode (..))
import Graphics.UI.Gtk.Misc.SizeGroup
import Graphics.UI.Gtk.Types
{-# LINE 117 "./Graphics/UI/Gtk/MenuComboToolbar/ToolItem.chs" #-}
import Graphics.UI.Gtk.General.Structs (IconSize)
import Graphics.UI.Gtk.General.Enums (Orientation(..), ToolbarStyle(..), ReliefStyle(..))
{-# LINE 121 "./Graphics/UI/Gtk/MenuComboToolbar/ToolItem.chs" #-}
toolItemNew :: IO ToolItem
toolItemNew :: IO ToolItem
toolItemNew =
(ForeignPtr ToolItem -> ToolItem, FinalizerPtr ToolItem)
-> IO (Ptr ToolItem) -> IO ToolItem
forall obj.
ObjectClass obj =>
(ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
makeNewObject (ForeignPtr ToolItem -> ToolItem, FinalizerPtr ToolItem)
forall {a}. (ForeignPtr ToolItem -> ToolItem, FinalizerPtr a)
mkToolItem (IO (Ptr ToolItem) -> IO ToolItem)
-> IO (Ptr ToolItem) -> IO ToolItem
forall a b. (a -> b) -> a -> b
$
IO (Ptr ToolItem)
gtk_tool_item_new
{-# LINE 132 "./Graphics/UI/Gtk/MenuComboToolbar/ToolItem.chs" #-}
toolItemSetHomogeneous :: ToolItemClass self => self
-> Bool
-> IO ()
toolItemSetHomogeneous :: forall self. ToolItemClass self => self -> Bool -> IO ()
toolItemSetHomogeneous self
self Bool
homogeneous =
(\(ToolItem ForeignPtr ToolItem
arg1) CInt
arg2 -> ForeignPtr ToolItem -> (Ptr ToolItem -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr ToolItem
arg1 ((Ptr ToolItem -> IO ()) -> IO ())
-> (Ptr ToolItem -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr ToolItem
argPtr1 ->Ptr ToolItem -> CInt -> IO ()
gtk_tool_item_set_homogeneous Ptr ToolItem
argPtr1 CInt
arg2)
{-# LINE 146 "./Graphics/UI/Gtk/MenuComboToolbar/ToolItem.chs" #-}
(toToolItem self)
(Bool -> CInt
forall a. Num a => Bool -> a
fromBool Bool
homogeneous)
toolItemGetHomogeneous :: ToolItemClass self => self -> IO Bool
toolItemGetHomogeneous :: forall self. ToolItemClass self => self -> IO Bool
toolItemGetHomogeneous 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
$
(\(ToolItem ForeignPtr ToolItem
arg1) -> ForeignPtr ToolItem -> (Ptr ToolItem -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr ToolItem
arg1 ((Ptr ToolItem -> IO CInt) -> IO CInt)
-> (Ptr ToolItem -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr ToolItem
argPtr1 ->Ptr ToolItem -> IO CInt
gtk_tool_item_get_homogeneous Ptr ToolItem
argPtr1)
{-# LINE 156 "./Graphics/UI/Gtk/MenuComboToolbar/ToolItem.chs" #-}
(toToolItem self)
toolItemSetExpand :: ToolItemClass self => self -> Bool -> IO ()
toolItemSetExpand :: forall self. ToolItemClass self => self -> Bool -> IO ()
toolItemSetExpand self
self Bool
expand =
(\(ToolItem ForeignPtr ToolItem
arg1) CInt
arg2 -> ForeignPtr ToolItem -> (Ptr ToolItem -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr ToolItem
arg1 ((Ptr ToolItem -> IO ()) -> IO ())
-> (Ptr ToolItem -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr ToolItem
argPtr1 ->Ptr ToolItem -> CInt -> IO ()
gtk_tool_item_set_expand Ptr ToolItem
argPtr1 CInt
arg2)
{-# LINE 166 "./Graphics/UI/Gtk/MenuComboToolbar/ToolItem.chs" #-}
(toToolItem self)
(Bool -> CInt
forall a. Num a => Bool -> a
fromBool Bool
expand)
toolItemGetExpand :: ToolItemClass self => self -> IO Bool
toolItemGetExpand :: forall self. ToolItemClass self => self -> IO Bool
toolItemGetExpand 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
$
(\(ToolItem ForeignPtr ToolItem
arg1) -> ForeignPtr ToolItem -> (Ptr ToolItem -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr ToolItem
arg1 ((Ptr ToolItem -> IO CInt) -> IO CInt)
-> (Ptr ToolItem -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr ToolItem
argPtr1 ->Ptr ToolItem -> IO CInt
gtk_tool_item_get_expand Ptr ToolItem
argPtr1)
{-# LINE 176 "./Graphics/UI/Gtk/MenuComboToolbar/ToolItem.chs" #-}
(toToolItem self)
toolItemSetTooltip :: (ToolItemClass self, GlibString string) => self
-> Tooltips
-> string
-> string
-> IO ()
toolItemSetTooltip :: forall self string.
(ToolItemClass self, GlibString string) =>
self -> Tooltips -> string -> string -> IO ()
toolItemSetTooltip self
self Tooltips
tooltips string
tipText string
tipPrivate =
string -> (CString -> IO ()) -> IO ()
forall a. string -> (CString -> IO a) -> IO a
forall s a. GlibString s => s -> (CString -> IO a) -> IO a
withUTFString string
tipPrivate ((CString -> IO ()) -> IO ()) -> (CString -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \CString
tipPrivatePtr ->
string -> (CString -> IO ()) -> IO ()
forall a. string -> (CString -> IO a) -> IO a
forall s a. GlibString s => s -> (CString -> IO a) -> IO a
withUTFString string
tipText ((CString -> IO ()) -> IO ()) -> (CString -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \CString
tipTextPtr ->
(\(ToolItem ForeignPtr ToolItem
arg1) (Tooltips ForeignPtr Tooltips
arg2) CString
arg3 CString
arg4 -> ForeignPtr ToolItem -> (Ptr ToolItem -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr ToolItem
arg1 ((Ptr ToolItem -> IO ()) -> IO ())
-> (Ptr ToolItem -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr ToolItem
argPtr1 ->ForeignPtr Tooltips -> (Ptr Tooltips -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Tooltips
arg2 ((Ptr Tooltips -> IO ()) -> IO ())
-> (Ptr Tooltips -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Tooltips
argPtr2 ->Ptr ToolItem -> Ptr Tooltips -> CString -> CString -> IO ()
gtk_tool_item_set_tooltip Ptr ToolItem
argPtr1 Ptr Tooltips
argPtr2 CString
arg3 CString
arg4)
{-# LINE 193 "./Graphics/UI/Gtk/MenuComboToolbar/ToolItem.chs" #-}
(toToolItem self)
Tooltips
tooltips
CString
tipTextPtr
CString
tipPrivatePtr
toolItemSetUseDragWindow :: ToolItemClass self => self -> Bool -> IO ()
toolItemSetUseDragWindow :: forall self. ToolItemClass self => self -> Bool -> IO ()
toolItemSetUseDragWindow self
self Bool
useDragWindow =
(\(ToolItem ForeignPtr ToolItem
arg1) CInt
arg2 -> ForeignPtr ToolItem -> (Ptr ToolItem -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr ToolItem
arg1 ((Ptr ToolItem -> IO ()) -> IO ())
-> (Ptr ToolItem -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr ToolItem
argPtr1 ->Ptr ToolItem -> CInt -> IO ()
gtk_tool_item_set_use_drag_window Ptr ToolItem
argPtr1 CInt
arg2)
{-# LINE 207 "./Graphics/UI/Gtk/MenuComboToolbar/ToolItem.chs" #-}
(toToolItem self)
(Bool -> CInt
forall a. Num a => Bool -> a
fromBool Bool
useDragWindow)
toolItemGetUseDragWindow :: ToolItemClass self => self -> IO Bool
toolItemGetUseDragWindow :: forall self. ToolItemClass self => self -> IO Bool
toolItemGetUseDragWindow 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
$
(\(ToolItem ForeignPtr ToolItem
arg1) -> ForeignPtr ToolItem -> (Ptr ToolItem -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr ToolItem
arg1 ((Ptr ToolItem -> IO CInt) -> IO CInt)
-> (Ptr ToolItem -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr ToolItem
argPtr1 ->Ptr ToolItem -> IO CInt
gtk_tool_item_get_use_drag_window Ptr ToolItem
argPtr1)
{-# LINE 217 "./Graphics/UI/Gtk/MenuComboToolbar/ToolItem.chs" #-}
(toToolItem self)
toolItemSetVisibleHorizontal :: ToolItemClass self => self -> Bool -> IO ()
toolItemSetVisibleHorizontal :: forall self. ToolItemClass self => self -> Bool -> IO ()
toolItemSetVisibleHorizontal self
self Bool
visibleHorizontal =
(\(ToolItem ForeignPtr ToolItem
arg1) CInt
arg2 -> ForeignPtr ToolItem -> (Ptr ToolItem -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr ToolItem
arg1 ((Ptr ToolItem -> IO ()) -> IO ())
-> (Ptr ToolItem -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr ToolItem
argPtr1 ->Ptr ToolItem -> CInt -> IO ()
gtk_tool_item_set_visible_horizontal Ptr ToolItem
argPtr1 CInt
arg2)
{-# LINE 225 "./Graphics/UI/Gtk/MenuComboToolbar/ToolItem.chs" #-}
(toToolItem self)
(Bool -> CInt
forall a. Num a => Bool -> a
fromBool Bool
visibleHorizontal)
toolItemGetVisibleHorizontal :: ToolItemClass self => self -> IO Bool
toolItemGetVisibleHorizontal :: forall self. ToolItemClass self => self -> IO Bool
toolItemGetVisibleHorizontal 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
$
(\(ToolItem ForeignPtr ToolItem
arg1) -> ForeignPtr ToolItem -> (Ptr ToolItem -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr ToolItem
arg1 ((Ptr ToolItem -> IO CInt) -> IO CInt)
-> (Ptr ToolItem -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr ToolItem
argPtr1 ->Ptr ToolItem -> IO CInt
gtk_tool_item_get_visible_horizontal Ptr ToolItem
argPtr1)
{-# LINE 235 "./Graphics/UI/Gtk/MenuComboToolbar/ToolItem.chs" #-}
(toToolItem self)
toolItemSetVisibleVertical :: ToolItemClass self => self -> Bool -> IO ()
toolItemSetVisibleVertical :: forall self. ToolItemClass self => self -> Bool -> IO ()
toolItemSetVisibleVertical self
self Bool
visibleVertical =
(\(ToolItem ForeignPtr ToolItem
arg1) CInt
arg2 -> ForeignPtr ToolItem -> (Ptr ToolItem -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr ToolItem
arg1 ((Ptr ToolItem -> IO ()) -> IO ())
-> (Ptr ToolItem -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr ToolItem
argPtr1 ->Ptr ToolItem -> CInt -> IO ()
gtk_tool_item_set_visible_vertical Ptr ToolItem
argPtr1 CInt
arg2)
{-# LINE 245 "./Graphics/UI/Gtk/MenuComboToolbar/ToolItem.chs" #-}
(toToolItem self)
(Bool -> CInt
forall a. Num a => Bool -> a
fromBool Bool
visibleVertical)
toolItemGetVisibleVertical :: ToolItemClass self => self -> IO Bool
toolItemGetVisibleVertical :: forall self. ToolItemClass self => self -> IO Bool
toolItemGetVisibleVertical 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
$
(\(ToolItem ForeignPtr ToolItem
arg1) -> ForeignPtr ToolItem -> (Ptr ToolItem -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr ToolItem
arg1 ((Ptr ToolItem -> IO CInt) -> IO CInt)
-> (Ptr ToolItem -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr ToolItem
argPtr1 ->Ptr ToolItem -> IO CInt
gtk_tool_item_get_visible_vertical Ptr ToolItem
argPtr1)
{-# LINE 255 "./Graphics/UI/Gtk/MenuComboToolbar/ToolItem.chs" #-}
(toToolItem self)
toolItemSetIsImportant :: ToolItemClass self => self -> Bool -> IO ()
toolItemSetIsImportant :: forall self. ToolItemClass self => self -> Bool -> IO ()
toolItemSetIsImportant self
self Bool
isImportant =
(\(ToolItem ForeignPtr ToolItem
arg1) CInt
arg2 -> ForeignPtr ToolItem -> (Ptr ToolItem -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr ToolItem
arg1 ((Ptr ToolItem -> IO ()) -> IO ())
-> (Ptr ToolItem -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr ToolItem
argPtr1 ->Ptr ToolItem -> CInt -> IO ()
gtk_tool_item_set_is_important Ptr ToolItem
argPtr1 CInt
arg2)
{-# LINE 266 "./Graphics/UI/Gtk/MenuComboToolbar/ToolItem.chs" #-}
(toToolItem self)
(Bool -> CInt
forall a. Num a => Bool -> a
fromBool Bool
isImportant)
toolItemGetIsImportant :: ToolItemClass self => self -> IO Bool
toolItemGetIsImportant :: forall self. ToolItemClass self => self -> IO Bool
toolItemGetIsImportant 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
$
(\(ToolItem ForeignPtr ToolItem
arg1) -> ForeignPtr ToolItem -> (Ptr ToolItem -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr ToolItem
arg1 ((Ptr ToolItem -> IO CInt) -> IO CInt)
-> (Ptr ToolItem -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr ToolItem
argPtr1 ->Ptr ToolItem -> IO CInt
gtk_tool_item_get_is_important Ptr ToolItem
argPtr1)
{-# LINE 276 "./Graphics/UI/Gtk/MenuComboToolbar/ToolItem.chs" #-}
(toToolItem self)
toolItemGetIconSize :: ToolItemClass self => self -> IO IconSize
toolItemGetIconSize :: forall self. ToolItemClass self => self -> IO IconSize
toolItemGetIconSize self
self =
(CInt -> IconSize) -> IO CInt -> IO IconSize
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM (Int -> IconSize
forall a. Enum a => Int -> a
toEnum (Int -> IconSize) -> (CInt -> Int) -> CInt -> IconSize
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 IconSize) -> IO CInt -> IO IconSize
forall a b. (a -> b) -> a -> b
$
(\(ToolItem ForeignPtr ToolItem
arg1) -> ForeignPtr ToolItem -> (Ptr ToolItem -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr ToolItem
arg1 ((Ptr ToolItem -> IO CInt) -> IO CInt)
-> (Ptr ToolItem -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr ToolItem
argPtr1 ->Ptr ToolItem -> IO CInt
gtk_tool_item_get_icon_size Ptr ToolItem
argPtr1)
{-# LINE 284 "./Graphics/UI/Gtk/MenuComboToolbar/ToolItem.chs" #-}
(toToolItem self)
toolItemGetOrientation :: ToolItemClass self => self -> IO Orientation
toolItemGetOrientation :: forall self. ToolItemClass self => self -> IO Orientation
toolItemGetOrientation self
self =
(CInt -> Orientation) -> IO CInt -> IO Orientation
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM (Int -> Orientation
forall a. Enum a => Int -> a
toEnum (Int -> Orientation) -> (CInt -> Int) -> CInt -> Orientation
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 Orientation) -> IO CInt -> IO Orientation
forall a b. (a -> b) -> a -> b
$
(\(ToolItem ForeignPtr ToolItem
arg1) -> ForeignPtr ToolItem -> (Ptr ToolItem -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr ToolItem
arg1 ((Ptr ToolItem -> IO CInt) -> IO CInt)
-> (Ptr ToolItem -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr ToolItem
argPtr1 ->Ptr ToolItem -> IO CInt
gtk_tool_item_get_orientation Ptr ToolItem
argPtr1)
{-# LINE 292 "./Graphics/UI/Gtk/MenuComboToolbar/ToolItem.chs" #-}
(toToolItem self)
toolItemGetToolbarStyle :: ToolItemClass self => self -> IO ToolbarStyle
toolItemGetToolbarStyle :: forall self. ToolItemClass self => self -> IO ToolbarStyle
toolItemGetToolbarStyle self
self =
(CInt -> ToolbarStyle) -> IO CInt -> IO ToolbarStyle
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM (Int -> ToolbarStyle
forall a. Enum a => Int -> a
toEnum (Int -> ToolbarStyle) -> (CInt -> Int) -> CInt -> ToolbarStyle
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 ToolbarStyle) -> IO CInt -> IO ToolbarStyle
forall a b. (a -> b) -> a -> b
$
(\(ToolItem ForeignPtr ToolItem
arg1) -> ForeignPtr ToolItem -> (Ptr ToolItem -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr ToolItem
arg1 ((Ptr ToolItem -> IO CInt) -> IO CInt)
-> (Ptr ToolItem -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr ToolItem
argPtr1 ->Ptr ToolItem -> IO CInt
gtk_tool_item_get_toolbar_style Ptr ToolItem
argPtr1)
{-# LINE 308 "./Graphics/UI/Gtk/MenuComboToolbar/ToolItem.chs" #-}
(toToolItem self)
toolItemGetReliefStyle :: ToolItemClass self => self -> IO ReliefStyle
toolItemGetReliefStyle :: forall self. ToolItemClass self => self -> IO ReliefStyle
toolItemGetReliefStyle self
self =
(CInt -> ReliefStyle) -> IO CInt -> IO ReliefStyle
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM (Int -> ReliefStyle
forall a. Enum a => Int -> a
toEnum (Int -> ReliefStyle) -> (CInt -> Int) -> CInt -> ReliefStyle
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 ReliefStyle) -> IO CInt -> IO ReliefStyle
forall a b. (a -> b) -> a -> b
$
(\(ToolItem ForeignPtr ToolItem
arg1) -> ForeignPtr ToolItem -> (Ptr ToolItem -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr ToolItem
arg1 ((Ptr ToolItem -> IO CInt) -> IO CInt)
-> (Ptr ToolItem -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr ToolItem
argPtr1 ->Ptr ToolItem -> IO CInt
gtk_tool_item_get_relief_style Ptr ToolItem
argPtr1)
{-# LINE 316 "./Graphics/UI/Gtk/MenuComboToolbar/ToolItem.chs" #-}
(toToolItem self)
toolItemRetrieveProxyMenuItem :: ToolItemClass self => self -> IO (Maybe Widget)
self
self =
(IO (Ptr Widget) -> IO Widget)
-> IO (Ptr Widget) -> IO (Maybe Widget)
forall a. (IO (Ptr a) -> IO a) -> IO (Ptr a) -> IO (Maybe a)
maybeNull ((ForeignPtr Widget -> Widget, FinalizerPtr Widget)
-> IO (Ptr Widget) -> IO Widget
forall obj.
ObjectClass 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) (IO (Ptr Widget) -> IO (Maybe Widget))
-> IO (Ptr Widget) -> IO (Maybe Widget)
forall a b. (a -> b) -> a -> b
$
(\(ToolItem ForeignPtr ToolItem
arg1) -> ForeignPtr ToolItem
-> (Ptr ToolItem -> IO (Ptr Widget)) -> IO (Ptr Widget)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr ToolItem
arg1 ((Ptr ToolItem -> IO (Ptr Widget)) -> IO (Ptr Widget))
-> (Ptr ToolItem -> IO (Ptr Widget)) -> IO (Ptr Widget)
forall a b. (a -> b) -> a -> b
$ \Ptr ToolItem
argPtr1 ->Ptr ToolItem -> IO (Ptr Widget)
gtk_tool_item_retrieve_proxy_menu_item Ptr ToolItem
argPtr1)
{-# LINE 325 "./Graphics/UI/Gtk/MenuComboToolbar/ToolItem.chs" #-}
(toToolItem self)
toolItemGetProxyMenuItem :: (ToolItemClass self, GlibString string) => self
-> string
-> IO (Maybe Widget)
self
self string
menuItemId =
(IO (Ptr Widget) -> IO Widget)
-> IO (Ptr Widget) -> IO (Maybe Widget)
forall a. (IO (Ptr a) -> IO a) -> IO (Ptr a) -> IO (Maybe a)
maybeNull ((ForeignPtr Widget -> Widget, FinalizerPtr Widget)
-> IO (Ptr Widget) -> IO Widget
forall obj.
ObjectClass 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) (IO (Ptr Widget) -> IO (Maybe Widget))
-> IO (Ptr Widget) -> IO (Maybe Widget)
forall a b. (a -> b) -> a -> b
$
string -> (CString -> IO (Ptr Widget)) -> IO (Ptr Widget)
forall a. string -> (CString -> IO a) -> IO a
forall s a. GlibString s => s -> (CString -> IO a) -> IO a
withUTFString string
menuItemId ((CString -> IO (Ptr Widget)) -> IO (Ptr Widget))
-> (CString -> IO (Ptr Widget)) -> IO (Ptr Widget)
forall a b. (a -> b) -> a -> b
$ \CString
menuItemIdPtr ->
(\(ToolItem ForeignPtr ToolItem
arg1) CString
arg2 -> ForeignPtr ToolItem
-> (Ptr ToolItem -> IO (Ptr Widget)) -> IO (Ptr Widget)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr ToolItem
arg1 ((Ptr ToolItem -> IO (Ptr Widget)) -> IO (Ptr Widget))
-> (Ptr ToolItem -> IO (Ptr Widget)) -> IO (Ptr Widget)
forall a b. (a -> b) -> a -> b
$ \Ptr ToolItem
argPtr1 ->Ptr ToolItem -> CString -> IO (Ptr Widget)
gtk_tool_item_get_proxy_menu_item Ptr ToolItem
argPtr1 CString
arg2)
{-# LINE 340 "./Graphics/UI/Gtk/MenuComboToolbar/ToolItem.chs" #-}
(toToolItem self)
CString
menuItemIdPtr
toolItemSetProxyMenuItem :: (ToolItemClass self, MenuItemClass menuItem, GlibString string) => self
-> string
-> menuItem
-> IO ()
self
self string
menuItemId menuItem
menuItem =
string -> (CString -> IO ()) -> IO ()
forall a. string -> (CString -> IO a) -> IO a
forall s a. GlibString s => s -> (CString -> IO a) -> IO a
withUTFString string
menuItemId ((CString -> IO ()) -> IO ()) -> (CString -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \CString
menuItemIdPtr ->
(\(ToolItem ForeignPtr ToolItem
arg1) CString
arg2 (Widget ForeignPtr Widget
arg3) -> ForeignPtr ToolItem -> (Ptr ToolItem -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr ToolItem
arg1 ((Ptr ToolItem -> IO ()) -> IO ())
-> (Ptr ToolItem -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr ToolItem
argPtr1 ->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 ToolItem -> CString -> Ptr Widget -> IO ()
gtk_tool_item_set_proxy_menu_item Ptr ToolItem
argPtr1 CString
arg2 Ptr Widget
argPtr3)
{-# LINE 354 "./Graphics/UI/Gtk/MenuComboToolbar/ToolItem.chs" #-}
(toToolItem self)
CString
menuItemIdPtr
(menuItem -> Widget
forall o. WidgetClass o => o -> Widget
toWidget menuItem
menuItem)
toolItemGetEllipsizeMode :: ToolItemClass item => item
-> IO EllipsizeMode
toolItemGetEllipsizeMode :: forall item. ToolItemClass item => item -> IO EllipsizeMode
toolItemGetEllipsizeMode item
item =
(CInt -> EllipsizeMode) -> IO CInt -> IO EllipsizeMode
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM (Int -> EllipsizeMode
forall a. Enum a => Int -> a
toEnum (Int -> EllipsizeMode) -> (CInt -> Int) -> CInt -> EllipsizeMode
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 EllipsizeMode) -> IO CInt -> IO EllipsizeMode
forall a b. (a -> b) -> a -> b
$
(\(ToolItem ForeignPtr ToolItem
arg1) -> ForeignPtr ToolItem -> (Ptr ToolItem -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr ToolItem
arg1 ((Ptr ToolItem -> IO CInt) -> IO CInt)
-> (Ptr ToolItem -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr ToolItem
argPtr1 ->Ptr ToolItem -> IO CInt
gtk_tool_item_get_ellipsize_mode Ptr ToolItem
argPtr1)
{-# LINE 369 "./Graphics/UI/Gtk/MenuComboToolbar/ToolItem.chs" #-}
(toToolItem item)
toolItemGetTextAlignment :: ToolItemClass item => item
-> IO Double
toolItemGetTextAlignment :: forall item. ToolItemClass item => item -> IO Double
toolItemGetTextAlignment item
item =
(CFloat -> Double) -> IO CFloat -> IO Double
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM CFloat -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac (IO CFloat -> IO Double) -> IO CFloat -> IO Double
forall a b. (a -> b) -> a -> b
$
(\(ToolItem ForeignPtr ToolItem
arg1) -> ForeignPtr ToolItem -> (Ptr ToolItem -> IO CFloat) -> IO CFloat
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr ToolItem
arg1 ((Ptr ToolItem -> IO CFloat) -> IO CFloat)
-> (Ptr ToolItem -> IO CFloat) -> IO CFloat
forall a b. (a -> b) -> a -> b
$ \Ptr ToolItem
argPtr1 ->Ptr ToolItem -> IO CFloat
gtk_tool_item_get_text_alignment Ptr ToolItem
argPtr1)
{-# LINE 378 "./Graphics/UI/Gtk/MenuComboToolbar/ToolItem.chs" #-}
(toToolItem item)
toolItemGetTextOrientation :: ToolItemClass item => item
-> IO Orientation
toolItemGetTextOrientation :: forall self. ToolItemClass self => self -> IO Orientation
toolItemGetTextOrientation item
item =
(CInt -> Orientation) -> IO CInt -> IO Orientation
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM (Int -> Orientation
forall a. Enum a => Int -> a
toEnum (Int -> Orientation) -> (CInt -> Int) -> CInt -> Orientation
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 Orientation) -> IO CInt -> IO Orientation
forall a b. (a -> b) -> a -> b
$
(\(ToolItem ForeignPtr ToolItem
arg1) -> ForeignPtr ToolItem -> (Ptr ToolItem -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr ToolItem
arg1 ((Ptr ToolItem -> IO CInt) -> IO CInt)
-> (Ptr ToolItem -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr ToolItem
argPtr1 ->Ptr ToolItem -> IO CInt
gtk_tool_item_get_text_orientation Ptr ToolItem
argPtr1)
{-# LINE 387 "./Graphics/UI/Gtk/MenuComboToolbar/ToolItem.chs" #-}
(toToolItem item)
toolItemGetTextSizeGroup :: ToolItemClass item => item
-> IO SizeGroup
toolItemGetTextSizeGroup :: forall item. ToolItemClass item => item -> IO SizeGroup
toolItemGetTextSizeGroup item
item =
(ForeignPtr SizeGroup -> SizeGroup, FinalizerPtr SizeGroup)
-> IO (Ptr SizeGroup) -> IO SizeGroup
forall obj.
GObjectClass obj =>
(ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
makeNewGObject (ForeignPtr SizeGroup -> SizeGroup, FinalizerPtr SizeGroup)
forall {a}. (ForeignPtr SizeGroup -> SizeGroup, FinalizerPtr a)
mkSizeGroup (IO (Ptr SizeGroup) -> IO SizeGroup)
-> IO (Ptr SizeGroup) -> IO SizeGroup
forall a b. (a -> b) -> a -> b
$
(\(ToolItem ForeignPtr ToolItem
arg1) -> ForeignPtr ToolItem
-> (Ptr ToolItem -> IO (Ptr SizeGroup)) -> IO (Ptr SizeGroup)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr ToolItem
arg1 ((Ptr ToolItem -> IO (Ptr SizeGroup)) -> IO (Ptr SizeGroup))
-> (Ptr ToolItem -> IO (Ptr SizeGroup)) -> IO (Ptr SizeGroup)
forall a b. (a -> b) -> a -> b
$ \Ptr ToolItem
argPtr1 ->Ptr ToolItem -> IO (Ptr SizeGroup)
gtk_tool_item_get_text_size_group Ptr ToolItem
argPtr1)
{-# LINE 396 "./Graphics/UI/Gtk/MenuComboToolbar/ToolItem.chs" #-}
(toToolItem item)
toolItemVisibleHorizontal :: ToolItemClass self => Attr self Bool
toolItemVisibleHorizontal :: forall self. ToolItemClass self => Attr self Bool
toolItemVisibleHorizontal = (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. ToolItemClass self => self -> IO Bool
toolItemGetVisibleHorizontal
self -> Bool -> IO ()
forall self. ToolItemClass self => self -> Bool -> IO ()
toolItemSetVisibleHorizontal
toolItemVisibleVertical :: ToolItemClass self => Attr self Bool
toolItemVisibleVertical :: forall self. ToolItemClass self => Attr self Bool
toolItemVisibleVertical = (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. ToolItemClass self => self -> IO Bool
toolItemGetVisibleVertical
self -> Bool -> IO ()
forall self. ToolItemClass self => self -> Bool -> IO ()
toolItemSetVisibleVertical
toolItemIsImportant :: ToolItemClass self => Attr self Bool
toolItemIsImportant :: forall self. ToolItemClass self => Attr self Bool
toolItemIsImportant = (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. ToolItemClass self => self -> IO Bool
toolItemGetIsImportant
self -> Bool -> IO ()
forall self. ToolItemClass self => self -> Bool -> IO ()
toolItemSetIsImportant
toolItemExpand :: ToolItemClass self => Attr self Bool
toolItemExpand :: forall self. ToolItemClass self => Attr self Bool
toolItemExpand = (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. ToolItemClass self => self -> IO Bool
toolItemGetExpand
self -> Bool -> IO ()
forall self. ToolItemClass self => self -> Bool -> IO ()
toolItemSetExpand
toolItemHomogeneous :: ToolItemClass self => Attr self Bool
toolItemHomogeneous :: forall self. ToolItemClass self => Attr self Bool
toolItemHomogeneous = (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. ToolItemClass self => self -> IO Bool
toolItemGetHomogeneous
self -> Bool -> IO ()
forall self. ToolItemClass self => self -> Bool -> IO ()
toolItemSetHomogeneous
toolItemUseDragWindow :: ToolItemClass self => Attr self Bool
toolItemUseDragWindow :: forall self. ToolItemClass self => Attr self Bool
toolItemUseDragWindow = (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. ToolItemClass self => self -> IO Bool
toolItemGetUseDragWindow
self -> Bool -> IO ()
forall self. ToolItemClass self => self -> Bool -> IO ()
toolItemSetUseDragWindow
foreign import ccall unsafe "gtk_tool_item_new"
gtk_tool_item_new :: (IO (Ptr ToolItem))
foreign import ccall safe "gtk_tool_item_set_homogeneous"
gtk_tool_item_set_homogeneous :: ((Ptr ToolItem) -> (CInt -> (IO ())))
foreign import ccall unsafe "gtk_tool_item_get_homogeneous"
gtk_tool_item_get_homogeneous :: ((Ptr ToolItem) -> (IO CInt))
foreign import ccall safe "gtk_tool_item_set_expand"
gtk_tool_item_set_expand :: ((Ptr ToolItem) -> (CInt -> (IO ())))
foreign import ccall unsafe "gtk_tool_item_get_expand"
gtk_tool_item_get_expand :: ((Ptr ToolItem) -> (IO CInt))
foreign import ccall safe "gtk_tool_item_set_tooltip"
gtk_tool_item_set_tooltip :: ((Ptr ToolItem) -> ((Ptr Tooltips) -> ((Ptr CChar) -> ((Ptr CChar) -> (IO ())))))
foreign import ccall safe "gtk_tool_item_set_use_drag_window"
gtk_tool_item_set_use_drag_window :: ((Ptr ToolItem) -> (CInt -> (IO ())))
foreign import ccall unsafe "gtk_tool_item_get_use_drag_window"
gtk_tool_item_get_use_drag_window :: ((Ptr ToolItem) -> (IO CInt))
foreign import ccall safe "gtk_tool_item_set_visible_horizontal"
gtk_tool_item_set_visible_horizontal :: ((Ptr ToolItem) -> (CInt -> (IO ())))
foreign import ccall unsafe "gtk_tool_item_get_visible_horizontal"
gtk_tool_item_get_visible_horizontal :: ((Ptr ToolItem) -> (IO CInt))
foreign import ccall safe "gtk_tool_item_set_visible_vertical"
gtk_tool_item_set_visible_vertical :: ((Ptr ToolItem) -> (CInt -> (IO ())))
foreign import ccall unsafe "gtk_tool_item_get_visible_vertical"
gtk_tool_item_get_visible_vertical :: ((Ptr ToolItem) -> (IO CInt))
foreign import ccall safe "gtk_tool_item_set_is_important"
gtk_tool_item_set_is_important :: ((Ptr ToolItem) -> (CInt -> (IO ())))
foreign import ccall unsafe "gtk_tool_item_get_is_important"
gtk_tool_item_get_is_important :: ((Ptr ToolItem) -> (IO CInt))
foreign import ccall unsafe "gtk_tool_item_get_icon_size"
gtk_tool_item_get_icon_size :: ((Ptr ToolItem) -> (IO CInt))
foreign import ccall unsafe "gtk_tool_item_get_orientation"
gtk_tool_item_get_orientation :: ((Ptr ToolItem) -> (IO CInt))
foreign import ccall unsafe "gtk_tool_item_get_toolbar_style"
gtk_tool_item_get_toolbar_style :: ((Ptr ToolItem) -> (IO CInt))
foreign import ccall unsafe "gtk_tool_item_get_relief_style"
gtk_tool_item_get_relief_style :: ((Ptr ToolItem) -> (IO CInt))
foreign import ccall unsafe "gtk_tool_item_retrieve_proxy_menu_item"
:: ((Ptr ToolItem) -> (IO (Ptr Widget)))
foreign import ccall unsafe "gtk_tool_item_get_proxy_menu_item"
:: ((Ptr ToolItem) -> ((Ptr CChar) -> (IO (Ptr Widget))))
foreign import ccall safe "gtk_tool_item_set_proxy_menu_item"
:: ((Ptr ToolItem) -> ((Ptr CChar) -> ((Ptr Widget) -> (IO ()))))
foreign import ccall safe "gtk_tool_item_get_ellipsize_mode"
gtk_tool_item_get_ellipsize_mode :: ((Ptr ToolItem) -> (IO CInt))
foreign import ccall safe "gtk_tool_item_get_text_alignment"
gtk_tool_item_get_text_alignment :: ((Ptr ToolItem) -> (IO CFloat))
foreign import ccall safe "gtk_tool_item_get_text_orientation"
gtk_tool_item_get_text_orientation :: ((Ptr ToolItem) -> (IO CInt))
foreign import ccall safe "gtk_tool_item_get_text_size_group"
gtk_tool_item_get_text_size_group :: ((Ptr ToolItem) -> (IO (Ptr SizeGroup)))