Skip to content

Commit

Permalink
Fixed typo
Browse files Browse the repository at this point in the history
  • Loading branch information
magistermaks committed Feb 23, 2024
1 parent b5350e5 commit 24f6471
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
13 changes: 6 additions & 7 deletions winx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {}
Expand Down Expand Up @@ -95,7 +95,7 @@ typedef struct {
WinxCursor* cursor_icon;
WinxCursorEventHandle cursor;
WinxButtonEventHandle button;
WinxKeybordEventHandle keyboard;
WinxKeyboardEventHandle keyboard;
WinxScrollEventHandle scroll;
WinxCloseEventHandle close;
WinxResizeEventHandle resize;
Expand Down Expand Up @@ -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) {
Expand All @@ -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;
Expand All @@ -1100,4 +1100,3 @@ void winxSetCursorIcon(WinxCursor* cursor) {
winxUpdateCursorState(winx->capture, winx->cursor_icon);
}
}

7 changes: 3 additions & 4 deletions winx.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -250,4 +250,3 @@ double winxGetTime();
#endif

#endif // WINX_H

0 comments on commit 24f6471

Please sign in to comment.