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
4647e341
Commit
4647e341
authored
Mar 13, 2010
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
legacy OS X intf: restored 1.0 look of the video output window
parent
8b1ab358
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
21 deletions
+32
-21
modules/gui/macosx/embeddedwindow.m
modules/gui/macosx/embeddedwindow.m
+32
-21
No files found.
modules/gui/macosx/embeddedwindow.m
View file @
4647e341
...
...
@@ -36,27 +36,31 @@
/* SetSystemUIMode, ... */
#import <Carbon/Carbon.h>
/*****************************************************************************
* extension to NSWindow's interface to fix compilation warnings
* and let us access this functions properly
* this uses a private Apple-API, but works fine on all current OSX releases
* keep checking for compatiblity with future releases though
*****************************************************************************/
@interface
NSWindow
(
UndocumentedWindowProperties
)
-
(
void
)
setBottomCornerRounded
:
(
BOOL
)
value
;
@end
/*****************************************************************************
* VLCEmbeddedWindow Implementation
*****************************************************************************/
@implementation
VLCEmbeddedWindow
-
(
id
)
initWithContentRect
:(
NSRect
)
contentRect
styleMask
:
(
NSUInteger
)
windowStyle
backing
:(
NSBackingStoreType
)
bufferingType
defer
:(
BOOL
)
deferCreation
{
BOOL
b_useTextured
=
YES
;
if
(
[[
NSWindow
class
]
instancesRespondToSelector
:
@selector
(
setContentBorderThickness
:
forEdge
:
)]
)
{
b_useTextured
=
NO
;
windowStyle
^=
NSTexturedBackgroundWindowMask
;
}
self
=
[
super
initWithContentRect
:
contentRect
styleMask
:
windowStyle
backing
:
bufferingType
defer
:
deferCreation
];
if
(
!
b_useTextured
)
{
[
self
setContentBorderThickness
:
28
.
0
forEdge
:
NSMinYEdge
];
}
return
self
;
}
-
(
void
)
awakeFromNib
{
[
self
setDelegate
:
self
];
[
self
setBottomCornerRounded
:
NO
];
/* button strings */
[
o_btn_backward
setToolTip
:
_NS
(
"Rewind"
)];
...
...
@@ -100,9 +104,13 @@
[
o_btn_fullscreen
setState
:
NO
];
b_fullscreen
=
NO
;
[
self
setMovableByWindowBackground
:
YES
];
[
self
setDelegate
:
self
];
/* Make sure setVisible: returns NO */
[
self
orderOut
:
self
];
//
b_window_is_invisible = YES;
b_window_is_invisible
=
YES
;
videoRatio
=
NSMakeSize
(
0
.,
0
.
);
}
...
...
@@ -112,12 +120,19 @@
if
(
[
o_btn_play
alternateImage
]
==
o_img_play_pressed
)
b_playing
=
YES
;
if
(
[
NSColor
currentControlTint
]
==
NSGraphiteControlTint
)
{
if
(
[
NSColor
currentControlTint
]
==
NSGraphiteControlTint
)
{
o_img_play_pressed
=
[
NSImage
imageNamed
:
@"play_embedded_graphite"
];
o_img_pause_pressed
=
[
NSImage
imageNamed
:
@"pause_embedded_graphite"
];
[
o_btn_backward
setAlternateImage
:
[
NSImage
imageNamed
:
@"skip_previous_embedded_graphite"
]];
[
o_btn_forward
setAlternateImage
:
[
NSImage
imageNamed
:
@"skip_forward_embedded_graphite"
]];
[
o_btn_fullscreen
setAlternateImage
:
[
NSImage
imageNamed
:
@"fullscreen_graphite"
]];
}
else
{
o_img_play_pressed
=
[
NSImage
imageNamed
:
@"play_embedded_blue"
];
o_img_pause_pressed
=
[
NSImage
imageNamed
:
@"pause_embedded_blue"
];
o_img_play_pressed
=
[
NSImage
imageNamed
:
@"play_embedded_blue"
];
o_img_pause_pressed
=
[
NSImage
imageNamed
:
@"pause_embedded_blue"
];
[
o_btn_backward
setAlternateImage
:
[
NSImage
imageNamed
:
@"skip_previous_embedded_blue"
]];
[
o_btn_forward
setAlternateImage
:
[
NSImage
imageNamed
:
@"skip_forward_embedded_blue"
]];
[
o_btn_fullscreen
setAlternateImage
:
[
NSImage
imageNamed
:
@"fullscreen_blue"
]];
}
if
(
b_playing
)
...
...
@@ -213,10 +228,8 @@
-
(
BOOL
)
windowShouldClose
:(
id
)
sender
{
playlist_t
*
p_playlist
=
pl_Get
(
VLCIntf
);
/* Only want to stop playback if video is playing */
if
(
videoRatio
.
height
!=
0
.
&&
videoRatio
.
width
!=
0
.
)
playlist_Stop
(
p_playlist
);
return
YES
;
}
...
...
@@ -455,8 +468,6 @@
[
o_temp_view
setFrame
:[
o_view
frame
]];
[
o_fullscreen_window
setContentView
:
o_view
];
[
o_fullscreen_window
makeKeyAndOrderFront
:
self
];
[
o_fullscreen_window
makeKeyAndOrderFront
:
self
];
[
o_fullscreen_window
orderFront
:
self
animate
:
YES
];
...
...
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