parent
8b6899154c
commit
a3970d1f96
|
@ -368,3 +368,7 @@
|
||||||
2011-12-02 Term <term@twistedpath.org>
|
2011-12-02 Term <term@twistedpath.org>
|
||||||
|
|
||||||
* added ecore_x_randr_output_backlight_available()
|
* added ecore_x_randr_output_backlight_available()
|
||||||
|
|
||||||
|
2011-12-03 Vincent Torri
|
||||||
|
|
||||||
|
* Fix the modifiers value (Windows XP)
|
||||||
|
|
|
@ -10,6 +10,8 @@ Additions:
|
||||||
Improvements:
|
Improvements:
|
||||||
* ecore:
|
* ecore:
|
||||||
- most allocations moved to mempools
|
- most allocations moved to mempools
|
||||||
|
* ecore_win32:
|
||||||
|
- fix modifiers value on Windows XP
|
||||||
|
|
||||||
|
|
||||||
Ecore 1.1.0
|
Ecore 1.1.0
|
||||||
|
|
|
@ -46,16 +46,17 @@ static void _ecore_win32_event_free_key_up(void *data,
|
||||||
void *ev);
|
void *ev);
|
||||||
|
|
||||||
static int _ecore_win32_event_keystroke_get(Ecore_Win32_Callback_Data *msg,
|
static int _ecore_win32_event_keystroke_get(Ecore_Win32_Callback_Data *msg,
|
||||||
Eina_Bool is_down,
|
Eina_Bool is_down,
|
||||||
char **keyname,
|
char **keyname,
|
||||||
char **keysymbol,
|
char **keysymbol,
|
||||||
char **keycompose,
|
char **keycompose,
|
||||||
unsigned int *modifiers);
|
unsigned int *modifiers);
|
||||||
|
|
||||||
static int _ecore_win32_event_char_get(int key,
|
static int _ecore_win32_event_char_get(int key,
|
||||||
char **keyname,
|
char **keyname,
|
||||||
char **keysymbol,
|
char **keysymbol,
|
||||||
char **keycompose);
|
char **keycompose,
|
||||||
|
unsigned int *modifiers);
|
||||||
|
|
||||||
|
|
||||||
/***** Global functions definitions *****/
|
/***** Global functions definitions *****/
|
||||||
|
@ -89,7 +90,8 @@ _ecore_win32_event_handle_key_press(Ecore_Win32_Callback_Data *msg,
|
||||||
if (!_ecore_win32_event_char_get(LOWORD(msg->window_param),
|
if (!_ecore_win32_event_char_get(LOWORD(msg->window_param),
|
||||||
(char **)&e->keyname,
|
(char **)&e->keyname,
|
||||||
(char **)&e->key,
|
(char **)&e->key,
|
||||||
(char **)&e->string))
|
(char **)&e->string,
|
||||||
|
&e->modifiers))
|
||||||
{
|
{
|
||||||
free(e);
|
free(e);
|
||||||
return;
|
return;
|
||||||
|
@ -131,7 +133,8 @@ _ecore_win32_event_handle_key_release(Ecore_Win32_Callback_Data *msg)
|
||||||
!_ecore_win32_event_char_get(LOWORD(msg->window_param),
|
!_ecore_win32_event_char_get(LOWORD(msg->window_param),
|
||||||
(char **)&e->keyname,
|
(char **)&e->keyname,
|
||||||
(char **)&e->key,
|
(char **)&e->key,
|
||||||
(char **)&e->string))
|
(char **)&e->string,
|
||||||
|
&e->modifiers))
|
||||||
{
|
{
|
||||||
free(e);
|
free(e);
|
||||||
return;
|
return;
|
||||||
|
@ -830,7 +833,7 @@ _ecore_win32_event_keystroke_get(Ecore_Win32_Callback_Data *msg,
|
||||||
ks = "Shift_R";
|
ks = "Shift_R";
|
||||||
kc = "";
|
kc = "";
|
||||||
}
|
}
|
||||||
*modifiers |= ECORE_EVENT_MODIFIER_SHIFT;
|
*modifiers &= ~ECORE_EVENT_MODIFIER_SHIFT;
|
||||||
}
|
}
|
||||||
else /* is_up */
|
else /* is_up */
|
||||||
{
|
{
|
||||||
|
@ -852,7 +855,7 @@ _ecore_win32_event_keystroke_get(Ecore_Win32_Callback_Data *msg,
|
||||||
kc = "";
|
kc = "";
|
||||||
_ecore_win32_key_mask &= ~ECORE_WIN32_KEY_MASK_RSHIFT;
|
_ecore_win32_key_mask &= ~ECORE_WIN32_KEY_MASK_RSHIFT;
|
||||||
}
|
}
|
||||||
*modifiers &= ~ECORE_EVENT_MODIFIER_SHIFT;
|
*modifiers |= ECORE_EVENT_MODIFIER_SHIFT;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1138,6 +1141,25 @@ _ecore_win32_event_keystroke_get(Ecore_Win32_Callback_Data *msg,
|
||||||
kn = (char *)buf;
|
kn = (char *)buf;
|
||||||
ks = (char *)buf;
|
ks = (char *)buf;
|
||||||
kc = (char *)buf;
|
kc = (char *)buf;
|
||||||
|
|
||||||
|
res = GetAsyncKeyState(VK_SHIFT);
|
||||||
|
if (res & 0x8000)
|
||||||
|
*modifiers |= ECORE_EVENT_MODIFIER_SHIFT;
|
||||||
|
else
|
||||||
|
*modifiers &= ~ECORE_EVENT_MODIFIER_SHIFT;
|
||||||
|
|
||||||
|
res = GetKeyState(VK_CONTROL);
|
||||||
|
if (res & 0x8000)
|
||||||
|
*modifiers |= ECORE_EVENT_MODIFIER_CTRL;
|
||||||
|
else
|
||||||
|
*modifiers &= ~ECORE_EVENT_MODIFIER_CTRL;
|
||||||
|
|
||||||
|
res = GetKeyState(VK_MENU);
|
||||||
|
if (res & 0x8000)
|
||||||
|
*modifiers |= ECORE_EVENT_MODIFIER_ALT;
|
||||||
|
else
|
||||||
|
*modifiers &= ~ECORE_EVENT_MODIFIER_ALT;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1172,15 +1194,17 @@ _ecore_win32_event_keystroke_get(Ecore_Win32_Callback_Data *msg,
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
_ecore_win32_event_char_get(int key,
|
_ecore_win32_event_char_get(int key,
|
||||||
char **keyname,
|
char **keyname,
|
||||||
char **keysymbol,
|
char **keysymbol,
|
||||||
char **keycompose)
|
char **keycompose,
|
||||||
|
unsigned int *modifiers)
|
||||||
{
|
{
|
||||||
char *kn = NULL;
|
char *kn = NULL;
|
||||||
char *ks = NULL;
|
char *ks = NULL;
|
||||||
char *kc = NULL;
|
char *kc = NULL;
|
||||||
char buf[2];
|
char buf[2];
|
||||||
|
SHORT res;
|
||||||
|
|
||||||
*keyname = NULL;
|
*keyname = NULL;
|
||||||
*keysymbol = NULL;
|
*keysymbol = NULL;
|
||||||
|
@ -1249,5 +1273,23 @@ _ecore_win32_event_char_get(int key,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
res = GetAsyncKeyState(VK_SHIFT);
|
||||||
|
if (res & 0x8000)
|
||||||
|
*modifiers |= ECORE_EVENT_MODIFIER_SHIFT;
|
||||||
|
else
|
||||||
|
*modifiers &= ~ECORE_EVENT_MODIFIER_SHIFT;
|
||||||
|
|
||||||
|
res = GetKeyState(VK_CONTROL);
|
||||||
|
if (res & 0x8000)
|
||||||
|
*modifiers |= ECORE_EVENT_MODIFIER_CTRL;
|
||||||
|
else
|
||||||
|
*modifiers &= ~ECORE_EVENT_MODIFIER_CTRL;
|
||||||
|
|
||||||
|
res = GetKeyState(VK_MENU);
|
||||||
|
if (res & 0x8000)
|
||||||
|
*modifiers |= ECORE_EVENT_MODIFIER_ALT;
|
||||||
|
else
|
||||||
|
*modifiers &= ~ECORE_EVENT_MODIFIER_ALT;
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue