VLC 4.0.0-dev
Loading...
Searching...
No Matches
LibVLC dialog
Collaboration diagram for LibVLC dialog:

Files

file  libvlc_dialog.h
 LibVLC dialog external API.
 

Data Structures

struct  libvlc_dialog_cbs
 Dialog callbacks to be implemented. More...
 

Typedefs

typedef enum libvlc_dialog_question_type libvlc_dialog_question_type
 
typedef struct libvlc_dialog_cbs libvlc_dialog_cbs
 Dialog callbacks to be implemented.
 
typedef void(* libvlc_dialog_error_cbs) (void *p_data, const char *psz_title, const char *psz_text)
 Called when an error message needs to be displayed.
 

Enumerations

enum  libvlc_dialog_question_type { LIBVLC_DIALOG_QUESTION_NORMAL , LIBVLC_DIALOG_QUESTION_WARNING , LIBVLC_DIALOG_QUESTION_CRITICAL }
 

Functions

LIBVLC_API void libvlc_dialog_set_callbacks (libvlc_instance_t *p_instance, const libvlc_dialog_cbs *p_cbs, void *p_data)
 Register callbacks in order to handle VLC dialogs.
 
LIBVLC_API void libvlc_dialog_set_error_callback (libvlc_instance_t *p_instance, libvlc_dialog_error_cbs p_cbs, void *p_data)
 
LIBVLC_API void libvlc_dialog_set_context (libvlc_dialog_id *p_id, void *p_context)
 Associate an opaque pointer with the dialog id.
 
LIBVLC_API void * libvlc_dialog_get_context (libvlc_dialog_id *p_id)
 Return the opaque pointer associated with the dialog id.
 
LIBVLC_API int libvlc_dialog_post_login (libvlc_dialog_id *p_id, const char *psz_username, const char *psz_password, bool b_store)
 Post a login answer.
 
LIBVLC_API int libvlc_dialog_post_action (libvlc_dialog_id *p_id, int i_action)
 Post a question answer.
 
LIBVLC_API int libvlc_dialog_dismiss (libvlc_dialog_id *p_id)
 Dismiss a dialog.
 

Detailed Description

Typedef Documentation

◆ libvlc_dialog_cbs

Dialog callbacks to be implemented.

Attention
starting with vlc 4.0.0 the error callback (pf_display_error) is no longer part of this struct and need to be registered separately using libvlc_dialog_set_error_callback
See also
libvlc_dialog_set_error_callback

◆ libvlc_dialog_error_cbs

typedef void(* libvlc_dialog_error_cbs) (void *p_data, const char *psz_title, const char *psz_text)

Called when an error message needs to be displayed.

Parameters
p_dataopaque pointer for the callback
psz_titletitle of the dialog
psz_texttext of the dialog

◆ libvlc_dialog_question_type

Enumeration Type Documentation

◆ libvlc_dialog_question_type

Enumerator
LIBVLC_DIALOG_QUESTION_NORMAL 
LIBVLC_DIALOG_QUESTION_WARNING 
LIBVLC_DIALOG_QUESTION_CRITICAL 

Function Documentation

◆ libvlc_dialog_dismiss()

LIBVLC_API int libvlc_dialog_dismiss ( libvlc_dialog_id p_id)

Dismiss a dialog.

After this call, p_id won't be valid anymore

See also
libvlc_dialog_cbs.pf_cancel
Version
LibVLC 3.0.0 and later.
Parameters
p_idid of the dialog
Returns
0 on success, or -1 on error

◆ libvlc_dialog_get_context()

LIBVLC_API void * libvlc_dialog_get_context ( libvlc_dialog_id p_id)

Return the opaque pointer associated with the dialog id.

See also
libvlc_dialog_set_context
Version
LibVLC 3.0.0 and later.

◆ libvlc_dialog_post_action()

LIBVLC_API int libvlc_dialog_post_action ( libvlc_dialog_id p_id,
int  i_action 
)

Post a question answer.

After this call, p_id won't be valid anymore

See also
libvlc_dialog_cbs.pf_display_question
Version
LibVLC 3.0.0 and later.
Parameters
p_idid of the dialog
i_action1 for action1, 2 for action2
Returns
0 on success, or -1 on error

◆ libvlc_dialog_post_login()

LIBVLC_API int libvlc_dialog_post_login ( libvlc_dialog_id p_id,
const char *  psz_username,
const char *  psz_password,
bool  b_store 
)

Post a login answer.

After this call, p_id won't be valid anymore

See also
libvlc_dialog_cbs.pf_display_login
Version
LibVLC 3.0.0 and later.
Parameters
p_idid of the dialog
psz_usernamevalid and non empty string
psz_passwordvalid string (can be empty)
b_storeif true, store the credentials
Returns
0 on success, or -1 on error

◆ libvlc_dialog_set_callbacks()

LIBVLC_API void libvlc_dialog_set_callbacks ( libvlc_instance_t p_instance,
const libvlc_dialog_cbs p_cbs,
void *  p_data 
)

Register callbacks in order to handle VLC dialogs.

Version
LibVLC 3.0.0 and later.
Parameters
p_instancethe libvlc instance to attach the dialog callbacks to
p_cbsa pointer to callbacks, or NULL to unregister callbacks.
p_dataopaque pointer for the callback

◆ libvlc_dialog_set_context()

LIBVLC_API void libvlc_dialog_set_context ( libvlc_dialog_id p_id,
void *  p_context 
)

Associate an opaque pointer with the dialog id.

Version
LibVLC 3.0.0 and later.

◆ libvlc_dialog_set_error_callback()

LIBVLC_API void libvlc_dialog_set_error_callback ( libvlc_instance_t p_instance,
libvlc_dialog_error_cbs  p_cbs,
void *  p_data 
)