1 /*****************************************************************************
2 * prefs.m: MacOS X plugin for vlc
3 *****************************************************************************
4 * Copyright (C) 2002 VideoLAN
5 * $Id: prefs.m,v 1.5 2002/12/30 23:45:21 massiot Exp $
7 * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
22 *****************************************************************************/
24 /*****************************************************************************
26 *****************************************************************************/
27 #include <stdlib.h> /* malloc(), free() */
28 #include <sys/param.h> /* for MAXPATHLEN */
31 #import <Cocoa/Cocoa.h>
39 /*****************************************************************************
40 * VLCPrefs implementation
41 *****************************************************************************/
42 @implementation VLCPrefs
50 p_intf = [NSApp getIntf];
52 o_pref_panels = [[NSMutableDictionary alloc] init];
53 o_toolbars = [[NSMutableDictionary alloc] init];
54 o_scroll_views = [[NSMutableDictionary alloc] init];
55 o_panel_views = [[NSMutableDictionary alloc] init];
56 o_save_prefs = [[NSMutableDictionary alloc] init];
68 #define DIC_REL1(o_dic) \
70 o_e1 = [o_dic objectEnumerator]; \
71 while( (v1 = [o_e1 nextObject]) ) \
75 [o_dic removeAllObjects]; \
79 #define DIC_REL2(o_dic) \
81 o_e2 = [o_dic objectEnumerator]; \
82 while( (v2 = [o_e2 nextObject]) ) \
86 [o_dic removeAllObjects]; \
89 DIC_REL1(o_pref_panels);
91 DIC_REL1(o_scroll_views);
92 DIC_REL2(o_panel_views);
93 DIC_REL1(o_save_prefs);
101 - (BOOL)hasPrefs:(NSString *)o_module_name
105 char *psz_module_name;
108 psz_module_name = (char *)[o_module_name lossyCString];
110 /* look for module */
111 list = vlc_list_find( p_intf, VLC_OBJECT_MODULE, FIND_ANYWHERE );
113 for( i_index = 0; i_index < list.i_count; i_index++ )
115 p_parser = (module_t *)list.p_values[i_index].p_object ;
117 if( !strcmp( p_parser->psz_object_name, psz_module_name ) )
119 BOOL b_has_prefs = p_parser->i_config_items != 0;
120 vlc_list_release( &list );
121 return( b_has_prefs );
125 vlc_list_release( &list );
130 - (void)createPrefPanel:(NSString *)o_module_name
135 module_t *p_parser = NULL;
137 module_config_t *p_item;
138 char *psz_module_name;
141 NSPanel *o_panel; /* panel */
142 NSRect s_panel_rc; /* panel rect */
143 NSView *o_panel_view; /* panel view */
144 NSToolbar *o_toolbar; /* panel toolbar */
145 NSMutableDictionary *o_tb_items; /* panel toolbar items */
146 NSScrollView *o_scroll_view; /* panel scroll view */
147 NSRect s_scroll_rc; /* panel scroll view rect */
148 NSMutableDictionary *o_views; /* panel scroll view docviews */
150 NSRect s_rc; /* rect */
151 NSView *o_view; /* view */
152 NSRect s_vrc; /* view rect */
153 NSButton *o_button; /* button */
154 NSRect s_brc; /* button rect */
155 VLCTextField *o_text_field; /* input field / label */
157 o_panel = [o_pref_panels objectForKey: o_module_name];
161 [o_panel makeKeyAndOrderFront: nil];
165 psz_module_name = (char *)[o_module_name lossyCString];
167 /* Look for the selected module */
168 list = vlc_list_find( p_intf, VLC_OBJECT_MODULE, FIND_ANYWHERE );
170 for( i_index = 0; i_index < list.i_count; i_index++ )
172 p_parser = (module_t *)list.p_values[i_index].p_object ;
175 && !strcmp( psz_module_name, p_parser->psz_object_name ) )
181 if( !p_parser || i_index == list.i_count )
183 vlc_list_release( &list );
187 /* We found it, now we can start building its configuration interface */
189 s_panel_rc = NSMakeRect( 0, 0, 450, 450 );
190 o_panel = [[NSPanel alloc] initWithContentRect: s_panel_rc
191 styleMask: NSTitledWindowMask
192 backing: NSBackingStoreBuffered
194 o_toolbar = [[NSToolbar alloc] initWithIdentifier: o_module_name];
195 [o_panel setTitle: [NSString stringWithFormat: @"%@ (%@)",
196 _NS("Preferences"), o_module_name]];
197 o_panel_view = [o_panel contentView];
199 s_scroll_rc = s_panel_rc;
200 s_scroll_rc.size.height -= 55; s_scroll_rc.origin.y += 55;
201 o_scroll_view = [[NSScrollView alloc] initWithFrame: s_scroll_rc];
202 [o_scroll_views setObject: o_scroll_view forKey: o_module_name];
203 [o_scroll_view setBorderType: NSGrooveBorder];
204 [o_scroll_view setHasVerticalScroller: YES];
205 [o_scroll_view setDrawsBackground: NO];
206 [o_scroll_view setRulersVisible: YES];
207 [o_panel_view addSubview: o_scroll_view];
209 o_tb_items = [[NSMutableDictionary alloc] init];
210 o_views = [[NSMutableDictionary alloc] init];
212 [o_save_prefs setObject: [[NSMutableArray alloc] init]
213 forKey: o_module_name];
215 /* Enumerate config options and add corresponding config boxes */
216 p_item = p_parser->p_config;
223 #define Y_ORIGIN (X_ORIGIN - 10)
225 #define CHECK_VIEW_HEIGHT \
227 float f_new_pos = s_rc.origin.y + s_rc.size.height + X_ORIGIN; \
228 if( f_new_pos > s_vrc.size.height ) \
230 s_vrc.size.height = f_new_pos; \
231 [o_view setFrame: s_vrc]; \
235 #define CONTROL_LABEL( label ) \
237 s_rc.origin.x += s_rc.size.width + 10; \
238 s_rc.size.width = s_vrc.size.width - s_rc.origin.x - X_ORIGIN - 20; \
239 o_text_field = [[NSTextField alloc] initWithFrame: s_rc]; \
240 [o_text_field setDrawsBackground: NO]; \
241 [o_text_field setBordered: NO]; \
242 [o_text_field setEditable: NO]; \
243 [o_text_field setSelectable: NO]; \
244 [o_text_field setStringValue: \
245 [NSApp localizedString: label]]; \
246 [o_view addSubview: [o_text_field autorelease]]; \
249 #define INPUT_FIELD( ctype, cname, label, w, msg, param ) \
251 s_rc.size.height = 25; \
252 s_rc.size.width = w; \
253 s_rc.origin.y += 10; \
255 o_text_field = [[VLCTextField alloc] initWithFrame: s_rc]; \
256 [o_text_field setAlignment: NSRightTextAlignment]; \
257 CONTROL_CONFIG( o_text_field, o_module_name, ctype, cname ); \
258 [o_text_field msg: param]; \
259 [o_view addSubview: [o_text_field autorelease]]; \
260 [[NSNotificationCenter defaultCenter] addObserver: self \
261 selector: @selector(configChanged:) \
262 name: NSControlTextDidChangeNotification \
263 object: o_text_field]; \
264 CONTROL_LABEL( label ); \
265 s_rc.origin.y += s_rc.size.height; \
266 s_rc.origin.x = X_ORIGIN; \
269 #define INPUT_FIELD_INTEGER( name, label, w, param ) \
270 INPUT_FIELD( CONFIG_ITEM_INTEGER, name, label, w, setIntValue, param )
271 #define INPUT_FIELD_FLOAT( name, label, w, param ) \
272 INPUT_FIELD( CONFIG_ITEM_FLOAT, name, label, w, setFloatValue, param )
273 #define INPUT_FIELD_STRING( name, label, w, param ) \
274 INPUT_FIELD( CONFIG_ITEM_STRING, name, label, w, setStringValue, param )
279 switch( p_item->i_type )
282 case CONFIG_HINT_CATEGORY:
286 NSToolbarItem *o_tbi;
288 o_label = [NSApp localizedString: p_item->psz_text];
289 o_tbi = [[NSToolbarItem alloc] initWithItemIdentifier: o_label];
290 [o_tbi setImage: [NSImage imageNamed: @"NSApplicationIcon"]];
291 [o_tbi setLabel: o_label];
292 [o_tbi setTarget: self];
293 [o_tbi setAction: @selector(selectPrefView:)];
295 o_key = [NSString stringWithFormat: @"%02d %@",
297 [o_tb_items setObject: o_tbi forKey: o_key];
299 s_vrc = s_scroll_rc; s_vrc.size.height -= 4;
300 o_view = [[VLCFlippedView alloc] initWithFrame: s_vrc];
301 [o_views setObject: o_view forKey: o_label];
303 s_rc.origin.x = X_ORIGIN;
304 s_rc.origin.y = Y_ORIGIN;
310 [o_scroll_view setDocumentView: o_view];
317 case CONFIG_ITEM_MODULE:
322 NSPopUpButton *o_modules;
323 NSButton *o_btn_select;
324 NSButton *o_btn_configure;
326 #define MODULE_BUTTON( button, title, sel ) \
328 s_brc.size.height = 32; \
329 s_brc.origin.x += s_brc.size.width + 10; \
330 s_brc.size.width = s_crc.size.width - s_brc.origin.x - 10; \
331 button = [[NSButton alloc] initWithFrame: s_brc]; \
332 [button setButtonType: NSMomentaryPushInButton]; \
333 [button setBezelStyle: NSRoundedBezelStyle]; \
334 [button setTitle: title]; \
335 [button setTag: i_module_tag++]; \
336 [button setTarget: self]; \
337 [button setAction: @selector(sel)]; \
338 [o_cview addSubview: [button autorelease]]; \
341 s_rc.size.height = 107;
342 s_rc.size.width = s_vrc.size.width - X_ORIGIN * 2 - 20;
343 s_rc.origin.y += i_module_tag == 3 ? Y_ORIGIN : 20;
347 o_box = [[NSBox alloc] initWithFrame: s_rc];
348 [o_box setTitle: [NSApp localizedString: p_item->psz_text]];
349 [o_view addSubview: [o_box autorelease]];
350 s_rc.origin.y += s_rc.size.height + 10;
351 o_cview = [[VLCFlippedView alloc] initWithFrame: s_rc];
352 [o_box setContentView: [o_cview autorelease]];
353 s_crc = [o_cview bounds];
355 s_brc = NSMakeRect( 5, 10, 200, 30 );
356 o_modules = [[NSPopUpButton alloc] initWithFrame: s_brc];
357 [o_modules setTag: i_module_tag++];
358 [o_modules setTarget: self];
359 [o_modules setAction: @selector(moduleSelected:)];
360 [o_cview addSubview: [o_modules autorelease]];
362 MODULE_BUTTON( o_btn_configure, _NS("Configure"),
365 s_brc = NSMakeRect( 8, s_brc.origin.y + s_brc.size.height + 10,
367 o_text_field = [[VLCTextField alloc] initWithFrame: s_brc];
368 [o_text_field setTag: i_module_tag++];
369 [o_text_field setAlignment: NSLeftTextAlignment];
370 CONTROL_CONFIG( o_text_field, o_module_name,
371 CONFIG_ITEM_MODULE, p_item->psz_name );
372 [[NSNotificationCenter defaultCenter] addObserver: self
373 selector: @selector(configChanged:)
374 name: NSControlTextDidChangeNotification
375 object: o_text_field];
376 [o_cview addSubview: [o_text_field autorelease]];
379 MODULE_BUTTON( o_btn_select, _NS("Select"),
382 [o_modules addItemWithTitle: _NS("None")];
384 /* build a list of available modules */
386 for( i_index = 0; i_index < list.i_count; i_index++ )
388 p_parser = (module_t *)list.p_values[i_index].p_object ;
390 if( !strcmp( p_parser->psz_capability,
393 NSString *o_object_name = [NSString
394 stringWithCString: p_parser->psz_object_name];
395 [o_modules addItemWithTitle: o_object_name];
400 if( p_item->psz_value != NULL )
403 [NSString stringWithCString: p_item->psz_value];
405 [o_text_field setStringValue: o_value];
406 [o_modules selectItemWithTitle: o_value];
407 [o_btn_configure setEnabled: [self hasPrefs: o_value]];
411 [o_modules selectItemWithTitle: _NS("None")];
412 [o_btn_configure setEnabled: NO];
419 case CONFIG_ITEM_STRING:
420 case CONFIG_ITEM_FILE:
423 if( !p_item->ppsz_list )
425 char *psz_value = p_item->psz_value ?
426 p_item->psz_value : "";
428 INPUT_FIELD_STRING( p_item->psz_name, p_item->psz_text, 150,
429 [NSString stringWithCString: psz_value] );
434 VLCComboBox *o_combo_box;
436 s_rc.size.height = 27;
437 s_rc.size.width = 150;
442 o_combo_box = [[VLCComboBox alloc] initWithFrame: s_rc];
443 CONTROL_CONFIG( o_combo_box, o_module_name,
444 CONFIG_ITEM_STRING, p_item->psz_name );
445 [o_view addSubview: [o_combo_box autorelease]];
446 [[NSNotificationCenter defaultCenter] addObserver: self
447 selector: @selector(configChanged:)
448 name: NSControlTextDidChangeNotification
449 object: o_combo_box];
450 [[NSNotificationCenter defaultCenter] addObserver: self
451 selector: @selector(configChanged:)
452 name: NSComboBoxSelectionDidChangeNotification
453 object: o_combo_box];
455 for( i=0; p_item->ppsz_list[i]; i++ )
457 [o_combo_box addItemWithObjectValue:
458 [NSString stringWithCString: p_item->ppsz_list[i]]];
461 CONTROL_LABEL( p_item->psz_text );
463 s_rc.origin.y += s_rc.size.height;
464 s_rc.origin.x = X_ORIGIN;
470 case CONFIG_ITEM_INTEGER:
472 INPUT_FIELD_INTEGER( p_item->psz_name, p_item->psz_text, 70,
477 case CONFIG_ITEM_FLOAT:
479 INPUT_FIELD_FLOAT( p_item->psz_name, p_item->psz_text, 70,
484 case CONFIG_ITEM_BOOL:
486 VLCButton *o_btn_bool;
488 s_rc.size.height = 27;
489 s_rc.size.width = s_vrc.size.width - X_ORIGIN * 2 - 20;
494 o_btn_bool = [[VLCButton alloc] initWithFrame: s_rc];
495 [o_btn_bool setButtonType: NSSwitchButton];
496 [o_btn_bool setIntValue: p_item->i_value];
497 [o_btn_bool setTitle:
498 [NSApp localizedString: p_item->psz_text]];
499 [o_btn_bool setTarget: self];
500 [o_btn_bool setAction: @selector(configChanged:)];
501 CONTROL_CONFIG( o_btn_bool, o_module_name,
502 CONFIG_ITEM_BOOL, p_item->psz_name );
503 [o_view addSubview: [o_btn_bool autorelease]];
505 s_rc.origin.y += s_rc.size.height;
511 #undef INPUT_FIELD_INTEGER
512 #undef INPUT_FIELD_FLOAT
513 #undef INPUT_FIELD_STRING
515 #undef CHECK_VIEW_HEIGHT
520 while( p_item->i_type != CONFIG_HINT_END && p_item++ );
522 vlc_list_release( &list );
524 [o_toolbars setObject: o_tb_items forKey: o_module_name];
525 [o_toolbar setDelegate: self];
526 [o_panel setToolbar: [o_toolbar autorelease]];
528 #define DEF_PANEL_BUTTON( tag, title, sel ) \
530 o_button = [[NSButton alloc] initWithFrame: s_rc]; \
531 [o_button setButtonType: NSMomentaryPushInButton]; \
532 [o_button setBezelStyle: NSRoundedBezelStyle]; \
533 [o_button setAction: @selector(sel)]; \
534 [o_button setTarget: self]; \
535 [o_button setTitle: title]; \
536 [o_button setTag: tag]; \
537 [o_panel_view addSubview: [o_button autorelease]]; \
540 s_rc.origin.y = s_panel_rc.origin.y + 14;
541 s_rc.size.height = 25; s_rc.size.width = 100;
542 s_rc.origin.x = s_panel_rc.size.width - s_rc.size.width - 14;
543 DEF_PANEL_BUTTON( 0, _NS("OK"), clickedCancelOK: );
544 [o_panel setDefaultButtonCell: [o_button cell]];
546 s_rc.origin.x -= s_rc.size.width;
547 DEF_PANEL_BUTTON( 1, _NS("Cancel"), clickedCancelOK: );
548 [o_button setKeyEquivalent: @"\E"];
550 s_rc.origin.x -= s_rc.size.width;
551 DEF_PANEL_BUTTON( 2, _NS("Apply"), clickedApply: );
552 [o_button setEnabled: NO];
554 #undef DEF_PANEL_BUTTON
556 [o_pref_panels setObject: o_panel forKey: o_module_name];
557 [o_panel_views setObject: o_views forKey: o_module_name];
560 [o_panel makeKeyAndOrderFront: nil];
563 - (void)destroyPrefPanel:(id)o_unknown
568 NSMutableArray *o_prefs;
569 NSMutableDictionary *o_dic;
570 NSScrollView *o_scroll_view;
571 NSString *o_module_name;
573 o_module_name = (NSString *)([o_unknown isKindOfClass: [NSTimer class]] ?
574 [o_unknown userInfo] : o_unknown);
576 #define DIC_REL(dic) \
578 o_dic = [dic objectForKey: o_module_name]; \
579 [dic removeObjectForKey: o_module_name]; \
580 o_e1 = [o_dic objectEnumerator]; \
581 while( (v1 = [o_e1 nextObject]) ) \
585 [o_dic removeAllObjects]; \
589 o_panel = [o_pref_panels objectForKey: o_module_name];
590 [o_pref_panels removeObjectForKey: o_module_name];
595 o_scroll_view = [o_scroll_views objectForKey: o_module_name];
596 [o_scroll_views removeObjectForKey: o_module_name];
597 [o_scroll_view release];
599 DIC_REL(o_panel_views);
601 o_prefs = [o_save_prefs objectForKey: o_module_name];
602 [o_save_prefs removeObjectForKey: o_module_name];
603 [o_prefs removeAllObjects];
610 - (void)selectPrefView:(id)sender
613 NSString *o_module_name;
614 NSScrollView *o_scroll_view;
615 NSMutableDictionary *o_views;
617 o_module_name = [[sender toolbar] identifier];
618 o_views = [o_panel_views objectForKey: o_module_name];
619 o_view = [o_views objectForKey: [sender label]];
621 o_scroll_view = [o_scroll_views objectForKey: o_module_name];
622 [o_scroll_view setDocumentView: o_view];
625 - (void)moduleSelected:(id)sender
627 NSButton *o_btn_config;
628 NSString *o_module_name;
629 BOOL b_has_prefs = NO;
631 o_module_name = [sender titleOfSelectedItem];
632 o_btn_config = [[sender superview] viewWithTag: [sender tag] + 1];
634 if( ![o_module_name isEqualToString: _NS("None")] )
636 b_has_prefs = [self hasPrefs: o_module_name];
639 [o_btn_config setEnabled: b_has_prefs];
642 - (void)configureModule:(id)sender
644 NSString *o_module_name;
645 NSPopUpButton *o_modules;
647 o_modules = [[sender superview] viewWithTag: [sender tag] - 1];
648 o_module_name = [o_modules titleOfSelectedItem];
650 [self createPrefPanel: o_module_name];
653 - (void)selectModule:(id)sender
655 NSString *o_module_name;
656 NSPopUpButton *o_modules;
657 NSTextField *o_module;
659 o_module = [[sender superview] viewWithTag: [sender tag] - 1];
660 o_modules = [[sender superview] viewWithTag: [sender tag] - 3];
661 o_module_name = [o_modules titleOfSelectedItem];
663 if( [o_module_name isEqualToString: _NS("None")] )
665 o_module_name = [NSString string];
668 [o_module setStringValue: o_module_name];
669 [self configChanged: o_module];
672 - (void)configChanged:(id)o_unknown
674 id o_vlc_config = [o_unknown isKindOfClass: [NSNotification class]] ?
675 [o_unknown object] : o_unknown;
677 NSString *o_module_name = [o_vlc_config moduleName];
678 NSPanel *o_pref_panel = [o_pref_panels objectForKey: o_module_name];
679 NSMutableArray *o_prefs = [o_save_prefs objectForKey: o_module_name];
681 if( [o_prefs indexOfObjectIdenticalTo: o_vlc_config] == NSNotFound )
683 NSView *o_pref_view = [o_pref_panel contentView];
684 NSButton *o_btn_apply = [o_pref_view viewWithTag: 2];
686 [o_prefs addObject: o_vlc_config];
687 [o_btn_apply setEnabled: YES];
691 - (void)clickedApply:(id)sender
694 NSEnumerator *o_enum;
696 NSView *o_config_view = [sender superview];
697 NSWindow *o_config_panel = [o_config_view window];
698 NSButton *o_btn_apply = [o_config_view viewWithTag: 2];
699 NSString *o_module_name = [[o_config_panel toolbar] identifier];
700 NSMutableArray *o_prefs = [o_save_prefs objectForKey: o_module_name];
702 o_enum = [o_prefs objectEnumerator];
703 while( ( o_vlc_control = [o_enum nextObject] ) )
705 int i_type = [o_vlc_control configType];
706 NSString *o_name = [o_vlc_control configName];
707 char *psz_name = (char *)[o_name lossyCString];
712 case CONFIG_ITEM_MODULE:
713 case CONFIG_ITEM_STRING:
714 case CONFIG_ITEM_FILE:
719 o_value = [o_vlc_control stringValue];
720 psz_value = (char *)[o_value lossyCString];
722 config_PutPsz( p_intf, psz_name,
723 *psz_value ? psz_value : NULL );
727 case CONFIG_ITEM_INTEGER:
728 case CONFIG_ITEM_BOOL:
730 int i_value = [o_vlc_control intValue];
732 config_PutInt( p_intf, psz_name, i_value );
736 case CONFIG_ITEM_FLOAT:
738 float f_value = [o_vlc_control floatValue];
740 config_PutFloat( p_intf, psz_name, f_value );
747 [o_btn_apply setEnabled: NO];
748 [o_prefs removeAllObjects];
750 config_SaveConfigFile( p_intf, NULL );
753 - (void)clickedCancelOK:(id)sender
755 NSWindow *o_pref_panel = [[sender superview] window];
756 NSString *o_module_name = [[o_pref_panel toolbar] identifier];
758 if( [[sender title] isEqualToString: _NS("OK")] )
760 [self clickedApply: sender];
763 [o_pref_panel close];
765 if( [self respondsToSelector: @selector(performSelectorOnMainThread:
766 withObject:waitUntilDone:)] )
768 [self performSelectorOnMainThread: @selector(destroyPrefPanel:)
769 withObject: o_module_name
774 [NSTimer scheduledTimerWithTimeInterval: 0.1
775 target: self selector: @selector(destroyPrefPanel:)
776 userInfo: o_module_name repeats: NO];
782 @implementation VLCPrefs (NSToolbarDelegate)
784 - (NSToolbarItem *)toolbar:(NSToolbar *)o_toolbar
785 itemForItemIdentifier:(NSString *)o_item_id
786 willBeInsertedIntoToolbar:(BOOL)b_flag
788 NSMutableDictionary *o_toolbar_items;
789 NSString *o_module_name = [o_toolbar identifier];
791 o_toolbar_items = [o_toolbars objectForKey: o_module_name];
792 if( o_toolbar_items == nil )
797 return( [o_toolbar_items objectForKey: o_item_id] );
800 - (NSArray *)toolbarAllowedItemIdentifiers:(NSToolbar*)o_toolbar
802 return( [self toolbarDefaultItemIdentifiers: o_toolbar] );
805 - (NSArray *)toolbarDefaultItemIdentifiers:(NSToolbar*)o_toolbar
808 NSMutableDictionary *o_toolbar_items;
809 NSString *o_module_name = [o_toolbar identifier];
811 o_toolbar_items = [o_toolbars objectForKey: o_module_name];
812 if( o_toolbar_items == nil )
817 o_ids = [[o_toolbar_items allKeys]
818 sortedArrayUsingSelector: @selector(compare:)];
825 @implementation VLCFlippedView
834 IMPL_CONTROL_CONFIG(Button);
835 IMPL_CONTROL_CONFIG(ComboBox);
836 IMPL_CONTROL_CONFIG(TextField);