From 43a514ecdcce7412db75797a41c93f5948dad0f6 Mon Sep 17 00:00:00 2001 From: Lars Bergstrom Date: Fri, 25 Apr 2014 16:32:27 -0500 Subject: [PATCH] Rust upgrade - fix privacy --- azure.rs | 16 ++++++++-------- azure_hl.rs | 44 ++++++++++++++++++++++---------------------- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/azure.rs b/azure.rs index 5a16475..9fcef0d 100644 --- a/azure.rs +++ b/azure.rs @@ -157,8 +157,8 @@ pub struct struct__AzColor { pub type AzColor = struct__AzColor; pub struct struct__AzGradientStop { - offset: AzFloat, - color: AzColor, + pub offset: AzFloat, + pub color: AzColor, } pub type AzGradientStop = struct__AzGradientStop; @@ -182,8 +182,8 @@ pub struct struct__AzRect { pub type AzRect = struct__AzRect; pub struct struct__AzIntPoint { - x: int32_t, - y: int32_t, + pub x: int32_t, + pub y: int32_t, } pub type AzIntPoint = struct__AzIntPoint; @@ -245,15 +245,15 @@ pub struct struct__AzDrawSurfaceOptions { pub type AzDrawSurfaceOptions = struct__AzDrawSurfaceOptions; pub struct struct__AzGlyph { - mIndex: uint32_t, - mPosition: AzPoint, + pub mIndex: uint32_t, + pub mPosition: AzPoint, } pub type AzGlyph = struct__AzGlyph; pub struct struct__AzGlyphBuffer { - mGlyphs: *AzGlyph, - mNumGlyphs: uint32_t, + pub mGlyphs: *AzGlyph, + pub mNumGlyphs: uint32_t, } pub type AzGlyphBuffer = struct__AzGlyphBuffer; diff --git a/azure_hl.rs b/azure_hl.rs index cc5ca31..a892fde 100644 --- a/azure_hl.rs +++ b/azure_hl.rs @@ -89,10 +89,10 @@ impl AsAzurePoint for Point2D { #[deriving(Clone)] pub struct Color { - r: AzFloat, - g: AzFloat, - b: AzFloat, - a: AzFloat, + pub r: AzFloat, + pub g: AzFloat, + pub b: AzFloat, + pub a: AzFloat, } impl Color { @@ -108,7 +108,7 @@ pub fn Color(r: AzFloat, g: AzFloat, b: AzFloat, a: AzFloat) -> Color { // FIXME: Should have a class hierarchy here starting with Pattern. pub struct ColorPattern { - azure_color_pattern: AzColorPatternRef, + pub azure_color_pattern: AzColorPatternRef, } impl Drop for ColorPattern { @@ -157,11 +157,11 @@ pub enum CompositionOp { } pub struct StrokeOptions { - line_width: AzFloat, - miter_limit: AzFloat, - mDashPattern: *AzFloat, - mDashLength: size_t, - fields: uint8_t + pub line_width: AzFloat, + pub miter_limit: AzFloat, + pub mDashPattern: *AzFloat, + pub mDashLength: size_t, + pub fields: uint8_t } impl StrokeOptions { @@ -199,8 +199,8 @@ pub fn StrokeOptions(line_width: AzFloat, } pub struct DrawOptions { - alpha: AzFloat, - fields: uint16_t, + pub alpha: AzFloat, + pub fields: uint16_t, } impl DrawOptions { @@ -272,8 +272,8 @@ impl Filter { } pub struct DrawSurfaceOptions { - filter: Filter, - sampling_bounds: bool, + pub filter: Filter, + pub sampling_bounds: bool, } impl DrawSurfaceOptions { @@ -319,9 +319,9 @@ impl BackendType { } pub struct DrawTarget { - azure_draw_target: AzDrawTargetRef, - data: Option>, - skia_context: Option + pub azure_draw_target: AzDrawTargetRef, + pub data: Option>, + pub skia_context: Option } impl Drop for DrawTarget { @@ -339,7 +339,7 @@ impl Drop for DrawTarget { /// Contains the GL resources that Skia was holding onto that may be safely extracted. At the /// moment this consists simply of the native surface. pub struct StolenGLResources { - surface: AzSkiaGrGLSharedSurfaceRef, + pub surface: AzSkiaGrGLSharedSurfaceRef, } impl DrawTarget { @@ -619,7 +619,7 @@ pub fn clone_mutable_draw_target(draw_target: &mut DrawTarget) -> DrawTarget { } pub struct SourceSurface { - azure_source_surface: AzSourceSurfaceRef, + pub azure_source_surface: AzSourceSurfaceRef, } impl Drop for SourceSurface { @@ -680,7 +680,7 @@ impl SourceSurfaceMethods for SourceSurface { } pub struct DataSourceSurface { - azure_data_source_surface: AzDataSourceSurfaceRef, + pub azure_data_source_surface: AzDataSourceSurfaceRef, } impl Drop for DataSourceSurface { @@ -719,7 +719,7 @@ impl SourceSurfaceMethods for DataSourceSurface { } pub struct Path { - azure_path: AzPathRef + pub azure_path: AzPathRef } impl Drop for Path { @@ -731,7 +731,7 @@ impl Drop for Path { } pub struct PathBuilder { - azure_path_builder: AzPathBuilderRef + pub azure_path_builder: AzPathBuilderRef } impl PathBuilder {