MacGapProject / MacGap1

Desktop WebKit wrapper for HTML/CSS/JS applications.
Other
3.55k stars 208 forks source link

Change the location and size of the app's window #7

Closed liamks closed 12 years ago

liamks commented 12 years ago

I didn't end up adding the screen size function since that can be done within javascript using 'screen.width' or 'screen.height'.

maccman commented 12 years ago

Awesome!!!!

maccman commented 12 years ago

Btw, if you have some time, the 'new window' stuff is the next big thing. We really need to have support for opening new windows.

liamks commented 12 years ago

I'll certainly look into it tomorrow night. Would it be best to create two functions:

macgap.app.newWindowFromLocal('file_name_in_public') macgap.app.newWindowFromRemote('http_url')

OR

macgap.app.newWindow({url:'file_name_in_public', local:true}) macgap.app.newWindow({url:'http_url', local:false})

Would it make sense to pass in the desired window size and window location too?

Liam

On Tue, Jan 10, 2012 at 11:34 PM, Alex MacCaw < reply@reply.github.com

wrote:

Btw, if you have some time, the 'new window' stuff is the next big thing. We really need to have support for opening new windows.


Reply to this email directly or view it on GitHub: https://github.com/maccman/macgap/pull/7#issuecomment-3441914

Liam Kaufman, M.Sc. Research Associate & Software Developer TAGlab: http://taglab.utoronto.ca/

maccman commented 12 years ago

This is what I'm thinking:

macgap.window.open(url, {width: 100, height: 100});

You don't have to have a different API for file URLs as they're prefixed with file://