diff --git a/winx.c b/winx.c index 6436246..cdd3648 100644 --- a/winx.c +++ b/winx.c @@ -7,7 +7,7 @@ // dummy functions void WinxDummyCursorEventHandle(int x, int y) {} void WinxDummyButtonEventHandle(int type, int button) {} -void WinxDummyKeybordEventHandle(int type, int key) {} +void WinxDummyKeyboardEventHandle(int type, int key) {} void WinxDummyScrollEventHandle(int scroll) {} void WinxDummyCloseEventHandle() {} void WinxDummyResizeEventHandle(int width, int height) {} @@ -95,7 +95,7 @@ typedef struct { WinxCursor* cursor_icon; WinxCursorEventHandle cursor; WinxButtonEventHandle button; - WinxKeybordEventHandle keyboard; + WinxKeyboardEventHandle keyboard; WinxScrollEventHandle scroll; WinxCloseEventHandle close; WinxResizeEventHandle resize; @@ -1045,9 +1045,9 @@ void winxSetButtonEventHandle(WinxButtonEventHandle handle) { winx->button = handle ? handle : WinxDummyButtonEventHandle; } -void winxSetKeybordEventHandle(WinxKeybordEventHandle handle) { - WINX_CONTEXT_ASSERT("winxSetKeybordEventHandle"); - winx->keyboard = handle ? handle : WinxDummyKeybordEventHandle; +void winxSetKeyboardEventHandle(WinxKeyboardEventHandle handle) { + WINX_CONTEXT_ASSERT("winxSetKeyboardEventHandle"); + winx->keyboard = handle ? handle : WinxDummyKeyboardEventHandle; } void winxSetScrollEventHandle(WinxScrollEventHandle handle) { @@ -1074,7 +1074,7 @@ void winxResetEventHandles() { WINX_CONTEXT_ASSERT("winxResetEventHandles"); winx->cursor = WinxDummyCursorEventHandle; winx->button = WinxDummyButtonEventHandle; - winx->keyboard = WinxDummyKeybordEventHandle; + winx->keyboard = WinxDummyKeyboardEventHandle; winx->scroll = WinxDummyScrollEventHandle; winx->close = WinxDummyCloseEventHandle; winx->resize = WinxDummyResizeEventHandle; @@ -1100,4 +1100,3 @@ void winxSetCursorIcon(WinxCursor* cursor) { winxUpdateCursorState(winx->capture, winx->cursor_icon); } } - diff --git a/winx.h b/winx.h index 38aabbd..74fd762 100644 --- a/winx.h +++ b/winx.h @@ -75,7 +75,7 @@ typedef struct WinxCursor_s WinxCursor; typedef void (*WinxCursorEventHandle)(int x, int y); typedef void (*WinxButtonEventHandle)(int state, int button); -typedef void (*WinxKeybordEventHandle)(int state, int keycode); +typedef void (*WinxKeyboardEventHandle)(int state, int keycode); typedef void (*WinxScrollEventHandle)(int scroll); typedef void (*WinxCloseEventHandle)(void); typedef void (*WinxResizeEventHandle)(int width, int height); @@ -157,9 +157,9 @@ void winxSetCursorEventHandle(WinxCursorEventHandle handle); /// pass NULL to unset the associated event handler (if any) void winxSetButtonEventHandle(WinxButtonEventHandle handle); -/// set the handle for keybord events for current window +/// set the handle for keyboard events for current window /// pass NULL to unset the associated event handler (if any) -void winxSetKeybordEventHandle(WinxKeybordEventHandle handle); +void winxSetKeyboardEventHandle(WinxKeyboardEventHandle handle); /// set the handle for cursor scroll for current window /// pass NULL to unset the associated event handler (if any) @@ -250,4 +250,3 @@ double winxGetTime(); #endif #endif // WINX_H -