More binary-bundling removal
[pdfmod:pdfmod.git] / lib / poppler-sharp / poppler-sharp / generated / Color.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         [StructLayout(LayoutKind.Sequential)]
12         public struct Color {
13
14                 public ushort Red;
15                 public ushort Green;
16                 public ushort Blue;
17
18                 public static Poppler.Color Zero = new Poppler.Color ();
19
20                 public static Poppler.Color New(IntPtr raw) {
21                         if (raw == IntPtr.Zero)
22                                 return Poppler.Color.Zero;
23                         return (Poppler.Color) Marshal.PtrToStructure (raw, typeof (Poppler.Color));
24                 }
25
26                 [DllImport("poppler-glib")]
27                 static extern IntPtr poppler_color_new();
28
29                 public static Color New()
30                 {
31                         Color result = Color.New (poppler_color_new());
32                         return result;
33                 }
34
35                 [DllImport("poppler-glib")]
36                 static extern IntPtr poppler_color_copy(IntPtr raw);
37
38                 public Poppler.Color Copy() {
39                         IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
40                         System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
41                         IntPtr raw_ret = poppler_color_copy(this_as_native);
42                         Poppler.Color ret = Poppler.Color.New (raw_ret);
43                         ReadNative (this_as_native, ref this);
44                         System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
45                         return ret;
46                 }
47
48                 [DllImport("poppler-glib")]
49                 static extern void poppler_color_free(IntPtr raw);
50
51                 public void Free() {
52                         IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
53                         System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
54                         poppler_color_free(this_as_native);
55                         ReadNative (this_as_native, ref this);
56                         System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
57                 }
58
59                 [DllImport("poppler-glib")]
60                 static extern IntPtr poppler_color_get_type();
61
62                 public static GLib.GType GType { 
63                         get {
64                                 IntPtr raw_ret = poppler_color_get_type();
65                                 GLib.GType ret = new GLib.GType(raw_ret);
66                                 return ret;
67                         }
68                 }
69
70                 static void ReadNative (IntPtr native, ref Poppler.Color target)
71                 {
72                         target = New (native);
73                 }
74
75 #endregion
76         }
77 }