Creates a new window in the window manager.
The CCWindow instance this window is for
The X position of the window, or undefined to let the WM choose
The Y position of the window, or undefined to let the WM choose
The width of the window
The height of the window
The title for the window
Options to specify for the window
A new window framebuffer target, or undefined if it couldn't be created
Waits for an event from the window manager or operating system.
An event to post to the application
OptionalsetSets the application name and icon, for use in a task manager.
The title of the app
The icon for the app, which should be exactly 2x1
OptionalupdateUpdates the window manager with the app's current menu state. Each item
corresponds to a main menu button in the titlebar, though note that the
first item will always be given the title of the app, regardless of its
title field.
The menus to display in the menu bar
If the app is waiting for an event in pullEvent, this function will cause it to wake up and return an empty CCEvent (which will be ignored). This is used to handle CCKit events immediately.
If the app is not waiting for an event, this function should do nothing.
The CCWindowManagerConnection interface is used by classes that implement a connection to a window server, which hosts all of the windows and handles things like drawing, decorations, positioning, and occlusion.
This allows apps to run on multiple platforms both with and without external window servers. For example, CraftOS systems can use the CCCraftOSWindowManager class to run a single-application window server, while Phoenix systems can use the CCPhoenixWMConnection class to connect to a multi-app PhoenixWM window server.
Use the CCDefaultWindowManagerConnection function to acquire an instance of CCWindowManagerConnection that's most appropriate for the current platform.