gi-gtk4-4.0.12: Gtk 4.x bindings

Copyright | Will Thompson and Iñaki García Etxebarria
License | LGPL-2.1
Maintainer | Iñaki García Etxebarria
Safe Haskell | None
Language | Haskell2010

GI.Gtk.Objects.Calendar

Contents

- Exported types
- Methods
  - clearMarks
  - getDate
  - getDay
  - getDayIsMarked
  - getMonth
  - getShowDayNames
  - getShowHeading
  - getShowWeekNumbers
  - getYear
  - markDay
  - new
  - selectDay
  - setDate
  - setDay
  - setMonth
  - setShowDayNames
  - setShowHeading
  - setShowWeekNumbers
  - setYear
  - unmarkDay
- Properties
  - date
  - day
  - month
  - showDayNames
  - showHeading
  - showWeekNumbers
  - year
- Signals
  - daySelected
  - nextMonth
  - nextYear
  - prevMonth
  - prevYear

Description

Displays a Gregorian calendar, one month at a time.

<picture> <source srcset="calendar-dark.png" media="(prefers-color-scheme: dark)"> <img alt="An example GtkCalendar" src="calendar.png"> </picture>

A `GtkCalendar` can be created with `calendarNew`.

The selected date can be retrieved from a `GtkCalendar` using `calendarGetDate`. It can be altered with `calendarSetDate`.

To place a visual marker on a particular day, use `calendarMarkDay` and to remove the marker, `calendarUnmarkDay`. Alternative, all marks can be cleared with `calendarClearMarks`.

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.

# Shortcuts and Gestures

`GtkCalendar` supports the following gestures:

- Scrolling up or down will switch to the previous or next month.
- Date strings can be dropped for setting the current day.

# CSS nodes

    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.

Synopsis

- newtype Calendar = Calendar (ManagedPtr Calendar)
- class (GObject o, IsDescendantOf Calendar o) => IsCalendar o
- toCalendar :: (MonadIO m, IsCalendar o) => o -> m Calendar
- calendarClearMarks :: (HasCallStack, MonadIO m, IsCalendar a) => a -> m ()
- calendarGetDate :: (HasCallStack, MonadIO m, IsCalendar a) => a -> m DateTime
- calendarGetDay :: (HasCallStack, MonadIO m, IsCalendar a) => a -> m Int32
- calendarGetDayIsMarked :: (HasCallStack, MonadIO m, IsCalendar a) => a -> Word32 -> m Bool
- calendarGetMonth :: (HasCallStack, MonadIO m, IsCalendar a) => a -> m Int32
- calendarGetShowDayNames :: (HasCallStack, MonadIO m, IsCalendar a) => a -> m Bool
- calendarGetShowHeading :: (HasCallStack, MonadIO m, IsCalendar a) => a -> m Bool
- calendarGetShowWeekNumbers :: (HasCallStack, MonadIO m, IsCalendar a) => a -> m Bool
- calendarGetYear :: (HasCallStack, MonadIO m, IsCalendar a) => a -> m Int32
- calendarMarkDay :: (HasCallStack, MonadIO m, IsCalendar a) => a -> Word32 -> m ()
- calendarNew :: (HasCallStack, MonadIO m) => m Calendar
- calendarSelectDay :: (HasCallStack, MonadIO m, IsCalendar a) => a -> DateTime -> m ()
- calendarSetDate :: (HasCallStack, MonadIO m, IsCalendar a) => a -> DateTime -> m ()
- calendarSetDay :: (HasCallStack, MonadIO m, IsCalendar a) => a -> Int32 -> m ()
- calendarSetMonth :: (HasCallStack, MonadIO m, IsCalendar a) => a -> Int32 -> m ()
- calendarSetShowDayNames :: (HasCallStack, MonadIO m, IsCalendar a) => a -> Bool -> m ()
- calendarSetShowHeading :: (HasCallStack, MonadIO m, IsCalendar a) => a -> Bool -> m ()
- calendarSetShowWeekNumbers :: (HasCallStack, MonadIO m, IsCalendar a) => a -> Bool -> m ()
- calendarSetYear :: (HasCallStack, MonadIO m, IsCalendar a) => a -> Int32 -> m ()
- calendarUnmarkDay :: (HasCallStack, MonadIO m, IsCalendar a) => a -> Word32 -> m ()
- constructCalendarDate :: (IsCalendar o, MonadIO m) => DateTime -> m (GValueConstruct o)
- getCalendarDate :: (MonadIO m, IsCalendar o) => o -> m (Maybe DateTime)
- setCalendarDate :: (MonadIO m, IsCalendar o) => o -> DateTime -> m ()
- constructCalendarDay :: (IsCalendar o, MonadIO m) => Int32 -> m (GValueConstruct o)
- getCalendarDay :: (MonadIO m, IsCalendar o) => o -> m Int32
- setCalendarDay :: (MonadIO m, IsCalendar o) => o -> Int32 -> m ()
- constructCalendarMonth :: (IsCalendar o, MonadIO m) => Int32 -> m (GValueConstruct o)
- getCalendarMonth :: (MonadIO m, IsCalendar o) => o -> m Int32
- setCalendarMonth :: (MonadIO m, IsCalendar o) => o -> Int32 -> m ()
- constructCalendarShowDayNames :: (IsCalendar o, MonadIO m) => Bool -> m (GValueConstruct o)
- getCalendarShowDayNames :: (MonadIO m, IsCalendar o) => o -> m Bool
- setCalendarShowDayNames :: (MonadIO m, IsCalendar o) => o -> Bool -> m ()
- constructCalendarShowHeading :: (IsCalendar o, MonadIO m) => Bool -> m (GValueConstruct o)
- getCalendarShowHeading :: (MonadIO m, IsCalendar o) => o -> m Bool
- setCalendarShowHeading :: (MonadIO m, IsCalendar o) => o -> Bool -> m ()
- constructCalendarShowWeekNumbers :: (IsCalendar o, MonadIO m) => Bool -> m (GValueConstruct o)
- getCalendarShowWeekNumbers :: (MonadIO m, IsCalendar o) => o -> m Bool
- setCalendarShowWeekNumbers :: (MonadIO m, IsCalendar o) => o -> Bool -> m ()
- constructCalendarYear :: (IsCalendar o, MonadIO m) => Int32 -> m (GValueConstruct o)
- getCalendarYear :: (MonadIO m, IsCalendar o) => o -> m Int32
- setCalendarYear :: (MonadIO m, IsCalendar o) => o -> Int32 -> m ()
- type CalendarDaySelectedCallback = IO ()
- afterCalendarDaySelected :: (IsCalendar a, MonadIO m) => a -> ((?self :: a) => CalendarDaySelectedCallback) -> m SignalHandlerId
- onCalendarDaySelected :: (IsCalendar a, MonadIO m) => a -> ((?self :: a) => CalendarDaySelectedCallback) -> m SignalHandlerId
- type CalendarNextMonthCallback = IO ()
- afterCalendarNextMonth :: (IsCalendar a, MonadIO m) => a -> ((?self :: a) => CalendarNextMonthCallback) -> m SignalHandlerId
- onCalendarNextMonth :: (IsCalendar a, MonadIO m) => a -> ((?self :: a) => CalendarNextMonthCallback) -> m SignalHandlerId
- type CalendarNextYearCallback = IO ()
- afterCalendarNextYear :: (IsCalendar a, MonadIO m) => a -> ((?self :: a) => CalendarNextYearCallback) -> m SignalHandlerId
- onCalendarNextYear :: (IsCalendar a, MonadIO m) => a -> ((?self :: a) => CalendarNextYearCallback) -> m SignalHandlerId
- type CalendarPrevMonthCallback = IO ()
- afterCalendarPrevMonth :: (IsCalendar a, MonadIO m) => a -> ((?self :: a) => CalendarPrevMonthCallback) -> m SignalHandlerId
- onCalendarPrevMonth :: (IsCalendar a, MonadIO m) => a -> ((?self :: a) => CalendarPrevMonthCallback) -> m SignalHandlerId
- type CalendarPrevYearCallback = IO ()
- afterCalendarPrevYear :: (IsCalendar a, MonadIO m) => a -> ((?self :: a) => CalendarPrevYearCallback) -> m SignalHandlerId
- onCalendarPrevYear :: (IsCalendar a, MonadIO m) => a -> ((?self :: a) => CalendarPrevYearCallback) -> m SignalHandlerId

# Exported types

newtype Calendar Source #

Memory-managed wrapper type.

Constructors

Calendar (ManagedPtr Calendar) |

#### Instances

Instances details

Eq Calendar Source # |
Instance details Defined in GI.Gtk.Objects.Calendar Methods (==) :: Calendar -> Calendar -> Bool Source # (/=) :: Calendar -> Calendar -> Bool Source #
GObject Calendar Source # |
Instance details Defined in GI.Gtk.Objects.Calendar
ManagedPtrNewtype Calendar Source # |
Instance details Defined in GI.Gtk.Objects.Calendar Methods toManagedPtr :: Calendar -> ManagedPtr Calendar Source #
TypedObject Calendar Source # |
Instance details Defined in GI.Gtk.Objects.Calendar Methods glibType :: IO GType Source #
HasParentTypes Calendar Source # |
Instance details Defined in GI.Gtk.Objects.Calendar
IsGValue (Maybe Calendar) Source # | Convert `Calendar` to and from `GValue`. See `toGValue` and `fromGValue`.
Instance details Defined in GI.Gtk.Objects.Calendar Methods gvalueGType_ :: IO GType Source # gvalueSet_ :: Ptr GValue -> Maybe Calendar -> IO () Source # gvalueGet_ :: Ptr GValue -> IO (Maybe Calendar) Source #
type ParentTypes Calendar Source # |
Instance details Defined in GI.Gtk.Objects.Calendar type ParentTypes Calendar = '[Widget, Object, Accessible, Buildable, ConstraintTarget]

class (GObject o, IsDescendantOf Calendar o) => IsCalendar o Source #

Type class for types which can be safely cast to `Calendar`, for instance with `toCalendar`.

#### Instances

Instances details

(GObject o, IsDescendantOf Calendar o) => IsCalendar o Source # |
Instance details Defined in GI.Gtk.Objects.Calendar

toCalendar :: (MonadIO m, IsCalendar o) => o -> m Calendar Source #

Cast to `Calendar`, for types for which this is known to be safe. For general casts, use `castTo`.

# Methods

### Click to display all available methods, including inherited ones

Expand

#### Methods

actionSetEnabled, activate, activateAction, activateDefault, addController, addCssClass, addMnemonicLabel, addTickCallback, allocate, announce, bindProperty, bindPropertyFull, childFocus, clearMarks, computeBounds, computeExpand, computePoint, computeTransform, contains, createPangoContext, createPangoLayout, disposeTemplate, dragCheckThreshold, errorBell, forceFloating, freezeNotify, getv, grabFocus, hasCssClass, hasDefault, hasFocus, hasVisibleFocus, hide, inDestruction, initTemplate, insertActionGroup, insertAfter, insertBefore, isAncestor, isDrawable, isFloating, isFocus, isSensitive, isVisible, keynavFailed, listMnemonicLabels, map, markDay, measure, mnemonicActivate, notify, notifyByPspec, observeChildren, observeControllers, pick, queueAllocate, queueDraw, queueResize, realize, ref, refSink, removeController, removeCssClass, removeMnemonicLabel, removeTickCallback, resetProperty, resetRelation, resetState, runDispose, selectDay, shouldLayout, show, sizeAllocate, snapshotChild, stealData, stealQdata, thawNotify, translateCoordinates, triggerTooltipQuery, unmap, unmarkDay, unparent, unrealize, unref, unsetStateFlags, updateNextAccessibleSibling, updatePlatformState, updateProperty, updateRelation, updateState, watchClosure.

#### Getters

getAccessibleId, getAccessibleParent, getAccessibleRole, getAllocatedBaseline, getAllocatedHeight, getAllocatedWidth, getAllocation, getAncestor, getAtContext, getBaseline, getBounds, getBuildableId, getCanFocus, getCanTarget, getChildVisible, getClipboard, getColor, getCssClasses, getCssName, getCursor, getData, getDate, getDay, getDayIsMarked, getDirection, getDisplay, getFirstAccessibleChild, getFirstChild, getFocusChild, getFocusOnClick, getFocusable, getFontMap, getFontOptions, getFrameClock, getHalign, getHasTooltip, getHeight, getHexpand, getHexpandSet, getLastChild, getLayoutManager, getLimitEvents, getMapped, getMarginBottom, getMarginEnd, getMarginStart, getMarginTop, getMonth, getName, getNative, getNextAccessibleSibling, getNextSibling, getOpacity, getOverflow, getPangoContext, getParent, getPlatformState, getPreferredSize, getPrevSibling, getPrimaryClipboard, getProperty, getQdata, getRealized, getReceivesDefault, getRequestMode, getRoot, getScaleFactor, getSensitive, getSettings, getShowDayNames, getShowHeading, getShowWeekNumbers, getSize, getSizeRequest, getStateFlags, getStyleContext, getTemplateChild, getTooltipMarkup, getTooltipText, getValign, getVexpand, getVexpandSet, getVisible, getWidth, getYear.

#### Setters

setAccessibleParent, setCanFocus, setCanTarget, setChildVisible, setCssClasses, setCursor, setCursorFromName, setData, setDataFull, setDate, setDay, setDirection, setFocusChild, setFocusOnClick, setFocusable, setFontMap, setFontOptions, setHalign, setHasTooltip, setHexpand, setHexpandSet, setLayoutManager, setLimitEvents, setMarginBottom, setMarginEnd, setMarginStart, setMarginTop, setMonth, setName, setOpacity, setOverflow, setParent, setProperty, setReceivesDefault, setSensitive, setShowDayNames, setShowHeading, setShowWeekNumbers, setSizeRequest, setStateFlags, setTooltipMarkup, setTooltipText, setValign, setVexpand, setVexpandSet, setVisible, setYear.

## clearMarks

calendarClearMarks Source #

Arguments

:: (HasCallStack, MonadIO m, IsCalendar a) |
=> a | `calendar`: a `GtkCalendar`
-> m () |

Remove all visual markers.

## getDate

calendarGetDate Source #

Arguments

:: (HasCallStack, MonadIO m, IsCalendar a) |
=> a | `self`: a `GtkCalendar`
-> m DateTime | Returns: the `GDateTime` representing the selected date

Returns a `GDateTime` representing the shown year, month and the selected day.

The returned date is in the local time zone.

## getDay

calendarGetDay Source #

Arguments

:: (HasCallStack, MonadIO m, IsCalendar a) |
=> a | `self`: a `GtkCalendar`
-> m Int32 | Returns: the day of the selected date.

Gets the day of the selected date.

Since: 4.14

## getDayIsMarked

calendarGetDayIsMarked Source #

Arguments

:: (HasCallStack, MonadIO m, IsCalendar a) |
=> a | `calendar`: a `GtkCalendar`
-> Word32 | `day`: the day number between 1 and 31.
-> m Bool | Returns: whether the day is marked.

Returns if the `day` of the `calendar` is already marked.

## getMonth

calendarGetMonth Source #

Arguments

:: (HasCallStack, MonadIO m, IsCalendar a) |
=> a | `self`: a `GtkCalendar`
-> m Int32 | Returns: The month of the selected date (as a number between 0 and 11).

Gets the month of the selected date.

Since: 4.14

## getShowDayNames

calendarGetShowDayNames Source #

Arguments

:: (HasCallStack, MonadIO m, IsCalendar a) |
=> a | `self`: a `GtkCalendar`
-> m Bool | Returns: Whether the calendar shows day names.

Returns whether `self` is currently showing the names of the week days.

This is the value of the Calendar:showDayNames property.

## getShowHeading

calendarGetShowHeading Source #

Arguments

:: (HasCallStack, MonadIO m, IsCalendar a) |
=> a | `self`: a `GtkCalendar`
-> m Bool | Returns: Whether the calendar is showing a heading.

Returns whether `self` is currently showing the heading.

This is the value of the Calendar:showHeading property.

## getShowWeekNumbers

calendarGetShowWeekNumbers Source #

Arguments

:: (HasCallStack, MonadIO m, IsCalendar a) |
=> a | `self`: a `GtkCalendar`
-> m Bool | Returns: Whether the calendar is showing week numbers.

Returns whether `self` is showing week numbers right now.

This is the value of the Calendar:showWeekNumbers property.

## getYear

calendarGetYear Source #

Arguments

:: (HasCallStack, MonadIO m, IsCalendar a) |
=> a | `self`: a `GtkCalendar`
-> m Int32 | Returns: the year of the selected date.

Gets the year of the selected date.

Since: 4.14

## markDay

calendarMarkDay Source #

Arguments

:: (HasCallStack, MonadIO m, IsCalendar a) |
=> a | `calendar`: a `GtkCalendar`
-> Word32 | `day`: the day number to mark between 1 and 31.
-> m () |

Places a visual marker on a particular day of the current month.

## new

calendarNew Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> m Calendar | Returns: a newly `GtkCalendar` widget

Creates a new calendar, with the current date being selected.

## selectDay

calendarSelectDay Source #

Arguments

:: (HasCallStack, MonadIO m, IsCalendar a) |
=> a | `self`: a `GtkCalendar`.
-> DateTime | `date`: a `GDateTime` representing the day to select
-> m () |

Deprecated: (Since version 4.20)Use [method`calendar`.set_date] instead.

Switches to `date`'s year and month and select its day.

## setDate

calendarSetDate Source #

Arguments

:: (HasCallStack, MonadIO m, IsCalendar a) |
=> a | `self`: a `GtkCalendar`.
-> DateTime | `date`: a `GDateTime` representing the day to select
-> m () |

Switches to `date`'s year and month and selects its day.

Since: 4.20

## setDay

calendarSetDay Source #

Arguments

:: (HasCallStack, MonadIO m, IsCalendar a) |
=> a | `self`: a `GtkCalendar`
-> Int32 | `day`: The desired day for the selected date (as a number between 1 and 31).
-> m () |

Sets the day for the selected date.

The new date must be valid. For example, setting the day to 31 when the month is February will fail.

Since: 4.14

## setMonth

calendarSetMonth Source #

Arguments

:: (HasCallStack, MonadIO m, IsCalendar a) |
=> a | `self`: a `GtkCalendar`
-> Int32 | `month`: The desired month for the selected date (as a number between 0 and 11).
-> m () |

Sets the month for the selected date.

The new date must be valid. For example, setting the month to 1 (February) when the day is 31 will fail.

Since: 4.14

## setShowDayNames

calendarSetShowDayNames Source #

Arguments

:: (HasCallStack, MonadIO m, IsCalendar a) |
=> a | `self`: a `GtkCalendar`
-> Bool | `value`: Whether to show day names above the day numbers
-> m () |

Sets whether the calendar shows day names.

## setShowHeading

calendarSetShowHeading Source #

Arguments

:: (HasCallStack, MonadIO m, IsCalendar a) |
=> a | `self`: a `GtkCalendar`
-> Bool | `value`: Whether to show the heading in the calendar
-> m () |

Sets whether the calendar should show a heading.

The heading contains the current year and month as well as buttons for changing both.

## setShowWeekNumbers

calendarSetShowWeekNumbers Source #

Arguments

:: (HasCallStack, MonadIO m, IsCalendar a) |
=> a | `self`: a `GtkCalendar`
-> Bool | `value`: whether to show week numbers alongside the days
-> m () |

Sets whether week numbers are shown in the calendar.

## setYear

calendarSetYear Source #

Arguments

:: (HasCallStack, MonadIO m, IsCalendar a) |
=> a | `self`: a `GtkCalendar`
-> Int32 | `year`: The desired year for the selected date (within `DateTime` limits, i.e. from 0001 to 9999).
-> m () |

Sets the year for the selected date.

The new date must be valid. For example, setting the year to 2023 when the date is February 29 will fail.

Since: 4.14

## unmarkDay

calendarUnmarkDay Source #

Arguments

:: (HasCallStack, MonadIO m, IsCalendar a) |
=> a | `calendar`: a `GtkCalendar`.
-> Word32 | `day`: the day number to unmark between 1 and 31.
-> m () |

Removes the visual marker from a particular day.

# Properties

## date

The selected date.

This property gets initially set to the current date.

constructCalendarDate :: (IsCalendar o, MonadIO m) => DateTime -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`date`” property. This is rarely needed directly, but it is used by `new`.

getCalendarDate :: (MonadIO m, IsCalendar o) => o -> m (Maybe DateTime) Source #

Get the value of the “`date`” property. When overloading is enabled, this is equivalent to

    get calendar #date

setCalendarDate :: (MonadIO m, IsCalendar o) => o -> DateTime -> m () Source #

Set the value of the “`date`” property. When overloading is enabled, this is equivalent to

    set calendar [ #date := value ]

## day

The selected day (as a number between 1 and 31).

constructCalendarDay :: (IsCalendar o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`day`” property. This is rarely needed directly, but it is used by `new`.

getCalendarDay :: (MonadIO m, IsCalendar o) => o -> m Int32 Source #

Get the value of the “`day`” property. When overloading is enabled, this is equivalent to

    get calendar #day

setCalendarDay :: (MonadIO m, IsCalendar o) => o -> Int32 -> m () Source #

Set the value of the “`day`” property. When overloading is enabled, this is equivalent to

    set calendar [ #day := value ]

## month

The selected month (as a number between 0 and 11).

This property gets initially set to the current month.

constructCalendarMonth :: (IsCalendar o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`month`” property. This is rarely needed directly, but it is used by `new`.

getCalendarMonth :: (MonadIO m, IsCalendar o) => o -> m Int32 Source #

Get the value of the “`month`” property. When overloading is enabled, this is equivalent to

    get calendar #month

setCalendarMonth :: (MonadIO m, IsCalendar o) => o -> Int32 -> m () Source #

Set the value of the “`month`” property. When overloading is enabled, this is equivalent to

    set calendar [ #month := value ]

## showDayNames

Determines whether day names are displayed.

constructCalendarShowDayNames :: (IsCalendar o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`show-day-names`” property. This is rarely needed directly, but it is used by `new`.

getCalendarShowDayNames :: (MonadIO m, IsCalendar o) => o -> m Bool Source #

Get the value of the “`show-day-names`” property. When overloading is enabled, this is equivalent to

    get calendar #showDayNames

setCalendarShowDayNames :: (MonadIO m, IsCalendar o) => o -> Bool -> m () Source #

Set the value of the “`show-day-names`” property. When overloading is enabled, this is equivalent to

    set calendar [ #showDayNames := value ]

## showHeading

Determines whether a heading is displayed.

constructCalendarShowHeading :: (IsCalendar o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`show-heading`” property. This is rarely needed directly, but it is used by `new`.

getCalendarShowHeading :: (MonadIO m, IsCalendar o) => o -> m Bool Source #

Get the value of the “`show-heading`” property. When overloading is enabled, this is equivalent to

    get calendar #showHeading

setCalendarShowHeading :: (MonadIO m, IsCalendar o) => o -> Bool -> m () Source #

Set the value of the “`show-heading`” property. When overloading is enabled, this is equivalent to

    set calendar [ #showHeading := value ]

## showWeekNumbers

Determines whether week numbers are displayed.

constructCalendarShowWeekNumbers :: (IsCalendar o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`show-week-numbers`” property. This is rarely needed directly, but it is used by `new`.

getCalendarShowWeekNumbers :: (MonadIO m, IsCalendar o) => o -> m Bool Source #

Get the value of the “`show-week-numbers`” property. When overloading is enabled, this is equivalent to

    get calendar #showWeekNumbers

setCalendarShowWeekNumbers :: (MonadIO m, IsCalendar o) => o -> Bool -> m () Source #

Set the value of the “`show-week-numbers`” property. When overloading is enabled, this is equivalent to

    set calendar [ #showWeekNumbers := value ]

## year

The selected year.

This property gets initially set to the current year.

constructCalendarYear :: (IsCalendar o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`year`” property. This is rarely needed directly, but it is used by `new`.

getCalendarYear :: (MonadIO m, IsCalendar o) => o -> m Int32 Source #

Get the value of the “`year`” property. When overloading is enabled, this is equivalent to

    get calendar #year

setCalendarYear :: (MonadIO m, IsCalendar o) => o -> Int32 -> m () Source #

Set the value of the “`year`” property. When overloading is enabled, this is equivalent to

    set calendar [ #year := value ]

# Signals

## daySelected

type CalendarDaySelectedCallback = IO () Source #

Emitted when the user selects a day.

afterCalendarDaySelected :: (IsCalendar a, MonadIO m) => a -> ((?self :: a) => CalendarDaySelectedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the daySelected signal, to be run after the default handler. When overloading is enabled, this is equivalent to

    after calendar #daySelected callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit `?self` parameter. Note that this requires activating the `ImplicitParams` GHC extension.

onCalendarDaySelected :: (IsCalendar a, MonadIO m) => a -> ((?self :: a) => CalendarDaySelectedCallback) -> m SignalHandlerId Source #

Connect a signal handler for the daySelected signal, to be run before the default handler. When overloading is enabled, this is equivalent to

    on calendar #daySelected callback

## nextMonth

type CalendarNextMonthCallback = IO () Source #

Emitted when the user switches to the next month.

afterCalendarNextMonth :: (IsCalendar a, MonadIO m) => a -> ((?self :: a) => CalendarNextMonthCallback) -> m SignalHandlerId Source #

Connect a signal handler for the nextMonth signal, to be run after the default handler. When overloading is enabled, this is equivalent to

    after calendar #nextMonth callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit `?self` parameter. Note that this requires activating the `ImplicitParams` GHC extension.

onCalendarNextMonth :: (IsCalendar a, MonadIO m) => a -> ((?self :: a) => CalendarNextMonthCallback) -> m SignalHandlerId Source #

Connect a signal handler for the nextMonth signal, to be run before the default handler. When overloading is enabled, this is equivalent to

    on calendar #nextMonth callback

## nextYear

type CalendarNextYearCallback = IO () Source #

Emitted when user switches to the next year.

afterCalendarNextYear :: (IsCalendar a, MonadIO m) => a -> ((?self :: a) => CalendarNextYearCallback) -> m SignalHandlerId Source #

Connect a signal handler for the nextYear signal, to be run after the default handler. When overloading is enabled, this is equivalent to

    after calendar #nextYear callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit `?self` parameter. Note that this requires activating the `ImplicitParams` GHC extension.

onCalendarNextYear :: (IsCalendar a, MonadIO m) => a -> ((?self :: a) => CalendarNextYearCallback) -> m SignalHandlerId Source #

Connect a signal handler for the nextYear signal, to be run before the default handler. When overloading is enabled, this is equivalent to

    on calendar #nextYear callback

## prevMonth

type CalendarPrevMonthCallback = IO () Source #

Emitted when the user switches to the previous month.

afterCalendarPrevMonth :: (IsCalendar a, MonadIO m) => a -> ((?self :: a) => CalendarPrevMonthCallback) -> m SignalHandlerId Source #

Connect a signal handler for the prevMonth signal, to be run after the default handler. When overloading is enabled, this is equivalent to

    after calendar #prevMonth callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit `?self` parameter. Note that this requires activating the `ImplicitParams` GHC extension.

onCalendarPrevMonth :: (IsCalendar a, MonadIO m) => a -> ((?self :: a) => CalendarPrevMonthCallback) -> m SignalHandlerId Source #

Connect a signal handler for the prevMonth signal, to be run before the default handler. When overloading is enabled, this is equivalent to

    on calendar #prevMonth callback

## prevYear

type CalendarPrevYearCallback = IO () Source #

Emitted when user switches to the previous year.

afterCalendarPrevYear :: (IsCalendar a, MonadIO m) => a -> ((?self :: a) => CalendarPrevYearCallback) -> m SignalHandlerId Source #

Connect a signal handler for the prevYear signal, to be run after the default handler. When overloading is enabled, this is equivalent to

    after calendar #prevYear callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit `?self` parameter. Note that this requires activating the `ImplicitParams` GHC extension.

onCalendarPrevYear :: (IsCalendar a, MonadIO m) => a -> ((?self :: a) => CalendarPrevYearCallback) -> m SignalHandlerId Source #

Connect a signal handler for the prevYear signal, to be run before the default handler. When overloading is enabled, this is equivalent to

    on calendar #prevYear callback