Touch screen events | developer.brewmp.com Touch screen events | developer.brewmp.com

Developer

Touch screen events

Forums:

How Select event will be handled in touch screen scenario. for example i checked the position of my cursor and accordingly i activated soft key menu. It has two items select and exit.

How the event will be handled when user double click any item of soft key menu?

In non touch screen phones i check for wParam if it is AVK_SELECT and soft key menu is activated then i get id using IMENUCTL_GetSel(pMe->m_pSK) and accordingly i perform my action.

Please let me know how this can be handled in touch screen phones?

Menu items can be selected using "Double click".

Menu items can be selected using "Double click".

adhudase;82226 wrote:Menu items can be selected using "Double click".
Thanks for the reply...
I passed the pointer event to ITextCtl_Handleevent. It is working fine on simulator but crashes on samsung corby f339.
Following is my code snippet.
case EVT_POINTER_DOWN:
pMe->co_ordinate_Str = (char *)dwParam;
pMe->touch_x = AEE_POINTER_GET_X(pMe->co_ordinate_Str);
pMe->touch_y = AEE_POINTER_GET_Y(pMe->co_ordinate_Str);
if(pMe->touch_y<60 && !(ITEXTCTL_IsActive(pMe->m_pTextUserName)))
{
ICONTROL_SetActive((IControl*)pMe->m_pTextUserName,TRUE);
ITEXTCTL_Redraw(pMe->m_pTextUserName);

if(ITEXTCTL_IsActive(pMe->m_pTextUserName))
{
ITEXTCTL_HandleEvent(pMe->m_pTextUserName, eCode, AVK_SELECT, dwParam);
ITEXTCTL_Redraw(pMe->m_pTextUserName);

Please let me know where i am lacking....

adhudase;82226 wrote:Menu items can be selected using "Double click".
Thanks for the reply...
I passed the pointer event to ITextCtl_Handleevent. It is working fine on simulator but crashes on samsung corby f339.
Following is my code snippet.
case EVT_POINTER_DOWN:
pMe->co_ordinate_Str = (char *)dwParam;
pMe->touch_x = AEE_POINTER_GET_X(pMe->co_ordinate_Str);
pMe->touch_y = AEE_POINTER_GET_Y(pMe->co_ordinate_Str);
if(pMe->touch_y<60 && !(ITEXTCTL_IsActive(pMe->m_pTextUserName)))
{
ICONTROL_SetActive((IControl*)pMe->m_pTextUserName,TRUE);
ITEXTCTL_Redraw(pMe->m_pTextUserName);

if(ITEXTCTL_IsActive(pMe->m_pTextUserName))
{
ITEXTCTL_HandleEvent(pMe->m_pTextUserName, eCode, AVK_SELECT, dwParam);
ITEXTCTL_Redraw(pMe->m_pTextUserName);

Please let me know where i am lacking....

Hi,
Don't know if this is related, but you probably shouldn't be holding onto dwParam with pMe->co_ordinate_Str.  Just use dwParam in AEE_POINTER_GET_X and AEE_POINTER_GET_Y.  If you really need to keep it around, copy dwParam.
-
 
Regards,
 
Jason
 

Hi,
Don't know if this is related, but you probably shouldn't be holding onto dwParam with pMe->co_ordinate_Str.  Just use dwParam in AEE_POINTER_GET_X and AEE_POINTER_GET_Y.  If you really need to keep it around, copy dwParam.
-
 
Regards,
 
Jason
 

Hi all,
I m stuck in AEE_POINTER_GET_X and _Y()
it is giving me some another points on my device , i m trying to draw a point wherever i click on screen but it is drawing somewhere else....
my code is as follows::
x and y are uint8;
pMe->x = AEE_POINTER_GET_X((char*)dwParam);pMe->y = AEE_POINTER_GET_Y((char*)dwParam);
DBGPRINTF("P_UP::X=%u  Y=%u ",pMe->x,pMe->y);// result some diffrent value
//if i have 176X200 pixel screen then sometimes it give y as 230 or 260 , any value ..... outside bound ...
kindly help me out ...
how can i convert uint8 into pixels on screen....

Hi all,
I m stuck in AEE_POINTER_GET_X and _Y()
it is giving me some another points on my device , i m trying to draw a point wherever i click on screen but it is drawing somewhere else....
my code is as follows::
x and y are uint8;
pMe->x = AEE_POINTER_GET_X((char*)dwParam);pMe->y = AEE_POINTER_GET_Y((char*)dwParam);
DBGPRINTF("P_UP::X=%u  Y=%u ",pMe->x,pMe->y);// result some diffrent value
//if i have 176X200 pixel screen then sometimes it give y as 230 or 260 , any value ..... outside bound ...
kindly help me out ...
how can i convert uint8 into pixels on screen....

Please don't post same query again and again. Please see your other thread.

Please don't post same query again and again. Please see your other thread.