Commits

Anonymous committed 0b28276

replaced hand-written protocol definitions with generated ones

  • Participants
  • Parent commits aab365b

Comments (0)

Files changed (8)

File pyobjc/Lib/AddressBook/__init__.py

 from _AddressBook import *
 del _AddressBook, objc
 
-# Define usefull utility methods here
+import protocols  # no need to export these, just register with PyObjC
+
+# Define useful utility methods here

File pyobjc/Lib/AddressBook/protocols.py

+# generated from '/System/Library/Frameworks/AddressBook.framework'
+import objc as _objc
+
+
+ABImageClient = _objc.informal_protocol(
+    "ABImageClient",
+    [
+# (void)consumeImageData:(NSData*)data forTag:(int)tag
+        _objc.selector(
+            None,
+            selector='consumeImageData:forTag:',
+            signature='v@:@i',
+            isRequired=0,
+        ),
+    ]
+)
+

File pyobjc/Lib/AppKit/__init__.py

     return ((p1, p2), (h, w))
 
 
+import protocols  # no need to export these, just register with PyObjC
+
 #
-# (Informal) protocols
+# (informal) protocols eported for b/w compatibility
 #
-# These can be used as (secondary) base-classes when subclassing an 
-# Objective-C class, but won't show up in the inheritance tree.
-#
-# NOTE: This currently lists all protocols in the AppKit, should remove
-# all protocols that are not actually used by user code.
-
-NSAccessibility = _objc.informal_protocol(
-    'NSAccessibility',
-    [
-        _objc.selector(
-            None, 
-            selector='accessibilityActionDescription:',
-            signature='@@:@',
-            isRequired=1
-        ),
-        _objc.selector(
-            None, 
-            selector='accessibilityActionNames',
-            signature='@@:',
-            isRequired=1
-        ),
-        _objc.selector(
-            None, 
-            selector='accessibilityAtributeNames',
-            signature='@@:',
-            isRequired=1
-        ),
-        _objc.selector(
-            None, 
-            selector='accessibilityAttributeValue:',
-            signature='@@:@',
-            isRequired=1
-        ),
-        _objc.selector(
-            None, 
-            selector='accessibilityFocusedUIElement',
-            signature='@@:',
-            isRequired=1
-        ),
-        _objc.selector(
-            None, 
-            selector='accessibilityHitTest:',
-            signature='@@:{_NSPoint=ff}',
-            isRequired=1
-        ),
-        _objc.selector(
-            None, 
-            selector='accessibilityIsAttributeSettable',
-            signature='c@:@',
-            isRequired=1
-        ),
-        _objc.selector(
-            None, 
-            selector='accessibilityIsIgnored',
-            signature='c@:',
-            isRequired=1
-        ),
-        _objc.selector(
-            None, 
-            selector='accessibilityPerformAction:',
-            signature='v@:@',
-            isRequired=1
-        ),
-        _objc.selector(
-            None, 
-            selector='accessibilitySetValue:ForAttribute:',
-            signature='@@:@@',
-            isRequired=1
-        ),
-    ]
-)
-
-NSChangeSpelling = _objc.informal_protocol(
-    'NSChangeSpelling', [
-        _objc.selector(
-            None, 
-            selector='changeSpelling:',
-            signature='v@:@',
-            isRequired=1
-        ),
-    ]
-)
-
-NSColorPickingCustom = _objc.informal_protocol(
-    'NSColorPickingCustom',
-    [
-        _objc.selector(
-            None, 
-            selector='currentMode',
-            signature='i@:',
-            isRequired=1
-        ),
-        _objc.selector(
-            None, 
-            selector='provideNewView:',
-            signature='@@:c',
-            isRequired=1
-        ),
-        _objc.selector(
-            None, 
-            selector='setColor:',
-            signature='v@:@',
-            isRequired=1
-        ),
-        _objc.selector(
-            None, 
-            selector='supportsMode:',
-            signature='c@:i',
-            isRequired=1
-        ),
-    ]
-)
-
-NSColorPickingDefault = _objc.informal_protocol(
-    'NSColorPickingDefault',
-    [
-        _objc.selector(
-            None, 
-            selector='alphaControlAddedOrRemoved:',
-            signature='v@:@',
-            isRequired=1
-        ),
-        _objc.selector(
-            None, 
-            selector='attachColorList:',
-            signature='v@:@',
-            isRequired=1
-        ),
-        _objc.selector(
-            None, 
-            selector='detachColorList:',
-            signature='v@:@',
-            isRequired=1
-        ),
-        _objc.selector(
-            None, 
-            selector='initWithPickerMask:colorPanel:',
-            signature='@@:i@',
-            isRequired=1
-        ),
-        _objc.selector(
-            None, 
-            selector='insertNewButtonImage:in:',
-            signature='@@:@@',
-            isRequired=1
-        ),
-        _objc.selector(
-            None, 
-            selector='provideNewButtonImage',
-            signature='@@:',
-            isRequired=1
-        ),
-        _objc.selector(
-            None, 
-            selector='setMode:',
-            signature='v@:i',
-            isRequired=1
-        ),
-        _objc.selector(
-            None, 
-            selector='viewSizeChanged:',
-            signature='v@:@',
-            isRequired=1
-        ),
-    ]
-)
-
-NSComboBoxCellDataSource = _objc.informal_protocol(
-    'NSComboBoxCellDataSource',
-    [
-        _objc.selector(
-            None, 
-            selector='comboBoxCell:completedString:',
-            signature='@@:@',
-            isRequired=0
-        ),
-        _objc.selector(
-            None, 
-            selector='comboBoxCell:indexOfItemWithStringValue:',
-            signature='I@:@@',
-            isRequired=0
-        ),
-        _objc.selector(
-            None, 
-            selector='comboBoxCell:objectValueForItemAtIndex:',
-            signature='@@:@i',
-            isRequired=1
-        ),
-        _objc.selector(
-            None, 
-            selector='numberOfItemsInComboBoxCell:',
-            signature='i@:@',
-            isRequired=1
-        ),
-    ]
-)
-
-NSComboBoxDataSource = _objc.informal_protocol(
-    'NSComboBoxDataSource',
-    [
-        _objc.selector(
-            None, 
-            selector='comboBox:completedString:',
-            signature='@@:@@',
-            isRequired=0
-        ),
-        _objc.selector(
-            None, 
-            selector='comboBox:indexOfItemWithStringValue:',
-            signature='I@:@@',
-            isRequired=0
-        ),
-        _objc.selector(
-            None, 
-            selector='comboBox:objectValueForItemAtIndex:',
-            signature='@@:@i',
-            isRequired=1
-        ),
-        _objc.selector(
-            None, 
-            selector='numberOfItemsInComboBox:',
-            signature='i@:@',
-            isRequired=1
-        ),
-    ]
-)
-
-NSDraggingDestination = _objc.informal_protocol(
-    'NSDraggingDestination',
-    [
-        _objc.selector(
-            None, 
-            selector='concludeDragOperation:',
-            signature='v@:@',
-            isRequired=0
-        ),
-        _objc.selector(
-            None, 
-            selector='draggingEnded:',
-            signature='v@:@',
-            isRequired=0 # Not implemented yet (10.2)
-        ),
-        _objc.selector(
-            None, 
-            selector='draggingEntered:',
-            signature='I@:@',
-            isRequired=0
-        ),
-        _objc.selector(
-            None, 
-            selector='draggingExited:',
-            signature='v@:@',
-            isRequired=0
-        ),
-        _objc.selector(
-            None, 
-            selector='draggingUpdated:',
-            signature='i@:@',
-            isRequired=0
-        ),
-        _objc.selector(
-            None, 
-            selector='performDragOperation:',
-            signature='c@:@',
-            isRequired=0
-        ),
-        _objc.selector(
-            None, 
-            selector='prepareForDragOperation:',
-            signature='c@:@',
-            isRequired=0
-        ),
-    ]
-)
-
-NSDraggingInfo = _objc.informal_protocol(
-    'NSDraggingInfo',
-    [
-        _objc.selector(
-            None, 
-            selector='draggedImage',
-            signature='@@:',
-            isRequired=1
-        ),
-        _objc.selector(
-            None, 
-            selector='draggedImageLocation',
-            signature='{_NSPoint=ff}@:',
-            isRequired=1
-        ),
-        _objc.selector(
-            None, 
-            selector='draggingDestinationWindow',
-            signature='@@:',
-            isRequired=1
-        ),
-        _objc.selector(
-            None, 
-            selector='draggingLocation',
-            signature='{_NSPoint=ff}@:',
-            isRequired=1
-        ),
-        _objc.selector(
-            None, 
-            selector='draggingPasteboard',
-            signature='@@:',
-            isRequired=1
-        ),
-        _objc.selector(
-            None, 
-            selector='draggingSequenceNumber',
-            signature='i@:',
-            isRequired=1
-        ),
-        _objc.selector(
-            None, 
-            selector='draggingSource',
-            signature='@@:',
-            isRequired=1
-        ),
-        _objc.selector(
-            None, 
-            selector='draggingSourceOperationMask',
-            signature='i@:',
-            isRequired=1
-        ),
-        _objc.selector(
-            None, 
-            selector='namesOfPromisedFilesDroppedAtDestination:',
-            signature='@@:@',
-            isRequired=1
-        ),
-        _objc.selector(
-            None, 
-            selector='slideDraggedImageTo:',
-            signature='v@:{_NSPoint=ff}',
-            isRequired=1
-        ),
-    ]
-)
-
-# Note: Apple's docs fro 'draggingSourceOperationMaskForLocal:' says that that
-# is the only required method in this protocol.
-NSDraggingSource = _objc.informal_protocol(
-    'NSDraggingSource',
-    [
-        _objc.selector(
-            None, 
-            selector='draggedImage:beganAt:',
-            signature='v@:@{_NSPoint=ff}',
-            isRequired=0
-        ),
-        _objc.selector(
-            None, 
-            selector='draggedImage:endedAt:deposited:',
-            signature='v@:@{_NSPoint=ff}c',
-            isRequired=0
-        ),
-        _objc.selector(
-            None, 
-            selector='draggedImage:endedAt:operation:',
-            signature='v@:@{_NSPoint=ff}i',
-            isRequired=0
-        ),
-        _objc.selector(
-            None, 
-            selector='draggedImage:movedTo:',
-            signature='v@:@{_NSPoint=ff}',
-            isRequired=0
-        ),
-        _objc.selector(
-            None, 
-            selector='draggingSourceOperationMaskForLocal:',
-            signature='I@:c',
-            isRequired=1
-        ),
-        _objc.selector(
-            None, 
-            selector='ignoreModifierKeysWhileDragging',
-            signature='c@:',
-            isRequired=0
-        ),
-        _objc.selector(
-            None, 
-            selector='namesOfPromisedFilesDroppedAtDestination:',
-            signature='@@:@',
-            isRequired=0
-        ),
-    ]
-)
-
-NSIgnoreMisspelledWords = _objc.informal_protocol(
-    'NSIgnoreMisspelledWords',
-    [
-        _objc.selector(
-            None, 
-            selector='ignoreSpelling:',
-            signature='v@:@',
-            isRequired=1
-        ),
-    ]
-)
-
-NSInputServerMouseTracker = _objc.informal_protocol(
-    'NSInputServerMouseTracker',
-    [
-        _objc.selector(
-            None, 
-            selector='mouseDownOnCharacterIndex:atCoordinate:withModifier:client:',
-            signature='c@:I{_NSPoint=ff}I@',
-            isRequired=1
-        ),
-        _objc.selector(
-            None, 
-            selector='mouseDraggedOnCharacterIndex:atCoordinate:withModifier:client:',
-            signature='c@:I{_NSPoint=ff}I@',
-            isRequired=1
-        ),
-        _objc.selector(
-            None, 
-            selector='mouseUpOnCharacterIndex:atCoordinate:withModifier:client:',
-            signature='c@:I{_NSPoint=ff}I@',
-            isRequired=1
-        ),
-    ]
-)
-
-
-# TODO: NSInputServiceProvider
-
-NSMenuValidation = _objc.informal_protocol(
-    'NSMenuValidation',
-    [
-        _objc.selector(
-            None, 
-            selector='validateMenuItem:',
-            signature='c@:@',
-            isRequired=1
-        ),
-    ]
-)
-
-NSNibAwakening = _objc.informal_protocol(
-    'NSNibAwakening',
-    [
-        _objc.selector(
-            None, 
-            selector='awakeFromNib',
-            signature='v@:',
-            isRequired=1
-        ),
-    ],
-)
-
-NSOutlineViewDelegate = _objc.informal_protocol(
-    'NSOutlineViewDelegate',
-    [
-# - (void)outlineView:(NSOutlineView *)outlineView willDisplayCell:(id)cell forTableColumn:(NSTableColumn *)tableColumn item:(id)item;
-    _objc.selector(
-    None,
-    selector='outlineView:willDisplayCell:forTableColumn:item:',
-    signature='v@:@@@@',
-    isRequired=0
-    ),
-
-# - (BOOL)outlineView:(NSOutlineView *)outlineView shouldEditTableColumn:(NSTableColumn *)tableColumn item:(id)item;
-    _objc.selector(
-    None,
-    selector='outlineView:shouldEditTableColumn:item:',
-    signature='c@:@@@',
-    isRequired=0
-    ),
-
-# - (BOOL)selectionShouldChangeInOutlineView:(NSOutlineView *)outlineView;
-    _objc.selector(
-    None,
-    selector='selectionShouldChangeInOutlineView:',
-    signature='c@:@',
-    isRequired=0
-    ),
-
-# - (BOOL)outlineView:(NSOutlineView *)outlineView shouldSelectItem:(id)item;
-    _objc.selector(
-    None,
-    selector='outlineView:shouldSelectItem:',
-    signature='c@:@@',
-    isRequired=0
-    ),
-
-# - (BOOL)outlineView:(NSOutlineView *)outlineView shouldSelectTableColumn:(NSTableColumn *)tableColumn;
-    _objc.selector(
-    None,
-    selector='outlineView:shouldSelectTableColumn:',
-    signature='c@:@@',
-    isRequired=0
-    ),
-
-# // NSOutlineView specific
-# - (BOOL)outlineView:(NSOutlineView *)outlineView shouldExpandItem:(id)item;
-    _objc.selector(
-    None,
-    selector='outlineView:shouldExpandItem:',
-    signature='c@:@@',
-    isRequired=0
-    ),
-
-# - (BOOL)outlineView:(NSOutlineView *)outlineView shouldCollapseItem:(id)item;
-    _objc.selector(
-    None,
-    selector='outlineView:shouldCollapseItem:',
-    signature='c@:@@',
-    isRequired=0
-    ),
-
-# - (void)outlineView:(NSOutlineView *)outlineView willDisplayOutlineCell:(id)cell forTableColumn:(NSTableColumn *)tableColumn item:(id)item;
-    _objc.selector(
-    None,
-    selector='outlineView:willDisplayOutlineCell:forTableColumn:item:',
-    signature='v@:@@@@',
-    isRequired=0
-    )
-    ]
-    )
-
-NSOutlineViewDataSource = _objc.informal_protocol(
-    'NSOutlineViewDataSource',
-    [
-        _objc.selector(
-            None, 
-            selector='outlineView:acceptDrop:item:childIndex:',
-            signature='c@@@i',
-            isRequired=0
-        ),
-        _objc.selector(
-            None, 
-            selector='outlineView:child:ofItem:',
-            signature='@@:@i@',
-            isRequired=1
-        ),
-        _objc.selector(
-            None, 
-            selector='outlineView:isItemExpandable:',
-            signature='c@:@@',
-            isRequired=1
-        ),
-        _objc.selector(
-            None, 
-            selector='outlineView:itemForPersistentObject:',
-            signature='@@:@@',
-            isRequired=0
-        ),
-        _objc.selector(
-            None, 
-            selector='outlineView:numberOfChildrenOfItem:',
-            signature='i@:@@',
-            isRequired=1
-        ),
-        _objc.selector(
-            None, 
-            selector='outlineView:objectValueForTableColumn:byItem:',
-            signature='@@:@@@',
-            isRequired=1
-        ),
-        _objc.selector(
-            None, 
-            selector='outlineView:persistentObjectForItem:',
-            signature='@@:@@',
-            isRequired=0
-        ),
-        _objc.selector(
-            None, 
-            selector='outlineView:setObjectValue:forTableColumn:byItem:',
-            signature='v@:@@@@',
-            isRequired=0
-        ),
-        _objc.selector(
-            None, 
-            selector='outlineView:validateDrop:proposedItem:proposedChildIndex:',
-            signature='i@:@@@i',
-            isRequired=0
-        ),
-        _objc.selector(
-            None, 
-            selector='outlineView:writeItems:toPasteBoard:',
-            signature='c@:@@@',
-            isRequired=0
-        ),
-    ]
-)
-
-NSServicesRequests = _objc.informal_protocol(
-    'NSServicesRequests',
-    [
-        _objc.selector(
-            None, 
-            selector='readSelectionFromPasteboard:',
-            signature='c@:@',
-            isRequired=1
-        ),
-        _objc.selector(
-            None, 
-            selector='writeSelectionToPasteboard:types:',
-            signature='c@:@@',
-            isRequired=1
-        ),
-    ]
-)
-
-NSTableViewDelegate = _objc.informal_protocol(
-    'NSTableViewDelegate',
-    [
-    # - (void)tableView:(NSTableView *)tableView willDisplayCell:(id)cell forTableColumn:(NSTableColumn *)tableColumn row:(int)row;
-    _objc.selector(
-    None,
-    selector='tableView:willDisplayCell:forTableColumn:row:',
-    signature='v@:@@@i',
-    isRequired=0
-    ),
-    
-# - (BOOL)tableView:(NSTableView *)tableView shouldEditTableColumn:(NSTableColumn *)tableColumn row:(int)row;
-    _objc.selector(
-    None,
-    selector='tableView:shouldEditTableColumn:row:',
-    signature='c@:@@i',
-    isRequired=0
-    ),
-    
-# - (BOOL)selectionShouldChangeInTableView:(NSTableView *)aTableView;
-    _objc.selector(
-    None,
-    selector='selectionShouldChangeInTableView:',
-    signature='c@:@',
-    isRequired=0
-    ),
-    
-# - (BOOL)tableView:(NSTableView *)tableView shouldSelectRow:(int)row;
-    _objc.selector(
-    None,
-    selector='tableView:shouldSelectRow:',
-    signature='c@:@i',
-    isRequired=0
-    ),
-    
-# - (BOOL)tableView:(NSTableView *)tableView shouldSelectTableColumn:(NSTableColumn *)tableColumn;
-    _objc.selector(
-    None,
-    selector='tableView:shouldSelectTableColumn:',
-    signature='c@:@@',
-    isRequired=0
-    ),
-
-#- (void) tableView:(NSTableView*)tableView mouseDownInHeaderOfTableColumn:(NSTableColumn *)tableColumn;
-    _objc.selector(
-    None,
-    selector='tableView:mouseDownInHeaderOfTableColumn:',
-    signature='v@:@@',
-    isRequired=0
-    ),
-
-# - (void) tableView:(NSTableView*)tableView didClickTableColumn:(NSTableColumn *)tableColumn;
-    _objc.selector(
-    None,
-    selector='tableView:didClickTableColumn:',
-    signature='v@:@@',
-    isRequired=0
-    ),
-
-# - (void) tableView:(NSTableView*)tableView didDragTableColumn:(NSTableColumn *)tableColumn;
-    _objc.selector(
-    None,
-    selector='tableView:didDragTableColumn:',
-    signature='v@:@@',
-    isRequired=0
-    )
-    ]
-    )
-
-NSTableDataSource = _objc.informal_protocol(
-    'NSTableDataSource',
-    [
-        _objc.selector(
-            None, 
-            selector='numberOfRowsInTableView:',
-            signature='i@:@',
-            isRequired=1
-        ),
-        _objc.selector(
-            None, 
-            selector='tableView:acceptDrop:row:dropOperation:',
-            signature='c@:@@ii',
-            isRequired=0
-        ),
-        _objc.selector(
-            None, 
-            selector='tableView:objectValueForTableColumn:row:',
-            signature='@@:@@i',
-            isRequired=1
-        ),
-        _objc.selector(
-            None, 
-            selector='tableView:setObjectValue:forTableColumn:row:',
-            signature='@@:@@@i',
-            isRequired=0
-        ),
-        _objc.selector(
-            None, 
-            selector='tableView:validateDrop:proposedRow:proposedDropOperation:',
-            signature='i@:@@ii',
-            isRequired=0
-        ),
-        _objc.selector(
-            None, 
-            selector='tableView:writeRows:toPasteboard:',
-            signature='c@:@@@',
-            isRequired=0
-        ),
-    ]
-)        
-
-NSTextAttachmentCell = _objc.informal_protocol(
-    'NSTextAttachmentCell',
-    [
-        _objc.selector(
-            None, 
-            selector='attachment',
-            signature='@@:',
-            isRequired=1
-        ),
-        _objc.selector(
-            None, 
-            selector='cellBaselineOffset',
-            signature='{_NSPoint=ff}@:',
-            isRequired=1
-        ),
-        _objc.selector(
-            None, 
-            selector='cellFrameforTextContainer:proposedLineFragment:glyphPosition:characterIndex:',
-            signature='{_NSRect={_NSPoint=ff}{_NSSize=ff}}@:@{_NSRect={_NSPoint=ff}{_NSSize=ff}}{_NSPoint=ff}I',
-            isRequired=1
-        ),
-        _objc.selector(
-            None, 
-            selector='cellSize',
-            signature='{_NSSize=ff}@:',
-            isRequired=1
-        ),
-        _objc.selector(
-            None, 
-            selector='drawWithFrame:inView:',
-            signature='v@:{_NSRect={_NSPoint=ff}{_NSSize=ff}}@',
-            isRequired=1
-        ),
-        _objc.selector(
-            None, 
-            selector='drawWithFrame:inView:characterIndex:',
-            signature='v@:{_NSRect={_NSPoint=ff}{_NSSize=ff}}@I',
-            isRequired=1
-        ),
-        _objc.selector(
-            None, 
-            selector='drawWithFrame:inView:characterIndex:layoutManager:',
-            signature='v@:{_NSRect={_NSPoint=ff}{_NSSize=ff}}@I@',
-            isRequired=1
-        ),
-        _objc.selector(
-            None, 
-            selector='highlight:withFrame:inView:',
-            signature='v@:c{_NSRect={_NSPoint=ff}{_NSSize=ff}}@',
-            isRequired=1
-        ),
-        _objc.selector(
-            None, 
-            selector='setAttachment:',
-            signature='v@:@',
-            isRequired=1
-        ),
-        _objc.selector(
-            None, 
-            selector='trackMouse:inRect:ofView:untilMouseUp:',
-            signature='c@:@{_NSRect={_NSPoint=ff}{_NSSize=ff}}@c',
-            isRequired=1
-        ),
-        _objc.selector(
-            None, 
-            selector='trackMouse:inRect:ofView:atCharacterIndex:untilMouseUp:',
-            signature='c@:@{_NSRect={_NSPoint=ff}{_NSSize=ff}}@Ic',
-            isRequired=1
-        ),
-        _objc.selector(
-            None, 
-            selector='wantsToTrackMouse',
-            signature='c@:',
-            isRequired=1
-        ),
-        _objc.selector(
-            None, 
-            selector='wantsToTrackMouseForEvent:inRect:ofView:atCharacterIndex:',
-            signature='c@:@{_NSRect={_NSPoint=ff}{_NSSize=ff}}@I',
-            isRequired=1
-        ),
-    ]
-)
-
-# TODO: NSTextInput
-
-# TODO: NSTextStorageScripting
-
-NSToolTipOwner = _objc.informal_protocol(
-    'NSToolTipOwner',
-    [
-        _objc.selector(
-            None, 
-            selector='view:stringForToolTip:point:userData:',
-            signature='@@:@i{_NSPoint=ff}i^v',
-            isRequired=1
-        ),
-    ]
-)
-
-NSToolbarItemValidation = _objc.informal_protocol(
-    'NSToolbarItemValidation',
-    [
-        _objc.selector(
-            None, 
-            selector='validateToolbarItem:',
-            signature='c@:@',
-            isRequired=1
-        ),
-    ]
-)
-
-NSToolbarDelegate = _objc.informal_protocol(
-    'NSToolbarDelegate',
-    [
-    _objc.selector(
-    None,
-    selector='toolbar:itemForItemIdentifier:willBeInsertedIntoToolbar:',
-    signature='@@:@@c',
-    isRequired=1
-    ),
-    _objc.selector(
-    None,
-    selector='toolbarDefaultItemIdentifiers:',
-    signature='@@:@',
-    isRequired=1
-    ),
-    _objc.selector(
-    None,
-    selector='toolbarAllowedItemIdentifiers:',
-    signature='@@:@',
-    isRequired=1
-    ),
-
-    ### The following are really notifications.  However, they are
-    # automatically invoked on the delegate, if the delegate implements the
-    # method. 
-    _objc.selector(
-    None,
-    selector='toolbarWillAddItem:',
-    signature='v@:@',
-    isRequired=0
-    ),
-    _objc.selector(
-    None,
-    selector='toolbarDidRemoveItem:',
-    signature='v@:@',
-    isRequired=0
-    ),
-    ]
-    )
-
-NSUserInterfaceValidations = _objc.informal_protocol(
-    'NSUserInterfaceValidations',
-    [
-        _objc.selector(
-            None, 
-            selector='validateUserInterfaceItem:',
-            signature='c@:@',
-            isRequired=1
-        ),
-    ]
-)
-
-
-NSValidatedUserInterfaceItem = _objc.informal_protocol(
-    'NSValidatedUserInterfaceItem',
-    [
-        _objc.selector(
-            None, 
-            selector='action',
-            signature=':@:',
-            isRequired=1
-        ),
-        _objc.selector(
-            None, 
-            selector='tag',
-            signature='i@:',
-            isRequired=1
-        ),
-    ]
-)
-
-NSApplicationDelegate = _objc.informal_protocol(
-    'NSApplicationDelegate',
-    [
-# - (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender;
-    _objc.selector(
-    None,
-    selector='applicationShouldTerminate:',
-    signature='i@:@',
-    isRequired=0
-    ),
-
-# - (BOOL)application:(NSApplication *)sender openFile:(NSString *)filename;
-    _objc.selector(
-    None,
-    selector='application:openFile:',
-    signature='c@:@@',
-    isRequired=0
-    ),
-
-# - (BOOL)application:(NSApplication *)sender openTempFile:(NSString *)filename;
-    _objc.selector(
-    None,
-    selector='application:openTempFile:',
-    signature='c@:@@',
-    isRequired=0
-    ),
-    
-# - (BOOL)applicationShouldOpenUntitledFile:(NSApplication *)sender;
-    _objc.selector(
-    None,
-    selector='applicationShouldOpenUntitledFile:',
-    signature='c@:@',
-    isRequired=0
-    ),
-    
-# - (BOOL)applicationOpenUntitledFile:(NSApplication *)sender;
-    _objc.selector(
-    None,
-    selector='applicationOpenUntitledFile:',
-    signature='c@:@',
-    isRequired=0
-    ),
-
-# - (BOOL)application:(id)sender openFileWithoutUI:(NSString *)filename;
-    _objc.selector(
-    None,
-    selector='application:openFileWithoutUI:',
-    signature='c@:@@',
-    isRequired=0
-    ),
-
-# - (BOOL)application:(NSApplication *)sender printFile:(NSString *)filename;
-    _objc.selector(
-    None,
-    selector='application:printFile:',
-    signature='c@:@@',
-    isRequired=0
-    ),
-
-# - (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)sender;
-    _objc.selector(
-    None,
-    selector='applicationShouldTerminateAfterLastWindowClosed:',
-    signature='c@:@',
-    isRequired=0
-    ),
-
-# - (BOOL)applicationShouldHandleReopen:(NSApplication *)sender hasVisibleWindows:(BOOL)flag;
-    _objc.selector(
-    None,
-    selector='applicationShouldHandleReopen:hasVisibleWindows:',
-    signature='c@:@c',
-    isRequired=0
-    ),
-
-# - (NSMenu *)applicationDockMenu:(NSApplication *)sender;
-    _objc.selector(
-    None,
-    selector='applicationDockMenu:',
-    signature='@@:@',
-    isRequired=0
-    ),
-    ]
-)
-
-NSTextViewDelegate = _objc.informal_protocol(
-    'NSTextViewDelegate',
-    [
-# - (BOOL)textView:(NSTextView *)textView clickedOnLink:(id)link atIndex:(unsigned)charIndex;
-    _objc.selector(
-    None,
-    selector='textView:clickedOnLink:atIndex:',
-    signature='c@:@@I',
-    isRequired=0
-    ),
-
-# - (void)textView:(NSTextView *)textView clickedOnCell:(id <NSTextAttachmentCell>)cell inRect:(NSRect)cellFrame atIndex:(unsigned)charIndex;
-    _objc.selector(
-    None,
-    selector='textView:clickedOnCell:inRect:atIndex:',
-    signature='v@:@{_NSRect={_NSPoint=ff}{_NSSize=ff}}I',
-    isRequired=0
-    ),
-
-# - (void)textView:(NSTextView *)textView doubleClickedOnCell:(id <NSTextAttachmentCell>)cell inRect:(NSRect)cellFrame atIndex:(unsigned)charIndex;
-    _objc.selector(
-    None,
-    selector='textView:doubleClickedOnCell:inRect:atIndex:',
-    signature='v@:@@{_NSRect={_NSPoint=ff}{_NSSize=ff}}I',
-    isRequired=0
-    ),
- 
-# - (void)textView:(NSTextView *)view draggedCell:(id <NSTextAttachmentCell>)cell inRect:(NSRect)rect event:(NSEvent *)event atIndex:(unsigned)charIndex;
-    _objc.selector(
-    None,
-    selector='textView:draggedCell:inRect:event:atIndex:',
-    signature='v@:@@{_NSRect={_NSPoint=ff}{_NSSize=ff}}@I',
-    isRequired=0
-    ),
- 
-# - (NSArray *)textView:(NSTextView *)view writablePasteboardTypesForCell:(id <NSTextAttachmentCell>)cell atIndex:(unsigned)charIndex;
-    _objc.selector(
-    None,
-    selector='textView:writablePasteboardTypesForCell:atIndex:',
-    signature='@@:@@I',
-    isRequired=0
-    ),
- 
-# - (BOOL)textView:(NSTextView *)view writeCell:(id <NSTextAttachmentCell>)cell atIndex:(unsigned)charIndex toPasteboard:(NSPasteboard *)pboard type:(NSString *)type ;
-    _objc.selector(
-    None,
-    selector='textView:writeCell:atIndex:toPasteboard:type:',
-    signature='c@:@@I@@',
-    isRequired=0
-    ),
- 
-# - (NSRange)textView:(NSTextView *)textView willChangeSelectionFromCharacterRange:(NSRange)oldSelectedCharRange toCharacterRange:(NSRange)newSelectedCharRange;
-    _objc.selector(
-    None,
-    selector='textView:willChangeSelectionFromCharacterRange:toCharacterRange:',
-    signature='{_NSRange=II}@:@{_NSRange=II}{_NSRange=II}',
-    isRequired=0
-    ),
- 
-# - (void)textViewDidChangeSelection:(NSNotification *)notification;
-    _objc.selector(
-    None,
-    selector='textViewDidChangeSelection:',
-    signature='v@:@',
-    isRequired=0
-    ),
- 
-# - (BOOL)textView:(NSTextView *)textView shouldChangeTextInRange:(NSRange)affectedCharRange replacementString:(NSString *)replacementString;
-    _objc.selector(
-    None,
-    selector='textView:shouldChangeTextInRange:replacementString:',
-    signature='c@:@{_NSRange=II}@',
-    isRequired=0
-    ),
- 
-# - (BOOL)textView:(NSTextView *)textView doCommandBySelector:(SEL)commandSelector;
-    _objc.selector(
-    None,
-    selector='textView:doCommandBySelector:',
-    signature='c@:@:',
-    isRequired=0
-    ),
- 
-# - (NSUndoManager *)undoManagerForTextView:(NSTextView *)view;
-    _objc.selector(
-    None,
-    selector='undoManagerForTextView:',
-    signature='@@:@',
-    isRequired=0
-    ),
-	]
-)
-
-# NSWindowScripting
-def scriptcmd(sel):
-    return _objc.selector(None, selector=sel, signature='@@:@', isRequired=0)
-def scriptquery(sel):
-    return _objc.selector(None, selector=sel, signature='c@:', isRequired=0)
-def scriptboolset(sel):
-    return _objc.selector(None, selector=sel, signature='v@:c', isRequired=0)
-
-NSTextViewDelegate = _objc.informal_protocol(
-    'NSTextViewDelegate',
-    [
-    scriptcmd('handleCloseScriptCommand:'),
-    scriptcmd('handlePrintScriptCommand:'),
-    scriptcmd('handleSaveScriptCommand:'),
-    scriptquery('hasCloseBox'),
-    scriptquery('hasTitleBar'),
-    scriptquery('isFloatingPanel'),
-    scriptquery('isMiniaturizable'),
-    scriptquery('isModalPanel'),
-    scriptquery('isResizable'),
-    scriptquery('isZoomable'),
-    _objc.selector(
-        None, 
-        selector='orderedIndex', 
-        signature='i@:', 
-        isRequired=0
-    ),
-    scriptboolset('setIsMiniaturized:'),
-    scriptboolset('setIsVisible:'),
-    scriptboolset('setIsZoomed:'),
-    _objc.selector(
-        None, 
-        selector='setOrderedIndex:', 
-        signature='v@:i', 
-        isRequired=0
-    ),
-    ]
-)
-del scriptcmd
-del scriptquery
-del scriptboolset
+from protocols import NSAccessibility, NSChangeSpelling, NSColorPickingCustom, \
+                       NSColorPickingDefault, NSComboBoxCellDataSource, NSComboBoxDataSource, \
+                       NSDraggingDestination, NSDraggingInfo, NSDraggingSource, \
+                       NSIgnoreMisspelledWords, NSInputServerMouseTracker, NSMenuValidation, \
+                       NSOutlineViewDelegate, NSOutlineViewDataSource, NSServicesRequests, \
+                       NSTableViewDelegate, NSTableDataSource, NSToolTipOwner, \
+                       NSToolbarItemValidation, NSToolbarDelegate, NSUserInterfaceValidations, \
+                       NSValidatedUserInterfaceItem, NSApplicationDelegate, NSTextViewDelegate

File pyobjc/Lib/AppKit/protocols.py

+# generated from '/System/Library/Frameworks/AppKit.framework'
+import objc as _objc
+
+
+NSAccessibility = _objc.informal_protocol(
+    "NSAccessibility",
+    [
+# (NSString *)accessibilityActionDescription:(NSString *)action
+        _objc.selector(
+            None,
+            selector='accessibilityActionDescription:',
+            signature='@@:@',
+            isRequired=0,
+        ),
+# (NSArray *)accessibilityActionNames
+        _objc.selector(
+            None,
+            selector='accessibilityActionNames',
+            signature='@@:',
+            isRequired=0,
+        ),
+# (NSArray *)accessibilityAttributeNames
+        _objc.selector(
+            None,
+            selector='accessibilityAttributeNames',
+            signature='@@:',
+            isRequired=0,
+        ),
+# (id)accessibilityAttributeValue:(NSString *)attribute
+        _objc.selector(
+            None,
+            selector='accessibilityAttributeValue:',
+            signature='@@:@',
+            isRequired=0,
+        ),
+# (id)accessibilityFocusedUIElement
+        _objc.selector(
+            None,
+            selector='accessibilityFocusedUIElement',
+            signature='@@:',
+            isRequired=0,
+        ),
+# (id)accessibilityHitTest:(NSPoint)point
+        _objc.selector(
+            None,
+            selector='accessibilityHitTest:',
+            signature='@@:{_NSPoint=ff}',
+            isRequired=0,
+        ),
+# (BOOL)accessibilityIsAttributeSettable:(NSString *)attribute
+        _objc.selector(
+            None,
+            selector='accessibilityIsAttributeSettable:',
+            signature='c@:@',
+            isRequired=0,
+        ),
+# (BOOL)accessibilityIsIgnored
+        _objc.selector(
+            None,
+            selector='accessibilityIsIgnored',
+            signature='c@:',
+            isRequired=0,
+        ),
+# (void)accessibilityPerformAction:(NSString *)action
+        _objc.selector(
+            None,
+            selector='accessibilityPerformAction:',
+            signature='v@:@',
+            isRequired=0,
+        ),
+# (void)accessibilitySetValue:(id)value forAttribute:(NSString *)attribute
+        _objc.selector(
+            None,
+            selector='accessibilitySetValue:forAttribute:',
+            signature='v@:@@',
+            isRequired=0,
+        ),
+    ]
+)
+
+NSApplicationDelegate = _objc.informal_protocol(
+    "NSApplicationDelegate",
+    [
+# (BOOL)application:(NSApplication *)sender openFile:(NSString *)filename
+        _objc.selector(
+            None,
+            selector='application:openFile:',
+            signature='c@:@@',
+            isRequired=0,
+        ),
+# (BOOL)application:(id)sender openFileWithoutUI:(NSString *)filename
+        _objc.selector(
+            None,
+            selector='application:openFileWithoutUI:',
+            signature='c@:@@',
+            isRequired=0,
+        ),
+# (BOOL)application:(NSApplication *)sender openTempFile:(NSString *)filename
+        _objc.selector(
+            None,
+            selector='application:openTempFile:',
+            signature='c@:@@',
+            isRequired=0,
+        ),
+# (BOOL)application:(NSApplication *)sender printFile:(NSString *)filename
+        _objc.selector(
+            None,
+            selector='application:printFile:',
+            signature='c@:@@',
+            isRequired=0,
+        ),
+# (NSMenu *)applicationDockMenu:(NSApplication *)sender
+        _objc.selector(
+            None,
+            selector='applicationDockMenu:',
+            signature='@@:@',
+            isRequired=0,
+        ),
+# (BOOL)applicationOpenUntitledFile:(NSApplication *)sender
+        _objc.selector(
+            None,
+            selector='applicationOpenUntitledFile:',
+            signature='c@:@',
+            isRequired=0,
+        ),
+# (BOOL)applicationShouldHandleReopen:(NSApplication *)sender hasVisibleWindows:(BOOL)flag
+        _objc.selector(
+            None,
+            selector='applicationShouldHandleReopen:hasVisibleWindows:',
+            signature='c@:@c',
+            isRequired=0,
+        ),
+# (BOOL)applicationShouldOpenUntitledFile:(NSApplication *)sender
+        _objc.selector(
+            None,
+            selector='applicationShouldOpenUntitledFile:',
+            signature='c@:@',
+            isRequired=0,
+        ),
+# (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender
+        _objc.selector(
+            None,
+            selector='applicationShouldTerminate:',
+            signature='i@:@',
+            isRequired=0,
+        ),
+# (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)sender
+        _objc.selector(
+            None,
+            selector='applicationShouldTerminateAfterLastWindowClosed:',
+            signature='c@:@',
+            isRequired=0,
+        ),
+    ]
+)
+
+NSApplicationNotifications = _objc.informal_protocol(
+    "NSApplicationNotifications",
+    [
+# (void)applicationDidBecomeActive:(NSNotification *)notification
+        _objc.selector(
+            None,
+            selector='applicationDidBecomeActive:',
+            signature='v@:@',
+            isRequired=0,
+        ),
+# (void)applicationDidChangeScreenParameters:(NSNotification *)notification
+        _objc.selector(
+            None,
+            selector='applicationDidChangeScreenParameters:',
+            signature='v@:@',
+            isRequired=0,
+        ),
+# (void)applicationDidFinishLaunching:(NSNotification *)notification
+        _objc.selector(
+            None,
+            selector='applicationDidFinishLaunching:',
+            signature='v@:@',
+            isRequired=0,
+        ),
+# (void)applicationDidHide:(NSNotification *)notification
+        _objc.selector(
+            None,
+            selector='applicationDidHide:',
+            signature='v@:@',
+            isRequired=0,
+        ),
+# (void)applicationDidResignActive:(NSNotification *)notification
+        _objc.selector(
+            None,
+            selector='applicationDidResignActive:',
+            signature='v@:@',
+            isRequired=0,
+        ),
+# (void)applicationDidUnhide:(NSNotification *)notification
+        _objc.selector(
+            None,
+            selector='applicationDidUnhide:',
+            signature='v@:@',
+            isRequired=0,
+        ),
+# (void)applicationDidUpdate:(NSNotification *)notification
+        _objc.selector(
+            None,
+            selector='applicationDidUpdate:',
+            signature='v@:@',
+            isRequired=0,
+        ),
+# (void)applicationWillBecomeActive:(NSNotification *)notification
+        _objc.selector(
+            None,
+            selector='applicationWillBecomeActive:',
+            signature='v@:@',
+            isRequired=0,
+        ),
+# (void)applicationWillFinishLaunching:(NSNotification *)notification
+        _objc.selector(
+            None,
+            selector='applicationWillFinishLaunching:',
+            signature='v@:@',
+            isRequired=0,
+        ),
+# (void)applicationWillHide:(NSNotification *)notification
+        _objc.selector(
+            None,
+            selector='applicationWillHide:',
+            signature='v@:@',
+            isRequired=0,
+        ),
+# (void)applicationWillResignActive:(NSNotification *)notification
+        _objc.selector(
+            None,
+            selector='applicationWillResignActive:',
+            signature='v@:@',
+            isRequired=0,
+        ),
+# (void)applicationWillTerminate:(NSNotification *)notification
+        _objc.selector(
+            None,
+            selector='applicationWillTerminate:',
+            signature='v@:@',
+            isRequired=0,
+        ),
+# (void)applicationWillUnhide:(NSNotification *)notification
+        _objc.selector(
+            None,
+            selector='applicationWillUnhide:',
+            signature='v@:@',
+            isRequired=0,
+        ),
+# (void)applicationWillUpdate:(NSNotification *)notification
+        _objc.selector(
+            None,
+            selector='applicationWillUpdate:',
+            signature='v@:@',
+            isRequired=0,
+        ),
+    ]
+)
+
+NSApplicationScriptingDelegation = _objc.informal_protocol(
+    "NSApplicationScriptingDelegation",
+    [
+# (BOOL)application:(NSApplication *)sender delegateHandlesKey:(NSString *)key
+        _objc.selector(
+            None,
+            selector='application:delegateHandlesKey:',
+            signature='c@:@@',
+            isRequired=0,
+        ),
+    ]
+)
+
+NSBrowserDelegate = _objc.informal_protocol(
+    "NSBrowserDelegate",
+    [
+# (void)browser:(NSBrowser *)sender createRowsForColumn:(int)column inMatrix:(NSMatrix *)matrix
+        _objc.selector(
+            None,
+            selector='browser:createRowsForColumn:inMatrix:',
+            signature='v@:@i@',
+            isRequired=0,
+        ),
+# (BOOL)browser:(NSBrowser *)sender isColumnValid:(int)column
+        _objc.selector(
+            None,
+            selector='browser:isColumnValid:',
+            signature='c@:@i',
+            isRequired=0,
+        ),
+# (int)browser:(NSBrowser *)sender numberOfRowsInColumn:(int)column
+        _objc.selector(
+            None,
+            selector='browser:numberOfRowsInColumn:',
+            signature='i@:@i',
+            isRequired=0,
+        ),
+# (BOOL)browser:(NSBrowser *)sender selectCellWithString:(NSString *)title inColumn:(int)column
+        _objc.selector(
+            None,
+            selector='browser:selectCellWithString:inColumn:',
+            signature='c@:@@i',
+            isRequired=0,
+        ),
+# (BOOL)browser:(NSBrowser *)sender selectRow:(int)row inColumn:(int)column
+        _objc.selector(
+            None,
+            selector='browser:selectRow:inColumn:',
+            signature='c@:@ii',
+            isRequired=0,
+        ),
+# (NSString *)browser:(NSBrowser *)sender titleOfColumn:(int)column
+        _objc.selector(
+            None,
+            selector='browser:titleOfColumn:',
+            signature='@@:@i',
+            isRequired=0,
+        ),
+# (void)browser:(NSBrowser *)sender willDisplayCell:(id)cell atRow:(int)row column:(int)column
+        _objc.selector(
+            None,
+            selector='browser:willDisplayCell:atRow:column:',
+            signature='v@:@@ii',
+            isRequired=0,
+        ),
+# (void)browserDidScroll:(NSBrowser *)sender
+        _objc.selector(
+            None,
+            selector='browserDidScroll:',
+            signature='v@:@',
+            isRequired=0,
+        ),
+# (void)browserWillScroll:(NSBrowser *)sender
+        _objc.selector(
+            None,
+            selector='browserWillScroll:',
+            signature='v@:@',
+            isRequired=0,
+        ),
+    ]
+)
+
+NSChangeSpelling = _objc.informal_protocol(
+    "NSChangeSpelling",
+    [
+# (void)changeSpelling:(id)sender
+        _objc.selector(
+            None,
+            selector='changeSpelling:',
+            signature='v@:@',
+            isRequired=0,
+        ),
+    ]
+)
+
+NSColorPanelResponderMethod = _objc.informal_protocol(
+    "NSColorPanelResponderMethod",
+    [
+# (void)changeColor:(id)sender
+        _objc.selector(
+            None,
+            selector='changeColor:',
+            signature='v@:@',
+            isRequired=0,
+        ),
+    ]
+)
+
+NSColorPickingCustom = _objc.informal_protocol(
+    "NSColorPickingCustom",
+    [
+# (int)currentMode
+        _objc.selector(
+            None,
+            selector='currentMode',
+            signature='i@:',
+            isRequired=0,
+        ),
+# (NSView *)provideNewView:(BOOL)initialRequest
+        _objc.selector(
+            None,
+            selector='provideNewView:',
+            signature='@@:c',
+            isRequired=0,
+        ),
+# (void)setColor:(NSColor *)newColor
+        _objc.selector(
+            None,
+            selector='setColor:',
+            signature='v@:@',
+            isRequired=0,
+        ),
+# (BOOL)supportsMode:(int)mode
+        _objc.selector(
+            None,
+            selector='supportsMode:',
+            signature='c@:i',
+            isRequired=0,
+        ),
+    ]
+)
+
+NSColorPickingDefault = _objc.informal_protocol(
+    "NSColorPickingDefault",
+    [
+# (void)alphaControlAddedOrRemoved:(id)sender
+        _objc.selector(
+            None,
+            selector='alphaControlAddedOrRemoved:',
+            signature='v@:@',
+            isRequired=0,
+        ),
+# (void)attachColorList:(NSColorList *)colorList
+        _objc.selector(
+            None,
+            selector='attachColorList:',
+            signature='v@:@',
+            isRequired=0,
+        ),
+# (void)detachColorList:(NSColorList *)colorList
+        _objc.selector(
+            None,
+            selector='detachColorList:',
+            signature='v@:@',
+            isRequired=0,
+        ),
+# (id)initWithPickerMask:(int)mask colorPanel:(NSColorPanel *)owningColorPanel
+        _objc.selector(
+            None,
+            selector='initWithPickerMask:colorPanel:',
+            signature='@@:i@',
+            isRequired=0,
+        ),
+# (void)insertNewButtonImage:(NSImage *)newButtonImage in:(NSButtonCell *)buttonCell
+        _objc.selector(
+            None,
+            selector='insertNewButtonImage:in:',
+            signature='v@:@@',
+            isRequired=0,
+        ),
+# (NSImage *)provideNewButtonImage
+        _objc.selector(
+            None,
+            selector='provideNewButtonImage',
+            signature='@@:',
+            isRequired=0,
+        ),
+# (void)setMode:(int)mode
+        _objc.selector(
+            None,
+            selector='setMode:',
+            signature='v@:i',
+            isRequired=0,
+        ),
+# (void)viewSizeChanged:(id)sender
+        _objc.selector(
+            None,
+            selector='viewSizeChanged:',
+            signature='v@:@',
+            isRequired=0,
+        ),
+    ]
+)
+
+NSComboBoxCellDataSource = _objc.informal_protocol(
+    "NSComboBoxCellDataSource",
+    [
+# (NSString *)comboBoxCell:(NSComboBoxCell *)aComboBoxCell completedString:(NSString *)uncompletedString
+        _objc.selector(
+            None,
+            selector='comboBoxCell:completedString:',
+            signature='@@:@@',
+            isRequired=0,
+        ),
+# (unsigned int)comboBoxCell:(NSComboBoxCell *)aComboBoxCell indexOfItemWithStringValue:(NSString *)string
+        _objc.selector(
+            None,
+            selector='comboBoxCell:indexOfItemWithStringValue:',
+            signature='I@:@@',
+            isRequired=0,
+        ),
+# (id)comboBoxCell:(NSComboBoxCell *)aComboBoxCell objectValueForItemAtIndex:(int)index
+        _objc.selector(
+            None,
+            selector='comboBoxCell:objectValueForItemAtIndex:',
+            signature='@@:@i',
+            isRequired=0,
+        ),
+# (int)numberOfItemsInComboBoxCell:(NSComboBoxCell *)comboBoxCell
+        _objc.selector(
+            None,
+            selector='numberOfItemsInComboBoxCell:',
+            signature='i@:@',
+            isRequired=0,
+        ),
+    ]
+)
+
+NSComboBoxDataSource = _objc.informal_protocol(
+    "NSComboBoxDataSource",
+    [
+# (NSString *)comboBox:(NSComboBox *)aComboBox completedString:(NSString *)string
+        _objc.selector(
+            None,
+            selector='comboBox:completedString:',
+            signature='@@:@@',
+            isRequired=0,
+        ),
+# (unsigned int)comboBox:(NSComboBox *)aComboBox indexOfItemWithStringValue:(NSString *)string
+        _objc.selector(
+            None,
+            selector='comboBox:indexOfItemWithStringValue:',
+            signature='I@:@@',
+            isRequired=0,
+        ),
+# (id)comboBox:(NSComboBox *)aComboBox objectValueForItemAtIndex:(int)index
+        _objc.selector(
+            None,
+            selector='comboBox:objectValueForItemAtIndex:',
+            signature='@@:@i',
+            isRequired=0,
+        ),
+# (int)numberOfItemsInComboBox:(NSComboBox *)aComboBox
+        _objc.selector(
+            None,
+            selector='numberOfItemsInComboBox:',
+            signature='i@:@',
+            isRequired=0,
+        ),
+    ]
+)
+
+NSComboBoxNotifications = _objc.informal_protocol(
+    "NSComboBoxNotifications",
+    [
+# (void)comboBoxSelectionDidChange:(NSNotification *)notification
+        _objc.selector(
+            None,
+            selector='comboBoxSelectionDidChange:',
+            signature='v@:@',
+            isRequired=0,
+        ),
+# (void)comboBoxSelectionIsChanging:(NSNotification *)notification
+        _objc.selector(
+            None,
+            selector='comboBoxSelectionIsChanging:',
+            signature='v@:@',
+            isRequired=0,
+        ),
+# (void)comboBoxWillDismiss:(NSNotification *)notification
+        _objc.selector(
+            None,
+            selector='comboBoxWillDismiss:',
+            signature='v@:@',
+            isRequired=0,
+        ),
+# (void)comboBoxWillPopUp:(NSNotification *)notification
+        _objc.selector(
+            None,
+            selector='comboBoxWillPopUp:',
+            signature='v@:@',
+            isRequired=0,
+        ),
+    ]
+)
+
+NSControlSubclassDelegate = _objc.informal_protocol(
+    "NSControlSubclassDelegate",
+    [
+# (BOOL)control:(NSControl *)control didFailToFormatString:(NSString *)string errorDescription:(NSString *)error
+        _objc.selector(
+            None,
+            selector='control:didFailToFormatString:errorDescription:',
+            signature='c@:@@@',
+            isRequired=0,
+        ),
+# (void)control:(NSControl *)control didFailToValidatePartialString:(NSString *)string errorDescription:(NSString *)error
+        _objc.selector(
+            None,
+            selector='control:didFailToValidatePartialString:errorDescription:',
+            signature='v@:@@@',
+            isRequired=0,
+        ),
+# (BOOL)control:(NSControl *)control isValidObject:(id)obj
+        _objc.selector(
+            None,
+            selector='control:isValidObject:',
+            signature='c@:@@',
+            isRequired=0,
+        ),
+# (BOOL)control:(NSControl *)control textShouldBeginEditing:(NSText *)fieldEditor
+        _objc.selector(
+            None,
+            selector='control:textShouldBeginEditing:',
+            signature='c@:@@',
+            isRequired=0,
+        ),
+# (BOOL)control:(NSControl *)control textShouldEndEditing:(NSText *)fieldEditor
+        _objc.selector(
+            None,
+            selector='control:textShouldEndEditing:',
+            signature='c@:@@',
+            isRequired=0,
+        ),
+# (BOOL)control:(NSControl *)control textView:(NSTextView *)textView doCommandBySelector:(SEL)commandSelector
+        _objc.selector(
+            None,
+            selector='control:textView:doCommandBySelector:',
+            signature='c@:@@:',
+            isRequired=0,
+        ),
+    ]
+)
+
+NSControlSubclassNotifications = _objc.informal_protocol(
+    "NSControlSubclassNotifications",
+    [
+# (void)controlTextDidBeginEditing:(NSNotification *)obj
+        _objc.selector(
+            None,
+            selector='controlTextDidBeginEditing:',
+            signature='v@:@',
+            isRequired=0,
+        ),
+# (void)controlTextDidChange:(NSNotification *)obj
+        _objc.selector(
+            None,
+            selector='controlTextDidChange:',
+            signature='v@:@',
+            isRequired=0,
+        ),
+# (void)controlTextDidEndEditing:(NSNotification *)obj
+        _objc.selector(
+            None,
+            selector='controlTextDidEndEditing:',
+            signature='v@:@',
+            isRequired=0,
+        ),
+    ]
+)
+
+NSDraggingDestination = _objc.informal_protocol(
+    "NSDraggingDestination",
+    [
+# (void)concludeDragOperation:(id <NSDraggingInfo>)sender
+        _objc.selector(
+            None,
+            selector='concludeDragOperation:',
+            signature='v@:@',
+            isRequired=0,
+        ),
+# (void)draggingEnded:(id <NSDraggingInfo>)sender
+        _objc.selector(
+            None,
+            selector='draggingEnded:',
+            signature='v@:@',
+            isRequired=0,
+        ),
+# (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender
+        _objc.selector(
+            None,
+            selector='draggingEntered:',
+            signature='I@:@',
+            isRequired=0,
+        ),
+# (void)draggingExited:(id <NSDraggingInfo>)sender
+        _objc.selector(
+            None,
+            selector='draggingExited:',
+            signature='v@:@',
+            isRequired=0,
+        ),
+# (NSDragOperation)draggingUpdated:(id <NSDraggingInfo>)sender
+        _objc.selector(
+            None,
+            selector='draggingUpdated:',
+            signature='I@:@',
+            isRequired=0,
+        ),
+# (BOOL)performDragOperation:(id <NSDraggingInfo>)sender
+        _objc.selector(
+            None,
+            selector='performDragOperation:',
+            signature='c@:@',
+            isRequired=0,
+        ),
+# (BOOL)prepareForDragOperation:(id <NSDraggingInfo>)sender
+        _objc.selector(
+            None,
+            selector='prepareForDragOperation:',
+            signature='c@:@',
+            isRequired=0,
+        ),
+    ]
+)
+
+NSDraggingInfo = _objc.informal_protocol(
+    "NSDraggingInfo",
+    [
+# (NSImage *)draggedImage
+        _objc.selector(
+            None,
+            selector='draggedImage',
+            signature='@@:',
+            isRequired=0,
+        ),
+# (NSPoint)draggedImageLocation
+        _objc.selector(
+            None,
+            selector='draggedImageLocation',
+            signature='{_NSPoint=ff}@:',
+            isRequired=0,
+        ),
+# (NSWindow *)draggingDestinationWindow
+        _objc.selector(
+            None,
+            selector='draggingDestinationWindow',
+            signature='@@:',
+            isRequired=0,
+        ),
+# (NSPoint)draggingLocation
+        _objc.selector(
+            None,
+            selector='draggingLocation',
+            signature='{_NSPoint=ff}@:',
+            isRequired=0,
+        ),
+# (NSPasteboard *)draggingPasteboard
+        _objc.selector(
+            None,
+            selector='draggingPasteboard',
+            signature='@@:',
+            isRequired=0,
+        ),
+# (int)draggingSequenceNumber
+        _objc.selector(
+            None,
+            selector='draggingSequenceNumber',
+            signature='i@:',
+            isRequired=0,
+        ),
+# (id)draggingSource
+        _objc.selector(
+            None,
+            selector='draggingSource',
+            signature='@@:',
+            isRequired=0,
+        ),
+# (NSDragOperation)draggingSourceOperationMask
+        _objc.selector(
+            None,
+            selector='draggingSourceOperationMask',
+            signature='I@:',
+            isRequired=0,
+        ),
+# (NSArray *)namesOfPromisedFilesDroppedAtDestination:(NSURL *)dropDestination
+        _objc.selector(
+            None,
+            selector='namesOfPromisedFilesDroppedAtDestination:',
+            signature='@@:@',
+            isRequired=0,
+        ),
+# (void)slideDraggedImageTo:(NSPoint)screenPoint
+        _objc.selector(
+            None,
+            selector='slideDraggedImageTo:',
+            signature='v@:{_NSPoint=ff}',
+            isRequired=0,
+        ),
+    ]
+)
+
+NSDraggingSource = _objc.informal_protocol(
+    "NSDraggingSource",
+    [
+# (void)draggedImage:(NSImage *)image beganAt:(NSPoint)screenPoint
+        _objc.selector(
+            None,
+            selector='draggedImage:beganAt:',
+            signature='v@:@{_NSPoint=ff}',
+            isRequired=0,
+        ),
+# (void)draggedImage:(NSImage *)image endedAt:(NSPoint)screenPoint deposited:(BOOL)flag
+        _objc.selector(
+            None,
+            selector='draggedImage:endedAt:deposited:',
+            signature='v@:@{_NSPoint=ff}c',
+            isRequired=0,
+        ),
+# (void)draggedImage:(NSImage *)image endedAt:(NSPoint)screenPoint operation:(NSDragOperation)operation
+        _objc.selector(
+            None,
+            selector='draggedImage:endedAt:operation:',
+            signature='v@:@{_NSPoint=ff}I',
+            isRequired=0,
+        ),
+# (void)draggedImage:(NSImage *)image movedTo:(NSPoint)screenPoint
+        _objc.selector(
+            None,
+            selector='draggedImage:movedTo:',
+            signature='v@:@{_NSPoint=ff}',
+            isRequired=0,
+        ),
+# (NSDragOperation)draggingSourceOperationMaskForLocal:(BOOL)flag
+        _objc.selector(
+            None,
+            selector='draggingSourceOperationMaskForLocal:',
+            signature='I@:c',
+            isRequired=0,
+        ),
+# (BOOL)ignoreModifierKeysWhileDragging
+        _objc.selector(
+            None,
+            selector='ignoreModifierKeysWhileDragging',
+            signature='c@:',
+            isRequired=0,
+        ),
+# (NSArray *)namesOfPromisedFilesDroppedAtDestination:(NSURL *)dropDestination
+        _objc.selector(
+            None,
+            selector='namesOfPromisedFilesDroppedAtDestination:',
+            signature='@@:@',
+            isRequired=0,
+        ),
+    ]
+)
+
+NSDrawerDelegate = _objc.informal_protocol(
+    "NSDrawerDelegate",
+    [
+# (BOOL)drawerShouldClose:(NSDrawer *)sender
+        _objc.selector(
+            None,
+            selector='drawerShouldClose:',
+            signature='c@:@',
+            isRequired=0,
+        ),
+# (BOOL)drawerShouldOpen:(NSDrawer *)sender
+        _objc.selector(
+            None,
+            selector='drawerShouldOpen:',
+            signature='c@:@',
+            isRequired=0,
+        ),
+# (NSSize)drawerWillResizeContents:(NSDrawer *)sender toSize:(NSSize)contentSize
+        _objc.selector(
+            None,
+            selector='drawerWillResizeContents:toSize:',
+            signature='{_NSSize=ff}@:@{_NSSize=ff}',
+            isRequired=0,
+        ),
+    ]
+)
+
+NSDrawerNotifications = _objc.informal_protocol(
+    "NSDrawerNotifications",
+    [
+# (void)drawerDidClose:(NSNotification *)notification
+        _objc.selector(
+            None,
+            selector='drawerDidClose:',
+            signature='v@:@',
+            isRequired=0,
+        ),
+# (void)drawerDidOpen:(NSNotification *)notification
+        _objc.selector(
+            None,
+            selector='drawerDidOpen:',
+            signature='v@:@',
+            isRequired=0,
+        ),
+# (void)drawerWillClose:(NSNotification *)notification
+        _objc.selector(
+            None,
+            selector='drawerWillClose:',
+            signature='v@:@',
+            isRequired=0,
+        ),
+# (void)drawerWillOpen:(NSNotification *)notification
+        _objc.selector(
+            None,
+            selector='drawerWillOpen:',
+            signature='v@:@',
+            isRequired=0,
+        ),
+    ]
+)
+
+NSFontManagerDelegate = _objc.informal_protocol(
+    "NSFontManagerDelegate",
+    [
+# (BOOL)fontManager:(id)sender willIncludeFont:(NSString *)fontName
+        _objc.selector(
+            None,
+            selector='fontManager:willIncludeFont:',
+            signature='c@:@@',
+            isRequired=0,
+        ),
+    ]
+)
+
+NSFontManagerResponderMethod = _objc.informal_protocol(
+    "NSFontManagerResponderMethod",
+    [
+# (void)changeFont:(id)sender
+        _objc.selector(
+            None,
+            selector='changeFont:',
+            signature='v@:@',
+            isRequired=0,
+        ),
+    ]
+)
+
+NSIgnoreMisspelledWords = _objc.informal_protocol(
+    "NSIgnoreMisspelledWords",
+    [
+# (void)ignoreSpelling:(id)sender