]> git.sesse.net Git - vlc/blob - modules/gui/macosx/intf.h
* ./modules/gui/macosx/prefs.m: new configuration interface
[vlc] / modules / gui / macosx / intf.h
1 /*****************************************************************************
2  * intf.h: MacOS X interface plugin
3  *****************************************************************************
4  * Copyright (C) 2002 VideoLAN
5  * $Id: intf.h,v 1.3 2002/11/05 03:57:16 jlj Exp $
6  *
7  * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
8  *          Christophe Massiot <massiot@via.ecp.fr>
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version.
14  * 
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, write to the Free Software
22  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
23  *****************************************************************************/
24
25 #include <vlc/vlc.h>
26 #include <vlc/intf.h>
27 #include <vlc/vout.h>
28
29 #include <Cocoa/Cocoa.h>
30
31 /*****************************************************************************
32  * VLCApplication interface 
33  *****************************************************************************/
34 @interface VLCApplication : NSApplication
35 {
36     NSStringEncoding i_encoding;
37     intf_thread_t *p_intf;
38 }
39
40 - (void)initIntlSupport;
41 - (NSString *)localizedString:(char *)psz;
42
43 - (void)setIntf:(intf_thread_t *)p_intf;
44 - (intf_thread_t *)getIntf;
45
46 @end
47
48 #define _NS(s) [NSApp localizedString: _(s)]
49
50 /*****************************************************************************
51  * intf_sys_t: description and status of the interface
52  *****************************************************************************/
53 struct intf_sys_t
54 {
55     NSAutoreleasePool * o_pool;
56     NSPort * o_sendport;
57
58     /* special actions */
59     vlc_bool_t b_loop;
60     vlc_bool_t b_playing;
61     vlc_bool_t b_mute;
62
63     /* menus handlers */
64     vlc_bool_t b_chapter_update;
65     vlc_bool_t b_program_update;
66     vlc_bool_t b_title_update;
67     vlc_bool_t b_audio_update;
68     vlc_bool_t b_spu_update;
69
70     /* The input thread */
71     input_thread_t * p_input;
72
73     /* The messages window */
74     msg_subscription_t * p_sub;
75
76     /* DVD mode */
77     int i_part;
78 };
79
80 /*****************************************************************************
81  * VLCMain interface 
82  *****************************************************************************/
83 @interface VLCMain : NSObject
84 {
85     id o_prefs;                 /* VLCPrefs       */
86
87     IBOutlet id o_window;       /* main window    */
88
89     IBOutlet id o_controls;     /* VLCControls    */
90     IBOutlet id o_playlist;     /* VLCPlaylist    */
91
92     IBOutlet id o_messages;     /* messages tv    */
93     IBOutlet id o_msgs_panel;   /* messages panel */
94     IBOutlet id o_msgs_btn_ok;  /* messages btn   */
95
96     /* main menu */
97
98     IBOutlet id o_mi_about;
99     IBOutlet id o_mi_prefs;
100     IBOutlet id o_mi_hide;
101     IBOutlet id o_mi_hide_others;
102     IBOutlet id o_mi_show_all;
103     IBOutlet id o_mi_quit;
104
105     IBOutlet id o_mu_file;
106     IBOutlet id o_mi_open_file;
107     IBOutlet id o_mi_open_disc;
108     IBOutlet id o_mi_open_net;
109     IBOutlet id o_mi_open_recent;
110     IBOutlet id o_mi_open_recent_cm;
111
112     IBOutlet id o_mu_edit;
113     IBOutlet id o_mi_cut;
114     IBOutlet id o_mi_copy;
115     IBOutlet id o_mi_paste;
116     IBOutlet id o_mi_clear;
117     IBOutlet id o_mi_select_all;
118
119     IBOutlet id o_mu_view;
120     IBOutlet id o_mi_playlist;
121     IBOutlet id o_mi_messages;
122
123     IBOutlet id o_mu_controls;
124     IBOutlet id o_mi_play;
125     IBOutlet id o_mi_pause;
126     IBOutlet id o_mi_stop;
127     IBOutlet id o_mi_faster;
128     IBOutlet id o_mi_slower;
129     IBOutlet id o_mi_previous;
130     IBOutlet id o_mi_next;
131     IBOutlet id o_mi_loop;
132     IBOutlet id o_mi_vol_up;
133     IBOutlet id o_mi_vol_down;
134     IBOutlet id o_mi_mute;
135     IBOutlet id o_mi_fullscreen;
136     IBOutlet id o_mi_deinterlace;
137     IBOutlet id o_mi_program;
138     IBOutlet id o_mi_title;
139     IBOutlet id o_mi_chapter;
140     IBOutlet id o_mi_language;
141     IBOutlet id o_mi_subtitle;
142
143     IBOutlet id o_mu_window;
144     IBOutlet id o_mi_minimize;
145     IBOutlet id o_mi_bring_atf;
146
147     /* dock menu */
148     IBOutlet id o_dmi_play;
149     IBOutlet id o_dmi_pause;
150     IBOutlet id o_dmi_stop;
151
152     id asystm;                  // MacOSXAudioSystem
153 }
154
155 - (void)terminate;
156
157 - (void)manage;
158 - (void)manageMode;
159
160 - (void)setupMenus;
161 - (void)setupLangMenu:(NSMenuItem *)o_mi
162                       es:(es_descriptor_t *)p_es
163                       category:(int)i_cat
164                       selector:(SEL)pf_callback;
165
166 - (IBAction)clearRecentItems:(id)sender;
167 - (void)openRecentItem:(id)sender;
168
169 //- (void)selectAction:(id)sender;
170
171 - (IBAction)viewPreferences:(id)sender;
172
173 @end
174
175 @interface VLCMain (Internal)
176 - (void)handlePortMessage:(NSPortMessage *)o_msg;
177 @end