| midori Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | ||||
#include <midori/midori.h> struct MidoriExtension; struct MidoriExtensionClass;GObject * midori_extension_load_from_file (const,gchar *extension_pathconst,gchar *filename,gboolean activate);gboolean testvoid midori_extension_activate (,GObject *extensionconst,gchar *filename,gboolean activateMidoriApp *app);GObject * midori_extension_activate_gracefully (MidoriApp *app,const,gchar *extension_pathconst,gchar *filename);gboolean activategboolean midori_extension_is_prepared (MidoriExtension *extension);gboolean midori_extension_has_preferences (MidoriExtension *extension);gboolean midori_extension_is_active (MidoriExtension *extension);void midori_extension_deactivate (MidoriExtension *extension); MidoriApp * midori_extension_get_app (MidoriExtension *extension); constgchar * midori_extension_get_config_dir (MidoriExtension *extension);void midori_extension_install_boolean (MidoriExtension *extension,const,gchar *name);gboolean default_valuegboolean midori_extension_get_boolean (MidoriExtension *extension,const);gchar *namevoid midori_extension_set_boolean (MidoriExtension *extension,const,gchar *name);gboolean valuevoid midori_extension_install_integer (MidoriExtension *extension,const,gchar *name);gint default_valuegint midori_extension_get_integer (MidoriExtension *extension,const);gchar *namevoid midori_extension_set_integer (MidoriExtension *extension,const,gchar *name);gint valuevoid midori_extension_install_string (MidoriExtension *extension,const,gchar *nameconst); constgchar *default_valuegchar * midori_extension_get_string (MidoriExtension *extension,const);gchar *namevoid midori_extension_set_string (MidoriExtension *extension,const,gchar *nameconst);gchar *valuevoid midori_extension_install_string_list (MidoriExtension *extension,const,gchar *name,gchar **default_value);gsize default_lengthgchar ** midori_extension_get_string_list (MidoriExtension *extension,const,gchar *name);gsize *lengthvoid midori_extension_set_string_list (MidoriExtension *extension,const,gchar *name,gchar **value);gsize lengthvoid midori_extension_load_from_folder (MidoriApp *app,,gchar **keys);gboolean activate
struct MidoriExtension {
GObject parent_instance;
MidoriExtensionPrivate* priv;
};
GObject * midori_extension_load_from_file (const,gchar *extension_pathconst,gchar *filename,gboolean activate);gboolean test
void midori_extension_activate (,GObject *extensionconst,gchar *filename,gboolean activateMidoriApp *app);
GObject * midori_extension_activate_gracefully (MidoriApp *app,const,gchar *extension_pathconst,gchar *filename);gboolean activate
gboolean midori_extension_is_prepared (MidoriExtension *extension);
Determines if extension is prepared for use, for instance
by ensuring that all required values are set and that it
is actually activatable.
|
a MidoriExtension |
Returns : |
TRUEextension is ready for use |
gboolean midori_extension_has_preferences (MidoriExtension *extension);
Determines if extension has preferences.
|
a MidoriExtension |
Returns : |
TRUEextension has preferences |
gboolean midori_extension_is_active (MidoriExtension *extension);
Determines if extension is active.
|
a MidoriExtension |
Returns : |
TRUEextension is active |
Since 0.1.2
void midori_extension_deactivate (MidoriExtension *extension);
Attempts to deactivate extension.
|
a MidoriExtension |
MidoriApp * midori_extension_get_app (MidoriExtension *extension);
Retrieves the MidoriApp the extension belongs to. The extension has to be active.
|
a MidoriExtension |
Returns : |
the MidoriApp instance Since 0.1.6 |
constgchar * midori_extension_get_config_dir (MidoriExtension *extension);
Retrieves the path to a directory reserved for configuration files specific to the extension.
If settings are installed on the extension, they will be loaded from and saved to a file "config" in this path.
|
a MidoriExtension |
Returns : |
a path, such as ~/.config/midori/extensions/name |
void midori_extension_install_boolean (MidoriExtension *extension,const,gchar *name);gboolean default_value
Installs a boolean that can be used to conveniently store user configuration.
Note that all settings have to be installed before the extension is activated.
|
a MidoriExtension |
|
the name of the setting |
|
the default value |
Since 0.1.3
gboolean midori_extension_get_boolean (MidoriExtension *extension,const);gchar *name
Retrieves the value of the specified setting.
|
a MidoriExtension |
|
the name of the setting |
Since 0.1.3
void midori_extension_set_boolean (MidoriExtension *extension,const,gchar *name);gboolean value
Assigns a new value to the specified setting.
|
a MidoriExtension |
|
the name of the setting |
|
the new value |
Since 0.1.3
void midori_extension_install_integer (MidoriExtension *extension,const,gchar *name);gint default_value
Installs an integer that can be used to conveniently store user configuration.
Note that all settings have to be installed before the extension is activated.
|
a MidoriExtension |
|
the name of the setting |
|
the default value |
Since 0.1.3
gint midori_extension_get_integer (MidoriExtension *extension,const);gchar *name
Retrieves the value of the specified setting.
|
a MidoriExtension |
|
the name of the setting |
Since 0.1.3
void midori_extension_set_integer (MidoriExtension *extension,const,gchar *name);gint value
Assigns a new value to the specified setting.
|
a MidoriExtension |
|
the name of the setting |
|
the new value |
Since 0.1.3
void midori_extension_install_string (MidoriExtension *extension,const,gchar *nameconst);gchar *default_value
Installs a string that can be used to conveniently store user configuration.
Note that all settings have to be installed before the extension is activated.
|
a MidoriExtension |
|
the name of the setting |
|
the default value |
Since 0.1.3
constgchar * midori_extension_get_string (MidoriExtension *extension,const);gchar *name
Retrieves the value of the specified setting.
|
a MidoriExtension |
|
the name of the setting |
Since 0.1.3
void midori_extension_set_string (MidoriExtension *extension,const,gchar *nameconst);gchar *value
Assigns a new value to the specified setting.
|
a MidoriExtension |
|
the name of the setting |
|
the new value |
Since 0.1.3
void midori_extension_install_string_list (MidoriExtension *extension,const,gchar *name,gchar **default_value);gsize default_length
Installs a string list that can be used to conveniently store user configuration.
Note that all settings have to be installed before the extension is activated.
|
a MidoriExtension |
|
the name of the setting |
|
the default value |
Since 0.1.7
gchar ** midori_extension_get_string_list (MidoriExtension *extension,const,gchar *name);gsize *length
Retrieves the value of the specified setting.
|
a MidoriExtension |
|
the name of the setting |
|
return location to store number of strings, or NULL |
Returns : |
a newly allocated NULL-terminated list of strings,
should be freed with g_strfreev() |
Since 0.1.7
void midori_extension_set_string_list (MidoriExtension *extension,const,gchar *name,gchar **value);gsize length
Assigns a new value to the specified setting.
|
a MidoriExtension |
|
the name of the setting |
|
the new value |
|
number of strings in value, or G_MAXSIZE |
Since 0.1.7
void midori_extension_load_from_folder (MidoriApp *app,,gchar **keys);gboolean activate