summaryrefslogtreecommitdiff
path: root/fpcsrc/packages/cocoaint/src/foundation/NSNotificationQueue.inc
blob: 173737d52cb535c2750493d95eaa215f33acd21b (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
{ Parsed from Foundation.framework NSNotificationQueue.h }

{$ifdef TYPES}
{$ifndef NSNOTIFICATIONQUEUE_PAS_T}
{$define NSNOTIFICATIONQUEUE_PAS_T}

{ Constants }

const
  NSPostWhenIdle = 1;
  NSPostASAP = 2;
  NSPostNow = 3;

const
  NSNotificationNoCoalescing = 0;
  NSNotificationCoalescingOnName = 1;
  NSNotificationCoalescingOnSender = 2;

{ Types }
type
  NSPostingStyle = NSUInteger;
  NSPostingStylePtr = ^NSPostingStyle;
  NSNotificationCoalescing = NSUInteger;
  NSNotificationCoalescingPtr = ^NSNotificationCoalescing;

{$endif}
{$endif}

{$ifdef RECORDS}
{$ifndef NSNOTIFICATIONQUEUE_PAS_R}
{$define NSNOTIFICATIONQUEUE_PAS_R}

{$endif}
{$endif}

{$ifdef FUNCTIONS}
{$ifndef NSNOTIFICATIONQUEUE_PAS_F}
{$define NSNOTIFICATIONQUEUE_PAS_F}

{$endif}
{$endif}

{$ifdef EXTERNAL_SYMBOLS}
{$ifndef NSNOTIFICATIONQUEUE_PAS_S}
{$define NSNOTIFICATIONQUEUE_PAS_S}

{$endif}
{$endif}

{$ifdef FORWARD}
  NSNotificationQueue = objcclass;
  NSNotificationQueuePointer = ^NSNotificationQueue;
  NSNotificationQueuePtr = NSNotificationQueuePointer;

{$endif}

{$ifdef CLASSES}
{$ifndef NSNOTIFICATIONQUEUE_PAS_C}
{$define NSNOTIFICATIONQUEUE_PAS_C}

{ NSNotificationQueue }
  NSNotificationQueue = objcclass external (NSObject)
  private
    _notificationCenter: id;
    _asapQueue: id;
    _asapObs: id;
    _idleQueue: id;
    _idleObs: id;
    
  public
    class function defaultQueue: id; message 'defaultQueue';
    function initWithNotificationCenter(notificationCenter: NSNotificationCenter): id; message 'initWithNotificationCenter:';
    procedure enqueueNotification_postingStyle(notification: NSNotification; postingStyle: NSPostingStyle); message 'enqueueNotification:postingStyle:';
    procedure enqueueNotification_postingStyle_coalesceMask_forModes(notification: NSNotification; postingStyle: NSPostingStyle; coalesceMask: NSUInteger; modes: NSArray); message 'enqueueNotification:postingStyle:coalesceMask:forModes:';
    procedure dequeueNotificationsMatching_coalesceMask(notification: NSNotification; coalesceMask: NSUInteger); message 'dequeueNotificationsMatching:coalesceMask:';
  end;

{$endif}
{$endif}