gtksourceview3 2.2.5-x64-mingw32 → 3.0.0-x64-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (168) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +3 -4
  3. data/lib/gtksourceview3/loader.rb +46 -0
  4. data/lib/gtksourceview3/mark-attributes.rb +29 -0
  5. data/lib/gtksourceview3.rb +47 -12
  6. data/test/run-test.rb +2 -0
  7. data/test/{test_mark_attributes.rb → test-mark-attributes.rb} +1 -1
  8. data/test/{test_source_gutter_renderer.rb → test-source-gutter-renderer.rb} +0 -0
  9. data/test/{test_source_language_manager.rb → test-source-language-manager.rb} +6 -6
  10. data/test/{test_source_view.rb → test-source-view.rb} +1 -1
  11. data/vendor/local/bin/libgtksourceview-3.0-1.dll +0 -0
  12. data/vendor/local/include/gtksourceview-3.0/gtksourceview/gtksource.h +3 -0
  13. data/vendor/local/include/gtksourceview-3.0/gtksourceview/gtksourcebuffer.h +4 -5
  14. data/vendor/local/include/gtksourceview-3.0/gtksourceview/gtksourcecompletioncontext.h +1 -1
  15. data/vendor/local/include/gtksourceview-3.0/gtksourceview/gtksourcegutter.h +0 -3
  16. data/vendor/local/include/gtksourceview-3.0/gtksourceview/gtksourcesearchcontext.h +5 -0
  17. data/vendor/local/include/gtksourceview-3.0/gtksourceview/gtksourcestylescheme.h +5 -4
  18. data/vendor/local/include/gtksourceview-3.0/gtksourceview/gtksourcestyleschemechooser.h +60 -0
  19. data/vendor/local/include/gtksourceview-3.0/gtksourceview/gtksourcestyleschemechooserbutton.h +56 -0
  20. data/vendor/local/include/gtksourceview-3.0/gtksourceview/gtksourcestyleschemechooserwidget.h +56 -0
  21. data/vendor/local/include/gtksourceview-3.0/gtksourceview/gtksourcetypes.h +13 -0
  22. data/vendor/local/include/gtksourceview-3.0/gtksourceview/gtksourceview-typebuiltins.h +5 -0
  23. data/vendor/local/include/gtksourceview-3.0/gtksourceview/gtksourceview.h +41 -14
  24. data/vendor/local/lib/girepository-1.0/GtkSource-3.0.typelib +0 -0
  25. data/vendor/local/lib/libgtksourceview-3.0.dll.a +0 -0
  26. data/vendor/local/lib/libgtksourceview-3.0.la +3 -3
  27. data/vendor/local/lib/locale/bs/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
  28. data/vendor/local/lib/locale/cs/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
  29. data/vendor/local/lib/locale/da/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
  30. data/vendor/local/lib/locale/de/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
  31. data/vendor/local/lib/locale/el/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
  32. data/vendor/local/lib/locale/es/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
  33. data/vendor/local/lib/locale/eu/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
  34. data/vendor/local/lib/locale/fi/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
  35. data/vendor/local/lib/locale/fr/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
  36. data/vendor/local/lib/locale/gl/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
  37. data/vendor/local/lib/locale/he/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
  38. data/vendor/local/lib/locale/hu/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
  39. data/vendor/local/lib/locale/id/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
  40. data/vendor/local/lib/locale/it/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
  41. data/vendor/local/lib/locale/kk/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
  42. data/vendor/local/lib/locale/ko/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
  43. data/vendor/local/lib/locale/lt/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
  44. data/vendor/local/lib/locale/lv/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
  45. data/vendor/local/lib/locale/nb/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
  46. data/vendor/local/lib/locale/pl/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
  47. data/vendor/local/lib/locale/pt_BR/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
  48. data/vendor/local/lib/locale/ru/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
  49. data/vendor/local/lib/locale/sk/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
  50. data/vendor/local/lib/locale/sl/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
  51. data/vendor/local/lib/locale/sr/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
  52. data/vendor/local/lib/locale/sr@latin/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
  53. data/vendor/local/lib/locale/sv/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
  54. data/vendor/local/lib/locale/tr/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
  55. data/vendor/local/lib/locale/zh_TW/LC_MESSAGES/gtksourceview-3.0.mo +0 -0
  56. data/vendor/local/lib/pkgconfig/gtksourceview-3.0.pc +2 -2
  57. data/vendor/local/share/gir-1.0/GtkSource-3.0.gir +501 -39
  58. data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/GtkSourceBuffer.html +186 -132
  59. data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/GtkSourceCompletion.html +55 -55
  60. data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/GtkSourceCompletionContext.html +29 -23
  61. data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/GtkSourceCompletionInfo.html +39 -39
  62. data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/GtkSourceCompletionItem.html +9 -9
  63. data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/GtkSourceCompletionProposal.html +22 -22
  64. data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/GtkSourceCompletionProvider.html +35 -35
  65. data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/GtkSourceCompletionWords.html +14 -14
  66. data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/GtkSourceEncoding.html +19 -19
  67. data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/GtkSourceFile.html +19 -19
  68. data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/GtkSourceFileLoader.html +26 -26
  69. data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/GtkSourceFileSaver.html +32 -32
  70. data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/GtkSourceGutter.html +28 -28
  71. data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/GtkSourceGutterRenderer.html +141 -133
  72. data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/GtkSourceGutterRendererPixbuf.html +14 -14
  73. data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/GtkSourceGutterRendererText.html +6 -6
  74. data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/GtkSourceLanguage.html +26 -26
  75. data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/GtkSourceLanguageManager.html +17 -17
  76. data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/GtkSourceMark.html +18 -18
  77. data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/GtkSourceMarkAttributes.html +42 -42
  78. data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/GtkSourcePrintCompositor.html +89 -89
  79. data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/GtkSourceSearchContext.html +155 -56
  80. data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/GtkSourceSearchSettings.html +23 -23
  81. data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/GtkSourceStyle.html +8 -8
  82. data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/GtkSourceStyleScheme.html +17 -19
  83. data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/GtkSourceStyleSchemeChooser.html +215 -0
  84. data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/GtkSourceStyleSchemeChooserButton.html +129 -0
  85. data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/GtkSourceStyleSchemeChooserWidget.html +129 -0
  86. data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/GtkSourceStyleSchemeManager.html +18 -18
  87. data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/GtkSourceUndoManager.html +27 -26
  88. data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/GtkSourceView.html +751 -327
  89. data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/annotation-glossary.html +3 -3
  90. data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/api-index-3-0.html +1 -1
  91. data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/api-index-3-10.html +1 -1
  92. data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/api-index-3-12.html +1 -1
  93. data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/api-index-3-14.html +3 -3
  94. data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/api-index-3-16.html +107 -0
  95. data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/api-index-3-4.html +1 -1
  96. data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/api-index-deprecated.html +1 -1
  97. data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/api-index-full.html +89 -1
  98. data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/ch01.html +9 -90
  99. data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/ch02.html +25 -16
  100. data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/ch03.html +53 -0
  101. data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/ch04.html +44 -0
  102. data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/ch05.html +50 -0
  103. data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/ch06.html +33 -0
  104. data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/ch07.html +38 -0
  105. data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/ch08.html +38 -0
  106. data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/gtksourceview-3.0-GtkSourceUtils.html +10 -10
  107. data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/gtksourceview-3.0.devhelp2 +253 -161
  108. data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/index.html +57 -25
  109. data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/index.sgml +295 -190
  110. data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/lang-reference.html +73 -30
  111. data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/lang-tutorial.html +5 -5
  112. data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/object-tree.html +13 -9
  113. data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/pt01.html +153 -0
  114. data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/pt02.html +50 -0
  115. data/vendor/local/share/gtk-doc/html/gtksourceview-3.0/style-reference.html +3 -3
  116. data/vendor/local/share/gtksourceview-3.0/language-specs/c.lang +4 -4
  117. data/vendor/local/share/gtksourceview-3.0/language-specs/cmake.lang +234 -125
  118. data/vendor/local/share/gtksourceview-3.0/language-specs/css.lang +1 -0
  119. data/vendor/local/share/gtksourceview-3.0/language-specs/cuda.lang +247 -257
  120. data/vendor/local/share/gtksourceview-3.0/language-specs/fortran.lang +1 -1
  121. data/vendor/local/share/gtksourceview-3.0/language-specs/genie.lang +238 -0
  122. data/vendor/local/share/gtksourceview-3.0/language-specs/java.lang +4 -3
  123. data/vendor/local/share/gtksourceview-3.0/language-specs/javascript.lang +1 -1
  124. data/vendor/local/share/gtksourceview-3.0/language-specs/json.lang +3 -1
  125. data/vendor/local/share/gtksourceview-3.0/language-specs/lua.lang +150 -5
  126. data/vendor/local/share/gtksourceview-3.0/language-specs/matlab.lang +1 -1
  127. data/vendor/local/share/gtksourceview-3.0/language-specs/octave.lang +1008 -172
  128. data/vendor/local/share/gtksourceview-3.0/language-specs/pig.lang +283 -0
  129. data/vendor/local/share/gtksourceview-3.0/language-specs/protobuf.lang +2 -1
  130. data/vendor/local/share/gtksourceview-3.0/language-specs/thrift.lang +267 -0
  131. data/vendor/local/share/gtksourceview-3.0/language-specs/xslt.lang +13 -0
  132. data/vendor/local/share/gtksourceview-3.0/language-specs/yacc.lang +1 -1
  133. data/vendor/local/share/gtksourceview-3.0/styles/classic.xml +2 -0
  134. data/vendor/local/share/gtksourceview-3.0/styles/cobalt.xml +3 -0
  135. data/vendor/local/share/gtksourceview-3.0/styles/kate.xml +1 -0
  136. data/vendor/local/share/gtksourceview-3.0/styles/oblivion.xml +3 -0
  137. data/vendor/local/share/gtksourceview-3.0/styles/solarized-dark.xml +3 -1
  138. data/vendor/local/share/gtksourceview-3.0/styles/solarized-light.xml +3 -1
  139. data/vendor/local/share/gtksourceview-3.0/styles/tango.xml +2 -0
  140. data/vendor/local/share/license/gtksourceview/AUTHORS +7 -5
  141. metadata +43 -35
  142. data/ext/gtksourceview3/depend +0 -6
  143. data/ext/gtksourceview3/extconf.rb +0 -67
  144. data/ext/gtksourceview3/gtksourceview3.def +0 -2
  145. data/ext/gtksourceview3/rbgtksource.c +0 -53
  146. data/ext/gtksourceview3/rbgtksourcebuffer.c +0 -318
  147. data/ext/gtksourceview3/rbgtksourcegutter.c +0 -82
  148. data/ext/gtksourceview3/rbgtksourcegutterrenderer.c +0 -143
  149. data/ext/gtksourceview3/rbgtksourcegutterrendererpixbuf.c +0 -42
  150. data/ext/gtksourceview3/rbgtksourcegutterrenderertext.c +0 -40
  151. data/ext/gtksourceview3/rbgtksourcelanguage.c +0 -124
  152. data/ext/gtksourceview3/rbgtksourcelanguagemanager.c +0 -114
  153. data/ext/gtksourceview3/rbgtksourcemark.c +0 -85
  154. data/ext/gtksourceview3/rbgtksourcemarkattributes.c +0 -77
  155. data/ext/gtksourceview3/rbgtksourceprintcompositor.c +0 -171
  156. data/ext/gtksourceview3/rbgtksourcestyle.c +0 -42
  157. data/ext/gtksourceview3/rbgtksourcestylescheme.c +0 -72
  158. data/ext/gtksourceview3/rbgtksourcestyleschememanager.c +0 -140
  159. data/ext/gtksourceview3/rbgtksourceundomanager.c +0 -83
  160. data/ext/gtksourceview3/rbgtksourceview.c +0 -94
  161. data/ext/gtksourceview3/rbgtksourceview3conversions.h +0 -50
  162. data/ext/gtksourceview3/rbgtksourceview3private.h +0 -53
  163. data/extconf.rb +0 -49
  164. data/lib/2.0/gtksourceview3.so +0 -0
  165. data/lib/2.1/gtksourceview3.so +0 -0
  166. data/lib/2.2/gtksourceview3.so +0 -0
  167. data/sample/sourcelanguagemanager.rb +0 -21
  168. data/sample/test.rb +0 -32
@@ -1,140 +0,0 @@
1
- /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
- /*
3
- * Copyright (C) 2011 Ruby-GNOME2 Project Team
4
- * Copyright (C) 2004 Ruby-GNOME2 Project Team
5
- * Copyright (C) 2003 Geoff Youngs, based on gtktextview.c by Masao Mutoh
6
- *
7
- * This library is free software; you can redistribute it and/or
8
- * modify it under the terms of the GNU Lesser General Public
9
- * License as published by the Free Software Foundation; either
10
- * version 2.1 of the License, or (at your option) any later version.
11
- *
12
- * This library is distributed in the hope that it will be useful,
13
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
- * Lesser General Public License for more details.
16
- *
17
- * You should have received a copy of the GNU Lesser General Public
18
- * License along with this library; if not, write to the Free Software
19
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20
- * MA 02110-1301 USA
21
- */
22
-
23
- #include "rbgtksourceview3private.h"
24
-
25
- /* Class: Gtk::SourceStyleSchemeManager
26
- * A class to manage source style scheme.
27
- */
28
-
29
- #define RG_TARGET_NAMESPACE cStyleSchemeManager
30
- #define _SELF(self) (RVAL2GTKSOURCESTYLESCHEMEMANAGER(self))
31
-
32
- static VALUE rb_mGtkSource;
33
-
34
- /* Class method: new
35
- * Returns: a newly created Gtk::SourceStyleSchemeManager object.
36
- */
37
- static VALUE
38
- rg_initialize(VALUE self)
39
- {
40
- G_INITIALIZE (self, gtk_source_style_scheme_manager_new ());
41
- return Qnil;
42
- }
43
-
44
- /* Class method: default
45
- *
46
- * Gets the default style scheme manager.
47
- *
48
- * Returns: a Gtk::SourceStyleSchemeManager
49
- */
50
- static VALUE
51
- rg_s_default(G_GNUC_UNUSED VALUE self)
52
- {
53
- GtkSourceStyleSchemeManager* sssm = gtk_source_style_scheme_manager_get_default();
54
- GType gtype = G_TYPE_FROM_INSTANCE(sssm);
55
-
56
- gchar *gtypename = (gchar *) g_type_name (gtype);
57
- if (strncmp (gtypename, "GtkSource", 9) == 0)
58
- gtypename += 9;
59
- if (!rb_const_defined_at (rb_mGtkSource, rb_intern (gtypename)))
60
- G_DEF_CLASS (gtype, gtypename, rb_mGtkSource);
61
-
62
- return GOBJ2RVAL(sssm);
63
- }
64
-
65
- /* Method: append_search_path(path)
66
- * path: additional style scheme file directory path (string)
67
- *
68
- * Appends the style scheme files directory for the given style scheme manager.
69
- *
70
- * Returns: self.
71
- */
72
- static VALUE
73
- rg_append_search_path(VALUE self, VALUE path)
74
- {
75
- gtk_source_style_scheme_manager_append_search_path (_SELF (self), RVAL2CSTR(path));
76
- return self;
77
- }
78
-
79
- /* Method: prepend_search_path(path)
80
- * path: additional style scheme file directory path (string)
81
- *
82
- * Prepend the style scheme files directory for the given style scheme manager.
83
- *
84
- * Returns: self.
85
- */
86
- static VALUE
87
- rg_prepend_search_path(VALUE self, VALUE path)
88
- {
89
- gtk_source_style_scheme_manager_prepend_search_path (_SELF (self), RVAL2CSTR(path));
90
- return self;
91
- }
92
-
93
- /*
94
- * Method: scheme(scheme_id)
95
- * scheme_id: a style scheme id (as a string).
96
- *
97
- * Gets the Gtk::SourceStyleScheme which is associated with the given id
98
- * in the style scheme manager.
99
- *
100
- * Returns: a Gtk::SourceStyleScheme, or nil if there is no style scheme
101
- * associated with the given id.
102
- */
103
- static VALUE
104
- rg_get_scheme(VALUE self, VALUE scheme_id)
105
- {
106
- return
107
- GOBJ2RVAL (gtk_source_style_scheme_manager_get_scheme
108
- (_SELF (self), RVAL2CSTR (scheme_id)));
109
- }
110
-
111
- /*
112
- * Method: force_rescan
113
- *
114
- * Forces all style schemes to be reloaded the next time the
115
- * Gtk::SourceStyleSchemeManager is accessed.
116
- *
117
- * Returns: self.
118
- */
119
- static VALUE
120
- rg_force_rescan(VALUE self)
121
- {
122
- gtk_source_style_scheme_manager_force_rescan(_SELF (self));
123
- return self;
124
- }
125
-
126
- void
127
- Init_gtksource_styleschememanager (VALUE mGtkSource)
128
- {
129
- rb_mGtkSource = mGtkSource;
130
- VALUE RG_TARGET_NAMESPACE =
131
- G_DEF_CLASS (GTK_SOURCE_TYPE_STYLE_SCHEME_MANAGER,
132
- "StyleSchemeManager", mGtkSource);
133
-
134
- RG_DEF_METHOD(initialize, 0);
135
- RG_DEF_METHOD(append_search_path, 1);
136
- RG_DEF_METHOD(prepend_search_path, 1);
137
- RG_DEF_METHOD(get_scheme, 1);
138
- RG_DEF_METHOD(force_rescan, 0);
139
- RG_DEF_SMETHOD(default, 0);
140
- }
@@ -1,83 +0,0 @@
1
- /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
- /*
3
- * Copyright (C) 2011 Ruby-GNOME2 Project Team
4
- *
5
- * This library is free software; you can redistribute it and/or
6
- * modify it under the terms of the GNU Lesser General Public
7
- * License as published by the Free Software Foundation; either
8
- * version 2.1 of the License, or (at your option) any later version.
9
- *
10
- * This library is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
- * Lesser General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU Lesser General Public
16
- * License along with this library; if not, write to the Free Software
17
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
18
- * MA 02110-1301 USA
19
- */
20
-
21
- #include "rbgtksourceview3private.h"
22
-
23
- #define RG_TARGET_NAMESPACE mUndoManager
24
- #define _SELF(self) (RVAL2GTKSOURCEUNDOMANAGER(self))
25
-
26
- static VALUE
27
- rg_end_not_undoable_action(VALUE self)
28
- {
29
- gtk_source_undo_manager_end_not_undoable_action(_SELF(self));
30
-
31
- return self;
32
- }
33
-
34
- static VALUE
35
- rg_begin_not_undoable_action(VALUE self)
36
- {
37
- gtk_source_undo_manager_begin_not_undoable_action(_SELF(self));
38
- if (rb_block_given_p())
39
- rb_ensure(rb_yield, self, rg_end_not_undoable_action, self);
40
-
41
- return self;
42
- }
43
-
44
- static VALUE
45
- rg_can_redo_p(VALUE self)
46
- {
47
- return CBOOL2RVAL(gtk_source_undo_manager_can_redo(_SELF(self)));
48
- }
49
-
50
- static VALUE
51
- rg_can_undo_p(VALUE self)
52
- {
53
- return CBOOL2RVAL(gtk_source_undo_manager_can_undo(_SELF(self)));
54
- }
55
-
56
- static VALUE
57
- rg_redo(VALUE self)
58
- {
59
- gtk_source_undo_manager_redo(_SELF(self));
60
-
61
- return self;
62
- }
63
-
64
- static VALUE
65
- rg_undo(VALUE self)
66
- {
67
- gtk_source_undo_manager_undo(_SELF(self));
68
-
69
- return self;
70
- }
71
-
72
- void
73
- Init_gtksource_undomanager(VALUE mGtkSource)
74
- {
75
- VALUE RG_TARGET_NAMESPACE = G_DEF_INTERFACE(GTK_SOURCE_TYPE_UNDO_MANAGER, "UndoManager", mGtkSource);
76
-
77
- RG_DEF_METHOD(begin_not_undoable_action, 0);
78
- RG_DEF_METHOD_P(can_redo, 0);
79
- RG_DEF_METHOD_P(can_undo, 0);
80
- RG_DEF_METHOD(end_not_undoable_action, 0);
81
- RG_DEF_METHOD(redo, 0);
82
- RG_DEF_METHOD(undo, 0);
83
- }
@@ -1,94 +0,0 @@
1
- /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
- /*
3
- * Copyright (C) 2011 Ruby-GNOME2 Project Team
4
- * Copyright (C) 2004,2005 Ruby-GNOME2 Project Team
5
- * Copyright (C) 2003 Geoff Youngs, based on gtktextview.c by Masao Mutoh
6
- *
7
- * This library is free software; you can redistribute it and/or
8
- * modify it under the terms of the GNU Lesser General Public
9
- * License as published by the Free Software Foundation; either
10
- * version 2.1 of the License, or (at your option) any later version.
11
- *
12
- * This library is distributed in the hope that it will be useful,
13
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
- * Lesser General Public License for more details.
16
- *
17
- * You should have received a copy of the GNU Lesser General Public
18
- * License along with this library; if not, write to the Free Software
19
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20
- * MA 02110-1301 USA
21
- */
22
-
23
- #include "rbgtksourceview3private.h"
24
-
25
- /* Class: Gtk::SourceView
26
- * A view on a source.
27
- */
28
-
29
- #define RG_TARGET_NAMESPACE cView
30
- #define _SELF(self) (RVAL2GTKSOURCEVIEW(self))
31
-
32
- /*
33
- * Class method: new(buffer=nil)
34
- * buffer: a Gtk::SourceBuffer object.
35
- *
36
- * Creates a new Gtk::SourceView. If buffer is not provided or nil, an empty
37
- * buffer will be created for you. Note that one buffer can be shared among
38
- * many widgets.
39
- *
40
- * Returns: a newly created Gtk::SourceView object.
41
- */
42
- static VALUE
43
- rg_initialize(int argc, VALUE *argv, VALUE self)
44
- {
45
- VALUE buffer;
46
- GtkWidget *widget;
47
-
48
- rb_scan_args(argc, argv, "01", &buffer);
49
-
50
- if (NIL_P(buffer))
51
- widget = gtk_source_view_new();
52
- else
53
- widget = gtk_source_view_new_with_buffer(RVAL2GTKSOURCEBUFFER(buffer));
54
-
55
- RBGTK_INITIALIZE(self, widget);
56
- return self;
57
- }
58
-
59
- static VALUE
60
- rg_get_gutter(VALUE self, VALUE window_type)
61
- {
62
- VALUE gutter;
63
-
64
- gutter = GOBJ2RVAL(gtk_source_view_get_gutter(_SELF(self),
65
- RVAL2GTKTEXTWINDOWTYPE(window_type)));
66
- G_CHILD_ADD(self, gutter);
67
-
68
- return gutter;
69
- }
70
-
71
- static VALUE
72
- rg_set_mark_attributes(VALUE self, VALUE category, VALUE attributes, VALUE priority)
73
- {
74
- gtk_source_view_set_mark_attributes(_SELF(self),
75
- RVAL2CSTR_ACCEPT_SYMBOL(category),
76
- RVAL2GTKSOURCEMARKATTRIBUTES(attributes),
77
- NUM2INT(priority));
78
-
79
- return self;
80
- }
81
-
82
- void
83
- Init_gtksource_view (VALUE mGtkSource)
84
- {
85
- VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS (GTK_SOURCE_TYPE_VIEW, "View", mGtkSource);
86
- G_DEF_CLASS(GTK_SOURCE_TYPE_VIEW_GUTTER_POSITION, "GutterPosition", RG_TARGET_NAMESPACE);
87
-
88
- RG_DEF_METHOD(initialize, -1);
89
- RG_DEF_METHOD(get_gutter, 1);
90
- RG_DEF_METHOD(set_mark_attributes, 3);
91
-
92
- G_DEF_CLASS(GTK_SOURCE_TYPE_SMART_HOME_END_TYPE, "SmartHomeEndType", RG_TARGET_NAMESPACE);
93
- G_DEF_CLASS(GTK_SOURCE_TYPE_DRAW_SPACES_FLAGS, "DrawSpacesFlags", RG_TARGET_NAMESPACE);
94
- }
@@ -1,50 +0,0 @@
1
- /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
- /*
3
- * Copyright (C) 2011 Ruby-GNOME2 Project Team
4
- *
5
- * This library is free software; you can redistribute it and/or
6
- * modify it under the terms of the GNU Lesser General Public
7
- * License as published by the Free Software Foundation; either
8
- * version 2.1 of the License, or (at your option) any later version.
9
- *
10
- * This library is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
- * Lesser General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU Lesser General Public
16
- * License along with this library; if not, write to the Free Software
17
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
18
- * MA 02110-1301 USA
19
- */
20
-
21
- #ifndef __RBGTKSOURCEVIEW3CONVERSIONS_H__
22
- #define __RBGTKSOURCEVIEW3CONVERSIONS_H__
23
-
24
- #define RVAL2GTKSOURCEBUFFER(o) (GTK_SOURCE_BUFFER(RVAL2GOBJ(o)))
25
- #define RVAL2GTKSOURCEGUTTER(o) (GTK_SOURCE_GUTTER(RVAL2GOBJ(o)))
26
- #define RVAL2GTKSOURCEGUTTERRENDERER(o) (GTK_SOURCE_GUTTER_RENDERER(RVAL2GOBJ(o)))
27
- #define RVAL2GTKSOURCEGUTTERRENDERERPIXBUF(o) (GTK_SOURCE_GUTTER_RENDERER_PIXBUF(RVAL2GOBJ(o)))
28
- #define RVAL2GTKSOURCEGUTTERRENDERERTEXT(o) (GTK_SOURCE_GUTTER_RENDERER_TEXT(RVAL2GOBJ(o)))
29
- #define RVAL2GTKSOURCELANGUAGE(o) (GTK_SOURCE_LANGUAGE(RVAL2GOBJ(o)))
30
- #define RVAL2GTKSOURCELANGUAGEMANAGER(o) (GTK_SOURCE_LANGUAGE_MANAGER(RVAL2GOBJ(o)))
31
- #define RVAL2GTKSOURCEMARK(o) (GTK_SOURCE_MARK(RVAL2GOBJ(o)))
32
- #define RVAL2GTKSOURCEMARKATTRIBUTES(o) (GTK_SOURCE_MARK_ATTRIBUTES(RVAL2GOBJ(o)))
33
- #define RVAL2GTKSOURCEPRINTCOMPOSITOR(o) (GTK_SOURCE_PRINT_COMPOSITOR(RVAL2GOBJ(o)))
34
- #define RVAL2GTKSOURCESTYLE(o) (GTK_SOURCE_STYLE(RVAL2GOBJ(o)))
35
- #define RVAL2GTKSOURCESTYLESCHEME(o) (GTK_SOURCE_STYLE_SCHEME(RVAL2GOBJ(o)))
36
- #define RVAL2GTKSOURCESTYLESCHEMEMANAGER(o) (GTK_SOURCE_STYLE_SCHEME_MANAGER(RVAL2GOBJ(o)))
37
- #define RVAL2GTKSOURCEUNDOMANAGER(o) (GTK_SOURCE_UNDO_MANAGER(RVAL2GOBJ(o)))
38
- #define RVAL2GTKSOURCEVIEW(o) (GTK_SOURCE_VIEW(RVAL2GOBJ(o)))
39
-
40
- #define RVAL2GTKSOURCEGUTTERRENDERERSTATE(o) (RVAL2GFLAGS(o, GTK_SOURCE_TYPE_GUTTER_RENDERER_STATE))
41
- #define GTKSOURCEGUTTERRENDERERSTATE2RVAL(o) (GFLAGS2RVAL(o, GTK_SOURCE_TYPE_GUTTER_RENDERER_STATE))
42
-
43
- /* For GDK3. They are temporary. They will be needless after Ruby/SourceView3
44
- * is based on Ruby/GObjectIntrospection.
45
- */
46
- #define RVAL2GDKRECTANGLE(o) ((GdkRectangle*)RVAL2BOXED(o, GDK_TYPE_RECTANGLE))
47
- #define RVAL2GDKRGBA(o) ((GdkRGBA*)RVAL2BOXED(o, GDK_TYPE_RGBA))
48
- #define GDKRGBA2RVAL(o) (BOXED2RVAL(o, GDK_TYPE_RGBA))
49
-
50
- #endif /* __RBGTKSOURCEVIEW3CONVERSIONS_H__ */
@@ -1,53 +0,0 @@
1
- /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
- /*
3
- * Copyright (C) 2011 Ruby-GNOME2 Project Team
4
- * Copyright (C) 2004,2005 Ruby-GNOME2 Project Team
5
- * Copyright (C) 2003 Geoff Youngs
6
- *
7
- * This library is free software; you can redistribute it and/or
8
- * modify it under the terms of the GNU Lesser General Public
9
- * License as published by the Free Software Foundation; either
10
- * version 2.1 of the License, or (at your option) any later version.
11
- *
12
- * This library is distributed in the hope that it will be useful,
13
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
- * Lesser General Public License for more details.
16
- *
17
- * You should have received a copy of the GNU Lesser General Public
18
- * License along with this library; if not, write to the Free Software
19
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20
- * MA 02110-1301 USA
21
- */
22
-
23
- #ifndef __RBGTKSOURCEVIEW3PRIVATE_H__
24
- #define __RBGTKSOURCEVIEW3PRIVATE_H__
25
-
26
- #include <gtksourceview/gtksource.h>
27
- #include <gtksourceview/gtksourceview-typebuiltins.h>
28
-
29
- #include <ruby.h>
30
- #include <rb_cairo.h>
31
- #include <rbgtk3.h>
32
- #include "rbgtksourceview3conversions.h"
33
- #include "rbgtksourceview3version.h"
34
-
35
- extern void Init_gtksourceview3(void);
36
-
37
- G_GNUC_INTERNAL void Init_gtksource_view (VALUE mGtkSource);
38
- G_GNUC_INTERNAL void Init_gtksource_buffer (VALUE mGtkSource);
39
- G_GNUC_INTERNAL void Init_gtksource_language (VALUE mGtkSource);
40
- G_GNUC_INTERNAL void Init_gtksource_languagemanager (VALUE mGtkSource);
41
- G_GNUC_INTERNAL void Init_gtksource_mark (VALUE mGtkSource);
42
- G_GNUC_INTERNAL void Init_gtksource_printcompositor (VALUE mGtkSource);
43
- G_GNUC_INTERNAL void Init_gtksource_style (VALUE mGtkSource);
44
- G_GNUC_INTERNAL void Init_gtksource_stylescheme (VALUE mGtkSource);
45
- G_GNUC_INTERNAL void Init_gtksource_styleschememanager (VALUE mGtkSource);
46
- G_GNUC_INTERNAL void Init_gtksource_gutter(VALUE mGtkSource);
47
- G_GNUC_INTERNAL void Init_gtksource_gutterrenderer(VALUE mGtkSource);
48
- G_GNUC_INTERNAL void Init_gtksource_gutterrendererpixbuf(VALUE mGtkSource);
49
- G_GNUC_INTERNAL void Init_gtksource_gutterrenderertext(VALUE mGtkSource);
50
- G_GNUC_INTERNAL void Init_gtksource_markattributes(VALUE mGtkSource);
51
- G_GNUC_INTERNAL void Init_gtksource_undomanager(VALUE mGtkSource);
52
-
53
- #endif /* __RBGTKSOURCEVIEW3PRIVATE_H__ */
data/extconf.rb DELETED
@@ -1,49 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'pathname'
4
- require 'mkmf'
5
- require 'rbconfig'
6
- require 'fileutils'
7
-
8
- package = "gtksourceview3"
9
-
10
- base_dir = Pathname(__FILE__).dirname.expand_path
11
- ext_dir = base_dir + "ext" + package
12
- mkmf_gnome2_dir = base_dir + 'lib'
13
-
14
- ruby = File.join(RbConfig::CONFIG['bindir'],
15
- RbConfig::CONFIG['ruby_install_name'] +
16
- RbConfig::CONFIG["EXEEXT"])
17
-
18
- build_dir = Pathname("ext") + package
19
- FileUtils.mkdir_p(build_dir.to_s) unless build_dir.exist?
20
- extconf_rb_path = ext_dir + "extconf.rb"
21
- system(ruby, "-C", build_dir.to_s, extconf_rb_path.to_s, *ARGV) || exit(false)
22
-
23
- create_makefile(package)
24
- FileUtils.mv("Makefile", "Makefile.lib")
25
-
26
- File.open("Makefile", "w") do |makefile|
27
- makefile.puts(<<-EOM)
28
- all:
29
- (cd ext/#{package} && $(MAKE))
30
- $(MAKE) -f Makefile.lib
31
-
32
- install:
33
- (cd ext/#{package} && $(MAKE) install)
34
- $(MAKE) -f Makefile.lib install
35
-
36
- site-install:
37
- (cd ext/#{package} && $(MAKE) site-install)
38
- $(MAKE) -f Makefile.lib site-install
39
-
40
- clean:
41
- (cd ext/#{package} && $(MAKE) clean)
42
- $(MAKE) -f Makefile.lib clean
43
-
44
- distclean:
45
- (cd ext/#{package} && $(MAKE) distclean)
46
- $(MAKE) -f Makefile.lib distclean
47
- @rm -f Makefile.lib
48
- EOM
49
- end
Binary file
Binary file
Binary file
@@ -1,21 +0,0 @@
1
- #!/usr/bin/env ruby
2
- =begin
3
- sourcelanguagesmanager.rb - Ruby/GtkSourceView3 sample script.
4
-
5
- Copyright (c) 2006-2014 Ruby-GNOME2 Project Team
6
- This program is licenced under the same licence as Ruby-GNOME2.
7
-
8
- $Id: sourcelanguagesmanager.rb,v 1.3 2007/06/03 02:11:07 mutoh Exp $
9
- =end
10
-
11
- require "gtksourceview3"
12
-
13
- s = GtkSource::LanguageManager.new
14
- s.language_ids.each do |v|
15
- puts v
16
- end
17
- s.search_path.each do |v|
18
- puts v
19
- end
20
- puts s.get_language("html").name
21
-
data/sample/test.rb DELETED
@@ -1,32 +0,0 @@
1
- #!/usr/bin/env ruby
2
- =begin
3
- test.rb - Ruby/GtkSourceView3 sample script.
4
-
5
- Copyright (c) 2006-2014 Ruby-GNOME2 Project Team
6
- This program is licenced under the same licence as Ruby-GNOME2.
7
-
8
- $Id: test.rb,v 1.4 2007/06/03 02:11:07 mutoh Exp $
9
- =end
10
-
11
- require "gtksourceview3"
12
-
13
- window = Gtk::Window.new
14
- window.signal_connect("delete-event") {Gtk.main_quit}
15
-
16
- view = GtkSource::View.new
17
- window.add(Gtk::ScrolledWindow.new.add(view))
18
- view.show_line_numbers = true
19
- view.insert_spaces_instead_of_tabs = true
20
- view.indent_width = 4
21
- view.show_right_margin = true
22
- view.right_margin_position = 80
23
-
24
- lang = GtkSource::LanguageManager.new.get_language("ruby")
25
- view.buffer.language = lang
26
- view.buffer.highlight_syntax = true
27
- view.buffer.highlight_matching_brackets = true
28
-
29
- window.set_default_size(450, 300)
30
- window.show_all
31
-
32
- Gtk.main