GCKMediaTextTrackStyle.h
1 // Copyright 2014 Google Inc.
2 
3 #import <GoogleCast/GCKDefines.h>
4 
5 #import <CoreGraphics/CoreGraphics.h>
6 #import <Foundation/Foundation.h>
7 
8 @class GCKColor;
9 
10 GCK_ASSUME_NONNULL_BEGIN
11 
16 typedef NS_ENUM(NSInteger, GCKMediaTextTrackStyleEdgeType) {
18  GCKMediaTextTrackStyleEdgeTypeUnknown = -1,
20  GCKMediaTextTrackStyleEdgeTypeNone = 0,
22  GCKMediaTextTrackStyleEdgeTypeOutline = 1,
24  GCKMediaTextTrackStyleEdgeTypeDropShadow = 2,
26  GCKMediaTextTrackStyleEdgeTypeRaised = 3,
28  GCKMediaTextTrackStyleEdgeTypeDepressed = 4,
29 };
30 
35 typedef NS_ENUM(NSInteger, GCKMediaTextTrackStyleWindowType) {
37  GCKMediaTextTrackStyleWindowTypeUnknown = -1,
39  GCKMediaTextTrackStyleWindowTypeNone = 0,
41  GCKMediaTextTrackStyleWindowTypeNormal = 1,
43  GCKMediaTextTrackStyleWindowTypeRoundedCorners = 2,
44 };
45 
50 typedef NS_ENUM(NSInteger, GCKMediaTextTrackStyleFontGenericFamily) {
52  GCKMediaTextTrackStyleFontGenericFamilyUnknown = -1,
54  GCKMediaTextTrackStyleFontGenericFamilyNone = 0,
56  GCKMediaTextTrackStyleFontGenericFamilySansSerif = 1,
58  GCKMediaTextTrackStyleFontGenericFamilyMonospacedSansSerif = 2,
60  GCKMediaTextTrackStyleFontGenericFamilySerif = 3,
62  GCKMediaTextTrackStyleFontGenericFamilyMonospacedSerif = 4,
64  GCKMediaTextTrackStyleFontGenericFamilyCasual = 5,
66  GCKMediaTextTrackStyleFontGenericFamilyCursive = 6,
68  GCKMediaTextTrackStyleFontGenericFamilySmallCapitals = 7,
69 };
70 
75 typedef NS_ENUM(NSInteger, GCKMediaTextTrackStyleFontStyle) {
77  GCKMediaTextTrackStyleFontStyleUnknown = -1,
79  GCKMediaTextTrackStyleFontStyleNormal = 0,
81  GCKMediaTextTrackStyleFontStyleBold = 1,
83  GCKMediaTextTrackStyleFontStyleItalic = 2,
85  GCKMediaTextTrackStyleFontStyleBoldItalic = 3,
86 };
87 
91 GCK_EXPORT
92 @interface GCKMediaTextTrackStyle : NSObject <NSCopying, NSSecureCoding>
93 
97 - (instancetype)init;
98 
103 + (instancetype)createDefault;
104 
106 @property(nonatomic, assign, readwrite) CGFloat fontScale;
107 
109 @property(nonatomic, copy, readwrite, GCK_NULLABLE) GCKColor *foregroundColor;
110 
112 @property(nonatomic, copy, readwrite, GCK_NULLABLE) GCKColor *backgroundColor;
113 
115 @property(nonatomic, assign, readwrite) GCKMediaTextTrackStyleEdgeType edgeType;
116 
118 @property(nonatomic, copy, readwrite, GCK_NULLABLE) GCKColor *edgeColor;
119 
121 @property(nonatomic, assign, readwrite) GCKMediaTextTrackStyleWindowType windowType;
122 
124 @property(nonatomic, copy, readwrite, GCK_NULLABLE) GCKColor *windowColor;
125 
130 @property(nonatomic, assign, readwrite) CGFloat windowRoundedCornerRadius;
131 
133 @property(nonatomic, copy, readwrite, GCK_NULLABLE) NSString *fontFamily;
134 
136 @property(nonatomic, assign, readwrite) GCKMediaTextTrackStyleFontGenericFamily fontGenericFamily;
137 
139 @property(nonatomic, assign, readwrite) GCKMediaTextTrackStyleFontStyle fontStyle;
140 
142 @property(nonatomic, strong, readwrite, GCK_NULLABLE) id customData;
143 
144 @end
145 
146 GCK_ASSUME_NONNULL_END
GCKColor * foregroundColor
The foreground color.
Definition: GCKMediaTextTrackStyle.h:109
GCKMediaTextTrackStyleWindowType windowType
The window type.
Definition: GCKMediaTextTrackStyle.h:121
A class that represents an RGBA color.
Definition: GCKColor.h:18
GCKColor * edgeColor
The edge color.
Definition: GCKMediaTextTrackStyle.h:118
instancetype createDefault()
Creates an instance with default values based on the system&#39;s closed captioning settings.
NSString * fontFamily
The font family; if the font is not available, the generic font family will be used.
Definition: GCKMediaTextTrackStyle.h:133
id customData
The custom data, if any.
Definition: GCKMediaTextTrackStyle.h:142
GCKMediaTextTrackStyleEdgeType edgeType
The edge type.
Definition: GCKMediaTextTrackStyle.h:115
CGFloat fontScale
The font scaling factor for the text.
Definition: GCKMediaTextTrackStyle.h:106
A class representing a style for a text media track.
Definition: GCKMediaTextTrackStyle.h:92
GCKMediaTextTrackStyleFontStyle fontStyle
The font style.
Definition: GCKMediaTextTrackStyle.h:139
instancetype init()
Designated initializer.
GCKColor * backgroundColor
The background color.
Definition: GCKMediaTextTrackStyle.h:112
GCKColor * windowColor
The window color.
Definition: GCKMediaTextTrackStyle.h:124
GCKMediaTextTrackStyleFontGenericFamily fontGenericFamily
The generic font family.
Definition: GCKMediaTextTrackStyle.h:136
CGFloat windowRoundedCornerRadius
Rounded corner radius absolute value in pixels.
Definition: GCKMediaTextTrackStyle.h:130