Create a new window on the display with the specified window type.
@discussion Windows of different types like MAIN or WIDGET windows can be created. Every application will have a pre-created MAIN window available. A widget is a small window that the app can create to provide information and soft buttons for quick app control. Widgets can be created depending on the capabilities of the system. Widgets can be associated with a specific App Service type such as MEDIA
or NAVIGATION
. As an example if a MEDIA
app becomes active, this app becomes audible and is allowed to play audio. If the media app has created a widget with MEDIA
type associated, this widget will automatically be activated together with the app.
@since SDL 6.0
Constructor with the required parameters
- (nonnull instancetype)initWithId:(NSUInteger)windowId
windowName:(nonnull NSString *)windowName
windowType:(nonnull SDLWindowType)windowType;
init(id windowId: UInt, windowName: String, windowType: SDLWindowType)
The type of the window to be created. Main window or widget.
The window name to be used by the HMI. - see: windowName
The type of the window to be created. Main window or widget.
Convenience constructor with all the parameters.
- (nonnull instancetype)initWithId:(NSUInteger)windowId
windowName:(nonnull NSString *)windowName
windowType:(nonnull SDLWindowType)windowType
associatedServiceType:(nullable NSString *)associatedServiceType
duplicateUpdatesFromWindowID:(NSUInteger)duplicateUpdatesFromWindowID;
init(id windowId: UInt, windowName: String, windowType: SDLWindowType, associatedServiceType: String?, duplicateUpdatesFromWindowID: UInt)
The type of the window to be created. Main window or widget.
The window name to be used by the HMI. - see: windowName
The type of the window to be created. Main window or widget.
Allows an app to create a widget related to a specific service type. - see: associatedServiceType
Optional parameter. Specify whether the content sent to an existing window should be duplicated to the created window. If there isn’t a window with the ID, the request will be rejected with INVALID_DATA
.
A unique ID to identify the window.
@discussion The value of ‘0’ will always be the default main window on the main display and should not be used in this context as it will already be created for the app. See PredefinedWindows enum. Creating a window with an ID that is already in use will be rejected with INVALID_ID
.
@property (nonatomic, strong) NSNumber<SDLUInt> *_Nonnull windowID;
var windowID: NSNumber & SDLUInt { get set }
The window name to be used by the HMI.
@discussion The name of the pre-created default window will match the app name. Multiple apps can share the same window name except for the default main window. Creating a window with a name which is already in use by the app will result in DUPLICATE_NAME
. MaxLength 100.
@property (nonatomic, strong) NSString *_Nonnull windowName;
var windowName: String { get set }
The type of the window to be created. Main window or widget.
@property (nonatomic, strong) SDLWindowType _Nonnull type;
var type: SDLWindowType { get set }
Allows an app to create a widget related to a specific service type.
@discussion As an example if a MEDIA
app becomes active, this app becomes audible and is allowed to play audio. Actions such as skip or play/pause will be directed to this active media app. In case of widgets, the system can provide a single “media” widget which will act as a placeholder for the active media app. It is only allowed to have one window per service type. This means that a media app can only have a single MEDIA widget. Still the app can create widgets omitting this parameter. Those widgets would be available as app specific widgets that are permanently included in the HMI. This parameter is related to widgets only. The default main window, which is pre-created during app registration, will be created based on the HMI types specified in the app registration request.
@property (nonatomic, strong, nullable) NSString *associatedServiceType;
var associatedServiceType: String? { get set }
Optional parameter. Specify whether the content sent to an existing window should be duplicated to the created window. If there isn’t a window with the ID, the request will be rejected with INVALID_DATA
.
@property (nonatomic, strong, nullable) NSNumber<SDLUInt> *duplicateUpdatesFromWindowID;
var duplicateUpdatesFromWindowID: (NSNumber & SDLUInt)? { get set }