]> git.sesse.net Git - vlc/blob - modules/gui/macosx/intf.h
* ./modules/*: moved plugins to the new tree. Yet untested builds include
[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.1 2002/08/04 17:23:43 sam 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 /*****************************************************************************
26  * VLCApplication interface 
27  *****************************************************************************/
28 @interface VLCApplication : NSApplication
29 {
30     NSStringEncoding i_encoding;
31     intf_thread_t *p_intf;
32 }
33
34 - (void)initIntlSupport;
35 - (NSString *)localizedString:(char *)psz;
36
37 - (void)setIntf:(intf_thread_t *)p_intf;
38 - (intf_thread_t *)getIntf;
39
40 @end
41
42 #define _NS(s) [NSApp localizedString: _(s)]
43
44 /*****************************************************************************
45  * intf_sys_t: description and status of the interface
46  *****************************************************************************/
47 struct intf_sys_t
48 {
49     NSAutoreleasePool * o_pool;
50     NSPort * o_sendport;
51
52     /* special actions */
53     vlc_bool_t b_loop;
54     vlc_bool_t b_playing;
55     vlc_bool_t b_mute;
56
57     /* menus handlers */
58     vlc_bool_t b_chapter_update;
59     vlc_bool_t b_program_update;
60     vlc_bool_t b_title_update;
61     vlc_bool_t b_audio_update;
62     vlc_bool_t b_spu_update;
63
64     /* The input thread */
65     input_thread_t * p_input;
66
67     /* The messages window */
68     msg_subscription_t * p_sub;
69
70     /* DVD mode */
71     int i_part;
72 };
73
74 /*****************************************************************************
75  * VLCMain interface 
76  *****************************************************************************/
77 @interface VLCMain : NSObject
78 {
79     IBOutlet id o_window;       /* main window    */
80
81     IBOutlet id o_controls;     /* VLCControls    */
82     IBOutlet id o_playlist;     /* VLCPlaylist    */
83
84     IBOutlet id o_messages;     /* messages tv    */
85     IBOutlet id o_msgs_panel;   /* messages panel */
86     IBOutlet id o_msgs_btn_ok;  /* messages btn   */
87
88     /* main menu */
89
90     IBOutlet id o_mi_about;
91     IBOutlet id o_mi_hide;
92     IBOutlet id o_mi_hide_others;
93     IBOutlet id o_mi_show_all;
94     IBOutlet id o_mi_quit;
95
96     IBOutlet id o_mu_file;
97     IBOutlet id o_mi_open_file;
98     IBOutlet id o_mi_open_disc;
99     IBOutlet id o_mi_open_net;
100     IBOutlet id o_mi_open_quickly;
101     IBOutlet id o_mi_open_recent;
102     IBOutlet id o_mi_open_recent_cm;
103
104     IBOutlet id o_mu_edit;
105     IBOutlet id o_mi_cut;
106     IBOutlet id o_mi_copy;
107     IBOutlet id o_mi_paste;
108     IBOutlet id o_mi_clear;
109     IBOutlet id o_mi_select_all;
110
111     IBOutlet id o_mu_view;
112     IBOutlet id o_mi_playlist;
113     IBOutlet id o_mi_messages;
114
115     IBOutlet id o_mu_controls;
116     IBOutlet id o_mi_play;
117     IBOutlet id o_mi_pause;
118     IBOutlet id o_mi_stop;
119     IBOutlet id o_mi_faster;
120     IBOutlet id o_mi_slower;
121     IBOutlet id o_mi_previous;
122     IBOutlet id o_mi_next;
123     IBOutlet id o_mi_loop;
124     IBOutlet id o_mi_vol_up;
125     IBOutlet id o_mi_vol_down;
126     IBOutlet id o_mi_mute;
127     IBOutlet id o_mi_fullscreen;
128     IBOutlet id o_mi_deinterlace;
129     IBOutlet id o_mi_program;
130     IBOutlet id o_mi_title;
131     IBOutlet id o_mi_chapter;
132     IBOutlet id o_mi_language;
133     IBOutlet id o_mi_subtitle;
134
135     IBOutlet id o_mu_window;
136     IBOutlet id o_mi_minimize;
137     IBOutlet id o_mi_bring_atf;
138
139     /* dock menu */
140     IBOutlet id o_dmi_play;
141     IBOutlet id o_dmi_pause;
142     IBOutlet id o_dmi_stop;
143 }
144
145 - (void)terminate;
146
147 - (void)manage;
148 - (void)manageMode;
149
150 - (void)setupMenus;
151 - (void)setupLangMenu:(NSMenuItem *)o_mi
152                       es:(es_descriptor_t *)p_es
153                       category:(int)i_cat
154                       selector:(SEL)pf_callback;
155
156 - (IBAction)clearRecentItems:(id)sender;
157 - (void)openRecentItem:(id)sender;
158
159 @end
160
161 @interface VLCMain (Internal)
162 - (void)handlePortMessage:(NSPortMessage *)o_msg;
163 @end