Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Objective-c > Control Screen ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 979 of 1009
Post > Topic >>

Control Screen power

by zon7 <zon7mail@[EMAIL PROTECTED] > May 11, 2008 at 04:47 AM

Hi. I'm developing an application to control the sleep of your machine
(like insomniax).
The problem is that I can't find a way to power off the screen by
coding. I've found this code

	io_registry_entry_t r = IORegistryEntryFromPath(kIOMaster****tDefault,
"IOService:/IOResources/IODisplayWrangler");
	if(!r) return;
	int err = IORegistryEntrySetCFProperty(r, CFSTR("IORequestIdle"),
kCFBooleanTrue);
	IOObjectRelease(r);

On my Macbook 10.5 and other 10.4 it works. But on a Powerbook it
causes a Kernel Panic.
Is there any other way to do it?
Thanks
 




 2 Posts in Topic:
Control Screen power
zon7 <zon7mail@[EMAIL   2008-05-11 04:47:32 
Re: Control Screen power
Gregory Weston <uce@[E  2008-05-11 08:47:47 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Jul 25 23:59:16 CDT 2008.