{- | Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte License : LGPL-2.1 Maintainer : Iñaki García Etxebarria (garetxe@gmail.com) -} module GI.Gtk.Objects.ColorSelectionDialog ( -- * Exported types ColorSelectionDialog(..) , ColorSelectionDialogK , toColorSelectionDialog , noColorSelectionDialog , -- * Methods -- ** colorSelectionDialogGetColorSelection colorSelectionDialogGetColorSelection , -- ** colorSelectionDialogNew colorSelectionDialogNew , -- * Properties -- ** CancelButton ColorSelectionDialogCancelButtonPropertyInfo, getColorSelectionDialogCancelButton , -- ** ColorSelection ColorSelectionDialogColorSelectionPropertyInfo, getColorSelectionDialogColorSelection , -- ** HelpButton ColorSelectionDialogHelpButtonPropertyInfo, getColorSelectionDialogHelpButton , -- ** OkButton ColorSelectionDialogOkButtonPropertyInfo, getColorSelectionDialogOkButton , ) where import Prelude () import Data.GI.Base.ShortPrelude import qualified Data.Text as T import qualified Data.ByteString.Char8 as B import qualified Data.Map as Map import GI.Gtk.Types import GI.Gtk.Callbacks import qualified GI.Atk as Atk import qualified GI.GObject as GObject newtype ColorSelectionDialog = ColorSelectionDialog (ForeignPtr ColorSelectionDialog) foreign import ccall "gtk_color_selection_dialog_get_type" c_gtk_color_selection_dialog_get_type :: IO GType type instance ParentTypes ColorSelectionDialog = ColorSelectionDialogParentTypes type ColorSelectionDialogParentTypes = '[Dialog, Window, Bin, Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable] instance GObject ColorSelectionDialog where gobjectIsInitiallyUnowned _ = True gobjectType _ = c_gtk_color_selection_dialog_get_type class GObject o => ColorSelectionDialogK o instance (GObject o, IsDescendantOf ColorSelectionDialog o) => ColorSelectionDialogK o toColorSelectionDialog :: ColorSelectionDialogK o => o -> IO ColorSelectionDialog toColorSelectionDialog = unsafeCastTo ColorSelectionDialog noColorSelectionDialog :: Maybe ColorSelectionDialog noColorSelectionDialog = Nothing -- VVV Prop "cancel-button" -- Type: TInterface "Gtk" "Widget" -- Flags: [PropertyReadable] getColorSelectionDialogCancelButton :: (MonadIO m, ColorSelectionDialogK o) => o -> m Widget getColorSelectionDialogCancelButton obj = liftIO $ getObjectPropertyObject obj "cancel-button" Widget data ColorSelectionDialogCancelButtonPropertyInfo instance AttrInfo ColorSelectionDialogCancelButtonPropertyInfo where type AttrAllowedOps ColorSelectionDialogCancelButtonPropertyInfo = '[ 'AttrGet] type AttrSetTypeConstraint ColorSelectionDialogCancelButtonPropertyInfo = (~) () type AttrBaseTypeConstraint ColorSelectionDialogCancelButtonPropertyInfo = ColorSelectionDialogK type AttrGetType ColorSelectionDialogCancelButtonPropertyInfo = Widget type AttrLabel ColorSelectionDialogCancelButtonPropertyInfo = "ColorSelectionDialog::cancel-button" attrGet _ = getColorSelectionDialogCancelButton attrSet _ = undefined attrConstruct _ = undefined -- VVV Prop "color-selection" -- Type: TInterface "Gtk" "Widget" -- Flags: [PropertyReadable] getColorSelectionDialogColorSelection :: (MonadIO m, ColorSelectionDialogK o) => o -> m Widget getColorSelectionDialogColorSelection obj = liftIO $ getObjectPropertyObject obj "color-selection" Widget data ColorSelectionDialogColorSelectionPropertyInfo instance AttrInfo ColorSelectionDialogColorSelectionPropertyInfo where type AttrAllowedOps ColorSelectionDialogColorSelectionPropertyInfo = '[ 'AttrGet] type AttrSetTypeConstraint ColorSelectionDialogColorSelectionPropertyInfo = (~) () type AttrBaseTypeConstraint ColorSelectionDialogColorSelectionPropertyInfo = ColorSelectionDialogK type AttrGetType ColorSelectionDialogColorSelectionPropertyInfo = Widget type AttrLabel ColorSelectionDialogColorSelectionPropertyInfo = "ColorSelectionDialog::color-selection" attrGet _ = getColorSelectionDialogColorSelection attrSet _ = undefined attrConstruct _ = undefined -- VVV Prop "help-button" -- Type: TInterface "Gtk" "Widget" -- Flags: [PropertyReadable] getColorSelectionDialogHelpButton :: (MonadIO m, ColorSelectionDialogK o) => o -> m Widget getColorSelectionDialogHelpButton obj = liftIO $ getObjectPropertyObject obj "help-button" Widget data ColorSelectionDialogHelpButtonPropertyInfo instance AttrInfo ColorSelectionDialogHelpButtonPropertyInfo where type AttrAllowedOps ColorSelectionDialogHelpButtonPropertyInfo = '[ 'AttrGet] type AttrSetTypeConstraint ColorSelectionDialogHelpButtonPropertyInfo = (~) () type AttrBaseTypeConstraint ColorSelectionDialogHelpButtonPropertyInfo = ColorSelectionDialogK type AttrGetType ColorSelectionDialogHelpButtonPropertyInfo = Widget type AttrLabel ColorSelectionDialogHelpButtonPropertyInfo = "ColorSelectionDialog::help-button" attrGet _ = getColorSelectionDialogHelpButton attrSet _ = undefined attrConstruct _ = undefined -- VVV Prop "ok-button" -- Type: TInterface "Gtk" "Widget" -- Flags: [PropertyReadable] getColorSelectionDialogOkButton :: (MonadIO m, ColorSelectionDialogK o) => o -> m Widget getColorSelectionDialogOkButton obj = liftIO $ getObjectPropertyObject obj "ok-button" Widget data ColorSelectionDialogOkButtonPropertyInfo instance AttrInfo ColorSelectionDialogOkButtonPropertyInfo where type AttrAllowedOps ColorSelectionDialogOkButtonPropertyInfo = '[ 'AttrGet] type AttrSetTypeConstraint ColorSelectionDialogOkButtonPropertyInfo = (~) () type AttrBaseTypeConstraint ColorSelectionDialogOkButtonPropertyInfo = ColorSelectionDialogK type AttrGetType ColorSelectionDialogOkButtonPropertyInfo = Widget type AttrLabel ColorSelectionDialogOkButtonPropertyInfo = "ColorSelectionDialog::ok-button" attrGet _ = getColorSelectionDialogOkButton attrSet _ = undefined attrConstruct _ = undefined type instance AttributeList ColorSelectionDialog = ColorSelectionDialogAttributeList type ColorSelectionDialogAttributeList = ('[ '("accept-focus", WindowAcceptFocusPropertyInfo), '("app-paintable", WidgetAppPaintablePropertyInfo), '("application", WindowApplicationPropertyInfo), '("attached-to", WindowAttachedToPropertyInfo), '("border-width", ContainerBorderWidthPropertyInfo), '("can-default", WidgetCanDefaultPropertyInfo), '("can-focus", WidgetCanFocusPropertyInfo), '("cancel-button", ColorSelectionDialogCancelButtonPropertyInfo), '("child", ContainerChildPropertyInfo), '("color-selection", ColorSelectionDialogColorSelectionPropertyInfo), '("composite-child", WidgetCompositeChildPropertyInfo), '("decorated", WindowDecoratedPropertyInfo), '("default-height", WindowDefaultHeightPropertyInfo), '("default-width", WindowDefaultWidthPropertyInfo), '("deletable", WindowDeletablePropertyInfo), '("destroy-with-parent", WindowDestroyWithParentPropertyInfo), '("double-buffered", WidgetDoubleBufferedPropertyInfo), '("events", WidgetEventsPropertyInfo), '("expand", WidgetExpandPropertyInfo), '("focus-on-map", WindowFocusOnMapPropertyInfo), '("focus-visible", WindowFocusVisiblePropertyInfo), '("gravity", WindowGravityPropertyInfo), '("halign", WidgetHalignPropertyInfo), '("has-default", WidgetHasDefaultPropertyInfo), '("has-focus", WidgetHasFocusPropertyInfo), '("has-resize-grip", WindowHasResizeGripPropertyInfo), '("has-tooltip", WidgetHasTooltipPropertyInfo), '("has-toplevel-focus", WindowHasToplevelFocusPropertyInfo), '("height-request", WidgetHeightRequestPropertyInfo), '("help-button", ColorSelectionDialogHelpButtonPropertyInfo), '("hexpand", WidgetHexpandPropertyInfo), '("hexpand-set", WidgetHexpandSetPropertyInfo), '("hide-titlebar-when-maximized", WindowHideTitlebarWhenMaximizedPropertyInfo), '("icon", WindowIconPropertyInfo), '("icon-name", WindowIconNamePropertyInfo), '("is-active", WindowIsActivePropertyInfo), '("is-focus", WidgetIsFocusPropertyInfo), '("is-maximized", WindowIsMaximizedPropertyInfo), '("margin", WidgetMarginPropertyInfo), '("margin-bottom", WidgetMarginBottomPropertyInfo), '("margin-end", WidgetMarginEndPropertyInfo), '("margin-left", WidgetMarginLeftPropertyInfo), '("margin-right", WidgetMarginRightPropertyInfo), '("margin-start", WidgetMarginStartPropertyInfo), '("margin-top", WidgetMarginTopPropertyInfo), '("mnemonics-visible", WindowMnemonicsVisiblePropertyInfo), '("modal", WindowModalPropertyInfo), '("name", WidgetNamePropertyInfo), '("no-show-all", WidgetNoShowAllPropertyInfo), '("ok-button", ColorSelectionDialogOkButtonPropertyInfo), '("opacity", WidgetOpacityPropertyInfo), '("parent", WidgetParentPropertyInfo), '("receives-default", WidgetReceivesDefaultPropertyInfo), '("resizable", WindowResizablePropertyInfo), '("resize-grip-visible", WindowResizeGripVisiblePropertyInfo), '("resize-mode", ContainerResizeModePropertyInfo), '("role", WindowRolePropertyInfo), '("scale-factor", WidgetScaleFactorPropertyInfo), '("screen", WindowScreenPropertyInfo), '("sensitive", WidgetSensitivePropertyInfo), '("skip-pager-hint", WindowSkipPagerHintPropertyInfo), '("skip-taskbar-hint", WindowSkipTaskbarHintPropertyInfo), '("startup-id", WindowStartupIdPropertyInfo), '("style", WidgetStylePropertyInfo), '("title", WindowTitlePropertyInfo), '("tooltip-markup", WidgetTooltipMarkupPropertyInfo), '("tooltip-text", WidgetTooltipTextPropertyInfo), '("transient-for", WindowTransientForPropertyInfo), '("type", WindowTypePropertyInfo), '("type-hint", WindowTypeHintPropertyInfo), '("urgency-hint", WindowUrgencyHintPropertyInfo), '("use-header-bar", DialogUseHeaderBarPropertyInfo), '("valign", WidgetValignPropertyInfo), '("vexpand", WidgetVexpandPropertyInfo), '("vexpand-set", WidgetVexpandSetPropertyInfo), '("visible", WidgetVisiblePropertyInfo), '("width-request", WidgetWidthRequestPropertyInfo), '("window", WidgetWindowPropertyInfo), '("window-position", WindowWindowPositionPropertyInfo)] :: [(Symbol, *)]) type instance SignalList ColorSelectionDialog = ColorSelectionDialogSignalList type ColorSelectionDialogSignalList = ('[ '("accel-closures-changed", WidgetAccelClosuresChangedSignalInfo), '("activate-default", WindowActivateDefaultSignalInfo), '("activate-focus", WindowActivateFocusSignalInfo), '("add", ContainerAddSignalInfo), '("button-press-event", WidgetButtonPressEventSignalInfo), '("button-release-event", WidgetButtonReleaseEventSignalInfo), '("can-activate-accel", WidgetCanActivateAccelSignalInfo), '("check-resize", ContainerCheckResizeSignalInfo), '("child-notify", WidgetChildNotifySignalInfo), '("close", DialogCloseSignalInfo), '("composited-changed", WidgetCompositedChangedSignalInfo), '("configure-event", WidgetConfigureEventSignalInfo), '("damage-event", WidgetDamageEventSignalInfo), '("delete-event", WidgetDeleteEventSignalInfo), '("destroy", WidgetDestroySignalInfo), '("destroy-event", WidgetDestroyEventSignalInfo), '("direction-changed", WidgetDirectionChangedSignalInfo), '("drag-begin", WidgetDragBeginSignalInfo), '("drag-data-delete", WidgetDragDataDeleteSignalInfo), '("drag-data-get", WidgetDragDataGetSignalInfo), '("drag-data-received", WidgetDragDataReceivedSignalInfo), '("drag-drop", WidgetDragDropSignalInfo), '("drag-end", WidgetDragEndSignalInfo), '("drag-failed", WidgetDragFailedSignalInfo), '("drag-leave", WidgetDragLeaveSignalInfo), '("drag-motion", WidgetDragMotionSignalInfo), '("draw", WidgetDrawSignalInfo), '("enable-debugging", WindowEnableDebuggingSignalInfo), '("enter-notify-event", WidgetEnterNotifyEventSignalInfo), '("event", WidgetEventSignalInfo), '("event-after", WidgetEventAfterSignalInfo), '("focus", WidgetFocusSignalInfo), '("focus-in-event", WidgetFocusInEventSignalInfo), '("focus-out-event", WidgetFocusOutEventSignalInfo), '("grab-broken-event", WidgetGrabBrokenEventSignalInfo), '("grab-focus", WidgetGrabFocusSignalInfo), '("grab-notify", WidgetGrabNotifySignalInfo), '("hide", WidgetHideSignalInfo), '("hierarchy-changed", WidgetHierarchyChangedSignalInfo), '("key-press-event", WidgetKeyPressEventSignalInfo), '("key-release-event", WidgetKeyReleaseEventSignalInfo), '("keynav-failed", WidgetKeynavFailedSignalInfo), '("keys-changed", WindowKeysChangedSignalInfo), '("leave-notify-event", WidgetLeaveNotifyEventSignalInfo), '("map", WidgetMapSignalInfo), '("map-event", WidgetMapEventSignalInfo), '("mnemonic-activate", WidgetMnemonicActivateSignalInfo), '("motion-notify-event", WidgetMotionNotifyEventSignalInfo), '("move-focus", WidgetMoveFocusSignalInfo), '("notify", GObject.ObjectNotifySignalInfo), '("parent-set", WidgetParentSetSignalInfo), '("popup-menu", WidgetPopupMenuSignalInfo), '("property-notify-event", WidgetPropertyNotifyEventSignalInfo), '("proximity-in-event", WidgetProximityInEventSignalInfo), '("proximity-out-event", WidgetProximityOutEventSignalInfo), '("query-tooltip", WidgetQueryTooltipSignalInfo), '("realize", WidgetRealizeSignalInfo), '("remove", ContainerRemoveSignalInfo), '("response", DialogResponseSignalInfo), '("screen-changed", WidgetScreenChangedSignalInfo), '("scroll-event", WidgetScrollEventSignalInfo), '("selection-clear-event", WidgetSelectionClearEventSignalInfo), '("selection-get", WidgetSelectionGetSignalInfo), '("selection-notify-event", WidgetSelectionNotifyEventSignalInfo), '("selection-received", WidgetSelectionReceivedSignalInfo), '("selection-request-event", WidgetSelectionRequestEventSignalInfo), '("set-focus", WindowSetFocusSignalInfo), '("set-focus-child", ContainerSetFocusChildSignalInfo), '("show", WidgetShowSignalInfo), '("show-help", WidgetShowHelpSignalInfo), '("size-allocate", WidgetSizeAllocateSignalInfo), '("state-changed", WidgetStateChangedSignalInfo), '("state-flags-changed", WidgetStateFlagsChangedSignalInfo), '("style-set", WidgetStyleSetSignalInfo), '("style-updated", WidgetStyleUpdatedSignalInfo), '("touch-event", WidgetTouchEventSignalInfo), '("unmap", WidgetUnmapSignalInfo), '("unmap-event", WidgetUnmapEventSignalInfo), '("unrealize", WidgetUnrealizeSignalInfo), '("visibility-notify-event", WidgetVisibilityNotifyEventSignalInfo), '("window-state-event", WidgetWindowStateEventSignalInfo), '("notify::[property]", GObjectNotifySignalInfo)] :: [(Symbol, *)]) -- method ColorSelectionDialog::new -- method type : Constructor -- Args : [Arg {argName = "title", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "title", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TInterface "Gtk" "ColorSelectionDialog" -- throws : False -- Skip return : False foreign import ccall "gtk_color_selection_dialog_new" gtk_color_selection_dialog_new :: CString -> -- title : TBasicType TUTF8 IO (Ptr ColorSelectionDialog) colorSelectionDialogNew :: (MonadIO m) => T.Text -> -- title m ColorSelectionDialog colorSelectionDialogNew title = liftIO $ do title' <- textToCString title result <- gtk_color_selection_dialog_new title' checkUnexpectedReturnNULL "gtk_color_selection_dialog_new" result result' <- (newObject ColorSelectionDialog) result freeMem title' return result' -- method ColorSelectionDialog::get_color_selection -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "ColorSelectionDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "ColorSelectionDialog", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TInterface "Gtk" "Widget" -- throws : False -- Skip return : False foreign import ccall "gtk_color_selection_dialog_get_color_selection" gtk_color_selection_dialog_get_color_selection :: Ptr ColorSelectionDialog -> -- _obj : TInterface "Gtk" "ColorSelectionDialog" IO (Ptr Widget) colorSelectionDialogGetColorSelection :: (MonadIO m, ColorSelectionDialogK a) => a -> -- _obj m Widget colorSelectionDialogGetColorSelection _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- gtk_color_selection_dialog_get_color_selection _obj' checkUnexpectedReturnNULL "gtk_color_selection_dialog_get_color_selection" result result' <- (newObject Widget) result touchManagedPtr _obj return result'