summaryrefslogtreecommitdiff
path: root/SmartDeviceLink/SDLScreenParams.m
diff options
context:
space:
mode:
authorJoel Fischer <joeljfischer@gmail.com>2016-05-25 08:44:23 -0400
committerJoel Fischer <joeljfischer@gmail.com>2016-05-25 08:44:23 -0400
commitfb8e9903a323acaf5fc78819bb3c203567542ab2 (patch)
treee40665103ac7db492e0a40e34cd92f3390defa55 /SmartDeviceLink/SDLScreenParams.m
parentf7540a02262832e34c67b0953dd8a1804a046fea (diff)
downloadsdl_ios-fb8e9903a323acaf5fc78819bb3c203567542ab2.tar.gz
Shift files into root directory
Diffstat (limited to 'SmartDeviceLink/SDLScreenParams.m')
-rw-r--r--SmartDeviceLink/SDLScreenParams.m59
1 files changed, 59 insertions, 0 deletions
diff --git a/SmartDeviceLink/SDLScreenParams.m b/SmartDeviceLink/SDLScreenParams.m
new file mode 100644
index 000000000..1debff302
--- /dev/null
+++ b/SmartDeviceLink/SDLScreenParams.m
@@ -0,0 +1,59 @@
+// SDLScreenParams.m
+//
+
+#import "SDLScreenParams.h"
+
+#import "SDLImageResolution.h"
+#import "SDLNames.h"
+#import "SDLTouchEventCapabilities.h"
+
+
+@implementation SDLScreenParams
+
+- (instancetype)init {
+ if (self = [super init]) {
+ }
+ return self;
+}
+
+- (instancetype)initWithDictionary:(NSMutableDictionary *)dict {
+ if (self = [super initWithDictionary:dict]) {
+ }
+ return self;
+}
+
+- (void)setResolution:(SDLImageResolution *)resolution {
+ if (resolution != nil) {
+ [store setObject:resolution forKey:NAMES_resolution];
+ } else {
+ [store removeObjectForKey:NAMES_resolution];
+ }
+}
+
+- (SDLImageResolution *)resolution {
+ NSObject *obj = [store objectForKey:NAMES_resolution];
+ if (obj == nil || [obj isKindOfClass:SDLImageResolution.class]) {
+ return (SDLImageResolution *)obj;
+ } else {
+ return [[SDLImageResolution alloc] initWithDictionary:(NSMutableDictionary *)obj];
+ }
+}
+
+- (void)setTouchEventAvailable:(SDLTouchEventCapabilities *)touchEventAvailable {
+ if (touchEventAvailable != nil) {
+ [store setObject:touchEventAvailable forKey:NAMES_touchEventAvailable];
+ } else {
+ [store removeObjectForKey:NAMES_touchEventAvailable];
+ }
+}
+
+- (SDLTouchEventCapabilities *)touchEventAvailable {
+ NSObject *obj = [store objectForKey:NAMES_touchEventAvailable];
+ if (obj == nil || [obj isKindOfClass:SDLTouchEventCapabilities.class]) {
+ return (SDLTouchEventCapabilities *)obj;
+ } else {
+ return [[SDLTouchEventCapabilities alloc] initWithDictionary:(NSMutableDictionary *)obj];
+ }
+}
+
+@end