HdyPreferencesWindow

HdyPreferencesWindow — A window to present an application's preferences.

Functions

Properties

gboolean can-swipe-back Read / Write
gboolean search-enabled Read / Write

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GtkWidget
            ╰── GtkContainer
                ╰── GtkBin
                    ╰── GtkWindow
                        ╰── HdyWindow
                            ╰── HdyPreferencesWindow

Implemented Interfaces

HdyPreferencesWindow implements AtkImplementorIface and GtkBuildable.

Description

The HdyPreferencesWindow widget presents an application's preferences gathered into pages and groups. The preferences are searchable by the user.

Functions

hdy_preferences_window_new ()

GtkWidget *
hdy_preferences_window_new (void);

Creates a new HdyPreferencesWindow.

Returns

a new HdyPreferencesWindow

Since: 0.0.10


hdy_preferences_window_get_search_enabled ()

gboolean
hdy_preferences_window_get_search_enabled
                               (HdyPreferencesWindow *self);

Gets whether search is enabled for self .

Parameters

Returns

whether search is enabled for self .

Since: 1.0


hdy_preferences_window_set_search_enabled ()

void
hdy_preferences_window_set_search_enabled
                               (HdyPreferencesWindow *self,
                                gboolean search_enabled);

Sets whether search is enabled for self .

Parameters

self

a HdyPreferencesWindow

 

search_enabled

TRUE to enable search, FALSE to disable it

 

Since: 1.0


hdy_preferences_window_get_can_swipe_back ()

gboolean
hdy_preferences_window_get_can_swipe_back
                               (HdyPreferencesWindow *self);

Returns whether or not self allows switching from a subpage to the preferences via a swipe gesture.

Parameters

Returns

TRUE if back swipe is enabled.

Since: 1.0


hdy_preferences_window_set_can_swipe_back ()

void
hdy_preferences_window_set_can_swipe_back
                               (HdyPreferencesWindow *self,
                                gboolean can_swipe_back);

Sets whether or not self allows switching from a subpage to the preferences via a swipe gesture.

Parameters

self

a HdyPreferencesWindow

 

can_swipe_back

the new value

 

Since: 1.0


hdy_preferences_window_present_subpage ()

void
hdy_preferences_window_present_subpage
                               (HdyPreferencesWindow *self,
                                GtkWidget *subpage);

Sets subpage as the window's subpage and present it. The transition can be cancelled by the user, in which case visible child will change back to the previously visible child.

Parameters

self

a HdyPreferencesWindow

 

subpage

the subpage

 

Since: 1.0


hdy_preferences_window_close_subpage ()

void
hdy_preferences_window_close_subpage (HdyPreferencesWindow *self);

Closes the current subpage to return back to the preferences, if there is no presented subpage, this does nothing.

Parameters

Since: 1.0

Types and Values

HDY_TYPE_PREFERENCES_WINDOW

#define HDY_TYPE_PREFERENCES_WINDOW (hdy_preferences_window_get_type())

struct HdyPreferencesWindowClass

struct HdyPreferencesWindowClass {
  HdyWindowClass parent_class;
};

Members


HdyPreferencesWindow

typedef struct _HdyPreferencesWindow HdyPreferencesWindow;

Property Details

The “can-swipe-back” property

  “can-swipe-back”           gboolean

Whether or not the window allows closing the subpage via a swipe gesture.

Flags: Read / Write

Default value: FALSE

Since: 1.0


The “search-enabled” property

  “search-enabled”           gboolean

Whether search is enabled.

Flags: Read / Write

Default value: TRUE

Since: 1.0