Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
813e982a
Commit
813e982a
authored
Jun 03, 2005
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* modules/gui/skins2/*: a few portability fixes.
parent
ec9d1adf
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
16 deletions
+21
-16
modules/gui/skins2/parser/xmlparser.cpp
modules/gui/skins2/parser/xmlparser.cpp
+6
-1
modules/gui/skins2/src/theme_loader.cpp
modules/gui/skins2/src/theme_loader.cpp
+1
-1
modules/gui/skins2/src/theme_repository.cpp
modules/gui/skins2/src/theme_repository.cpp
+1
-1
modules/gui/skins2/win32/win32_factory.cpp
modules/gui/skins2/win32/win32_factory.cpp
+13
-13
No files found.
modules/gui/skins2/parser/xmlparser.cpp
View file @
813e982a
...
...
@@ -24,7 +24,9 @@
#include "xmlparser.hpp"
#include "../src/os_factory.hpp"
#include <sys/stat.h>
#ifdef HAVE_SYS_STAT_H
# include <sys/stat.h>
#endif
// Static variable to avoid initializing catalogs twice
static
bool
m_initialized
=
false
;
...
...
@@ -84,6 +86,8 @@ void XMLParser::LoadCatalog()
const
list
<
string
>
&
resPath
=
pOSFactory
->
getResourcePath
();
const
string
&
sep
=
pOSFactory
->
getDirSeparator
();
list
<
string
>::
const_iterator
it
;
#ifdef HAVE_SYS_STAT_H
struct
stat
statBuf
;
// Try to load the catalog first (needed at least on win32 where
...
...
@@ -123,6 +127,7 @@ void XMLParser::LoadCatalog()
{
msg_Err
(
getIntf
(),
"Cannot find the skins DTD !"
);
}
#endif
}
bool
XMLParser
::
parse
()
...
...
modules/gui/skins2/src/theme_loader.cpp
View file @
813e982a
...
...
@@ -38,7 +38,7 @@
#endif
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#elif defined( WIN32 )
#elif defined( WIN32 )
&& !defined( UNDER_CE )
# include <direct.h>
#endif
...
...
modules/gui/skins2/src/theme_repository.cpp
View file @
813e982a
...
...
@@ -27,7 +27,7 @@
#include "../commands/cmd_dialogs.hpp"
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#elif defined( WIN32 )
#elif defined( WIN32 )
&& !defined( UNDER_CE )
# include <direct.h>
#endif
#ifdef HAVE_DIRENT_H
...
...
modules/gui/skins2/win32/win32_factory.cpp
View file @
813e982a
...
...
@@ -101,13 +101,13 @@ bool Win32Factory::init()
WNDCLASS
skinWindowClass
;
skinWindowClass
.
style
=
CS_VREDRAW
|
CS_HREDRAW
|
CS_DBLCLKS
;
skinWindowClass
.
lpfnWndProc
=
(
WNDPROC
)
Win32Proc
;
skinWindowClass
.
lpszClassName
=
"SkinWindowClass"
;
skinWindowClass
.
lpszClassName
=
_T
(
"SkinWindowClass"
)
;
skinWindowClass
.
lpszMenuName
=
NULL
;
skinWindowClass
.
cbClsExtra
=
0
;
skinWindowClass
.
cbWndExtra
=
0
;
skinWindowClass
.
hbrBackground
=
NULL
;
skinWindowClass
.
hCursor
=
LoadCursor
(
NULL
,
IDC_ARROW
);
skinWindowClass
.
hIcon
=
LoadIcon
(
m_hInst
,
"VLC_ICON"
);
skinWindowClass
.
hIcon
=
LoadIcon
(
m_hInst
,
_T
(
"VLC_ICON"
)
);
skinWindowClass
.
hInstance
=
m_hInst
;
// Register class and check it
...
...
@@ -117,7 +117,7 @@ bool Win32Factory::init()
// Check why it failed. If it's because the class already exists
// then fine, otherwise return with an error.
if
(
!
GetClassInfo
(
m_hInst
,
"SkinWindowClass"
,
&
wndclass
)
)
if
(
!
GetClassInfo
(
m_hInst
,
_T
(
"SkinWindowClass"
)
,
&
wndclass
)
)
{
msg_Err
(
getIntf
(),
"Cannot register window class"
);
return
false
;
...
...
@@ -125,8 +125,9 @@ bool Win32Factory::init()
}
// Create Window
m_hParentWindow
=
CreateWindowEx
(
WS_EX_APPWINDOW
,
"SkinWindowClass"
,
"VLC media player"
,
WS_SYSMENU
|
WS_POPUP
,
-
200
,
-
200
,
0
,
0
,
0
,
0
,
m_hInst
,
0
);
m_hParentWindow
=
CreateWindowEx
(
WS_EX_APPWINDOW
,
_T
(
"SkinWindowClass"
),
_T
(
"VLC media player"
),
WS_SYSMENU
|
WS_POPUP
,
-
200
,
-
200
,
0
,
0
,
0
,
0
,
m_hInst
,
0
);
if
(
m_hParentWindow
==
NULL
)
{
msg_Err
(
getIntf
(),
"Cannot create parent window"
);
...
...
@@ -136,8 +137,8 @@ bool Win32Factory::init()
// We do it this way otherwise CreateWindowEx will fail
// if WS_EX_LAYERED is not supported
SetWindowLongPtr
(
m_hParentWindow
,
GWL_EXSTYLE
,
GetWindowLong
(
m_hParentWindow
,
GWL_EXSTYLE
)
|
WS_EX_LAYERED
);
GetWindowLong
(
m_hParentWindow
,
GWL_EXSTYLE
)
|
WS_EX_LAYERED
);
// Store with it a pointer to the interface thread
SetWindowLongPtr
(
m_hParentWindow
,
GWLP_USERDATA
,
(
LONG_PTR
)
getIntf
()
);
...
...
@@ -147,12 +148,12 @@ bool Win32Factory::init()
OleInitialize
(
NULL
);
// We dynamically load msimg32.dll to get a pointer to TransparentBlt()
m_hMsimg32
=
LoadLibrary
(
"msimg32.dll"
);
m_hMsimg32
=
LoadLibrary
(
_T
(
"msimg32.dll"
)
);
if
(
!
m_hMsimg32
||
!
(
TransparentBlt
=
(
BOOL
(
WINAPI
*
)(
HDC
,
int
,
int
,
int
,
int
,
HDC
,
int
,
int
,
int
,
int
,
unsigned
int
))
GetProcAddress
(
m_hMsimg32
,
"TransparentBlt"
)
)
)
GetProcAddress
(
m_hMsimg32
,
_T
(
"TransparentBlt"
)
)
)
)
{
TransparentBlt
=
NULL
;
msg_Dbg
(
getIntf
(),
"Couldn't find TransparentBlt(), "
...
...
@@ -162,18 +163,18 @@ bool Win32Factory::init()
!
(
AlphaBlend
=
(
BOOL
(
WINAPI
*
)(
HDC
,
int
,
int
,
int
,
int
,
HDC
,
int
,
int
,
int
,
int
,
BLENDFUNCTION
))
GetProcAddress
(
m_hMsimg32
,
"AlphaBlend"
)
)
)
GetProcAddress
(
m_hMsimg32
,
_T
(
"AlphaBlend"
)
)
)
)
{
AlphaBlend
=
NULL
;
msg_Dbg
(
getIntf
(),
"Couldn't find AlphaBlend()"
);
}
// Idem for user32.dll and SetLayeredWindowAttributes()
m_hUser32
=
LoadLibrary
(
"user32.dll"
);
m_hUser32
=
LoadLibrary
(
_T
(
"user32.dll"
)
);
if
(
!
m_hUser32
||
!
(
SetLayeredWindowAttributes
=
(
BOOL
(
WINAPI
*
)(
HWND
,
COLORREF
,
BYTE
,
DWORD
))
GetProcAddress
(
m_hUser32
,
"SetLayeredWindowAttributes"
)
)
)
GetProcAddress
(
m_hUser32
,
_T
(
"SetLayeredWindowAttributes"
)
)
)
)
{
SetLayeredWindowAttributes
=
NULL
;
msg_Dbg
(
getIntf
(),
"Couldn't find SetLayeredWindowAttributes()"
);
...
...
@@ -355,5 +356,4 @@ void Win32Factory::rmDir( const string &rPath )
RemoveDirectory
(
rPath
.
c_str
()
);
}
#endif
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