LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 05-29-2007, 05:58 AM   #1
jaepi
Member
 
Registered: Apr 2007
Location: Urban Jungle
Distribution: Ubuntu
Posts: 189
Blog Entries: 1

Rep: Reputation: 30
function use to determine if a dvd-driver tray is close


hello there, im currently working on dvd driver controller using gtk+ 2.0...how will you determine if a dvd driver is close? because if the user will press the button "close tray", i will prompt him/her that the driver is closed...
 
Old 05-30-2007, 06:25 AM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
I suppose you could study the source code for *eject* to see how eject determines the status of the drive tray, then either opens or closes the tray.

Then trap the button press (I assume that's an application button and not the button on the drive itself), then test it against the status of the drive tray: if open, close tray, else inform the user that the tray is already closed.
 
Old 05-30-2007, 08:46 PM   #3
jaepi
Member
 
Registered: Apr 2007
Location: Urban Jungle
Distribution: Ubuntu
Posts: 189

Original Poster
Blog Entries: 1

Rep: Reputation: 30
where in the os i could find the code for eject?
 
  


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
nVidia Display driver can't determine kernel version ad1366 Linux - Hardware 6 03-19-2007 02:19 PM
tray icons showing on desktop instead of tray cjae Linux - General 3 09-21-2006 06:27 PM
How to determine if my DVD player is Region Free? General Linux - Hardware 1 07-09-2006 05:13 PM
eth0 - eth1 - eth2 and how to determine which driver they are using vharishankar Linux - Networking 7 06-02-2005 10:52 PM
How to determine driver versions in FC3 jamespwalter Linux - Newbie 2 01-10-2005 08:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 08:56 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