Hello Greg, hello everybody,
 
it seems, that my mouse/touch-twin works, at least with the famous ntetris.
But one problem remains unsolved:
 
I could not switch between visible cursor and invisible cursor. Neither with 
function GrInjectPointerEvent(GR_COORD x, GR_COORD y, int button, int visible) 
nor directly with GrShowCursor/&scrdev);/GrHideCursor(&scrdev);.  I have 
implemented it in my two function GsCheckMouseEvent and GsCheckTouchEvent. Once 
the cursor disappears, and it even disappears when using first the mouse 
instead of the touch, it stays disappeared (on startup you can see the mouse 
pointer). If I let the functions without calling the above mentioned functions, 
there is no problem at all and I can work both the touchscreen and the mouse 
with the mousepointer beeing the whole time showing.
 
My code is
 
/*
 * Update mouse status and issue events on it if necessary.
 * This function doesn't block, but is normally only called when
 * there is known to be some data waiting to be read from the mouse.
 */
GR_BOOL GsCheckMouseEvent(void)
{
 GR_COORD rootx;  /* latest mouse x position */
 GR_COORD rooty;  /* latest mouse y position */
 int  newbuttons; /* latest buttons */
 int  mousestatus; /* latest mouse status */
 
 /* Read the latest mouse status: */
 mousestatus = GdReadMouse(&rootx, &rooty, &newbuttons);
 if(mousestatus < 0) {
  GsError(GR_ERROR_MOUSE_ERROR, 0);
  return FALSE;
 } else if(mousestatus) { /* Deliver events as appropriate: */ 
  GdHideCursor(&scrdev);
  GdShowCursor(&scrdev);
  GsHandleMouseStatus(rootx, rooty, newbuttons);
  
  /* possibly reset portrait mode based on mouse position*/
  if (autoportrait)
   GsSetPortraitModeFromXY(rootx, rooty);
  return TRUE;
 }
 return FALSE;
}
 
/*
 * Update touch status and issue events on it if necessary.
 * This function doesn't block, but is normally only called when
 * there is known to be some data waiting to be read from the touch.
 */
GR_BOOL GsCheckTouchEvent(void)
{
 GR_COORD rootx;  /* latest touch x position */
 GR_COORD rooty;  /* latest touch y position */
 int  newbuttons; /* latest buttons */
 int  touchstatus; /* latest touch status */
 
 /* Read the latest touch status: */
 touchstatus = GdReadTouch(&rootx, &rooty, &newbuttons);
 if(touchstatus < 0) {
  GsError(GR_ERROR_MOUSE_ERROR, 0);
  return FALSE;
 } else if(touchstatus) { /* Deliver events as appropriate: */ 
  GdHideCursor(&scrdev);
  GsHandleMouseStatus(rootx, rooty, newbuttons);
  /* possibly reset portrait mode based on touch position*/
  if (autoportrait)
   GsSetPortraitModeFromXY(rootx, rooty);
  return TRUE;
 }
 return FALSE;
}
 
 
and it does also not works if I implement it in devmouse.c in functions 
GdReadMouse and GdReadTouch.Why is that? Any idea?
 

Mit freundlichen Grüßen/Best Regards

Peter Wein

 

SIEMENS AG

Electronic Design and Manufacturing Services 

I&S EDM E STG

Dipl.-Ing. (FH) Peter Wein

Entwicklung Software

Postfach 10 60 26

Weissacher Str. 11

 D-70499 Stuttgart

Tel.:  +49 (0) 711 /-137-6757

Fax:  +49 (0) 711 /-137-6071

mailto:[EMAIL PROTECTED]

 

Siemens Aktiengesellschaft: Vorsitzender des Aufsichtsrats: Gerhard Cromme; 

Vorstand: Klaus Kleinfeld, Vorsitzender; Johannes Feldmayer, 

Joe Kaeser, Rudi Lamprecht, Eduardo Montes, Jürgen Radomski, Erich R. 
Reinhardt, 

Hermann Requardt, Uriel J. Sharef, Klaus Wucherer; 

Sitz der Gesellschaft: Berlin und München; 

Registergericht: Berlin Charlottenburg, HRB 12300, München, HRB 6684; 

WEEE-Reg.-Nr. DE 23691322

 

Wichtiger Hinweis: Diese E-Mail und etwaige Anlagen enthält firmenvertrauliche 
Informationen. 

Sollten Sie diese E-Mail irrtümlich erhalten haben, benachrichtigen Sie uns 
bitte durch Antwort-Mail 

und löschen Sie diese E-Mail nebst Anlagen von Ihrem System. 

Vielen Dank.
 

Reply via email to