Mercurial > dwindows
comparison dwtest.c @ 1746:76b24619f6fa
Experimental OS/2 code adding utf8 input conversion...
Also added optional utf8 parameter to key press callback.
Need to figure out how to load the correct keyboard layout.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Wed, 13 Jun 2012 19:20:39 +0000 |
parents | 7dd1659c2693 |
children | 87c215963fdc |
comparison
equal
deleted
inserted
replaced
1745:7dd1659c2693 | 1746:76b24619f6fa |
---|---|
529 { | 529 { |
530 dw_timer_disconnect( timerid ); | 530 dw_timer_disconnect( timerid ); |
531 return TRUE; | 531 return TRUE; |
532 } | 532 } |
533 | 533 |
534 int DWSIGNAL keypress_callback(HWND window, char ch, int vk, int state, void *data) | 534 int DWSIGNAL keypress_callback(HWND window, char ch, int vk, int state, void *data, char *utf8) |
535 { | 535 { |
536 char tmpbuf[100]; | 536 char tmpbuf[100]; |
537 if ( ch ) | 537 if ( ch ) |
538 sprintf( tmpbuf, "Key: %c(%d) Modifiers: %s(%d)", ch, ch, resolve_keymodifiers(state), state ); | 538 sprintf( tmpbuf, "Key: %c(%d) Modifiers: %s(%d) utf8 %s", ch, ch, resolve_keymodifiers(state), state, utf8 ); |
539 else | 539 else |
540 sprintf( tmpbuf, "Key: %s(%d) Modifiers: %s(%d)", resolve_keyname(vk), vk, resolve_keymodifiers(state), state ); | 540 sprintf( tmpbuf, "Key: %s(%d) Modifiers: %s(%d) utf8 %s", resolve_keyname(vk), vk, resolve_keymodifiers(state), state, utf8 ); |
541 dw_window_set_text( status1, tmpbuf); | 541 dw_window_set_text( status1, tmpbuf); |
542 return 0; | 542 return 0; |
543 } | 543 } |
544 | 544 |
545 int DWSIGNAL menu_callback(HWND window, void *data) | 545 int DWSIGNAL menu_callback(HWND window, void *data) |