Re: How to restrict mouse pointer movement within a certain area using DirectFB?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Here is the implelemtation .. add it to gdk/directfb/gdkwindow-directfb.c

Hope this works for you

void
gdk_display_warp_pointer (GdkDisplay *display,
			  GdkScreen  *screen,
			  gint        x,
			  gint        y)
{

  GdkWindowObject       *private;
  GdkWindowImplDirectFB *impl;
  DFBWindowEvent         evt; 

  GdkWindow *window = gdk_screen_get_root_window (screen);
  private = GDK_WINDOW_OBJECT (window);
  impl = GDK_WINDOW_IMPL_DIRECTFB (private->impl);

  if (x >= 0 && y >= 0) {
    int win_x, win_y;
    impl->window->GetPosition (impl->window, &win_x, &win_y);
    if (_gdk_display->layer->WarpCursor (_gdk_display->layer, win_x+x,
win_y+y))
      return ;
  }
}




Dhananjoy Chutia wrote:
> 
> Hi,
>    I need to restrict mouse pointer within a certain area of the window
> using DirectFB. I got one idea to use
> 
> void gdk_display_warp_pointer
> <http://library.gnome.org/devel/gdk/stable/GdkDisplay.html#gdk-display-warp-pointer>
> (GdkDisplay <http://library.gnome.org/devel/gdk/stable/GdkDisplay.html>
> *display,GdkScreen
> <http://library.gnome.org/devel/gdk/stable/GdkScreen.html> *screen,
> gint x, gint y);
> 
> But, the function is not implemented for DirectFB,  in any of the gtk
> distribution. I will be grateful enough for your suggestion regarding my
> query
> 
> 
> Regards
> 
> Dhananjoy.
> 
> _______________________________________________
> gnome-list mailing list
> gnome-list@xxxxxxxxx
> http://mail.gnome.org/mailman/listinfo/gnome-list
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-restrict-mouse-pointer-movement-within-a-certain-area-using-DirectFB--tp19142686p19178565.html
Sent from the Gnome - General mailing list archive at Nabble.com.

_______________________________________________
gnome-list mailing list
gnome-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gnome-list

[Index of Archives]     [Fedora Desktop]     [Trinity Users]     [KDE]     [Gimp]     [Yosemite News]

  Powered by Linux