poppler 3.1.8-x86-mingw32 → 3.1.9-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (108) hide show
  1. checksums.yaml +4 -4
  2. data/dependency-check/Rakefile +44 -0
  3. data/lib/poppler.rb +21 -107
  4. data/lib/poppler/annot-callout-line.rb +57 -0
  5. data/lib/poppler/cairo.rb +23 -0
  6. data/lib/poppler/color.rb +36 -0
  7. data/lib/poppler/deprecated.rb +67 -0
  8. data/lib/poppler/document.rb +108 -0
  9. data/lib/poppler/image-mapping.rb +25 -0
  10. data/lib/poppler/index-iter.rb +30 -0
  11. data/lib/poppler/loader.rb +139 -0
  12. data/lib/poppler/page.rb +61 -0
  13. data/lib/poppler/rectangle.rb +40 -0
  14. data/lib/poppler/version.rb +35 -0
  15. data/sample/number-pdf.rb +21 -2
  16. data/sample/pdf2.rb +0 -4
  17. data/sample/pdf2svg.rb +1 -1
  18. data/sample/pdf2text.rb +1 -1
  19. data/sample/pdfcrop.rb +1 -1
  20. data/sample/pdfdiv.rb +1 -1
  21. data/test/fixtures/image.odt +0 -0
  22. data/test/fixtures/image.pdf +0 -0
  23. data/test/fixtures/multiple-pages.odt +0 -0
  24. data/test/fixtures/multiple-pages.pdf +0 -0
  25. data/test/fixtures/text-field.odt +0 -0
  26. data/test/fixtures/text-field.pdf +0 -0
  27. data/test/poppler-test-utils.rb +24 -16
  28. data/test/run-test.rb +26 -4
  29. data/test/test-annotation.rb +76 -0
  30. data/test/{test_color.rb → test-color.rb} +0 -3
  31. data/test/test-constants.rb +16 -0
  32. data/test/{test_document.rb → test-document.rb} +26 -10
  33. data/test/test-page.rb +101 -0
  34. data/vendor/local/bin/cjpeg.exe +0 -0
  35. data/vendor/local/bin/djpeg.exe +0 -0
  36. data/vendor/local/bin/jpegtran.exe +0 -0
  37. data/vendor/local/bin/libjpeg-9.dll +0 -0
  38. data/vendor/local/bin/libopenjp2.dll +0 -0
  39. data/vendor/local/bin/libpoppler-59.dll +0 -0
  40. data/vendor/local/bin/libpoppler-cpp-0.dll +0 -0
  41. data/vendor/local/bin/libpoppler-glib-8.dll +0 -0
  42. data/vendor/local/bin/libsqlite3-0.dll +0 -0
  43. data/vendor/local/bin/opj_compress.exe +0 -0
  44. data/vendor/local/bin/opj_decompress.exe +0 -0
  45. data/vendor/local/bin/opj_dump.exe +0 -0
  46. data/vendor/local/bin/pdfdetach.exe +0 -0
  47. data/vendor/local/bin/pdffonts.exe +0 -0
  48. data/vendor/local/bin/pdfimages.exe +0 -0
  49. data/vendor/local/bin/pdfinfo.exe +0 -0
  50. data/vendor/local/bin/pdfseparate.exe +0 -0
  51. data/vendor/local/bin/pdftocairo.exe +0 -0
  52. data/vendor/local/bin/pdftohtml.exe +0 -0
  53. data/vendor/local/bin/pdftoppm.exe +0 -0
  54. data/vendor/local/bin/pdftops.exe +0 -0
  55. data/vendor/local/bin/pdftotext.exe +0 -0
  56. data/vendor/local/bin/pdfunite.exe +0 -0
  57. data/vendor/local/bin/rdjpgcom.exe +0 -0
  58. data/vendor/local/bin/sqlite3.exe +0 -0
  59. data/vendor/local/bin/wrjpgcom.exe +0 -0
  60. data/vendor/local/lib/libjpeg.dll.a +0 -0
  61. data/vendor/local/lib/libopenjp2.dll.a +0 -0
  62. data/vendor/local/lib/libpoppler-cpp.dll.a +0 -0
  63. data/vendor/local/lib/libpoppler-glib.a +0 -0
  64. data/vendor/local/lib/libpoppler-glib.dll.a +0 -0
  65. data/vendor/local/lib/libpoppler.a +0 -0
  66. data/vendor/local/lib/libpoppler.dll.a +0 -0
  67. data/vendor/local/lib/libsqlite3.dll.a +0 -0
  68. metadata +26 -46
  69. data/README +0 -35
  70. data/ext/poppler/depend +0 -6
  71. data/ext/poppler/extconf.rb +0 -73
  72. data/ext/poppler/poppler.def +0 -2
  73. data/ext/poppler/rbpoppler-action.c +0 -402
  74. data/ext/poppler/rbpoppler-annotation-callout-line.c +0 -127
  75. data/ext/poppler/rbpoppler-annotation-free-text.c +0 -46
  76. data/ext/poppler/rbpoppler-annotation-mapping.c +0 -72
  77. data/ext/poppler/rbpoppler-annotation-markup.c +0 -98
  78. data/ext/poppler/rbpoppler-annotation-text.c +0 -53
  79. data/ext/poppler/rbpoppler-annotation.c +0 -74
  80. data/ext/poppler/rbpoppler-attachment.c +0 -124
  81. data/ext/poppler/rbpoppler-button-field.c +0 -56
  82. data/ext/poppler/rbpoppler-choice-field.c +0 -131
  83. data/ext/poppler/rbpoppler-color.c +0 -107
  84. data/ext/poppler/rbpoppler-document.c +0 -224
  85. data/ext/poppler/rbpoppler-font-info.c +0 -59
  86. data/ext/poppler/rbpoppler-fonts-iter.c +0 -127
  87. data/ext/poppler/rbpoppler-form-field-mapping.c +0 -44
  88. data/ext/poppler/rbpoppler-form-field.c +0 -98
  89. data/ext/poppler/rbpoppler-image-mapping.c +0 -48
  90. data/ext/poppler/rbpoppler-index-iter.c +0 -130
  91. data/ext/poppler/rbpoppler-link-mapping.c +0 -47
  92. data/ext/poppler/rbpoppler-page-transition.c +0 -59
  93. data/ext/poppler/rbpoppler-page.c +0 -322
  94. data/ext/poppler/rbpoppler-private.h +0 -77
  95. data/ext/poppler/rbpoppler-ps-file.c +0 -66
  96. data/ext/poppler/rbpoppler-rectangle.c +0 -92
  97. data/ext/poppler/rbpoppler-text-field.c +0 -91
  98. data/ext/poppler/rbpoppler.c +0 -110
  99. data/ext/poppler/rbpoppler.h +0 -61
  100. data/ext/poppler/rbpopplerconversions.h +0 -105
  101. data/extconf.rb +0 -49
  102. data/lib/2.2/poppler.so +0 -0
  103. data/lib/2.3/poppler.so +0 -0
  104. data/lib/2.4/poppler.so +0 -0
  105. data/test/fixtures/image.png +0 -0
  106. data/test/test_annotation.rb +0 -86
  107. data/test/test_constants.rb +0 -30
  108. data/test/test_page.rb +0 -51
data/README DELETED
@@ -1,35 +0,0 @@
1
- Ruby/Poppler
2
- ============
3
-
4
- Ruby/Poppler is a Ruby binding of poppler-glib.
5
-
6
- Requirements
7
- ------------
8
-
9
- Ruby: http://www.ruby-lang.org/
10
- poppler-glib [*]: http://poppler.freedesktop.org/
11
- Ruby/GLib2: http://ruby-gnome2.sourceforge.net/
12
- cairo/rcairo: http://cairographics.org/ (optional)
13
-
14
- [*]: 0.12.0 or later is requried.
15
-
16
- Install
17
- -------
18
-
19
- 0. install ruby and poppler-glib.
20
- 1. ruby extconf.rb
21
- 2. make
22
- 3. su
23
- 4. make install
24
-
25
- Copying
26
- -------
27
- Copyright (c) 2002-2013 Ruby-GNOME2 Project Team
28
-
29
- This program is free software.
30
- You can distribute/modify this program under the terms of
31
- the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1.
32
-
33
- Project Website
34
- ---------------
35
- http://ruby-gnome2.sourceforge.jp/
@@ -1,6 +0,0 @@
1
- install: install-pc
2
- install-pc:
3
- if test -n "$(pkgconfigdir)"; then \
4
- $(MAKEDIRS) $(pkgconfigdir); \
5
- $(INSTALL_DATA) ruby-poppler.pc $(pkgconfigdir); \
6
- fi
@@ -1,73 +0,0 @@
1
- =begin
2
- extconf.rb for Ruby/Poppler extention library
3
- =end
4
-
5
- require 'pathname'
6
-
7
- base_dir = Pathname(__FILE__).dirname.parent.parent.expand_path
8
- top_dir = base_dir.parent
9
- top_build_dir = Pathname(".").parent.parent.parent.expand_path
10
-
11
- mkmf_gnome2_dir = top_dir + "glib2" + 'lib'
12
- version_suffix = ""
13
- unless mkmf_gnome2_dir.exist?
14
- if /(-\d+\.\d+\.\d+)(?:\.\d+)?\z/ =~ base_dir.basename.to_s
15
- version_suffix = $1
16
- mkmf_gnome2_dir = top_dir + "glib2#{version_suffix}" + 'lib'
17
- end
18
- end
19
-
20
- $LOAD_PATH.unshift(mkmf_gnome2_dir.to_s)
21
-
22
- module_name = "poppler"
23
- package_id = "poppler-glib"
24
-
25
- begin
26
- require 'mkmf-gnome2'
27
- rescue LoadError
28
- require 'rubygems'
29
- gem 'glib2'
30
- require 'mkmf-gnome2'
31
- end
32
-
33
- ["glib2", "gdk_pixbuf2"].each do |package|
34
- directory = "#{package}#{version_suffix}"
35
- build_dir = "#{directory}/tmp/#{RUBY_PLATFORM}/#{package}/#{RUBY_VERSION}"
36
- add_depend_package(package, "#{directory}/ext/#{package}",
37
- top_dir.to_s,
38
- :top_build_dir => top_build_dir.to_s,
39
- :target_build_dir => build_dir)
40
- end
41
-
42
- unless check_cairo(:top_dir => top_dir)
43
- exit(false)
44
- end
45
-
46
- setup_windows(module_name, base_dir)
47
-
48
- unless required_pkg_config_package([package_id, 0, 12, 0],
49
- :alt_linux => "libpoppler-glib-devel",
50
- :debian => "libpoppler-glib-dev",
51
- :redhat => "poppler-glib-devel",
52
- :arch_linux => "poppler",
53
- :homebrew => "poppler",
54
- :macports => "poppler",
55
- :msys2 => "poppler")
56
- exit(false)
57
- end
58
-
59
- unless have_macro("POPPLER_MAJOR_VERSION", ["poppler.h"])
60
- make_version_header("POPPLER", package_id, ".")
61
- end
62
-
63
- create_pkg_config_file("Ruby/Poppler", package_id)
64
- $defs << " -DRUBY_POPPLER_COMPILATION"
65
- create_makefile(module_name)
66
-
67
- pkg_config_dir = with_config("pkg-config-dir")
68
- if pkg_config_dir.is_a?(String)
69
- File.open("Makefile", "ab") do |makefile|
70
- makefile.puts
71
- makefile.puts("pkgconfigdir=#{pkg_config_dir}")
72
- end
73
- end
@@ -1,2 +0,0 @@
1
- EXPORTS
2
- Init_poppler
@@ -1,402 +0,0 @@
1
- /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
- /*
3
- * Copyright (C) 2006-2013 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 "rbpoppler-private.h"
22
-
23
- /* PopplerAction */
24
- static VALUE rb_cPopplerAction;
25
- static VALUE rb_cPopplerActionDest;
26
- static VALUE rb_cPopplerActionAny;
27
- static VALUE rb_cPopplerActionUnknown;
28
- static VALUE rb_cPopplerActionGotoDest;
29
- static VALUE rb_cPopplerActionGotoRemote;
30
- static VALUE rb_cPopplerActionLaunch;
31
- static VALUE rb_cPopplerActionURI;
32
- static VALUE rb_cPopplerActionNamed;
33
- static VALUE rb_cPopplerActionMovie;
34
- static VALUE rb_cPopplerActionRendition;
35
- static VALUE rb_cPopplerActionOCGState;
36
- static VALUE rb_cPopplerActionJavaScript;
37
-
38
- #define DEFINE_ACTION_TYPE(type_lower_case, type_upper_case) \
39
- static GType \
40
- rb_poppler_action_ ## type_lower_case ## _get_type(void) \
41
- { \
42
- static GType type = 0; \
43
- if (type == 0) { \
44
- type = g_boxed_type_register_static("PopplerAction" # type_upper_case, \
45
- (GBoxedCopyFunc)poppler_action_copy, \
46
- (GBoxedFreeFunc)poppler_action_free); \
47
- } \
48
- return type; \
49
- }
50
-
51
- DEFINE_ACTION_TYPE(any, Any)
52
- DEFINE_ACTION_TYPE(unknown, Unknown)
53
- DEFINE_ACTION_TYPE(goto_dest, GotoDest)
54
- DEFINE_ACTION_TYPE(goto_remote, GotoRemote)
55
- DEFINE_ACTION_TYPE(launch, Launch)
56
- DEFINE_ACTION_TYPE(uri, URI)
57
- DEFINE_ACTION_TYPE(named, Named)
58
- DEFINE_ACTION_TYPE(movie, Movie)
59
- DEFINE_ACTION_TYPE(rendition, Rendition)
60
- DEFINE_ACTION_TYPE(ocg_state, OCGState)
61
- DEFINE_ACTION_TYPE(javascript, JavaScript)
62
-
63
- #define POPPLER_ACTION_TYPE_ANY (rb_poppler_action_any_get_type())
64
- #define POPPLER_ACTION_TYPE_UNKNOWN (rb_poppler_action_unknown_get_type())
65
- #define POPPLER_ACTION_TYPE_GOTO_DEST (rb_poppler_action_goto_dest_get_type())
66
- #define POPPLER_ACTION_TYPE_GOTO_REMOTE (rb_poppler_action_goto_remote_get_type())
67
- #define POPPLER_ACTION_TYPE_LAUNCH (rb_poppler_action_launch_get_type())
68
- #define POPPLER_ACTION_TYPE_URI (rb_poppler_action_uri_get_type())
69
- #define POPPLER_ACTION_TYPE_NAMED (rb_poppler_action_named_get_type())
70
- #define POPPLER_ACTION_TYPE_MOVIE (rb_poppler_action_movie_get_type())
71
- #define POPPLER_ACTION_TYPE_RENDITION (rb_poppler_action_rendition_get_type())
72
- #define POPPLER_ACTION_TYPE_OCG_STATE (rb_poppler_action_ocg_state_get_type())
73
- #define POPPLER_ACTION_TYPE_JAVASCRIPT (rb_poppler_action_javascript_get_type())
74
-
75
- static GType
76
- rb_poppler_action_type_to_gtype(PopplerActionType action_type)
77
- {
78
- GType gtype = POPPLER_ACTION_TYPE_ANY;
79
-
80
- switch (action_type) {
81
- case POPPLER_ACTION_NONE:
82
- break;
83
- case POPPLER_ACTION_UNKNOWN:
84
- gtype = POPPLER_ACTION_TYPE_UNKNOWN;
85
- break;
86
- case POPPLER_ACTION_GOTO_DEST:
87
- gtype = POPPLER_ACTION_TYPE_GOTO_DEST;
88
- break;
89
- case POPPLER_ACTION_GOTO_REMOTE:
90
- gtype = POPPLER_ACTION_TYPE_GOTO_REMOTE;
91
- break;
92
- case POPPLER_ACTION_LAUNCH:
93
- gtype = POPPLER_ACTION_TYPE_LAUNCH;
94
- break;
95
- case POPPLER_ACTION_URI:
96
- gtype = POPPLER_ACTION_TYPE_URI;
97
- break;
98
- case POPPLER_ACTION_NAMED:
99
- gtype = POPPLER_ACTION_TYPE_NAMED;
100
- break;
101
- #if POPPLER_CHECK_VERSION(0, 14, 0)
102
- case POPPLER_ACTION_MOVIE:
103
- gtype = POPPLER_ACTION_TYPE_MOVIE;
104
- break;
105
- case POPPLER_ACTION_RENDITION:
106
- gtype = POPPLER_ACTION_TYPE_RENDITION;
107
- break;
108
- case POPPLER_ACTION_OCG_STATE:
109
- gtype = POPPLER_ACTION_TYPE_OCG_STATE;
110
- break;
111
- #endif
112
- #if POPPLER_CHECK_VERSION(0, 18, 0)
113
- case POPPLER_ACTION_JAVASCRIPT:
114
- gtype = POPPLER_ACTION_TYPE_JAVASCRIPT;
115
- break;
116
- #endif
117
- default:
118
- break;
119
- }
120
-
121
- return gtype;
122
- }
123
-
124
- static GType
125
- rb_poppler_action_to_gtype(VALUE action)
126
- {
127
- VALUE klass;
128
- GType type = POPPLER_ACTION_TYPE_ANY;
129
-
130
- klass = rb_obj_class(action);
131
- if (klass == rb_cPopplerActionAny) {
132
- type = POPPLER_ACTION_TYPE_ANY;
133
- } else if (klass == rb_cPopplerActionUnknown) {
134
- type = POPPLER_ACTION_TYPE_UNKNOWN;
135
- } else if (klass == rb_cPopplerActionGotoDest) {
136
- type = POPPLER_ACTION_TYPE_GOTO_DEST;
137
- } else if (klass == rb_cPopplerActionGotoRemote) {
138
- type = POPPLER_ACTION_TYPE_GOTO_REMOTE;
139
- } else if (klass == rb_cPopplerActionLaunch) {
140
- type = POPPLER_ACTION_TYPE_LAUNCH;
141
- } else if (klass == rb_cPopplerActionURI) {
142
- type = POPPLER_ACTION_TYPE_URI;
143
- } else if (klass == rb_cPopplerActionNamed) {
144
- type = POPPLER_ACTION_TYPE_NAMED;
145
- #if POPPLER_CHECK_VERSION(0, 14, 0)
146
- } else if (klass == rb_cPopplerActionMovie) {
147
- type = POPPLER_ACTION_TYPE_MOVIE;
148
- } else if (klass == rb_cPopplerActionRendition) {
149
- type = POPPLER_ACTION_TYPE_RENDITION;
150
- } else if (klass == rb_cPopplerActionOCGState) {
151
- type = POPPLER_ACTION_TYPE_OCG_STATE;
152
- #endif
153
- #if POPPLER_CHECK_VERSION(0, 18, 0)
154
- } else if (klass == rb_cPopplerActionJavaScript) {
155
- type = POPPLER_ACTION_TYPE_JAVASCRIPT;
156
- #endif
157
- } else {
158
- rb_raise(rb_eArgError, "Not action object: %s", RBG_INSPECT(action));
159
- }
160
-
161
- return type;
162
- }
163
-
164
- VALUE
165
- rb_poppler_ruby_object_from_action(PopplerAction *action)
166
- {
167
- return BOXED2RVAL(action, rb_poppler_action_type_to_gtype(action->any.type));
168
- }
169
-
170
- PopplerAction *
171
- rb_poppler_action_from_ruby_object(VALUE action)
172
- {
173
- return RVAL2BOXED(action, rb_poppler_action_to_gtype(action));
174
- }
175
-
176
- #define ACTION_ATTR_STR(type, name) \
177
- static VALUE \
178
- action_ ## type ## _ ## name (VALUE self) \
179
- { \
180
- return CSTR2RVAL(RVAL2POPPLERACTION(self)->type.name); \
181
- }
182
-
183
- #define ACTION_ATTR_DEST(type, name) \
184
- static VALUE \
185
- action_ ## type ## _ ## name (VALUE self) \
186
- { \
187
- return POPPLERDEST2RVAL(RVAL2POPPLERACTION(self)->type.name); \
188
- }
189
-
190
- #define DEFINE_ACCESSOR(prefix, target, name) \
191
- rbg_define_method(target, G_STRINGIFY(name), prefix ## _ ## name, 0);
192
-
193
- #define DEFINE_ACTION_ACCESSOR(target, type, name) \
194
- DEFINE_ACCESSOR(action_ ## type, target, name)
195
-
196
- /* PopplerActionAny */
197
- static VALUE
198
- action_any_type(VALUE self)
199
- {
200
- return POPPLERACTIONTYPE2RVAL(RVAL2POPPLERACTION(self)->type);
201
- }
202
- ACTION_ATTR_STR(any, title);
203
-
204
- /* PopplerActionGotoDest */
205
- ACTION_ATTR_DEST(goto_dest, dest);
206
-
207
- /* PopplerActionGotoRemote */
208
- ACTION_ATTR_STR(goto_remote, file_name);
209
- ACTION_ATTR_DEST(goto_remote, dest);
210
-
211
- /* PopplerActionLaunch */
212
- ACTION_ATTR_STR(launch, file_name);
213
- ACTION_ATTR_STR(launch, params);
214
-
215
- /* PopplerActionURI */
216
- ACTION_ATTR_STR(uri, uri);
217
-
218
- /* PopplerActionNamed */
219
- ACTION_ATTR_STR(named, named_dest);
220
-
221
- #if POPPLER_CHECK_VERSION(0, 14, 0)
222
- /* PopplerActionMovie */
223
- ACTION_ATTR_DEST(movie, movie);
224
-
225
- /* PopplerActionRendition */
226
- ACTION_ATTR_DEST(rendition, media);
227
-
228
- /* PopplerActionOCGState */
229
- ACTION_ATTR_DEST(ocg_state, state_list);
230
- #endif
231
-
232
- #if POPPLER_CHECK_VERSION(0, 18, 0)
233
- /* PopplerActionJavascript */
234
- ACTION_ATTR_STR(javascript, script);
235
- #endif
236
-
237
- /* PopplerDest */
238
- #ifdef RB_POPPLER_TYPE_DEST_NOT_DEFINED
239
- GType
240
- poppler_dest_get_type (void)
241
- {
242
- static GType our_type = 0;
243
-
244
- if (our_type == 0)
245
- our_type = g_boxed_type_register_static("PopplerDest",
246
- (GBoxedCopyFunc)poppler_dest_copy,
247
- (GBoxedFreeFunc)poppler_dest_free);
248
-
249
- return our_type;
250
- }
251
- #endif
252
-
253
- static VALUE
254
- dest_get_type(VALUE self)
255
- {
256
- return POPPLERDESTTYPE2RVAL(RVAL2POPPLERDEST(self)->type);
257
- }
258
-
259
- #define DEST_ATTR_INT(name) \
260
- static VALUE \
261
- dest_ ## name (VALUE self) \
262
- { \
263
- return INT2NUM(RVAL2POPPLERDEST(self)->name); \
264
- }
265
-
266
- #define DEST_ATTR_UINT(name) \
267
- static VALUE \
268
- dest_ ## name (VALUE self) \
269
- { \
270
- return UINT2NUM(RVAL2POPPLERDEST(self)->name); \
271
- }
272
-
273
- #define DEST_ATTR_DOUBLE(name) \
274
- static VALUE \
275
- dest_ ## name (VALUE self) \
276
- { \
277
- return rb_float_new(RVAL2POPPLERDEST(self)->name); \
278
- }
279
-
280
- #define DEST_ATTR_STR(name) \
281
- static VALUE \
282
- dest_ ## name (VALUE self) \
283
- { \
284
- return CSTR2RVAL(RVAL2POPPLERDEST(self)->name); \
285
- }
286
-
287
- #define DEFINE_DEST_ACCESSOR(target, name) \
288
- DEFINE_ACCESSOR(dest, target, name)
289
-
290
-
291
- DEST_ATTR_INT(page_num)
292
- DEST_ATTR_DOUBLE(left)
293
- DEST_ATTR_DOUBLE(bottom)
294
- DEST_ATTR_DOUBLE(right)
295
- DEST_ATTR_DOUBLE(top)
296
- DEST_ATTR_DOUBLE(zoom)
297
- DEST_ATTR_STR(named_dest)
298
- DEST_ATTR_UINT(change_left)
299
- DEST_ATTR_UINT(change_top)
300
- DEST_ATTR_UINT(change_zoom)
301
-
302
- void
303
- Init_poppler_action(VALUE mPoppler)
304
- {
305
- rb_cPopplerAction = G_DEF_CLASS(POPPLER_TYPE_ACTION, "Action", mPoppler);
306
-
307
- rb_cPopplerActionAny = rb_define_class_under(mPoppler, "ActionAny", rb_cPopplerAction);
308
- rbg_define_method(rb_cPopplerActionAny, "type", action_any_type, 0);
309
- DEFINE_ACTION_ACCESSOR(rb_cPopplerActionAny, any, title);
310
-
311
- rb_cPopplerActionUnknown =
312
- G_DEF_CLASS_WITH_PARENT(POPPLER_ACTION_TYPE_UNKNOWN,
313
- "ActionUnknown",
314
- mPoppler,
315
- rb_cPopplerAction);
316
-
317
- rb_cPopplerActionGotoDest =
318
- G_DEF_CLASS_WITH_PARENT(POPPLER_ACTION_TYPE_GOTO_DEST,
319
- "ActionGotoDest",
320
- mPoppler,
321
- rb_cPopplerActionAny);
322
- DEFINE_ACTION_ACCESSOR(rb_cPopplerActionGotoDest, goto_dest, dest);
323
-
324
- rb_cPopplerActionGotoRemote =
325
- G_DEF_CLASS_WITH_PARENT(POPPLER_ACTION_TYPE_GOTO_REMOTE,
326
- "ActionGotoRemote",
327
- mPoppler,
328
- rb_cPopplerActionAny);
329
- DEFINE_ACTION_ACCESSOR(rb_cPopplerActionGotoRemote, goto_remote, file_name);
330
- DEFINE_ACTION_ACCESSOR(rb_cPopplerActionGotoRemote, goto_remote, dest);
331
-
332
- rb_cPopplerActionLaunch =
333
- G_DEF_CLASS_WITH_PARENT(POPPLER_ACTION_TYPE_LAUNCH,
334
- "ActionLaunch",
335
- mPoppler,
336
- rb_cPopplerActionAny);
337
- DEFINE_ACTION_ACCESSOR(rb_cPopplerActionLaunch, launch, file_name);
338
- DEFINE_ACTION_ACCESSOR(rb_cPopplerActionLaunch, launch, params);
339
-
340
- rb_cPopplerActionURI =
341
- G_DEF_CLASS_WITH_PARENT(POPPLER_ACTION_TYPE_URI,
342
- "ActionURI",
343
- mPoppler,
344
- rb_cPopplerActionAny);
345
- DEFINE_ACTION_ACCESSOR(rb_cPopplerActionURI, uri, uri);
346
-
347
- rb_cPopplerActionNamed =
348
- G_DEF_CLASS_WITH_PARENT(POPPLER_ACTION_TYPE_NAMED,
349
- "ActionNamed",
350
- mPoppler,
351
- rb_cPopplerActionAny);
352
- DEFINE_ACTION_ACCESSOR(rb_cPopplerActionNamed, named, named_dest);
353
-
354
- #if POPPLER_CHECK_VERSION(0, 14, 0)
355
- rb_cPopplerActionMovie =
356
- G_DEF_CLASS_WITH_PARENT(POPPLER_ACTION_TYPE_MOVIE,
357
- "ActionMovie",
358
- mPoppler,
359
- rb_cPopplerActionAny);
360
- DEFINE_ACTION_ACCESSOR(rb_cPopplerActionMovie, movie, movie);
361
-
362
- rb_cPopplerActionRendition =
363
- G_DEF_CLASS_WITH_PARENT(POPPLER_ACTION_TYPE_RENDITION,
364
- "ActionRendtion",
365
- mPoppler,
366
- rb_cPopplerActionAny);
367
- DEFINE_ACTION_ACCESSOR(rb_cPopplerActionRendition, rendition, media);
368
-
369
- rb_cPopplerActionOCGState =
370
- G_DEF_CLASS_WITH_PARENT(POPPLER_ACTION_TYPE_OCG_STATE,
371
- "ActionOCGState",
372
- mPoppler,
373
- rb_cPopplerActionAny);
374
- DEFINE_ACTION_ACCESSOR(rb_cPopplerActionOCGState, ocg_state, state_list);
375
- #endif
376
-
377
- #if POPPLER_CHECK_VERSION(0, 18, 0)
378
- rb_cPopplerActionJavaScript =
379
- G_DEF_CLASS_WITH_PARENT(POPPLER_ACTION_TYPE_JAVASCRIPT,
380
- "ActionJavaScript",
381
- mPoppler,
382
- rb_cPopplerActionAny);
383
- DEFINE_ACTION_ACCESSOR(rb_cPopplerActionJavaScript, javascript, script);
384
- #endif
385
-
386
- G_DEF_CLASS(POPPLER_TYPE_ACTION_TYPE, "ActionType", mPoppler);
387
- G_DEF_CLASS(POPPLER_TYPE_DEST_TYPE, "DestType", mPoppler);
388
-
389
- rb_cPopplerActionDest = G_DEF_CLASS(POPPLER_TYPE_DEST, "Dest", mPoppler);
390
-
391
- rbg_define_method(rb_cPopplerActionDest, "type", dest_get_type, 0);
392
- DEFINE_DEST_ACCESSOR(rb_cPopplerActionDest, page_num);
393
- DEFINE_DEST_ACCESSOR(rb_cPopplerActionDest, left);
394
- DEFINE_DEST_ACCESSOR(rb_cPopplerActionDest, bottom);
395
- DEFINE_DEST_ACCESSOR(rb_cPopplerActionDest, right);
396
- DEFINE_DEST_ACCESSOR(rb_cPopplerActionDest, top);
397
- DEFINE_DEST_ACCESSOR(rb_cPopplerActionDest, zoom);
398
- DEFINE_DEST_ACCESSOR(rb_cPopplerActionDest, named_dest);
399
- DEFINE_DEST_ACCESSOR(rb_cPopplerActionDest, change_left);
400
- DEFINE_DEST_ACCESSOR(rb_cPopplerActionDest, change_top);
401
- DEFINE_DEST_ACCESSOR(rb_cPopplerActionDest, change_zoom);
402
- }