gtksourceview2 1.0.3-x86-mingw32 → 1.1.0-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,47 +1,42 @@
1
1
  /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
- /************************************************
3
-
4
- rbgtksourcestyle.c -
5
-
6
- $Author: mutoh $
7
- $Date: 2005/10/02 18:40:34 $
2
+ /*
3
+ * Copyright (C) 2011 Ruby-GNOME2 Project Team
4
+ * Copyright (C) 2005 Masao Mutoh
5
+ *
6
+ * This library is free software; you can redistribute it and/or
7
+ * modify it under the terms of the GNU Lesser General Public
8
+ * License as published by the Free Software Foundation; either
9
+ * version 2.1 of the License, or (at your option) any later version.
10
+ *
11
+ * This library is distributed in the hope that it will be useful,
12
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
+ * Lesser General Public License for more details.
15
+ *
16
+ * You should have received a copy of the GNU Lesser General Public
17
+ * License along with this library; if not, write to the Free Software
18
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
+ * MA 02110-1301 USA
20
+ */
8
21
 
9
- Copyright (C) 2005 Masao Mutoh
10
- ************************************************/
11
22
  #include "rbgtksourcemain.h"
12
23
 
13
24
  /* Module: Gtk::SourceStyle
14
25
  */
15
26
 
27
+ #define RG_TARGET_NAMESPACE cSourceStyle
16
28
  #define _SELF(self) (GTK_SOURCE_STYLE(RVAL2GOBJ(self)))
17
29
 
18
30
  static VALUE
19
- sourcestyle_copy(VALUE self)
31
+ rg_copy(VALUE self)
20
32
  {
21
- return GOBJ2RVAL (gtk_source_style_copy (_SELF (self)));
33
+ return GOBJ2RVAL (gtk_source_style_copy (_SELF (self)));
22
34
  }
23
35
 
24
- /* Defined as properties.
25
- "background" gchar* : Read / Write / Construct Only
26
- "background-set" gboolean : Read / Write / Construct Only
27
- "bold" gboolean : Read / Write / Construct Only
28
- "bold-set" gboolean : Read / Write / Construct Only
29
- "foreground" gchar* : Read / Write / Construct Only
30
- "foreground-set" gboolean : Read / Write / Construct Only
31
- "italic" gboolean : Read / Write / Construct Only
32
- "italic-set" gboolean : Read / Write / Construct Only
33
- "line-background" gchar* : Read / Write / Construct Only
34
- "line-background-set" gboolean : Read / Write / Construct Only
35
- "strikethrough" gboolean : Read / Write / Construct Only
36
- "strikethrough-set" gboolean : Read / Write / Construct Only
37
- "underline" gboolean : Read / Write / Construct Only
38
- "underline-set" gboolean : Read / Write / Construct Only
39
- */
40
-
41
36
  void
42
- Init_gtk_sourcestyle ()
37
+ Init_gtk_sourcestyle (VALUE mGtk)
43
38
  {
44
- VALUE style = G_DEF_CLASS (GTK_TYPE_SOURCE_STYLE, "SourceStyle", mGtk);
39
+ VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS (GTK_TYPE_SOURCE_STYLE, "SourceStyle", mGtk);
45
40
 
46
- rb_define_method(style, "copy", sourcestyle_copy, 0);
41
+ RG_DEF_METHOD(copy, 0);
47
42
  }
@@ -1,38 +1,41 @@
1
1
  /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
- /************************************************
3
-
4
- rbgtksourcestylescheme.c -
5
-
6
- $Author: mutoh $
7
- $Date: 2005/10/02 18:40:34 $
2
+ /*
3
+ * Copyright (C) 2011 Ruby-GNOME2 Project Team
4
+ * Copyright (C) 2005 Masao Mutoh
5
+ *
6
+ * This library is free software; you can redistribute it and/or
7
+ * modify it under the terms of the GNU Lesser General Public
8
+ * License as published by the Free Software Foundation; either
9
+ * version 2.1 of the License, or (at your option) any later version.
10
+ *
11
+ * This library is distributed in the hope that it will be useful,
12
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
+ * Lesser General Public License for more details.
15
+ *
16
+ * You should have received a copy of the GNU Lesser General Public
17
+ * License along with this library; if not, write to the Free Software
18
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
+ * MA 02110-1301 USA
20
+ */
8
21
 
9
- Copyright (C) 2005 Masao Mutoh
10
- ************************************************/
11
22
  #include "rbgtksourcemain.h"
12
23
 
13
24
  /* Module: Gtk::SourceStyleScheme
14
25
  */
15
26
 
27
+ #define RG_TARGET_NAMESPACE cSourceStyleScheme
16
28
  #define _SELF(self) (GTK_SOURCE_STYLE_SCHEME(RVAL2GOBJ(self)))
17
29
 
18
- /* Defined as properties.
19
- const gchar* gtk_source_style_scheme_get_id (GtkSourceStyleScheme *scheme);
20
- const gchar* gtk_source_style_scheme_get_name (GtkSourceStyleScheme *scheme);
21
- const gchar* gtk_source_style_scheme_get_description
22
- (GtkSourceStyleScheme *scheme);
23
- const gchar* gtk_source_style_scheme_get_filename
24
- (GtkSourceStyleScheme *scheme);
25
- */
26
-
27
30
  /* Method: authors
28
31
  *
29
32
  * Returns: a list of authors for the given style scheme.
30
33
  */
31
34
  static VALUE
32
- scheme_get_authors(VALUE self)
35
+ rg_authors(VALUE self)
33
36
  {
34
- VALUE ary;
35
- const gchar * const * authors =
37
+ VALUE ary;
38
+ const gchar * const * authors =
36
39
  gtk_source_style_scheme_get_authors (_SELF (self));
37
40
  if (!authors)
38
41
  return Qnil;
@@ -53,17 +56,17 @@ scheme_get_authors(VALUE self)
53
56
  * Returns: Gtk::SourceStyle
54
57
  */
55
58
  static VALUE
56
- scheme_get_style(VALUE self, VALUE style_name)
59
+ rg_get_style(VALUE self, VALUE style_name)
57
60
  {
58
61
  return GOBJ2RVAL(gtk_source_style_scheme_get_style(_SELF(self),
59
62
  RVAL2CSTR(style_name)));
60
63
  }
61
64
 
62
65
  void
63
- Init_gtk_sourcestylescheme ()
66
+ Init_gtk_sourcestylescheme (VALUE mGtk)
64
67
  {
65
- VALUE scheme = G_DEF_CLASS (GTK_TYPE_SOURCE_STYLE_SCHEME, "SourceStyleScheme", mGtk);
68
+ VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS (GTK_TYPE_SOURCE_STYLE_SCHEME, "SourceStyleScheme", mGtk);
66
69
 
67
- rb_define_method(scheme, "authors", scheme_get_authors, 0);
68
- rb_define_method(scheme, "get_style", scheme_get_style, 1);
70
+ RG_DEF_METHOD(authors, 0);
71
+ RG_DEF_METHOD(get_style, 1);
69
72
  }
@@ -1,30 +1,42 @@
1
1
  /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
- /************************************************
3
-
4
- rbgtksourcestyleschememanager.c -
5
-
6
- $Author $
7
- $Date: 2004/08/05 18:13:49 $
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
+ */
8
22
 
9
- Copyright (C) 2004 Ruby-GNOME2 Project Team
10
- Copyright (C) 2003 Geoff Youngs, based on gtktextview.c by Masao Mutoh
11
- ************************************************/
12
23
  #include "rbgtksourcemain.h"
13
24
 
14
25
  /* Class: Gtk::SourceStyleSchemeManager
15
26
  * A class to manage source style scheme.
16
27
  */
17
28
 
29
+ #define RG_TARGET_NAMESPACE cSourceStyleSchemeManager
18
30
  #define _SELF(self) (GTK_SOURCE_STYLE_SCHEME_MANAGER(RVAL2GOBJ(self)))
19
31
 
20
32
  /* Class method: new
21
33
  * Returns: a newly created Gtk::SourceStyleSchemeManager object.
22
34
  */
23
35
  static VALUE
24
- sssm_new(VALUE self)
36
+ rg_initialize(VALUE self)
25
37
  {
26
- G_INITIALIZE (self, gtk_source_style_scheme_manager_new ());
27
- return Qnil;
38
+ G_INITIALIZE (self, gtk_source_style_scheme_manager_new ());
39
+ return Qnil;
28
40
  }
29
41
 
30
42
  /* Class method: default
@@ -34,7 +46,7 @@ sssm_new(VALUE self)
34
46
  * Returns: a Gtk::SourceStyleSchemeManager
35
47
  */
36
48
  static VALUE
37
- sssm_get_default(VALUE self)
49
+ rg_s_default(VALUE self)
38
50
  {
39
51
  GtkSourceStyleSchemeManager* sssm = gtk_source_style_scheme_manager_get_default();
40
52
  GType gtype = G_TYPE_FROM_INSTANCE(sssm);
@@ -56,10 +68,10 @@ sssm_get_default(VALUE self)
56
68
  * Returns: self.
57
69
  */
58
70
  static VALUE
59
- sssm_set_search_path(VALUE self, VALUE dirs)
71
+ rg_set_search_path(VALUE self, VALUE dirs)
60
72
  {
61
73
  gchar** gdirs = (gchar**)NULL;
62
- gint i;
74
+ gint i;
63
75
 
64
76
  if (! NIL_P(dirs)){
65
77
  Check_Type(dirs, T_ARRAY);
@@ -76,8 +88,8 @@ sssm_set_search_path(VALUE self, VALUE dirs)
76
88
  gdirs[i] = (gchar*)NULL;
77
89
  }
78
90
 
79
- gtk_source_style_scheme_manager_set_search_path (_SELF (self), gdirs);
80
- return self;
91
+ gtk_source_style_scheme_manager_set_search_path (_SELF (self), gdirs);
92
+ return self;
81
93
  }
82
94
 
83
95
  /* Method: append_search_path(path)
@@ -88,10 +100,10 @@ sssm_set_search_path(VALUE self, VALUE dirs)
88
100
  * Returns: self.
89
101
  */
90
102
  static VALUE
91
- sssm_append_search_path(VALUE self, VALUE path)
103
+ rg_append_search_path(VALUE self, VALUE path)
92
104
  {
93
- gtk_source_style_scheme_manager_append_search_path (_SELF (self), RVAL2CSTR(path));
94
- return self;
105
+ gtk_source_style_scheme_manager_append_search_path (_SELF (self), RVAL2CSTR(path));
106
+ return self;
95
107
  }
96
108
 
97
109
  /* Method: prepend_search_path(path)
@@ -102,10 +114,10 @@ sssm_append_search_path(VALUE self, VALUE path)
102
114
  * Returns: self.
103
115
  */
104
116
  static VALUE
105
- sssm_prepend_search_path(VALUE self, VALUE path)
117
+ rg_prepend_search_path(VALUE self, VALUE path)
106
118
  {
107
- gtk_source_style_scheme_manager_prepend_search_path (_SELF (self), RVAL2CSTR(path));
108
- return self;
119
+ gtk_source_style_scheme_manager_prepend_search_path (_SELF (self), RVAL2CSTR(path));
120
+ return self;
109
121
  }
110
122
 
111
123
  /* Method: get_search_path
@@ -113,10 +125,10 @@ sssm_prepend_search_path(VALUE self, VALUE path)
113
125
  * style scheme manager.
114
126
  */
115
127
  static VALUE
116
- sssm_get_search_path(VALUE self)
128
+ rg_search_path(VALUE self)
117
129
  {
118
- VALUE ary;
119
- const gchar * const * dirs =
130
+ VALUE ary;
131
+ const gchar * const * dirs =
120
132
  gtk_source_style_scheme_manager_get_search_path (_SELF (self));
121
133
  if (!dirs)
122
134
  return Qnil;
@@ -133,10 +145,10 @@ sssm_get_search_path(VALUE self)
133
145
  * Returns: a list of style scheme ids for the given style scheme manager
134
146
  */
135
147
  static VALUE
136
- sssm_get_scheme_ids(VALUE self)
148
+ rg_scheme_ids(VALUE self)
137
149
  {
138
- VALUE ary;
139
- const gchar * const * ids =
150
+ VALUE ary;
151
+ const gchar * const * ids =
140
152
  gtk_source_style_scheme_manager_get_scheme_ids (_SELF (self));
141
153
  if (!ids)
142
154
  return Qnil;
@@ -160,11 +172,11 @@ sssm_get_scheme_ids(VALUE self)
160
172
  * associated with the given id.
161
173
  */
162
174
  static VALUE
163
- sssm_get_scheme(VALUE self, VALUE scheme_id)
175
+ rg_get_scheme(VALUE self, VALUE scheme_id)
164
176
  {
165
- return
166
- GOBJ2RVAL (gtk_source_style_scheme_manager_get_scheme
167
- (_SELF (self), RVAL2CSTR (scheme_id)));
177
+ return
178
+ GOBJ2RVAL (gtk_source_style_scheme_manager_get_scheme
179
+ (_SELF (self), RVAL2CSTR (scheme_id)));
168
180
  }
169
181
 
170
182
  /*
@@ -176,27 +188,27 @@ sssm_get_scheme(VALUE self, VALUE scheme_id)
176
188
  * Returns: self.
177
189
  */
178
190
  static VALUE
179
- sssm_force_rescan(VALUE self)
191
+ rg_force_rescan(VALUE self)
180
192
  {
181
- gtk_source_style_scheme_manager_force_rescan(_SELF (self));
182
- return self;
193
+ gtk_source_style_scheme_manager_force_rescan(_SELF (self));
194
+ return self;
183
195
  }
184
196
 
185
197
  void
186
- Init_gtk_sourcestyleschememanager ()
198
+ Init_gtk_sourcestyleschememanager (VALUE mGtk)
187
199
  {
188
- VALUE csssm =
189
- G_DEF_CLASS (GTK_TYPE_SOURCE_STYLE_SCHEME_MANAGER,
190
- "SourceStyleSchemeManager", mGtk);
191
-
192
- rb_define_method (csssm, "initialize", sssm_new, 0);
193
- rb_define_method (csssm, "set_search_path", sssm_set_search_path, 1);
194
- rb_define_method (csssm, "append_search_path", sssm_append_search_path, 1);
195
- rb_define_method (csssm, "prepend_search_path", sssm_prepend_search_path, 1);
196
- rb_define_method (csssm, "search_path", sssm_get_search_path, 0);
197
- rb_define_method (csssm, "scheme_ids", sssm_get_scheme_ids, 0);
198
- rb_define_method (csssm, "get_scheme", sssm_get_scheme, 1);
199
- rb_define_method (csssm, "force_rescan", sssm_force_rescan, 0);
200
- rb_define_singleton_method(csssm, "default", sssm_get_default, 0);
201
- G_DEF_SETTERS (csssm);
200
+ VALUE RG_TARGET_NAMESPACE =
201
+ G_DEF_CLASS (GTK_TYPE_SOURCE_STYLE_SCHEME_MANAGER,
202
+ "SourceStyleSchemeManager", mGtk);
203
+
204
+ RG_DEF_METHOD(initialize, 0);
205
+ RG_DEF_METHOD(set_search_path, 1);
206
+ RG_DEF_METHOD(append_search_path, 1);
207
+ RG_DEF_METHOD(prepend_search_path, 1);
208
+ RG_DEF_METHOD(search_path, 0);
209
+ RG_DEF_METHOD(scheme_ids, 0);
210
+ RG_DEF_METHOD(get_scheme, 1);
211
+ RG_DEF_METHOD(force_rescan, 0);
212
+ RG_DEF_SMETHOD(default, 0);
213
+ G_DEF_SETTERS (RG_TARGET_NAMESPACE);
202
214
  }
@@ -1,19 +1,32 @@
1
1
  /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
- /************************************************
3
-
4
- rbgtksourceview.c -
5
-
6
- $Author: mutoh $
7
- $Date: 2006/12/17 16:15:28 $
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
+ */
8
22
 
9
- Copyright (C) 2004,2005 Ruby-GNOME2 Project Team
10
- Copyright (C) 2003 Geoff Youngs, based on gtktextview.c by Masao Mutoh
11
- ************************************************/
12
23
  #include "rbgtksourcemain.h"
13
24
 
14
25
  /* Class: Gtk::SourceView
15
26
  * A view on a source.
16
27
  */
28
+
29
+ #define RG_TARGET_NAMESPACE cSourceView
17
30
  #define _SELF(self) (GTK_SOURCE_VIEW(RVAL2GOBJ(self)))
18
31
 
19
32
  /*
@@ -27,7 +40,7 @@
27
40
  * Returns: a newly created Gtk::SourceView object.
28
41
  */
29
42
  static VALUE
30
- sourceview_initialize(int argc, VALUE *argv, VALUE self)
43
+ rg_initialize(int argc, VALUE *argv, VALUE self)
31
44
  {
32
45
  VALUE buffer;
33
46
  GtkWidget *widget;
@@ -35,35 +48,14 @@ sourceview_initialize(int argc, VALUE *argv, VALUE self)
35
48
  rb_scan_args(argc, argv, "01", &buffer);
36
49
 
37
50
  if (NIL_P(buffer))
38
- widget = gtk_source_view_new();
51
+ widget = gtk_source_view_new();
39
52
  else
40
- widget = gtk_source_view_new_with_buffer(RVAL2GOBJ(buffer));
53
+ widget = gtk_source_view_new_with_buffer(RVAL2GOBJ(buffer));
41
54
 
42
55
  RBGTK_INITIALIZE(self, widget);
43
56
  return self;
44
57
  }
45
58
 
46
- /* Defined as properties.
47
- void gtk_source_view_set_auto_indent (GtkSourceView *view,
48
- gboolean enable)
49
- gboolean gtk_source_view_get_auto_indent (GtkSourceView *view)
50
- void gtk_source_view_set_indent_on_tab (GtkSourceView *view,
51
- gboolean enable)
52
- gboolean gtk_source_view_get_indent_on_tab (GtkSourceView *view)
53
- void gtk_source_view_set_indent_width (GtkSourceView *view,
54
- gint width)
55
- gint gtk_source_view_get_indent_width (GtkSourceView *view)
56
- void gtk_source_view_set_insert_spaces_instead_of_tabs
57
- (GtkSourceView *view,
58
- gboolean enable)
59
- gboolean gtk_source_view_get_insert_spaces_instead_of_tabs
60
- (GtkSourceView *view)
61
- void gtk_source_view_set_smart_home_end (GtkSourceView *view,
62
- GtkSourceSmartHomeEndType smart_he)
63
- GtkSourceSmartHomeEndType gtk_source_view_get_smart_home_end
64
- (GtkSourceView *view)
65
- */
66
-
67
59
  #ifdef HAVE_GTK_SOURCE_MARK_GET_TYPE
68
60
  /*
69
61
  * Method: set_mark_category_pixbuf(category, pixbuf)
@@ -75,11 +67,11 @@ GtkSourceSmartHomeEndType gtk_source_view_get_smart_home_end
75
67
  * Returns: self.
76
68
  */
77
69
  static VALUE
78
- sourceview_set_mark_category_pixbuf(VALUE self, VALUE category, VALUE pixbuf)
70
+ rg_set_mark_category_pixbuf(VALUE self, VALUE category, VALUE pixbuf)
79
71
  {
80
72
  gtk_source_view_set_mark_category_pixbuf(_SELF(self),
81
- RVAL2CSTR(category),
82
- GDK_PIXBUF(RVAL2GOBJ(pixbuf)));
73
+ RVAL2CSTR(category),
74
+ GDK_PIXBUF(RVAL2GOBJ(pixbuf)));
83
75
  return self;
84
76
  }
85
77
 
@@ -92,12 +84,12 @@ sourceview_set_mark_category_pixbuf(VALUE self, VALUE category, VALUE pixbuf)
92
84
  * Returns: a Gdk::Pixbuf object if found, or nil if not found.
93
85
  */
94
86
  static VALUE
95
- sourceview_get_mark_category_pixbuf(VALUE self, VALUE category)
87
+ rg_get_mark_category_pixbuf(VALUE self, VALUE category)
96
88
  {
97
89
  GdkPixbuf *pixbuf;
98
90
 
99
91
  pixbuf = gtk_source_view_get_mark_category_pixbuf(_SELF(self),
100
- RVAL2CSTR(category));
92
+ RVAL2CSTR(category));
101
93
  return GOBJ2RVAL(pixbuf);
102
94
  }
103
95
 
@@ -111,11 +103,11 @@ sourceview_get_mark_category_pixbuf(VALUE self, VALUE category)
111
103
  * Returns: self.
112
104
  */
113
105
  static VALUE
114
- sourceview_set_mark_category_priority(VALUE self, VALUE category, VALUE priority)
106
+ rg_set_mark_category_priority(VALUE self, VALUE category, VALUE priority)
115
107
  {
116
108
  gtk_source_view_set_mark_category_priority(_SELF (self),
117
- RVAL2CSTR(category),
118
- NUM2INT(priority));
109
+ RVAL2CSTR(category),
110
+ NUM2INT(priority));
119
111
  return self;
120
112
  }
121
113
 
@@ -128,12 +120,12 @@ sourceview_set_mark_category_priority(VALUE self, VALUE category, VALUE priority
128
120
  * Returns: the priority if found, or 0 if not found.
129
121
  */
130
122
  static VALUE
131
- sourceview_get_mark_category_priority(VALUE self, VALUE category)
123
+ rg_get_mark_category_priority(VALUE self, VALUE category)
132
124
  {
133
125
  gint priority;
134
126
 
135
127
  priority = gtk_source_view_get_mark_category_priority(_SELF(self),
136
- RVAL2CSTR(category));
128
+ RVAL2CSTR(category));
137
129
  return INT2NUM(priority);
138
130
  }
139
131
  #endif /* HAVE_GTK_SOURCE_MARK_GET_TYPE */
@@ -148,12 +140,12 @@ sourceview_get_mark_category_priority(VALUE self, VALUE category)
148
140
  * Returns: a Gdk::Color object if found, or nil if not found.
149
141
  */
150
142
  static VALUE
151
- sourceview_get_mark_category_background(VALUE self, VALUE category)
143
+ rg_get_mark_category_background(VALUE self, VALUE category)
152
144
  {
153
145
  GdkColor color;
154
146
  gtk_source_view_get_mark_category_background(_SELF (self),
155
- RVAL2CSTR(category),
156
- &color);
147
+ RVAL2CSTR(category),
148
+ &color);
157
149
  return GDKCOLOR2RVAL(&color);
158
150
  }
159
151
 
@@ -168,72 +160,43 @@ sourceview_get_mark_category_background(VALUE self, VALUE category)
168
160
  * Returns: self.
169
161
  */
170
162
  static VALUE
171
- sourceview_set_mark_category_background(VALUE self, VALUE category, VALUE color)
163
+ rg_set_mark_category_background(VALUE self, VALUE category, VALUE color)
172
164
  {
173
165
  gtk_source_view_set_mark_category_background(_SELF (self),
174
- RVAL2CSTR (category),
175
- RVAL2GDKCOLOR((color)));
166
+ RVAL2CSTR (category),
167
+ RVAL2GDKCOLOR((color)));
176
168
  return self;
177
169
  }
178
170
  # endif /* HAVE_GTK_SOURCE_VIEW_GET_MARK_CATEGORY_BACKGROUND */
179
171
 
180
- /* Defined as properties.
181
- void gtk_source_view_set_highlight_current_line
182
- (GtkSourceView *view,
183
- gboolean show)
184
- gboolean gtk_source_view_get_highlight_current_line
185
- (GtkSourceView *view)
186
- void gtk_source_view_set_show_line_marks (GtkSourceView *view,
187
- gboolean show);
188
- gboolean gtk_source_view_get_show_line_marks (GtkSourceView *view)
189
- void gtk_source_view_set_show_line_numbers
190
- (GtkSourceView *view,
191
- gboolean show)
192
- gboolean gtk_source_view_get_show_line_numbers
193
- (GtkSourceView *view)
194
- void gtk_source_view_set_show_right_margin
195
- (GtkSourceView *view,
196
- gboolean show)
197
- gboolean gtk_source_view_get_show_right_margin
198
- (GtkSourceView *view)
199
- void gtk_source_view_set_right_margin_position
200
- (GtkSourceView *view,
201
- guint pos)
202
- guint gtk_source_view_get_right_margin_position
203
- (GtkSourceView *view)
204
- void gtk_source_view_set_tab_width (GtkSourceView *view,
205
- guint width)
206
- guint gtk_source_view_get_tab_width (GtkSourceView *view)
207
- */
208
-
209
172
  void
210
- Init_gtk_sourceview ()
173
+ Init_gtk_sourceview (VALUE mGtk)
211
174
  {
212
- VALUE cSourceView = G_DEF_CLASS (GTK_TYPE_SOURCE_VIEW, "SourceView", mGtk);
175
+ VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS (GTK_TYPE_SOURCE_VIEW, "SourceView", mGtk);
213
176
 
214
- rb_define_const(cSourceView, "BUILD_VERSION",
177
+ rb_define_const(RG_TARGET_NAMESPACE, "BUILD_VERSION",
215
178
  rb_ary_new3(3,
216
179
  INT2FIX(GTKSOURCEVIEW2_MAJOR_VERSION),
217
180
  INT2FIX(GTKSOURCEVIEW2_MINOR_VERSION),
218
181
  INT2FIX(GTKSOURCEVIEW2_MICRO_VERSION)));
219
182
 
220
- rb_define_method(cSourceView, "initialize", sourceview_initialize, -1);
183
+ RG_DEF_METHOD(initialize, -1);
221
184
  #ifdef HAVE_GTK_SOURCE_MARK_GET_TYPE
222
- rb_define_method(cSourceView, "get_mark_category_pixbuf", sourceview_get_mark_category_pixbuf, 1);
223
- rb_define_method(cSourceView, "set_mark_category_pixbuf", sourceview_set_mark_category_pixbuf, 2);
224
- rb_define_method(cSourceView, "get_mark_category_priority", sourceview_get_mark_category_priority, 1);
225
- rb_define_method(cSourceView, "set_mark_category_priority", sourceview_set_mark_category_priority, 2);
185
+ RG_DEF_METHOD(get_mark_category_pixbuf, 1);
186
+ RG_DEF_METHOD(set_mark_category_pixbuf, 2);
187
+ RG_DEF_METHOD(get_mark_category_priority, 1);
188
+ RG_DEF_METHOD(set_mark_category_priority, 2);
226
189
  #endif
227
190
  #ifdef HAVE_GTK_SOURCE_VIEW_GET_MARK_CATEGORY_BACKGROUND
228
- rb_define_method(cSourceView, "get_mark_category_background", sourceview_get_mark_category_background, 1);
229
- rb_define_method(cSourceView, "set_mark_category_background", sourceview_set_mark_category_background, 2);
191
+ RG_DEF_METHOD(get_mark_category_background, 1);
192
+ RG_DEF_METHOD(set_mark_category_background, 2);
230
193
  #endif
231
- G_DEF_SETTERS (cSourceView);
194
+ G_DEF_SETTERS (RG_TARGET_NAMESPACE);
232
195
 
233
- G_DEF_CLASS(GTK_TYPE_SOURCE_SMART_HOME_END_TYPE, "SmartHomeEndType", cSourceView);
234
- G_DEF_CONSTANTS(cSourceView, GTK_TYPE_SOURCE_SMART_HOME_END_TYPE, "GTK_SOURCE_");
196
+ G_DEF_CLASS(GTK_TYPE_SOURCE_SMART_HOME_END_TYPE, "SmartHomeEndType", RG_TARGET_NAMESPACE);
197
+ G_DEF_CONSTANTS(RG_TARGET_NAMESPACE, GTK_TYPE_SOURCE_SMART_HOME_END_TYPE, "GTK_SOURCE_");
235
198
  #ifdef HAVE_GTK_SOURCE_VIEW_GET_MARK_CATEGORY_BACKGROUND
236
- G_DEF_CLASS(GTK_TYPE_SOURCE_DRAW_SPACES_FLAGS, "DrawSpacesFlags", cSourceView);
237
- G_DEF_CONSTANTS(cSourceView, GTK_TYPE_SOURCE_DRAW_SPACES_FLAGS, "GTK_SOURCE_");
199
+ G_DEF_CLASS(GTK_TYPE_SOURCE_DRAW_SPACES_FLAGS, "DrawSpacesFlags", RG_TARGET_NAMESPACE);
200
+ G_DEF_CONSTANTS(RG_TARGET_NAMESPACE, GTK_TYPE_SOURCE_DRAW_SPACES_FLAGS, "GTK_SOURCE_");
238
201
  #endif
239
202
  }
Binary file
Binary file