Skip navigation.
Home
The QNX Community Portal

View topic - PtAddEventHandler and Ph_EV_BOUNDARY not works! Please Help)

PtAddEventHandler and Ph_EV_BOUNDARY not works! Please Help)

Isn't the name clear?

PtAddEventHandler and Ph_EV_BOUNDARY not works! Please Help)

Postby Fregl » Mon Sep 08, 2008 8:41 am

Hi.
i have many widgets on main form in scrollarea.
i need atach callbacks to this widgets.
callback for mouse button press|release and boundary.
well, press and release works fine, but for boundary widgets don't invoke callcbak for Ph_EV_BOUNDARY.
Widgets i did in PhAb, not in code.

sample of my code
Code: Select all
int         CallBack(PtWidget_t *widget, void * data, PtCallbackInfo_t *cbinfo)
{
   printf("Type %d Subtype %d\t",cbinfo->event->type,cbinfo->event->subtype);
   switch (cbinfo->event->type)
   {
      case   Ph_EV_BOUNDARY:
         switch (cbinfo->event->subtype)
            {
               case   Ph_EV_PTR_ENTER:   printf("Enter\n"); break;
               case   Ph_EV_PTR_LEAVE:   printf("Leave\n"); break;
            }
      break;
      case   Ph_EV_BUT_PRESS: printf("Press\n"); break;
      case   Ph_EV_BUT_RELEASE: printf("Release\n"); break;
   }
   return   Pt_CONTINUE;
}


and now i attach this callback to some test widget(PtRect in my case) on app's startup
Code: Select all
PtAddEventHandler(sv_arr[0]->Border,Ph_EV_PTR_MOTION_NOBUTTON | Ph_EV_BUT_RELEASE | Ph_EV_BUT_PRESS | Ph_EV_BOUNDARY,CallBack,NULL);


well, when i\m clicking on it - events for Release and Press - works fine.
when i moving mouse pointer in/out widget - nothing happens!
but if i attach this callbacks throuh PhAB - all events work fine.

any suggestions?
Fregl
Active Member
 
Posts: 41
Joined: Thu Jun 05, 2008 10:43 am
Location: Ukraine

Return to GUI Programming

Who is online

Users browsing this forum: No registered users and 2 guests