1212 * -----------------------------------------------------------------------------
1313 */
1414#include "fossil/io/device.h"
15+ #include "fossil/io/output.h"
1516#include <stdio.h>
1617#include <stdlib.h>
1718#include <string.h>
@@ -139,7 +140,6 @@ static fossil_io_keyboard_event_t fossil_io_keyboard_get_event(void) {
139140
140141void fossil_io_keyboard_init (void ) {
141142 memset (& keyboard_manager , 0 , sizeof (keyboard_manager ));
142- printf ("[mouse] Initialized: bindings cleared\n" );
143143#if defined(_WIN32 ) || defined(_WIN64 )
144144 // Windows doesn't require explicit setup for raw mode.
145145#else
@@ -150,7 +150,6 @@ void fossil_io_keyboard_init(void) {
150150
151151void fossil_io_keyboard_shutdown (void ) {
152152 memset (& keyboard_manager , 0 , sizeof (keyboard_manager ));
153- printf ("[mouse] Shutdown: bindings released\n" );
154153#if defined(_WIN32 ) || defined(_WIN64 )
155154 // Windows doesn't require explicit cleanup for raw mode.
156155#else
@@ -168,7 +167,7 @@ void fossil_io_keyboard_register_binding(fossil_io_keyboard_event_t event, fossi
168167 keyboard_manager .bindings [keyboard_manager .count ].callback = callback ;
169168 keyboard_manager .count ++ ;
170169 } else {
171- fprintf ( stderr , "Max keybindings reached.\n" );
170+ fossil_io_fprintf ( FOSSIL_STDERR , "Max keybindings reached.\n" );
172171 }
173172}
174173
@@ -185,7 +184,7 @@ void fossil_io_keyboard_unregister_binding(fossil_io_keyboard_event_t event) {
185184 return ;
186185 }
187186 }
188- fprintf ( stderr , "No matching keybinding to unregister.\n" );
187+ fossil_io_fprintf ( FOSSIL_STDERR , "No matching keybinding to unregister.\n" );
189188}
190189
191190void fossil_io_keyboard_poll_events (void ) {
@@ -228,7 +227,7 @@ static void fossil_io_mouse_get_event(fossil_io_mouse_event_t* event) {
228227
229228void fossil_io_mouse_register_binding (fossil_io_mouse_event_t event , fossil_io_mouse_callback_t callback ) {
230229 if (mouse_manager .count >= MAX_MOUSEBINDS ) {
231- fprintf ( stderr , "[mouse] Max bindings reached\n" );
230+ fossil_io_fprintf ( FOSSIL_STDERR , "[mouse] Max bindings reached\n" );
232231 return ;
233232 }
234233
@@ -244,7 +243,7 @@ void fossil_io_mouse_unregister_binding(fossil_io_mouse_event_t event) {
244243 return ;
245244 }
246245 }
247- fprintf ( stderr , "[mouse] Binding not found\n" );
246+ fossil_io_fprintf ( FOSSIL_STDERR , "[mouse] Binding not found\n" );
248247}
249248
250249void fossil_io_mouse_poll_events (void ) {
@@ -269,12 +268,10 @@ void fossil_io_mouse_clear_bindings(void) {
269268
270269void fossil_io_mouse_init (void ) {
271270 memset (& mouse_manager , 0 , sizeof (mouse_manager ));
272- printf ("[mouse] Initialized: bindings cleared\n" );
273271}
274272
275273void fossil_io_mouse_shutdown (void ) {
276274 memset (& mouse_manager , 0 , sizeof (mouse_manager ));
277- printf ("[mouse] Shutdown: bindings released\n" );
278275}
279276
280277// TOUCH
@@ -300,7 +297,7 @@ static void fossil_io_touch_get_event(fossil_io_touch_event_t* event) {
300297
301298void fossil_io_touch_register_binding (fossil_io_touch_event_t event , fossil_io_touch_callback_t callback ) {
302299 if (touch_manager .count >= MAX_TOUCHBINDS ) {
303- fprintf ( stderr , "[touch] Max bindings reached\n" );
300+ fossil_io_fprintf ( FOSSIL_STDERR , "[touch] Max bindings reached\n" );
304301 return ;
305302 }
306303
@@ -316,7 +313,7 @@ void fossil_io_touch_unregister_binding(fossil_io_touch_event_t event) {
316313 return ;
317314 }
318315 }
319- fprintf ( stderr , "[touch] Binding not found\n" );
316+ fossil_io_fprintf ( FOSSIL_STDERR , "[touch] Binding not found\n" );
320317}
321318
322319void fossil_io_touch_poll_events (void ) {
@@ -341,10 +338,8 @@ void fossil_io_touch_clear_bindings(void) {
341338
342339void fossil_io_touch_init (void ) {
343340 memset (& touch_manager , 0 , sizeof (touch_manager ));
344- printf ("[touch] Initialized: bindings cleared\n" );
345341}
346342
347343void fossil_io_touch_shutdown (void ) {
348344 memset (& touch_manager , 0 , sizeof (touch_manager ));
349- printf ("[touch] Shutdown: bindings released\n" );
350345}
0 commit comments