CalendarRef

public struct CalendarRef : CalendarProtocol, GWeakCapturing

GtkCalendar is a widget that displays a Gregorian calendar, one month at a time. It can be created with gtk_calendar_new().

The month and year currently displayed can be altered with gtk_calendar_select_month(). The exact day can be selected from the displayed month using gtk_calendar_select_day().

To place a visual marker on a particular day, use gtk_calendar_mark_day() and to remove the marker, gtk_calendar_unmark_day(). Alternative, all marks can be cleared with gtk_calendar_clear_marks().

The way in which the calendar itself is displayed can be altered using gtk_calendar_set_display_options().

The selected date can be retrieved from a GtkCalendar using gtk_calendar_get_date().

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.

The CalendarRef type acts as a lightweight Swift reference to an underlying GtkCalendar instance. It exposes methods that can operate on this data type through CalendarProtocol conformance. Use CalendarRef only as an unowned reference to an existing GtkCalendar instance.

  • ptr
    Untyped pointer to the underlying `GtkCalendar` instance.
    

    For type-safe access, use the generated, typed pointer calendar_ptr property instead.

    Declaration

    Swift

    public let ptr: UnsafeMutableRawPointer!

Calendar Class

  • Designated initialiser from the underlying C data type

    Declaration

    Swift

    @inlinable
    init(_ p: UnsafeMutablePointer<GtkCalendar>)
  • Designated initialiser from a constant pointer to the underlying C data type

    Declaration

    Swift

    @inlinable
    init(_ p: UnsafePointer<GtkCalendar>)
  • Conditional initialiser from an optional pointer to the underlying C data type

    Declaration

    Swift

    @inlinable
    init!(_ maybePointer: UnsafeMutablePointer<GtkCalendar>?)
  • Conditional initialiser from an optional, non-mutable pointer to the underlying C data type

    Declaration

    Swift

    @inlinable
    init!(_ maybePointer: UnsafePointer<GtkCalendar>?)
  • Conditional initialiser from an optional gpointer

    Declaration

    Swift

    @inlinable
    init!(gpointer g: gpointer?)
  • Conditional initialiser from an optional, non-mutable gconstpointer

    Declaration

    Swift

    @inlinable
    init!(gconstpointer g: gconstpointer?)
  • Reference intialiser for a related type that implements CalendarProtocol

    Declaration

    Swift

    @inlinable
    init<T>(_ other: T) where T : CalendarProtocol
  • This factory is syntactic sugar for setting weak pointers wrapped in GWeak<T>

    Declaration

    Swift

    @inlinable
    static func unowned<T>(_ other: T) -> CalendarRef where T : CalendarProtocol
  • Unsafe typed initialiser. Do not use unless you know the underlying data type the pointer points to conforms to CalendarProtocol.

    Declaration

    Swift

    @inlinable
    init<T>(cPointer: UnsafeMutablePointer<T>)
  • Unsafe typed initialiser. Do not use unless you know the underlying data type the pointer points to conforms to CalendarProtocol.

    Declaration

    Swift

    @inlinable
    init<T>(constPointer: UnsafePointer<T>)
  • Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to CalendarProtocol.

    Declaration

    Swift

    @inlinable
    init(mutating raw: UnsafeRawPointer)
  • Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to CalendarProtocol.

    Declaration

    Swift

    @inlinable
    init(raw: UnsafeMutableRawPointer)
  • Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to CalendarProtocol.

    Declaration

    Swift

    @inlinable
    init(opaquePointer: OpaquePointer)
  • Creates a new calendar, with the current date being selected.

    Declaration

    Swift

    @inlinable
    init()