Apply patch from blackdog to add document_save_file() to the plugin

API (thanks).
Add document_open_file() to plugin API.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1796 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Nick Treleaven 2007-08-14 16:29:03 +00:00
parent 0f3ffc3b79
commit d8d971ea9f
3 changed files with 11 additions and 2 deletions

View File

@ -14,6 +14,10 @@
* HACKING:
Add more information for adding a filetype.
2 minor edits.
* src/plugindata.h, src/plugins.c:
Apply patch from blackdog to add document_save_file() to the plugin
API (thanks).
Add document_open_file() to plugin API.
2007-08-13 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>

View File

@ -68,7 +68,7 @@
/* The API version should be incremented whenever any plugin data types below are
* modified. */
static const gint api_version = 9;
static const gint api_version = 10;
/* The ABI version should be incremented whenever existing fields in the plugin
* data types below have to be changed or reordered. It should stay the same if fields
@ -160,6 +160,9 @@ typedef struct DocumentFuncs
gint (*new_file) (const gchar *filename, struct filetype *ft);
gint (*get_cur_idx) ();
struct document* (*get_current) ();
gboolean (*save_file)(gint idx, gboolean force);
gboolean (*open_file)(gint idx, const gchar *filename, gint pos, gboolean readonly,
struct filetype *ft, const gchar *forced_enc);
}
DocumentFuncs;

View File

@ -73,7 +73,9 @@ static GList *plugin_list = NULL;
static DocumentFuncs doc_funcs = {
&document_new_file,
&document_get_cur_idx,
&document_get_current
&document_get_current,
&document_save_file,
&document_open_file
};
static ScintillaFuncs sci_funcs = {