Implementing OS X full screen feature

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, LCMark

Locked
trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1005
Joined: Sat Apr 08, 2006 3:06 pm
Location: Overland Park, Kansas
Contact:

Implementing OS X full screen feature

Post by trevordevore » Wed Jun 25, 2014 1:56 pm

Starting with OS X Lion (10.7) OS X windows have a full screen property that causes the window to enter it's own space and fill the entire screen. While LiveCode stacks have a 'fullscreen' property, it does not use the OS X APIs and behaves differently. Supporting the native OS X full screen behavior is important as being able to take windows full screen is a common (and expected) behavior on the platform.

Since 6.7 will be introducing windows that use Cocoa and NSWindow, LiveCode can easily support fullscreen mode as defined by OS X.

I added support for full screen mode to one of my apps using an external. I used three handlers:
  • ToggleWindowIsFullScreen windowId: toggles full screen mode of a window
  • WindowIsFullScreen windowId: Returns whether or not a window is in full screen mode
  • SetHasFullScreenControl windowId: Turns on the full screen control for a window. This control appears in the top-right hand corner of the window.
There are other settings relating to full screen mode. For example, there is a NSWindowCollectionBehaviorFullScreenAuxiliary constant that specifies that a window can appear in the same space as a full screen window.

There are also the NSWindowWillEnterFullScreenNotification, NSWindowDidEnterFullScreenNotification, NSWindowWillExitFullScreenNotification, and NSWindowDidExitFullScreenNotification events that may be useful for stacks going into/out of full screen mode.

In LiveCode I think the following would be appropriate:

set/get the fullscreen of stack X
set/get the fullScreenControl of stack X

on willEnterFullScreen
on didEnterFullScreen
on willExitFullScreen
on didExitFullScreen

I'm not sure what to do with the NSWindowCollectionBehaviorFullScreenAuxiliary constant. I guess that would become a stack window 'style'?

The problem is that LiveCode already has a 'fullscreen' property so if support for the OS X feature is added we need to think of different name for the property.

Any ideas on a good property name?
Trevor DeVore
ScreenSteps - https://www.screensteps.com

LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder

Klaus
Posts: 13829
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Implementing OS X full screen feature

Post by Klaus » Wed Jun 25, 2014 5:58 pm

Hi Trevor,
trevordevore wrote:Any ideas on a good property name?
what about "fullscreenX", since this is platform specific? :D

Do you know if the new implementation of the AVKit for multimedia will
support the cool QT (7) feature of changing the speed of an audioclip without
affecting the pitch and vice versa? That would be cool! 8)


Best

Klaus

trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1005
Joined: Sat Apr 08, 2006 3:06 pm
Location: Overland Park, Kansas
Contact:

Re: Implementing OS X full screen feature

Post by trevordevore » Wed Jun 25, 2014 6:00 pm

Klaus wrote:Do you know if the new implementation of the AVKit for multimedia will
support the cool QT (7) feature of changing the speed of an audioclip without
affecting the pitch and vice versa?
Sorry, I don't.
Trevor DeVore
ScreenSteps - https://www.screensteps.com

LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder

Klaus
Posts: 13829
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Implementing OS X full screen feature

Post by Klaus » Wed Jun 25, 2014 6:12 pm

OK, thanks!

Locked

Return to “Engine Contributors”