Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
276c375b
Commit
276c375b
authored
Jan 15, 2013
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Skins2: port Win32 code to UNICODE
This would deserve a second look, though
parent
55cf2711
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
19 deletions
+20
-19
modules/gui/skins2/win32/win32_factory.cpp
modules/gui/skins2/win32/win32_factory.cpp
+16
-15
modules/gui/skins2/win32/win32_popup.cpp
modules/gui/skins2/win32/win32_popup.cpp
+1
-1
modules/gui/skins2/win32/win32_tooltip.cpp
modules/gui/skins2/win32/win32_tooltip.cpp
+1
-1
modules/gui/skins2/win32/win32_window.cpp
modules/gui/skins2/win32/win32_window.cpp
+2
-2
No files found.
modules/gui/skins2/win32/win32_factory.cpp
View file @
276c375b
...
...
@@ -31,6 +31,7 @@
#include <windows.h>
#include <winuser.h>
#include <wingdi.h>
#include <tchar.h>
#include "win32_factory.hpp"
#include "win32_graphics.hpp"
...
...
@@ -147,9 +148,9 @@ Win32Factory::Win32Factory( intf_thread_t *pIntf ):
bool
Win32Factory
::
init
()
{
const
char
*
vlc_name
=
"VLC Media Player"
;
const
char
*
vlc_icon
=
"VLC_ICON"
;
const
char
*
vlc_class
=
"SkinWindowClass"
;
LPCTSTR
vlc_name
=
TEXT
(
"VLC Media Player"
)
;
LPCTSTR
vlc_icon
=
TEXT
(
"VLC_ICON"
)
;
LPCTSTR
vlc_class
=
TEXT
(
"SkinWindowClass"
)
;
// Get instance handle
m_hInst
=
GetModuleHandle
(
NULL
);
...
...
@@ -162,13 +163,13 @@ bool Win32Factory::init()
WNDCLASS
skinWindowClass
;
skinWindowClass
.
style
=
CS_DBLCLKS
;
skinWindowClass
.
lpfnWndProc
=
(
WNDPROC
)
Win32Factory
::
Win32Proc
;
skinWindowClass
.
lpszClassName
=
_T
(
vlc_class
)
;
skinWindowClass
.
lpszClassName
=
vlc_class
;
skinWindowClass
.
lpszMenuName
=
NULL
;
skinWindowClass
.
cbClsExtra
=
0
;
skinWindowClass
.
cbWndExtra
=
0
;
skinWindowClass
.
hbrBackground
=
NULL
;
skinWindowClass
.
hCursor
=
LoadCursor
(
NULL
,
IDC_ARROW
);
skinWindowClass
.
hIcon
=
LoadIcon
(
m_hInst
,
_T
(
vlc_icon
)
);
skinWindowClass
.
hIcon
=
LoadIcon
(
m_hInst
,
vlc_icon
);
skinWindowClass
.
hInstance
=
m_hInst
;
// Register class and check it
...
...
@@ -178,7 +179,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
,
_T
(
vlc_class
)
,
&
wndclass
)
)
if
(
!
GetClassInfo
(
m_hInst
,
vlc_class
,
&
wndclass
)
)
{
msg_Err
(
getIntf
(),
"cannot register window class"
);
return
false
;
...
...
@@ -186,8 +187,8 @@ bool Win32Factory::init()
}
// Create Window
m_hParentWindow
=
CreateWindowEx
(
WS_EX_TOOLWINDOW
,
_T
(
vlc_class
)
,
_T
(
vlc_name
)
,
WS_POPUP
|
WS_SYSMENU
|
WS_MINIMIZEBOX
,
m_hParentWindow
=
CreateWindowEx
(
WS_EX_TOOLWINDOW
,
vlc_class
,
vlc_name
,
WS_POPUP
|
WS_SYSMENU
|
WS_MINIMIZEBOX
,
-
200
,
-
200
,
0
,
0
,
0
,
0
,
m_hInst
,
0
);
if
(
m_hParentWindow
==
NULL
)
{
...
...
@@ -212,8 +213,8 @@ bool Win32Factory::init()
m_trayIcon
.
uID
=
42
;
m_trayIcon
.
uFlags
=
NIF_ICON
|
NIF_TIP
|
NIF_MESSAGE
;
m_trayIcon
.
uCallbackMessage
=
MY_WM_TRAYACTION
;
m_trayIcon
.
hIcon
=
LoadIcon
(
m_hInst
,
_T
(
vlc_icon
)
);
str
cpy
(
m_trayIcon
.
szTip
,
vlc_name
);
m_trayIcon
.
hIcon
=
LoadIcon
(
m_hInst
,
vlc_icon
);
_tcs
cpy
(
m_trayIcon
.
szTip
,
vlc_name
);
// Show the systray icon if needed
if
(
var_InheritBool
(
getIntf
(),
"skins2-systray"
)
)
...
...
@@ -477,10 +478,10 @@ void Win32Factory::changeCursor( CursorType_t type ) const
void
Win32Factory
::
rmDir
(
const
string
&
rPath
)
{
WIN32_FIND_DATA
find
;
WIN32_FIND_DATA
A
find
;
string
file
;
string
findFiles
=
rPath
+
"
\\
*"
;
HANDLE
handle
=
FindFirstFile
(
findFiles
.
c_str
(),
&
find
);
HANDLE
handle
=
FindFirstFile
A
(
findFiles
.
c_str
(),
&
find
);
while
(
handle
!=
INVALID_HANDLE_VALUE
)
{
...
...
@@ -498,18 +499,18 @@ void Win32Factory::rmDir( const string &rPath )
// Else, it is a file so simply delete it
else
{
DeleteFile
(
file
.
c_str
()
);
DeleteFile
A
(
file
.
c_str
()
);
}
}
// If no more file in directory, exit while
if
(
!
FindNextFile
(
handle
,
&
find
)
)
if
(
!
FindNextFile
A
(
handle
,
&
find
)
)
break
;
}
// Now directory is empty so can be removed
FindClose
(
handle
);
RemoveDirectory
(
rPath
.
c_str
()
);
RemoveDirectory
A
(
rPath
.
c_str
()
);
}
#endif
modules/gui/skins2/win32/win32_popup.cpp
View file @
276c375b
...
...
@@ -74,7 +74,7 @@ void Win32Popup::addItem( const string &rLabel, int pos )
// menuItem.fType = MFT_STRING;
menuItem
.
fMask
=
MIIM_ID
|
MIIM_STRING
;
menuItem
.
wID
=
pos
;
menuItem
.
dwTypeData
=
(
char
*
)
rLabel
.
c_str
(
);
menuItem
.
dwTypeData
=
ToT
(
rLabel
.
c_str
()
);
menuItem
.
cch
=
rLabel
.
size
();
InsertMenuItem
(
m_hMenu
,
findInsertionPoint
(
pos
),
TRUE
,
&
menuItem
);
...
...
modules/gui/skins2/win32/win32_tooltip.cpp
View file @
276c375b
...
...
@@ -34,7 +34,7 @@ Win32Tooltip::Win32Tooltip( intf_thread_t *pIntf, HINSTANCE hInst,
{
// Create the window
m_hWnd
=
CreateWindowEx
(
WS_EX_TOOLWINDOW
,
"SkinWindowClass"
,
"tooltip"
,
WS_POPUP
|
WS_DISABLED
,
TEXT
(
"SkinWindowClass"
),
TEXT
(
"tooltip"
)
,
WS_POPUP
|
WS_DISABLED
,
CW_USEDEFAULT
,
CW_USEDEFAULT
,
CW_USEDEFAULT
,
CW_USEDEFAULT
,
hParentWindow
,
0
,
hInst
,
NULL
);
...
...
modules/gui/skins2/win32/win32_window.cpp
View file @
276c375b
...
...
@@ -55,8 +55,8 @@ Win32Window::Win32Window( intf_thread_t *pIntf, GenericWindow &rWindow,
(
void
)
hParentWindow
;
Win32Factory
*
pFactory
=
(
Win32Factory
*
)
Win32Factory
::
instance
(
getIntf
()
);
const
char
*
vlc_name
=
"VlC Media Player"
;
const
char
*
vlc_class
=
"SkinWindowClass"
;
LPCTSTR
vlc_name
=
TEXT
(
"VlC Media Player"
)
;
LPCTSTR
vlc_class
=
TEXT
(
"SkinWindowClass"
)
;
// Create the window
if
(
type
==
GenericWindow
::
VoutWindow
)
...
...
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