picofuse-objc

NXRunLoop.h
Go to the documentation of this file.
1 
5 #pragma once
6 #include "NXEvent.h"
7 #include <picofuse/sys.h>
8 #include <stdint.h>
9 
17 @optional
18 
19 
24 - (void)runLoopDidStart:(NXRunLoop *)runLoop;
25 
30 - (void)runLoopWillStop:(NXRunLoop *)runLoop;
31 
32 @end
33 
50 @interface NXRunLoop : NXObject {
51 @private
52  size_t _capacity;
53  id<NXRunLoopDelegate> _delegate;
54  sys_event_queue_t *_queue;
55  void *_handler;
56  void *_poll;
57 }
58 
62 - (id)init;
63 
67 - (id)initWithCapacity:(size_t)capacity;
68 
73 
78 
82 - (void)setDelegate:(id<NXRunLoopDelegate>)delegate;
83 
92 - (int)runWithWorkers:(uint8_t)workers;
93 
97 - (BOOL)isRunning;
98 
103 - (void)shutdownWithStatus:(int)status;
104 
109 - (BOOL)post:(id<NXEvent>)event;
110 
118 - (BOOL)perform:(SEL)selector target:(id)target;
119 
127 - (BOOL)perform:(SEL)selector target:(id)target argument:(id)argument;
128 
129 @end
id< NXRunLoopDelegate > delegate()
Returns the delegate, which isn&#39;t retained.
id init()
Initializes a run loop with room for 32 events to wait.
bool BOOL
A Boolean value.
Definition: runtime.h:60
Dispatches events which are posted to it, on one or more workers, until it&#39;s shut down...
Definition: NXRunLoop.h:50
BOOL isRunning()
Returns YES if it&#39;s running.
The base class for objects in the Foundation framework.
Definition: NXObject.h:28
Defines the NXEvent protocol, for what a run loop dispatches.
struct objc_object * id
A pointer to an instance of a class.
Definition: runtime.h:18
What a run loop tells its delegate.
Definition: NXRunLoop.h:16
NXRunLoop * runningRunLoop()
Returns the run loop which is running, or nil if none is.