1 /*****************************************************************************
2 * interaction.h: Mac OS X interaction dialogs
3 *****************************************************************************
4 * Copyright (C) 2005-2006 the VideoLAN team
7 * Authors: Derk-Jan Hartman <hartman at videolan dot org>
8 * Felix Kühne <fkuehne at videolan dot org>
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.
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.
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., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
23 *****************************************************************************/
25 #include <vlc_interface.h>
26 #include <Cocoa/Cocoa.h>
28 /*****************************************************************************
29 * VLCInteraction interface
30 *****************************************************************************/
32 @interface VLCInteraction : NSObject
34 /* progress dialogue */
35 IBOutlet id o_prog_bar;
36 IBOutlet id o_prog_cancel_btn;
37 IBOutlet id o_prog_description;
38 IBOutlet id o_prog_title;
39 IBOutlet id o_prog_win;
40 IBOutlet id o_prog_timeToGo;
42 /* authentication dialogue */
43 IBOutlet id o_auth_cancel_btn;
44 IBOutlet id o_auth_description;
45 IBOutlet id o_auth_login_fld;
46 IBOutlet id o_auth_login_txt;
47 IBOutlet id o_auth_ok_btn;
48 IBOutlet id o_auth_pw_fld;
49 IBOutlet id o_auth_pw_txt;
50 IBOutlet id o_auth_title;
51 IBOutlet id o_auth_win;
53 /* string input dialogue */
54 IBOutlet id o_input_cancel_btn;
55 IBOutlet id o_input_description;
56 IBOutlet id o_input_fld;
57 IBOutlet id o_input_ok_btn;
58 IBOutlet id o_input_title;
59 IBOutlet id o_input_win;
61 interaction_dialog_t * p_dialog;
62 intf_thread_t * p_intf;
63 NSProgressIndicator * o_mainIntfPgbar;
64 BOOL nib_interact_loaded;
67 - (IBAction)cancelAndClose:(id)sender;
68 - (IBAction)okayAndClose:(id)sender;
69 - (IBAction)cancelDialog:(id)sender;
71 -(id)initDialog: (interaction_dialog_t *)_p_dialog;
79 @interface VLCErrorInteractionPanel : NSObject
82 IBOutlet id o_cleanup_button;
83 IBOutlet id o_error_table;
84 IBOutlet id o_messages_btn;
86 NSMutableArray * o_errors;
87 NSMutableArray * o_icons;
92 BOOL nib_interact_errpanel_loaded;
94 - (IBAction)cleanupTable:(id)sender;
95 - (IBAction)showMessages:(id)sender;
98 -(void)addError: (NSString *)o_error withMsg:(NSString *)o_msg;
99 -(void)addWarning: (NSString *)o_warning withMsg:(NSString *)o_msg;
103 /*****************************************************************************
104 * VLCInteractionList interface
105 *****************************************************************************/
106 @interface VLCInteractionList : NSObject
108 NSMutableArray *o_interaction_list;
109 VLCErrorInteractionPanel *o_error_panel;
112 -(void)newInteractionEvent: (NSNotification *)o_notification;
113 -(void)addInteraction: (interaction_dialog_t *)p_dialog;
114 -(void)removeInteraction: (VLCInteraction *)p_interaction;