Commit f63ed56d authored by Martin Finkel's avatar Martin Finkel

[Docs] Dialog

parent a0ebf4da
......@@ -111,6 +111,9 @@ namespace LibVLCSharp.Shared
internal IntPtr NativeReference { get; }
}
/// <summary>
/// Describes the question type by libvlc
/// </summary>
public enum DialogQuestionType
{
Normal = 0,
......@@ -118,15 +121,59 @@ namespace LibVLCSharp.Shared
Critical = 2
}
/// <summary>
/// Called when an error message needs to be displayed.
/// </summary>
/// <param name="title">title of the dialog </param>
/// <param name="text">text of the dialog </param>
public delegate Task DisplayError(string title, string text);
/// <summary>
/// Called when a login dialog needs to be displayed.
/// You can interact with this dialog by calling PostLogin() to post an answer or Dismiss() to cancel this dialog.
/// </summary>
/// <param name="dialog">id used to interact with the dialog </param>
/// <param name="title">title of the dialog </param>
/// <param name="text">text of the dialog </param>
/// <param name="defaultUsername">user name that should be set on the user form</param>
/// <param name="askStore">if true, ask the user if he wants to save the credentials</param>
/// <param name="token">Use token to cancel operation</param>
public delegate Task DisplayLogin(Dialog dialog, string title, string text, string defaultUsername, bool askStore, CancellationToken token);
/// <summary>
/// Called when a question dialog needs to be displayed.
/// You can interact with this dialog by calling PostAction() to post an answer or Dismiss() to cancel this dialog.
/// </summary>
/// <param name="dialog">id used to interact with the dialog</param>
/// <param name="title">title of the dialog</param>
/// <param name="text">text of the dialog</param>
/// <param name="type">question type (or severity) of the dialog</param>
/// <param name="cancelText">text of the cancel button</param>
/// <param name="firstActionText">text of the first button, if NULL, don't display this button</param>
/// <param name="secondActionText">text of the second button, if NULL, don't display this button</param>
/// <param name="token">Use token to cancel operation</param>
public delegate Task DisplayQuestion(Dialog dialog, string title, string text, DialogQuestionType type, string cancelText,
string firstActionText, string secondActionText, CancellationToken token);
/// <summary>
/// Called when a progress dialog needs to be displayed.
/// If cancellable cancelText is not NULL, you can cancel this dialog by calling libvlc_dialog_dismiss()
/// </summary>
/// <param name="dialog">id used to interact with the dialog</param>
/// <param name="title">title of the dialog</param>
/// <param name="text">text of the dialog</param>
/// <param name="indeterminate">true if the progress dialog is indeterminate</param>
/// <param name="position">initial position of the progress bar (between 0.0 and 1.0)</param>
/// <param name="cancelText">text of the cancel button, if NULL the dialog is not cancellable</param>
/// <param name="token">Use token to cancel operation</param>
public delegate Task DisplayProgress(Dialog dialog, string title, string text, bool indeterminate, float position, string cancelText, CancellationToken token);
/// <summary>
/// Called when a progress dialog needs to be updated.
/// </summary>
/// <param name="dialog">id of the dialog</param>
/// <param name="position">position of the progress bar (between 0.0 and 1.0)</param>
/// <param name="text">new text of the progress dialog </param>
public delegate Task UpdateProgress(Dialog dialog, float position, string text);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment