X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fgui%2Fmacosx%2Fprefs.h;h=4ec4811ecfad00c76e9cf466e98a189470db39cc;hb=6ee1e193fd896ab9a4729fde14f009d9ce629815;hp=e43ad244e17316331cc6f96a81dc9d5274cb2fd1;hpb=75e0ab4dcad2c15c34882ba2b37d56385f1fd5b0;p=vlc diff --git a/modules/gui/macosx/prefs.h b/modules/gui/macosx/prefs.h index e43ad244e1..4ec4811ecf 100644 --- a/modules/gui/macosx/prefs.h +++ b/modules/gui/macosx/prefs.h @@ -1,16 +1,16 @@ /***************************************************************************** - * prefs.h: MacOS X plugin for vlc + * prefs.h: MacOS X module for vlc ***************************************************************************** - * Copyright (C) 2002-2003 VideoLAN - * $Id: prefs.h,v 1.6 2003/05/20 15:23:25 hartman Exp $ + * Copyright (C) 2002-2005 the VideoLAN team + * $Id$ * - * Authors: Jon Lech Johansen + * Authors: Jon Lech Johansen * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -18,17 +18,19 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/ -#define PREFS_WRAP 60 - @interface VLCTreeItem : NSObject { NSString *o_name; + NSString *o_title; + NSString *o_help; int i_object_id; VLCTreeItem *o_parent; NSMutableArray *o_children; + int i_object_category; + NSMutableArray *o_subviews; } + (VLCTreeItem *)rootItem; @@ -36,7 +38,12 @@ - (VLCTreeItem *)childAtIndex:(int)i_index; - (int)getObjectID; - (NSString *)getName; +- (NSString *)getTitle; +- (NSString *)getHelp; - (BOOL)hasPrefs:(NSString *)o_module_name; +- (NSView *)showView:(NSScrollView *)o_prefs_view advancedView:(vlc_bool_t) b_advanced; +- (void)applyChanges; +- (void)resetView; @end @@ -49,8 +56,10 @@ vlc_bool_t b_advanced; VLCTreeItem *o_config_tree; NSView *o_empty_view; - + NSMutableDictionary *o_save_prefs; + IBOutlet id o_prefs_window; + IBOutlet id o_title; IBOutlet id o_tree; IBOutlet id o_prefs_view; IBOutlet id o_save_btn; @@ -59,14 +68,15 @@ IBOutlet id o_advanced_ckb; } ++ (VLCPrefs *)sharedInstance; + - (void)initStrings; +- (void)setTitle: (NSString *) o_title_name; - (void)showPrefs; - (IBAction)savePrefs: (id)sender; - (IBAction)closePrefs: (id)sender; - (IBAction)resetAll: (id)sender; - (IBAction)advancedToggle: (id)sender; -- (void)showViewForID: (int) i_id andName:(NSString *)o_item_name; -- (void)configChanged:(id)o_unknown; @end @@ -76,90 +86,3 @@ } @end - -#define INTF_CONTROL_CONFIG(x) \ -@interface VLC##x : NS##x \ -{ \ - NSString *o_module_name; \ - NSString *o_config_name; \ - int i_config_type; \ -} \ -- (void)setModuleName:(NSString *)_o_module_name; \ -- (void)setConfigName:(NSString *)_o_config_name; \ -- (void)setConfigType:(int)_i_config_type; \ -- (NSString *)moduleName; \ -- (NSString *)configName; \ -- (int)configType; \ -@end - -#define IMPL_CONTROL_CONFIG(x) \ -@implementation VLC##x \ -- (id)init \ -{ \ - self = [super init]; \ - if( self != nil ) \ - { \ - o_module_name = nil; \ - o_config_name = nil; \ - i_config_type = 0; \ - } \ - return( self ); \ -} \ -- (void)dealloc \ -{ \ - if( o_module_name != nil ) \ - { \ - [o_module_name release]; \ - } \ - if( o_config_name != nil ) \ - { \ - [o_config_name release]; \ - } \ - [super dealloc]; \ -} \ -- (void)setModuleName:(NSString *)_o_module_name \ -{ \ - if( o_module_name != nil ) \ - { \ - [o_module_name release]; \ - } \ - o_module_name = [_o_module_name retain]; \ -} \ -- (void)setConfigName:(NSString *)_o_config_name \ -{ \ - if( o_config_name != nil ) \ - { \ - [o_config_name release]; \ - } \ - o_config_name = [_o_config_name retain]; \ -} \ -- (void)setConfigType:(int)_i_config_type \ -{ \ - i_config_type = _i_config_type; \ -} \ -- (NSString *)moduleName \ -{ \ - return( o_module_name ); \ -} \ -- (NSString *)configName \ -{ \ - return( o_config_name ); \ -} \ -- (int)configType \ -{ \ - return( i_config_type ); \ -} \ -@end - -INTF_CONTROL_CONFIG(Button); -INTF_CONTROL_CONFIG(PopUpButton); -INTF_CONTROL_CONFIG(ComboBox); -INTF_CONTROL_CONFIG(TextField); - -#define CONTROL_CONFIG( obj, mname, ctype, cname ) \ - { \ - [obj setModuleName: mname]; \ - [obj setConfigType: ctype]; \ - [obj setConfigName: [NSString stringWithCString: cname]]; \ - } -