This repository has been archived by the owner on Oct 27, 2019. It is now read-only.
forked from rsms/cocui
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new version with fullscreen support and totally reworked window manag…
…ement
- Loading branch information
Showing
21 changed files
with
579 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,6 @@ | |
NSURL *imageURL; | ||
} | ||
|
||
@property(assign) NSURL *imageURL; | ||
@property NSURL *imageURL; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,29 @@ | ||
// test JSON | ||
// Load index.html in a regular window and display it | ||
App.createWindow({ | ||
uri: 'index.html', | ||
name: 'main', | ||
rect: { size: { width: 500, height: 400 } } | ||
}).makeKeyAndOrderFront(); | ||
|
||
// Alternative minimal example of opening a window | ||
/*App.createWindow('index.html').makeKeyAndOrderFront(); | ||
*/ | ||
|
||
// Example of a fullscreen window (quits after 4 seconds) | ||
/*App.createWindow({ uri: 'index.html', fullscreen: true }).makeKeyAndOrderFront(); | ||
setTimeout(function(){ App.terminate() }, 4000); | ||
*/ | ||
|
||
// Alternative example of a fullscreen window (exits fullscreen after 4 seconds) | ||
/*var win = App.createWindow({uri: 'index.html'}); // add style:{borderless:true} to remove ui chrome | ||
win.makeKeyAndOrderFront(); | ||
win.fullscreen = true; | ||
setTimeout(function(){ win.fullscreen = false }, 4000); | ||
*/ | ||
|
||
// Example of encoding and decoding JSON | ||
/*var s = App.encodeJSON({uri: 'index.html', moset: {0:1,1:2,9:3,4:undefined,98:56}}); | ||
console.log(s); | ||
var o = App.decodeJSON(s); | ||
console.log(o.uri); | ||
*/ | ||
|
||
// Load index.html in a window and display the window | ||
App.loadWindow({ | ||
uri: 'index.html', | ||
rect: { size: { width: 500, height: 400 } } | ||
}).makeKeyAndOrderFront(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.