]> git.sesse.net Git - vlc/blob - modules/gui/macosx/controls.h
e077716b354df8d241027575620dca2a097b7f0f
[vlc] / modules / gui / macosx / controls.h
1 /*****************************************************************************
2  * controls.h: MacOS X interface module
3  *****************************************************************************
4  * Copyright (C) 2002-2007 the VideoLAN team
5  * $Id$
6  *
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 Kühne <fkuehne at videolan org>
11  *
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.
16  *
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.
21  *
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  *****************************************************************************/
26
27 #import "fspanel.h"
28
29 /*****************************************************************************
30  * VLCControls interface
31  *****************************************************************************/
32 @interface VLCControls : NSObject
33 {
34     IBOutlet id o_main;
35
36     IBOutlet id o_volumeslider;
37
38     IBOutlet id o_btn_shuffle;
39     IBOutlet id o_btn_addNode;
40     IBOutlet id o_btn_repeat;
41     
42     NSImage * o_repeat_single;
43     NSImage * o_repeat_all;
44     NSImage * o_repeat_off;
45
46     IBOutlet id o_specificTime_cancel_btn;
47     IBOutlet id o_specificTime_enter_fld;
48     IBOutlet id o_specificTime_goTo_lbl;
49     IBOutlet id o_specificTime_ok_btn;
50     IBOutlet id o_specificTime_win;
51     IBOutlet id o_specificTime_sec_lbl;
52     IBOutlet id o_specificTime_stepper;
53     IBOutlet id o_specificTime_mi;
54
55     VLCFSPanel *o_fs_panel;
56 }
57 - (void)controlTintChanged;
58
59 - (IBAction)play:(id)sender;
60 - (IBAction)stop:(id)sender;
61 - (IBAction)faster:(id)sender;
62 - (IBAction)slower:(id)sender;
63
64 - (IBAction)prev:(id)sender;
65 - (IBAction)next:(id)sender;
66 - (IBAction)random:(id)sender;
67 - (IBAction)repeat:(id)sender;
68 - (IBAction)loop:(id)sender;
69 - (IBAction)repeatButtonAction:(id)sender;
70
71 /* the three ugly helpers again */
72 - (void)repeatOne;
73 - (void)repeatAll;
74 - (void)repeatOff;
75 - (void)shuffle;
76
77 - (IBAction)forward:(id)sender;
78 - (IBAction)backward:(id)sender;
79
80 - (id)getVoutView;
81
82 - (IBAction)volumeUp:(id)sender;
83 - (IBAction)volumeDown:(id)sender;
84 - (IBAction)mute:(id)sender;
85 - (IBAction)volumeSliderUpdated:(id)sender;
86
87 - (IBAction)showPosition: (id)sender;
88 - (IBAction)toogleFullscreen:(id)sender;
89 - (BOOL) isFullscreen;
90 - (IBAction)windowAction:(id)sender;
91 - (BOOL)keyEvent:(NSEvent *)o_event;
92 - (void)scrollWheel: (NSEvent *)theEvent;
93
94 - (void)setupVarMenuItem:(NSMenuItem *)o_mi
95                   target:(vlc_object_t *)p_object
96                      var:(const char *)psz_variable
97                 selector:(SEL)pf_callback;
98 - (void)setupVarMenu:(NSMenu *)o_menu
99          forMenuItem: (NSMenuItem *)o_parent
100               target:(vlc_object_t *)p_object
101                  var:(const char *)psz_variable
102             selector:(SEL)pf_callback;
103 - (IBAction)toggleVar:(id)sender;
104 - (int)toggleVarThread:(id)_o_data;
105
106 - (IBAction)goToSpecificTime:(id)sender;
107
108 - (id)getFSPanel;
109
110 @end
111
112 /*****************************************************************************
113  * VLCMenuExt interface
114  *****************************************************************************
115  * This holds our data for autogenerated menus
116  *****************************************************************************/
117 @interface VLCMenuExt : NSObject
118 {
119     char *psz_name;
120     int i_object_id;
121     vlc_value_t value;
122     int i_type;
123 }
124
125 - (id)initWithVar: (const char *)_psz_name 
126            Object: (int)i_id
127             Value: (vlc_value_t)val 
128            ofType: (int)_i_type;
129 - (char *)name;
130 - (int)objectID;
131 - (vlc_value_t)value;
132 - (int)type;
133
134 @end
135
136 /*****************************************************************************
137  * VLCTimeField interface
138  *****************************************************************************
139  * we need the implementation to catch our click-event in the controller window
140  *****************************************************************************/
141
142 @interface VLCTimeField : NSTextField
143 {
144 }
145 @end
146