Base GTK GUI functions

Base GTK GUI functions

Synopsis

void                nntpgrab_gui_base_create_ui         (const char *interface_filename);
void                nntpgrab_gui_base_destroy_ui        (void);
int                 nntpgrab_gui_base_dialog_show       (GtkWidget *parent,
                                                         const char *message,
                                                         GtkMessageType msg_type,
                                                         GtkButtonsType btn_type);
GObject *           nntpgrab_gui_base_get_object        (const char *name);
GtkWidget *         nntpgrab_gui_base_get_widget        (const char *name);
void                nntpgrab_gui_base_tray_create       (void);
void                nntpgrab_gui_base_tray_destroy      (void);
GtkStatusIcon *     nntpgrab_gui_base_tray_get_status_icon
                                                        (void);
gboolean            nntpgrab_gui_base_tray_icon_get_is_shown
                                                        (void);

Description

Details

nntpgrab_gui_base_create_ui ()

void                nntpgrab_gui_base_create_ui         (const char *interface_filename);

Build a user interface based on the .glade or (GtkBuilder) .ui file pointed to by interface_filename

interface_filename :

The location of the interface file without the extension

nntpgrab_gui_base_destroy_ui ()

void                nntpgrab_gui_base_destroy_ui        (void);

Destroy the loaded user interface


nntpgrab_gui_base_dialog_show ()

int                 nntpgrab_gui_base_dialog_show       (GtkWidget *parent,
                                                         const char *message,
                                                         GtkMessageType msg_type,
                                                         GtkButtonsType btn_type);

Show a notification dialog

parent :

Parent window

message :

The message which needs to be shown

msg_type :

The type of the message (info/warning/error)

btn_type :

The type of buttons which need to be shown in the dialog

nntpgrab_gui_base_get_object ()

GObject *           nntpgrab_gui_base_get_object        (const char *name);

Look up an object in the user interface and return a pointer to it

name :

The name of the object which needs to be looked up

Returns :

Pointer to the object with the given name of NULL if the object could not be found. allow-none.

nntpgrab_gui_base_get_widget ()

GtkWidget *         nntpgrab_gui_base_get_widget        (const char *name);

Look up a widget in the user interface and return a pointer to it

name :

The name of the widget which needs to be looked up

Returns :

Pointer to the widget with the given name or NULL if the widget could not be found. allow-none.

nntpgrab_gui_base_tray_create ()

void                nntpgrab_gui_base_tray_create       (void);

Create a tray icon


nntpgrab_gui_base_tray_destroy ()

void                nntpgrab_gui_base_tray_destroy      (void);

Destroy a tray icon


nntpgrab_gui_base_tray_get_status_icon ()

GtkStatusIcon *     nntpgrab_gui_base_tray_get_status_icon
                                                        (void);

Return a pointer to a GtkStatusIcon

Returns :

a GtkStatusIcon

nntpgrab_gui_base_tray_icon_get_is_shown ()

gboolean            nntpgrab_gui_base_tray_icon_get_is_shown
                                                        (void);

Indicate whether a tray icon is being shown at the moment

Returns :

TRUE if the tray icon is being shown