diff options
author | Daniel Mack <zonque@users.sourceforge.net> | 2004-06-10 11:54:54 +0000 |
---|---|---|
committer | Daniel Mack <zonque@users.sourceforge.net> | 2004-06-10 11:54:54 +0000 |
commit | 6c08f95b6667c1dd96e3287f8c6a466b6825c6c9 (patch) | |
tree | e278bd39a8a7b07cf0c7bb4a4ae01205faed3abc /src/video_out/macosx/video_window.h | |
parent | 7d61144f3cc52f58978c165ae023fb610aaab9e1 (diff) | |
download | xine-lib-6c08f95b6667c1dd96e3287f8c6a466b6825c6c9.tar.gz xine-lib-6c08f95b6667c1dd96e3287f8c6a466b6825c6c9.tar.bz2 |
- Lots of cleanups and coding style issues
- Added support for fullscreen windows in two modes, one with cropping
(XINE_FULLSCREEN_CROP) and one with adding overscans
(XINE_FULLSCREEEN_OVERSCAN)
- New class methods to make the window resize to it's original dimensions
(setNormalSize) to make it half-sized (setHalfSize), double-sized
(setDoubleSize) or as large as possible (setFitToScreen)
- Support for keeping aspect ration when the user reshapes the window
manually (setKeepsAspectRatio, keepsAspectRatio)
CVS patchset: 6665
CVS date: 2004/06/10 11:54:54
Diffstat (limited to 'src/video_out/macosx/video_window.h')
-rw-r--r-- | src/video_out/macosx/video_window.h | 45 |
1 files changed, 28 insertions, 17 deletions
diff --git a/src/video_out/macosx/video_window.h b/src/video_out/macosx/video_window.h index d37859d93..3089a4d2a 100644 --- a/src/video_out/macosx/video_window.h +++ b/src/video_out/macosx/video_window.h @@ -17,29 +17,33 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: - * */ #include <Cocoa/Cocoa.h> +typedef enum { + XINE_FULLSCREEN_OVERSCAN, + XINE_FULLSCREEN_CROP +} XineVideoWindowFullScreenMode; + + @interface XineOpenGLView : NSOpenGLView { - int width, height; - char *texture_buffer; - unsigned long i_texture; - float f_x; - float f_y; - int initDone; - int isFullScreen; - NSOpenGLContext * opengl_context; - NSOpenGLContext * fullScreenContext; - NSOpenGLContext * currentContext; + int width, height; + char *texture_buffer; + unsigned long i_texture; + int initDone; + int isFullScreen; + XineVideoWindowFullScreenMode fullscreen_mode; + NSOpenGLContext *opengl_context; + NSOpenGLContext *fullScreenContext; + NSOpenGLContext *currentContext; } - (void) drawQuad; - (void) drawRect: (NSRect) rect; -- (void) goFullScreen; +- (void) goFullScreen: (XineVideoWindowFullScreenMode) mode; - (void) exitFullScreen; +- (int) isFullScreen; - (void) reshape; - (void) initTextures; - (void) reloadTexture; @@ -51,14 +55,21 @@ @interface XineVideoWindow : NSWindow { - int width, height; - XineOpenGLView *openGLView; + int width, height; + int keepAspectRatio; + XineOpenGLView *openGLView; } - (void) setContentSize: (NSSize) size; - (void) displayTexture; - (XineOpenGLView *) getGLView; -- (void) goFullScreen; +- (void) goFullScreen: (XineVideoWindowFullScreenMode) mode; - (void) exitFullScreen; - +- (void) setNormalSize; +- (void) setHalfSize; +- (void) setDoubleSize; +- (void) fitToScreen; +- (void) setKeepsAspectRatio: (int) i; +- (int) keepsAspectRatio; @end + |