• 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: CGDisplayCapture question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CGDisplayCapture question


  • Subject: Re: CGDisplayCapture question
  • From: Mike Paquette <email@hidden>
  • Date: Wed, 14 Jul 2004 20:10:07 -0700

You don't need to capture the displays to change the display mode.

Display capture is a way of effectively removing a display from the window system, intended primarily to support ports of immersive environments that generate their own user interface, such as games.

Mike Paquette

On Jul 14, 2004, at 7:45 PM, Jim O'Connor wrote:

However, if I want to reset the screen resolution then things don't go
properly when I want to reposition the window.


CGGetDisplaysWithRect(cgRect, 1, &sDisplayID, &count);
sOldDict = CGDisplayCurrentMode(sDisplayID);

CFDictionaryRef dict = CGDisplayBestModeForParameters(sDisplayID,
CGDisplayBitsPerPixel(sDisplayID), 832, 624, NULL);

bool capture = CGDisplayCapture(sDisplayID) == kCGErrorSuccess;
CGDisplaySwitchToMode(sDisplayID, dict);

[[mView window] setLevel:NSScreenSaverWindowLevel];
[[mView window] setFrame:[NSWindow frameRectForContentRect:[[[mView
window] screen] frame] styleMask:[[mView window] styleMask]] display:true
animate:/*true*/false];
CGDisplayRelease(sDisplayID);
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: CGDisplayCapture question
      • From: "Jim O'Connor" <email@hidden>
References: 
 >CGDisplayCapture question (From: "Jim O'Connor" <email@hidden>)

  • Prev by Date: Re: Dumping input to NSTask
  • Next by Date: NSTable Examples
  • Previous by thread: CGDisplayCapture question
  • Next by thread: Re: CGDisplayCapture question
  • Index(es):
    • Date
    • Thread