GEM pages
Home -> GEM -> AES -> AES messages

The symbol [!] is used to warn of features not available in all versions of PC GEM.

Messages sent by the PC GEM AES

All messages are 16 bytes long; the normal procedure is to treat them as eight 16-bit words, msg[0] to msg[7]. A message is formed:

msg[0] = message type (below)
msg[1] = application ID of sender;
msg[2] = length of additional data; if nonzero, use appl_read() 
         to read the additional data. Always 0 in messages sent by the AES.
msg[3-7] = message-specific data.

Menu manager

10 = MN_SELECTED

Sent when a menu option is chosen. msg[3] is the menu number, and msg[4] is the option number; these are indexes into the menu object trees.

Window manager

All window manager messages pass a window handle in msg[3].

If your application does not process a window message, GEM will do nothing. For example, if your program ignores WM_CLOSED, then the "close" button on the window will have no effect; there is no default action. This means (for example) that a window can modify a movement message before acting on it, so that it is always onscreen.

20 = WM_REDRAW

Sent when a window needs to be redrawn. msg[3] is the window handle and msg[4-7] are the rectangle that needs painting.

21 = WM_TOPPED

Sent when a window titlebar is clicked, or the user has asked it to be brought to the front of the screen by other means.

22 = WM_CLOSED

Sent when the "close" button is clicked; or, in ViewMAX, when ALT+F4 is pressed.

23 = WM_FULLED

Sent when the "maximise" button is clicked.

24 = WM_ARROWED

Sent when a window scrollbar moves by a page (click on scrollbar) or by a line (click on scrollbar arrow). msg[4] holds a subcode:

0: WA_UPPAGE  page up
1: WA_DNPAGE  page down
2: WA_UPLINE  line up
3: WA_DNLINE  line down
4: WA_LFPAGE  page left
5: WA_RTPAGE  page right
6: WA_LFLINE  line left
7: WA_RTLINE  line right

25 = WM_HSLID

Sent when the horizontal scrollbar is dragged. msg[4] holds new position, 1-1000.

26 = WM_VSLID

Sent when the vertical scrollbar is dragged. msg[4] holds new position, 1-1000.

27 = WM_SIZED

Sent when a window resize is requested. msg[4-7] hold the new window rectangle.

28 = WM_MOVED

Sent when a window is moved. msg[4-7] hold the new window rectangle.

29 = WM_NEWTOP

According to the PC GEM source: "not used as of 4/16/86". On the Atari, called to notify a window that it is about to be covered by another window.

30 = WM_UNTOPPED

Notifies a window it is no longer the top window. msg[4] is the new top window.

31 = WM_ONTOP

Not used in PC GEM.

32 = WM_OFFTOP

Not used in PC GEM.

33 = PR_FINISH

Not used in single-user GEM.

Accessories

40 = AC_OPEN

Sent to a desk accessory when its menu item is selected. msg[4] = menu item ID returned by the menu_register() call.

41 = AC_CLOSE

Sent to a desk accessory to make it close all its windows. msg[4] = menu item ID.

42 = AC_ABORT

Sent to a desk accessory to tell it to shut down (only used in multitasking GEM; in single-tasking GEM, desk accessories never terminate). Sent by GEM if proc_abort() is called.

50 = CT_UPDATE

51 = CT_MOVE

52 = CT_NEWTOP

These message IDs are defined in the GEM AES headers, but not used.

53 = CT_SWITCH

Used internally in GEM/XM to switch to another process. msg[3] = ID of the process to switch to.

Print spooler

100 = Add file to print spooler

This message should be sent to the CALCLOCK desk accessory to make it add a file to its list. The message should be:

    msg[0]   = 100
    msg[1]   = originating application ID
    msg[2]   = printer port (0=LPT1 1=LPT2 2=LPT3; -1 for default)
    msg[3]   = length of filename
    msg[4-5] = far pointer to filename
    msg[6]   = no. of copies
    msg[7]   = 1 to delete file after printing it

[!]The ViewMAX CALCLOCK accessory does not have a print spooler.

The message buffer cannot be freed until the spooler has sent an acknowledgement message.

101 = Acknowledge print job

This message is sent by the print spooler when a job has been added to the queue.

256 = GEM/4 help message.

Sent under various circumstances if the 'help' flag is set:


Return to archive listing