LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 12-26-2008, 10:14 PM   #1
matrix13
Member
 
Registered: Nov 2006
Location: Kerala, India
Distribution: Arch Linux
Posts: 134

Rep: Reputation: 25
Unhappy Xwindows programming doesnt enable mouse functions


I am using Ubuntu 8.04. I was trying some Xwindows programming (trying to learn it). First, it went well. It created a window. It detected KeyPress event ant etc. But, when I tried to interface the mouse, I received some error.

In the event loop, I tried this code:
Code:
case Expose:
	ShowMousePosition(gc, win, MouseX, MouseY);
	break;

case MotionNotify:
	MouseX=event.xbutton.x;
	MouseY=event.xbutton.y;
	ShowMousePosition(gc, win, MouseX, MouseY);
	break;
When I complied the program, I got these errors:
Quote:
test.cpp: In function ‘int main()’:
test.cpp:66: error: ‘gc’ was not declared in this scope
test.cpp:66: error: ‘ShowMousePosition’ was not declared in this scope
I am following a text book. So, I wrote exactly the same codes the book has shown me.
What is the problem actually?
Is there any other packages I have to install?
 
  


Reply

Tags
xwindows


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Xwindows programming in Ubuntu 7.04 matrix13 Linux - Software 2 03-15-2008 07:44 AM
Why doesnt my USB mouse doesnt work? barkha Linux - Hardware 2 08-16-2005 11:31 AM
C Programming: Help with Pointers to Functions devinWhalen Programming 2 03-04-2005 01:00 PM
Enable Scroll Lock in XWindows Demon10000 Linux - General 0 09-10-2003 12:15 PM
XWindows programming yaiba Linux - Software 2 06-16-2003 11:10 AM


All times are GMT -5. The time now is 12:14 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration