| Epiphany Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Properties | Signals | ||||
EphyDialogEphyDialog — A customized GtkDialog for Epiphany |
EphyDialog; EphyDialogProperty; enum EphyDialogApplyType; EphyDialog * ephy_dialog_new (void); EphyDialog * ephy_dialog_new_with_parent (GtkWidget *parent_window); void ephy_dialog_construct (EphyDialog *dialog,const EphyDialogProperty *properties,const char *file,const char *name,const char *domain); void ephy_dialog_add_enum (EphyDialog *dialog,const char *property_id,guint n_items,const char * const *items); void ephy_dialog_set_data_column (EphyDialog *dialog,const char *property_id,int column); void ephy_dialog_set_size_group (EphyDialog *dialog,const char *first_id,...); int ephy_dialog_run (EphyDialog *dialog); void ephy_dialog_show (EphyDialog *dialog); void ephy_dialog_hide (EphyDialog *dialog); void ephy_dialog_set_parent (EphyDialog *dialog,GtkWidget *parent); GtkWidget * ephy_dialog_get_parent (EphyDialog *dialog); void ephy_dialog_set_modal (EphyDialog *dialog,gboolean is_modal); GtkWidget * ephy_dialog_get_control (EphyDialog *dialog,const char *property_id); void ephy_dialog_get_controls (EphyDialog *dialog,const char *first_id,...); gboolean ephy_dialog_get_value (EphyDialog *dialog,const char *property_id,GValue *value); void ephy_dialog_set_value (EphyDialog *dialog,const char *property_id,const GValue *value); void ephy_dialog_set_pref (EphyDialog *dialog,const char *property_id,const char *pref);
"default-height" gint : Read / Write / Construct Only "default-width" gint : Read / Write / Construct Only "modal" gboolean : Read / Write "parent-window" GtkWindow* : Read / Write "persist-position" gboolean : Read / Write / Construct Only
typedef struct {
const char *id;
const char *pref;
EphyDialogApplyType apply_type;
GType data_type;
} EphyDialogProperty;
typedef enum
{
PT_NORMAL = 0,
PT_AUTOAPPLY = 1 << 0,
PT_INVERTED = 1 << 1
} EphyDialogApplyType;
EphyDialog * ephy_dialog_new (void);
Creates a new EphyDialog.
Returns : |
a new EphyDialog |
EphyDialog * ephy_dialog_new_with_parent (GtkWidget *parent_window);
Creates a new EphyDialog with parent_window as its parent.
|
a window to be parent of the new dialog |
Returns : |
a new EphyDialog |
void ephy_dialog_construct (EphyDialog *dialog,const EphyDialogProperty *properties,const char *file,const char *name,const char *domain);
Constructs the widget part of dialog using the widget identified by name
in the GtkBuilder file found at file. Fills the dialog properties with
properties and sets translation domain to domain.
|
an EphyDialog |
|
an array of EphyDialogProperty elements |
|
the path to a GtkBuilder file |
|
name of the widget to use for dialog, found in file
|
|
translation domain to set for dialog
|
void ephy_dialog_add_enum (EphyDialog *dialog,const char *property_id,guint n_items,const char * const *items);
Modifies the property identified by property_id in dialog to have its
string_enum member set to a GList constructed with the elements given as
items.
|
an EphyDialog |
|
string identifier of the property to modify |
|
length of items array
|
|
array of items to add to property_id
|
void ephy_dialog_set_data_column (EphyDialog *dialog,const char *property_id,int column);
Sets the data_col member of the property identified by property_id in dialog
to column.
|
an EphyDialog |
|
string identifier of the property to modify |
|
value for the data_col member of property_id
|
void ephy_dialog_set_size_group (EphyDialog *dialog,const char *first_id,...);
Put first_id and Varargs widgets into the same GtkSizeGroup.
Note that this are all widgets inside dialog.
|
an EphyDialog |
|
id of a widget in dialog
|
|
a NULL-terminated list of widget ids
|
int ephy_dialog_run (EphyDialog *dialog);
Runs gtk_dialog_run on dialog and waits for a response.
|
an EphyDialog |
Returns : |
the user response to gtk_dialog_run or 0 if dialog is not valid
|
void ephy_dialog_show (EphyDialog *dialog);
Shows dialog on screen.
|
an EphyDialog |
void ephy_dialog_hide (EphyDialog *dialog);
Calls gtk_widget_hide on dialog.
|
an EphyDialog |
void ephy_dialog_set_parent (EphyDialog *dialog,GtkWidget *parent);
Sets parent as the parent-window of dialog.
|
an EphyDialog |
|
new parent for dialog
|
GtkWidget * ephy_dialog_get_parent (EphyDialog *dialog);
Gets dialog's parent-window.
|
an EphyDialog |
Returns : |
the parent-window of dialog. [transfer none]
|
void ephy_dialog_set_modal (EphyDialog *dialog,gboolean is_modal);
Sets dialog to be modal or not.
|
an EphyDialog |
|
TRUE to make dialog modal
|
GtkWidget * ephy_dialog_get_control (EphyDialog *dialog,const char *property_id);
Gets the internal widget corresponding to property_id from dialog.
|
an EphyDialog |
|
the string identifier of the requested control |
Returns : |
the GtkWidget corresponding to property_id
or NULL. [transfer none]
|
void ephy_dialog_get_controls (EphyDialog *dialog,const char *first_id,...);
Gets the requested controls according to given property-store_location pairs. Properties are given as strings (const char *), controls are returned as GtkWidget elements. Rename to: ephy_dialog_get_controls
|
an EphyDialog |
|
identifier of the requested control |
|
a NULL terminated list of extra pairs of properties as const char
and store locations as GtkWidgets.
|
gboolean ephy_dialog_get_value (EphyDialog *dialog,const char *property_id,GValue *value);
Gets the value of property_id and stores it in value.
|
an EphyDialog |
|
property name |
|
location to store the value of property_id. [out]
|
Returns : |
TRUE if the operation was successful
|
void ephy_dialog_set_value (EphyDialog *dialog,const char *property_id,const GValue *value);
Sets the property identified by property_id to value in dialog.
|
an EphyDialog |
|
dialog property to set
|
|
value to set property_id to
|
void ephy_dialog_set_pref (EphyDialog *dialog,const char *property_id,const char *pref);
Sets the pref member of the property of dialog identified by property_id
to pref.
|
an EphyDialog |
|
string identifier of the property to modify |
|
preference value of the property identified by property_id
|
"default-height" property"default-height" gint : Read / Write / Construct Only
The dialog default height.
Allowed values: >= G_MAXULONG
Default value: -1
"default-width" property"default-width" gint : Read / Write / Construct Only
The dialog default width.
Allowed values: >= G_MAXULONG
Default value: -1
"modal" property"modal" gboolean : Read / Write
Whether the dialog is or not modal.
Default value: FALSE
"persist-position" property"persist-position" gboolean : Read / Write / Construct Only
If dialog position should be persistent.
Default value: FALSE
"changed" signalvoid user_function (EphyDialog *dialog, gpointer value, gpointer user_data) : Run First / Has Details
Emitted everytime a child widget of the dialog has its changed or clicked signal emitted.
|
the object on which the signal is emitted |
|
new value of the modified widget, as a GValue |
|
user data set when the signal handler was connected. |