![]() |
![]() |
![]() |
Gnome Scan Reference Manual | ![]() |
---|---|---|---|---|
#define GS_DEFINE_PARAM_WIDGET (TypeName, type_name) #define GS_DEFINE_PARAM_WIDGET_HEADER (TypeName, type_name) GnomeScanParamWidget; GtkWidget* gnome_scan_param_widget_new (GnomeScanSettings *settings, GnomeScanPlugin *plugin, GParamSpec *pspec); void gnome_scan_param_widget_set_value (GnomeScanParamWidget *widget, GValue *value); void gnome_scan_param_widget_changed (GnomeScanParamWidget *widget);
GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----GtkBox +----GtkHBox +----GnomeScanParamWidget
"param-spec" gpointer : Read / Write / Construct Only "plugin" GnomeScanPlugin* : Read / Write / Construct Only "settings" GnomeScanSettings* : Read / Write / Construct Only "value" GValue* : Read / Write
This widget build it self automatically considering the GParamSpec passed to the constructor.
#define GS_DEFINE_PARAM_WIDGET(TypeName, type_name)
Generate all boiler plate code for creating a new GnomeScanParamWidget derived class.
|
class name |
|
function prefix |
#define GS_DEFINE_PARAM_WIDGET_HEADER(TypeName, type_name)
Generate all boiler plate header declaration for creating a new GnomeScanParamWidget derived class.
|
class name |
|
function prefix |
typedef struct { GnomeScanSettings* settings; GnomeScanPlugin* plugin; GParamSpec *pspec; GValue *value; gboolean shows_label; gboolean expands; gboolean shows_unit; } GnomeScanParamWidget;
GtkWidget* gnome_scan_param_widget_new (GnomeScanSettings *settings, GnomeScanPlugin *plugin, GParamSpec *pspec);
Build a new GnomeScanParamWidget from pspec
widget_type. Initialize settings with pspec
default value if
needed.
|
The GnomeScanSettings where to store values |
|
The GnomeScanPlugin to configure |
|
The GParamSpec to be managed |
Returns : |
The new GnomeScanParamWidget |
void gnome_scan_param_widget_set_value (GnomeScanParamWidget *widget, GValue *value);
Set the value of the widget. It's up to you to ensure the value correspond to the param spec.
|
a GnomeScanParamWidget |
|
a GValue |
void gnome_scan_param_widget_changed (GnomeScanParamWidget *widget);
Trigger changed signal, as if user have touched the GUI.
|
a GnomeScanParamWidget |
"param-spec"
property"param-spec" gpointer : Read / Write / Construct Only
The param spec the widget is representing. A widget can handle only one GParamSpec per instance, the widget being builded upon construction depending on the GParamSpec.
"value"
property"value" GValue* : Read / Write
The current value associated with the param-spec.