Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiguel de Icaza <miguel@gnome.org>2007-07-07 20:23:16 +0400
committerMiguel de Icaza <miguel@gnome.org>2007-07-07 20:23:16 +0400
commit0ba2f86fac3ea455d5c83758f76ea07b35d9096d (patch)
tree745aee2aec6677b159719b6753876e62fb20d4ca /mcs/class/Mono.Cairo
parentda2d82e2c0563fc915d2b3645259ee6043a4fc82 (diff)
2007-07-07 Miguel de Icaza <miguel@novell.com>
* Integrate Alp's patch to rename CairoAPI NativeMethod, in accordance to 2.7.1 framework guidelines. svn path=/trunk/mcs/; revision=81559
Diffstat (limited to 'mcs/class/Mono.Cairo')
-rw-r--r--mcs/class/Mono.Cairo/ChangeLog10
-rw-r--r--mcs/class/Mono.Cairo/Mono.Cairo/Cairo.cs6
-rw-r--r--mcs/class/Mono.Cairo/Mono.Cairo/Context.cs180
-rw-r--r--mcs/class/Mono.Cairo/Mono.Cairo/DirectFBSurface.cs2
-rw-r--r--mcs/class/Mono.Cairo/Mono.Cairo/FontFace.cs2
-rw-r--r--mcs/class/Mono.Cairo/Mono.Cairo/FontOptions.cs30
-rw-r--r--mcs/class/Mono.Cairo/Mono.Cairo/GlitzSurface.cs2
-rw-r--r--mcs/class/Mono.Cairo/Mono.Cairo/Gradient.cs4
-rw-r--r--mcs/class/Mono.Cairo/Mono.Cairo/ImageSurface.cs16
-rw-r--r--mcs/class/Mono.Cairo/Mono.Cairo/LinearGradient.cs2
-rw-r--r--mcs/class/Mono.Cairo/Mono.Cairo/Matrix.cs24
-rw-r--r--mcs/class/Mono.Cairo/Mono.Cairo/PSSurface.cs10
-rw-r--r--mcs/class/Mono.Cairo/Mono.Cairo/Pattern.cs14
-rw-r--r--mcs/class/Mono.Cairo/Mono.Cairo/PdfSurface.cs4
-rw-r--r--mcs/class/Mono.Cairo/Mono.Cairo/RadialGradient.cs2
-rw-r--r--mcs/class/Mono.Cairo/Mono.Cairo/SolidPattern.cs4
-rw-r--r--mcs/class/Mono.Cairo/Mono.Cairo/Surface.cs38
-rw-r--r--mcs/class/Mono.Cairo/Mono.Cairo/SurfacePattern.cs10
-rw-r--r--mcs/class/Mono.Cairo/Mono.Cairo/SvgSurface.cs4
-rw-r--r--mcs/class/Mono.Cairo/Mono.Cairo/Win32Surface.cs2
-rw-r--r--mcs/class/Mono.Cairo/Mono.Cairo/XcbSurface.cs6
-rw-r--r--mcs/class/Mono.Cairo/Mono.Cairo/XlibSurface.cs22
22 files changed, 202 insertions, 192 deletions
diff --git a/mcs/class/Mono.Cairo/ChangeLog b/mcs/class/Mono.Cairo/ChangeLog
index e69676d7fad..bce45c20424 100644
--- a/mcs/class/Mono.Cairo/ChangeLog
+++ b/mcs/class/Mono.Cairo/ChangeLog
@@ -1,3 +1,13 @@
+2007-07-07 Miguel de Icaza <miguel@novell.com>
+
+ * Integrate Alp's patch to rename CairoAPI NativeMethod, in
+ accordance to 2.7.1 framework guidelines.
+
+ * Removed the ifdef CAIRO_1_2, the documentation already reflects
+ that things are only available on Cairo 1.2.
+
+ * Add new API calls to query Cairo for its version
+
2007-05-26 John Luke <john.luke@gmail.com>
* Mono.Cairo/Cairo.cs:
diff --git a/mcs/class/Mono.Cairo/Mono.Cairo/Cairo.cs b/mcs/class/Mono.Cairo/Mono.Cairo/Cairo.cs
index 6929db7592e..aac4777ef4f 100644
--- a/mcs/class/Mono.Cairo/Mono.Cairo/Cairo.cs
+++ b/mcs/class/Mono.Cairo/Mono.Cairo/Cairo.cs
@@ -39,19 +39,19 @@ namespace Cairo
// sort these so it is easier to find what is missing
// http://www.cairographics.org/manual/ix01.html
// FIXME: this should be static and named NativeMethods
- public static class CairoAPI
+ public static class NativeMethods
{
const string cairo = "libcairo-2.dll";
static public int Version {
get {
- return Cairo.CairoAPI.cairo_version ();
+ return Cairo.NativeMethods.cairo_version ();
}
}
static public string VersionString {
get {
- IntPtr x = Cairo.CairoAPI.cairo_version_string ();
+ IntPtr x = Cairo.NativeMethods.cairo_version_string ();
return Marshal.PtrToStringAnsi (x);
}
}
diff --git a/mcs/class/Mono.Cairo/Mono.Cairo/Context.cs b/mcs/class/Mono.Cairo/Mono.Cairo/Context.cs
index d48ddbd6e24..4cf460c48ce 100644
--- a/mcs/class/Mono.Cairo/Mono.Cairo/Context.cs
+++ b/mcs/class/Mono.Cairo/Mono.Cairo/Context.cs
@@ -181,7 +181,7 @@ namespace Cairo {
public Context (Surface surface)
{
- state = CairoAPI.cairo_create (surface.Handle);
+ state = NativeMethods.cairo_create (surface.Handle);
}
public Context (IntPtr state)
@@ -211,28 +211,28 @@ namespace Cairo {
return;
//Console.WriteLine ("Destroying");
- CairoAPI.cairo_destroy (state);
+ NativeMethods.cairo_destroy (state);
state = IntPtr.Zero;
}
public void Save ()
{
- CairoAPI.cairo_save (state);
+ NativeMethods.cairo_save (state);
}
public void Restore ()
{
- CairoAPI.cairo_restore (state);
+ NativeMethods.cairo_restore (state);
}
public Antialias Antialias {
- get { return CairoAPI.cairo_get_antialias (state); }
- set { CairoAPI.cairo_set_antialias (state, value); }
+ get { return NativeMethods.cairo_get_antialias (state); }
+ set { NativeMethods.cairo_set_antialias (state, value); }
}
public Cairo.Status Status {
get {
- return CairoAPI.cairo_status (state);
+ return NativeMethods.cairo_status (state);
}
}
@@ -244,18 +244,18 @@ namespace Cairo {
public Cairo.Operator Operator {
set {
- CairoAPI.cairo_set_operator (state, value);
+ NativeMethods.cairo_set_operator (state, value);
}
get {
- return CairoAPI.cairo_get_operator (state);
+ return NativeMethods.cairo_get_operator (state);
}
}
//FIXME: obsolete this property
public Cairo.Color Color {
set {
- CairoAPI.cairo_set_source_rgba (state, value.R,
+ NativeMethods.cairo_set_source_rgba (state, value.R,
value.G, value.B,
value.A);
}
@@ -269,103 +269,103 @@ namespace Cairo {
}
public double Tolerance {
- get { return CairoAPI.cairo_get_tolerance (state); }
+ get { return NativeMethods.cairo_get_tolerance (state); }
set {
- CairoAPI.cairo_set_tolerance (state, value);
+ NativeMethods.cairo_set_tolerance (state, value);
}
}
public Cairo.FillRule FillRule {
set {
- CairoAPI.cairo_set_fill_rule (state, value);
+ NativeMethods.cairo_set_fill_rule (state, value);
}
get {
- return CairoAPI.cairo_get_fill_rule (state);
+ return NativeMethods.cairo_get_fill_rule (state);
}
}
public double LineWidth {
set {
- CairoAPI.cairo_set_line_width (state, value);
+ NativeMethods.cairo_set_line_width (state, value);
}
get {
- return CairoAPI.cairo_get_line_width (state);
+ return NativeMethods.cairo_get_line_width (state);
}
}
public Cairo.LineCap LineCap {
set {
- CairoAPI.cairo_set_line_cap (state, value);
+ NativeMethods.cairo_set_line_cap (state, value);
}
get {
- return CairoAPI.cairo_get_line_cap (state);
+ return NativeMethods.cairo_get_line_cap (state);
}
}
public Cairo.LineJoin LineJoin {
set {
- CairoAPI.cairo_set_line_join (state, value);
+ NativeMethods.cairo_set_line_join (state, value);
}
get {
- return CairoAPI.cairo_get_line_join (state);
+ return NativeMethods.cairo_get_line_join (state);
}
}
public void SetDash (double [] dashes, double offset)
{
- CairoAPI.cairo_set_dash (state, dashes, dashes.Length, offset);
+ NativeMethods.cairo_set_dash (state, dashes, dashes.Length, offset);
}
public Pattern Pattern {
set {
- CairoAPI.cairo_set_source (state, value.Pointer);
+ NativeMethods.cairo_set_source (state, value.Pointer);
}
get {
- return new Pattern (CairoAPI.cairo_get_source (state));
+ return new Pattern (NativeMethods.cairo_get_source (state));
}
}
public Pattern Source {
set {
- CairoAPI.cairo_set_source (state, value.Pointer);
+ NativeMethods.cairo_set_source (state, value.Pointer);
}
get {
- return new Pattern (CairoAPI.cairo_get_source (state));
+ return new Pattern (NativeMethods.cairo_get_source (state));
}
}
public double MiterLimit {
set {
- CairoAPI.cairo_set_miter_limit (state, value);
+ NativeMethods.cairo_set_miter_limit (state, value);
}
get {
- return CairoAPI.cairo_get_miter_limit (state);
+ return NativeMethods.cairo_get_miter_limit (state);
}
}
public PointD CurrentPoint {
get {
double x, y;
- CairoAPI.cairo_get_current_point (state, out x, out y);
+ NativeMethods.cairo_get_current_point (state, out x, out y);
return new PointD (x, y);
}
}
public Cairo.Surface Target {
set {
- state = CairoAPI.cairo_create (value.Handle);
+ state = NativeMethods.cairo_create (value.Handle);
}
get {
return Cairo.Surface.LookupExternalSurface (
- CairoAPI.cairo_get_target (state));
+ NativeMethods.cairo_get_target (state));
}
}
@@ -384,24 +384,24 @@ namespace Cairo {
//[Obsolete ("Use SetSource method (with double parameters)")]
public void SetSourceSurface (Surface source, int x, int y)
{
- CairoAPI.cairo_set_source_surface (state, source.Handle, x, y);
+ NativeMethods.cairo_set_source_surface (state, source.Handle, x, y);
}
public void SetSource (Surface source, double x, double y)
{
- CairoAPI.cairo_set_source_surface (state, source.Handle, x, y);
+ NativeMethods.cairo_set_source_surface (state, source.Handle, x, y);
}
#region Path methods
public void NewPath ()
{
- CairoAPI.cairo_new_path (state);
+ NativeMethods.cairo_new_path (state);
}
public void NewSubPath ()
{
- CairoAPI.cairo_new_sub_path (state);
+ NativeMethods.cairo_new_sub_path (state);
}
public void MoveTo (PointD p)
@@ -411,7 +411,7 @@ namespace Cairo {
public void MoveTo (double x, double y)
{
- CairoAPI.cairo_move_to (state, x, y);
+ NativeMethods.cairo_move_to (state, x, y);
}
public void LineTo (PointD p)
@@ -421,7 +421,7 @@ namespace Cairo {
public void LineTo (double x, double y)
{
- CairoAPI.cairo_line_to (state, x, y);
+ NativeMethods.cairo_line_to (state, x, y);
}
public void CurveTo (PointD p1, PointD p2, PointD p3)
@@ -431,7 +431,7 @@ namespace Cairo {
public void CurveTo (double x1, double y1, double x2, double y2, double x3, double y3)
{
- CairoAPI.cairo_curve_to (state, x1, y1, x2, y2, x3, y3);
+ NativeMethods.cairo_curve_to (state, x1, y1, x2, y2, x3, y3);
}
public void RelMoveTo (Distance d)
@@ -441,7 +441,7 @@ namespace Cairo {
public void RelMoveTo (double dx, double dy)
{
- CairoAPI.cairo_rel_move_to (state, dx, dy);
+ NativeMethods.cairo_rel_move_to (state, dx, dy);
}
public void RelLineTo (Distance d)
@@ -451,7 +451,7 @@ namespace Cairo {
public void RelLineTo (double dx, double dy)
{
- CairoAPI.cairo_rel_line_to (state, dx, dy);
+ NativeMethods.cairo_rel_line_to (state, dx, dy);
}
public void RelCurveTo (Distance d1, Distance d2, Distance d3)
@@ -461,17 +461,17 @@ namespace Cairo {
public void RelCurveTo (double dx1, double dy1, double dx2, double dy2, double dx3, double dy3)
{
- CairoAPI.cairo_rel_curve_to (state, dx1, dy1, dx2, dy2, dx3, dy3);
+ NativeMethods.cairo_rel_curve_to (state, dx1, dy1, dx2, dy2, dx3, dy3);
}
public void Arc (double xc, double yc, double radius, double angle1, double angle2)
{
- CairoAPI.cairo_arc (state, xc, yc, radius, angle1, angle2);
+ NativeMethods.cairo_arc (state, xc, yc, radius, angle1, angle2);
}
public void ArcNegative (double xc, double yc, double radius, double angle1, double angle2)
{
- CairoAPI.cairo_arc_negative (state, xc, yc, radius, angle1, angle2);
+ NativeMethods.cairo_arc_negative (state, xc, yc, radius, angle1, angle2);
}
public void Rectangle (Rectangle rectangle)
@@ -486,101 +486,101 @@ namespace Cairo {
public void Rectangle (double x, double y, double width, double height)
{
- CairoAPI.cairo_rectangle (state, x, y, width, height);
+ NativeMethods.cairo_rectangle (state, x, y, width, height);
}
public void ClosePath ()
{
- CairoAPI.cairo_close_path (state);
+ NativeMethods.cairo_close_path (state);
}
#endregion
#region Painting Methods
public void Paint ()
{
- CairoAPI.cairo_paint (state);
+ NativeMethods.cairo_paint (state);
}
public void PaintWithAlpha (double alpha)
{
- CairoAPI.cairo_paint_with_alpha (state, alpha);
+ NativeMethods.cairo_paint_with_alpha (state, alpha);
}
public void Mask (Pattern pattern)
{
- CairoAPI.cairo_mask (state, pattern.Pointer);
+ NativeMethods.cairo_mask (state, pattern.Pointer);
}
public void MaskSurface (Surface surface, double x, double y)
{
- CairoAPI.cairo_mask_surface (state, surface.Handle, x, y);
+ NativeMethods.cairo_mask_surface (state, surface.Handle, x, y);
}
public void Stroke ()
{
- CairoAPI.cairo_stroke (state);
+ NativeMethods.cairo_stroke (state);
}
public void StrokePreserve ()
{
- CairoAPI.cairo_stroke_preserve (state);
+ NativeMethods.cairo_stroke_preserve (state);
}
public Rectangle StrokeExtents ()
{
double x1, y1, x2, y2;
- CairoAPI.cairo_stroke_extents (state, out x1, out y1, out x2, out y2);
+ NativeMethods.cairo_stroke_extents (state, out x1, out y1, out x2, out y2);
return new Rectangle (x1, y1, x2, y2);
}
public void Fill ()
{
- CairoAPI.cairo_fill (state);
+ NativeMethods.cairo_fill (state);
}
public Rectangle FillExtents ()
{
double x1, y1, x2, y2;
- CairoAPI.cairo_fill_extents (state, out x1, out y1, out x2, out y2);
+ NativeMethods.cairo_fill_extents (state, out x1, out y1, out x2, out y2);
return new Rectangle (x1, y1, x2, y2);
}
public void FillPreserve ()
{
- CairoAPI.cairo_fill_preserve (state);
+ NativeMethods.cairo_fill_preserve (state);
}
#endregion
public void Clip ()
{
- CairoAPI.cairo_clip (state);
+ NativeMethods.cairo_clip (state);
}
public void ClipPreserve ()
{
- CairoAPI.cairo_clip_preserve (state);
+ NativeMethods.cairo_clip_preserve (state);
}
public void ResetClip ()
{
- CairoAPI.cairo_reset_clip (state);
+ NativeMethods.cairo_reset_clip (state);
}
public bool InStroke (double x, double y)
{
- return CairoAPI.cairo_in_stroke (state, x, y);
+ return NativeMethods.cairo_in_stroke (state, x, y);
}
public bool InFill (double x, double y)
{
- return CairoAPI.cairo_in_fill (state, x, y);
+ return NativeMethods.cairo_in_fill (state, x, y);
}
public Pattern PopGroup ()
{
- IntPtr pattern = CairoAPI.cairo_pop_group (state);
- PatternType pt = CairoAPI.cairo_pattern_get_type (pattern);
+ IntPtr pattern = NativeMethods.cairo_pop_group (state);
+ PatternType pt = NativeMethods.cairo_pattern_get_type (pattern);
switch (pt) {
case PatternType.Solid:
return new SolidPattern (pattern);
@@ -597,83 +597,83 @@ namespace Cairo {
public void PopGroupToSource ()
{
- CairoAPI.cairo_pop_group_to_source (state);
+ NativeMethods.cairo_pop_group_to_source (state);
}
public void PushGroup ()
{
- CairoAPI.cairo_push_group (state);
+ NativeMethods.cairo_push_group (state);
}
public void PushGroup (Content content)
{
- CairoAPI.cairo_push_group_with_content (state, content);
+ NativeMethods.cairo_push_group_with_content (state, content);
}
public Surface GroupTarget {
get {
- IntPtr surface = CairoAPI.cairo_get_group_target (state);
+ IntPtr surface = NativeMethods.cairo_get_group_target (state);
return Surface.LookupSurface (surface);
}
}
public void Rotate (double angle)
{
- CairoAPI.cairo_rotate (state, angle);
+ NativeMethods.cairo_rotate (state, angle);
}
public void Scale (double sx, double sy)
{
- CairoAPI.cairo_scale (state, sx, sy);
+ NativeMethods.cairo_scale (state, sx, sy);
}
public void Translate (double tx, double ty)
{
- CairoAPI.cairo_translate (state, tx, ty);
+ NativeMethods.cairo_translate (state, tx, ty);
}
public void Transform (Matrix m)
{
- CairoAPI.cairo_transform (state, m);
+ NativeMethods.cairo_transform (state, m);
}
//FIXME: obsolete these methods
public void TransformPoint (ref double x, ref double y)
{
- CairoAPI.cairo_user_to_device (state, ref x, ref y);
+ NativeMethods.cairo_user_to_device (state, ref x, ref y);
}
public void TransformDistance (ref double dx, ref double dy)
{
- CairoAPI.cairo_user_to_device_distance (state, ref dx, ref dy);
+ NativeMethods.cairo_user_to_device_distance (state, ref dx, ref dy);
}
public void InverseTransformPoint (ref double x, ref double y)
{
- CairoAPI.cairo_device_to_user (state, ref x, ref y);
+ NativeMethods.cairo_device_to_user (state, ref x, ref y);
}
public void InverseTransformDistance (ref double dx, ref double dy)
{
- CairoAPI.cairo_device_to_user_distance (state, ref dx, ref dy);
+ NativeMethods.cairo_device_to_user_distance (state, ref dx, ref dy);
}
public Cairo.Matrix Matrix {
set {
- CairoAPI.cairo_set_matrix (state, value);
+ NativeMethods.cairo_set_matrix (state, value);
}
get {
Matrix m = new Matrix();
- CairoAPI.cairo_get_matrix (state, m);
+ NativeMethods.cairo_get_matrix (state, m);
return m;
}
}
public void SetFontSize (double scale)
{
- CairoAPI.cairo_set_font_size (state, scale);
+ NativeMethods.cairo_set_font_size (state, scale);
}
[Obsolete ("Use SetFontSize() instead.")]
@@ -690,19 +690,19 @@ namespace Cairo {
public Matrix FontMatrix {
get {
Matrix m;
- CairoAPI.cairo_get_font_matrix (state, out m);
+ NativeMethods.cairo_get_font_matrix (state, out m);
return m;
}
- set { CairoAPI.cairo_set_font_matrix (state, value); }
+ set { NativeMethods.cairo_set_font_matrix (state, value); }
}
public FontOptions FontOptions {
get {
FontOptions options = new FontOptions ();
- CairoAPI.cairo_get_font_options (state, options.Handle);
+ NativeMethods.cairo_get_font_options (state, options.Handle);
return options;
}
- set { CairoAPI.cairo_set_font_options (state, value.Handle); }
+ set { NativeMethods.cairo_set_font_options (state, value.Handle); }
}
[StructLayout(LayoutKind.Sequential)]
@@ -747,7 +747,7 @@ namespace Cairo {
ptr = FromGlyphToUnManagedMemory (glyphs);
- CairoAPI.cairo_show_glyphs (state, ptr, glyphs.Length);
+ NativeMethods.cairo_show_glyphs (state, ptr, glyphs.Length);
Marshal.FreeHGlobal (ptr);
}
@@ -770,7 +770,7 @@ namespace Cairo {
ptr = FromGlyphToUnManagedMemory (glyphs);
- CairoAPI.cairo_glyph_path (state, ptr, glyphs.Length);
+ NativeMethods.cairo_glyph_path (state, ptr, glyphs.Length);
Marshal.FreeHGlobal (ptr);
@@ -780,14 +780,14 @@ namespace Cairo {
get {
FontExtents f_extents = new FontExtents();
- CairoAPI.cairo_font_extents (state, ref f_extents);
+ NativeMethods.cairo_font_extents (state, ref f_extents);
return f_extents;
}
}
public void CopyPage ()
{
- CairoAPI.cairo_copy_page (state);
+ NativeMethods.cairo_copy_page (state);
}
[Obsolete ("Use SelectFontFace() instead.")]
@@ -798,28 +798,28 @@ namespace Cairo {
public void SelectFontFace (string family, FontSlant slant, FontWeight weight)
{
- CairoAPI.cairo_select_font_face (state, family, slant, weight);
+ NativeMethods.cairo_select_font_face (state, family, slant, weight);
}
public void ShowPage ()
{
- CairoAPI.cairo_show_page (state);
+ NativeMethods.cairo_show_page (state);
}
public void ShowText (string str)
{
- CairoAPI.cairo_show_text (state, str);
+ NativeMethods.cairo_show_text (state, str);
}
public void TextPath (string str)
{
- CairoAPI.cairo_text_path (state, str);
+ NativeMethods.cairo_text_path (state, str);
}
public TextExtents TextExtents (string utf8)
{
TextExtents extents;
- CairoAPI.cairo_text_extents (state, utf8, out extents);
+ NativeMethods.cairo_text_extents (state, utf8, out extents);
return extents;
}
@@ -829,7 +829,7 @@ namespace Cairo {
TextExtents extents;
- CairoAPI.cairo_glyph_extents (state, ptr, glyphs.Length, out extents);
+ NativeMethods.cairo_glyph_extents (state, ptr, glyphs.Length, out extents);
Marshal.FreeHGlobal (ptr);
diff --git a/mcs/class/Mono.Cairo/Mono.Cairo/DirectFBSurface.cs b/mcs/class/Mono.Cairo/Mono.Cairo/DirectFBSurface.cs
index ce3756945cf..a2ae169e732 100644
--- a/mcs/class/Mono.Cairo/Mono.Cairo/DirectFBSurface.cs
+++ b/mcs/class/Mono.Cairo/Mono.Cairo/DirectFBSurface.cs
@@ -37,7 +37,7 @@ namespace Cairo {
public DirectFBSurface (IntPtr dfb, IntPtr dfb_surface)
{
- surface = CairoAPI.cairo_directfb_surface_create (dfb, dfb_surface);
+ surface = NativeMethods.cairo_directfb_surface_create (dfb, dfb_surface);
lock (surfaces.SyncRoot) {
surfaces [surface] = this;
}
diff --git a/mcs/class/Mono.Cairo/Mono.Cairo/FontFace.cs b/mcs/class/Mono.Cairo/Mono.Cairo/FontFace.cs
index 585f6be42dd..751b7565d7f 100644
--- a/mcs/class/Mono.Cairo/Mono.Cairo/FontFace.cs
+++ b/mcs/class/Mono.Cairo/Mono.Cairo/FontFace.cs
@@ -17,7 +17,7 @@ namespace Cairo
public FontType FontType {
get {
- return CairoAPI.cairo_font_face_get_type (handle);
+ return NativeMethods.cairo_font_face_get_type (handle);
}
}
}
diff --git a/mcs/class/Mono.Cairo/Mono.Cairo/FontOptions.cs b/mcs/class/Mono.Cairo/Mono.Cairo/FontOptions.cs
index 38ae094c747..476910f1b1d 100644
--- a/mcs/class/Mono.Cairo/Mono.Cairo/FontOptions.cs
+++ b/mcs/class/Mono.Cairo/Mono.Cairo/FontOptions.cs
@@ -37,7 +37,7 @@ namespace Cairo
public FontOptions ()
{
- handle = CairoAPI.cairo_font_options_create ();
+ handle = NativeMethods.cairo_font_options_create ();
}
~FontOptions ()
@@ -52,12 +52,12 @@ namespace Cairo
public FontOptions Copy ()
{
- return new FontOptions (CairoAPI.cairo_font_options_copy (handle));
+ return new FontOptions (NativeMethods.cairo_font_options_copy (handle));
}
public void Destroy ()
{
- CairoAPI.cairo_font_options_destroy (handle);
+ NativeMethods.cairo_font_options_destroy (handle);
}
public void Dispose ()
@@ -92,7 +92,7 @@ namespace Cairo
bool Equals (FontOptions options)
{
- return options != null && CairoAPI.cairo_font_options_equal (Handle, options.Handle);
+ return options != null && NativeMethods.cairo_font_options_equal (Handle, options.Handle);
}
public IntPtr Handle {
@@ -101,38 +101,38 @@ namespace Cairo
public override int GetHashCode ()
{
- return (int) CairoAPI.cairo_font_options_hash (handle);
+ return (int) NativeMethods.cairo_font_options_hash (handle);
}
public void Merge (FontOptions other)
{
if (other == null)
throw new ArgumentNullException ("other");
- CairoAPI.cairo_font_options_merge (handle, other.Handle);
+ NativeMethods.cairo_font_options_merge (handle, other.Handle);
}
public Antialias Antialias {
- get { return CairoAPI.cairo_font_options_get_antialias (handle); }
- set { CairoAPI.cairo_font_options_set_antialias (handle, value); }
+ get { return NativeMethods.cairo_font_options_get_antialias (handle); }
+ set { NativeMethods.cairo_font_options_set_antialias (handle, value); }
}
public HintMetrics HintMetrics {
- get { return CairoAPI.cairo_font_options_get_hint_metrics (handle);}
- set { CairoAPI.cairo_font_options_set_hint_metrics (handle, value); }
+ get { return NativeMethods.cairo_font_options_get_hint_metrics (handle);}
+ set { NativeMethods.cairo_font_options_set_hint_metrics (handle, value); }
}
public HintStyle HintStyle {
- get { return CairoAPI.cairo_font_options_get_hint_style (handle);}
- set { CairoAPI.cairo_font_options_set_hint_style (handle, value); }
+ get { return NativeMethods.cairo_font_options_get_hint_style (handle);}
+ set { NativeMethods.cairo_font_options_set_hint_style (handle, value); }
}
public Status Status {
- get { return CairoAPI.cairo_font_options_status (handle); }
+ get { return NativeMethods.cairo_font_options_status (handle); }
}
public SubpixelOrder SubpixelOrder {
- get { return CairoAPI.cairo_font_options_get_subpixel_order (handle);}
- set { CairoAPI.cairo_font_options_set_subpixel_order (handle, value); }
+ get { return NativeMethods.cairo_font_options_get_subpixel_order (handle);}
+ set { NativeMethods.cairo_font_options_set_subpixel_order (handle, value); }
}
}
}
diff --git a/mcs/class/Mono.Cairo/Mono.Cairo/GlitzSurface.cs b/mcs/class/Mono.Cairo/Mono.Cairo/GlitzSurface.cs
index 387edcf124c..a8cd700a532 100644
--- a/mcs/class/Mono.Cairo/Mono.Cairo/GlitzSurface.cs
+++ b/mcs/class/Mono.Cairo/Mono.Cairo/GlitzSurface.cs
@@ -37,7 +37,7 @@ namespace Cairo {
public GlitzSurface (IntPtr glitz_surface)
{
- surface = CairoAPI.cairo_glitz_surface_create (glitz_surface);
+ surface = NativeMethods.cairo_glitz_surface_create (glitz_surface);
lock (surfaces.SyncRoot) {
surfaces [surface] = this;
}
diff --git a/mcs/class/Mono.Cairo/Mono.Cairo/Gradient.cs b/mcs/class/Mono.Cairo/Mono.Cairo/Gradient.cs
index 2d88a0440c4..0f7da3947bd 100644
--- a/mcs/class/Mono.Cairo/Mono.Cairo/Gradient.cs
+++ b/mcs/class/Mono.Cairo/Mono.Cairo/Gradient.cs
@@ -44,13 +44,13 @@ namespace Cairo {
public Status AddColorStop (double offset, Cairo.Color c)
{
- CairoAPI.cairo_pattern_add_color_stop_rgba (pattern, offset, c.R, c.G, c.B, c.A);
+ NativeMethods.cairo_pattern_add_color_stop_rgba (pattern, offset, c.R, c.G, c.B, c.A);
return Status;
}
public Status AddColorStopRgb (double offset, Cairo.Color c)
{
- CairoAPI.cairo_pattern_add_color_stop_rgb (pattern, offset, c.R, c.G, c.B);
+ NativeMethods.cairo_pattern_add_color_stop_rgb (pattern, offset, c.R, c.G, c.B);
return Status;
}
}
diff --git a/mcs/class/Mono.Cairo/Mono.Cairo/ImageSurface.cs b/mcs/class/Mono.Cairo/Mono.Cairo/ImageSurface.cs
index cc33d86d0ee..2baa434d7dd 100644
--- a/mcs/class/Mono.Cairo/Mono.Cairo/ImageSurface.cs
+++ b/mcs/class/Mono.Cairo/Mono.Cairo/ImageSurface.cs
@@ -45,7 +45,7 @@ namespace Cairo {
public ImageSurface (Format format, int width, int height)
{
- surface = CairoAPI.cairo_image_surface_create (format, width, height);
+ surface = NativeMethods.cairo_image_surface_create (format, width, height);
lock (surfaces.SyncRoot){
surfaces [surface] = this;
}
@@ -53,7 +53,7 @@ namespace Cairo {
public ImageSurface (ref byte[] data, Cairo.Format format, int width, int height, int stride)
{
- surface = CairoAPI.cairo_image_surface_create_for_data (data, format, width, height, stride);
+ surface = NativeMethods.cairo_image_surface_create_for_data (data, format, width, height, stride);
lock (surfaces.SyncRoot){
surfaces [surface] = this;
}
@@ -61,23 +61,23 @@ namespace Cairo {
public ImageSurface (string filename)
{
- surface = CairoAPI.cairo_image_surface_create_from_png (filename);
+ surface = NativeMethods.cairo_image_surface_create_from_png (filename);
lock (surfaces.SyncRoot){
surfaces [surface] = this;
}
}
public int Width {
- get { return CairoAPI.cairo_image_surface_get_width (surface); }
+ get { return NativeMethods.cairo_image_surface_get_width (surface); }
}
public int Height {
- get { return CairoAPI.cairo_image_surface_get_height (surface); }
+ get { return NativeMethods.cairo_image_surface_get_height (surface); }
}
public byte[] Data {
get {
- IntPtr ptr = CairoAPI.cairo_image_surface_get_data (surface);
+ IntPtr ptr = NativeMethods.cairo_image_surface_get_data (surface);
int length = Height * Stride;
byte[] data = new byte[length];
Marshal.Copy (ptr, data, 0, length);
@@ -86,11 +86,11 @@ namespace Cairo {
}
public Format Format {
- get { return CairoAPI.cairo_image_surface_get_format (surface); }
+ get { return NativeMethods.cairo_image_surface_get_format (surface); }
}
public int Stride {
- get { return CairoAPI.cairo_image_surface_get_stride (surface); }
+ get { return NativeMethods.cairo_image_surface_get_stride (surface); }
}
}
}
diff --git a/mcs/class/Mono.Cairo/Mono.Cairo/LinearGradient.cs b/mcs/class/Mono.Cairo/Mono.Cairo/LinearGradient.cs
index bb6f87681ad..d7825ee948f 100644
--- a/mcs/class/Mono.Cairo/Mono.Cairo/LinearGradient.cs
+++ b/mcs/class/Mono.Cairo/Mono.Cairo/LinearGradient.cs
@@ -39,7 +39,7 @@ namespace Cairo {
public LinearGradient (double x0, double y0, double x1, double y1)
{
- pattern = CairoAPI.cairo_pattern_create_linear (x0, y0, x1, y1);
+ pattern = NativeMethods.cairo_pattern_create_linear (x0, y0, x1, y1);
}
}
}
diff --git a/mcs/class/Mono.Cairo/Mono.Cairo/Matrix.cs b/mcs/class/Mono.Cairo/Mono.Cairo/Matrix.cs
index d19b6494cce..79e1f359e1d 100644
--- a/mcs/class/Mono.Cairo/Mono.Cairo/Matrix.cs
+++ b/mcs/class/Mono.Cairo/Mono.Cairo/Matrix.cs
@@ -66,7 +66,7 @@ namespace Cairo {
public void InitIdentity ()
{
// this.Init(1,0,0,1,0,0);
- CairoAPI.cairo_matrix_init_identity (this);
+ NativeMethods.cairo_matrix_init_identity (this);
}
public void Init (double xx, double yx, double xy, double yy,
@@ -79,23 +79,23 @@ namespace Cairo {
public void InitTranslate (double tx, double ty)
{
//this.Init (1, 0, 0, 1, tx, ty);
- CairoAPI.cairo_matrix_init_translate (this, tx, ty);
+ NativeMethods.cairo_matrix_init_translate (this, tx, ty);
}
public void Translate (double tx, double ty)
{
- CairoAPI.cairo_matrix_translate (this, tx, ty);
+ NativeMethods.cairo_matrix_translate (this, tx, ty);
}
public void InitScale (double sx, double sy)
{
//this.Init (sx, 0, 0, sy, 0, 0);
- CairoAPI.cairo_matrix_init_scale (this, sx, sy);
+ NativeMethods.cairo_matrix_init_scale (this, sx, sy);
}
public void Scale (double sx, double sy)
{
- CairoAPI.cairo_matrix_scale (this, sx, sy);
+ NativeMethods.cairo_matrix_scale (this, sx, sy);
}
public void InitRotate (double radians)
@@ -106,40 +106,40 @@ namespace Cairo {
c = Math.Cos (radians);
this.Init (c, s, -s, c, 0, 0);
*/
- CairoAPI.cairo_matrix_init_rotate (this, radians);
+ NativeMethods.cairo_matrix_init_rotate (this, radians);
}
public void Rotate (double radians)
{
- CairoAPI.cairo_matrix_rotate (this, radians);
+ NativeMethods.cairo_matrix_rotate (this, radians);
}
public Cairo.Status Invert ()
{
- return CairoAPI.cairo_matrix_invert (this);
+ return NativeMethods.cairo_matrix_invert (this);
}
public void Multiply (Matrix b)
{
Matrix a = (Matrix) this.Clone ();
- CairoAPI.cairo_matrix_multiply (this, a, b);
+ NativeMethods.cairo_matrix_multiply (this, a, b);
}
public static Matrix Multiply (Matrix a, Matrix b) {
Matrix result = new Matrix ();
- CairoAPI.cairo_matrix_multiply (result, a, b);
+ NativeMethods.cairo_matrix_multiply (result, a, b);
return result;
}
public void TransformDistance (ref double dx, ref double dy)
{
- CairoAPI.cairo_matrix_transform_distance (this, ref dx, ref dy);
+ NativeMethods.cairo_matrix_transform_distance (this, ref dx, ref dy);
}
public void TransformPoint (ref double x, ref double y)
{
- CairoAPI.cairo_matrix_transform_point (this, ref x, ref y);
+ NativeMethods.cairo_matrix_transform_point (this, ref x, ref y);
}
public override String ToString ()
diff --git a/mcs/class/Mono.Cairo/Mono.Cairo/PSSurface.cs b/mcs/class/Mono.Cairo/Mono.Cairo/PSSurface.cs
index 156fe087f8e..1304be6230a 100644
--- a/mcs/class/Mono.Cairo/Mono.Cairo/PSSurface.cs
+++ b/mcs/class/Mono.Cairo/Mono.Cairo/PSSurface.cs
@@ -38,7 +38,7 @@ namespace Cairo {
public PSSurface (string filename, double width, double height)
{
- surface = CairoAPI.cairo_ps_surface_create (filename, width, height);
+ surface = NativeMethods.cairo_ps_surface_create (filename, width, height);
lock (surfaces.SyncRoot){
surfaces [surface] = this;
}
@@ -46,22 +46,22 @@ namespace Cairo {
public void BeginPageSetup ()
{
- CairoAPI.cairo_ps_surface_begin_page_setup (surface);
+ NativeMethods.cairo_ps_surface_begin_page_setup (surface);
}
public void BeginSetup ()
{
- CairoAPI.cairo_ps_surface_begin_setup (surface);
+ NativeMethods.cairo_ps_surface_begin_setup (surface);
}
public void DscComment (string comment)
{
- CairoAPI.cairo_ps_surface_dsc_comment (surface, comment);
+ NativeMethods.cairo_ps_surface_dsc_comment (surface, comment);
}
public void SetSize (double width, double height)
{
- CairoAPI.cairo_ps_surface_set_size (surface, width, height);
+ NativeMethods.cairo_ps_surface_set_size (surface, width, height);
}
}
}
diff --git a/mcs/class/Mono.Cairo/Mono.Cairo/Pattern.cs b/mcs/class/Mono.Cairo/Mono.Cairo/Pattern.cs
index 96f6b12c7e4..4abab82b7bf 100644
--- a/mcs/class/Mono.Cairo/Mono.Cairo/Pattern.cs
+++ b/mcs/class/Mono.Cairo/Mono.Cairo/Pattern.cs
@@ -47,32 +47,32 @@ namespace Cairo {
[Obsolete ("Use the SurfacePattern constructor")]
public Pattern (Surface surface)
{
- pattern = CairoAPI.cairo_pattern_create_for_surface (surface.Handle);
+ pattern = NativeMethods.cairo_pattern_create_for_surface (surface.Handle);
}
protected void Reference ()
{
- CairoAPI.cairo_pattern_reference (pattern);
+ NativeMethods.cairo_pattern_reference (pattern);
}
public void Destroy ()
{
- CairoAPI.cairo_pattern_destroy (pattern);
+ NativeMethods.cairo_pattern_destroy (pattern);
}
public Status Status
{
- get { return CairoAPI.cairo_pattern_status (pattern); }
+ get { return NativeMethods.cairo_pattern_status (pattern); }
}
public Matrix Matrix {
set {
- CairoAPI.cairo_pattern_set_matrix (pattern, value);
+ NativeMethods.cairo_pattern_set_matrix (pattern, value);
}
get {
Matrix m = new Matrix ();
- CairoAPI.cairo_pattern_get_matrix (pattern, m);
+ NativeMethods.cairo_pattern_get_matrix (pattern, m);
return m;
}
}
@@ -82,7 +82,7 @@ namespace Cairo {
}
public PatternType PatternType {
- get { return CairoAPI.cairo_pattern_get_type (pattern); }
+ get { return NativeMethods.cairo_pattern_get_type (pattern); }
}
}
}
diff --git a/mcs/class/Mono.Cairo/Mono.Cairo/PdfSurface.cs b/mcs/class/Mono.Cairo/Mono.Cairo/PdfSurface.cs
index 0e5fdf88cab..f3a184bb5a7 100644
--- a/mcs/class/Mono.Cairo/Mono.Cairo/PdfSurface.cs
+++ b/mcs/class/Mono.Cairo/Mono.Cairo/PdfSurface.cs
@@ -38,7 +38,7 @@ namespace Cairo {
public PdfSurface (string filename, double width, double height)
{
- surface = CairoAPI.cairo_pdf_surface_create (filename, width, height);
+ surface = NativeMethods.cairo_pdf_surface_create (filename, width, height);
lock (surfaces.SyncRoot){
surfaces [surface] = this;
}
@@ -46,7 +46,7 @@ namespace Cairo {
public void SetSize (double width, double height)
{
- CairoAPI.cairo_pdf_surface_set_size (surface, width, height);
+ NativeMethods.cairo_pdf_surface_set_size (surface, width, height);
}
}
}
diff --git a/mcs/class/Mono.Cairo/Mono.Cairo/RadialGradient.cs b/mcs/class/Mono.Cairo/Mono.Cairo/RadialGradient.cs
index 0e892ba2a9f..df9c329057d 100644
--- a/mcs/class/Mono.Cairo/Mono.Cairo/RadialGradient.cs
+++ b/mcs/class/Mono.Cairo/Mono.Cairo/RadialGradient.cs
@@ -39,7 +39,7 @@ namespace Cairo {
public RadialGradient (double cx0, double cy0, double radius0, double cx1, double cy1, double radius1)
{
- pattern = CairoAPI.cairo_pattern_create_radial (cx0, cy0, radius0, cx1, cy1, radius1);
+ pattern = NativeMethods.cairo_pattern_create_radial (cx0, cy0, radius0, cx1, cy1, radius1);
}
}
}
diff --git a/mcs/class/Mono.Cairo/Mono.Cairo/SolidPattern.cs b/mcs/class/Mono.Cairo/Mono.Cairo/SolidPattern.cs
index b8d19b930ea..c7f93eea413 100644
--- a/mcs/class/Mono.Cairo/Mono.Cairo/SolidPattern.cs
+++ b/mcs/class/Mono.Cairo/Mono.Cairo/SolidPattern.cs
@@ -40,9 +40,9 @@ namespace Cairo {
public SolidPattern (Color color, bool solid)
{
if (solid)
- pattern = CairoAPI.cairo_pattern_create_rgb (color.R, color.G, color.B);
+ pattern = NativeMethods.cairo_pattern_create_rgb (color.R, color.G, color.B);
else
- pattern = CairoAPI.cairo_pattern_create_rgba (color.R, color.G, color.B, color.A);
+ pattern = NativeMethods.cairo_pattern_create_rgba (color.R, color.G, color.B, color.A);
}
}
}
diff --git a/mcs/class/Mono.Cairo/Mono.Cairo/Surface.cs b/mcs/class/Mono.Cairo/Mono.Cairo/Surface.cs
index e6d02cfe9f0..4762473bf21 100644
--- a/mcs/class/Mono.Cairo/Mono.Cairo/Surface.cs
+++ b/mcs/class/Mono.Cairo/Mono.Cairo/Surface.cs
@@ -54,7 +54,7 @@ namespace Cairo {
surfaces [ptr] = this;
}
if (!owns)
- CairoAPI.cairo_surface_reference (ptr);
+ NativeMethods.cairo_surface_reference (ptr);
}
static internal Surface LookupExternalSurface (IntPtr p)
@@ -70,7 +70,7 @@ namespace Cairo {
static internal Surface LookupSurface (IntPtr surface)
{
- SurfaceType st = CairoAPI.cairo_surface_get_type (surface);
+ SurfaceType st = NativeMethods.cairo_surface_get_type (surface);
switch (st) {
case SurfaceType.Image:
return new ImageSurface (surface, true);
@@ -101,7 +101,7 @@ namespace Cairo {
public static Cairo.Surface CreateForImage (
ref byte[] data, Cairo.Format format, int width, int height, int stride)
{
- IntPtr p = CairoAPI.cairo_image_surface_create_for_data (
+ IntPtr p = NativeMethods.cairo_image_surface_create_for_data (
data, format, width, height, stride);
return new Cairo.Surface (p, true);
@@ -111,7 +111,7 @@ namespace Cairo {
public static Cairo.Surface CreateForImage (
Cairo.Format format, int width, int height)
{
- IntPtr p = CairoAPI.cairo_image_surface_create (
+ IntPtr p = NativeMethods.cairo_image_surface_create (
format, width, height);
return new Cairo.Surface (p, true);
@@ -121,7 +121,7 @@ namespace Cairo {
public Cairo.Surface CreateSimilar (
Cairo.Content content, int width, int height)
{
- IntPtr p = CairoAPI.cairo_surface_create_similar (
+ IntPtr p = NativeMethods.cairo_surface_create_similar (
this.Handle, content, width, height);
return new Cairo.Surface (p, true);
@@ -135,8 +135,8 @@ namespace Cairo {
//[Obsolete ("Use Context.SetSource() followed by Context.Paint()")]
public void Show (Context gr, double x, double y)
{
- CairoAPI.cairo_set_source_surface (gr.Handle, surface, x, y);
- CairoAPI.cairo_paint (gr.Handle);
+ NativeMethods.cairo_set_source_surface (gr.Handle, surface, x, y);
+ NativeMethods.cairo_paint (gr.Handle);
}
void IDisposable.Dispose ()
@@ -153,29 +153,29 @@ namespace Cairo {
lock (surfaces.SyncRoot)
surfaces.Remove (surface);
- CairoAPI.cairo_surface_destroy (surface);
+ NativeMethods.cairo_surface_destroy (surface);
surface = (IntPtr) 0;
}
public Status Finish ()
{
- CairoAPI.cairo_surface_finish (surface);
+ NativeMethods.cairo_surface_finish (surface);
return Status;
}
public void Flush ()
{
- CairoAPI.cairo_surface_flush (surface);
+ NativeMethods.cairo_surface_flush (surface);
}
public void MarkDirty ()
{
- CairoAPI.cairo_surface_mark_dirty (Handle);
+ NativeMethods.cairo_surface_mark_dirty (Handle);
}
public void MarkDirty (Rectangle rectangle)
{
- CairoAPI.cairo_surface_mark_dirty_rectangle (Handle, (int)rectangle.X, (int)rectangle.Y, (int)rectangle.Width, (int)rectangle.Height);
+ NativeMethods.cairo_surface_mark_dirty_rectangle (Handle, (int)rectangle.X, (int)rectangle.Y, (int)rectangle.Width, (int)rectangle.Height);
}
public IntPtr Handle {
@@ -187,12 +187,12 @@ namespace Cairo {
public PointD DeviceOffset {
get {
double x, y;
- CairoAPI.cairo_surface_get_device_offset (surface, out x, out y);
+ NativeMethods.cairo_surface_get_device_offset (surface, out x, out y);
return new PointD (x, y);
}
set {
- CairoAPI.cairo_surface_set_device_offset (surface, value.X, value.Y);
+ NativeMethods.cairo_surface_set_device_offset (surface, value.X, value.Y);
}
}
@@ -203,12 +203,12 @@ namespace Cairo {
public void SetFallbackResolution (double x, double y)
{
- CairoAPI.cairo_surface_set_fallback_resolution (surface, x, y);
+ NativeMethods.cairo_surface_set_fallback_resolution (surface, x, y);
}
public void WriteToPng (string filename)
{
- CairoAPI.cairo_surface_write_to_png (surface, filename);
+ NativeMethods.cairo_surface_write_to_png (surface, filename);
}
[Obsolete ("Use Handle instead.")]
@@ -219,15 +219,15 @@ namespace Cairo {
}
public Status Status {
- get { return CairoAPI.cairo_surface_status (surface); }
+ get { return NativeMethods.cairo_surface_status (surface); }
}
public Content Content {
- get { return CairoAPI.cairo_surface_get_content (surface); }
+ get { return NativeMethods.cairo_surface_get_content (surface); }
}
public SurfaceType SurfaceType {
- get { return CairoAPI.cairo_surface_get_type (surface); }
+ get { return NativeMethods.cairo_surface_get_type (surface); }
}
}
}
diff --git a/mcs/class/Mono.Cairo/Mono.Cairo/SurfacePattern.cs b/mcs/class/Mono.Cairo/Mono.Cairo/SurfacePattern.cs
index ae9899bc1f5..f4f4298c549 100644
--- a/mcs/class/Mono.Cairo/Mono.Cairo/SurfacePattern.cs
+++ b/mcs/class/Mono.Cairo/Mono.Cairo/SurfacePattern.cs
@@ -39,17 +39,17 @@ namespace Cairo {
public SurfacePattern (Surface surface)
{
- pattern = CairoAPI.cairo_pattern_create_for_surface (surface.Handle);
+ pattern = NativeMethods.cairo_pattern_create_for_surface (surface.Handle);
}
public Extend Extend {
- set { CairoAPI.cairo_pattern_set_extend (pattern, value); }
- get { return CairoAPI.cairo_pattern_get_extend (pattern); }
+ set { NativeMethods.cairo_pattern_set_extend (pattern, value); }
+ get { return NativeMethods.cairo_pattern_get_extend (pattern); }
}
public Filter Filter {
- set { CairoAPI.cairo_pattern_set_filter (pattern, value); }
- get { return CairoAPI.cairo_pattern_get_filter (pattern); }
+ set { NativeMethods.cairo_pattern_set_filter (pattern, value); }
+ get { return NativeMethods.cairo_pattern_get_filter (pattern); }
}
}
}
diff --git a/mcs/class/Mono.Cairo/Mono.Cairo/SvgSurface.cs b/mcs/class/Mono.Cairo/Mono.Cairo/SvgSurface.cs
index 8fc6752b6ca..10da981e0ee 100644
--- a/mcs/class/Mono.Cairo/Mono.Cairo/SvgSurface.cs
+++ b/mcs/class/Mono.Cairo/Mono.Cairo/SvgSurface.cs
@@ -38,7 +38,7 @@ namespace Cairo {
public SvgSurface (string filename, double width, double height)
{
- surface = CairoAPI.cairo_svg_surface_create (filename, width, height);
+ surface = NativeMethods.cairo_svg_surface_create (filename, width, height);
lock (surfaces.SyncRoot){
surfaces [surface] = this;
}
@@ -46,7 +46,7 @@ namespace Cairo {
public void RestrictToVersion (SvgVersion version)
{
- CairoAPI.cairo_svg_surface_restrict_to_version (surface, version);
+ NativeMethods.cairo_svg_surface_restrict_to_version (surface, version);
}
}
}
diff --git a/mcs/class/Mono.Cairo/Mono.Cairo/Win32Surface.cs b/mcs/class/Mono.Cairo/Mono.Cairo/Win32Surface.cs
index 2349dd50d68..fbb22270aca 100644
--- a/mcs/class/Mono.Cairo/Mono.Cairo/Win32Surface.cs
+++ b/mcs/class/Mono.Cairo/Mono.Cairo/Win32Surface.cs
@@ -38,7 +38,7 @@ namespace Cairo {
public Win32Surface (IntPtr hdc)
{
- surface = CairoAPI.cairo_win32_surface_create (hdc);
+ surface = NativeMethods.cairo_win32_surface_create (hdc);
lock (surfaces.SyncRoot) {
surfaces [surface] = this;
}
diff --git a/mcs/class/Mono.Cairo/Mono.Cairo/XcbSurface.cs b/mcs/class/Mono.Cairo/Mono.Cairo/XcbSurface.cs
index edeb1f13826..97f5f2f6f79 100644
--- a/mcs/class/Mono.Cairo/Mono.Cairo/XcbSurface.cs
+++ b/mcs/class/Mono.Cairo/Mono.Cairo/XcbSurface.cs
@@ -37,7 +37,7 @@ namespace Cairo {
public XcbSurface (IntPtr connection, uint drawable, IntPtr visual, int width, int height)
{
- surface = CairoAPI.cairo_xcb_surface_create (connection, drawable, visual, width, height);
+ surface = NativeMethods.cairo_xcb_surface_create (connection, drawable, visual, width, height);
lock (surfaces.SyncRoot) {
surfaces [surface] = this;
}
@@ -47,13 +47,13 @@ namespace Cairo {
{
IntPtr ptr;
- ptr = CairoAPI.cairo_xcb_surface_create_for_bitmap (connection, bitmap, screen, width, height);
+ ptr = NativeMethods.cairo_xcb_surface_create_for_bitmap (connection, bitmap, screen, width, height);
return new XcbSurface (ptr, true);
}
public void SetSize (int width, int height)
{
- CairoAPI.cairo_xcb_surface_set_size (surface, width, height);
+ NativeMethods.cairo_xcb_surface_set_size (surface, width, height);
}
}
}
diff --git a/mcs/class/Mono.Cairo/Mono.Cairo/XlibSurface.cs b/mcs/class/Mono.Cairo/Mono.Cairo/XlibSurface.cs
index 14ef13c54d3..ef010feea59 100644
--- a/mcs/class/Mono.Cairo/Mono.Cairo/XlibSurface.cs
+++ b/mcs/class/Mono.Cairo/Mono.Cairo/XlibSurface.cs
@@ -40,7 +40,7 @@ namespace Cairo {
{
public XlibSurface (IntPtr display, IntPtr drawable, IntPtr visual, int width, int height)
{
- surface = CairoAPI.cairo_xlib_surface_create (display, drawable, visual, width, height);
+ surface = NativeMethods.cairo_xlib_surface_create (display, drawable, visual, width, height);
lock (surfaces.SyncRoot){
surfaces [surface] = this;
}
@@ -54,46 +54,46 @@ namespace Cairo {
{
IntPtr ptr;
- ptr = CairoAPI.cairo_xlib_surface_create_for_bitmap (display, bitmap, screen, width, height);
+ ptr = NativeMethods.cairo_xlib_surface_create_for_bitmap (display, bitmap, screen, width, height);
return new XlibSurface(ptr, true);
}
public void SetDrawable (IntPtr drawable, int width, int height)
{
- CairoAPI.cairo_xlib_surface_set_drawable (surface, drawable, width, height);
+ NativeMethods.cairo_xlib_surface_set_drawable (surface, drawable, width, height);
}
public void SetSize (int width, int height)
{
- CairoAPI.cairo_xlib_surface_set_size (surface, width, height);
+ NativeMethods.cairo_xlib_surface_set_size (surface, width, height);
}
public int Depth {
- get { return CairoAPI.cairo_xlib_surface_get_depth (surface); }
+ get { return NativeMethods.cairo_xlib_surface_get_depth (surface); }
}
public IntPtr Display {
- get { return CairoAPI.cairo_xlib_surface_get_display (surface); }
+ get { return NativeMethods.cairo_xlib_surface_get_display (surface); }
}
public IntPtr Drawable {
- get { return CairoAPI.cairo_xlib_surface_get_drawable (surface); }
+ get { return NativeMethods.cairo_xlib_surface_get_drawable (surface); }
}
public int Height {
- get { return CairoAPI.cairo_xlib_surface_get_height (surface); }
+ get { return NativeMethods.cairo_xlib_surface_get_height (surface); }
}
public IntPtr Screen {
- get { return CairoAPI.cairo_xlib_surface_get_screen (surface); }
+ get { return NativeMethods.cairo_xlib_surface_get_screen (surface); }
}
public IntPtr Visual {
- get { return CairoAPI.cairo_xlib_surface_get_visual (surface); }
+ get { return NativeMethods.cairo_xlib_surface_get_visual (surface); }
}
public int Width {
- get { return CairoAPI.cairo_xlib_surface_get_width (surface); }
+ get { return NativeMethods.cairo_xlib_surface_get_width (surface); }
}
}