• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Sleep Display
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sleep Display


  • Subject: Re: Sleep Display
  • From: "Jere Gmail" <email@hidden>
  • Date: Sun, 11 May 2008 10:59:49 +0200

Hi. I've tryed this code and it works. The problem is that with some
machines it causes a kernel panic. They are PPC machines. Isn't this
code compatible?

On Sun, Nov 4, 2007 at 8:45 AM, Andrew James <email@hidden> wrote:
> Hi,
> How far back is this compatible? is it only 10.5?
>
> On 11/4/07, Andrew Farmer <email@hidden> wrote:
>>
>> On 30 Oct 07, at 15:33, Andrew James wrote:
>> > I noticed steve added the nice feature to sleep the display via a hot
>> > corner, but is there a way for us devs to hook into it? I am
>> > currently using
>> > a pmset hack which i would prefer to use a cleaner method
>>
>> Undocumented, use at your own risk, etc. It ends up involving more
>> IOKit than Cocoa, as it turns out.
>>
>> #include <CoreFoundation/CoreFoundation.h>
>> #include <IOKit/IOKitLib.h>
>>
>> int dimDisplayNow(void) {
>>      io_registry_entry_t r =
>> IORegistryEntryFromPath(kIOMasterPortDefault, "IOService:/IOResources/
>> IODisplayWrangler");
>>      if(!r) return 1;
>>      int err = IORegistryEntrySetCFProperty(r, CFSTR("IORequestIdle"),
>> kCFBooleanTrue);
>>      IOObjectRelease(r);
>>      return err;
>> }
>>
>>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>



--
http://zon7blog.wordpress.com/
And again we fall.
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Sleep Display
      • From: Jens Alfke <email@hidden>
  • Prev by Date: Re: image opacity?
  • Next by Date: [OT] South Wales UK NSCoder Night
  • Previous by thread: Re: image opacity?
  • Next by thread: Re: Sleep Display
  • Index(es):
    • Date
    • Thread