23#ifndef VLC_EXTENSIONS_H
24#define VLC_EXTENSIONS_H
101 int i_ret = p_mgr->
pf_control(p_mgr, i_control, ext, args);
112 int i_flag,
bool b_default )
123#define extension_Activate( mgr, ext ) \
124 extension_Control( mgr, EXTENSION_ACTIVATE, ext )
127#define extension_Trigger( mgr, ext ) \
128 extension_Control( mgr, EXTENSION_TRIGGER, ext )
131#define extension_Deactivate( mgr, ext ) \
132 extension_Control( mgr, EXTENSION_DEACTIVATE, ext )
135#define extension_IsActivated( mgr, ext ) \
136 vlc_extension_GetBool( mgr, ext, EXTENSION_IS_ACTIVATED, false )
139#define extension_HasMenu( mgr, ext ) \
140 vlc_extension_GetBool( mgr, ext, EXTENSION_HAS_MENU, false )
182#define extension_TriggerOnly( mgr, ext ) \
183 vlc_extension_GetBool( mgr, ext, EXTENSION_TRIGGER_ONLY, false )
242 command.
p_dlg = p_dialog;
243 command.
event = event;
252#define extension_DialogClosed( dlg ) \
253 extension_DialogCommand( dlg, EXTENSION_EVENT_CLOSE, NULL )
259#define extension_WidgetClicked( dlg, wdg ) \
260 extension_DialogCommand( dlg, EXTENSION_EVENT_CLICK, wdg )
#define VLC_SUCCESS
No error.
Definition: vlc_common.h:503
static int var_SetAddress(vlc_object_t *p_obj, const char *psz_name, void *ptr)
Set the value of a pointer variable.
Definition: vlc_variables.h:360
static thread_local struct @81 state
Command to pass to the extension dialog owner.
Definition: vlc_extensions.h:205
void * p_data
Opaque data to send.
Definition: vlc_extensions.h:208
extension_dialog_t * p_dlg
Destination dialog.
Definition: vlc_extensions.h:206
extension_dialog_event_e event
Event,.
Definition: vlc_extensions.h:207
Dialog descriptor for extensions.
Definition: vlc_extensions.h:214
vlc_cond_t cond
Signaled == UI is done working on the dialog.
Definition: vlc_extensions.h:229
struct extension_dialog_t::@223 widgets
Widgets owned by the dialog.
bool b_hide
Hide this dialog (!b_hide shows)
Definition: vlc_extensions.h:223
char * psz_title
Title for the Dialog (in TitleBar)
Definition: vlc_extensions.h:217
int i_height
Height hint in pixels (may be discarded)
Definition: vlc_extensions.h:219
vlc_object_t * p_object
Owner object (callback on "dialog-event")
Definition: vlc_extensions.h:215
void * p_sys_intf
GUI private pointer.
Definition: vlc_extensions.h:227
int i_width
Width hint in pixels (may be discarded)
Definition: vlc_extensions.h:218
void * p_sys
Dialog private pointer.
Definition: vlc_extensions.h:226
bool b_kill
Kill this dialog.
Definition: vlc_extensions.h:224
vlc_mutex_t lock
Dialog mutex.
Definition: vlc_extensions.h:228
Extension descriptor: name, title, author, ...
Definition: vlc_extensions.h:38
char * psz_version
Version (ro)
Definition: vlc_extensions.h:51
struct vlc_logger * logger
The LibVLC logger to use for the extension.
Definition: vlc_extensions.h:44
char * psz_url
A URL to the official page (ro)
Definition: vlc_extensions.h:52
char * psz_shortdescription
Short description (eg.
Definition: vlc_extensions.h:54
char * psz_name
Real name of the extension (ro)
Definition: vlc_extensions.h:47
char * p_icondata
Embedded data for the icon (ro)
Definition: vlc_extensions.h:55
char * psz_description
Full description (ro)
Definition: vlc_extensions.h:53
char * psz_title
Display title (ro)
Definition: vlc_extensions.h:49
void * p_sys
Reserved for the manager module.
Definition: vlc_extensions.h:39
char * psz_author
Author of the extension (ro)
Definition: vlc_extensions.h:50
int i_icondata_size
Size of that data.
Definition: vlc_extensions.h:56
Definition: vlc_extensions.h:286
int i_id
Identifier for the extension module (weird behavior may occur if not unique)
Definition: vlc_extensions.h:287
bool b_selected
True if this item is selected.
Definition: vlc_extensions.h:290
struct extension_widget_value_t * p_next
Next value or NULL.
Definition: vlc_extensions.h:291
char * psz_text
String value.
Definition: vlc_extensions.h:289
Widget descriptor for extensions.
Definition: vlc_extensions.h:280
int i_spin_loops
Number of loops to play (-1 = infinite, 0 = stop animation)
Definition: vlc_extensions.h:307
char * psz_text
Text. May be NULL or modified by the UI.
Definition: vlc_extensions.h:283
bool b_hide
Hide this widget (make it invisible)
Definition: vlc_extensions.h:304
extension_widget_type_e type
Type of the widget.
Definition: vlc_extensions.h:282
int i_horiz_span
Horizontal size of the object.
Definition: vlc_extensions.h:300
bool b_checked
Is this entry checked.
Definition: vlc_extensions.h:295
struct extension_widget_t::extension_widget_value_t * p_values
Chained list of values (Drop-down/List)
int i_column
Column in the grid.
Definition: vlc_extensions.h:299
int i_width
Width hint.
Definition: vlc_extensions.h:302
int i_vert_span
Vertical size of the object.
Definition: vlc_extensions.h:301
bool b_kill
Destroy this widget.
Definition: vlc_extensions.h:311
void * p_sys
Reserved for the extension manager.
Definition: vlc_extensions.h:315
int i_row
Row in the grid.
Definition: vlc_extensions.h:298
int i_height
Height hint.
Definition: vlc_extensions.h:303
extension_dialog_t * p_dialog
Parent dialog.
Definition: vlc_extensions.h:319
bool b_update
Update this widget.
Definition: vlc_extensions.h:312
void * p_sys_intf
Reserved for the UI, but: NULL means the UI has destroyed the widget or has not created it yet.
Definition: vlc_extensions.h:316
Extensions manager object.
Definition: vlc_extensions.h:61
int(* pf_control)(extensions_manager_t *, int, extension_t *, va_list)
Control, see extension_Control.
Definition: vlc_extensions.h:72
struct vlc_player_t * player
Definition: vlc_extensions.h:66
struct vlc_object_t obj
Definition: vlc_extensions.h:62
struct extensions_manager_t::@222 extensions
Array of extension descriptors.
void * p_sys
Reserved for the module.
Definition: vlc_extensions.h:65
module_t * p_module
Extensions manager module.
Definition: vlc_extensions.h:64
vlc_mutex_t lock
A lock for the extensions array.
Definition: vlc_extensions.h:69
Internal module descriptor.
Definition: modules.h:76
Condition variable.
Definition: vlc_threads.h:322
Definition: messages.c:85
Mutex.
Definition: vlc_threads.h:195
VLC object common members.
Definition: vlc_objects.h:45
This file defines functions, structures and macros for handling arrays in vlc.
#define DECL_ARRAY(type)
Definition: vlc_arrays.h:179
This file is a collection of common definitions and types.
static bool vlc_extension_GetBool(extensions_manager_t *p_mgr, extension_t *p_ext, int i_flag, bool b_default)
Helper for extension_HasMenu, extension_IsActivated... Do not use.
Definition: vlc_extensions.h:112
static int extension_Control(extensions_manager_t *p_mgr, int i_control, extension_t *ext,...)
Control function for extensions.
Definition: vlc_extensions.h:96
struct extensions_manager_sys_t extensions_manager_sys_t
Definition: vlc_extensions.h:32
static int extension_SetInput(extensions_manager_t *p_mgr, extension_t *p_ext, input_item_t *p_item)
Trigger an entry of the extension menu.
Definition: vlc_extensions.h:162
extension_dialog_event_e
User interface event types.
Definition: vlc_extensions.h:196
@ EXTENSION_EVENT_CLOSE
Close the dialog: no data.
Definition: vlc_extensions.h:198
@ EXTENSION_EVENT_CLICK
Click on a widget: data = widget.
Definition: vlc_extensions.h:197
static int extension_TriggerMenu(extensions_manager_t *p_mgr, extension_t *p_ext, uint16_t i)
Trigger an entry of the extension menu.
Definition: vlc_extensions.h:153
extension_widget_type_e
Widget types.
Definition: vlc_extensions.h:265
@ EXTENSION_WIDGET_LIST
Vertical list box (of strings)
Definition: vlc_extensions.h:273
@ EXTENSION_WIDGET_BUTTON
Clickable button.
Definition: vlc_extensions.h:267
@ EXTENSION_WIDGET_CHECK_BOX
Checkable box with label.
Definition: vlc_extensions.h:274
@ EXTENSION_WIDGET_HTML
HTML or rich text area (non editable)
Definition: vlc_extensions.h:269
@ EXTENSION_WIDGET_DROPDOWN
Drop-down box.
Definition: vlc_extensions.h:272
@ EXTENSION_WIDGET_TEXT_FIELD
Editable text line for user input.
Definition: vlc_extensions.h:270
@ EXTENSION_WIDGET_PASSWORD
Editable password input (******)
Definition: vlc_extensions.h:271
@ EXTENSION_WIDGET_SPIN_ICON
A "loading..." spinning icon.
Definition: vlc_extensions.h:275
@ EXTENSION_WIDGET_IMAGE
Image label (psz_text is local URI)
Definition: vlc_extensions.h:268
@ EXTENSION_WIDGET_LABEL
Text label.
Definition: vlc_extensions.h:266
static int extension_DialogCommand(extension_dialog_t *p_dialog, extension_dialog_event_e event, void *data)
Send a command to an Extension dialog.
Definition: vlc_extensions.h:238
static int extension_GetMenu(extensions_manager_t *p_mgr, extension_t *p_ext, char ***pppsz, uint16_t **ppi)
Get this extension's sub-menu.
Definition: vlc_extensions.h:144
static int extension_PlayingChanged(extensions_manager_t *p_mgr, extension_t *p_ext, int state)
Definition: vlc_extensions.h:168
struct extension_t extension_t
Extension descriptor: name, title, author, ...
static int extension_MetaChanged(extensions_manager_t *p_mgr, extension_t *p_ext)
Definition: vlc_extensions.h:175
@ EXTENSION_GET_MENU
arg1: extension_t*, arg2: char***, arg3: uint16_t**
Definition: vlc_extensions.h:83
@ EXTENSION_PLAYING_CHANGED
arg1: extension_t*, arg2 int( playing status )
Definition: vlc_extensions.h:88
@ EXTENSION_IS_ACTIVATED
arg1: extension_t*, arg2: bool*
Definition: vlc_extensions.h:81
@ EXTENSION_ACTIVATE
arg1: extension_t*
Definition: vlc_extensions.h:79
@ EXTENSION_HAS_MENU
arg1: extension_t*
Definition: vlc_extensions.h:82
@ EXTENSION_TRIGGER
arg1: extension_t*
Definition: vlc_extensions.h:85
@ EXTENSION_SET_INPUT
arg1: extension_t*, arg2 (input_item_t*)
Definition: vlc_extensions.h:87
@ EXTENSION_META_CHANGED
arg1: extension_t*, arg2 (input_item_t*)
Definition: vlc_extensions.h:89
@ EXTENSION_TRIGGER_MENU
arg1: extension_t*, int (uint16_t)
Definition: vlc_extensions.h:86
@ EXTENSION_TRIGGER_ONLY
arg1: extension_t*, arg2: bool*
Definition: vlc_extensions.h:84
@ EXTENSION_DEACTIVATE
arg1: extension_t*
Definition: vlc_extensions.h:80
Thread primitive declarations.