[DllImport(Libraries.Notification, EntryPoint = "notification_get_args")]
internal static extern NotificationError GetExtentionBundle(NotificationSafeHandle handle, out IntPtr args, out IntPtr group_args);
+ [DllImport(Libraries.Notification, EntryPoint = "notification_get_default_button")]
+ internal static extern NotificationError GetDefaultButton(NotificationSafeHandle handle, out int index);
+
+ [DllImport(Libraries.Notification, EntryPoint = "notification_set_default_button")]
+ internal static extern NotificationError SetDefaultButton(NotificationSafeHandle handle, int index);
+
internal static NotificationError GetText(NotificationSafeHandle handle, NotificationText type, out string text)
{
NotificationError ret;
public bool IsAutoRemove { get; set; } = true;
/// <summary>
+ /// Gets or sets the default button to display highlight on the active notification
+ /// </summary>
+ /// <remarks>
+ /// The default button for display highlight is only reflected on Tizen TV.
+ /// If you use this Property on other profile, this value have no effect
+ /// </remarks>
+ public ButtonIndex DefaultButton { get; set; } = ButtonIndex.None;
+
+ /// <summary>
/// Gets or sets a ReplyAction to this active notification style.
/// </summary>
/// <remarks>
throw NotificationErrorFactory.GetException(ret, "unable to set background Image");
}
+ if (style.DefaultButton != ButtonIndex.None)
+ {
+ Interop.Notification.SetDefaultButton(notification.Handle, (int)style.DefaultButton + 1);
+ }
+
Interop.Notification.GetApplist(notification.Handle, out flag);
Interop.Notification.SetApplist(notification.Handle, flag | (int)NotificationDisplayApplist.Active);
active.BackgroundImage = path;
}
+ int defaultIndex;
+ Interop.Notification.GetDefaultButton(notification.Handle, out defaultIndex);
+ active.DefaultButton = (ButtonIndex)(defaultIndex - 1);
+
appcontrol = null;
Interop.Notification.GetImage(notification.Handle, NotificationImage.TextInputButton, out path);
Interop.Notification.GetText(notification.Handle, NotificationText.InputButton, out text);
[DllImport(Libraries.NotificationEventListener, EntryPoint = "notification_get_event_flag")]
internal static extern ErrorCode GetEventFlag(NotificationSafeHandle handle, out bool eventFlag);
+ [DllImport(Libraries.NotificationEventListener, EntryPoint = "notification_get_default_button")]
+ internal static extern ErrorCode GetDefaultButton(NotificationSafeHandle handle, out int index);
+
internal static ErrorCode GetAppId(NotificationSafeHandle handle, out string appid)
{
ErrorCode err;
public string BackgroundImage { get; internal set; }
/// <summary>
+ /// Gets the default button to display highlight on the active notification
+ /// </summary>
+ public ButtonIndex DefaultButton { get; internal set; }
+
+ /// <summary>
/// Gets timeout value in second when the notification can be hidden from the viewer.
/// </summary>
public int HideTimeout { get; internal set; }
Interop.NotificationEventListener.GetImage(eventargs.Handle, NotificationImage.Background, out path);
activeStyle.BackgroundImage = path;
+ int index;
+ Interop.NotificationEventListener.GetDefaultButton(eventargs.Handle, out index);
+ activeStyle.DefaultButton = (ButtonIndex)(index - 1);
+
Interop.NotificationEventListener.GetHideTimeout(eventargs.Handle, out timeout);
activeStyle.HideTimeout = timeout;