Moving mouse pointer on screen programatically

595 views
Skip to first unread message

veysel emirhan oğuz

unread,
Jan 30, 2012, 4:59:09 AM1/30/12
to android-ndk
Hi, I am trying to implement a application on android that generates
mouse movements. I am currently working on android 2.2 operating
system. We modified some parts of kernel by ourselves. When you plug-
in a mouse from USB port externally, mouse pointer icon appears on the
screen and then you can use mouse with all of it's functions. After 3
seconds without interaction, mouse pointer disappears on the screen.

I wrote a code using jni and ndk. I implemented mouse movement with
xwarppointer function in X11/Xlib.h. But in the ndk-build step, it
gives en error as shown below:

Compile thumb : ndk_demo <= ndk_demo.c
jni/ndk_demo.c:3:22: error: X11/Xlib.h: No such file or directory
jni/ndk_demo.c: In function 'Java_com_marakana_NativeLib_hello':
jni/ndk_demo.c:20: error: 'Display' undeclared (first use in this
function)
jni/ndk_demo.c:20: error: (Each undeclared identifier is reported only
once
jni/ndk_demo.c:20: error: for each function it appears in.)
jni/ndk_demo.c:20: error: 'd' undeclared (first use in this function)

What is the error, why ndk-build does not see the X11/Xlib.h and it's
functions. Should I continue to solve this problem to generate
movement of mouse icon or, is there any other methods that I can use
to generate movement of mouse icon. If you can you give me a roadmap
about that problem, i will be appreciated.

Maybe I have to use the driver function calls to generate movement of
mouse pointer, but there must be an exact way to generate movement. I
will try any solution suggestion that will come from you.

Thanks.

Thomas Martitz

unread,
Jan 30, 2012, 5:08:12 AM1/30/12
to andro...@googlegroups.com

You have been told in your earlier thread that Android doesn't provide
X11 headers and libraries. Android isn't using/supporting the Xserver at
all.

So either you port the Xserver to android or you fix your code to not
depend on it.

Best regards.

veysel emirhan oğuz

unread,
Jan 30, 2012, 5:45:32 AM1/30/12
to android-ndk
I understand, thanks. Can you give me an idea about how to port the X
server to android.

And is there any different way to implement the application without X
server ?

On Jan 30, 12:08 pm, Thomas Martitz <thomas.mart...@student.htw-

felipe valdez

unread,
Jan 30, 2012, 10:18:51 AM1/30/12
to andro...@googlegroups.com
that sounds like a gargantuan job!
I think it is more viable to move away from X, than to bring it with you..
it is a heavy load.


--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To post to this group, send email to andro...@googlegroups.com.
To unsubscribe from this group, send email to android-ndk...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.




--
312-444-2124
Skype: f3l.headhunter
Casa: 8043901


Reply all
Reply to author
Forward
0 new messages