1 /* poppler-glib.vapi generated by vapigen, do not modify. */
3 [CCode (cprefix = "Poppler", lower_case_cprefix = "poppler_")]
6 [CCode (copy_function = "poppler_action_copy", type_id = "POPPLER_TYPE_ACTION", cheader_filename = "poppler.h")]
8 public Poppler.ActionAny any;
9 public Poppler.ActionGotoDest goto_dest;
10 public Poppler.ActionGotoRemote goto_remote;
11 public Poppler.ActionLaunch launch;
12 public Poppler.ActionMovie movie;
13 public Poppler.ActionNamed named;
14 public Poppler.ActionType type;
15 public Poppler.ActionUri uri;
16 public Poppler.Action copy ();
18 [CCode (cheader_filename = "poppler.h")]
19 public class Annot : GLib.Object {
20 [CCode (has_construct_function = false)]
22 public Poppler.AnnotType get_annot_type ();
23 public unowned Poppler.Color get_color ();
24 public unowned string get_contents ();
25 public Poppler.AnnotFlag get_flags ();
26 public unowned string get_modified ();
27 public unowned string get_name ();
28 public void set_contents (string contents);
31 [CCode (copy_function = "poppler_annot_callout_line_copy", type_id = "POPPLER_TYPE_ANNOT_CALLOUT_LINE", cheader_filename = "poppler.h")]
32 public class AnnotCalloutLine {
33 public bool multiline;
40 [CCode (has_construct_function = false)]
41 public AnnotCalloutLine ();
42 public unowned Poppler.AnnotCalloutLine copy ();
44 [CCode (cheader_filename = "poppler.h")]
45 public class AnnotFreeText : Poppler.AnnotMarkup {
46 [CCode (has_construct_function = false)]
47 protected AnnotFreeText ();
48 public unowned Poppler.AnnotCalloutLine get_callout_line ();
49 public Poppler.AnnotFreeTextQuadding get_quadding ();
52 [CCode (copy_function = "poppler_annot_mapping_copy", type_id = "POPPLER_TYPE_ANNOT_MAPPING", cheader_filename = "poppler.h")]
53 public class AnnotMapping {
54 public weak Poppler.Annot annot;
55 public Poppler.Rectangle area;
56 [CCode (has_construct_function = false)]
57 public AnnotMapping ();
58 public unowned Poppler.AnnotMapping copy ();
60 [CCode (cheader_filename = "poppler.h")]
61 public class AnnotMarkup : Poppler.Annot {
62 [CCode (has_construct_function = false)]
63 protected AnnotMarkup ();
64 public GLib.Date get_date ();
65 public Poppler.AnnotExternalDataType get_external_data ();
66 public unowned string get_label ();
67 public double get_opacity ();
68 public bool get_popup_is_open ();
69 public bool get_popup_rectangle (Poppler.Rectangle poppler_rect);
70 public Poppler.AnnotMarkupReplyType get_reply_to ();
71 public unowned string get_subject ();
72 public bool has_popup ();
74 [CCode (cheader_filename = "poppler.h")]
75 public class AnnotText : Poppler.AnnotMarkup {
76 [CCode (has_construct_function = false)]
77 protected AnnotText ();
78 public unowned string get_icon ();
79 public bool get_is_open ();
80 public Poppler.AnnotTextState get_state ();
82 [CCode (cheader_filename = "poppler.h")]
83 public class Attachment : GLib.Object {
84 public weak GLib.StringBuilder checksum;
85 public GLib.Time ctime;
86 public weak string description;
87 public GLib.Time mtime;
88 public weak string name;
90 [CCode (has_construct_function = false)]
91 protected Attachment ();
92 public bool save (string filename) throws GLib.Error;
93 public bool save_to_callback (Poppler.AttachmentSaveFunc save_func) throws GLib.Error;
96 [CCode (copy_function = "poppler_color_copy", type_id = "POPPLER_TYPE_COLOR", cheader_filename = "poppler.h")]
101 [CCode (has_construct_function = false)]
103 public unowned Poppler.Color copy ();
106 [CCode (copy_function = "poppler_dest_copy", type_id = "POPPLER_TYPE_DEST", cheader_filename = "poppler.h")]
108 public double bottom;
109 public uint change_left;
110 public uint change_top;
111 public uint change_zoom;
113 public weak string named_dest;
117 public Poppler.DestType type;
119 public Poppler.Dest copy ();
121 [CCode (cheader_filename = "poppler.h")]
122 public class Document : GLib.Object {
123 [CCode (has_construct_function = false)]
124 protected Document ();
125 public unowned Poppler.Dest find_dest (string link_name);
126 [CCode (has_construct_function = false)]
127 public Document.from_data (string data, int length, string password) throws GLib.Error;
128 [CCode (has_construct_function = false)]
129 public Document.from_file (string uri, string? password) throws GLib.Error;
130 public unowned GLib.List get_attachments ();
131 public unowned Poppler.FormField get_form_field (int id);
132 public int get_n_pages ();
133 public unowned Poppler.Page get_page (int index);
134 public unowned Poppler.Page get_page_by_label (string label);
135 public bool has_attachments ();
136 public bool save (string uri) throws GLib.Error;
137 public bool save_a_copy (string uri) throws GLib.Error;
139 public string author { owned get; }
141 public int creation_date { get; }
143 public string creator { owned get; }
145 public string format { owned get; }
147 public uint format_major { get; }
149 public uint format_minor { get; }
151 public string keywords { owned get; }
153 public string linearized { owned get; }
155 public string metadata { owned get; }
157 public int mod_date { get; }
159 public Poppler.PageLayout page_layout { get; }
161 public Poppler.PageMode page_mode { get; }
163 public Poppler.Permissions permissions { get; }
165 public string producer { owned get; }
167 public string subject { owned get; }
169 public string title { owned get; }
171 public Poppler.ViewerPreferences viewer_preferences { get; }
173 [CCode (cheader_filename = "poppler.h")]
174 public class FontInfo : GLib.Object {
175 [CCode (has_construct_function = false)]
176 public FontInfo (Poppler.Document document);
178 public bool scan (int n_pages, out unowned Poppler.FontsIter iter);
181 [CCode (copy_function = "poppler_fonts_iter_copy", type_id = "POPPLER_TYPE_FONTS_ITER", cheader_filename = "poppler.h")]
182 public class FontsIter {
183 public Poppler.FontsIter copy ();
184 public unowned string get_file_name ();
185 public Poppler.FontType get_font_type ();
186 public unowned string get_full_name ();
187 public unowned string get_name ();
188 public bool is_embedded ();
189 public bool is_subset ();
192 [CCode (cheader_filename = "poppler.h")]
193 public class FormField : GLib.Object {
194 [CCode (has_construct_function = false)]
195 protected FormField ();
196 public Poppler.FormButtonType button_get_button_type ();
197 public bool button_get_state ();
198 public void button_set_state (bool state);
199 public bool choice_can_select_multiple ();
200 public bool choice_commit_on_change ();
201 public bool choice_do_spell_check ();
202 public Poppler.FormChoiceType choice_get_choice_type ();
203 public unowned string choice_get_item (int index);
204 public int choice_get_n_items ();
205 public unowned string choice_get_text ();
206 public bool choice_is_editable ();
207 public bool choice_is_item_selected (int index);
208 public void choice_select_item (int index);
209 public void choice_set_text (string text);
210 public void choice_toggle_item (int index);
211 public void choice_unselect_all ();
212 public Poppler.FormFieldType get_field_type ();
213 public double get_font_size ();
214 public int get_id ();
215 public bool is_read_only ();
216 public bool text_do_scroll ();
217 public bool text_do_spell_check ();
218 public int text_get_max_len ();
219 public unowned string text_get_text ();
220 public Poppler.FormTextType text_get_text_type ();
221 public bool text_is_password ();
222 public bool text_is_rich_text ();
223 public void text_set_text (string text);
226 [CCode (copy_function = "poppler_form_field_mapping_copy", type_id = "POPPLER_TYPE_FORM_FIELD_MAPPING", cheader_filename = "poppler.h")]
227 public class FormFieldMapping {
228 public Poppler.Rectangle area;
229 public weak Poppler.FormField field;
230 [CCode (has_construct_function = false)]
231 public FormFieldMapping ();
232 public Poppler.FormFieldMapping copy ();
235 [CCode (copy_function = "poppler_image_mapping_copy", type_id = "POPPLER_TYPE_IMAGE_MAPPING", cheader_filename = "poppler.h")]
236 public class ImageMapping {
237 public Poppler.Rectangle area;
239 [CCode (has_construct_function = false)]
240 public ImageMapping ();
241 public Poppler.ImageMapping copy ();
244 [CCode (copy_function = "poppler_index_iter_copy", type_id = "POPPLER_TYPE_INDEX_ITER", cheader_filename = "poppler.h")]
245 public class IndexIter {
246 [CCode (has_construct_function = false)]
247 public IndexIter (Poppler.Document document);
248 public Poppler.IndexIter copy ();
249 public unowned Poppler.Action get_action ();
250 public unowned Poppler.IndexIter get_child ();
251 public bool is_open ();
254 [CCode (cheader_filename = "poppler.h")]
255 public class Layer : GLib.Object {
256 [CCode (has_construct_function = false)]
258 public int get_radio_button_group_id ();
259 public unowned string get_title ();
261 public bool is_parent ();
262 public bool is_visible ();
266 [CCode (copy_function = "poppler_layers_iter_copy", type_id = "POPPLER_TYPE_LAYERS_ITER", cheader_filename = "poppler.h")]
267 public class LayersIter {
268 [CCode (has_construct_function = false)]
269 public LayersIter (Poppler.Document document);
270 public unowned Poppler.LayersIter copy ();
271 public unowned Poppler.LayersIter get_child ();
272 public unowned Poppler.Layer get_layer ();
273 public unowned string get_title ();
277 [CCode (copy_function = "poppler_link_mapping_copy", type_id = "POPPLER_TYPE_LINK_MAPPING", cheader_filename = "poppler.h")]
278 public class LinkMapping {
279 public weak Poppler.Action action;
280 public Poppler.Rectangle area;
281 [CCode (has_construct_function = false)]
282 public LinkMapping ();
283 public Poppler.LinkMapping copy ();
285 [CCode (cheader_filename = "poppler.h")]
286 public class PSFile : GLib.Object {
287 [CCode (has_construct_function = false)]
288 public PSFile (Poppler.Document document, string filename, int first_page, int n_pages);
290 public void set_duplex (bool duplex);
291 public void set_paper_size (double width, double height);
293 [CCode (cheader_filename = "poppler.h")]
294 public class Page : GLib.Object {
295 [CCode (has_construct_function = false)]
297 public unowned GLib.List find_text (string text);
298 public static void free_annot_mapping (GLib.List list);
299 public static void free_form_field_mapping (GLib.List list);
300 public static void free_image_mapping (GLib.List list);
301 public static void free_link_mapping (GLib.List list);
302 public unowned GLib.List get_annot_mapping ();
303 public void get_crop_box (out Poppler.Rectangle rect);
304 public double get_duration ();
305 public unowned GLib.List get_form_field_mapping ();
306 public unowned Cairo.Surface get_image (int image_id);
307 public unowned GLib.List get_image_mapping ();
308 public int get_index ();
309 public unowned GLib.List get_link_mapping ();
310 public unowned GLib.List get_selection_region (double scale, Poppler.SelectionStyle style, Poppler.Rectangle selection);
311 public void get_size (out double width, out double height);
312 public unowned string get_text (Poppler.SelectionStyle style, Poppler.Rectangle rect);
313 public unowned Cairo.Surface get_thumbnail ();
314 public unowned Gdk.Pixbuf get_thumbnail_pixbuf ();
315 public bool get_thumbnail_size (int width, int height);
316 public unowned Poppler.PageTransition get_transition ();
317 public void render (Cairo.Context cairo);
318 public void render_for_printing (Cairo.Context cairo);
319 public void render_selection (Cairo.Context cairo, Poppler.Rectangle selection, Poppler.Rectangle old_selection, Poppler.SelectionStyle style, Poppler.Color glyph_color, Poppler.Color background_color);
320 public void render_selection_to_pixbuf (double scale, int rotation, Gdk.Pixbuf pixbuf, Poppler.Rectangle selection, Poppler.Rectangle old_selection, Poppler.SelectionStyle style, Gdk.Color glyph_color, Gdk.Color background_color);
321 public void render_to_pixbuf (int src_x, int src_y, int src_width, int src_height, double scale, int rotation, Gdk.Pixbuf pixbuf);
322 public void render_to_pixbuf_for_printing (int src_x, int src_y, int src_width, int src_height, double scale, int rotation, Gdk.Pixbuf pixbuf);
323 public void render_to_ps (Poppler.PSFile ps_file);
324 public static void selection_region_free (GLib.List region);
326 public string label { owned get; }
329 [CCode (copy_function = "poppler_page_transition_copy", type_id = "POPPLER_TYPE_PAGE_TRANSITION", cheader_filename = "poppler.h")]
330 public class PageTransition {
331 public Poppler.PageTransitionAlignment alignment;
333 public Poppler.PageTransitionDirection direction;
335 public bool rectangular;
337 public Poppler.PageTransitionType type;
338 [CCode (has_construct_function = false)]
339 public PageTransition ();
340 public Poppler.PageTransition copy ();
342 [CCode (has_type_id = false, cheader_filename = "poppler.h")]
343 public struct ActionAny {
344 public Poppler.ActionType type;
345 public weak string title;
347 [CCode (has_type_id = false, cheader_filename = "poppler.h")]
348 public struct ActionGotoDest {
349 public Poppler.ActionType type;
350 public weak string title;
351 public weak Poppler.Dest dest;
353 [CCode (has_type_id = false, cheader_filename = "poppler.h")]
354 public struct ActionGotoRemote {
355 public Poppler.ActionType type;
356 public weak string title;
357 public weak string file_name;
358 public weak Poppler.Dest dest;
360 [CCode (has_type_id = false, cheader_filename = "poppler.h")]
361 public struct ActionLaunch {
362 public Poppler.ActionType type;
363 public weak string title;
364 public weak string file_name;
365 public weak string @params;
367 [CCode (has_type_id = false, cheader_filename = "poppler.h")]
368 public struct ActionMovie {
369 public Poppler.ActionType type;
370 public weak string title;
372 [CCode (has_type_id = false, cheader_filename = "poppler.h")]
373 public struct ActionNamed {
374 public Poppler.ActionType type;
375 public weak string title;
376 public weak string named_dest;
378 [CCode (has_type_id = false, cheader_filename = "poppler.h")]
379 public struct ActionUri {
380 public Poppler.ActionType type;
381 public weak string title;
382 public weak string uri;
384 [CCode (type_id = "POPPLER_TYPE_RECTANGLE", cheader_filename = "poppler.h")]
385 public struct Rectangle {
391 [CCode (cprefix = "POPPLER_ACTION_", cheader_filename = "poppler.h")]
392 public enum ActionType {
402 [CCode (cprefix = "POPPLER_ANNOT_EXTERNAL_DATA_MARKUP_", cheader_filename = "poppler.h")]
403 public enum AnnotExternalDataType {
407 [CCode (cprefix = "POPPLER_ANNOT_FLAG_", cheader_filename = "poppler.h")]
409 public enum AnnotFlag {
422 [CCode (cprefix = "POPPLER_ANNOT_FREE_TEXT_QUADDING_", cheader_filename = "poppler.h")]
423 public enum AnnotFreeTextQuadding {
428 [CCode (cprefix = "POPPLER_ANNOT_MARKUP_REPLY_TYPE_", cheader_filename = "poppler.h")]
429 public enum AnnotMarkupReplyType {
433 [CCode (cprefix = "POPPLER_ANNOT_TEXT_STATE_", cheader_filename = "poppler.h")]
434 public enum AnnotTextState {
444 [CCode (cprefix = "POPPLER_ANNOT_", cheader_filename = "poppler.h")]
445 public enum AnnotType {
473 [CCode (cprefix = "POPPLER_BACKEND_", cheader_filename = "poppler.h")]
474 public enum Backend {
479 [CCode (cprefix = "POPPLER_DEST_", cheader_filename = "poppler.h")]
480 public enum DestType {
492 [CCode (cprefix = "POPPLER_ERROR_", cheader_filename = "poppler.h")]
500 [CCode (cprefix = "POPPLER_FONT_TYPE_", cheader_filename = "poppler.h")]
501 public enum FontType {
515 [CCode (cprefix = "POPPLER_FORM_BUTTON_", cheader_filename = "poppler.h")]
516 public enum FormButtonType {
521 [CCode (cprefix = "POPPLER_FORM_CHOICE_", cheader_filename = "poppler.h")]
522 public enum FormChoiceType {
526 [CCode (cprefix = "POPPLER_FORM_FIELD_", cheader_filename = "poppler.h")]
527 public enum FormFieldType {
534 [CCode (cprefix = "POPPLER_FORM_TEXT_", cheader_filename = "poppler.h")]
535 public enum FormTextType {
540 [CCode (cprefix = "POPPLER_ORIENTATION_", cheader_filename = "poppler.h")]
541 public enum Orientation {
547 [CCode (cprefix = "POPPLER_PAGE_LAYOUT_", cheader_filename = "poppler.h")]
548 public enum PageLayout {
557 [CCode (cprefix = "POPPLER_PAGE_MODE_", cheader_filename = "poppler.h")]
558 public enum PageMode {
567 [CCode (cprefix = "POPPLER_PAGE_TRANSITION_", cheader_filename = "poppler.h")]
568 public enum PageTransitionAlignment {
572 [CCode (cprefix = "POPPLER_PAGE_TRANSITION_", cheader_filename = "poppler.h")]
573 public enum PageTransitionDirection {
577 [CCode (cprefix = "POPPLER_PAGE_TRANSITION_", cheader_filename = "poppler.h")]
578 public enum PageTransitionType {
592 [CCode (cprefix = "POPPLER_PERMISSIONS_", cheader_filename = "poppler.h")]
594 public enum Permissions {
602 [CCode (cprefix = "POPPLER_SELECTION_", cheader_filename = "poppler.h")]
603 public enum SelectionStyle {
608 [CCode (cprefix = "POPPLER_VIEWER_PREFERENCES_", cheader_filename = "poppler.h")]
610 public enum ViewerPreferences {
620 [CCode (cheader_filename = "poppler.h", has_target = false)]
621 public delegate bool AttachmentSaveFunc (string buf, size_t count, void* data, GLib.Error error);
622 [CCode (cheader_filename = "poppler.h")]
623 public const int HAS_CAIRO;
624 [CCode (cheader_filename = "poppler.h")]
625 public const int MAJOR_VERSION;
626 [CCode (cheader_filename = "poppler.h")]
627 public const int MICRO_VERSION;
628 [CCode (cheader_filename = "poppler.h")]
629 public const int MINOR_VERSION;
630 [CCode (cheader_filename = "poppler.h")]
631 public const int WITH_GDK;
632 [CCode (cheader_filename = "poppler.h")]
633 public static bool date_parse (string date, ulong timet);
634 [CCode (cheader_filename = "poppler.h")]
635 public static GLib.Quark error_quark ();
636 [CCode (cheader_filename = "poppler.h")]
637 public static Poppler.Backend get_backend ();
638 [CCode (cheader_filename = "poppler.h")]
639 public static unowned string get_version ();