More binary-bundling removal
[pdfmod:pdfmod.git] / lib / poppler-sharp / poppler-sharp / generated / Page.cs
1 // This file was generated by the Gtk# code generator.
2 // Any changes made will be lost if regenerated.
3
4 namespace Poppler {
5
6         using System;
7         using System.Collections;
8         using System.Runtime.InteropServices;
9
10 #region Autogenerated code
11         public class Page : GLib.Object {
12
13                 [Obsolete]
14                 protected Page(GLib.GType gtype) : base(gtype) {}
15                 public Page(IntPtr raw) : base(raw) {}
16
17                 protected Page() : base(IntPtr.Zero)
18                 {
19                         CreateNativeObject (new string [0], new GLib.Value [0]);
20                 }
21
22                 [DllImport("poppler-glib")]
23                 static extern IntPtr poppler_page_get_type();
24
25                 public static new GLib.GType GType { 
26                         get {
27                                 IntPtr raw_ret = poppler_page_get_type();
28                                 GLib.GType ret = new GLib.GType(raw_ret);
29                                 return ret;
30                         }
31                 }
32
33                 [DllImport("poppler-glib")]
34                 static extern void poppler_page_render_to_pixbuf(IntPtr raw, int src_x, int src_y, int src_width, int src_height, double scale, int rotation, IntPtr pixbuf);
35
36                 public void RenderToPixbuf(int src_x, int src_y, int src_width, int src_height, double scale, int rotation, Gdk.Pixbuf pixbuf) {
37                         poppler_page_render_to_pixbuf(Handle, src_x, src_y, src_width, src_height, scale, rotation, pixbuf == null ? IntPtr.Zero : pixbuf.Handle);
38                 }
39
40                 [DllImport("poppler-glib")]
41                 static extern IntPtr poppler_page_get_text(IntPtr raw, int style, IntPtr rect);
42
43                 public string GetText(Poppler.SelectionStyle style, Poppler.Rectangle rect) {
44                         IntPtr native_rect = GLib.Marshaller.StructureToPtrAlloc (rect);
45                         IntPtr raw_ret = poppler_page_get_text(Handle, (int) style, native_rect);
46                         string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
47                         rect = Poppler.Rectangle.New (native_rect);
48                         Marshal.FreeHGlobal (native_rect);
49                         return ret;
50                 }
51
52                 [DllImport("poppler-glib")]
53                 static extern void poppler_page_free_link_mapping(IntPtr list);
54
55                 public static void FreeLinkMapping(GLib.List list) {
56                         poppler_page_free_link_mapping(list == null ? IntPtr.Zero : list.Handle);
57                 }
58
59                 [DllImport("poppler-glib")]
60                 static extern void poppler_page_get_crop_box(IntPtr raw, IntPtr rect);
61
62                 public void GetCropBox(Poppler.Rectangle rect) {
63                         IntPtr native_rect = GLib.Marshaller.StructureToPtrAlloc (rect);
64                         poppler_page_get_crop_box(Handle, native_rect);
65                         rect = Poppler.Rectangle.New (native_rect);
66                         Marshal.FreeHGlobal (native_rect);
67                 }
68
69                 [DllImport("poppler-glib")]
70                 static extern IntPtr poppler_page_find_text(IntPtr raw, IntPtr text);
71
72                 public GLib.List FindText(string text) {
73                         IntPtr native_text = GLib.Marshaller.StringToPtrGStrdup (text);
74                         IntPtr raw_ret = poppler_page_find_text(Handle, native_text);
75                         GLib.List ret = new GLib.List(raw_ret);
76                         GLib.Marshaller.Free (native_text);
77                         return ret;
78                 }
79
80                 [DllImport("poppler-glib")]
81                 static extern double poppler_page_get_duration(IntPtr raw);
82
83                 public double Duration { 
84                         get {
85                                 double raw_ret = poppler_page_get_duration(Handle);
86                                 double ret = raw_ret;
87                                 return ret;
88                         }
89                 }
90
91                 [DllImport("poppler-glib")]
92                 static extern void poppler_page_render_for_printing(IntPtr raw, IntPtr cairo);
93
94                 public void RenderForPrinting(Cairo.Context cairo) {
95                         poppler_page_render_for_printing(Handle, cairo == null ? IntPtr.Zero : cairo.Handle);
96                 }
97
98                 [DllImport("poppler-glib")]
99                 static extern void poppler_page_selection_region_free(IntPtr region);
100
101                 public static void SelectionRegionFree(GLib.List region) {
102                         poppler_page_selection_region_free(region == null ? IntPtr.Zero : region.Handle);
103                 }
104
105                 [DllImport("poppler-glib")]
106                 static extern void poppler_page_render_to_pixbuf_for_printing(IntPtr raw, int src_x, int src_y, int src_width, int src_height, double scale, int rotation, IntPtr pixbuf);
107
108                 public void RenderToPixbufForPrinting(int src_x, int src_y, int src_width, int src_height, double scale, int rotation, Gdk.Pixbuf pixbuf) {
109                         poppler_page_render_to_pixbuf_for_printing(Handle, src_x, src_y, src_width, src_height, scale, rotation, pixbuf == null ? IntPtr.Zero : pixbuf.Handle);
110                 }
111
112                 [DllImport("poppler-glib")]
113                 static extern IntPtr poppler_page_get_thumbnail_pixbuf(IntPtr raw);
114
115                 public Gdk.Pixbuf ThumbnailPixbuf { 
116                         get {
117                                 IntPtr raw_ret = poppler_page_get_thumbnail_pixbuf(Handle);
118                                 Gdk.Pixbuf ret = new Gdk.Pixbuf(raw_ret);
119                                 return ret;
120                         }
121                 }
122
123                 [DllImport("poppler-glib")]
124                 static extern IntPtr poppler_page_get_form_field_mapping(IntPtr raw);
125
126                 public GLib.List FormFieldMapping { 
127                         get {
128                                 IntPtr raw_ret = poppler_page_get_form_field_mapping(Handle);
129                                 GLib.List ret = new GLib.List(raw_ret);
130                                 return ret;
131                         }
132                 }
133
134                 [DllImport("poppler-glib")]
135                 static extern int poppler_page_get_index(IntPtr raw);
136
137                 public int Index { 
138                         get {
139                                 int raw_ret = poppler_page_get_index(Handle);
140                                 int ret = raw_ret;
141                                 return ret;
142                         }
143                 }
144
145                 [DllImport("poppler-glib")]
146                 static extern IntPtr poppler_page_get_transition(IntPtr raw);
147
148                 public Poppler.PageTransition Transition { 
149                         get {
150                                 IntPtr raw_ret = poppler_page_get_transition(Handle);
151                                 Poppler.PageTransition ret = Poppler.PageTransition.New (raw_ret);
152                                 return ret;
153                         }
154                 }
155
156                 [DllImport("poppler-glib")]
157                 static extern void poppler_page_render_selection_to_pixbuf(IntPtr raw, double scale, int rotation, IntPtr pixbuf, IntPtr selection, IntPtr old_selection, int style, IntPtr glyph_color, IntPtr background_color);
158
159                 public void RenderSelectionToPixbuf(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) {
160                         IntPtr native_selection = GLib.Marshaller.StructureToPtrAlloc (selection);
161                         IntPtr native_old_selection = GLib.Marshaller.StructureToPtrAlloc (old_selection);
162                         IntPtr native_glyph_color = GLib.Marshaller.StructureToPtrAlloc (glyph_color);
163                         IntPtr native_background_color = GLib.Marshaller.StructureToPtrAlloc (background_color);
164                         poppler_page_render_selection_to_pixbuf(Handle, scale, rotation, pixbuf == null ? IntPtr.Zero : pixbuf.Handle, native_selection, native_old_selection, (int) style, native_glyph_color, native_background_color);
165                         selection = Poppler.Rectangle.New (native_selection);
166                         Marshal.FreeHGlobal (native_selection);
167                         old_selection = Poppler.Rectangle.New (native_old_selection);
168                         Marshal.FreeHGlobal (native_old_selection);
169                         glyph_color = Gdk.Color.New (native_glyph_color);
170                         Marshal.FreeHGlobal (native_glyph_color);
171                         background_color = Gdk.Color.New (native_background_color);
172                         Marshal.FreeHGlobal (native_background_color);
173                 }
174
175                 [DllImport("poppler-glib")]
176                 static extern void poppler_page_get_size(IntPtr raw, out double width, out double height);
177
178                 public void GetSize(out double width, out double height) {
179                         poppler_page_get_size(Handle, out width, out height);
180                 }
181
182                 [DllImport("poppler-glib")]
183                 static extern void poppler_page_render_to_ps(IntPtr raw, IntPtr ps_file);
184
185                 public void RenderToPs(Poppler.PSFile ps_file) {
186                         poppler_page_render_to_ps(Handle, ps_file == null ? IntPtr.Zero : ps_file.Handle);
187                 }
188
189                 [DllImport("poppler-glib")]
190                 static extern IntPtr poppler_page_get_link_mapping(IntPtr raw);
191
192                 public GLib.List LinkMapping { 
193                         get {
194                                 IntPtr raw_ret = poppler_page_get_link_mapping(Handle);
195                                 GLib.List ret = new GLib.List(raw_ret);
196                                 return ret;
197                         }
198                 }
199
200                 [DllImport("poppler-glib")]
201                 static extern IntPtr poppler_page_get_annot_mapping(IntPtr raw);
202
203                 public GLib.List AnnotMapping { 
204                         get {
205                                 IntPtr raw_ret = poppler_page_get_annot_mapping(Handle);
206                                 GLib.List ret = new GLib.List(raw_ret);
207                                 return ret;
208                         }
209                 }
210
211                 [DllImport("poppler-glib")]
212                 static extern IntPtr poppler_page_get_image_mapping(IntPtr raw);
213
214                 public GLib.List ImageMapping { 
215                         get {
216                                 IntPtr raw_ret = poppler_page_get_image_mapping(Handle);
217                                 GLib.List ret = new GLib.List(raw_ret);
218                                 return ret;
219                         }
220                 }
221
222                 [DllImport("poppler-glib")]
223                 static extern void poppler_page_free_form_field_mapping(IntPtr list);
224
225                 public static void FreeFormFieldMapping(GLib.List list) {
226                         poppler_page_free_form_field_mapping(list == null ? IntPtr.Zero : list.Handle);
227                 }
228
229                 [DllImport("poppler-glib")]
230                 static extern void poppler_page_render_selection(IntPtr raw, IntPtr cairo, IntPtr selection, IntPtr old_selection, int style, IntPtr glyph_color, IntPtr background_color);
231
232                 public void RenderSelection(Cairo.Context cairo, Poppler.Rectangle selection, Poppler.Rectangle old_selection, Poppler.SelectionStyle style, Poppler.Color glyph_color, Poppler.Color background_color) {
233                         IntPtr native_selection = GLib.Marshaller.StructureToPtrAlloc (selection);
234                         IntPtr native_old_selection = GLib.Marshaller.StructureToPtrAlloc (old_selection);
235                         IntPtr native_glyph_color = GLib.Marshaller.StructureToPtrAlloc (glyph_color);
236                         IntPtr native_background_color = GLib.Marshaller.StructureToPtrAlloc (background_color);
237                         poppler_page_render_selection(Handle, cairo == null ? IntPtr.Zero : cairo.Handle, native_selection, native_old_selection, (int) style, native_glyph_color, native_background_color);
238                         selection = Poppler.Rectangle.New (native_selection);
239                         Marshal.FreeHGlobal (native_selection);
240                         old_selection = Poppler.Rectangle.New (native_old_selection);
241                         Marshal.FreeHGlobal (native_old_selection);
242                         glyph_color = Poppler.Color.New (native_glyph_color);
243                         Marshal.FreeHGlobal (native_glyph_color);
244                         background_color = Poppler.Color.New (native_background_color);
245                         Marshal.FreeHGlobal (native_background_color);
246                 }
247
248                 [DllImport("poppler-glib")]
249                 static extern void poppler_page_free_annot_mapping(IntPtr list);
250
251                 public static void FreeAnnotMapping(GLib.List list) {
252                         poppler_page_free_annot_mapping(list == null ? IntPtr.Zero : list.Handle);
253                 }
254
255                 [DllImport("poppler-glib")]
256                 static extern void poppler_page_free_image_mapping(IntPtr list);
257
258                 public static void FreeImageMapping(GLib.List list) {
259                         poppler_page_free_image_mapping(list == null ? IntPtr.Zero : list.Handle);
260                 }
261
262                 [DllImport("poppler-glib")]
263                 static extern IntPtr poppler_page_get_selection_region(IntPtr raw, double scale, int style, IntPtr selection);
264
265                 public GLib.List GetSelectionRegion(double scale, Poppler.SelectionStyle style, Poppler.Rectangle selection) {
266                         IntPtr native_selection = GLib.Marshaller.StructureToPtrAlloc (selection);
267                         IntPtr raw_ret = poppler_page_get_selection_region(Handle, scale, (int) style, native_selection);
268                         GLib.List ret = new GLib.List(raw_ret);
269                         selection = Poppler.Rectangle.New (native_selection);
270                         Marshal.FreeHGlobal (native_selection);
271                         return ret;
272                 }
273
274                 [DllImport("poppler-glib")]
275                 static extern bool poppler_page_get_thumbnail_size(IntPtr raw, out int width, out int height);
276
277                 public bool GetThumbnailSize(out int width, out int height) {
278                         bool raw_ret = poppler_page_get_thumbnail_size(Handle, out width, out height);
279                         bool ret = raw_ret;
280                         return ret;
281                 }
282
283                 [DllImport("poppler-glib")]
284                 static extern void poppler_page_render(IntPtr raw, IntPtr cairo);
285
286                 public void Render(Cairo.Context cairo) {
287                         poppler_page_render(Handle, cairo == null ? IntPtr.Zero : cairo.Handle);
288                 }
289
290 #endregion
291         }
292 }