{- | 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.LockButton ( -- * Exported types LockButton(..) , LockButtonK , toLockButton , noLockButton , -- * Methods -- ** lockButtonGetPermission lockButtonGetPermission , -- ** lockButtonNew lockButtonNew , -- ** lockButtonSetPermission lockButtonSetPermission , -- * Properties -- ** Permission LockButtonPermissionPropertyInfo , constructLockButtonPermission , getLockButtonPermission , setLockButtonPermission , -- ** TextLock LockButtonTextLockPropertyInfo , constructLockButtonTextLock , getLockButtonTextLock , setLockButtonTextLock , -- ** TextUnlock LockButtonTextUnlockPropertyInfo , constructLockButtonTextUnlock , getLockButtonTextUnlock , setLockButtonTextUnlock , -- ** TooltipLock LockButtonTooltipLockPropertyInfo , constructLockButtonTooltipLock , getLockButtonTooltipLock , setLockButtonTooltipLock , -- ** TooltipNotAuthorized LockButtonTooltipNotAuthorizedPropertyInfo, constructLockButtonTooltipNotAuthorized , getLockButtonTooltipNotAuthorized , setLockButtonTooltipNotAuthorized , -- ** TooltipUnlock LockButtonTooltipUnlockPropertyInfo , constructLockButtonTooltipUnlock , getLockButtonTooltipUnlock , setLockButtonTooltipUnlock , ) 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 import qualified GI.Gio as Gio newtype LockButton = LockButton (ForeignPtr LockButton) foreign import ccall "gtk_lock_button_get_type" c_gtk_lock_button_get_type :: IO GType type instance ParentTypes LockButton = LockButtonParentTypes type LockButtonParentTypes = '[Button, Bin, Container, Widget, GObject.Object, Atk.ImplementorIface, Actionable, Activatable, Buildable] instance GObject LockButton where gobjectIsInitiallyUnowned _ = True gobjectType _ = c_gtk_lock_button_get_type class GObject o => LockButtonK o instance (GObject o, IsDescendantOf LockButton o) => LockButtonK o toLockButton :: LockButtonK o => o -> IO LockButton toLockButton = unsafeCastTo LockButton noLockButton :: Maybe LockButton noLockButton = Nothing -- VVV Prop "permission" -- Type: TInterface "Gio" "Permission" -- Flags: [PropertyReadable,PropertyWritable] getLockButtonPermission :: (MonadIO m, LockButtonK o) => o -> m Gio.Permission getLockButtonPermission obj = liftIO $ getObjectPropertyObject obj "permission" Gio.Permission setLockButtonPermission :: (MonadIO m, LockButtonK o, Gio.PermissionK a) => o -> a -> m () setLockButtonPermission obj val = liftIO $ setObjectPropertyObject obj "permission" val constructLockButtonPermission :: (Gio.PermissionK a) => a -> IO ([Char], GValue) constructLockButtonPermission val = constructObjectPropertyObject "permission" val data LockButtonPermissionPropertyInfo instance AttrInfo LockButtonPermissionPropertyInfo where type AttrAllowedOps LockButtonPermissionPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet] type AttrSetTypeConstraint LockButtonPermissionPropertyInfo = Gio.PermissionK type AttrBaseTypeConstraint LockButtonPermissionPropertyInfo = LockButtonK type AttrGetType LockButtonPermissionPropertyInfo = Gio.Permission type AttrLabel LockButtonPermissionPropertyInfo = "LockButton::permission" attrGet _ = getLockButtonPermission attrSet _ = setLockButtonPermission attrConstruct _ = constructLockButtonPermission -- VVV Prop "text-lock" -- Type: TBasicType TUTF8 -- Flags: [PropertyReadable,PropertyWritable,PropertyConstruct] getLockButtonTextLock :: (MonadIO m, LockButtonK o) => o -> m T.Text getLockButtonTextLock obj = liftIO $ getObjectPropertyString obj "text-lock" setLockButtonTextLock :: (MonadIO m, LockButtonK o) => o -> T.Text -> m () setLockButtonTextLock obj val = liftIO $ setObjectPropertyString obj "text-lock" val constructLockButtonTextLock :: T.Text -> IO ([Char], GValue) constructLockButtonTextLock val = constructObjectPropertyString "text-lock" val data LockButtonTextLockPropertyInfo instance AttrInfo LockButtonTextLockPropertyInfo where type AttrAllowedOps LockButtonTextLockPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet] type AttrSetTypeConstraint LockButtonTextLockPropertyInfo = (~) T.Text type AttrBaseTypeConstraint LockButtonTextLockPropertyInfo = LockButtonK type AttrGetType LockButtonTextLockPropertyInfo = T.Text type AttrLabel LockButtonTextLockPropertyInfo = "LockButton::text-lock" attrGet _ = getLockButtonTextLock attrSet _ = setLockButtonTextLock attrConstruct _ = constructLockButtonTextLock -- VVV Prop "text-unlock" -- Type: TBasicType TUTF8 -- Flags: [PropertyReadable,PropertyWritable,PropertyConstruct] getLockButtonTextUnlock :: (MonadIO m, LockButtonK o) => o -> m T.Text getLockButtonTextUnlock obj = liftIO $ getObjectPropertyString obj "text-unlock" setLockButtonTextUnlock :: (MonadIO m, LockButtonK o) => o -> T.Text -> m () setLockButtonTextUnlock obj val = liftIO $ setObjectPropertyString obj "text-unlock" val constructLockButtonTextUnlock :: T.Text -> IO ([Char], GValue) constructLockButtonTextUnlock val = constructObjectPropertyString "text-unlock" val data LockButtonTextUnlockPropertyInfo instance AttrInfo LockButtonTextUnlockPropertyInfo where type AttrAllowedOps LockButtonTextUnlockPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet] type AttrSetTypeConstraint LockButtonTextUnlockPropertyInfo = (~) T.Text type AttrBaseTypeConstraint LockButtonTextUnlockPropertyInfo = LockButtonK type AttrGetType LockButtonTextUnlockPropertyInfo = T.Text type AttrLabel LockButtonTextUnlockPropertyInfo = "LockButton::text-unlock" attrGet _ = getLockButtonTextUnlock attrSet _ = setLockButtonTextUnlock attrConstruct _ = constructLockButtonTextUnlock -- VVV Prop "tooltip-lock" -- Type: TBasicType TUTF8 -- Flags: [PropertyReadable,PropertyWritable,PropertyConstruct] getLockButtonTooltipLock :: (MonadIO m, LockButtonK o) => o -> m T.Text getLockButtonTooltipLock obj = liftIO $ getObjectPropertyString obj "tooltip-lock" setLockButtonTooltipLock :: (MonadIO m, LockButtonK o) => o -> T.Text -> m () setLockButtonTooltipLock obj val = liftIO $ setObjectPropertyString obj "tooltip-lock" val constructLockButtonTooltipLock :: T.Text -> IO ([Char], GValue) constructLockButtonTooltipLock val = constructObjectPropertyString "tooltip-lock" val data LockButtonTooltipLockPropertyInfo instance AttrInfo LockButtonTooltipLockPropertyInfo where type AttrAllowedOps LockButtonTooltipLockPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet] type AttrSetTypeConstraint LockButtonTooltipLockPropertyInfo = (~) T.Text type AttrBaseTypeConstraint LockButtonTooltipLockPropertyInfo = LockButtonK type AttrGetType LockButtonTooltipLockPropertyInfo = T.Text type AttrLabel LockButtonTooltipLockPropertyInfo = "LockButton::tooltip-lock" attrGet _ = getLockButtonTooltipLock attrSet _ = setLockButtonTooltipLock attrConstruct _ = constructLockButtonTooltipLock -- VVV Prop "tooltip-not-authorized" -- Type: TBasicType TUTF8 -- Flags: [PropertyReadable,PropertyWritable,PropertyConstruct] getLockButtonTooltipNotAuthorized :: (MonadIO m, LockButtonK o) => o -> m T.Text getLockButtonTooltipNotAuthorized obj = liftIO $ getObjectPropertyString obj "tooltip-not-authorized" setLockButtonTooltipNotAuthorized :: (MonadIO m, LockButtonK o) => o -> T.Text -> m () setLockButtonTooltipNotAuthorized obj val = liftIO $ setObjectPropertyString obj "tooltip-not-authorized" val constructLockButtonTooltipNotAuthorized :: T.Text -> IO ([Char], GValue) constructLockButtonTooltipNotAuthorized val = constructObjectPropertyString "tooltip-not-authorized" val data LockButtonTooltipNotAuthorizedPropertyInfo instance AttrInfo LockButtonTooltipNotAuthorizedPropertyInfo where type AttrAllowedOps LockButtonTooltipNotAuthorizedPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet] type AttrSetTypeConstraint LockButtonTooltipNotAuthorizedPropertyInfo = (~) T.Text type AttrBaseTypeConstraint LockButtonTooltipNotAuthorizedPropertyInfo = LockButtonK type AttrGetType LockButtonTooltipNotAuthorizedPropertyInfo = T.Text type AttrLabel LockButtonTooltipNotAuthorizedPropertyInfo = "LockButton::tooltip-not-authorized" attrGet _ = getLockButtonTooltipNotAuthorized attrSet _ = setLockButtonTooltipNotAuthorized attrConstruct _ = constructLockButtonTooltipNotAuthorized -- VVV Prop "tooltip-unlock" -- Type: TBasicType TUTF8 -- Flags: [PropertyReadable,PropertyWritable,PropertyConstruct] getLockButtonTooltipUnlock :: (MonadIO m, LockButtonK o) => o -> m T.Text getLockButtonTooltipUnlock obj = liftIO $ getObjectPropertyString obj "tooltip-unlock" setLockButtonTooltipUnlock :: (MonadIO m, LockButtonK o) => o -> T.Text -> m () setLockButtonTooltipUnlock obj val = liftIO $ setObjectPropertyString obj "tooltip-unlock" val constructLockButtonTooltipUnlock :: T.Text -> IO ([Char], GValue) constructLockButtonTooltipUnlock val = constructObjectPropertyString "tooltip-unlock" val data LockButtonTooltipUnlockPropertyInfo instance AttrInfo LockButtonTooltipUnlockPropertyInfo where type AttrAllowedOps LockButtonTooltipUnlockPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet] type AttrSetTypeConstraint LockButtonTooltipUnlockPropertyInfo = (~) T.Text type AttrBaseTypeConstraint LockButtonTooltipUnlockPropertyInfo = LockButtonK type AttrGetType LockButtonTooltipUnlockPropertyInfo = T.Text type AttrLabel LockButtonTooltipUnlockPropertyInfo = "LockButton::tooltip-unlock" attrGet _ = getLockButtonTooltipUnlock attrSet _ = setLockButtonTooltipUnlock attrConstruct _ = constructLockButtonTooltipUnlock type instance AttributeList LockButton = LockButtonAttributeList type LockButtonAttributeList = ('[ '("action-name", ActionableActionNamePropertyInfo), '("action-target", ActionableActionTargetPropertyInfo), '("always-show-image", ButtonAlwaysShowImagePropertyInfo), '("app-paintable", WidgetAppPaintablePropertyInfo), '("border-width", ContainerBorderWidthPropertyInfo), '("can-default", WidgetCanDefaultPropertyInfo), '("can-focus", WidgetCanFocusPropertyInfo), '("child", ContainerChildPropertyInfo), '("composite-child", WidgetCompositeChildPropertyInfo), '("double-buffered", WidgetDoubleBufferedPropertyInfo), '("events", WidgetEventsPropertyInfo), '("expand", WidgetExpandPropertyInfo), '("focus-on-click", ButtonFocusOnClickPropertyInfo), '("halign", WidgetHalignPropertyInfo), '("has-default", WidgetHasDefaultPropertyInfo), '("has-focus", WidgetHasFocusPropertyInfo), '("has-tooltip", WidgetHasTooltipPropertyInfo), '("height-request", WidgetHeightRequestPropertyInfo), '("hexpand", WidgetHexpandPropertyInfo), '("hexpand-set", WidgetHexpandSetPropertyInfo), '("image", ButtonImagePropertyInfo), '("image-position", ButtonImagePositionPropertyInfo), '("is-focus", WidgetIsFocusPropertyInfo), '("label", ButtonLabelPropertyInfo), '("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), '("permission", LockButtonPermissionPropertyInfo), '("receives-default", WidgetReceivesDefaultPropertyInfo), '("related-action", ActivatableRelatedActionPropertyInfo), '("relief", ButtonReliefPropertyInfo), '("resize-mode", ContainerResizeModePropertyInfo), '("scale-factor", WidgetScaleFactorPropertyInfo), '("sensitive", WidgetSensitivePropertyInfo), '("style", WidgetStylePropertyInfo), '("text-lock", LockButtonTextLockPropertyInfo), '("text-unlock", LockButtonTextUnlockPropertyInfo), '("tooltip-lock", LockButtonTooltipLockPropertyInfo), '("tooltip-markup", WidgetTooltipMarkupPropertyInfo), '("tooltip-not-authorized", LockButtonTooltipNotAuthorizedPropertyInfo), '("tooltip-text", WidgetTooltipTextPropertyInfo), '("tooltip-unlock", LockButtonTooltipUnlockPropertyInfo), '("use-action-appearance", ActivatableUseActionAppearancePropertyInfo), '("use-stock", ButtonUseStockPropertyInfo), '("use-underline", ButtonUseUnderlinePropertyInfo), '("valign", WidgetValignPropertyInfo), '("vexpand", WidgetVexpandPropertyInfo), '("vexpand-set", WidgetVexpandSetPropertyInfo), '("visible", WidgetVisiblePropertyInfo), '("width-request", WidgetWidthRequestPropertyInfo), '("window", WidgetWindowPropertyInfo), '("xalign", ButtonXalignPropertyInfo), '("yalign", ButtonYalignPropertyInfo)] :: [(Symbol, *)]) type instance SignalList LockButton = LockButtonSignalList type LockButtonSignalList = ('[ '("accel-closures-changed", WidgetAccelClosuresChangedSignalInfo), '("activate", ButtonActivateSignalInfo), '("add", ContainerAddSignalInfo), '("button-press-event", WidgetButtonPressEventSignalInfo), '("button-release-event", WidgetButtonReleaseEventSignalInfo), '("can-activate-accel", WidgetCanActivateAccelSignalInfo), '("check-resize", ContainerCheckResizeSignalInfo), '("child-notify", WidgetChildNotifySignalInfo), '("clicked", ButtonClickedSignalInfo), '("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", ButtonEnterSignalInfo), '("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", ButtonLeaveSignalInfo), '("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), '("pressed", ButtonPressedSignalInfo), '("property-notify-event", WidgetPropertyNotifyEventSignalInfo), '("proximity-in-event", WidgetProximityInEventSignalInfo), '("proximity-out-event", WidgetProximityOutEventSignalInfo), '("query-tooltip", WidgetQueryTooltipSignalInfo), '("realize", WidgetRealizeSignalInfo), '("released", ButtonReleasedSignalInfo), '("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), '("touch-event", WidgetTouchEventSignalInfo), '("unmap", WidgetUnmapSignalInfo), '("unmap-event", WidgetUnmapEventSignalInfo), '("unrealize", WidgetUnrealizeSignalInfo), '("visibility-notify-event", WidgetVisibilityNotifyEventSignalInfo), '("window-state-event", WidgetWindowStateEventSignalInfo), '("notify::[property]", GObjectNotifySignalInfo)] :: [(Symbol, *)]) -- method LockButton::new -- method type : Constructor -- Args : [Arg {argName = "permission", argType = TInterface "Gio" "Permission", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "permission", argType = TInterface "Gio" "Permission", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TInterface "Gtk" "LockButton" -- throws : False -- Skip return : False foreign import ccall "gtk_lock_button_new" gtk_lock_button_new :: Ptr Gio.Permission -> -- permission : TInterface "Gio" "Permission" IO (Ptr LockButton) lockButtonNew :: (MonadIO m, Gio.PermissionK a) => Maybe (a) -> -- permission m LockButton lockButtonNew permission = liftIO $ do maybePermission <- case permission of Nothing -> return nullPtr Just jPermission -> do let jPermission' = unsafeManagedPtrCastPtr jPermission return jPermission' result <- gtk_lock_button_new maybePermission checkUnexpectedReturnNULL "gtk_lock_button_new" result result' <- (newObject LockButton) result whenJust permission touchManagedPtr return result' -- method LockButton::get_permission -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "LockButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "LockButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TInterface "Gio" "Permission" -- throws : False -- Skip return : False foreign import ccall "gtk_lock_button_get_permission" gtk_lock_button_get_permission :: Ptr LockButton -> -- _obj : TInterface "Gtk" "LockButton" IO (Ptr Gio.Permission) lockButtonGetPermission :: (MonadIO m, LockButtonK a) => a -> -- _obj m Gio.Permission lockButtonGetPermission _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- gtk_lock_button_get_permission _obj' checkUnexpectedReturnNULL "gtk_lock_button_get_permission" result result' <- (newObject Gio.Permission) result touchManagedPtr _obj return result' -- method LockButton::set_permission -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "LockButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "permission", argType = TInterface "Gio" "Permission", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "LockButton", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "permission", argType = TInterface "Gio" "Permission", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "gtk_lock_button_set_permission" gtk_lock_button_set_permission :: Ptr LockButton -> -- _obj : TInterface "Gtk" "LockButton" Ptr Gio.Permission -> -- permission : TInterface "Gio" "Permission" IO () lockButtonSetPermission :: (MonadIO m, LockButtonK a, Gio.PermissionK b) => a -> -- _obj Maybe (b) -> -- permission m () lockButtonSetPermission _obj permission = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj maybePermission <- case permission of Nothing -> return nullPtr Just jPermission -> do let jPermission' = unsafeManagedPtrCastPtr jPermission return jPermission' gtk_lock_button_set_permission _obj' maybePermission touchManagedPtr _obj whenJust permission touchManagedPtr return ()