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
6837b438
Commit
6837b438
authored
Mar 31, 2008
by
Faustino Osuna
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
VLCKit.framework: Update documentation, clean up whitespace, reorganize code, and remove dead code.
parent
f87ebe5b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
15 deletions
+15
-15
projects/macosx/framework/Sources/VLCVideoView.m
projects/macosx/framework/Sources/VLCVideoView.m
+15
-15
No files found.
projects/macosx/framework/Sources/VLCVideoView.m
View file @
6837b438
/*****************************************************************************
/*****************************************************************************
* VLCVideoView.
h: VLC
.framework VLCVideoView implementation
* VLCVideoView.
m: VLCKit
.framework VLCVideoView implementation
*****************************************************************************
*****************************************************************************
* Copyright (C) 2007 Pierre d'Herbemont
* Copyright (C) 2007 Pierre d'Herbemont
* Copyright (C) 2007 the VideoLAN team
* Copyright (C) 2007 the VideoLAN team
...
@@ -67,6 +67,7 @@
...
@@ -67,6 +67,7 @@
@end
@end
@interface
VLCVideoView
()
@interface
VLCVideoView
()
/* Proeprties */
@property
(
readwrite
)
BOOL
hasVideo
;
@property
(
readwrite
)
BOOL
hasVideo
;
@end
@end
...
@@ -76,16 +77,18 @@
...
@@ -76,16 +77,18 @@
@implementation
VLCVideoView
@implementation
VLCVideoView
/* Initializers */
-
(
id
)
initWithFrame
:(
NSRect
)
rect
-
(
id
)
initWithFrame
:(
NSRect
)
rect
{
{
if
(
self
=
[
super
initWithFrame
:
rect
])
if
(
self
=
[
super
initWithFrame
:
rect
])
{
{
delegate
=
nil
;
self
.
delegate
=
nil
;
[
self
setBackColor
:[
NSColor
blackColor
]];
self
.
backColor
=
[
NSColor
blackColor
];
self
.
fillScreen
=
NO
;
self
.
hasVideo
=
NO
;
[
self
setStretchesVideo
:
NO
];
[
self
setStretchesVideo
:
NO
];
[
self
setAutoresizesSubviews
:
YES
];
[
self
setAutoresizesSubviews
:
YES
];
[
self
setFillScreen
:
NO
];
self
.
hasVideo
=
NO
;
layoutManager
=
[[
VLCVideoLayoutManager
layoutManager
]
retain
];
layoutManager
=
[[
VLCVideoLayoutManager
layoutManager
]
retain
];
}
}
return
self
;
return
self
;
...
@@ -93,12 +96,13 @@
...
@@ -93,12 +96,13 @@
-
(
void
)
dealloc
-
(
void
)
dealloc
{
{
self
.
delegate
=
nil
;
self
.
backColor
=
nil
;
[
layoutManager
release
];
[
layoutManager
release
];
delegate
=
nil
;
[
backColor
release
];
[
super
dealloc
];
[
super
dealloc
];
}
}
/* NSView Overrides */
-
(
void
)
drawRect
:(
NSRect
)
aRect
-
(
void
)
drawRect
:(
NSRect
)
aRect
{
{
[
self
lockFocus
];
[
self
lockFocus
];
...
@@ -112,6 +116,7 @@
...
@@ -112,6 +116,7 @@
return
YES
;
return
YES
;
}
}
/* Properties */
@synthesize
delegate
;
@synthesize
delegate
;
@synthesize
backColor
;
@synthesize
backColor
;
@synthesize
hasVideo
;
@synthesize
hasVideo
;
...
@@ -123,7 +128,7 @@
...
@@ -123,7 +128,7 @@
-
(
void
)
setFillScreen
:(
BOOL
)
fillScreen
-
(
void
)
setFillScreen
:(
BOOL
)
fillScreen
{
{
[
layoutManager
setFillScreenEntirely
:
fillScreen
];
[
(
VLCVideoLayoutManager
*
)
layoutManager
setFillScreenEntirely
:
fillScreen
];
[[
self
layer
]
setNeedsLayout
];
[[
self
layer
]
setNeedsLayout
];
}
}
@end
@end
...
@@ -148,18 +153,13 @@
...
@@ -148,18 +153,13 @@
[
layoutManager
setOriginalVideoSize
:
aLayer
.
bounds
.
size
];
[
layoutManager
setOriginalVideoSize
:
aLayer
.
bounds
.
size
];
[
rootLayer
setLayoutManager
:
layoutManager
];
[
rootLayer
setLayoutManager
:
layoutManager
];
[
rootLayer
insertSublayer
:
aLayer
atIndex
:
0
];
[
rootLayer
insertSublayer
:
aLayer
atIndex
:
0
];
[
self
setNeedsDisplayOnBoundsChange
:
YES
];
[
aLayer
setNeedsLayout
];
[
aLayer
setNeedsDisplay
];
[
rootLayer
setNeedsDisplayOnBoundsChange
:
YES
];
[
rootLayer
setNeedsDisplay
];
[
rootLayer
layoutIfNeeded
];
[
CATransaction
commit
];
[
CATransaction
commit
];
self
.
hasVideo
=
YES
;
self
.
hasVideo
=
YES
;
}
}
-
(
void
)
removeVoutLayer
:(
CALayer
*
)
voutLayer
-
(
void
)
removeVoutLayer
:(
CALayer
*
)
voutLayer
{
{
[
CATransaction
begin
];
[
CATransaction
begin
];
[
voutLayer
removeFromSuperlayer
];
[
voutLayer
removeFromSuperlayer
];
...
...
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