[gtksourceviewmm] Added SourceCompletionWords provider.
- From: Krzesimir Nowak <krnowak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceviewmm] Added SourceCompletionWords provider.
- Date: Fri, 26 Feb 2010 13:26:47 +0000 (UTC)
commit 5141e0cbc36a1be9cc70ce5b1027be72c9e523cf
Author: Krzesimir Nowak <qdlacz gmail com>
Date: Thu Feb 25 17:17:31 2010 +0100
Added SourceCompletionWords provider.
* gtksourceview/src/sourcecompletionwords.hg:
* gtksourceview/src/sourcecompletionwords.ccg: New files
implementing wrapper.
* gtksourceview/src/filelist.am: Added newly added sources to build
system.
* gtksourceview/gtksourceviewmm.h: Added sourcecompletionwords.h to
list.
* gtksourceview/gtksourceviewmm/.gitignore: Ignore generated
sources.
* codegen/m4/convert_gtksourceview.m4: Added needed conversion.
codegen/m4/convert_gtksourceview.m4 | 4 ++
gtksourceview/gtksourceviewmm.h | 1 +
gtksourceview/gtksourceviewmm/.gitignore | 1 +
gtksourceview/src/filelist.am | 1 +
gtksourceview/src/sourcecompletionwords.ccg | 20 +++++++++
gtksourceview/src/sourcecompletionwords.hg | 62 +++++++++++++++++++++++++++
6 files changed, 89 insertions(+), 0 deletions(-)
---
diff --git a/codegen/m4/convert_gtksourceview.m4 b/codegen/m4/convert_gtksourceview.m4
index 59388ce..e5ea907 100644
--- a/codegen/m4/convert_gtksourceview.m4
+++ b/codegen/m4/convert_gtksourceview.m4
@@ -22,6 +22,10 @@ _CONVERSION(`Gtk::CellRenderer*',`GtkCellRenderer*',`Glib::unwrap($3)')
_CONVERSION(`const Glib::RefPtr<Gtk::PrintContext>&',`GtkPrintContext*',`Glib::unwrap($3)')
+# Gtk::TextBuffer -> GtkTextBuffer
+_CONVERSION(`const Glib::RefPtr<Gtk::TextBuffer>&',`GtkTextBuffer*',`Glib::unwrap($3)')
+
+
# GtkTextIter -> Gtk::TextIter
_CONVERSION(`GtkTextIter*',`const Gtk::TextIter&',`Glib::wrap($3)')
_CONVERSION(`GtkTextIter*',`Gtk::TextIter&',`Glib::wrap($3)')
diff --git a/gtksourceview/gtksourceviewmm.h b/gtksourceview/gtksourceviewmm.h
index a9e82b5..e0eeaec 100644
--- a/gtksourceview/gtksourceviewmm.h
+++ b/gtksourceview/gtksourceviewmm.h
@@ -80,6 +80,7 @@
#include <gtksourceviewmm/sourcecompletionitem.h>
#include <gtksourceviewmm/sourcecompletionproposal.h>
#include <gtksourceviewmm/sourcecompletionprovider.h>
+#include <gtksourceviewmm/sourcecompletionwords.h>
#include <gtksourceviewmm/sourcegutter.h>
#include <gtksourceviewmm/sourceiter.h>
#include <gtksourceviewmm/sourcelanguage.h>
diff --git a/gtksourceview/gtksourceviewmm/.gitignore b/gtksourceview/gtksourceviewmm/.gitignore
index 3c9ff6a..9a8bdab 100644
--- a/gtksourceview/gtksourceviewmm/.gitignore
+++ b/gtksourceview/gtksourceviewmm/.gitignore
@@ -6,6 +6,7 @@
/sourcecompletionitem.*
/sourcecompletionproposal.*
/sourcecompletionprovider.*
+/sourcecompletionwords.*
/sourcegutter.*
/sourceiter.*
/sourcelanguage.*
diff --git a/gtksourceview/src/filelist.am b/gtksourceview/src/filelist.am
index e9ac23d..a132644 100644
--- a/gtksourceview/src/filelist.am
+++ b/gtksourceview/src/filelist.am
@@ -17,6 +17,7 @@ files_hg = \
sourcecompletionitem.hg \
sourcecompletionproposal.hg \
sourcecompletionprovider.hg \
+ sourcecompletionwords.hg \
sourcegutter.hg \
sourceiter.hg \
sourcelanguage.hg \
diff --git a/gtksourceview/src/sourcecompletionwords.ccg b/gtksourceview/src/sourcecompletionwords.ccg
new file mode 100644
index 0000000..caf2873
--- /dev/null
+++ b/gtksourceview/src/sourcecompletionwords.ccg
@@ -0,0 +1,20 @@
+/* sourcecompletionwords.cc
+ *
+ * Copyright (C) 2010 Krzesimir Nowak
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtksourceview/completion-providers/words/gtksourcecompletionwords.h>
diff --git a/gtksourceview/src/sourcecompletionwords.hg b/gtksourceview/src/sourcecompletionwords.hg
new file mode 100644
index 0000000..36a7143
--- /dev/null
+++ b/gtksourceview/src/sourcecompletionwords.hg
@@ -0,0 +1,62 @@
+/* sourcecompletionwords.h
+ *
+ * Copyright (C) 2010 Krzesimir Nowak
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/object.h>
+#include <gtksourceviewmm/sourcecompletionprovider.h>
+
+_DEFS(gtksourceviewmm,gtksourceview)
+_PINCLUDE(glibmm/private/object_p.h)
+
+namespace gtksourceview
+{
+
+class SourceCompletionWords
+:
+ public Glib::Object,
+ public SourceCompletionProvider
+{
+ _CLASS_GOBJECT(SourceCompletionWords, GtkSourceCompletionWords, GTK_SOURCE_COMPLETION_WORDS, Glib::Object, GObject)
+ _IMPLEMENTS_INTERFACE(SourceCompletionProvider)
+protected:
+ _WRAP_CTOR(SourceCompletionWords(const Glib::ustring& name, const Glib::RefPtr<Gdk::Pixbuf>& icon), gtk_source_completion_words_new)
+public:
+ _WRAP_CREATE(const Glib::ustring& name, const Glib::RefPtr<Gdk::Pixbuf>& icon)
+
+// TODO: think about a good method name - register is a C/C++ keyword.
+ _WRAP_METHOD(void register_provider(const Glib::RefPtr<Gtk::TextBuffer>& buffer), gtk_source_completion_words_register)
+
+ _WRAP_METHOD(void unregister_provider(const Glib::RefPtr<Gtk::TextBuffer>& buffer), gtk_source_completion_words_unregister)
+
+ _WRAP_PROPERTY("name", Glib::ustring)
+
+ _WRAP_PROPERTY("icon", Glib::RefPtr<Gdk::Pixbuf>)
+
+ _WRAP_PROPERTY("proposals-batch-size", guint)
+
+ _WRAP_PROPERTY("scan-batch-size", guint)
+
+ _WRAP_PROPERTY("minimum-word-size", guint)
+
+ _WRAP_PROPERTY("interactive-delay", int)
+
+ _WRAP_PROPERTY("priority", int)
+};
+
+} /* namespace gtksourceview */
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]