|
1
|
1 #pragma once
|
|
|
2
|
|
|
3 #import <SDK/foobar2000.h>
|
|
|
4 #import <Cocoa/Cocoa.h>
|
|
|
5
|
|
|
6 namespace fb2k {
|
|
|
7 // May return null on bad input.
|
|
|
8 NSString * strToPlatform( const char * );
|
|
|
9 // May return null on bad input.
|
|
|
10 NSString * strToPlatform( const char * , size_t );
|
|
|
11 // May return null on bad input.
|
|
|
12 NSString * strToPlatform( stringRef );
|
|
|
13 // Never returns null - returns passed string in case of failure
|
|
|
14 NSString * strToPlatform( const char *, NSString * returnIfError );
|
|
|
15
|
|
|
16 stringRef strFromPlatform( NSString * );
|
|
|
17
|
|
|
18
|
|
|
19 stringRef urlFromPlatform( id url /* can be NSString or NSURL */ );
|
|
|
20 NSURL * urlToPlatform(const char * arg);
|
|
|
21
|
|
|
22
|
|
|
23 typedef NSImage* platformImage_t;
|
|
|
24 platformImage_t imageToPlatform( fb2k::objRef );
|
|
|
25
|
|
|
26
|
|
|
27 // These two functions do the same, openWebBrowser() was added for compatiblity with fb2k mobile
|
|
|
28 void openWebBrowser(const char * URL);
|
|
|
29 void openURL( const char * URL);
|
|
|
30
|
|
|
31 NSFont * fontFromParams(NSDictionary<NSString*, NSString*> *, NSFont * base = nil);
|
|
|
32 BOOL testFontParams(NSDictionary<NSString*, NSString*> *);
|
|
|
33 CGFloat tableViewRowHeightForFont( NSFont * );
|
|
|
34 void tableViewPrepareForFont( NSTableView * tableView, NSFont * font );
|
|
|
35
|
|
|
36 }
|
|
|
37
|
|
|
38 namespace pfc {
|
|
|
39 string8 strFromPlatform(NSString*);
|
|
|
40 NSString * strToPlatform( const char * );
|
|
|
41 NSString * strToPlatform(string8 const&);
|
|
|
42 string8 strFromPlatform(CFStringRef);
|
|
|
43 }
|