module GI.Gtk.Objects.RecentChooserMenu
(
RecentChooserMenu(..) ,
RecentChooserMenuK ,
toRecentChooserMenu ,
noRecentChooserMenu ,
recentChooserMenuGetShowNumbers ,
recentChooserMenuNew ,
recentChooserMenuNewForManager ,
recentChooserMenuSetShowNumbers ,
RecentChooserMenuShowNumbersPropertyInfo,
constructRecentChooserMenuShowNumbers ,
getRecentChooserMenuShowNumbers ,
setRecentChooserMenuShowNumbers ,
) 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 RecentChooserMenu = RecentChooserMenu (ForeignPtr RecentChooserMenu)
foreign import ccall "gtk_recent_chooser_menu_get_type"
c_gtk_recent_chooser_menu_get_type :: IO GType
type instance ParentTypes RecentChooserMenu = RecentChooserMenuParentTypes
type RecentChooserMenuParentTypes = '[Menu, MenuShell, Container, Widget, GObject.Object, Atk.ImplementorIface, Activatable, Buildable, RecentChooser]
instance GObject RecentChooserMenu where
gobjectIsInitiallyUnowned _ = True
gobjectType _ = c_gtk_recent_chooser_menu_get_type
class GObject o => RecentChooserMenuK o
instance (GObject o, IsDescendantOf RecentChooserMenu o) => RecentChooserMenuK o
toRecentChooserMenu :: RecentChooserMenuK o => o -> IO RecentChooserMenu
toRecentChooserMenu = unsafeCastTo RecentChooserMenu
noRecentChooserMenu :: Maybe RecentChooserMenu
noRecentChooserMenu = Nothing
getRecentChooserMenuShowNumbers :: (MonadIO m, RecentChooserMenuK o) => o -> m Bool
getRecentChooserMenuShowNumbers obj = liftIO $ getObjectPropertyBool obj "show-numbers"
setRecentChooserMenuShowNumbers :: (MonadIO m, RecentChooserMenuK o) => o -> Bool -> m ()
setRecentChooserMenuShowNumbers obj val = liftIO $ setObjectPropertyBool obj "show-numbers" val
constructRecentChooserMenuShowNumbers :: Bool -> IO ([Char], GValue)
constructRecentChooserMenuShowNumbers val = constructObjectPropertyBool "show-numbers" val
data RecentChooserMenuShowNumbersPropertyInfo
instance AttrInfo RecentChooserMenuShowNumbersPropertyInfo where
type AttrAllowedOps RecentChooserMenuShowNumbersPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint RecentChooserMenuShowNumbersPropertyInfo = (~) Bool
type AttrBaseTypeConstraint RecentChooserMenuShowNumbersPropertyInfo = RecentChooserMenuK
type AttrGetType RecentChooserMenuShowNumbersPropertyInfo = Bool
type AttrLabel RecentChooserMenuShowNumbersPropertyInfo = "RecentChooserMenu::show-numbers"
attrGet _ = getRecentChooserMenuShowNumbers
attrSet _ = setRecentChooserMenuShowNumbers
attrConstruct _ = constructRecentChooserMenuShowNumbers
type instance AttributeList RecentChooserMenu = RecentChooserMenuAttributeList
type RecentChooserMenuAttributeList = ('[ '("accel-group", MenuAccelGroupPropertyInfo), '("accel-path", MenuAccelPathPropertyInfo), '("active", MenuActivePropertyInfo), '("app-paintable", WidgetAppPaintablePropertyInfo), '("attach-widget", MenuAttachWidgetPropertyInfo), '("border-width", ContainerBorderWidthPropertyInfo), '("can-default", WidgetCanDefaultPropertyInfo), '("can-focus", WidgetCanFocusPropertyInfo), '("child", ContainerChildPropertyInfo), '("composite-child", WidgetCompositeChildPropertyInfo), '("double-buffered", WidgetDoubleBufferedPropertyInfo), '("events", WidgetEventsPropertyInfo), '("expand", WidgetExpandPropertyInfo), '("filter", RecentChooserFilterPropertyInfo), '("halign", WidgetHalignPropertyInfo), '("has-default", WidgetHasDefaultPropertyInfo), '("has-focus", WidgetHasFocusPropertyInfo), '("has-tooltip", WidgetHasTooltipPropertyInfo), '("height-request", WidgetHeightRequestPropertyInfo), '("hexpand", WidgetHexpandPropertyInfo), '("hexpand-set", WidgetHexpandSetPropertyInfo), '("is-focus", WidgetIsFocusPropertyInfo), '("limit", RecentChooserLimitPropertyInfo), '("local-only", RecentChooserLocalOnlyPropertyInfo), '("margin", WidgetMarginPropertyInfo), '("margin-bottom", WidgetMarginBottomPropertyInfo), '("margin-end", WidgetMarginEndPropertyInfo), '("margin-left", WidgetMarginLeftPropertyInfo), '("margin-right", WidgetMarginRightPropertyInfo), '("margin-start", WidgetMarginStartPropertyInfo), '("margin-top", WidgetMarginTopPropertyInfo), '("monitor", MenuMonitorPropertyInfo), '("name", WidgetNamePropertyInfo), '("no-show-all", WidgetNoShowAllPropertyInfo), '("opacity", WidgetOpacityPropertyInfo), '("parent", WidgetParentPropertyInfo), '("receives-default", WidgetReceivesDefaultPropertyInfo), '("recent-manager", RecentChooserRecentManagerPropertyInfo), '("related-action", ActivatableRelatedActionPropertyInfo), '("reserve-toggle-size", MenuReserveToggleSizePropertyInfo), '("resize-mode", ContainerResizeModePropertyInfo), '("scale-factor", WidgetScaleFactorPropertyInfo), '("select-multiple", RecentChooserSelectMultiplePropertyInfo), '("sensitive", WidgetSensitivePropertyInfo), '("show-icons", RecentChooserShowIconsPropertyInfo), '("show-not-found", RecentChooserShowNotFoundPropertyInfo), '("show-numbers", RecentChooserMenuShowNumbersPropertyInfo), '("show-private", RecentChooserShowPrivatePropertyInfo), '("show-tips", RecentChooserShowTipsPropertyInfo), '("sort-type", RecentChooserSortTypePropertyInfo), '("style", WidgetStylePropertyInfo), '("take-focus", MenuShellTakeFocusPropertyInfo), '("tearoff-state", MenuTearoffStatePropertyInfo), '("tearoff-title", MenuTearoffTitlePropertyInfo), '("tooltip-markup", WidgetTooltipMarkupPropertyInfo), '("tooltip-text", WidgetTooltipTextPropertyInfo), '("use-action-appearance", ActivatableUseActionAppearancePropertyInfo), '("valign", WidgetValignPropertyInfo), '("vexpand", WidgetVexpandPropertyInfo), '("vexpand-set", WidgetVexpandSetPropertyInfo), '("visible", WidgetVisiblePropertyInfo), '("width-request", WidgetWidthRequestPropertyInfo), '("window", WidgetWindowPropertyInfo)] :: [(Symbol, *)])
type instance SignalList RecentChooserMenu = RecentChooserMenuSignalList
type RecentChooserMenuSignalList = ('[ '("accel-closures-changed", WidgetAccelClosuresChangedSignalInfo), '("activate-current", MenuShellActivateCurrentSignalInfo), '("add", ContainerAddSignalInfo), '("button-press-event", WidgetButtonPressEventSignalInfo), '("button-release-event", WidgetButtonReleaseEventSignalInfo), '("can-activate-accel", WidgetCanActivateAccelSignalInfo), '("cancel", MenuShellCancelSignalInfo), '("check-resize", ContainerCheckResizeSignalInfo), '("child-notify", WidgetChildNotifySignalInfo), '("composited-changed", WidgetCompositedChangedSignalInfo), '("configure-event", WidgetConfigureEventSignalInfo), '("cycle-focus", MenuShellCycleFocusSignalInfo), '("damage-event", WidgetDamageEventSignalInfo), '("deactivate", MenuShellDeactivateSignalInfo), '("delete-event", WidgetDeleteEventSignalInfo), '("destroy", WidgetDestroySignalInfo), '("destroy-event", WidgetDestroyEventSignalInfo), '("direction-changed", WidgetDirectionChangedSignalInfo), '("drag-begin", WidgetDragBeginSignalInfo), '("drag-data-delete", WidgetDragDataDeleteSignalInfo), '("drag-data-get", WidgetDragDataGetSignalInfo), '("drag-data-received", WidgetDragDataReceivedSignalInfo), '("drag-drop", WidgetDragDropSignalInfo), '("drag-end", WidgetDragEndSignalInfo), '("drag-failed", WidgetDragFailedSignalInfo), '("drag-leave", WidgetDragLeaveSignalInfo), '("drag-motion", WidgetDragMotionSignalInfo), '("draw", WidgetDrawSignalInfo), '("enter-notify-event", WidgetEnterNotifyEventSignalInfo), '("event", WidgetEventSignalInfo), '("event-after", WidgetEventAfterSignalInfo), '("focus", WidgetFocusSignalInfo), '("focus-in-event", WidgetFocusInEventSignalInfo), '("focus-out-event", WidgetFocusOutEventSignalInfo), '("grab-broken-event", WidgetGrabBrokenEventSignalInfo), '("grab-focus", WidgetGrabFocusSignalInfo), '("grab-notify", WidgetGrabNotifySignalInfo), '("hide", WidgetHideSignalInfo), '("hierarchy-changed", WidgetHierarchyChangedSignalInfo), '("insert", MenuShellInsertSignalInfo), '("item-activated", RecentChooserItemActivatedSignalInfo), '("key-press-event", WidgetKeyPressEventSignalInfo), '("key-release-event", WidgetKeyReleaseEventSignalInfo), '("keynav-failed", WidgetKeynavFailedSignalInfo), '("leave-notify-event", WidgetLeaveNotifyEventSignalInfo), '("map", WidgetMapSignalInfo), '("map-event", WidgetMapEventSignalInfo), '("mnemonic-activate", WidgetMnemonicActivateSignalInfo), '("motion-notify-event", WidgetMotionNotifyEventSignalInfo), '("move-current", MenuShellMoveCurrentSignalInfo), '("move-focus", WidgetMoveFocusSignalInfo), '("move-scroll", MenuMoveScrollSignalInfo), '("move-selected", MenuShellMoveSelectedSignalInfo), '("notify", GObject.ObjectNotifySignalInfo), '("parent-set", WidgetParentSetSignalInfo), '("popup-menu", WidgetPopupMenuSignalInfo), '("property-notify-event", WidgetPropertyNotifyEventSignalInfo), '("proximity-in-event", WidgetProximityInEventSignalInfo), '("proximity-out-event", WidgetProximityOutEventSignalInfo), '("query-tooltip", WidgetQueryTooltipSignalInfo), '("realize", WidgetRealizeSignalInfo), '("remove", ContainerRemoveSignalInfo), '("screen-changed", WidgetScreenChangedSignalInfo), '("scroll-event", WidgetScrollEventSignalInfo), '("selection-changed", RecentChooserSelectionChangedSignalInfo), '("selection-clear-event", WidgetSelectionClearEventSignalInfo), '("selection-done", MenuShellSelectionDoneSignalInfo), '("selection-get", WidgetSelectionGetSignalInfo), '("selection-notify-event", WidgetSelectionNotifyEventSignalInfo), '("selection-received", WidgetSelectionReceivedSignalInfo), '("selection-request-event", WidgetSelectionRequestEventSignalInfo), '("set-focus-child", ContainerSetFocusChildSignalInfo), '("show", WidgetShowSignalInfo), '("show-help", WidgetShowHelpSignalInfo), '("size-allocate", WidgetSizeAllocateSignalInfo), '("state-changed", WidgetStateChangedSignalInfo), '("state-flags-changed", WidgetStateFlagsChangedSignalInfo), '("style-set", WidgetStyleSetSignalInfo), '("style-updated", WidgetStyleUpdatedSignalInfo), '("touch-event", WidgetTouchEventSignalInfo), '("unmap", WidgetUnmapSignalInfo), '("unmap-event", WidgetUnmapEventSignalInfo), '("unrealize", WidgetUnrealizeSignalInfo), '("visibility-notify-event", WidgetVisibilityNotifyEventSignalInfo), '("window-state-event", WidgetWindowStateEventSignalInfo), '("notify::[property]", GObjectNotifySignalInfo)] :: [(Symbol, *)])
foreign import ccall "gtk_recent_chooser_menu_new" gtk_recent_chooser_menu_new ::
IO (Ptr RecentChooserMenu)
recentChooserMenuNew ::
(MonadIO m) =>
m RecentChooserMenu
recentChooserMenuNew = liftIO $ do
result <- gtk_recent_chooser_menu_new
checkUnexpectedReturnNULL "gtk_recent_chooser_menu_new" result
result' <- (newObject RecentChooserMenu) result
return result'
foreign import ccall "gtk_recent_chooser_menu_new_for_manager" gtk_recent_chooser_menu_new_for_manager ::
Ptr RecentManager ->
IO (Ptr RecentChooserMenu)
recentChooserMenuNewForManager ::
(MonadIO m, RecentManagerK a) =>
a ->
m RecentChooserMenu
recentChooserMenuNewForManager manager = liftIO $ do
let manager' = unsafeManagedPtrCastPtr manager
result <- gtk_recent_chooser_menu_new_for_manager manager'
checkUnexpectedReturnNULL "gtk_recent_chooser_menu_new_for_manager" result
result' <- (newObject RecentChooserMenu) result
touchManagedPtr manager
return result'
foreign import ccall "gtk_recent_chooser_menu_get_show_numbers" gtk_recent_chooser_menu_get_show_numbers ::
Ptr RecentChooserMenu ->
IO CInt
recentChooserMenuGetShowNumbers ::
(MonadIO m, RecentChooserMenuK a) =>
a ->
m Bool
recentChooserMenuGetShowNumbers _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- gtk_recent_chooser_menu_get_show_numbers _obj'
let result' = (/= 0) result
touchManagedPtr _obj
return result'
foreign import ccall "gtk_recent_chooser_menu_set_show_numbers" gtk_recent_chooser_menu_set_show_numbers ::
Ptr RecentChooserMenu ->
CInt ->
IO ()
recentChooserMenuSetShowNumbers ::
(MonadIO m, RecentChooserMenuK a) =>
a ->
Bool ->
m ()
recentChooserMenuSetShowNumbers _obj show_numbers = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
let show_numbers' = (fromIntegral . fromEnum) show_numbers
gtk_recent_chooser_menu_set_show_numbers _obj' show_numbers'
touchManagedPtr _obj
return ()