Commit c34b5ca5 authored by JP Dinger's avatar JP Dinger

mozilla plugin: Bring marquee interface in line with logo.

parent 2f05ac6c
This diff is collapsed.
/*****************************************************************************
* position.h: Support routines for logo and marquee plugin objects
*****************************************************************************
* Copyright (C) 2010 M2X BV
*
* Authors: JP Dinger <jpd (at) videolan (dot) org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#ifndef POSITION_H
#define POSITION_H
struct posidx_s { const char *n; size_t i; };
static const posidx_s posidx[] = {
{ "center", 0 },
{ "left", 1 },
{ "right", 2 },
{ "top", 4 },
{ "bottom", 8 },
{ "top-left", 5 },
{ "top-right", 6 },
{ "bottom-left", 9 },
{ "bottom-right", 10 },
};
enum { num_posidx = sizeof(posidx)/sizeof(*posidx) };
static inline const char *position_bynumber( size_t i )
{
for( const posidx_s *h=posidx; h<posidx+num_posidx; ++h )
if( h->i == i )
return h->n;
return "undefined";
}
static inline bool position_byname( const char *n, size_t &i )
{
for( const posidx_s *h=posidx; h<posidx+num_posidx; ++h )
if( !strcasecmp( n, h->n ) )
{ i=h->i; return true; }
return false;
}
#endif
...@@ -761,23 +761,23 @@ function doMarqueeOption(option, value) ...@@ -761,23 +761,23 @@ function doMarqueeOption(option, value)
if( vlc ) if( vlc )
{ {
if (option == 1) if (option == 1)
vlc.video.marquee.color(val); vlc.video.marquee.color = val;
if (option == 2) if (option == 2)
vlc.video.marquee.opacity(val); vlc.video.marquee.opacity = val;
if (option == 3) if (option == 3)
vlc.video.marquee.position(val); vlc.video.marquee.position = value;
if (option == 4) if (option == 4)
vlc.video.marquee.refresh(val); vlc.video.marquee.refresh = val;
if (option == 5) if (option == 5)
vlc.video.marquee.size(val); vlc.video.marquee.size = val;
if (option == 6) if (option == 6)
vlc.video.marquee.text(value); vlc.video.marquee.text = value;
if (option == 7) if (option == 7)
vlc.video.marquee.timeout(val); vlc.video.marquee.timeout = val;
if (option == 8) if (option == 8)
vlc.video.marquee.x(val); vlc.video.marquee.x = val;
if (option == 9) if (option == 9)
vlc.video.marquee.y(val); vlc.video.marquee.y = val;
} }
} }
......
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