示例#1
0
 public static bool AddSelectedLanguage(MACaptionAppearanceDomain domain, string language)
 {
     // this will throw an ANE if language is null
     using (var lang = new CFString(language)) {
         return(MACaptionAppearanceAddSelectedLanguage((int)domain, lang.Handle));
     }
 }
示例#2
0
        public static nfloat GetWindowRoundedCornerRadius(MACaptionAppearanceDomain domain, ref MACaptionAppearanceBehavior behavior)
        {
            nint b  = (int)behavior;
            var  rv = MACaptionAppearanceGetWindowRoundedCornerRadius((int)domain, ref b);

            behavior = (MACaptionAppearanceBehavior)(int)b;
            return(rv);
        }
示例#3
0
        public static CTFontDescriptor GetFontDescriptor(MACaptionAppearanceDomain domain, ref MACaptionAppearanceBehavior behavior, MACaptionAppearanceFontStyle fontStyle)
        {
            nint b  = (int)behavior;
            var  rv = new CTFontDescriptor(MACaptionAppearanceCopyFontDescriptorForStyle((int)domain, ref b, (int)fontStyle), owns: true);

            behavior = (MACaptionAppearanceBehavior)(int)b;
            return(rv);
        }
示例#4
0
        public static nfloat GetRelativeCharacterSize(MACaptionAppearanceDomain domain, ref MACaptionAppearanceBehavior behavior)
        {
            nint b  = (int)behavior;
            var  rv = MACaptionAppearanceGetRelativeCharacterSize((int)domain, ref b);

            behavior = (MACaptionAppearanceBehavior)(int)b;
            return(rv);
        }
示例#5
0
        public static MACaptionAppearanceTextEdgeStyle GetTextEdgeStyle(MACaptionAppearanceDomain domain, ref MACaptionAppearanceBehavior behavior)
        {
            nint b  = (int)behavior;
            var  rv = MACaptionAppearanceGetTextEdgeStyle((int)domain, ref b);

            behavior = (MACaptionAppearanceBehavior)(int)b;
            return((MACaptionAppearanceTextEdgeStyle)(int)rv);
        }
示例#6
0
        public static nfloat GetWindowOpacity(MACaptionAppearanceDomain domain, ref MACaptionAppearanceBehavior behavior)
        {
            nint b  = (int)behavior;
            var  rv = MACaptionAppearanceGetWindowOpacity((int)domain, ref b);

            behavior = (MACaptionAppearanceBehavior)(int)b;
            return(rv);
        }
示例#7
0
        public static CGColor GetWindowColor(MACaptionAppearanceDomain domain, ref MACaptionAppearanceBehavior behavior)
        {
            nint b  = (int)behavior;
            var  rv = new CGColor(MACaptionAppearanceCopyWindowColor((int)domain, ref b), owns: true);

            behavior = (MACaptionAppearanceBehavior)(int)b;
            return(rv);
        }
示例#8
0
 public static NSString [] GetPreferredCaptioningMediaCharacteristics(MACaptionAppearanceDomain domain)
 {
     using (var chars = new CFArray(MACaptionAppearanceCopyPreferredCaptioningMediaCharacteristics((int)domain), owns: true)) {
         NSString [] characteristics = new NSString [chars.Count];
         for (int i = 0; i < chars.Count; i++)
         {
             characteristics[i] = new NSString(chars.GetValue(i));
         }
         return(characteristics);
     }
 }
示例#9
0
 public static string [] GetSelectedLanguages(MACaptionAppearanceDomain domain)
 {
     using (var langs = new CFArray(MACaptionAppearanceCopySelectedLanguages((int)domain), owns: true)) {
         var languages = new string [langs.Count];
         for (int i = 0; i < langs.Count; i++)
         {
             languages[i] = CFString.FetchString(langs.GetValue(i));
         }
         return(languages);
     }
 }
示例#10
0
 public static bool AddSelectedLanguage(MACaptionAppearanceDomain domain, string language)
 {
     // this will throw an ANE if language is null
     using (var lang = new CFString (language)) {
         return MACaptionAppearanceAddSelectedLanguage ((int) domain, lang.Handle);
     }
 }
示例#11
0
 public static void SetDisplayType(MACaptionAppearanceDomain domain, MACaptionAppearanceDisplayType displayType)
 {
     MACaptionAppearanceSetDisplayType((int)domain, (int)displayType);
 }
示例#12
0
 public static MACaptionAppearanceDisplayType GetDisplayType(MACaptionAppearanceDomain domain)
 {
     return((MACaptionAppearanceDisplayType)(int)MACaptionAppearanceGetDisplayType((int)domain));
 }
示例#13
0
 public static CTFontDescriptor GetFontDescriptor(MACaptionAppearanceDomain domain, ref MACaptionAppearanceBehavior behavior, MACaptionAppearanceFontStyle fontStyle)
 {
     nint b = (int) behavior;
     var rv = new CTFontDescriptor (MACaptionAppearanceCopyFontDescriptorForStyle ((int) domain, ref b, (int) fontStyle), owns: true);
     behavior = (MACaptionAppearanceBehavior) (int) b;
     return rv;
 }
示例#14
0
 public static nfloat GetRelativeCharacterSize(MACaptionAppearanceDomain domain, ref MACaptionAppearanceBehavior behavior)
 {
     nint b = (int) behavior;
     var rv = MACaptionAppearanceGetRelativeCharacterSize ((int) domain, ref b);
     behavior = (MACaptionAppearanceBehavior) (int) b;
     return rv;
 }
示例#15
0
 public static NSString[] GetPreferredCaptioningMediaCharacteristics(MACaptionAppearanceDomain domain)
 {
     using (var chars = new CFArray (MACaptionAppearanceCopyPreferredCaptioningMediaCharacteristics ((int) domain), owns: true)) {
         NSString [] characteristics = new NSString [chars.Count];
         for (int i = 0; i < chars.Count; i++) {
             characteristics[i] = new NSString (chars.GetValue (i));
         }
         return characteristics;
     }
 }
示例#16
0
 public static MACaptionAppearanceTextEdgeStyle GetTextEdgeStyle(MACaptionAppearanceDomain domain, ref MACaptionAppearanceBehavior behavior)
 {
     nint b = (int) behavior;
     var rv = MACaptionAppearanceGetTextEdgeStyle ((int) domain, ref b);
     behavior = (MACaptionAppearanceBehavior) (int) b;
     return (MACaptionAppearanceTextEdgeStyle) (int) rv;
 }
示例#17
0
 public static string[] GetSelectedLanguages(MACaptionAppearanceDomain domain)
 {
     using (var langs = new CFArray (MACaptionAppearanceCopySelectedLanguages ((int) domain), owns: true)) {
         var languages = new string [langs.Count];
         for (int i = 0; i < langs.Count; i++) {
             languages[i] = CFString.FetchString (langs.GetValue (i));
         }
         return languages;
     }
 }
示例#18
0
 public static CGColor GetWindowColor(MACaptionAppearanceDomain domain, ref MACaptionAppearanceBehavior behavior)
 {
     nint b = (int) behavior;
     var rv = new CGColor (MACaptionAppearanceCopyWindowColor ((int) domain, ref b), owns: true);
     behavior = (MACaptionAppearanceBehavior) (int) b;
     return rv;
 }
示例#19
0
 public static MACaptionAppearanceDisplayType GetDisplayType(MACaptionAppearanceDomain domain)
 {
     return (MACaptionAppearanceDisplayType) (int) MACaptionAppearanceGetDisplayType ((int) domain);
 }
示例#20
0
 public static void SetDisplayType(MACaptionAppearanceDomain domain, MACaptionAppearanceDisplayType displayType)
 {
     MACaptionAppearanceSetDisplayType ((int) domain, (int) displayType);
 }
示例#21
0
 public static nfloat GetWindowRoundedCornerRadius(MACaptionAppearanceDomain domain, ref MACaptionAppearanceBehavior behavior)
 {
     nint b = (int) behavior;
     var rv = MACaptionAppearanceGetWindowRoundedCornerRadius ((int) domain, ref b);
     behavior = (MACaptionAppearanceBehavior) (int) b;
     return rv;
 }
示例#22
0
 public static nfloat GetWindowOpacity(MACaptionAppearanceDomain domain, ref MACaptionAppearanceBehavior behavior)
 {
     nint b = (int) behavior;
     var rv = MACaptionAppearanceGetWindowOpacity ((int) domain, ref b);
     behavior = (MACaptionAppearanceBehavior) (int) b;
     return rv;
 }