Top | ![]() |
![]() |
![]() |
![]() |
#define | LW_BIND() |
#define | LW_BIND_COLOR() |
#define | LW_BIND_ENUM() |
#define | LW_BIND_RANGE() |
#define | LW_OPENGL_1_4_HELPER() |
void | lw_settings_bind_color () |
void | lw_settings_bind_range () |
void | lw_settings_bind_enum () |
GResource * | lw_load_gresource () |
void | lw_unload_gresource () |
This section provides several functions and macros that reduce the code size or simplify some common tasks.
#define LW_BIND(obj, prop) g_settings_bind (self->priv->settings, prop, obj, prop, G_SETTINGS_BIND_GET)
This macro is used to make a very common call to g_settings_bind shorter. It binds a key
called prop
from the settings to a property called prop
of the GObject obj
. For color,
enum or range properties see LW_BIND_COLOR()
, LW_BIND_ENUM()
or LW_BIND_RANGE()
.
This macro assumes that self->priv->settings exists in the current context and is a GSettings object, and that the property and key names are the same.
obj |
A GObject with a property named |
|
prop |
The property and key to bind to. Property name and key name will both be set to |
Since: 0.5
#define LW_BIND_COLOR(obj, prop) lw_settings_bind_color (self->priv->settings, prop, obj, prop, G_SETTINGS_BIND_GET)
The same as LW_BIND()
, but it binds a color property to a settings key.
This macro assumes that self->priv->settings exists in the current context and is a GSettings object, and that the property and key names are the same.
obj |
A GObject with a property named |
|
prop |
The property and key to bind to. Property name and key name will both be set to |
Since: 0.5
#define LW_BIND_ENUM(obj, prop) lw_settings_bind_enum (self->priv->settings, prop, obj, prop, G_SETTINGS_BIND_GET)
The same as LW_BIND()
, but it binds an enum property to a settings key.
This macro assumes that self->priv->settings exists in the current context and is a GSettings object, and that the property and key names are the same.
obj |
A GObject with a property named |
|
prop |
The property and key to bind to. Property name and key name will both be set to |
Since: 0.5
#define LW_BIND_RANGE(obj, prop) lw_settings_bind_range (self->priv->settings, prop, obj, prop, G_SETTINGS_BIND_GET)
The same as LW_BIND()
, but it binds a range property to a settings key.
This macro assumes that self->priv->settings exists in the current context and is a GSettings object, and that the property and key names are the same.
obj |
A GObject with a property named |
|
prop |
The property and key to bind to. Property name and key name will both be set to |
Since: 0.5
#define LW_OPENGL_1_4_HELPER(fun20, fun14, params)
This macro calls fun20
with params
as parameters if OpenGL 2.0 or later is available on the system. For
systems with OpenGL before version 2.0 it calls fun14
with params
as parameters.
fun20 |
Name of the function for OpenGL 2.0+ |
|
fun14 |
Name of the function before OpenGL 2.0 |
|
params |
The function's parameters |
Since: 0.5
void lw_settings_bind_color (GSettings *settings
,const gchar *key
,gpointer object
,const gchar *property
,GSettingsBindFlags flags
);
This function calls g_settings_bind_with_mapping()
with the required
mapping functions for colors. It uses lw_color_get_color_mapping()
and lw_color_set_color_mapping()
as mapping functions.
Since: 0.4
void lw_settings_bind_range (GSettings *settings
,const gchar *key
,gpointer object
,const gchar *property
,GSettingsBindFlags flags
);
This function calls g_settings_bind_with_mapping()
with the required
mapping functions for LwRange properties. It uses lw_range_get_range_mapping()
and lw_range_set_range_mapping()
as mapping functions.
Since: 0.4
void lw_settings_bind_enum (GSettings *settings
,const gchar *key
,gpointer object
,const gchar *property
,GSettingsBindFlags flags
);
Creates a binding between an enum key
and a guint property
. This function
passes all params to g_settings_bind_with_mapping()
and sets the required
mapping functions.
Since: 0.4
GResource *
lw_load_gresource (const gchar *path
);
a pointer to the GResource or NULL in case of fail
Load a gresource file so that you can load resources in any function of the application. Displays an error in case of fail
Since: 0.5