{- | Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte License : LGPL-2.1 Maintainer : Iñaki García Etxebarria (garetxe@gmail.com) #GtkActionEntry structs are used with gtk_action_group_add_actions() to construct actions. -} module GI.Gtk.Structs.ActionEntry ( -- * Exported types ActionEntry(..) , noActionEntry , -- * Properties -- ** Accelerator actionEntryReadAccelerator , -- ** Label actionEntryReadLabel , -- ** Name actionEntryReadName , -- ** StockId actionEntryReadStockId , -- ** Tooltip actionEntryReadTooltip , ) where import Prelude () import Data.GI.Base.ShortPrelude import qualified Data.Text as T import qualified Data.ByteString.Char8 as B import qualified Data.Map as Map import GI.Gtk.Types import GI.Gtk.Callbacks newtype ActionEntry = ActionEntry (ForeignPtr ActionEntry) noActionEntry :: Maybe ActionEntry noActionEntry = Nothing actionEntryReadName :: ActionEntry -> IO T.Text actionEntryReadName s = withManagedPtr s $ \ptr -> do val <- peek (ptr `plusPtr` 0) :: IO CString val' <- cstringToText val return val' actionEntryReadStockId :: ActionEntry -> IO T.Text actionEntryReadStockId s = withManagedPtr s $ \ptr -> do val <- peek (ptr `plusPtr` 8) :: IO CString val' <- cstringToText val return val' actionEntryReadLabel :: ActionEntry -> IO T.Text actionEntryReadLabel s = withManagedPtr s $ \ptr -> do val <- peek (ptr `plusPtr` 16) :: IO CString val' <- cstringToText val return val' actionEntryReadAccelerator :: ActionEntry -> IO T.Text actionEntryReadAccelerator s = withManagedPtr s $ \ptr -> do val <- peek (ptr `plusPtr` 24) :: IO CString val' <- cstringToText val return val' actionEntryReadTooltip :: ActionEntry -> IO T.Text actionEntryReadTooltip s = withManagedPtr s $ \ptr -> do val <- peek (ptr `plusPtr` 32) :: IO CString val' <- cstringToText val return val' -- XXX Skipped getter for "ActionEntry:callback" :: Not implemented: "Wrapping foreign callbacks is not supported yet"