| Top |
| char * | content-type | Read / Write |
| char * | mime-type | Read |
| gboolean | read-only | Read |
| char * | shortname | Read / Write |
| gboolean | use-gvfs-metadata | Read / Write / Construct Only |
| void | cursor-moved | Run Last |
| void | load | Run Last |
| void | loaded | Run First |
| void | save | Run Last |
| void | saved | Run First |
| #define | XED_TYPE_DOCUMENT |
| #define | XED_METADATA_ATTRIBUTE_POSITION |
| #define | XED_METADATA_ATTRIBUTE_ENCODING |
| #define | XED_METADATA_ATTRIBUTE_LANGUAGE |
| struct | XedDocumentClass |
| XedDocument |
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 XedDocument 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 *short_name);
void xed_document_set_content_type (XedDocument *doc,const gchar *content_type);
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);
const GtkSourceEncoding *
xed_document_get_encoding (XedDocument *doc);
GtkSourceNewlineType
xed_document_get_newline_type (XedDocument *doc);
gchar * xed_document_get_metadata (XedDocument *doc,const gchar *key);
Gets the metadata assigned to key
.
void xed_document_set_metadata (XedDocument *doc,const gchar *first_key,...);
Sets metadata on a document.
void xed_document_set_search_context (XedDocument *doc,GtkSourceSearchContext *search_context);
Sets the new search context for the document.
GtkSourceSearchContext *
xed_document_get_search_context (XedDocument *doc);
struct XedDocumentClass {
GtkSourceBufferClass parent_class;
/* Signals */
void (* cursor_moved) (XedDocument *document);
void (* load) (XedDocument *document);
void (* loaded) (XedDocument *document);
void (* save) (XedDocument *document);
void (* saved) (XedDocument *document);
};
“content-type” property “content-type” char *
The documents content type.
Owner: XedDocument
Flags: Read / Write
Default value: NULL
“mime-type” property “mime-type” char *
The documents MIME type.
Owner: XedDocument
Flags: Read
Default value: "text/plain"
“read-only” property “read-only” gboolean
Whether the document is read-only or not.
Owner: XedDocument
Flags: Read
Default value: FALSE
“shortname” property “shortname” char *
The documents short name.
Owner: XedDocument
Flags: Read / Write
Default value: NULL
“use-gvfs-metadata” property “use-gvfs-metadata” gboolean
Whether to use GVFS metadata. If FALSE, use the xed metadata
manager that stores the metadata in an XML file in the user cache
directory.
Owner: XedDocument
Flags: Read / Write / Construct Only
Default value: TRUE
“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 First
“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 First