@@ -26,43 +26,43 @@ pub extern "C" fn processing_init() {
2626/// - window_handle is a valid GLFW window pointer.
2727/// - This is called from the same thread as init.
2828#[ unsafe( no_mangle) ]
29- pub extern "C" fn processing_create_surface (
29+ pub extern "C" fn processing_surface_create (
3030 window_handle : u64 ,
3131 display_handle : u64 ,
3232 width : u32 ,
3333 height : u32 ,
3434 scale_factor : f32 ,
3535) -> u64 {
3636 error:: clear_error ( ) ;
37- error:: check ( || create_surface ( window_handle, display_handle, width, height, scale_factor) )
37+ error:: check ( || surface_create ( window_handle, display_handle, width, height, scale_factor) )
3838 . map ( |e| e. to_bits ( ) )
3939 . unwrap_or ( 0 )
4040}
4141
4242/// Destroy the surface associated with the given window ID.
4343///
4444/// SAFETY:
45- /// - Init and create_surface have been called.
46- /// - window_id is a valid ID returned from create_surface .
45+ /// - Init and surface_create have been called.
46+ /// - window_id is a valid ID returned from surface_create .
4747/// - This is called from the same thread as init.
4848#[ unsafe( no_mangle) ]
49- pub extern "C" fn processing_destroy_surface ( window_id : u64 ) {
49+ pub extern "C" fn processing_surface_destroy ( window_id : u64 ) {
5050 error:: clear_error ( ) ;
5151 let window_entity = Entity :: from_bits ( window_id) ;
52- error:: check ( || destroy_surface ( window_entity) ) ;
52+ error:: check ( || surface_destroy ( window_entity) ) ;
5353}
5454
5555/// Update window size when resized.
5656///
5757/// SAFETY:
58- /// - Init and create_surface have been called.
59- /// - window_id is a valid ID returned from create_surface .
58+ /// - Init and surface_create have been called.
59+ /// - window_id is a valid ID returned from surface_create .
6060/// - This is called from the same thread as init.
6161#[ unsafe( no_mangle) ]
62- pub extern "C" fn processing_resize_surface ( window_id : u64 , width : u32 , height : u32 ) {
62+ pub extern "C" fn processing_surface_resize ( window_id : u64 , width : u32 , height : u32 ) {
6363 error:: clear_error ( ) ;
6464 let window_entity = Entity :: from_bits ( window_id) ;
65- error:: check ( || resize_surface ( window_entity, width, height) ) ;
65+ error:: check ( || surface_resize ( window_entity, width, height) ) ;
6666}
6767
6868/// Set the background color for the given window.
@@ -126,8 +126,8 @@ pub extern "C" fn processing_exit(exit_code: u8) {
126126/// Set the fill color.
127127///
128128/// SAFETY:
129- /// - Init and create_surface have been called.
130- /// - window_id is a valid ID returned from create_surface .
129+ /// - Init and surface_create have been called.
130+ /// - window_id is a valid ID returned from surface_create .
131131/// - This is called from the same thread as init.
132132#[ unsafe( no_mangle) ]
133133pub extern "C" fn processing_set_fill ( window_id : u64 , r : f32 , g : f32 , b : f32 , a : f32 ) {
@@ -140,8 +140,8 @@ pub extern "C" fn processing_set_fill(window_id: u64, r: f32, g: f32, b: f32, a:
140140/// Set the stroke color.
141141///
142142/// SAFETY:
143- /// - Init and create_surface have been called.
144- /// - window_id is a valid ID returned from create_surface .
143+ /// - Init and surface_create have been called.
144+ /// - window_id is a valid ID returned from surface_create .
145145/// - This is called from the same thread as init.
146146#[ unsafe( no_mangle) ]
147147pub extern "C" fn processing_set_stroke_color ( window_id : u64 , r : f32 , g : f32 , b : f32 , a : f32 ) {
@@ -154,8 +154,8 @@ pub extern "C" fn processing_set_stroke_color(window_id: u64, r: f32, g: f32, b:
154154/// Set the stroke weight.
155155///
156156/// SAFETY:
157- /// - Init and create_surface have been called.
158- /// - window_id is a valid ID returned from create_surface .
157+ /// - Init and surface_create have been called.
158+ /// - window_id is a valid ID returned from surface_create .
159159/// - This is called from the same thread as init.
160160#[ unsafe( no_mangle) ]
161161pub extern "C" fn processing_set_stroke_weight ( window_id : u64 , weight : f32 ) {
@@ -167,8 +167,8 @@ pub extern "C" fn processing_set_stroke_weight(window_id: u64, weight: f32) {
167167/// Disable fill for subsequent shapes.
168168///
169169/// SAFETY:
170- /// - Init and create_surface have been called.
171- /// - window_id is a valid ID returned from create_surface .
170+ /// - Init and surface_create have been called.
171+ /// - window_id is a valid ID returned from surface_create .
172172/// - This is called from the same thread as init.
173173#[ unsafe( no_mangle) ]
174174pub extern "C" fn processing_no_fill ( window_id : u64 ) {
@@ -180,8 +180,8 @@ pub extern "C" fn processing_no_fill(window_id: u64) {
180180/// Disable stroke for subsequent shapes.
181181///
182182/// SAFETY:
183- /// - Init and create_surface have been called.
184- /// - window_id is a valid ID returned from create_surface .
183+ /// - Init and surface_create have been called.
184+ /// - window_id is a valid ID returned from surface_create .
185185/// - This is called from the same thread as init.
186186#[ unsafe( no_mangle) ]
187187pub extern "C" fn processing_no_stroke ( window_id : u64 ) {
@@ -193,8 +193,8 @@ pub extern "C" fn processing_no_stroke(window_id: u64) {
193193/// Draw a rectangle.
194194///
195195/// SAFETY:
196- /// - Init and create_surface have been called.
197- /// - window_id is a valid ID returned from create_surface .
196+ /// - Init and surface_create have been called.
197+ /// - window_id is a valid ID returned from surface_create .
198198/// - This is called from the same thread as init.
199199#[ unsafe( no_mangle) ]
200200pub extern "C" fn processing_rect (
0 commit comments