4 * Definitions of Glass internal broadcasts
6 * © 1994-1998 Straylight
9 /*----- Licensing note ----------------------------------------------------*
11 * This file is part of Straylight's Glass.
13 * Glass is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 2, or (at your option)
18 * Glass is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
23 * You should have received a copy of the GNU General Public License
24 * along with Glass. If not, write to the Free Software Foundation,
25 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
28 /*----- Header files ------------------------------------------------------*/
31 * ANSI standard headers
41 #include "steel/Steel.h"
50 /*----- Static variables --------------------------------------------------*/
53 * This array is to explain to intMsgs_send how many parameters there are
54 * for each message. -1 as an entry indicates special processing (i.e. the
55 * entries are not all 1 word in length.
58 static int intMsgs__parameters[]=
60 1, /* glass_DELETEWINDOW */
61 1, /* glass_DELETEFILE */
62 0, /* glass_KILLFILES */
63 0, /* glass_CLOSEDOWN */
65 1, /* glass_SAVEFILE */
67 1, /* glass_AUTOSAVE */
68 1, /* glass_SPRITECHANGE */
69 0, /* glass_MODECHANGE */
72 /*----- External routines -------------------------------------------------*/
75 * void intMsgs_send(glass_intMessage type,...)
78 * Sends out an internal broadcast message. The routine constructs a
79 * Message_StraylightInternal block and sends it out via win_broadcast.
80 * The parameters should be as for the entries in the appropriate
81 * structure, in order (i.e one for glass_DELETEWINDOW, two for
85 * glass_intMessage type == the message type. This is used to decide
86 * how many and what type of parameters to accept.
89 void intMsgs_send(glass_intMessage type,...)
95 e.data.msg.hdr.action=wimp_MINTERNAL;
96 e.data.msg.data.words[0]=type;
97 if (intMsgs__parameters[type]==-1)
102 werr(TRUE,msgs_lookup("imSMT"));
106 else for (i=1;i<=intMsgs__parameters[type];i++)
107 e.data.msg.data.words[i]=va_arg(ap,int);