

Instance Methods | |
| (int) | - run |
| Runs the application's run loop, until it's terminated. More... | |
| (NXRunLoop *) | - runLoop |
| Returns the application's run loop, to post events to. | |
| (NXEnvironment *) | - environment |
| Returns the command line and the system, from NXApplicationMain, or nil if it wasn't started with it. | |
| (NXMap *) | - flags |
| Returns the value of every flag given to NXApplicationMain, keyed by its long name, or nil if it wasn't started with it. | |
| (NXDeviceManager *) | - deviceManager |
| Returns the devices, such as the display, which NXApplicationMain made with NXApplicationFeatureDevices, or nil without it. | |
| (uint8_t) | - workers |
| Returns the number of workers, which is 0 for one on every core. | |
| (void) | - setWorkers: |
| Sets the number of workers, before it runs: 0 for one on every core, or 1, the default, to dispatch every event on the thread which runs it. | |
| (id< NXApplicationDelegate >) | - delegate |
| Returns the delegate, which isn't retained. | |
| (void) | - setDelegate: |
| Sets the delegate, which isn't retained. | |
| (void) | - terminateWithStatus: |
| Terminates it: once the events which have been posted are dispatched, run returns a status. | |
| (BOOL) | - attachEventSource: |
| Attaches an event source, such as a timer, which is retained until it's detached. More... | |
| (void) | - detachEventSource: |
| Detaches an event source, which stops producing events. More... | |
| (BOOL) | - attachDisplay: |
| Attaches a display, which is retained until it's detached, and drawn while it's attached and the application runs. More... | |
| (void) | - detachDisplay: |
| Detaches a display, which isn't drawn after that: if it's being drawn on another worker, this waits for its delegate to return, and its delegate can detach it, and release it, while it draws. | |
Instance Methods inherited from NXObject | |
| (void) | - dealloc |
| Frees the instance. More... | |
| (NXZone *) | - zone |
| Returns the zone in which the instance was allocated. More... | |
| (id) | - retain |
| Increases the retain count of the receiver. More... | |
| (void) | - release |
| Decreases the retain count of the receiver. More... | |
| (id) | - autorelease |
| Releases the receiver later, when the current autorelease pool of the thread is drained. More... | |
| (id) | - copy |
| Returns a copy which can't be changed by anything else, which the caller owns and has to release. More... | |
| (uintptr_t) | - hash |
| Returns a number for the object, which is the same for objects which are equal by isEqual:. More... | |
| (NXString *) | - description |
| Returns a string which describes the instance, for logging. More... | |
Instance Methods inherited from Object | |
| (id) | - init |
| Initialize the instance, after allocation. More... | |
| (Class) | - class |
| Returns the class of the instance. More... | |
| (Class) | - superclass |
| Returns the superclass of the instance. More... | |
| (BOOL) | - isEqual: |
| Compares the receiver to another object for equality. More... | |
| (BOOL) | - isKindOfClass: |
| Returns a Boolean value that indicates whether the receiver is an instance of a given class. More... | |
| (BOOL) | - conformsTo: |
| Checks if the receiver's class conforms to a protocol. More... | |
Instance Methods inherited from <ObjectProtocol> | |
| (BOOL) | - respondsToSelector: |
| Checks if the receiver responds to a selector. More... | |
Instance Methods inherited from <NXRunLoopDelegate> | |
| (void) | - runLoopDidStart: |
| Called on worker 0 when the run loop starts. More... | |
| (void) | - runLoopWillStop: |
| Called on the thread which ran the run loop, once it has stopped, every event which was posted has been dispatched, and every worker has finished. | |
Class Methods | |
| (NXApplication *) | + sharedApplication |
| Returns the application, which is made the first time, and never deallocated. | |
| (int) | + run |
| Runs the shared application, as -run does. | |
Class Methods inherited from NXObject | |
| (id) | + alloc |
| Allocates a new instance in the default zone, or if there isn't one, with sys_calloc(). More... | |
| (id) | + allocWithZone: |
| Allocates a new instance in a specific zone. More... | |
| (id) | + new |
| Allocates and initializes a new instance, as [[cls alloc] init] does. More... | |
| (NXString *) | + description |
| Returns the name of the class. | |
Class Methods inherited from Object | |
| (void) | + initialize |
| Performs one-time initialization for the class. More... | |
| (Class) | + class |
| Returns the class object. More... | |
| (Class) | + superclass |
| Returns the superclass of the class. More... | |
| (const char *) | + name |
| Returns the name of the class. More... | |
| (BOOL) | + conformsTo: |
| Checks if the class conforms to a protocol. More... | |
Additional Inherited Members | |
Protected Attributes inherited from Object | |
| Class | isa |
| A pointer to the object's class structure. More... | |
Definition at line 70 of file NXApplication.h.
Attaches a display, which is retained until it's detached, and drawn while it's attached and the application runs.
As -attachEventSource:.
Provided by category NXApplication(Graphics).
| - (BOOL) attachEventSource: | (id< NXEventSource >) | source |
Attaches an event source, such as a timer, which is retained until it's detached.
It starts producing events when the application runs, or straight away if it's running, and stops when the application stops, starting again if it runs again. If it can't start when the application runs, such as when there's no HID timer left, it's detached.
| - (void) detachEventSource: | (id< NXEventSource >) | source |
Detaches an event source, which stops producing events.
Those it produced which haven't been handled yet aren't.
| - (int) run |
Runs the application's run loop, until it's terminated.
The thread which calls this is worker 0.