Re: [directfb-dev] Mouse pointer ..............



I'm not sure this will work, as gdk_cursor_new_from_pixmap() is badly implemented in gdkdfb (see bug 330420).

cheers

Attilio

Pedro Aguilar wrote:
Hi,

You can do it directly with GDK too.
In this way you can show/hide the cursor whenever you want.
Here's a sample code that worked for me:

GtkWidget *widget;
gchar     bits[] = {0};
GdkColor  color = {0, 0, 0, 0};
GdkPixmap *pixmap;
GdkCursor *cursor;

gtk_init (&argc, &argv);
widget = gtk_window_new(GTK_WINDOW_TOPLEVEL);

pixmap = gdk_bitmap_create_from_data(NULL, bits, 1, 1);
cursor = gdk_cursor_new_from_pixmap(pixmap, pixmap, &color, &color, 0, 0);

gtk_widget_show(widget);

gdk_window_set_cursor(widget->window, cursor);

gtk_main ();


Pedro Aguilar


That will work also.
The gdk/x11 way is a clear cursor.

Both should work.

On 11/9/06, Attilio Fiandrotti <attilio fiandrotti gmail com> wrote:

I can make the cursor to disapper by simply adding "no-cursor" to the
directfbrc [1] file, is there a chance this may not work in some cases?
If this should not work, you could try moving the mouse to the
bottm-right corner of the screen.

cheers

Attilio

[1] http://www.directfb.org/docs/directfbrc.5.html

Mike Emmel wrote:

Good question I'd say try setting the pointer pixmap to a clear ARGB

surface.

But I'm not sure that actually works some support was added for custom
cursors but I've not used it.


On 11/9/06, rafeeqh shaik <shaik rafeeqh gmail com> wrote:


hi......

I am trying to run gtk+ on DirectFB applications for embedded device.
when i run application i am getting mouse pointer on top of the

window.

I am not using mouse so i want mouse pointer to be invisble.

could any one plz throw some light how to disable the mouse pointer,

Thanks.

--
SHAIK RAFEEQH
IIT DELHI
_______________________________________________
gtk-devel-list mailing list
gtk-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list




_______________________________________________
gtk-devel-list mailing list
gtk-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list


_______________________________________________
gtk-devel-list mailing list
gtk-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list


_______________________________________________
directfb-dev mailing list
directfb-dev directfb org
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev









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