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 weak Poppler.ActionAny any;
9 public weak Poppler.ActionGotoDest goto_dest;
10 public weak Poppler.ActionGotoRemote goto_remote;
11 public weak Poppler.ActionLaunch launch;
12 public weak Poppler.ActionMovie movie;
13 public weak Poppler.ActionNamed named;
14 public Poppler.ActionType type;
15 public weak Poppler.ActionUri uri;
16 public Poppler.Action copy ();
19 [CCode (cheader_filename = "poppler.h")]
20 public class ActionAny {
21 public weak string title;
22 public Poppler.ActionType type;
25 [CCode (cheader_filename = "poppler.h")]
26 public class ActionGotoDest {
27 public weak Poppler.Dest dest;
28 public weak string title;
29 public Poppler.ActionType type;
32 [CCode (cheader_filename = "poppler.h")]
33 public class ActionGotoRemote {
34 public weak Poppler.Dest dest;
35 public weak string file_name;
36 public weak string title;
37 public Poppler.ActionType type;
40 [CCode (cheader_filename = "poppler.h")]
41 public class ActionLaunch {
42 public weak string file_name;
43 public weak string @params;
44 public weak string title;
45 public Poppler.ActionType type;
48 [CCode (cheader_filename = "poppler.h")]
49 public class ActionMovie {
50 public weak string title;
51 public Poppler.ActionType type;
54 [CCode (cheader_filename = "poppler.h")]
55 public class ActionNamed {
56 public weak string named_dest;
57 public weak string title;
58 public Poppler.ActionType type;
61 [CCode (cheader_filename = "poppler.h")]
62 public class ActionUri {
63 public weak string title;
64 public Poppler.ActionType type;
65 public weak string uri;
67 [CCode (cheader_filename = "poppler.h")]
68 public class Attachment : GLib.Object {
69 public weak GLib.StringBuilder checksum;
70 public GLib.Time ctime;
71 public weak string description;
72 public GLib.Time mtime;
73 public weak string name;
75 public bool save (string filename) throws GLib.Error;
76 public bool save_to_callback (Poppler.AttachmentSaveFunc save_func) throws GLib.Error;
79 [CCode (copy_function = "poppler_dest_copy", type_id = "POPPLER_TYPE_DEST", cheader_filename = "poppler.h")]
82 public uint change_left;
83 public uint change_top;
84 public uint change_zoom;
86 public weak string named_dest;
90 public Poppler.DestType type;
92 public Poppler.Dest copy ();
94 [CCode (cheader_filename = "poppler.h")]
95 public class Document : GLib.Object {
96 public unowned Poppler.Dest find_dest (string link_name);
97 [CCode (has_construct_function = false)]
98 public Document.from_data (string data, int length, string password) throws GLib.Error;
99 [CCode (has_construct_function = false)]
100 public Document.from_file (string uri, string? password) throws GLib.Error;
101 public unowned GLib.List get_attachments ();
102 public unowned Poppler.FormField get_form_field (int id);
103 public int get_n_pages ();
104 public unowned Poppler.Page get_page (int index);
105 public unowned Poppler.Page get_page_by_label (string label);
106 public bool has_attachments ();
107 public bool save (string uri) throws GLib.Error;
109 public string author { owned get; }
111 public int creation_date { get; }
113 public string creator { owned get; }
115 public string format { owned get; }
117 public string keywords { owned get; }
119 public string linearized { owned get; }
121 public string metadata { owned get; }
123 public int mod_date { get; }
125 public Poppler.PageLayout page_layout { get; }
127 public Poppler.PageMode page_mode { get; }
129 public Poppler.Permissions permissions { get; }
131 public string producer { owned get; }
133 public string subject { owned get; }
135 public string title { owned get; }
137 public Poppler.ViewerPreferences viewer_preferences { get; }
139 [CCode (cheader_filename = "poppler.h")]
140 public class FontInfo : GLib.Object {
141 [CCode (has_construct_function = false)]
142 public FontInfo (Poppler.Document document);
144 public bool scan (int n_pages, out unowned Poppler.FontsIter iter);
147 [CCode (copy_function = "poppler_fonts_iter_copy", type_id = "POPPLER_TYPE_FONTS_ITER", cheader_filename = "poppler.h")]
148 public class FontsIter {
149 public Poppler.FontsIter copy ();
150 public unowned string get_file_name ();
151 public Poppler.FontType get_font_type ();
152 public unowned string get_full_name ();
153 public unowned string get_name ();
154 public bool is_embedded ();
155 public bool is_subset ();
158 [CCode (cheader_filename = "poppler.h")]
159 public class FormField : GLib.Object {
160 public Poppler.FormButtonType button_get_button_type ();
161 public bool button_get_state ();
162 public void button_set_state (bool state);
163 public bool choice_can_select_multiple ();
164 public bool choice_commit_on_change ();
165 public bool choice_do_spell_check ();
166 public Poppler.FormChoiceType choice_get_choice_type ();
167 public unowned string choice_get_item (int index);
168 public int choice_get_n_items ();
169 public unowned string choice_get_text ();
170 public bool choice_is_editable ();
171 public bool choice_is_item_selected (int index);
172 public void choice_select_item (int index);
173 public void choice_set_text (string text);
174 public void choice_toggle_item (int index);
175 public void choice_unselect_all ();
176 public Poppler.FormFieldType get_field_type ();
177 public double get_font_size ();
178 public int get_id ();
179 public bool is_read_only ();
180 public bool text_do_scroll ();
181 public bool text_do_spell_check ();
182 public int text_get_max_len ();
183 public unowned string text_get_text ();
184 public Poppler.FormTextType text_get_text_type ();
185 public bool text_is_password ();
186 public bool text_is_rich_text ();
187 public void text_set_text (string text);
190 [CCode (copy_function = "poppler_form_field_mapping_copy", type_id = "POPPLER_TYPE_FORM_FIELD_MAPPING", cheader_filename = "poppler.h")]
191 public class FormFieldMapping {
192 public weak Poppler.Rectangle area;
193 public weak Poppler.FormField field;
194 [CCode (has_construct_function = false)]
195 public FormFieldMapping ();
196 public Poppler.FormFieldMapping copy ();
199 [CCode (copy_function = "poppler_image_mapping_copy", type_id = "POPPLER_TYPE_IMAGE_MAPPING", cheader_filename = "poppler.h")]
200 public class ImageMapping {
201 public weak Poppler.Rectangle area;
202 public weak Gdk.Pixbuf image;
203 [CCode (has_construct_function = false)]
204 public ImageMapping ();
205 public Poppler.ImageMapping copy ();
208 [CCode (copy_function = "poppler_index_iter_copy", type_id = "POPPLER_TYPE_INDEX_ITER", cheader_filename = "poppler.h")]
209 public class IndexIter {
210 [CCode (has_construct_function = false)]
211 public IndexIter (Poppler.Document document);
212 public Poppler.IndexIter copy ();
213 public unowned Poppler.Action get_action ();
214 public unowned Poppler.IndexIter get_child ();
215 public bool is_open ();
219 [CCode (copy_function = "poppler_link_mapping_copy", type_id = "POPPLER_TYPE_LINK_MAPPING", cheader_filename = "poppler.h")]
220 public class LinkMapping {
221 public weak Poppler.Action action;
222 public weak Poppler.Rectangle area;
223 [CCode (has_construct_function = false)]
224 public LinkMapping ();
225 public Poppler.LinkMapping copy ();
227 [CCode (cheader_filename = "poppler.h")]
228 public class PSFile : GLib.Object {
229 [CCode (has_construct_function = false)]
230 public PSFile (Poppler.Document document, string filename, int first_page, int n_pages);
232 public void set_duplex (bool duplex);
233 public void set_paper_size (double width, double height);
235 [CCode (cheader_filename = "poppler.h")]
236 public class Page : GLib.Object {
237 public unowned GLib.List find_text (string text);
238 public static void free_form_field_mapping (GLib.List list);
239 public static void free_image_mapping (GLib.List list);
240 public static void free_link_mapping (GLib.List list);
241 public void get_crop_box (Poppler.Rectangle rect);
242 public double get_duration ();
243 public unowned GLib.List get_form_field_mapping ();
244 public unowned GLib.List get_image_mapping ();
245 public int get_index ();
246 public unowned GLib.List get_link_mapping ();
247 public unowned Gdk.Region get_selection_region (double scale, Poppler.SelectionStyle style, Poppler.Rectangle selection);
248 public void get_size (out double width, out double height);
249 public unowned string get_text (Poppler.SelectionStyle style, Poppler.Rectangle rect);
250 public unowned Gdk.Pixbuf get_thumbnail ();
251 public bool get_thumbnail_size (int width, int height);
252 public unowned Poppler.PageTransition get_transition ();
253 public void render (Cairo.Context cairo);
254 public void render_selection (Cairo.Context cairo, Poppler.Rectangle selection, Poppler.Rectangle old_selection, Poppler.SelectionStyle style, Gdk.Color glyph_color, Gdk.Color background_color);
255 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);
256 public void render_to_pixbuf (int src_x, int src_y, int src_width, int src_height, double scale, int rotation, Gdk.Pixbuf pixbuf);
257 public void render_to_ps (Poppler.PSFile ps_file);
259 public string label { owned get; }
262 [CCode (copy_function = "poppler_page_transition_copy", type_id = "POPPLER_TYPE_PAGE_TRANSITION", cheader_filename = "poppler.h")]
263 public class PageTransition {
264 public Poppler.PageTransitionAlignment alignment;
266 public Poppler.PageTransitionDirection direction;
268 public bool rectangular;
270 public Poppler.PageTransitionType type;
271 [CCode (has_construct_function = false)]
272 public PageTransition ();
273 public Poppler.PageTransition copy ();
276 [CCode (copy_function = "poppler_rectangle_copy", type_id = "POPPLER_TYPE_RECTANGLE", cheader_filename = "poppler.h")]
277 public class Rectangle {
282 [CCode (has_construct_function = false)]
284 public Poppler.Rectangle copy ();
286 [CCode (cprefix = "POPPLER_ACTION_", has_type_id = "0", cheader_filename = "poppler.h")]
287 public enum ActionType {
296 [CCode (cprefix = "POPPLER_BACKEND_", has_type_id = "0", cheader_filename = "poppler.h")]
297 public enum Backend {
302 [CCode (cprefix = "POPPLER_DEST_", has_type_id = "0", cheader_filename = "poppler.h")]
303 public enum DestType {
315 [CCode (cprefix = "POPPLER_ERROR_", has_type_id = "0", cheader_filename = "poppler.h")]
320 [CCode (cprefix = "POPPLER_FONT_TYPE_", has_type_id = "0", cheader_filename = "poppler.h")]
321 public enum FontType {
335 [CCode (cprefix = "POPPLER_FORM_BUTTON_", has_type_id = "0", cheader_filename = "poppler.h")]
336 public enum FormButtonType {
341 [CCode (cprefix = "POPPLER_FORM_CHOICE_", has_type_id = "0", cheader_filename = "poppler.h")]
342 public enum FormChoiceType {
346 [CCode (cprefix = "POPPLER_FORM_FIELD_", has_type_id = "0", cheader_filename = "poppler.h")]
347 public enum FormFieldType {
354 [CCode (cprefix = "POPPLER_FORM_TEXT_", has_type_id = "0", cheader_filename = "poppler.h")]
355 public enum FormTextType {
360 [CCode (cprefix = "POPPLER_ORIENTATION_", has_type_id = "0", cheader_filename = "poppler.h")]
361 public enum Orientation {
367 [CCode (cprefix = "POPPLER_PAGE_LAYOUT_", has_type_id = "0", cheader_filename = "poppler.h")]
368 public enum PageLayout {
377 [CCode (cprefix = "POPPLER_PAGE_MODE_", has_type_id = "0", cheader_filename = "poppler.h")]
378 public enum PageMode {
387 [CCode (cprefix = "POPPLER_PAGE_TRANSITION_", has_type_id = "0", cheader_filename = "poppler.h")]
388 public enum PageTransitionAlignment {
392 [CCode (cprefix = "POPPLER_PAGE_TRANSITION_", has_type_id = "0", cheader_filename = "poppler.h")]
393 public enum PageTransitionDirection {
397 [CCode (cprefix = "POPPLER_PAGE_TRANSITION_", has_type_id = "0", cheader_filename = "poppler.h")]
398 public enum PageTransitionType {
412 [CCode (cprefix = "POPPLER_PERMISSIONS_", has_type_id = "0", cheader_filename = "poppler.h")]
414 public enum Permissions {
421 [CCode (cprefix = "POPPLER_SELECTION_", has_type_id = "0", cheader_filename = "poppler.h")]
422 public enum SelectionStyle {
427 [CCode (cprefix = "POPPLER_VIEWER_PREFERENCES_", has_type_id = "0", cheader_filename = "poppler.h")]
429 public enum ViewerPreferences {
439 [CCode (cheader_filename = "poppler.h", has_target = false)]
440 public delegate bool AttachmentSaveFunc (string buf, size_t count, void* data, GLib.Error error);
441 [CCode (cheader_filename = "poppler.h")]
442 public const int HAS_CAIRO;
443 [CCode (cheader_filename = "poppler.h")]
444 public static GLib.Quark error_quark ();
445 [CCode (cheader_filename = "poppler.h")]
446 public static Poppler.Backend get_backend ();
447 [CCode (cheader_filename = "poppler.h")]
448 public static unowned string get_version ();