summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Pang <athp@users.sourceforge.net>2004-06-19 15:33:20 +0000
committerAndre Pang <athp@users.sourceforge.net>2004-06-19 15:33:20 +0000
commit08218a933e133f0b87b595f3d58ea8e4cb9f74aa (patch)
tree65e8bd204f56568509fec34f95352b69d17d8413
parentf44a5b7a414ecc1e1d07d95f63cafab3bf110a46 (diff)
downloadxine-lib-08218a933e133f0b87b595f3d58ea8e4cb9f74aa.tar.gz
xine-lib-08218a933e133f0b87b595f3d58ea8e4cb9f74aa.tar.bz2
Mac OS X's XineVideoWindow:
Renamed openGLView field to xineView Renamed getGLView to xineView: putting 'get' in front of an accessor method in Cocoa implies that the method gives you a _copy_ of the field, e.g. see NSString's cString method vs its getCString method. Removed displayTexture method, since XineOpenGLView has it CVS patchset: 6707 CVS date: 2004/06/19 15:33:20
-rw-r--r--src/video_out/macosx/video_window.h5
-rw-r--r--src/video_out/macosx/video_window.m24
2 files changed, 10 insertions, 19 deletions
diff --git a/src/video_out/macosx/video_window.h b/src/video_out/macosx/video_window.h
index 54250a971..61602c498 100644
--- a/src/video_out/macosx/video_window.h
+++ b/src/video_out/macosx/video_window.h
@@ -67,12 +67,11 @@ typedef enum {
@interface XineVideoWindow : NSWindow {
int width, height;
BOOL keepAspectRatio;
- XineOpenGLView *openGLView;
+ XineOpenGLView *xineView;
}
- (void) setContentSize: (NSSize) size;
-- (void) displayTexture;
-- (XineOpenGLView *) getGLView;
+- (XineOpenGLView *) xineView;
- (void) fitToScreen;
- (void) setKeepsAspectRatio: (BOOL) i;
- (int) keepsAspectRatio;
diff --git a/src/video_out/macosx/video_window.m b/src/video_out/macosx/video_window.m
index 64ec864b1..165227514 100644
--- a/src/video_out/macosx/video_window.m
+++ b/src/video_out/macosx/video_window.m
@@ -35,7 +35,7 @@ NSString *XineViewDidResizeNotification = @"XineViewDidResizeNotification";
- (void) setContentSize: (NSSize) size {
- [openGLView setViewSizeInMainThread:size];
+ [xineView setViewSizeInMainThread:size];
[super setContentSize: size];
}
@@ -51,33 +51,33 @@ NSString *XineViewDidResizeNotification = @"XineViewDidResizeNotification";
defer: flag
screen: aScreen];
- openGLView = [[XineOpenGLView alloc] initWithFrame:rect];
+ xineView = [[XineOpenGLView alloc] initWithFrame:rect];
/* receive notifications about window resizing from the xine view */
- [openGLView setDelegate:self];
+ [xineView setDelegate:self];
- [self setContentView: openGLView];
+ [self setContentView: xineView];
[self setTitle: @"xine video output"];
keepAspectRatio = NO;
return self;
}
-- (XineOpenGLView *) getGLView {
- return openGLView;
+- (XineOpenGLView *) xineView {
+ return xineView;
}
- (void) fitToScreen {
NSSize size, video_size;
float screen_width, screen_height;
- if ([openGLView isFullScreen])
+ if ([xineView isFullScreen])
return;
screen_width = CGDisplayPixelsWide (kCGDirectMainDisplay);
screen_height = CGDisplayPixelsHigh (kCGDirectMainDisplay) - 40;
- video_size = [openGLView videoSize];
+ video_size = [xineView videoSize];
if ((screen_width / screen_height) > (video_size.width / video_size.height)) {
size.width = video_size.width * (screen_height / video_size.height);
@@ -106,14 +106,6 @@ NSString *XineViewDidResizeNotification = @"XineViewDidResizeNotification";
return keepAspectRatio;
}
-- (void) displayTexture {
- if ([openGLView lockFocusIfCanDraw]) {
- [openGLView drawRect: [openGLView bounds]];
- [openGLView reloadTexture];
- [openGLView unlockFocus];
- }
-}
-
/* Delegate methods */
- (void) xineViewDidResize:(NSNotification *)note {