LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 01-19-2012, 08:52 AM   #1
DoctorZeus
LQ Newbie
 
Registered: Sep 2011
Location: Earth
Distribution: Arch Linux
Posts: 29

Rep: Reputation: Disabled
Move Mouse Pointer in X-Server?


Hello,

A while back I made a remote control that sends packets over the network which were received by an application on a Windows PC that would move the mouse or right/left click according to what is pressed on the remote, this of course being extremely useful while watching movies on my laptop or giving a presentation at work .

I have been wondering for a while whether I would be able to make a Linux version of the server-side receiver that would move the mouse pointer in X by a specified amount as I am not as familiar with all the Linux sys headers as I would like to be :L ..

I can't port it easily unfortunately because the previous version was written in C# plus the Socket, Windows API and .Net functions to move the mouse are obviously very different from that of X-Server and Linux! All I really need to know is the way to move the mouse pro grammatically as Linux socket programming has loads of tutorials out there fortunately .

I intend to write the Linux version (if possible) in C++ , any help or advice on how to achieve this would be great!

Thanks in advance!

DoctorZeus

Last edited by DoctorZeus; 01-19-2012 at 08:58 AM.
 
Old 01-20-2012, 02:19 AM   #2
barunparichha
Member
 
Registered: Jun 2006
Location: Bangalore,india
Distribution: Linux(Redhat,fedora,suse,ubantu), Solaris (s8/s9/s10/nevada/open-solaris)
Posts: 303

Rep: Reputation: 32
You need Xlib programming.

There are many APIs to move cursor like Move
Check this sample code

http://snippets.dzone.com/posts/show/2743

compile this with -lXlib option.
 
Old 01-20-2012, 07:13 AM   #3
DoctorZeus
LQ Newbie
 
Registered: Sep 2011
Location: Earth
Distribution: Arch Linux
Posts: 29

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by barunparichha View Post
You need Xlib programming.

There are many APIs to move cursor like Move
Check this sample code

http://snippets.dzone.com/posts/show/2743

compile this with -lXlib option.
That looks to be exacly what I am looking for, Thanks alot!

DoctorZeus
 
Old 01-21-2012, 03:41 AM   #4
kalleanka
Member
 
Registered: Aug 2003
Location: Mallorca, Spain
Distribution: xubuntu
Posts: 551

Rep: Reputation: 38
http://tronche.com/gui/x/xlib/
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mouse pointer seems to be slow when i move the mouse around vitalstrike82 Slackware 1 05-22-2009 01:33 PM
Is there a way to move the mouse pointer with the keyboard? Oakems DamnSmallLinux 2 03-17-2009 08:16 AM
How should I move my Mouse pointer yugandhar Programming 1 07-25-2006 07:56 AM
XFree86 - can't move mouse pointer Lenard Spencer Linux From Scratch 3 07-23-2006 04:47 PM
how to move pointer w/o using mouse in X gongli Linux - Software 1 10-22-2003 07:42 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration