Hi BJ,
currently DirectFB does not support dynamic plugging of USB (or any other type) devices. This is because the moment that the input libraries are loaded, a check is done to see which devices are connected; this check is not performed again at a later date.

If you wish to support this, I suggest to take a look at linux_input.c and think about how this could be extended; what you want is to add a new entry to the device_names array, and call driver_open_device with the new index.

Enabling/Disabling the cursor is done via IDirectFBDisplayLayer::EnableCursor, I believe.

hth
Niels

BJ Opp wrote:
Hey all, has anybody been able to toggle the cursor on/off at runtime? For my application their may or may not be a mouse plugged in at startup so I have to have 'cursor' in my directfbrc file just in case the user decides to plug one in later. The problem with that is there is an immovable cursor sitting in the middle of the window now if there isn't a mouse plugged in. I thought about having a custom cursor and making it fully transparent when no mouse is connected but that's a gigantic pain since there is a mouse cursor applied for each 'window' (which my application has lots of due to clickable buttons and such). I tried to programmatically move the cursor to an unseen part of the screen, but the 'eventx' device node isn't available when the mouse is not connected (obviously), and using /dev/input/mice doesn't seem to work with the same interface (I can move the cursor programmatically when it's plugged in).

Any ideas?

BJ

_______________________________________________
directfb-users mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users



--

.------------------------------------------.
| DirectFB - Hardware accelerated graphics |
| http://www.directfb.org/                 |
"------------------------------------------"
_______________________________________________
directfb-users mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users

Reply via email to