2015-11-26 17:04:03 +00:00
|
|
|
/*
|
|
|
|
Copyright 2015 OpenMarket Ltd
|
2017-03-08 15:14:41 +00:00
|
|
|
Copyright 2017 Vector Creations Ltd
|
2019-01-11 10:45:27 +00:00
|
|
|
Copyright 2019 New Vector Ltd
|
2015-11-26 17:04:03 +00:00
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
*/
|
|
|
|
|
2015-12-18 14:00:20 +00:00
|
|
|
#import <MatrixKit/MatrixKit.h>
|
|
|
|
|
2019-01-10 14:32:59 +00:00
|
|
|
@protocol Theme;
|
2018-11-30 14:26:41 +00:00
|
|
|
|
2018-11-29 16:31:41 +00:00
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
2017-07-21 09:28:17 +00:00
|
|
|
/**
|
|
|
|
Posted when the user interface theme has been changed.
|
|
|
|
*/
|
2019-01-11 09:32:56 +00:00
|
|
|
extern NSString *const kThemeServiceDidChangeThemeNotification;
|
2017-07-21 09:28:17 +00:00
|
|
|
|
2016-02-05 14:40:16 +00:00
|
|
|
|
2016-02-05 14:21:00 +00:00
|
|
|
/**
|
2019-01-11 10:45:27 +00:00
|
|
|
`ThemeService` class manages the application design values.
|
2016-02-05 14:21:00 +00:00
|
|
|
*/
|
2019-01-11 09:32:56 +00:00
|
|
|
@interface ThemeService : NSObject
|
2015-12-09 15:09:46 +00:00
|
|
|
|
2019-01-11 10:45:27 +00:00
|
|
|
/**
|
|
|
|
Returns the shared instance.
|
|
|
|
|
|
|
|
@return the shared instance.
|
|
|
|
*/
|
|
|
|
+ (instancetype)shared;
|
|
|
|
|
|
|
|
/**
|
2019-01-14 09:53:43 +00:00
|
|
|
The id of the theme being used.
|
2019-01-11 10:45:27 +00:00
|
|
|
*/
|
2019-01-14 09:53:43 +00:00
|
|
|
@property (nonatomic, nullable) NSString *themeId;
|
2019-01-11 10:45:27 +00:00
|
|
|
|
2018-11-30 14:26:41 +00:00
|
|
|
/**
|
2019-01-10 14:32:59 +00:00
|
|
|
The current theme.
|
2019-01-14 09:53:43 +00:00
|
|
|
Default value is the Default theme.
|
2018-11-30 14:26:41 +00:00
|
|
|
*/
|
2019-01-11 10:45:27 +00:00
|
|
|
@property (nonatomic, readonly) id<Theme> theme;
|
|
|
|
|
|
|
|
/**
|
|
|
|
Get the theme with the given id.
|
|
|
|
|
|
|
|
@param themeId the theme id.
|
|
|
|
@return the theme.
|
|
|
|
*/
|
|
|
|
- (id<Theme>)themeWithThemeId:(NSString*)themeId;
|
2018-11-30 14:26:41 +00:00
|
|
|
|
2019-01-11 10:57:02 +00:00
|
|
|
#pragma mark - Riot Colors not yet themeable
|
|
|
|
|
|
|
|
@property (nonatomic, readonly) UIColor *riotColorBlue;
|
|
|
|
@property (nonatomic, readonly) UIColor *riotColorCuriousBlue;
|
|
|
|
@property (nonatomic, readonly) UIColor *riotColorIndigo;
|
|
|
|
@property (nonatomic, readonly) UIColor *riotColorOrange;
|
|
|
|
|
2015-12-18 14:00:20 +00:00
|
|
|
@end
|
2018-11-29 16:31:41 +00:00
|
|
|
|
|
|
|
NS_ASSUME_NONNULL_END
|