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
9bd356e5
Commit
9bd356e5
authored
Jul 23, 2012
by
David Fuhrmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx vout: move setter for window level to vout provider
parent
304a1c0a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
44 deletions
+54
-44
modules/gui/macosx/intf.m
modules/gui/macosx/intf.m
+53
-32
modules/video_output/macosx.m
modules/video_output/macosx.m
+1
-12
No files found.
modules/gui/macosx/intf.m
View file @
9bd356e5
...
@@ -42,6 +42,7 @@
...
@@ -42,6 +42,7 @@
#include <vlc_plugin.h>
#include <vlc_plugin.h>
#include <vlc_aout_intf.h>
#include <vlc_aout_intf.h>
#include <vlc_vout_window.h>
#include <vlc_vout_window.h>
#include <vlc_vout_display.h>
#include <unistd.h>
/* execl() */
#include <unistd.h>
/* execl() */
#import "CompatibilityFixes.h"
#import "CompatibilityFixes.h"
...
@@ -158,25 +159,33 @@ int WindowOpen( vout_window_t *p_wnd, const vout_window_cfg_t *cfg )
...
@@ -158,25 +159,33 @@ int WindowOpen( vout_window_t *p_wnd, const vout_window_cfg_t *cfg )
static
int
WindowControl
(
vout_window_t
*
p_wnd
,
int
i_query
,
va_list
args
)
static
int
WindowControl
(
vout_window_t
*
p_wnd
,
int
i_query
,
va_list
args
)
{
{
/* TODO */
switch
(
i_query
)
if
(
i_query
==
VOUT_WINDOW_SET_STATE
)
{
msg_Dbg
(
p_wnd
,
"WindowControl:VOUT_WINDOW_SET_STATE"
);
case
VOUT_WINDOW_SET_STATE
:
else
if
(
i_query
==
VOUT_WINDOW_SET_SIZE
)
{
unsigned
i_state
=
va_arg
(
args
,
unsigned
);
[[
VLCMain
sharedInstance
]
performSelectorOnMainThread
:
@selector
(
setWindowLevel
:)
withObject
:
[
NSNumber
numberWithUnsignedInt
:
i_state
]
waitUntilDone
:
NO
];
return
VLC_SUCCESS
;
}
case
VOUT_WINDOW_SET_SIZE
:
{
{
unsigned
int
i_width
=
va_arg
(
args
,
unsigned
int
);
unsigned
int
i_width
=
va_arg
(
args
,
unsigned
int
);
unsigned
int
i_height
=
va_arg
(
args
,
unsigned
int
);
unsigned
int
i_height
=
va_arg
(
args
,
unsigned
int
);
[[
VLCMain
sharedInstance
]
setNativeVideoSize
:
NSMakeSize
(
i_width
,
i_height
)];
[[
VLCMain
sharedInstance
]
setNativeVideoSize
:
NSMakeSize
(
i_width
,
i_height
)];
return
VLC_SUCCESS
;
}
}
else
if
(
i_query
==
VOUT_WINDOW_SET_FULLSCREEN
)
case
VOUT_WINDOW_SET_FULLSCREEN
:
{
{
NSAutoreleasePool
*
o_pool
=
[[
NSAutoreleasePool
alloc
]
init
];
NSAutoreleasePool
*
o_pool
=
[[
NSAutoreleasePool
alloc
]
init
];
int
i_full
=
va_arg
(
args
,
int
);
int
i_full
=
va_arg
(
args
,
int
);
[[
VLCMain
sharedInstance
]
performSelectorOnMainThread
:
@selector
(
checkFullscreenChange
:)
withObject
:
[
NSNumber
numberWithInt
:
i_full
]
waitUntilDone
:
NO
];
[[
VLCMain
sharedInstance
]
performSelectorOnMainThread
:
@selector
(
checkFullscreenChange
:)
withObject
:
[
NSNumber
numberWithInt
:
i_full
]
waitUntilDone
:
NO
];
[
o_pool
release
];
[
o_pool
release
];
}
else
msg_Dbg
(
p_wnd
,
"WindowControl: unknown query"
);
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
default:
msg_Warn
(
p_wnd
,
"unsupported control query"
);
return
VLC_EGENERIC
;
}
}
}
void
WindowClose
(
vout_window_t
*
p_wnd
)
void
WindowClose
(
vout_window_t
*
p_wnd
)
...
@@ -1640,6 +1649,33 @@ unsigned int CocoaKeyToVLC( unichar i_key )
...
@@ -1640,6 +1649,33 @@ unsigned int CocoaKeyToVLC( unichar i_key )
[
o_mainmenu
setShuffle
];
[
o_mainmenu
setShuffle
];
}
}
#pragma mark -
#pragma mark Window updater
-
(
void
)
setWindowLevel
:(
NSNumber
*
)
state
{
if
([
state
unsignedIntValue
]
&
VOUT_WINDOW_STATE_ABOVE
)
[[[[
VLCMainWindow
sharedInstance
]
videoView
]
window
]
setLevel
:
NSStatusWindowLevel
];
else
[[[[
VLCMainWindow
sharedInstance
]
videoView
]
window
]
setLevel
:
NSNormalWindowLevel
];
}
-
(
void
)
setActiveVideoPlayback
:(
BOOL
)
b_value
{
b_active_videoplayback
=
b_value
;
if
(
o_mainwindow
)
{
[
o_mainwindow
performSelectorOnMainThread
:
@selector
(
setVideoplayEnabled
)
withObject
:
nil
waitUntilDone
:
YES
];
[
o_mainwindow
performSelectorOnMainThread
:
@selector
(
togglePlaylist
:)
withObject
:
nil
waitUntilDone
:
NO
];
}
}
-
(
void
)
setNativeVideoSize
:(
NSSize
)
size
{
[
o_mainwindow
setNativeVideoSize
:
size
];
}
#pragma mark -
#pragma mark -
#pragma mark Other objects getters
#pragma mark Other objects getters
...
@@ -1753,11 +1789,6 @@ unsigned int CocoaKeyToVLC( unichar i_key )
...
@@ -1753,11 +1789,6 @@ unsigned int CocoaKeyToVLC( unichar i_key )
return
videoView
;
return
videoView
;
}
}
-
(
void
)
setNativeVideoSize
:(
NSSize
)
size
{
[
o_mainwindow
setNativeVideoSize
:
size
];
}
-
(
id
)
embeddedList
-
(
id
)
embeddedList
{
{
if
(
o_embedded_list
)
if
(
o_embedded_list
)
...
@@ -1787,16 +1818,6 @@ unsigned int CocoaKeyToVLC( unichar i_key )
...
@@ -1787,16 +1818,6 @@ unsigned int CocoaKeyToVLC( unichar i_key )
return
o_remote
;
return
o_remote
;
}
}
-
(
void
)
setActiveVideoPlayback
:(
BOOL
)
b_value
{
b_active_videoplayback
=
b_value
;
if
(
o_mainwindow
)
{
[
o_mainwindow
performSelectorOnMainThread
:
@selector
(
setVideoplayEnabled
)
withObject
:
nil
waitUntilDone
:
YES
];
[
o_mainwindow
performSelectorOnMainThread
:
@selector
(
togglePlaylist
:)
withObject
:
nil
waitUntilDone
:
NO
];
}
}
-
(
BOOL
)
activeVideoPlayback
-
(
BOOL
)
activeVideoPlayback
{
{
return
b_active_videoplayback
;
return
b_active_videoplayback
;
...
...
modules/video_output/macosx.m
View file @
9bd356e5
...
@@ -341,11 +341,8 @@ static int Control (vout_display_t *vd, int query, va_list ap)
...
@@ -341,11 +341,8 @@ static int Control (vout_display_t *vd, int query, va_list ap)
}
}
case
VOUT_DISPLAY_CHANGE_WINDOW_STATE
:
case
VOUT_DISPLAY_CHANGE_WINDOW_STATE
:
{
{
NSAutoreleasePool
*
o_pool
=
[[
NSAutoreleasePool
alloc
]
init
];
unsigned
state
=
va_arg
(
ap
,
unsigned
);
unsigned
state
=
va_arg
(
ap
,
unsigned
);
[
sys
->
glView
performSelectorOnMainThread
:
@selector
(
setWindowLevel
:)
withObject
:
[
NSNumber
numberWithUnsignedInt
:
state
]
waitUntilDone
:
NO
];
return
vout_window_SetState
(
sys
->
embed
,
state
);
[
o_pool
release
];
return
VLC_SUCCESS
;
}
}
case
VOUT_DISPLAY_CHANGE_DISPLAY_FILLED
:
case
VOUT_DISPLAY_CHANGE_DISPLAY_FILLED
:
case
VOUT_DISPLAY_CHANGE_ZOOM
:
case
VOUT_DISPLAY_CHANGE_ZOOM
:
...
@@ -717,14 +714,6 @@ static void OpenglSwap (vlc_gl_t *gl)
...
@@ -717,14 +714,6 @@ static void OpenglSwap (vlc_gl_t *gl)
return
YES
;
return
YES
;
}
}
-
(
void
)
setWindowLevel
:(
NSNumber
*
)
state
{
if
([
state
unsignedIntValue
]
&
VOUT_WINDOW_STATE_ABOVE
)
[[
self
window
]
setLevel
:
NSStatusWindowLevel
];
else
[[
self
window
]
setLevel
:
NSNormalWindowLevel
];
}
#pragma mark -
#pragma mark -
#pragma mark Mouse handling
#pragma mark Mouse handling
...
...
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