[gtksourceviewmm] Added vfunc wrappers to Proposal and Provider.
- From: Krzesimir Nowak <krnowak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceviewmm] Added vfunc wrappers to Proposal and Provider.
- Date: Thu, 25 Feb 2010 00:15:52 +0000 (UTC)
commit 29490fd0dd9c58fdcf06a6f2c517eda2565337c7
Author: Krzesimir Nowak <qdlacz gmail com>
Date: Thu Feb 25 01:07:46 2010 +0100
Added vfunc wrappers to Proposal and Provider.
* gtksourceview/src/gtksourceview_vfuncs.defs: Add missing closing
paren - that caused some vfuncs to be not wrapped.
* gtksourceview/src/filelist.am: Added gtksourceview_vfuncs.defs to
build system.
* gtksourceview/src/sourcecompletionproposal.hg:
* gtksourceview/src/sourcecompletionprovider.hg: Added vfuncs
wrappers.
* codegen/m4/convert_gtksourceview.m4: Added some needed
conversions.
codegen/m4/convert_gtksourceview.m4 | 7 +++++++
gtksourceview/src/filelist.am | 1 +
gtksourceview/src/gtksourceview_vfuncs.defs | 2 +-
gtksourceview/src/sourcecompletionproposal.hg | 16 ++++++++++++++--
gtksourceview/src/sourcecompletionprovider.hg | 22 ++++++++++++++++++++++
5 files changed, 45 insertions(+), 3 deletions(-)
---
diff --git a/codegen/m4/convert_gtksourceview.m4 b/codegen/m4/convert_gtksourceview.m4
index 1c20ec1..f1157dd 100644
--- a/codegen/m4/convert_gtksourceview.m4
+++ b/codegen/m4/convert_gtksourceview.m4
@@ -69,6 +69,7 @@ _CONVERSION(`GtkSourceCompletion*',`const SourceCompletion*',`Glib::wrap($3)')
# GtkSourceCompletionContext -> gtksourceview::SourceCompletionContext
_CONVERSION(`GtkSourceCompletionContext*',`Glib::RefPtr<SourceCompletionContext>',`Glib::wrap($3)')
_CONVERSION(`GtkSourceCompletionContext*',`const Glib::RefPtr<SourceCompletionContext>&',`Glib::wrap($3)')
+_CONVERSION(`GtkSourceCompletionContext*',`const Glib::RefPtr<const SourceCompletionContext>&',`Glib::wrap($3)')
# gtksourceview::SourceCompletionContext -> GtkSourceCompletionContext
@@ -78,12 +79,18 @@ _CONVERSION(`const Glib::RefPtr<const SourceCompletionContext>&',`GtkSourceCompl
# GtkSourceCompletionInfo -> gtksourceview::SourceCompletionInfo
_CONVERSION(`GtkSourceCompletionInfo*',`SourceCompletionInfo*',`Glib::wrap($3)')
+_CONVERSION(`GtkSourceCompletionInfo*',`const SourceCompletionInfo&',`(*(Glib::wrap($3)))')
# gtksourceview::SourceCompletionInfo -> GtkSourceCompletionInfo
_CONVERSION(`const SourceCompletionInfo&',`GtkSourceCompletionInfo*',`const_cast<GtkSourceCompletionInfo*>(($3).gobj())')
+# GtkSourceCompletionProposal -> gtksourceview::SourceCompletionProposal
+_CONVERSION(`GtkSourceCompletionProposal*',`const Glib::RefPtr<SourceCompletionProposal>&',`Glib::wrap($3)')
+_CONVERSION(`GtkSourceCompletionProposal*',`const Glib::RefPtr<const SourceCompletionProposal>&',`Glib::wrap($3)')
+
+
# gtksourceview::SourceCompletionProposal -> GtkSourceCompletionProposal
_CONVERSION(`const Glib::RefPtr<const SourceCompletionProposal>&',`GtkSourceCompletionProposal*',`const_cast<GtkSourceCompletionProposal*>(Glib::unwrap($3))')
_CONVERSION(`const Glib::RefPtr<SourceCompletionProposal>&',`GtkSourceCompletionProposal*',`Glib::unwrap($3)')
diff --git a/gtksourceview/src/filelist.am b/gtksourceview/src/filelist.am
index 61d12c9..402a720 100644
--- a/gtksourceview/src/filelist.am
+++ b/gtksourceview/src/filelist.am
@@ -4,6 +4,7 @@ files_defs = \
gtksourceview_methods.defs \
gtksourceview_enums.defs \
gtksourceview_others.defs \
+ gtksourceview_vfuncs.defs \
gtksourceview_docs.xml \
gtksourceview_docs_override.xml
diff --git a/gtksourceview/src/gtksourceview_vfuncs.defs b/gtksourceview/src/gtksourceview_vfuncs.defs
index 7abf35b..da87b10 100644
--- a/gtksourceview/src/gtksourceview_vfuncs.defs
+++ b/gtksourceview/src/gtksourceview_vfuncs.defs
@@ -92,7 +92,7 @@
(of-object "GtkSourceCompletionProvider")
(return-type "gboolean")
(parameters
- '("GtkSourceCompletionContext*" "context"
+ '("GtkSourceCompletionContext*" "context")
'("GtkSourceCompletionProposal*" "proposal")
'("GtkTextIter*" "iter")
)
diff --git a/gtksourceview/src/sourcecompletionproposal.hg b/gtksourceview/src/sourcecompletionproposal.hg
index 3908a51..1e9b862 100644
--- a/gtksourceview/src/sourcecompletionproposal.hg
+++ b/gtksourceview/src/sourcecompletionproposal.hg
@@ -28,8 +28,6 @@ _PINCLUDE(glibmm/private/object_p.h)
namespace gtksourceview
{
-// XXX: that interface won't work - see bgo 610342
-// TODO: add vfuncs after above bug is fixed.
/** Completion proposal object.
*
* The proposal interface represents a completion item in the completion window.
@@ -143,6 +141,20 @@ public:
* @newin{2,10}
*/
_WRAP_SIGNAL(void changed(), "changed")
+
+ _WRAP_VFUNC(Glib::ustring get_label() const, get_label)
+
+ _WRAP_VFUNC(Glib::ustring get_markup() const, get_markup)
+
+ _WRAP_VFUNC(Glib::ustring get_text() const, get_text)
+
+ _WRAP_VFUNC(Glib::RefPtr<Gdk::Pixbuf> get_icon() const, get_icon, refreturn)
+
+ _WRAP_VFUNC(Glib::ustring get_info() const, get_info)
+
+ _WRAP_VFUNC(guint hash() const, hash)
+
+ _WRAP_VFUNC(bool equal(const Glib::RefPtr<const SourceCompletionProposal>& other) const, equal)
};
} // namespace gtksourceview
diff --git a/gtksourceview/src/sourcecompletionprovider.hg b/gtksourceview/src/sourcecompletionprovider.hg
index 90d0ef3..65937f3 100644
--- a/gtksourceview/src/sourcecompletionprovider.hg
+++ b/gtksourceview/src/sourcecompletionprovider.hg
@@ -178,6 +178,28 @@ public:
* @newin{2,10}
*/
_WRAP_METHOD(int get_priority() const, gtk_source_completion_provider_get_priority)
+
+ _WRAP_VFUNC(Glib::ustring get_name() const, get_name)
+
+ _WRAP_VFUNC(Glib::RefPtr<Gdk::Pixbuf> get_icon(), get_icon, refreturn)
+
+ _WRAP_VFUNC(void populate(const Glib::RefPtr<SourceCompletionContext>& context), populate)
+
+ _WRAP_VFUNC(bool match(const Glib::RefPtr<const SourceCompletionContext>& context) const, match)
+
+ _WRAP_VFUNC(SourceCompletionActivation get_activation() const, get_activation)
+
+ _WRAP_VFUNC(Gtk::Widget* get_info_widget(const Glib::RefPtr<const SourceCompletionProposal>& proposal) const, get_info_widget)
+
+ _WRAP_VFUNC(void update_info(const Glib::RefPtr<const SourceCompletionProposal>& proposal, const SourceCompletionInfo& info), update_info)
+
+ _WRAP_VFUNC(bool get_start_iter(const Glib::RefPtr<const SourceCompletionContext>& context, const Glib::RefPtr<const SourceCompletionProposal>& proposal, Gtk::TextIter& iter), get_start_iter)
+
+ _WRAP_VFUNC(bool activate_proposal(const Glib::RefPtr<SourceCompletionProposal>& proposal, const Gtk::TextIter& iter), activate_proposal)
+
+ _WRAP_VFUNC(int get_interactive_delay() const, get_interactive_delay)
+
+ _WRAP_VFUNC(int get_priority() const, get_priority)
};
} // namespace gtksourceview
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]