On 2011-09-01 at 11:01, yann LE HIR wrote:
> A few days ago I was asked to find a way to change the mouse cursor in
> a clutter Stage via pyclutter.
> As there is no API for this in clutter, and it didn't seems possible
> to retrieve X display and X window objects in pyclutter.
> 
> I came up with a patch for clutter 1.6.16 and pyclutter.
> I only added the X11 backend functions.
> 
> Any feedback is appreciated.

first of all, many thanks for the patch.

second of all, sorry, but I am not going to accept it.

if I wanted to add support for X11 named cursors I would have done it 4
or 5 years ago; adding cursors, as you might have started to find out
whilst doing this patch, opens up a whole can of worms in terms of
exposing the windowing system and cross-platform support:

  - named cursors are bleeding edge 1994 technology;
  - named cursors are not integers on non-X11 platforms, so we'd
    need a ClutterCursor opaque type;
  - on X11: cursor themes would need to be supported;
    - including changes in the cursor themes;
  - on X11: cursor pixmaps would need to be supported;
    - including defining the actual hot coordinates of the
      pixmap
  - multi-device support would be needed to change the cursor
    on a per-device basis

the patch (or, more likely, patches) to implement this in Clutter alone
are going to re-implement a sizeable portion of GDK.

the nice thing is that in the next cycle (1.9, leading to 1.10 in 2012)
we'll have a GDK backend, which will allow you to use the GDK API to
change the cursor.

> Is there an other way to do this without modifying clutter source code ?

write a small C/Python module that uses Xlib internally to change the
cursor.

ciao,
 Emmanuele.

-- 
Emmanuele Bassi,
Intel Open Source Technology Center
_______________________________________________
clutter-app-devel-list mailing list
[email protected]
http://lists.clutter-project.org/listinfo/clutter-app-devel-list

Reply via email to