GtdWindow: GNOME To Do - Reference Manual

## GtdWindow GtdWindow — main window |

## Stability Level

Unstable, unless otherwise indicated

## Functions

GtkWidget * | gtd_window_new ()
GtdManager * | gtd_window_get_manager ()
void | gtd_window_notify ()
void | gtd_window_cancel_notification ()
GtdWindowMode | gtd_window_get_mode ()
void | gtd_window_set_mode ()
void | gtd_window_set_custom_title ()

## Properties

GtdWindowMode | mode | Read / Write

## Types and Values

#define | GTD_TYPE_WINDOW
| GtdWindow

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GtkWidget
                ╰── GtkContainer
                    ╰── GtkBin
                        ╰── GtkWindow
                            ╰── GtkApplicationWindow
                                ╰── GtdWindow

## Implemented Interfaces

GtdWindow implements AtkImplementorIface, GtkBuildable, GActionGroup and GActionMap.

## Description

The GtdWindow is the main application window of GNOME To Do. Objects should use this class to send notifications (see `gtd_window_notify()`), cancel notifications (see `gtd_window_cancel_notification()`), change between selection and normal mode and fine-tune the headerbar.

## Functions

### gtd_window_new ()

    GtkWidget *
    gtd_window_new (GtdApplication *application);

### gtd_window_get_manager ()

    GtdManager *
    gtd_window_get_manager (GtdWindow *window);

### gtd_window_notify ()

    void
    gtd_window_notify (GtdWindow *window,
                       GtdNotification *notification);

Shows a notification on the top of the main window.

#### Parameters

window | a GtdWindow |
notification | a GtdNotification |

### gtd_window_cancel_notification ()

    void
    gtd_window_cancel_notification (GtdWindow *window,
                                    GtdNotification *notification);

Cancels `notification` .

#### Parameters

window | a GtdManager |
notification | a GtdNotification |

### gtd_window_get_mode ()

    GtdWindowMode
    gtd_window_get_mode (GtdWindow *window);

Retrieves the current mode of `window` .

#### Parameters

window | a GtdWindow |

#### Returns

the “mode” property value

### gtd_window_set_mode ()

    void
    gtd_window_set_mode (GtdWindow *window,
                         GtdWindowMode mode);

Sets the current window mode to `mode` .

#### Parameters

window | a GtdWindow |
mode | a GtdWindowMode |

### gtd_window_set_custom_title ()

    void
    gtd_window_set_custom_title (GtdWindow *window,
                                 const gchar *title,
                                 const gchar *subtitle);

Sets the GtdWindow's headerbar title and subtitle. If `title` is `NULL`, the header will be set to the stack switcher.

#### Parameters

window | a GtdWindow |
title | the GtkHeaderBar title. | [nullable]
subtitle | the GtkHeaderBar subtitle. | [nullable]

## Types and Values

### GTD_TYPE_WINDOW

    #define GTD_TYPE_WINDOW (gtd_window_get_type())

### GtdWindow

    typedef struct _GtdWindow GtdWindow;

## Property Details

### The `“mode”` property

      “mode”                     GtdWindowMode

The interaction mode of the window.

Flags: Read / Write

Default value: GTD_WINDOW_MODE_NORMAL

## See Also

GtdNotification