1 /*
2  * InfoBarCommunicator.h - Definitions of a communication protocol and other data types used for
3  *                         the info bar implementation.
4  *
5  * Mike Lischke <mlischke@sun.com>
6  *
7  * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
8  * This file is dual licensed under LGPL v2.1 and the Scintilla license (http://www.scintilla.org/License.txt).
9  */
10 
11 typedef NS_OPTIONS(NSUInteger, IBDisplay) {
12 	IBShowZoom          = 0x01,
13 	IBShowCaretPosition = 0x02,
14 	IBShowStatusText    = 0x04,
15 	IBShowAll           = 0xFF
16 };
17 
18 /**
19  * The info bar communicator protocol is used for communication between ScintillaView and its
20  * information bar component. Using this protocol decouples any potential info target from the main
21  * ScintillaView implementation. The protocol is used two-way.
22  */
23 
24 typedef NS_ENUM(NSInteger, NotificationType) {
25 	IBNZoomChanged,    // The user selected another zoom value.
26 	IBNCaretChanged,   // The caret in the editor changed.
27 	IBNStatusChanged,  // The application set a new status message.
28 };
29 
30 @protocol InfoBarCommunicator
31 - (void) notify: (NotificationType) type message: (NSString *) message location: (NSPoint) location
32 	  value: (float) value;
33 - (void) setCallback: (id <InfoBarCommunicator>) callback;
34 @end
35 
36