<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
<!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'">
<!ENTITY version SYSTEM "version.xml">
<!ENTITY pi "&#960;">
<!ENTITY solidus "&#8260;">
]>
<refentry id="GtkCalendar">
<refmeta>
<refentrytitle role="top_of_page" id="GtkCalendar.top_of_page">GtkCalendar</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK4 Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GtkCalendar</refname>
<refpurpose>Displays a calendar and allows the user to select a date</refpurpose>
</refnamediv>

<refsect1 id="GtkCalendar.functions" role="functions_proto">
<title role="functions_proto.title">Functions</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="functions_proto_type" colwidth="150px"/>
<colspec colname="functions_proto_name"/>
<tbody>
<row><entry role="function_type"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-calendar-new">gtk_calendar_new</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-calendar-select-day">gtk_calendar_select_day</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-calendar-mark-day">gtk_calendar_mark_day</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-calendar-unmark-day">gtk_calendar_unmark_day</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-calendar-get-day-is-marked">gtk_calendar_get_day_is_marked</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-calendar-clear-marks">gtk_calendar_clear_marks</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-calendar-get-show-day-names">gtk_calendar_get_show_day_names</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-calendar-set-show-day-names">gtk_calendar_set_show_day_names</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-calendar-get-show-heading">gtk_calendar_get_show_heading</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-calendar-set-show-heading">gtk_calendar_set_show_heading</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-calendar-get-show-week-numbers">gtk_calendar_get_show_week_numbers</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-calendar-set-show-week-numbers">gtk_calendar_set_show_week_numbers</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

<row><entry role="function_type"><link linkend="GDateTime"><returnvalue>GDateTime</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-calendar-get-date">gtk_calendar_get_date</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkCalendar.properties" role="properties">
<title role="properties.title">Properties</title>
<informaltable frame="none">
<tgroup cols="3">
<colspec colname="properties_type" colwidth="150px"/>
<colspec colname="properties_name" colwidth="300px"/>
<colspec colname="properties_flags" colwidth="200px"/>
<tbody>
<row><entry role="property_type"><link linkend="gint"><type>gint</type></link></entry><entry role="property_name"><link linkend="GtkCalendar--day">day</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gint"><type>gint</type></link></entry><entry role="property_name"><link linkend="GtkCalendar--month">month</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gboolean"><type>gboolean</type></link></entry><entry role="property_name"><link linkend="GtkCalendar--show-day-names">show-day-names</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gboolean"><type>gboolean</type></link></entry><entry role="property_name"><link linkend="GtkCalendar--show-heading">show-heading</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gboolean"><type>gboolean</type></link></entry><entry role="property_name"><link linkend="GtkCalendar--show-week-numbers">show-week-numbers</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gint"><type>gint</type></link></entry><entry role="property_name"><link linkend="GtkCalendar--year">year</link></entry><entry role="property_flags">Read / Write</entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkCalendar.signals" role="signal_proto">
<title role="signal_proto.title">Signals</title>
<informaltable frame="none">
<tgroup cols="3">
<colspec colname="signal_proto_type" colwidth="150px"/>
<colspec colname="signal_proto_name" colwidth="300px"/>
<colspec colname="signal_proto_flags" colwidth="200px"/>
<tbody>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkCalendar-day-selected">day-selected</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-RUN-FIRST:CAPS">Run First</link></entry></row>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkCalendar-next-month">next-month</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-RUN-FIRST:CAPS">Run First</link></entry></row>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkCalendar-next-year">next-year</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-RUN-FIRST:CAPS">Run First</link></entry></row>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkCalendar-prev-month">prev-month</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-RUN-FIRST:CAPS">Run First</link></entry></row>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkCalendar-prev-year">prev-year</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-RUN-FIRST:CAPS">Run First</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkCalendar.other" role="other_proto">
<title role="other_proto.title">Types and Values</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="other_proto_type" colwidth="150px"/>
<colspec colname="other_proto_name"/>
<tbody>
<row><entry role="datatype_keyword"></entry><entry role="function_name"><link linkend="GtkCalendar-struct">GtkCalendar</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkCalendar.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<screen>    <link linkend="GObject">GObject</link>
    <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> <link linkend="GInitiallyUnowned">GInitiallyUnowned</link>
        <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> <link linkend="GtkWidget">GtkWidget</link>
            <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> GtkCalendar
</screen>
</refsect1>
<refsect1 id="GtkCalendar.implemented-interfaces" role="impl_interfaces">
<title role="impl_interfaces.title">Implemented Interfaces</title>
<para>
GtkCalendar implements
 <link linkend="AtkImplementorIface">AtkImplementorIface</link>,  <link linkend="GtkBuildable">GtkBuildable</link> and  <link linkend="GtkConstraintTarget">GtkConstraintTarget</link>.</para>

</refsect1>

<refsect1 id="GtkCalendar.includes"><title>Includes</title><synopsis>#include &lt;gtk/gtk.h&gt;
</synopsis></refsect1>

<refsect1 id="GtkCalendar.description" role="desc">
<title role="desc.title">Description</title>
<para><link linkend="GtkCalendar"><type>GtkCalendar</type></link> is a widget that displays a Gregorian calendar, one month
at a time. It can be created with <link linkend="gtk-calendar-new"><function>gtk_calendar_new()</function></link>.</para>
<para>The date that is currently displayed can be altered with
<link linkend="gtk-calendar-select-day"><function>gtk_calendar_select_day()</function></link>.</para>
<para>To place a visual marker on a particular day, use <link linkend="gtk-calendar-mark-day"><function>gtk_calendar_mark_day()</function></link>
and to remove the marker, <link linkend="gtk-calendar-unmark-day"><function>gtk_calendar_unmark_day()</function></link>. Alternative, all
marks can be cleared with <link linkend="gtk-calendar-clear-marks"><function>gtk_calendar_clear_marks()</function></link>.</para>
<para>The selected date can be retrieved from a <link linkend="GtkCalendar"><type>GtkCalendar</type></link> using
<link linkend="gtk-calendar-get-date"><function>gtk_calendar_get_date()</function></link>.</para>
<para>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.</para>
<refsect2><title>CSS nodes</title><informalexample><programlisting role="example"><![CDATA[
calendar.view
├── header
│   ├── button
│   ├── stack.month
│   ├── button
│   ├── button
│   ├── label.year
│   ╰── button
╰── grid
    ╰── label[.day-name][.week-number][.day-number][.other-month][.today]
]]></programlisting></informalexample>
<para></para>
<para>GtkCalendar has a main node with name calendar. It contains a subnode called header
containing the widgets for switching between years and months.</para>
<para>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).</para>
<para>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.</para>
<para>Marked day labels get the :selected state assigned.</para>
</refsect2>

</refsect1>
<refsect1 id="GtkCalendar.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="gtk-calendar-new" role="function">
<title>gtk_calendar_new&#160;()</title>
<indexterm zone="gtk-calendar-new"><primary>gtk_calendar_new</primary></indexterm>
<programlisting language="C"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
gtk_calendar_new (<parameter><type>void</type></parameter>);</programlisting>
<para>Creates a new calendar, with the current date being selected.</para>
<refsect3 id="gtk-calendar-new.returns" role="returns">
<title>Returns</title>
<para> a newly <link linkend="GtkCalendar"><type>GtkCalendar</type></link> widget</para>
</refsect3></refsect2>
<refsect2 id="gtk-calendar-select-day" role="function">
<title>gtk_calendar_select_day&#160;()</title>
<indexterm zone="gtk-calendar-select-day"><primary>gtk_calendar_select_day</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_calendar_select_day (<parameter><link linkend="GtkCalendar"><type>GtkCalendar</type></link> *self</parameter>,
                         <parameter><link linkend="GDateTime"><type>GDateTime</type></link> *date</parameter>);</programlisting>
<para>Will switch to <parameter>date</parameter>
's year and month and select its day.</para>
<refsect3 id="gtk-calendar-select-day.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkCalendar"><type>GtkCalendar</type></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>date</para></entry>
<entry role="parameter_description"><para>a <link linkend="GDateTime"><type>GDateTime</type></link> representing the day to select. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-calendar-mark-day" role="function">
<title>gtk_calendar_mark_day&#160;()</title>
<indexterm zone="gtk-calendar-mark-day"><primary>gtk_calendar_mark_day</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_calendar_mark_day (<parameter><link linkend="GtkCalendar"><type>GtkCalendar</type></link> *calendar</parameter>,
                       <parameter><link linkend="guint"><type>guint</type></link> day</parameter>);</programlisting>
<para>Places a visual marker on a particular day.</para>
<refsect3 id="gtk-calendar-mark-day.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>calendar</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkCalendar"><type>GtkCalendar</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>day</para></entry>
<entry role="parameter_description"><para>the day number to mark between 1 and 31.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-calendar-unmark-day" role="function">
<title>gtk_calendar_unmark_day&#160;()</title>
<indexterm zone="gtk-calendar-unmark-day"><primary>gtk_calendar_unmark_day</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_calendar_unmark_day (<parameter><link linkend="GtkCalendar"><type>GtkCalendar</type></link> *calendar</parameter>,
                         <parameter><link linkend="guint"><type>guint</type></link> day</parameter>);</programlisting>
<para>Removes the visual marker from a particular day.</para>
<refsect3 id="gtk-calendar-unmark-day.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>calendar</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkCalendar"><type>GtkCalendar</type></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>day</para></entry>
<entry role="parameter_description"><para>the day number to unmark between 1 and 31.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-calendar-get-day-is-marked" role="function">
<title>gtk_calendar_get_day_is_marked&#160;()</title>
<indexterm zone="gtk-calendar-get-day-is-marked"><primary>gtk_calendar_get_day_is_marked</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_calendar_get_day_is_marked (<parameter><link linkend="GtkCalendar"><type>GtkCalendar</type></link> *calendar</parameter>,
                                <parameter><link linkend="guint"><type>guint</type></link> day</parameter>);</programlisting>
<para>Returns if the <parameter>day</parameter>
 of the <parameter>calendar</parameter>
 is already marked.</para>
<refsect3 id="gtk-calendar-get-day-is-marked.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>calendar</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkCalendar"><type>GtkCalendar</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>day</para></entry>
<entry role="parameter_description"><para>the day number between 1 and 31.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-calendar-get-day-is-marked.returns" role="returns">
<title>Returns</title>
<para> whether the day is marked.</para>
</refsect3></refsect2>
<refsect2 id="gtk-calendar-clear-marks" role="function">
<title>gtk_calendar_clear_marks&#160;()</title>
<indexterm zone="gtk-calendar-clear-marks"><primary>gtk_calendar_clear_marks</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_calendar_clear_marks (<parameter><link linkend="GtkCalendar"><type>GtkCalendar</type></link> *calendar</parameter>);</programlisting>
<para>Remove all visual markers.</para>
<refsect3 id="gtk-calendar-clear-marks.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>calendar</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkCalendar"><type>GtkCalendar</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-calendar-get-show-day-names" role="function">
<title>gtk_calendar_get_show_day_names&#160;()</title>
<indexterm zone="gtk-calendar-get-show-day-names"><primary>gtk_calendar_get_show_day_names</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_calendar_get_show_day_names (<parameter><link linkend="GtkCalendar"><type>GtkCalendar</type></link> *self</parameter>);</programlisting>
<para>Returns whether <parameter>self</parameter>
 is currently showing the names
of the week days above the day numbers, i.e. the value
of the <link linkend="GtkCalendar--show-day-names"><type>“show-day-names”</type></link> property.</para>
<refsect3 id="gtk-calendar-get-show-day-names.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkCalendar"><type>GtkCalendar</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-calendar-get-show-day-names.returns" role="returns">
<title>Returns</title>
<para> Whether the calendar shows day names.</para>
</refsect3></refsect2>
<refsect2 id="gtk-calendar-set-show-day-names" role="function">
<title>gtk_calendar_set_show_day_names&#160;()</title>
<indexterm zone="gtk-calendar-set-show-day-names"><primary>gtk_calendar_set_show_day_names</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_calendar_set_show_day_names (<parameter><link linkend="GtkCalendar"><type>GtkCalendar</type></link> *self</parameter>,
                                 <parameter><link linkend="gboolean"><type>gboolean</type></link> value</parameter>);</programlisting>
<para>Sets whether the calendar shows day names.</para>
<refsect3 id="gtk-calendar-set-show-day-names.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkCalendar"><type>GtkCalendar</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>value</para></entry>
<entry role="parameter_description"><para>Whether to show day names above the day numbers</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-calendar-get-show-heading" role="function">
<title>gtk_calendar_get_show_heading&#160;()</title>
<indexterm zone="gtk-calendar-get-show-heading"><primary>gtk_calendar_get_show_heading</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_calendar_get_show_heading (<parameter><link linkend="GtkCalendar"><type>GtkCalendar</type></link> *self</parameter>);</programlisting>
<para>Returns whether <parameter>self</parameter>
 is currently showing the heading,
i.e. the value of the <link linkend="GtkCalendar--show-heading"><type>“show-heading”</type></link> property.</para>
<para>Return: Whether the calendar is showing a heading.</para>
<refsect3 id="gtk-calendar-get-show-heading.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkCalendar"><type>GtkCalendar</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-calendar-set-show-heading" role="function">
<title>gtk_calendar_set_show_heading&#160;()</title>
<indexterm zone="gtk-calendar-set-show-heading"><primary>gtk_calendar_set_show_heading</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_calendar_set_show_heading (<parameter><link linkend="GtkCalendar"><type>GtkCalendar</type></link> *self</parameter>,
                               <parameter><link linkend="gboolean"><type>gboolean</type></link> value</parameter>);</programlisting>
<para>Sets whether the calendar should show a heading
containing the current year and month as well as
buttons for changing both.</para>
<refsect3 id="gtk-calendar-set-show-heading.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkCalendar"><type>GtkCalendar</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>value</para></entry>
<entry role="parameter_description"><para>Whether to show the heading in the calendar</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-calendar-get-show-week-numbers" role="function">
<title>gtk_calendar_get_show_week_numbers&#160;()</title>
<indexterm zone="gtk-calendar-get-show-week-numbers"><primary>gtk_calendar_get_show_week_numbers</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_calendar_get_show_week_numbers (<parameter><link linkend="GtkCalendar"><type>GtkCalendar</type></link> *self</parameter>);</programlisting>
<para>Returns whether <parameter>self</parameter>
 is showing week numbers right
now, i.e. the value of the <link linkend="GtkCalendar--show-week-numbers"><type>“show-week-numbers”</type></link>
property.</para>
<para>Return: Whether the calendar is showing week numbers.</para>
<refsect3 id="gtk-calendar-get-show-week-numbers.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkCalendar"><type>GtkCalendar</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-calendar-set-show-week-numbers" role="function">
<title>gtk_calendar_set_show_week_numbers&#160;()</title>
<indexterm zone="gtk-calendar-set-show-week-numbers"><primary>gtk_calendar_set_show_week_numbers</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_calendar_set_show_week_numbers (<parameter><link linkend="GtkCalendar"><type>GtkCalendar</type></link> *self</parameter>,
                                    <parameter><link linkend="gboolean"><type>gboolean</type></link> value</parameter>);</programlisting>
<para>Sets whether week numbers are shown in the calendar.</para>
<refsect3 id="gtk-calendar-set-show-week-numbers.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkCalendar"><type>GtkCalendar</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>value</para></entry>
<entry role="parameter_description"><para>whether to show week numbers on the left of the days</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-calendar-get-date" role="function">
<title>gtk_calendar_get_date&#160;()</title>
<indexterm zone="gtk-calendar-get-date"><primary>gtk_calendar_get_date</primary></indexterm>
<programlisting language="C"><link linkend="GDateTime"><returnvalue>GDateTime</returnvalue></link>&#160;*
gtk_calendar_get_date (<parameter><link linkend="GtkCalendar"><type>GtkCalendar</type></link> *self</parameter>);</programlisting>
<para>Returns a <link linkend="GDateTime"><type>GDateTime</type></link> representing the shown
year, month and the selected day, in the local
time zone.</para>
<refsect3 id="gtk-calendar-get-date.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkCalendar"><type>GtkCalendar</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-calendar-get-date.returns" role="returns">
<title>Returns</title>
<para>the <link linkend="GDate"><type>GDate</type></link> representing
the shown date. </para>
<para><emphasis role="annotation">[<acronym>transfer full</acronym>]</emphasis></para>
</refsect3></refsect2>

</refsect1>
<refsect1 id="GtkCalendar.other_details" role="details">
<title role="details.title">Types and Values</title>
<refsect2 id="GtkCalendar-struct" role="struct">
<title>GtkCalendar</title>
<indexterm zone="GtkCalendar-struct"><primary>GtkCalendar</primary></indexterm>
<programlisting language="C">typedef struct _GtkCalendar GtkCalendar;</programlisting>
</refsect2>

</refsect1>
<refsect1 id="GtkCalendar.property-details" role="property_details">
<title role="property_details.title">Property Details</title>
<refsect2 id="GtkCalendar--day" role="property"><title>The <literal>“day”</literal> property</title>
<indexterm zone="GtkCalendar--day"><primary>GtkCalendar:day</primary></indexterm>
<programlisting>  “day”                      <link linkend="gint"><type>gint</type></link></programlisting>
<para>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.</para>
<para>Owner: GtkCalendar</para>
<para>Flags: Read / Write</para>
<para>Allowed values: [0,31]</para>
<para>Default value: 0</para>
</refsect2>
<refsect2 id="GtkCalendar--month" role="property"><title>The <literal>“month”</literal> property</title>
<indexterm zone="GtkCalendar--month"><primary>GtkCalendar:month</primary></indexterm>
<programlisting>  “month”                    <link linkend="gint"><type>gint</type></link></programlisting>
<para>The selected month (as a number between 0 and 11).
This property gets initially set to the current month.</para>
<para>Owner: GtkCalendar</para>
<para>Flags: Read / Write</para>
<para>Allowed values: [0,11]</para>
<para>Default value: 0</para>
</refsect2>
<refsect2 id="GtkCalendar--show-day-names" role="property"><title>The <literal>“show-day-names”</literal> property</title>
<indexterm zone="GtkCalendar--show-day-names"><primary>GtkCalendar:show-day-names</primary></indexterm>
<programlisting>  “show-day-names”           <link linkend="gboolean"><type>gboolean</type></link></programlisting>
<para>Determines whether day names are displayed.</para>
<para>Owner: GtkCalendar</para>
<para>Flags: Read / Write</para>
<para>Default value: TRUE</para>
</refsect2>
<refsect2 id="GtkCalendar--show-heading" role="property"><title>The <literal>“show-heading”</literal> property</title>
<indexterm zone="GtkCalendar--show-heading"><primary>GtkCalendar:show-heading</primary></indexterm>
<programlisting>  “show-heading”             <link linkend="gboolean"><type>gboolean</type></link></programlisting>
<para>Determines whether a heading is displayed.</para>
<para>Owner: GtkCalendar</para>
<para>Flags: Read / Write</para>
<para>Default value: TRUE</para>
</refsect2>
<refsect2 id="GtkCalendar--show-week-numbers" role="property"><title>The <literal>“show-week-numbers”</literal> property</title>
<indexterm zone="GtkCalendar--show-week-numbers"><primary>GtkCalendar:show-week-numbers</primary></indexterm>
<programlisting>  “show-week-numbers”        <link linkend="gboolean"><type>gboolean</type></link></programlisting>
<para>Determines whether week numbers are displayed.</para>
<para>Owner: GtkCalendar</para>
<para>Flags: Read / Write</para>
<para>Default value: FALSE</para>
</refsect2>
<refsect2 id="GtkCalendar--year" role="property"><title>The <literal>“year”</literal> property</title>
<indexterm zone="GtkCalendar--year"><primary>GtkCalendar:year</primary></indexterm>
<programlisting>  “year”                     <link linkend="gint"><type>gint</type></link></programlisting>
<para>The selected year.
This property gets initially set to the current year.</para>
<para>Owner: GtkCalendar</para>
<para>Flags: Read / Write</para>
<para>Allowed values: [1,9999]</para>
<para>Default value: 1</para>
</refsect2>

</refsect1>
<refsect1 id="GtkCalendar.signal-details" role="signals">
<title role="signals.title">Signal Details</title>
<refsect2 id="GtkCalendar-day-selected" role="signal"><title>The <literal>“day-selected”</literal> signal</title>
<indexterm zone="GtkCalendar-day-selected"><primary>GtkCalendar::day-selected</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkCalendar"><type>GtkCalendar</type></link> *calendar,
               <link linkend="gpointer"><type>gpointer</type></link>     user_data)</programlisting>
<para>Emitted when the user selects a day.</para>
<refsect3 id="GtkCalendar-day-selected.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>calendar</para></entry>
<entry role="parameter_description"><para>the object which received the signal.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-RUN-FIRST:CAPS">Run First</link></para>
</refsect2><refsect2 id="GtkCalendar-next-month" role="signal"><title>The <literal>“next-month”</literal> signal</title>
<indexterm zone="GtkCalendar-next-month"><primary>GtkCalendar::next-month</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkCalendar"><type>GtkCalendar</type></link> *calendar,
               <link linkend="gpointer"><type>gpointer</type></link>     user_data)</programlisting>
<para>Emitted when the user switched to the next month.</para>
<refsect3 id="GtkCalendar-next-month.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>calendar</para></entry>
<entry role="parameter_description"><para>the object which received the signal.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-RUN-FIRST:CAPS">Run First</link></para>
</refsect2><refsect2 id="GtkCalendar-next-year" role="signal"><title>The <literal>“next-year”</literal> signal</title>
<indexterm zone="GtkCalendar-next-year"><primary>GtkCalendar::next-year</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkCalendar"><type>GtkCalendar</type></link> *calendar,
               <link linkend="gpointer"><type>gpointer</type></link>     user_data)</programlisting>
<para>Emitted when user switched to the next year.</para>
<refsect3 id="GtkCalendar-next-year.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>calendar</para></entry>
<entry role="parameter_description"><para>the object which received the signal.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-RUN-FIRST:CAPS">Run First</link></para>
</refsect2><refsect2 id="GtkCalendar-prev-month" role="signal"><title>The <literal>“prev-month”</literal> signal</title>
<indexterm zone="GtkCalendar-prev-month"><primary>GtkCalendar::prev-month</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkCalendar"><type>GtkCalendar</type></link> *calendar,
               <link linkend="gpointer"><type>gpointer</type></link>     user_data)</programlisting>
<para>Emitted when the user switched to the previous month.</para>
<refsect3 id="GtkCalendar-prev-month.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>calendar</para></entry>
<entry role="parameter_description"><para>the object which received the signal.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-RUN-FIRST:CAPS">Run First</link></para>
</refsect2><refsect2 id="GtkCalendar-prev-year" role="signal"><title>The <literal>“prev-year”</literal> signal</title>
<indexterm zone="GtkCalendar-prev-year"><primary>GtkCalendar::prev-year</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkCalendar"><type>GtkCalendar</type></link> *calendar,
               <link linkend="gpointer"><type>gpointer</type></link>     user_data)</programlisting>
<para>Emitted when user switched to the previous year.</para>
<refsect3 id="GtkCalendar-prev-year.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>calendar</para></entry>
<entry role="parameter_description"><para>the object which received the signal.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-RUN-FIRST:CAPS">Run First</link></para>
</refsect2>
</refsect1>

</refentry>
