Objective-C2.0.sty (5377B)
1 \usepackage{color} 2 \usepackage{listings} 3 4 %Definition Objective-C 2.0 5 \definecolor{pink} {rgb}{0.67, 0.05, 0.57} % keywords 6 \definecolor{red} {rgb}{0.87, 0.20, 0.00} % strings 7 \definecolor{green} {rgb}{0.00, 0.47, 0.00} % comments 8 \definecolor{violet}{rgb}{0.41, 0.12, 0.61} % classes 9 \definecolor{blue} {rgb}{0.21, 0.00, 0.44} % functions 10 \definecolor{brown} {rgb}{0.39, 0.22, 0.13} % brown 11 12 \lstdefinelanguage{Objective-C 2.0}[Objective]{C} { 13 morekeywords={id, Class, SEL, IMP, BOOL, nil, Nil, NO, YES, 14 oneway, in, out, inout, bycopy, byref, IBOutlet, IBAction, 15 self, super, _cmd, retain, release, readwrite, nonatomic, readonly, autorelease, alloc, new, copy, 16 @required, @optional, 17 @try, @throw, @catch, @finally, 18 @synchronized, @property, @synthesize, @dynamic}, 19 moredelim=[s][color{red}]{@''}{``}, 20 moredelim=[s][color{red}]{<}{>} 21 } 22 23 \lstdefinestyle{Xcode} { 24 language = Objective-C 2.0, 25 basicstyle = \footnotesize\ttfamily, 26 identifierstyle = \color{black}, 27 commentstyle = \color{green}, 28 keywordstyle = \color{pink}, 29 stringstyle = \color{red}, 30 directivestyle = \color{brown}, 31 extendedchars = true, 32 tabsize = 2, 33 showspaces = false, 34 showstringspaces = false, 35 breakautoindent = true, 36 flexiblecolumns = true, 37 keepspaces = true, 38 xleftmargin = 0pt 39 } 40 41 \lstset { 42 style = Xcode, 43 language = Objective-C2.0, 44 tabsize = 2, 45 frame = none, 46 framesep = 1em, 47 columns = flexible, 48 breaklines = true, 49 emph = {ABNewPersonViewController, ABPeoplePickerNavigationController,ABPersonViewController,ABUnknownPersonViewController,AVAudioPlayer,AVAudioRecorder,AVAudioSession,CAAnimation,CAAnimationGroup,CABasicAnimation,CADisplayLink,CAEAGLLayer,CAGradientLayer,CAKeyframeAnimation,CALayer,CAMediaTimingFunction,CAPropertyAnimation,CAReplicatorLayer,CAScrollLayer,CAShapeLayer,CATiledLayer,CATransaction,CATransformLayer,CATransition,CAValueFunction,CLHeading,CLLocation,CLLocationManager,EAAccessory,EAAccessoryManager,EAGLContext,EAGLSharegroup,EASession,GKPeerPickerController,GKSession,GKVoiceChatService,MFMailComposeViewController,MKAnnotationView,MKMapView,MKPinAnnotationView,MKPlacemark,MKReverseGeocoder,MKUserLocation,MPMediaItem,MPMediaItemArtwork,MPMediaItemCollection,MPMediaLibrary,MPMediaPickerController,MPMediaPlaylist,MPMediaPredicate,MPMediaPropertyPredicate,MPMediaQuery,MPMoviePlayerController,MPMusicPlayerController,MPVolumeView,NSArray,NSAssertionHandler,NSAtomicStore,NSAtomicStoreCacheNode,NSAttributeDescription,NSAutoreleasePool,NSBundle,NSCachedURLResponse,NSCalendar,NSCharacterSet,NSCoder,NSComparisonPredicate,NSCompoundPredicate,NSCondition,NSConditionLock,NSCountedSet,NSData,NSDate,NSDateComponents,NSDateFormatter,NSDecimalNumber,NSDecimalNumberHandler,NSDictionary,NSDirectoryEnumerator,NSDistributedNotificationCenter,NSEntityDescription,NSEntityMapping,NSEntityMigrationPolicy,NSEnumerator,NSError,NSException,NSExpression,NSFetchRequest,NSFetchRequestExpression,NSFetchedPropertyDescription,NSFetchedResultsController,NSFileHandle,NSFileManager,NSFormatter,NSHTTPCookie,NSHTTPCookieStorage,NSHTTPURLResponse,NSIndexPath,NSIndexSet,NSInputStream,NSInteger,NSInvocation,NSInvocationOperation,NSKeyedArchiver,NSKeyedUnarchiver,NSLocale,NSLock,NSMachPort,NSManagedObject,NSManagedObjectContext,NSManagedObjectID,NSManagedObjectModel,NSMappingModel,NSMessagePort,NSMethodSignature,NSMigrationManager,NSMutableArray,NSMutableCharacterSet,NSMutableData,NSMutableDictionary,NSMutableIndexSet,NSMutableSet,NSMutableString,NSMutableURLRequest,NSNetService,NSNetServiceBrowser,NSNotification,NSNotificationCenter,NSNotificationQueue,NSNull,NSNumber,NSNumberFormatter,NSObject,NSOperation,NSOperationQueue,NSOutputStream,NSPersistentStore,NSPersistentStoreCoordinator,NSPipe,NSPort,NSPredicate,NSProcessInfo,NSPropertyDescription,NSPropertyListSerialization,NSPropertyMapping,NSProxy,NSRecursiveLock,NSRelationshipDescription,NSRunLoop,NSScanner,NSSet,NSSortDescriptor,NSStream,NSString,NSThread,NSTimeZone,NSTimer,NSURL,NSURLAuthenticationChallenge,NSURLCache,NSURLConnection,NSURLCredential,NSURLCredentialStorage,NSURLProtectionSpace,NSURLProtocol,NSURLRequest,NSURLResponse,NSUndoManager,NSUserDefaults,NSValue,NSValueTransformer,NSXMLParser,NSXMLParserDelegate,SKMutablePayment,SKPayment,SKPaymentQueue,SKPaymentTransaction,SKProduct,SKProductsRequest,SKRequest,UIAcceleration,UIAccelerometer,UIAccessibilityElement,UIActionSheet,UIActivityIndicatorView,UIAlertView,UIAlertViewDelegate,UIApplication,UIApplicationDelegate,UIBarButtonItem,UIBarItem,UIButton,UIColor,UIControl,UIDatePicker,UIDevice,UIEvent,UIFont,UIImage,UIImagePickerController,UIImageView,UILabel,UILocalizedIndexedCollation,UIMenuController,UINavigationBar,UINavigationController,UINavigationItem,UIPageControl,UIPasteboard,UIPickerView,UIProgressView,UIResponder,UIScreen,UIScrollView,UISearchBar,UISearchDisplayController,UISegmentedControl,UISlider,UISwitch,UITabBar,UITabBarController,UITabBarItem,UITableView,UITableViewCell,UITableViewController,UITableViewDelegate,UITextField,UITextView,UIToolbar,UITouch,UIVideoEditorController,UIView,UIViewController,UIWebView,UIWindow}, 50 emphstyle = \color{violet} 51 } 52 53 %Fin de la definition d'Objective-C