![]() |
![]() |
![]() |
plank Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Prerequisites | Signals |
#define PLANK_SERVICES_TYPE_PREFERENCES void plank_services_preferences_verify (PlankServicesPreferences *self
,const gchar *prop
); void plank_services_preferences_reset_properties (PlankServicesPreferences *self
); void plank_services_preferences_init_from_file (PlankServicesPreferences *self
,GFile *file
); void plank_services_preferences_init_from_filename (PlankServicesPreferences *self
,const gchar *filename
); void plank_services_preferences_delay (PlankServicesPreferences *self
); void plank_services_preferences_apply (PlankServicesPreferences *self
); gchar * plank_services_preferences_get_filename (PlankServicesPreferences *self
); void plank_services_preferences_delete (PlankServicesPreferences *self
); struct PlankServicesPreferences; struct PlankServicesPreferencesClass; gchar * plank_services_prefs_serializable_prefs_serialize (PlankServicesPrefsSerializable *self
); void plank_services_prefs_serializable_prefs_deserialize (PlankServicesPrefsSerializable *self
,const gchar *s
); PlankServicesPrefsSerializable; struct PlankServicesPrefsSerializableIface;
GObject +----PlankServicesPreferences +----PlankDockPreferences +----PlankDrawingTheme +----PlankItemsDockItemPreferences
GInterface +----PlankServicesPrefsSerializable
#define PLANK_SERVICES_TYPE_PREFERENCES (plank_services_preferences_get_type ())
The type for PlankServicesPreferences.
void plank_services_preferences_verify (PlankServicesPreferences *self
,const gchar *prop
);
This method will verify the value of a property. If the value is wrong, this method should replace it with a sanitized value.
|
the PlankServicesPreferences instance |
|
. the name of the property that needs verified. [in] |
void plank_services_preferences_reset_properties
(PlankServicesPreferences *self
);
Resets all properties to their default values. Called from construct and before loading from the backing file.
|
the PlankServicesPreferences instance |
void plank_services_preferences_init_from_file (PlankServicesPreferences *self
,GFile *file
);
Initializes this preferences with a backing file.
|
the PlankServicesPreferences instance |
|
. the GFile of the backing file for this preferences. [in] |
void plank_services_preferences_init_from_filename (PlankServicesPreferences *self
,const gchar *filename
);
Initializes this preferences with a backing filename.
|
the PlankServicesPreferences instance |
|
. of the backing file for this preferences. [in] |
void plank_services_preferences_delay (PlankServicesPreferences *self
);
Delays saving changes to the backing file until apply()
is called.
|
the PlankServicesPreferences instance |
void plank_services_preferences_apply (PlankServicesPreferences *self
);
If any settings were changed, apply them now.
|
the PlankServicesPreferences instance |
gchar * plank_services_preferences_get_filename
(PlankServicesPreferences *self
);
Returns the filename of the backing file.
|
the PlankServicesPreferences instance |
Returns : |
the filename of the backing file |
void plank_services_preferences_delete (PlankServicesPreferences *self
);
This forces the deletion of the backing file for this preferences.
|
the PlankServicesPreferences instance |
struct PlankServicesPreferences;
The base class for all preferences in the system. Preferences are serialized to files. The file is watched for changes and loads new values if the backing file changed. When any public property of a sub-class is changed, the public properties are serialized to the backing file.
struct PlankServicesPreferencesClass { GObjectClass parent_class; void (*verify) (PlankServicesPreferences* self, const gchar* prop); void (*reset_properties) (PlankServicesPreferences* self); };
The class structure for PLANK_SERVICES_TYPE_PREFERENCES
. All the fields in this structure are private and should never be accessed directly.
GObjectClass |
the parent class structure |
virtual method used internally | |
virtual method used internally |
gchar * plank_services_prefs_serializable_prefs_serialize
(PlankServicesPrefsSerializable *self
);
Serializes the object into a string representation.
|
the PlankServicesPrefsSerializable instance |
Returns : |
the string representation of the object |
void plank_services_prefs_serializable_prefs_deserialize (PlankServicesPrefsSerializable *self
,const gchar *s
);
De-serializes the object from a string representation.
|
the PlankServicesPrefsSerializable instance |
|
. the string representation of the object. [in] |
typedef struct _PlankServicesPrefsSerializable PlankServicesPrefsSerializable;
This interface is used by objects that need to be serialized in a Preferences. The object must have a string representation and provide these methods to translate between the string and object representations.
struct PlankServicesPrefsSerializableIface { GTypeInterface parent_iface; gchar* (*prefs_serialize) (PlankServicesPrefsSerializable* self); void (*prefs_deserialize) (PlankServicesPrefsSerializable* self, const gchar* s); };
Interface for creating PlankServicesPrefsSerializable implementations.
GTypeInterface |
the parent interface structure |
virtual method called by plank_services_prefs_serializable_prefs_serialize()
|
|
virtual method called by plank_services_prefs_serializable_prefs_deserialize()
|
"deleted"
signalvoid user_function (PlankServicesPreferences *preferences,
gpointer user_data) : Run Last
This signal indicates that the backing file for this preferences was deleted.
|
the PlankServicesPreferences instance that received the signal |
|
user data set when the signal handler was connected. |