{-# LANGUAGE TypeApplications #-}


-- | Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- t'GI.Gtk.Objects.Calendar.Calendar' is a widget that displays a Gregorian calendar, one month
-- at a time. It can be created with 'GI.Gtk.Objects.Calendar.calendarNew'.
-- 
-- The date that is currently displayed can be altered with
-- 'GI.Gtk.Objects.Calendar.calendarSelectDay'.
-- 
-- To place a visual marker on a particular day, use 'GI.Gtk.Objects.Calendar.calendarMarkDay'
-- and to remove the marker, 'GI.Gtk.Objects.Calendar.calendarUnmarkDay'. Alternative, all
-- marks can be cleared with 'GI.Gtk.Objects.Calendar.calendarClearMarks'.
-- 
-- The selected date can be retrieved from a t'GI.Gtk.Objects.Calendar.Calendar' using
-- 'GI.Gtk.Objects.Calendar.calendarGetDate'.
-- 
-- Users should be aware that, although the Gregorian calendar is the
-- legal calendar in most countries, it was adopted progressively
-- between 1582 and 1929. Display before these dates is likely to be
-- historically incorrect.
-- 
-- = CSS nodes
-- 
-- 
-- === /plain code/
-- >
-- >calendar.view
-- >├── header
-- >│   ├── button
-- >│   ├── stack.month
-- >│   ├── button
-- >│   ├── button
-- >│   ├── label.year
-- >│   ╰── button
-- >╰── grid
-- >    ╰── label[.day-name][.week-number][.day-number][.other-month][.today]
-- 
-- 
-- GtkCalendar has a main node with name calendar. It contains a subnode called header
-- containing the widgets for switching between years and months.
-- 
-- The grid subnode contains all day labels, including week numbers on the left (marked
-- with the .week-number css class) and day names on top (marked with the .day-name
-- css class).
-- 
-- Day labels that belong to the previous or next month get the .other-month style class.
-- The label of the current day get the .today style class.
-- 
-- Marked day labels get the :selected state assigned.

#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif

module GI.Gtk.Objects.Calendar
    ( 

-- * Exported types
    Calendar(..)                            ,
    IsCalendar                              ,
    toCalendar                              ,


 -- * Methods
-- ** Overloaded methods #method:Overloaded methods#

#if defined(ENABLE_OVERLOADING)
    ResolveCalendarMethod                   ,
#endif


-- ** clearMarks #method:clearMarks#

#if defined(ENABLE_OVERLOADING)
    CalendarClearMarksMethodInfo            ,
#endif
    calendarClearMarks                      ,


-- ** getDate #method:getDate#

#if defined(ENABLE_OVERLOADING)
    CalendarGetDateMethodInfo               ,
#endif
    calendarGetDate                         ,


-- ** getDayIsMarked #method:getDayIsMarked#

#if defined(ENABLE_OVERLOADING)
    CalendarGetDayIsMarkedMethodInfo        ,
#endif
    calendarGetDayIsMarked                  ,


-- ** getShowDayNames #method:getShowDayNames#

#if defined(ENABLE_OVERLOADING)
    CalendarGetShowDayNamesMethodInfo       ,
#endif
    calendarGetShowDayNames                 ,


-- ** getShowHeading #method:getShowHeading#

#if defined(ENABLE_OVERLOADING)
    CalendarGetShowHeadingMethodInfo        ,
#endif
    calendarGetShowHeading                  ,


-- ** getShowWeekNumbers #method:getShowWeekNumbers#

#if defined(ENABLE_OVERLOADING)
    CalendarGetShowWeekNumbersMethodInfo    ,
#endif
    calendarGetShowWeekNumbers              ,


-- ** markDay #method:markDay#

#if defined(ENABLE_OVERLOADING)
    CalendarMarkDayMethodInfo               ,
#endif
    calendarMarkDay                         ,


-- ** new #method:new#

    calendarNew                             ,


-- ** selectDay #method:selectDay#

#if defined(ENABLE_OVERLOADING)
    CalendarSelectDayMethodInfo             ,
#endif
    calendarSelectDay                       ,


-- ** setShowDayNames #method:setShowDayNames#

#if defined(ENABLE_OVERLOADING)
    CalendarSetShowDayNamesMethodInfo       ,
#endif
    calendarSetShowDayNames                 ,


-- ** setShowHeading #method:setShowHeading#

#if defined(ENABLE_OVERLOADING)
    CalendarSetShowHeadingMethodInfo        ,
#endif
    calendarSetShowHeading                  ,


-- ** setShowWeekNumbers #method:setShowWeekNumbers#

#if defined(ENABLE_OVERLOADING)
    CalendarSetShowWeekNumbersMethodInfo    ,
#endif
    calendarSetShowWeekNumbers              ,


-- ** unmarkDay #method:unmarkDay#

#if defined(ENABLE_OVERLOADING)
    CalendarUnmarkDayMethodInfo             ,
#endif
    calendarUnmarkDay                       ,




 -- * Properties
-- ** day #attr:day#
-- | The selected day (as a number between 1 and 31, or 0
-- to unselect the currently selected day).
-- This property gets initially set to the current day.

#if defined(ENABLE_OVERLOADING)
    CalendarDayPropertyInfo                 ,
#endif
#if defined(ENABLE_OVERLOADING)
    calendarDay                             ,
#endif
    constructCalendarDay                    ,
    getCalendarDay                          ,
    setCalendarDay                          ,


-- ** month #attr:month#
-- | The selected month (as a number between 0 and 11).
-- This property gets initially set to the current month.

#if defined(ENABLE_OVERLOADING)
    CalendarMonthPropertyInfo               ,
#endif
#if defined(ENABLE_OVERLOADING)
    calendarMonth                           ,
#endif
    constructCalendarMonth                  ,
    getCalendarMonth                        ,
    setCalendarMonth                        ,


-- ** showDayNames #attr:showDayNames#
-- | Determines whether day names are displayed.

#if defined(ENABLE_OVERLOADING)
    CalendarShowDayNamesPropertyInfo        ,
#endif
#if defined(ENABLE_OVERLOADING)
    calendarShowDayNames                    ,
#endif
    constructCalendarShowDayNames           ,
    getCalendarShowDayNames                 ,
    setCalendarShowDayNames                 ,


-- ** showHeading #attr:showHeading#
-- | Determines whether a heading is displayed.

#if defined(ENABLE_OVERLOADING)
    CalendarShowHeadingPropertyInfo         ,
#endif
#if defined(ENABLE_OVERLOADING)
    calendarShowHeading                     ,
#endif
    constructCalendarShowHeading            ,
    getCalendarShowHeading                  ,
    setCalendarShowHeading                  ,


-- ** showWeekNumbers #attr:showWeekNumbers#
-- | Determines whether week numbers are displayed.

#if defined(ENABLE_OVERLOADING)
    CalendarShowWeekNumbersPropertyInfo     ,
#endif
#if defined(ENABLE_OVERLOADING)
    calendarShowWeekNumbers                 ,
#endif
    constructCalendarShowWeekNumbers        ,
    getCalendarShowWeekNumbers              ,
    setCalendarShowWeekNumbers              ,


-- ** year #attr:year#
-- | The selected year.
-- This property gets initially set to the current year.

#if defined(ENABLE_OVERLOADING)
    CalendarYearPropertyInfo                ,
#endif
#if defined(ENABLE_OVERLOADING)
    calendarYear                            ,
#endif
    constructCalendarYear                   ,
    getCalendarYear                         ,
    setCalendarYear                         ,




 -- * Signals
-- ** daySelected #signal:daySelected#

    C_CalendarDaySelectedCallback           ,
    CalendarDaySelectedCallback             ,
#if defined(ENABLE_OVERLOADING)
    CalendarDaySelectedSignalInfo           ,
#endif
    afterCalendarDaySelected                ,
    genClosure_CalendarDaySelected          ,
    mk_CalendarDaySelectedCallback          ,
    noCalendarDaySelectedCallback           ,
    onCalendarDaySelected                   ,
    wrap_CalendarDaySelectedCallback        ,


-- ** nextMonth #signal:nextMonth#

    C_CalendarNextMonthCallback             ,
    CalendarNextMonthCallback               ,
#if defined(ENABLE_OVERLOADING)
    CalendarNextMonthSignalInfo             ,
#endif
    afterCalendarNextMonth                  ,
    genClosure_CalendarNextMonth            ,
    mk_CalendarNextMonthCallback            ,
    noCalendarNextMonthCallback             ,
    onCalendarNextMonth                     ,
    wrap_CalendarNextMonthCallback          ,


-- ** nextYear #signal:nextYear#

    C_CalendarNextYearCallback              ,
    CalendarNextYearCallback                ,
#if defined(ENABLE_OVERLOADING)
    CalendarNextYearSignalInfo              ,
#endif
    afterCalendarNextYear                   ,
    genClosure_CalendarNextYear             ,
    mk_CalendarNextYearCallback             ,
    noCalendarNextYearCallback              ,
    onCalendarNextYear                      ,
    wrap_CalendarNextYearCallback           ,


-- ** prevMonth #signal:prevMonth#

    C_CalendarPrevMonthCallback             ,
    CalendarPrevMonthCallback               ,
#if defined(ENABLE_OVERLOADING)
    CalendarPrevMonthSignalInfo             ,
#endif
    afterCalendarPrevMonth                  ,
    genClosure_CalendarPrevMonth            ,
    mk_CalendarPrevMonthCallback            ,
    noCalendarPrevMonthCallback             ,
    onCalendarPrevMonth                     ,
    wrap_CalendarPrevMonthCallback          ,


-- ** prevYear #signal:prevYear#

    C_CalendarPrevYearCallback              ,
    CalendarPrevYearCallback                ,
#if defined(ENABLE_OVERLOADING)
    CalendarPrevYearSignalInfo              ,
#endif
    afterCalendarPrevYear                   ,
    genClosure_CalendarPrevYear             ,
    mk_CalendarPrevYearCallback             ,
    noCalendarPrevYearCallback              ,
    onCalendarPrevYear                      ,
    wrap_CalendarPrevYearCallback           ,




    ) where

import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P

import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.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 Control.Monad.IO.Class as MIO
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.GLib.Structs.DateTime as GLib.DateTime
import qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.Buildable as Gtk.Buildable
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.ConstraintTarget as Gtk.ConstraintTarget
import {-# SOURCE #-} qualified GI.Gtk.Objects.Widget as Gtk.Widget

-- | Memory-managed wrapper type.
newtype Calendar = Calendar (SP.ManagedPtr Calendar)
    deriving (Calendar -> Calendar -> Bool
(Calendar -> Calendar -> Bool)
-> (Calendar -> Calendar -> Bool) -> Eq Calendar
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Calendar -> Calendar -> Bool
$c/= :: Calendar -> Calendar -> Bool
== :: Calendar -> Calendar -> Bool
$c== :: Calendar -> Calendar -> Bool
Eq)

instance SP.ManagedPtrNewtype Calendar where
    toManagedPtr :: Calendar -> ManagedPtr Calendar
toManagedPtr (Calendar ManagedPtr Calendar
p) = ManagedPtr Calendar
p

foreign import ccall "gtk_calendar_get_type"
    c_gtk_calendar_get_type :: IO B.Types.GType

instance B.Types.TypedObject Calendar where
    glibType :: IO GType
glibType = IO GType
c_gtk_calendar_get_type

instance B.Types.GObject Calendar

-- | Convert 'Calendar' to and from 'Data.GI.Base.GValue.GValue' with 'Data.GI.Base.GValue.toGValue' and 'Data.GI.Base.GValue.fromGValue'.
instance B.GValue.IsGValue Calendar where
    toGValue :: Calendar -> IO GValue
toGValue Calendar
o = do
        GType
gtype <- IO GType
c_gtk_calendar_get_type
        Calendar -> (Ptr Calendar -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr Calendar
o (GType
-> (GValue -> Ptr Calendar -> IO ()) -> Ptr Calendar -> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr Calendar -> IO ()
forall a. GObject a => GValue -> Ptr a -> IO ()
B.GValue.set_object)
        
    fromGValue :: GValue -> IO Calendar
fromGValue GValue
gv = do
        Ptr Calendar
ptr <- GValue -> IO (Ptr Calendar)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr Calendar)
        (ManagedPtr Calendar -> Calendar) -> Ptr Calendar -> IO Calendar
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr Calendar -> Calendar
Calendar Ptr Calendar
ptr
        
    

-- | Type class for types which can be safely cast to `Calendar`, for instance with `toCalendar`.
class (SP.GObject o, O.IsDescendantOf Calendar o) => IsCalendar o
instance (SP.GObject o, O.IsDescendantOf Calendar o) => IsCalendar o

instance O.HasParentTypes Calendar
type instance O.ParentTypes Calendar = '[Gtk.Widget.Widget, GObject.Object.Object, Atk.ImplementorIface.ImplementorIface, Gtk.Buildable.Buildable, Gtk.ConstraintTarget.ConstraintTarget]

-- | Cast to `Calendar`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.
toCalendar :: (MonadIO m, IsCalendar o) => o -> m Calendar
toCalendar :: o -> m Calendar
toCalendar = IO Calendar -> m Calendar
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Calendar -> m Calendar)
-> (o -> IO Calendar) -> o -> m Calendar
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr Calendar -> Calendar) -> o -> IO Calendar
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
 ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr Calendar -> Calendar
Calendar

#if defined(ENABLE_OVERLOADING)
type family ResolveCalendarMethod (t :: Symbol) (o :: *) :: * where
    ResolveCalendarMethod "actionSetEnabled" o = Gtk.Widget.WidgetActionSetEnabledMethodInfo
    ResolveCalendarMethod "activate" o = Gtk.Widget.WidgetActivateMethodInfo
    ResolveCalendarMethod "activateAction" o = Gtk.Widget.WidgetActivateActionMethodInfo
    ResolveCalendarMethod "activateDefault" o = Gtk.Widget.WidgetActivateDefaultMethodInfo
    ResolveCalendarMethod "addChild" o = Gtk.Buildable.BuildableAddChildMethodInfo
    ResolveCalendarMethod "addController" o = Gtk.Widget.WidgetAddControllerMethodInfo
    ResolveCalendarMethod "addCssClass" o = Gtk.Widget.WidgetAddCssClassMethodInfo
    ResolveCalendarMethod "addMnemonicLabel" o = Gtk.Widget.WidgetAddMnemonicLabelMethodInfo
    ResolveCalendarMethod "addTickCallback" o = Gtk.Widget.WidgetAddTickCallbackMethodInfo
    ResolveCalendarMethod "allocate" o = Gtk.Widget.WidgetAllocateMethodInfo
    ResolveCalendarMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveCalendarMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveCalendarMethod "childFocus" o = Gtk.Widget.WidgetChildFocusMethodInfo
    ResolveCalendarMethod "clearMarks" o = CalendarClearMarksMethodInfo
    ResolveCalendarMethod "computeBounds" o = Gtk.Widget.WidgetComputeBoundsMethodInfo
    ResolveCalendarMethod "computeExpand" o = Gtk.Widget.WidgetComputeExpandMethodInfo
    ResolveCalendarMethod "computePoint" o = Gtk.Widget.WidgetComputePointMethodInfo
    ResolveCalendarMethod "computeTransform" o = Gtk.Widget.WidgetComputeTransformMethodInfo
    ResolveCalendarMethod "constructChild" o = Gtk.Buildable.BuildableConstructChildMethodInfo
    ResolveCalendarMethod "contains" o = Gtk.Widget.WidgetContainsMethodInfo
    ResolveCalendarMethod "createPangoContext" o = Gtk.Widget.WidgetCreatePangoContextMethodInfo
    ResolveCalendarMethod "createPangoLayout" o = Gtk.Widget.WidgetCreatePangoLayoutMethodInfo
    ResolveCalendarMethod "customFinished" o = Gtk.Buildable.BuildableCustomFinishedMethodInfo
    ResolveCalendarMethod "customTagEnd" o = Gtk.Buildable.BuildableCustomTagEndMethodInfo
    ResolveCalendarMethod "customTagStart" o = Gtk.Buildable.BuildableCustomTagStartMethodInfo
    ResolveCalendarMethod "deviceIsShadowed" o = Gtk.Widget.WidgetDeviceIsShadowedMethodInfo
    ResolveCalendarMethod "dragCheckThreshold" o = Gtk.Widget.WidgetDragCheckThresholdMethodInfo
    ResolveCalendarMethod "errorBell" o = Gtk.Widget.WidgetErrorBellMethodInfo
    ResolveCalendarMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveCalendarMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveCalendarMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
    ResolveCalendarMethod "grabFocus" o = Gtk.Widget.WidgetGrabFocusMethodInfo
    ResolveCalendarMethod "hasCssClass" o = Gtk.Widget.WidgetHasCssClassMethodInfo
    ResolveCalendarMethod "hasDefault" o = Gtk.Widget.WidgetHasDefaultMethodInfo
    ResolveCalendarMethod "hasFocus" o = Gtk.Widget.WidgetHasFocusMethodInfo
    ResolveCalendarMethod "hasVisibleFocus" o = Gtk.Widget.WidgetHasVisibleFocusMethodInfo
    ResolveCalendarMethod "hide" o = Gtk.Widget.WidgetHideMethodInfo
    ResolveCalendarMethod "inDestruction" o = Gtk.Widget.WidgetInDestructionMethodInfo
    ResolveCalendarMethod "initTemplate" o = Gtk.Widget.WidgetInitTemplateMethodInfo
    ResolveCalendarMethod "insertActionGroup" o = Gtk.Widget.WidgetInsertActionGroupMethodInfo
    ResolveCalendarMethod "insertAfter" o = Gtk.Widget.WidgetInsertAfterMethodInfo
    ResolveCalendarMethod "insertBefore" o = Gtk.Widget.WidgetInsertBeforeMethodInfo
    ResolveCalendarMethod "isAncestor" o = Gtk.Widget.WidgetIsAncestorMethodInfo
    ResolveCalendarMethod "isDrawable" o = Gtk.Widget.WidgetIsDrawableMethodInfo
    ResolveCalendarMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveCalendarMethod "isFocus" o = Gtk.Widget.WidgetIsFocusMethodInfo
    ResolveCalendarMethod "isSensitive" o = Gtk.Widget.WidgetIsSensitiveMethodInfo
    ResolveCalendarMethod "isVisible" o = Gtk.Widget.WidgetIsVisibleMethodInfo
    ResolveCalendarMethod "keynavFailed" o = Gtk.Widget.WidgetKeynavFailedMethodInfo
    ResolveCalendarMethod "listMnemonicLabels" o = Gtk.Widget.WidgetListMnemonicLabelsMethodInfo
    ResolveCalendarMethod "map" o = Gtk.Widget.WidgetMapMethodInfo
    ResolveCalendarMethod "markDay" o = CalendarMarkDayMethodInfo
    ResolveCalendarMethod "measure" o = Gtk.Widget.WidgetMeasureMethodInfo
    ResolveCalendarMethod "mnemonicActivate" o = Gtk.Widget.WidgetMnemonicActivateMethodInfo
    ResolveCalendarMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveCalendarMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveCalendarMethod "observeChildren" o = Gtk.Widget.WidgetObserveChildrenMethodInfo
    ResolveCalendarMethod "observeControllers" o = Gtk.Widget.WidgetObserveControllersMethodInfo
    ResolveCalendarMethod "parserFinished" o = Gtk.Buildable.BuildableParserFinishedMethodInfo
    ResolveCalendarMethod "pick" o = Gtk.Widget.WidgetPickMethodInfo
    ResolveCalendarMethod "queueAllocate" o = Gtk.Widget.WidgetQueueAllocateMethodInfo
    ResolveCalendarMethod "queueDraw" o = Gtk.Widget.WidgetQueueDrawMethodInfo
    ResolveCalendarMethod "queueResize" o = Gtk.Widget.WidgetQueueResizeMethodInfo
    ResolveCalendarMethod "realize" o = Gtk.Widget.WidgetRealizeMethodInfo
    ResolveCalendarMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolveCalendarMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveCalendarMethod "removeController" o = Gtk.Widget.WidgetRemoveControllerMethodInfo
    ResolveCalendarMethod "removeCssClass" o = Gtk.Widget.WidgetRemoveCssClassMethodInfo
    ResolveCalendarMethod "removeMnemonicLabel" o = Gtk.Widget.WidgetRemoveMnemonicLabelMethodInfo
    ResolveCalendarMethod "removeTickCallback" o = Gtk.Widget.WidgetRemoveTickCallbackMethodInfo
    ResolveCalendarMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveCalendarMethod "selectDay" o = CalendarSelectDayMethodInfo
    ResolveCalendarMethod "shouldLayout" o = Gtk.Widget.WidgetShouldLayoutMethodInfo
    ResolveCalendarMethod "show" o = Gtk.Widget.WidgetShowMethodInfo
    ResolveCalendarMethod "sizeAllocate" o = Gtk.Widget.WidgetSizeAllocateMethodInfo
    ResolveCalendarMethod "snapshotChild" o = Gtk.Widget.WidgetSnapshotChildMethodInfo
    ResolveCalendarMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveCalendarMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveCalendarMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveCalendarMethod "translateCoordinates" o = Gtk.Widget.WidgetTranslateCoordinatesMethodInfo
    ResolveCalendarMethod "triggerTooltipQuery" o = Gtk.Widget.WidgetTriggerTooltipQueryMethodInfo
    ResolveCalendarMethod "unmap" o = Gtk.Widget.WidgetUnmapMethodInfo
    ResolveCalendarMethod "unmarkDay" o = CalendarUnmarkDayMethodInfo
    ResolveCalendarMethod "unparent" o = Gtk.Widget.WidgetUnparentMethodInfo
    ResolveCalendarMethod "unrealize" o = Gtk.Widget.WidgetUnrealizeMethodInfo
    ResolveCalendarMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolveCalendarMethod "unsetStateFlags" o = Gtk.Widget.WidgetUnsetStateFlagsMethodInfo
    ResolveCalendarMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveCalendarMethod "getAccessible" o = Gtk.Widget.WidgetGetAccessibleMethodInfo
    ResolveCalendarMethod "getAllocatedBaseline" o = Gtk.Widget.WidgetGetAllocatedBaselineMethodInfo
    ResolveCalendarMethod "getAllocatedHeight" o = Gtk.Widget.WidgetGetAllocatedHeightMethodInfo
    ResolveCalendarMethod "getAllocatedWidth" o = Gtk.Widget.WidgetGetAllocatedWidthMethodInfo
    ResolveCalendarMethod "getAllocation" o = Gtk.Widget.WidgetGetAllocationMethodInfo
    ResolveCalendarMethod "getAncestor" o = Gtk.Widget.WidgetGetAncestorMethodInfo
    ResolveCalendarMethod "getCanFocus" o = Gtk.Widget.WidgetGetCanFocusMethodInfo
    ResolveCalendarMethod "getCanTarget" o = Gtk.Widget.WidgetGetCanTargetMethodInfo
    ResolveCalendarMethod "getChildVisible" o = Gtk.Widget.WidgetGetChildVisibleMethodInfo
    ResolveCalendarMethod "getClipboard" o = Gtk.Widget.WidgetGetClipboardMethodInfo
    ResolveCalendarMethod "getCssClasses" o = Gtk.Widget.WidgetGetCssClassesMethodInfo
    ResolveCalendarMethod "getCssName" o = Gtk.Widget.WidgetGetCssNameMethodInfo
    ResolveCalendarMethod "getCursor" o = Gtk.Widget.WidgetGetCursorMethodInfo
    ResolveCalendarMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveCalendarMethod "getDate" o = CalendarGetDateMethodInfo
    ResolveCalendarMethod "getDayIsMarked" o = CalendarGetDayIsMarkedMethodInfo
    ResolveCalendarMethod "getDirection" o = Gtk.Widget.WidgetGetDirectionMethodInfo
    ResolveCalendarMethod "getDisplay" o = Gtk.Widget.WidgetGetDisplayMethodInfo
    ResolveCalendarMethod "getFirstChild" o = Gtk.Widget.WidgetGetFirstChildMethodInfo
    ResolveCalendarMethod "getFocusChild" o = Gtk.Widget.WidgetGetFocusChildMethodInfo
    ResolveCalendarMethod "getFocusOnClick" o = Gtk.Widget.WidgetGetFocusOnClickMethodInfo
    ResolveCalendarMethod "getFocusable" o = Gtk.Widget.WidgetGetFocusableMethodInfo
    ResolveCalendarMethod "getFontMap" o = Gtk.Widget.WidgetGetFontMapMethodInfo
    ResolveCalendarMethod "getFontOptions" o = Gtk.Widget.WidgetGetFontOptionsMethodInfo
    ResolveCalendarMethod "getFrameClock" o = Gtk.Widget.WidgetGetFrameClockMethodInfo
    ResolveCalendarMethod "getHalign" o = Gtk.Widget.WidgetGetHalignMethodInfo
    ResolveCalendarMethod "getHasTooltip" o = Gtk.Widget.WidgetGetHasTooltipMethodInfo
    ResolveCalendarMethod "getHeight" o = Gtk.Widget.WidgetGetHeightMethodInfo
    ResolveCalendarMethod "getHexpand" o = Gtk.Widget.WidgetGetHexpandMethodInfo
    ResolveCalendarMethod "getHexpandSet" o = Gtk.Widget.WidgetGetHexpandSetMethodInfo
    ResolveCalendarMethod "getInternalChild" o = Gtk.Buildable.BuildableGetInternalChildMethodInfo
    ResolveCalendarMethod "getLastChild" o = Gtk.Widget.WidgetGetLastChildMethodInfo
    ResolveCalendarMethod "getLayoutManager" o = Gtk.Widget.WidgetGetLayoutManagerMethodInfo
    ResolveCalendarMethod "getMapped" o = Gtk.Widget.WidgetGetMappedMethodInfo
    ResolveCalendarMethod "getMarginBottom" o = Gtk.Widget.WidgetGetMarginBottomMethodInfo
    ResolveCalendarMethod "getMarginEnd" o = Gtk.Widget.WidgetGetMarginEndMethodInfo
    ResolveCalendarMethod "getMarginStart" o = Gtk.Widget.WidgetGetMarginStartMethodInfo
    ResolveCalendarMethod "getMarginTop" o = Gtk.Widget.WidgetGetMarginTopMethodInfo
    ResolveCalendarMethod "getName" o = Gtk.Widget.WidgetGetNameMethodInfo
    ResolveCalendarMethod "getNative" o = Gtk.Widget.WidgetGetNativeMethodInfo
    ResolveCalendarMethod "getNextSibling" o = Gtk.Widget.WidgetGetNextSiblingMethodInfo
    ResolveCalendarMethod "getOpacity" o = Gtk.Widget.WidgetGetOpacityMethodInfo
    ResolveCalendarMethod "getOverflow" o = Gtk.Widget.WidgetGetOverflowMethodInfo
    ResolveCalendarMethod "getPangoContext" o = Gtk.Widget.WidgetGetPangoContextMethodInfo
    ResolveCalendarMethod "getParent" o = Gtk.Widget.WidgetGetParentMethodInfo
    ResolveCalendarMethod "getPreferredSize" o = Gtk.Widget.WidgetGetPreferredSizeMethodInfo
    ResolveCalendarMethod "getPrevSibling" o = Gtk.Widget.WidgetGetPrevSiblingMethodInfo
    ResolveCalendarMethod "getPrimaryClipboard" o = Gtk.Widget.WidgetGetPrimaryClipboardMethodInfo
    ResolveCalendarMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolveCalendarMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveCalendarMethod "getRealized" o = Gtk.Widget.WidgetGetRealizedMethodInfo
    ResolveCalendarMethod "getReceivesDefault" o = Gtk.Widget.WidgetGetReceivesDefaultMethodInfo
    ResolveCalendarMethod "getRequestMode" o = Gtk.Widget.WidgetGetRequestModeMethodInfo
    ResolveCalendarMethod "getRoot" o = Gtk.Widget.WidgetGetRootMethodInfo
    ResolveCalendarMethod "getScaleFactor" o = Gtk.Widget.WidgetGetScaleFactorMethodInfo
    ResolveCalendarMethod "getSensitive" o = Gtk.Widget.WidgetGetSensitiveMethodInfo
    ResolveCalendarMethod "getSettings" o = Gtk.Widget.WidgetGetSettingsMethodInfo
    ResolveCalendarMethod "getShowDayNames" o = CalendarGetShowDayNamesMethodInfo
    ResolveCalendarMethod "getShowHeading" o = CalendarGetShowHeadingMethodInfo
    ResolveCalendarMethod "getShowWeekNumbers" o = CalendarGetShowWeekNumbersMethodInfo
    ResolveCalendarMethod "getSizeRequest" o = Gtk.Widget.WidgetGetSizeRequestMethodInfo
    ResolveCalendarMethod "getStateFlags" o = Gtk.Widget.WidgetGetStateFlagsMethodInfo
    ResolveCalendarMethod "getStyleContext" o = Gtk.Widget.WidgetGetStyleContextMethodInfo
    ResolveCalendarMethod "getSupportMultidevice" o = Gtk.Widget.WidgetGetSupportMultideviceMethodInfo
    ResolveCalendarMethod "getTemplateChild" o = Gtk.Widget.WidgetGetTemplateChildMethodInfo
    ResolveCalendarMethod "getTooltipMarkup" o = Gtk.Widget.WidgetGetTooltipMarkupMethodInfo
    ResolveCalendarMethod "getTooltipText" o = Gtk.Widget.WidgetGetTooltipTextMethodInfo
    ResolveCalendarMethod "getValign" o = Gtk.Widget.WidgetGetValignMethodInfo
    ResolveCalendarMethod "getVexpand" o = Gtk.Widget.WidgetGetVexpandMethodInfo
    ResolveCalendarMethod "getVexpandSet" o = Gtk.Widget.WidgetGetVexpandSetMethodInfo
    ResolveCalendarMethod "getVisible" o = Gtk.Widget.WidgetGetVisibleMethodInfo
    ResolveCalendarMethod "getWidth" o = Gtk.Widget.WidgetGetWidthMethodInfo
    ResolveCalendarMethod "setBuildableProperty" o = Gtk.Buildable.BuildableSetBuildablePropertyMethodInfo
    ResolveCalendarMethod "setCanFocus" o = Gtk.Widget.WidgetSetCanFocusMethodInfo
    ResolveCalendarMethod "setCanTarget" o = Gtk.Widget.WidgetSetCanTargetMethodInfo
    ResolveCalendarMethod "setChildVisible" o = Gtk.Widget.WidgetSetChildVisibleMethodInfo
    ResolveCalendarMethod "setCssClasses" o = Gtk.Widget.WidgetSetCssClassesMethodInfo
    ResolveCalendarMethod "setCursor" o = Gtk.Widget.WidgetSetCursorMethodInfo
    ResolveCalendarMethod "setCursorFromName" o = Gtk.Widget.WidgetSetCursorFromNameMethodInfo
    ResolveCalendarMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveCalendarMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
    ResolveCalendarMethod "setDirection" o = Gtk.Widget.WidgetSetDirectionMethodInfo
    ResolveCalendarMethod "setFocusChild" o = Gtk.Widget.WidgetSetFocusChildMethodInfo
    ResolveCalendarMethod "setFocusOnClick" o = Gtk.Widget.WidgetSetFocusOnClickMethodInfo
    ResolveCalendarMethod "setFocusable" o = Gtk.Widget.WidgetSetFocusableMethodInfo
    ResolveCalendarMethod "setFontMap" o = Gtk.Widget.WidgetSetFontMapMethodInfo
    ResolveCalendarMethod "setFontOptions" o = Gtk.Widget.WidgetSetFontOptionsMethodInfo
    ResolveCalendarMethod "setHalign" o = Gtk.Widget.WidgetSetHalignMethodInfo
    ResolveCalendarMethod "setHasTooltip" o = Gtk.Widget.WidgetSetHasTooltipMethodInfo
    ResolveCalendarMethod "setHexpand" o = Gtk.Widget.WidgetSetHexpandMethodInfo
    ResolveCalendarMethod "setHexpandSet" o = Gtk.Widget.WidgetSetHexpandSetMethodInfo
    ResolveCalendarMethod "setLayoutManager" o = Gtk.Widget.WidgetSetLayoutManagerMethodInfo
    ResolveCalendarMethod "setMarginBottom" o = Gtk.Widget.WidgetSetMarginBottomMethodInfo
    ResolveCalendarMethod "setMarginEnd" o = Gtk.Widget.WidgetSetMarginEndMethodInfo
    ResolveCalendarMethod "setMarginStart" o = Gtk.Widget.WidgetSetMarginStartMethodInfo
    ResolveCalendarMethod "setMarginTop" o = Gtk.Widget.WidgetSetMarginTopMethodInfo
    ResolveCalendarMethod "setName" o = Gtk.Widget.WidgetSetNameMethodInfo
    ResolveCalendarMethod "setOpacity" o = Gtk.Widget.WidgetSetOpacityMethodInfo
    ResolveCalendarMethod "setOverflow" o = Gtk.Widget.WidgetSetOverflowMethodInfo
    ResolveCalendarMethod "setParent" o = Gtk.Widget.WidgetSetParentMethodInfo
    ResolveCalendarMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveCalendarMethod "setReceivesDefault" o = Gtk.Widget.WidgetSetReceivesDefaultMethodInfo
    ResolveCalendarMethod "setSensitive" o = Gtk.Widget.WidgetSetSensitiveMethodInfo
    ResolveCalendarMethod "setShowDayNames" o = CalendarSetShowDayNamesMethodInfo
    ResolveCalendarMethod "setShowHeading" o = CalendarSetShowHeadingMethodInfo
    ResolveCalendarMethod "setShowWeekNumbers" o = CalendarSetShowWeekNumbersMethodInfo
    ResolveCalendarMethod "setSizeRequest" o = Gtk.Widget.WidgetSetSizeRequestMethodInfo
    ResolveCalendarMethod "setStateFlags" o = Gtk.Widget.WidgetSetStateFlagsMethodInfo
    ResolveCalendarMethod "setSupportMultidevice" o = Gtk.Widget.WidgetSetSupportMultideviceMethodInfo
    ResolveCalendarMethod "setTooltipMarkup" o = Gtk.Widget.WidgetSetTooltipMarkupMethodInfo
    ResolveCalendarMethod "setTooltipText" o = Gtk.Widget.WidgetSetTooltipTextMethodInfo
    ResolveCalendarMethod "setValign" o = Gtk.Widget.WidgetSetValignMethodInfo
    ResolveCalendarMethod "setVexpand" o = Gtk.Widget.WidgetSetVexpandMethodInfo
    ResolveCalendarMethod "setVexpandSet" o = Gtk.Widget.WidgetSetVexpandSetMethodInfo
    ResolveCalendarMethod "setVisible" o = Gtk.Widget.WidgetSetVisibleMethodInfo
    ResolveCalendarMethod l o = O.MethodResolutionFailed l o

instance (info ~ ResolveCalendarMethod t Calendar, O.MethodInfo info Calendar p) => OL.IsLabel t (Calendar -> p) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.overloadedMethod @info
#else
    fromLabel _ = O.overloadedMethod @info
#endif

#endif

-- signal Calendar::day-selected
-- | Emitted when the user selects a day.
type CalendarDaySelectedCallback =
    IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `CalendarDaySelectedCallback`@.
noCalendarDaySelectedCallback :: Maybe CalendarDaySelectedCallback
noCalendarDaySelectedCallback :: Maybe (IO ())
noCalendarDaySelectedCallback = Maybe (IO ())
forall a. Maybe a
Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_CalendarDaySelectedCallback =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

-- | Generate a function pointer callable from C code, from a `C_CalendarDaySelectedCallback`.
foreign import ccall "wrapper"
    mk_CalendarDaySelectedCallback :: C_CalendarDaySelectedCallback -> IO (FunPtr C_CalendarDaySelectedCallback)

-- | Wrap the callback into a `GClosure`.
genClosure_CalendarDaySelected :: MonadIO m => CalendarDaySelectedCallback -> m (GClosure C_CalendarDaySelectedCallback)
genClosure_CalendarDaySelected :: IO () -> m (GClosure C_CalendarDaySelectedCallback)
genClosure_CalendarDaySelected IO ()
cb = IO (GClosure C_CalendarDaySelectedCallback)
-> m (GClosure C_CalendarDaySelectedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_CalendarDaySelectedCallback)
 -> m (GClosure C_CalendarDaySelectedCallback))
-> IO (GClosure C_CalendarDaySelectedCallback)
-> m (GClosure C_CalendarDaySelectedCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_CalendarDaySelectedCallback
cb' = IO () -> C_CalendarDaySelectedCallback
wrap_CalendarDaySelectedCallback IO ()
cb
    C_CalendarDaySelectedCallback
-> IO (FunPtr C_CalendarDaySelectedCallback)
mk_CalendarDaySelectedCallback C_CalendarDaySelectedCallback
cb' IO (FunPtr C_CalendarDaySelectedCallback)
-> (FunPtr C_CalendarDaySelectedCallback
    -> IO (GClosure C_CalendarDaySelectedCallback))
-> IO (GClosure C_CalendarDaySelectedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_CalendarDaySelectedCallback
-> IO (GClosure C_CalendarDaySelectedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `CalendarDaySelectedCallback` into a `C_CalendarDaySelectedCallback`.
wrap_CalendarDaySelectedCallback ::
    CalendarDaySelectedCallback ->
    C_CalendarDaySelectedCallback
wrap_CalendarDaySelectedCallback :: IO () -> C_CalendarDaySelectedCallback
wrap_CalendarDaySelectedCallback IO ()
_cb Ptr ()
_ Ptr ()
_ = do
    IO ()
_cb 


-- | Connect a signal handler for the [daySelected](#signal:daySelected) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' calendar #daySelected callback
-- @
-- 
-- 
onCalendarDaySelected :: (IsCalendar a, MonadIO m) => a -> CalendarDaySelectedCallback -> m SignalHandlerId
onCalendarDaySelected :: a -> IO () -> m SignalHandlerId
onCalendarDaySelected a
obj 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_CalendarDaySelectedCallback
cb' = IO () -> C_CalendarDaySelectedCallback
wrap_CalendarDaySelectedCallback IO ()
cb
    FunPtr C_CalendarDaySelectedCallback
cb'' <- C_CalendarDaySelectedCallback
-> IO (FunPtr C_CalendarDaySelectedCallback)
mk_CalendarDaySelectedCallback C_CalendarDaySelectedCallback
cb'
    a
-> Text
-> FunPtr C_CalendarDaySelectedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"day-selected" FunPtr C_CalendarDaySelectedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [daySelected](#signal:daySelected) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' calendar #daySelected callback
-- @
-- 
-- 
afterCalendarDaySelected :: (IsCalendar a, MonadIO m) => a -> CalendarDaySelectedCallback -> m SignalHandlerId
afterCalendarDaySelected :: a -> IO () -> m SignalHandlerId
afterCalendarDaySelected a
obj 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_CalendarDaySelectedCallback
cb' = IO () -> C_CalendarDaySelectedCallback
wrap_CalendarDaySelectedCallback IO ()
cb
    FunPtr C_CalendarDaySelectedCallback
cb'' <- C_CalendarDaySelectedCallback
-> IO (FunPtr C_CalendarDaySelectedCallback)
mk_CalendarDaySelectedCallback C_CalendarDaySelectedCallback
cb'
    a
-> Text
-> FunPtr C_CalendarDaySelectedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"day-selected" FunPtr C_CalendarDaySelectedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data CalendarDaySelectedSignalInfo
instance SignalInfo CalendarDaySelectedSignalInfo where
    type HaskellCallbackType CalendarDaySelectedSignalInfo = CalendarDaySelectedCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_CalendarDaySelectedCallback cb
        cb'' <- mk_CalendarDaySelectedCallback cb'
        connectSignalFunPtr obj "day-selected" cb'' connectMode detail

#endif

-- signal Calendar::next-month
-- | Emitted when the user switched to the next month.
type CalendarNextMonthCallback =
    IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `CalendarNextMonthCallback`@.
noCalendarNextMonthCallback :: Maybe CalendarNextMonthCallback
noCalendarNextMonthCallback :: Maybe (IO ())
noCalendarNextMonthCallback = Maybe (IO ())
forall a. Maybe a
Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_CalendarNextMonthCallback =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

-- | Generate a function pointer callable from C code, from a `C_CalendarNextMonthCallback`.
foreign import ccall "wrapper"
    mk_CalendarNextMonthCallback :: C_CalendarNextMonthCallback -> IO (FunPtr C_CalendarNextMonthCallback)

-- | Wrap the callback into a `GClosure`.
genClosure_CalendarNextMonth :: MonadIO m => CalendarNextMonthCallback -> m (GClosure C_CalendarNextMonthCallback)
genClosure_CalendarNextMonth :: IO () -> m (GClosure C_CalendarDaySelectedCallback)
genClosure_CalendarNextMonth IO ()
cb = IO (GClosure C_CalendarDaySelectedCallback)
-> m (GClosure C_CalendarDaySelectedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_CalendarDaySelectedCallback)
 -> m (GClosure C_CalendarDaySelectedCallback))
-> IO (GClosure C_CalendarDaySelectedCallback)
-> m (GClosure C_CalendarDaySelectedCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_CalendarDaySelectedCallback
cb' = IO () -> C_CalendarDaySelectedCallback
wrap_CalendarNextMonthCallback IO ()
cb
    C_CalendarDaySelectedCallback
-> IO (FunPtr C_CalendarDaySelectedCallback)
mk_CalendarNextMonthCallback C_CalendarDaySelectedCallback
cb' IO (FunPtr C_CalendarDaySelectedCallback)
-> (FunPtr C_CalendarDaySelectedCallback
    -> IO (GClosure C_CalendarDaySelectedCallback))
-> IO (GClosure C_CalendarDaySelectedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_CalendarDaySelectedCallback
-> IO (GClosure C_CalendarDaySelectedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `CalendarNextMonthCallback` into a `C_CalendarNextMonthCallback`.
wrap_CalendarNextMonthCallback ::
    CalendarNextMonthCallback ->
    C_CalendarNextMonthCallback
wrap_CalendarNextMonthCallback :: IO () -> C_CalendarDaySelectedCallback
wrap_CalendarNextMonthCallback IO ()
_cb Ptr ()
_ Ptr ()
_ = do
    IO ()
_cb 


-- | Connect a signal handler for the [nextMonth](#signal:nextMonth) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' calendar #nextMonth callback
-- @
-- 
-- 
onCalendarNextMonth :: (IsCalendar a, MonadIO m) => a -> CalendarNextMonthCallback -> m SignalHandlerId
onCalendarNextMonth :: a -> IO () -> m SignalHandlerId
onCalendarNextMonth a
obj 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_CalendarDaySelectedCallback
cb' = IO () -> C_CalendarDaySelectedCallback
wrap_CalendarNextMonthCallback IO ()
cb
    FunPtr C_CalendarDaySelectedCallback
cb'' <- C_CalendarDaySelectedCallback
-> IO (FunPtr C_CalendarDaySelectedCallback)
mk_CalendarNextMonthCallback C_CalendarDaySelectedCallback
cb'
    a
-> Text
-> FunPtr C_CalendarDaySelectedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"next-month" FunPtr C_CalendarDaySelectedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [nextMonth](#signal:nextMonth) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' calendar #nextMonth callback
-- @
-- 
-- 
afterCalendarNextMonth :: (IsCalendar a, MonadIO m) => a -> CalendarNextMonthCallback -> m SignalHandlerId
afterCalendarNextMonth :: a -> IO () -> m SignalHandlerId
afterCalendarNextMonth a
obj 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_CalendarDaySelectedCallback
cb' = IO () -> C_CalendarDaySelectedCallback
wrap_CalendarNextMonthCallback IO ()
cb
    FunPtr C_CalendarDaySelectedCallback
cb'' <- C_CalendarDaySelectedCallback
-> IO (FunPtr C_CalendarDaySelectedCallback)
mk_CalendarNextMonthCallback C_CalendarDaySelectedCallback
cb'
    a
-> Text
-> FunPtr C_CalendarDaySelectedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"next-month" FunPtr C_CalendarDaySelectedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data CalendarNextMonthSignalInfo
instance SignalInfo CalendarNextMonthSignalInfo where
    type HaskellCallbackType CalendarNextMonthSignalInfo = CalendarNextMonthCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_CalendarNextMonthCallback cb
        cb'' <- mk_CalendarNextMonthCallback cb'
        connectSignalFunPtr obj "next-month" cb'' connectMode detail

#endif

-- signal Calendar::next-year
-- | Emitted when user switched to the next year.
type CalendarNextYearCallback =
    IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `CalendarNextYearCallback`@.
noCalendarNextYearCallback :: Maybe CalendarNextYearCallback
noCalendarNextYearCallback :: Maybe (IO ())
noCalendarNextYearCallback = Maybe (IO ())
forall a. Maybe a
Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_CalendarNextYearCallback =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

-- | Generate a function pointer callable from C code, from a `C_CalendarNextYearCallback`.
foreign import ccall "wrapper"
    mk_CalendarNextYearCallback :: C_CalendarNextYearCallback -> IO (FunPtr C_CalendarNextYearCallback)

-- | Wrap the callback into a `GClosure`.
genClosure_CalendarNextYear :: MonadIO m => CalendarNextYearCallback -> m (GClosure C_CalendarNextYearCallback)
genClosure_CalendarNextYear :: IO () -> m (GClosure C_CalendarDaySelectedCallback)
genClosure_CalendarNextYear IO ()
cb = IO (GClosure C_CalendarDaySelectedCallback)
-> m (GClosure C_CalendarDaySelectedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_CalendarDaySelectedCallback)
 -> m (GClosure C_CalendarDaySelectedCallback))
-> IO (GClosure C_CalendarDaySelectedCallback)
-> m (GClosure C_CalendarDaySelectedCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_CalendarDaySelectedCallback
cb' = IO () -> C_CalendarDaySelectedCallback
wrap_CalendarNextYearCallback IO ()
cb
    C_CalendarDaySelectedCallback
-> IO (FunPtr C_CalendarDaySelectedCallback)
mk_CalendarNextYearCallback C_CalendarDaySelectedCallback
cb' IO (FunPtr C_CalendarDaySelectedCallback)
-> (FunPtr C_CalendarDaySelectedCallback
    -> IO (GClosure C_CalendarDaySelectedCallback))
-> IO (GClosure C_CalendarDaySelectedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_CalendarDaySelectedCallback
-> IO (GClosure C_CalendarDaySelectedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `CalendarNextYearCallback` into a `C_CalendarNextYearCallback`.
wrap_CalendarNextYearCallback ::
    CalendarNextYearCallback ->
    C_CalendarNextYearCallback
wrap_CalendarNextYearCallback :: IO () -> C_CalendarDaySelectedCallback
wrap_CalendarNextYearCallback IO ()
_cb Ptr ()
_ Ptr ()
_ = do
    IO ()
_cb 


-- | Connect a signal handler for the [nextYear](#signal:nextYear) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' calendar #nextYear callback
-- @
-- 
-- 
onCalendarNextYear :: (IsCalendar a, MonadIO m) => a -> CalendarNextYearCallback -> m SignalHandlerId
onCalendarNextYear :: a -> IO () -> m SignalHandlerId
onCalendarNextYear a
obj 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_CalendarDaySelectedCallback
cb' = IO () -> C_CalendarDaySelectedCallback
wrap_CalendarNextYearCallback IO ()
cb
    FunPtr C_CalendarDaySelectedCallback
cb'' <- C_CalendarDaySelectedCallback
-> IO (FunPtr C_CalendarDaySelectedCallback)
mk_CalendarNextYearCallback C_CalendarDaySelectedCallback
cb'
    a
-> Text
-> FunPtr C_CalendarDaySelectedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"next-year" FunPtr C_CalendarDaySelectedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [nextYear](#signal:nextYear) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' calendar #nextYear callback
-- @
-- 
-- 
afterCalendarNextYear :: (IsCalendar a, MonadIO m) => a -> CalendarNextYearCallback -> m SignalHandlerId
afterCalendarNextYear :: a -> IO () -> m SignalHandlerId
afterCalendarNextYear a
obj 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_CalendarDaySelectedCallback
cb' = IO () -> C_CalendarDaySelectedCallback
wrap_CalendarNextYearCallback IO ()
cb
    FunPtr C_CalendarDaySelectedCallback
cb'' <- C_CalendarDaySelectedCallback
-> IO (FunPtr C_CalendarDaySelectedCallback)
mk_CalendarNextYearCallback C_CalendarDaySelectedCallback
cb'
    a
-> Text
-> FunPtr C_CalendarDaySelectedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"next-year" FunPtr C_CalendarDaySelectedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data CalendarNextYearSignalInfo
instance SignalInfo CalendarNextYearSignalInfo where
    type HaskellCallbackType CalendarNextYearSignalInfo = CalendarNextYearCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_CalendarNextYearCallback cb
        cb'' <- mk_CalendarNextYearCallback cb'
        connectSignalFunPtr obj "next-year" cb'' connectMode detail

#endif

-- signal Calendar::prev-month
-- | Emitted when the user switched to the previous month.
type CalendarPrevMonthCallback =
    IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `CalendarPrevMonthCallback`@.
noCalendarPrevMonthCallback :: Maybe CalendarPrevMonthCallback
noCalendarPrevMonthCallback :: Maybe (IO ())
noCalendarPrevMonthCallback = Maybe (IO ())
forall a. Maybe a
Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_CalendarPrevMonthCallback =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

-- | Generate a function pointer callable from C code, from a `C_CalendarPrevMonthCallback`.
foreign import ccall "wrapper"
    mk_CalendarPrevMonthCallback :: C_CalendarPrevMonthCallback -> IO (FunPtr C_CalendarPrevMonthCallback)

-- | Wrap the callback into a `GClosure`.
genClosure_CalendarPrevMonth :: MonadIO m => CalendarPrevMonthCallback -> m (GClosure C_CalendarPrevMonthCallback)
genClosure_CalendarPrevMonth :: IO () -> m (GClosure C_CalendarDaySelectedCallback)
genClosure_CalendarPrevMonth IO ()
cb = IO (GClosure C_CalendarDaySelectedCallback)
-> m (GClosure C_CalendarDaySelectedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_CalendarDaySelectedCallback)
 -> m (GClosure C_CalendarDaySelectedCallback))
-> IO (GClosure C_CalendarDaySelectedCallback)
-> m (GClosure C_CalendarDaySelectedCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_CalendarDaySelectedCallback
cb' = IO () -> C_CalendarDaySelectedCallback
wrap_CalendarPrevMonthCallback IO ()
cb
    C_CalendarDaySelectedCallback
-> IO (FunPtr C_CalendarDaySelectedCallback)
mk_CalendarPrevMonthCallback C_CalendarDaySelectedCallback
cb' IO (FunPtr C_CalendarDaySelectedCallback)
-> (FunPtr C_CalendarDaySelectedCallback
    -> IO (GClosure C_CalendarDaySelectedCallback))
-> IO (GClosure C_CalendarDaySelectedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_CalendarDaySelectedCallback
-> IO (GClosure C_CalendarDaySelectedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `CalendarPrevMonthCallback` into a `C_CalendarPrevMonthCallback`.
wrap_CalendarPrevMonthCallback ::
    CalendarPrevMonthCallback ->
    C_CalendarPrevMonthCallback
wrap_CalendarPrevMonthCallback :: IO () -> C_CalendarDaySelectedCallback
wrap_CalendarPrevMonthCallback IO ()
_cb Ptr ()
_ Ptr ()
_ = do
    IO ()
_cb 


-- | Connect a signal handler for the [prevMonth](#signal:prevMonth) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' calendar #prevMonth callback
-- @
-- 
-- 
onCalendarPrevMonth :: (IsCalendar a, MonadIO m) => a -> CalendarPrevMonthCallback -> m SignalHandlerId
onCalendarPrevMonth :: a -> IO () -> m SignalHandlerId
onCalendarPrevMonth a
obj 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_CalendarDaySelectedCallback
cb' = IO () -> C_CalendarDaySelectedCallback
wrap_CalendarPrevMonthCallback IO ()
cb
    FunPtr C_CalendarDaySelectedCallback
cb'' <- C_CalendarDaySelectedCallback
-> IO (FunPtr C_CalendarDaySelectedCallback)
mk_CalendarPrevMonthCallback C_CalendarDaySelectedCallback
cb'
    a
-> Text
-> FunPtr C_CalendarDaySelectedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"prev-month" FunPtr C_CalendarDaySelectedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [prevMonth](#signal:prevMonth) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' calendar #prevMonth callback
-- @
-- 
-- 
afterCalendarPrevMonth :: (IsCalendar a, MonadIO m) => a -> CalendarPrevMonthCallback -> m SignalHandlerId
afterCalendarPrevMonth :: a -> IO () -> m SignalHandlerId
afterCalendarPrevMonth a
obj 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_CalendarDaySelectedCallback
cb' = IO () -> C_CalendarDaySelectedCallback
wrap_CalendarPrevMonthCallback IO ()
cb
    FunPtr C_CalendarDaySelectedCallback
cb'' <- C_CalendarDaySelectedCallback
-> IO (FunPtr C_CalendarDaySelectedCallback)
mk_CalendarPrevMonthCallback C_CalendarDaySelectedCallback
cb'
    a
-> Text
-> FunPtr C_CalendarDaySelectedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"prev-month" FunPtr C_CalendarDaySelectedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data CalendarPrevMonthSignalInfo
instance SignalInfo CalendarPrevMonthSignalInfo where
    type HaskellCallbackType CalendarPrevMonthSignalInfo = CalendarPrevMonthCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_CalendarPrevMonthCallback cb
        cb'' <- mk_CalendarPrevMonthCallback cb'
        connectSignalFunPtr obj "prev-month" cb'' connectMode detail

#endif

-- signal Calendar::prev-year
-- | Emitted when user switched to the previous year.
type CalendarPrevYearCallback =
    IO ()

-- | A convenience synonym for @`Nothing` :: `Maybe` `CalendarPrevYearCallback`@.
noCalendarPrevYearCallback :: Maybe CalendarPrevYearCallback
noCalendarPrevYearCallback :: Maybe (IO ())
noCalendarPrevYearCallback = Maybe (IO ())
forall a. Maybe a
Nothing

-- | Type for the callback on the (unwrapped) C side.
type C_CalendarPrevYearCallback =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

-- | Generate a function pointer callable from C code, from a `C_CalendarPrevYearCallback`.
foreign import ccall "wrapper"
    mk_CalendarPrevYearCallback :: C_CalendarPrevYearCallback -> IO (FunPtr C_CalendarPrevYearCallback)

-- | Wrap the callback into a `GClosure`.
genClosure_CalendarPrevYear :: MonadIO m => CalendarPrevYearCallback -> m (GClosure C_CalendarPrevYearCallback)
genClosure_CalendarPrevYear :: IO () -> m (GClosure C_CalendarDaySelectedCallback)
genClosure_CalendarPrevYear IO ()
cb = IO (GClosure C_CalendarDaySelectedCallback)
-> m (GClosure C_CalendarDaySelectedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_CalendarDaySelectedCallback)
 -> m (GClosure C_CalendarDaySelectedCallback))
-> IO (GClosure C_CalendarDaySelectedCallback)
-> m (GClosure C_CalendarDaySelectedCallback)
forall a b. (a -> b) -> a -> b
$ do
    let cb' :: C_CalendarDaySelectedCallback
cb' = IO () -> C_CalendarDaySelectedCallback
wrap_CalendarPrevYearCallback IO ()
cb
    C_CalendarDaySelectedCallback
-> IO (FunPtr C_CalendarDaySelectedCallback)
mk_CalendarPrevYearCallback C_CalendarDaySelectedCallback
cb' IO (FunPtr C_CalendarDaySelectedCallback)
-> (FunPtr C_CalendarDaySelectedCallback
    -> IO (GClosure C_CalendarDaySelectedCallback))
-> IO (GClosure C_CalendarDaySelectedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_CalendarDaySelectedCallback
-> IO (GClosure C_CalendarDaySelectedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure


-- | Wrap a `CalendarPrevYearCallback` into a `C_CalendarPrevYearCallback`.
wrap_CalendarPrevYearCallback ::
    CalendarPrevYearCallback ->
    C_CalendarPrevYearCallback
wrap_CalendarPrevYearCallback :: IO () -> C_CalendarDaySelectedCallback
wrap_CalendarPrevYearCallback IO ()
_cb Ptr ()
_ Ptr ()
_ = do
    IO ()
_cb 


-- | Connect a signal handler for the [prevYear](#signal:prevYear) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' calendar #prevYear callback
-- @
-- 
-- 
onCalendarPrevYear :: (IsCalendar a, MonadIO m) => a -> CalendarPrevYearCallback -> m SignalHandlerId
onCalendarPrevYear :: a -> IO () -> m SignalHandlerId
onCalendarPrevYear a
obj 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_CalendarDaySelectedCallback
cb' = IO () -> C_CalendarDaySelectedCallback
wrap_CalendarPrevYearCallback IO ()
cb
    FunPtr C_CalendarDaySelectedCallback
cb'' <- C_CalendarDaySelectedCallback
-> IO (FunPtr C_CalendarDaySelectedCallback)
mk_CalendarPrevYearCallback C_CalendarDaySelectedCallback
cb'
    a
-> Text
-> FunPtr C_CalendarDaySelectedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"prev-year" FunPtr C_CalendarDaySelectedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [prevYear](#signal:prevYear) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' calendar #prevYear callback
-- @
-- 
-- 
afterCalendarPrevYear :: (IsCalendar a, MonadIO m) => a -> CalendarPrevYearCallback -> m SignalHandlerId
afterCalendarPrevYear :: a -> IO () -> m SignalHandlerId
afterCalendarPrevYear a
obj 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_CalendarDaySelectedCallback
cb' = IO () -> C_CalendarDaySelectedCallback
wrap_CalendarPrevYearCallback IO ()
cb
    FunPtr C_CalendarDaySelectedCallback
cb'' <- C_CalendarDaySelectedCallback
-> IO (FunPtr C_CalendarDaySelectedCallback)
mk_CalendarPrevYearCallback C_CalendarDaySelectedCallback
cb'
    a
-> Text
-> FunPtr C_CalendarDaySelectedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"prev-year" FunPtr C_CalendarDaySelectedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data CalendarPrevYearSignalInfo
instance SignalInfo CalendarPrevYearSignalInfo where
    type HaskellCallbackType CalendarPrevYearSignalInfo = CalendarPrevYearCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_CalendarPrevYearCallback cb
        cb'' <- mk_CalendarPrevYearCallback cb'
        connectSignalFunPtr obj "prev-year" cb'' connectMode detail

#endif

-- VVV Prop "day"
   -- Type: TBasicType TInt
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Nothing,Nothing)

-- | Get the value of the “@day@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' calendar #day
-- @
getCalendarDay :: (MonadIO m, IsCalendar o) => o -> m Int32
getCalendarDay :: o -> m Int32
getCalendarDay o
obj = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Int32
forall a. GObject a => a -> String -> IO Int32
B.Properties.getObjectPropertyInt32 o
obj String
"day"

-- | Set the value of the “@day@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' calendar [ #day 'Data.GI.Base.Attributes.:=' value ]
-- @
setCalendarDay :: (MonadIO m, IsCalendar o) => o -> Int32 -> m ()
setCalendarDay :: o -> Int32 -> m ()
setCalendarDay o
obj Int32
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 -> Int32 -> IO ()
forall a. GObject a => a -> String -> Int32 -> IO ()
B.Properties.setObjectPropertyInt32 o
obj String
"day" Int32
val

-- | Construct a `GValueConstruct` with valid value for the “@day@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructCalendarDay :: (IsCalendar o, MIO.MonadIO m) => Int32 -> m (GValueConstruct o)
constructCalendarDay :: Int32 -> m (GValueConstruct o)
constructCalendarDay Int32
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Int32 -> IO (GValueConstruct o)
forall o. String -> Int32 -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyInt32 String
"day" Int32
val

#if defined(ENABLE_OVERLOADING)
data CalendarDayPropertyInfo
instance AttrInfo CalendarDayPropertyInfo where
    type AttrAllowedOps CalendarDayPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint CalendarDayPropertyInfo = IsCalendar
    type AttrSetTypeConstraint CalendarDayPropertyInfo = (~) Int32
    type AttrTransferTypeConstraint CalendarDayPropertyInfo = (~) Int32
    type AttrTransferType CalendarDayPropertyInfo = Int32
    type AttrGetType CalendarDayPropertyInfo = Int32
    type AttrLabel CalendarDayPropertyInfo = "day"
    type AttrOrigin CalendarDayPropertyInfo = Calendar
    attrGet = getCalendarDay
    attrSet = setCalendarDay
    attrTransfer _ v = do
        return v
    attrConstruct = constructCalendarDay
    attrClear = undefined
#endif

-- VVV Prop "month"
   -- Type: TBasicType TInt
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Nothing,Nothing)

-- | Get the value of the “@month@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' calendar #month
-- @
getCalendarMonth :: (MonadIO m, IsCalendar o) => o -> m Int32
getCalendarMonth :: o -> m Int32
getCalendarMonth o
obj = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Int32
forall a. GObject a => a -> String -> IO Int32
B.Properties.getObjectPropertyInt32 o
obj String
"month"

-- | Set the value of the “@month@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' calendar [ #month 'Data.GI.Base.Attributes.:=' value ]
-- @
setCalendarMonth :: (MonadIO m, IsCalendar o) => o -> Int32 -> m ()
setCalendarMonth :: o -> Int32 -> m ()
setCalendarMonth o
obj Int32
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 -> Int32 -> IO ()
forall a. GObject a => a -> String -> Int32 -> IO ()
B.Properties.setObjectPropertyInt32 o
obj String
"month" Int32
val

-- | Construct a `GValueConstruct` with valid value for the “@month@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructCalendarMonth :: (IsCalendar o, MIO.MonadIO m) => Int32 -> m (GValueConstruct o)
constructCalendarMonth :: Int32 -> m (GValueConstruct o)
constructCalendarMonth Int32
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Int32 -> IO (GValueConstruct o)
forall o. String -> Int32 -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyInt32 String
"month" Int32
val

#if defined(ENABLE_OVERLOADING)
data CalendarMonthPropertyInfo
instance AttrInfo CalendarMonthPropertyInfo where
    type AttrAllowedOps CalendarMonthPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint CalendarMonthPropertyInfo = IsCalendar
    type AttrSetTypeConstraint CalendarMonthPropertyInfo = (~) Int32
    type AttrTransferTypeConstraint CalendarMonthPropertyInfo = (~) Int32
    type AttrTransferType CalendarMonthPropertyInfo = Int32
    type AttrGetType CalendarMonthPropertyInfo = Int32
    type AttrLabel CalendarMonthPropertyInfo = "month"
    type AttrOrigin CalendarMonthPropertyInfo = Calendar
    attrGet = getCalendarMonth
    attrSet = setCalendarMonth
    attrTransfer _ v = do
        return v
    attrConstruct = constructCalendarMonth
    attrClear = undefined
#endif

-- VVV Prop "show-day-names"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Just False)

-- | Get the value of the “@show-day-names@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' calendar #showDayNames
-- @
getCalendarShowDayNames :: (MonadIO m, IsCalendar o) => o -> m Bool
getCalendarShowDayNames :: o -> m Bool
getCalendarShowDayNames 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 String
"show-day-names"

-- | Set the value of the “@show-day-names@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' calendar [ #showDayNames 'Data.GI.Base.Attributes.:=' value ]
-- @
setCalendarShowDayNames :: (MonadIO m, IsCalendar o) => o -> Bool -> m ()
setCalendarShowDayNames :: o -> Bool -> m ()
setCalendarShowDayNames o
obj 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 String
"show-day-names" Bool
val

-- | Construct a `GValueConstruct` with valid value for the “@show-day-names@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructCalendarShowDayNames :: (IsCalendar o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructCalendarShowDayNames :: Bool -> m (GValueConstruct o)
constructCalendarShowDayNames Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"show-day-names" Bool
val

#if defined(ENABLE_OVERLOADING)
data CalendarShowDayNamesPropertyInfo
instance AttrInfo CalendarShowDayNamesPropertyInfo where
    type AttrAllowedOps CalendarShowDayNamesPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint CalendarShowDayNamesPropertyInfo = IsCalendar
    type AttrSetTypeConstraint CalendarShowDayNamesPropertyInfo = (~) Bool
    type AttrTransferTypeConstraint CalendarShowDayNamesPropertyInfo = (~) Bool
    type AttrTransferType CalendarShowDayNamesPropertyInfo = Bool
    type AttrGetType CalendarShowDayNamesPropertyInfo = Bool
    type AttrLabel CalendarShowDayNamesPropertyInfo = "show-day-names"
    type AttrOrigin CalendarShowDayNamesPropertyInfo = Calendar
    attrGet = getCalendarShowDayNames
    attrSet = setCalendarShowDayNames
    attrTransfer _ v = do
        return v
    attrConstruct = constructCalendarShowDayNames
    attrClear = undefined
#endif

-- VVV Prop "show-heading"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Just False)

-- | Get the value of the “@show-heading@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' calendar #showHeading
-- @
getCalendarShowHeading :: (MonadIO m, IsCalendar o) => o -> m Bool
getCalendarShowHeading :: o -> m Bool
getCalendarShowHeading 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 String
"show-heading"

-- | Set the value of the “@show-heading@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' calendar [ #showHeading 'Data.GI.Base.Attributes.:=' value ]
-- @
setCalendarShowHeading :: (MonadIO m, IsCalendar o) => o -> Bool -> m ()
setCalendarShowHeading :: o -> Bool -> m ()
setCalendarShowHeading o
obj 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 String
"show-heading" Bool
val

-- | Construct a `GValueConstruct` with valid value for the “@show-heading@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructCalendarShowHeading :: (IsCalendar o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructCalendarShowHeading :: Bool -> m (GValueConstruct o)
constructCalendarShowHeading Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"show-heading" Bool
val

#if defined(ENABLE_OVERLOADING)
data CalendarShowHeadingPropertyInfo
instance AttrInfo CalendarShowHeadingPropertyInfo where
    type AttrAllowedOps CalendarShowHeadingPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint CalendarShowHeadingPropertyInfo = IsCalendar
    type AttrSetTypeConstraint CalendarShowHeadingPropertyInfo = (~) Bool
    type AttrTransferTypeConstraint CalendarShowHeadingPropertyInfo = (~) Bool
    type AttrTransferType CalendarShowHeadingPropertyInfo = Bool
    type AttrGetType CalendarShowHeadingPropertyInfo = Bool
    type AttrLabel CalendarShowHeadingPropertyInfo = "show-heading"
    type AttrOrigin CalendarShowHeadingPropertyInfo = Calendar
    attrGet = getCalendarShowHeading
    attrSet = setCalendarShowHeading
    attrTransfer _ v = do
        return v
    attrConstruct = constructCalendarShowHeading
    attrClear = undefined
#endif

-- VVV Prop "show-week-numbers"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Just False)

-- | Get the value of the “@show-week-numbers@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' calendar #showWeekNumbers
-- @
getCalendarShowWeekNumbers :: (MonadIO m, IsCalendar o) => o -> m Bool
getCalendarShowWeekNumbers :: o -> m Bool
getCalendarShowWeekNumbers 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 String
"show-week-numbers"

-- | Set the value of the “@show-week-numbers@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' calendar [ #showWeekNumbers 'Data.GI.Base.Attributes.:=' value ]
-- @
setCalendarShowWeekNumbers :: (MonadIO m, IsCalendar o) => o -> Bool -> m ()
setCalendarShowWeekNumbers :: o -> Bool -> m ()
setCalendarShowWeekNumbers o
obj 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 String
"show-week-numbers" Bool
val

-- | Construct a `GValueConstruct` with valid value for the “@show-week-numbers@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructCalendarShowWeekNumbers :: (IsCalendar o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructCalendarShowWeekNumbers :: Bool -> m (GValueConstruct o)
constructCalendarShowWeekNumbers Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"show-week-numbers" Bool
val

#if defined(ENABLE_OVERLOADING)
data CalendarShowWeekNumbersPropertyInfo
instance AttrInfo CalendarShowWeekNumbersPropertyInfo where
    type AttrAllowedOps CalendarShowWeekNumbersPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint CalendarShowWeekNumbersPropertyInfo = IsCalendar
    type AttrSetTypeConstraint CalendarShowWeekNumbersPropertyInfo = (~) Bool
    type AttrTransferTypeConstraint CalendarShowWeekNumbersPropertyInfo = (~) Bool
    type AttrTransferType CalendarShowWeekNumbersPropertyInfo = Bool
    type AttrGetType CalendarShowWeekNumbersPropertyInfo = Bool
    type AttrLabel CalendarShowWeekNumbersPropertyInfo = "show-week-numbers"
    type AttrOrigin CalendarShowWeekNumbersPropertyInfo = Calendar
    attrGet = getCalendarShowWeekNumbers
    attrSet = setCalendarShowWeekNumbers
    attrTransfer _ v = do
        return v
    attrConstruct = constructCalendarShowWeekNumbers
    attrClear = undefined
#endif

-- VVV Prop "year"
   -- Type: TBasicType TInt
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Nothing,Nothing)

-- | Get the value of the “@year@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' calendar #year
-- @
getCalendarYear :: (MonadIO m, IsCalendar o) => o -> m Int32
getCalendarYear :: o -> m Int32
getCalendarYear o
obj = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Int32
forall a. GObject a => a -> String -> IO Int32
B.Properties.getObjectPropertyInt32 o
obj String
"year"

-- | Set the value of the “@year@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' calendar [ #year 'Data.GI.Base.Attributes.:=' value ]
-- @
setCalendarYear :: (MonadIO m, IsCalendar o) => o -> Int32 -> m ()
setCalendarYear :: o -> Int32 -> m ()
setCalendarYear o
obj Int32
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 -> Int32 -> IO ()
forall a. GObject a => a -> String -> Int32 -> IO ()
B.Properties.setObjectPropertyInt32 o
obj String
"year" Int32
val

-- | Construct a `GValueConstruct` with valid value for the “@year@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructCalendarYear :: (IsCalendar o, MIO.MonadIO m) => Int32 -> m (GValueConstruct o)
constructCalendarYear :: Int32 -> m (GValueConstruct o)
constructCalendarYear Int32
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Int32 -> IO (GValueConstruct o)
forall o. String -> Int32 -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyInt32 String
"year" Int32
val

#if defined(ENABLE_OVERLOADING)
data CalendarYearPropertyInfo
instance AttrInfo CalendarYearPropertyInfo where
    type AttrAllowedOps CalendarYearPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint CalendarYearPropertyInfo = IsCalendar
    type AttrSetTypeConstraint CalendarYearPropertyInfo = (~) Int32
    type AttrTransferTypeConstraint CalendarYearPropertyInfo = (~) Int32
    type AttrTransferType CalendarYearPropertyInfo = Int32
    type AttrGetType CalendarYearPropertyInfo = Int32
    type AttrLabel CalendarYearPropertyInfo = "year"
    type AttrOrigin CalendarYearPropertyInfo = Calendar
    attrGet = getCalendarYear
    attrSet = setCalendarYear
    attrTransfer _ v = do
        return v
    attrConstruct = constructCalendarYear
    attrClear = undefined
#endif

#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Calendar
type instance O.AttributeList Calendar = CalendarAttributeList
type CalendarAttributeList = ('[ '("canFocus", Gtk.Widget.WidgetCanFocusPropertyInfo), '("canTarget", Gtk.Widget.WidgetCanTargetPropertyInfo), '("cssClasses", Gtk.Widget.WidgetCssClassesPropertyInfo), '("cssName", Gtk.Widget.WidgetCssNamePropertyInfo), '("cursor", Gtk.Widget.WidgetCursorPropertyInfo), '("day", CalendarDayPropertyInfo), '("focusOnClick", Gtk.Widget.WidgetFocusOnClickPropertyInfo), '("focusable", Gtk.Widget.WidgetFocusablePropertyInfo), '("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), '("layoutManager", Gtk.Widget.WidgetLayoutManagerPropertyInfo), '("marginBottom", Gtk.Widget.WidgetMarginBottomPropertyInfo), '("marginEnd", Gtk.Widget.WidgetMarginEndPropertyInfo), '("marginStart", Gtk.Widget.WidgetMarginStartPropertyInfo), '("marginTop", Gtk.Widget.WidgetMarginTopPropertyInfo), '("month", CalendarMonthPropertyInfo), '("name", Gtk.Widget.WidgetNamePropertyInfo), '("opacity", Gtk.Widget.WidgetOpacityPropertyInfo), '("overflow", Gtk.Widget.WidgetOverflowPropertyInfo), '("parent", Gtk.Widget.WidgetParentPropertyInfo), '("receivesDefault", Gtk.Widget.WidgetReceivesDefaultPropertyInfo), '("root", Gtk.Widget.WidgetRootPropertyInfo), '("scaleFactor", Gtk.Widget.WidgetScaleFactorPropertyInfo), '("sensitive", Gtk.Widget.WidgetSensitivePropertyInfo), '("showDayNames", CalendarShowDayNamesPropertyInfo), '("showHeading", CalendarShowHeadingPropertyInfo), '("showWeekNumbers", CalendarShowWeekNumbersPropertyInfo), '("tooltipMarkup", Gtk.Widget.WidgetTooltipMarkupPropertyInfo), '("tooltipText", Gtk.Widget.WidgetTooltipTextPropertyInfo), '("valign", Gtk.Widget.WidgetValignPropertyInfo), '("vexpand", Gtk.Widget.WidgetVexpandPropertyInfo), '("vexpandSet", Gtk.Widget.WidgetVexpandSetPropertyInfo), '("visible", Gtk.Widget.WidgetVisiblePropertyInfo), '("widthRequest", Gtk.Widget.WidgetWidthRequestPropertyInfo), '("year", CalendarYearPropertyInfo)] :: [(Symbol, *)])
#endif

#if defined(ENABLE_OVERLOADING)
calendarDay :: AttrLabelProxy "day"
calendarDay = AttrLabelProxy

calendarMonth :: AttrLabelProxy "month"
calendarMonth = AttrLabelProxy

calendarShowDayNames :: AttrLabelProxy "showDayNames"
calendarShowDayNames = AttrLabelProxy

calendarShowHeading :: AttrLabelProxy "showHeading"
calendarShowHeading = AttrLabelProxy

calendarShowWeekNumbers :: AttrLabelProxy "showWeekNumbers"
calendarShowWeekNumbers = AttrLabelProxy

calendarYear :: AttrLabelProxy "year"
calendarYear = AttrLabelProxy

#endif

#if defined(ENABLE_OVERLOADING)
type instance O.SignalList Calendar = CalendarSignalList
type CalendarSignalList = ('[ '("daySelected", CalendarDaySelectedSignalInfo), '("destroy", Gtk.Widget.WidgetDestroySignalInfo), '("directionChanged", Gtk.Widget.WidgetDirectionChangedSignalInfo), '("grabNotify", Gtk.Widget.WidgetGrabNotifySignalInfo), '("hide", Gtk.Widget.WidgetHideSignalInfo), '("keynavFailed", Gtk.Widget.WidgetKeynavFailedSignalInfo), '("map", Gtk.Widget.WidgetMapSignalInfo), '("mnemonicActivate", Gtk.Widget.WidgetMnemonicActivateSignalInfo), '("moveFocus", Gtk.Widget.WidgetMoveFocusSignalInfo), '("nextMonth", CalendarNextMonthSignalInfo), '("nextYear", CalendarNextYearSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("prevMonth", CalendarPrevMonthSignalInfo), '("prevYear", CalendarPrevYearSignalInfo), '("queryTooltip", Gtk.Widget.WidgetQueryTooltipSignalInfo), '("realize", Gtk.Widget.WidgetRealizeSignalInfo), '("show", Gtk.Widget.WidgetShowSignalInfo), '("stateFlagsChanged", Gtk.Widget.WidgetStateFlagsChangedSignalInfo), '("unmap", Gtk.Widget.WidgetUnmapSignalInfo), '("unrealize", Gtk.Widget.WidgetUnrealizeSignalInfo)] :: [(Symbol, *)])

#endif

-- method Calendar::new
-- method type : Constructor
-- Args: []
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gtk" , name = "Calendar" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_calendar_new" gtk_calendar_new :: 
    IO (Ptr Calendar)

-- | Creates a new calendar, with the current date being selected.
calendarNew ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m Calendar
    -- ^ __Returns:__ a newly t'GI.Gtk.Objects.Calendar.Calendar' widget
calendarNew :: m Calendar
calendarNew  = IO Calendar -> m Calendar
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Calendar -> m Calendar) -> IO Calendar -> m Calendar
forall a b. (a -> b) -> a -> b
$ do
    Ptr Calendar
result <- IO (Ptr Calendar)
gtk_calendar_new
    Text -> Ptr Calendar -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"calendarNew" Ptr Calendar
result
    Calendar
result' <- ((ManagedPtr Calendar -> Calendar) -> Ptr Calendar -> IO Calendar
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Calendar -> Calendar
Calendar) Ptr Calendar
result
    Calendar -> IO Calendar
forall (m :: * -> *) a. Monad m => a -> m a
return Calendar
result'

#if defined(ENABLE_OVERLOADING)
#endif

-- method Calendar::clear_marks
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "calendar"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "Calendar" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkCalendar" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_calendar_clear_marks" gtk_calendar_clear_marks :: 
    Ptr Calendar ->                         -- calendar : TInterface (Name {namespace = "Gtk", name = "Calendar"})
    IO ()

-- | Remove all visual markers.
calendarClearMarks ::
    (B.CallStack.HasCallStack, MonadIO m, IsCalendar a) =>
    a
    -- ^ /@calendar@/: a t'GI.Gtk.Objects.Calendar.Calendar'
    -> m ()
calendarClearMarks :: a -> m ()
calendarClearMarks a
calendar = 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 Calendar
calendar' <- a -> IO (Ptr Calendar)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
calendar
    Ptr Calendar -> IO ()
gtk_calendar_clear_marks Ptr Calendar
calendar'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
calendar
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data CalendarClearMarksMethodInfo
instance (signature ~ (m ()), MonadIO m, IsCalendar a) => O.MethodInfo CalendarClearMarksMethodInfo a signature where
    overloadedMethod = calendarClearMarks

#endif

-- method Calendar::get_date
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "Calendar" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkCalendar" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "GLib" , name = "DateTime" })
-- throws : False
-- Skip return : False

foreign import ccall "gtk_calendar_get_date" gtk_calendar_get_date :: 
    Ptr Calendar ->                         -- self : TInterface (Name {namespace = "Gtk", name = "Calendar"})
    IO (Ptr GLib.DateTime.DateTime)

-- | Returns a t'GI.GLib.Structs.DateTime.DateTime' representing the shown
-- year, month and the selected day, in the local
-- time zone.
calendarGetDate ::
    (B.CallStack.HasCallStack, MonadIO m, IsCalendar a) =>
    a
    -- ^ /@self@/: a t'GI.Gtk.Objects.Calendar.Calendar'
    -> m GLib.DateTime.DateTime
    -- ^ __Returns:__ the t'GI.GLib.Structs.Date.Date' representing
    --     the shown date.
calendarGetDate :: a -> m DateTime
calendarGetDate a
self = IO DateTime -> m DateTime
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO DateTime -> m DateTime) -> IO DateTime -> m DateTime
forall a b. (a -> b) -> a -> b
$ do
    Ptr Calendar
self' <- a -> IO (Ptr Calendar)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    Ptr DateTime
result <- Ptr Calendar -> IO (Ptr DateTime)
gtk_calendar_get_date Ptr Calendar
self'
    Text -> Ptr DateTime -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"calendarGetDate" Ptr DateTime
result
    DateTime
result' <- ((ManagedPtr DateTime -> DateTime) -> Ptr DateTime -> IO DateTime
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr DateTime -> DateTime
GLib.DateTime.DateTime) Ptr DateTime
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    DateTime -> IO DateTime
forall (m :: * -> *) a. Monad m => a -> m a
return DateTime
result'

#if defined(ENABLE_OVERLOADING)
data CalendarGetDateMethodInfo
instance (signature ~ (m GLib.DateTime.DateTime), MonadIO m, IsCalendar a) => O.MethodInfo CalendarGetDateMethodInfo a signature where
    overloadedMethod = calendarGetDate

#endif

-- method Calendar::get_day_is_marked
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "calendar"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "Calendar" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkCalendar" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "day"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the day number between 1 and 31."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_calendar_get_day_is_marked" gtk_calendar_get_day_is_marked :: 
    Ptr Calendar ->                         -- calendar : TInterface (Name {namespace = "Gtk", name = "Calendar"})
    Word32 ->                               -- day : TBasicType TUInt
    IO CInt

-- | Returns if the /@day@/ of the /@calendar@/ is already marked.
calendarGetDayIsMarked ::
    (B.CallStack.HasCallStack, MonadIO m, IsCalendar a) =>
    a
    -- ^ /@calendar@/: a t'GI.Gtk.Objects.Calendar.Calendar'
    -> Word32
    -- ^ /@day@/: the day number between 1 and 31.
    -> m Bool
    -- ^ __Returns:__ whether the day is marked.
calendarGetDayIsMarked :: a -> Word32 -> m Bool
calendarGetDayIsMarked a
calendar Word32
day = 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 Calendar
calendar' <- a -> IO (Ptr Calendar)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
calendar
    CInt
result <- Ptr Calendar -> Word32 -> IO CInt
gtk_calendar_get_day_is_marked Ptr Calendar
calendar' Word32
day
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
calendar
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data CalendarGetDayIsMarkedMethodInfo
instance (signature ~ (Word32 -> m Bool), MonadIO m, IsCalendar a) => O.MethodInfo CalendarGetDayIsMarkedMethodInfo a signature where
    overloadedMethod = calendarGetDayIsMarked

#endif

-- method Calendar::get_show_day_names
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "Calendar" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkCalendar" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_calendar_get_show_day_names" gtk_calendar_get_show_day_names :: 
    Ptr Calendar ->                         -- self : TInterface (Name {namespace = "Gtk", name = "Calendar"})
    IO CInt

-- | Returns whether /@self@/ is currently showing the names
-- of the week days above the day numbers, i.e. the value
-- of the t'GI.Gtk.Objects.Calendar.Calendar':@/show-day-names/@ property.
calendarGetShowDayNames ::
    (B.CallStack.HasCallStack, MonadIO m, IsCalendar a) =>
    a
    -- ^ /@self@/: a t'GI.Gtk.Objects.Calendar.Calendar'
    -> m Bool
    -- ^ __Returns:__ Whether the calendar shows day names.
calendarGetShowDayNames :: a -> m Bool
calendarGetShowDayNames a
self = 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 Calendar
self' <- a -> IO (Ptr Calendar)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    CInt
result <- Ptr Calendar -> IO CInt
gtk_calendar_get_show_day_names Ptr Calendar
self'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data CalendarGetShowDayNamesMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsCalendar a) => O.MethodInfo CalendarGetShowDayNamesMethodInfo a signature where
    overloadedMethod = calendarGetShowDayNames

#endif

-- method Calendar::get_show_heading
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "Calendar" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkCalendar" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_calendar_get_show_heading" gtk_calendar_get_show_heading :: 
    Ptr Calendar ->                         -- self : TInterface (Name {namespace = "Gtk", name = "Calendar"})
    IO CInt

-- | Returns whether /@self@/ is currently showing the heading,
-- i.e. the value of the t'GI.Gtk.Objects.Calendar.Calendar':@/show-heading/@ property.
calendarGetShowHeading ::
    (B.CallStack.HasCallStack, MonadIO m, IsCalendar a) =>
    a
    -- ^ /@self@/: a t'GI.Gtk.Objects.Calendar.Calendar'
    -> m Bool
    -- ^ __Returns:__ Whether the calendar is showing a heading.
calendarGetShowHeading :: a -> m Bool
calendarGetShowHeading a
self = 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 Calendar
self' <- a -> IO (Ptr Calendar)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    CInt
result <- Ptr Calendar -> IO CInt
gtk_calendar_get_show_heading Ptr Calendar
self'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data CalendarGetShowHeadingMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsCalendar a) => O.MethodInfo CalendarGetShowHeadingMethodInfo a signature where
    overloadedMethod = calendarGetShowHeading

#endif

-- method Calendar::get_show_week_numbers
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "Calendar" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkCalendar" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_calendar_get_show_week_numbers" gtk_calendar_get_show_week_numbers :: 
    Ptr Calendar ->                         -- self : TInterface (Name {namespace = "Gtk", name = "Calendar"})
    IO CInt

-- | Returns whether /@self@/ is showing week numbers right
-- now, i.e. the value of the t'GI.Gtk.Objects.Calendar.Calendar':@/show-week-numbers/@
-- property.
calendarGetShowWeekNumbers ::
    (B.CallStack.HasCallStack, MonadIO m, IsCalendar a) =>
    a
    -- ^ /@self@/: a t'GI.Gtk.Objects.Calendar.Calendar'
    -> m Bool
    -- ^ __Returns:__ Whether the calendar is showing week numbers.
calendarGetShowWeekNumbers :: a -> m Bool
calendarGetShowWeekNumbers a
self = 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 Calendar
self' <- a -> IO (Ptr Calendar)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    CInt
result <- Ptr Calendar -> IO CInt
gtk_calendar_get_show_week_numbers Ptr Calendar
self'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data CalendarGetShowWeekNumbersMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsCalendar a) => O.MethodInfo CalendarGetShowWeekNumbersMethodInfo a signature where
    overloadedMethod = calendarGetShowWeekNumbers

#endif

-- method Calendar::mark_day
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "calendar"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "Calendar" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkCalendar" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "day"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the day number to mark between 1 and 31."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_calendar_mark_day" gtk_calendar_mark_day :: 
    Ptr Calendar ->                         -- calendar : TInterface (Name {namespace = "Gtk", name = "Calendar"})
    Word32 ->                               -- day : TBasicType TUInt
    IO ()

-- | Places a visual marker on a particular day.
calendarMarkDay ::
    (B.CallStack.HasCallStack, MonadIO m, IsCalendar a) =>
    a
    -- ^ /@calendar@/: a t'GI.Gtk.Objects.Calendar.Calendar'
    -> Word32
    -- ^ /@day@/: the day number to mark between 1 and 31.
    -> m ()
calendarMarkDay :: a -> Word32 -> m ()
calendarMarkDay a
calendar Word32
day = 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 Calendar
calendar' <- a -> IO (Ptr Calendar)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
calendar
    Ptr Calendar -> Word32 -> IO ()
gtk_calendar_mark_day Ptr Calendar
calendar' Word32
day
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
calendar
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data CalendarMarkDayMethodInfo
instance (signature ~ (Word32 -> m ()), MonadIO m, IsCalendar a) => O.MethodInfo CalendarMarkDayMethodInfo a signature where
    overloadedMethod = calendarMarkDay

#endif

-- method Calendar::select_day
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "Calendar" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkCalendar." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "date"
--           , argType =
--               TInterface Name { namespace = "GLib" , name = "DateTime" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GDateTime representing the day to select"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_calendar_select_day" gtk_calendar_select_day :: 
    Ptr Calendar ->                         -- self : TInterface (Name {namespace = "Gtk", name = "Calendar"})
    Ptr GLib.DateTime.DateTime ->           -- date : TInterface (Name {namespace = "GLib", name = "DateTime"})
    IO ()

-- | Will switch to /@date@/\'s year and month and select its day.
calendarSelectDay ::
    (B.CallStack.HasCallStack, MonadIO m, IsCalendar a) =>
    a
    -- ^ /@self@/: a t'GI.Gtk.Objects.Calendar.Calendar'.
    -> GLib.DateTime.DateTime
    -- ^ /@date@/: a t'GI.GLib.Structs.DateTime.DateTime' representing the day to select
    -> m ()
calendarSelectDay :: a -> DateTime -> m ()
calendarSelectDay a
self DateTime
date = 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 Calendar
self' <- a -> IO (Ptr Calendar)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    Ptr DateTime
date' <- DateTime -> IO (Ptr DateTime)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr DateTime
date
    Ptr Calendar -> Ptr DateTime -> IO ()
gtk_calendar_select_day Ptr Calendar
self' Ptr DateTime
date'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    DateTime -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr DateTime
date
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data CalendarSelectDayMethodInfo
instance (signature ~ (GLib.DateTime.DateTime -> m ()), MonadIO m, IsCalendar a) => O.MethodInfo CalendarSelectDayMethodInfo a signature where
    overloadedMethod = calendarSelectDay

#endif

-- method Calendar::set_show_day_names
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "Calendar" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkCalendar" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "value"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "Whether to show day names above the day numbers"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_calendar_set_show_day_names" gtk_calendar_set_show_day_names :: 
    Ptr Calendar ->                         -- self : TInterface (Name {namespace = "Gtk", name = "Calendar"})
    CInt ->                                 -- value : TBasicType TBoolean
    IO ()

-- | Sets whether the calendar shows day names.
calendarSetShowDayNames ::
    (B.CallStack.HasCallStack, MonadIO m, IsCalendar a) =>
    a
    -- ^ /@self@/: a t'GI.Gtk.Objects.Calendar.Calendar'
    -> Bool
    -- ^ /@value@/: Whether to show day names above the day numbers
    -> m ()
calendarSetShowDayNames :: a -> Bool -> m ()
calendarSetShowDayNames a
self Bool
value = 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 Calendar
self' <- a -> IO (Ptr Calendar)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    let value' :: CInt
value' = (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
value
    Ptr Calendar -> CInt -> IO ()
gtk_calendar_set_show_day_names Ptr Calendar
self' CInt
value'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data CalendarSetShowDayNamesMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsCalendar a) => O.MethodInfo CalendarSetShowDayNamesMethodInfo a signature where
    overloadedMethod = calendarSetShowDayNames

#endif

-- method Calendar::set_show_heading
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "Calendar" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkCalendar" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "value"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "Whether to show the heading in the calendar"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_calendar_set_show_heading" gtk_calendar_set_show_heading :: 
    Ptr Calendar ->                         -- self : TInterface (Name {namespace = "Gtk", name = "Calendar"})
    CInt ->                                 -- value : TBasicType TBoolean
    IO ()

-- | Sets whether the calendar should show a heading
-- containing the current year and month as well as
-- buttons for changing both.
calendarSetShowHeading ::
    (B.CallStack.HasCallStack, MonadIO m, IsCalendar a) =>
    a
    -- ^ /@self@/: a t'GI.Gtk.Objects.Calendar.Calendar'
    -> Bool
    -- ^ /@value@/: Whether to show the heading in the calendar
    -> m ()
calendarSetShowHeading :: a -> Bool -> m ()
calendarSetShowHeading a
self Bool
value = 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 Calendar
self' <- a -> IO (Ptr Calendar)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    let value' :: CInt
value' = (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
value
    Ptr Calendar -> CInt -> IO ()
gtk_calendar_set_show_heading Ptr Calendar
self' CInt
value'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data CalendarSetShowHeadingMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsCalendar a) => O.MethodInfo CalendarSetShowHeadingMethodInfo a signature where
    overloadedMethod = calendarSetShowHeading

#endif

-- method Calendar::set_show_week_numbers
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "Calendar" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkCalendar" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "value"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "whether to show week numbers on the left of the days"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_calendar_set_show_week_numbers" gtk_calendar_set_show_week_numbers :: 
    Ptr Calendar ->                         -- self : TInterface (Name {namespace = "Gtk", name = "Calendar"})
    CInt ->                                 -- value : TBasicType TBoolean
    IO ()

-- | Sets whether week numbers are shown in the calendar.
calendarSetShowWeekNumbers ::
    (B.CallStack.HasCallStack, MonadIO m, IsCalendar a) =>
    a
    -- ^ /@self@/: a t'GI.Gtk.Objects.Calendar.Calendar'
    -> Bool
    -- ^ /@value@/: whether to show week numbers on the left of the days
    -> m ()
calendarSetShowWeekNumbers :: a -> Bool -> m ()
calendarSetShowWeekNumbers a
self Bool
value = 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 Calendar
self' <- a -> IO (Ptr Calendar)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    let value' :: CInt
value' = (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
value
    Ptr Calendar -> CInt -> IO ()
gtk_calendar_set_show_week_numbers Ptr Calendar
self' CInt
value'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data CalendarSetShowWeekNumbersMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsCalendar a) => O.MethodInfo CalendarSetShowWeekNumbersMethodInfo a signature where
    overloadedMethod = calendarSetShowWeekNumbers

#endif

-- method Calendar::unmark_day
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "calendar"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "Calendar" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkCalendar." , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "day"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the day number to unmark between 1 and 31."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_calendar_unmark_day" gtk_calendar_unmark_day :: 
    Ptr Calendar ->                         -- calendar : TInterface (Name {namespace = "Gtk", name = "Calendar"})
    Word32 ->                               -- day : TBasicType TUInt
    IO ()

-- | Removes the visual marker from a particular day.
calendarUnmarkDay ::
    (B.CallStack.HasCallStack, MonadIO m, IsCalendar a) =>
    a
    -- ^ /@calendar@/: a t'GI.Gtk.Objects.Calendar.Calendar'.
    -> Word32
    -- ^ /@day@/: the day number to unmark between 1 and 31.
    -> m ()
calendarUnmarkDay :: a -> Word32 -> m ()
calendarUnmarkDay a
calendar Word32
day = 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 Calendar
calendar' <- a -> IO (Ptr Calendar)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
calendar
    Ptr Calendar -> Word32 -> IO ()
gtk_calendar_unmark_day Ptr Calendar
calendar' Word32
day
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
calendar
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data CalendarUnmarkDayMethodInfo
instance (signature ~ (Word32 -> m ()), MonadIO m, IsCalendar a) => O.MethodInfo CalendarUnmarkDayMethodInfo a signature where
    overloadedMethod = calendarUnmarkDay

#endif