]> git.sesse.net Git - vlc/blob - modules/gui/macosx/controls.h
* implemented the previously committed playmode buttons and fixed the playmode saving
[vlc] / modules / gui / macosx / controls.h
1 /*****************************************************************************
2  * controls.h: MacOS X interface module
3  *****************************************************************************
4  * Copyright (C) 2002-2006 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  *
11  * This program is free software; you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License as published by
13  * the Free Software Foundation; either version 2 of the License, or
14  * (at your option) any later version.
15  * 
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program; if not, write to the Free Software
23  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
24  *****************************************************************************/
25
26 #import "fspanel.h"
27
28 /*****************************************************************************
29  * VLCControls interface 
30  *****************************************************************************/
31 @interface VLCControls : NSObject
32 {
33     IBOutlet id o_main;
34
35     IBOutlet id o_btn_fullscreen;
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     IBOutlet id o_specificTime_cancel_btn;
43     IBOutlet id o_specificTime_enter_fld;
44     IBOutlet id o_specificTime_goTo_lbl;
45     IBOutlet id o_specificTime_ok_btn;
46     IBOutlet id o_specificTime_win;
47     IBOutlet id o_specificTime_sec_lbl;
48     IBOutlet id o_specificTime_stepper;
49     IBOutlet id o_specificTime_mi;
50     
51     VLCFSPanel *o_fs_panel;
52 }
53
54 - (IBAction)play:(id)sender;
55 - (IBAction)stop:(id)sender;
56 - (IBAction)faster:(id)sender;
57 - (IBAction)slower:(id)sender;
58
59 - (IBAction)prev:(id)sender;
60 - (IBAction)next:(id)sender;
61 - (IBAction)random:(id)sender;
62 - (IBAction)repeat:(id)sender;
63 - (IBAction)loop:(id)sender;
64 - (IBAction)repeatButtonAction:(id)sender;
65
66 /* the three ugly helpers again */
67 - (void)repeatOne;
68 - (void)repeatAll;
69 - (void)repeatOff;
70 - (void)shuffle;
71
72 - (IBAction)forward:(id)sender;
73 - (IBAction)backward:(id)sender;
74
75 - (IBAction)volumeUp:(id)sender;
76 - (IBAction)volumeDown:(id)sender;
77 - (IBAction)mute:(id)sender;
78 - (IBAction)volumeSliderUpdated:(id)sender;
79
80 - (IBAction)windowAction:(id)sender;
81 - (BOOL)keyEvent:(NSEvent *)o_event;
82
83 - (void)setupVarMenuItem:(NSMenuItem *)o_mi
84                     target:(vlc_object_t *)p_object
85                     var:(const char *)psz_variable
86                     selector:(SEL)pf_callback;
87 - (void)setupVarMenu:(NSMenu *)o_menu
88                     forMenuItem: (NSMenuItem *)o_parent
89                     target:(vlc_object_t *)p_object
90                     var:(const char *)psz_variable
91                     selector:(SEL)pf_callback;
92 - (IBAction)toggleVar:(id)sender;
93 - (int)toggleVarThread:(id)_o_data;
94
95 - (IBAction)goToSpecificTime:(id)sender;
96
97 - (id)getFSPanel;
98
99 @end
100
101 /*****************************************************************************
102  * VLCMenuExt interface 
103  *****************************************************************************
104  * This holds our data for autogenerated menus
105  *****************************************************************************/
106 @interface VLCMenuExt : NSObject
107 {
108     char *psz_name;
109     int i_object_id;
110     vlc_value_t value;
111     int i_type;
112 }
113
114 - (id)initWithVar: (const char *)_psz_name Object: (int)i_id
115         Value: (vlc_value_t)val ofType: (int)_i_type;
116 - (char *)name;
117 - (int)objectID;
118 - (vlc_value_t)value;
119 - (int)type;
120
121 @end
122
123 /*****************************************************************************
124  * VLCTimeField interface 
125  *****************************************************************************
126  * we need the implementation to catch our click-event in the controller window
127  *****************************************************************************/
128
129 @interface VLCTimeField : NSTextField
130 {
131 }
132 @end
133