Do you think these features could be tested in a development build ??? Laurence Jeloudev ljelou...@gmail.com
On 05/08/2011, at 20:54, Tor Lillqvist <t...@iki.fi> wrote: >> Wouldnt that require us to migrate from the current 10.4 sdk which >> everything is built against to the latest 10.7 in regards to API's? > > Not necessarily. This is not a technical list, so this will probably make the > eyes glaze over for most readers, but still: > > As long as only calling new instance methods of existing classes, and adding > new > instance methods to existing subclass implementations (hopefully I got the > Objective-C terminology right) is involved, it can be done quite nicely to be > optional at run-time and compiling fine against the 10.4 SDK. > > Example, from my experimental patch to vcl/aqua/source/window/salframe.cxx: > > // On 10.7 and later, If the window has a title bar and is > // resizable, we make it full-screenable. The ideal would be to do > // it only for document windows, but how to figure out that? > if (GetSalData()->mnSystemVersion >= 0x1070) { > if ((mnStyleMask & NSTitledWindowMask) > && (mnStyleMask & NSResizableWindowMask)) { > // If compiled against a SDK version earlier than 10.7 > // NSWindowCollectionBehaviorFullScreenPrimary won't be > // defined so define it ourselves. Note that we can't use > // MAC_OS_X_VERSION_10_7 in this #if as such a macro is > // not defined in earlier SDKs... > > #if MAC_OS_X_VERSION_MAX_ALLOWED < 1070 > enum { > NSWindowCollectionBehaviorFullScreenPrimary = (1 << 7) > }; > #endif > > int behavior = (int) objc_msgSend(mpWindow, @selector(collectionBehavior)); > behavior |= NSWindowCollectionBehaviorFullScreenPrimary; > > objc_msgSend(mpWindow, @selector(setCollectionBehavior:), behavior); > } > } > > Note the use of objc_msgSend and @selector there. Using normal Objective-C > syntactic sugar and calling [mpWindow collectionBehavior] and [mpWindow > setCollectionBehavior: behavior] would not compile against the 10.4 SDK as > collectionBehavior is present only in the 10.5 SDK and later. > > Compiles fine against the 10.4 SDK, works as intended on 10.7. Should work > fine > on earlier OSes, too, but I haven't verified that. > > --tml > > > > -- > Unsubscribe instructions: E-mail to discuss+h...@documentfoundation.org > Problems? > http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ > Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette > List archive: http://listarchives.documentfoundation.org/www/discuss/ > All messages sent to this list will be publicly archived and cannot be deleted > -- Unsubscribe instructions: E-mail to discuss+h...@documentfoundation.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.documentfoundation.org/www/discuss/ All messages sent to this list will be publicly archived and cannot be deleted