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
e80505af
Commit
e80505af
authored
Mar 29, 2005
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* modules/gui/wince: new open directory menu (win32 only for now)
parent
7b9a0651
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
94 additions
and
5 deletions
+94
-5
modules/gui/wince/interface.cpp
modules/gui/wince/interface.cpp
+77
-1
modules/gui/wince/wince.cpp
modules/gui/wince/wince.cpp
+14
-3
modules/gui/wince/wince.h
modules/gui/wince/wince.h
+3
-1
No files found.
modules/gui/wince/interface.cpp
View file @
e80505af
...
@@ -38,6 +38,7 @@
...
@@ -38,6 +38,7 @@
#include <windowsx.h>
#include <windowsx.h>
#include <commctrl.h>
#include <commctrl.h>
#include <commdlg.h>
#include <commdlg.h>
#include <shlobj.h>
#define NUMIMAGES 9 // Number of buttons in the toolbar
#define NUMIMAGES 9 // Number of buttons in the toolbar
#define IMAGEWIDTH 17 // Width of the buttons in the toolbar
#define IMAGEWIDTH 17 // Width of the buttons in the toolbar
...
@@ -218,6 +219,8 @@ HWND Interface::CreateMenuBar( HWND hwnd, HINSTANCE hInst )
...
@@ -218,6 +219,8 @@ HWND Interface::CreateMenuBar( HWND hwnd, HINSTANCE hInst )
AppendMenu
(
menu_file
,
MF_SEPARATOR
,
0
,
0
);
AppendMenu
(
menu_file
,
MF_SEPARATOR
,
0
,
0
);
AppendMenu
(
menu_file
,
MF_STRING
,
ID_FILE_OPENFILE
,
AppendMenu
(
menu_file
,
MF_STRING
,
ID_FILE_OPENFILE
,
_T
(
"Open &File..."
)
);
_T
(
"Open &File..."
)
);
AppendMenu
(
menu_file
,
MF_STRING
,
ID_FILE_OPENDIR
,
_T
(
"Open &Directory..."
)
);
AppendMenu
(
menu_file
,
MF_STRING
,
ID_FILE_OPENNET
,
AppendMenu
(
menu_file
,
MF_STRING
,
ID_FILE_OPENNET
,
_T
(
"Open &Network Stream..."
)
);
_T
(
"Open &Network Stream..."
)
);
AppendMenu
(
menu_file
,
MF_SEPARATOR
,
0
,
0
);
AppendMenu
(
menu_file
,
MF_SEPARATOR
,
0
,
0
);
...
@@ -565,6 +568,10 @@ LRESULT Interface::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp )
...
@@ -565,6 +568,10 @@ LRESULT Interface::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp )
delete
open
;
delete
open
;
break
;
break
;
case
ID_FILE_OPENDIR
:
OnOpenDirectory
();
break
;
case
ID_FILE_OPENNET
:
case
ID_FILE_OPENNET
:
open
=
new
OpenDialog
(
p_intf
,
hInst
,
NET_ACCESS
,
ID_FILE_OPENNET
,
open
=
new
OpenDialog
(
p_intf
,
hInst
,
NET_ACCESS
,
ID_FILE_OPENNET
,
OPEN_NORMAL
);
OPEN_NORMAL
);
...
@@ -742,7 +749,7 @@ void Interface::OnOpenFileSimple( void )
...
@@ -742,7 +749,7 @@ void Interface::OnOpenFileSimple( void )
memset
(
&
ofn
,
0
,
sizeof
(
OPENFILENAME
)
);
memset
(
&
ofn
,
0
,
sizeof
(
OPENFILENAME
)
);
ofn
.
lStructSize
=
sizeof
(
OPENFILENAME
);
ofn
.
lStructSize
=
sizeof
(
OPENFILENAME
);
ofn
.
hwndOwner
=
NULL
;
ofn
.
hwndOwner
=
hwndMain
;
ofn
.
hInstance
=
hInst
;
ofn
.
hInstance
=
hInst
;
ofn
.
lpstrFilter
=
szFilter
;
ofn
.
lpstrFilter
=
szFilter
;
ofn
.
lpstrCustomFilter
=
NULL
;
ofn
.
lpstrCustomFilter
=
NULL
;
...
@@ -774,6 +781,75 @@ void Interface::OnOpenFileSimple( void )
...
@@ -774,6 +781,75 @@ void Interface::OnOpenFileSimple( void )
vlc_object_release
(
p_playlist
);
vlc_object_release
(
p_playlist
);
}
}
void
Interface
::
OnOpenDirectory
(
void
)
{
TCHAR
psz_result
[
MAX_PATH
];
LPMALLOC
p_malloc
=
0
;
LPITEMIDLIST
pidl
;
BROWSEINFO
bi
;
playlist_t
*
p_playlist
=
0
;
#ifdef UNDER_CE
# define SHGetMalloc MySHGetMalloc
# define SHBrowseForFolder MySHBrowseForFolder
# define SHGetPathFromIDList MySHGetPathFromIDList
HMODULE
ceshell_dll
=
LoadLibrary
(
_T
(
"ceshell"
)
);
if
(
!
ceshell_dll
)
return
;
HRESULT
WINAPI
(
*
SHGetMalloc
)(
LPMALLOC
*
)
=
(
HRESULT
WINAPI
(
*
)(
LPMALLOC
*
))
GetProcAddress
(
ceshell_dll
,
_T
(
"SHGetMalloc"
)
);
LPITEMIDLIST
WINAPI
(
*
SHBrowseForFolder
)(
LPBROWSEINFO
)
=
(
LPITEMIDLIST
WINAPI
(
*
)(
LPBROWSEINFO
))
GetProcAddress
(
ceshell_dll
,
_T
(
"SHBrowseForFolder"
)
);
BOOL
WINAPI
(
*
SHGetPathFromIDList
)(
LPCITEMIDLIST
,
LPTSTR
)
=
(
BOOL
WINAPI
(
*
)(
LPCITEMIDLIST
,
LPTSTR
))
GetProcAddress
(
ceshell_dll
,
_T
(
"SHGetPathFromIDList"
)
);
if
(
!
SHGetMalloc
||
!
SHBrowseForFolder
||
!
SHGetPathFromIDList
)
{
msg_Err
(
p_intf
,
"couldn't load SHBrowseForFolder API"
);
FreeLibrary
(
ceshell_dll
);
return
;
}
#endif
if
(
!
SUCCEEDED
(
SHGetMalloc
(
&
p_malloc
)
)
)
goto
error
;
p_playlist
=
(
playlist_t
*
)
vlc_object_find
(
p_intf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
if
(
!
p_playlist
)
goto
error
;
memset
(
&
bi
,
0
,
sizeof
(
BROWSEINFO
)
);
bi
.
hwndOwner
=
hwndMain
;
bi
.
pszDisplayName
=
psz_result
;
bi
.
ulFlags
=
BIF_EDITBOX
;
#ifndef UNDER_CE
bi
.
ulFlags
|=
BIF_USENEWUI
;
#endif
if
(
(
pidl
=
SHBrowseForFolder
(
&
bi
)
)
)
{
if
(
SHGetPathFromIDList
(
pidl
,
psz_result
)
)
{
char
*
psz_filename
=
_TOMB
(
psz_result
);
playlist_Add
(
p_playlist
,
psz_filename
,
psz_filename
,
PLAYLIST_APPEND
|
PLAYLIST_GO
,
PLAYLIST_END
);
}
p_malloc
->
Free
(
pidl
);
}
error:
if
(
p_malloc
)
p_malloc
->
Release
();
if
(
p_playlist
)
vlc_object_release
(
p_playlist
);
#ifdef UNDER_CE
FreeLibrary
(
ceshell_dll
);
#endif
}
void
Interface
::
OnPlayStream
(
void
)
void
Interface
::
OnPlayStream
(
void
)
{
{
playlist_t
*
p_playlist
=
(
playlist_t
*
)
playlist_t
*
p_playlist
=
(
playlist_t
*
)
...
...
modules/gui/wince/wince.cpp
View file @
e80505af
...
@@ -35,6 +35,7 @@
...
@@ -35,6 +35,7 @@
#include "wince.h"
#include "wince.h"
#include <objbase.h>
#include <commctrl.h>
#include <commctrl.h>
#include <commdlg.h>
#include <commdlg.h>
...
@@ -171,12 +172,17 @@ static void Close( vlc_object_t *p_this )
...
@@ -171,12 +172,17 @@ static void Close( vlc_object_t *p_this )
static
void
Run
(
intf_thread_t
*
p_intf
)
static
void
Run
(
intf_thread_t
*
p_intf
)
{
{
MSG
msg
;
MSG
msg
;
Interface
int
erface
;
Interface
int
f
;
p_intf
->
p_sys
->
p_main_window
=
&
int
erface
;
p_intf
->
p_sys
->
p_main_window
=
&
int
f
;
if
(
!
hInstance
)
hInstance
=
GetModuleHandle
(
NULL
);
if
(
!
hInstance
)
hInstance
=
GetModuleHandle
(
NULL
);
if
(
!
interface
.
InitInstance
(
hInstance
,
p_intf
)
)
return
;
#ifndef UNDER_CE
/* Initialize OLE/COM */
CoInitialize
(
0
);
#endif
if
(
!
intf
.
InitInstance
(
hInstance
,
p_intf
)
)
return
;
// Main message loop
// Main message loop
while
(
GetMessage
(
&
msg
,
NULL
,
0
,
0
)
>
0
)
while
(
GetMessage
(
&
msg
,
NULL
,
0
,
0
)
>
0
)
...
@@ -184,4 +190,9 @@ static void Run( intf_thread_t *p_intf )
...
@@ -184,4 +190,9 @@ static void Run( intf_thread_t *p_intf )
TranslateMessage
(
&
msg
);
TranslateMessage
(
&
msg
);
DispatchMessage
(
&
msg
);
DispatchMessage
(
&
msg
);
}
}
#ifndef UNDER_CE
/* Uninitialize OLE/COM */
CoUninitialize
();
#endif
}
}
modules/gui/wince/wince.h
View file @
e80505af
...
@@ -167,6 +167,7 @@ protected:
...
@@ -167,6 +167,7 @@ protected:
virtual
LRESULT
WndProc
(
HWND
,
UINT
,
WPARAM
,
LPARAM
);
virtual
LRESULT
WndProc
(
HWND
,
UINT
,
WPARAM
,
LPARAM
);
void
OnOpenFileSimple
(
void
);
void
OnOpenFileSimple
(
void
);
void
OnOpenDirectory
(
void
);
void
OnPlayStream
(
void
);
void
OnPlayStream
(
void
);
void
OnVideoOnTop
(
void
);
void
OnVideoOnTop
(
void
);
...
@@ -653,7 +654,8 @@ extern "C" {
...
@@ -653,7 +654,8 @@ extern "C" {
#define IDM_NAVIGATION 40053
#define IDM_NAVIGATION 40053
#define ID_FILE_QUICKOPEN 40057
#define ID_FILE_QUICKOPEN 40057
#define ID_FILE_OPENFILE 40058
#define ID_FILE_OPENFILE 40058
#define ID_FILE_OPENNET 40059
#define ID_FILE_OPENDIR 40059
#define ID_FILE_OPENNET 40060
#define ID_FILE_EXIT 40061
#define ID_FILE_EXIT 40061
#define ID_VIEW_PLAYLIST 40063
#define ID_VIEW_PLAYLIST 40063
#define ID_VIEW_MESSAGES 40064
#define ID_VIEW_MESSAGES 40064
...
...
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