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
953d89a9
Commit
953d89a9
authored
Feb 28, 2005
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* modules/gui/wince: usual bunch of cleanup + updates.
parent
75543f3d
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
75 additions
and
65 deletions
+75
-65
modules/gui/wince/interface.cpp
modules/gui/wince/interface.cpp
+34
-34
modules/gui/wince/open.cpp
modules/gui/wince/open.cpp
+1
-1
modules/gui/wince/playlist.cpp
modules/gui/wince/playlist.cpp
+3
-7
modules/gui/wince/subtitles.cpp
modules/gui/wince/subtitles.cpp
+1
-1
modules/gui/wince/wince.cpp
modules/gui/wince/wince.cpp
+18
-0
modules/gui/wince/wince.h
modules/gui/wince/wince.h
+18
-22
No files found.
modules/gui/wince/interface.cpp
View file @
953d89a9
...
...
@@ -108,7 +108,7 @@ TCHAR * szToolTips[] =
BOOL
Interface
::
InitInstance
(
HINSTANCE
hInstance
,
intf_thread_t
*
_p_intf
)
{
/* Initializations */
p
I
ntf
=
_p_intf
;
p
_i
ntf
=
_p_intf
;
hwndMain
=
hwndCB
=
hwndTB
=
hwndSlider
=
hwndLabel
=
hwndVol
=
hwndSB
=
0
;
i_old_playing_status
=
PAUSE_S
;
...
...
@@ -525,10 +525,10 @@ LRESULT CALLBACK Interface::WndProc( HWND hwnd, UINT msg, WPARAM wp,
#endif
/* Video window */
if
(
config_GetInt
(
p
I
ntf
,
"wince-embed"
)
)
video
=
CreateVideoWindow
(
p
I
ntf
,
hwnd
);
if
(
config_GetInt
(
p
_i
ntf
,
"wince-embed"
)
)
video
=
CreateVideoWindow
(
p
_i
ntf
,
hwnd
);
ti
=
new
Timer
(
p
I
ntf
,
hwnd
,
this
);
ti
=
new
Timer
(
p
_i
ntf
,
hwnd
,
this
);
// Hide the SIP button (WINCE only)
SetForegroundWindow
(
hwnd
);
...
...
@@ -543,14 +543,14 @@ LRESULT CALLBACK Interface::WndProc( HWND hwnd, UINT msg, WPARAM wp,
break
;
case
ID_FILE_OPENFILE
:
open
=
new
OpenDialog
(
p
I
ntf
,
hInst
,
FILE_ACCESS
,
open
=
new
OpenDialog
(
p
_i
ntf
,
hInst
,
FILE_ACCESS
,
ID_FILE_OPENFILE
,
OPEN_NORMAL
);
CreateDialogBox
(
hwnd
,
open
);
delete
open
;
break
;
case
ID_FILE_OPENNET
:
open
=
new
OpenDialog
(
p
I
ntf
,
hInst
,
NET_ACCESS
,
ID_FILE_OPENNET
,
open
=
new
OpenDialog
(
p
_i
ntf
,
hInst
,
NET_ACCESS
,
ID_FILE_OPENNET
,
OPEN_NORMAL
);
CreateDialogBox
(
hwnd
,
open
);
delete
open
;
...
...
@@ -598,31 +598,31 @@ LRESULT CALLBACK Interface::WndProc( HWND hwnd, UINT msg, WPARAM wp,
break
;
case
ID_VIEW_STREAMINFO
:
fi
=
new
FileInfo
(
p
I
ntf
,
hInst
);
fi
=
new
FileInfo
(
p
_i
ntf
,
hInst
);
CreateDialogBox
(
hwnd
,
fi
);
delete
fi
;
break
;
case
ID_VIEW_MESSAGES
:
hmsg
=
new
Messages
(
p
I
ntf
,
hInst
);
hmsg
=
new
Messages
(
p
_i
ntf
,
hInst
);
CreateDialogBox
(
hwnd
,
hmsg
);
delete
hmsg
;
break
;
case
ID_VIEW_PLAYLIST
:
pl
=
new
Playlist
(
p
I
ntf
,
hInst
);
pl
=
new
Playlist
(
p
_i
ntf
,
hInst
);
CreateDialogBox
(
hwnd
,
pl
);
delete
pl
;
break
;
case
ID_SETTINGS_PREF
:
pref
=
new
PrefsDialog
(
p
I
ntf
,
hInst
);
pref
=
new
PrefsDialog
(
p
_i
ntf
,
hInst
);
CreateDialogBox
(
hwnd
,
pref
);
delete
pref
;
break
;
default:
OnMenuEvent
(
p
I
ntf
,
GET_WM_COMMAND_ID
(
wp
,
lp
)
);
OnMenuEvent
(
p
_i
ntf
,
GET_WM_COMMAND_ID
(
wp
,
lp
)
);
// we should test if it is a menu command
}
break
;
...
...
@@ -652,16 +652,16 @@ LRESULT CALLBACK Interface::WndProc( HWND hwnd, UINT msg, WPARAM wp,
break
;
case
WM_INITMENUPOPUP
:
RefreshSettingsMenu
(
p
I
ntf
,
RefreshSettingsMenu
(
p
_i
ntf
,
(
HMENU
)
SendMessage
(
hwndCB
,
SHCMBM_GETSUBMENU
,
(
WPARAM
)
0
,
(
LPARAM
)
IDM_SETTINGS
)
);
RefreshAudioMenu
(
p
I
ntf
,
RefreshAudioMenu
(
p
_i
ntf
,
(
HMENU
)
SendMessage
(
hwndCB
,
SHCMBM_GETSUBMENU
,
(
WPARAM
)
0
,
(
LPARAM
)
IDM_AUDIO
)
);
RefreshVideoMenu
(
p
I
ntf
,
RefreshVideoMenu
(
p
_i
ntf
,
(
HMENU
)
SendMessage
(
hwndCB
,
SHCMBM_GETSUBMENU
,
(
WPARAM
)
0
,
(
LPARAM
)
IDM_VIDEO
)
);
RefreshNavigMenu
(
p
I
ntf
,
RefreshNavigMenu
(
p
_i
ntf
,
(
HMENU
)
SendMessage
(
hwndCB
,
SHCMBM_GETSUBMENU
,
(
WPARAM
)
0
,
(
LPARAM
)
IDM_NAVIGATION
)
);
...
...
@@ -669,7 +669,7 @@ LRESULT CALLBACK Interface::WndProc( HWND hwnd, UINT msg, WPARAM wp,
// Undo the video display because menu is opened
// due to GAPI, menu top display is not assumed
// FIXME verify if p_child_window exits
SendMessage( p
I
ntf->p_sys->p_video_window->p_child_window,
SendMessage( p
_i
ntf->p_sys->p_video_window->p_child_window,
WM_INITMENUPOPUP, wp, lp );
#endif
...
...
@@ -683,7 +683,7 @@ LRESULT CALLBACK Interface::WndProc( HWND hwnd, UINT msg, WPARAM wp,
// Redo the video display because menu can be closed
// FIXME verify if p_child_window exits
if( (((NMHDR *)lp)->code) == NM_CUSTOMDRAW )
SendMessage( p
I
ntf->p_sys->p_video_window->p_child_window,
SendMessage( p
_i
ntf->p_sys->p_video_window->p_child_window,
WM_NOTIFY, wp, lp );
return lResult;
#endif
...
...
@@ -713,7 +713,7 @@ void Interface::OnOpenFileSimple( void )
static
TCHAR
szFilter
[]
=
_T
(
"All (*.*)
\0
*.*
\0
"
);
playlist_t
*
p_playlist
=
(
playlist_t
*
)
vlc_object_find
(
p
I
ntf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
vlc_object_find
(
p
_i
ntf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
if
(
p_playlist
==
NULL
)
return
;
memset
(
&
ofn
,
0
,
sizeof
(
OPENFILENAME
)
);
...
...
@@ -740,7 +740,7 @@ void Interface::OnOpenFileSimple( void )
SHFullScreen
(
GetForegroundWindow
(),
SHFS_HIDESIPBUTTON
);
if
(
GetOpenFile
Name
(
(
LPOPENFILENAME
)
&
ofn
)
)
if
(
GetOpenFile
(
&
ofn
)
)
{
char
*
psz_filename
=
_TOMB
(
ofn
.
lpstrFile
);
playlist_Add
(
p_playlist
,
psz_filename
,
psz_filename
,
...
...
@@ -753,7 +753,7 @@ void Interface::OnOpenFileSimple( void )
void
Interface
::
OnPlayStream
(
void
)
{
playlist_t
*
p_playlist
=
(
playlist_t
*
)
vlc_object_find
(
p
I
ntf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
vlc_object_find
(
p
_i
ntf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
if
(
p_playlist
==
NULL
)
return
;
if
(
p_playlist
->
i_size
&&
p_playlist
->
i_enabled
)
...
...
@@ -761,7 +761,7 @@ void Interface::OnPlayStream( void )
vlc_value_t
state
;
input_thread_t
*
p_input
=
(
input_thread_t
*
)
vlc_object_find
(
p
I
ntf
,
VLC_OBJECT_INPUT
,
FIND_ANYWHERE
);
vlc_object_find
(
p
_i
ntf
,
VLC_OBJECT_INPUT
,
FIND_ANYWHERE
);
if
(
p_input
==
NULL
)
{
...
...
@@ -833,7 +833,7 @@ void Interface::OnVideoOnTop( void )
vlc_value_t
val
;
vout_thread_t
*
p_vout
=
(
vout_thread_t
*
)
vlc_object_find
(
p
I
ntf
,
VLC_OBJECT_VOUT
,
FIND_ANYWHERE
);
vlc_object_find
(
p
_i
ntf
,
VLC_OBJECT_VOUT
,
FIND_ANYWHERE
);
if
(
p_vout
==
NULL
)
return
;
...
...
@@ -848,26 +848,26 @@ void Interface::OnVideoOnTop( void )
void
Interface
::
OnSliderUpdate
(
int
wp
)
{
vlc_mutex_lock
(
&
p
I
ntf
->
change_lock
);
input_thread_t
*
p_input
=
p
I
ntf
->
p_sys
->
p_input
;
vlc_mutex_lock
(
&
p
_i
ntf
->
change_lock
);
input_thread_t
*
p_input
=
p
_i
ntf
->
p_sys
->
p_input
;
int
dwPos
=
SendMessage
(
hwndSlider
,
TBM_GETPOS
,
0
,
0
);
if
(
(
int
)
LOWORD
(
wp
)
==
SB_THUMBPOSITION
||
(
int
)
LOWORD
(
wp
)
==
SB_ENDSCROLL
)
{
if
(
p
I
ntf
->
p_sys
->
i_slider_pos
!=
dwPos
&&
p_input
)
if
(
p
_i
ntf
->
p_sys
->
i_slider_pos
!=
dwPos
&&
p_input
)
{
vlc_value_t
pos
;
pos
.
f_float
=
(
float
)
dwPos
/
(
float
)
SLIDER_MAX_POS
;
var_Set
(
p_input
,
"position"
,
pos
);
}
p
I
ntf
->
p_sys
->
b_slider_free
=
VLC_TRUE
;
p
_i
ntf
->
p_sys
->
b_slider_free
=
VLC_TRUE
;
}
else
{
p
I
ntf
->
p_sys
->
b_slider_free
=
VLC_FALSE
;
p
_i
ntf
->
p_sys
->
b_slider_free
=
VLC_FALSE
;
if
(
p_input
)
{
...
...
@@ -886,7 +886,7 @@ void Interface::OnSliderUpdate( int wp )
}
}
vlc_mutex_unlock
(
&
p
I
ntf
->
change_lock
);
vlc_mutex_unlock
(
&
p
_i
ntf
->
change_lock
);
}
void
Interface
::
OnChange
(
int
wp
)
...
...
@@ -901,7 +901,7 @@ void Interface::OnChange( int wp )
void
Interface
::
Change
(
int
i_volume
)
{
aout_VolumeSet
(
p
I
ntf
,
i_volume
*
AOUT_VOLUME_MAX
/
200
/
2
);
aout_VolumeSet
(
p
_i
ntf
,
i_volume
*
AOUT_VOLUME_MAX
/
200
/
2
);
#if 0
SetToolTip( wxString::Format((wxString)wxU(_("Volume")) + wxT(" %d"),
i_volume ) );
...
...
@@ -911,7 +911,7 @@ void Interface::Change( int i_volume )
void
Interface
::
OnStopStream
(
void
)
{
playlist_t
*
p_playlist
=
(
playlist_t
*
)
vlc_object_find
(
p
I
ntf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
vlc_object_find
(
p
_i
ntf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
if
(
p_playlist
==
NULL
)
return
;
playlist_Stop
(
p_playlist
);
...
...
@@ -922,7 +922,7 @@ void Interface::OnStopStream( void )
void
Interface
::
OnPrevStream
(
void
)
{
playlist_t
*
p_playlist
=
(
playlist_t
*
)
vlc_object_find
(
p
I
ntf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
vlc_object_find
(
p
_i
ntf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
if
(
p_playlist
==
NULL
)
return
;
playlist_Prev
(
p_playlist
);
...
...
@@ -932,7 +932,7 @@ void Interface::OnPrevStream( void )
void
Interface
::
OnNextStream
(
void
)
{
playlist_t
*
p_playlist
=
(
playlist_t
*
)
vlc_object_find
(
p
I
ntf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
vlc_object_find
(
p
_i
ntf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
if
(
p_playlist
==
NULL
)
return
;
playlist_Next
(
p_playlist
);
...
...
@@ -942,7 +942,7 @@ void Interface::OnNextStream( void )
void
Interface
::
OnSlowStream
(
void
)
{
input_thread_t
*
p_input
=
(
input_thread_t
*
)
vlc_object_find
(
p
I
ntf
,
VLC_OBJECT_INPUT
,
FIND_ANYWHERE
);
vlc_object_find
(
p
_i
ntf
,
VLC_OBJECT_INPUT
,
FIND_ANYWHERE
);
if
(
p_input
==
NULL
)
return
;
...
...
@@ -954,7 +954,7 @@ void Interface::OnSlowStream( void )
void
Interface
::
OnFastStream
(
void
)
{
input_thread_t
*
p_input
=
(
input_thread_t
*
)
vlc_object_find
(
p
I
ntf
,
VLC_OBJECT_INPUT
,
FIND_ANYWHERE
);
vlc_object_find
(
p
_i
ntf
,
VLC_OBJECT_INPUT
,
FIND_ANYWHERE
);
if
(
p_input
==
NULL
)
return
;
...
...
modules/gui/wince/open.cpp
View file @
953d89a9
...
...
@@ -691,7 +691,7 @@ void OpenDialog::OnFileBrowse()
ofn
.
lCustData
=
0L
;
ofn
.
lpfnHook
=
NULL
;
ofn
.
lpTemplateName
=
NULL
;
if
(
GetOpenFile
Name
((
LPOPENFILENAME
)
&
ofn
)
)
if
(
GetOpenFile
(
&
ofn
)
)
{
if
(
_tcschr
(
ofn
.
lpstrFile
,
_T
(
' '
)
)
)
{
...
...
modules/gui/wince/playlist.cpp
View file @
953d89a9
...
...
@@ -735,7 +735,7 @@ void Playlist::OnOpen()
ofn
.
lpfnHook
=
NULL
;
ofn
.
lpTemplateName
=
NULL
;
if
(
GetOpenFile
Name
((
LPOPENFILENAME
)
&
ofn
)
)
if
(
GetOpenFile
(
&
ofn
)
)
{
playlist_Import
(
p_playlist
,
_TOMB
(
ofn
.
lpstrFile
)
);
}
...
...
@@ -826,13 +826,9 @@ void Playlist::OnAddFile( vlc_bool_t b_directory )
ofn
.
lpfnHook
=
NULL
;
ofn
.
lpTemplateName
=
NULL
;
#if 0//def UNDER_CE
if( b_directory ) ofn.Flags |= OFN_PROJECT;
#endif
SHFullScreen
(
GetForegroundWindow
(),
SHFS_HIDESIPBUTTON
);
if
(
GetOpenFile
Name
(
(
LPOPENFILENAME
)
&
ofn
)
)
if
(
GetOpenFile
(
&
ofn
)
)
{
playlist_t
*
p_playlist
=
(
playlist_t
*
)
vlc_object_find
(
p_intf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
...
...
modules/gui/wince/subtitles.cpp
View file @
953d89a9
...
...
@@ -305,7 +305,7 @@ void SubsFileDialog::OnFileBrowse()
ofn
.
lCustData
=
0L
;
ofn
.
lpfnHook
=
NULL
;
ofn
.
lpTemplateName
=
NULL
;
if
(
GetOpenFile
Name
((
LPOPENFILENAME
)
&
ofn
)
)
if
(
GetOpenFile
(
&
ofn
)
)
{
SetWindowText
(
file_combo
,
ofn
.
lpstrFile
);
ComboBox_AddString
(
file_combo
,
ofn
.
lpstrFile
);
...
...
modules/gui/wince/wince.cpp
View file @
953d89a9
...
...
@@ -35,6 +35,9 @@
#include "wince.h"
#include <commctrl.h>
#include <commdlg.h>
/*****************************************************************************
* Local prototypes.
*****************************************************************************/
...
...
@@ -112,6 +115,18 @@ static int Open( vlc_object_t *p_this )
p_intf
->
p_sys
->
b_slider_free
=
1
;
p_intf
->
p_sys
->
i_slider_pos
=
p_intf
->
p_sys
->
i_slider_oldpos
=
0
;
p_intf
->
p_sys
->
GetOpenFile
=
0
;
p_intf
->
p_sys
->
h_gsgetfile_dll
=
LoadLibrary
(
_T
(
"gsgetfile"
)
);
if
(
p_intf
->
p_sys
->
h_gsgetfile_dll
)
{
p_intf
->
p_sys
->
GetOpenFile
=
(
BOOL
(
WINAPI
*
)(
void
*
))
GetProcAddress
(
p_intf
->
p_sys
->
h_gsgetfile_dll
,
_T
(
"gsGetOpenFileName"
)
);
}
if
(
!
p_intf
->
p_sys
->
GetOpenFile
)
p_intf
->
p_sys
->
GetOpenFile
=
(
BOOL
(
WINAPI
*
)(
void
*
))
GetOpenFileName
;
return
VLC_SUCCESS
;
}
...
...
@@ -130,6 +145,9 @@ static void Close( vlc_object_t *p_this )
// Unsuscribe to messages bank
msg_Unsubscribe
(
p_intf
,
p_intf
->
p_sys
->
p_sub
);
if
(
p_intf
->
p_sys
->
h_gsgetfile_dll
)
FreeLibrary
(
p_intf
->
p_sys
->
h_gsgetfile_dll
);
// Destroy structure
free
(
p_intf
->
p_sys
);
}
...
...
modules/gui/wince/wince.h
View file @
953d89a9
...
...
@@ -82,8 +82,14 @@ struct intf_sys_t
vector
<
MenuItemExt
*>
*
p_settings_menu
;
VideoWindow
*
p_video_window
;
/* GetOpenFileName replacement */
BOOL
(
WINAPI
*
GetOpenFile
)(
void
*
);
HMODULE
h_gsgetfile_dll
;
};
#define GetOpenFile(a) p_intf->p_sys->GetOpenFile(a)
/*****************************************************************************
* Prototypes
*****************************************************************************/
...
...
@@ -105,7 +111,9 @@ protected:
HWND
hwndCB
;
// The command bar handle
HINSTANCE
GetInstance
()
const
{
return
hInst
;
}
virtual
LRESULT
WndProc
(
HWND
,
UINT
,
WPARAM
,
LPARAM
)
{};
virtual
LRESULT
WndProc
(
HWND
,
UINT
,
WPARAM
,
LPARAM
)
{
return
0
;
};
intf_thread_t
*
p_intf
;
};
class
FileInfo
;
...
...
@@ -125,7 +133,7 @@ public:
Interface
(){}
~
Interface
(){}
BOOL
InitInstance
(
HINSTANCE
hInstance
,
intf_thread_t
*
_pIntf
);
BOOL
InitInstance
(
HINSTANCE
,
intf_thread_t
*
);
void
TogglePlayButton
(
int
i_playing_status
);
...
...
@@ -165,8 +173,6 @@ protected:
void
OnSlowStream
(
void
);
void
OnFastStream
(
void
);
intf_thread_t
*
pIntf
;
int
i_old_playing_status
;
};
...
...
@@ -182,7 +188,6 @@ protected:
HWND
hwnd_fileinfo
;
// handle to fileinfo window
HWND
hwndTV
;
// handle to tree-view control
intf_thread_t
*
p_intf
;
TCHAR
szFileInfoClassName
[
100
];
// Main window class name
TCHAR
szFileInfoTitle
[
100
];
// Main window name
...
...
@@ -202,8 +207,6 @@ public:
protected:
intf_thread_t
*
p_intf
;
virtual
LRESULT
WndProc
(
HWND
,
UINT
,
WPARAM
,
LPARAM
);
HWND
hListView
;
...
...
@@ -261,8 +264,6 @@ public:
protected:
intf_thread_t
*
p_intf
;
virtual
LRESULT
WndProc
(
HWND
,
UINT
,
WPARAM
,
LPARAM
);
HWND
mrl_box
;
...
...
@@ -328,8 +329,6 @@ public:
protected:
friend
class
OpenDialog
;
intf_thread_t
*
p_intf
;
HWND
file_box
;
HWND
file_combo
;
HWND
browse_button
;
...
...
@@ -368,7 +367,6 @@ protected:
int
i_title_sorted
;
int
i_author_sorted
;
intf_thread_t
*
p_intf
;
HWND
hwndCB
;
// Handle to the command bar (contains menu)
HWND
hwndTB
;
// Handle to the toolbar.
HWND
hListView
;
...
...
@@ -480,8 +478,6 @@ public:
protected:
intf_thread_t
*
p_intf
;
/* Event handlers (these functions should _not_ be virtual) */
void
OnOk
(
void
);
/*void OnCancel( UINT event );
...
...
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