Commit 559e9799 authored by Geoffroy Couprie's avatar Geoffroy Couprie

WinCE intf: get rid of i_object_id

parent 9c34d227
...@@ -83,11 +83,11 @@ void PopupMenu( intf_thread_t *p_intf, HWND p_parent, POINT point ) ...@@ -83,11 +83,11 @@ void PopupMenu( intf_thread_t *p_intf, HWND p_parent, POINT point )
vlc_object_t *p_object, *p_input; vlc_object_t *p_object, *p_input;
char *ppsz_varnames[MAX_POPUP_ITEMS]; char *ppsz_varnames[MAX_POPUP_ITEMS];
int pi_objects[MAX_POPUP_ITEMS]; vlc_object_t * pi_objects[MAX_POPUP_ITEMS];
int i = 0, i_last_separator = 0; int i = 0, i_last_separator = 0;
/* Initializations */ /* Initializations */
memset( pi_objects, 0, MAX_POPUP_ITEMS * sizeof(int) ); memset( pi_objects, 0, MAX_POPUP_ITEMS * sizeof(vlc_object_t *) );
ppsz_varnames[i] = "VLC media player"; ppsz_varnames[i] = "VLC media player";
pi_objects[i++] = 0; pi_objects[i++] = 0;
...@@ -100,24 +100,24 @@ void PopupMenu( intf_thread_t *p_intf, HWND p_parent, POINT point ) ...@@ -100,24 +100,24 @@ void PopupMenu( intf_thread_t *p_intf, HWND p_parent, POINT point )
if( p_object != NULL ) if( p_object != NULL )
{ {
ppsz_varnames[i] = "bookmark"; ppsz_varnames[i] = "bookmark";
pi_objects[i++] = p_object->i_object_id; pi_objects[i++] = p_object;
ppsz_varnames[i] = "title"; ppsz_varnames[i] = "title";
pi_objects[i++] = p_object->i_object_id; pi_objects[i++] = p_object;
ppsz_varnames[i] = "chapter"; ppsz_varnames[i] = "chapter";
pi_objects[i++] = p_object->i_object_id; pi_objects[i++] = p_object;
ppsz_varnames[i] = "program"; ppsz_varnames[i] = "program";
pi_objects[i++] = p_object->i_object_id; pi_objects[i++] = p_object;
ppsz_varnames[i] = "navigation"; ppsz_varnames[i] = "navigation";
pi_objects[i++] = p_object->i_object_id; pi_objects[i++] = p_object;
ppsz_varnames[i] = "dvd_menus"; ppsz_varnames[i] = "dvd_menus";
pi_objects[i++] = p_object->i_object_id; pi_objects[i++] = p_object;
ppsz_varnames[i] = "video-es"; ppsz_varnames[i] = "video-es";
pi_objects[i++] = p_object->i_object_id; pi_objects[i++] = p_object;
ppsz_varnames[i] = "audio-es"; ppsz_varnames[i] = "audio-es";
pi_objects[i++] = p_object->i_object_id; pi_objects[i++] = p_object;
ppsz_varnames[i] = "spu-es"; ppsz_varnames[i] = "spu-es";
pi_objects[i++] = p_object->i_object_id; pi_objects[i++] = p_object;
} }
p_input = p_object; p_input = p_object;
if( !p_input ) goto interfacemenu; if( !p_input ) goto interfacemenu;
...@@ -133,21 +133,21 @@ void PopupMenu( intf_thread_t *p_intf, HWND p_parent, POINT point ) ...@@ -133,21 +133,21 @@ void PopupMenu( intf_thread_t *p_intf, HWND p_parent, POINT point )
vlc_object_t *p_dec_obj; vlc_object_t *p_dec_obj;
ppsz_varnames[i] = "fullscreen"; ppsz_varnames[i] = "fullscreen";
pi_objects[i++] = p_object->i_object_id; pi_objects[i++] = p_object;
ppsz_varnames[i] = "zoom"; ppsz_varnames[i] = "zoom";
pi_objects[i++] = p_object->i_object_id; pi_objects[i++] = p_object;
ppsz_varnames[i] = "deinterlace"; ppsz_varnames[i] = "deinterlace";
pi_objects[i++] = p_object->i_object_id; pi_objects[i++] = p_object;
ppsz_varnames[i] = "aspect-ratio"; ppsz_varnames[i] = "aspect-ratio";
pi_objects[i++] = p_object->i_object_id; pi_objects[i++] = p_object;
ppsz_varnames[i] = "crop"; ppsz_varnames[i] = "crop";
pi_objects[i++] = p_object->i_object_id; pi_objects[i++] = p_object;
ppsz_varnames[i] = "video-on-top"; ppsz_varnames[i] = "video-on-top";
pi_objects[i++] = p_object->i_object_id; pi_objects[i++] = p_object;
ppsz_varnames[i] = "directx-wallpaper"; ppsz_varnames[i] = "directx-wallpaper";
pi_objects[i++] = p_object->i_object_id; pi_objects[i++] = p_object;
ppsz_varnames[i] = "video-snapshot"; ppsz_varnames[i] = "video-snapshot";
pi_objects[i++] = p_object->i_object_id; pi_objects[i++] = p_object;
p_dec_obj = (vlc_object_t *)vlc_object_find( p_object, p_dec_obj = (vlc_object_t *)vlc_object_find( p_object,
VLC_OBJECT_DECODER, VLC_OBJECT_DECODER,
...@@ -155,7 +155,7 @@ void PopupMenu( intf_thread_t *p_intf, HWND p_parent, POINT point ) ...@@ -155,7 +155,7 @@ void PopupMenu( intf_thread_t *p_intf, HWND p_parent, POINT point )
if( p_dec_obj != NULL ) if( p_dec_obj != NULL )
{ {
ppsz_varnames[i] = "ffmpeg-pp-q"; ppsz_varnames[i] = "ffmpeg-pp-q";
pi_objects[i++] = p_dec_obj->i_object_id; pi_objects[i++] = p_dec_obj;
vlc_object_release( p_dec_obj ); vlc_object_release( p_dec_obj );
} }
...@@ -171,13 +171,13 @@ void PopupMenu( intf_thread_t *p_intf, HWND p_parent, POINT point ) ...@@ -171,13 +171,13 @@ void PopupMenu( intf_thread_t *p_intf, HWND p_parent, POINT point )
if( p_object != NULL ) if( p_object != NULL )
{ {
ppsz_varnames[i] = "audio-device"; ppsz_varnames[i] = "audio-device";
pi_objects[i++] = p_object->i_object_id; pi_objects[i++] = p_object;
ppsz_varnames[i] = "audio-channels"; ppsz_varnames[i] = "audio-channels";
pi_objects[i++] = p_object->i_object_id; pi_objects[i++] = p_object;
ppsz_varnames[i] = "visual"; ppsz_varnames[i] = "visual";
pi_objects[i++] = p_object->i_object_id; pi_objects[i++] = p_object;
ppsz_varnames[i] = "equalizer"; ppsz_varnames[i] = "equalizer";
pi_objects[i++] = p_object->i_object_id; pi_objects[i++] = p_object;
vlc_object_release( p_object ); vlc_object_release( p_object );
} }
...@@ -247,7 +247,7 @@ void RefreshAudioMenu( intf_thread_t *p_intf, HMENU hMenu ) ...@@ -247,7 +247,7 @@ void RefreshAudioMenu( intf_thread_t *p_intf, HMENU hMenu )
vlc_object_t *p_object; vlc_object_t *p_object;
char *ppsz_varnames[MAX_AUDIO_ITEMS]; char *ppsz_varnames[MAX_AUDIO_ITEMS];
int pi_objects[MAX_AUDIO_ITEMS]; vlc_object_t * pi_objects[MAX_AUDIO_ITEMS];
int i; int i;
/* Delete old menu */ /* Delete old menu */
...@@ -260,7 +260,7 @@ void RefreshAudioMenu( intf_thread_t *p_intf, HMENU hMenu ) ...@@ -260,7 +260,7 @@ void RefreshAudioMenu( intf_thread_t *p_intf, HMENU hMenu )
/* Initializations */ /* Initializations */
memset( pi_objects, 0, MAX_AUDIO_ITEMS * sizeof(int) ); memset( pi_objects, 0, MAX_AUDIO_ITEMS * sizeof(vlc_object_t *) );
i = 0; i = 0;
p_object = (vlc_object_t *) p_object = (vlc_object_t *)
...@@ -268,7 +268,7 @@ void RefreshAudioMenu( intf_thread_t *p_intf, HMENU hMenu ) ...@@ -268,7 +268,7 @@ void RefreshAudioMenu( intf_thread_t *p_intf, HMENU hMenu )
if( p_object != NULL ) if( p_object != NULL )
{ {
ppsz_varnames[i] = "audio-es"; ppsz_varnames[i] = "audio-es";
pi_objects[i++] = p_object->i_object_id; pi_objects[i++] = p_object;
vlc_object_release( p_object ); vlc_object_release( p_object );
} }
...@@ -277,11 +277,11 @@ void RefreshAudioMenu( intf_thread_t *p_intf, HMENU hMenu ) ...@@ -277,11 +277,11 @@ void RefreshAudioMenu( intf_thread_t *p_intf, HMENU hMenu )
if( p_object != NULL ) if( p_object != NULL )
{ {
ppsz_varnames[i] = "audio-device"; ppsz_varnames[i] = "audio-device";
pi_objects[i++] = p_object->i_object_id; pi_objects[i++] = p_object;
ppsz_varnames[i] = "audio-channels"; ppsz_varnames[i] = "audio-channels";
pi_objects[i++] = p_object->i_object_id; pi_objects[i++] = p_object;
ppsz_varnames[i] = "visual"; ppsz_varnames[i] = "visual";
pi_objects[i++] = p_object->i_object_id; pi_objects[i++] = p_object;
vlc_object_release( p_object ); vlc_object_release( p_object );
} }
...@@ -296,7 +296,7 @@ void RefreshVideoMenu( intf_thread_t *p_intf, HMENU hMenu ) ...@@ -296,7 +296,7 @@ void RefreshVideoMenu( intf_thread_t *p_intf, HMENU hMenu )
vlc_object_t *p_object; vlc_object_t *p_object;
char *ppsz_varnames[MAX_VIDEO_ITEMS]; char *ppsz_varnames[MAX_VIDEO_ITEMS];
int pi_objects[MAX_VIDEO_ITEMS]; vlc_object_t * pi_objects[MAX_VIDEO_ITEMS];
int i; int i;
/* Delete old menu */ /* Delete old menu */
...@@ -308,7 +308,7 @@ void RefreshVideoMenu( intf_thread_t *p_intf, HMENU hMenu ) ...@@ -308,7 +308,7 @@ void RefreshVideoMenu( intf_thread_t *p_intf, HMENU hMenu )
else p_intf->p_sys->p_video_menu = new vector<MenuItemExt*>; else p_intf->p_sys->p_video_menu = new vector<MenuItemExt*>;
/* Initializations */ /* Initializations */
memset( pi_objects, 0, MAX_VIDEO_ITEMS * sizeof(int) ); memset( pi_objects, 0, MAX_VIDEO_ITEMS * sizeof(vlc_object_t *) );
i = 0; i = 0;
p_object = (vlc_object_t *) p_object = (vlc_object_t *)
...@@ -316,9 +316,9 @@ void RefreshVideoMenu( intf_thread_t *p_intf, HMENU hMenu ) ...@@ -316,9 +316,9 @@ void RefreshVideoMenu( intf_thread_t *p_intf, HMENU hMenu )
if( p_object != NULL ) if( p_object != NULL )
{ {
ppsz_varnames[i] = "video-es"; ppsz_varnames[i] = "video-es";
pi_objects[i++] = p_object->i_object_id; pi_objects[i++] = p_object;
ppsz_varnames[i] = "spu-es"; ppsz_varnames[i] = "spu-es";
pi_objects[i++] = p_object->i_object_id; pi_objects[i++] = p_object;
vlc_object_release( p_object ); vlc_object_release( p_object );
} }
...@@ -329,28 +329,28 @@ void RefreshVideoMenu( intf_thread_t *p_intf, HMENU hMenu ) ...@@ -329,28 +329,28 @@ void RefreshVideoMenu( intf_thread_t *p_intf, HMENU hMenu )
vlc_object_t *p_dec_obj; vlc_object_t *p_dec_obj;
ppsz_varnames[i] = "fullscreen"; ppsz_varnames[i] = "fullscreen";
pi_objects[i++] = p_object->i_object_id; pi_objects[i++] = p_object;
#ifdef WINCE #ifdef WINCE
ppsz_varnames[i] = "transform"; ppsz_varnames[i] = "transform";
pi_objects[i++] = p_object->i_object_id; pi_objects[i++] = p_object;
#endif #endif
ppsz_varnames[i] = "zoom"; ppsz_varnames[i] = "zoom";
pi_objects[i++] = p_object->i_object_id; pi_objects[i++] = p_object;
ppsz_varnames[i] = "deinterlace"; ppsz_varnames[i] = "deinterlace";
pi_objects[i++] = p_object->i_object_id; pi_objects[i++] = p_object;
ppsz_varnames[i] = "aspect-ratio"; ppsz_varnames[i] = "aspect-ratio";
pi_objects[i++] = p_object->i_object_id; pi_objects[i++] = p_object;
ppsz_varnames[i] = "crop"; ppsz_varnames[i] = "crop";
pi_objects[i++] = p_object->i_object_id; pi_objects[i++] = p_object;
ppsz_varnames[i] = "directx-on-top"; ppsz_varnames[i] = "directx-on-top";
pi_objects[i++] = p_object->i_object_id; pi_objects[i++] = p_object;
p_dec_obj = (vlc_object_t *) p_dec_obj = (vlc_object_t *)
vlc_object_find( p_object, VLC_OBJECT_DECODER, FIND_PARENT ); vlc_object_find( p_object, VLC_OBJECT_DECODER, FIND_PARENT );
if( p_dec_obj != NULL ) if( p_dec_obj != NULL )
{ {
ppsz_varnames[i] = "ffmpeg-pp-q"; ppsz_varnames[i] = "ffmpeg-pp-q";
pi_objects[i++] = p_dec_obj->i_object_id; pi_objects[i++] = p_dec_obj;
vlc_object_release( p_dec_obj ); vlc_object_release( p_dec_obj );
} }
...@@ -368,7 +368,7 @@ void RefreshNavigMenu( intf_thread_t *p_intf, HMENU hMenu ) ...@@ -368,7 +368,7 @@ void RefreshNavigMenu( intf_thread_t *p_intf, HMENU hMenu )
vlc_object_t *p_object; vlc_object_t *p_object;
char *ppsz_varnames[MAX_NAVIG_ITEMS]; char *ppsz_varnames[MAX_NAVIG_ITEMS];
int pi_objects[MAX_NAVIG_ITEMS]; vlc_object_t * pi_objects[MAX_NAVIG_ITEMS];
int i; int i;
/* Delete old menu */ /* Delete old menu */
...@@ -380,7 +380,7 @@ void RefreshNavigMenu( intf_thread_t *p_intf, HMENU hMenu ) ...@@ -380,7 +380,7 @@ void RefreshNavigMenu( intf_thread_t *p_intf, HMENU hMenu )
else p_intf->p_sys->p_navig_menu = new vector<MenuItemExt*>; else p_intf->p_sys->p_navig_menu = new vector<MenuItemExt*>;
/* Initializations */ /* Initializations */
memset( pi_objects, 0, MAX_NAVIG_ITEMS * sizeof(int) ); memset( pi_objects, 0, MAX_NAVIG_ITEMS * sizeof(vlc_object_t *) );
i = 0; i = 0;
p_object = (vlc_object_t *) p_object = (vlc_object_t *)
...@@ -388,24 +388,24 @@ void RefreshNavigMenu( intf_thread_t *p_intf, HMENU hMenu ) ...@@ -388,24 +388,24 @@ void RefreshNavigMenu( intf_thread_t *p_intf, HMENU hMenu )
if( p_object != NULL ) if( p_object != NULL )
{ {
ppsz_varnames[i] = "title"; ppsz_varnames[i] = "title";
pi_objects[i++] = p_object->i_object_id; pi_objects[i++] = p_object;
ppsz_varnames[i] = "chapter"; ppsz_varnames[i] = "chapter";
pi_objects[i++] = p_object->i_object_id; pi_objects[i++] = p_object;
ppsz_varnames[i] = "program"; ppsz_varnames[i] = "program";
pi_objects[i++] = p_object->i_object_id; pi_objects[i++] = p_object;
ppsz_varnames[i] = "navigation"; ppsz_varnames[i] = "navigation";
pi_objects[i++] = p_object->i_object_id; pi_objects[i++] = p_object;
ppsz_varnames[i] = "dvd_menus"; ppsz_varnames[i] = "dvd_menus";
pi_objects[i++] = p_object->i_object_id; pi_objects[i++] = p_object;
ppsz_varnames[i] = "prev-title"; ppsz_varnames[i] = "prev-title";
pi_objects[i++] = p_object->i_object_id; pi_objects[i++] = p_object;
ppsz_varnames[i] = "next-title"; ppsz_varnames[i] = "next-title";
pi_objects[i++] = p_object->i_object_id; pi_objects[i++] = p_object;
ppsz_varnames[i] = "prev-chapter"; ppsz_varnames[i] = "prev-chapter";
pi_objects[i++] = p_object->i_object_id; pi_objects[i++] = p_object;
ppsz_varnames[i] = "next-chapter"; ppsz_varnames[i] = "next-chapter";
pi_objects[i++] = p_object->i_object_id; pi_objects[i++] = p_object;
vlc_object_release( p_object ); vlc_object_release( p_object );
} }
...@@ -421,7 +421,7 @@ void RefreshSettingsMenu( intf_thread_t *p_intf, HMENU hMenu ) ...@@ -421,7 +421,7 @@ void RefreshSettingsMenu( intf_thread_t *p_intf, HMENU hMenu )
vlc_object_t *p_object; vlc_object_t *p_object;
char *ppsz_varnames[MAX_SETTINGS_ITEMS]; char *ppsz_varnames[MAX_SETTINGS_ITEMS];
int pi_objects[MAX_SETTINGS_ITEMS]; vlc_object_t * pi_objects[MAX_SETTINGS_ITEMS];
int i; int i;
/* Delete old menu */ /* Delete old menu */
...@@ -433,7 +433,7 @@ void RefreshSettingsMenu( intf_thread_t *p_intf, HMENU hMenu ) ...@@ -433,7 +433,7 @@ void RefreshSettingsMenu( intf_thread_t *p_intf, HMENU hMenu )
else p_intf->p_sys->p_settings_menu = new vector<MenuItemExt*>; else p_intf->p_sys->p_settings_menu = new vector<MenuItemExt*>;
/* Initializations */ /* Initializations */
memset( pi_objects, 0, MAX_SETTINGS_ITEMS * sizeof(int) ); memset( pi_objects, 0, MAX_SETTINGS_ITEMS * sizeof(vlc_object_t *) );
i = 0; i = 0;
AppendMenu( hMenu, MF_STRING, ID_PREFERENCES, _T("&Preferences...") ); AppendMenu( hMenu, MF_STRING, ID_PREFERENCES, _T("&Preferences...") );
...@@ -443,7 +443,7 @@ void RefreshSettingsMenu( intf_thread_t *p_intf, HMENU hMenu ) ...@@ -443,7 +443,7 @@ void RefreshSettingsMenu( intf_thread_t *p_intf, HMENU hMenu )
if( p_object != NULL ) if( p_object != NULL )
{ {
ppsz_varnames[i] = "intf-add"; ppsz_varnames[i] = "intf-add";
pi_objects[i++] = p_object->i_object_id; pi_objects[i++] = p_object;
vlc_object_release( p_object ); vlc_object_release( p_object );
} }
...@@ -457,7 +457,7 @@ void RefreshSettingsMenu( intf_thread_t *p_intf, HMENU hMenu ) ...@@ -457,7 +457,7 @@ void RefreshSettingsMenu( intf_thread_t *p_intf, HMENU hMenu )
*****************************************************************************/ *****************************************************************************/
void RefreshMenu( intf_thread_t *p_intf, vector<MenuItemExt*> *p_menu_list, void RefreshMenu( intf_thread_t *p_intf, vector<MenuItemExt*> *p_menu_list,
HMENU hMenu , int i_count, char **ppsz_varnames, HMENU hMenu , int i_count, char **ppsz_varnames,
int *pi_objects, int i_start_id ) vlc_object_t **pi_objects, int i_start_id )
{ {
vlc_object_t *p_object; vlc_object_t *p_object;
bool b_section_empty = false; bool b_section_empty = false;
...@@ -490,7 +490,7 @@ void RefreshMenu( intf_thread_t *p_intf, vector<MenuItemExt*> *p_menu_list, ...@@ -490,7 +490,7 @@ void RefreshMenu( intf_thread_t *p_intf, vector<MenuItemExt*> *p_menu_list,
continue; continue;
} }
p_object = (vlc_object_t *)vlc_object_get( p_intf->p_libvlc, pi_objects[i] ); p_object = pi_objects[i];
if( p_object == NULL ) continue; if( p_object == NULL ) continue;
b_section_empty = false; b_section_empty = false;
...@@ -567,7 +567,7 @@ void CreateMenuItem( intf_thread_t *p_intf, vector<MenuItemExt*> *p_menu_list, ...@@ -567,7 +567,7 @@ void CreateMenuItem( intf_thread_t *p_intf, vector<MenuItemExt*> *p_menu_list,
AppendMenu( hMenu, MF_STRING , ++(*pi_item_id), AppendMenu( hMenu, MF_STRING , ++(*pi_item_id),
_FROMMB(text.psz_string ? text.psz_string : psz_var) ); _FROMMB(text.psz_string ? text.psz_string : psz_var) );
pMenuItemExt = new MenuItemExt( p_intf, *pi_item_id, psz_var, pMenuItemExt = new MenuItemExt( p_intf, *pi_item_id, psz_var,
p_object->i_object_id, val, i_type ); p_object, val, i_type );
p_menu_list->push_back( pMenuItemExt ); p_menu_list->push_back( pMenuItemExt );
break; break;
...@@ -576,7 +576,7 @@ void CreateMenuItem( intf_thread_t *p_intf, vector<MenuItemExt*> *p_menu_list, ...@@ -576,7 +576,7 @@ void CreateMenuItem( intf_thread_t *p_intf, vector<MenuItemExt*> *p_menu_list,
AppendMenu( hMenu, MF_STRING | MF_CHECKED, ++(*pi_item_id), AppendMenu( hMenu, MF_STRING | MF_CHECKED, ++(*pi_item_id),
_FROMMB(text.psz_string ? text.psz_string : psz_var) ); _FROMMB(text.psz_string ? text.psz_string : psz_var) );
pMenuItemExt = new MenuItemExt( p_intf, *pi_item_id, psz_var, pMenuItemExt = new MenuItemExt( p_intf, *pi_item_id, psz_var,
p_object->i_object_id, val, i_type ); p_object, val, i_type );
p_menu_list->push_back( pMenuItemExt ); p_menu_list->push_back( pMenuItemExt );
CheckMenuItem( hMenu, *pi_item_id , CheckMenuItem( hMenu, *pi_item_id ,
( val.b_bool ? MF_UNCHECKED : MF_CHECKED ) | ( val.b_bool ? MF_UNCHECKED : MF_CHECKED ) |
...@@ -664,7 +664,7 @@ HMENU CreateChoicesMenu( intf_thread_t *p_intf, ...@@ -664,7 +664,7 @@ HMENU CreateChoicesMenu( intf_thread_t *p_intf,
text_list.p_list->p_values[i].psz_string : text_list.p_list->p_values[i].psz_string :
val_list.p_list->p_values[i].psz_string) ); val_list.p_list->p_values[i].psz_string) );
pMenuItemExt = new MenuItemExt( p_intf, *pi_item_id, psz_var, pMenuItemExt = new MenuItemExt( p_intf, *pi_item_id, psz_var,
p_object->i_object_id, another_val, i_type ); p_object, another_val, i_type );
p_menu_list->push_back( pMenuItemExt ); p_menu_list->push_back( pMenuItemExt );
if( !(i_type & VLC_VAR_ISCOMMAND) && val.psz_string && if( !(i_type & VLC_VAR_ISCOMMAND) && val.psz_string &&
...@@ -679,7 +679,7 @@ HMENU CreateChoicesMenu( intf_thread_t *p_intf, ...@@ -679,7 +679,7 @@ HMENU CreateChoicesMenu( intf_thread_t *p_intf,
_FROMMB(text_list.p_list->p_values[i].psz_string ? _FROMMB(text_list.p_list->p_values[i].psz_string ?
text_list.p_list->p_values[i].psz_string : psz_tmp)); text_list.p_list->p_values[i].psz_string : psz_tmp));
pMenuItemExt = new MenuItemExt( p_intf, *pi_item_id, psz_var, pMenuItemExt = new MenuItemExt( p_intf, *pi_item_id, psz_var,
p_object->i_object_id, val_list.p_list->p_values[i], i_type ); p_object, val_list.p_list->p_values[i], i_type );
p_menu_list->push_back( pMenuItemExt ); p_menu_list->push_back( pMenuItemExt );
if( val_list.p_list->p_values[i].i_int == val.i_int ) if( val_list.p_list->p_values[i].i_int == val.i_int )
...@@ -760,8 +760,7 @@ void OnMenuEvent( intf_thread_t *p_intf, int id ) ...@@ -760,8 +760,7 @@ void OnMenuEvent( intf_thread_t *p_intf, int id )
if( p_menuitemext ) if( p_menuitemext )
{ {
vlc_object_t *p_object = (vlc_object_t *) vlc_object_t *p_object = p_menuitemext->p_object;
vlc_object_get( p_intf->p_libvlc, p_menuitemext->i_object_id );
if( p_object == NULL ) return; if( p_object == NULL ) return;
var_Set( p_object, p_menuitemext->psz_var, p_menuitemext->val ); var_Set( p_object, p_menuitemext->psz_var, p_menuitemext->val );
...@@ -788,14 +787,14 @@ void OnMenuEvent( intf_thread_t *p_intf, int id ) ...@@ -788,14 +787,14 @@ void OnMenuEvent( intf_thread_t *p_intf, int id )
* things. * things.
*****************************************************************************/ *****************************************************************************/
MenuItemExt::MenuItemExt( intf_thread_t *p_intf, int _id, char *_psz_var, MenuItemExt::MenuItemExt( intf_thread_t *p_intf, int _id, char *_psz_var,
int _i_object_id, vlc_value_t _val, int _i_val_type ) vlc_object_t * _p_object, vlc_value_t _val, int _i_val_type )
{ {
/* Initializations */ /* Initializations */
id = _id; id = _id;
p_intf = p_intf; p_intf = p_intf;
psz_var = strdup( _psz_var ); psz_var = strdup( _psz_var );
i_val_type = _i_val_type; i_val_type = _i_val_type;
i_object_id = _i_object_id; p_object = _p_object;
val = _val; val = _val;
}; };
......
...@@ -448,7 +448,7 @@ void RefreshAudioMenu( intf_thread_t *_p_intf, HMENU hMenu ); ...@@ -448,7 +448,7 @@ void RefreshAudioMenu( intf_thread_t *_p_intf, HMENU hMenu );
void RefreshVideoMenu( intf_thread_t *_p_intf, HMENU hMenu ); void RefreshVideoMenu( intf_thread_t *_p_intf, HMENU hMenu );
void RefreshNavigMenu( intf_thread_t *_p_intf, HMENU hMenu ); void RefreshNavigMenu( intf_thread_t *_p_intf, HMENU hMenu );
void RefreshMenu( intf_thread_t *, vector<MenuItemExt*> *, HMENU, int, void RefreshMenu( intf_thread_t *, vector<MenuItemExt*> *, HMENU, int,
char **, int *, int ); char **, vlc_object_t **, int );
int wce_GetMenuItemCount( HMENU ); int wce_GetMenuItemCount( HMENU );
void CreateMenuItem( intf_thread_t *, vector<MenuItemExt*> *, HMENU, char *, void CreateMenuItem( intf_thread_t *, vector<MenuItemExt*> *, HMENU, char *,
vlc_object_t *, int * ); vlc_object_t *, int * );
...@@ -465,7 +465,7 @@ class MenuItemExt ...@@ -465,7 +465,7 @@ class MenuItemExt
public: public:
/* Constructor */ /* Constructor */
MenuItemExt( intf_thread_t *_p_intf, int _id, char *_psz_var, MenuItemExt( intf_thread_t *_p_intf, int _id, char *_psz_var,
int _i_object_id, vlc_value_t _val, int _i_val_type ); vlc_object_t * p_object, vlc_value_t _val, int _i_val_type );
virtual ~MenuItemExt(); virtual ~MenuItemExt();
...@@ -475,7 +475,7 @@ public: ...@@ -475,7 +475,7 @@ public:
intf_thread_t *p_intf; intf_thread_t *p_intf;
char *psz_var; char *psz_var;
int i_val_type; int i_val_type;
int i_object_id; vlc_object_t * p_object;
vlc_value_t val; vlc_value_t val;
private: private:
......
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