{-# LINE 2 "./Graphics/UI/Gtk/ActionMenuToolbar/Action.chs" #-}
module Graphics.UI.Gtk.ActionMenuToolbar.Action (
Action,
ActionClass,
castToAction, gTypeAction,
toAction,
actionNew,
actionGetName,
actionIsSensitive,
actionGetSensitive,
actionSetSensitive,
actionIsVisible,
actionGetVisible,
actionSetVisible,
actionActivate,
actionCreateMenuItem,
actionCreateToolItem,
actionConnectProxy,
actionDisconnectProxy,
actionGetProxies,
actionConnectAccelerator,
actionDisconnectAccelerator,
actionGetAccelPath,
actionSetAccelPath,
actionSetAccelGroup,
actionName,
actionLabel,
actionShortLabel,
actionTooltip,
actionStockId,
actionVisibleHorizontal,
actionVisibleOverflown,
actionVisibleVertical,
actionIsImportant,
actionHideIfEmpty,
actionSensitive,
actionVisible,
actionAccelPath,
actionAlwaysShowImage,
actionActivated,
onActionActivate,
afterActionActivate,
) where
import Control.Monad (liftM)
import System.Glib.FFI
import System.Glib.UTFString
import System.Glib.GList
import System.Glib.Attributes
import System.Glib.Properties
import Graphics.UI.Gtk.Abstract.Object (makeNewObject)
import Graphics.UI.Gtk.Types
{-# LINE 158 "./Graphics/UI/Gtk/ActionMenuToolbar/Action.chs" #-}
import Graphics.UI.Gtk.Signals
{-# LINE 159 "./Graphics/UI/Gtk/ActionMenuToolbar/Action.chs" #-}
import Graphics.UI.Gtk.General.StockItems
{-# LINE 162 "./Graphics/UI/Gtk/ActionMenuToolbar/Action.chs" #-}
actionNew :: GlibString string
=> string
-> string
-> Maybe string
-> Maybe StockId
-> IO Action
actionNew :: forall string.
GlibString string =>
string -> string -> Maybe string -> Maybe StockId -> IO Action
actionNew string
name string
label Maybe string
tooltip Maybe StockId
stockId =
(ForeignPtr Action -> Action, FinalizerPtr Action)
-> IO (Ptr Action) -> IO Action
forall obj.
GObjectClass obj =>
(ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
wrapNewGObject (ForeignPtr Action -> Action, FinalizerPtr Action)
forall {a}. (ForeignPtr Action -> Action, FinalizerPtr a)
mkAction (IO (Ptr Action) -> IO Action) -> IO (Ptr Action) -> IO Action
forall a b. (a -> b) -> a -> b
$
(StockId -> (Ptr CChar -> IO (Ptr Action)) -> IO (Ptr Action))
-> Maybe StockId
-> (Ptr CChar -> IO (Ptr Action))
-> IO (Ptr Action)
forall a b c.
(a -> (Ptr b -> IO c) -> IO c)
-> Maybe a -> (Ptr b -> IO c) -> IO c
maybeWith StockId -> (Ptr CChar -> IO (Ptr Action)) -> IO (Ptr Action)
forall a. StockId -> (Ptr CChar -> IO a) -> IO a
forall s a. GlibString s => s -> (Ptr CChar -> IO a) -> IO a
withUTFString Maybe StockId
stockId ((Ptr CChar -> IO (Ptr Action)) -> IO (Ptr Action))
-> (Ptr CChar -> IO (Ptr Action)) -> IO (Ptr Action)
forall a b. (a -> b) -> a -> b
$ \Ptr CChar
stockIdPtr ->
(string -> (Ptr CChar -> IO (Ptr Action)) -> IO (Ptr Action))
-> Maybe string
-> (Ptr CChar -> IO (Ptr Action))
-> IO (Ptr Action)
forall a b c.
(a -> (Ptr b -> IO c) -> IO c)
-> Maybe a -> (Ptr b -> IO c) -> IO c
maybeWith string -> (Ptr CChar -> IO (Ptr Action)) -> IO (Ptr Action)
forall a. string -> (Ptr CChar -> IO a) -> IO a
forall s a. GlibString s => s -> (Ptr CChar -> IO a) -> IO a
withUTFString Maybe string
tooltip ((Ptr CChar -> IO (Ptr Action)) -> IO (Ptr Action))
-> (Ptr CChar -> IO (Ptr Action)) -> IO (Ptr Action)
forall a b. (a -> b) -> a -> b
$ \Ptr CChar
tooltipPtr ->
string -> (Ptr CChar -> IO (Ptr Action)) -> IO (Ptr Action)
forall a. string -> (Ptr CChar -> IO a) -> IO a
forall s a. GlibString s => s -> (Ptr CChar -> IO a) -> IO a
withUTFString string
label ((Ptr CChar -> IO (Ptr Action)) -> IO (Ptr Action))
-> (Ptr CChar -> IO (Ptr Action)) -> IO (Ptr Action)
forall a b. (a -> b) -> a -> b
$ \Ptr CChar
labelPtr ->
string -> (Ptr CChar -> IO (Ptr Action)) -> IO (Ptr Action)
forall a. string -> (Ptr CChar -> IO a) -> IO a
forall s a. GlibString s => s -> (Ptr CChar -> IO a) -> IO a
withUTFString string
name ((Ptr CChar -> IO (Ptr Action)) -> IO (Ptr Action))
-> (Ptr CChar -> IO (Ptr Action)) -> IO (Ptr Action)
forall a b. (a -> b) -> a -> b
$ \Ptr CChar
namePtr ->
Ptr CChar -> Ptr CChar -> Ptr CChar -> Ptr CChar -> IO (Ptr Action)
gtk_action_new
{-# LINE 188 "./Graphics/UI/Gtk/ActionMenuToolbar/Action.chs" #-}
namePtr
Ptr CChar
labelPtr
Ptr CChar
tooltipPtr
Ptr CChar
stockIdPtr
actionGetName :: (ActionClass self, GlibString string) => self -> IO string
actionGetName :: forall self string.
(ActionClass self, GlibString string) =>
self -> IO string
actionGetName self
self =
(\(Action ForeignPtr Action
arg1) -> ForeignPtr Action
-> (Ptr Action -> IO (Ptr CChar)) -> IO (Ptr CChar)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Action
arg1 ((Ptr Action -> IO (Ptr CChar)) -> IO (Ptr CChar))
-> (Ptr Action -> IO (Ptr CChar)) -> IO (Ptr CChar)
forall a b. (a -> b) -> a -> b
$ \Ptr Action
argPtr1 ->Ptr Action -> IO (Ptr CChar)
gtk_action_get_name Ptr Action
argPtr1)
{-# LINE 201 "./Graphics/UI/Gtk/ActionMenuToolbar/Action.chs" #-}
(toAction self)
IO (Ptr CChar) -> (Ptr CChar -> IO string) -> IO string
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= Ptr CChar -> IO string
forall s. GlibString s => Ptr CChar -> IO s
peekUTFString
actionIsSensitive :: ActionClass self => self
-> IO Bool
actionIsSensitive :: forall self. ActionClass self => self -> IO Bool
actionIsSensitive 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
$
(\(Action ForeignPtr Action
arg1) -> ForeignPtr Action -> (Ptr Action -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Action
arg1 ((Ptr Action -> IO CInt) -> IO CInt)
-> (Ptr Action -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Action
argPtr1 ->Ptr Action -> IO CInt
gtk_action_is_sensitive Ptr Action
argPtr1)
{-# LINE 212 "./Graphics/UI/Gtk/ActionMenuToolbar/Action.chs" #-}
(toAction self)
actionGetSensitive :: ActionClass self => self
-> IO Bool
actionGetSensitive :: forall self. ActionClass self => self -> IO Bool
actionGetSensitive 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
$
(\(Action ForeignPtr Action
arg1) -> ForeignPtr Action -> (Ptr Action -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Action
arg1 ((Ptr Action -> IO CInt) -> IO CInt)
-> (Ptr Action -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Action
argPtr1 ->Ptr Action -> IO CInt
gtk_action_get_sensitive Ptr Action
argPtr1)
{-# LINE 222 "./Graphics/UI/Gtk/ActionMenuToolbar/Action.chs" #-}
(toAction self)
actionSetSensitive :: ActionClass self => self
-> Bool
-> IO ()
actionSetSensitive :: forall self. ActionClass self => self -> Bool -> IO ()
actionSetSensitive self
self Bool
sensitive =
(\(Action ForeignPtr Action
arg1) CInt
arg2 -> ForeignPtr Action -> (Ptr Action -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Action
arg1 ((Ptr Action -> IO ()) -> IO ()) -> (Ptr Action -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Action
argPtr1 ->Ptr Action -> CInt -> IO ()
gtk_action_set_sensitive Ptr Action
argPtr1 CInt
arg2)
{-# LINE 236 "./Graphics/UI/Gtk/ActionMenuToolbar/Action.chs" #-}
(toAction self)
(Bool -> CInt
forall a. Num a => Bool -> a
fromBool Bool
sensitive)
actionIsVisible :: ActionClass self => self
-> IO Bool
actionIsVisible :: forall self. ActionClass self => self -> IO Bool
actionIsVisible 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
$
(\(Action ForeignPtr Action
arg1) -> ForeignPtr Action -> (Ptr Action -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Action
arg1 ((Ptr Action -> IO CInt) -> IO CInt)
-> (Ptr Action -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Action
argPtr1 ->Ptr Action -> IO CInt
gtk_action_is_visible Ptr Action
argPtr1)
{-# LINE 248 "./Graphics/UI/Gtk/ActionMenuToolbar/Action.chs" #-}
(toAction self)
actionGetVisible :: ActionClass self => self
-> IO Bool
actionGetVisible :: forall self. ActionClass self => self -> IO Bool
actionGetVisible 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
$
(\(Action ForeignPtr Action
arg1) -> ForeignPtr Action -> (Ptr Action -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Action
arg1 ((Ptr Action -> IO CInt) -> IO CInt)
-> (Ptr Action -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Action
argPtr1 ->Ptr Action -> IO CInt
gtk_action_get_visible Ptr Action
argPtr1)
{-# LINE 258 "./Graphics/UI/Gtk/ActionMenuToolbar/Action.chs" #-}
(toAction self)
actionSetVisible :: ActionClass self => self
-> Bool
-> IO ()
actionSetVisible :: forall self. ActionClass self => self -> Bool -> IO ()
actionSetVisible self
self Bool
visible =
(\(Action ForeignPtr Action
arg1) CInt
arg2 -> ForeignPtr Action -> (Ptr Action -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Action
arg1 ((Ptr Action -> IO ()) -> IO ()) -> (Ptr Action -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Action
argPtr1 ->Ptr Action -> CInt -> IO ()
gtk_action_set_visible Ptr Action
argPtr1 CInt
arg2)
{-# LINE 272 "./Graphics/UI/Gtk/ActionMenuToolbar/Action.chs" #-}
(toAction self)
(Bool -> CInt
forall a. Num a => Bool -> a
fromBool Bool
visible)
actionActivate :: ActionClass self => self -> IO ()
actionActivate :: forall self. ActionClass self => self -> IO ()
actionActivate self
self =
(\(Action ForeignPtr Action
arg1) -> ForeignPtr Action -> (Ptr Action -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Action
arg1 ((Ptr Action -> IO ()) -> IO ()) -> (Ptr Action -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Action
argPtr1 ->Ptr Action -> IO ()
gtk_action_activate Ptr Action
argPtr1)
{-# LINE 284 "./Graphics/UI/Gtk/ActionMenuToolbar/Action.chs" #-}
(toAction self)
actionCreateMenuItem :: ActionClass self => self
-> IO Widget
self
self =
(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 Widget) -> IO (Ptr Widget) -> IO Widget
forall a b. (a -> b) -> a -> b
$
(\(Action ForeignPtr Action
arg1) -> ForeignPtr Action
-> (Ptr Action -> IO (Ptr Widget)) -> IO (Ptr Widget)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Action
arg1 ((Ptr Action -> IO (Ptr Widget)) -> IO (Ptr Widget))
-> (Ptr Action -> IO (Ptr Widget)) -> IO (Ptr Widget)
forall a b. (a -> b) -> a -> b
$ \Ptr Action
argPtr1 ->Ptr Action -> IO (Ptr Widget)
gtk_action_create_menu_item Ptr Action
argPtr1)
{-# LINE 293 "./Graphics/UI/Gtk/ActionMenuToolbar/Action.chs" #-}
(toAction self)
actionCreateToolItem :: ActionClass self => self
-> IO Widget
actionCreateToolItem :: forall self. ActionClass self => self -> IO Widget
actionCreateToolItem self
self =
(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 Widget) -> IO (Ptr Widget) -> IO Widget
forall a b. (a -> b) -> a -> b
$
(\(Action ForeignPtr Action
arg1) -> ForeignPtr Action
-> (Ptr Action -> IO (Ptr Widget)) -> IO (Ptr Widget)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Action
arg1 ((Ptr Action -> IO (Ptr Widget)) -> IO (Ptr Widget))
-> (Ptr Action -> IO (Ptr Widget)) -> IO (Ptr Widget)
forall a b. (a -> b) -> a -> b
$ \Ptr Action
argPtr1 ->Ptr Action -> IO (Ptr Widget)
gtk_action_create_tool_item Ptr Action
argPtr1)
{-# LINE 302 "./Graphics/UI/Gtk/ActionMenuToolbar/Action.chs" #-}
(toAction self)
actionConnectProxy :: (ActionClass self, WidgetClass proxy) => self
-> proxy
-> IO ()
actionConnectProxy :: forall self proxy.
(ActionClass self, WidgetClass proxy) =>
self -> proxy -> IO ()
actionConnectProxy self
self proxy
proxy =
(\(Action ForeignPtr Action
arg1) (Widget ForeignPtr Widget
arg2) -> ForeignPtr Action -> (Ptr Action -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Action
arg1 ((Ptr Action -> IO ()) -> IO ()) -> (Ptr Action -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Action
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 Action -> Ptr Widget -> IO ()
gtk_action_connect_proxy Ptr Action
argPtr1 Ptr Widget
argPtr2)
{-# LINE 319 "./Graphics/UI/Gtk/ActionMenuToolbar/Action.chs" #-}
(toAction self)
(proxy -> Widget
forall o. WidgetClass o => o -> Widget
toWidget proxy
proxy)
actionDisconnectProxy :: (ActionClass self, WidgetClass proxy) => self
-> proxy
-> IO ()
actionDisconnectProxy :: forall self proxy.
(ActionClass self, WidgetClass proxy) =>
self -> proxy -> IO ()
actionDisconnectProxy self
self proxy
proxy =
(\(Action ForeignPtr Action
arg1) (Widget ForeignPtr Widget
arg2) -> ForeignPtr Action -> (Ptr Action -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Action
arg1 ((Ptr Action -> IO ()) -> IO ()) -> (Ptr Action -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Action
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 Action -> Ptr Widget -> IO ()
gtk_action_disconnect_proxy Ptr Action
argPtr1 Ptr Widget
argPtr2)
{-# LINE 330 "./Graphics/UI/Gtk/ActionMenuToolbar/Action.chs" #-}
(toAction self)
(proxy -> Widget
forall o. WidgetClass o => o -> Widget
toWidget proxy
proxy)
actionGetProxies :: ActionClass self => self -> IO [Widget]
actionGetProxies :: forall self. ActionClass self => self -> IO [Widget]
actionGetProxies self
self =
(\(Action ForeignPtr Action
arg1) -> ForeignPtr Action -> (Ptr Action -> IO (Ptr ())) -> IO (Ptr ())
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Action
arg1 ((Ptr Action -> IO (Ptr ())) -> IO (Ptr ()))
-> (Ptr Action -> IO (Ptr ())) -> IO (Ptr ())
forall a b. (a -> b) -> a -> b
$ \Ptr Action
argPtr1 ->Ptr Action -> IO (Ptr ())
gtk_action_get_proxies Ptr Action
argPtr1)
{-# LINE 339 "./Graphics/UI/Gtk/ActionMenuToolbar/Action.chs" #-}
(toAction self)
IO (Ptr ()) -> (Ptr () -> IO [Ptr Widget]) -> IO [Ptr Widget]
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= Ptr () -> IO [Ptr Widget]
forall a. Ptr () -> IO [Ptr a]
readGSList
IO [Ptr Widget] -> ([Ptr Widget] -> IO [Widget]) -> IO [Widget]
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (Ptr Widget -> IO Widget) -> [Ptr Widget] -> IO [Widget]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
forall (m :: * -> *) a b. Monad m => (a -> m b) -> [a] -> m [b]
mapM (\Ptr Widget
elemPtr -> (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 (Ptr Widget -> IO (Ptr Widget)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Widget
elemPtr))
actionConnectAccelerator :: ActionClass self => self -> IO ()
actionConnectAccelerator :: forall self. ActionClass self => self -> IO ()
actionConnectAccelerator self
self =
(\(Action ForeignPtr Action
arg1) -> ForeignPtr Action -> (Ptr Action -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Action
arg1 ((Ptr Action -> IO ()) -> IO ()) -> (Ptr Action -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Action
argPtr1 ->Ptr Action -> IO ()
gtk_action_connect_accelerator Ptr Action
argPtr1)
{-# LINE 354 "./Graphics/UI/Gtk/ActionMenuToolbar/Action.chs" #-}
(toAction self)
actionDisconnectAccelerator :: ActionClass self => self -> IO ()
actionDisconnectAccelerator :: forall self. ActionClass self => self -> IO ()
actionDisconnectAccelerator self
self =
(\(Action ForeignPtr Action
arg1) -> ForeignPtr Action -> (Ptr Action -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Action
arg1 ((Ptr Action -> IO ()) -> IO ()) -> (Ptr Action -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Action
argPtr1 ->Ptr Action -> IO ()
gtk_action_disconnect_accelerator Ptr Action
argPtr1)
{-# LINE 361 "./Graphics/UI/Gtk/ActionMenuToolbar/Action.chs" #-}
(toAction self)
actionGetAccelPath :: (ActionClass self, GlibString string) => self
-> IO (Maybe string)
actionGetAccelPath :: forall self string.
(ActionClass self, GlibString string) =>
self -> IO (Maybe string)
actionGetAccelPath self
self =
(\(Action ForeignPtr Action
arg1) -> ForeignPtr Action
-> (Ptr Action -> IO (Ptr CChar)) -> IO (Ptr CChar)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Action
arg1 ((Ptr Action -> IO (Ptr CChar)) -> IO (Ptr CChar))
-> (Ptr Action -> IO (Ptr CChar)) -> IO (Ptr CChar)
forall a b. (a -> b) -> a -> b
$ \Ptr Action
argPtr1 ->Ptr Action -> IO (Ptr CChar)
gtk_action_get_accel_path Ptr Action
argPtr1)
{-# LINE 373 "./Graphics/UI/Gtk/ActionMenuToolbar/Action.chs" #-}
(toAction self)
IO (Ptr CChar)
-> (Ptr CChar -> IO (Maybe string)) -> IO (Maybe string)
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (Ptr CChar -> IO string) -> Ptr CChar -> IO (Maybe string)
forall a b. (Ptr a -> IO b) -> Ptr a -> IO (Maybe b)
maybePeek Ptr CChar -> IO string
forall s. GlibString s => Ptr CChar -> IO s
peekUTFString
actionSetAccelPath :: (ActionClass self, GlibString string) => self
-> string
-> IO ()
actionSetAccelPath :: forall self string.
(ActionClass self, GlibString string) =>
self -> string -> IO ()
actionSetAccelPath self
self string
accelPath =
string -> (Ptr CChar -> IO ()) -> IO ()
forall a. string -> (Ptr CChar -> IO a) -> IO a
forall s a. GlibString s => s -> (Ptr CChar -> IO a) -> IO a
withUTFString string
accelPath ((Ptr CChar -> IO ()) -> IO ()) -> (Ptr CChar -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr CChar
accelPathPtr ->
(\(Action ForeignPtr Action
arg1) Ptr CChar
arg2 -> ForeignPtr Action -> (Ptr Action -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Action
arg1 ((Ptr Action -> IO ()) -> IO ()) -> (Ptr Action -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Action
argPtr1 ->Ptr Action -> Ptr CChar -> IO ()
gtk_action_set_accel_path Ptr Action
argPtr1 Ptr CChar
arg2)
{-# LINE 387 "./Graphics/UI/Gtk/ActionMenuToolbar/Action.chs" #-}
(toAction self)
Ptr CChar
accelPathPtr
actionSetAccelGroup :: ActionClass self => self -> AccelGroup -> IO ()
actionSetAccelGroup :: forall self. ActionClass self => self -> AccelGroup -> IO ()
actionSetAccelGroup self
self AccelGroup
accelGroup =
(\(Action ForeignPtr Action
arg1) (AccelGroup ForeignPtr AccelGroup
arg2) -> ForeignPtr Action -> (Ptr Action -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Action
arg1 ((Ptr Action -> IO ()) -> IO ()) -> (Ptr Action -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Action
argPtr1 ->ForeignPtr AccelGroup -> (Ptr AccelGroup -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr AccelGroup
arg2 ((Ptr AccelGroup -> IO ()) -> IO ())
-> (Ptr AccelGroup -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr AccelGroup
argPtr2 ->Ptr Action -> Ptr AccelGroup -> IO ()
gtk_action_set_accel_group Ptr Action
argPtr1 Ptr AccelGroup
argPtr2)
{-# LINE 396 "./Graphics/UI/Gtk/ActionMenuToolbar/Action.chs" #-}
(toAction self)
AccelGroup
accelGroup
actionName :: GlibString string => ActionClass self => Attr self string
actionName :: forall string self.
(GlibString string, ActionClass self) =>
Attr self string
actionName = String -> Attr self string
forall gobj string.
(GObjectClass gobj, GlibString string) =>
String -> Attr gobj string
newAttrFromStringProperty String
"name"
actionLabel :: GlibString string => ActionClass self => Attr self string
actionLabel :: forall string self.
(GlibString string, ActionClass self) =>
Attr self string
actionLabel = String -> Attr self string
forall gobj string.
(GObjectClass gobj, GlibString string) =>
String -> Attr gobj string
newAttrFromStringProperty String
"label"
actionShortLabel :: GlibString string => ActionClass self => Attr self string
actionShortLabel :: forall string self.
(GlibString string, ActionClass self) =>
Attr self string
actionShortLabel = String -> Attr self string
forall gobj string.
(GObjectClass gobj, GlibString string) =>
String -> Attr gobj string
newAttrFromStringProperty String
"short-label"
actionTooltip :: GlibString string => ActionClass self => Attr self (Maybe string)
actionTooltip :: forall string self.
(GlibString string, ActionClass self) =>
Attr self (Maybe string)
actionTooltip = String -> Attr self (Maybe string)
forall gobj string.
(GObjectClass gobj, GlibString string) =>
String -> Attr gobj (Maybe string)
newAttrFromMaybeStringProperty String
"tooltip"
actionStockId :: GlibString string => ActionClass self => Attr self (Maybe string)
actionStockId :: forall string self.
(GlibString string, ActionClass self) =>
Attr self (Maybe string)
actionStockId = String -> Attr self (Maybe string)
forall gobj string.
(GObjectClass gobj, GlibString string) =>
String -> Attr gobj (Maybe string)
newAttrFromMaybeStringProperty String
"stock_id"
actionVisibleHorizontal :: ActionClass self => Attr self Bool
actionVisibleHorizontal :: forall self. ActionClass self => Attr self Bool
actionVisibleHorizontal = String -> Attr self Bool
forall gobj. GObjectClass gobj => String -> Attr gobj Bool
newAttrFromBoolProperty String
"visible-horizontal"
actionVisibleOverflown :: ActionClass self => Attr self Bool
actionVisibleOverflown :: forall self. ActionClass self => Attr self Bool
actionVisibleOverflown = String -> Attr self Bool
forall gobj. GObjectClass gobj => String -> Attr gobj Bool
newAttrFromBoolProperty String
"visible-overflown"
actionVisibleVertical :: ActionClass self => Attr self Bool
actionVisibleVertical :: forall self. ActionClass self => Attr self Bool
actionVisibleVertical = String -> Attr self Bool
forall gobj. GObjectClass gobj => String -> Attr gobj Bool
newAttrFromBoolProperty String
"visible-vertical"
actionIsImportant :: ActionClass self => Attr self Bool
actionIsImportant :: forall self. ActionClass self => Attr self Bool
actionIsImportant = String -> Attr self Bool
forall gobj. GObjectClass gobj => String -> Attr gobj Bool
newAttrFromBoolProperty String
"is-important"
actionHideIfEmpty :: ActionClass self => Attr self Bool
actionHideIfEmpty :: forall self. ActionClass self => Attr self Bool
actionHideIfEmpty = String -> Attr self Bool
forall gobj. GObjectClass gobj => String -> Attr gobj Bool
newAttrFromBoolProperty String
"hide-if-empty"
actionSensitive :: ActionClass self => Attr self Bool
actionSensitive :: forall self. ActionClass self => Attr self Bool
actionSensitive = (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. ActionClass self => self -> IO Bool
actionGetSensitive
self -> Bool -> IO ()
forall self. ActionClass self => self -> Bool -> IO ()
actionSetSensitive
actionVisible :: ActionClass self => Attr self Bool
actionVisible :: forall self. ActionClass self => Attr self Bool
actionVisible = (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. ActionClass self => self -> IO Bool
actionGetVisible
self -> Bool -> IO ()
forall self. ActionClass self => self -> Bool -> IO ()
actionSetVisible
actionAccelPath :: GlibString string => ActionClass self => ReadWriteAttr self (Maybe string) string
actionAccelPath :: forall string self.
(GlibString string, ActionClass self) =>
ReadWriteAttr self (Maybe string) string
actionAccelPath = (self -> IO (Maybe string))
-> (self -> string -> IO ())
-> ReadWriteAttr self (Maybe string) string
forall o a b.
(o -> IO a) -> (o -> b -> IO ()) -> ReadWriteAttr o a b
newAttr
self -> IO (Maybe string)
forall self string.
(ActionClass self, GlibString string) =>
self -> IO (Maybe string)
actionGetAccelPath
self -> string -> IO ()
forall self string.
(ActionClass self, GlibString string) =>
self -> string -> IO ()
actionSetAccelPath
actionAlwaysShowImage :: ActionClass self => Attr self Bool
actionAlwaysShowImage :: forall self. ActionClass self => Attr self Bool
actionAlwaysShowImage = String -> Attr self Bool
forall gobj. GObjectClass gobj => String -> Attr gobj Bool
newAttrFromBoolProperty String
"always-show-image"
actionActivated :: ActionClass self => Signal self (IO ())
actionActivated :: forall self. ActionClass self => Signal self (IO ())
actionActivated = (Bool -> self -> IO () -> IO (ConnectId self))
-> Signal self (IO ())
forall object handler.
(Bool -> object -> handler -> IO (ConnectId object))
-> Signal object handler
Signal (String -> Bool -> self -> IO () -> IO (ConnectId self)
forall obj.
GObjectClass obj =>
String -> Bool -> obj -> IO () -> IO (ConnectId obj)
connect_NONE__NONE String
"activate")
onActionActivate, afterActionActivate :: ActionClass self => self
-> IO ()
-> IO (ConnectId self)
onActionActivate :: forall self.
ActionClass self =>
self -> IO () -> IO (ConnectId self)
onActionActivate = String -> Bool -> self -> IO () -> IO (ConnectId self)
forall obj.
GObjectClass obj =>
String -> Bool -> obj -> IO () -> IO (ConnectId obj)
connect_NONE__NONE String
"activate" Bool
False
afterActionActivate :: forall self.
ActionClass self =>
self -> IO () -> IO (ConnectId self)
afterActionActivate = String -> Bool -> self -> IO () -> IO (ConnectId self)
forall obj.
GObjectClass obj =>
String -> Bool -> obj -> IO () -> IO (ConnectId obj)
connect_NONE__NONE String
"activate" Bool
True
foreign import ccall safe "gtk_action_new"
gtk_action_new :: ((Ptr CChar) -> ((Ptr CChar) -> ((Ptr CChar) -> ((Ptr CChar) -> (IO (Ptr Action))))))
foreign import ccall safe "gtk_action_get_name"
gtk_action_get_name :: ((Ptr Action) -> (IO (Ptr CChar)))
foreign import ccall safe "gtk_action_is_sensitive"
gtk_action_is_sensitive :: ((Ptr Action) -> (IO CInt))
foreign import ccall safe "gtk_action_get_sensitive"
gtk_action_get_sensitive :: ((Ptr Action) -> (IO CInt))
foreign import ccall safe "gtk_action_set_sensitive"
gtk_action_set_sensitive :: ((Ptr Action) -> (CInt -> (IO ())))
foreign import ccall safe "gtk_action_is_visible"
gtk_action_is_visible :: ((Ptr Action) -> (IO CInt))
foreign import ccall safe "gtk_action_get_visible"
gtk_action_get_visible :: ((Ptr Action) -> (IO CInt))
foreign import ccall safe "gtk_action_set_visible"
gtk_action_set_visible :: ((Ptr Action) -> (CInt -> (IO ())))
foreign import ccall safe "gtk_action_activate"
gtk_action_activate :: ((Ptr Action) -> (IO ()))
foreign import ccall safe "gtk_action_create_menu_item"
:: ((Ptr Action) -> (IO (Ptr Widget)))
foreign import ccall safe "gtk_action_create_tool_item"
gtk_action_create_tool_item :: ((Ptr Action) -> (IO (Ptr Widget)))
foreign import ccall safe "gtk_action_connect_proxy"
gtk_action_connect_proxy :: ((Ptr Action) -> ((Ptr Widget) -> (IO ())))
foreign import ccall safe "gtk_action_disconnect_proxy"
gtk_action_disconnect_proxy :: ((Ptr Action) -> ((Ptr Widget) -> (IO ())))
foreign import ccall safe "gtk_action_get_proxies"
gtk_action_get_proxies :: ((Ptr Action) -> (IO (Ptr ())))
foreign import ccall safe "gtk_action_connect_accelerator"
gtk_action_connect_accelerator :: ((Ptr Action) -> (IO ()))
foreign import ccall safe "gtk_action_disconnect_accelerator"
gtk_action_disconnect_accelerator :: ((Ptr Action) -> (IO ()))
foreign import ccall safe "gtk_action_get_accel_path"
gtk_action_get_accel_path :: ((Ptr Action) -> (IO (Ptr CChar)))
foreign import ccall safe "gtk_action_set_accel_path"
gtk_action_set_accel_path :: ((Ptr Action) -> ((Ptr CChar) -> (IO ())))
foreign import ccall safe "gtk_action_set_accel_group"
gtk_action_set_accel_group :: ((Ptr Action) -> ((Ptr AccelGroup) -> (IO ())))