1 /* xscreensaver, Copyright (c) 2006-2013 Jamie Zawinski <jwz@jwz.org> 2 * 3 * Permission to use, copy, modify, distribute, and sell this software and its 4 * documentation for any purpose is hereby granted without fee, provided that 5 * the above copyright notice appear in all copies and that both that 6 * copyright notice and this permission notice appear in supporting 7 * documentation. No representations are made about the suitability of this 8 * software for any purpose. It is provided "as is" without express or 9 * implied warranty. 10 * 11 * This is a subclass of NSSlider that is flipped horizontally: 12 * the high value is on the left and the low value is on the right. 13 */ 14 15 #ifdef USE_IPHONE 16 # import <UIKit/UIKit.h> 17 # define NSSlider UISlider 18 # define NSRect CGRect 19 # define minValue minimumValue 20 # define maxValue maximumValue 21 #else 22 # import <Cocoa/Cocoa.h> 23 #endif 24 25 @interface InvertedSlider : NSSlider 26 { 27 BOOL inverted; 28 BOOL integers; 29 } 30 31 - (id) initWithFrame:(NSRect)r inverted:(BOOL)_inv integers:(BOOL)_int; 32 33 # ifdef USE_IPHONE 34 - (double) transformedValue; 35 - (void) setTransformedValue:(double)v; 36 # endif 37 38 @end 39