@@ -1444,9 +1444,17 @@ pub extern "C" fn processing_input_mouse_button(surface_id: u64, button: u8, pre
14441444 PROCESSING_MOUSE_MIDDLE => MouseButton :: Middle ,
14451445 PROCESSING_MOUSE_RIGHT => MouseButton :: Right ,
14461446 _ => {
1447+ <<<<<<< HEAD
14471448 return Err ( ProcessingError :: InvalidArgument ( format ! (
14481449 "invalid mouse button: {button}"
14491450 ) ) ) ;
1451+ =======
1452+ return Err (
1453+ ProcessingError :: InvalidArgument ( format ! (
1454+ "invalid mouse button: {button}"
1455+ ) ) ,
1456+ ) ;
1457+ >>>>>>> 6 ad893c ( Add input support; extract glfw crate . )
14501458 }
14511459 } ;
14521460 input_set_mouse_button( Entity :: from_bits ( surface_id ) , btn, pressed)
@@ -1474,7 +1482,13 @@ pub extern "C" fn processing_input_char(surface_id: u64, key_code: u32, codepoin
14741482 error:: check ( || {
14751483 let kc = key_code_from_u32( key_code) ?;
14761484 let ch = char:: from_u32 ( codepoint ) . ok_or_else( || {
1485+ <<<<<<< HEAD
14771486 ProcessingError :: InvalidArgument ( format ! ( "invalid codepoint: {codepoint}" ) )
1487+ =======
1488+ ProcessingError :: InvalidArgument ( format ! (
1489+ "invalid codepoint: {codepoint}"
1490+ ) )
1491+ >>>>>>> 6 ad893c ( Add input support; extract glfw crate . )
14781492 } ) ?;
14791493 input_set_char ( Entity :: from_bits ( surface_id ) , kc , ch )
14801494 } ) ;
@@ -1501,7 +1515,11 @@ pub extern "C" fn processing_input_focus(surface_id: u64, focused: bool) {
15011515#[ unsafe( no_mangle) ]
15021516pub extern "C" fn processing_input_flush( ) {
15031517 error:: clear_error ( ) ;
1518+ <<<<<<< HEAD
15041519 error:: check ( input_flush ) ;
1520+ =======
1521+ error:: check ( || input_flush( ) ) ;
1522+ >>>>>>> 6 ad893c ( Add input support; extract glfw crate . )
15051523}
15061524
15071525#[ unsafe( no_mangle) ]
@@ -1531,7 +1549,11 @@ pub extern "C" fn processing_pmouse_y(surface_id: u64) -> f32 {
15311549#[ unsafe( no_mangle) ]
15321550pub extern "C" fn processing_mouse_is_pressed ( ) -> bool {
15331551 error:: clear_error ( ) ;
1552+ <<<<<<< HEAD
15341553 error:: check ( input_mouse_is_pressed ) . unwrap_or( false )
1554+ =======
1555+ error:: check( || input_mouse_is_pressed( ) ) . unwrap_or( false )
1556+ >>>>>>> 6 ad893c ( Add input support; extract glfw crate . )
15351557}
15361558
15371559#[ unsafe( no_mangle) ]
@@ -1551,7 +1573,11 @@ pub extern "C" fn processing_mouse_button() -> i8 {
15511573#[ unsafe( no_mangle) ]
15521574pub extern "C" fn processing_key_is_pressed ( ) -> bool {
15531575 error:: clear_error ( ) ;
1576+ <<<<<<< HEAD
15541577 error:: check ( input_key_is_pressed ) . unwrap_or( false )
1578+ =======
1579+ error:: check( || input_key_is_pressed( ) ) . unwrap_or( false )
1580+ >>>>>>> 6 ad893c ( Add input support; extract glfw crate . )
15551581}
15561582
15571583#[ unsafe( no_mangle) ]
@@ -1573,25 +1599,42 @@ pub extern "C" fn processing_key() -> u32 {
15731599#[ unsafe( no_mangle) ]
15741600pub extern "C" fn processing_key_code ( ) -> u32 {
15751601 error:: clear_error ( ) ;
1602+ <<<<<<< HEAD
15761603 error:: check ( || input_key_code( ) . map( |opt| opt. map( key_code_to_u32) . unwrap_or( 0 ) ) ) . unwrap_or( 0 )
1604+ =======
1605+ error:: check ( || input_key_code( ) . map( |opt| opt. map( key_code_to_u32) . unwrap_or( 0 ) ) )
1606+ . unwrap_or( 0 )
1607+ >>>>>>> 6 ad893c ( Add input support; extract glfw crate . )
15771608}
15781609
15791610#[ unsafe( no_mangle) ]
15801611pub extern "C" fn processing_moved_x ( ) -> f32 {
15811612 error:: clear_error ( ) ;
1613+ <<<<<<< HEAD
15821614 error:: check ( input_moved_x ) . unwrap_or( 0.0 )
1615+ =======
1616+ error:: check( || input_moved_x( ) ) . unwrap_or( 0.0 )
1617+ >>>>>>> 6 ad893c ( Add input support; extract glfw crate . )
15831618}
15841619
15851620#[ unsafe( no_mangle) ]
15861621pub extern "C" fn processing_moved_y ( ) -> f32 {
15871622 error:: clear_error ( ) ;
1623+ <<<<<<< HEAD
15881624 error:: check ( input_moved_y ) . unwrap_or( 0.0 )
1625+ =======
1626+ error:: check( || input_moved_y( ) ) . unwrap_or( 0.0 )
1627+ >>>>>>> 6 ad893c ( Add input support; extract glfw crate . )
15891628}
15901629
15911630#[ unsafe( no_mangle) ]
15921631pub extern "C" fn processing_mouse_wheel ( ) -> f32 {
15931632 error:: clear_error ( ) ;
1633+ <<<<<<< HEAD
15941634 error:: check ( input_mouse_wheel ) . unwrap_or( 0.0 )
1635+ =======
1636+ error:: check( || input_mouse_wheel( ) ) . unwrap_or( 0.0 )
1637+ >>>>>>> 6 ad893c ( Add input support; extract glfw crate . )
15951638}
15961639
15971640fn key_code_from_u32 ( val : u32 ) -> processing:: prelude:: error:: Result < KeyCode > {
@@ -1701,9 +1744,15 @@ fn key_code_from_u32(val: u32) -> processing::prelude::error::Result<KeyCode> {
17011744 PROCESSING_KEY_ALT_RIGHT => Ok ( KeyCode :: AltRight ) ,
17021745 PROCESSING_KEY_SUPER_RIGHT => Ok ( KeyCode :: SuperRight ) ,
17031746 PROCESSING_KEY_CONTEXT_MENU => Ok ( KeyCode :: ContextMenu ) ,
1747+ <<<<<<< HEAD
17041748 _ => Err ( ProcessingError :: InvalidArgument ( format ! (
17051749 "unknown key code: {val}"
17061750 ) ) ) ,
1751+ =======
1752+ _ => Err ( ProcessingError :: InvalidArgument (
1753+ format ! ( "unknown key code: {val}" ) ,
1754+ ) ) ,
1755+ >>>>>>> 6 ad893c ( Add input support; extract glfw crate . )
17071756 }
17081757}
17091758
0 commit comments