Skip to content

Commit c3e9f89

Browse files
committed
fix enum privacy
1 parent a088190 commit c3e9f89

File tree

5 files changed

+56
-56
lines changed

5 files changed

+56
-56
lines changed

src/ffi/graphics.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,12 @@ pub mod render_window {
4545
pub struct sfRenderWindow;
4646

4747
pub struct sfEvent {
48-
typeEvent : c_uint,
49-
p1 : c_uint,
50-
p2 : c_uint,
51-
p3 : c_float,
52-
p4 : c_uint,
53-
p5 : c_uint
48+
pub typeEvent : c_uint,
49+
pub p1 : c_uint,
50+
pub p2 : c_uint,
51+
pub p3 : c_float,
52+
pub p4 : c_uint,
53+
pub p5 : c_uint
5454
}
5555

5656
extern "C" {
@@ -353,10 +353,10 @@ pub mod render_states {
353353
use ffi::graphics::texture::sfTexture;
354354

355355
pub struct sfRenderStates {
356-
blendMode : i32,
357-
transform : Transform,
358-
texture : *sfTexture,
359-
shader : *sfShader
356+
pub blendMode : i32,
357+
pub transform : Transform,
358+
pub texture : *sfTexture,
359+
pub shader : *sfShader
360360
}
361361
}
362362

src/ffi/window.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ pub mod window {
3636
}
3737

3838
pub struct sfEvent {
39-
typeEvent : c_uint,
40-
p1 : c_uint,
41-
p2 : c_uint,
42-
p3 : c_float,
43-
p4 : c_uint,
44-
p5 : c_uint
39+
pub typeEvent : c_uint,
40+
pub p1 : c_uint,
41+
pub p2 : c_uint,
42+
pub p3 : c_float,
43+
pub p4 : c_uint,
44+
pub p5 : c_uint
4545
}
4646

4747
pub enum sfEventType {
@@ -154,9 +154,9 @@ pub mod video_mode {
154154
use ffi::sfml_types::SfBool;
155155

156156
pub struct sfVideoMode {
157-
width: c_uint,
158-
height: c_uint,
159-
bits_per_pixel: c_uint
157+
pub width: c_uint,
158+
pub height: c_uint,
159+
pub bits_per_pixel: c_uint
160160
}
161161

162162
impl Clone for sfVideoMode {

src/graphics/convex_shape/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ pub struct ConvexShape<'s> {
6262
/// An iterator over the points of a ConvexShape
6363
pub struct ConvexShapePoints {
6464
#[doc(hidden)]
65-
priv convex_shape: *ffi::sfConvexShape,
65+
convex_shape: *ffi::sfConvexShape,
6666
#[doc(hidden)]
67-
priv pos: u32
67+
pos: u32
6868
}
6969

7070
impl<'s> ConvexShape<'s> {

src/graphics/convex_shape/rc.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ pub struct ConvexShape {
6262
/// An iterator over the points of a ConvexShape
6363
pub struct ConvexShapePoints {
6464
#[doc(hidden)]
65-
priv convex_shape: *ffi::sfConvexShape,
65+
convex_shape: *ffi::sfConvexShape,
6666
#[doc(hidden)]
67-
priv pos: u32
67+
pos: u32
6868
}
6969

7070
impl ConvexShape {

src/window/event.rs

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ pub enum Event {
4040
/// The window was resized
4141
Resized {
4242
/// The new width of the window
43-
width : int,
43+
pub width : int,
4444
/// The new height of the window
45-
height : int
45+
pub height : int
4646
},
4747
/// The window lost the focus
4848
LostFocus,
@@ -51,67 +51,67 @@ pub enum Event {
5151
/// A character was entered
5252
TextEntered {
5353
/// The character entered by the user
54-
code : char
54+
pub code : char
5555
},
5656
/// A key was pressed
5757
KeyPressed {
5858
/// The pressed key
59-
code : Key,
59+
pub code : Key,
6060
/// Is alt pressed too?
61-
alt : bool,
61+
pub alt : bool,
6262
/// Is ctrl pressed too?
63-
ctrl : bool,
63+
pub ctrl : bool,
6464
/// Is shift pressed too?
65-
shift : bool,
65+
pub shift : bool,
6666
/// Is system pressed too?
67-
system : bool
67+
pub system : bool
6868
},
6969
/// A key was released
7070
KeyReleased {
7171
/// The released key
72-
code : Key,
72+
pub code : Key,
7373
/// Is alt released too?
74-
alt : bool,
74+
pub alt : bool,
7575
/// Is ctrl released too?
76-
ctrl : bool,
76+
pub ctrl : bool,
7777
/// Is shift released too?
78-
shift : bool,
78+
pub shift : bool,
7979
/// Is system released too?
80-
system : bool
80+
pub system : bool
8181
},
8282
/// The mouse wheel was scrolled
8383
MouseWheelMoved {
8484
/// Number of ticks the wheel has moved (positive is up, negative is down)
85-
delta : int,
85+
pub delta : int,
8686
/// X position of the mouse pointer, relative to the left of the owner window.
87-
x : int,
87+
pub x : int,
8888
/// Y position of the mouse pointer, relative to the top of the owner window.
89-
y : int
89+
pub y : int
9090
},
9191
/// A mouse button was pressed
9292
MouseButtonPressed {
9393
/// Code of the button that has been pressed.
94-
button : MouseButton,
94+
pub button : MouseButton,
9595
/// X position of the mouse pointer, relative to the left of the owner window.
96-
x : int,
96+
pub x : int,
9797
/// Y position of the mouse pointer, relative to the top of the owner window.
98-
y : int
98+
pub y : int
9999
},
100100
/// A mouse button was released
101101
MouseButtonReleased {
102102
/// Code of the button that has been pressed.
103-
button : MouseButton,
103+
pub button : MouseButton,
104104
/// X position of the mouse pointer, relative to the left of the owner window.
105-
x : int,
105+
pub x : int,
106106
/// Y position of the mouse pointer, relative to the top of the owner window.
107-
y : int
107+
pub y : int
108108
},
109109
/// The mouse cursor moved
110110
MouseMoved {
111111
/// X position of the mouse pointer, relative to the left of the owner window.
112-
x : int,
112+
pub x : int,
113113
/// Y position of the mouse pointer, relative to the top of the owner window.
114-
y : int
114+
pub y : int
115115
},
116116
/// The mouse cursor entered the area of the window
117117
MouseEntered,
@@ -120,35 +120,35 @@ pub enum Event {
120120
/// A joystick button was pressed
121121
JoystickButtonPressed {
122122
/// Index of the joystick (in range [0 .. joystick::Count - 1])
123-
joystickid : int,
123+
pub joystickid : int,
124124
/// Index of the button that has been pressed (in range [0 .. Joystick::button_count - 1])
125-
button : int
125+
pub button : int
126126
},
127127
/// A joystick button was released
128128
JoystickButtonReleased {
129129
/// Index of the joystick (in range [0 .. joystick::Count - 1])
130-
joystickid : int,
130+
pub joystickid : int,
131131
/// Index of the button that has been pressed (in range [0 .. Joystick::button_count - 1])
132-
button : int
132+
pub button : int
133133
},
134134
/// The joystick moved along an axis
135135
JoystickMoved {
136136
/// Index of the joystick (in range [0 .. joystick::Count - 1])
137-
joystickid : uint,
137+
pub joystickid : uint,
138138
/// Axis on which the joystick moved.
139-
axis : Axis,
139+
pub axis : Axis,
140140
/// New position on the axis (in range [-100 .. 100])
141-
position : f32
141+
pub position : f32
142142
},
143143
/// A joystick was connected
144144
JoystickConnected {
145145
/// Index of the joystick (in range [0 .. joystick::Count - 1])
146-
joystickid : uint
146+
pub joystickid : uint
147147
},
148148
/// A joystick was disconnected
149149
JoystickDisconnected {
150150
/// Index of the joystick (in range [0 .. joystick::Count - 1])
151-
joystickid : uint
151+
pub joystickid : uint
152152
},
153153
/// No Event
154154
NoEvent

0 commit comments

Comments
 (0)