[gtksourceviewmm] Miscellaneous stuff.



commit fd4afde5f821a493acd58aa6821c6476ce229060
Author: Krzesimir Nowak <qdlacz gmail com>
Date:   Tue Dec 21 21:27:00 2010 +0100

    Miscellaneous stuff.
    
    * gtksourceview/src/sourceview.ccg:
    * gtksourceview/src/sourceview.hg: Wrapped getting mark category.
    * codegen/m4/convert_gtksourceview.m4: Added needed conversion.
    * gtksourceview/src/sourcegutter.hg: Removed old cruft.
    * gtksourceview/src/sourcemarkcategory.hg: Added refreturn.
    * gtksourceview/src/sourcegutterrenderertext.hg: Have to think about
    those overloads.

 codegen/m4/convert_gtksourceview.m4           |    5 ++++
 gtksourceview/src/sourcegutter.hg             |   28 +------------------------
 gtksourceview/src/sourcegutterrenderertext.hg |    1 +
 gtksourceview/src/sourcemarkcategory.hg       |    2 +-
 gtksourceview/src/sourceview.ccg              |    3 +-
 gtksourceview/src/sourceview.hg               |    7 +++++-
 6 files changed, 16 insertions(+), 30 deletions(-)
---
diff --git a/codegen/m4/convert_gtksourceview.m4 b/codegen/m4/convert_gtksourceview.m4
index 3deef2b..6b150f8 100644
--- a/codegen/m4/convert_gtksourceview.m4
+++ b/codegen/m4/convert_gtksourceview.m4
@@ -78,6 +78,11 @@ _CONVERSION(`GtkSourceMark*',`Glib::RefPtr<SourceMark>',`Glib::wrap($3)')
 # Gsv::SourceMark -> GtkSourceMark
 _CONVERSION(`const Glib::RefPtr<SourceMark>&',`GtkSourceMark*',`Glib::unwrap($3)')
 
+
+# GtkSourceMarkCategory -> Gsv::SourceMarkCategory
+_CONVERSION(`'GtkSourceMarkCategory*,`Glib::RefPtr<SourceMarkCategory>',`Glib::wrap($3)')
+
+
 # GtkSourceStyle -> Gsv::SourceStyle
 _CONVERSION(`GtkSourceStyle*',`Glib::RefPtr<SourceStyle>',`Glib::wrap($3)')
 
diff --git a/gtksourceview/src/sourcegutter.hg b/gtksourceview/src/sourcegutter.hg
index 01958cb..cae2b0e 100644
--- a/gtksourceview/src/sourcegutter.hg
+++ b/gtksourceview/src/sourcegutter.hg
@@ -89,33 +89,7 @@ public:
    *
    * @newin{2,10}
    */
-  _WRAP_METHOD(Glib::RefPtr<const Gdk::Window> get_window() const, gtk_source_gutter_get_window, constversion, refreturn)
-
-  /** Inserts @a renderer into a gutter at @a position.
-   *
-   * @param renderer A Gtk::CellRenderer.
-   * @param position The renderers position.
-   *
-   * @newin{2,10}
-   */
-//  _WRAP_METHOD(void insert(Gtk::CellRenderer* renderer, int position), gtk_source_gutter_insert)
-
-  /** Reorders @a renderer in a gutter to new @a position.
-   *
-   * @param renderer A Gtk::CellRenderer.
-   * @param position The new renderer position.
-   *
-   * @newin{2,10}
-   */
-//  _WRAP_METHOD(void reorder(Gtk::CellRenderer* renderer, int position), gtk_source_gutter_reorder)
-
-  /** Removes @a renderer from a gutter.
-   *
-   * @param renderer A Gtk::CellRenderer.
-   *
-   * @newin{2,10}
-   */
-//  _WRAP_METHOD(void remove(Gtk::CellRenderer* renderer), gtk_source_gutter_remove)
+  _WRAP_METHOD(Glib::RefPtr<const Gdk::Window> get_window() const, gtk_source_gutter_get_window, constversion)
 
   _WRAP_METHOD(void insert(SourceGutterRenderer* renderer, int position), gtk_source_gutter_insert)
 
diff --git a/gtksourceview/src/sourcegutterrenderertext.hg b/gtksourceview/src/sourcegutterrenderertext.hg
index 6bb9f4b..fcc643d 100644
--- a/gtksourceview/src/sourcegutterrenderertext.hg
+++ b/gtksourceview/src/sourcegutterrenderertext.hg
@@ -36,6 +36,7 @@ class SourceGutterRendererText : public SourceGutterRenderer
 public:
   _CTOR_DEFAULT()
 
+  // TODO: probably just set_text and set_markup will be better instead of funny overloads.
   _IGNORE(gtk_source_gutter_renderer_text_set_markup)
   void set_text(const SourceMarkup& markup);
 
diff --git a/gtksourceview/src/sourcemarkcategory.hg b/gtksourceview/src/sourcemarkcategory.hg
index 3a0216a..c05afa5 100644
--- a/gtksourceview/src/sourcemarkcategory.hg
+++ b/gtksourceview/src/sourcemarkcategory.hg
@@ -97,7 +97,7 @@ public:
 #m4 _CONVERSION(`const Glib::RefPtr<const Gdk::Pixbuf>&', `const GdkPixbuf*', `Glib::unwrap($3)')
   _WRAP_METHOD(void set_pixbuf(const Glib::RefPtr<const Gdk::Pixbuf>& pixbuf), gtk_source_mark_category_set_pixbuf)
 
-  _WRAP_METHOD(Glib::RefPtr<const Gdk::Pixbuf> render_icon(Gtk::Widget* widget, int size) const, gtk_source_mark_category_render_icon)
+  _WRAP_METHOD(Glib::RefPtr<const Gdk::Pixbuf> render_icon(Gtk::Widget* widget, int size) const, gtk_source_mark_category_render_icon, refreturn)
 
   _WRAP_METHOD(Glib::ustring get_tooltip_text(const Glib::RefPtr<SourceMark>& mark) const, gtk_source_mark_category_get_tooltip_text)
 
diff --git a/gtksourceview/src/sourceview.ccg b/gtksourceview/src/sourceview.ccg
index 9c26ef9..eac30a3 100644
--- a/gtksourceview/src/sourceview.ccg
+++ b/gtksourceview/src/sourceview.ccg
@@ -19,10 +19,11 @@
  * License along with this library; if not, write to the Free
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-#include <gtksourceviewmm/sourceview.h>
 #include <gtksourceview/gtksourceview.h>
 #include <gtksourceview/gtksourceview-typebuiltins.h>
 
+#include <gtksourceviewmm/sourceview.h>
+#include <gtksourceviewmm/sourcemarkcategory.h>
 namespace Gsv
 {
 
diff --git a/gtksourceview/src/sourceview.hg b/gtksourceview/src/sourceview.hg
index dadccfc..8a4ad94 100644
--- a/gtksourceview/src/sourceview.hg
+++ b/gtksourceview/src/sourceview.hg
@@ -31,8 +31,9 @@ _PINCLUDE(gtkmm/private/textview_p.h)
 namespace Gsv
 {
 
-class SourceGutter;
 class SourceCompletion;
+class SourceGutter;
+class SourceMarkCategory;
 
 /** Defines a behaviour of smart Home/End keys.
  */
@@ -334,6 +335,10 @@ public:
    */
   _WRAP_METHOD(Glib::RefPtr<const SourceCompletion> get_completion() const, gtk_source_view_get_completion, refreturn, constversion)
 
+  _WRAP_METHOD(Glib::RefPtr<SourceMarkCategory> get_mark_category(const Glib::ustring& category), gtk_source_view_get_mark_category, refreturn)
+
+  _WRAP_METHOD(Glib::RefPtr<const SourceMarkCategory> get_mark_category(const Glib::ustring& category) const, gtk_source_view_get_mark_category, constversion)
+
   /** Emitted when redo action is requested.
    */
   _WRAP_SIGNAL(void redo(), "redo")



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]