2 * General type definitions
4 * Copyright 1998 Bertho A. Stultiens (BS)
8 #ifndef __WRC_WRCTYPES_H
9 #define __WRC_WRCTYPES_H
11 /* First is MS style, second wine style */
12 #if !defined(_INC_WINDOWS) && !defined(__WINE_WINDOWS_H)
20 #ifndef VS_FFI_SIGNATURE
25 /* Binary resource structure */
26 #define RES_BLOCKSIZE 512
29 int allocsize
; /* Allocated datablock size */
30 int size
; /* Actual size of data */
31 int dataidx
; /* Tag behind the resource-header */
35 /* Resource strings are slightly more complex because they include '\0' */
36 enum str_e
{str_char
, str_unicode
};
38 typedef struct string
{
47 /* Resources are identified either by name or by number */
48 enum name_e
{name_str
, name_ord
};
50 typedef struct name_id
{
58 /* Language definitions */
59 typedef struct language
{
64 typedef DWORD characts_t
;
65 typedef DWORD version_t
;
73 typedef struct font_id
{
81 /* These are in the same order (and ordinal) as the RT_xxx
82 * defines. This is _required_.
83 * I rolled my own numbers for the win32 extension that are
84 * documented, but generate either old RT_xxx numbers, or
85 * don't have an ordinal associated (user type).
86 * I don't know any specs for those noted such, for that matter,
87 * I don't even know whether they can be generated other than by
88 * using a user-type resource.
104 res_13
, /* Hm, wonder why its not used... */
108 res_dlginc
, /* Not implemented, no layout available */
110 res_pnp
, /* Not implemented, no layout available */
111 res_vxd
, /* Not implemented, no layout available */
112 res_anicur
, /* Not implemented, no layout available */
113 res_aniico
, /* Not implemented, no layout available */
120 /* Raw bytes in a row... */
121 typedef struct raw_data
{
126 /* Dialog structures */
127 typedef struct control
{
128 struct control
*next
; /* List of controls */
129 struct control
*prev
;
130 name_id_t
*ctlclass
; /* ControlClass */
131 string_t
*title
; /* Title of control */
133 int x
; /* Position */
135 int width
; /* Size */
137 DWORD style
; /* Style */
139 DWORD helpid
; /* EX: */
140 int gotstyle
; /* Used to determine whether the default */
141 int gotexstyle
; /* styles must be set */
143 raw_data_t
*extra
; /* EX: number of extra bytes in resource */
146 typedef struct dialog
{
148 int x
; /* Position */
150 int width
; /* Size */
152 DWORD style
; /* Style */
154 int gotstyle
; /* Used to determine whether the default */
155 int gotexstyle
; /* styles must be set */
164 /* DialogEx structures */
165 typedef struct dialogex
{
167 int x
; /* Position */
169 int width
; /* Size */
171 DWORD style
; /* Style */
173 DWORD helpid
; /* EX: */
174 int gotstyle
; /* Used to determine whether the default */
175 int gotexstyle
; /* styles must be set */
185 /* Menu structures */
186 typedef struct menu_item
{
187 struct menu_item
*next
;
188 struct menu_item
*prev
;
189 struct menu_item
*popup
;
195 typedef struct menu
{
201 /* MenuEx structures */
202 typedef struct menuex_item
{
203 struct menuex_item
*next
;
204 struct menuex_item
*prev
;
205 struct menuex_item
*popup
;
217 typedef struct menuex
{
220 menuex_item_t
*items
;
223 typedef struct itemex_opt
235 /* RC structures for types read from file or supplied binary */
236 typedef struct font
{
241 typedef struct icon_dir_entry
{
242 BYTE width
; /* From the SDK doc. */
252 typedef struct icon
{
256 int id
; /* Unique icon id within resource file */
257 int width
; /* Field from the IconDirEntry */
265 typedef struct icon_group
{
272 typedef struct cursor_dir_entry
{
273 BYTE width
; /* From the SDK doc. */
281 } cursor_dir_entry_t
;
283 typedef struct cursor
{
287 int id
; /* Unique icon id within resource file */
288 int width
; /* Field from the CursorDirEntry */
298 typedef struct cursor_group
{
301 cursor_t
*cursorlist
;
305 typedef struct bitmap
{
310 typedef struct rcdata
{
316 typedef struct user
{
322 typedef struct messagetable
{
326 /* StringTable structures */
327 typedef struct stt_entry
{
331 characts_t
*characts
;
335 typedef struct stringtable
{
336 struct stringtable
*next
;
337 struct stringtable
*prev
;
342 stt_entry_t
*entries
;
345 /* VersionInfo structures */
346 enum ver_val_e
{val_str
, val_words
, val_block
};
348 struct ver_block
; /* Forward ref */
350 typedef struct ver_words
{
355 typedef struct ver_value
{
356 struct ver_value
*next
;
357 struct ver_value
*prev
;
362 struct ver_block
*block
;
367 typedef struct ver_block
{
368 struct ver_block
*next
;
369 struct ver_block
*prev
;
374 typedef struct versioninfo
{
400 /* Accelerator structures */
401 #define WRC_AF_VIRTKEY 0x0001
402 #define WRC_AF_NOINVERT 0x0002
403 #define WRC_AF_SHIFT 0x0004
404 #define WRC_AF_CONTROL 0x0008
405 #define WRC_AF_ALT 0x0010
406 #define WRC_AF_ASCII 0x4000
408 typedef struct event
{
416 typedef struct accelerator
{
422 /* A top-level resource node */
423 typedef struct resource
{
424 struct resource
*next
;
425 struct resource
*prev
;
427 name_id_t
*name
; /* resource's name */
428 language_t
*lan
; /* Only used as a sorting key and c-name creation*/
433 cursor_group_t
*curg
;
446 void *overlay
; /* To catch all types at once... */
448 res_t
*binres
; /* To binary converted resource */
449 char *c_name
; /* BaseName in output */
454 typedef struct res32_count
{
459 typedef struct res_count
{
461 int count
; /* win16 mode */
462 resource_t
**rscarray
;
464 res32_count_t
*rsc32array
; /* win32 mode */