GtkChineseCalendar

GtkChineseCalendar —

Synopsis




                    GtkChineseCalendarPrivate;
enum                GtkChineseCalendarDisplayOptions;
                    GtkChineseCalendar;
GtkWidget*          gtk_chinese_calendar_new            (void);
gboolean            gtk_chinese_calendar_select_month   (GtkChineseCalendar *calendar,
                                                         guint month,
                                                         guint year);
void                gtk_chinese_calendar_select_day     (GtkChineseCalendar *calendar,
                                                         guint day);
gboolean            gtk_chinese_calendar_mark_day       (GtkChineseCalendar *calendar,
                                                         guint day);
gboolean            gtk_chinese_calendar_unmark_day     (GtkChineseCalendar *calendar,
                                                         guint day);
void                gtk_chinese_calendar_clear_marks    (GtkChineseCalendar *calendar);
void                gtk_chinese_calendar_set_display_options
                                                        (GtkChineseCalendar *calendar,
                                                         GtkChineseCalendarDisplayOptions flags);
GtkChineseCalendarDisplayOptions gtk_chinese_calendar_get_display_options
                                                        (GtkChineseCalendar *calendar);
void                gtk_chinese_calendar_display_options
                                                        (GtkChineseCalendar *calendar,
                                                         GtkChineseCalendarDisplayOptions flags);
void                gtk_chinese_calendar_get_date       (GtkChineseCalendar *calendar,
                                                         guint *year,
                                                         guint *month,
                                                         guint *day);
void                gtk_chinese_calendar_freeze         (GtkChineseCalendar *calendar);
void                gtk_chinese_calendar_thaw           (GtkChineseCalendar *calendar);

Object Hierarchy


  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkChineseCalendar

Implemented Interfaces

GtkChineseCalendar implements AtkImplementorIface.

Properties


  "day"                      gint                  : Read / Write
  "month"                    gint                  : Read / Write
  "no-month-change"          gboolean              : Read / Write
  "show-day-names"           gboolean              : Read / Write
  "show-heading"             gboolean              : Read / Write
  "show-lunar-date"          gboolean              : Read / Write
  "show-week-numbers"        gboolean              : Read / Write
  "year"                     gint                  : Read / Write

Signals


  "day-selected"                                   : Run First
  "day-selected-double-click"                      : Run First
  "month-changed"                                  : Run First
  "next-month"                                     : Run First
  "next-year"                                      : Run First
  "prev-month"                                     : Run First
  "prev-year"                                      : Run First

Description

Details

GtkChineseCalendarPrivate

typedef struct _GtkChineseCalendarPrivate GtkChineseCalendarPrivate;


enum GtkChineseCalendarDisplayOptions

typedef enum
{
  GTK_CHINESE_CALENDAR_SHOW_HEADING		= 1 << 0,
  GTK_CHINESE_CALENDAR_SHOW_DAY_NAMES		= 1 << 1,
  GTK_CHINESE_CALENDAR_NO_MONTH_CHANGE		= 1 << 2,
  GTK_CHINESE_CALENDAR_SHOW_WEEK_NUMBERS	= 1 << 3,
  GTK_CHINESE_CALENDAR_WEEK_START_MONDAY	= 1 << 4,
  GTK_CHINESE_CALENDAR_SHOW_LUNAR_DATE          = 1 << 5
} GtkChineseCalendarDisplayOptions;


GtkChineseCalendar

typedef struct _GtkChineseCalendar GtkChineseCalendar;


gtk_chinese_calendar_new ()

GtkWidget*          gtk_chinese_calendar_new            (void);

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

Returns : a newly GtkChineseCalendar widget

gtk_chinese_calendar_select_month ()

gboolean            gtk_chinese_calendar_select_month   (GtkChineseCalendar *calendar,
                                                         guint month,
                                                         guint year);

Shifts the calendar to a different month.

calendar : a GtkChineseCalendar
month : a month number between 0 and 11.
year : the year the month is in.
Returns : TRUE, always

gtk_chinese_calendar_select_day ()

void                gtk_chinese_calendar_select_day     (GtkChineseCalendar *calendar,
                                                         guint day);

Selects a day from the current month.

calendar : a GtkChineseCalendar.
day : the day number between 1 and 31, or 0 to unselect the currently selected day.

gtk_chinese_calendar_mark_day ()

gboolean            gtk_chinese_calendar_mark_day       (GtkChineseCalendar *calendar,
                                                         guint day);

Places a visual marker on a particular day.

calendar : a GtkChineseCalendar
day : the day number to mark between 1 and 31.
Returns : TRUE, always

gtk_chinese_calendar_unmark_day ()

gboolean            gtk_chinese_calendar_unmark_day     (GtkChineseCalendar *calendar,
                                                         guint day);

Removes the visual marker from a particular day.

calendar : a GtkChineseCalendar.
day : the day number to unmark between 1 and 31.
Returns : TRUE, always

gtk_chinese_calendar_clear_marks ()

void                gtk_chinese_calendar_clear_marks    (GtkChineseCalendar *calendar);

Remove all visual markers.

calendar : a GtkChineseCalendar

gtk_chinese_calendar_set_display_options ()

void                gtk_chinese_calendar_set_display_options
                                                        (GtkChineseCalendar *calendar,
                                                         GtkChineseCalendarDisplayOptions flags);

Sets display options (whether to display the heading and the month headings).

calendar : a GtkChineseCalendar
flags : the display options to set

Since 2.4


gtk_chinese_calendar_get_display_options ()

GtkChineseCalendarDisplayOptions gtk_chinese_calendar_get_display_options
                                                        (GtkChineseCalendar *calendar);

Returns the current display options of calendar.

calendar : a GtkChineseCalendar
Returns : the display options.

Since 2.4


gtk_chinese_calendar_display_options ()

void                gtk_chinese_calendar_display_options
                                                        (GtkChineseCalendar *calendar,
                                                         GtkChineseCalendarDisplayOptions flags);

Warning

gtk_chinese_calendar_display_options has been deprecated since version 2.4 and should not be used in newly-written code. Use gtk_chinese_calendar_set_display_options() instead

Sets display options (whether to display the heading and the month headings).

calendar : a GtkChineseCalendar.
flags : the display options to set.

gtk_chinese_calendar_get_date ()

void                gtk_chinese_calendar_get_date       (GtkChineseCalendar *calendar,
                                                         guint *year,
                                                         guint *month,
                                                         guint *day);

Obtains the selected date from a GtkChineseCalendar.

calendar : a GtkChineseCalendar
year : location to store the year number, or NULL
month : location to store the month number (between 0 and 11), or NULL
day : location to store the day number (between 1 and 31), or NULL

gtk_chinese_calendar_freeze ()

void                gtk_chinese_calendar_freeze         (GtkChineseCalendar *calendar);

Warning

gtk_chinese_calendar_freeze has been deprecated since version 2.8 and should not be used in newly-written code.

Does nothing. Previously locked the display of the calendar until it was thawed with gtk_chinese_calendar_thaw().

calendar : a GtkChineseCalendar

gtk_chinese_calendar_thaw ()

void                gtk_chinese_calendar_thaw           (GtkChineseCalendar *calendar);

Warning

gtk_chinese_calendar_thaw has been deprecated since version 2.8 and should not be used in newly-written code.

Does nothing. Previously defrosted a calendar; all the changes made since the last gtk_chinese_calendar_freeze() were displayed.

calendar : a GtkChineseCalendar

Property Details

The "day" property

  "day"                      gint                  : Read / Write

The selected day (as a number between 1 and 31, or 0 to unselect the currently selected day).

Allowed values: [0,31]

Default value: 0


The "month" property

  "month"                    gint                  : Read / Write

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

Allowed values: [0,11]

Default value: 0


The "no-month-change" property

  "no-month-change"          gboolean              : Read / Write

Determines whether the selected month can be changed.

Default value: FALSE

Since 2.4


The "show-day-names" property

  "show-day-names"           gboolean              : Read / Write

Determines whether day names are displayed.

Default value: TRUE

Since 2.4


The "show-heading" property

  "show-heading"             gboolean              : Read / Write

Determines whether a heading is displayed.

Default value: TRUE

Since 2.4


The "show-lunar-date" property

  "show-lunar-date"          gboolean              : Read / Write

Determines whether chinese lunar date are displayed.

Default value: FALSE


The "show-week-numbers" property

  "show-week-numbers"        gboolean              : Read / Write

Determines whether week numbers are displayed.

Default value: FALSE

Since 2.4


The "year" property

  "year"                     gint                  : Read / Write

The selected year.

Allowed values: >= 0

Default value: 0

Signal Details

The "day-selected" signal

void                user_function                      (GtkChineseCalendar *chinesecalendar,
                                                        gpointer            user_data)            : Run First

chinesecalendar : the object which received the signal.
user_data : user data set when the signal handler was connected.

The "day-selected-double-click" signal

void                user_function                      (GtkChineseCalendar *chinesecalendar,
                                                        gpointer            user_data)            : Run First

chinesecalendar : the object which received the signal.
user_data : user data set when the signal handler was connected.

The "month-changed" signal

void                user_function                      (GtkChineseCalendar *chinesecalendar,
                                                        gpointer            user_data)            : Run First

chinesecalendar : the object which received the signal.
user_data : user data set when the signal handler was connected.

The "next-month" signal

void                user_function                      (GtkChineseCalendar *chinesecalendar,
                                                        gpointer            user_data)            : Run First

chinesecalendar : the object which received the signal.
user_data : user data set when the signal handler was connected.

The "next-year" signal

void                user_function                      (GtkChineseCalendar *chinesecalendar,
                                                        gpointer            user_data)            : Run First

chinesecalendar : the object which received the signal.
user_data : user data set when the signal handler was connected.

The "prev-month" signal

void                user_function                      (GtkChineseCalendar *chinesecalendar,
                                                        gpointer            user_data)            : Run First

chinesecalendar : the object which received the signal.
user_data : user data set when the signal handler was connected.

The "prev-year" signal

void                user_function                      (GtkChineseCalendar *chinesecalendar,
                                                        gpointer            user_data)            : Run First

chinesecalendar : the object which received the signal.
user_data : user data set when the signal handler was connected.