Get height of desktop on Mac
BlitzMax Forums/BlitzMax Programming/Get height of desktop on Mac
| ||
Anyone know how? hope that's an easy one but I'm having trouble finding out how in the docs. Thanks in advance if you can help! |
| ||
Does this work? its some old code for a module tweak i did...void GetDesktopSize( width* int, height* int) { NSRect rect; rect = [[NSScreen deepestScreen] frame]; *width = rect.size.width; *height = rect.size.height; } Extern Function GetDesktopSize( width:Int Var, height:Int Var) EndExtern |
| ||
Thx, looks viable, will try now. |
| ||
Looks like the params should be int *width, int *height. Should NSREct be "freed" up at all? I might call this a lot you see... |
| ||
works like a charm, many thanks! |
| ||
Do you know this one..?? DesktopExtension 1.12 |
| ||
sounds like it would have been useful thanks but I've done it myself now :-) |
| ||
Looks like the params should be int *width, int *height. Lol! .. i guess ive gotten too used to blitzmax syntax ;) |
| ||
I still type delphi syntax every now and then! btw: Should NSRect be "freed" up at all? I might call this a lot you see... |
| ||
Should NSRect be "freed" up at all? I might call this a lot you see... I dont think so, its just a structure as far as i know. (but do check the OSX dev info, as i dont know that much ObjectiveC) |
| ||
me neither and I doubt I'll understand what I read anyway :-) |
| ||
http://www.cocoadev.com/index.pl?NSRect the first site on google ;) Its a structure alright. =) |
| ||
cool so a structure doesn't need to be freed. |