]> git.sesse.net Git - vlc/blobdiff - modules/gui/skins/parser/wrappers.cpp
* changed "Window" into "SkinWindow" to prepare X11 port
[vlc] / modules / gui / skins / parser / wrappers.cpp
index 741f81791e8fc104166cb444431a111e485f7dfb..7d0bce4c2bcb6bf603dacbea9034b32449233231 100644 (file)
@@ -2,7 +2,7 @@
  * wrappers.cpp: Wrappers around C++ objects
  *****************************************************************************
  * Copyright (C) 2003 VideoLAN
- * $Id: wrappers.cpp,v 1.7 2003/04/16 21:40:07 ipkiss Exp $
+ * $Id: wrappers.cpp,v 1.10 2003/04/21 21:51:16 asmax Exp $
  *
  * Authors: Olivier Teulière <ipkiss@via.ecp.fr>
  *          Emmanuel Puig    <karibu@via.ecp.fr>
@@ -38,6 +38,7 @@ extern intf_thread_t *g_pIntf;
 #include "../src/banks.h"
 #include "../controls/controls.h"
 #include "../src/font.h"
+#include "../os_font.h"
 #include "../src/window.h"
 #include "../src/theme.h"
 #include "../src/skin_common.h"
@@ -93,10 +94,9 @@ void EndWindow()
 {
 }
 //---------------------------------------------------------------------------
-void StartTheme( char *log, char *magnet )
+void StartTheme( char *magnet )
 {
-    g_pIntf->p_sys->p_theme->StartTheme( ConvertBoolean( log ),
-        atoi( magnet ) );
+    g_pIntf->p_sys->p_theme->StartTheme( atoi( magnet ) );
 }
 //---------------------------------------------------------------------------
 void EndTheme()
@@ -117,7 +117,7 @@ void EndControlGroup()
 void AddAnchor( char *x, char *y, char *len, char *priority )
 {
     int XOff, YOff;
-    Window *vlcWin = g_pIntf->p_sys->p_theme->WindowList.back();
+    SkinWindow *vlcWin = g_pIntf->p_sys->p_theme->WindowList.back();
 
     g_pIntf->p_sys->p_theme->OffBank->GetOffSet( XOff, YOff );
     
@@ -137,7 +137,7 @@ void AddImage( char *id, char *visible, char *x, char *y, char *image,
     char *event, char *help )
 {
     int XOff, YOff;
-    Window *vlcWin = g_pIntf->p_sys->p_theme->WindowList.back();
+    SkinWindow *vlcWin = g_pIntf->p_sys->p_theme->WindowList.back();
 
     g_pIntf->p_sys->p_theme->OffBank->GetOffSet( XOff, YOff );
 
@@ -150,7 +150,7 @@ void AddRectangle( char *id, char *visible, char *x, char *y, char *w, char *h,
     char *color, char *event, char *help )
 {
     int XOff, YOff;
-    Window *vlcWin = g_pIntf->p_sys->p_theme->WindowList.back();
+    SkinWindow *vlcWin = g_pIntf->p_sys->p_theme->WindowList.back();
 
     g_pIntf->p_sys->p_theme->OffBank->GetOffSet( XOff, YOff );
 
@@ -168,7 +168,7 @@ void AddButton(
     char *tooltiptext, char *help )
 {
     int XOff, YOff;
-    Window *vlcWin = g_pIntf->p_sys->p_theme->WindowList.back();
+    SkinWindow *vlcWin = g_pIntf->p_sys->p_theme->WindowList.back();
 
     g_pIntf->p_sys->p_theme->OffBank->GetOffSet( XOff, YOff );
 
@@ -193,7 +193,7 @@ void AddCheckBox(
     char *tooltiptext1, char *tooltiptext2, char *help )
 {
     int XOff, YOff;
-    Window *vlcWin = g_pIntf->p_sys->p_theme->WindowList.back();
+    SkinWindow *vlcWin = g_pIntf->p_sys->p_theme->WindowList.back();
 
     g_pIntf->p_sys->p_theme->OffBank->GetOffSet( XOff, YOff );
 
@@ -231,7 +231,7 @@ void AddSlider( char *id, char *visible, char *x, char *y, char *type, char *up,
     ConvertCoords( abs, p_abs );
     ConvertCoords( ord, p_ord );
 
-    Window *vlcWin = g_pIntf->p_sys->p_theme->WindowList.back();
+    SkinWindow *vlcWin = g_pIntf->p_sys->p_theme->WindowList.back();
 
     // Move control
     g_pIntf->p_sys->p_theme->OffBank->GetOffSet( XOff, YOff );
@@ -286,7 +286,7 @@ void AddPlayList( char *id, char *visible, char *x, char *y, char *width,
     ConvertCoords( abs, p_abs );
     ConvertCoords( ord, p_ord );
 
-    Window *vlcWin = g_pIntf->p_sys->p_theme->WindowList.back();
+    SkinWindow *vlcWin = g_pIntf->p_sys->p_theme->WindowList.back();
 
     // Move control
     g_pIntf->p_sys->p_theme->OffBank->GetOffSet( XOff, YOff );
@@ -319,7 +319,7 @@ void AddText( char *id, char *visible, char *x, char *y, char *text, char *font,
     char *help )
 {
     int XOff, YOff;
-    Window *vlcWin = g_pIntf->p_sys->p_theme->WindowList.back();
+    SkinWindow *vlcWin = g_pIntf->p_sys->p_theme->WindowList.back();
 
     g_pIntf->p_sys->p_theme->OffBank->GetOffSet( XOff, YOff );
 
@@ -385,12 +385,12 @@ static void ConvertCoords( char *coord, double *p_coord )
 static int ConvertAlign( char *align )
 {
     if( strcmp( align, "left" ) == 0 )
-        return DT_LEFT;
+        return VLC_FONT_ALIGN_LEFT;
     else if( strcmp( align, "right" ) == 0 )
-        return DT_RIGHT;
+        return VLC_FONT_ALIGN_RIGHT;
     else if( strcmp( align, "center" ) == 0 )
-        return DT_CENTER;
+        return VLC_FONT_ALIGN_CENTER;
     else
-        return DT_LEFT;
+        return VLC_FONT_ALIGN_LEFT;
 }
 //---------------------------------------------------------------------------