{- | 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.Objects.SeparatorToolItem ( -- * Exported types SeparatorToolItem(..) , SeparatorToolItemK , toSeparatorToolItem , noSeparatorToolItem , -- * Methods -- ** separatorToolItemGetDraw separatorToolItemGetDraw , -- ** separatorToolItemNew separatorToolItemNew , -- ** separatorToolItemSetDraw separatorToolItemSetDraw , -- * Properties -- ** Draw SeparatorToolItemDrawPropertyInfo , constructSeparatorToolItemDraw , getSeparatorToolItemDraw , setSeparatorToolItemDraw , ) 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.Atk as Atk import qualified GI.GObject as GObject newtype SeparatorToolItem = SeparatorToolItem (ForeignPtr SeparatorToolItem) foreign import ccall "gtk_separator_tool_item_get_type" c_gtk_separator_tool_item_get_type :: IO GType type instance ParentTypes SeparatorToolItem = SeparatorToolItemParentTypes type SeparatorToolItemParentTypes = '[ToolItem, Bin, Container, Widget, GObject.Object, Atk.ImplementorIface, Activatable, Buildable] instance GObject SeparatorToolItem where gobjectIsInitiallyUnowned _ = True gobjectType _ = c_gtk_separator_tool_item_get_type class GObject o => SeparatorToolItemK o instance (GObject o, IsDescendantOf SeparatorToolItem o) => SeparatorToolItemK o toSeparatorToolItem :: SeparatorToolItemK o => o -> IO SeparatorToolItem toSeparatorToolItem = unsafeCastTo SeparatorToolItem noSeparatorToolItem :: Maybe SeparatorToolItem noSeparatorToolItem = Nothing -- VVV Prop "draw" -- Type: TBasicType TBoolean -- Flags: [PropertyReadable,PropertyWritable] getSeparatorToolItemDraw :: (MonadIO m, SeparatorToolItemK o) => o -> m Bool getSeparatorToolItemDraw obj = liftIO $ getObjectPropertyBool obj "draw" setSeparatorToolItemDraw :: (MonadIO m, SeparatorToolItemK o) => o -> Bool -> m () setSeparatorToolItemDraw obj val = liftIO $ setObjectPropertyBool obj "draw" val constructSeparatorToolItemDraw :: Bool -> IO ([Char], GValue) constructSeparatorToolItemDraw val = constructObjectPropertyBool "draw" val data SeparatorToolItemDrawPropertyInfo instance AttrInfo SeparatorToolItemDrawPropertyInfo where type AttrAllowedOps SeparatorToolItemDrawPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet] type AttrSetTypeConstraint SeparatorToolItemDrawPropertyInfo = (~) Bool type AttrBaseTypeConstraint SeparatorToolItemDrawPropertyInfo = SeparatorToolItemK type AttrGetType SeparatorToolItemDrawPropertyInfo = Bool type AttrLabel SeparatorToolItemDrawPropertyInfo = "SeparatorToolItem::draw" attrGet _ = getSeparatorToolItemDraw attrSet _ = setSeparatorToolItemDraw attrConstruct _ = constructSeparatorToolItemDraw type instance AttributeList SeparatorToolItem = SeparatorToolItemAttributeList type SeparatorToolItemAttributeList = ('[ '("app-paintable", WidgetAppPaintablePropertyInfo), '("border-width", ContainerBorderWidthPropertyInfo), '("can-default", WidgetCanDefaultPropertyInfo), '("can-focus", WidgetCanFocusPropertyInfo), '("child", ContainerChildPropertyInfo), '("composite-child", WidgetCompositeChildPropertyInfo), '("double-buffered", WidgetDoubleBufferedPropertyInfo), '("draw", SeparatorToolItemDrawPropertyInfo), '("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), '("is-important", ToolItemIsImportantPropertyInfo), '("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), '("related-action", ActivatableRelatedActionPropertyInfo), '("resize-mode", ContainerResizeModePropertyInfo), '("scale-factor", WidgetScaleFactorPropertyInfo), '("sensitive", WidgetSensitivePropertyInfo), '("style", WidgetStylePropertyInfo), '("tooltip-markup", WidgetTooltipMarkupPropertyInfo), '("tooltip-text", WidgetTooltipTextPropertyInfo), '("use-action-appearance", ActivatableUseActionAppearancePropertyInfo), '("valign", WidgetValignPropertyInfo), '("vexpand", WidgetVexpandPropertyInfo), '("vexpand-set", WidgetVexpandSetPropertyInfo), '("visible", WidgetVisiblePropertyInfo), '("visible-horizontal", ToolItemVisibleHorizontalPropertyInfo), '("visible-vertical", ToolItemVisibleVerticalPropertyInfo), '("width-request", WidgetWidthRequestPropertyInfo), '("window", WidgetWindowPropertyInfo)] :: [(Symbol, *)]) type instance SignalList SeparatorToolItem = SeparatorToolItemSignalList type SeparatorToolItemSignalList = ('[ '("accel-closures-changed", WidgetAccelClosuresChangedSignalInfo), '("add", ContainerAddSignalInfo), '("button-press-event", WidgetButtonPressEventSignalInfo), '("button-release-event", WidgetButtonReleaseEventSignalInfo), '("can-activate-accel", WidgetCanActivateAccelSignalInfo), '("check-resize", ContainerCheckResizeSignalInfo), '("child-notify", WidgetChildNotifySignalInfo), '("composited-changed", WidgetCompositedChangedSignalInfo), '("configure-event", WidgetConfigureEventSignalInfo), '("create-menu-proxy", ToolItemCreateMenuProxySignalInfo), '("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), '("remove", ContainerRemoveSignalInfo), '("screen-changed", WidgetScreenChangedSignalInfo), '("scroll-event", WidgetScrollEventSignalInfo), '("selection-clear-event", WidgetSelectionClearEventSignalInfo), '("selection-get", WidgetSelectionGetSignalInfo), '("selection-notify-event", WidgetSelectionNotifyEventSignalInfo), '("selection-received", WidgetSelectionReceivedSignalInfo), '("selection-request-event", WidgetSelectionRequestEventSignalInfo), '("set-focus-child", ContainerSetFocusChildSignalInfo), '("show", WidgetShowSignalInfo), '("show-help", WidgetShowHelpSignalInfo), '("size-allocate", WidgetSizeAllocateSignalInfo), '("state-changed", WidgetStateChangedSignalInfo), '("state-flags-changed", WidgetStateFlagsChangedSignalInfo), '("style-set", WidgetStyleSetSignalInfo), '("style-updated", WidgetStyleUpdatedSignalInfo), '("toolbar-reconfigured", ToolItemToolbarReconfiguredSignalInfo), '("touch-event", WidgetTouchEventSignalInfo), '("unmap", WidgetUnmapSignalInfo), '("unmap-event", WidgetUnmapEventSignalInfo), '("unrealize", WidgetUnrealizeSignalInfo), '("visibility-notify-event", WidgetVisibilityNotifyEventSignalInfo), '("window-state-event", WidgetWindowStateEventSignalInfo), '("notify::[property]", GObjectNotifySignalInfo)] :: [(Symbol, *)]) -- method SeparatorToolItem::new -- method type : Constructor -- Args : [] -- Lengths : [] -- hInArgs : [] -- returnType : TInterface "Gtk" "SeparatorToolItem" -- throws : False -- Skip return : False foreign import ccall "gtk_separator_tool_item_new" gtk_separator_tool_item_new :: IO (Ptr SeparatorToolItem) separatorToolItemNew :: (MonadIO m) => m SeparatorToolItem separatorToolItemNew = liftIO $ do result <- gtk_separator_tool_item_new checkUnexpectedReturnNULL "gtk_separator_tool_item_new" result result' <- (newObject SeparatorToolItem) result return result' -- method SeparatorToolItem::get_draw -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "SeparatorToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "SeparatorToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TBoolean -- throws : False -- Skip return : False foreign import ccall "gtk_separator_tool_item_get_draw" gtk_separator_tool_item_get_draw :: Ptr SeparatorToolItem -> -- _obj : TInterface "Gtk" "SeparatorToolItem" IO CInt separatorToolItemGetDraw :: (MonadIO m, SeparatorToolItemK a) => a -> -- _obj m Bool separatorToolItemGetDraw _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- gtk_separator_tool_item_get_draw _obj' let result' = (/= 0) result touchManagedPtr _obj return result' -- method SeparatorToolItem::set_draw -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "SeparatorToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "draw", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "SeparatorToolItem", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "draw", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "gtk_separator_tool_item_set_draw" gtk_separator_tool_item_set_draw :: Ptr SeparatorToolItem -> -- _obj : TInterface "Gtk" "SeparatorToolItem" CInt -> -- draw : TBasicType TBoolean IO () separatorToolItemSetDraw :: (MonadIO m, SeparatorToolItemK a) => a -> -- _obj Bool -> -- draw m () separatorToolItemSetDraw _obj draw = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj let draw' = (fromIntegral . fromEnum) draw gtk_separator_tool_item_set_draw _obj' draw' touchManagedPtr _obj return ()