]> git.sesse.net Git - vlc/blob - modules/gui/macosx/controls.h
macosx: merge Eric Dudiak's code from GSoC 2008
[vlc] / modules / gui / macosx / controls.h
1 /*****************************************************************************
2  * controls.h: MacOS X interface module
3  *****************************************************************************
4  * Copyright (C) 2002-2009 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 Paul 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     IBOutlet id o_btn_repeat_embed;
42     IBOutlet id o_btn_shuffle_embed;
43     
44     NSImage * o_repeat_single;
45     NSImage * o_repeat_all;
46     NSImage * o_repeat_off;
47
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;
56
57     VLCFSPanel *o_fs_panel;
58 }
59 - (void)controlTintChanged;
60
61 - (id)voutView;
62
63 - (IBAction)play:(id)sender;
64 - (IBAction)stop:(id)sender;
65 - (IBAction)faster:(id)sender;
66 - (IBAction)slower:(id)sender;
67
68 - (IBAction)prev:(id)sender;
69 - (IBAction)next:(id)sender;
70 - (IBAction)random:(id)sender;
71 - (IBAction)repeat:(id)sender;
72 - (IBAction)loop:(id)sender;
73 - (IBAction)repeatButtonAction:(id)sender;
74
75 /* the three ugly helpers again */
76 - (void)repeatOne;
77 - (void)repeatAll;
78 - (void)repeatOff;
79 - (void)shuffle;
80
81 - (IBAction)forward:(id)sender;
82 - (IBAction)backward:(id)sender;
83
84 - (IBAction)volumeUp:(id)sender;
85 - (IBAction)volumeDown:(id)sender;
86 - (IBAction)mute:(id)sender;
87 - (IBAction)volumeSliderUpdated:(id)sender;
88
89 - (IBAction)showPosition: (id)sender;
90 - (IBAction)toogleFullscreen:(id)sender;
91 - (BOOL)isFullscreen;
92 - (IBAction)windowAction:(id)sender;
93
94 - (IBAction)telxTransparent:(id)sender;
95 - (IBAction)telxNavLink:(id)sender;
96 - (IBAction)addSubtitleFile:(id)sender;
97
98 - (BOOL)keyEvent:(NSEvent *)o_event;
99 - (void)scrollWheel: (NSEvent *)theEvent;
100
101 - (void)setupVarMenuItem:(NSMenuItem *)o_mi
102                   target:(vlc_object_t *)p_object
103                      var:(const char *)psz_variable
104                 selector:(SEL)pf_callback;
105 - (void)setupVarMenu:(NSMenu *)o_menu
106          forMenuItem: (NSMenuItem *)o_parent
107               target:(vlc_object_t *)p_object
108                  var:(const char *)psz_variable
109             selector:(SEL)pf_callback;
110 - (IBAction)toggleVar:(id)sender;
111 - (int)toggleVarThread:(id)_o_data;
112
113 - (IBAction)goToSpecificTime:(id)sender;
114
115 - (id)fspanel;
116
117 @end
118
119 /*****************************************************************************
120  * VLCAutoGeneratedMenuContent interface
121  *****************************************************************************
122  * This holds our data for autogenerated menus
123  *****************************************************************************/
124 @interface VLCAutoGeneratedMenuContent : NSObject
125 {
126     char *psz_name;
127     vlc_object_t * _vlc_object;
128     vlc_value_t value;
129     int i_type;
130 }
131
132 - (id)initWithVariableName: (const char *)name 
133                   ofObject: (vlc_object_t *)object
134                   andValue: (vlc_value_t)value 
135                     ofType: (int)type;
136 - (const char *)name;
137 - (vlc_value_t)value;
138 - (vlc_object_t *)vlcObject;
139 - (int)type;
140
141 @end
142
143 /*****************************************************************************
144  * VLCTimeField interface
145  *****************************************************************************
146  * we need the implementation to catch our click-event in the controller window
147  *****************************************************************************/
148
149 @interface VLCTimeField : NSTextField
150 {
151 }
152 @end
153