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.
This commit is contained in:
Mike Kestner 2011-02-18 21:57:39 -06:00
parent c283aa425b
commit e7ee99526a
3 changed files with 11 additions and 5 deletions

View file

@ -323,7 +323,7 @@ namespace Cairo {
public Pattern Pattern { public Pattern Pattern {
set { set {
NativeMethods.cairo_set_source (state, value.Pointer); NativeMethods.cairo_set_source (state, value.Handle);
} }
get { get {
@ -333,7 +333,7 @@ namespace Cairo {
public Pattern Source { public Pattern Source {
set { set {
NativeMethods.cairo_set_source (state, value.Pointer); NativeMethods.cairo_set_source (state, value.Handle);
} }
get { get {
@ -554,7 +554,7 @@ namespace Cairo {
public void Mask (Pattern pattern) 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) public void MaskSurface (Surface surface, double surface_x, double surface_y)

View file

@ -36,7 +36,7 @@ namespace Cairo {
{ {
protected IntPtr pattern = IntPtr.Zero; protected IntPtr pattern = IntPtr.Zero;
internal static Pattern Lookup (IntPtr pattern) public static Pattern Lookup (IntPtr pattern)
{ {
if (pattern == IntPtr.Zero) if (pattern == IntPtr.Zero)
return null; return null;
@ -134,10 +134,15 @@ namespace Cairo {
} }
} }
public IntPtr Pointer { public IntPtr Handle {
get { return pattern; } get { return pattern; }
} }
[Obsolete ("Replaced by Handle property")]
public IntPtr Pointer {
get { return Handle; }
}
public PatternType PatternType { public PatternType PatternType {
get { return NativeMethods.cairo_pattern_get_type (pattern); } get { return NativeMethods.cairo_pattern_get_type (pattern); }
} }

View file

@ -6,5 +6,6 @@
<symbol type="manual" cname="cairo_t" name="Cairo.Context"/> <symbol type="manual" cname="cairo_t" name="Cairo.Context"/>
<symbol type="manual" cname="cairo_font_options_t" name="Cairo.FontOptions"/> <symbol type="manual" cname="cairo_font_options_t" name="Cairo.FontOptions"/>
<symbol type="manual" cname="cairo_region_t" name="Cairo.Region"/> <symbol type="manual" cname="cairo_region_t" name="Cairo.Region"/>
<symbol type="marshal" cname="cairo_pattern_t" name="Cairo.Pattern" marshal_type="IntPtr" call_fmt="{0}.Handle" from_fmt="Cairo.Pattern.Lookup ({0})" />
<symbol type="marshal" cname="cairo_surface_t" name="Cairo.Surface" marshal_type="IntPtr" call_fmt="{0}.Handle" from_fmt="Cairo.Surface.LookupSurface ({0})" /> <symbol type="marshal" cname="cairo_surface_t" name="Cairo.Surface" marshal_type="IntPtr" call_fmt="{0}.Handle" from_fmt="Cairo.Surface.LookupSurface ({0})" />
</api> </api>