![]() |
![]() |
![]() |
Anjuta Developers Reference Manual | ![]() |
---|---|---|---|---|
#include <libanjuta/interfaces/ianjuta-file-savable.h> #define IANJUTA_FILE_SAVABLE_ERROR IAnjutaFileSavable; IAnjutaFileSavableIface; GQuark ianjuta_file_savable_error_quark (void); gboolean ianjuta_file_savable_is_dirty (IAnjutaFileSavable *obj, GError **err); gboolean ianjuta_file_savable_is_read_only (IAnjutaFileSavable *obj, GError **err); void ianjuta_file_savable_save (IAnjutaFileSavable *obj, GError **err); void ianjuta_file_savable_save_as (IAnjutaFileSavable *obj, GFile *file, GError **err); void ianjuta_file_savable_set_dirty (IAnjutaFileSavable *obj, gboolean dirty, GError **err);
Plugins implementing IAnjutaFile inteface that can also save files should also implement this interface.
typedef struct { IAnjutaFileIface g_iface; /* Signal */ void (*save_point) (IAnjutaFileSavable *obj, gboolean entered); /* Signal */ void (*saved) (IAnjutaFileSavable *obj, GFile* file); gboolean (*is_dirty) (IAnjutaFileSavable *obj, GError **err); gboolean (*is_read_only) (IAnjutaFileSavable *obj, GError **err); void (*save) (IAnjutaFileSavable *obj, GError **err); void (*save_as) (IAnjutaFileSavable *obj, GFile* file, GError **err); void (*set_dirty) (IAnjutaFileSavable *obj, gboolean dirty, GError **err); } IAnjutaFileSavableIface;
gboolean ianjuta_file_savable_is_dirty (IAnjutaFileSavable *obj, GError **err);
Returns the dirty status of the content.
|
Self |
|
Error propagation and reporting |
Returns : |
TRUE if dirty, FALSE otherwise. |
gboolean ianjuta_file_savable_is_read_only (IAnjutaFileSavable *obj, GError **err);
Return is the file is read-only
|
Self |
|
Error propagation and reporting |
Returns : |
TRUE if read-only, FALSE otherwise. |
void ianjuta_file_savable_save (IAnjutaFileSavable *obj, GError **err);
Saves the content to the original file from which it was loaded.
|
Self |
|
Error propagation and reporting |
void ianjuta_file_savable_save_as (IAnjutaFileSavable *obj, GFile *file, GError **err);
Saves the content to a different File.
|
Self |
|
File to save the content. |
|
Error propagation and reporting |
void ianjuta_file_savable_set_dirty (IAnjutaFileSavable *obj, gboolean dirty, GError **err);
if dirty
is TRUE, sets dirty for the content. Save point will be
left and the content will be considered not saved. Otherwise,
content will considered saved and save-point will be entered.
|
Self |
|
|
|
Error propagation and reporting |
"save-point"
signalvoid user_function (IAnjutaFileSavable *ianjutafilesavable, gboolean arg1, gpointer user_data) : Run Last
|
the object which received the signal. |
|
|
|
user data set when the signal handler was connected. |
"saved"
signalvoid user_function (IAnjutaFileSavable *ianjutafilesavable, GObject *arg1, gpointer user_data) : Run Last
|
the object which received the signal. |
|
|
|
user data set when the signal handler was connected. |