summaryrefslogtreecommitdiff
path: root/fpcsrc/packages/cocoaint/src/appkit/NSInputServer.inc
blob: 36e73bfe39de48eacd9f518980c82d6f57d37f24 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
{ Parsed from Appkit.framework NSInputServer.h }

{$ifdef TYPES}
{$ifndef NSINPUTSERVER_PAS_T}
{$define NSINPUTSERVER_PAS_T}

{$endif}
{$endif}

{$ifdef RECORDS}
{$ifndef NSINPUTSERVER_PAS_R}
{$define NSINPUTSERVER_PAS_R}

{$endif}
{$endif}

{$ifdef FUNCTIONS}
{$ifndef NSINPUTSERVER_PAS_F}
{$define NSINPUTSERVER_PAS_F}

{$endif}
{$endif}

{$ifdef EXTERNAL_SYMBOLS}
{$ifndef NSINPUTSERVER_PAS_S}
{$define NSINPUTSERVER_PAS_S}

{$endif}
{$endif}

{$ifdef FORWARD}
  NSInputServiceProviderProtocol = objcprotocol;
  NSInputServerMouseTrackerProtocol = objcprotocol;
  NSInputServer = objcclass;
  NSInputServerPointer = ^NSInputServer;
  NSInputServerPtr = NSInputServerPointer;

{$endif}

{$ifdef CLASSES}
{$ifndef NSINPUTSERVER_PAS_C}
{$define NSINPUTSERVER_PAS_C}

{ NSInputServer }
  NSInputServer = objcclass external (NSObject, NSInputServiceProviderProtocol, NSInputServerMouseTrackerProtocol)
  private
    _name: NSString;
    _delegate: id;
    
  public

    { Adopted Protocols }
    procedure insertText_client(aString: id; sender: id);
    procedure doCommandBySelector_client(aSelector: SEL; sender: id);
    procedure markedTextAbandoned(sender: id);
    procedure markedTextSelectionChanged_client(newSel: NSRange; sender: id);
    procedure terminate(sender: id);
    function canBeDisabled: Boolean;
    function wantsToInterpretAllKeystrokes: Boolean;
    function wantsToHandleMouseEvents: Boolean;
    function wantsToDelayTextChangeNotifications: Boolean;
    procedure inputClientBecomeActive(sender: id);
    procedure inputClientResignActive(sender: id);
    procedure inputClientEnabled(sender: id);
    procedure inputClientDisabled(sender: id);
    procedure activeConversationWillChange_fromOldConversation(sender: id; oldConversation: NSInteger);
    procedure activeConversationChanged_toNewConversation(sender: id; newConversation: NSInteger);
    function mouseDownOnCharacterIndex_atCoordinate_withModifier_client(theIndex: NSUInteger; thePoint: NSPoint; theFlags: NSUInteger; sender: id): Boolean;
    function mouseDraggedOnCharacterIndex_atCoordinate_withModifier_client(theIndex: NSUInteger; thePoint: NSPoint; theFlags: NSUInteger; sender: id): Boolean;
    procedure mouseUpOnCharacterIndex_atCoordinate_withModifier_client(theIndex: NSUInteger; thePoint: NSPoint; theFlags: NSUInteger; sender: id);
  end;

{$endif}
{$endif}
{$ifdef PROTOCOLS}
{$ifndef NSINPUTSERVER_PAS_P}
{$define NSINPUTSERVER_PAS_P}
  
{ NSInputServiceProvider Protocol }
  NSInputServiceProviderProtocol = objcprotocol external name 'NSInputServiceProvider'
    procedure insertText_client(aString: id; sender: id); message 'insertText:client:'; deprecated 'in Mac OS X 10.6 and later';
    procedure doCommandBySelector_client(aSelector: SEL; sender: id); message 'doCommandBySelector:client:'; deprecated 'in Mac OS X 10.6 and later';
    procedure markedTextAbandoned(sender: id); message 'markedTextAbandoned:'; deprecated 'in Mac OS X 10.6 and later';
    procedure markedTextSelectionChanged_client(newSel: NSRange; sender: id); message 'markedTextSelectionChanged:client:'; deprecated 'in Mac OS X 10.6 and later';
    procedure terminate(sender: id); message 'terminate:'; deprecated 'in Mac OS X 10.6 and later';
    function canBeDisabled: Boolean; message 'canBeDisabled'; deprecated 'in Mac OS X 10.6 and later';
    function wantsToInterpretAllKeystrokes: Boolean; message 'wantsToInterpretAllKeystrokes'; deprecated 'in Mac OS X 10.6 and later';
    function wantsToHandleMouseEvents: Boolean; message 'wantsToHandleMouseEvents'; deprecated 'in Mac OS X 10.6 and later';
    function wantsToDelayTextChangeNotifications: Boolean; message 'wantsToDelayTextChangeNotifications'; deprecated 'in Mac OS X 10.6 and later';
    procedure inputClientBecomeActive(sender: id); message 'inputClientBecomeActive:'; deprecated 'in Mac OS X 10.6 and later';
    procedure inputClientResignActive(sender: id); message 'inputClientResignActive:'; deprecated 'in Mac OS X 10.6 and later';
    procedure inputClientEnabled(sender: id); message 'inputClientEnabled:'; deprecated 'in Mac OS X 10.6 and later';
    procedure inputClientDisabled(sender: id); message 'inputClientDisabled:'; deprecated 'in Mac OS X 10.6 and later';
    procedure activeConversationWillChange_fromOldConversation(sender: id; oldConversation: NSInteger); message 'activeConversationWillChange:fromOldConversation:'; deprecated 'in Mac OS X 10.6 and later';
    procedure activeConversationChanged_toNewConversation(sender: id; newConversation: NSInteger); message 'activeConversationChanged:toNewConversation:'; deprecated 'in Mac OS X 10.6 and later';
  end;
  
{ NSInputServerMouseTracker Protocol }
  NSInputServerMouseTrackerProtocol = objcprotocol external name 'NSInputServerMouseTracker'
    function mouseDownOnCharacterIndex_atCoordinate_withModifier_client(theIndex: NSUInteger; thePoint: NSPoint; theFlags: NSUInteger; sender: id): Boolean; message 'mouseDownOnCharacterIndex:atCoordinate:withModifier:client:'; deprecated 'in Mac OS X 10.6 and later';
    function mouseDraggedOnCharacterIndex_atCoordinate_withModifier_client(theIndex: NSUInteger; thePoint: NSPoint; theFlags: NSUInteger; sender: id): Boolean; message 'mouseDraggedOnCharacterIndex:atCoordinate:withModifier:client:'; deprecated 'in Mac OS X 10.6 and later';
    procedure mouseUpOnCharacterIndex_atCoordinate_withModifier_client(theIndex: NSUInteger; thePoint: NSPoint; theFlags: NSUInteger; sender: id); message 'mouseUpOnCharacterIndex:atCoordinate:withModifier:client:'; deprecated 'in Mac OS X 10.6 and later';
  end;
{$endif}
{$endif}