mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-09 19:03:29 +00:00
j
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@402 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
@@ -37,8 +37,9 @@ typedef void* MwLLPixmap;
|
|||||||
#define MwLLDispatch(x, y, z) \
|
#define MwLLDispatch(x, y, z) \
|
||||||
if(x->handler != NULL && x->handler->y != NULL) x->handler->y(x, z)
|
if(x->handler != NULL && x->handler->y != NULL) x->handler->y(x, z)
|
||||||
|
|
||||||
|
#define MwLLKeyMask (1 << 31)
|
||||||
enum MwLLKeyEnum {
|
enum MwLLKeyEnum {
|
||||||
MwLLKeyBackSpace = (1 << 31) | 1,
|
MwLLKeyBackSpace = MwLLKeyMask | 1,
|
||||||
MwLLKeyLeft,
|
MwLLKeyLeft,
|
||||||
MwLLKeyRight,
|
MwLLKeyRight,
|
||||||
MwLLKeyUp,
|
MwLLKeyUp,
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ static void key(MwWidget handle, int code) {
|
|||||||
} else if(code == MwLLKeyRight) {
|
} else if(code == MwLLKeyRight) {
|
||||||
if(t->cursor == MwUTF8Length(str)) return;
|
if(t->cursor == MwUTF8Length(str)) return;
|
||||||
t->cursor++;
|
t->cursor++;
|
||||||
} else {
|
} else if(!(code & MwLLKeyMask)) {
|
||||||
int incr = 0;
|
int incr = 0;
|
||||||
out = malloc(strlen(str) + 5 + 1);
|
out = malloc(strlen(str) + 5 + 1);
|
||||||
incr += MwUTF8Copy(str, 0, out, 0, t->cursor);
|
incr += MwUTF8Copy(str, 0, out, 0, t->cursor);
|
||||||
|
|||||||
Reference in New Issue
Block a user