Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
VLC Browser Plugins
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
VideoLAN
VLC Browser Plugins
Commits
843cea2c
Commit
843cea2c
authored
Jan 15, 2013
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windowed mac plugin: merge NSScreen additions from the minimal macosx module
parent
87590128
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
0 deletions
+36
-0
npapi/vlcplugin_mac.mm
npapi/vlcplugin_mac.mm
+36
-0
No files found.
npapi/vlcplugin_mac.mm
View file @
843cea2c
...
...
@@ -9,6 +9,7 @@
* Jean-Baptiste Kempf <jb@videolan.org>
* James Bates <james.h.bates@gmail.com>
* Pierre d'Herbemont <pdherbemont # videolan.org>
* David Fuhrmann <david dot fuhrmann at googlemail dot com>
*
*
* This program is free software; you can redistribute it and/or modify
...
...
@@ -99,6 +100,12 @@
@end
@interface
NSScreen
(
VLCAdditions
)
-
(
BOOL
)
hasMenuBar
;
-
(
BOOL
)
hasDock
;
-
(
CGDirectDisplayID
)
displayID
;
@end
static
CALayer
*
rootLayer
;
static
VLCPlaybackLayer
*
playbackLayer
;
static
VLCNoMediaLayer
*
noMediaLayer
;
...
...
@@ -736,6 +743,35 @@ static CGImageRef createImageNamed(NSString *name)
@end
@implementation
NSScreen
(
VLCAdditions
)
-
(
BOOL
)
hasMenuBar
{
return
([
self
displayID
]
==
[[[
NSScreen
screens
]
objectAtIndex
:
0
]
displayID
]);
}
-
(
BOOL
)
hasDock
{
NSRect
screen_frame
=
[
self
frame
];
NSRect
screen_visible_frame
=
[
self
visibleFrame
];
CGFloat
f_menu_bar_thickness
=
[
self
hasMenuBar
]
?
[[
NSStatusBar
systemStatusBar
]
thickness
]
:
0.0
;
BOOL
b_found_dock
=
NO
;
if
(
screen_visible_frame
.
size
.
width
<
screen_frame
.
size
.
width
)
b_found_dock
=
YES
;
else
if
(
screen_visible_frame
.
size
.
height
+
f_menu_bar_thickness
<
screen_frame
.
size
.
height
)
b_found_dock
=
YES
;
return
b_found_dock
;
}
-
(
CGDirectDisplayID
)
displayID
{
return
(
CGDirectDisplayID
)[[[
self
deviceDescription
]
objectForKey
:
@"NSScreenNumber"
]
intValue
];
}
@end
@implementation
VLCFullscreenWindow
-
(
id
)
initWithContentRect
:(
NSRect
)
contentRect
...
...
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