| EventIDs | Type (Enumeration)

events.h

enum EventIDs {...};

An enumeration describing IDs of system messages.

EventIDs is enumerated type for describing ID numbers of system messages (they are stored in the Type field of the EVENT structure. All possible ID numbers (everything is in hex) are described in the following table. "Extra field" describes which subfield in extra union field of EVENT structure is used for storing extra information (if any). "(depr.)" after a name specifies that this name is deprecated.

Code | Message name | Description | Extra field
0x0 | CM_NOTHING |  |
0x1 - 0x4FF | CM_LAST_STRING_NUMBER | Built-in strings: Strings for the AMS are stored in a table for lanugage customization. EV_defaultHandler will turn these events into CM_PASTE_STRING events for the application to process. For compatibility with TI's Flash Studio, CM_LAST_STRING_NUMBER (0x4FF) is defined here. |
0x500 | CM_FIRST_APP_ID | Commands in the range 0x500 - 0x6FF are reserved for applications. Generally, these commands refer to Menu choices made by the user while running the application. |
0x700 | CM_FIRST_SYS_ID | Commands in the range 0x700 - 0x7BF are reserved for use by the AMS. |
0x700 | CM_NULL CM_IDLE (depr.) | Idle (idle is called after message sent). This message is sent to the active application when there are no other events to process. The application might use this event to take care of some background processing or update an animated display. This message is used for example in spinning of 3D graph. |
0x701 | CM_INIT | Init application. This message is sent from EV_centralDispatcher after a reset or when batteries are inserted. |

0x702

CM_START
CM_STARTTASK (depr.)

Start Task (in rect r). This message is sent to a task when it is being started. r is a rectangle with the requested window location and size chosen by the user from the mode screen settings. The application passes it to WinOpen to create its initial window. StartType field of the message is checked here (see EV_startTask), because some applications display a "Current/Open/New" submenu on the APPS menu, so this field is needed to tell the application which submenu command was selected by the user.

r

0x703 | CM_ACTIVATE | Activate. Applications usually respond to this message by highlighting their window border to make it apparent to the user which application is active, by setting menu command states, and by updating (or activating) registered menus (see EV_registerMenu. Calling EV_defaultHandler will register and start the default toolbar for the running application. |
0x704 | CM_FOCUS | Focus. Applications usually respond to this message by getting Mode options, and by giving the focus to the application editor (see TE_focus in textedit.h header file). This usually means making the cursor flashing. |
0x705 | CM_UNFOCUS | UnFocus. Usually used on switching sides. When used on the text editor, it means turning of the cursor flashing. |
0x706 | CM_DEACTIVATE | DeActivate. This message is sent to the active application to inform it that it no longer holds the interactive center of attention. Applications usually respond to this message by hiding menus and releasing the memory occupied by them. |
0x707 | CM_QUIT CM_ENDTASK (depr.) | End Task. Applications usually respond to this message by hiding windows and doing various cleanups. |
0x708 | CM_RESTART CM_START_CURRENT (depr.) | Start current. This message only notifies the current application that the user has chosen to start the same application again. Usually ignored. |
0x709 | CM_APD |  |
0x70A | CM_OFF |  |
0x70B | CM_ON | Sent to each application when the calculator is turned on after being turned off with ([2ND] [OFF]). This command is not sent if the calculator was turned off via APD (Auto Power Down). |
0x70C | CM_INSTALL | Sent to a FLASH application after it has been successfully installed on the calculator. This event will be sent when batteries are replaced, and after the FLASH app has been downloaded into the FLASH memory. |
0x70D | CM_UNINSTALL | Sent to a FLASH application before it is deleted from the FLASH memory. |
0x70E | CM_PACK | Tells a FLASH app that FLASH memory garbage collection is about to take place. All important settings should to be backed up using the application's public storage. |
0x70F | CM_UNPACK | Tells a FLASH app that FLASH memory garbage collection has finished. The application should restore any saved settings. |

0x710

CM_KEY_PRESS
CM_KEYPRESS (depr.)

Keypress. This is the most common event. Note that a lot of system and mode events (opening system menus, dialogs etc.) are also processed as keypresses. They all have correct keypresses attached to them (usually DIAMOND + ...). Tokens are usually send via EV_sendString and do not have to be processed as single keypresses. All special keypresses may be passed to EV_defaultHandler for further processing.

Key

0x720 | CM_CUT CM_MENU_CUT (depr.) | Menu command: Cut. Dedicated for cutting selected text to the clipboard. All similar (text editing) events should eventually be handled by TE_handleEvent (the default text editor handler). |
0x721 | CM_COPY CM_MENU_COPY (depr.) | Menu command: Copy. Dedicated for copying selected text to the clipboard. Should eventually be handled by the default text editor handler. |
0x722 | CM_PASTE CM_MENU_PASTE (depr.) | Menu command: Paste. Dedicated for pasting text from the clipboard to the edit buffer at the cursor position, replacing any eventually selected text. Should eventually be handled by the default text editor handler. |
0x723 | CM_PASTE_STRING CM_STRING (depr.) | Paste static (constant) text into the event paste buffer (in fact, it only sets a pointer to PasteText). See EV_eventLoop and EV_sendString. | PasteText
0x724 | CM_PASTE_HANDLE CM_HSTRING (depr.) | Paste dynamic text, associated with a handle. The handle is released back to the heap by the default text edit handler after the paste is complete. | hPasteText
0x725 | CM_DELETE CM_DEL (depr.) | DEL (backspace) keypress. Dedicated for deleting selected text, or one character to the left of the cursor if no text is selected. Should eventually be handled by the default text editor handler. |
0x726 | CM_CLEAR CM_CLR (depr.) | CLR keypress. Dedicated for clearing selected text (if no text is selected, clear from cursor to end of edit buffer, and if cursor is at end of edit buffer, clear all text from edit buffer). Should eventually be handled by the default text editor handler. |
0x727 | CM_CLEAR_ALL CM_MENU_CLEAR (depr.) | Menu command: Clear. The application should decide decides what it means. |
0x728 | CM_FIND CM_MENU_FIND (depr.) | Menu command: Find. The application should decide decides what it means. |
0x730 | CM_TOGGLE_INSERT CM_INSERT (depr.) | Insert key. Dedicated for switching between text insert mode and overstrike mode. Should eventually be handled by the default text editor handler. |
0x740 | CM_CURSOR_FLASH CM_BLINK (depr.) | Flash cursor (0.5 sec timer expired, see EV_eventLoop). |
0x750 | CM_STO CM_STORE (depr.) | "Store" keypress. The default handler convert this message to the right arrow character. |
0x751 | CM_RCL CM_RECALL (depr.) | "RCL" keypress. The default event handler displays a dialog box for the user to enter the name of a variable to recall. The chosen variable’s contents are pasted at the edit cursor. |

0x760

CM_WPAINT

Paint window. Pointer to a window which need to be painted is attached. Applications should check to see if it belongs to the application and to redraw it if it is. See EV_paintWindows. These are not sent to the capturing hook, unless an application ID number is set to CM_NULL (force redraw). WinOpen stores the current application ID number in TaskId field of WINDOW structure.

w

0x770 | CM_OPEN CM_MENU_OPEN (depr.) | Menu command: Open... (the application should decide how to handle this and similar event messages; there are no default actions for them). |
0x771 | CM_SAVE_AS CM_MENU_SAVE (depr.) | Menu command: Save Copy As... |
0x772 | CM_NEW CM_MENU_NEW (depr.) | Menu command: New... |
0x773 | CM_FORMAT CM_MENU_FORMAT (depr.) | Menu command: Format... |
0x774 | CM_ABOUT CM_MENU_ABOUT (depr.) | Menu command: About... |
0x780 | CM_MODE_CHANGE | Notify Mode Change (see MO_notifyModeChange). |
0x781 | CM_SWITCH_GRAPH | Notify Switch Graph (this message is sent to "Graph", "Window Editor", "Table" and "Y=Editor" applications only). This event is used when the user switches between graphs in two-graph mode. |
0x782 | CM_DEFAULTS | This command is sent when Reset->RAM->Default is executed in the MEMORY screen. Applications should revert to default settings. |
0x790 | CM_BACKGROUND | This command is sent to applications which have a special flag set in their ACB (Application Control Block). It is a very low priority message and is generally used for background processing. |
0x7C0 | CM_OPEN_SYSDATA CM_GEOMETRY (depr.) | Geometry Open Data. |
0x7C0 - 0x7FF |  | Used especially by AMS 1.xx to communicate between applications. This command has been largely replaced by using application frames on AMS 2.xx |
0x800 | CM_FIRST_APP_STRING |  |
0x800 - 0xFFF |  | On AMS 2.xx, applications store pointers to their strings in a frame. Messages in the range from 0x800 - 0xFFF are reserved for the active application's strings. For more information, see XR_stringPtr. |