From e7ee99526a2f08756a27b6959604f51c4da1b7c7 Mon Sep 17 00:00:00 2001 From: Mike Kestner Date: Fri, 18 Feb 2011 21:57:39 -0600 Subject: [PATCH] Add Pattern symbol to cairo-api.xml * cairo/Context.cs: use Pattern.Handle * cairo/Pattern.cs: expose Lookup method, Obsolete the Pointer prop and add a new Handle prop for API consistency. * cairo/cairo-api.xml: add Pattern symbol. --- cairo/Context.cs | 6 +++--- cairo/Pattern.cs | 9 +++++++-- cairo/cairo-api.xml | 1 + 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/cairo/Context.cs b/cairo/Context.cs index 8e2a3349d..fc1f015ef 100644 --- a/cairo/Context.cs +++ b/cairo/Context.cs @@ -323,7 +323,7 @@ namespace Cairo { public Pattern Pattern { set { - NativeMethods.cairo_set_source (state, value.Pointer); + NativeMethods.cairo_set_source (state, value.Handle); } get { @@ -333,7 +333,7 @@ namespace Cairo { public Pattern Source { set { - NativeMethods.cairo_set_source (state, value.Pointer); + NativeMethods.cairo_set_source (state, value.Handle); } get { @@ -554,7 +554,7 @@ namespace Cairo { public void Mask (Pattern pattern) { - NativeMethods.cairo_mask (state, pattern.Pointer); + NativeMethods.cairo_mask (state, pattern.Handle); } public void MaskSurface (Surface surface, double surface_x, double surface_y) diff --git a/cairo/Pattern.cs b/cairo/Pattern.cs index a91a0aeda..e0af9edf3 100644 --- a/cairo/Pattern.cs +++ b/cairo/Pattern.cs @@ -36,7 +36,7 @@ namespace Cairo { { protected IntPtr pattern = IntPtr.Zero; - internal static Pattern Lookup (IntPtr pattern) + public static Pattern Lookup (IntPtr pattern) { if (pattern == IntPtr.Zero) return null; @@ -134,10 +134,15 @@ namespace Cairo { } } - public IntPtr Pointer { + public IntPtr Handle { get { return pattern; } } + [Obsolete ("Replaced by Handle property")] + public IntPtr Pointer { + get { return Handle; } + } + public PatternType PatternType { get { return NativeMethods.cairo_pattern_get_type (pattern); } } diff --git a/cairo/cairo-api.xml b/cairo/cairo-api.xml index 7749a35eb..8ca55713d 100644 --- a/cairo/cairo-api.xml +++ b/cairo/cairo-api.xml @@ -6,5 +6,6 @@ +