Top | ![]() |
![]() |
![]() |
![]() |
XedDocument * | xed_document_new () |
GtkSourceFile * | xed_document_get_file () |
gchar * | xed_document_get_uri_for_display () |
gchar * | xed_document_get_short_name_for_display () |
void | xed_document_set_short_name_for_display () |
gchar * | xed_document_get_mime_type () |
gboolean | xed_document_get_readonly () |
gboolean | xed_document_is_untouched () |
gboolean | xed_document_is_untitled () |
gboolean | xed_document_get_deleted () |
gboolean | xed_document_goto_line () |
gboolean | xed_document_goto_line_offset () |
void | xed_document_set_language () |
gchar * | xed_document_get_metadata () |
gchar * | content-type | Read / Write |
gchar * | mime-type | Read |
gboolean | read-only | Read |
gchar * | shortname | Read / Write |
void | cursor-moved | Run Last |
void | load | Run Last |
void | loaded | Run Last |
void | save | Run Last |
void | saved | Run Last |
GtkSourceFile *
xed_document_get_file (XedDocument *doc
);
Gets the associated GtkSourceFile. You should use it only for reading purposes, not for creating a GtkSourceFileLoader or GtkSourceFileSaver, because xed does some extra work when loading or saving a file and maintains an internal state. If you use in a plugin a file loader or saver on the returned GtkSourceFile, the internal state of xed won't be updated.
If you want to save the GeditDocument to a secondary file, you can create a new GtkSourceFile and use a GtkSourceFileSaver.
gchar *
xed_document_get_uri_for_display (XedDocument *doc
);
Note: this never returns NULL
.
gchar *
xed_document_get_short_name_for_display
(XedDocument *doc
);
Note: this never returns NULL
.
void xed_document_set_short_name_for_display (XedDocument *doc
,const gchar *name
);
gchar *
xed_document_get_mime_type (XedDocument *doc
);
Note: this never returns NULL
.
gboolean xed_document_goto_line_offset (XedDocument *doc
,gint line
,gint line_offset
);
void xed_document_set_language (XedDocument *doc
,GtkSourceLanguage *lang
);
gchar * xed_document_get_metadata (XedDocument *doc
,const gchar *key
);
Gets the metadata assigned to key
.
“content-type”
property “content-type” gchar *
The document's Content Type.
Flags: Read / Write
Default value: NULL
“mime-type”
property “mime-type” gchar *
The document's MIME Type.
Flags: Read
Default value: "text/plain"
“read-only”
property “read-only” gboolean
Whether the document is read only or not.
Flags: Read
Default value: FALSE
“cursor-moved”
signalvoid user_function (XedDocument *xeddocument, gpointer user_data)
Flags: Run Last
“load”
signalvoid user_function (XedDocument *document, gpointer user_data)
The "load" signal is emitted at the beginning of file loading.
Flags: Run Last
“loaded”
signalvoid user_function (XedDocument *document, gpointer user_data)
The "loaded" signal is emitted at the end of a successful loading.
Flags: Run Last
“save”
signalvoid user_function (XedDocument *document, gpointer user_data)
The "save" signal is emitted at the beginning of file saving.
Flags: Run Last
“saved”
signalvoid user_function (XedDocument *document, gpointer user_data)
The "saved" signal is emitted at the end of a successful file saving.
Flags: Run Last