- switch( index )
- {
- case ID_marquee_enable:
- {
- libvlc_video_set_marquee_option_as_int(p_md, libvlc_marquee_Enabled, true, &ex);
- RETURN_ON_EXCEPTION(this,ex);
- return INVOKERESULT_NO_ERROR;
- }
- case ID_marquee_disable:
- {
- libvlc_video_set_marquee_option_as_int(p_md, libvlc_marquee_Enabled, false, &ex);
- RETURN_ON_EXCEPTION(this,ex);
- return INVOKERESULT_NO_ERROR;
- }
- case ID_marquee_color:
- {
- if( argCount == 1)
- {
- if( NPVARIANT_IS_INT32( args[0] ) )
- {
- int i_color = NPVARIANT_TO_INT32( args[0] );
- libvlc_video_set_marquee_option_as_int(p_md, libvlc_marquee_Color, i_color, &ex);
- RETURN_ON_EXCEPTION(this,ex);
- return INVOKERESULT_NO_ERROR;
- }
- else
- return INVOKERESULT_GENERIC_ERROR;
- }
- return INVOKERESULT_NO_SUCH_METHOD;
- }
- case ID_marquee_opacity:
- {
- if( argCount == 1)
- {
- if( NPVARIANT_IS_INT32( args[0] ) )
- {
- int i_opacity = NPVARIANT_TO_INT32( args[0] );
- libvlc_video_set_marquee_option_as_int(p_md, libvlc_marquee_Opacity, i_opacity, &ex);
- RETURN_ON_EXCEPTION(this,ex);
- return INVOKERESULT_NO_ERROR;
- }
- else
- return INVOKERESULT_GENERIC_ERROR;
- }
- return INVOKERESULT_NO_SUCH_METHOD;
- }
- case ID_marquee_position:
- {
- if( argCount == 1)
- {
- if( NPVARIANT_IS_INT32( args[0] ) )
- {
- int i_position = NPVARIANT_TO_INT32( args[0] );
- libvlc_video_set_marquee_option_as_int(p_md, libvlc_marquee_Position, i_position, &ex);
- RETURN_ON_EXCEPTION(this,ex);
- return INVOKERESULT_NO_ERROR;
- }
- else
- return INVOKERESULT_GENERIC_ERROR;
- }
- return INVOKERESULT_NO_SUCH_METHOD;
- }
- case ID_marquee_refresh:
- {
- if( argCount == 1)
- {
- if( NPVARIANT_IS_INT32( args[0] ) )
- {
- int i_refresh = NPVARIANT_TO_INT32( args[0] );
- libvlc_video_set_marquee_option_as_int(p_md, libvlc_marquee_Refresh, i_refresh, &ex);
- RETURN_ON_EXCEPTION(this,ex);
- return INVOKERESULT_NO_ERROR;
- }
- else
- return INVOKERESULT_GENERIC_ERROR;
- }
- return INVOKERESULT_NO_SUCH_METHOD;
- }
- case ID_marquee_size:
- {
- if( argCount == 1)
- {
- if( NPVARIANT_IS_INT32( args[0] ) )
- {
- int i_size = NPVARIANT_TO_INT32( args[0] );
- libvlc_video_set_marquee_option_as_int(p_md, libvlc_marquee_Size, i_size, &ex);
- RETURN_ON_EXCEPTION(this,ex);
- return INVOKERESULT_NO_ERROR;
- }
- else
- return INVOKERESULT_GENERIC_ERROR;
- }
- return INVOKERESULT_NO_SUCH_METHOD;
- }
- case ID_marquee_text:
- {
- if( argCount == 1)
- {
- if( NPVARIANT_IS_STRING( args[0] ) )
- {
- char *psz_text = stringValue( NPVARIANT_TO_STRING( args[0] ) );
- libvlc_video_set_marquee_option_as_string(p_md, libvlc_marquee_Text, psz_text, &ex);
- RETURN_ON_EXCEPTION(this,ex);
- free(psz_text);
- return INVOKERESULT_NO_ERROR;
- }
- else
- return INVOKERESULT_GENERIC_ERROR;
- }
- return INVOKERESULT_NO_SUCH_METHOD;
- }
- case ID_marquee_timeout:
- {
- if( argCount == 1)
- {
- if( NPVARIANT_IS_INT32( args[0] ) )
- {
- int i_timeout = NPVARIANT_TO_INT32( args[0] );
- libvlc_video_set_marquee_option_as_int(p_md, libvlc_marquee_Timeout, i_timeout, &ex);
- RETURN_ON_EXCEPTION(this,ex);
- return INVOKERESULT_NO_ERROR;
- }
- else
- return INVOKERESULT_GENERIC_ERROR;
- }
- return INVOKERESULT_NO_SUCH_METHOD;
- }
- case ID_marquee_x:
- {
- if( argCount == 1)
- {
- if( NPVARIANT_IS_INT32( args[0] ) )
- {
- int i_x = NPVARIANT_TO_INT32( args[0] );
- libvlc_video_set_marquee_option_as_int(p_md, libvlc_marquee_X, i_x, &ex);
- RETURN_ON_EXCEPTION(this,ex);
- return INVOKERESULT_NO_ERROR;
- }
- else
- return INVOKERESULT_GENERIC_ERROR;
- }
- return INVOKERESULT_NO_SUCH_METHOD;
- }
- case ID_marquee_y:
- {
- if( argCount == 1)
- {
- if( NPVARIANT_IS_INT32( args[0] ) )
- {
- int i_y = NPVARIANT_TO_INT32( args[0] );
- libvlc_video_set_marquee_option_as_int(p_md, libvlc_marquee_Y, i_y, &ex);
- RETURN_ON_EXCEPTION(this,ex);
- return INVOKERESULT_NO_ERROR;
- }
- else
- return INVOKERESULT_GENERIC_ERROR;
- }
- return INVOKERESULT_NO_SUCH_METHOD;
- }
- default:
- return INVOKERESULT_NO_SUCH_METHOD;
- }