Mercurial > foo_out_sdl
diff foosdk/sdk/foobar2000/helpers-mac/fb2k-platform.h @ 1:20d02a178406 default tip
*: check in everything else
yay
| author | Paper <paper@tflc.us> |
|---|---|
| date | Mon, 05 Jan 2026 02:15:46 -0500 |
| parents | |
| children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/foosdk/sdk/foobar2000/helpers-mac/fb2k-platform.h Mon Jan 05 02:15:46 2026 -0500 @@ -0,0 +1,43 @@ +#pragma once + +#import <SDK/foobar2000.h> +#import <Cocoa/Cocoa.h> + +namespace fb2k { + // May return null on bad input. + NSString * strToPlatform( const char * ); + // May return null on bad input. + NSString * strToPlatform( const char * , size_t ); + // May return null on bad input. + NSString * strToPlatform( stringRef ); + // Never returns null - returns passed string in case of failure + NSString * strToPlatform( const char *, NSString * returnIfError ); + + stringRef strFromPlatform( NSString * ); + + + stringRef urlFromPlatform( id url /* can be NSString or NSURL */ ); + NSURL * urlToPlatform(const char * arg); + + + typedef NSImage* platformImage_t; + platformImage_t imageToPlatform( fb2k::objRef ); + + + // These two functions do the same, openWebBrowser() was added for compatiblity with fb2k mobile + void openWebBrowser(const char * URL); + void openURL( const char * URL); + + NSFont * fontFromParams(NSDictionary<NSString*, NSString*> *, NSFont * base = nil); + BOOL testFontParams(NSDictionary<NSString*, NSString*> *); + CGFloat tableViewRowHeightForFont( NSFont * ); + void tableViewPrepareForFont( NSTableView * tableView, NSFont * font ); + +} + +namespace pfc { + string8 strFromPlatform(NSString*); + NSString * strToPlatform( const char * ); + NSString * strToPlatform(string8 const&); + string8 strFromPlatform(CFStringRef); +}
