Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
6ae1b0c0
Commit
6ae1b0c0
authored
Feb 27, 2004
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* modules/gui/skins2/*: portability fixes.
parent
c8caf934
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
36 additions
and
27 deletions
+36
-27
modules/gui/skins2/controls/ctrl_list.cpp
modules/gui/skins2/controls/ctrl_list.cpp
+4
-1
modules/gui/skins2/parser/builder.cpp
modules/gui/skins2/parser/builder.cpp
+7
-6
modules/gui/skins2/parser/builder_data.hpp
modules/gui/skins2/parser/builder_data.hpp
+3
-3
modules/gui/skins2/parser/xmlparser.hpp
modules/gui/skins2/parser/xmlparser.hpp
+3
-5
modules/gui/skins2/src/ft2_font.cpp
modules/gui/skins2/src/ft2_font.cpp
+6
-4
modules/gui/skins2/src/skin_common.hpp
modules/gui/skins2/src/skin_common.hpp
+5
-1
modules/gui/skins2/vars/playlist.cpp
modules/gui/skins2/vars/playlist.cpp
+2
-2
modules/gui/skins2/win32/win32_factory.hpp
modules/gui/skins2/win32/win32_factory.hpp
+3
-1
modules/gui/skins2/win32/win32_loop.cpp
modules/gui/skins2/win32/win32_loop.cpp
+2
-2
modules/gui/skins2/win32/win32_loop.hpp
modules/gui/skins2/win32/win32_loop.hpp
+1
-2
No files found.
modules/gui/skins2/controls/ctrl_list.cpp
View file @
6ae1b0c0
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* ctrl_list.cpp
* ctrl_list.cpp
*****************************************************************************
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* Copyright (C) 2003 VideoLAN
* $Id: ctrl_list.cpp,v 1.
1 2004/01/03 23:31:33 asmax
Exp $
* $Id: ctrl_list.cpp,v 1.
2 2004/02/27 13:24:12 gbazin
Exp $
*
*
* Authors: Cyril Deguet <asmax@via.ecp.fr>
* Authors: Cyril Deguet <asmax@via.ecp.fr>
* Olivier Teulire <ipkiss@via.ecp.fr>
* Olivier Teulire <ipkiss@via.ecp.fr>
...
@@ -95,6 +95,9 @@ void CtrlList::onUpdate( Subject<VarPercent> &rPercent )
...
@@ -95,6 +95,9 @@ void CtrlList::onUpdate( Subject<VarPercent> &rPercent )
if
(
excessItems
>
0
)
if
(
excessItems
>
0
)
{
{
// a simple (int)(...) causes rounding errors !
// a simple (int)(...) causes rounding errors !
#ifdef _MSC_VER
# define lrint (int)
#endif
firstItem
=
lrint
(
(
1.0
-
rVarPos
.
get
())
*
(
double
)
excessItems
);
firstItem
=
lrint
(
(
1.0
-
rVarPos
.
get
())
*
(
double
)
excessItems
);
}
}
if
(
m_lastPos
!=
firstItem
)
if
(
m_lastPos
!=
firstItem
)
...
...
modules/gui/skins2/parser/builder.cpp
View file @
6ae1b0c0
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* builder.cpp
* builder.cpp
*****************************************************************************
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* Copyright (C) 2003 VideoLAN
* $Id: builder.cpp,v 1.
5 2004/02/01 16:15:40 asmax
Exp $
* $Id: builder.cpp,v 1.
6 2004/02/27 13:24:12 gbazin
Exp $
*
*
* Authors: Cyril Deguet <asmax@via.ecp.fr>
* Authors: Cyril Deguet <asmax@via.ecp.fr>
* Olivier Teulire <ipkiss@via.ecp.fr>
* Olivier Teulire <ipkiss@via.ecp.fr>
...
@@ -542,11 +542,12 @@ const string Builder::generateId() const
...
@@ -542,11 +542,12 @@ const string Builder::generateId() const
{
{
static
int
i
=
1
;
static
int
i
=
1
;
const
string
base
=
"_ReservedId_"
;
char
genId
[
5
];
char
genId
[
base
.
size
()
+
4
];
snprintf
(
genId
,
4
,
"%i"
,
i
++
);
snprintf
(
genId
,
base
.
size
()
+
4
,
"%s%i"
,
base
.
c_str
(),
i
);
i
++
;
string
base
=
"_ReservedId_"
+
(
string
)
genId
;
return
genId
;
return
base
;
}
}
...
...
modules/gui/skins2/parser/builder_data.hpp
View file @
6ae1b0c0
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* builder_data.hpp
* builder_data.hpp
*****************************************************************************
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* Copyright (C) 2003 VideoLAN
* $Id: builder_data.hpp,v 1.
3 2004/01/25 11:44:19 asmax
Exp $
* $Id: builder_data.hpp,v 1.
4 2004/02/27 13:24:12 gbazin
Exp $
*
*
* Authors: Cyril Deguet <asmax@via.ecp.fr>
* Authors: Cyril Deguet <asmax@via.ecp.fr>
* Olivier Teulière <ipkiss@via.ecp.fr>
* Olivier Teulière <ipkiss@via.ecp.fr>
...
@@ -28,12 +28,12 @@
...
@@ -28,12 +28,12 @@
#ifndef BUILDER_DATA_HPP
#ifndef BUILDER_DATA_HPP
#define BUILDER_DATA_HPP
#define BUILDER_DATA_HPP
using
namespace
std
;
#include <vlc/vlc.h>
#include <vlc/vlc.h>
#include <list>
#include <list>
#include <string>
#include <string>
using
namespace
std
;
/// Structure for mapping data from XML file
/// Structure for mapping data from XML file
struct
BuilderData
struct
BuilderData
{
{
...
...
modules/gui/skins2/parser/xmlparser.hpp
View file @
6ae1b0c0
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* xmlparser.hpp
* xmlparser.hpp
*****************************************************************************
*****************************************************************************
* Copyright (C) 2004 VideoLAN
* Copyright (C) 2004 VideoLAN
* $Id: xmlparser.hpp,v 1.
3 2004/01/25 11:44:19 asmax
Exp $
* $Id: xmlparser.hpp,v 1.
4 2004/02/27 13:24:12 gbazin
Exp $
*
*
* Authors: Cyril Deguet <asmax@via.ecp.fr>
* Authors: Cyril Deguet <asmax@via.ecp.fr>
*
*
...
@@ -27,8 +27,6 @@
...
@@ -27,8 +27,6 @@
#include "../src/skin_common.hpp"
#include "../src/skin_common.hpp"
#include <libxml/xmlreader.h>
#include <libxml/xmlreader.h>
#include <map>
#include <map>
#include <string>
/// XML parser using libxml2 text reader API
/// XML parser using libxml2 text reader API
class
XMLParser
:
public
SkinObject
class
XMLParser
:
public
SkinObject
...
@@ -53,8 +51,8 @@ class XMLParser: public SkinObject
...
@@ -53,8 +51,8 @@ class XMLParser: public SkinObject
typedef
map
<
const
char
*
,
const
char
*
,
ltstr
>
AttrList_t
;
typedef
map
<
const
char
*
,
const
char
*
,
ltstr
>
AttrList_t
;
/// Callbacks
/// Callbacks
virtual
void
handleBeginElement
(
const
string
&
rName
,
AttrList_t
&
attr
)
{}
virtual
void
handleBeginElement
(
const
string
&
rName
,
AttrList_t
&
attr
)
{
;
}
virtual
void
handleEndElement
(
const
string
&
rName
)
{}
virtual
void
handleEndElement
(
const
string
&
rName
)
{
;
}
private:
private:
/// Reader context
/// Reader context
...
...
modules/gui/skins2/src/ft2_font.cpp
View file @
6ae1b0c0
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* ft2_font.cpp
* ft2_font.cpp
*****************************************************************************
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* Copyright (C) 2003 VideoLAN
* $Id: ft2_font.cpp,v 1.
1 2004/01/03 23:31:33 asmax
Exp $
* $Id: ft2_font.cpp,v 1.
2 2004/02/27 13:24:12 gbazin
Exp $
*
*
* Authors: Cyril Deguet <asmax@via.ecp.fr>
* Authors: Cyril Deguet <asmax@via.ecp.fr>
* Olivier Teulire <ipkiss@via.ecp.fr>
* Olivier Teulire <ipkiss@via.ecp.fr>
...
@@ -142,8 +142,8 @@ GenericBitmap *FT2Font::drawString( const UString &rString, uint32_t color,
...
@@ -142,8 +142,8 @@ GenericBitmap *FT2Font::drawString( const UString &rString, uint32_t color,
int
len
=
rString
.
length
();
int
len
=
rString
.
length
();
// Array of glyph bitmaps and position
// Array of glyph bitmaps and position
FT_Glyph
glyphs
[
len
];
FT_Glyph
*
glyphs
=
new
FT_Glyph
[
len
];
int
pos
[
len
];
int
*
pos
=
new
int
[
len
];
// Does the font support kerning ?
// Does the font support kerning ?
FT_Bool
useKerning
=
FT_HAS_KERNING
(
m_face
);
FT_Bool
useKerning
=
FT_HAS_KERNING
(
m_face
);
...
@@ -254,6 +254,8 @@ GenericBitmap *FT2Font::drawString( const UString &rString, uint32_t color,
...
@@ -254,6 +254,8 @@ GenericBitmap *FT2Font::drawString( const UString &rString, uint32_t color,
}
}
}
}
delete
[]
glyphs
;
delete
[]
pos
;
return
pBmp
;
return
pBmp
;
}
}
modules/gui/skins2/src/skin_common.hpp
View file @
6ae1b0c0
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* skin_common.hpp
* skin_common.hpp
*****************************************************************************
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* Copyright (C) 2003 VideoLAN
* $Id: skin_common.hpp,v 1.
2 2004/01/11 17:12:17 asmax
Exp $
* $Id: skin_common.hpp,v 1.
3 2004/02/27 13:24:12 gbazin
Exp $
*
*
* Authors: Cyril Deguet <asmax@via.ecp.fr>
* Authors: Cyril Deguet <asmax@via.ecp.fr>
* Olivier Teulire <ipkiss@via.ecp.fr>
* Olivier Teulire <ipkiss@via.ecp.fr>
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
#include <vlc/vlc.h>
#include <vlc/vlc.h>
#include <vlc/intf.h>
#include <vlc/intf.h>
#include <string>
using
namespace
std
;
using
namespace
std
;
class
AsyncQueue
;
class
AsyncQueue
;
...
@@ -40,6 +41,9 @@ class VarManager;
...
@@ -40,6 +41,9 @@ class VarManager;
class
VlcProc
;
class
VlcProc
;
class
Theme
;
class
Theme
;
#ifndef M_PI
# define M_PI 3.14159265358979323846
#endif
// Useful macros
// Useful macros
#define SKINS_DELETE( p ) \
#define SKINS_DELETE( p ) \
...
...
modules/gui/skins2/vars/playlist.cpp
View file @
6ae1b0c0
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* playlist.cpp
* playlist.cpp
*****************************************************************************
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* Copyright (C) 2003 VideoLAN
* $Id: playlist.cpp,v 1.
6 2004/01/05 22:17:32 asmax
Exp $
* $Id: playlist.cpp,v 1.
7 2004/02/27 13:24:12 gbazin
Exp $
*
*
* Authors: Cyril Deguet <asmax@via.ecp.fr>
* Authors: Cyril Deguet <asmax@via.ecp.fr>
*
*
...
@@ -50,7 +50,7 @@ Playlist::Playlist( intf_thread_t *pIntf ): VarList( pIntf )
...
@@ -50,7 +50,7 @@ Playlist::Playlist( intf_thread_t *pIntf ): VarList( pIntf )
msg_Warn
(
pIntf
,
"Unable to do requested conversion"
);
msg_Warn
(
pIntf
,
"Unable to do requested conversion"
);
}
}
#else
#else
msg_Dbg
(
p
_dec
,
"No iconv support available"
);
msg_Dbg
(
p
Intf
,
"No iconv support available"
);
#endif
#endif
buildList
();
buildList
();
...
...
modules/gui/skins2/win32/win32_factory.hpp
View file @
6ae1b0c0
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* win32_factory.hpp
* win32_factory.hpp
*****************************************************************************
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* Copyright (C) 2003 VideoLAN
* $Id: win32_factory.hpp,v 1.
2 2004/01/27 17:01:51
gbazin Exp $
* $Id: win32_factory.hpp,v 1.
3 2004/02/27 13:24:12
gbazin Exp $
*
*
* Authors: Cyril Deguet <asmax@via.ecp.fr>
* Authors: Cyril Deguet <asmax@via.ecp.fr>
* Olivier Teulire <ipkiss@via.ecp.fr>
* Olivier Teulire <ipkiss@via.ecp.fr>
...
@@ -25,6 +25,8 @@
...
@@ -25,6 +25,8 @@
#ifndef WIN32_FACTORY_HPP
#ifndef WIN32_FACTORY_HPP
#define WIN32_FACTORY_HPP
#define WIN32_FACTORY_HPP
#define _WIN32_WINNT 0x0500
#include <windows.h>
#include <windows.h>
#include "../src/os_factory.hpp"
#include "../src/os_factory.hpp"
#include <map>
#include <map>
...
...
modules/gui/skins2/win32/win32_loop.cpp
View file @
6ae1b0c0
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* win32_loop.cpp
* win32_loop.cpp
*****************************************************************************
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* Copyright (C) 2003 VideoLAN
* $Id: win32_loop.cpp,v 1.
1 2004/01/03 23:31:34 asmax
Exp $
* $Id: win32_loop.cpp,v 1.
2 2004/02/27 13:24:12 gbazin
Exp $
*
*
* Authors: Cyril Deguet <asmax@via.ecp.fr>
* Authors: Cyril Deguet <asmax@via.ecp.fr>
* Olivier Teulire <ipkiss@via.ecp.fr>
* Olivier Teulire <ipkiss@via.ecp.fr>
...
@@ -24,8 +24,8 @@
...
@@ -24,8 +24,8 @@
#ifdef WIN32_SKINS
#ifdef WIN32_SKINS
#include "win32_loop.hpp"
#include "win32_factory.hpp"
#include "win32_factory.hpp"
#include "win32_loop.hpp"
#include "../src/generic_window.hpp"
#include "../src/generic_window.hpp"
#include "../events/evt_key.hpp"
#include "../events/evt_key.hpp"
#include "../events/evt_leave.hpp"
#include "../events/evt_leave.hpp"
...
...
modules/gui/skins2/win32/win32_loop.hpp
View file @
6ae1b0c0
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* win32_loop.hpp
* win32_loop.hpp
*****************************************************************************
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* Copyright (C) 2003 VideoLAN
* $Id: win32_loop.hpp,v 1.
1 2004/01/03 23:31:34 asmax
Exp $
* $Id: win32_loop.hpp,v 1.
2 2004/02/27 13:24:12 gbazin
Exp $
*
*
* Authors: Cyril Deguet <asmax@via.ecp.fr>
* Authors: Cyril Deguet <asmax@via.ecp.fr>
* Olivier Teulière <ipkiss@via.ecp.fr>
* Olivier Teulière <ipkiss@via.ecp.fr>
...
@@ -27,7 +27,6 @@
...
@@ -27,7 +27,6 @@
#include "../events/evt_mouse.hpp"
#include "../events/evt_mouse.hpp"
#include "../src/os_loop.hpp"
#include "../src/os_loop.hpp"
#include <windows.h>
#include <map>
#include <map>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment