Class WidgetControl
Definition
- Namespace:
- Tizen.Applications
- Assembly:
- Tizen.Applications.WidgetControl.dll
The class for receiving widget events and sending data to the widget.
public class WidgetControl : IDisposable
- Inheritance
-
objectWidgetControl
- Implements
-
System.IDisposable
Constructors
View SourceWidgetControl(string)
The constructor of the WidgetControl object.
Declaration
public WidgetControl(string widgetId)
Parameters
Type | Name | Description |
---|---|---|
string | widgetId | Widget ID. |
Properties
View SourceId
The widget ID.
Declaration
public string Id { get; }
Property Value
Type | Description |
---|---|
string |
IsNoDisplay
The flag value for "nodisplay".
Declaration
public bool IsNoDisplay { get; }
Property Value
Type | Description |
---|---|
bool |
Exceptions
Type | Condition |
---|---|
System.UnauthorizedAccessException | Thrown when an application does not have the required privileges to access this method. |
System.NotSupportedException | Thrown when the required features are not supported. |
MainAppId
Gets main appid of the widget.
Declaration
public string MainAppId { get; }
Property Value
Type | Description |
---|---|
string |
Exceptions
Type | Condition |
---|---|
System.UnauthorizedAccessException | Thrown when an application does not have the required privileges to access this method. |
System.NotSupportedException | Thrown when the required features are not supported. |
PackageId
Gets package ID of the widget.
Declaration
public string PackageId { get; }
Property Value
Type | Description |
---|---|
string |
Exceptions
Type | Condition |
---|---|
System.UnauthorizedAccessException | Thrown when an application does not have the required privileges to access this method. |
System.NotSupportedException | Thrown when the required features are not supported. |
Methods
View SourceCreateAll(string)
Factory method for the WidgetControl. It will create all the objects of WidgetControl based on the package ID.
Declaration
public static WidgetControl[] CreateAll(string pkgId)
Parameters
Type | Name | Description |
---|---|---|
string | pkgId | Package ID. |
Returns
Type | Description |
---|---|
WidgetControl[] | The widget control array. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Thrown when failed because of an invalid argument. |
System.InvalidOperationException | Thrown in case of failed conditions. |
System.UnauthorizedAccessException | Thrown when an application does not have the required privileges to access this method. |
System.NotSupportedException | Thrown when the required features are not supported. |
Dispose()
Releases all the resources used by the WidgetControl class.
Declaration
public void Dispose()
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown in case of failed conditions. |
System.UnauthorizedAccessException | Thrown when an application does not have the required privileges to access this method. |
System.NotSupportedException | Thrown when the required features are not supported. |
~WidgetControl()
Finalizer of the WidgetControl class.
Declaration
protected ~WidgetControl()
GetIconPath(string)
Gets the widget icon path.
Declaration
public string GetIconPath(string lang)
Parameters
Type | Name | Description |
---|---|---|
string | lang | Language. |
Returns
Type | Description |
---|---|
string | The widget icon path. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown when the argument is null. |
System.UnauthorizedAccessException | Thrown when an application does not have the required privileges to access this method. |
System.NotSupportedException | Thrown when the required features are not supported. |
GetInstances()
Gets the objects for widget instance information.
Declaration
public IEnumerable<WidgetControl.Instance> GetInstances()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T><WidgetControl.Instance> | The instances list. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown in case of failed conditions. |
System.NotSupportedException | Thrown when the API is not supported in this device. |
System.UnauthorizedAccessException | Thrown when an application does not have the required privileges to access this method. |
GetName(string)
Gets the widget name.
Declaration
public string GetName(string lang)
Parameters
Type | Name | Description |
---|---|---|
string | lang | Language. |
Returns
Type | Description |
---|---|
string | The widget name. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown when the argument is null. |
System.UnauthorizedAccessException | Thrown when an application does not have the required privileges to access this method. |
System.NotSupportedException | Thrown when the required features are not supported. |
GetScales()
Gets the objects for widget scale information.
Declaration
public IEnumerable<WidgetControl.Scale> GetScales()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T><WidgetControl.Scale> | The scales list. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown in case of failed conditions. |
System.UnauthorizedAccessException | Thrown when an application does not have the required privileges to access this method. |
System.NotSupportedException | Thrown when the required features are not supported. |
GetWidgetIds(string)
Gets all the widget IDs by the package ID.
Declaration
public static string[] GetWidgetIds(string pkgId)
Parameters
Type | Name | Description |
---|---|---|
string | pkgId | Package ID. |
Returns
Type | Description |
---|---|
string[] | The widget id array. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Thrown when failed because of an invalid argument. |
System.InvalidOperationException | Thrown in case of failed conditions. |
System.UnauthorizedAccessException | Thrown when an application does not have the required privileges to access this method. |
System.NotSupportedException | Thrown when the required features are not supported. |
Events
View SourceCreated
The event handler for a created widget instance.
Declaration
public event EventHandler<WidgetLifecycleEventArgs> Created
Event Type
Type | Description |
---|---|
System.EventHandler<TEventArgs><WidgetLifecycleEventArgs> |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown in case of failed conditions. |
System.UnauthorizedAccessException | Thrown when an application does not have the required privileges to access this method. |
System.NotSupportedException | Thrown when the required features are not supported. |
Destroyed
The event handler for a destroyed widget instance.
Declaration
public event EventHandler<WidgetLifecycleEventArgs> Destroyed
Event Type
Type | Description |
---|---|
System.EventHandler<TEventArgs><WidgetLifecycleEventArgs> |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown in case of failed conditions. |
System.UnauthorizedAccessException | Thrown when an application does not have the required privileges to access this method. |
System.NotSupportedException | Thrown when the required features are not supported. |
Paused
The event handler for a paused widget instance.
Declaration
public event EventHandler<WidgetLifecycleEventArgs> Paused
Event Type
Type | Description |
---|---|
System.EventHandler<TEventArgs><WidgetLifecycleEventArgs> |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown in case of failed conditions. |
System.UnauthorizedAccessException | Thrown when an application does not have the required privileges to access this method. |
System.NotSupportedException | Thrown when the required features are not supported. |
Resumed
The event handler for a resumed widget instance.
Declaration
public event EventHandler<WidgetLifecycleEventArgs> Resumed
Event Type
Type | Description |
---|---|
System.EventHandler<TEventArgs><WidgetLifecycleEventArgs> |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown in case of failed conditions. |
System.UnauthorizedAccessException | Thrown when an application does not have the required privileges to access this method. |
System.NotSupportedException | Thrown when the required features are not supported. |