poppler 3.1.8-x64-mingw32 → 3.1.9-x64-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/dependency-check/Rakefile +44 -0
- data/lib/poppler.rb +21 -107
- data/lib/poppler/annot-callout-line.rb +57 -0
- data/lib/poppler/cairo.rb +23 -0
- data/lib/poppler/color.rb +36 -0
- data/lib/poppler/deprecated.rb +67 -0
- data/lib/poppler/document.rb +108 -0
- data/lib/poppler/image-mapping.rb +25 -0
- data/lib/poppler/index-iter.rb +30 -0
- data/lib/poppler/loader.rb +139 -0
- data/lib/poppler/page.rb +61 -0
- data/lib/poppler/rectangle.rb +40 -0
- data/lib/poppler/version.rb +35 -0
- data/sample/number-pdf.rb +21 -2
- data/sample/pdf2.rb +0 -4
- data/sample/pdf2svg.rb +1 -1
- data/sample/pdf2text.rb +1 -1
- data/sample/pdfcrop.rb +1 -1
- data/sample/pdfdiv.rb +1 -1
- data/test/fixtures/image.odt +0 -0
- data/test/fixtures/image.pdf +0 -0
- data/test/fixtures/multiple-pages.odt +0 -0
- data/test/fixtures/multiple-pages.pdf +0 -0
- data/test/fixtures/text-field.odt +0 -0
- data/test/fixtures/text-field.pdf +0 -0
- data/test/poppler-test-utils.rb +24 -16
- data/test/run-test.rb +26 -4
- data/test/test-annotation.rb +76 -0
- data/test/{test_color.rb → test-color.rb} +0 -3
- data/test/test-constants.rb +16 -0
- data/test/{test_document.rb → test-document.rb} +26 -10
- data/test/test-page.rb +101 -0
- data/vendor/local/bin/cjpeg.exe +0 -0
- data/vendor/local/bin/djpeg.exe +0 -0
- data/vendor/local/bin/jpegtran.exe +0 -0
- data/vendor/local/bin/libjpeg-9.dll +0 -0
- data/vendor/local/bin/libopenjp2.dll +0 -0
- data/vendor/local/bin/libpoppler-59.dll +0 -0
- data/vendor/local/bin/libpoppler-cpp-0.dll +0 -0
- data/vendor/local/bin/libpoppler-glib-8.dll +0 -0
- data/vendor/local/bin/libsqlite3-0.dll +0 -0
- data/vendor/local/bin/opj_compress.exe +0 -0
- data/vendor/local/bin/opj_decompress.exe +0 -0
- data/vendor/local/bin/opj_dump.exe +0 -0
- data/vendor/local/bin/pdfdetach.exe +0 -0
- data/vendor/local/bin/pdffonts.exe +0 -0
- data/vendor/local/bin/pdfimages.exe +0 -0
- data/vendor/local/bin/pdfinfo.exe +0 -0
- data/vendor/local/bin/pdfseparate.exe +0 -0
- data/vendor/local/bin/pdftocairo.exe +0 -0
- data/vendor/local/bin/pdftohtml.exe +0 -0
- data/vendor/local/bin/pdftoppm.exe +0 -0
- data/vendor/local/bin/pdftops.exe +0 -0
- data/vendor/local/bin/pdftotext.exe +0 -0
- data/vendor/local/bin/pdfunite.exe +0 -0
- data/vendor/local/bin/rdjpgcom.exe +0 -0
- data/vendor/local/bin/sqlite3.exe +0 -0
- data/vendor/local/bin/wrjpgcom.exe +0 -0
- data/vendor/local/lib/libjpeg.dll.a +0 -0
- data/vendor/local/lib/libopenjp2.dll.a +0 -0
- data/vendor/local/lib/libpoppler-cpp.dll.a +0 -0
- data/vendor/local/lib/libpoppler-glib.a +0 -0
- data/vendor/local/lib/libpoppler-glib.dll.a +0 -0
- data/vendor/local/lib/libpoppler.a +0 -0
- data/vendor/local/lib/libpoppler.dll.a +0 -0
- data/vendor/local/lib/libsqlite3.dll.a +0 -0
- metadata +26 -46
- data/README +0 -35
- data/ext/poppler/depend +0 -6
- data/ext/poppler/extconf.rb +0 -73
- data/ext/poppler/poppler.def +0 -2
- data/ext/poppler/rbpoppler-action.c +0 -402
- data/ext/poppler/rbpoppler-annotation-callout-line.c +0 -127
- data/ext/poppler/rbpoppler-annotation-free-text.c +0 -46
- data/ext/poppler/rbpoppler-annotation-mapping.c +0 -72
- data/ext/poppler/rbpoppler-annotation-markup.c +0 -98
- data/ext/poppler/rbpoppler-annotation-text.c +0 -53
- data/ext/poppler/rbpoppler-annotation.c +0 -74
- data/ext/poppler/rbpoppler-attachment.c +0 -124
- data/ext/poppler/rbpoppler-button-field.c +0 -56
- data/ext/poppler/rbpoppler-choice-field.c +0 -131
- data/ext/poppler/rbpoppler-color.c +0 -107
- data/ext/poppler/rbpoppler-document.c +0 -224
- data/ext/poppler/rbpoppler-font-info.c +0 -59
- data/ext/poppler/rbpoppler-fonts-iter.c +0 -127
- data/ext/poppler/rbpoppler-form-field-mapping.c +0 -44
- data/ext/poppler/rbpoppler-form-field.c +0 -98
- data/ext/poppler/rbpoppler-image-mapping.c +0 -48
- data/ext/poppler/rbpoppler-index-iter.c +0 -130
- data/ext/poppler/rbpoppler-link-mapping.c +0 -47
- data/ext/poppler/rbpoppler-page-transition.c +0 -59
- data/ext/poppler/rbpoppler-page.c +0 -322
- data/ext/poppler/rbpoppler-private.h +0 -77
- data/ext/poppler/rbpoppler-ps-file.c +0 -66
- data/ext/poppler/rbpoppler-rectangle.c +0 -92
- data/ext/poppler/rbpoppler-text-field.c +0 -91
- data/ext/poppler/rbpoppler.c +0 -110
- data/ext/poppler/rbpoppler.h +0 -61
- data/ext/poppler/rbpopplerconversions.h +0 -105
- data/extconf.rb +0 -49
- data/lib/2.2/poppler.so +0 -0
- data/lib/2.3/poppler.so +0 -0
- data/lib/2.4/poppler.so +0 -0
- data/test/fixtures/image.png +0 -0
- data/test/test_annotation.rb +0 -86
- data/test/test_constants.rb +0 -30
- data/test/test_page.rb +0 -51
@@ -1,66 +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
|
-
#define RG_TARGET_NAMESPACE cPSFile
|
24
|
-
|
25
|
-
/* Export to ps */
|
26
|
-
static VALUE
|
27
|
-
rg_initialize(VALUE self, VALUE document, VALUE filename,
|
28
|
-
VALUE first_page, VALUE n_pages)
|
29
|
-
{
|
30
|
-
PopplerPSFile *ps_file;
|
31
|
-
|
32
|
-
ps_file = poppler_ps_file_new(RVAL2POPPLERDOCUMENT(document), RVAL2CSTR(filename),
|
33
|
-
NUM2INT(first_page), NUM2INT(n_pages));
|
34
|
-
|
35
|
-
if (!ps_file)
|
36
|
-
rb_raise(rb_eRuntimeError, "can't create Poppler::PSFile");
|
37
|
-
|
38
|
-
G_INITIALIZE(self, ps_file);
|
39
|
-
return Qnil;
|
40
|
-
}
|
41
|
-
|
42
|
-
static VALUE
|
43
|
-
rg_set_paper_size(VALUE self, VALUE width, VALUE height)
|
44
|
-
{
|
45
|
-
poppler_ps_file_set_paper_size(RVAL2POPPLERPSFILE(self),
|
46
|
-
NUM2DBL(width), NUM2DBL(height));
|
47
|
-
return Qnil;
|
48
|
-
}
|
49
|
-
|
50
|
-
static VALUE
|
51
|
-
rg_set_duplex(VALUE self, VALUE duplex)
|
52
|
-
{
|
53
|
-
poppler_ps_file_set_duplex(RVAL2POPPLERPSFILE(self), RVAL2CBOOL(duplex));
|
54
|
-
return Qnil;
|
55
|
-
}
|
56
|
-
|
57
|
-
void
|
58
|
-
Init_poppler_ps_file(VALUE mPoppler)
|
59
|
-
{
|
60
|
-
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(POPPLER_TYPE_PS_FILE, "PSFile", mPoppler);
|
61
|
-
|
62
|
-
/* Export to ps */
|
63
|
-
RG_DEF_METHOD(initialize, 4);
|
64
|
-
RG_DEF_METHOD(set_paper_size, 2);
|
65
|
-
RG_DEF_METHOD(set_duplex, 1);
|
66
|
-
}
|
@@ -1,92 +0,0 @@
|
|
1
|
-
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
|
-
/*
|
3
|
-
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
4
|
-
* Copyright (C) 2006-2008 Ruby-GNOME2 Project Team
|
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
|
-
*/
|
21
|
-
|
22
|
-
#include "rbpoppler-private.h"
|
23
|
-
|
24
|
-
#define RG_TARGET_NAMESPACE cRectangle
|
25
|
-
|
26
|
-
static VALUE RG_TARGET_NAMESPACE;
|
27
|
-
|
28
|
-
static VALUE
|
29
|
-
rg_initialize(VALUE self, VALUE x1, VALUE y1, VALUE x2, VALUE y2)
|
30
|
-
{
|
31
|
-
PopplerRectangle rectangle;
|
32
|
-
|
33
|
-
rectangle.x1 = NUM2DBL(x1);
|
34
|
-
rectangle.y1 = NUM2DBL(y1);
|
35
|
-
rectangle.x2 = NUM2DBL(x2);
|
36
|
-
rectangle.y2 = NUM2DBL(y2);
|
37
|
-
|
38
|
-
G_INITIALIZE(self, g_boxed_copy(POPPLER_TYPE_RECTANGLE, &rectangle));
|
39
|
-
return Qnil;
|
40
|
-
}
|
41
|
-
|
42
|
-
DEF_ACCESSOR(rectangle, x1, RVAL2POPPLERRECTANGLE, rb_float_new, NUM2DBL)
|
43
|
-
DEF_ACCESSOR(rectangle, y1, RVAL2POPPLERRECTANGLE, rb_float_new, NUM2DBL)
|
44
|
-
DEF_ACCESSOR(rectangle, x2, RVAL2POPPLERRECTANGLE, rb_float_new, NUM2DBL)
|
45
|
-
DEF_ACCESSOR(rectangle, y2, RVAL2POPPLERRECTANGLE, rb_float_new, NUM2DBL)
|
46
|
-
|
47
|
-
static VALUE
|
48
|
-
rg_to_a(VALUE self)
|
49
|
-
{
|
50
|
-
PopplerRectangle *rectangle = RVAL2POPPLERRECTANGLE(self);
|
51
|
-
return rb_ary_new3(4,
|
52
|
-
rb_float_new(rectangle->x1),
|
53
|
-
rb_float_new(rectangle->y1),
|
54
|
-
rb_float_new(rectangle->x2),
|
55
|
-
rb_float_new(rectangle->y2));
|
56
|
-
}
|
57
|
-
|
58
|
-
static VALUE
|
59
|
-
rg_inspect(VALUE self)
|
60
|
-
{
|
61
|
-
VALUE inspected;
|
62
|
-
gchar *points;
|
63
|
-
PopplerRectangle *rectangle;
|
64
|
-
|
65
|
-
rectangle = RVAL2POPPLERRECTANGLE(self);
|
66
|
-
inspected = rb_call_super(0, NULL);
|
67
|
-
rb_str_resize(inspected, RSTRING_LEN(inspected) - 1);
|
68
|
-
points = g_strdup_printf(": [%g, %g, %g, %g]>",
|
69
|
-
rectangle->x1, rectangle->y1,
|
70
|
-
rectangle->x2, rectangle->y2);
|
71
|
-
rb_str_cat2(inspected, points);
|
72
|
-
g_free(points);
|
73
|
-
return inspected;
|
74
|
-
}
|
75
|
-
|
76
|
-
void
|
77
|
-
Init_poppler_rectangle(VALUE mPoppler)
|
78
|
-
{
|
79
|
-
RG_TARGET_NAMESPACE = G_DEF_CLASS(POPPLER_TYPE_RECTANGLE, "Rectangle", mPoppler);
|
80
|
-
|
81
|
-
RG_DEF_METHOD(initialize, 4);
|
82
|
-
rbg_define_method(RG_TARGET_NAMESPACE, "x1", rectangle_get_x1, 0);
|
83
|
-
rbg_define_method(RG_TARGET_NAMESPACE, "y1", rectangle_get_y1, 0);
|
84
|
-
rbg_define_method(RG_TARGET_NAMESPACE, "x2", rectangle_get_x2, 0);
|
85
|
-
rbg_define_method(RG_TARGET_NAMESPACE, "y2", rectangle_get_y2, 0);
|
86
|
-
rbg_define_method(RG_TARGET_NAMESPACE, "set_x1", rectangle_set_x1, 1);
|
87
|
-
rbg_define_method(RG_TARGET_NAMESPACE, "set_y1", rectangle_set_y1, 1);
|
88
|
-
rbg_define_method(RG_TARGET_NAMESPACE, "set_x2", rectangle_set_x2, 1);
|
89
|
-
rbg_define_method(RG_TARGET_NAMESPACE, "set_y2", rectangle_set_y2, 1);
|
90
|
-
RG_DEF_METHOD(to_a, 0);
|
91
|
-
RG_DEF_METHOD(inspect, 0);
|
92
|
-
}
|
@@ -1,91 +0,0 @@
|
|
1
|
-
/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
|
2
|
-
/*
|
3
|
-
* Copyright (C) 2011 Ruby-GNOME2 Project Team
|
4
|
-
* Copyright (C) 2008 Ruby-GNOME2 Project Team
|
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
|
-
*/
|
21
|
-
|
22
|
-
#include "rbpoppler-private.h"
|
23
|
-
|
24
|
-
#define RG_TARGET_NAMESPACE cTextField
|
25
|
-
#define _SELF(obj) RVAL2POPPLERFORMFIELD(obj)
|
26
|
-
|
27
|
-
static VALUE RG_TARGET_NAMESPACE;
|
28
|
-
|
29
|
-
static VALUE
|
30
|
-
rg_type(VALUE self)
|
31
|
-
{
|
32
|
-
return POPPLERFORMTEXTTYPE2RVAL(poppler_form_field_text_get_text_type(_SELF(self)));
|
33
|
-
}
|
34
|
-
|
35
|
-
static VALUE
|
36
|
-
rg_text(VALUE self)
|
37
|
-
{
|
38
|
-
return CSTR2RVAL(poppler_form_field_text_get_text(_SELF(self)));
|
39
|
-
}
|
40
|
-
|
41
|
-
static VALUE
|
42
|
-
rg_set_text(VALUE self, VALUE text)
|
43
|
-
{
|
44
|
-
poppler_form_field_text_set_text(_SELF(self), RVAL2CSTR_ACCEPT_NIL(text));
|
45
|
-
return Qnil;
|
46
|
-
}
|
47
|
-
|
48
|
-
static VALUE
|
49
|
-
rg_max_length(VALUE self)
|
50
|
-
{
|
51
|
-
return INT2NUM(poppler_form_field_text_get_max_len(_SELF(self)));
|
52
|
-
}
|
53
|
-
|
54
|
-
static VALUE
|
55
|
-
rg_spell_check_p(VALUE self)
|
56
|
-
{
|
57
|
-
return CBOOL2RVAL(poppler_form_field_text_do_spell_check(_SELF(self)));
|
58
|
-
}
|
59
|
-
|
60
|
-
static VALUE
|
61
|
-
rg_scroll_p(VALUE self)
|
62
|
-
{
|
63
|
-
return CBOOL2RVAL(poppler_form_field_text_do_scroll(_SELF(self)));
|
64
|
-
}
|
65
|
-
|
66
|
-
static VALUE
|
67
|
-
rg_rich_text_p(VALUE self)
|
68
|
-
{
|
69
|
-
return CBOOL2RVAL(poppler_form_field_text_is_rich_text(_SELF(self)));
|
70
|
-
}
|
71
|
-
|
72
|
-
static VALUE
|
73
|
-
rg_password_p(VALUE self)
|
74
|
-
{
|
75
|
-
return CBOOL2RVAL(poppler_form_field_text_is_password(_SELF(self)));
|
76
|
-
}
|
77
|
-
|
78
|
-
void
|
79
|
-
Init_poppler_text_field(VALUE mPoppler, VALUE cFormField)
|
80
|
-
{
|
81
|
-
RG_TARGET_NAMESPACE = rb_define_class_under(mPoppler, "TextField", cFormField);
|
82
|
-
|
83
|
-
RG_DEF_METHOD(type, 0);
|
84
|
-
RG_DEF_METHOD(text, 0);
|
85
|
-
RG_DEF_METHOD(set_text, 1);
|
86
|
-
RG_DEF_METHOD(max_length, 0);
|
87
|
-
RG_DEF_METHOD_P(spell_check, 0);
|
88
|
-
RG_DEF_METHOD_P(scroll, 0);
|
89
|
-
RG_DEF_METHOD_P(rich_text, 0);
|
90
|
-
RG_DEF_METHOD_P(password, 0);
|
91
|
-
}
|
data/ext/poppler/rbpoppler.c
DELETED
@@ -1,110 +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
|
-
extern void Init_poppler(void);
|
24
|
-
|
25
|
-
#define RG_TARGET_NAMESPACE mPoppler
|
26
|
-
|
27
|
-
static VALUE
|
28
|
-
rg_s_backend(G_GNUC_UNUSED VALUE self)
|
29
|
-
{
|
30
|
-
return POPPLERBACKEND2RVAL(poppler_get_backend());
|
31
|
-
}
|
32
|
-
|
33
|
-
static VALUE
|
34
|
-
rg_s_version(G_GNUC_UNUSED VALUE self)
|
35
|
-
{
|
36
|
-
return CSTR2RVAL(poppler_get_version());
|
37
|
-
}
|
38
|
-
|
39
|
-
static VALUE
|
40
|
-
rg_s_cairo_available_p(G_GNUC_UNUSED VALUE self)
|
41
|
-
{
|
42
|
-
return Qtrue;
|
43
|
-
}
|
44
|
-
|
45
|
-
void
|
46
|
-
Init_poppler(void)
|
47
|
-
{
|
48
|
-
VALUE RG_TARGET_NAMESPACE;
|
49
|
-
|
50
|
-
RG_TARGET_NAMESPACE = rb_define_module("Poppler");
|
51
|
-
|
52
|
-
rb_define_const(RG_TARGET_NAMESPACE, "BUILD_VERSION",
|
53
|
-
rb_ary_new3(3,
|
54
|
-
INT2FIX(POPPLER_MAJOR_VERSION),
|
55
|
-
INT2FIX(POPPLER_MINOR_VERSION),
|
56
|
-
INT2FIX(POPPLER_MICRO_VERSION)));
|
57
|
-
|
58
|
-
G_DEF_CLASS(POPPLER_TYPE_ERROR, "Error", RG_TARGET_NAMESPACE);
|
59
|
-
|
60
|
-
G_DEF_CLASS(POPPLER_TYPE_PAGE_TRANSITION_TYPE,
|
61
|
-
"PageTransitionType", RG_TARGET_NAMESPACE);
|
62
|
-
G_DEF_CLASS(POPPLER_TYPE_PAGE_TRANSITION_ALIGNMENT,
|
63
|
-
"PageTransitionAlignment", RG_TARGET_NAMESPACE);
|
64
|
-
G_DEF_CLASS(POPPLER_TYPE_PAGE_TRANSITION_DIRECTION,
|
65
|
-
"PageTransitionDirection", RG_TARGET_NAMESPACE);
|
66
|
-
G_DEF_CLASS(POPPLER_TYPE_SELECTION_STYLE, "SelectionStyle", RG_TARGET_NAMESPACE);
|
67
|
-
G_DEF_CLASS(POPPLER_TYPE_FORM_BUTTON_TYPE, "FormButtonType", RG_TARGET_NAMESPACE);
|
68
|
-
G_DEF_CLASS(POPPLER_TYPE_FORM_TEXT_TYPE, "FormTextType", RG_TARGET_NAMESPACE);
|
69
|
-
G_DEF_CLASS(POPPLER_TYPE_FORM_CHOICE_TYPE, "FormChoiceType", RG_TARGET_NAMESPACE);
|
70
|
-
|
71
|
-
G_RENAME_NICK("3D", "TYPE_3D");
|
72
|
-
G_DEF_CLASS(POPPLER_TYPE_ANNOT_TYPE, "AnnotationType", RG_TARGET_NAMESPACE);
|
73
|
-
G_DEF_CLASS(POPPLER_TYPE_ANNOT_FLAG, "AnnotationFlag", RG_TARGET_NAMESPACE);
|
74
|
-
G_DEF_CLASS(POPPLER_TYPE_ANNOT_MARKUP_REPLY_TYPE,
|
75
|
-
"AnnotationMarkupReplyType", RG_TARGET_NAMESPACE);
|
76
|
-
G_RENAME_NICK("3D", "TYPE_3D");
|
77
|
-
G_DEF_CLASS(POPPLER_TYPE_ANNOT_EXTERNAL_DATA_TYPE,
|
78
|
-
"AnnotationExternalDataType", RG_TARGET_NAMESPACE);
|
79
|
-
G_DEF_CLASS(POPPLER_TYPE_ANNOT_TEXT_STATE, "AnnotationTextState", RG_TARGET_NAMESPACE);
|
80
|
-
G_DEF_CLASS(POPPLER_TYPE_ANNOT_FREE_TEXT_QUADDING,
|
81
|
-
"AnnotationFreeTextQuadding", RG_TARGET_NAMESPACE);
|
82
|
-
|
83
|
-
G_DEF_CLASS(POPPLER_TYPE_BACKEND, "Backend", RG_TARGET_NAMESPACE);
|
84
|
-
|
85
|
-
RG_DEF_SMETHOD(backend, 0);
|
86
|
-
RG_DEF_SMETHOD(version, 0);
|
87
|
-
RG_DEF_SMETHOD_P(cairo_available, 0);
|
88
|
-
|
89
|
-
Init_poppler_index_iter(RG_TARGET_NAMESPACE);
|
90
|
-
Init_poppler_font_info(RG_TARGET_NAMESPACE);
|
91
|
-
Init_poppler_document(RG_TARGET_NAMESPACE);
|
92
|
-
Init_poppler_fonts_iter(RG_TARGET_NAMESPACE);
|
93
|
-
Init_poppler_ps_file(RG_TARGET_NAMESPACE);
|
94
|
-
Init_poppler_rectangle(RG_TARGET_NAMESPACE);
|
95
|
-
Init_poppler_page(RG_TARGET_NAMESPACE);
|
96
|
-
Init_poppler_color(RG_TARGET_NAMESPACE);
|
97
|
-
Init_poppler_link_mapping(RG_TARGET_NAMESPACE);
|
98
|
-
Init_poppler_page_transition(RG_TARGET_NAMESPACE);
|
99
|
-
Init_poppler_image_mapping(RG_TARGET_NAMESPACE);
|
100
|
-
Init_poppler_form_field_mapping(RG_TARGET_NAMESPACE);
|
101
|
-
Init_poppler_annotation_mapping(RG_TARGET_NAMESPACE);
|
102
|
-
Init_poppler_attachment(RG_TARGET_NAMESPACE);
|
103
|
-
Init_poppler_action(RG_TARGET_NAMESPACE);
|
104
|
-
Init_poppler_annotation(RG_TARGET_NAMESPACE);
|
105
|
-
Init_poppler_annotation_markup(RG_TARGET_NAMESPACE);
|
106
|
-
Init_poppler_annotation_text(RG_TARGET_NAMESPACE);
|
107
|
-
Init_poppler_annotation_free_text(RG_TARGET_NAMESPACE);
|
108
|
-
Init_poppler_annotation_callout_line(RG_TARGET_NAMESPACE);
|
109
|
-
Init_poppler_form_field(RG_TARGET_NAMESPACE);
|
110
|
-
}
|
data/ext/poppler/rbpoppler.h
DELETED
@@ -1,61 +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
|
-
#ifndef __RBPOPPLER_H__
|
22
|
-
#define __RBPOPPLER_H__
|
23
|
-
|
24
|
-
#include <ruby.h>
|
25
|
-
|
26
|
-
#include <rbglib.h>
|
27
|
-
#include <rbgobject.h>
|
28
|
-
|
29
|
-
#include <poppler.h>
|
30
|
-
|
31
|
-
#ifndef POPPLER_MAJOR_VERSION
|
32
|
-
# include "rbpopplerversion.h"
|
33
|
-
#endif
|
34
|
-
|
35
|
-
#include "rbpopplerconversions.h"
|
36
|
-
|
37
|
-
#ifndef POPPLER_TYPE_INDEX_ITER
|
38
|
-
# define POPPLER_TYPE_INDEX_ITER (poppler_index_iter_get_type ())
|
39
|
-
#endif
|
40
|
-
#ifndef POPPLER_TYPE_FONTS_ITER
|
41
|
-
# define POPPLER_TYPE_FONTS_ITER (poppler_fonts_iter_get_type ())
|
42
|
-
#endif
|
43
|
-
|
44
|
-
#ifndef POPPLER_TYPE_DEST
|
45
|
-
extern GType poppler_dest_get_type (void) G_GNUC_CONST;
|
46
|
-
# define POPPLER_TYPE_DEST (poppler_dest_get_type ())
|
47
|
-
# define RB_POPPLER_TYPE_DEST_NOT_DEFINED
|
48
|
-
#endif
|
49
|
-
|
50
|
-
#include <rb_cairo.h>
|
51
|
-
|
52
|
-
#ifdef POPPLER_TYPE_COLOR
|
53
|
-
extern PopplerColor *rb_poppler_ruby_object_to_color(VALUE color);
|
54
|
-
extern VALUE rb_poppler_ruby_object_from_color_with_free(PopplerColor *color);
|
55
|
-
#endif
|
56
|
-
|
57
|
-
extern VALUE rb_poppler_ruby_object_from_form_field(PopplerFormField *field);
|
58
|
-
extern VALUE rb_poppler_ruby_object_from_action(PopplerAction *action);
|
59
|
-
extern PopplerAction *rb_poppler_action_from_ruby_object(VALUE action);
|
60
|
-
|
61
|
-
#endif
|
@@ -1,105 +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
|
-
#ifndef __RBPOPPLERCONVERSIONS_H__
|
22
|
-
#define __RBPOPPLERCONVERSIONS_H__
|
23
|
-
|
24
|
-
#define POPPLERANNOT2RVAL(o) (GOBJ2RVAL(o))
|
25
|
-
#define POPPLERFORMFIELD2RVAL(o) (rb_poppler_ruby_object_from_form_field(o))
|
26
|
-
#define RVAL2POPPLERACTION(o) (rb_poppler_action_from_ruby_object(o))
|
27
|
-
#define POPPLERACTION2RVAL(o) (rb_poppler_ruby_object_from_action(o))
|
28
|
-
#define RVAL2POPPLERCOLOR(o) (rb_poppler_ruby_object_to_color(o))
|
29
|
-
#define POPPLERCOLOR2RVAL(o) (BOXED2RVAL(o, POPPLER_TYPE_COLOR))
|
30
|
-
#define POPPLERCOLOR2RVAL_FREE(o) (rb_poppler_ruby_object_from_color_with_free(o))
|
31
|
-
|
32
|
-
#define RVAL2POPPLERANNOT(o) (POPPLER_ANNOT(RVAL2GOBJ(o)))
|
33
|
-
#define RVAL2POPPLERANNOTFREETEXT(o) (POPPLER_ANNOT_FREE_TEXT(RVAL2GOBJ(o)))
|
34
|
-
#define RVAL2POPPLERANNOTMARKUP(o) (POPPLER_ANNOT_MARKUP(RVAL2GOBJ(o)))
|
35
|
-
#define RVAL2POPPLERANNOTTEXT(o) (POPPLER_ANNOT_TEXT(RVAL2GOBJ(o)))
|
36
|
-
#define RVAL2POPPLERATTACHMENT(o) (POPPLER_ATTACHMENT(RVAL2GOBJ(o)))
|
37
|
-
#define RVAL2POPPLERDOCUMENT(o) (POPPLER_DOCUMENT(RVAL2GOBJ(o)))
|
38
|
-
#define RVAL2POPPLERFORMFIELD(o) (POPPLER_FORM_FIELD(RVAL2GOBJ(o)))
|
39
|
-
#define RVAL2POPPLERPAGE(o) (POPPLER_PAGE(RVAL2GOBJ(o)))
|
40
|
-
|
41
|
-
#define RVAL2POPPLERANNOTCALLOUTLINE(o) ((PopplerAnnotCalloutLine*)RVAL2BOXED(o, POPPLER_TYPE_ANNOT_CALLOUT_LINE))
|
42
|
-
#define POPPLERANNOTCALLOUTLINE2RVAL(o) (BOXED2RVAL(o, POPPLER_TYPE_ANNOT_CALLOUT_LINE))
|
43
|
-
#define RVAL2POPPLERANNOTMAPPING(o) ((PopplerAnnotMapping*)RVAL2BOXED(o, POPPLER_TYPE_ANNOT_MAPPING))
|
44
|
-
#define POPPLERANNOTMAPPING2RVAL(o) (BOXED2RVAL(o, POPPLER_TYPE_ANNOT_MAPPING))
|
45
|
-
#define RVAL2POPPLERDEST(o) ((PopplerDest*)RVAL2BOXED(o, POPPLER_TYPE_DEST))
|
46
|
-
#define POPPLERDEST2RVAL(o) (BOXED2RVAL(o, POPPLER_TYPE_DEST))
|
47
|
-
#define RVAL2FONTINFO(o) ((PopplerFontInfo*)RVAL2BOXED(o, POPPLER_TYPE_FONT_INFO))
|
48
|
-
#define FONTINFO2RVAL(o) (BOXED2RVAL(o, POPPLER_TYPE_FONT_INFO))
|
49
|
-
#define RVAL2POPPLERFONTSITER(o) ((PopplerFontsIter*)RVAL2BOXED(o, POPPLER_TYPE_FONTS_ITER))
|
50
|
-
#define POPPLERFONTSITER2RVAL(o) (BOXED2RVAL(o, POPPLER_TYPE_FONTS_ITER))
|
51
|
-
#define RVAL2POPPLERFORMFIELDMAPPING(o) ((PopplerFormFieldMapping*)RVAL2BOXED(o, POPPLER_TYPE_FORM_FIELD_MAPPING))
|
52
|
-
#define POPPLERFORMFIELDMAPPING2RVAL(o) (BOXED2RVAL(o, POPPLER_TYPE_FORM_FIELD_MAPPING))
|
53
|
-
#define RVAL2POPPLERIMAGEMAPPING(o) ((PopplerImageMapping*)RVAL2BOXED(o, POPPLER_TYPE_IMAGE_MAPPING))
|
54
|
-
#define POPPLERIMAGEMAPPING2RVAL(o) (BOXED2RVAL(o, POPPLER_TYPE_IMAGE_MAPPING))
|
55
|
-
#define RVAL2POPPLERINDEXITER(o) ((PopplerIndexIter*)RVAL2BOXED(o, POPPLER_TYPE_INDEX_ITER))
|
56
|
-
#define POPPLERINDEXITER2RVAL(o) (BOXED2RVAL(o, POPPLER_TYPE_INDEX_ITER))
|
57
|
-
#define RVAL2POPPLERLINKMAPPING(o) ((PopplerLinkMapping*)RVAL2BOXED(o, POPPLER_TYPE_LINK_MAPPING))
|
58
|
-
#define POPPLERLINKMAPPING2RVAL(o) (BOXED2RVAL(o, POPPLER_TYPE_LINK_MAPPING))
|
59
|
-
#define RVAL2POPPLERPAGETRANSITION(o) ((PopplerPageTransition*)RVAL2BOXED(o, POPPLER_TYPE_PAGE_TRANSITION))
|
60
|
-
#define POPPLERPAGETRANSITION2RVAL(o) (BOXED2RVAL(o, POPPLER_TYPE_PAGE_TRANSITION))
|
61
|
-
#define RVAL2POPPLERPSFILE(o) ((PopplerPSFile*)RVAL2BOXED(o, POPPLER_TYPE_PS_FILE))
|
62
|
-
#define POPPLERPSFILE2RVAL(o) (BOXED2RVAL(o, POPPLER_TYPE_PS_FILE))
|
63
|
-
#define RVAL2POPPLERRECTANGLE(o) ((PopplerRectangle*)RVAL2BOXED(o, POPPLER_TYPE_RECTANGLE))
|
64
|
-
#define POPPLERRECTANGLE2RVAL(o) (BOXED2RVAL(o, POPPLER_TYPE_RECTANGLE))
|
65
|
-
|
66
|
-
#define RVAL2POPPLERACTIONTYPE(o) (RVAL2GENUM(o, POPPLER_TYPE_ACTION_TYPE))
|
67
|
-
#define POPPLERACTIONTYPE2RVAL(o) (GENUM2RVAL(o, POPPLER_TYPE_ACTION_TYPE))
|
68
|
-
#define RVAL2POPPLERANNOTEXTERNALDATATYPE(o) (RVAL2GENUM(o, POPPLER_TYPE_ANNOT_EXTERNAL_DATA_TYPE))
|
69
|
-
#define POPPLERANNOTEXTERNALDATATYPE2RVAL(o) (GENUM2RVAL(o, POPPLER_TYPE_ANNOT_EXTERNAL_DATA_TYPE))
|
70
|
-
#define RVAL2POPPLERANNOTFLAG(o) (RVAL2GENUM(o, POPPLER_TYPE_ANNOT_FLAG))
|
71
|
-
#define POPPLERANNOTFLAG2RVAL(o) (GENUM2RVAL(o, POPPLER_TYPE_ANNOT_FLAG))
|
72
|
-
#define RVAL2POPPLERANNOTFREETEXTQUADDING(o) (RVAL2GENUM(o, POPPLER_TYPE_ANNOT_FREE_TEXT_QUADDING))
|
73
|
-
#define POPPLERANNOTFREETEXTQUADDING2RVAL(o) (GENUM2RVAL(o, POPPLER_TYPE_ANNOT_FREE_TEXT_QUADDING))
|
74
|
-
#define RVAL2POPPLERANNOTMARKUPREPLYTYPE(o) (RVAL2GENUM(o, POPPLER_TYPE_ANNOT_MARKUP_REPLY_TYPE))
|
75
|
-
#define POPPLERANNOTMARKUPREPLYTYPE2RVAL(o) (GENUM2RVAL(o, POPPLER_TYPE_ANNOT_MARKUP_REPLY_TYPE))
|
76
|
-
#define RVAL2POPPLERANNOTTEXTICON(o) (RVAL2GENUM(o, POPPLER_TYPE_ANNOT_TEXT_ICON))
|
77
|
-
#define POPPLERANNOTTEXTICON2RVAL(o) (GENUM2RVAL(o, POPPLER_TYPE_ANNOT_TEXT_ICON))
|
78
|
-
#define RVAL2POPPLERANNOTTEXTSTATE(o) (RVAL2GENUM(o, POPPLER_TYPE_ANNOT_TEXT_STATE))
|
79
|
-
#define POPPLERANNOTTEXTSTATE2RVAL(o) (GENUM2RVAL(o, POPPLER_TYPE_ANNOT_TEXT_STATE))
|
80
|
-
#define RVAL2POPPLERANNOTTYPE(o) (RVAL2GENUM(o, POPPLER_TYPE_ANNOT_TYPE))
|
81
|
-
#define POPPLERANNOTTYPE2RVAL(o) (GENUM2RVAL(o, POPPLER_TYPE_ANNOT_TYPE))
|
82
|
-
#define RVAL2POPPLERBACKEND(o) (RVAL2GENUM(o, POPPLER_TYPE_BACKEND))
|
83
|
-
#define POPPLERBACKEND2RVAL(o) (GENUM2RVAL(o, POPPLER_TYPE_BACKEND))
|
84
|
-
#define RVAL2POPPLERDESTTYPE(o) (RVAL2GENUM(o, POPPLER_TYPE_DEST_TYPE))
|
85
|
-
#define POPPLERDESTTYPE2RVAL(o) (GENUM2RVAL(o, POPPLER_TYPE_DEST_TYPE))
|
86
|
-
#define RVAL2POPPLERFONTTYPE(o) (RVAL2GENUM(o, POPPLER_TYPE_FONT_TYPE))
|
87
|
-
#define POPPLERFONTTYPE2RVAL(o) (GENUM2RVAL(o, POPPLER_TYPE_FONT_TYPE))
|
88
|
-
#define RVAL2POPPLERFORMBUTTONTYPE(o) (RVAL2GENUM(o, POPPLER_TYPE_FORM_BUTTON_TYPE))
|
89
|
-
#define POPPLERFORMBUTTONTYPE2RVAL(o) (GENUM2RVAL(o, POPPLER_TYPE_FORM_BUTTON_TYPE))
|
90
|
-
#define RVAL2POPPLERFORMCHOICETYPE(o) (RVAL2GENUM(o, POPPLER_TYPE_FORM_CHOICE_TYPE))
|
91
|
-
#define POPPLERFORMCHOICETYPE2RVAL(o) (GENUM2RVAL(o, POPPLER_TYPE_FORM_CHOICE_TYPE))
|
92
|
-
#define RVAL2POPPLERFORMFIELDTYPE(o) (RVAL2GENUM(o, POPPLER_TYPE_FORM_FIELD_TYPE))
|
93
|
-
#define POPPLERFORMFIELDTYPE2RVAL(o) (GENUM2RVAL(o, POPPLER_TYPE_FORM_FIELD_TYPE))
|
94
|
-
#define RVAL2POPPLERFORMTEXTTYPE(o) (RVAL2GENUM(o, POPPLER_TYPE_FORM_TEXT_TYPE))
|
95
|
-
#define POPPLERFORMTEXTTYPE2RVAL(o) (GENUM2RVAL(o, POPPLER_TYPE_FORM_TEXT_TYPE))
|
96
|
-
#define RVAL2POPPLERPAGETRANSITIONALIGNMENT(o) (RVAL2GENUM(o, POPPLER_TYPE_PAGE_TRANSITION_ALIGNMENT))
|
97
|
-
#define POPPLERPAGETRANSITIONALIGNMENT2RVAL(o) (GENUM2RVAL(o, POPPLER_TYPE_PAGE_TRANSITION_ALIGNMENT))
|
98
|
-
#define RVAL2POPPLERPAGETRANSITIONDIRECTION(o) (RVAL2GENUM(o, POPPLER_TYPE_PAGE_TRANSITION_DIRECTION))
|
99
|
-
#define POPPLERPAGETRANSITIONDIRECTION2RVAL(o) (GENUM2RVAL(o, POPPLER_TYPE_PAGE_TRANSITION_DIRECTION))
|
100
|
-
#define RVAL2POPPLERPAGETRANSITIONTYPE(o) (RVAL2GENUM(o, POPPLER_TYPE_PAGE_TRANSITION_TYPE))
|
101
|
-
#define POPPLERPAGETRANSITIONTYPE2RVAL(o) (GENUM2RVAL(o, POPPLER_TYPE_PAGE_TRANSITION_TYPE))
|
102
|
-
#define RVAL2POPPLERSELECTIONSTYLE(o) (RVAL2GENUM(o, POPPLER_TYPE_SELECTION_STYLE))
|
103
|
-
#define POPPLERSELECTIONSTYLE2RVAL(o) (GENUM2RVAL(o, POPPLER_TYPE_SELECTION_STYLE))
|
104
|
-
|
105
|
-
#endif /* __RBPOPPLERCONVERSIONS_H__ */
|