MacOS: fixes memory management issue. closes #3807
[vlc/solaris.git] / modules / gui / macosx / controls.h
bloba229596d68f6de3e506981b2388c44ffae6d5490
1 /*****************************************************************************
2 * controls.h: MacOS X interface module
3 *****************************************************************************
4 * Copyright (C) 2002-2009 the VideoLAN team
5 * $Id$
7 * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
8 * Christophe Massiot <massiot@via.ecp.fr>
9 * Derk-Jan Hartman <thedj@users.sourceforge.net>
10 * Felix Paul Kühne <fkuehne at videolan org>
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
25 *****************************************************************************/
27 #import "fspanel.h"
29 /*****************************************************************************
30 * VLCControls interface
31 *****************************************************************************/
32 @interface VLCControls : NSObject
34 IBOutlet id o_main;
36 IBOutlet id o_volumeslider;
38 IBOutlet id o_btn_shuffle;
39 IBOutlet id o_btn_addNode;
40 IBOutlet id o_btn_repeat;
41 IBOutlet id o_btn_repeat_embed;
42 IBOutlet id o_btn_shuffle_embed;
44 NSImage * o_repeat_single;
45 NSImage * o_repeat_all;
46 NSImage * o_repeat_off;
48 IBOutlet id o_specificTime_cancel_btn;
49 IBOutlet id o_specificTime_enter_fld;
50 IBOutlet id o_specificTime_goTo_lbl;
51 IBOutlet id o_specificTime_ok_btn;
52 IBOutlet id o_specificTime_win;
53 IBOutlet id o_specificTime_sec_lbl;
54 IBOutlet id o_specificTime_stepper;
55 IBOutlet id o_specificTime_mi;
57 VLCFSPanel *o_fs_panel;
58 BOOL b_lockAspectRatio;
60 - (void)controlTintChanged;
62 - (id)voutView;
63 - (BOOL)aspectRatioIsLocked;
65 - (IBAction)play:(id)sender;
66 - (IBAction)stop:(id)sender;
67 - (IBAction)faster:(id)sender;
68 - (IBAction)slower:(id)sender;
69 - (IBAction)normalSpeed:(id)sender;
71 - (IBAction)prev:(id)sender;
72 - (IBAction)next:(id)sender;
73 - (IBAction)random:(id)sender;
74 - (IBAction)repeat:(id)sender;
75 - (IBAction)loop:(id)sender;
76 - (IBAction)repeatButtonAction:(id)sender;
77 - (IBAction)quitAfterPlayback:(id)sender;
79 /* the three ugly helpers again */
80 - (void)repeatOne;
81 - (void)repeatAll;
82 - (void)repeatOff;
83 - (void)shuffle;
85 - (IBAction)forward:(id)sender;
86 - (IBAction)backward:(id)sender;
88 - (IBAction)volumeUp:(id)sender;
89 - (IBAction)volumeDown:(id)sender;
90 - (IBAction)mute:(id)sender;
91 - (IBAction)volumeSliderUpdated:(id)sender;
93 - (IBAction)showPosition: (id)sender;
94 - (IBAction)toogleFullscreen:(id)sender;
95 - (BOOL)isFullscreen;
96 - (IBAction)windowAction:(id)sender;
98 - (IBAction)telxTransparent:(id)sender;
99 - (IBAction)telxNavLink:(id)sender;
100 - (IBAction)lockVideosAspectRatio:(id)sender;
101 - (IBAction)addSubtitleFile:(id)sender;
103 - (BOOL)keyEvent:(NSEvent *)o_event;
104 - (void)scrollWheel: (NSEvent *)theEvent;
106 - (void)setupVarMenuItem:(NSMenuItem *)o_mi
107 target:(vlc_object_t *)p_object
108 var:(const char *)psz_variable
109 selector:(SEL)pf_callback;
110 - (void)setupVarMenu:(NSMenu *)o_menu
111 forMenuItem: (NSMenuItem *)o_parent
112 target:(vlc_object_t *)p_object
113 var:(const char *)psz_variable
114 selector:(SEL)pf_callback;
115 - (IBAction)toggleVar:(id)sender;
116 - (int)toggleVarThread:(id)_o_data;
118 - (IBAction)goToSpecificTime:(id)sender;
120 - (id)fspanel;
122 @end
124 /*****************************************************************************
125 * VLCAutoGeneratedMenuContent interface
126 *****************************************************************************
127 * This holds our data for autogenerated menus
128 *****************************************************************************/
129 @interface VLCAutoGeneratedMenuContent : NSObject
131 char *psz_name;
132 vlc_object_t * _vlc_object;
133 vlc_value_t value;
134 int i_type;
137 - (id)initWithVariableName: (const char *)name
138 ofObject: (vlc_object_t *)object
139 andValue: (vlc_value_t)value
140 ofType: (int)type;
141 - (const char *)name;
142 - (vlc_value_t)value;
143 - (vlc_object_t *)vlcObject;
144 - (int)type;
146 @end
148 /*****************************************************************************
149 * VLCTimeField interface
150 *****************************************************************************
151 * we need the implementation to catch our click-event in the controller window
152 *****************************************************************************/
154 @interface VLCTimeField : NSTextField
157 @end