xref: /openbsd-src/gnu/usr.bin/binutils-2.17/binutils/windres.h (revision 3d8817e467ea46cf4772788d6804dd293abfb01a)
1*3d8817e4Smiod /* windres.h -- header file for windres program.
2*3d8817e4Smiod    Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005
3*3d8817e4Smiod    Free Software Foundation, Inc.
4*3d8817e4Smiod    Written by Ian Lance Taylor, Cygnus Support.
5*3d8817e4Smiod 
6*3d8817e4Smiod    This file is part of GNU Binutils.
7*3d8817e4Smiod 
8*3d8817e4Smiod    This program is free software; you can redistribute it and/or modify
9*3d8817e4Smiod    it under the terms of the GNU General Public License as published by
10*3d8817e4Smiod    the Free Software Foundation; either version 2 of the License, or
11*3d8817e4Smiod    (at your option) any later version.
12*3d8817e4Smiod 
13*3d8817e4Smiod    This program is distributed in the hope that it will be useful,
14*3d8817e4Smiod    but WITHOUT ANY WARRANTY; without even the implied warranty of
15*3d8817e4Smiod    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16*3d8817e4Smiod    GNU General Public License for more details.
17*3d8817e4Smiod 
18*3d8817e4Smiod    You should have received a copy of the GNU General Public License
19*3d8817e4Smiod    along with this program; if not, write to the Free Software
20*3d8817e4Smiod    Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
21*3d8817e4Smiod    02110-1301, USA.  */
22*3d8817e4Smiod 
23*3d8817e4Smiod #include "ansidecl.h"
24*3d8817e4Smiod 
25*3d8817e4Smiod /* This is the header file for the windres program.  It defines
26*3d8817e4Smiod    structures and declares functions used within the program.  */
27*3d8817e4Smiod 
28*3d8817e4Smiod #include "winduni.h"
29*3d8817e4Smiod 
30*3d8817e4Smiod /* We represent resources internally as a tree, similar to the tree
31*3d8817e4Smiod    used in the .rsrc section of a COFF file.  The root is a
32*3d8817e4Smiod    res_directory structure.  */
33*3d8817e4Smiod 
34*3d8817e4Smiod struct res_directory
35*3d8817e4Smiod {
36*3d8817e4Smiod   /* Resource flags.  According to the MS docs, this is currently
37*3d8817e4Smiod      always zero.  */
38*3d8817e4Smiod   unsigned long characteristics;
39*3d8817e4Smiod   /* Time/date stamp.  */
40*3d8817e4Smiod   unsigned long time;
41*3d8817e4Smiod   /* Major version number.  */
42*3d8817e4Smiod   unsigned short major;
43*3d8817e4Smiod   /* Minor version number.  */
44*3d8817e4Smiod   unsigned short minor;
45*3d8817e4Smiod   /* Directory entries.  */
46*3d8817e4Smiod   struct res_entry *entries;
47*3d8817e4Smiod };
48*3d8817e4Smiod 
49*3d8817e4Smiod /* A resource ID is stored in a res_id structure.  */
50*3d8817e4Smiod 
51*3d8817e4Smiod struct res_id
52*3d8817e4Smiod {
53*3d8817e4Smiod   /* Non-zero if this entry has a name rather than an ID.  */
54*3d8817e4Smiod   unsigned int named : 1;
55*3d8817e4Smiod   union
56*3d8817e4Smiod   {
57*3d8817e4Smiod     /* If the named field is non-zero, this is the name.  */
58*3d8817e4Smiod     struct
59*3d8817e4Smiod     {
60*3d8817e4Smiod       /* Length of the name.  */
61*3d8817e4Smiod       int length;
62*3d8817e4Smiod       /* Pointer to the name, which is a Unicode string.  */
63*3d8817e4Smiod       unichar *name;
64*3d8817e4Smiod     } n;
65*3d8817e4Smiod     /* If the named field is zero, this is the ID.  */
66*3d8817e4Smiod     unsigned long id;
67*3d8817e4Smiod   } u;
68*3d8817e4Smiod };
69*3d8817e4Smiod 
70*3d8817e4Smiod /* Each entry in the tree is a res_entry structure.  We mix
71*3d8817e4Smiod    directories and resources because in a COFF file all entries in a
72*3d8817e4Smiod    directory are sorted together, whether the entries are
73*3d8817e4Smiod    subdirectories or resources.  */
74*3d8817e4Smiod 
75*3d8817e4Smiod struct res_entry
76*3d8817e4Smiod {
77*3d8817e4Smiod   /* Next entry.  */
78*3d8817e4Smiod   struct res_entry *next;
79*3d8817e4Smiod   /* Resource ID.  */
80*3d8817e4Smiod   struct res_id id;
81*3d8817e4Smiod   /* Non-zero if this entry is a subdirectory rather than a leaf.  */
82*3d8817e4Smiod   unsigned int subdir : 1;
83*3d8817e4Smiod   union
84*3d8817e4Smiod   {
85*3d8817e4Smiod     /* If the subdir field is non-zero, this is a pointer to the
86*3d8817e4Smiod        subdirectory.  */
87*3d8817e4Smiod     struct res_directory *dir;
88*3d8817e4Smiod     /* If the subdir field is zero, this is a pointer to the resource
89*3d8817e4Smiod        data.  */
90*3d8817e4Smiod     struct res_resource *res;
91*3d8817e4Smiod   } u;
92*3d8817e4Smiod };
93*3d8817e4Smiod 
94*3d8817e4Smiod /* Types of resources.  */
95*3d8817e4Smiod 
96*3d8817e4Smiod enum res_type
97*3d8817e4Smiod {
98*3d8817e4Smiod   RES_TYPE_UNINITIALIZED,
99*3d8817e4Smiod   RES_TYPE_ACCELERATOR,
100*3d8817e4Smiod   RES_TYPE_BITMAP,
101*3d8817e4Smiod   RES_TYPE_CURSOR,
102*3d8817e4Smiod   RES_TYPE_GROUP_CURSOR,
103*3d8817e4Smiod   RES_TYPE_DIALOG,
104*3d8817e4Smiod   RES_TYPE_FONT,
105*3d8817e4Smiod   RES_TYPE_FONTDIR,
106*3d8817e4Smiod   RES_TYPE_ICON,
107*3d8817e4Smiod   RES_TYPE_GROUP_ICON,
108*3d8817e4Smiod   RES_TYPE_MENU,
109*3d8817e4Smiod   RES_TYPE_MESSAGETABLE,
110*3d8817e4Smiod   RES_TYPE_RCDATA,
111*3d8817e4Smiod   RES_TYPE_STRINGTABLE,
112*3d8817e4Smiod   RES_TYPE_USERDATA,
113*3d8817e4Smiod   RES_TYPE_VERSIONINFO
114*3d8817e4Smiod };
115*3d8817e4Smiod 
116*3d8817e4Smiod /* A res file and a COFF file store information differently.  The
117*3d8817e4Smiod    res_info structures holds data which in a res file is stored with
118*3d8817e4Smiod    each resource, but in a COFF file is stored elsewhere.  */
119*3d8817e4Smiod 
120*3d8817e4Smiod struct res_res_info
121*3d8817e4Smiod {
122*3d8817e4Smiod   /* Language.  In a COFF file, the third level of the directory is
123*3d8817e4Smiod      keyed by the language, so the language of a resource is defined
124*3d8817e4Smiod      by its location in the resource tree.  */
125*3d8817e4Smiod   unsigned short language;
126*3d8817e4Smiod   /* Characteristics of the resource.  Entirely user defined.  In a
127*3d8817e4Smiod      COFF file, the res_directory structure has a characteristics
128*3d8817e4Smiod      field, but I don't know if it's related to the one in the res
129*3d8817e4Smiod      file.  */
130*3d8817e4Smiod   unsigned long characteristics;
131*3d8817e4Smiod   /* Version of the resource.  Entirely user defined.  In a COFF file,
132*3d8817e4Smiod      the res_directory structure has a characteristics field, but I
133*3d8817e4Smiod      don't know if it's related to the one in the res file.  */
134*3d8817e4Smiod   unsigned long version;
135*3d8817e4Smiod   /* Memory flags.  This is a combination of the MEMFLAG values
136*3d8817e4Smiod      defined below.  Most of these values are historical, and are not
137*3d8817e4Smiod      meaningful for win32.  I don't think there is any way to store
138*3d8817e4Smiod      this information in a COFF file.  */
139*3d8817e4Smiod   unsigned short memflags;
140*3d8817e4Smiod };
141*3d8817e4Smiod 
142*3d8817e4Smiod /* Each resource in a COFF file has some information which can does
143*3d8817e4Smiod    not appear in a res file.  */
144*3d8817e4Smiod 
145*3d8817e4Smiod struct res_coff_info
146*3d8817e4Smiod {
147*3d8817e4Smiod   /* The code page used for the data.  I don't really know what this
148*3d8817e4Smiod      should be.  */
149*3d8817e4Smiod   unsigned long codepage;
150*3d8817e4Smiod   /* A resource entry in a COFF file has a reserved field, which we
151*3d8817e4Smiod      record here when reading a COFF file.  When writing a COFF file,
152*3d8817e4Smiod      we set this field to zero.  */
153*3d8817e4Smiod   unsigned long reserved;
154*3d8817e4Smiod };
155*3d8817e4Smiod 
156*3d8817e4Smiod /* Resource data is stored in a res_resource structure.  */
157*3d8817e4Smiod 
158*3d8817e4Smiod struct res_resource
159*3d8817e4Smiod {
160*3d8817e4Smiod   /* The type of resource.  */
161*3d8817e4Smiod   enum res_type type;
162*3d8817e4Smiod   /* The data for the resource.  */
163*3d8817e4Smiod   union
164*3d8817e4Smiod   {
165*3d8817e4Smiod     struct
166*3d8817e4Smiod     {
167*3d8817e4Smiod       unsigned long length;
168*3d8817e4Smiod       const unsigned char *data;
169*3d8817e4Smiod     } data;
170*3d8817e4Smiod     struct accelerator *acc;
171*3d8817e4Smiod     struct cursor *cursor;
172*3d8817e4Smiod     struct group_cursor *group_cursor;
173*3d8817e4Smiod     struct dialog *dialog;
174*3d8817e4Smiod     struct fontdir *fontdir;
175*3d8817e4Smiod     struct group_icon *group_icon;
176*3d8817e4Smiod     struct menu *menu;
177*3d8817e4Smiod     struct rcdata_item *rcdata;
178*3d8817e4Smiod     struct stringtable *stringtable;
179*3d8817e4Smiod     struct rcdata_item *userdata;
180*3d8817e4Smiod     struct versioninfo *versioninfo;
181*3d8817e4Smiod   } u;
182*3d8817e4Smiod   /* Information from a res file.  */
183*3d8817e4Smiod   struct res_res_info res_info;
184*3d8817e4Smiod   /* Information from a COFF file.  */
185*3d8817e4Smiod   struct res_coff_info coff_info;
186*3d8817e4Smiod };
187*3d8817e4Smiod 
188*3d8817e4Smiod #define SUBLANG_SHIFT 10
189*3d8817e4Smiod 
190*3d8817e4Smiod /* Memory flags in the memflags field of a struct res_resource.  */
191*3d8817e4Smiod 
192*3d8817e4Smiod #define MEMFLAG_MOVEABLE	0x10
193*3d8817e4Smiod #define MEMFLAG_PURE		0x20
194*3d8817e4Smiod #define MEMFLAG_PRELOAD		0x40
195*3d8817e4Smiod #define MEMFLAG_DISCARDABLE	0x1000
196*3d8817e4Smiod 
197*3d8817e4Smiod /* Standard resource type codes.  These are used in the ID field of a
198*3d8817e4Smiod    res_entry structure.  */
199*3d8817e4Smiod 
200*3d8817e4Smiod #define RT_CURSOR		 1
201*3d8817e4Smiod #define RT_BITMAP		 2
202*3d8817e4Smiod #define RT_ICON			 3
203*3d8817e4Smiod #define RT_MENU			 4
204*3d8817e4Smiod #define RT_DIALOG		 5
205*3d8817e4Smiod #define RT_STRING		 6
206*3d8817e4Smiod #define RT_FONTDIR		 7
207*3d8817e4Smiod #define RT_FONT			 8
208*3d8817e4Smiod #define RT_ACCELERATOR		 9
209*3d8817e4Smiod #define RT_RCDATA		10
210*3d8817e4Smiod #define RT_MESSAGETABLE		11
211*3d8817e4Smiod #define RT_GROUP_CURSOR		12
212*3d8817e4Smiod #define RT_GROUP_ICON		14
213*3d8817e4Smiod #define RT_VERSION		16
214*3d8817e4Smiod #define RT_DLGINCLUDE		17
215*3d8817e4Smiod #define RT_PLUGPLAY		19
216*3d8817e4Smiod #define RT_VXD			20
217*3d8817e4Smiod #define RT_ANICURSOR		21
218*3d8817e4Smiod #define RT_ANIICON		22
219*3d8817e4Smiod 
220*3d8817e4Smiod /* An accelerator resource is a linked list of these structures.  */
221*3d8817e4Smiod 
222*3d8817e4Smiod struct accelerator
223*3d8817e4Smiod {
224*3d8817e4Smiod   /* Next accelerator.  */
225*3d8817e4Smiod   struct accelerator *next;
226*3d8817e4Smiod   /* Flags.  A combination of the ACC values defined below.  */
227*3d8817e4Smiod   unsigned short flags;
228*3d8817e4Smiod   /* Key value.  */
229*3d8817e4Smiod   unsigned short key;
230*3d8817e4Smiod   /* Resource ID.  */
231*3d8817e4Smiod   unsigned short id;
232*3d8817e4Smiod };
233*3d8817e4Smiod 
234*3d8817e4Smiod /* Accelerator flags in the flags field of a struct accelerator.
235*3d8817e4Smiod    These are the same values that appear in a res file.  I hope.  */
236*3d8817e4Smiod 
237*3d8817e4Smiod #define ACC_VIRTKEY	0x01
238*3d8817e4Smiod #define ACC_NOINVERT	0x02
239*3d8817e4Smiod #define ACC_SHIFT	0x04
240*3d8817e4Smiod #define ACC_CONTROL	0x08
241*3d8817e4Smiod #define ACC_ALT		0x10
242*3d8817e4Smiod #define ACC_LAST	0x80
243*3d8817e4Smiod 
244*3d8817e4Smiod /* A cursor resource.  */
245*3d8817e4Smiod 
246*3d8817e4Smiod struct cursor
247*3d8817e4Smiod {
248*3d8817e4Smiod   /* X coordinate of hotspot.  */
249*3d8817e4Smiod   short xhotspot;
250*3d8817e4Smiod   /* Y coordinate of hotspot.  */
251*3d8817e4Smiod   short yhotspot;
252*3d8817e4Smiod   /* Length of bitmap data.  */
253*3d8817e4Smiod   unsigned long length;
254*3d8817e4Smiod   /* Data.  */
255*3d8817e4Smiod   const unsigned char *data;
256*3d8817e4Smiod };
257*3d8817e4Smiod 
258*3d8817e4Smiod /* A group_cursor resource is a list of group_cursor structures.  */
259*3d8817e4Smiod 
260*3d8817e4Smiod struct group_cursor
261*3d8817e4Smiod {
262*3d8817e4Smiod   /* Next cursor in group.  */
263*3d8817e4Smiod   struct group_cursor *next;
264*3d8817e4Smiod   /* Width.  */
265*3d8817e4Smiod   unsigned short width;
266*3d8817e4Smiod   /* Height.  */
267*3d8817e4Smiod   unsigned short height;
268*3d8817e4Smiod   /* Planes.  */
269*3d8817e4Smiod   unsigned short planes;
270*3d8817e4Smiod   /* Bits per pixel.  */
271*3d8817e4Smiod   unsigned short bits;
272*3d8817e4Smiod   /* Number of bytes in cursor resource.  */
273*3d8817e4Smiod   unsigned long bytes;
274*3d8817e4Smiod   /* Index of cursor resource.  */
275*3d8817e4Smiod   unsigned short index;
276*3d8817e4Smiod };
277*3d8817e4Smiod 
278*3d8817e4Smiod /* A dialog resource.  */
279*3d8817e4Smiod 
280*3d8817e4Smiod struct dialog
281*3d8817e4Smiod {
282*3d8817e4Smiod   /* Basic window style.  */
283*3d8817e4Smiod   unsigned long style;
284*3d8817e4Smiod   /* Extended window style.  */
285*3d8817e4Smiod   unsigned long exstyle;
286*3d8817e4Smiod   /* X coordinate.  */
287*3d8817e4Smiod   unsigned short x;
288*3d8817e4Smiod   /* Y coordinate.  */
289*3d8817e4Smiod   unsigned short y;
290*3d8817e4Smiod   /* Width.  */
291*3d8817e4Smiod   unsigned short width;
292*3d8817e4Smiod   /* Height.  */
293*3d8817e4Smiod   unsigned short height;
294*3d8817e4Smiod   /* Menu name.  */
295*3d8817e4Smiod   struct res_id menu;
296*3d8817e4Smiod   /* Class name.  */
297*3d8817e4Smiod   struct res_id class;
298*3d8817e4Smiod   /* Caption.  */
299*3d8817e4Smiod   unichar *caption;
300*3d8817e4Smiod   /* Font point size.  */
301*3d8817e4Smiod   unsigned short pointsize;
302*3d8817e4Smiod   /* Font name.  */
303*3d8817e4Smiod   unichar *font;
304*3d8817e4Smiod   /* Extended information for a dialogex.  */
305*3d8817e4Smiod   struct dialog_ex *ex;
306*3d8817e4Smiod   /* Controls.  */
307*3d8817e4Smiod   struct dialog_control *controls;
308*3d8817e4Smiod };
309*3d8817e4Smiod 
310*3d8817e4Smiod /* An extended dialog has additional information.  */
311*3d8817e4Smiod 
312*3d8817e4Smiod struct dialog_ex
313*3d8817e4Smiod {
314*3d8817e4Smiod   /* Help ID.  */
315*3d8817e4Smiod   unsigned long help;
316*3d8817e4Smiod   /* Font weight.  */
317*3d8817e4Smiod   unsigned short weight;
318*3d8817e4Smiod   /* Whether the font is italic.  */
319*3d8817e4Smiod   unsigned char italic;
320*3d8817e4Smiod   /* Character set.  */
321*3d8817e4Smiod   unsigned char charset;
322*3d8817e4Smiod };
323*3d8817e4Smiod 
324*3d8817e4Smiod /* Window style flags, from the winsup Defines.h header file.  These
325*3d8817e4Smiod    can appear in the style field of a struct dialog or a struct
326*3d8817e4Smiod    dialog_control.  */
327*3d8817e4Smiod 
328*3d8817e4Smiod #define CW_USEDEFAULT	(0x80000000)
329*3d8817e4Smiod #define WS_BORDER	(0x800000L)
330*3d8817e4Smiod #define WS_CAPTION	(0xc00000L)
331*3d8817e4Smiod #define WS_CHILD	(0x40000000L)
332*3d8817e4Smiod #define WS_CHILDWINDOW	(0x40000000L)
333*3d8817e4Smiod #define WS_CLIPCHILDREN	(0x2000000L)
334*3d8817e4Smiod #define WS_CLIPSIBLINGS	(0x4000000L)
335*3d8817e4Smiod #define WS_DISABLED	(0x8000000L)
336*3d8817e4Smiod #define WS_DLGFRAME	(0x400000L)
337*3d8817e4Smiod #define WS_GROUP	(0x20000L)
338*3d8817e4Smiod #define WS_HSCROLL	(0x100000L)
339*3d8817e4Smiod #define WS_ICONIC	(0x20000000L)
340*3d8817e4Smiod #define WS_MAXIMIZE	(0x1000000L)
341*3d8817e4Smiod #define WS_MAXIMIZEBOX	(0x10000L)
342*3d8817e4Smiod #define WS_MINIMIZE	(0x20000000L)
343*3d8817e4Smiod #define WS_MINIMIZEBOX	(0x20000L)
344*3d8817e4Smiod #define WS_OVERLAPPED	(0L)
345*3d8817e4Smiod #define WS_OVERLAPPEDWINDOW	(0xcf0000L)
346*3d8817e4Smiod #define WS_POPUP	(0x80000000L)
347*3d8817e4Smiod #define WS_POPUPWINDOW	(0x80880000L)
348*3d8817e4Smiod #define WS_SIZEBOX	(0x40000L)
349*3d8817e4Smiod #define WS_SYSMENU	(0x80000L)
350*3d8817e4Smiod #define WS_TABSTOP	(0x10000L)
351*3d8817e4Smiod #define WS_THICKFRAME	(0x40000L)
352*3d8817e4Smiod #define WS_TILED	(0L)
353*3d8817e4Smiod #define WS_TILEDWINDOW	(0xcf0000L)
354*3d8817e4Smiod #define WS_VISIBLE	(0x10000000L)
355*3d8817e4Smiod #define WS_VSCROLL	(0x200000L)
356*3d8817e4Smiod #define MDIS_ALLCHILDSTYLES	(0x1)
357*3d8817e4Smiod #define BS_3STATE	(0x5L)
358*3d8817e4Smiod #define BS_AUTO3STATE	(0x6L)
359*3d8817e4Smiod #define BS_AUTOCHECKBOX	(0x3L)
360*3d8817e4Smiod #define BS_AUTORADIOBUTTON	(0x9L)
361*3d8817e4Smiod #define BS_BITMAP	(0x80L)
362*3d8817e4Smiod #define BS_BOTTOM	(0x800L)
363*3d8817e4Smiod #define BS_CENTER	(0x300L)
364*3d8817e4Smiod #define BS_CHECKBOX	(0x2L)
365*3d8817e4Smiod #define BS_DEFPUSHBUTTON	(0x1L)
366*3d8817e4Smiod #define BS_GROUPBOX	(0x7L)
367*3d8817e4Smiod #define BS_ICON	(0x40L)
368*3d8817e4Smiod #define BS_LEFT	(0x100L)
369*3d8817e4Smiod #define BS_LEFTTEXT	(0x20L)
370*3d8817e4Smiod #define BS_MULTILINE	(0x2000L)
371*3d8817e4Smiod #define BS_NOTIFY	(0x4000L)
372*3d8817e4Smiod #define BS_OWNERDRAW	(0xbL)
373*3d8817e4Smiod #define BS_PUSHBOX	(0xcL)		/* FIXME!  What should this be?  */
374*3d8817e4Smiod #define BS_PUSHBUTTON	(0L)
375*3d8817e4Smiod #define BS_PUSHLIKE	(0x1000L)
376*3d8817e4Smiod #define BS_RADIOBUTTON	(0x4L)
377*3d8817e4Smiod #define BS_RIGHT	(0x200L)
378*3d8817e4Smiod #define BS_RIGHTBUTTON	(0x20L)
379*3d8817e4Smiod #define BS_TEXT	(0L)
380*3d8817e4Smiod #define BS_TOP	(0x400L)
381*3d8817e4Smiod #define BS_USERBUTTON	(0x8L)
382*3d8817e4Smiod #define BS_VCENTER	(0xc00L)
383*3d8817e4Smiod #define CBS_AUTOHSCROLL	(0x40L)
384*3d8817e4Smiod #define CBS_DISABLENOSCROLL	(0x800L)
385*3d8817e4Smiod #define CBS_DROPDOWN	(0x2L)
386*3d8817e4Smiod #define CBS_DROPDOWNLIST	(0x3L)
387*3d8817e4Smiod #define CBS_HASSTRINGS	(0x200L)
388*3d8817e4Smiod #define CBS_LOWERCASE	(0x4000L)
389*3d8817e4Smiod #define CBS_NOINTEGRALHEIGHT	(0x400L)
390*3d8817e4Smiod #define CBS_OEMCONVERT	(0x80L)
391*3d8817e4Smiod #define CBS_OWNERDRAWFIXED	(0x10L)
392*3d8817e4Smiod #define CBS_OWNERDRAWVARIABLE	(0x20L)
393*3d8817e4Smiod #define CBS_SIMPLE	(0x1L)
394*3d8817e4Smiod #define CBS_SORT	(0x100L)
395*3d8817e4Smiod #define CBS_UPPERCASE	(0x2000L)
396*3d8817e4Smiod #define ES_AUTOHSCROLL	(0x80L)
397*3d8817e4Smiod #define ES_AUTOVSCROLL	(0x40L)
398*3d8817e4Smiod #define ES_CENTER	(0x1L)
399*3d8817e4Smiod #define ES_LEFT	(0L)
400*3d8817e4Smiod #define ES_LOWERCASE	(0x10L)
401*3d8817e4Smiod #define ES_MULTILINE	(0x4L)
402*3d8817e4Smiod #define ES_NOHIDESEL	(0x100L)
403*3d8817e4Smiod #define ES_NUMBER	(0x2000L)
404*3d8817e4Smiod #define ES_OEMCONVERT	(0x400L)
405*3d8817e4Smiod #define ES_PASSWORD	(0x20L)
406*3d8817e4Smiod #define ES_READONLY	(0x800L)
407*3d8817e4Smiod #define ES_RIGHT	(0x2L)
408*3d8817e4Smiod #define ES_UPPERCASE	(0x8L)
409*3d8817e4Smiod #define ES_WANTRETURN	(0x1000L)
410*3d8817e4Smiod #define LBS_DISABLENOSCROLL	(0x1000L)
411*3d8817e4Smiod #define LBS_EXTENDEDSEL	(0x800L)
412*3d8817e4Smiod #define LBS_HASSTRINGS	(0x40L)
413*3d8817e4Smiod #define LBS_MULTICOLUMN	(0x200L)
414*3d8817e4Smiod #define LBS_MULTIPLESEL	(0x8L)
415*3d8817e4Smiod #define LBS_NODATA	(0x2000L)
416*3d8817e4Smiod #define LBS_NOINTEGRALHEIGHT	(0x100L)
417*3d8817e4Smiod #define LBS_NOREDRAW	(0x4L)
418*3d8817e4Smiod #define LBS_NOSEL	(0x4000L)
419*3d8817e4Smiod #define LBS_NOTIFY	(0x1L)
420*3d8817e4Smiod #define LBS_OWNERDRAWFIXED	(0x10L)
421*3d8817e4Smiod #define LBS_OWNERDRAWVARIABLE	(0x20L)
422*3d8817e4Smiod #define LBS_SORT	(0x2L)
423*3d8817e4Smiod #define LBS_STANDARD	(0xa00003L)
424*3d8817e4Smiod #define LBS_USETABSTOPS	(0x80L)
425*3d8817e4Smiod #define LBS_WANTKEYBOARDINPUT	(0x400L)
426*3d8817e4Smiod #define SBS_BOTTOMALIGN	(0x4L)
427*3d8817e4Smiod #define SBS_HORZ	(0L)
428*3d8817e4Smiod #define SBS_LEFTALIGN	(0x2L)
429*3d8817e4Smiod #define SBS_RIGHTALIGN	(0x4L)
430*3d8817e4Smiod #define SBS_SIZEBOX	(0x8L)
431*3d8817e4Smiod #define SBS_SIZEBOXBOTTOMRIGHTALIGN	(0x4L)
432*3d8817e4Smiod #define SBS_SIZEBOXTOPLEFTALIGN	(0x2L)
433*3d8817e4Smiod #define SBS_SIZEGRIP	(0x10L)
434*3d8817e4Smiod #define SBS_TOPALIGN	(0x2L)
435*3d8817e4Smiod #define SBS_VERT	(0x1L)
436*3d8817e4Smiod #define SS_BITMAP	(0xeL)
437*3d8817e4Smiod #define SS_BLACKFRAME	(0x7L)
438*3d8817e4Smiod #define SS_BLACKRECT	(0x4L)
439*3d8817e4Smiod #define SS_CENTER	(0x1L)
440*3d8817e4Smiod #define SS_CENTERIMAGE	(0x200L)
441*3d8817e4Smiod #define SS_ENHMETAFILE	(0xfL)
442*3d8817e4Smiod #define SS_ETCHEDFRAME	(0x12L)
443*3d8817e4Smiod #define SS_ETCHEDHORZ	(0x10L)
444*3d8817e4Smiod #define SS_ETCHEDVERT	(0x11L)
445*3d8817e4Smiod #define SS_GRAYFRAME	(0x8L)
446*3d8817e4Smiod #define SS_GRAYRECT	(0x5L)
447*3d8817e4Smiod #define SS_ICON	(0x3L)
448*3d8817e4Smiod #define SS_LEFT	(0L)
449*3d8817e4Smiod #define SS_LEFTNOWORDWRAP	(0xcL)
450*3d8817e4Smiod #define SS_NOPREFIX	(0x80L)
451*3d8817e4Smiod #define SS_NOTIFY	(0x100L)
452*3d8817e4Smiod #define SS_OWNERDRAW	(0xdL)
453*3d8817e4Smiod #define SS_REALSIZEIMAGE	(0x800L)
454*3d8817e4Smiod #define SS_RIGHT	(0x2L)
455*3d8817e4Smiod #define SS_RIGHTJUST	(0x400L)
456*3d8817e4Smiod #define SS_SIMPLE	(0xbL)
457*3d8817e4Smiod #define SS_SUNKEN	(0x1000L)
458*3d8817e4Smiod #define SS_USERITEM     (0xaL)
459*3d8817e4Smiod #define SS_WHITEFRAME	(0x9L)
460*3d8817e4Smiod #define SS_WHITERECT	(0x6L)
461*3d8817e4Smiod #define DS_3DLOOK	(0x4L)
462*3d8817e4Smiod #define DS_ABSALIGN	(0x1L)
463*3d8817e4Smiod #define DS_CENTER	(0x800L)
464*3d8817e4Smiod #define DS_CENTERMOUSE	(0x1000L)
465*3d8817e4Smiod #define DS_CONTEXTHELP	(0x2000L)
466*3d8817e4Smiod #define DS_CONTROL	(0x400L)
467*3d8817e4Smiod #define DS_FIXEDSYS	(0x8L)
468*3d8817e4Smiod #define DS_LOCALEDIT	(0x20L)
469*3d8817e4Smiod #define DS_MODALFRAME	(0x80L)
470*3d8817e4Smiod #define DS_NOFAILCREATE	(0x10L)
471*3d8817e4Smiod #define DS_NOIDLEMSG	(0x100L)
472*3d8817e4Smiod #define DS_SETFONT	(0x40L)
473*3d8817e4Smiod #define DS_SETFOREGROUND	(0x200L)
474*3d8817e4Smiod #define DS_SYSMODAL	(0x2L)
475*3d8817e4Smiod 
476*3d8817e4Smiod /* A dialog control.  */
477*3d8817e4Smiod 
478*3d8817e4Smiod struct dialog_control
479*3d8817e4Smiod {
480*3d8817e4Smiod   /* Next control.  */
481*3d8817e4Smiod   struct dialog_control *next;
482*3d8817e4Smiod   /* ID.  */
483*3d8817e4Smiod   unsigned short id;
484*3d8817e4Smiod   /* Style.  */
485*3d8817e4Smiod   unsigned long style;
486*3d8817e4Smiod   /* Extended style.  */
487*3d8817e4Smiod   unsigned long exstyle;
488*3d8817e4Smiod   /* X coordinate.  */
489*3d8817e4Smiod   unsigned short x;
490*3d8817e4Smiod   /* Y coordinate.  */
491*3d8817e4Smiod   unsigned short y;
492*3d8817e4Smiod   /* Width.  */
493*3d8817e4Smiod   unsigned short width;
494*3d8817e4Smiod   /* Height.  */
495*3d8817e4Smiod   unsigned short height;
496*3d8817e4Smiod   /* Class name.  */
497*3d8817e4Smiod   struct res_id class;
498*3d8817e4Smiod   /* Associated text.  */
499*3d8817e4Smiod   struct res_id text;
500*3d8817e4Smiod   /* Extra data for the window procedure.  */
501*3d8817e4Smiod   struct rcdata_item *data;
502*3d8817e4Smiod   /* Help ID.  Only used in an extended dialog.  */
503*3d8817e4Smiod   unsigned long help;
504*3d8817e4Smiod };
505*3d8817e4Smiod 
506*3d8817e4Smiod /* Control classes.  These can be used as the ID field in a struct
507*3d8817e4Smiod    dialog_control.  */
508*3d8817e4Smiod 
509*3d8817e4Smiod #define CTL_BUTTON	0x80
510*3d8817e4Smiod #define CTL_EDIT	0x81
511*3d8817e4Smiod #define CTL_STATIC	0x82
512*3d8817e4Smiod #define CTL_LISTBOX	0x83
513*3d8817e4Smiod #define CTL_SCROLLBAR	0x84
514*3d8817e4Smiod #define CTL_COMBOBOX	0x85
515*3d8817e4Smiod 
516*3d8817e4Smiod /* A fontdir resource is a list of fontdir structures.  */
517*3d8817e4Smiod 
518*3d8817e4Smiod struct fontdir
519*3d8817e4Smiod {
520*3d8817e4Smiod   struct fontdir *next;
521*3d8817e4Smiod   /* Index of font entry.  */
522*3d8817e4Smiod   short index;
523*3d8817e4Smiod   /* Length of font information.  */
524*3d8817e4Smiod   unsigned long length;
525*3d8817e4Smiod   /* Font information.  */
526*3d8817e4Smiod   const unsigned char *data;
527*3d8817e4Smiod };
528*3d8817e4Smiod 
529*3d8817e4Smiod /* A group_icon resource is a list of group_icon structures.  */
530*3d8817e4Smiod 
531*3d8817e4Smiod struct group_icon
532*3d8817e4Smiod {
533*3d8817e4Smiod   /* Next icon in group.  */
534*3d8817e4Smiod   struct group_icon *next;
535*3d8817e4Smiod   /* Width.  */
536*3d8817e4Smiod   unsigned char width;
537*3d8817e4Smiod   /* Height.  */
538*3d8817e4Smiod   unsigned char height;
539*3d8817e4Smiod   /* Color count.  */
540*3d8817e4Smiod   unsigned char colors;
541*3d8817e4Smiod   /* Planes.  */
542*3d8817e4Smiod   unsigned short planes;
543*3d8817e4Smiod   /* Bits per pixel.  */
544*3d8817e4Smiod   unsigned short bits;
545*3d8817e4Smiod   /* Number of bytes in cursor resource.  */
546*3d8817e4Smiod   unsigned long bytes;
547*3d8817e4Smiod   /* Index of cursor resource.  */
548*3d8817e4Smiod   unsigned short index;
549*3d8817e4Smiod };
550*3d8817e4Smiod 
551*3d8817e4Smiod /* A menu resource.  */
552*3d8817e4Smiod 
553*3d8817e4Smiod struct menu
554*3d8817e4Smiod {
555*3d8817e4Smiod   /* List of menuitems.  */
556*3d8817e4Smiod   struct menuitem *items;
557*3d8817e4Smiod   /* Help ID.  I don't think there is any way to set this in an rc
558*3d8817e4Smiod      file, but it can appear in the binary format.  */
559*3d8817e4Smiod   unsigned long help;
560*3d8817e4Smiod };
561*3d8817e4Smiod 
562*3d8817e4Smiod /* A menu resource is a list of menuitem structures.  */
563*3d8817e4Smiod 
564*3d8817e4Smiod struct menuitem
565*3d8817e4Smiod {
566*3d8817e4Smiod   /* Next menuitem.  */
567*3d8817e4Smiod   struct menuitem *next;
568*3d8817e4Smiod   /* Type.  In a normal menu, rather than a menuex, this is the flags
569*3d8817e4Smiod      field.  */
570*3d8817e4Smiod   unsigned long type;
571*3d8817e4Smiod   /* State.  This is only used in a menuex.  */
572*3d8817e4Smiod   unsigned long state;
573*3d8817e4Smiod   /* Id.  */
574*3d8817e4Smiod   unsigned short id;
575*3d8817e4Smiod   /* Unicode text.  */
576*3d8817e4Smiod   unichar *text;
577*3d8817e4Smiod   /* Popup menu items for a popup.  */
578*3d8817e4Smiod   struct menuitem *popup;
579*3d8817e4Smiod   /* Help ID.  This is only used in a menuex.  */
580*3d8817e4Smiod   unsigned long help;
581*3d8817e4Smiod };
582*3d8817e4Smiod 
583*3d8817e4Smiod /* Menu item flags.  These can appear in the flags field of a struct
584*3d8817e4Smiod    menuitem.  */
585*3d8817e4Smiod 
586*3d8817e4Smiod #define MENUITEM_GRAYED		0x001
587*3d8817e4Smiod #define MENUITEM_INACTIVE	0x002
588*3d8817e4Smiod #define MENUITEM_BITMAP		0x004
589*3d8817e4Smiod #define MENUITEM_OWNERDRAW	0x100
590*3d8817e4Smiod #define MENUITEM_CHECKED	0x008
591*3d8817e4Smiod #define MENUITEM_POPUP		0x010
592*3d8817e4Smiod #define MENUITEM_MENUBARBREAK	0x020
593*3d8817e4Smiod #define MENUITEM_MENUBREAK	0x040
594*3d8817e4Smiod #define MENUITEM_ENDMENU	0x080
595*3d8817e4Smiod #define MENUITEM_HELP	       0x4000
596*3d8817e4Smiod 
597*3d8817e4Smiod /* An rcdata resource is a pointer to a list of rcdata_item
598*3d8817e4Smiod    structures.  */
599*3d8817e4Smiod 
600*3d8817e4Smiod struct rcdata_item
601*3d8817e4Smiod {
602*3d8817e4Smiod   /* Next data item.  */
603*3d8817e4Smiod   struct rcdata_item *next;
604*3d8817e4Smiod   /* Type of data.  */
605*3d8817e4Smiod   enum
606*3d8817e4Smiod   {
607*3d8817e4Smiod     RCDATA_WORD,
608*3d8817e4Smiod     RCDATA_DWORD,
609*3d8817e4Smiod     RCDATA_STRING,
610*3d8817e4Smiod     RCDATA_WSTRING,
611*3d8817e4Smiod     RCDATA_BUFFER
612*3d8817e4Smiod   } type;
613*3d8817e4Smiod   union
614*3d8817e4Smiod   {
615*3d8817e4Smiod     unsigned int word;
616*3d8817e4Smiod     unsigned long dword;
617*3d8817e4Smiod     struct
618*3d8817e4Smiod     {
619*3d8817e4Smiod       unsigned long length;
620*3d8817e4Smiod       const char *s;
621*3d8817e4Smiod     } string;
622*3d8817e4Smiod     struct
623*3d8817e4Smiod     {
624*3d8817e4Smiod       unsigned long length;
625*3d8817e4Smiod       const unichar *w;
626*3d8817e4Smiod     } wstring;
627*3d8817e4Smiod     struct
628*3d8817e4Smiod     {
629*3d8817e4Smiod       unsigned long length;
630*3d8817e4Smiod       const unsigned char *data;
631*3d8817e4Smiod     } buffer;
632*3d8817e4Smiod   } u;
633*3d8817e4Smiod };
634*3d8817e4Smiod 
635*3d8817e4Smiod /* A stringtable resource is a pointer to a stringtable structure.  */
636*3d8817e4Smiod 
637*3d8817e4Smiod struct stringtable
638*3d8817e4Smiod {
639*3d8817e4Smiod   /* Each stringtable resource is a list of 16 unicode strings.  */
640*3d8817e4Smiod   struct
641*3d8817e4Smiod   {
642*3d8817e4Smiod     /* Length of string.  */
643*3d8817e4Smiod     int length;
644*3d8817e4Smiod     /* String data if length > 0.  */
645*3d8817e4Smiod     unichar *string;
646*3d8817e4Smiod   } strings[16];
647*3d8817e4Smiod };
648*3d8817e4Smiod 
649*3d8817e4Smiod /* A versioninfo resource points to a versioninfo structure.  */
650*3d8817e4Smiod 
651*3d8817e4Smiod struct versioninfo
652*3d8817e4Smiod {
653*3d8817e4Smiod   /* Fixed version information.  */
654*3d8817e4Smiod   struct fixed_versioninfo *fixed;
655*3d8817e4Smiod   /* Variable version information.  */
656*3d8817e4Smiod   struct ver_info *var;
657*3d8817e4Smiod };
658*3d8817e4Smiod 
659*3d8817e4Smiod /* The fixed portion of a versioninfo resource.  */
660*3d8817e4Smiod 
661*3d8817e4Smiod struct fixed_versioninfo
662*3d8817e4Smiod {
663*3d8817e4Smiod   /* The file version, which is two 32 bit integers.  */
664*3d8817e4Smiod   unsigned long file_version_ms;
665*3d8817e4Smiod   unsigned long file_version_ls;
666*3d8817e4Smiod   /* The product version, which is two 32 bit integers.  */
667*3d8817e4Smiod   unsigned long product_version_ms;
668*3d8817e4Smiod   unsigned long product_version_ls;
669*3d8817e4Smiod   /* The file flags mask.  */
670*3d8817e4Smiod   unsigned long file_flags_mask;
671*3d8817e4Smiod   /* The file flags.  */
672*3d8817e4Smiod   unsigned long file_flags;
673*3d8817e4Smiod   /* The OS type.  */
674*3d8817e4Smiod   unsigned long file_os;
675*3d8817e4Smiod   /* The file type.  */
676*3d8817e4Smiod   unsigned long file_type;
677*3d8817e4Smiod   /* The file subtype.  */
678*3d8817e4Smiod   unsigned long file_subtype;
679*3d8817e4Smiod   /* The date, which in Windows is two 32 bit integers.  */
680*3d8817e4Smiod   unsigned long file_date_ms;
681*3d8817e4Smiod   unsigned long file_date_ls;
682*3d8817e4Smiod };
683*3d8817e4Smiod 
684*3d8817e4Smiod /* A list of variable version information.  */
685*3d8817e4Smiod 
686*3d8817e4Smiod struct ver_info
687*3d8817e4Smiod {
688*3d8817e4Smiod   /* Next item.  */
689*3d8817e4Smiod   struct ver_info *next;
690*3d8817e4Smiod   /* Type of data.  */
691*3d8817e4Smiod   enum { VERINFO_STRING, VERINFO_VAR } type;
692*3d8817e4Smiod   union
693*3d8817e4Smiod   {
694*3d8817e4Smiod     /* StringFileInfo data.  */
695*3d8817e4Smiod     struct
696*3d8817e4Smiod     {
697*3d8817e4Smiod       /* Language.  */
698*3d8817e4Smiod       unichar *language;
699*3d8817e4Smiod       /* Strings.  */
700*3d8817e4Smiod       struct ver_stringinfo *strings;
701*3d8817e4Smiod     } string;
702*3d8817e4Smiod     /* VarFileInfo data.  */
703*3d8817e4Smiod     struct
704*3d8817e4Smiod     {
705*3d8817e4Smiod       /* Key.  */
706*3d8817e4Smiod       unichar *key;
707*3d8817e4Smiod       /* Values.  */
708*3d8817e4Smiod       struct ver_varinfo *var;
709*3d8817e4Smiod     } var;
710*3d8817e4Smiod   } u;
711*3d8817e4Smiod };
712*3d8817e4Smiod 
713*3d8817e4Smiod /* A list of string version information.  */
714*3d8817e4Smiod 
715*3d8817e4Smiod struct ver_stringinfo
716*3d8817e4Smiod {
717*3d8817e4Smiod   /* Next string.  */
718*3d8817e4Smiod   struct ver_stringinfo *next;
719*3d8817e4Smiod   /* Key.  */
720*3d8817e4Smiod   unichar *key;
721*3d8817e4Smiod   /* Value.  */
722*3d8817e4Smiod   unichar *value;
723*3d8817e4Smiod };
724*3d8817e4Smiod 
725*3d8817e4Smiod /* A list of variable version information.  */
726*3d8817e4Smiod 
727*3d8817e4Smiod struct ver_varinfo
728*3d8817e4Smiod {
729*3d8817e4Smiod   /* Next item.  */
730*3d8817e4Smiod   struct ver_varinfo *next;
731*3d8817e4Smiod   /* Language ID.  */
732*3d8817e4Smiod   unsigned short language;
733*3d8817e4Smiod   /* Character set ID.  */
734*3d8817e4Smiod   unsigned short charset;
735*3d8817e4Smiod };
736*3d8817e4Smiod 
737*3d8817e4Smiod /* This structure is used when converting resource information to
738*3d8817e4Smiod    binary.  */
739*3d8817e4Smiod 
740*3d8817e4Smiod struct bindata
741*3d8817e4Smiod {
742*3d8817e4Smiod   /* Next data.  */
743*3d8817e4Smiod   struct bindata *next;
744*3d8817e4Smiod   /* Length of data.  */
745*3d8817e4Smiod   unsigned long length;
746*3d8817e4Smiod   /* Data.  */
747*3d8817e4Smiod   unsigned char *data;
748*3d8817e4Smiod };
749*3d8817e4Smiod 
750*3d8817e4Smiod extern int verbose;
751*3d8817e4Smiod 
752*3d8817e4Smiod /* Function declarations.  */
753*3d8817e4Smiod 
754*3d8817e4Smiod extern struct res_directory *read_rc_file
755*3d8817e4Smiod   (const char *, const char *, const char *, int, int);
756*3d8817e4Smiod extern struct res_directory *read_res_file (const char *);
757*3d8817e4Smiod extern struct res_directory *read_coff_rsrc (const char *, const char *);
758*3d8817e4Smiod extern void write_rc_file (const char *, const struct res_directory *);
759*3d8817e4Smiod extern void write_res_file (const char *, const struct res_directory *);
760*3d8817e4Smiod extern void write_coff_file
761*3d8817e4Smiod   (const char *, const char *, const struct res_directory *);
762*3d8817e4Smiod 
763*3d8817e4Smiod extern struct res_resource *bin_to_res
764*3d8817e4Smiod   (struct res_id, const unsigned char *, unsigned long, int);
765*3d8817e4Smiod extern struct bindata *res_to_bin (const struct res_resource *, int);
766*3d8817e4Smiod 
767*3d8817e4Smiod extern FILE *open_file_search
768*3d8817e4Smiod   (const char *, const char *, const char *, char **);
769*3d8817e4Smiod 
770*3d8817e4Smiod extern void *res_alloc (size_t);
771*3d8817e4Smiod extern void *reswr_alloc (size_t);
772*3d8817e4Smiod 
773*3d8817e4Smiod /* Resource ID handling.  */
774*3d8817e4Smiod 
775*3d8817e4Smiod extern int res_id_cmp (struct res_id, struct res_id);
776*3d8817e4Smiod extern void res_id_print (FILE *, struct res_id, int);
777*3d8817e4Smiod extern void res_ids_print (FILE *, int, const struct res_id *);
778*3d8817e4Smiod extern void res_string_to_id (struct res_id *, const char *);
779*3d8817e4Smiod 
780*3d8817e4Smiod /* Manipulation of the resource tree.  */
781*3d8817e4Smiod 
782*3d8817e4Smiod extern struct res_resource *define_resource
783*3d8817e4Smiod   (struct res_directory **, int, const struct res_id *, int);
784*3d8817e4Smiod extern struct res_resource *define_standard_resource
785*3d8817e4Smiod   (struct res_directory **, int, struct res_id, int, int);
786*3d8817e4Smiod 
787*3d8817e4Smiod extern int extended_dialog (const struct dialog *);
788*3d8817e4Smiod extern int extended_menu (const struct menu *);
789*3d8817e4Smiod 
790*3d8817e4Smiod /* Communication between the rc file support and the parser and lexer.  */
791*3d8817e4Smiod 
792*3d8817e4Smiod extern int yydebug;
793*3d8817e4Smiod extern FILE *yyin;
794*3d8817e4Smiod extern char *rc_filename;
795*3d8817e4Smiod extern int rc_lineno;
796*3d8817e4Smiod 
797*3d8817e4Smiod extern int yyparse (void);
798*3d8817e4Smiod extern int yylex (void);
799*3d8817e4Smiod extern void yyerror (const char *);
800*3d8817e4Smiod extern void rcparse_warning (const char *);
801*3d8817e4Smiod extern void rcparse_set_language (int);
802*3d8817e4Smiod extern void rcparse_discard_strings (void);
803*3d8817e4Smiod extern void rcparse_rcdata (void);
804*3d8817e4Smiod extern void rcparse_normal (void);
805*3d8817e4Smiod 
806*3d8817e4Smiod extern void define_accelerator
807*3d8817e4Smiod   (struct res_id, const struct res_res_info *, struct accelerator *);
808*3d8817e4Smiod extern void define_bitmap
809*3d8817e4Smiod   (struct res_id, const struct res_res_info *, const char *);
810*3d8817e4Smiod extern void define_cursor
811*3d8817e4Smiod   (struct res_id, const struct res_res_info *, const char *);
812*3d8817e4Smiod extern void define_dialog
813*3d8817e4Smiod   (struct res_id, const struct res_res_info *, const struct dialog *);
814*3d8817e4Smiod extern struct dialog_control *define_control
815*3d8817e4Smiod   (const struct res_id, unsigned long, unsigned long, unsigned long,
816*3d8817e4Smiod    unsigned long, unsigned long, unsigned long, unsigned long, unsigned long);
817*3d8817e4Smiod extern struct dialog_control *define_icon_control
818*3d8817e4Smiod   (struct res_id, unsigned long, unsigned long, unsigned long, unsigned long,
819*3d8817e4Smiod    unsigned long, unsigned long, struct rcdata_item *, struct dialog_ex *);
820*3d8817e4Smiod extern void define_font
821*3d8817e4Smiod   (struct res_id, const struct res_res_info *, const char *);
822*3d8817e4Smiod extern void define_icon
823*3d8817e4Smiod   (struct res_id, const struct res_res_info *, const char *);
824*3d8817e4Smiod extern void define_menu
825*3d8817e4Smiod   (struct res_id, const struct res_res_info *, struct menuitem *);
826*3d8817e4Smiod extern struct menuitem *define_menuitem
827*3d8817e4Smiod   (const char *, int, unsigned long, unsigned long, unsigned long,
828*3d8817e4Smiod    struct menuitem *);
829*3d8817e4Smiod extern void define_messagetable
830*3d8817e4Smiod   (struct res_id, const struct res_res_info *, const char *);
831*3d8817e4Smiod extern void define_rcdata
832*3d8817e4Smiod   (struct res_id, const struct res_res_info *, struct rcdata_item *);
833*3d8817e4Smiod extern void define_rcdata_file
834*3d8817e4Smiod   (struct res_id, const struct res_res_info *, const char *);
835*3d8817e4Smiod extern struct rcdata_item *define_rcdata_string
836*3d8817e4Smiod   (const char *, unsigned long);
837*3d8817e4Smiod extern struct rcdata_item *define_rcdata_number (unsigned long, int);
838*3d8817e4Smiod extern void define_stringtable
839*3d8817e4Smiod   (const struct res_res_info *, unsigned long, const char *);
840*3d8817e4Smiod extern void define_user_data
841*3d8817e4Smiod   (struct res_id, struct res_id, const struct res_res_info *,
842*3d8817e4Smiod    struct rcdata_item *);
843*3d8817e4Smiod extern void define_user_file
844*3d8817e4Smiod   (struct res_id, struct res_id, const struct res_res_info *, const char *);
845*3d8817e4Smiod extern void define_versioninfo
846*3d8817e4Smiod   (struct res_id, int, struct fixed_versioninfo *, struct ver_info *);
847*3d8817e4Smiod extern struct ver_info *append_ver_stringfileinfo
848*3d8817e4Smiod   (struct ver_info *, const char *, struct ver_stringinfo *);
849*3d8817e4Smiod extern struct ver_info *append_ver_varfileinfo
850*3d8817e4Smiod   (struct ver_info *, const char *, struct ver_varinfo *);
851*3d8817e4Smiod extern struct ver_stringinfo *append_verval
852*3d8817e4Smiod   (struct ver_stringinfo *, const char *, const char *);
853*3d8817e4Smiod extern struct ver_varinfo *append_vertrans
854*3d8817e4Smiod   (struct ver_varinfo *, unsigned long, unsigned long);
855