XAppPreferencesWindow

XAppPreferencesWindow — A base preferences window

Functions

Signals

void close Action

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GtkWidget
            ╰── GtkContainer
                ╰── GtkBin
                    ╰── GtkWindow
                        ╰── XAppPreferencesWindow

Implemented Interfaces

XAppPreferencesWindow implements AtkImplementorIface and GtkBuildable.

Description

The XAppPreferencesWindow sets up a simple dialog window with a GtkStack, GtkSidebarSwitcher, and GtkActionBar. The stack switcher and action bar only show when needed.

Functions

xapp_preferences_window_new ()

XAppPreferencesWindow *
xapp_preferences_window_new (void);

Creates a new XAppPreferencesWindow.

Returns

a newly created XAppPreferencesWindow


xapp_preferences_window_add_page ()

void
xapp_preferences_window_add_page (XAppPreferencesWindow *window,
                                  GtkWidget *widget,
                                  const gchar *name,
                                  const gchar *title);

Adds a page to the window. The page is identified by name. The title will be used in the sidebar so should be short. The sidebar will show automatically once at least two pages are added.

Parameters

window

a XAppPreferencesWindow

 

widget

a GtkWidget to add

 

name

the name for the page

 

title

a human-readable title for the page

 

xapp_preferences_window_add_button ()

void
xapp_preferences_window_add_button (XAppPreferencesWindow *window,
                                    GtkWidget *button,
                                    GtkPackType pack_type);

Adds a button to the bottom action bar of the window. Where the button is place will be determined by the GtkPackType. The action bar will show automatically once at least one button is added.

Parameters

window

a XAppPreferencesWindow

 

button

a GtkWidget to add

 

pack_type

a GtkPackType to use

 

Types and Values

XAPP_TYPE_PREFERENCES_WINDOW

#define XAPP_TYPE_PREFERENCES_WINDOW (xapp_preferences_window_get_type ())

struct XAppPreferencesWindowClass

struct XAppPreferencesWindowClass {
    GtkWindowClass parent_class;

    /* Keybinding signals */
    void (* close) (XAppPreferencesWindow *window);
};

XAppPreferencesWindow

typedef struct _XAppPreferencesWindow XAppPreferencesWindow;

Signal Details

The “close” signal

void
user_function (XAppPreferencesWindow *xapppreferenceswindow,
               gpointer               user_data)

Flags: Action