Top |
GtkSourceCompressionType | compression-type | Read |
GtkSourceEncoding * | encoding | Read |
GFile * | location | Read / Write |
GtkSourceNewlineType | newline-type | Read |
A GtkSourceFile object is the on-disk representation of a GtkSourceBuffer. With a GtkSourceFile, you can create and configure a GtkSourceFileLoader and GtkSourceFileSaver which take by default the values of the GtkSourceFile properties (except for the file loader which auto-detect some properties). On a successful load or save operation, the GtkSourceFile properties are updated. If an operation fails, the GtkSourceFile properties have still the previous valid values.
GMountOperation * (*GtkSourceMountOperationFactory) (GtkSourceFile *file
,gpointer userdata
);
Type definition for a function that will be called to create a GMountOperation. This is useful for creating a GtkMountOperation.
Since 3.14
GFile *
gtk_source_file_get_location (GtkSourceFile *file
);
Since 3.14
void gtk_source_file_set_location (GtkSourceFile *file
,GFile *location
);
Sets the location.
Since 3.14
const GtkSourceEncoding *
gtk_source_file_get_encoding (GtkSourceFile *file
);
The encoding is initially NULL
. After a successful file loading or saving
operation, the encoding is non-NULL
.
Since 3.14
GtkSourceNewlineType
gtk_source_file_get_newline_type (GtkSourceFile *file
);
Since 3.14
GtkSourceCompressionType
gtk_source_file_get_compression_type (GtkSourceFile *file
);
Since 3.14
void gtk_source_file_set_mount_operation_factory (GtkSourceFile *file
,GtkSourceMountOperationFactory callback
,gpointer user_data
,GDestroyNotify notify
);
Sets a GtkSourceMountOperationFactory function that will be called when a GMountOperation must be created. This is useful for creating a GtkMountOperation with the parent GtkWindow.
If a mount operation factory isn't set, g_mount_operation_new()
will be
called.
file |
||
callback |
a GtkSourceMountOperationFactory to call when a GMountOperation is needed. |
[scope notified] |
user_data |
the data to pass to the |
[closure] |
notify |
function to call on |
[nullable] |
Since 3.14
#define GTK_SOURCE_NEWLINE_TYPE_DEFAULT GTK_SOURCE_NEWLINE_TYPE_CR_LF
The default newline type on the current OS.
Since 3.14
“compression-type”
property“compression-type” GtkSourceCompressionType
The compression type.
Flags: Read
Default value: GTK_SOURCE_COMPRESSION_TYPE_NONE
Since 3.14
“encoding”
property“encoding” GtkSourceEncoding *
The character encoding, initially NULL
. After a successful file
loading or saving operation, the encoding is non-NULL
.
Flags: Read
Since 3.14
“newline-type”
property“newline-type” GtkSourceNewlineType
The line ending type.
Flags: Read
Default value: GTK_SOURCE_NEWLINE_TYPE_LF
Since 3.14