[vlc-commits] Move position.h to common header
Jean-Baptiste Kempf
git at videolan.org
Thu Dec 13 15:50:11 CET 2012
npapi-vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Thu Dec 13 15:28:38 2012 +0100| [1e7ac1dda2bc6b31601c5832b4e90724b8abaab2] | committer: Jean-Baptiste Kempf
Move position.h to common header
> http://git.videolan.org/gitweb.cgi/npapi-vlc.git/?a=commit;h=1e7ac1dda2bc6b31601c5832b4e90724b8abaab2
---
activex/Makefile.am | 2 +-
activex/position.h | 56 ----------------------------------
activex/vlccontrol2.cpp | 2 +-
build/vc2008/ActiveX/axvlc.vcproj | 2 +-
build/vc2008/npapi/npvlc.vcproj | 2 +-
{npapi/control => common}/position.h | 0
npapi/Makefile.am | 2 +-
npapi/control/npolibvlc.cpp | 2 +-
8 files changed, 6 insertions(+), 62 deletions(-)
diff --git a/activex/Makefile.am b/activex/Makefile.am
index 4c90f0c..f1b6130 100644
--- a/activex/Makefile.am
+++ b/activex/Makefile.am
@@ -51,7 +51,7 @@ axvlc_la_SOURCES = \
persiststorage.h \
persiststreaminit.cpp \
persiststreaminit.h \
- position.h \
+ ../common/position.h \
provideclassinfo.cpp \
provideclassinfo.h \
connectioncontainer.cpp \
diff --git a/activex/position.h b/activex/position.h
deleted file mode 100644
index 42d3141..0000000
--- a/activex/position.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*****************************************************************************
- * 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
diff --git a/activex/vlccontrol2.cpp b/activex/vlccontrol2.cpp
index 2cede90..4dd05d9 100644
--- a/activex/vlccontrol2.cpp
+++ b/activex/vlccontrol2.cpp
@@ -33,7 +33,7 @@
#include "vlccontrol2.h"
#include "vlccontrol.h"
-#include "position.h"
+#include "../common/position.h"
// ---------
diff --git a/build/vc2008/ActiveX/axvlc.vcproj b/build/vc2008/ActiveX/axvlc.vcproj
index cc77f90..484da7f 100644
--- a/build/vc2008/ActiveX/axvlc.vcproj
+++ b/build/vc2008/ActiveX/axvlc.vcproj
@@ -487,7 +487,7 @@
>
</File>
<File
- RelativePath="..\..\..\activex\position.h"
+ RelativePath="..\..\..\common\position.h"
>
</File>
<File
diff --git a/build/vc2008/npapi/npvlc.vcproj b/build/vc2008/npapi/npvlc.vcproj
index 4aef24e..549b6cd 100644
--- a/build/vc2008/npapi/npvlc.vcproj
+++ b/build/vc2008/npapi/npvlc.vcproj
@@ -229,7 +229,7 @@
>
</File>
<File
- RelativePath="..\..\..\npapi\control\position.h"
+ RelativePath="..\..\..\common\position.h"
>
</File>
<File
diff --git a/npapi/control/position.h b/common/position.h
similarity index 100%
rename from npapi/control/position.h
rename to common/position.h
diff --git a/npapi/Makefile.am b/npapi/Makefile.am
index cf78967..499d04a 100644
--- a/npapi/Makefile.am
+++ b/npapi/Makefile.am
@@ -19,7 +19,7 @@ libvlcplugin_la_SOURCES = \
control/npolibvlc.h \
control/nporuntime.cpp \
control/nporuntime.h \
- control/position.h \
+ ../common/position.h \
support/classinfo.h \
../common/vlc_player_options.h \
../common/vlc_player.cpp \
diff --git a/npapi/control/npolibvlc.cpp b/npapi/control/npolibvlc.cpp
index 2d4d9b1..d40a869 100644
--- a/npapi/control/npolibvlc.cpp
+++ b/npapi/control/npolibvlc.cpp
@@ -29,7 +29,7 @@
#include "vlcplugin.h"
#include "npolibvlc.h"
-#include "position.h"
+#include "../../common/position.h"
/*
** Local helper macros and function
More information about the vlc-commits
mailing list