1 /*****************************************************************************
2 * vout_window.c: MacOS X plugin for vlc
3 *****************************************************************************
4 * Copyright (C) 2001 VideoLAN
5 * $Id: vout_window.m,v 1.1 2002/05/12 20:56:34 massiot Exp $
7 * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
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.
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.
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., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
22 *****************************************************************************/
24 /*****************************************************************************
26 *****************************************************************************/
27 #import <Cocoa/Cocoa.h>
29 #import "vout_window.h"
31 /*****************************************************************************
32 * VLCWindow implementation
33 *****************************************************************************/
34 @implementation VLCWindow
36 - (void)setWrapper:(Vout_VLCWrapper *)_o_wrapper forVout:(void *)_p_vout
39 o_wrapper = _o_wrapper;
42 - (BOOL)canBecomeKeyWindow
47 - (void)becomeKeyWindow
49 [super becomeKeyWindow];
52 mouseEvent: (MOUSE_NOT_MOVED | MOUSE_LAST_MOVED)
57 - (void)resignKeyWindow
59 [super resignKeyWindow];
62 mouseEvent: (MOUSE_MOVED | MOUSE_NOT_LAST_MOVED)
66 - (void)keyDown:(NSEvent *)o_event
68 if( [o_wrapper keyDown: o_event forVout: p_vout] == NO )
70 [super keyDown: o_event];
74 - (void)mouseMoved:(NSEvent *)o_event
77 mouseEvent: MOUSE_LAST_MOVED
81 - (void)mouseDown:(NSEvent *)o_event
84 mouseEvent: MOUSE_DOWN