[gtksourceviewmm] Fix the build with latest GtkSourceView from git master.
- From: Krzesimir Nowak <krnowak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceviewmm] Fix the build with latest GtkSourceView from git master.
- Date: Sun, 12 Dec 2010 20:49:38 +0000 (UTC)
commit 2a02310b09081e345c0272fb31c41778106da986
Author: Krzesimir Nowak <qdlacz gmail com>
Date: Sun Dec 12 21:43:08 2010 +0100
Fix the build with latest GtkSourceView from git master.
* codegen/m4/convert_gtksourceview.m4: Added needed conversion.
* gtksourceview/src/gtksourceview_docs.xml:
* gtksourceview/src/gtksourceview_methods.defs:
* gtksourceview/src/gtksourceview_signals.defs:
* gtksourceview/src/gtksourceview_vfuncs.defs: Regenerated or updated. The
docextract_to_xml.py probably needs to be updated, so it will be
deterministic, instead of generating docs in random order.
* gtksourceview/src/sourcecompletioninfo.hg: Removed obsolete properties.
* gtksourceview/src/sourcegutter.hg: Wrapped some GtkSourceGutterRenderer*
functions.
* gtksourceview/src/sourcegutterrenderer.hg: Wrapped signals and made some
methods use Gdk::RGBA instead of Gdk::Color.
* gtksourceview/src/sourcegutterrendererpixbuf.hg: Removed some cruft and
obsolete methods.
codegen/m4/convert_gtksourceview.m4 | 4 +
gtksourceview/src/gtksourceview_docs.xml | 150 ++++-------------------
gtksourceview/src/gtksourceview_methods.defs | 113 ++---------------
gtksourceview/src/gtksourceview_signals.defs | 84 +++-----------
gtksourceview/src/gtksourceview_vfuncs.defs | 8 +-
gtksourceview/src/sourcecompletioninfo.hg | 5 -
gtksourceview/src/sourcegutter.hg | 12 ++-
gtksourceview/src/sourcegutterrenderer.hg | 41 +++++--
gtksourceview/src/sourcegutterrendererpixbuf.hg | 102 ---------------
9 files changed, 104 insertions(+), 415 deletions(-)
---
diff --git a/codegen/m4/convert_gtksourceview.m4 b/codegen/m4/convert_gtksourceview.m4
index 9240e1c..62ad0a5 100644
--- a/codegen/m4/convert_gtksourceview.m4
+++ b/codegen/m4/convert_gtksourceview.m4
@@ -55,6 +55,10 @@ _CONVERSION(`const Glib::RefPtr<SourceCompletionProvider>&',`GtkSourceCompletion
_CONVERSION(`GtkSourceGutter*',`Glib::RefPtr<SourceGutter>',`Glib::wrap($3)')
+# Gsv::SourceGutterRenderer -> GtkSourceGutterRenderer
+_CONVERSION(`SourceGutterRenderer*',`GtkSourceGutterRenderer*',`($3)->gobj()')
+
+
# GtkSourceLanguage -> Gsv::SourceLanguage
_CONVERSION(`GtkSourceLanguage*',`Glib::RefPtr<SourceLanguage>',`Glib::wrap($3)')
diff --git a/gtksourceview/src/gtksourceview_docs.xml b/gtksourceview/src/gtksourceview_docs.xml
index c0ec196..a6c39a8 100644
--- a/gtksourceview/src/gtksourceview_docs.xml
+++ b/gtksourceview/src/gtksourceview_docs.xml
@@ -172,41 +172,6 @@ Since: 2.10
<return></return>
</function>
-<function name="gtk_source_completion_info_set_sizing">
-<description>
-Set sizing information for the info window. If @shrink_width or
- shrink_height is %TRUE, the info window will try to resize to fit the
-window contents, with a maximum size given by @width and @height. Setting
- width or @height to -1 removes the maximum size of respectively the width
-and height of the window.
-
-</description>
-<parameters>
-<parameter name="info">
-<parameter_description> a #GtkSourceCompletionInfo.
-</parameter_description>
-</parameter>
-<parameter name="width">
-<parameter_description> The maximum/requested width of the window (-1 to default).
-</parameter_description>
-</parameter>
-<parameter name="height">
-<parameter_description> The maximum/requested height of the window (-1 to default).
-</parameter_description>
-</parameter>
-<parameter name="shrink_width">
-<parameter_description> Whether to shrink the width of the window to fit its contents.
-</parameter_description>
-</parameter>
-<parameter name="shrink_height">
-<parameter_description> Whether to shrink the height of the window to fit its
-contents.
-</parameter_description>
-</parameter>
-</parameters>
-<return></return>
-</function>
-
<function name="gtk_source_buffer_remove_source_marks">
<description>
Remove all marks of @category between @start and @end from the buffer.
@@ -339,7 +304,7 @@ Get the background color of the renderer.
</parameter_description>
</parameter>
<parameter name="color">
-<parameter_description> return value for a #GdkColor
+<parameter_description> return value for a #GdkRGBA
</parameter_description>
</parameter>
</parameters>
@@ -1024,7 +989,7 @@ renderer will not have a background color.
</parameter_description>
</parameter>
<parameter name="color">
-<parameter_description> a #GdkColor or %NULL
+<parameter_description> a #GdkRGBA or %NULL
</parameter_description>
</parameter>
</parameters>
@@ -3009,41 +2974,34 @@ subpattern contexts (e.g. \%{1 start} or \%{blah start}).
<return></return>
</function>
-<function name="gtk_source_gutter_insertv">
+<function name="gtk_source_gutter_renderer_query_data">
<description>
-Create and insert a new gutter renderer in the gutter. This function is
-mostly useful for bindings. Applications should normally use
-#gtk_source_gutter_renderer_insert
-
-Since: 3.0
+Emit the ::query-data signal. This function is called to query for data
+just before rendering a cell. This is called from the #GtkSourceGutter.
+Implementations can override the default signal handler or can connect
+a signal handler externally to the ::query-data signal.
</description>
<parameters>
-<parameter name="gutter">
-<parameter_description> a #GtkSourceGutter.
-</parameter_description>
-</parameter>
-<parameter name="gtype">
-<parameter_description> the type of the gutter renderer (must inherit from #GtkSourceGutterRenderer).
+<parameter name="renderer">
+<parameter_description> a #GtkSourceGutterRenderer.
</parameter_description>
</parameter>
-<parameter name="position">
-<parameter_description> the renderer position.
+<parameter name="start">
+<parameter_description> a #GtkTextIter.
</parameter_description>
</parameter>
-<parameter name="num_parameters">
-<parameter_description> the number of parameters.
+<parameter name="end">
+<parameter_description> a #GtkTextIter.
</parameter_description>
</parameter>
-<parameter name="parameters">
-<parameter_description> the parameters.
+<parameter name="state">
+<parameter_description> a #GtkSourceGutterRendererState.
</parameter_description>
</parameter>
</parameters>
-<return> a #GtkSourceGutterRenderer
-
-</return>
+<return></return>
</function>
<function name="gtk_source_language_manager_get_language">
@@ -4483,7 +4441,9 @@ interactive completion again.
<function name="gtk_source_gutter_insert">
<description>
-Inserts @renderer into @gutter at @position.
+Insert @renderer into the gutter. If @renderer is yet unowned then gutter
+claims its ownership. Otherwise just increases renderer's reference count.
+ renderer cannot be already inserted to another gutter.
Since: 3.0
@@ -4494,16 +4454,17 @@ Since: 3.0
<parameter_description> a #GtkSourceGutter.
</parameter_description>
</parameter>
-<parameter name="gtype">
-<parameter_description> the type of the gutter renderer (must inherit from #GtkSourceGutterRenderer).
+<parameter name="renderer">
+<parameter_description> a gutter renderer (must inherit from #GtkSourceGutterRenderer).
</parameter_description>
</parameter>
<parameter name="position">
-<parameter_description> the renderers position.
+<parameter_description> the renderer position.
</parameter_description>
</parameter>
</parameters>
-<return> a #GtkSourceGutterRenderer
+<return> %TRUE if operation succeeded. Otherwise %FALSE.
+
</return>
</function>
@@ -5097,39 +5058,6 @@ Creates a new segment and inserts it into the tree.
</return>
</function>
-<function name="gtk_source_gutter_insert_valist">
-<description>
-Create and insert a new gutter renderer in the gutter. This function is
-mostly useful for bindings. Applications should normally use
-#gtk_source_gutter_renderer_insert
-
-Since: 3.0
-
-
-</description>
-<parameters>
-<parameter name="gutter">
-<parameter_description> a #GtkSourceGutter.
-</parameter_description>
-</parameter>
-<parameter name="gtype">
-<parameter_description> the type of the gutter renderer (must inherit from #GtkSourceGutterRenderer).
-</parameter_description>
-</parameter>
-<parameter name="position">
-<parameter_description> the renderer position.
-</parameter_description>
-</parameter>
-<parameter name="ap">
-<parameter_description> the parameters.
-</parameter_description>
-</parameter>
-</parameters>
-<return> a #GtkSourceGutterRenderer
-
-</return>
-</function>
-
<function name="gtk_source_print_compositor_draw_page">
<description>
Draw page @page_nr for printing on the the Cairo context encapsuled in @context.
@@ -5193,36 +5121,6 @@ or modified.
</return>
</function>
-<function name="gtk_source_gutter_renderer_query_data">
-<description>
-Emit the ::query-data signal. This function is called to query for data
-just before rendering a cell. This is called from the #GtkSourceGutter.
-Implementations can override the default signal handler or can connect
-a signal handler externally to the ::query-data signal.
-
-
-</description>
-<parameters>
-<parameter name="renderer">
-<parameter_description> a #GtkSourceGutterRenderer.
-</parameter_description>
-</parameter>
-<parameter name="start">
-<parameter_description> a #GtkTextIter.
-</parameter_description>
-</parameter>
-<parameter name="end">
-<parameter_description> a #GtkTextIter.
-</parameter_description>
-</parameter>
-<parameter name="state">
-<parameter_description> a #GtkSourceGutterRendererState.
-</parameter_description>
-</parameter>
-</parameters>
-<return></return>
-</function>
-
<function name="gtk_source_buffer_set_highlight_syntax">
<description>
Controls whether syntax is highlighted in the buffer. If @highlight
diff --git a/gtksourceview/src/gtksourceview_methods.defs b/gtksourceview/src/gtksourceview_methods.defs
index 681ed9c..c373985 100644
--- a/gtksourceview/src/gtksourceview_methods.defs
+++ b/gtksourceview/src/gtksourceview_methods.defs
@@ -654,18 +654,6 @@
)
)
-(define-method set_sizing
- (of-object "GtkSourceCompletionInfo")
- (c-name "gtk_source_completion_info_set_sizing")
- (return-type "none")
- (parameters
- '("gint" "width")
- '("gint" "height")
- '("gboolean" "shrink_width")
- '("gboolean" "shrink_height")
- )
-)
-
(define-method set_widget
(of-object "GtkSourceCompletionInfo")
(c-name "gtk_source_completion_info_set_widget")
@@ -681,12 +669,6 @@
(return-type "GtkWidget*")
)
-(define-method process_resize
- (of-object "GtkSourceCompletionInfo")
- (c-name "gtk_source_completion_info_process_resize")
- (return-type "none")
-)
-
;; From gtksourcecompletionitem.h
@@ -905,34 +887,10 @@
(define-method insert
(of-object "GtkSourceGutter")
(c-name "gtk_source_gutter_insert")
- (return-type "GtkSourceGutterRenderer*")
- (parameters
- '("GType" "gtype")
- '("gint" "position")
- )
- (varargs #t)
-)
-
-(define-method insert_valist
- (of-object "GtkSourceGutter")
- (c-name "gtk_source_gutter_insert_valist")
- (return-type "GtkSourceGutterRenderer*")
- (parameters
- '("GType" "gtype")
- '("gint" "position")
- '("va_list" "ap")
- )
-)
-
-(define-method insertv
- (of-object "GtkSourceGutter")
- (c-name "gtk_source_gutter_insertv")
- (return-type "GtkSourceGutterRenderer*")
+ (return-type "gboolean")
(parameters
- '("GType" "gtype")
+ '("GtkSourceGutterRenderer*" "renderer")
'("gint" "position")
- '("guint" "num_parameters")
- '("GParameter*" "parameters")
)
)
@@ -996,8 +954,8 @@
(return-type "none")
(parameters
'("cairo_t*" "cr")
- '("const-GdkRectangle*" "background_area")
- '("const-GdkRectangle*" "cell_area")
+ '("GdkRectangle*" "background_area")
+ '("GdkRectangle*" "cell_area")
'("GtkTextIter*" "start")
'("GtkTextIter*" "end")
)
@@ -1009,8 +967,8 @@
(return-type "none")
(parameters
'("cairo_t*" "cr")
- '("const-GdkRectangle*" "background_area")
- '("const-GdkRectangle*" "cell_area")
+ '("GdkRectangle*" "background_area")
+ '("GdkRectangle*" "cell_area")
'("GtkTextIter*" "start")
'("GtkTextIter*" "end")
'("GtkSourceGutterRendererState" "state")
@@ -1125,7 +1083,7 @@
(c-name "gtk_source_gutter_renderer_get_background")
(return-type "gboolean")
(parameters
- '("GdkColor*" "color")
+ '("GdkRGBA*" "color")
)
)
@@ -1134,7 +1092,7 @@
(c-name "gtk_source_gutter_renderer_set_background")
(return-type "none")
(parameters
- '("const-GdkColor*" "color")
+ '("const-GdkRGBA*" "color")
)
)
@@ -1144,7 +1102,7 @@
(return-type "none")
(parameters
'("GtkTextIter*" "iter")
- '("const-GdkRectangle*" "area")
+ '("GdkRectangle*" "area")
'("GdkEvent*" "event")
)
)
@@ -1155,7 +1113,7 @@
(return-type "gboolean")
(parameters
'("GtkTextIter*" "iter")
- '("const-GdkRectangle*" "area")
+ '("GdkRectangle*" "area")
'("GdkEvent*" "event")
)
)
@@ -1172,7 +1130,7 @@
(return-type "gboolean")
(parameters
'("GtkTextIter*" "iter")
- '("const-GdkRectangle*" "area")
+ '("GdkRectangle*" "area")
'("gint" "x")
'("gint" "y")
'("GtkTooltip*" "tooltip")
@@ -1235,36 +1193,6 @@
(return-type "const-gchar*")
)
-(define-method set_icon_size
- (of-object "GtkSourceGutterRendererPixbuf")
- (c-name "gtk_source_gutter_renderer_pixbuf_set_icon_size")
- (return-type "none")
- (parameters
- '("GtkIconSize" "size")
- )
-)
-
-(define-method get_icon_size
- (of-object "GtkSourceGutterRendererPixbuf")
- (c-name "gtk_source_gutter_renderer_pixbuf_get_icon_size")
- (return-type "GtkIconSize")
-)
-
-(define-method set_stock_detail
- (of-object "GtkSourceGutterRendererPixbuf")
- (c-name "gtk_source_gutter_renderer_pixbuf_set_stock_detail")
- (return-type "none")
- (parameters
- '("const-gchar*" "stock_detail")
- )
-)
-
-(define-method get_stock_detail
- (of-object "GtkSourceGutterRendererPixbuf")
- (c-name "gtk_source_gutter_renderer_pixbuf_get_stock_detail")
- (return-type "const-gchar*")
-)
-
(define-method set_gicon
(of-object "GtkSourceGutterRendererPixbuf")
(c-name "gtk_source_gutter_renderer_pixbuf_set_gicon")
@@ -1510,7 +1438,7 @@
(c-name "gtk_source_mark_category_set_background")
(return-type "none")
(parameters
- '("const-GdkColor*" "background")
+ '("const-GdkRGBA*" "background")
)
)
@@ -1519,7 +1447,7 @@
(c-name "gtk_source_mark_category_get_background")
(return-type "gboolean")
(parameters
- '("GdkColor*" "background")
+ '("GdkRGBA*" "background")
)
)
@@ -1553,21 +1481,6 @@
(return-type "const-gchar*")
)
-(define-method set_stock_detail
- (of-object "GtkSourceMarkCategory")
- (c-name "gtk_source_mark_category_set_stock_detail")
- (return-type "none")
- (parameters
- '("const-gchar*" "stock_detail")
- )
-)
-
-(define-method get_stock_detail
- (of-object "GtkSourceMarkCategory")
- (c-name "gtk_source_mark_category_get_stock_detail")
- (return-type "const-gchar*")
-)
-
(define-method set_icon_name
(of-object "GtkSourceMarkCategory")
(c-name "gtk_source_mark_category_set_icon_name")
diff --git a/gtksourceview/src/gtksourceview_signals.defs b/gtksourceview/src/gtksourceview_signals.defs
index f57557e..b9c624f 100644
--- a/gtksourceview/src/gtksourceview_signals.defs
+++ b/gtksourceview/src/gtksourceview_signals.defs
@@ -952,42 +952,6 @@
(construct-only #f)
)
-(define-property max-width
- (of-object "GtkSourceCompletionInfo")
- (prop-type "GParamInt")
- (docs "The maximum allowed width")
- (readable #t)
- (writable #t)
- (construct-only #f)
-)
-
-(define-property max-height
- (of-object "GtkSourceCompletionInfo")
- (prop-type "GParamInt")
- (docs "The maximum allowed height")
- (readable #t)
- (writable #t)
- (construct-only #f)
-)
-
-(define-property shrink-width
- (of-object "GtkSourceCompletionInfo")
- (prop-type "GParamBoolean")
- (docs "Whether the window should shrink width to fit the contents")
- (readable #t)
- (writable #t)
- (construct-only #f)
-)
-
-(define-property shrink-height
- (of-object "GtkSourceCompletionInfo")
- (prop-type "GParamBoolean")
- (docs "Whether the window should shrink height to fit the contents")
- (readable #t)
- (writable #t)
- (construct-only #f)
-)
-
;; From GtkSourceCompletionItem
(define-property label
@@ -1187,8 +1151,8 @@
(prop-type "GParamObject")
(docs "The view")
(readable #t)
- (writable #t)
- (construct-only #t)
+ (writable #f)
+ (construct-only #f)
)
(define-property alignment-mode
@@ -1205,8 +1169,8 @@
(prop-type "GParamEnum")
(docs "The window type")
(readable #t)
- (writable #t)
- (construct-only #t)
+ (writable #f)
+ (construct-only #f)
)
(define-property size
@@ -1218,7 +1182,7 @@
(construct-only #f)
)
-(define-property background-gdk
+(define-property background-rgba
(of-object "GtkSourceGutterRenderer")
(prop-type "GParamBoxed")
(docs "The background color")
@@ -1288,8 +1252,8 @@
(prop-type "GParamObject")
(docs "The view")
(readable #t)
- (writable #t)
- (construct-only #t)
+ (writable #f)
+ (construct-only #f)
)
(define-property alignment-mode
@@ -1306,8 +1270,8 @@
(prop-type "GParamEnum")
(docs "The window type")
(readable #t)
- (writable #t)
- (construct-only #t)
+ (writable #f)
+ (construct-only #f)
)
(define-property size
@@ -1319,7 +1283,7 @@
(construct-only #f)
)
-(define-property background-gdk
+(define-property background-rgba
(of-object "GtkSourceGutterRendererPixbuf")
(prop-type "GParamBoxed")
(docs "The background color")
@@ -1373,15 +1337,6 @@
(construct-only #f)
)
-(define-property stock-detail
- (of-object "GtkSourceGutterRendererPixbuf")
- (prop-type "GParamString")
- (docs "The stock detail")
- (readable #t)
- (writable #t)
- (construct-only #f)
-)
-
;; From GtkSourceGutterRendererText
(define-property visible
@@ -1434,8 +1389,8 @@
(prop-type "GParamObject")
(docs "The view")
(readable #t)
- (writable #t)
- (construct-only #t)
+ (writable #f)
+ (construct-only #f)
)
(define-property alignment-mode
@@ -1452,8 +1407,8 @@
(prop-type "GParamEnum")
(docs "The window type")
(readable #t)
- (writable #t)
- (construct-only #t)
+ (writable #f)
+ (construct-only #f)
)
(define-property size
@@ -1465,7 +1420,7 @@
(construct-only #f)
)
-(define-property background-gdk
+(define-property background-rgba
(of-object "GtkSourceGutterRendererText")
(prop-type "GParamBoxed")
(docs "The background color")
@@ -1644,15 +1599,6 @@
(construct-only #f)
)
-(define-property stock-detail
- (of-object "GtkSourceMarkCategory")
- (prop-type "GParamString")
- (docs "The stock detail")
- (readable #t)
- (writable #t)
- (construct-only #f)
-)
-
(define-property pixbuf
(of-object "GtkSourceMarkCategory")
(prop-type "GParamObject")
diff --git a/gtksourceview/src/gtksourceview_vfuncs.defs b/gtksourceview/src/gtksourceview_vfuncs.defs
index 61e507e..de26283 100644
--- a/gtksourceview/src/gtksourceview_vfuncs.defs
+++ b/gtksourceview/src/gtksourceview_vfuncs.defs
@@ -156,8 +156,8 @@
(return-type "void")
(parameters
'("cairo_t*" "cr")
- '("const-GdkRectangle*" "background_area")
- '("const-GdkRectangle*" "cell_area")
+ '("GdkRectangle*" "background_area")
+ '("GdkRectangle*" "cell_area")
'("GtkTextIter*" "start")
'("GtkTextIter*" "end")
)
@@ -168,8 +168,8 @@
(return-type "void")
(parameters
'("cairo_t*" "cr")
- '("const-GdkRectangle*" "background_area")
- '("const-GdkRectangle*" "cell_area")
+ '("GdkRectangle*" "background_area")
+ '("GdkRectangle*" "cell_area")
'("GtkTextIter*" "start")
'("GtkTextIter*" "end")
'("GtkSourceGutterRendererState" "state")
diff --git a/gtksourceview/src/sourcecompletioninfo.hg b/gtksourceview/src/sourcecompletioninfo.hg
index 25dedb2..3a531be 100644
--- a/gtksourceview/src/sourcecompletioninfo.hg
+++ b/gtksourceview/src/sourcecompletioninfo.hg
@@ -99,11 +99,6 @@ public:
*/
_WRAP_METHOD(const Gtk::Widget* get_widget() const, gtk_source_completion_info_get_widget, constversion)
- _WRAP_PROPERTY("max-height", int)
- _WRAP_PROPERTY("max-width", int)
- _WRAP_PROPERTY("shrink-height", bool)
- _WRAP_PROPERTY("shrink-width", bool)
-
/** Emited before any "show" management.
*
* You can connect to this signal if you want to change some properties or
diff --git a/gtksourceview/src/sourcegutter.hg b/gtksourceview/src/sourcegutter.hg
index b8514b0..2c268ee 100644
--- a/gtksourceview/src/sourcegutter.hg
+++ b/gtksourceview/src/sourcegutter.hg
@@ -23,7 +23,7 @@
#include <gdkmm/window.h>
#include <glibmm/object.h>
#include <glibmm/refptr.h>
-#include <gtkmm/tooltip.h>
+#include <gtksourceviewmm/sourcegutterrenderer.h>
#include <gtksourceviewmm/sourceview.h>
_DEFS(gtksourceviewmm,gtksourceview)
@@ -32,6 +32,7 @@ _PINCLUDE(glibmm/private/object_p.h)
namespace Gsv
{
+class SourceGutterRenderer;
class SourceView;
// TODO: update docs.
@@ -63,6 +64,9 @@ class SourceGutter : public Glib::Object
_CLASS_GOBJECT(SourceGutter, GtkSourceGutter, GTK_SOURCE_GUTTER, Glib::Object, GObject)
public:
+// TODO: remove it later - it should take a conversion definition from gtkmm,
+// but it fails with some strange casting to GtkWindowObject.
+#m4 _CONVERSION(`GdkWindow*',`Glib::RefPtr<Gdk::Window>',`Glib::wrap($3)')
/** Get the Gdk::Window of the gutter.
*
* The window will only be available when the gutter has at least one,
@@ -113,6 +117,12 @@ public:
*/
// _WRAP_METHOD(void remove(Gtk::CellRenderer* renderer), gtk_source_gutter_remove)
+ _WRAP_METHOD(void insert(SourceGutterRenderer* renderer, int position), gtk_source_gutter_insert)
+
+ _WRAP_METHOD(void remove(SourceGutterRenderer* renderer), gtk_source_gutter_remove)
+
+ _WRAP_METHOD(void reorder(SourceGutterRenderer* renderer, int position), gtk_source_gutter_reorder)
+
_WRAP_METHOD(void queue_draw(), gtk_source_gutter_queue_draw)
_WRAP_METHOD(void set_padding(int xpad, int ypad), gtk_source_gutter_set_padding)
diff --git a/gtksourceview/src/sourcegutterrenderer.hg b/gtksourceview/src/sourcegutterrenderer.hg
index ba02d3d..fde7754 100644
--- a/gtksourceview/src/sourcegutterrenderer.hg
+++ b/gtksourceview/src/sourcegutterrenderer.hg
@@ -21,6 +21,7 @@
/// \brief SourceGutterRenderer class
#include <gtkmm/object.h>
+#include <gtkmm/tooltip.h>
#include <gtksourceviewmm/sourceview.h>
_DEFS(gtksourceviewmm,gtksourceview)
@@ -39,7 +40,7 @@ class SourceGutterRenderer : public Gtk::Object
_CLASS_GTKOBJECT(SourceGutterRenderer, GtkSourceGutterRenderer, GTK_SOURCE_GUTTER_RENDERER, Gtk::Object, GInitiallyUnowned)
public:
#m4 _CONVERSION(`const Cairo::RefPtr<Cairo::Context>&', `cairo_t*', `(($3) ? ($3)->cobj() : 0)')
-#m4 _CONVERSION(`const Gdk::Rectangle&',`const GdkRectangle*',($3).gobj())
+//#m4 _CONVERSION(`const Gdk::Rectangle&',`GdkRectangle*',($3).gobj())
#m4 _CONVERSION(`Gtk::TextIter&',`GtkTextIter*',($3).gobj())
_WRAP_METHOD(void begin(
const Cairo::RefPtr<Cairo::Context>& cr,
@@ -91,18 +92,44 @@ public:
// TODO: use std::pair? krnowak
-#m4 _CONVERSION(`Gdk::Color&',`GdkColor*',`($3).gobj()')
- _WRAP_METHOD(bool get_background(Gdk::Color& color) const, gtk_source_gutter_renderer_get_background)
+#m4 _CONVERSION(`Gdk::RGBA&',`GdkRGBA*',`($3).gobj()')
+ _WRAP_METHOD(bool get_background(Gdk::RGBA& color) const, gtk_source_gutter_renderer_get_background)
bool is_background_set() const;
-#m4 _CONVERSION(`const Gdk::Color&',`const GdkColor*',`($3).gobj()')
- _WRAP_METHOD(void set_background(const Gdk::Color& color), gtk_source_gutter_renderer_set_background)
+#m4 _CONVERSION(`const Gdk::RGBA&',`const GdkRGBA*',`($3).gobj()')
+ _WRAP_METHOD(void set_background(const Gdk::RGBA& color), gtk_source_gutter_renderer_set_background)
_IGNORE(gtk_source_gutter_renderer_activate, gtk_source_gutter_renderer_query_activatable, gtk_source_gutter_renderer_query_tooltip, gtk_source_gutter_renderer_query_data)
_WRAP_METHOD(void queue_draw(), gtk_source_gutter_renderer_queue_draw)
+#m4 _CONVERSION(`GdkRectangle*',`const Gdk::Rectangle&',`Glib::wrap($3)')
+#m4 _CONVERSION(`GtkTextIter*',`const Gtk::TextIter&',`Glib::wrap($3)')
+#m4 _CONVERSION(`const Gtk::TextIter&',`GtkTextIter*',`const_cast<GtkTextIter*>(($3).gobj())')
+#m4 _CONVERSION(`GtkTooltip*', `const Glib::RefPtr<Gtk::Tooltip>&', `Glib::wrap($3, true)')
+#m4 _CONVERSION(`const Glib::RefPtr<Gtk::Tooltip>&',`GtkTooltip*',`const_cast<GtkTooltip*>(Glib::unwrap($3))')
+
+ _WRAP_SIGNAL(bool query_tooltip(const Gtk::TextIter& iter,
+ const Gdk::Rectangle& area,
+ int x,
+ int y,
+ const Glib::RefPtr<Gtk::Tooltip>& tooltip), "query-tooltip")
+
+ _WRAP_SIGNAL(void activate(const Gtk::TextIter& iter,
+ const Gdk::Rectangle& area,
+ GdkEvent* event), "activate")
+
+ _WRAP_SIGNAL(void queue_draw(), "queue-draw");
+
+ _WRAP_SIGNAL(void query_data(const Gtk::TextIter& start,
+ const Gtk::TextIter& end,
+ SourceGutterRendererState state), "query-data");
+
+ _WRAP_SIGNAL(bool query_activatable(const Gtk::TextIter& iter,
+ const Gdk::Rectangle& area,
+ GdkEvent* event), "query-activatable")
+
protected:
_CTOR_DEFAULT()
@@ -110,9 +137,7 @@ protected:
dnl This extra conversion does the extra reference, often needed by code for vfuncs and signal.
_CONVERSION(`cairo_t*',`const Cairo::RefPtr<Cairo::Context>&',`Cairo::RefPtr<Cairo::Context>(new Cairo::Context($3, false /* has_reference */))')
#m4end
-
-#m4 _CONVERSION(`const GdkRectangle*',`const Gdk::Rectangle&',`Glib::wrap($3)')
-#m4 _CONVERSION(`GdkRectangle*',`const Gdk::Rectangle&',`Glib::wrap($3)')
+//#m4 _CONVERSION(`GdkRectangle*',`const Gdk::Rectangle&',`Glib::wrap($3)')
#m4 _CONVERSION(`GtkTextIter*',`Gtk::TextIter&',`Glib::wrap($3)')
_WRAP_VFUNC(void begin(
diff --git a/gtksourceview/src/sourcegutterrendererpixbuf.hg b/gtksourceview/src/sourcegutterrendererpixbuf.hg
index 90ff298..236363f 100644
--- a/gtksourceview/src/sourcegutterrendererpixbuf.hg
+++ b/gtksourceview/src/sourcegutterrendererpixbuf.hg
@@ -48,14 +48,6 @@ public:
_WRAP_METHOD(void set_stock_id(const std::string& stock_id), gtk_source_gutter_renderer_pixbuf_set_stock_id)
- _WRAP_METHOD(Gtk::IconSize get_icon_size() const, gtk_source_gutter_renderer_pixbuf_get_icon_size)
-
- _WRAP_METHOD(void set_icon_size(Gtk::IconSize size), gtk_source_gutter_renderer_pixbuf_set_icon_size)
-
- _WRAP_METHOD(std::string get_stock_detail() const, gtk_source_gutter_renderer_pixbuf_get_stock_detail)
-
- _WRAP_METHOD(void set_stock_detail(const std::string& stock_detail), gtk_source_gutter_renderer_pixbuf_set_stock_detail)
-
#m4 _CONVERSION(`GIcon*', `Glib::RefPtr<Gio::Icon>', `Glib::wrap($3)')
_WRAP_METHOD(Glib::RefPtr<Gio::Icon> get_icon(), gtk_source_gutter_renderer_pixbuf_get_gicon, refreturn)
@@ -67,100 +59,6 @@ public:
_WRAP_METHOD(std::string get_icon_name() const, gtk_source_gutter_renderer_pixbuf_get_icon_name)
_WRAP_METHOD(void set_icon_name(const std::string& icon_name), gtk_source_gutter_renderer_pixbuf_set_icon_name)
-
-/*
-
-
-#m4 _CONVERSION(`const Cairo::RefPtr<Cairo::Context>&', `cairo_t*', `(($3) ? ($3)->cobj() : 0)')
-#m4 _CONVERSION(`const Gdk::Rectangle&',`const GdkRectangle*',($3).gobj())
-#m4 _CONVERSION(`Gtk::TextIter&',`GtkTextIter*',($3).gobj())
- _WRAP_METHOD(void begin(
- const Cairo::RefPtr<Cairo::Context>& cr,
- const Gdk::Rectangle& background_area,
- const Gdk::Rectangle& cell_area,
- Gtk::TextIter& start,
- Gtk::TextIter& end), gtk_source_gutter_renderer_begin)
-
- _WRAP_METHOD(void draw(
- const Cairo::RefPtr<Cairo::Context>& cr,
- const Gdk::Rectangle& background_area,
- const Gdk::Rectangle& cell_area,
- Gtk::TextIter& start,
- Gtk::TextIter& end,
- SourceGutterRendererState), gtk_source_gutter_renderer_draw)
-
- _WRAP_METHOD(void end(), gtk_source_gutter_renderer_end)
-
- _WRAP_METHOD(int get_size() const, gtk_source_gutter_renderer_get_size)
-
- _WRAP_METHOD(void set_size(int size), gtk_source_gutter_renderer_set_size)
-
- _WRAP_METHOD(bool get_visible() const, gtk_source_gutter_renderer_get_visible)
-
- _WRAP_METHOD(void set_visible(bool visible), gtk_source_gutter_renderer_set_visible)
-
-// TODO: write padding class. krnowak
-
- _WRAP_METHOD(void get_padding(int& xpad, int& ypad) const, gtk_source_gutter_renderer_get_padding)
-
- _WRAP_METHOD(void set_padding(int xpad, int ypad), gtk_source_gutter_renderer_set_padding)
-
-// TODO: write alignment class. krnowak
-
- _WRAP_METHOD(void get_alignment(float& xalign, float& yalign) const, gtk_source_gutter_renderer_get_alignment)
-
- _WRAP_METHOD(void set_alignment(float xalign, float yalign), gtk_source_gutter_renderer_set_alignment)
-
- _WRAP_METHOD(SourceGutterRendererAlignmentMode get_alignment_mode() const, gtk_source_gutter_renderer_get_alignment_mode)
-
- _WRAP_METHOD(void set_alignment_mode(SourceGutterRendererAlignmentMode mode), gtk_source_gutter_renderer_set_alignment_mode)
-
- _WRAP_METHOD(Gtk::TextWindowType get_window_type() const, gtk_source_gutter_renderer_get_window_type)
-
-#m4 _CONVERSION(GtkTextView*, Gtk::TextView*, Glib::wrap($3))
- _WRAP_METHOD(Gtk::TextView* get_view(), gtk_source_gutter_renderer_get_view)
-
- _WRAP_METHOD(const Gtk::TextView* get_view() const, gtk_source_gutter_renderer_get_view, constversion)
-
-// TODO: use std::pair? krnowak
-
-#m4 _CONVERSION(`Gdk::Color&',`GdkColor*',`($3).gobj()')
- _WRAP_METHOD(bool get_background(Gdk::Color& color) const, gtk_source_gutter_renderer_get_background)
-
- bool is_background_set() const;
-
-#m4 _CONVERSION(`const Gdk::Color&',`const GdkColor*',`($3).gobj()')
- _WRAP_METHOD(void set_background(const Gdk::Color& color), gtk_source_gutter_renderer_set_background)
-
- _IGNORE(gtk_source_gutter_renderer_activate, gtk_source_gutter_renderer_query_activatable, gtk_source_gutter_renderer_query_tooltip, gtk_source_gutter_renderer_query_data)
-
- _WRAP_METHOD(void queue_draw(), gtk_source_gutter_renderer_queue_draw)
-
-protected:
-
-
-#m4 _CONVERSION(`const GdkRectangle*',`const Gdk::Rectangle&',`Glib::wrap($3)')
-#m4 _CONVERSION(`GdkRectangle*',`const Gdk::Rectangle&',`Glib::wrap($3)')
-#m4 _CONVERSION(`GtkTextIter*',`Gtk::TextIter&',`Glib::wrap($3)')
-
- _WRAP_VFUNC(void begin(
- const Cairo::RefPtr<Cairo::Context>& cr,
- const Gdk::Rectangle& background_area,
- const Gdk::Rectangle& cell_area,
- Gtk::TextIter& start,
- Gtk::TextIter& end), begin)
-
- _WRAP_VFUNC(void draw(
- const Cairo::RefPtr<Cairo::Context>& cr,
- const Gdk::Rectangle& background_area,
- const Gdk::Rectangle& cell_area,
- Gtk::TextIter& start,
- Gtk::TextIter& end,
- SourceGutterRendererState), draw)
-
- _WRAP_VFUNC(void end(), end)
-
-public: */
};
} // namespace Gsv
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]