mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-13 20:48:02 +01:00
reintroduce board_handleKey
This commit is contained in:
parent
df2807e422
commit
40832e6ea5
3 changed files with 15 additions and 3 deletions
|
@ -2736,6 +2736,17 @@ board_handleKeyUp( BoardCtxt* board, XP_Key key, XP_Bool* pHandled )
|
||||||
}
|
}
|
||||||
return redraw;
|
return redraw;
|
||||||
} /* board_handleKeyUp */
|
} /* board_handleKeyUp */
|
||||||
|
|
||||||
|
XP_Bool
|
||||||
|
board_handleKey( BoardCtxt* board, XP_Key key, XP_Bool* handled )
|
||||||
|
{
|
||||||
|
XP_Bool handled1, handled2;
|
||||||
|
XP_Bool draw = board_handleKeyDown( board, key, &handled1 );
|
||||||
|
draw = board_handleKeyUp( board, key, &handled2 ) || draw;
|
||||||
|
*handled = handled1 || handled2;
|
||||||
|
return draw;
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef KEYBOARD_NAV
|
#ifdef KEYBOARD_NAV
|
||||||
|
|
|
@ -127,9 +127,10 @@ XP_Bool board_handlePenUp( BoardCtxt* board, XP_U16 x, XP_U16 y );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef KEY_SUPPORT
|
#ifdef KEY_SUPPORT
|
||||||
XP_Bool board_handleKeyUp( BoardCtxt* board, XP_Key key, XP_Bool* handled );
|
XP_Bool board_handleKey( BoardCtxt* board, XP_Key key, XP_Bool* handled );
|
||||||
|
|
||||||
# ifdef KEYBOARD_NAV
|
# ifdef KEYBOARD_NAV
|
||||||
|
XP_Bool board_handleKeyUp( BoardCtxt* board, XP_Key key, XP_Bool* handled );
|
||||||
XP_Bool board_handleKeyDown( BoardCtxt* board, XP_Key key, XP_Bool* handled );
|
XP_Bool board_handleKeyDown( BoardCtxt* board, XP_Key key, XP_Bool* handled );
|
||||||
XP_Bool board_handleKeyRepeat( BoardCtxt* board, XP_Key key, XP_Bool* handled );
|
XP_Bool board_handleKeyRepeat( BoardCtxt* board, XP_Key key, XP_Bool* handled );
|
||||||
XP_Bool board_focusChanged( BoardCtxt* board, BoardObjectType typ,
|
XP_Bool board_focusChanged( BoardCtxt* board, BoardObjectType typ,
|
||||||
|
|
|
@ -2033,8 +2033,8 @@ WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
if ( wParam == 0x08 ) {
|
if ( wParam == 0x08 ) {
|
||||||
wParam = XP_CURSOR_KEY_DEL;
|
wParam = XP_CURSOR_KEY_DEL;
|
||||||
}
|
}
|
||||||
draw = board_handleKeyUp( globals->game.board, wParam, &handled )
|
draw = board_handleKey( globals->game.board, wParam, &handled )
|
||||||
|| board_handleKeyUp( globals->game.board, wParam - ('a'-'A'),
|
|| board_handleKey( globals->game.board, wParam - ('a'-'A'),
|
||||||
&handled );
|
&handled );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue