]> git.sesse.net Git - vlc/blob - modules/gui/macosx/interaction.h
* new dialogue type to prompt the user for a string
[vlc] / modules / gui / macosx / interaction.h
1 /*****************************************************************************
2  * interaction.h: Mac OS X interaction dialogs
3  *****************************************************************************
4  * Copyright (C) 2005-2006 the VideoLAN team
5  * $Id$
6  *
7  * Authors: Derk-Jan Hartman <hartman at videolan dot org>
8  *          Felix Kühne <fkuehne at videolan dot org>
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., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
23  *****************************************************************************/
24 #include <vlc/vlc.h>
25 #include <vlc_interaction.h>
26 #include <Cocoa/Cocoa.h>
27
28 /*****************************************************************************
29  * VLCInteraction interface
30  *****************************************************************************/
31
32 @interface VLCInteraction : NSObject
33 {
34     /* progress widget */
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
41     /* authentication dialogue */
42     IBOutlet id o_auth_cancel_btn;
43     IBOutlet id o_auth_description;
44     IBOutlet id o_auth_login_fld;
45     IBOutlet id o_auth_login_txt;
46     IBOutlet id o_auth_ok_btn;
47     IBOutlet id o_auth_pw_fld;
48     IBOutlet id o_auth_pw_txt;
49     IBOutlet id o_auth_title;
50     IBOutlet id o_auth_win;
51
52     /* string input dialogue */
53     IBOutlet id o_input_cancel_btn;
54     IBOutlet id o_input_description;
55     IBOutlet id o_input_fld;
56     IBOutlet id o_input_ok_btn;
57     IBOutlet id o_input_title;
58     IBOutlet id o_input_win;
59
60     interaction_dialog_t * p_dialog;
61     intf_thread_t * p_intf;
62     BOOL nib_interact_loaded;
63 }
64
65 - (IBAction)cancelAndClose:(id)sender;
66 - (IBAction)okayAndClose:(id)sender;
67
68 -(id)initDialog: (interaction_dialog_t *)_p_dialog;
69 -(void)runDialog;
70 -(void)updateDialog;
71 -(void)hideDialog;
72 -(void)destroyDialog;
73
74 @end
75
76 /*****************************************************************************
77  * VLCInteractionList interface
78  *****************************************************************************/
79 @interface VLCInteractionList : NSObject
80 {
81     NSMutableArray *o_interaction_list;
82 }
83
84 -(void)newInteractionEvent: (NSNotification *)o_notification;
85 -(void)addInteraction: (interaction_dialog_t *)p_dialog;
86 -(void)removeInteraction: (VLCInteraction *)p_interaction;
87
88 @end