diff --git a/src/post_modules/GTK2/source/gtksourcebuffer.pre b/src/post_modules/GTK2/source/gtksourcebuffer.pre index 59b9e86931afa418e57e55e097c3652f478927fc..345120c1a4c3ac45f4422723a9e38f470943c845 100644 --- a/src/post_modules/GTK2/source/gtksourcebuffer.pre +++ b/src/post_modules/GTK2/source/gtksourcebuffer.pre @@ -82,6 +82,7 @@ void create(GTK2.TextTagTable|GTK2.SourceLanguage|void table_or_lang) } endrequire; +not gtksourceview20; int get_check_brackets(); //! Determines whether bracket match highlighting is activated. @@ -92,7 +93,6 @@ void set_check_brackets(int setting); //! bracket character will be highlighted. You can specify the style with the //! set_bracket_match_style() function. -not gtksourceview20; void set_bracket_match_style(mapping(string:mixed) style) //! Sets the style used for highlighting matching brackets. //! <code> @@ -151,7 +151,6 @@ void set_bracket_match_style(mapping(string:mixed) style) } RETURN_THIS(); } -endnot; int get_highlight(); //! Determines whether text highlighting is activated in the source buffer. @@ -169,6 +168,7 @@ void set_highlight(int setting); //! If not using a GTK2.SourceLanguage for setting the highlighting patterns in //! the buffer, it is recommended for performance reasons that you add all the //! GTK2.SourceTag tags with highlighting disabled and enable it when finished. +endnot; int get_max_undo_levels(); //! Determines the number of undo levels the buffer will track for buffer edits. @@ -203,6 +203,7 @@ void set_language(GTK2.SourceLanguage lang); //! set_escape_char(). Note that this will remove any GTK2.SourceTag tags //! currently in the buffer's tag table. +not gtksourceview20; int get_escape_char(); //! Determines the escaping character used by the source buffer highlighting //! engine. @@ -216,6 +217,7 @@ void set_escape_char(int escape_char); //! embedded. //! <p> //! This setting affects only syntax patterns. +endnot; int can_undo(); //! Determines whether a source buffer can undo the last action. @@ -248,6 +250,7 @@ void end_not_undoable_action(); //! undoable block is closed through a call to this function, the list of undo //! actions is cleared and the undo manager is re-enabled. +not gtksourceview20; GTK2.SourceMarker create_marker(string name, string type, GTK2.TextIter where) //! Creates a marker in the buffer of type type. A marker is semantically very //! similar to a GTK2.TextMark, except it has a type which is used by the @@ -449,3 +452,4 @@ GTK2.SourceMarker get_prev_marker(GTK2.TextIter iter) push_int(0); } } +#endnot diff --git a/src/post_modules/GTK2/source/gtksourcelanguage.pre b/src/post_modules/GTK2/source/gtksourcelanguage.pre index ab9dad3dc3f7fb74989f9e5fb6e303f32ea925bc..e7b101348404532fae5c73643f41dcdd6ddacedf 100644 --- a/src/post_modules/GTK2/source/gtksourcelanguage.pre +++ b/src/post_modules/GTK2/source/gtksourcelanguage.pre @@ -36,7 +36,6 @@ array(GTK2.SourceTag) get_tags() g_slist_free(gsl); } } -endnot; int get_escape_char(); //! Gets the value of the ESC character in the given language. @@ -100,7 +99,6 @@ GTK2.SourceStyleScheme get_style_scheme() } } -not gtksourceview20; mapping(string:mixed) get_tag_style(string id) //! Gets the style of the tag id. If the style is not defined, then returns //! the default style. diff --git a/src/post_modules/GTK2/source/gtksourcemark.pre b/src/post_modules/GTK2/source/gtksourcemark.pre new file mode 100644 index 0000000000000000000000000000000000000000..bd3fd6fa78cedd4217c76998cc82df8964a4fbfd --- /dev/null +++ b/src/post_modules/GTK2/source/gtksourcemark.pre @@ -0,0 +1,24 @@ +/* -*- C -*- */ +require gtksourceview; + +class GTK2.SourceMark; +not gtksourceview20; +/* Backward compat. */ +inherit GTK2.SourceMarker; +endnot; +require gtksourceview20; +inherit GTK2.TextMark; + +%{ +#include "gtksourceview/gtksourceview.h" +#include "gtksourceview/gtksourcemark.h" +%} + +string get_category(); +//! Gets the category type of this marker. + +GTK2.SourceMark next(string category); +//! Gets the next marker of the specified category after this. + +GTK2.SourceMark prev(string category); +//! Gets the previous marker of the specified category before this. diff --git a/src/post_modules/GTK2/source/gtksourcemarker.pre b/src/post_modules/GTK2/source/gtksourcemarker.pre index b8479bcc0573fd88c3ebb7ef1e8b516dea935a7c..b86d541dabf7a090b4bb049babff68e64cf48c6d 100644 --- a/src/post_modules/GTK2/source/gtksourcemarker.pre +++ b/src/post_modules/GTK2/source/gtksourcemarker.pre @@ -1,8 +1,23 @@ /* -*- C -*- */ require gtksourceview; -not gtksourceview20; class GTK2.SourceMarker; +require gtksourceview20; +/* Backward compat. */ +inherit GTK2.SourceMark; + +string get_marker_type() +{ + pgtk2_verify_inited(); + { + const gchar *res = gtk_source_mark_get_category(GTK_SOURCE_MARK(THIS->obj)); + my_pop_n_elems(args); + PGTK_PUSH_GCHAR(res); + } +} +endrequire; +not gtksourceview20; +inherit GTK2.TextMark; %{ #include "gtksourceview/gtksourceview.h" diff --git a/src/post_modules/GTK2/source/gtksourceview.pre b/src/post_modules/GTK2/source/gtksourceview.pre index 845647e7233508624e9196254072456e4c097867..7a2817fbf6b3c646c61e03bda4c3accb417f7f97 100644 --- a/src/post_modules/GTK2/source/gtksourceview.pre +++ b/src/post_modules/GTK2/source/gtksourceview.pre @@ -19,6 +19,8 @@ inherit GTK2.TextView; * that SourceTag and SourceTagTable are gone in 2.0, where * their parents TextTag and TextTagTable are used instead. * + * Another incompatibility is that SourceMarker was renamed SourceMark. + * * To be backward compatible with code for 1.0, we should * probably add some aliases. */ @@ -99,6 +101,7 @@ int get_insert_spaces_instead_of_tabs(); //! Returns whether when inserting a tabulator character it should be replaced //! by a group of space characters. +not gtksourceview20; void set_show_margin(int setting); //! If true, a margin is displayed. @@ -141,6 +144,7 @@ GDK2.Pixbuf get_marker_pixbuf(string type) push_int(0); } } +endnot; void set_smart_home_end(int setting); //! If true, HOME and END keys will move to the first/last non-space character @@ -150,6 +154,7 @@ int get_smart_home_end(); //! Returns whether HOME and END keys will move to the first/last non-space //! character of the line before moving to the start/end. +not gtksourceview20; /* from GtkSourceStyleScheme */ GTK2.SourceStyleScheme get_default() //! Gets the default style scheme. @@ -162,3 +167,4 @@ GTK2.SourceStyleScheme get_default() push_gobjectclass(gss,pgtk2_source_style_scheme_program); } } +endnot;