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,30 +1,42 @@
1
1
  /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
- /************************************************
3
-
4
- rbgtksourcelanguagemanager.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::SourceLanguageManager
15
26
  * A class to manage source language.
16
27
  */
17
28
 
29
+ #define RG_TARGET_NAMESPACE cSourceLanguageManager
18
30
  #define _SELF(self) (GTK_SOURCE_LANGUAGE_MANAGER(RVAL2GOBJ(self)))
19
31
 
20
32
  /* Class method: new
21
33
  * Returns: a newly created Gtk::SourceLanguageManager object.
22
34
  */
23
35
  static VALUE
24
- slm_new(VALUE self)
36
+ rg_initialize(VALUE self)
25
37
  {
26
- G_INITIALIZE (self, gtk_source_language_manager_new ());
27
- return Qnil;
38
+ G_INITIALIZE (self, gtk_source_language_manager_new ());
39
+ return Qnil;
28
40
  }
29
41
 
30
42
  /* Class method: default
@@ -34,7 +46,7 @@ slm_new(VALUE self)
34
46
  * Returns: a Gtk::SourceLanguageManager
35
47
  */
36
48
  static VALUE
37
- slm_get_default(VALUE self)
49
+ rg_s_default(VALUE self)
38
50
  {
39
51
  GtkSourceLanguageManager* slm = gtk_source_language_manager_get_default();
40
52
  GType gtype = G_TYPE_FROM_INSTANCE(slm);
@@ -56,10 +68,10 @@ slm_get_default(VALUE self)
56
68
  * Returns: self.
57
69
  */
58
70
  static VALUE
59
- slm_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,9 +88,9 @@ slm_set_search_path(VALUE self, VALUE dirs)
76
88
  gdirs[i] = (gchar*)NULL;
77
89
  }
78
90
 
79
- gtk_source_language_manager_set_search_path (_SELF (self), gdirs);
91
+ gtk_source_language_manager_set_search_path (_SELF (self), gdirs);
80
92
 
81
- return self;
93
+ return self;
82
94
  }
83
95
 
84
96
  /* Method: search_path
@@ -86,10 +98,10 @@ slm_set_search_path(VALUE self, VALUE dirs)
86
98
  * language manager.
87
99
  */
88
100
  static VALUE
89
- slm_get_search_path(VALUE self)
101
+ rg_search_path(VALUE self)
90
102
  {
91
- VALUE ary;
92
- const gchar * const * dirs =
103
+ VALUE ary;
104
+ const gchar * const * dirs =
93
105
  gtk_source_language_manager_get_search_path (_SELF (self));
94
106
  if (!dirs)
95
107
  return Qnil;
@@ -106,10 +118,10 @@ slm_get_search_path(VALUE self)
106
118
  * Returns: a list of languages ids for the given language manager
107
119
  */
108
120
  static VALUE
109
- slm_get_language_ids(VALUE self)
121
+ rg_language_ids(VALUE self)
110
122
  {
111
- VALUE ary;
112
- const gchar * const * ids =
123
+ VALUE ary;
124
+ const gchar * const * ids =
113
125
  gtk_source_language_manager_get_language_ids (_SELF (self));
114
126
  if (!ids)
115
127
  return Qnil;
@@ -133,11 +145,11 @@ slm_get_language_ids(VALUE self)
133
145
  * with the given id.
134
146
  */
135
147
  static VALUE
136
- slm_get_language(VALUE self, VALUE id)
148
+ rg_get_language(VALUE self, VALUE id)
137
149
  {
138
- return
139
- GOBJ2RVAL (gtk_source_language_manager_get_language
140
- (_SELF (self), RVAL2CSTR (id)));
150
+ return
151
+ GOBJ2RVAL (gtk_source_language_manager_get_language
152
+ (_SELF (self), RVAL2CSTR (id)));
141
153
  }
142
154
 
143
155
  #ifdef HAVE_GTK_SOURCE_LANGUAGE_MANAGER_GUESS_LANGUAGE
@@ -152,30 +164,30 @@ slm_get_language(VALUE self, VALUE id)
152
164
  * with the given filename or content_type.
153
165
  */
154
166
  static VALUE
155
- slm_guess_language(VALUE self, VALUE filename, VALUE content_type)
167
+ rg_guess_language(VALUE self, VALUE filename, VALUE content_type)
156
168
  {
157
- return GOBJ2RVAL (gtk_source_language_manager_guess_language
158
- (_SELF (self),
159
- NIL_P(filename) ? NULL : RVAL2CSTR (filename),
160
- NIL_P(content_type) ? NULL : RVAL2CSTR (content_type)));
169
+ return GOBJ2RVAL (gtk_source_language_manager_guess_language
170
+ (_SELF (self),
171
+ NIL_P(filename) ? NULL : RVAL2CSTR (filename),
172
+ NIL_P(content_type) ? NULL : RVAL2CSTR (content_type)));
161
173
  }
162
174
  #endif /* HAVE_GTK_SOURCE_LANGUAGE_MANAGER_GUESS_LANGUAGE */
163
175
 
164
176
  void
165
- Init_gtk_sourcelanguagemanager ()
177
+ Init_gtk_sourcelanguagemanager (VALUE mGtk)
166
178
  {
167
- VALUE cslm =
168
- G_DEF_CLASS (GTK_TYPE_SOURCE_LANGUAGE_MANAGER,
169
- "SourceLanguageManager", mGtk);
170
-
171
- rb_define_method (cslm, "initialize", slm_new, 0);
172
- rb_define_method (cslm, "set_search_path", slm_set_search_path, 1);
173
- rb_define_method (cslm, "search_path", slm_get_search_path, 0);
174
- rb_define_method (cslm, "language_ids", slm_get_language_ids, 0);
175
- rb_define_method (cslm, "get_language", slm_get_language, 1);
179
+ VALUE RG_TARGET_NAMESPACE =
180
+ G_DEF_CLASS (GTK_TYPE_SOURCE_LANGUAGE_MANAGER,
181
+ "SourceLanguageManager", mGtk);
182
+
183
+ RG_DEF_METHOD(initialize, 0);
184
+ RG_DEF_METHOD(set_search_path, 1);
185
+ RG_DEF_METHOD(search_path, 0);
186
+ RG_DEF_METHOD(language_ids, 0);
187
+ RG_DEF_METHOD(get_language, 1);
176
188
  #ifdef HAVE_GTK_SOURCE_LANGUAGE_MANAGER_GUESS_LANGUAGE
177
- rb_define_method (cslm, "guess_language", slm_guess_language, 2);
189
+ RG_DEF_METHOD(guess_language, 2);
178
190
  #endif
179
- rb_define_singleton_method(cslm, "default", slm_get_default, 0);
180
- G_DEF_SETTERS (cslm);
191
+ RG_DEF_SMETHOD(default, 0);
192
+ G_DEF_SETTERS (RG_TARGET_NAMESPACE);
181
193
  }
@@ -1,38 +1,49 @@
1
1
  /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
- /************************************************
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
+ */
3
22
 
4
- rbgtksourcemain.c -
5
-
6
- $Author $
7
- $Date: 2005/10/07 19:26:15 $
8
-
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
- extern void Init_gtk_sourceview (void);
15
- extern void Init_gtk_sourcebuffer (void);
16
- extern void Init_gtk_sourceiter (void);
17
- extern void Init_gtk_sourcelanguage (void);
18
- extern void Init_gtk_sourcelanguagemanager (void);
19
- extern void Init_gtk_sourcemark (void);
20
- extern void Init_gtk_sourceprintcompositor (void);
21
- extern void Init_gtk_sourcestyle (void);
22
- extern void Init_gtk_sourcestylescheme (void);
23
- extern void Init_gtk_sourcestyleschememanager (void);
25
+ G_GNUC_INTERNAL void Init_gtk_sourceview (VALUE mGtk);
26
+ G_GNUC_INTERNAL void Init_gtk_sourcebuffer (VALUE mGtk);
27
+ G_GNUC_INTERNAL void Init_gtk_sourceiter (VALUE mGtk);
28
+ G_GNUC_INTERNAL void Init_gtk_sourcelanguage (VALUE mGtk);
29
+ G_GNUC_INTERNAL void Init_gtk_sourcelanguagemanager (VALUE mGtk);
30
+ G_GNUC_INTERNAL void Init_gtk_sourcemark (VALUE mGtk);
31
+ G_GNUC_INTERNAL void Init_gtk_sourceprintcompositor (VALUE mGtk);
32
+ G_GNUC_INTERNAL void Init_gtk_sourcestyle (VALUE mGtk);
33
+ G_GNUC_INTERNAL void Init_gtk_sourcestylescheme (VALUE mGtk);
34
+ G_GNUC_INTERNAL void Init_gtk_sourcestyleschememanager (VALUE mGtk);
24
35
 
25
36
  void
26
37
  Init_gtksourceview2 (void)
27
38
  {
28
- Init_gtk_sourceview ();
29
- Init_gtk_sourcebuffer ();
30
- Init_gtk_sourceiter ();
31
- Init_gtk_sourcelanguage ();
32
- Init_gtk_sourcelanguagemanager ();
33
- Init_gtk_sourcemark ();
34
- Init_gtk_sourceprintcompositor ();
35
- Init_gtk_sourcestyle ();
36
- Init_gtk_sourcestylescheme ();
37
- Init_gtk_sourcestyleschememanager ();
39
+ Init_gtk_sourceview (mGtk);
40
+ Init_gtk_sourcebuffer (mGtk);
41
+ Init_gtk_sourceiter (mGtk);
42
+ Init_gtk_sourcelanguage (mGtk);
43
+ Init_gtk_sourcelanguagemanager (mGtk);
44
+ Init_gtk_sourcemark (mGtk);
45
+ Init_gtk_sourceprintcompositor (mGtk);
46
+ Init_gtk_sourcestyle (mGtk);
47
+ Init_gtk_sourcestylescheme (mGtk);
48
+ Init_gtk_sourcestyleschememanager (mGtk);
38
49
  }
@@ -1,14 +1,24 @@
1
1
  /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
- /************************************************
3
-
4
- rbgtksourcemain.h -
5
-
6
- $Author: mutoh $
7
- $Date: 2005/10/07 19:26:15 $
8
-
9
- Copyright (C) 2004,2005 Ruby-GNOME2 Project Team
10
- Copyright (C) 2003 Geoff Youngs
11
- ************************************************/
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
+ */
12
22
 
13
23
  #ifndef __RBGTKSOURCEVIEWMAIN_H_
14
24
  #define __RBGTKSOURCEVIEWMAIN_H_
@@ -1,13 +1,24 @@
1
1
  /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
- /************************************************
3
-
4
- rbgtksourcemark.c -
5
-
6
- $Author $
7
- $Date: 2004/08/05 18:13:49 $
2
+ /*
3
+ * Copyright (C) 2011 Ruby-GNOME2 Project Team
4
+ * Copyright (C) 2003 Geoff Youngs, based on gtktextview.c by 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) 2003 Geoff Youngs, based on gtktextview.c by Masao Mutoh
10
- ************************************************/
11
22
  #include "rbgtksourcemain.h"
12
23
 
13
24
  #ifdef HAVE_GTK_SOURCE_MARK_GET_TYPE
@@ -15,6 +26,7 @@
15
26
  * A source mark.
16
27
  */
17
28
 
29
+ #define RG_TARGET_NAMESPACE cSourceMark
18
30
  #define _SELF(self) (GTK_SOURCE_MARK(RVAL2GOBJ(self)))
19
31
 
20
32
  /* Class method: new(name, category)
@@ -24,24 +36,20 @@
24
36
  * Returns: a newly created Gtk::SourceMark object.
25
37
  */
26
38
  static VALUE
27
- sourcemark_new(VALUE self, VALUE name, VALUE category)
39
+ rg_initialize(VALUE self, VALUE name, VALUE category)
28
40
  {
29
- G_INITIALIZE (self,
30
- gtk_source_mark_new (RVAL2CSTR(name), RVAL2CSTR(category)));
31
- return Qnil;
41
+ G_INITIALIZE (self,
42
+ gtk_source_mark_new (RVAL2CSTR(name), RVAL2CSTR(category)));
43
+ return Qnil;
32
44
  }
33
45
 
34
- /* Defined as properties.
35
- const gchar* gtk_source_mark_get_category (GtkSourceMark *mark);
36
- */
37
-
38
46
  /* Method: next(category=nil)
39
47
  * category: the category (string), or nil.
40
48
  *
41
49
  * Returns: the next Gtk::SourceMark after the mark.
42
50
  */
43
51
  static VALUE
44
- sourcemark_next(int argc, VALUE *argv, VALUE self)
52
+ rg_next(int argc, VALUE *argv, VALUE self)
45
53
  {
46
54
  VALUE category;
47
55
 
@@ -57,7 +65,7 @@ sourcemark_next(int argc, VALUE *argv, VALUE self)
57
65
  * Returns: the previous Gtk::SourceMark before the mark.
58
66
  */
59
67
  static VALUE
60
- sourcemark_prev(int argc, VALUE *argv, VALUE self)
68
+ rg_prev(int argc, VALUE *argv, VALUE self)
61
69
  {
62
70
  VALUE category;
63
71
 
@@ -69,15 +77,15 @@ sourcemark_prev(int argc, VALUE *argv, VALUE self)
69
77
  #endif /* HAVE_GTK_SOURCE_MARK_GET_TYPE */
70
78
 
71
79
  void
72
- Init_gtk_sourcemark ()
80
+ Init_gtk_sourcemark (VALUE mGtk)
73
81
  {
74
82
  #ifdef HAVE_GTK_SOURCE_MARK_GET_TYPE
75
- VALUE csm = G_DEF_CLASS (GTK_TYPE_SOURCE_MARK, "SourceMark", mGtk);
83
+ VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS (GTK_TYPE_SOURCE_MARK, "SourceMark", mGtk);
76
84
 
77
- rb_define_method (csm, "initialize", sourcemark_new, 2);
78
- rb_define_method (csm, "next", sourcemark_next, -1);
79
- rb_define_method (csm, "prev", sourcemark_prev, -1);
85
+ RG_DEF_METHOD(initialize, 2);
86
+ RG_DEF_METHOD(next, -1);
87
+ RG_DEF_METHOD(prev, -1);
80
88
 
81
- G_DEF_SETTERS (csm);
89
+ G_DEF_SETTERS (RG_TARGET_NAMESPACE);
82
90
  #endif /* HAVE_GTK_SOURCE_MARK_GET_TYPE */
83
91
  }
@@ -1,18 +1,31 @@
1
1
  /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
- /************************************************
3
-
4
- rbgtksourceprintcompositor.c -
5
-
6
- $Author: ggc $
7
- $Date: 2007/07/13 16:07:33 $
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
  #ifdef HAVE_GTK_SOURCE_PRINT_COMPOSITOR_GET_TYPE
14
25
  /* Module: Gtk::SourcePrintCompositor
15
26
  */
27
+
28
+ #define RG_TARGET_NAMESPACE cSourcePrintCompositor
16
29
  #define _SELF(self) (GTK_SOURCE_PRINT_COMPOSITOR(RVAL2GOBJ(self)))
17
30
  #define RVAL2UNIT(o) (RVAL2GENUM(o, GTK_TYPE_UNIT))
18
31
 
@@ -25,7 +38,7 @@
25
38
  * Returns: the new print compositor object.
26
39
  */
27
40
  static VALUE
28
- sprintcompositor_initialize(VALUE self, VALUE val)
41
+ rg_initialize(VALUE self, VALUE val)
29
42
  {
30
43
  if (rb_obj_is_kind_of (val, GTYPE2CLASS (GTK_TYPE_SOURCE_BUFFER))) {
31
44
  G_INITIALIZE(self,
@@ -42,117 +55,60 @@ sprintcompositor_initialize(VALUE self, VALUE val)
42
55
  return Qnil;
43
56
  }
44
57
 
45
- /* Defined as properties.
46
- GtkSourceBuffer* gtk_source_print_compositor_get_buffer
47
- (GtkSourcePrintCompositor *compositor);
48
- void gtk_source_print_compositor_set_tab_width
49
- (GtkSourcePrintCompositor *compositor,
50
- guint width);
51
- guint gtk_source_print_compositor_get_tab_width
52
- (GtkSourcePrintCompositor *compositor);
53
- void gtk_source_print_compositor_set_wrap_mode
54
- (GtkSourcePrintCompositor *compositor,
55
- GtkWrapMode wrap_mode);
56
- GtkWrapMode gtk_source_print_compositor_get_wrap_mode
57
- (GtkSourcePrintCompositor *compositor);
58
- void gtk_source_print_compositor_set_highlight_syntax
59
- (GtkSourcePrintCompositor *compositor,
60
- gboolean highlight);
61
- gboolean gtk_source_print_compositor_get_highlight_syntax
62
- (GtkSourcePrintCompositor *compositor);
63
- void gtk_source_print_compositor_set_print_line_numbers
64
- (GtkSourcePrintCompositor *compositor,
65
- guint interval);
66
- guint gtk_source_print_compositor_get_print_line_numbers
67
- (GtkSourcePrintCompositor *compositor);
68
- void gtk_source_print_compositor_set_body_font_name
69
- (GtkSourcePrintCompositor *compositor,
70
- const gchar *font_name);
71
- gchar* gtk_source_print_compositor_get_body_font_name
72
- (GtkSourcePrintCompositor *compositor);
73
- void gtk_source_print_compositor_set_line_numbers_font_name
74
- (GtkSourcePrintCompositor *compositor,
75
- const gchar *font_name);
76
- gchar* gtk_source_print_compositor_get_line_numbers_font_name
77
- (GtkSourcePrintCompositor *compositor);
78
- void gtk_source_print_compositor_set_header_font_name
79
- (GtkSourcePrintCompositor *compositor,
80
- const gchar *font_name);
81
- gchar* gtk_source_print_compositor_get_header_font_name
82
- (GtkSourcePrintCompositor *compositor);
83
- void gtk_source_print_compositor_set_footer_font_name
84
- (GtkSourcePrintCompositor *compositor,
85
- const gchar *font_name);
86
- gchar* gtk_source_print_compositor_get_footer_font_name
87
- (GtkSourcePrintCompositor *compositor);
88
- void gtk_source_print_compositor_set_print_header
89
- (GtkSourcePrintCompositor *compositor,
90
- gboolean print);
91
- gboolean gtk_source_print_compositor_get_print_header
92
- (GtkSourcePrintCompositor *compositor);
93
- void gtk_source_print_compositor_set_print_footer
94
- (GtkSourcePrintCompositor *compositor,
95
- gboolean print);
96
- gboolean gtk_source_print_compositor_get_print_footer
97
- (GtkSourcePrintCompositor *compositor);
98
- gint gtk_source_print_compositor_get_n_pages
99
- (GtkSourcePrintCompositor *compositor);
100
- */
101
-
102
58
  static VALUE
103
- sprintcompositor_get_top_margin(VALUE self, VALUE unit)
59
+ rg_get_top_margin(VALUE self, VALUE unit)
104
60
  {
105
61
  return DBL2NUM(gtk_source_print_compositor_get_top_margin(_SELF(self), RVAL2UNIT (unit)));
106
62
  }
107
63
 
108
64
  static VALUE
109
- sprintcompositor_set_top_margin(VALUE self, VALUE top, VALUE unit)
65
+ rg_set_top_margin(VALUE self, VALUE top, VALUE unit)
110
66
  {
111
67
  gtk_source_print_compositor_set_top_margin(_SELF(self), NUM2DBL(top), RVAL2UNIT (unit));
112
68
  return self;
113
69
  }
114
70
 
115
71
  static VALUE
116
- sprintcompositor_get_bottom_margin(VALUE self, VALUE unit)
72
+ rg_get_bottom_margin(VALUE self, VALUE unit)
117
73
  {
118
74
  return DBL2NUM(gtk_source_print_compositor_get_bottom_margin(_SELF(self), RVAL2UNIT (unit)));
119
75
  }
120
76
 
121
77
  static VALUE
122
- sprintcompositor_set_bottom_margin(VALUE self, VALUE bottom, VALUE unit)
78
+ rg_set_bottom_margin(VALUE self, VALUE bottom, VALUE unit)
123
79
  {
124
80
  gtk_source_print_compositor_set_bottom_margin(_SELF(self), NUM2DBL(bottom), RVAL2UNIT (unit));
125
81
  return self;
126
82
  }
127
83
 
128
84
  static VALUE
129
- sprintcompositor_get_left_margin(VALUE self, VALUE unit)
85
+ rg_get_left_margin(VALUE self, VALUE unit)
130
86
  {
131
87
  return DBL2NUM(gtk_source_print_compositor_get_left_margin(_SELF(self), RVAL2UNIT (unit)));
132
88
  }
133
89
 
134
90
  static VALUE
135
- sprintcompositor_set_left_margin(VALUE self, VALUE left, VALUE unit)
91
+ rg_set_left_margin(VALUE self, VALUE left, VALUE unit)
136
92
  {
137
93
  gtk_source_print_compositor_set_left_margin(_SELF(self), NUM2DBL(left), RVAL2UNIT (unit));
138
94
  return self;
139
95
  }
140
96
 
141
97
  static VALUE
142
- sprintcompositor_get_right_margin(VALUE self, VALUE unit)
98
+ rg_get_right_margin(VALUE self, VALUE unit)
143
99
  {
144
100
  return DBL2NUM(gtk_source_print_compositor_get_right_margin(_SELF(self), RVAL2UNIT (unit)));
145
101
  }
146
102
 
147
103
  static VALUE
148
- sprintcompositor_set_right_margin(VALUE self, VALUE right, VALUE unit)
104
+ rg_set_right_margin(VALUE self, VALUE right, VALUE unit)
149
105
  {
150
106
  gtk_source_print_compositor_set_right_margin(_SELF(self), NUM2DBL(right), RVAL2UNIT (unit));
151
107
  return self;
152
108
  }
153
109
 
154
110
  static VALUE
155
- sprintcompositor_set_header_format(VALUE self, VALUE separator, VALUE left, VALUE center, VALUE right)
111
+ rg_set_header_format(VALUE self, VALUE separator, VALUE left, VALUE center, VALUE right)
156
112
  {
157
113
  gtk_source_print_compositor_set_header_format(_SELF(self),
158
114
  RVAL2CBOOL(separator),
@@ -163,7 +119,7 @@ sprintcompositor_set_header_format(VALUE self, VALUE separator, VALUE left, VALU
163
119
  }
164
120
 
165
121
  static VALUE
166
- sprintcompositor_set_footer_format(VALUE self, VALUE separator, VALUE left, VALUE center, VALUE right)
122
+ rg_set_footer_format(VALUE self, VALUE separator, VALUE left, VALUE center, VALUE right)
167
123
  {
168
124
  gtk_source_print_compositor_set_footer_format(_SELF(self),
169
125
  RVAL2CBOOL(separator),
@@ -174,20 +130,20 @@ sprintcompositor_set_footer_format(VALUE self, VALUE separator, VALUE left, VALU
174
130
  }
175
131
 
176
132
  static VALUE
177
- sprintcompositor_paginate(VALUE self, VALUE context)
133
+ rg_paginate(VALUE self, VALUE context)
178
134
  {
179
135
  return CBOOL2RVAL (gtk_source_print_compositor_paginate (_SELF (self),
180
136
  GTK_PRINT_CONTEXT (RVAL2GOBJ (context))));
181
137
  }
182
138
 
183
139
  static VALUE
184
- sprintcompositor_get_pagination_progress(VALUE self)
140
+ rg_pagination_progress(VALUE self)
185
141
  {
186
142
  return DBL2NUM (gtk_source_print_compositor_get_pagination_progress (_SELF (self)));
187
143
  }
188
144
 
189
145
  static VALUE
190
- sprintcompositor_draw_page(VALUE self, VALUE context, VALUE page_nr)
146
+ rg_draw_page(VALUE self, VALUE context, VALUE page_nr)
191
147
  {
192
148
  gtk_source_print_compositor_draw_page (_SELF (self),
193
149
  GTK_PRINT_CONTEXT (RVAL2GOBJ (context)),
@@ -197,39 +153,26 @@ sprintcompositor_draw_page(VALUE self, VALUE context, VALUE page_nr)
197
153
  #endif /* HAVE_GTK_SOURCE_PRINT_COMPOSITOR_GET_TYPE */
198
154
 
199
155
  void
200
- Init_gtk_sourceprintcompositor()
156
+ Init_gtk_sourceprintcompositor(VALUE mGtk)
201
157
  {
202
158
  #ifdef HAVE_GTK_SOURCE_PRINT_COMPOSITOR_GET_TYPE
203
- VALUE pc = G_DEF_CLASS(GTK_TYPE_SOURCE_PRINT_COMPOSITOR, "SourcePrintCompositor", mGtk);
204
-
205
- rb_define_method(pc, "initialize", sprintcompositor_initialize, 1);
206
- rb_define_method(pc, "get_top_margin",
207
- sprintcompositor_get_top_margin, 1);
208
- rb_define_method(pc, "set_top_margin",
209
- sprintcompositor_set_top_margin, 2);
210
- rb_define_method(pc, "get_bottom_margin",
211
- sprintcompositor_get_bottom_margin, 1);
212
- rb_define_method(pc, "set_bottom_margin",
213
- sprintcompositor_set_bottom_margin, 2);
214
- rb_define_method(pc, "get_left_margin",
215
- sprintcompositor_get_left_margin, 1);
216
- rb_define_method(pc, "set_left_margin",
217
- sprintcompositor_set_left_margin, 2);
218
- rb_define_method(pc, "get_right_margin",
219
- sprintcompositor_get_right_margin, 1);
220
- rb_define_method(pc, "set_right_margin",
221
- sprintcompositor_set_right_margin, 2);
222
- rb_define_method(pc, "set_header_format",
223
- sprintcompositor_set_header_format, 4);
224
- rb_define_method(pc, "set_footer_format",
225
- sprintcompositor_set_footer_format, 4);
226
- rb_define_method(pc, "paginate",
227
- sprintcompositor_paginate, 1);
228
- rb_define_method(pc, "pagination_progress",
229
- sprintcompositor_get_pagination_progress, 0);
230
- rb_define_method(pc, "draw_page",
231
- sprintcompositor_draw_page, 2);
232
-
233
- G_DEF_SETTERS(pc);
159
+ VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(GTK_TYPE_SOURCE_PRINT_COMPOSITOR, "SourcePrintCompositor", mGtk);
160
+
161
+ RG_DEF_METHOD(initialize, 1);
162
+ RG_DEF_METHOD(get_top_margin, 1);
163
+ RG_DEF_METHOD(set_top_margin, 2);
164
+ RG_DEF_METHOD(get_bottom_margin, 1);
165
+ RG_DEF_METHOD(set_bottom_margin, 2);
166
+ RG_DEF_METHOD(get_left_margin, 1);
167
+ RG_DEF_METHOD(set_left_margin, 2);
168
+ RG_DEF_METHOD(get_right_margin, 1);
169
+ RG_DEF_METHOD(set_right_margin, 2);
170
+ RG_DEF_METHOD(set_header_format, 4);
171
+ RG_DEF_METHOD(set_footer_format, 4);
172
+ RG_DEF_METHOD(paginate, 1);
173
+ RG_DEF_METHOD(pagination_progress, 0);
174
+ RG_DEF_METHOD(draw_page, 2);
175
+
176
+ G_DEF_SETTERS(RG_TARGET_NAMESPACE);
234
177
  #endif /* HAVE_GTK_SOURCE_PRINT_COMPOSITOR_GET_TYPE */
235
178
  }