Commit 1e7ac1dd authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Move position.h to common header

parent 64c3d0f0
...@@ -51,7 +51,7 @@ axvlc_la_SOURCES = \ ...@@ -51,7 +51,7 @@ axvlc_la_SOURCES = \
persiststorage.h \ persiststorage.h \
persiststreaminit.cpp \ persiststreaminit.cpp \
persiststreaminit.h \ persiststreaminit.h \
position.h \ ../common/position.h \
provideclassinfo.cpp \ provideclassinfo.cpp \
provideclassinfo.h \ provideclassinfo.h \
connectioncontainer.cpp \ connectioncontainer.cpp \
......
/*****************************************************************************
* 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
#include "config.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
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
#include "vlccontrol2.h" #include "vlccontrol2.h"
#include "vlccontrol.h" #include "vlccontrol.h"
#include "position.h" #include "../common/position.h"
// --------- // ---------
......
...@@ -487,7 +487,7 @@ ...@@ -487,7 +487,7 @@
> >
</File> </File>
<File <File
RelativePath="..\..\..\activex\position.h" RelativePath="..\..\..\common\position.h"
> >
</File> </File>
<File <File
......
...@@ -229,7 +229,7 @@ ...@@ -229,7 +229,7 @@
> >
</File> </File>
<File <File
RelativePath="..\..\..\npapi\control\position.h" RelativePath="..\..\..\common\position.h"
> >
</File> </File>
<File <File
......
...@@ -19,7 +19,7 @@ libvlcplugin_la_SOURCES = \ ...@@ -19,7 +19,7 @@ libvlcplugin_la_SOURCES = \
control/npolibvlc.h \ control/npolibvlc.h \
control/nporuntime.cpp \ control/nporuntime.cpp \
control/nporuntime.h \ control/nporuntime.h \
control/position.h \ ../common/position.h \
support/classinfo.h \ support/classinfo.h \
../common/vlc_player_options.h \ ../common/vlc_player_options.h \
../common/vlc_player.cpp \ ../common/vlc_player.cpp \
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
#include "vlcplugin.h" #include "vlcplugin.h"
#include "npolibvlc.h" #include "npolibvlc.h"
#include "position.h" #include "../../common/position.h"
/* /*
** Local helper macros and function ** Local helper macros and function
......
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