Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
aa742bd4
Commit
aa742bd4
authored
Sep 14, 2006
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* fix a nasty handling bug and convert all comments to C-style
parent
7a57427b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
13 deletions
+22
-13
modules/gui/macosx/fspanel.m
modules/gui/macosx/fspanel.m
+22
-13
No files found.
modules/gui/macosx/fspanel.m
View file @
aa742bd4
...
...
@@ -26,6 +26,8 @@
* Preamble
*****************************************************************************/
#import "intf.h"
#import "controls.h"
#import "vout.h"
#import "fspanel.h"
#define KEEP_VISIBLE_AFTER_ACTION 4
/* time in half-sec until this panel will hide again after an user's action */
...
...
@@ -34,7 +36,7 @@
* VLCFSPanel
*****************************************************************************/
@implementation
VLCFSPanel
/
/ We override this initializer so we can set the NSBorderlessWindowMask styleMask, and set a few other important settings
/
* We override this initializer so we can set the NSBorderlessWindowMask styleMask, and set a few other important settings */
-
(
id
)
initWithContentRect
:(
NSRect
)
contentRect
styleMask
:(
unsigned
int
)
aStyle
backing
:(
NSBackingStoreType
)
bufferingType
...
...
@@ -44,8 +46,9 @@
[
win
setOpaque
:
NO
];
[
win
setHasShadow
:
NO
];
[
win
setBackgroundColor
:[
NSColor
clearColor
]];
[
win
setLevel
:
NSFloatingWindowLevel
];
// Let's make it sit on top of everything else
[
win
setAlphaValue
:
0
.
2
];
// It'll start out mostly transparent
/* let the window sit on top of everything else and start out completely transparent */
[
win
setLevel
:
NSFloatingWindowLevel
];
[
win
setAlphaValue
:
0
.
0
];
return
win
;
}
...
...
@@ -60,7 +63,7 @@
[
self
mouseExited
:
NULL
];
}
/
/ Windows created with NSBorderlessWindowMask normally can't be key, but we want ours to be
/
* Windows created with NSBorderlessWindowMask normally can't be key, but we want ours to be */
-
(
BOOL
)
canBecomeKeyWindow
{
return
YES
;
...
...
@@ -94,7 +97,7 @@
[[
self
contentView
]
setStreamPos
:
f_pos
setSeconds
:
i_seconds
];
}
/
/ This routine is called repeatedly when the mouse enters the window from outside it.
/
* This routine is called repeatedly when the mouse enters the window from outside it. */
-
(
void
)
focus
:(
NSTimer
*
)
timer
{
if
(
[
self
alphaValue
]
<
1
.
0
)
...
...
@@ -111,7 +114,7 @@
}
}
/
/ This routine is called repeatedly when the mouse exits the window from inside it.
/
* This routine is called repeatedly when the mouse exits the window from inside it */
-
(
void
)
unfocus
:(
NSTimer
*
)
timer
{
if
(
[
self
alphaValue
]
>
0
.
0
)
...
...
@@ -133,13 +136,13 @@
}
}
/
/ If the mouse enters a window, go make sure we fade in
/
* If the mouse enters a window, go make sure we fade in */
-
(
void
)
mouseEntered
:(
NSEvent
*
)
theEvent
{
[
self
fadeIn
];
}
/
/ If the mouse exits a window, go make sure we fade out
/
* If the mouse exits a window, go make sure we fade out */
-
(
void
)
mouseExited
:(
NSEvent
*
)
theEvent
{
/* the user left the window, fade out immediatelly and prevent any timer action */
...
...
@@ -151,6 +154,10 @@
hideAgainTimer
=
NULL
;
}
/* give up our focus, so the vout may show us again without letting the user clicking it */
if
(
[[[[
VLCMain
sharedInstance
]
getControls
]
getVoutView
]
isFullscreen
]
)
[[[[[
VLCMain
sharedInstance
]
getControls
]
getVoutView
]
window
]
makeKeyWindow
];
[
self
fadeOut
];
}
...
...
@@ -168,7 +175,7 @@
-
(
void
)
fadeOut
{
if
((
[
self
alphaValue
]
>
0
.
0
)
&&
!
NSPointInRect
(
[
NSEvent
mouseLocation
],
[
self
frame
]
)
)
if
(
(
[
self
alphaValue
]
>
0
.
0
)
&&
!
NSPointInRect
(
[
NSEvent
mouseLocation
],
[
self
frame
]
)
)
{
if
(
!
[
self
fadeTimer
])
[
self
setFadeTimer
:[
NSTimer
scheduledTimerWithTimeInterval
:
0
.
1
target
:
self
selector
:
@selector
(
unfocus
:
)
userInfo
:
[
NSNumber
numberWithShort
:
0
]
repeats
:
YES
]];
...
...
@@ -218,7 +225,7 @@
}
}
/
/ A getter and setter for our main timer that handles window fading
/
* A getter and setter for our main timer that handles window fading */
-
(
NSTimer
*
)
fadeTimer
{
return
fadeTimer
;
...
...
@@ -293,7 +300,9 @@
addButton
(
o_fast
,
@"FSFastForwardOff.tif"
,
@"FSFastForwardOn.tif"
,
238
,
37
,
faster
);
addButton
(
o_next
,
@"FSGotoEndOff.tif"
,
@"FSGotoEndOn.tif"
,
286
,
37
,
next
);
addButton
(
o_fullscreen
,
@"FSExitOff.tif"
,
@"FSExitOn.tif"
,
382
,
45
,
windowAction
);
// addButton( o_button, @"FSVolumeThumbOff.tif" , @"FSVolumeThumbOn.tif" , 38, 51, something );
/*
addButton( o_button, @"FSVolumeThumbOff.tif" , @"FSVolumeThumbOn.tif" , 38, 51, something );
*/
s_rc
=
[
self
frame
];
s_rc
.
origin
.
x
=
25
;
...
...
@@ -440,7 +449,7 @@ void drawKnobInRect(NSRect knobRect)
void
drawFrameInRect
(
NSRect
frameRect
)
{
/
/ Draw frame
/
* Draw frame */
NSBundle
*
bundle
=
[
NSBundle
mainBundle
];
NSRect
frame
=
frameRect
;
NSRect
image_rect
;
...
...
@@ -452,7 +461,7 @@ void drawFrameInRect(NSRect frameRect)
-
(
void
)
drawRect
:(
NSRect
)
rect
{
/
/ Draw default to make sure the slider behaves correctly
/
* Draw default to make sure the slider behaves correctly */
[[
NSGraphicsContext
currentContext
]
saveGraphicsState
];
NSRectClip
(
NSZeroRect
);
[
super
drawRect
:
rect
];
...
...
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