{-# LANGUAGE ImplicitParams, RankNTypes, TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gtk.Objects.Button
(
Button(..) ,
IsButton ,
toButton ,
#if defined(ENABLE_OVERLOADING)
ResolveButtonMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
ButtonGetCanShrinkMethodInfo ,
#endif
buttonGetCanShrink ,
#if defined(ENABLE_OVERLOADING)
ButtonGetChildMethodInfo ,
#endif
buttonGetChild ,
#if defined(ENABLE_OVERLOADING)
ButtonGetHasFrameMethodInfo ,
#endif
buttonGetHasFrame ,
#if defined(ENABLE_OVERLOADING)
ButtonGetIconNameMethodInfo ,
#endif
buttonGetIconName ,
#if defined(ENABLE_OVERLOADING)
ButtonGetLabelMethodInfo ,
#endif
buttonGetLabel ,
#if defined(ENABLE_OVERLOADING)
ButtonGetUseUnderlineMethodInfo ,
#endif
buttonGetUseUnderline ,
buttonNew ,
buttonNewFromIconName ,
buttonNewWithLabel ,
buttonNewWithMnemonic ,
#if defined(ENABLE_OVERLOADING)
ButtonSetCanShrinkMethodInfo ,
#endif
buttonSetCanShrink ,
#if defined(ENABLE_OVERLOADING)
ButtonSetChildMethodInfo ,
#endif
buttonSetChild ,
#if defined(ENABLE_OVERLOADING)
ButtonSetHasFrameMethodInfo ,
#endif
buttonSetHasFrame ,
#if defined(ENABLE_OVERLOADING)
ButtonSetIconNameMethodInfo ,
#endif
buttonSetIconName ,
#if defined(ENABLE_OVERLOADING)
ButtonSetLabelMethodInfo ,
#endif
buttonSetLabel ,
#if defined(ENABLE_OVERLOADING)
ButtonSetUseUnderlineMethodInfo ,
#endif
buttonSetUseUnderline ,
#if defined(ENABLE_OVERLOADING)
ButtonCanShrinkPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
buttonCanShrink ,
#endif
constructButtonCanShrink ,
getButtonCanShrink ,
setButtonCanShrink ,
#if defined(ENABLE_OVERLOADING)
ButtonChildPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
buttonChild ,
#endif
clearButtonChild ,
constructButtonChild ,
getButtonChild ,
setButtonChild ,
#if defined(ENABLE_OVERLOADING)
ButtonHasFramePropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
buttonHasFrame ,
#endif
constructButtonHasFrame ,
getButtonHasFrame ,
setButtonHasFrame ,
#if defined(ENABLE_OVERLOADING)
ButtonIconNamePropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
buttonIconName ,
#endif
constructButtonIconName ,
getButtonIconName ,
setButtonIconName ,
#if defined(ENABLE_OVERLOADING)
ButtonLabelPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
buttonLabel ,
#endif
constructButtonLabel ,
getButtonLabel ,
setButtonLabel ,
#if defined(ENABLE_OVERLOADING)
ButtonUseUnderlinePropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
buttonUseUnderline ,
#endif
constructButtonUseUnderline ,
getButtonUseUnderline ,
setButtonUseUnderline ,
ButtonActivateCallback ,
#if defined(ENABLE_OVERLOADING)
ButtonActivateSignalInfo ,
#endif
afterButtonActivate ,
onButtonActivate ,
ButtonClickedCallback ,
#if defined(ENABLE_OVERLOADING)
ButtonClickedSignalInfo ,
#endif
afterButtonClicked ,
onButtonClicked ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GHashTable as B.GHT
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.Kind as DK
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GHC.Records as R
import qualified Data.Word as DW
import qualified Data.Int as DI
import qualified System.Posix.Types as SPT
import qualified Foreign.C.Types as FCT
#if MIN_VERSION_base(4,18,0)
import qualified GI.Cairo.Structs.Context as Cairo.Context
import qualified GI.Cairo.Structs.FontOptions as Cairo.FontOptions
import qualified GI.GLib.Callbacks as GLib.Callbacks
import qualified GI.GLib.Structs.Bytes as GLib.Bytes
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gdk.Flags as Gdk.Flags
import qualified GI.Gdk.Interfaces.Paintable as Gdk.Paintable
import qualified GI.Gdk.Objects.Clipboard as Gdk.Clipboard
import qualified GI.Gdk.Objects.Cursor as Gdk.Cursor
import qualified GI.Gdk.Objects.Device as Gdk.Device
import qualified GI.Gdk.Objects.Display as Gdk.Display
import qualified GI.Gdk.Objects.Event as Gdk.Event
import qualified GI.Gdk.Objects.FrameClock as Gdk.FrameClock
import qualified GI.Gdk.Objects.Snapshot as Gdk.Snapshot
import qualified GI.Gdk.Objects.Surface as Gdk.Surface
import qualified GI.Gdk.Objects.Texture as Gdk.Texture
import qualified GI.Gdk.Structs.RGBA as Gdk.RGBA
import qualified GI.Gdk.Structs.Rectangle as Gdk.Rectangle
import qualified GI.Gio.Interfaces.ActionGroup as Gio.ActionGroup
import qualified GI.Gio.Interfaces.Icon as Gio.Icon
import qualified GI.Gio.Interfaces.ListModel as Gio.ListModel
import qualified GI.Graphene.Structs.Matrix as Graphene.Matrix
import qualified GI.Graphene.Structs.Point as Graphene.Point
import qualified GI.Graphene.Structs.Point3D as Graphene.Point3D
import qualified GI.Graphene.Structs.Rect as Graphene.Rect
import qualified GI.Graphene.Structs.Size as Graphene.Size
import qualified GI.Graphene.Structs.Vec3 as Graphene.Vec3
import qualified GI.Graphene.Structs.Vec4 as Graphene.Vec4
import qualified GI.Gsk.Enums as Gsk.Enums
import qualified GI.Gsk.Objects.GLShader as Gsk.GLShader
import qualified GI.Gsk.Objects.RenderNode as Gsk.RenderNode
import qualified GI.Gsk.Objects.Renderer as Gsk.Renderer
import qualified GI.Gsk.Structs.ColorStop as Gsk.ColorStop
import qualified GI.Gsk.Structs.Path as Gsk.Path
import qualified GI.Gsk.Structs.RoundedRect as Gsk.RoundedRect
import qualified GI.Gsk.Structs.Shadow as Gsk.Shadow
import qualified GI.Gsk.Structs.Stroke as Gsk.Stroke
import qualified GI.Gsk.Structs.Transform as Gsk.Transform
import qualified GI.Gtk.Callbacks as Gtk.Callbacks
import {-# SOURCE #-} qualified GI.Gtk.Enums as Gtk.Enums
import {-# SOURCE #-} qualified GI.Gtk.Flags as Gtk.Flags
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.Accessible as Gtk.Accessible
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.Actionable as Gtk.Actionable
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.Buildable as Gtk.Buildable
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.ConstraintTarget as Gtk.ConstraintTarget
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.Native as Gtk.Native
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.Root as Gtk.Root
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.StyleProvider as Gtk.StyleProvider
import {-# SOURCE #-} qualified GI.Gtk.Objects.ATContext as Gtk.ATContext
import {-# SOURCE #-} qualified GI.Gtk.Objects.EventController as Gtk.EventController
import {-# SOURCE #-} qualified GI.Gtk.Objects.LayoutChild as Gtk.LayoutChild
import {-# SOURCE #-} qualified GI.Gtk.Objects.LayoutManager as Gtk.LayoutManager
import {-# SOURCE #-} qualified GI.Gtk.Objects.Settings as Gtk.Settings
import {-# SOURCE #-} qualified GI.Gtk.Objects.Snapshot as Gtk.Snapshot
import {-# SOURCE #-} qualified GI.Gtk.Objects.StyleContext as Gtk.StyleContext
import {-# SOURCE #-} qualified GI.Gtk.Objects.Tooltip as Gtk.Tooltip
import {-# SOURCE #-} qualified GI.Gtk.Objects.Widget as Gtk.Widget
import {-# SOURCE #-} qualified GI.Gtk.Structs.Border as Gtk.Border
import {-# SOURCE #-} qualified GI.Gtk.Structs.Requisition as Gtk.Requisition
import qualified GI.Pango.Enums as Pango.Enums
import qualified GI.Pango.Objects.Context as Pango.Context
import qualified GI.Pango.Objects.FontMap as Pango.FontMap
import qualified GI.Pango.Objects.Layout as Pango.Layout
#else
import qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.Accessible as Gtk.Accessible
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.Actionable as Gtk.Actionable
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.Buildable as Gtk.Buildable
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.ConstraintTarget as Gtk.ConstraintTarget
import {-# SOURCE #-} qualified GI.Gtk.Objects.Widget as Gtk.Widget
#endif
newtype Button = Button (SP.ManagedPtr Button)
deriving (Button -> Button -> Bool
(Button -> Button -> Bool)
-> (Button -> Button -> Bool) -> Eq Button
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Button -> Button -> Bool
== :: Button -> Button -> Bool
$c/= :: Button -> Button -> Bool
/= :: Button -> Button -> Bool
Eq)
instance SP.ManagedPtrNewtype Button where
toManagedPtr :: Button -> ManagedPtr Button
toManagedPtr (Button ManagedPtr Button
p) = ManagedPtr Button
p
foreign import ccall "gtk_button_get_type"
c_gtk_button_get_type :: IO B.Types.GType
instance B.Types.TypedObject Button where
glibType :: IO GType
glibType = IO GType
c_gtk_button_get_type
instance B.Types.GObject Button
class (SP.GObject o, O.IsDescendantOf Button o) => IsButton o
instance (SP.GObject o, O.IsDescendantOf Button o) => IsButton o
instance O.HasParentTypes Button
type instance O.ParentTypes Button = '[Gtk.Widget.Widget, GObject.Object.Object, Gtk.Accessible.Accessible, Gtk.Actionable.Actionable, Gtk.Buildable.Buildable, Gtk.ConstraintTarget.ConstraintTarget]
toButton :: (MIO.MonadIO m, IsButton o) => o -> m Button
toButton :: forall (m :: * -> *) o. (MonadIO m, IsButton o) => o -> m Button
toButton = IO Button -> m Button
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Button -> m Button) -> (o -> IO Button) -> o -> m Button
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr Button -> Button) -> o -> IO Button
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr Button -> Button
Button
instance B.GValue.IsGValue (Maybe Button) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_gtk_button_get_type
gvalueSet_ :: Ptr GValue -> Maybe Button -> IO ()
gvalueSet_ Ptr GValue
gv Maybe Button
P.Nothing = Ptr GValue -> Ptr Button -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr Button
forall a. Ptr a
FP.nullPtr :: FP.Ptr Button)
gvalueSet_ Ptr GValue
gv (P.Just Button
obj) = Button -> (Ptr Button -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr Button
obj (Ptr GValue -> Ptr Button -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe Button)
gvalueGet_ Ptr GValue
gv = do
Ptr Button
ptr <- Ptr GValue -> IO (Ptr Button)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr Button)
if Ptr Button
ptr Ptr Button -> Ptr Button -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr Button
forall a. Ptr a
FP.nullPtr
then Button -> Maybe Button
forall a. a -> Maybe a
P.Just (Button -> Maybe Button) -> IO Button -> IO (Maybe Button)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr Button -> Button) -> Ptr Button -> IO Button
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr Button -> Button
Button Ptr Button
ptr
else Maybe Button -> IO (Maybe Button)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Button
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveButtonMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveButtonMethod "actionSetEnabled" o = Gtk.Widget.WidgetActionSetEnabledMethodInfo
ResolveButtonMethod "activate" o = Gtk.Widget.WidgetActivateMethodInfo
ResolveButtonMethod "activateAction" o = Gtk.Widget.WidgetActivateActionMethodInfo
ResolveButtonMethod "activateDefault" o = Gtk.Widget.WidgetActivateDefaultMethodInfo
ResolveButtonMethod "addController" o = Gtk.Widget.WidgetAddControllerMethodInfo
ResolveButtonMethod "addCssClass" o = Gtk.Widget.WidgetAddCssClassMethodInfo
ResolveButtonMethod "addMnemonicLabel" o = Gtk.Widget.WidgetAddMnemonicLabelMethodInfo
ResolveButtonMethod "addTickCallback" o = Gtk.Widget.WidgetAddTickCallbackMethodInfo
ResolveButtonMethod "allocate" o = Gtk.Widget.WidgetAllocateMethodInfo
ResolveButtonMethod "announce" o = Gtk.Accessible.AccessibleAnnounceMethodInfo
ResolveButtonMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveButtonMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveButtonMethod "childFocus" o = Gtk.Widget.WidgetChildFocusMethodInfo
ResolveButtonMethod "computeBounds" o = Gtk.Widget.WidgetComputeBoundsMethodInfo
ResolveButtonMethod "computeExpand" o = Gtk.Widget.WidgetComputeExpandMethodInfo
ResolveButtonMethod "computePoint" o = Gtk.Widget.WidgetComputePointMethodInfo
ResolveButtonMethod "computeTransform" o = Gtk.Widget.WidgetComputeTransformMethodInfo
ResolveButtonMethod "contains" o = Gtk.Widget.WidgetContainsMethodInfo
ResolveButtonMethod "createPangoContext" o = Gtk.Widget.WidgetCreatePangoContextMethodInfo
ResolveButtonMethod "createPangoLayout" o = Gtk.Widget.WidgetCreatePangoLayoutMethodInfo
ResolveButtonMethod "disposeTemplate" o = Gtk.Widget.WidgetDisposeTemplateMethodInfo
ResolveButtonMethod "dragCheckThreshold" o = Gtk.Widget.WidgetDragCheckThresholdMethodInfo
ResolveButtonMethod "errorBell" o = Gtk.Widget.WidgetErrorBellMethodInfo
ResolveButtonMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveButtonMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveButtonMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveButtonMethod "grabFocus" o = Gtk.Widget.WidgetGrabFocusMethodInfo
ResolveButtonMethod "hasCssClass" o = Gtk.Widget.WidgetHasCssClassMethodInfo
ResolveButtonMethod "hasDefault" o = Gtk.Widget.WidgetHasDefaultMethodInfo
ResolveButtonMethod "hasFocus" o = Gtk.Widget.WidgetHasFocusMethodInfo
ResolveButtonMethod "hasVisibleFocus" o = Gtk.Widget.WidgetHasVisibleFocusMethodInfo
ResolveButtonMethod "hide" o = Gtk.Widget.WidgetHideMethodInfo
ResolveButtonMethod "inDestruction" o = Gtk.Widget.WidgetInDestructionMethodInfo
ResolveButtonMethod "initTemplate" o = Gtk.Widget.WidgetInitTemplateMethodInfo
ResolveButtonMethod "insertActionGroup" o = Gtk.Widget.WidgetInsertActionGroupMethodInfo
ResolveButtonMethod "insertAfter" o = Gtk.Widget.WidgetInsertAfterMethodInfo
ResolveButtonMethod "insertBefore" o = Gtk.Widget.WidgetInsertBeforeMethodInfo
ResolveButtonMethod "isAncestor" o = Gtk.Widget.WidgetIsAncestorMethodInfo
ResolveButtonMethod "isDrawable" o = Gtk.Widget.WidgetIsDrawableMethodInfo
ResolveButtonMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveButtonMethod "isFocus" o = Gtk.Widget.WidgetIsFocusMethodInfo
ResolveButtonMethod "isSensitive" o = Gtk.Widget.WidgetIsSensitiveMethodInfo
ResolveButtonMethod "isVisible" o = Gtk.Widget.WidgetIsVisibleMethodInfo
ResolveButtonMethod "keynavFailed" o = Gtk.Widget.WidgetKeynavFailedMethodInfo
ResolveButtonMethod "listMnemonicLabels" o = Gtk.Widget.WidgetListMnemonicLabelsMethodInfo
ResolveButtonMethod "map" o = Gtk.Widget.WidgetMapMethodInfo
ResolveButtonMethod "measure" o = Gtk.Widget.WidgetMeasureMethodInfo
ResolveButtonMethod "mnemonicActivate" o = Gtk.Widget.WidgetMnemonicActivateMethodInfo
ResolveButtonMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveButtonMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveButtonMethod "observeChildren" o = Gtk.Widget.WidgetObserveChildrenMethodInfo
ResolveButtonMethod "observeControllers" o = Gtk.Widget.WidgetObserveControllersMethodInfo
ResolveButtonMethod "pick" o = Gtk.Widget.WidgetPickMethodInfo
ResolveButtonMethod "queueAllocate" o = Gtk.Widget.WidgetQueueAllocateMethodInfo
ResolveButtonMethod "queueDraw" o = Gtk.Widget.WidgetQueueDrawMethodInfo
ResolveButtonMethod "queueResize" o = Gtk.Widget.WidgetQueueResizeMethodInfo
ResolveButtonMethod "realize" o = Gtk.Widget.WidgetRealizeMethodInfo
ResolveButtonMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveButtonMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveButtonMethod "removeController" o = Gtk.Widget.WidgetRemoveControllerMethodInfo
ResolveButtonMethod "removeCssClass" o = Gtk.Widget.WidgetRemoveCssClassMethodInfo
ResolveButtonMethod "removeMnemonicLabel" o = Gtk.Widget.WidgetRemoveMnemonicLabelMethodInfo
ResolveButtonMethod "removeTickCallback" o = Gtk.Widget.WidgetRemoveTickCallbackMethodInfo
ResolveButtonMethod "resetProperty" o = Gtk.Accessible.AccessibleResetPropertyMethodInfo
ResolveButtonMethod "resetRelation" o = Gtk.Accessible.AccessibleResetRelationMethodInfo
ResolveButtonMethod "resetState" o = Gtk.Accessible.AccessibleResetStateMethodInfo
ResolveButtonMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveButtonMethod "shouldLayout" o = Gtk.Widget.WidgetShouldLayoutMethodInfo
ResolveButtonMethod "show" o = Gtk.Widget.WidgetShowMethodInfo
ResolveButtonMethod "sizeAllocate" o = Gtk.Widget.WidgetSizeAllocateMethodInfo
ResolveButtonMethod "snapshotChild" o = Gtk.Widget.WidgetSnapshotChildMethodInfo
ResolveButtonMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveButtonMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveButtonMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveButtonMethod "translateCoordinates" o = Gtk.Widget.WidgetTranslateCoordinatesMethodInfo
ResolveButtonMethod "triggerTooltipQuery" o = Gtk.Widget.WidgetTriggerTooltipQueryMethodInfo
ResolveButtonMethod "unmap" o = Gtk.Widget.WidgetUnmapMethodInfo
ResolveButtonMethod "unparent" o = Gtk.Widget.WidgetUnparentMethodInfo
ResolveButtonMethod "unrealize" o = Gtk.Widget.WidgetUnrealizeMethodInfo
ResolveButtonMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveButtonMethod "unsetStateFlags" o = Gtk.Widget.WidgetUnsetStateFlagsMethodInfo
ResolveButtonMethod "updateNextAccessibleSibling" o = Gtk.Accessible.AccessibleUpdateNextAccessibleSiblingMethodInfo
ResolveButtonMethod "updateProperty" o = Gtk.Accessible.AccessibleUpdatePropertyMethodInfo
ResolveButtonMethod "updateRelation" o = Gtk.Accessible.AccessibleUpdateRelationMethodInfo
ResolveButtonMethod "updateState" o = Gtk.Accessible.AccessibleUpdateStateMethodInfo
ResolveButtonMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveButtonMethod "getAccessibleParent" o = Gtk.Accessible.AccessibleGetAccessibleParentMethodInfo
ResolveButtonMethod "getAccessibleRole" o = Gtk.Accessible.AccessibleGetAccessibleRoleMethodInfo
ResolveButtonMethod "getActionName" o = Gtk.Actionable.ActionableGetActionNameMethodInfo
ResolveButtonMethod "getActionTargetValue" o = Gtk.Actionable.ActionableGetActionTargetValueMethodInfo
ResolveButtonMethod "getAllocatedBaseline" o = Gtk.Widget.WidgetGetAllocatedBaselineMethodInfo
ResolveButtonMethod "getAllocatedHeight" o = Gtk.Widget.WidgetGetAllocatedHeightMethodInfo
ResolveButtonMethod "getAllocatedWidth" o = Gtk.Widget.WidgetGetAllocatedWidthMethodInfo
ResolveButtonMethod "getAllocation" o = Gtk.Widget.WidgetGetAllocationMethodInfo
ResolveButtonMethod "getAncestor" o = Gtk.Widget.WidgetGetAncestorMethodInfo
ResolveButtonMethod "getAtContext" o = Gtk.Accessible.AccessibleGetAtContextMethodInfo
ResolveButtonMethod "getBaseline" o = Gtk.Widget.WidgetGetBaselineMethodInfo
ResolveButtonMethod "getBounds" o = Gtk.Accessible.AccessibleGetBoundsMethodInfo
ResolveButtonMethod "getBuildableId" o = Gtk.Buildable.BuildableGetBuildableIdMethodInfo
ResolveButtonMethod "getCanFocus" o = Gtk.Widget.WidgetGetCanFocusMethodInfo
ResolveButtonMethod "getCanShrink" o = ButtonGetCanShrinkMethodInfo
ResolveButtonMethod "getCanTarget" o = Gtk.Widget.WidgetGetCanTargetMethodInfo
ResolveButtonMethod "getChild" o = ButtonGetChildMethodInfo
ResolveButtonMethod "getChildVisible" o = Gtk.Widget.WidgetGetChildVisibleMethodInfo
ResolveButtonMethod "getClipboard" o = Gtk.Widget.WidgetGetClipboardMethodInfo
ResolveButtonMethod "getColor" o = Gtk.Widget.WidgetGetColorMethodInfo
ResolveButtonMethod "getCssClasses" o = Gtk.Widget.WidgetGetCssClassesMethodInfo
ResolveButtonMethod "getCssName" o = Gtk.Widget.WidgetGetCssNameMethodInfo
ResolveButtonMethod "getCursor" o = Gtk.Widget.WidgetGetCursorMethodInfo
ResolveButtonMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveButtonMethod "getDirection" o = Gtk.Widget.WidgetGetDirectionMethodInfo
ResolveButtonMethod "getDisplay" o = Gtk.Widget.WidgetGetDisplayMethodInfo
ResolveButtonMethod "getFirstAccessibleChild" o = Gtk.Accessible.AccessibleGetFirstAccessibleChildMethodInfo
ResolveButtonMethod "getFirstChild" o = Gtk.Widget.WidgetGetFirstChildMethodInfo
ResolveButtonMethod "getFocusChild" o = Gtk.Widget.WidgetGetFocusChildMethodInfo
ResolveButtonMethod "getFocusOnClick" o = Gtk.Widget.WidgetGetFocusOnClickMethodInfo
ResolveButtonMethod "getFocusable" o = Gtk.Widget.WidgetGetFocusableMethodInfo
ResolveButtonMethod "getFontMap" o = Gtk.Widget.WidgetGetFontMapMethodInfo
ResolveButtonMethod "getFontOptions" o = Gtk.Widget.WidgetGetFontOptionsMethodInfo
ResolveButtonMethod "getFrameClock" o = Gtk.Widget.WidgetGetFrameClockMethodInfo
ResolveButtonMethod "getHalign" o = Gtk.Widget.WidgetGetHalignMethodInfo
ResolveButtonMethod "getHasFrame" o = ButtonGetHasFrameMethodInfo
ResolveButtonMethod "getHasTooltip" o = Gtk.Widget.WidgetGetHasTooltipMethodInfo
ResolveButtonMethod "getHeight" o = Gtk.Widget.WidgetGetHeightMethodInfo
ResolveButtonMethod "getHexpand" o = Gtk.Widget.WidgetGetHexpandMethodInfo
ResolveButtonMethod "getHexpandSet" o = Gtk.Widget.WidgetGetHexpandSetMethodInfo
ResolveButtonMethod "getIconName" o = ButtonGetIconNameMethodInfo
ResolveButtonMethod "getLabel" o = ButtonGetLabelMethodInfo
ResolveButtonMethod "getLastChild" o = Gtk.Widget.WidgetGetLastChildMethodInfo
ResolveButtonMethod "getLayoutManager" o = Gtk.Widget.WidgetGetLayoutManagerMethodInfo
ResolveButtonMethod "getMapped" o = Gtk.Widget.WidgetGetMappedMethodInfo
ResolveButtonMethod "getMarginBottom" o = Gtk.Widget.WidgetGetMarginBottomMethodInfo
ResolveButtonMethod "getMarginEnd" o = Gtk.Widget.WidgetGetMarginEndMethodInfo
ResolveButtonMethod "getMarginStart" o = Gtk.Widget.WidgetGetMarginStartMethodInfo
ResolveButtonMethod "getMarginTop" o = Gtk.Widget.WidgetGetMarginTopMethodInfo
ResolveButtonMethod "getName" o = Gtk.Widget.WidgetGetNameMethodInfo
ResolveButtonMethod "getNative" o = Gtk.Widget.WidgetGetNativeMethodInfo
ResolveButtonMethod "getNextAccessibleSibling" o = Gtk.Accessible.AccessibleGetNextAccessibleSiblingMethodInfo
ResolveButtonMethod "getNextSibling" o = Gtk.Widget.WidgetGetNextSiblingMethodInfo
ResolveButtonMethod "getOpacity" o = Gtk.Widget.WidgetGetOpacityMethodInfo
ResolveButtonMethod "getOverflow" o = Gtk.Widget.WidgetGetOverflowMethodInfo
ResolveButtonMethod "getPangoContext" o = Gtk.Widget.WidgetGetPangoContextMethodInfo
ResolveButtonMethod "getParent" o = Gtk.Widget.WidgetGetParentMethodInfo
ResolveButtonMethod "getPlatformState" o = Gtk.Accessible.AccessibleGetPlatformStateMethodInfo
ResolveButtonMethod "getPreferredSize" o = Gtk.Widget.WidgetGetPreferredSizeMethodInfo
ResolveButtonMethod "getPrevSibling" o = Gtk.Widget.WidgetGetPrevSiblingMethodInfo
ResolveButtonMethod "getPrimaryClipboard" o = Gtk.Widget.WidgetGetPrimaryClipboardMethodInfo
ResolveButtonMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveButtonMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveButtonMethod "getRealized" o = Gtk.Widget.WidgetGetRealizedMethodInfo
ResolveButtonMethod "getReceivesDefault" o = Gtk.Widget.WidgetGetReceivesDefaultMethodInfo
ResolveButtonMethod "getRequestMode" o = Gtk.Widget.WidgetGetRequestModeMethodInfo
ResolveButtonMethod "getRoot" o = Gtk.Widget.WidgetGetRootMethodInfo
ResolveButtonMethod "getScaleFactor" o = Gtk.Widget.WidgetGetScaleFactorMethodInfo
ResolveButtonMethod "getSensitive" o = Gtk.Widget.WidgetGetSensitiveMethodInfo
ResolveButtonMethod "getSettings" o = Gtk.Widget.WidgetGetSettingsMethodInfo
ResolveButtonMethod "getSize" o = Gtk.Widget.WidgetGetSizeMethodInfo
ResolveButtonMethod "getSizeRequest" o = Gtk.Widget.WidgetGetSizeRequestMethodInfo
ResolveButtonMethod "getStateFlags" o = Gtk.Widget.WidgetGetStateFlagsMethodInfo
ResolveButtonMethod "getStyleContext" o = Gtk.Widget.WidgetGetStyleContextMethodInfo
ResolveButtonMethod "getTemplateChild" o = Gtk.Widget.WidgetGetTemplateChildMethodInfo
ResolveButtonMethod "getTooltipMarkup" o = Gtk.Widget.WidgetGetTooltipMarkupMethodInfo
ResolveButtonMethod "getTooltipText" o = Gtk.Widget.WidgetGetTooltipTextMethodInfo
ResolveButtonMethod "getUseUnderline" o = ButtonGetUseUnderlineMethodInfo
ResolveButtonMethod "getValign" o = Gtk.Widget.WidgetGetValignMethodInfo
ResolveButtonMethod "getVexpand" o = Gtk.Widget.WidgetGetVexpandMethodInfo
ResolveButtonMethod "getVexpandSet" o = Gtk.Widget.WidgetGetVexpandSetMethodInfo
ResolveButtonMethod "getVisible" o = Gtk.Widget.WidgetGetVisibleMethodInfo
ResolveButtonMethod "getWidth" o = Gtk.Widget.WidgetGetWidthMethodInfo
ResolveButtonMethod "setAccessibleParent" o = Gtk.Accessible.AccessibleSetAccessibleParentMethodInfo
ResolveButtonMethod "setActionName" o = Gtk.Actionable.ActionableSetActionNameMethodInfo
ResolveButtonMethod "setActionTargetValue" o = Gtk.Actionable.ActionableSetActionTargetValueMethodInfo
ResolveButtonMethod "setCanFocus" o = Gtk.Widget.WidgetSetCanFocusMethodInfo
ResolveButtonMethod "setCanShrink" o = ButtonSetCanShrinkMethodInfo
ResolveButtonMethod "setCanTarget" o = Gtk.Widget.WidgetSetCanTargetMethodInfo
ResolveButtonMethod "setChild" o = ButtonSetChildMethodInfo
ResolveButtonMethod "setChildVisible" o = Gtk.Widget.WidgetSetChildVisibleMethodInfo
ResolveButtonMethod "setCssClasses" o = Gtk.Widget.WidgetSetCssClassesMethodInfo
ResolveButtonMethod "setCursor" o = Gtk.Widget.WidgetSetCursorMethodInfo
ResolveButtonMethod "setCursorFromName" o = Gtk.Widget.WidgetSetCursorFromNameMethodInfo
ResolveButtonMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveButtonMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveButtonMethod "setDetailedActionName" o = Gtk.Actionable.ActionableSetDetailedActionNameMethodInfo
ResolveButtonMethod "setDirection" o = Gtk.Widget.WidgetSetDirectionMethodInfo
ResolveButtonMethod "setFocusChild" o = Gtk.Widget.WidgetSetFocusChildMethodInfo
ResolveButtonMethod "setFocusOnClick" o = Gtk.Widget.WidgetSetFocusOnClickMethodInfo
ResolveButtonMethod "setFocusable" o = Gtk.Widget.WidgetSetFocusableMethodInfo
ResolveButtonMethod "setFontMap" o = Gtk.Widget.WidgetSetFontMapMethodInfo
ResolveButtonMethod "setFontOptions" o = Gtk.Widget.WidgetSetFontOptionsMethodInfo
ResolveButtonMethod "setHalign" o = Gtk.Widget.WidgetSetHalignMethodInfo
ResolveButtonMethod "setHasFrame" o = ButtonSetHasFrameMethodInfo
ResolveButtonMethod "setHasTooltip" o = Gtk.Widget.WidgetSetHasTooltipMethodInfo
ResolveButtonMethod "setHexpand" o = Gtk.Widget.WidgetSetHexpandMethodInfo
ResolveButtonMethod "setHexpandSet" o = Gtk.Widget.WidgetSetHexpandSetMethodInfo
ResolveButtonMethod "setIconName" o = ButtonSetIconNameMethodInfo
ResolveButtonMethod "setLabel" o = ButtonSetLabelMethodInfo
ResolveButtonMethod "setLayoutManager" o = Gtk.Widget.WidgetSetLayoutManagerMethodInfo
ResolveButtonMethod "setMarginBottom" o = Gtk.Widget.WidgetSetMarginBottomMethodInfo
ResolveButtonMethod "setMarginEnd" o = Gtk.Widget.WidgetSetMarginEndMethodInfo
ResolveButtonMethod "setMarginStart" o = Gtk.Widget.WidgetSetMarginStartMethodInfo
ResolveButtonMethod "setMarginTop" o = Gtk.Widget.WidgetSetMarginTopMethodInfo
ResolveButtonMethod "setName" o = Gtk.Widget.WidgetSetNameMethodInfo
ResolveButtonMethod "setOpacity" o = Gtk.Widget.WidgetSetOpacityMethodInfo
ResolveButtonMethod "setOverflow" o = Gtk.Widget.WidgetSetOverflowMethodInfo
ResolveButtonMethod "setParent" o = Gtk.Widget.WidgetSetParentMethodInfo
ResolveButtonMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveButtonMethod "setReceivesDefault" o = Gtk.Widget.WidgetSetReceivesDefaultMethodInfo
ResolveButtonMethod "setSensitive" o = Gtk.Widget.WidgetSetSensitiveMethodInfo
ResolveButtonMethod "setSizeRequest" o = Gtk.Widget.WidgetSetSizeRequestMethodInfo
ResolveButtonMethod "setStateFlags" o = Gtk.Widget.WidgetSetStateFlagsMethodInfo
ResolveButtonMethod "setTooltipMarkup" o = Gtk.Widget.WidgetSetTooltipMarkupMethodInfo
ResolveButtonMethod "setTooltipText" o = Gtk.Widget.WidgetSetTooltipTextMethodInfo
ResolveButtonMethod "setUseUnderline" o = ButtonSetUseUnderlineMethodInfo
ResolveButtonMethod "setValign" o = Gtk.Widget.WidgetSetValignMethodInfo
ResolveButtonMethod "setVexpand" o = Gtk.Widget.WidgetSetVexpandMethodInfo
ResolveButtonMethod "setVexpandSet" o = Gtk.Widget.WidgetSetVexpandSetMethodInfo
ResolveButtonMethod "setVisible" o = Gtk.Widget.WidgetSetVisibleMethodInfo
ResolveButtonMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveButtonMethod t Button, O.OverloadedMethod info Button p) => OL.IsLabel t (Button -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveButtonMethod t Button, O.OverloadedMethod info Button p, R.HasField t Button p) => R.HasField t Button p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveButtonMethod t Button, O.OverloadedMethodInfo info Button) => OL.IsLabel t (O.MethodProxy info Button) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
type ButtonActivateCallback =
IO ()
type C_ButtonActivateCallback =
Ptr Button ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_ButtonActivateCallback :: C_ButtonActivateCallback -> IO (FunPtr C_ButtonActivateCallback)
wrap_ButtonActivateCallback ::
GObject a => (a -> ButtonActivateCallback) ->
C_ButtonActivateCallback
wrap_ButtonActivateCallback :: forall a. GObject a => (a -> IO ()) -> C_ButtonActivateCallback
wrap_ButtonActivateCallback a -> IO ()
gi'cb Ptr Button
gi'selfPtr Ptr ()
_ = do
Ptr Button -> (Button -> IO ()) -> IO ()
forall o b.
(HasCallStack, GObject o) =>
Ptr o -> (o -> IO b) -> IO b
B.ManagedPtr.withNewObject Ptr Button
gi'selfPtr ((Button -> IO ()) -> IO ()) -> (Button -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Button
gi'self -> a -> IO ()
gi'cb (Button -> a
forall a b. Coercible a b => a -> b
Coerce.coerce Button
gi'self)
onButtonActivate :: (IsButton a, MonadIO m) => a -> ((?self :: a) => ButtonActivateCallback) -> m SignalHandlerId
onButtonActivate :: forall a (m :: * -> *).
(IsButton a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
onButtonActivate a
obj (?self::a) => IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
let wrapped' :: C_ButtonActivateCallback
wrapped' = (a -> IO ()) -> C_ButtonActivateCallback
forall a. GObject a => (a -> IO ()) -> C_ButtonActivateCallback
wrap_ButtonActivateCallback a -> IO ()
wrapped
FunPtr C_ButtonActivateCallback
wrapped'' <- C_ButtonActivateCallback -> IO (FunPtr C_ButtonActivateCallback)
mk_ButtonActivateCallback C_ButtonActivateCallback
wrapped'
a
-> Text
-> FunPtr C_ButtonActivateCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"activate" FunPtr C_ButtonActivateCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterButtonActivate :: (IsButton a, MonadIO m) => a -> ((?self :: a) => ButtonActivateCallback) -> m SignalHandlerId
afterButtonActivate :: forall a (m :: * -> *).
(IsButton a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
afterButtonActivate a
obj (?self::a) => IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
let wrapped' :: C_ButtonActivateCallback
wrapped' = (a -> IO ()) -> C_ButtonActivateCallback
forall a. GObject a => (a -> IO ()) -> C_ButtonActivateCallback
wrap_ButtonActivateCallback a -> IO ()
wrapped
FunPtr C_ButtonActivateCallback
wrapped'' <- C_ButtonActivateCallback -> IO (FunPtr C_ButtonActivateCallback)
mk_ButtonActivateCallback C_ButtonActivateCallback
wrapped'
a
-> Text
-> FunPtr C_ButtonActivateCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"activate" FunPtr C_ButtonActivateCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data ButtonActivateSignalInfo
instance SignalInfo ButtonActivateSignalInfo where
type HaskellCallbackType ButtonActivateSignalInfo = ButtonActivateCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_ButtonActivateCallback cb
cb'' <- mk_ButtonActivateCallback cb'
connectSignalFunPtr obj "activate" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Button::activate"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.9/docs/GI-Gtk-Objects-Button.html#g:signal:activate"})
#endif
type ButtonClickedCallback =
IO ()
type C_ButtonClickedCallback =
Ptr Button ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_ButtonClickedCallback :: C_ButtonClickedCallback -> IO (FunPtr C_ButtonClickedCallback)
wrap_ButtonClickedCallback ::
GObject a => (a -> ButtonClickedCallback) ->
C_ButtonClickedCallback
wrap_ButtonClickedCallback :: forall a. GObject a => (a -> IO ()) -> C_ButtonActivateCallback
wrap_ButtonClickedCallback a -> IO ()
gi'cb Ptr Button
gi'selfPtr Ptr ()
_ = do
Ptr Button -> (Button -> IO ()) -> IO ()
forall o b.
(HasCallStack, GObject o) =>
Ptr o -> (o -> IO b) -> IO b
B.ManagedPtr.withNewObject Ptr Button
gi'selfPtr ((Button -> IO ()) -> IO ()) -> (Button -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Button
gi'self -> a -> IO ()
gi'cb (Button -> a
forall a b. Coercible a b => a -> b
Coerce.coerce Button
gi'self)
onButtonClicked :: (IsButton a, MonadIO m) => a -> ((?self :: a) => ButtonClickedCallback) -> m SignalHandlerId
onButtonClicked :: forall a (m :: * -> *).
(IsButton a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
onButtonClicked a
obj (?self::a) => IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
let wrapped' :: C_ButtonActivateCallback
wrapped' = (a -> IO ()) -> C_ButtonActivateCallback
forall a. GObject a => (a -> IO ()) -> C_ButtonActivateCallback
wrap_ButtonClickedCallback a -> IO ()
wrapped
FunPtr C_ButtonActivateCallback
wrapped'' <- C_ButtonActivateCallback -> IO (FunPtr C_ButtonActivateCallback)
mk_ButtonClickedCallback C_ButtonActivateCallback
wrapped'
a
-> Text
-> FunPtr C_ButtonActivateCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"clicked" FunPtr C_ButtonActivateCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterButtonClicked :: (IsButton a, MonadIO m) => a -> ((?self :: a) => ButtonClickedCallback) -> m SignalHandlerId
afterButtonClicked :: forall a (m :: * -> *).
(IsButton a, MonadIO m) =>
a -> ((?self::a) => IO ()) -> m SignalHandlerId
afterButtonClicked a
obj (?self::a) => IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> IO ()
wrapped a
self = let ?self = a
?self::a
self in IO ()
(?self::a) => IO ()
cb
let wrapped' :: C_ButtonActivateCallback
wrapped' = (a -> IO ()) -> C_ButtonActivateCallback
forall a. GObject a => (a -> IO ()) -> C_ButtonActivateCallback
wrap_ButtonClickedCallback a -> IO ()
wrapped
FunPtr C_ButtonActivateCallback
wrapped'' <- C_ButtonActivateCallback -> IO (FunPtr C_ButtonActivateCallback)
mk_ButtonClickedCallback C_ButtonActivateCallback
wrapped'
a
-> Text
-> FunPtr C_ButtonActivateCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"clicked" FunPtr C_ButtonActivateCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data ButtonClickedSignalInfo
instance SignalInfo ButtonClickedSignalInfo where
type HaskellCallbackType ButtonClickedSignalInfo = ButtonClickedCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_ButtonClickedCallback cb
cb'' <- mk_ButtonClickedCallback cb'
connectSignalFunPtr obj "clicked" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Button::clicked"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.9/docs/GI-Gtk-Objects-Button.html#g:signal:clicked"})
#endif
getButtonCanShrink :: (MonadIO m, IsButton o) => o -> m Bool
getButtonCanShrink :: forall (m :: * -> *) o. (MonadIO m, IsButton o) => o -> m Bool
getButtonCanShrink o
obj = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"can-shrink"
setButtonCanShrink :: (MonadIO m, IsButton o) => o -> Bool -> m ()
setButtonCanShrink :: forall (m :: * -> *) o.
(MonadIO m, IsButton o) =>
o -> Bool -> m ()
setButtonCanShrink o
obj Bool
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> Bool -> IO ()
forall a. GObject a => a -> String -> Bool -> IO ()
B.Properties.setObjectPropertyBool o
obj String
"can-shrink" Bool
val
constructButtonCanShrink :: (IsButton o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructButtonCanShrink :: forall o (m :: * -> *).
(IsButton o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructButtonCanShrink Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"can-shrink" Bool
val
#if defined(ENABLE_OVERLOADING)
data ButtonCanShrinkPropertyInfo
instance AttrInfo ButtonCanShrinkPropertyInfo where
type AttrAllowedOps ButtonCanShrinkPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint ButtonCanShrinkPropertyInfo = IsButton
type AttrSetTypeConstraint ButtonCanShrinkPropertyInfo = (~) Bool
type AttrTransferTypeConstraint ButtonCanShrinkPropertyInfo = (~) Bool
type AttrTransferType ButtonCanShrinkPropertyInfo = Bool
type AttrGetType ButtonCanShrinkPropertyInfo = Bool
type AttrLabel ButtonCanShrinkPropertyInfo = "can-shrink"
type AttrOrigin ButtonCanShrinkPropertyInfo = Button
attrGet = getButtonCanShrink
attrSet = setButtonCanShrink
attrTransfer _ v = do
return v
attrConstruct = constructButtonCanShrink
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Button.canShrink"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.9/docs/GI-Gtk-Objects-Button.html#g:attr:canShrink"
})
#endif
getButtonChild :: (MonadIO m, IsButton o) => o -> m (Maybe Gtk.Widget.Widget)
getButtonChild :: forall (m :: * -> *) o.
(MonadIO m, IsButton o) =>
o -> m (Maybe Widget)
getButtonChild o
obj = IO (Maybe Widget) -> m (Maybe Widget)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe Widget) -> m (Maybe Widget))
-> IO (Maybe Widget) -> m (Maybe Widget)
forall a b. (a -> b) -> a -> b
$ o -> String -> (ManagedPtr Widget -> Widget) -> IO (Maybe Widget)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"child" ManagedPtr Widget -> Widget
Gtk.Widget.Widget
setButtonChild :: (MonadIO m, IsButton o, Gtk.Widget.IsWidget a) => o -> a -> m ()
setButtonChild :: forall (m :: * -> *) o a.
(MonadIO m, IsButton o, IsWidget a) =>
o -> a -> m ()
setButtonChild o
obj a
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> Maybe a -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"child" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)
constructButtonChild :: (IsButton o, MIO.MonadIO m, Gtk.Widget.IsWidget a) => a -> m (GValueConstruct o)
constructButtonChild :: forall o (m :: * -> *) a.
(IsButton o, MonadIO m, IsWidget a) =>
a -> m (GValueConstruct o)
constructButtonChild a
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject String
"child" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)
clearButtonChild :: (MonadIO m, IsButton o) => o -> m ()
clearButtonChild :: forall (m :: * -> *) o. (MonadIO m, IsButton o) => o -> m ()
clearButtonChild o
obj = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe Widget -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"child" (Maybe Widget
forall a. Maybe a
Nothing :: Maybe Gtk.Widget.Widget)
#if defined(ENABLE_OVERLOADING)
data ButtonChildPropertyInfo
instance AttrInfo ButtonChildPropertyInfo where
type AttrAllowedOps ButtonChildPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint ButtonChildPropertyInfo = IsButton
type AttrSetTypeConstraint ButtonChildPropertyInfo = Gtk.Widget.IsWidget
type AttrTransferTypeConstraint ButtonChildPropertyInfo = Gtk.Widget.IsWidget
type AttrTransferType ButtonChildPropertyInfo = Gtk.Widget.Widget
type AttrGetType ButtonChildPropertyInfo = (Maybe Gtk.Widget.Widget)
type AttrLabel ButtonChildPropertyInfo = "child"
type AttrOrigin ButtonChildPropertyInfo = Button
attrGet = getButtonChild
attrSet = setButtonChild
attrTransfer _ v = do
unsafeCastTo Gtk.Widget.Widget v
attrConstruct = constructButtonChild
attrClear = clearButtonChild
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Button.child"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.9/docs/GI-Gtk-Objects-Button.html#g:attr:child"
})
#endif
getButtonHasFrame :: (MonadIO m, IsButton o) => o -> m Bool
getButtonHasFrame :: forall (m :: * -> *) o. (MonadIO m, IsButton o) => o -> m Bool
getButtonHasFrame o
obj = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"has-frame"
setButtonHasFrame :: (MonadIO m, IsButton o) => o -> Bool -> m ()
setButtonHasFrame :: forall (m :: * -> *) o.
(MonadIO m, IsButton o) =>
o -> Bool -> m ()
setButtonHasFrame o
obj Bool
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> Bool -> IO ()
forall a. GObject a => a -> String -> Bool -> IO ()
B.Properties.setObjectPropertyBool o
obj String
"has-frame" Bool
val
constructButtonHasFrame :: (IsButton o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructButtonHasFrame :: forall o (m :: * -> *).
(IsButton o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructButtonHasFrame Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"has-frame" Bool
val
#if defined(ENABLE_OVERLOADING)
data ButtonHasFramePropertyInfo
instance AttrInfo ButtonHasFramePropertyInfo where
type AttrAllowedOps ButtonHasFramePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint ButtonHasFramePropertyInfo = IsButton
type AttrSetTypeConstraint ButtonHasFramePropertyInfo = (~) Bool
type AttrTransferTypeConstraint ButtonHasFramePropertyInfo = (~) Bool
type AttrTransferType ButtonHasFramePropertyInfo = Bool
type AttrGetType ButtonHasFramePropertyInfo = Bool
type AttrLabel ButtonHasFramePropertyInfo = "has-frame"
type AttrOrigin ButtonHasFramePropertyInfo = Button
attrGet = getButtonHasFrame
attrSet = setButtonHasFrame
attrTransfer _ v = do
return v
attrConstruct = constructButtonHasFrame
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Button.hasFrame"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.9/docs/GI-Gtk-Objects-Button.html#g:attr:hasFrame"
})
#endif
getButtonIconName :: (MonadIO m, IsButton o) => o -> m (Maybe T.Text)
getButtonIconName :: forall (m :: * -> *) o.
(MonadIO m, IsButton o) =>
o -> m (Maybe Text)
getButtonIconName o
obj = IO (Maybe Text) -> m (Maybe Text)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"icon-name"
setButtonIconName :: (MonadIO m, IsButton o) => o -> T.Text -> m ()
setButtonIconName :: forall (m :: * -> *) o.
(MonadIO m, IsButton o) =>
o -> Text -> m ()
setButtonIconName o
obj Text
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> Maybe Text -> IO ()
forall a. GObject a => a -> String -> Maybe Text -> IO ()
B.Properties.setObjectPropertyString o
obj String
"icon-name" (Text -> Maybe Text
forall a. a -> Maybe a
Just Text
val)
constructButtonIconName :: (IsButton o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructButtonIconName :: forall o (m :: * -> *).
(IsButton o, MonadIO m) =>
Text -> m (GValueConstruct o)
constructButtonIconName Text
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString String
"icon-name" (Text -> Maybe Text
forall a. a -> Maybe a
P.Just Text
val)
#if defined(ENABLE_OVERLOADING)
data ButtonIconNamePropertyInfo
instance AttrInfo ButtonIconNamePropertyInfo where
type AttrAllowedOps ButtonIconNamePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint ButtonIconNamePropertyInfo = IsButton
type AttrSetTypeConstraint ButtonIconNamePropertyInfo = (~) T.Text
type AttrTransferTypeConstraint ButtonIconNamePropertyInfo = (~) T.Text
type AttrTransferType ButtonIconNamePropertyInfo = T.Text
type AttrGetType ButtonIconNamePropertyInfo = (Maybe T.Text)
type AttrLabel ButtonIconNamePropertyInfo = "icon-name"
type AttrOrigin ButtonIconNamePropertyInfo = Button
attrGet = getButtonIconName
attrSet = setButtonIconName
attrTransfer _ v = do
return v
attrConstruct = constructButtonIconName
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Button.iconName"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.9/docs/GI-Gtk-Objects-Button.html#g:attr:iconName"
})
#endif
getButtonLabel :: (MonadIO m, IsButton o) => o -> m (Maybe T.Text)
getButtonLabel :: forall (m :: * -> *) o.
(MonadIO m, IsButton o) =>
o -> m (Maybe Text)
getButtonLabel o
obj = IO (Maybe Text) -> m (Maybe Text)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"label"
setButtonLabel :: (MonadIO m, IsButton o) => o -> T.Text -> m ()
setButtonLabel :: forall (m :: * -> *) o.
(MonadIO m, IsButton o) =>
o -> Text -> m ()
setButtonLabel o
obj Text
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> Maybe Text -> IO ()
forall a. GObject a => a -> String -> Maybe Text -> IO ()
B.Properties.setObjectPropertyString o
obj String
"label" (Text -> Maybe Text
forall a. a -> Maybe a
Just Text
val)
constructButtonLabel :: (IsButton o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructButtonLabel :: forall o (m :: * -> *).
(IsButton o, MonadIO m) =>
Text -> m (GValueConstruct o)
constructButtonLabel Text
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString String
"label" (Text -> Maybe Text
forall a. a -> Maybe a
P.Just Text
val)
#if defined(ENABLE_OVERLOADING)
data ButtonLabelPropertyInfo
instance AttrInfo ButtonLabelPropertyInfo where
type AttrAllowedOps ButtonLabelPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint ButtonLabelPropertyInfo = IsButton
type AttrSetTypeConstraint ButtonLabelPropertyInfo = (~) T.Text
type AttrTransferTypeConstraint ButtonLabelPropertyInfo = (~) T.Text
type AttrTransferType ButtonLabelPropertyInfo = T.Text
type AttrGetType ButtonLabelPropertyInfo = (Maybe T.Text)
type AttrLabel ButtonLabelPropertyInfo = "label"
type AttrOrigin ButtonLabelPropertyInfo = Button
attrGet = getButtonLabel
attrSet = setButtonLabel
attrTransfer _ v = do
return v
attrConstruct = constructButtonLabel
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Button.label"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.9/docs/GI-Gtk-Objects-Button.html#g:attr:label"
})
#endif
getButtonUseUnderline :: (MonadIO m, IsButton o) => o -> m Bool
getButtonUseUnderline :: forall (m :: * -> *) o. (MonadIO m, IsButton o) => o -> m Bool
getButtonUseUnderline o
obj = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"use-underline"
setButtonUseUnderline :: (MonadIO m, IsButton o) => o -> Bool -> m ()
setButtonUseUnderline :: forall (m :: * -> *) o.
(MonadIO m, IsButton o) =>
o -> Bool -> m ()
setButtonUseUnderline o
obj Bool
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> Bool -> IO ()
forall a. GObject a => a -> String -> Bool -> IO ()
B.Properties.setObjectPropertyBool o
obj String
"use-underline" Bool
val
constructButtonUseUnderline :: (IsButton o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructButtonUseUnderline :: forall o (m :: * -> *).
(IsButton o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructButtonUseUnderline Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"use-underline" Bool
val
#if defined(ENABLE_OVERLOADING)
data ButtonUseUnderlinePropertyInfo
instance AttrInfo ButtonUseUnderlinePropertyInfo where
type AttrAllowedOps ButtonUseUnderlinePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint ButtonUseUnderlinePropertyInfo = IsButton
type AttrSetTypeConstraint ButtonUseUnderlinePropertyInfo = (~) Bool
type AttrTransferTypeConstraint ButtonUseUnderlinePropertyInfo = (~) Bool
type AttrTransferType ButtonUseUnderlinePropertyInfo = Bool
type AttrGetType ButtonUseUnderlinePropertyInfo = Bool
type AttrLabel ButtonUseUnderlinePropertyInfo = "use-underline"
type AttrOrigin ButtonUseUnderlinePropertyInfo = Button
attrGet = getButtonUseUnderline
attrSet = setButtonUseUnderline
attrTransfer _ v = do
return v
attrConstruct = constructButtonUseUnderline
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Button.useUnderline"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.9/docs/GI-Gtk-Objects-Button.html#g:attr:useUnderline"
})
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Button
type instance O.AttributeList Button = ButtonAttributeList
type ButtonAttributeList = ('[ '("accessibleRole", Gtk.Accessible.AccessibleAccessibleRolePropertyInfo), '("actionName", Gtk.Actionable.ActionableActionNamePropertyInfo), '("actionTarget", Gtk.Actionable.ActionableActionTargetPropertyInfo), '("canFocus", Gtk.Widget.WidgetCanFocusPropertyInfo), '("canShrink", ButtonCanShrinkPropertyInfo), '("canTarget", Gtk.Widget.WidgetCanTargetPropertyInfo), '("child", ButtonChildPropertyInfo), '("cssClasses", Gtk.Widget.WidgetCssClassesPropertyInfo), '("cssName", Gtk.Widget.WidgetCssNamePropertyInfo), '("cursor", Gtk.Widget.WidgetCursorPropertyInfo), '("focusOnClick", Gtk.Widget.WidgetFocusOnClickPropertyInfo), '("focusable", Gtk.Widget.WidgetFocusablePropertyInfo), '("halign", Gtk.Widget.WidgetHalignPropertyInfo), '("hasDefault", Gtk.Widget.WidgetHasDefaultPropertyInfo), '("hasFocus", Gtk.Widget.WidgetHasFocusPropertyInfo), '("hasFrame", ButtonHasFramePropertyInfo), '("hasTooltip", Gtk.Widget.WidgetHasTooltipPropertyInfo), '("heightRequest", Gtk.Widget.WidgetHeightRequestPropertyInfo), '("hexpand", Gtk.Widget.WidgetHexpandPropertyInfo), '("hexpandSet", Gtk.Widget.WidgetHexpandSetPropertyInfo), '("iconName", ButtonIconNamePropertyInfo), '("label", ButtonLabelPropertyInfo), '("layoutManager", Gtk.Widget.WidgetLayoutManagerPropertyInfo), '("marginBottom", Gtk.Widget.WidgetMarginBottomPropertyInfo), '("marginEnd", Gtk.Widget.WidgetMarginEndPropertyInfo), '("marginStart", Gtk.Widget.WidgetMarginStartPropertyInfo), '("marginTop", Gtk.Widget.WidgetMarginTopPropertyInfo), '("name", Gtk.Widget.WidgetNamePropertyInfo), '("opacity", Gtk.Widget.WidgetOpacityPropertyInfo), '("overflow", Gtk.Widget.WidgetOverflowPropertyInfo), '("parent", Gtk.Widget.WidgetParentPropertyInfo), '("receivesDefault", Gtk.Widget.WidgetReceivesDefaultPropertyInfo), '("root", Gtk.Widget.WidgetRootPropertyInfo), '("scaleFactor", Gtk.Widget.WidgetScaleFactorPropertyInfo), '("sensitive", Gtk.Widget.WidgetSensitivePropertyInfo), '("tooltipMarkup", Gtk.Widget.WidgetTooltipMarkupPropertyInfo), '("tooltipText", Gtk.Widget.WidgetTooltipTextPropertyInfo), '("useUnderline", ButtonUseUnderlinePropertyInfo), '("valign", Gtk.Widget.WidgetValignPropertyInfo), '("vexpand", Gtk.Widget.WidgetVexpandPropertyInfo), '("vexpandSet", Gtk.Widget.WidgetVexpandSetPropertyInfo), '("visible", Gtk.Widget.WidgetVisiblePropertyInfo), '("widthRequest", Gtk.Widget.WidgetWidthRequestPropertyInfo)] :: [(Symbol, DK.Type)])
#endif
#if defined(ENABLE_OVERLOADING)
buttonCanShrink :: AttrLabelProxy "canShrink"
buttonCanShrink = AttrLabelProxy
buttonChild :: AttrLabelProxy "child"
buttonChild = AttrLabelProxy
buttonHasFrame :: AttrLabelProxy "hasFrame"
buttonHasFrame = AttrLabelProxy
buttonIconName :: AttrLabelProxy "iconName"
buttonIconName = AttrLabelProxy
buttonLabel :: AttrLabelProxy "label"
buttonLabel = AttrLabelProxy
buttonUseUnderline :: AttrLabelProxy "useUnderline"
buttonUseUnderline = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList Button = ButtonSignalList
type ButtonSignalList = ('[ '("activate", ButtonActivateSignalInfo), '("clicked", ButtonClickedSignalInfo), '("destroy", Gtk.Widget.WidgetDestroySignalInfo), '("directionChanged", Gtk.Widget.WidgetDirectionChangedSignalInfo), '("hide", Gtk.Widget.WidgetHideSignalInfo), '("keynavFailed", Gtk.Widget.WidgetKeynavFailedSignalInfo), '("map", Gtk.Widget.WidgetMapSignalInfo), '("mnemonicActivate", Gtk.Widget.WidgetMnemonicActivateSignalInfo), '("moveFocus", Gtk.Widget.WidgetMoveFocusSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("queryTooltip", Gtk.Widget.WidgetQueryTooltipSignalInfo), '("realize", Gtk.Widget.WidgetRealizeSignalInfo), '("show", Gtk.Widget.WidgetShowSignalInfo), '("stateFlagsChanged", Gtk.Widget.WidgetStateFlagsChangedSignalInfo), '("unmap", Gtk.Widget.WidgetUnmapSignalInfo), '("unrealize", Gtk.Widget.WidgetUnrealizeSignalInfo)] :: [(Symbol, DK.Type)])
#endif
foreign import ccall "gtk_button_new" gtk_button_new ::
IO (Ptr Button)
buttonNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
m Button
buttonNew :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m Button
buttonNew = IO Button -> m Button
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Button -> m Button) -> IO Button -> m Button
forall a b. (a -> b) -> a -> b
$ do
Ptr Button
result <- IO (Ptr Button)
gtk_button_new
Text -> Ptr Button -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"buttonNew" Ptr Button
result
Button
result' <- ((ManagedPtr Button -> Button) -> Ptr Button -> IO Button
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Button -> Button
Button) Ptr Button
result
Button -> IO Button
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Button
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gtk_button_new_from_icon_name" gtk_button_new_from_icon_name ::
CString ->
IO (Ptr Button)
buttonNewFromIconName ::
(B.CallStack.HasCallStack, MonadIO m) =>
T.Text
-> m Button
buttonNewFromIconName :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Text -> m Button
buttonNewFromIconName Text
iconName = IO Button -> m Button
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Button -> m Button) -> IO Button -> m Button
forall a b. (a -> b) -> a -> b
$ do
CString
iconName' <- Text -> IO CString
textToCString Text
iconName
Ptr Button
result <- CString -> IO (Ptr Button)
gtk_button_new_from_icon_name CString
iconName'
Text -> Ptr Button -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"buttonNewFromIconName" Ptr Button
result
Button
result' <- ((ManagedPtr Button -> Button) -> Ptr Button -> IO Button
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Button -> Button
Button) Ptr Button
result
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
iconName'
Button -> IO Button
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Button
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gtk_button_new_with_label" gtk_button_new_with_label ::
CString ->
IO (Ptr Button)
buttonNewWithLabel ::
(B.CallStack.HasCallStack, MonadIO m) =>
T.Text
-> m Button
buttonNewWithLabel :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Text -> m Button
buttonNewWithLabel Text
label = IO Button -> m Button
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Button -> m Button) -> IO Button -> m Button
forall a b. (a -> b) -> a -> b
$ do
CString
label' <- Text -> IO CString
textToCString Text
label
Ptr Button
result <- CString -> IO (Ptr Button)
gtk_button_new_with_label CString
label'
Text -> Ptr Button -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"buttonNewWithLabel" Ptr Button
result
Button
result' <- ((ManagedPtr Button -> Button) -> Ptr Button -> IO Button
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Button -> Button
Button) Ptr Button
result
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
label'
Button -> IO Button
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Button
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gtk_button_new_with_mnemonic" gtk_button_new_with_mnemonic ::
CString ->
IO (Ptr Button)
buttonNewWithMnemonic ::
(B.CallStack.HasCallStack, MonadIO m) =>
T.Text
-> m Button
buttonNewWithMnemonic :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Text -> m Button
buttonNewWithMnemonic Text
label = IO Button -> m Button
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Button -> m Button) -> IO Button -> m Button
forall a b. (a -> b) -> a -> b
$ do
CString
label' <- Text -> IO CString
textToCString Text
label
Ptr Button
result <- CString -> IO (Ptr Button)
gtk_button_new_with_mnemonic CString
label'
Text -> Ptr Button -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"buttonNewWithMnemonic" Ptr Button
result
Button
result' <- ((ManagedPtr Button -> Button) -> Ptr Button -> IO Button
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Button -> Button
Button) Ptr Button
result
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
label'
Button -> IO Button
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Button
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gtk_button_get_can_shrink" gtk_button_get_can_shrink ::
Ptr Button ->
IO CInt
buttonGetCanShrink ::
(B.CallStack.HasCallStack, MonadIO m, IsButton a) =>
a
-> m Bool
buttonGetCanShrink :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsButton a) =>
a -> m Bool
buttonGetCanShrink a
button = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Button
button' <- a -> IO (Ptr Button)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
button
CInt
result <- Ptr Button -> IO CInt
gtk_button_get_can_shrink Ptr Button
button'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
button
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data ButtonGetCanShrinkMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsButton a) => O.OverloadedMethod ButtonGetCanShrinkMethodInfo a signature where
overloadedMethod = buttonGetCanShrink
instance O.OverloadedMethodInfo ButtonGetCanShrinkMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Button.buttonGetCanShrink",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.9/docs/GI-Gtk-Objects-Button.html#v:buttonGetCanShrink"
})
#endif
foreign import ccall "gtk_button_get_child" gtk_button_get_child ::
Ptr Button ->
IO (Ptr Gtk.Widget.Widget)
buttonGetChild ::
(B.CallStack.HasCallStack, MonadIO m, IsButton a) =>
a
-> m (Maybe Gtk.Widget.Widget)
buttonGetChild :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsButton a) =>
a -> m (Maybe Widget)
buttonGetChild a
button = IO (Maybe Widget) -> m (Maybe Widget)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Widget) -> m (Maybe Widget))
-> IO (Maybe Widget) -> m (Maybe Widget)
forall a b. (a -> b) -> a -> b
$ do
Ptr Button
button' <- a -> IO (Ptr Button)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
button
Ptr Widget
result <- Ptr Button -> IO (Ptr Widget)
gtk_button_get_child Ptr Button
button'
Maybe Widget
maybeResult <- Ptr Widget -> (Ptr Widget -> IO Widget) -> IO (Maybe Widget)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Widget
result ((Ptr Widget -> IO Widget) -> IO (Maybe Widget))
-> (Ptr Widget -> IO Widget) -> IO (Maybe Widget)
forall a b. (a -> b) -> a -> b
$ \Ptr Widget
result' -> do
Widget
result'' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Gtk.Widget.Widget) Ptr Widget
result'
Widget -> IO Widget
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Widget
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
button
Maybe Widget -> IO (Maybe Widget)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Widget
maybeResult
#if defined(ENABLE_OVERLOADING)
data ButtonGetChildMethodInfo
instance (signature ~ (m (Maybe Gtk.Widget.Widget)), MonadIO m, IsButton a) => O.OverloadedMethod ButtonGetChildMethodInfo a signature where
overloadedMethod = buttonGetChild
instance O.OverloadedMethodInfo ButtonGetChildMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Button.buttonGetChild",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.9/docs/GI-Gtk-Objects-Button.html#v:buttonGetChild"
})
#endif
foreign import ccall "gtk_button_get_has_frame" gtk_button_get_has_frame ::
Ptr Button ->
IO CInt
buttonGetHasFrame ::
(B.CallStack.HasCallStack, MonadIO m, IsButton a) =>
a
-> m Bool
buttonGetHasFrame :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsButton a) =>
a -> m Bool
buttonGetHasFrame a
button = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Button
button' <- a -> IO (Ptr Button)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
button
CInt
result <- Ptr Button -> IO CInt
gtk_button_get_has_frame Ptr Button
button'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
button
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data ButtonGetHasFrameMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsButton a) => O.OverloadedMethod ButtonGetHasFrameMethodInfo a signature where
overloadedMethod = buttonGetHasFrame
instance O.OverloadedMethodInfo ButtonGetHasFrameMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Button.buttonGetHasFrame",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.9/docs/GI-Gtk-Objects-Button.html#v:buttonGetHasFrame"
})
#endif
foreign import ccall "gtk_button_get_icon_name" gtk_button_get_icon_name ::
Ptr Button ->
IO CString
buttonGetIconName ::
(B.CallStack.HasCallStack, MonadIO m, IsButton a) =>
a
-> m (Maybe T.Text)
buttonGetIconName :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsButton a) =>
a -> m (Maybe Text)
buttonGetIconName a
button = IO (Maybe Text) -> m (Maybe Text)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ do
Ptr Button
button' <- a -> IO (Ptr Button)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
button
CString
result <- Ptr Button -> IO CString
gtk_button_get_icon_name Ptr Button
button'
Maybe Text
maybeResult <- CString -> (CString -> IO Text) -> IO (Maybe Text)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull CString
result ((CString -> IO Text) -> IO (Maybe Text))
-> (CString -> IO Text) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \CString
result' -> do
Text
result'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result'
Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
button
Maybe Text -> IO (Maybe Text)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
maybeResult
#if defined(ENABLE_OVERLOADING)
data ButtonGetIconNameMethodInfo
instance (signature ~ (m (Maybe T.Text)), MonadIO m, IsButton a) => O.OverloadedMethod ButtonGetIconNameMethodInfo a signature where
overloadedMethod = buttonGetIconName
instance O.OverloadedMethodInfo ButtonGetIconNameMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Button.buttonGetIconName",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.9/docs/GI-Gtk-Objects-Button.html#v:buttonGetIconName"
})
#endif
foreign import ccall "gtk_button_get_label" gtk_button_get_label ::
Ptr Button ->
IO CString
buttonGetLabel ::
(B.CallStack.HasCallStack, MonadIO m, IsButton a) =>
a
-> m (Maybe T.Text)
buttonGetLabel :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsButton a) =>
a -> m (Maybe Text)
buttonGetLabel a
button = IO (Maybe Text) -> m (Maybe Text)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ do
Ptr Button
button' <- a -> IO (Ptr Button)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
button
CString
result <- Ptr Button -> IO CString
gtk_button_get_label Ptr Button
button'
Maybe Text
maybeResult <- CString -> (CString -> IO Text) -> IO (Maybe Text)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull CString
result ((CString -> IO Text) -> IO (Maybe Text))
-> (CString -> IO Text) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \CString
result' -> do
Text
result'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result'
Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
button
Maybe Text -> IO (Maybe Text)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
maybeResult
#if defined(ENABLE_OVERLOADING)
data ButtonGetLabelMethodInfo
instance (signature ~ (m (Maybe T.Text)), MonadIO m, IsButton a) => O.OverloadedMethod ButtonGetLabelMethodInfo a signature where
overloadedMethod = buttonGetLabel
instance O.OverloadedMethodInfo ButtonGetLabelMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Button.buttonGetLabel",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.9/docs/GI-Gtk-Objects-Button.html#v:buttonGetLabel"
})
#endif
foreign import ccall "gtk_button_get_use_underline" gtk_button_get_use_underline ::
Ptr Button ->
IO CInt
buttonGetUseUnderline ::
(B.CallStack.HasCallStack, MonadIO m, IsButton a) =>
a
-> m Bool
buttonGetUseUnderline :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsButton a) =>
a -> m Bool
buttonGetUseUnderline a
button = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Button
button' <- a -> IO (Ptr Button)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
button
CInt
result <- Ptr Button -> IO CInt
gtk_button_get_use_underline Ptr Button
button'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
button
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data ButtonGetUseUnderlineMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsButton a) => O.OverloadedMethod ButtonGetUseUnderlineMethodInfo a signature where
overloadedMethod = buttonGetUseUnderline
instance O.OverloadedMethodInfo ButtonGetUseUnderlineMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Button.buttonGetUseUnderline",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.9/docs/GI-Gtk-Objects-Button.html#v:buttonGetUseUnderline"
})
#endif
foreign import ccall "gtk_button_set_can_shrink" gtk_button_set_can_shrink ::
Ptr Button ->
CInt ->
IO ()
buttonSetCanShrink ::
(B.CallStack.HasCallStack, MonadIO m, IsButton a) =>
a
-> Bool
-> m ()
buttonSetCanShrink :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsButton a) =>
a -> Bool -> m ()
buttonSetCanShrink a
button Bool
canShrink = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Button
button' <- a -> IO (Ptr Button)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
button
let canShrink' :: CInt
canShrink' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
P.fromEnum) Bool
canShrink
Ptr Button -> CInt -> IO ()
gtk_button_set_can_shrink Ptr Button
button' CInt
canShrink'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
button
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ButtonSetCanShrinkMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsButton a) => O.OverloadedMethod ButtonSetCanShrinkMethodInfo a signature where
overloadedMethod = buttonSetCanShrink
instance O.OverloadedMethodInfo ButtonSetCanShrinkMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Button.buttonSetCanShrink",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.9/docs/GI-Gtk-Objects-Button.html#v:buttonSetCanShrink"
})
#endif
foreign import ccall "gtk_button_set_child" gtk_button_set_child ::
Ptr Button ->
Ptr Gtk.Widget.Widget ->
IO ()
buttonSetChild ::
(B.CallStack.HasCallStack, MonadIO m, IsButton a, Gtk.Widget.IsWidget b) =>
a
-> Maybe (b)
-> m ()
buttonSetChild :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsButton a, IsWidget b) =>
a -> Maybe b -> m ()
buttonSetChild a
button Maybe b
child = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Button
button' <- a -> IO (Ptr Button)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
button
Ptr Widget
maybeChild <- case Maybe b
child of
Maybe b
Nothing -> Ptr Widget -> IO (Ptr Widget)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Widget
forall a. Ptr a
nullPtr
Just b
jChild -> do
Ptr Widget
jChild' <- b -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jChild
Ptr Widget -> IO (Ptr Widget)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Widget
jChild'
Ptr Button -> Ptr Widget -> IO ()
gtk_button_set_child Ptr Button
button' Ptr Widget
maybeChild
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
button
Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
child b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ButtonSetChildMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsButton a, Gtk.Widget.IsWidget b) => O.OverloadedMethod ButtonSetChildMethodInfo a signature where
overloadedMethod = buttonSetChild
instance O.OverloadedMethodInfo ButtonSetChildMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Button.buttonSetChild",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.9/docs/GI-Gtk-Objects-Button.html#v:buttonSetChild"
})
#endif
foreign import ccall "gtk_button_set_has_frame" gtk_button_set_has_frame ::
Ptr Button ->
CInt ->
IO ()
buttonSetHasFrame ::
(B.CallStack.HasCallStack, MonadIO m, IsButton a) =>
a
-> Bool
-> m ()
buttonSetHasFrame :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsButton a) =>
a -> Bool -> m ()
buttonSetHasFrame a
button Bool
hasFrame = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Button
button' <- a -> IO (Ptr Button)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
button
let hasFrame' :: CInt
hasFrame' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
P.fromEnum) Bool
hasFrame
Ptr Button -> CInt -> IO ()
gtk_button_set_has_frame Ptr Button
button' CInt
hasFrame'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
button
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ButtonSetHasFrameMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsButton a) => O.OverloadedMethod ButtonSetHasFrameMethodInfo a signature where
overloadedMethod = buttonSetHasFrame
instance O.OverloadedMethodInfo ButtonSetHasFrameMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Button.buttonSetHasFrame",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.9/docs/GI-Gtk-Objects-Button.html#v:buttonSetHasFrame"
})
#endif
foreign import ccall "gtk_button_set_icon_name" gtk_button_set_icon_name ::
Ptr Button ->
CString ->
IO ()
buttonSetIconName ::
(B.CallStack.HasCallStack, MonadIO m, IsButton a) =>
a
-> T.Text
-> m ()
buttonSetIconName :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsButton a) =>
a -> Text -> m ()
buttonSetIconName a
button Text
iconName = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Button
button' <- a -> IO (Ptr Button)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
button
CString
iconName' <- Text -> IO CString
textToCString Text
iconName
Ptr Button -> CString -> IO ()
gtk_button_set_icon_name Ptr Button
button' CString
iconName'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
button
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
iconName'
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ButtonSetIconNameMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsButton a) => O.OverloadedMethod ButtonSetIconNameMethodInfo a signature where
overloadedMethod = buttonSetIconName
instance O.OverloadedMethodInfo ButtonSetIconNameMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Button.buttonSetIconName",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.9/docs/GI-Gtk-Objects-Button.html#v:buttonSetIconName"
})
#endif
foreign import ccall "gtk_button_set_label" gtk_button_set_label ::
Ptr Button ->
CString ->
IO ()
buttonSetLabel ::
(B.CallStack.HasCallStack, MonadIO m, IsButton a) =>
a
-> T.Text
-> m ()
buttonSetLabel :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsButton a) =>
a -> Text -> m ()
buttonSetLabel a
button Text
label = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Button
button' <- a -> IO (Ptr Button)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
button
CString
label' <- Text -> IO CString
textToCString Text
label
Ptr Button -> CString -> IO ()
gtk_button_set_label Ptr Button
button' CString
label'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
button
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
label'
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ButtonSetLabelMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsButton a) => O.OverloadedMethod ButtonSetLabelMethodInfo a signature where
overloadedMethod = buttonSetLabel
instance O.OverloadedMethodInfo ButtonSetLabelMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Button.buttonSetLabel",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.9/docs/GI-Gtk-Objects-Button.html#v:buttonSetLabel"
})
#endif
foreign import ccall "gtk_button_set_use_underline" gtk_button_set_use_underline ::
Ptr Button ->
CInt ->
IO ()
buttonSetUseUnderline ::
(B.CallStack.HasCallStack, MonadIO m, IsButton a) =>
a
-> Bool
-> m ()
buttonSetUseUnderline :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsButton a) =>
a -> Bool -> m ()
buttonSetUseUnderline a
button Bool
useUnderline = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Button
button' <- a -> IO (Ptr Button)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
button
let useUnderline' :: CInt
useUnderline' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
P.fromEnum) Bool
useUnderline
Ptr Button -> CInt -> IO ()
gtk_button_set_use_underline Ptr Button
button' CInt
useUnderline'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
button
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ButtonSetUseUnderlineMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsButton a) => O.OverloadedMethod ButtonSetUseUnderlineMethodInfo a signature where
overloadedMethod = buttonSetUseUnderline
instance O.OverloadedMethodInfo ButtonSetUseUnderlineMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Button.buttonSetUseUnderline",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.9/docs/GI-Gtk-Objects-Button.html#v:buttonSetUseUnderline"
})
#endif