![]() |
![]() |
![]() |
Gnome Scan Reference Manual | ![]() |
---|---|---|---|---|
GnomeScanSettings; GnomeScanSettings* gnome_scan_settings_new (void); void gnome_scan_settings_set (GnomeScanSettings *settings, const gchar *name, const GValue *value); GValue* gnome_scan_settings_get (GnomeScanSettings *settings, const gchar *name);
When user switch from a scanner to another, he expects the settings
to keep almost the same. e.g. resolution should not be resetted on
device selection. The settings are remember in a GnomeScanSettings
which maintains a table of GValue using GParamSpec
:name as
key. This allow to apply the same GnomeScanSettings on various
GnomeScanPlugin through gnome_scan_plugin_configure()
.
In the future, automatic saving to GConf or .ini would be such feature easily added with this design.
typedef struct _GnomeScanSettings GnomeScanSettings;
A GnomeScanSettings manage a table of GValue indexed by the name of the param spec they where associated to.
GnomeScanSettings* gnome_scan_settings_new (void);
Create a new empty GnomeScanSettings.
Returns : | a new GnomeScanSettings |
void gnome_scan_settings_set (GnomeScanSettings *settings, const gchar *name, const GValue *value);
Store value
for name
key.
See: gnome_scan_settings_get()
settings : |
a GnomeScanSettings |
name : |
GParamSpec name |
value : |
GParamSpec user value |
GValue* gnome_scan_settings_get (GnomeScanSettings *settings, const gchar *name);
Look for a value stored in the table for name
key.
settings : |
a GnomeScanSettings |
name : |
a key |
Returns : | the value corresponding to key or NULL.
See: gnome_scan_settings_set()
|
void user_function (GnomeScanSettings *scansettings, gchar *arg1, gpointer user_data) : Run Last
scansettings : |
the object which received the signal. |
arg1 : |
|
user_data : |
user data set when the signal handler was connected. |