[Dev] any API to hide the display of mouse cursor for app Window ?
Carsten Haitzler (The Rasterman)
tizen at rasterman.com
Tue Dec 20 00:57:57 GMT 2016
On Mon, 19 Dec 2016 17:37:12 +0900 Ravindra Sande <r.sande at samsung.com> said:
> I am creating window for my native Tizen application using the
> ecore_wl_window_new() API.
> I need to hide the display of mouse cursor within the window.
first... use elm_win_*add(). ecore_evas is basically a low-level internal and
lots of things are not taken care of for you that the elementary window will do
instead. using elm's win means also your window is portable and will work in
wayland, x11, directly on the framebuffer (fbcon or drm/kms) etc.
"automatically". (environment variables will determine the default display
system to use, not code in your app). you will want all of this also for dnd,
copy & paste, client side decorations if needed and much more.
secondly... please look at sample code. i wrote a whole video player and mini
"media center" app:
grab it. compile on your pc (with efl etc. there) and mess around with it.
it'll index ~/Videos/ if given no cmdline arguments otherwise pass in what you
want to play on the cmdline much like mplayer.
the point: it blanks the cursor. in win.c
it creates a button, sets the color to 0 0 0 0 (invisible) and keeps it hidden.
when it wants to hide the mouse it shows event2 and since it is on top this
button controls the mousse cursor and the blank cursor is used...
realistically though - your app shouldnt have to really do this in general. the
compositor itself likely should do this automatically. e.g. if you use a mouse
device, show the cursor, then when you go idle for a while, hide it. not the
policy you want on a pc, but the kind you'd want on a touch screen device or a
tv with a remote that may sometimes have mice attached or used.
> Is there any API to do this ?
> Ravindra Sande
> Dev mailing list
> Dev at lists.tizen.org
Carsten Haitzler (The Rasterman) <tizen at rasterman.com>
More information about the Dev