B
Ben Giddings
Hi guys,
I'm really pushing the RubyCocoa boundaries for a demo I'm trying to
build.
I want to display a QuartzComposer application full-screen (i.e. no
menu bar, no dock, etc.) and then control it by Ruby.
So far, I can get a windowed QuartzComposer application working, but
I don't know how to make it go full-screen.
I found instructions on how to make full-screen OSX applications, but
I can't figure out how to call the required methods / use the right
variables from within Ruby.
Here's the article on how to make a full-screen app from Cocoa:
http://www.cocoadevcentral.com/articles/000028.php
But when I do the bit that tries to call CGDisplayCapture:
if (CGDisplayCapture( kCGDirectMainDisplay ) != kCGErrorSuccess) {
NSLog( @"Couldn't capture the main display!" );
// Note: you'll probably want to display a proper error
dialog here
}
I can't figure out how to call those methods or use the
kCGDirectMainDisplay method from within Ruby.
I've loaded the ApplicationServices framework, which should give me
access to the CoreGraphics calls, but... I don't know how to get to
them.
Any ideas?
Ben
I'm really pushing the RubyCocoa boundaries for a demo I'm trying to
build.
I want to display a QuartzComposer application full-screen (i.e. no
menu bar, no dock, etc.) and then control it by Ruby.
So far, I can get a windowed QuartzComposer application working, but
I don't know how to make it go full-screen.
I found instructions on how to make full-screen OSX applications, but
I can't figure out how to call the required methods / use the right
variables from within Ruby.
Here's the article on how to make a full-screen app from Cocoa:
http://www.cocoadevcentral.com/articles/000028.php
But when I do the bit that tries to call CGDisplayCapture:
if (CGDisplayCapture( kCGDirectMainDisplay ) != kCGErrorSuccess) {
NSLog( @"Couldn't capture the main display!" );
// Note: you'll probably want to display a proper error
dialog here
}
I can't figure out how to call those methods or use the
kCGDirectMainDisplay method from within Ruby.
I've loaded the ApplicationServices framework, which should give me
access to the CoreGraphics calls, but... I don't know how to get to
them.
Any ideas?
Ben