{- |
Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
License    : LGPL-2.1
Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)
-}

module GI.Gtk.Interfaces.ToolShell
    ( 

-- * Exported types
    ToolShell(..)                           ,
    noToolShell                             ,
    ToolShellK                              ,
    toToolShell                             ,


 -- * Methods
-- ** toolShellGetEllipsizeMode
    toolShellGetEllipsizeMode               ,


-- ** toolShellGetIconSize
    toolShellGetIconSize                    ,


-- ** toolShellGetOrientation
    toolShellGetOrientation                 ,


-- ** toolShellGetReliefStyle
    toolShellGetReliefStyle                 ,


-- ** toolShellGetStyle
    toolShellGetStyle                       ,


-- ** toolShellGetTextAlignment
    toolShellGetTextAlignment               ,


-- ** toolShellGetTextOrientation
    toolShellGetTextOrientation             ,


-- ** toolShellGetTextSizeGroup
    toolShellGetTextSizeGroup               ,


-- ** toolShellRebuildMenu
    toolShellRebuildMenu                    ,




    ) 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
import qualified GI.GObject as GObject
import qualified GI.Pango as Pango

-- interface ToolShell 

newtype ToolShell = ToolShell (ForeignPtr ToolShell)
noToolShell :: Maybe ToolShell
noToolShell = Nothing

type instance AttributeList ToolShell = ToolShellAttributeList
type ToolShellAttributeList = ('[ '("app-paintable", WidgetAppPaintablePropertyInfo), '("can-default", WidgetCanDefaultPropertyInfo), '("can-focus", WidgetCanFocusPropertyInfo), '("composite-child", WidgetCompositeChildPropertyInfo), '("double-buffered", WidgetDoubleBufferedPropertyInfo), '("events", WidgetEventsPropertyInfo), '("expand", WidgetExpandPropertyInfo), '("halign", WidgetHalignPropertyInfo), '("has-default", WidgetHasDefaultPropertyInfo), '("has-focus", WidgetHasFocusPropertyInfo), '("has-tooltip", WidgetHasTooltipPropertyInfo), '("height-request", WidgetHeightRequestPropertyInfo), '("hexpand", WidgetHexpandPropertyInfo), '("hexpand-set", WidgetHexpandSetPropertyInfo), '("is-focus", WidgetIsFocusPropertyInfo), '("margin", WidgetMarginPropertyInfo), '("margin-bottom", WidgetMarginBottomPropertyInfo), '("margin-end", WidgetMarginEndPropertyInfo), '("margin-left", WidgetMarginLeftPropertyInfo), '("margin-right", WidgetMarginRightPropertyInfo), '("margin-start", WidgetMarginStartPropertyInfo), '("margin-top", WidgetMarginTopPropertyInfo), '("name", WidgetNamePropertyInfo), '("no-show-all", WidgetNoShowAllPropertyInfo), '("opacity", WidgetOpacityPropertyInfo), '("parent", WidgetParentPropertyInfo), '("receives-default", WidgetReceivesDefaultPropertyInfo), '("scale-factor", WidgetScaleFactorPropertyInfo), '("sensitive", WidgetSensitivePropertyInfo), '("style", WidgetStylePropertyInfo), '("tooltip-markup", WidgetTooltipMarkupPropertyInfo), '("tooltip-text", WidgetTooltipTextPropertyInfo), '("valign", WidgetValignPropertyInfo), '("vexpand", WidgetVexpandPropertyInfo), '("vexpand-set", WidgetVexpandSetPropertyInfo), '("visible", WidgetVisiblePropertyInfo), '("width-request", WidgetWidthRequestPropertyInfo), '("window", WidgetWindowPropertyInfo)] :: [(Symbol, *)])

type instance SignalList ToolShell = ToolShellSignalList
type ToolShellSignalList = ('[ '("accel-closures-changed", WidgetAccelClosuresChangedSignalInfo), '("button-press-event", WidgetButtonPressEventSignalInfo), '("button-release-event", WidgetButtonReleaseEventSignalInfo), '("can-activate-accel", WidgetCanActivateAccelSignalInfo), '("child-notify", WidgetChildNotifySignalInfo), '("composited-changed", WidgetCompositedChangedSignalInfo), '("configure-event", WidgetConfigureEventSignalInfo), '("damage-event", WidgetDamageEventSignalInfo), '("delete-event", WidgetDeleteEventSignalInfo), '("destroy", WidgetDestroySignalInfo), '("destroy-event", WidgetDestroyEventSignalInfo), '("direction-changed", WidgetDirectionChangedSignalInfo), '("drag-begin", WidgetDragBeginSignalInfo), '("drag-data-delete", WidgetDragDataDeleteSignalInfo), '("drag-data-get", WidgetDragDataGetSignalInfo), '("drag-data-received", WidgetDragDataReceivedSignalInfo), '("drag-drop", WidgetDragDropSignalInfo), '("drag-end", WidgetDragEndSignalInfo), '("drag-failed", WidgetDragFailedSignalInfo), '("drag-leave", WidgetDragLeaveSignalInfo), '("drag-motion", WidgetDragMotionSignalInfo), '("draw", WidgetDrawSignalInfo), '("enter-notify-event", WidgetEnterNotifyEventSignalInfo), '("event", WidgetEventSignalInfo), '("event-after", WidgetEventAfterSignalInfo), '("focus", WidgetFocusSignalInfo), '("focus-in-event", WidgetFocusInEventSignalInfo), '("focus-out-event", WidgetFocusOutEventSignalInfo), '("grab-broken-event", WidgetGrabBrokenEventSignalInfo), '("grab-focus", WidgetGrabFocusSignalInfo), '("grab-notify", WidgetGrabNotifySignalInfo), '("hide", WidgetHideSignalInfo), '("hierarchy-changed", WidgetHierarchyChangedSignalInfo), '("key-press-event", WidgetKeyPressEventSignalInfo), '("key-release-event", WidgetKeyReleaseEventSignalInfo), '("keynav-failed", WidgetKeynavFailedSignalInfo), '("leave-notify-event", WidgetLeaveNotifyEventSignalInfo), '("map", WidgetMapSignalInfo), '("map-event", WidgetMapEventSignalInfo), '("mnemonic-activate", WidgetMnemonicActivateSignalInfo), '("motion-notify-event", WidgetMotionNotifyEventSignalInfo), '("move-focus", WidgetMoveFocusSignalInfo), '("notify", GObject.ObjectNotifySignalInfo), '("parent-set", WidgetParentSetSignalInfo), '("popup-menu", WidgetPopupMenuSignalInfo), '("property-notify-event", WidgetPropertyNotifyEventSignalInfo), '("proximity-in-event", WidgetProximityInEventSignalInfo), '("proximity-out-event", WidgetProximityOutEventSignalInfo), '("query-tooltip", WidgetQueryTooltipSignalInfo), '("realize", WidgetRealizeSignalInfo), '("screen-changed", WidgetScreenChangedSignalInfo), '("scroll-event", WidgetScrollEventSignalInfo), '("selection-clear-event", WidgetSelectionClearEventSignalInfo), '("selection-get", WidgetSelectionGetSignalInfo), '("selection-notify-event", WidgetSelectionNotifyEventSignalInfo), '("selection-received", WidgetSelectionReceivedSignalInfo), '("selection-request-event", WidgetSelectionRequestEventSignalInfo), '("show", WidgetShowSignalInfo), '("show-help", WidgetShowHelpSignalInfo), '("size-allocate", WidgetSizeAllocateSignalInfo), '("state-changed", WidgetStateChangedSignalInfo), '("state-flags-changed", WidgetStateFlagsChangedSignalInfo), '("style-set", WidgetStyleSetSignalInfo), '("style-updated", WidgetStyleUpdatedSignalInfo), '("touch-event", WidgetTouchEventSignalInfo), '("unmap", WidgetUnmapSignalInfo), '("unmap-event", WidgetUnmapEventSignalInfo), '("unrealize", WidgetUnrealizeSignalInfo), '("visibility-notify-event", WidgetVisibilityNotifyEventSignalInfo), '("window-state-event", WidgetWindowStateEventSignalInfo), '("notify::[property]", GObjectNotifySignalInfo)] :: [(Symbol, *)])

foreign import ccall "gtk_tool_shell_get_type"
    c_gtk_tool_shell_get_type :: IO GType

type instance ParentTypes ToolShell = ToolShellParentTypes
type ToolShellParentTypes = '[Widget, GObject.Object]

instance GObject ToolShell where
    gobjectIsInitiallyUnowned _ = True
    gobjectType _ = c_gtk_tool_shell_get_type
    

class GObject o => ToolShellK o
instance (GObject o, IsDescendantOf ToolShell o) => ToolShellK o

toToolShell :: ToolShellK o => o -> IO ToolShell
toToolShell = unsafeCastTo ToolShell

-- method ToolShell::get_ellipsize_mode
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolShell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolShell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Pango" "EllipsizeMode"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_shell_get_ellipsize_mode" gtk_tool_shell_get_ellipsize_mode :: 
    Ptr ToolShell ->                        -- _obj : TInterface "Gtk" "ToolShell"
    IO CUInt


toolShellGetEllipsizeMode ::
    (MonadIO m, ToolShellK a) =>
    a ->                                    -- _obj
    m Pango.EllipsizeMode
toolShellGetEllipsizeMode _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tool_shell_get_ellipsize_mode _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method ToolShell::get_icon_size
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolShell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolShell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TInt32
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_shell_get_icon_size" gtk_tool_shell_get_icon_size :: 
    Ptr ToolShell ->                        -- _obj : TInterface "Gtk" "ToolShell"
    IO Int32


toolShellGetIconSize ::
    (MonadIO m, ToolShellK a) =>
    a ->                                    -- _obj
    m Int32
toolShellGetIconSize _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tool_shell_get_icon_size _obj'
    touchManagedPtr _obj
    return result

-- method ToolShell::get_orientation
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolShell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolShell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Orientation"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_shell_get_orientation" gtk_tool_shell_get_orientation :: 
    Ptr ToolShell ->                        -- _obj : TInterface "Gtk" "ToolShell"
    IO CUInt


toolShellGetOrientation ::
    (MonadIO m, ToolShellK a) =>
    a ->                                    -- _obj
    m Orientation
toolShellGetOrientation _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tool_shell_get_orientation _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method ToolShell::get_relief_style
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolShell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolShell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "ReliefStyle"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_shell_get_relief_style" gtk_tool_shell_get_relief_style :: 
    Ptr ToolShell ->                        -- _obj : TInterface "Gtk" "ToolShell"
    IO CUInt


toolShellGetReliefStyle ::
    (MonadIO m, ToolShellK a) =>
    a ->                                    -- _obj
    m ReliefStyle
toolShellGetReliefStyle _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tool_shell_get_relief_style _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method ToolShell::get_style
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolShell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolShell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "ToolbarStyle"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_shell_get_style" gtk_tool_shell_get_style :: 
    Ptr ToolShell ->                        -- _obj : TInterface "Gtk" "ToolShell"
    IO CUInt


toolShellGetStyle ::
    (MonadIO m, ToolShellK a) =>
    a ->                                    -- _obj
    m ToolbarStyle
toolShellGetStyle _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tool_shell_get_style _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method ToolShell::get_text_alignment
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolShell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolShell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TFloat
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_shell_get_text_alignment" gtk_tool_shell_get_text_alignment :: 
    Ptr ToolShell ->                        -- _obj : TInterface "Gtk" "ToolShell"
    IO CFloat


toolShellGetTextAlignment ::
    (MonadIO m, ToolShellK a) =>
    a ->                                    -- _obj
    m Float
toolShellGetTextAlignment _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tool_shell_get_text_alignment _obj'
    let result' = realToFrac result
    touchManagedPtr _obj
    return result'

-- method ToolShell::get_text_orientation
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolShell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolShell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "Orientation"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_shell_get_text_orientation" gtk_tool_shell_get_text_orientation :: 
    Ptr ToolShell ->                        -- _obj : TInterface "Gtk" "ToolShell"
    IO CUInt


toolShellGetTextOrientation ::
    (MonadIO m, ToolShellK a) =>
    a ->                                    -- _obj
    m Orientation
toolShellGetTextOrientation _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tool_shell_get_text_orientation _obj'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr _obj
    return result'

-- method ToolShell::get_text_size_group
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolShell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolShell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "SizeGroup"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_shell_get_text_size_group" gtk_tool_shell_get_text_size_group :: 
    Ptr ToolShell ->                        -- _obj : TInterface "Gtk" "ToolShell"
    IO (Ptr SizeGroup)


toolShellGetTextSizeGroup ::
    (MonadIO m, ToolShellK a) =>
    a ->                                    -- _obj
    m SizeGroup
toolShellGetTextSizeGroup _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_tool_shell_get_text_size_group _obj'
    checkUnexpectedReturnNULL "gtk_tool_shell_get_text_size_group" result
    result' <- (newObject SizeGroup) result
    touchManagedPtr _obj
    return result'

-- method ToolShell::rebuild_menu
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolShell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ToolShell", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TVoid
-- throws : False
-- Skip return : False

foreign import ccall "gtk_tool_shell_rebuild_menu" gtk_tool_shell_rebuild_menu :: 
    Ptr ToolShell ->                        -- _obj : TInterface "Gtk" "ToolShell"
    IO ()


toolShellRebuildMenu ::
    (MonadIO m, ToolShellK a) =>
    a ->                                    -- _obj
    m ()
toolShellRebuildMenu _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    gtk_tool_shell_rebuild_menu _obj'
    touchManagedPtr _obj
    return ()