]> git.sesse.net Git - vlc/blobdiff - modules/gui/skins2/src/skin_common.hpp
Win32 skins: reorder includes to fix warnings
[vlc] / modules / gui / skins2 / src / skin_common.hpp
index c2bf9902c7beb11be455bb473ca96c88ad17b42f..e992bd8790f3f298456cdc778f2b3c6781cb5f43 100644 (file)
  * 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.
+ * 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.
  *****************************************************************************/
 
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
 #ifndef SKIN_COMMON_HPP
 #define SKIN_COMMON_HPP
 
-#include <vlc/vlc.h>
-#include <vlc/intf.h>
-#include "charset.h"
+#include <vlc_common.h>
+#include <vlc_interface.h>
+#include <vlc_charset.h>
+#include <vlc_fs.h>
 
 #include <string>
 using namespace std;
@@ -40,6 +45,8 @@ class OSFactory;
 class OSLoop;
 class VarManager;
 class VlcProc;
+class VoutManager;
+class ArtManager;
 class Theme;
 class ThemeRepository;
 
@@ -54,18 +61,11 @@ class ThemeRepository;
 #pragma warning ( disable:4786 )
 #endif
 
-// Useful macros
-#define SKINS_DELETE( p ) \
-   if( p ) \
-   { \
-       delete p; \
-   } \
-   else \
-   { \
-       msg_Err( getIntf(), "delete NULL pointer in %s at line %d", \
-                __FILE__, __LINE__ ); \
-   }
-
+#ifdef X11_SKINS
+typedef uint32_t vlc_wnd_type;
+#else
+typedef void* vlc_wnd_type;
+#endif
 
 /// Wrapper around FromLocale, to avoid the need to call LocaleFree()
 static inline string sFromLocale( const string &rLocale )
@@ -128,27 +128,37 @@ struct intf_sys_t
     VarManager *p_varManager;
     /// VLC state handler
     VlcProc *p_vlcProc;
+    /// Vout manager
+    VoutManager *p_voutManager;
+    /// Art manager
+    ArtManager *p_artManager;
     /// Theme repository
     ThemeRepository *p_repository;
 
     /// Current theme
     Theme *p_theme;
+
+    /// synchronisation at start of interface
+    vlc_thread_t thread;
+    vlc_mutex_t  init_lock;
+    vlc_cond_t   init_wait;
+    bool         b_ready;
 };
 
 
 /// Base class for all skin classes
 class SkinObject
 {
-    public:
-        SkinObject( intf_thread_t *pIntf ): m_pIntf( pIntf ) {}
-        virtual ~SkinObject() {}
+public:
+    SkinObject( intf_thread_t *pIntf ): m_pIntf( pIntf ) { }
+    virtual ~SkinObject() { }
 
-        /// Getter (public because it is used in C callbacks in the win32
-        /// interface)
-        intf_thread_t *getIntf() const { return m_pIntf; }
+    /// Getter (public because it is used in C callbacks in the win32
+    /// interface)
+    intf_thread_t *getIntf() const { return m_pIntf; }
 
-    private:
-        intf_thread_t *m_pIntf;
+private:
+    intf_thread_t *m_pIntf;
 };