~ubuntu-branches/ubuntu/maverick/vlc/maverick

« back to all changes in this revision

Viewing changes to modules/gui/minimal_macosx/VLCMinimalVoutWindow.m

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2008-09-17 21:56:14 UTC
  • mfrom: (1.1.17 upstream)
  • Revision ID: james.westby@ubuntu.com-20080917215614-tj0vx8xzd57e52t8
Tags: 0.9.2-1ubuntu1
* New Upstream Release, exception granted by
    - dktrkranz, norsetto, Hobbsee (via irc). LP: #270404

Changes done in ubuntu:

* add libxul-dev to build-depends
* make sure that vlc is build against libxul in configure. This doesn't
  change anything in the package, but makes it more robust if building
  in an 'unclean' chroot or when modifying the package.
* debian/control: make Vcs-* fields point to the motumedia branch
* add libx264-dev and libass-dev to build-depends
  LP: #210354, #199870
* actually enable libass support by passing --enable-libass to configure
* enable libdca: add libdca-dev to build depends and --enable-libdca
* install the x264 plugin.

Changes already in the pkg-multimedia branch in debian:

* don't install usr/share/vlc/mozilla in debian/mozilla-plugin-vlc.install  
* new upstream .desktop file now registers flash video mimetype LP: #261567
* add Xb-Npp-Applications to mozilla-plugin-vlc
* remove duplicate entries in debian/vlc-nox.install

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*****************************************************************************
 
2
 * VLCMinimalVoutWindow.m: MacOS X Minimal interface window
 
3
 *****************************************************************************
 
4
 * Copyright (C) 2007 the VideoLAN team
 
5
 * $Id$
 
6
 *
 
7
 * Authors: Pierre d'Herbemont <pdherbemont # videolan.org>
 
8
 *
 
9
 * This program is free software; you can redistribute it and/or modify
 
10
 * it under the terms of the GNU General Public License as published by
 
11
 * the Free Software Foundation; either version 2 of the License, or
 
12
 * (at your option) any later version.
 
13
 *
 
14
 * This program is distributed in the hope that it will be useful,
 
15
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
16
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
17
 * GNU General Public License for more details.
 
18
 *
 
19
 * You should have received a copy of the GNU General Public License
 
20
 * along with this program; if not, write to the Free Software
 
21
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
 
22
 *****************************************************************************/
 
23
 
 
24
/*****************************************************************************
 
25
 * Preamble
 
26
 *****************************************************************************/
 
27
#include "intf.h"
 
28
#include "voutgl.h"
 
29
#include "VLCOpenGLVoutView.h"
 
30
#include "VLCMinimalVoutWindow.h"
 
31
 
 
32
/* SetSystemUIMode, ... */
 
33
#import <QuickTime/QuickTime.h>
 
34
 
 
35
#import <Cocoa/Cocoa.h>
 
36
 
 
37
@implementation VLCMinimalVoutWindow
 
38
- (id)initWithContentRect:(NSRect)contentRect
 
39
{
 
40
    if( self = [super initWithContentRect:contentRect styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO])
 
41
    {
 
42
        initialFrame = contentRect;
 
43
        fullscreen = NO;
 
44
        [self setBackgroundColor:[NSColor blackColor]];
 
45
        [self setHasShadow:YES];
 
46
        [self setMovableByWindowBackground: YES];
 
47
        [self center];
 
48
    }
 
49
    return self;
 
50
}
 
51
 
 
52
/* @protocol VLCOpenGLVoutEmbedding */
 
53
- (void)addVoutSubview:(NSView *)view
 
54
{
 
55
    [view setAutoresizingMask:NSViewHeightSizable|NSViewWidthSizable];
 
56
    [[self contentView] addSubview:view];
 
57
    [view setFrame:[[self contentView] bounds]];
 
58
}
 
59
 
 
60
- (void)removeVoutSubview:(NSView *)view
 
61
{
 
62
    [self close];
 
63
    [self release];
 
64
}
 
65
 
 
66
- (void)enterFullscreen
 
67
{
 
68
    fullscreen = YES;
 
69
    initialFrame = [self frame];
 
70
    SetSystemUIMode( kUIModeAllHidden, kUIOptionAutoShowMenuBar);
 
71
    [self setFrame:[[self screen] frame] display:YES animate:YES];
 
72
}
 
73
 
 
74
- (void)leaveFullscreen
 
75
{
 
76
    fullscreen = NO;
 
77
    SetSystemUIMode( kUIModeNormal, kUIOptionAutoShowMenuBar);
 
78
    [self setFrame:initialFrame display:YES animate:YES];
 
79
}
 
80
 
 
81
- (BOOL)stretchesVideo
 
82
{
 
83
    return NO;
 
84
}
 
85
 
 
86
- (void)setOnTop: (BOOL)ontop
 
87
{
 
88
 
 
89
}
 
90
@end
 
91