Whether the object can become the first responder.
OptionalappearanceThe desired appearance of the app.
OptionalappThe icon for the app.
A delegate object to receive lifecycle notifications.
Whether the current app is the active app.
Whether the app is currently hidden.
Whether the main loop is currently running.
OptionalkeyThe key window, which gets input events.
OptionalmainThe main window of the application.
OptionalmodalThe modal window being displayed, if it exists.
OptionalnextThe next responder in the responder chain.
A list of all windows in the application.
The connection to the window manager for the app.
StaticsharedThe CCApplication instance for the current app.
The event currently being processed.
Aborts a modal run loop.
Activates the app.
If false, will not activate if another app is already active
Notifies the object that it's about to become the first responder.
Whether to accept the first responder status
This is used to place a blinking cursor on screen while not drawing. It's only called on the first responder of a window.
The position and color of the cursor in window coordinates, or undefined to not place a cursor
Deactivates the app.
Discards any event matching the specified event name, optionally only before another event.
The event name to match
Optionalbefore: CCEventIf provided, only events before this event will be removed
Called to activate the application before starting the main loop.
Hides the app from the screen, activating the next app.
Sends a list of key input events to the input manager, which will send
back text input events through insertText(text: string).
The input events to send
Returns the first event in the queue which matches the specified name.
The event name to match
Whether to pop the event from the queue
The matching event, or null if not found
Handles when a method action fails to find a responder.
The method that was attempted
Adds an event to the event queue, to be processed by the run loop.
The event to queue
Whether to add it to the front of the queue
Follows up to a previous response from the app delegate to delay termination.
Whether to terminate the app now
Notifies the object that it's about to no longer be the first responder.
Whether to resign first responder status
Runs a modal event loop for a window, pausing event processing until the window is closed and the modal state is cleared.
The modal window to show
A response code indicating how the modal exited
Shows an About window for the app.
Optionaloptions: {Any options to pass to the window
Shows a character palette window.
Shows a color picker dialog.
Stops the event loop.
Stops a modal event loop in progress.
Optionalcode: ModalResponseIf specified, a code to return from runModal
Sends a notification to terminate the app.
Attempts to call the specified method on the object, passing the call on to the next responder if this object doesn't implement it.
The name of the method to call
Any parameters to pass to the method
Whether a responder was able to respond to the method
Unhides and (optionally) activates the app.
Optionalactivate: booleanWhether to also activate the app
Updates all windows in the application.
Checks whether the passed object can become the first responder from the specified event.
The object to check
The event that was sent
Whether the object is allowed to be the first responder
The CCApplication class is the main class that controls the app run loop, handles events, and manages the lifecycle of the program.