1 /*****************************************************************************
2 * coredialogs.h: Mac OS X Core Dialogs
3 *****************************************************************************
4 * Copyright (C) 2005-2012 VLC authors and VideoLAN
7 * Authors: Derk-Jan Hartman <hartman at videolan dot org>
8 * Felix Paul 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 *****************************************************************************/
24 #import <vlc_common.h>
25 #import <vlc_dialog.h>
26 #import <Cocoa/Cocoa.h>
29 /*****************************************************************************
30 * VLCErrorPanel interface
31 *****************************************************************************/
33 @interface VLCErrorPanel : NSObject
36 IBOutlet id o_cleanup_button;
37 IBOutlet id o_error_table;
38 IBOutlet id o_messages_btn;
40 NSMutableArray * o_errors;
41 NSMutableArray * o_icons;
45 - (IBAction)cleanupTable:(id)sender;
46 - (IBAction)showMessages:(id)sender;
49 -(void)addError: (NSString *)o_error withMsg:(NSString *)o_msg;
53 /*****************************************************************************
54 * VLCCoreDialogProvider interface
55 *****************************************************************************/
56 @interface VLCCoreDialogProvider : NSObject
58 VLCErrorPanel *o_error_panel;
60 /* authentication dialogue */
61 IBOutlet id o_auth_cancel_btn;
62 IBOutlet id o_auth_description_txt;
63 IBOutlet id o_auth_login_fld;
64 IBOutlet id o_auth_login_txt;
65 IBOutlet id o_auth_ok_btn;
66 IBOutlet id o_auth_pw_fld;
67 IBOutlet id o_auth_pw_txt;
68 IBOutlet id o_auth_title_txt;
69 IBOutlet id o_auth_win;
71 /* progress dialogue */
72 IBOutlet NSProgressIndicator * o_prog_bar;
73 IBOutlet id o_prog_cancel_btn;
74 IBOutlet id o_prog_description_txt;
75 IBOutlet id o_prog_title_txt;
76 IBOutlet id o_prog_win;
77 BOOL b_progress_cancelled;
79 + (VLCCoreDialogProvider *)sharedInstance;
81 -(void)performEventWithObject: (NSValue *)o_value ofType: (const char*)type;
83 -(void)showFatalDialog: (NSValue *)o_value;
84 -(void)showFatalWaitDialog: (NSValue *)o_value;
85 -(void)showQuestionDialog: (NSValue *)o_value;
87 -(void)showLoginDialog: (NSValue *)o_value;
88 -(IBAction)loginDialogAction:(id)sender;
90 -(void)showProgressDialogOnMainThread: (NSValue *)o_value;
91 -(void)showProgressDialog: (NSValue *)o_value;
92 -(IBAction)progDialogAction:(id)sender;
93 -(BOOL)progressCancelled;
94 -(void)updateProgressPanelWithText: (NSString *)string andNumber: (double)d_number;
95 -(void)destroyProgressPanel;