Helper

Helper — A list of helper functions

Synopsis


#include <ogmrip-source-chooser.h>


#define             GTK_BOX_CHILD                       (b)
#define             OGMRIP_ERROR
gchar*              g_get_locale                        (gint category);
void                gtk_window_set_parent               (GtkWindow *window,
                                                         GtkWindow *parent);
void                gtk_window_set_icon_from_stock      (GtkWindow *window,
                                                         const gchar *stock_id);
GtkWidget*          gtk_button_new_with_image           (const gchar *text,
                                                         const gchar *stock_id);
gint                gtk_radio_button_get_active         (GtkRadioButton *radio);
void                gtk_radio_button_set_active         (GtkRadioButton *radio,
                                                         guint index);
gboolean            gtk_tree_model_iter_prev            (GtkTreeModel *tree_model,
                                                         GtkTreeIter *iter);
void                gtk_label_set_int                   (GtkLabel *label,
                                                         gint value);
gint                gtk_label_get_int                   (GtkLabel *label);
GtkWidget*          gtk_box_get_nth_child               (GtkBox *box,
                                                         gint n);
GtkWidget*          ogmrip_message_dialog_new           (GtkWindow *parent,
                                                         GtkMessageType type,
                                                         const gchar *format,
                                                         ...);
gint                ogmrip_message_dialog               (GtkWindow *parent,
                                                         GtkMessageType type,
                                                         const gchar *format,
                                                         ...);

Description

Details

GTK_BOX_CHILD()

#define GTK_BOX_CHILD(b) ((GtkBoxChild *) (b))

b :

OGMRIP_ERROR

#define OGMRIP_ERROR ogmrip_error_quark ()


g_get_locale ()

gchar*              g_get_locale                        (gint category);

Returns the active source and its type.

category : A pointer to store the type of the chooser
Returns : The active OGMRipSource

gtk_window_set_parent ()

void                gtk_window_set_parent               (GtkWindow *window,
                                                         GtkWindow *parent);

Sets a parent window for a window. This is equivalent to calling gtk_window_set_transient_for(), gtk_window_set_position(), gtk_window_set_gravity(), and gtk_window_set_destroy_with_parent() on window.

window : A GtkWindow
parent : The parent window

gtk_window_set_icon_from_stock ()

void                gtk_window_set_icon_from_stock      (GtkWindow *window,
                                                         const gchar *stock_id);

Sets the icon of window from a stock item.

window : A GtkWindow
stock_id : the name of the stock item

gtk_button_new_with_image ()

GtkWidget*          gtk_button_new_with_image           (const gchar *text,
                                                         const gchar *stock_id);

Creates a new GtkButton containing the given text and the image from a stock item.

text : The text you want the GtkLabel to hold
stock_id : the name of the stock item
Returns : A new GtkButton

gtk_radio_button_get_active ()

gint                gtk_radio_button_get_active         (GtkRadioButton *radio);

Returns the index of the active GtkRadioButton.

radio : Any GtkRadioButton of the group
Returns : An integer, or -1

gtk_radio_button_set_active ()

void                gtk_radio_button_set_active         (GtkRadioButton *radio,
                                                         guint index);

Sets the active item of the radio group.

radio : Any GtkRadioButton of the group
index : The index of the active item

gtk_tree_model_iter_prev ()

gboolean            gtk_tree_model_iter_prev            (GtkTreeModel *tree_model,
                                                         GtkTreeIter *iter);

Sets iter to point to the node preceding it at the current level. If there is no previous iter, FALSE is returned and iter is set to be invalid.

tree_model : A GtkTreeModel
iter : The GtkTreeIter
Returns : TRUE, if iter has been changed to the previous node

gtk_label_set_int ()

void                gtk_label_set_int                   (GtkLabel *label,
                                                         gint value);

Sets the value of a GtkLabel widget.

label : A GtkLabel
value : An integer

gtk_label_get_int ()

gint                gtk_label_get_int                   (GtkLabel *label);

Gets the value of the label represented as an integer.

label : A GtkLabel
Returns : The value of the label widget

gtk_box_get_nth_child ()

GtkWidget*          gtk_box_get_nth_child               (GtkBox *box,
                                                         gint n);

Returns the n'th item in box.

box : A GtkBox
n : The index of the desired child
Returns : The nth GtkWidget, or NULL

ogmrip_message_dialog_new ()

GtkWidget*          ogmrip_message_dialog_new           (GtkWindow *parent,
                                                         GtkMessageType type,
                                                         const gchar *format,
                                                         ...);

Creates a new message dialog, which is a simple dialog with an icon indicating the dialog type (error, warning, etc.) and some text the user may want to see.

parent : A GtkWindow
type : A GtkMessageType
format : printf()-style format string, or NULL
... : Arguments for format
Returns : A new GtkMessageDialog

ogmrip_message_dialog ()

gint                ogmrip_message_dialog               (GtkWindow *parent,
                                                         GtkMessageType type,
                                                         const gchar *format,
                                                         ...);

Creates and displays a new message dialog, which is a simple dialog with an icon indicating the dialog type (error, warning, etc.) and some text the user may want to see.

parent : A GtkWindow
type : A GtkMessageType
format : printf()-style format string, or NULL
... : Arguments for format
Returns : The response ID