Re: [E-devel] [PATCH] Fix the bug that user cannot input key

2011-11-01 Thread Vincent Torri

hey

about utf16 to utf8 conversion, can you try the function below ? If it 
works, I commit it.

Vincent


char *
evil_utf16_to_utf8(const wchar_t *text16)
{
char  *text8;
DWORD  flag = 0;
intsize8;

if ((!text16) || (*text16 == L'\0'))
  return NULL;

#if _WIN32_WINNT = 0x0600
flag = WC_ERR_INVALID_CHARS;;
#endif

size8 = WideCharToMultiByte(CP_UTF8, flag, text16, -1, NULL, 0, NULL, NULL);
if (size8 == 0)
  return NULL;

text8 = (char*)malloc(size8 * sizeof(char));
if (!text8)
  return NULL;

size8 = WideCharToMultiByte(CP_UTF8, flag, text16, -1, text8, size8, NULL, 
NULL);
if (size8 == 0)
  return NULL;

return text8;
}

--
RSAreg; Conference 2012
Save #36;700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [PATCH] Fix the bug that user cannot input key

2011-11-01 Thread The Rasterman
On Tue, 1 Nov 2011 08:54:47 +0100 (CET) Vincent Torri vto...@univ-evry.fr
said:

does that work on wince?

 
 hey
 
 about utf16 to utf8 conversion, can you try the function below ? If it 
 works, I commit it.
 
 Vincent
 
 
 char *
 evil_utf16_to_utf8(const wchar_t *text16)
 {
 char  *text8;
 DWORD  flag = 0;
 intsize8;
 
 if ((!text16) || (*text16 == L'\0'))
   return NULL;
 
 #if _WIN32_WINNT = 0x0600
 flag = WC_ERR_INVALID_CHARS;;
 #endif
 
 size8 = WideCharToMultiByte(CP_UTF8, flag, text16, -1, NULL, 0, NULL,
 NULL); if (size8 == 0)
   return NULL;
 
 text8 = (char*)malloc(size8 * sizeof(char));
 if (!text8)
   return NULL;
 
 size8 = WideCharToMultiByte(CP_UTF8, flag, text16, -1, text8, size8,
 NULL, NULL); if (size8 == 0)
   return NULL;
 
 return text8;
 }
 
 --
 RSAreg; Conference 2012
 Save #36;700 by Nov 18
 Register now
 http://p.sf.net/sfu/rsa-sfdev2dev1
 ___
 enlightenment-devel mailing list
 enlightenment-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
 


-- 
- Codito, ergo sum - I code, therefore I am --
The Rasterman (Carsten Haitzler)ras...@rasterman.com


--
RSAreg; Conference 2012
Save #36;700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [PATCH] Fix the bug that user cannot input key

2011-11-01 Thread The Rasterman
On Tue, 1 Nov 2011 16:27:35 +0100 (CET) Vincent Torri vto...@univ-evry.fr
said:

 
 
 On Tue, 1 Nov 2011, Carsten Haitzler (The Rasterman) wrote:
 
  On Tue, 1 Nov 2011 08:54:47 +0100 (CET) Vincent Torri vto...@univ-evry.fr
  said:
 
  does that work on wince?
 
 not tested, but it should:
 
 http://msdn.microsoft.com/en-us/library/aa908730.aspx
 
 I can tweak it a bit though, to give a nice error message if it fails 
 (both win32 and win ce)

then this seems an adequate solution. :)

 Vincent
 
 
 
  hey
 
  about utf16 to utf8 conversion, can you try the function below ? If it
  works, I commit it.
 
  Vincent
 
 
  char *
  evil_utf16_to_utf8(const wchar_t *text16)
  {
  char  *text8;
  DWORD  flag = 0;
  intsize8;
 
  if ((!text16) || (*text16 == L'\0'))
return NULL;
 
  #if _WIN32_WINNT = 0x0600
  flag = WC_ERR_INVALID_CHARS;;
  #endif
 
  size8 = WideCharToMultiByte(CP_UTF8, flag, text16, -1, NULL, 0, NULL,
  NULL); if (size8 == 0)
return NULL;
 
  text8 = (char*)malloc(size8 * sizeof(char));
  if (!text8)
return NULL;
 
  size8 = WideCharToMultiByte(CP_UTF8, flag, text16, -1, text8, size8,
  NULL, NULL); if (size8 == 0)
return NULL;
 
  return text8;
  }
 
  --
  RSAreg; Conference 2012
  Save #36;700 by Nov 18
  Register now
  http://p.sf.net/sfu/rsa-sfdev2dev1
  ___
  enlightenment-devel mailing list
  enlightenment-devel@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
 
 
 
  -- 
  - Codito, ergo sum - I code, therefore I am --
  The Rasterman (Carsten Haitzler)ras...@rasterman.com
 
 
 


-- 
- Codito, ergo sum - I code, therefore I am --
The Rasterman (Carsten Haitzler)ras...@rasterman.com


--
RSA#174; Conference 2012
Save $700 by Nov 18
Register now#33;
http://p.sf.net/sfu/rsa-sfdev2dev1
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [PATCH] Fix the bug that user cannot input key

2011-10-31 Thread The Rasterman
On Fri, 28 Oct 2011 21:03:49 +0900 Jihoon Kim jihoon48@samsung.com said:

also TranslateMessage needs to be called on KEYDOWNS... and KEYDOWN events
and ALL events after the keydown have to be queued and held UNTIL the WM_CHAR
that corresponds the KEYDOWN that is being held comes in
then the WM_CHAR is matched up to that keydown, the string for the key is put
into the event along with keyname and keysymbol and all events should be passed
on/flushed after it until there are none left OR the next pending KEYDOWN being
held are reached. this is necessary to keep order of events right like key
downs BEFORE key up's etc. also note that the strings in windows are UTF-16.
efl is expecting UTF-8. u need to eina_str_convert() it to UTF-8

 Hi, EFL developers and Vincent.
 
 On Windows 7, there are some bugs related to key input in elementary_test.
 1. alphabet and symbol characters doesn't be inputted in elementary entry.
 2. When the space key is pressed, space string is entered in elementary
 entry.
 
 In this patch, I've tried to fix the above bugs.
 It works well when I tested.
 
 Would you please review this patch?
 


-- 
- Codito, ergo sum - I code, therefore I am --
The Rasterman (Carsten Haitzler)ras...@rasterman.com


--
Get your Android app more play: Bring it to the BlackBerry PlayBook 
in minutes. BlackBerry App World#153; now supports Android#153; Apps 
for the BlackBerryreg; PlayBook#153;. Discover just how easy and simple 
it is! http://p.sf.net/sfu/android-dev2dev
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [PATCH] Fix the bug that user cannot input key

2011-10-31 Thread Jihoon Kim
At this moment, space is processed in case of WM_KEYDOWN and WM_CHAR.

Therefore, 'space' key is processed twice, it makes bug.

In previous my patch, I changed keyname and string wrong.

I send the revised patch again.

Would you please review again?

-Original Message-
From: Carsten Haitzler (The Rasterman) [mailto:ras...@rasterman.com] 
Sent: Monday, October 31, 2011 12:28 PM
To: Enlightenment developer list
Cc: Jihoon Kim
Subject: Re: [E-devel] [PATCH] Fix the bug that user cannot input key

On Fri, 28 Oct 2011 21:03:49 +0900 Jihoon Kim jihoon48@samsung.com
said:

i don't think this is right. this means u get 2 key press events, with with
key string, one without... :(

 Hi, EFL developers and Vincent.
 
 On Windows 7, there are some bugs related to key input in elementary_test.
 1. alphabet and symbol characters doesn't be inputted in elementary entry.
 2. When the space key is pressed, space string is entered in elementary
 entry.
 
 In this patch, I've tried to fix the above bugs.
 It works well when I tested.
 
 Would you please review this patch?
 


-- 
- Codito, ergo sum - I code, therefore I am --
The Rasterman (Carsten Haitzler)ras...@rasterman.com

Index: src/lib/ecore_win32/ecore_win32.c
===
--- src/lib/ecore_win32/ecore_win32.c   (revision 64494)
+++ src/lib/ecore_win32/ecore_win32.c   (working copy)
@@ -86,10 +86,10 @@ _ecore_win32_window_procedure(HWND   window,
INF(keydown message);
_ecore_win32_event_handle_key_press(data, 1);
return 0;
- /* case WM_CHAR: */
- /*   INF(char message); */
- /*   _ecore_win32_event_handle_key_press(data, 0); */
- /*   return 0; */
+ case WM_CHAR:
+   INF(char message);
+   _ecore_win32_event_handle_key_press(data, 0);
+   return 0;
  case WM_KEYUP:
INF(keyup message);
_ecore_win32_event_handle_key_release(data, 1);
Index: src/lib/ecore_win32/ecore_win32_event.c
===
--- src/lib/ecore_win32/ecore_win32_event.c (revision 64494)
+++ src/lib/ecore_win32/ecore_win32_event.c (working copy)
@@ -798,11 +798,6 @@ _ecore_win32_event_keystroke_get(intkey,
kc = KP_Delete;
  }
break;
- case VK_SPACE:
-   kn = space;
-   ks = space;
-   kc = space;
-   break;
  case VK_F1:
kn = F1;
ks = F1;
@@ -994,7 +989,7 @@ _ecore_win32_event_char_get(intkey,
  case VK_SPACE:
strncpy(kn, space, 32);
strncpy(ks, space, 32);
-   strncpy(kc, space, 32);
+   strncpy(kc,  , 32);
break;
  default:
/* displayable characters */

--
Get your Android app more play: Bring it to the BlackBerry PlayBook 
in minutes. BlackBerry App World#153; now supports Android#153; Apps 
for the BlackBerryreg; PlayBook#153;. Discover just how easy and simple 
it is! http://p.sf.net/sfu/android-dev2dev
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [PATCH] Fix the bug that user cannot input key

2011-10-31 Thread The Rasterman
On Mon, 31 Oct 2011 15:46:35 +0900 Jihoon Kim jihoon48@samsung.com said:

i am wondering if we still need utf-=16 conversion? i think this works for
conversions to ascii but things like Ö are not goign to turn out well. right
now it works only because the key integer (which really is the first char of a
utf16 string - right?) when converted to a char fits inside the ascii range. :)
(in _ecore_win32_event_char_get())

 At this moment, space is processed in case of WM_KEYDOWN and WM_CHAR.
 
 Therefore, 'space' key is processed twice, it makes bug.
 
 In previous my patch, I changed keyname and string wrong.
 
 I send the revised patch again.
 
 Would you please review again?
 
 -Original Message-
 From: Carsten Haitzler (The Rasterman) [mailto:ras...@rasterman.com] 
 Sent: Monday, October 31, 2011 12:28 PM
 To: Enlightenment developer list
 Cc: Jihoon Kim
 Subject: Re: [E-devel] [PATCH] Fix the bug that user cannot input key
 
 On Fri, 28 Oct 2011 21:03:49 +0900 Jihoon Kim jihoon48@samsung.com
 said:
 
 i don't think this is right. this means u get 2 key press events, with with
 key string, one without... :(
 
  Hi, EFL developers and Vincent.
  
  On Windows 7, there are some bugs related to key input in elementary_test.
  1. alphabet and symbol characters doesn't be inputted in elementary entry.
  2. When the space key is pressed, space string is entered in elementary
  entry.
  
  In this patch, I've tried to fix the above bugs.
  It works well when I tested.
  
  Would you please review this patch?
  
 
 
 -- 
 - Codito, ergo sum - I code, therefore I am --
 The Rasterman (Carsten Haitzler)ras...@rasterman.com


-- 
- Codito, ergo sum - I code, therefore I am --
The Rasterman (Carsten Haitzler)ras...@rasterman.com


--
Get your Android app more play: Bring it to the BlackBerry PlayBook 
in minutes. BlackBerry App World#153; now supports Android#153; Apps 
for the BlackBerryreg; PlayBook#153;. Discover just how easy and simple 
it is! http://p.sf.net/sfu/android-dev2dev
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [PATCH] Fix the bug that user cannot input key

2011-10-31 Thread The Rasterman
On Mon, 31 Oct 2011 15:46:35 +0900 Jihoon Kim jihoon48@samsung.com said:

utf-16 issue still there :(

 At this moment, space is processed in case of WM_KEYDOWN and WM_CHAR.
 
 Therefore, 'space' key is processed twice, it makes bug.
 
 In previous my patch, I changed keyname and string wrong.
 
 I send the revised patch again.
 
 Would you please review again?
 
 -Original Message-
 From: Carsten Haitzler (The Rasterman) [mailto:ras...@rasterman.com] 
 Sent: Monday, October 31, 2011 12:28 PM
 To: Enlightenment developer list
 Cc: Jihoon Kim
 Subject: Re: [E-devel] [PATCH] Fix the bug that user cannot input key
 
 On Fri, 28 Oct 2011 21:03:49 +0900 Jihoon Kim jihoon48@samsung.com
 said:
 
 i don't think this is right. this means u get 2 key press events, with with
 key string, one without... :(
 
  Hi, EFL developers and Vincent.
  
  On Windows 7, there are some bugs related to key input in elementary_test.
  1. alphabet and symbol characters doesn't be inputted in elementary entry.
  2. When the space key is pressed, space string is entered in elementary
  entry.
  
  In this patch, I've tried to fix the above bugs.
  It works well when I tested.
  
  Would you please review this patch?
  
 
 
 -- 
 - Codito, ergo sum - I code, therefore I am --
 The Rasterman (Carsten Haitzler)ras...@rasterman.com
 


-- 
- Codito, ergo sum - I code, therefore I am --
The Rasterman (Carsten Haitzler)ras...@rasterman.com


--
Get your Android app more play: Bring it to the BlackBerry PlayBook 
in minutes. BlackBerry App World#153; now supports Android#153; Apps 
for the BlackBerryreg; PlayBook#153;. Discover just how easy and simple 
it is! http://p.sf.net/sfu/android-dev2dev
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [PATCH] Fix the bug that user cannot input key

2011-10-31 Thread The Rasterman
On Mon, 31 Oct 2011 15:46:35 +0900 Jihoon Kim jihoon48@samsung.com said:

ok - i've put this in and implemented the wince code too for the same changes.
it's not right yet - still need utf16-utf8 conversion... but its better than
it was.

 At this moment, space is processed in case of WM_KEYDOWN and WM_CHAR.
 
 Therefore, 'space' key is processed twice, it makes bug.
 
 In previous my patch, I changed keyname and string wrong.
 
 I send the revised patch again.
 
 Would you please review again?
 
 -Original Message-
 From: Carsten Haitzler (The Rasterman) [mailto:ras...@rasterman.com] 
 Sent: Monday, October 31, 2011 12:28 PM
 To: Enlightenment developer list
 Cc: Jihoon Kim
 Subject: Re: [E-devel] [PATCH] Fix the bug that user cannot input key
 
 On Fri, 28 Oct 2011 21:03:49 +0900 Jihoon Kim jihoon48@samsung.com
 said:
 
 i don't think this is right. this means u get 2 key press events, with with
 key string, one without... :(
 
  Hi, EFL developers and Vincent.
  
  On Windows 7, there are some bugs related to key input in elementary_test.
  1. alphabet and symbol characters doesn't be inputted in elementary entry.
  2. When the space key is pressed, space string is entered in elementary
  entry.
  
  In this patch, I've tried to fix the above bugs.
  It works well when I tested.
  
  Would you please review this patch?
  
 
 
 -- 
 - Codito, ergo sum - I code, therefore I am --
 The Rasterman (Carsten Haitzler)ras...@rasterman.com
 


-- 
- Codito, ergo sum - I code, therefore I am --
The Rasterman (Carsten Haitzler)ras...@rasterman.com


--
RSAreg; Conference 2012
Save #36;700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [PATCH] Fix the bug that user cannot input key

2011-10-30 Thread The Rasterman
On Fri, 28 Oct 2011 21:03:49 +0900 Jihoon Kim jihoon48@samsung.com said:

i don't think this is right. this means u get 2 key press events, with with
key string, one without... :(

 Hi, EFL developers and Vincent.
 
 On Windows 7, there are some bugs related to key input in elementary_test.
 1. alphabet and symbol characters doesn't be inputted in elementary entry.
 2. When the space key is pressed, space string is entered in elementary
 entry.
 
 In this patch, I've tried to fix the above bugs.
 It works well when I tested.
 
 Would you please review this patch?
 


-- 
- Codito, ergo sum - I code, therefore I am --
The Rasterman (Carsten Haitzler)ras...@rasterman.com


--
Get your Android app more play: Bring it to the BlackBerry PlayBook 
in minutes. BlackBerry App World#153; now supports Android#153; Apps 
for the BlackBerryreg; PlayBook#153;. Discover just how easy and simple 
it is! http://p.sf.net/sfu/android-dev2dev
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel