SF.net SVN: geany: [2763] branches/editor-struct
ntrel at users.sourceforge.net
ntrel at xxxxx
Tue Jul 8 10:50:13 UTC 2008
Revision: 2763
http://geany.svn.sourceforge.net/geany/?rev=2763&view=rev
Author: ntrel
Date: 2008-07-08 03:50:13 -0700 (Tue, 08 Jul 2008)
Log Message:
-----------
Note: this breaks the plugin API for editor-related document fields.
Split new GeanyEditor struct type from GeanyDocument fields.
Add GeanyDocument::editor field.
GeanyEditor::document allows access back to document fields.
GeanyEditor::scintilla replaces GeanyDocument::sci.
Modified Paths:
--------------
branches/editor-struct/ChangeLog
branches/editor-struct/src/document.h
branches/editor-struct/src/editor.h
branches/editor-struct/src/plugindata.h
Modified: branches/editor-struct/ChangeLog
===================================================================
--- branches/editor-struct/ChangeLog 2008-07-08 10:42:29 UTC (rev 2762)
+++ branches/editor-struct/ChangeLog 2008-07-08 10:50:13 UTC (rev 2763)
@@ -1,3 +1,13 @@
+2008-07-08 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
+
+ * src/document.h, src/editor.h, src/plugindata.h:
+ Note: this breaks the plugin API for editor-related document fields.
+ Split new GeanyEditor struct type from GeanyDocument fields.
+ Add GeanyDocument::editor field.
+ GeanyEditor::document allows access back to document fields.
+ GeanyEditor::scintilla replaces GeanyDocument::sci.
+
+
2008-07-07 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* tagmanager/haskell.c:
Modified: branches/editor-struct/src/document.h
===================================================================
--- branches/editor-struct/src/document.h 2008-07-08 10:42:29 UTC (rev 2762)
+++ branches/editor-struct/src/document.h 2008-07-08 10:50:13 UTC (rev 2763)
@@ -82,30 +82,20 @@
gchar *encoding;
/** Internally used flag to indicate whether the file of this %document has a byte-order-mark. */
gboolean has_bom;
+ struct GeanyEditor *editor; /**< The editor widget associated with the document. */
/** The filetype for this %document, it's only a reference to one of the elements of the global
* filetypes array. */
GeanyFiletype *file_type;
/** TMWorkObject object for this %document. */
TMWorkObject *tm_file;
- /** The Scintilla object for this %document. */
- ScintillaObject *sci;
/** Whether this %document is read-only. */
gboolean readonly;
/** Whether this %document has been changed since it was last saved. */
gboolean changed;
- /** %Document-specific line wrapping setting. */
- gboolean line_wrapping;
- /** %Document-specific indentation setting. */
- gboolean auto_indent;
- /** Percentage to scroll view by on paint, if positive. */
- gfloat scroll_percent;
/** Time of the last disk check. */
time_t last_check;
/** Modification time of this %document on disk. */
time_t mtime;
- /** %Document-specific indentation setting. */
- gboolean use_tabs;
- gboolean line_breaking; /**< Whether to split long lines as you type. */
/** The link-dereferenced, locale-encoded file name.
* If non-NULL, this indicates the file once existed on disk (not just as an
* unsaved document with a filename set).
Modified: branches/editor-struct/src/editor.h
===================================================================
--- branches/editor-struct/src/editor.h 2008-07-08 10:42:29 UTC (rev 2762)
+++ branches/editor-struct/src/editor.h 2008-07-08 10:50:13 UTC (rev 2763)
@@ -99,6 +99,21 @@
extern GeanyEditorPrefs editor_prefs;
+/** Editor-owned fields for each document. */
+typedef struct GeanyEditor
+{
+ GeanyDocument *document; /**< The document associated with the editor. */
+ ScintillaObject *scintilla; /**< The Scintilla editor @c GtkWidget. */
+ gboolean line_wrapping; /**< @c TRUE if line wrapping is enabled. */
+ gboolean auto_indent; /**< @c TRUE if auto-indentation is enabled. */
+ /** Percentage to scroll view by on paint, if positive. */
+ gfloat scroll_percent;
+ gboolean use_tabs; /**< @c TRUE if tabs are used for indentation. */
+ gboolean line_breaking; /**< Whether to split long lines as you type. */
+}
+GeanyEditor;
+
+
typedef struct
{
gchar *current_word; /* holds word under the mouse or keyboard cursor */
Modified: branches/editor-struct/src/plugindata.h
===================================================================
--- branches/editor-struct/src/plugindata.h 2008-07-08 10:42:29 UTC (rev 2762)
+++ branches/editor-struct/src/plugindata.h 2008-07-08 10:50:13 UTC (rev 2763)
@@ -36,12 +36,12 @@
/* The API version should be incremented whenever any plugin data types below are
* modified or appended to. */
-static const gint api_version = 75;
+static const gint api_version = 76;
/* 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
* are only appended, as this doesn't affect existing fields. */
-static const gint abi_version = 40;
+static const gint abi_version = 41;
/** Check the plugin can be loaded by Geany.
* This performs runtime checks that try to ensure:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Commits
mailing list