{-# LANGUAGE 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 ,
noButton ,
#if defined(ENABLE_OVERLOADING)
ResolveButtonMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
ButtonClickedMethodInfo ,
#endif
buttonClicked ,
#if defined(ENABLE_OVERLOADING)
ButtonGetIconNameMethodInfo ,
#endif
buttonGetIconName ,
#if defined(ENABLE_OVERLOADING)
ButtonGetLabelMethodInfo ,
#endif
buttonGetLabel ,
#if defined(ENABLE_OVERLOADING)
ButtonGetReliefMethodInfo ,
#endif
buttonGetRelief ,
#if defined(ENABLE_OVERLOADING)
ButtonGetUseUnderlineMethodInfo ,
#endif
buttonGetUseUnderline ,
buttonNew ,
buttonNewFromIconName ,
buttonNewWithLabel ,
buttonNewWithMnemonic ,
#if defined(ENABLE_OVERLOADING)
ButtonSetIconNameMethodInfo ,
#endif
buttonSetIconName ,
#if defined(ENABLE_OVERLOADING)
ButtonSetLabelMethodInfo ,
#endif
buttonSetLabel ,
#if defined(ENABLE_OVERLOADING)
ButtonSetReliefMethodInfo ,
#endif
buttonSetRelief ,
#if defined(ENABLE_OVERLOADING)
ButtonSetUseUnderlineMethodInfo ,
#endif
buttonSetUseUnderline ,
#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)
ButtonReliefPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
buttonRelief ,
#endif
constructButtonRelief ,
getButtonRelief ,
setButtonRelief ,
#if defined(ENABLE_OVERLOADING)
ButtonUseUnderlinePropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
buttonUseUnderline ,
#endif
constructButtonUseUnderline ,
getButtonUseUnderline ,
setButtonUseUnderline ,
ButtonActivateCallback ,
#if defined(ENABLE_OVERLOADING)
ButtonActivateSignalInfo ,
#endif
C_ButtonActivateCallback ,
afterButtonActivate ,
genClosure_ButtonActivate ,
mk_ButtonActivateCallback ,
noButtonActivateCallback ,
onButtonActivate ,
wrap_ButtonActivateCallback ,
ButtonClickedCallback ,
#if defined(ENABLE_OVERLOADING)
ButtonClickedSignalInfo ,
#endif
C_ButtonClickedCallback ,
afterButtonClicked ,
genClosure_ButtonClicked ,
mk_ButtonClickedCallback ,
noButtonClickedCallback ,
onButtonClicked ,
wrap_ButtonClickedCallback ,
) 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.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
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 Data.Text as T
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 GI.Atk.Interfaces.ImplementorIface as Atk.ImplementorIface
import qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.Gtk.Enums as Gtk.Enums
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.Objects.Bin as Gtk.Bin
import {-# SOURCE #-} qualified GI.Gtk.Objects.Container as Gtk.Container
import {-# SOURCE #-} qualified GI.Gtk.Objects.Widget as Gtk.Widget
newtype Button = Button (ManagedPtr Button)
deriving (Button -> Button -> Bool
(Button -> Button -> Bool)
-> (Button -> Button -> Bool) -> Eq Button
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Button -> Button -> Bool
$c/= :: Button -> Button -> Bool
== :: Button -> Button -> Bool
$c== :: Button -> Button -> Bool
Eq)
foreign import ccall "gtk_button_get_type"
c_gtk_button_get_type :: IO GType
instance GObject Button where
gobjectType :: IO GType
gobjectType = IO GType
c_gtk_button_get_type
instance B.GValue.IsGValue Button where
toGValue :: Button -> IO GValue
toGValue o :: Button
o = do
GType
gtype <- IO GType
c_gtk_button_get_type
Button -> (Ptr Button -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr Button
o (GType -> (GValue -> Ptr Button -> IO ()) -> Ptr Button -> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr Button -> IO ()
forall a. GObject a => GValue -> Ptr a -> IO ()
B.GValue.set_object)
fromGValue :: GValue -> IO Button
fromGValue gv :: GValue
gv = do
Ptr Button
ptr <- GValue -> IO (Ptr Button)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr Button)
(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
class (GObject o, O.IsDescendantOf Button o) => IsButton o
instance (GObject o, O.IsDescendantOf Button o) => IsButton o
instance O.HasParentTypes Button
type instance O.ParentTypes Button = '[Gtk.Bin.Bin, Gtk.Container.Container, Gtk.Widget.Widget, GObject.Object.Object, Atk.ImplementorIface.ImplementorIface, Gtk.Actionable.Actionable, Gtk.Buildable.Buildable]
toButton :: (MonadIO m, IsButton o) => o -> m Button
toButton :: o -> m Button
toButton = IO Button -> m Button
forall (m :: * -> *) a. MonadIO m => IO a -> m a
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, GObject o, GObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr Button -> Button
Button
noButton :: Maybe Button
noButton :: Maybe Button
noButton = Maybe Button
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveButtonMethod (t :: Symbol) (o :: *) :: * where
ResolveButtonMethod "activate" o = Gtk.Widget.WidgetActivateMethodInfo
ResolveButtonMethod "activateAction" o = Gtk.Widget.WidgetActivateActionMethodInfo
ResolveButtonMethod "activateDefault" o = Gtk.Widget.WidgetActivateDefaultMethodInfo
ResolveButtonMethod "add" o = Gtk.Container.ContainerAddMethodInfo
ResolveButtonMethod "addAccelerator" o = Gtk.Widget.WidgetAddAcceleratorMethodInfo
ResolveButtonMethod "addChild" o = Gtk.Buildable.BuildableAddChildMethodInfo
ResolveButtonMethod "addController" o = Gtk.Widget.WidgetAddControllerMethodInfo
ResolveButtonMethod "addMnemonicLabel" o = Gtk.Widget.WidgetAddMnemonicLabelMethodInfo
ResolveButtonMethod "addTickCallback" o = Gtk.Widget.WidgetAddTickCallbackMethodInfo
ResolveButtonMethod "allocate" o = Gtk.Widget.WidgetAllocateMethodInfo
ResolveButtonMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveButtonMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveButtonMethod "canActivateAccel" o = Gtk.Widget.WidgetCanActivateAccelMethodInfo
ResolveButtonMethod "childFocus" o = Gtk.Widget.WidgetChildFocusMethodInfo
ResolveButtonMethod "childType" o = Gtk.Container.ContainerChildTypeMethodInfo
ResolveButtonMethod "clicked" o = ButtonClickedMethodInfo
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 "constructChild" o = Gtk.Buildable.BuildableConstructChildMethodInfo
ResolveButtonMethod "contains" o = Gtk.Widget.WidgetContainsMethodInfo
ResolveButtonMethod "createPangoContext" o = Gtk.Widget.WidgetCreatePangoContextMethodInfo
ResolveButtonMethod "createPangoLayout" o = Gtk.Widget.WidgetCreatePangoLayoutMethodInfo
ResolveButtonMethod "customFinished" o = Gtk.Buildable.BuildableCustomFinishedMethodInfo
ResolveButtonMethod "customTagEnd" o = Gtk.Buildable.BuildableCustomTagEndMethodInfo
ResolveButtonMethod "customTagStart" o = Gtk.Buildable.BuildableCustomTagStartMethodInfo
ResolveButtonMethod "destroy" o = Gtk.Widget.WidgetDestroyMethodInfo
ResolveButtonMethod "destroyed" o = Gtk.Widget.WidgetDestroyedMethodInfo
ResolveButtonMethod "deviceIsShadowed" o = Gtk.Widget.WidgetDeviceIsShadowedMethodInfo
ResolveButtonMethod "dragBegin" o = Gtk.Widget.WidgetDragBeginMethodInfo
ResolveButtonMethod "dragCheckThreshold" o = Gtk.Widget.WidgetDragCheckThresholdMethodInfo
ResolveButtonMethod "dragDestAddImageTargets" o = Gtk.Widget.WidgetDragDestAddImageTargetsMethodInfo
ResolveButtonMethod "dragDestAddTextTargets" o = Gtk.Widget.WidgetDragDestAddTextTargetsMethodInfo
ResolveButtonMethod "dragDestAddUriTargets" o = Gtk.Widget.WidgetDragDestAddUriTargetsMethodInfo
ResolveButtonMethod "dragDestFindTarget" o = Gtk.Widget.WidgetDragDestFindTargetMethodInfo
ResolveButtonMethod "dragDestGetTargetList" o = Gtk.Widget.WidgetDragDestGetTargetListMethodInfo
ResolveButtonMethod "dragDestGetTrackMotion" o = Gtk.Widget.WidgetDragDestGetTrackMotionMethodInfo
ResolveButtonMethod "dragDestSet" o = Gtk.Widget.WidgetDragDestSetMethodInfo
ResolveButtonMethod "dragDestSetTargetList" o = Gtk.Widget.WidgetDragDestSetTargetListMethodInfo
ResolveButtonMethod "dragDestSetTrackMotion" o = Gtk.Widget.WidgetDragDestSetTrackMotionMethodInfo
ResolveButtonMethod "dragDestUnset" o = Gtk.Widget.WidgetDragDestUnsetMethodInfo
ResolveButtonMethod "dragGetData" o = Gtk.Widget.WidgetDragGetDataMethodInfo
ResolveButtonMethod "dragHighlight" o = Gtk.Widget.WidgetDragHighlightMethodInfo
ResolveButtonMethod "dragSourceAddImageTargets" o = Gtk.Widget.WidgetDragSourceAddImageTargetsMethodInfo
ResolveButtonMethod "dragSourceAddTextTargets" o = Gtk.Widget.WidgetDragSourceAddTextTargetsMethodInfo
ResolveButtonMethod "dragSourceAddUriTargets" o = Gtk.Widget.WidgetDragSourceAddUriTargetsMethodInfo
ResolveButtonMethod "dragSourceGetTargetList" o = Gtk.Widget.WidgetDragSourceGetTargetListMethodInfo
ResolveButtonMethod "dragSourceSet" o = Gtk.Widget.WidgetDragSourceSetMethodInfo
ResolveButtonMethod "dragSourceSetIconGicon" o = Gtk.Widget.WidgetDragSourceSetIconGiconMethodInfo
ResolveButtonMethod "dragSourceSetIconName" o = Gtk.Widget.WidgetDragSourceSetIconNameMethodInfo
ResolveButtonMethod "dragSourceSetIconPaintable" o = Gtk.Widget.WidgetDragSourceSetIconPaintableMethodInfo
ResolveButtonMethod "dragSourceSetTargetList" o = Gtk.Widget.WidgetDragSourceSetTargetListMethodInfo
ResolveButtonMethod "dragSourceUnset" o = Gtk.Widget.WidgetDragSourceUnsetMethodInfo
ResolveButtonMethod "dragUnhighlight" o = Gtk.Widget.WidgetDragUnhighlightMethodInfo
ResolveButtonMethod "errorBell" o = Gtk.Widget.WidgetErrorBellMethodInfo
ResolveButtonMethod "event" o = Gtk.Widget.WidgetEventMethodInfo
ResolveButtonMethod "forall" o = Gtk.Container.ContainerForallMethodInfo
ResolveButtonMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveButtonMethod "foreach" o = Gtk.Container.ContainerForeachMethodInfo
ResolveButtonMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveButtonMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveButtonMethod "grabAdd" o = Gtk.Widget.WidgetGrabAddMethodInfo
ResolveButtonMethod "grabFocus" o = Gtk.Widget.WidgetGrabFocusMethodInfo
ResolveButtonMethod "grabRemove" o = Gtk.Widget.WidgetGrabRemoveMethodInfo
ResolveButtonMethod "hasDefault" o = Gtk.Widget.WidgetHasDefaultMethodInfo
ResolveButtonMethod "hasFocus" o = Gtk.Widget.WidgetHasFocusMethodInfo
ResolveButtonMethod "hasGrab" o = Gtk.Widget.WidgetHasGrabMethodInfo
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 "inputShapeCombineRegion" o = Gtk.Widget.WidgetInputShapeCombineRegionMethodInfo
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 "isToplevel" o = Gtk.Widget.WidgetIsToplevelMethodInfo
ResolveButtonMethod "isVisible" o = Gtk.Widget.WidgetIsVisibleMethodInfo
ResolveButtonMethod "keynavFailed" o = Gtk.Widget.WidgetKeynavFailedMethodInfo
ResolveButtonMethod "listAccelClosures" o = Gtk.Widget.WidgetListAccelClosuresMethodInfo
ResolveButtonMethod "listActionPrefixes" o = Gtk.Widget.WidgetListActionPrefixesMethodInfo
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 "parserFinished" o = Gtk.Buildable.BuildableParserFinishedMethodInfo
ResolveButtonMethod "pick" o = Gtk.Widget.WidgetPickMethodInfo
ResolveButtonMethod "queueAllocate" o = Gtk.Widget.WidgetQueueAllocateMethodInfo
ResolveButtonMethod "queueComputeExpand" o = Gtk.Widget.WidgetQueueComputeExpandMethodInfo
ResolveButtonMethod "queueDraw" o = Gtk.Widget.WidgetQueueDrawMethodInfo
ResolveButtonMethod "queueResize" o = Gtk.Widget.WidgetQueueResizeMethodInfo
ResolveButtonMethod "queueResizeNoRedraw" o = Gtk.Widget.WidgetQueueResizeNoRedrawMethodInfo
ResolveButtonMethod "realize" o = Gtk.Widget.WidgetRealizeMethodInfo
ResolveButtonMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveButtonMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveButtonMethod "registerSurface" o = Gtk.Widget.WidgetRegisterSurfaceMethodInfo
ResolveButtonMethod "remove" o = Gtk.Container.ContainerRemoveMethodInfo
ResolveButtonMethod "removeAccelerator" o = Gtk.Widget.WidgetRemoveAcceleratorMethodInfo
ResolveButtonMethod "removeController" o = Gtk.Widget.WidgetRemoveControllerMethodInfo
ResolveButtonMethod "removeMnemonicLabel" o = Gtk.Widget.WidgetRemoveMnemonicLabelMethodInfo
ResolveButtonMethod "removeTickCallback" o = Gtk.Widget.WidgetRemoveTickCallbackMethodInfo
ResolveButtonMethod "resetStyle" o = Gtk.Widget.WidgetResetStyleMethodInfo
ResolveButtonMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
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 "unregisterSurface" o = Gtk.Widget.WidgetUnregisterSurfaceMethodInfo
ResolveButtonMethod "unsetStateFlags" o = Gtk.Widget.WidgetUnsetStateFlagsMethodInfo
ResolveButtonMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveButtonMethod "getAccessible" o = Gtk.Widget.WidgetGetAccessibleMethodInfo
ResolveButtonMethod "getActionGroup" o = Gtk.Widget.WidgetGetActionGroupMethodInfo
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 "getCanFocus" o = Gtk.Widget.WidgetGetCanFocusMethodInfo
ResolveButtonMethod "getCanTarget" o = Gtk.Widget.WidgetGetCanTargetMethodInfo
ResolveButtonMethod "getChild" o = Gtk.Bin.BinGetChildMethodInfo
ResolveButtonMethod "getChildVisible" o = Gtk.Widget.WidgetGetChildVisibleMethodInfo
ResolveButtonMethod "getChildren" o = Gtk.Container.ContainerGetChildrenMethodInfo
ResolveButtonMethod "getClipboard" o = Gtk.Widget.WidgetGetClipboardMethodInfo
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 "getFirstChild" o = Gtk.Widget.WidgetGetFirstChildMethodInfo
ResolveButtonMethod "getFocusChild" o = Gtk.Widget.WidgetGetFocusChildMethodInfo
ResolveButtonMethod "getFocusHadjustment" o = Gtk.Container.ContainerGetFocusHadjustmentMethodInfo
ResolveButtonMethod "getFocusOnClick" o = Gtk.Widget.WidgetGetFocusOnClickMethodInfo
ResolveButtonMethod "getFocusVadjustment" o = Gtk.Container.ContainerGetFocusVadjustmentMethodInfo
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 "getHasSurface" o = Gtk.Widget.WidgetGetHasSurfaceMethodInfo
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 "getInternalChild" o = Gtk.Buildable.BuildableGetInternalChildMethodInfo
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 "getModifierMask" o = Gtk.Widget.WidgetGetModifierMaskMethodInfo
ResolveButtonMethod "getName" o = Gtk.Widget.WidgetGetNameMethodInfo
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 "getPath" o = Gtk.Widget.WidgetGetPathMethodInfo
ResolveButtonMethod "getPathForChild" o = Gtk.Container.ContainerGetPathForChildMethodInfo
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 "getRelief" o = ButtonGetReliefMethodInfo
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 "getSizeRequest" o = Gtk.Widget.WidgetGetSizeRequestMethodInfo
ResolveButtonMethod "getStateFlags" o = Gtk.Widget.WidgetGetStateFlagsMethodInfo
ResolveButtonMethod "getStyleContext" o = Gtk.Widget.WidgetGetStyleContextMethodInfo
ResolveButtonMethod "getSupportMultidevice" o = Gtk.Widget.WidgetGetSupportMultideviceMethodInfo
ResolveButtonMethod "getSurface" o = Gtk.Widget.WidgetGetSurfaceMethodInfo
ResolveButtonMethod "getTemplateChild" o = Gtk.Widget.WidgetGetTemplateChildMethodInfo
ResolveButtonMethod "getTooltipMarkup" o = Gtk.Widget.WidgetGetTooltipMarkupMethodInfo
ResolveButtonMethod "getTooltipText" o = Gtk.Widget.WidgetGetTooltipTextMethodInfo
ResolveButtonMethod "getTooltipWindow" o = Gtk.Widget.WidgetGetTooltipWindowMethodInfo
ResolveButtonMethod "getToplevel" o = Gtk.Widget.WidgetGetToplevelMethodInfo
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 "setAccelPath" o = Gtk.Widget.WidgetSetAccelPathMethodInfo
ResolveButtonMethod "setActionName" o = Gtk.Actionable.ActionableSetActionNameMethodInfo
ResolveButtonMethod "setActionTargetValue" o = Gtk.Actionable.ActionableSetActionTargetValueMethodInfo
ResolveButtonMethod "setBuildableProperty" o = Gtk.Buildable.BuildableSetBuildablePropertyMethodInfo
ResolveButtonMethod "setCanFocus" o = Gtk.Widget.WidgetSetCanFocusMethodInfo
ResolveButtonMethod "setCanTarget" o = Gtk.Widget.WidgetSetCanTargetMethodInfo
ResolveButtonMethod "setChildVisible" o = Gtk.Widget.WidgetSetChildVisibleMethodInfo
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 "setFocusHadjustment" o = Gtk.Container.ContainerSetFocusHadjustmentMethodInfo
ResolveButtonMethod "setFocusOnClick" o = Gtk.Widget.WidgetSetFocusOnClickMethodInfo
ResolveButtonMethod "setFocusVadjustment" o = Gtk.Container.ContainerSetFocusVadjustmentMethodInfo
ResolveButtonMethod "setFontMap" o = Gtk.Widget.WidgetSetFontMapMethodInfo
ResolveButtonMethod "setFontOptions" o = Gtk.Widget.WidgetSetFontOptionsMethodInfo
ResolveButtonMethod "setHalign" o = Gtk.Widget.WidgetSetHalignMethodInfo
ResolveButtonMethod "setHasSurface" o = Gtk.Widget.WidgetSetHasSurfaceMethodInfo
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 "setRelief" o = ButtonSetReliefMethodInfo
ResolveButtonMethod "setSensitive" o = Gtk.Widget.WidgetSetSensitiveMethodInfo
ResolveButtonMethod "setSizeRequest" o = Gtk.Widget.WidgetSetSizeRequestMethodInfo
ResolveButtonMethod "setStateFlags" o = Gtk.Widget.WidgetSetStateFlagsMethodInfo
ResolveButtonMethod "setSupportMultidevice" o = Gtk.Widget.WidgetSetSupportMultideviceMethodInfo
ResolveButtonMethod "setSurface" o = Gtk.Widget.WidgetSetSurfaceMethodInfo
ResolveButtonMethod "setTooltipMarkup" o = Gtk.Widget.WidgetSetTooltipMarkupMethodInfo
ResolveButtonMethod "setTooltipText" o = Gtk.Widget.WidgetSetTooltipTextMethodInfo
ResolveButtonMethod "setTooltipWindow" o = Gtk.Widget.WidgetSetTooltipWindowMethodInfo
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.MethodInfo 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
#endif
type ButtonActivateCallback =
IO ()
noButtonActivateCallback :: Maybe ButtonActivateCallback
noButtonActivateCallback :: Maybe (IO ())
noButtonActivateCallback = Maybe (IO ())
forall a. Maybe a
Nothing
type C_ButtonActivateCallback =
Ptr () ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_ButtonActivateCallback :: C_ButtonActivateCallback -> IO (FunPtr C_ButtonActivateCallback)
genClosure_ButtonActivate :: MonadIO m => ButtonActivateCallback -> m (GClosure C_ButtonActivateCallback)
genClosure_ButtonActivate :: IO () -> m (GClosure C_ButtonActivateCallback)
genClosure_ButtonActivate cb :: IO ()
cb = IO (GClosure C_ButtonActivateCallback)
-> m (GClosure C_ButtonActivateCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_ButtonActivateCallback)
-> m (GClosure C_ButtonActivateCallback))
-> IO (GClosure C_ButtonActivateCallback)
-> m (GClosure C_ButtonActivateCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_ButtonActivateCallback
cb' = IO () -> C_ButtonActivateCallback
wrap_ButtonActivateCallback IO ()
cb
C_ButtonActivateCallback -> IO (FunPtr C_ButtonActivateCallback)
mk_ButtonActivateCallback C_ButtonActivateCallback
cb' IO (FunPtr C_ButtonActivateCallback)
-> (FunPtr C_ButtonActivateCallback
-> IO (GClosure C_ButtonActivateCallback))
-> IO (GClosure C_ButtonActivateCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_ButtonActivateCallback
-> IO (GClosure C_ButtonActivateCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_ButtonActivateCallback ::
ButtonActivateCallback ->
C_ButtonActivateCallback
wrap_ButtonActivateCallback :: IO () -> C_ButtonActivateCallback
wrap_ButtonActivateCallback _cb :: IO ()
_cb _ _ = do
IO ()
_cb
onButtonActivate :: (IsButton a, MonadIO m) => a -> ButtonActivateCallback -> m SignalHandlerId
onButtonActivate :: a -> IO () -> m SignalHandlerId
onButtonActivate obj :: a
obj cb :: IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
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 cb' :: C_ButtonActivateCallback
cb' = IO () -> C_ButtonActivateCallback
wrap_ButtonActivateCallback IO ()
cb
FunPtr C_ButtonActivateCallback
cb'' <- C_ButtonActivateCallback -> IO (FunPtr C_ButtonActivateCallback)
mk_ButtonActivateCallback C_ButtonActivateCallback
cb'
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 "activate" FunPtr C_ButtonActivateCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterButtonActivate :: (IsButton a, MonadIO m) => a -> ButtonActivateCallback -> m SignalHandlerId
afterButtonActivate :: a -> IO () -> m SignalHandlerId
afterButtonActivate obj :: a
obj cb :: IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
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 cb' :: C_ButtonActivateCallback
cb' = IO () -> C_ButtonActivateCallback
wrap_ButtonActivateCallback IO ()
cb
FunPtr C_ButtonActivateCallback
cb'' <- C_ButtonActivateCallback -> IO (FunPtr C_ButtonActivateCallback)
mk_ButtonActivateCallback C_ButtonActivateCallback
cb'
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 "activate" FunPtr C_ButtonActivateCallback
cb'' 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
#endif
type ButtonClickedCallback =
IO ()
noButtonClickedCallback :: Maybe ButtonClickedCallback
noButtonClickedCallback :: Maybe (IO ())
noButtonClickedCallback = Maybe (IO ())
forall a. Maybe a
Nothing
type C_ButtonClickedCallback =
Ptr () ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_ButtonClickedCallback :: C_ButtonClickedCallback -> IO (FunPtr C_ButtonClickedCallback)
genClosure_ButtonClicked :: MonadIO m => ButtonClickedCallback -> m (GClosure C_ButtonClickedCallback)
genClosure_ButtonClicked :: IO () -> m (GClosure C_ButtonActivateCallback)
genClosure_ButtonClicked cb :: IO ()
cb = IO (GClosure C_ButtonActivateCallback)
-> m (GClosure C_ButtonActivateCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_ButtonActivateCallback)
-> m (GClosure C_ButtonActivateCallback))
-> IO (GClosure C_ButtonActivateCallback)
-> m (GClosure C_ButtonActivateCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_ButtonActivateCallback
cb' = IO () -> C_ButtonActivateCallback
wrap_ButtonClickedCallback IO ()
cb
C_ButtonActivateCallback -> IO (FunPtr C_ButtonActivateCallback)
mk_ButtonClickedCallback C_ButtonActivateCallback
cb' IO (FunPtr C_ButtonActivateCallback)
-> (FunPtr C_ButtonActivateCallback
-> IO (GClosure C_ButtonActivateCallback))
-> IO (GClosure C_ButtonActivateCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_ButtonActivateCallback
-> IO (GClosure C_ButtonActivateCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_ButtonClickedCallback ::
ButtonClickedCallback ->
C_ButtonClickedCallback
wrap_ButtonClickedCallback :: IO () -> C_ButtonActivateCallback
wrap_ButtonClickedCallback _cb :: IO ()
_cb _ _ = do
IO ()
_cb
onButtonClicked :: (IsButton a, MonadIO m) => a -> ButtonClickedCallback -> m SignalHandlerId
onButtonClicked :: a -> IO () -> m SignalHandlerId
onButtonClicked obj :: a
obj cb :: IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
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 cb' :: C_ButtonActivateCallback
cb' = IO () -> C_ButtonActivateCallback
wrap_ButtonClickedCallback IO ()
cb
FunPtr C_ButtonActivateCallback
cb'' <- C_ButtonActivateCallback -> IO (FunPtr C_ButtonActivateCallback)
mk_ButtonClickedCallback C_ButtonActivateCallback
cb'
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 "clicked" FunPtr C_ButtonActivateCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterButtonClicked :: (IsButton a, MonadIO m) => a -> ButtonClickedCallback -> m SignalHandlerId
afterButtonClicked :: a -> IO () -> m SignalHandlerId
afterButtonClicked obj :: a
obj cb :: IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
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 cb' :: C_ButtonActivateCallback
cb' = IO () -> C_ButtonActivateCallback
wrap_ButtonClickedCallback IO ()
cb
FunPtr C_ButtonActivateCallback
cb'' <- C_ButtonActivateCallback -> IO (FunPtr C_ButtonActivateCallback)
mk_ButtonClickedCallback C_ButtonActivateCallback
cb'
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 "clicked" FunPtr C_ButtonActivateCallback
cb'' 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
#endif
getButtonIconName :: (MonadIO m, IsButton o) => o -> m (Maybe T.Text)
getButtonIconName :: o -> m (Maybe Text)
getButtonIconName obj :: o
obj = IO (Maybe Text) -> m (Maybe Text)
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
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj "icon-name"
setButtonIconName :: (MonadIO m, IsButton o) => o -> T.Text -> m ()
setButtonIconName :: o -> Text -> m ()
setButtonIconName obj :: o
obj val :: Text
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe Text -> IO ()
forall a. GObject a => a -> String -> Maybe Text -> IO ()
B.Properties.setObjectPropertyString o
obj "icon-name" (Text -> Maybe Text
forall a. a -> Maybe a
Just Text
val)
constructButtonIconName :: (IsButton o) => T.Text -> IO (GValueConstruct o)
constructButtonIconName :: Text -> IO (GValueConstruct o)
constructButtonIconName val :: Text
val = String -> Maybe Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString "icon-name" (Text -> Maybe Text
forall a. a -> Maybe a
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
#endif
getButtonLabel :: (MonadIO m, IsButton o) => o -> m (Maybe T.Text)
getButtonLabel :: o -> m (Maybe Text)
getButtonLabel obj :: o
obj = IO (Maybe Text) -> m (Maybe Text)
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
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj "label"
setButtonLabel :: (MonadIO m, IsButton o) => o -> T.Text -> m ()
setButtonLabel :: o -> Text -> m ()
setButtonLabel obj :: o
obj val :: Text
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe Text -> IO ()
forall a. GObject a => a -> String -> Maybe Text -> IO ()
B.Properties.setObjectPropertyString o
obj "label" (Text -> Maybe Text
forall a. a -> Maybe a
Just Text
val)
constructButtonLabel :: (IsButton o) => T.Text -> IO (GValueConstruct o)
constructButtonLabel :: Text -> IO (GValueConstruct o)
constructButtonLabel val :: Text
val = String -> Maybe Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString "label" (Text -> Maybe Text
forall a. a -> Maybe a
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
#endif
getButtonRelief :: (MonadIO m, IsButton o) => o -> m Gtk.Enums.ReliefStyle
getButtonRelief :: o -> m ReliefStyle
getButtonRelief obj :: o
obj = IO ReliefStyle -> m ReliefStyle
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ReliefStyle -> m ReliefStyle)
-> IO ReliefStyle -> m ReliefStyle
forall a b. (a -> b) -> a -> b
$ o -> String -> IO ReliefStyle
forall a b. (GObject a, Enum b, BoxedEnum b) => a -> String -> IO b
B.Properties.getObjectPropertyEnum o
obj "relief"
setButtonRelief :: (MonadIO m, IsButton o) => o -> Gtk.Enums.ReliefStyle -> m ()
setButtonRelief :: o -> ReliefStyle -> m ()
setButtonRelief obj :: o
obj val :: ReliefStyle
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> ReliefStyle -> IO ()
forall a b.
(GObject a, Enum b, BoxedEnum b) =>
a -> String -> b -> IO ()
B.Properties.setObjectPropertyEnum o
obj "relief" ReliefStyle
val
constructButtonRelief :: (IsButton o) => Gtk.Enums.ReliefStyle -> IO (GValueConstruct o)
constructButtonRelief :: ReliefStyle -> IO (GValueConstruct o)
constructButtonRelief val :: ReliefStyle
val = String -> ReliefStyle -> IO (GValueConstruct o)
forall a o.
(Enum a, BoxedEnum a) =>
String -> a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyEnum "relief" ReliefStyle
val
#if defined(ENABLE_OVERLOADING)
data ButtonReliefPropertyInfo
instance AttrInfo ButtonReliefPropertyInfo where
type AttrAllowedOps ButtonReliefPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint ButtonReliefPropertyInfo = IsButton
type AttrSetTypeConstraint ButtonReliefPropertyInfo = (~) Gtk.Enums.ReliefStyle
type AttrTransferTypeConstraint ButtonReliefPropertyInfo = (~) Gtk.Enums.ReliefStyle
type AttrTransferType ButtonReliefPropertyInfo = Gtk.Enums.ReliefStyle
type AttrGetType ButtonReliefPropertyInfo = Gtk.Enums.ReliefStyle
type AttrLabel ButtonReliefPropertyInfo = "relief"
type AttrOrigin ButtonReliefPropertyInfo = Button
attrGet = getButtonRelief
attrSet = setButtonRelief
attrTransfer _ v = do
return v
attrConstruct = constructButtonRelief
attrClear = undefined
#endif
getButtonUseUnderline :: (MonadIO m, IsButton o) => o -> m Bool
getButtonUseUnderline :: o -> m Bool
getButtonUseUnderline obj :: o
obj = IO Bool -> m Bool
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
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj "use-underline"
setButtonUseUnderline :: (MonadIO m, IsButton o) => o -> Bool -> m ()
setButtonUseUnderline :: o -> Bool -> m ()
setButtonUseUnderline obj :: o
obj val :: Bool
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Bool -> IO ()
forall a. GObject a => a -> String -> Bool -> IO ()
B.Properties.setObjectPropertyBool o
obj "use-underline" Bool
val
constructButtonUseUnderline :: (IsButton o) => Bool -> IO (GValueConstruct o)
constructButtonUseUnderline :: Bool -> IO (GValueConstruct o)
constructButtonUseUnderline val :: Bool
val = String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool "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
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Button
type instance O.AttributeList Button = ButtonAttributeList
type ButtonAttributeList = ('[ '("actionName", Gtk.Actionable.ActionableActionNamePropertyInfo), '("actionTarget", Gtk.Actionable.ActionableActionTargetPropertyInfo), '("canFocus", Gtk.Widget.WidgetCanFocusPropertyInfo), '("canTarget", Gtk.Widget.WidgetCanTargetPropertyInfo), '("cssName", Gtk.Widget.WidgetCssNamePropertyInfo), '("cursor", Gtk.Widget.WidgetCursorPropertyInfo), '("expand", Gtk.Widget.WidgetExpandPropertyInfo), '("focusOnClick", Gtk.Widget.WidgetFocusOnClickPropertyInfo), '("halign", Gtk.Widget.WidgetHalignPropertyInfo), '("hasDefault", Gtk.Widget.WidgetHasDefaultPropertyInfo), '("hasFocus", Gtk.Widget.WidgetHasFocusPropertyInfo), '("hasTooltip", Gtk.Widget.WidgetHasTooltipPropertyInfo), '("heightRequest", Gtk.Widget.WidgetHeightRequestPropertyInfo), '("hexpand", Gtk.Widget.WidgetHexpandPropertyInfo), '("hexpandSet", Gtk.Widget.WidgetHexpandSetPropertyInfo), '("iconName", ButtonIconNamePropertyInfo), '("isFocus", Gtk.Widget.WidgetIsFocusPropertyInfo), '("label", ButtonLabelPropertyInfo), '("layoutManager", Gtk.Widget.WidgetLayoutManagerPropertyInfo), '("margin", Gtk.Widget.WidgetMarginPropertyInfo), '("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), '("relief", ButtonReliefPropertyInfo), '("root", Gtk.Widget.WidgetRootPropertyInfo), '("scaleFactor", Gtk.Widget.WidgetScaleFactorPropertyInfo), '("sensitive", Gtk.Widget.WidgetSensitivePropertyInfo), '("surface", Gtk.Widget.WidgetSurfacePropertyInfo), '("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, *)])
#endif
#if defined(ENABLE_OVERLOADING)
buttonIconName :: AttrLabelProxy "iconName"
buttonIconName = AttrLabelProxy
buttonLabel :: AttrLabelProxy "label"
buttonLabel = AttrLabelProxy
buttonRelief :: AttrLabelProxy "relief"
buttonRelief = AttrLabelProxy
buttonUseUnderline :: AttrLabelProxy "useUnderline"
buttonUseUnderline = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList Button = ButtonSignalList
type ButtonSignalList = ('[ '("accelClosuresChanged", Gtk.Widget.WidgetAccelClosuresChangedSignalInfo), '("activate", ButtonActivateSignalInfo), '("add", Gtk.Container.ContainerAddSignalInfo), '("canActivateAccel", Gtk.Widget.WidgetCanActivateAccelSignalInfo), '("clicked", ButtonClickedSignalInfo), '("destroy", Gtk.Widget.WidgetDestroySignalInfo), '("directionChanged", Gtk.Widget.WidgetDirectionChangedSignalInfo), '("dragBegin", Gtk.Widget.WidgetDragBeginSignalInfo), '("dragDataDelete", Gtk.Widget.WidgetDragDataDeleteSignalInfo), '("dragDataGet", Gtk.Widget.WidgetDragDataGetSignalInfo), '("dragDataReceived", Gtk.Widget.WidgetDragDataReceivedSignalInfo), '("dragDrop", Gtk.Widget.WidgetDragDropSignalInfo), '("dragEnd", Gtk.Widget.WidgetDragEndSignalInfo), '("dragFailed", Gtk.Widget.WidgetDragFailedSignalInfo), '("dragLeave", Gtk.Widget.WidgetDragLeaveSignalInfo), '("dragMotion", Gtk.Widget.WidgetDragMotionSignalInfo), '("grabNotify", Gtk.Widget.WidgetGrabNotifySignalInfo), '("hide", Gtk.Widget.WidgetHideSignalInfo), '("keynavFailed", Gtk.Widget.WidgetKeynavFailedSignalInfo), '("map", Gtk.Widget.WidgetMapSignalInfo), '("mnemonicActivate", Gtk.Widget.WidgetMnemonicActivateSignalInfo), '("moveFocus", Gtk.Widget.WidgetMoveFocusSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("popupMenu", Gtk.Widget.WidgetPopupMenuSignalInfo), '("queryTooltip", Gtk.Widget.WidgetQueryTooltipSignalInfo), '("realize", Gtk.Widget.WidgetRealizeSignalInfo), '("remove", Gtk.Container.ContainerRemoveSignalInfo), '("show", Gtk.Widget.WidgetShowSignalInfo), '("sizeAllocate", Gtk.Widget.WidgetSizeAllocateSignalInfo), '("stateFlagsChanged", Gtk.Widget.WidgetStateFlagsChangedSignalInfo), '("styleUpdated", Gtk.Widget.WidgetStyleUpdatedSignalInfo), '("unmap", Gtk.Widget.WidgetUnmapSignalInfo), '("unrealize", Gtk.Widget.WidgetUnrealizeSignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "gtk_button_new" gtk_button_new ::
IO (Ptr Button)
buttonNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
m Button
buttonNew :: m Button
buttonNew = IO Button -> m Button
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 "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 (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) =>
Maybe (T.Text)
-> m Button
buttonNewFromIconName :: Maybe Text -> m Button
buttonNewFromIconName iconName :: Maybe Text
iconName = IO Button -> m Button
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 CChar
maybeIconName <- case Maybe Text
iconName of
Nothing -> Ptr CChar -> IO (Ptr CChar)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CChar
forall a. Ptr a
nullPtr
Just jIconName :: Text
jIconName -> do
Ptr CChar
jIconName' <- Text -> IO (Ptr CChar)
textToCString Text
jIconName
Ptr CChar -> IO (Ptr CChar)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CChar
jIconName'
Ptr Button
result <- Ptr CChar -> IO (Ptr Button)
gtk_button_new_from_icon_name Ptr CChar
maybeIconName
Text -> Ptr Button -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "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
Ptr CChar -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CChar
maybeIconName
Button -> IO Button
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 :: Text -> m Button
buttonNewWithLabel label :: Text
label = IO Button -> m Button
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 CChar
label' <- Text -> IO (Ptr CChar)
textToCString Text
label
Ptr Button
result <- Ptr CChar -> IO (Ptr Button)
gtk_button_new_with_label Ptr CChar
label'
Text -> Ptr Button -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "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
Ptr CChar -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CChar
label'
Button -> IO Button
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 :: Text -> m Button
buttonNewWithMnemonic label :: Text
label = IO Button -> m Button
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 CChar
label' <- Text -> IO (Ptr CChar)
textToCString Text
label
Ptr Button
result <- Ptr CChar -> IO (Ptr Button)
gtk_button_new_with_mnemonic Ptr CChar
label'
Text -> Ptr Button -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "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
Ptr CChar -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CChar
label'
Button -> IO Button
forall (m :: * -> *) a. Monad m => a -> m a
return Button
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gtk_button_clicked" gtk_button_clicked ::
Ptr Button ->
IO ()
buttonClicked ::
(B.CallStack.HasCallStack, MonadIO m, IsButton a) =>
a
-> m ()
buttonClicked :: a -> m ()
buttonClicked button :: a
button = IO () -> m ()
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 Button -> IO ()
gtk_button_clicked Ptr Button
button'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
button
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ButtonClickedMethodInfo
instance (signature ~ (m ()), MonadIO m, IsButton a) => O.MethodInfo ButtonClickedMethodInfo a signature where
overloadedMethod = buttonClicked
#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 :: a -> m (Maybe Text)
buttonGetIconName button :: a
button = IO (Maybe Text) -> m (Maybe Text)
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
Ptr CChar
result <- Ptr Button -> IO (Ptr CChar)
gtk_button_get_icon_name Ptr Button
button'
Maybe Text
maybeResult <- Ptr CChar -> (Ptr CChar -> IO Text) -> IO (Maybe Text)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr CChar
result ((Ptr CChar -> IO Text) -> IO (Maybe Text))
-> (Ptr CChar -> IO Text) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \result' :: Ptr CChar
result' -> do
Text
result'' <- HasCallStack => Ptr CChar -> IO Text
Ptr CChar -> IO Text
cstringToText Ptr CChar
result'
Text -> IO Text
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 (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.MethodInfo ButtonGetIconNameMethodInfo a signature where
overloadedMethod = 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 :: a -> m (Maybe Text)
buttonGetLabel button :: a
button = IO (Maybe Text) -> m (Maybe Text)
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
Ptr CChar
result <- Ptr Button -> IO (Ptr CChar)
gtk_button_get_label Ptr Button
button'
Maybe Text
maybeResult <- Ptr CChar -> (Ptr CChar -> IO Text) -> IO (Maybe Text)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr CChar
result ((Ptr CChar -> IO Text) -> IO (Maybe Text))
-> (Ptr CChar -> IO Text) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \result' :: Ptr CChar
result' -> do
Text
result'' <- HasCallStack => Ptr CChar -> IO Text
Ptr CChar -> IO Text
cstringToText Ptr CChar
result'
Text -> IO Text
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 (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.MethodInfo ButtonGetLabelMethodInfo a signature where
overloadedMethod = buttonGetLabel
#endif
foreign import ccall "gtk_button_get_relief" gtk_button_get_relief ::
Ptr Button ->
IO CUInt
buttonGetRelief ::
(B.CallStack.HasCallStack, MonadIO m, IsButton a) =>
a
-> m Gtk.Enums.ReliefStyle
buttonGetRelief :: a -> m ReliefStyle
buttonGetRelief button :: a
button = IO ReliefStyle -> m ReliefStyle
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ReliefStyle -> m ReliefStyle)
-> IO ReliefStyle -> m ReliefStyle
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
CUInt
result <- Ptr Button -> IO CUInt
gtk_button_get_relief Ptr Button
button'
let result' :: ReliefStyle
result' = (Int -> ReliefStyle
forall a. Enum a => Int -> a
toEnum (Int -> ReliefStyle) -> (CUInt -> Int) -> CUInt -> ReliefStyle
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
button
ReliefStyle -> IO ReliefStyle
forall (m :: * -> *) a. Monad m => a -> m a
return ReliefStyle
result'
#if defined(ENABLE_OVERLOADING)
data ButtonGetReliefMethodInfo
instance (signature ~ (m Gtk.Enums.ReliefStyle), MonadIO m, IsButton a) => O.MethodInfo ButtonGetReliefMethodInfo a signature where
overloadedMethod = buttonGetRelief
#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 :: a -> m Bool
buttonGetUseUnderline button :: a
button = IO Bool -> m Bool
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
/= 0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
button
Bool -> IO Bool
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.MethodInfo ButtonGetUseUnderlineMethodInfo a signature where
overloadedMethod = buttonGetUseUnderline
#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 :: a -> Text -> m ()
buttonSetIconName button :: a
button iconName :: Text
iconName = IO () -> m ()
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 CChar
iconName' <- Text -> IO (Ptr CChar)
textToCString Text
iconName
Ptr Button -> Ptr CChar -> IO ()
gtk_button_set_icon_name Ptr Button
button' Ptr CChar
iconName'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
button
Ptr CChar -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CChar
iconName'
() -> IO ()
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.MethodInfo ButtonSetIconNameMethodInfo a signature where
overloadedMethod = 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 :: a -> Text -> m ()
buttonSetLabel button :: a
button label :: Text
label = IO () -> m ()
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 CChar
label' <- Text -> IO (Ptr CChar)
textToCString Text
label
Ptr Button -> Ptr CChar -> IO ()
gtk_button_set_label Ptr Button
button' Ptr CChar
label'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
button
Ptr CChar -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CChar
label'
() -> IO ()
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.MethodInfo ButtonSetLabelMethodInfo a signature where
overloadedMethod = buttonSetLabel
#endif
foreign import ccall "gtk_button_set_relief" gtk_button_set_relief ::
Ptr Button ->
CUInt ->
IO ()
buttonSetRelief ::
(B.CallStack.HasCallStack, MonadIO m, IsButton a) =>
a
-> Gtk.Enums.ReliefStyle
-> m ()
buttonSetRelief :: a -> ReliefStyle -> m ()
buttonSetRelief button :: a
button relief :: ReliefStyle
relief = IO () -> m ()
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 relief' :: CUInt
relief' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (ReliefStyle -> Int) -> ReliefStyle -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ReliefStyle -> Int
forall a. Enum a => a -> Int
fromEnum) ReliefStyle
relief
Ptr Button -> CUInt -> IO ()
gtk_button_set_relief Ptr Button
button' CUInt
relief'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
button
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ButtonSetReliefMethodInfo
instance (signature ~ (Gtk.Enums.ReliefStyle -> m ()), MonadIO m, IsButton a) => O.MethodInfo ButtonSetReliefMethodInfo a signature where
overloadedMethod = buttonSetRelief
#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 :: a -> Bool -> m ()
buttonSetUseUnderline button :: a
button useUnderline :: Bool
useUnderline = IO () -> m ()
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
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
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 (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ButtonSetUseUnderlineMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsButton a) => O.MethodInfo ButtonSetUseUnderlineMethodInfo a signature where
overloadedMethod = buttonSetUseUnderline
#endif