1 /* windint.h -- internal header file for windres program.
2 Copyright (C) 1997-2019 Free Software Foundation, Inc.
3 Written by Kai Tietz, Onevision.
5 This file is part of GNU Binutils.
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
27 /* Use bfd_size_type to ensure a sufficient number of bits. */
28 #ifndef DEFINED_RC_UINT_TYPE
29 #define DEFINED_RC_UINT_TYPE
30 typedef bfd_size_type rc_uint_type
;
33 /* Resource directory structure. */
35 typedef struct res_hdr
37 rc_uint_type data_size
;
38 rc_uint_type header_size
;
41 struct __attribute__ ((__packed__
)) bin_res_hdr
43 bfd_byte data_size
[4];
44 bfd_byte header_size
[4];
46 #define BIN_RES_HDR_SIZE 8
48 struct __attribute__ ((__packed__
)) bin_res_id
50 bfd_byte sig
[2]; /* Has to be 0xffff for unnamed ids. */
55 /* This structure is used when converting resource information to
58 typedef struct bindata
68 /* This structure is used when converting resource information to
70 typedef struct coff_res_data
73 struct coff_res_data
*next
;
77 const struct rc_res_resource
*res
;
80 /* We represent resources internally as a tree, similar to the tree
81 used in the .rsrc section of a COFF file. The root is a
82 rc_res_directory structure. */
84 typedef struct rc_res_directory
86 /* Resource flags. According to the MS docs, this is currently
88 rc_uint_type characteristics
;
89 /* Time/date stamp. */
91 /* Major version number. */
93 /* Minor version number. */
95 /* Directory entries. */
96 struct rc_res_entry
*entries
;
99 /* A resource ID is stored in a rc_res_id structure. */
101 typedef struct rc_res_id
103 /* Non-zero if this entry has a name rather than an ID. */
104 rc_uint_type named
: 1;
107 /* If the named field is non-zero, this is the name. */
110 /* Length of the name. */
112 /* Pointer to the name, which is a Unicode string. */
115 /* If the named field is zero, this is the ID. */
120 /* Each entry in the tree is a rc_res_entry structure. We mix
121 directories and resources because in a COFF file all entries in a
122 directory are sorted together, whether the entries are
123 subdirectories or resources. */
125 typedef struct rc_res_entry
128 struct rc_res_entry
*next
;
131 /* Non-zero if this entry is a subdirectory rather than a leaf. */
132 rc_uint_type subdir
: 1;
135 /* If the subdir field is non-zero, this is a pointer to the
137 rc_res_directory
*dir
;
138 /* If the subdir field is zero, this is a pointer to the resource
140 struct rc_res_resource
*res
;
144 /* Types of resources. */
148 RES_TYPE_UNINITIALIZED
,
149 RES_TYPE_ACCELERATOR
,
152 RES_TYPE_GROUP_CURSOR
,
159 RES_TYPE_MESSAGETABLE
,
161 RES_TYPE_STRINGTABLE
,
163 RES_TYPE_VERSIONINFO
,
173 /* A res file and a COFF file store information differently. The
174 res_info structures holds data which in a res file is stored with
175 each resource, but in a COFF file is stored elsewhere. */
177 typedef struct rc_res_res_info
179 /* Language. In a COFF file, the third level of the directory is
180 keyed by the language, so the language of a resource is defined
181 by its location in the resource tree. */
182 rc_uint_type language
;
183 /* Characteristics of the resource. Entirely user defined. In a
184 COFF file, the rc_res_directory structure has a characteristics
185 field, but I don't know if it's related to the one in the res
187 rc_uint_type characteristics
;
188 /* Version of the resource. Entirely user defined. In a COFF file,
189 the rc_res_directory structure has a characteristics field, but I
190 don't know if it's related to the one in the res file. */
191 rc_uint_type version
;
192 /* Memory flags. This is a combination of the MEMFLAG values
193 defined below. Most of these values are historical, and are not
194 meaningful for win32. I don't think there is any way to store
195 this information in a COFF file. */
196 rc_uint_type memflags
;
199 /* Binary layout of rc_res_info. */
201 struct __attribute__ ((__packed__
)) bin_res_info
204 bfd_byte memflags
[2];
205 bfd_byte language
[2];
206 bfd_byte version2
[4];
207 bfd_byte characteristics
[4];
209 #define BIN_RES_INFO_SIZE 16
211 /* Each resource in a COFF file has some information which can does
212 not appear in a res file. */
214 typedef struct rc_res_coff_info
216 /* The code page used for the data. I don't really know what this
217 should be. It has something todo with ASCII to Unicode encoding. */
218 rc_uint_type codepage
;
219 /* A resource entry in a COFF file has a reserved field, which we
220 record here when reading a COFF file. When writing a COFF file,
221 we set this field to zero. */
222 rc_uint_type reserved
;
225 /* Resource data is stored in a rc_res_resource structure. */
227 typedef struct rc_res_resource
229 /* The type of resource. */
230 enum rc_res_type type
;
231 /* The data for the resource. */
237 const bfd_byte
*data
;
239 struct rc_accelerator
*acc
;
240 struct rc_cursor
*cursor
;
241 struct rc_group_cursor
*group_cursor
;
242 struct rc_dialog
*dialog
;
243 struct rc_fontdir
*fontdir
;
244 struct rc_group_icon
*group_icon
;
245 struct rc_menu
*menu
;
246 struct rc_rcdata_item
*rcdata
;
247 struct rc_stringtable
*stringtable
;
248 struct rc_rcdata_item
*userdata
;
249 struct rc_versioninfo
*versioninfo
;
250 struct rc_toolbar
*toolbar
;
252 /* Information from a res file. */
253 struct rc_res_res_info res_info
;
254 /* Information from a COFF file. */
255 rc_res_coff_info coff_info
;
258 #define SUBLANG_SHIFT 10
260 /* Memory flags in the memflags field of a rc_res_resource. */
262 #define MEMFLAG_MOVEABLE 0x10
263 #define MEMFLAG_PURE 0x20
264 #define MEMFLAG_PRELOAD 0x40
265 #define MEMFLAG_DISCARDABLE 0x1000
267 /* Standard resource type codes. These are used in the ID field of a
268 rc_res_entry structure. */
278 #define RT_ACCELERATOR 9
280 #define RT_MESSAGETABLE 11
281 #define RT_GROUP_CURSOR 12
282 #define RT_GROUP_ICON 14
283 #define RT_VERSION 16
284 #define RT_DLGINCLUDE 17
285 #define RT_PLUGPLAY 19
287 #define RT_ANICURSOR 21
288 #define RT_ANIICON 22
290 #define RT_MANIFEST 24
291 #define RT_DLGINIT 240
292 #define RT_TOOLBAR 241
294 /* An accelerator resource is a linked list of these structures. */
296 typedef struct rc_accelerator
298 /* Next accelerator. */
299 struct rc_accelerator
*next
;
300 /* Flags. A combination of the ACC values defined below. */
308 struct __attribute__ ((__packed__
)) bin_accelerator
315 #define BIN_ACCELERATOR_SIZE 8
317 /* Accelerator flags in the flags field of a rc_accelerator.
318 These are the same values that appear in a res file. I hope. */
320 #define ACC_VIRTKEY 0x01
321 #define ACC_NOINVERT 0x02
322 #define ACC_SHIFT 0x04
323 #define ACC_CONTROL 0x08
325 #define ACC_LAST 0x80
327 /* A cursor resource. */
329 typedef struct rc_cursor
331 /* X coordinate of hotspot. */
332 bfd_signed_vma xhotspot
;
333 /* Y coordinate of hotspot. */
334 bfd_signed_vma yhotspot
;
335 /* Length of bitmap data. */
338 const bfd_byte
*data
;
341 struct __attribute__ ((__packed__
)) bin_cursor
343 bfd_byte xhotspot
[2];
344 bfd_byte yhotspot
[2];
346 #define BIN_CURSOR_SIZE 4
348 /* A group_cursor resource is a list of rc_i_group_cursor structures. */
350 typedef struct rc_group_cursor
352 /* Next cursor in group. */
353 struct rc_group_cursor
*next
;
360 /* Bits per pixel. */
362 /* Number of bytes in cursor resource. */
364 /* Index of cursor resource. */
368 struct __attribute__ ((__packed__
)) bin_group_cursor_item
377 #define BIN_GROUP_CURSOR_ITEM_SIZE 14
379 struct __attribute__ ((__packed__
)) bin_group_cursor
384 /* struct bin_group_cursor_item item[nitems]; */
386 #define BIN_GROUP_CURSOR_SIZE 6
388 /* A dialog resource. */
390 typedef struct rc_dialog
392 /* Basic window style. */
394 /* Extended window style. */
395 rc_uint_type exstyle
;
410 /* Font point size. */
411 rc_uint_type pointsize
;
414 /* Extended information for a dialogex. */
415 struct rc_dialog_ex
*ex
;
417 struct rc_dialog_control
*controls
;
420 struct __attribute__ ((__packed__
)) bin_dialog
430 #define BIN_DIALOG_SIZE 18
432 /* An extended dialog has additional information. */
434 typedef struct rc_dialog_ex
440 /* Whether the font is italic. */
446 struct __attribute__ ((__packed__
)) bin_dialogex
459 #define BIN_DIALOGEX_SIZE 26
461 struct __attribute__ ((__packed__
)) bin_dialogfont
463 bfd_byte pointsize
[2];
465 #define BIN_DIALOGFONT_SIZE 2
467 struct __attribute__ ((__packed__
)) bin_dialogexfont
469 bfd_byte pointsize
[2];
474 #define BIN_DIALOGEXFONT_SIZE 6
476 /* Window style flags, from the winsup Defines.h header file. These
477 can appear in the style field of a rc_dialog or a rc_dialog_control. */
479 #define CW_USEDEFAULT 0x80000000
480 #define WS_BORDER 0x800000L
481 #define WS_CAPTION 0xc00000L
482 #define WS_CHILD 0x40000000L
483 #define WS_CHILDWINDOW 0x40000000L
484 #define WS_CLIPCHILDREN 0x2000000L
485 #define WS_CLIPSIBLINGS 0x4000000L
486 #define WS_DISABLED 0x8000000L
487 #define WS_DLGFRAME 0x400000L
488 #define WS_GROUP 0x20000L
489 #define WS_HSCROLL 0x100000L
490 #define WS_ICONIC 0x20000000L
491 #define WS_MAXIMIZE 0x1000000L
492 #define WS_MAXIMIZEBOX 0x10000L
493 #define WS_MINIMIZE 0x20000000L
494 #define WS_MINIMIZEBOX 0x20000L
495 #define WS_OVERLAPPED 0L
496 #define WS_OVERLAPPEDWINDOW 0xcf0000L
497 #define WS_POPUP 0x80000000L
498 #define WS_POPUPWINDOW 0x80880000L
499 #define WS_SIZEBOX 0x40000L
500 #define WS_SYSMENU 0x80000L
501 #define WS_TABSTOP 0x10000L
502 #define WS_THICKFRAME 0x40000L
504 #define WS_TILEDWINDOW 0xcf0000L
505 #define WS_VISIBLE 0x10000000L
506 #define WS_VSCROLL 0x200000L
507 #define MDIS_ALLCHILDSTYLES 0x1
508 #define BS_3STATE 0x5L
509 #define BS_AUTO3STATE 0x6L
510 #define BS_AUTOCHECKBOX 0x3L
511 #define BS_AUTORADIOBUTTON 0x9L
512 #define BS_BITMAP 0x80L
513 #define BS_BOTTOM 0x800L
514 #define BS_CENTER 0x300L
515 #define BS_CHECKBOX 0x2L
516 #define BS_DEFPUSHBUTTON 0x1L
517 #define BS_GROUPBOX 0x7L
518 #define BS_ICON 0x40L
519 #define BS_LEFT 0x100L
520 #define BS_LEFTTEXT 0x20L
521 #define BS_MULTILINE 0x2000L
522 #define BS_NOTIFY 0x4000L
523 #define BS_OWNERDRAW 0xbL
524 #define BS_PUSHBOX 0xcL /* FIXME! What should this be? */
525 #define BS_PUSHBUTTON 0L
526 #define BS_PUSHLIKE 0x1000L
527 #define BS_RADIOBUTTON 0x4L
528 #define BS_RIGHT 0x200L
529 #define BS_RIGHTBUTTON 0x20L
531 #define BS_TOP 0x400L
532 #define BS_USERBUTTON 0x8L
533 #define BS_VCENTER 0xc00L
534 #define CBS_AUTOHSCROLL 0x40L
535 #define CBS_DISABLENOSCROLL 0x800L
536 #define CBS_DROPDOWN 0x2L
537 #define CBS_DROPDOWNLIST 0x3L
538 #define CBS_HASSTRINGS 0x200L
539 #define CBS_LOWERCASE 0x4000L
540 #define CBS_NOINTEGRALHEIGHT 0x400L
541 #define CBS_OEMCONVERT 0x80L
542 #define CBS_OWNERDRAWFIXED 0x10L
543 #define CBS_OWNERDRAWVARIABLE 0x20L
544 #define CBS_SIMPLE 0x1L
545 #define CBS_SORT 0x100L
546 #define CBS_UPPERCASE 0x2000L
547 #define ES_AUTOHSCROLL 0x80L
548 #define ES_AUTOVSCROLL 0x40L
549 #define ES_CENTER 0x1L
551 #define ES_LOWERCASE 0x10L
552 #define ES_MULTILINE 0x4L
553 #define ES_NOHIDESEL 0x100L
554 #define ES_NUMBER 0x2000L
555 #define ES_OEMCONVERT 0x400L
556 #define ES_PASSWORD 0x20L
557 #define ES_READONLY 0x800L
558 #define ES_RIGHT 0x2L
559 #define ES_UPPERCASE 0x8L
560 #define ES_WANTRETURN 0x1000L
561 #define LBS_DISABLENOSCROLL 0x1000L
562 #define LBS_EXTENDEDSEL 0x800L
563 #define LBS_HASSTRINGS 0x40L
564 #define LBS_MULTICOLUMN 0x200L
565 #define LBS_MULTIPLESEL 0x8L
566 #define LBS_NODATA 0x2000L
567 #define LBS_NOINTEGRALHEIGHT 0x100L
568 #define LBS_NOREDRAW 0x4L
569 #define LBS_NOSEL 0x4000L
570 #define LBS_NOTIFY 0x1L
571 #define LBS_OWNERDRAWFIXED 0x10L
572 #define LBS_OWNERDRAWVARIABLE 0x20L
573 #define LBS_SORT 0x2L
574 #define LBS_STANDARD 0xa00003L
575 #define LBS_USETABSTOPS 0x80L
576 #define LBS_WANTKEYBOARDINPUT 0x400L
577 #define SBS_BOTTOMALIGN 0x4L
579 #define SBS_LEFTALIGN 0x2L
580 #define SBS_RIGHTALIGN 0x4L
581 #define SBS_SIZEBOX 0x8L
582 #define SBS_SIZEBOXBOTTOMRIGHTALIGN 0x4L
583 #define SBS_SIZEBOXTOPLEFTALIGN 0x2L
584 #define SBS_SIZEGRIP 0x10L
585 #define SBS_TOPALIGN 0x2L
586 #define SBS_VERT 0x1L
587 #define SS_BITMAP 0xeL
588 #define SS_BLACKFRAME 0x7L
589 #define SS_BLACKRECT 0x4L
590 #define SS_CENTER 0x1L
591 #define SS_CENTERIMAGE 0x200L
592 #define SS_ENHMETAFILE 0xfL
593 #define SS_ETCHEDFRAME 0x12L
594 #define SS_ETCHEDHORZ 0x10L
595 #define SS_ETCHEDVERT 0x11L
596 #define SS_GRAYFRAME 0x8L
597 #define SS_GRAYRECT 0x5L
600 #define SS_LEFTNOWORDWRAP 0xcL
601 #define SS_NOPREFIX 0x80L
602 #define SS_NOTIFY 0x100L
603 #define SS_OWNERDRAW 0xdL
604 #define SS_REALSIZEIMAGE 0x800L
605 #define SS_RIGHT 0x2L
606 #define SS_RIGHTJUST 0x400L
607 #define SS_SIMPLE 0xbL
608 #define SS_SUNKEN 0x1000L
609 #define SS_USERITEM 0xaL
610 #define SS_WHITEFRAME 0x9L
611 #define SS_WHITERECT 0x6L
612 #define DS_3DLOOK 0x4L
613 #define DS_ABSALIGN 0x1L
614 #define DS_CENTER 0x800L
615 #define DS_CENTERMOUSE 0x1000L
616 #define DS_CONTEXTHELP 0x2000L
617 #define DS_CONTROL 0x400L
618 #define DS_FIXEDSYS 0x8L
619 #define DS_LOCALEDIT 0x20L
620 #define DS_MODALFRAME 0x80L
621 #define DS_NOFAILCREATE 0x10L
622 #define DS_NOIDLEMSG 0x100L
623 #define DS_SETFONT 0x40L
624 #define DS_SETFOREGROUND 0x200L
625 #define DS_SYSMODAL 0x2L
627 /* A dialog control. */
629 typedef struct rc_dialog_control
632 struct rc_dialog_control
*next
;
637 /* Extended style. */
638 rc_uint_type exstyle
;
649 /* Associated text. */
651 /* Extra data for the window procedure. */
652 struct rc_rcdata_item
*data
;
653 /* Help ID. Only used in an extended dialog. */
657 struct __attribute__ ((__packed__
)) bin_dialog_control
667 #define BIN_DIALOG_CONTROL_SIZE 18
669 struct __attribute__ ((__packed__
)) bin_dialogex_control
680 #define BIN_DIALOGEX_CONTROL_SIZE 24
682 /* Control classes. These can be used as the ID field in a rc_dialog_control. */
684 #define CTL_BUTTON 0x80
685 #define CTL_EDIT 0x81
686 #define CTL_STATIC 0x82
687 #define CTL_LISTBOX 0x83
688 #define CTL_SCROLLBAR 0x84
689 #define CTL_COMBOBOX 0x85
691 /* A fontdir resource is a list of rc_fontdir. */
693 typedef struct rc_fontdir
695 struct rc_fontdir
*next
;
696 /* Index of font entry. */
698 /* Length of font information. */
700 /* Font information. */
701 const bfd_byte
*data
;
704 struct __attribute__ ((__packed__
)) bin_fontdir_item
708 bfd_byte device_name
[1];
709 /* bfd_byte face_name[]; */
712 /* A group_icon resource is a list of rc_group_icon. */
714 typedef struct rc_group_icon
716 /* Next icon in group. */
717 struct rc_group_icon
*next
;
726 /* Bits per pixel. */
728 /* Number of bytes in cursor resource. */
730 /* Index of cursor resource. */
734 struct __attribute__ ((__packed__
)) bin_group_icon
740 #define BIN_GROUP_ICON_SIZE 6
742 struct __attribute__ ((__packed__
)) bin_group_icon_item
753 #define BIN_GROUP_ICON_ITEM_SIZE 14
755 /* A menu resource. */
757 typedef struct rc_menu
759 /* List of menuitems. */
760 struct rc_menuitem
*items
;
761 /* Help ID. I don't think there is any way to set this in an rc
762 file, but it can appear in the binary format. */
766 struct __attribute__ ((__packed__
)) bin_menu
771 #define BIN_MENU_SIZE 4
773 struct __attribute__ ((__packed__
)) bin_menuex
779 #define BIN_MENUEX_SIZE 8
781 /* A menu resource is a list of rc_menuitem. */
783 typedef struct rc_menuitem
785 /* Next menu item. */
786 struct rc_menuitem
*next
;
787 /* Type. In a normal menu, rather than a menuex, this is the flags
790 /* State. This is only used in a menuex. */
796 /* Popup menu items for a popup. */
797 struct rc_menuitem
*popup
;
798 /* Help ID. This is only used in a menuex. */
802 struct __attribute__ ((__packed__
)) bin_menuitem
807 #define BIN_MENUITEM_SIZE 4
808 #define BIN_MENUITEM_POPUP_SIZE 2
810 struct __attribute__ ((__packed__
)) bin_menuitemex
817 /* if popup: align, bfd_byte help[4], align, bin_menuitemex[]; */
819 #define BIN_MENUITEMEX_SIZE 14
821 /* Menu item flags. These can appear in the flags field of a rc_menuitem. */
823 #define MENUITEM_GRAYED 0x001
824 #define MENUITEM_INACTIVE 0x002
825 #define MENUITEM_BITMAP 0x004
826 #define MENUITEM_OWNERDRAW 0x100
827 #define MENUITEM_CHECKED 0x008
828 #define MENUITEM_POPUP 0x010
829 #define MENUITEM_MENUBARBREAK 0x020
830 #define MENUITEM_MENUBREAK 0x040
831 #define MENUITEM_ENDMENU 0x080
832 #define MENUITEM_HELP 0x4000
834 /* An rcdata resource is a pointer to a list of rc_rcdata_item. */
836 typedef struct rc_rcdata_item
838 /* Next data item. */
839 struct rc_rcdata_item
*next
;
866 const bfd_byte
*data
;
871 /* A stringtable resource is a pointer to a rc_stringtable. */
873 typedef struct rc_stringtable
875 /* Each stringtable resource is a list of 16 unicode strings. */
878 /* Length of string. */
880 /* String data if length > 0. */
885 /* A versioninfo resource points to a rc_versioninfo. */
887 typedef struct rc_versioninfo
889 /* Fixed version information. */
890 struct rc_fixed_versioninfo
*fixed
;
891 /* Variable version information. */
892 struct rc_ver_info
*var
;
895 struct __attribute__ ((__packed__
)) bin_versioninfo
898 bfd_byte fixed_size
[2];
901 #define BIN_VERSIONINFO_SIZE 6
903 /* The fixed portion of a versioninfo resource. */
905 typedef struct rc_fixed_versioninfo
907 /* The file version, which is two 32 bit integers. */
908 rc_uint_type file_version_ms
;
909 rc_uint_type file_version_ls
;
910 /* The product version, which is two 32 bit integers. */
911 rc_uint_type product_version_ms
;
912 rc_uint_type product_version_ls
;
913 /* The file flags mask. */
914 rc_uint_type file_flags_mask
;
915 /* The file flags. */
916 rc_uint_type file_flags
;
918 rc_uint_type file_os
;
920 rc_uint_type file_type
;
921 /* The file subtype. */
922 rc_uint_type file_subtype
;
923 /* The date, which in Windows is two 32 bit integers. */
924 rc_uint_type file_date_ms
;
925 rc_uint_type file_date_ls
;
926 } rc_fixed_versioninfo
;
928 struct __attribute__ ((__packed__
)) bin_fixed_versioninfo
932 bfd_byte file_version
[4];
933 bfd_byte file_version_ls
[4];
934 bfd_byte product_version_ms
[4];
935 bfd_byte product_version_ls
[4];
936 bfd_byte file_flags_mask
[4];
937 bfd_byte file_flags
[4];
939 bfd_byte file_type
[4];
940 bfd_byte file_subtype
[4];
941 bfd_byte file_date_ms
[4];
942 bfd_byte file_date_ls
[4];
944 #define BIN_FIXED_VERSIONINFO_SIZE 52
946 /* A list of string version information. */
948 typedef struct rc_ver_stringtable
951 struct rc_ver_stringtable
*next
;
955 struct rc_ver_stringinfo
*strings
;
956 } rc_ver_stringtable
;
958 /* A list of variable version information. */
960 typedef struct rc_ver_info
963 struct rc_ver_info
*next
;
965 enum { VERINFO_STRING
, VERINFO_VAR
} type
;
968 /* StringFileInfo data. */
972 struct rc_ver_stringtable
*stringtables
;
974 /* VarFileInfo data. */
980 struct rc_ver_varinfo
*var
;
985 struct __attribute__ ((__packed__
)) bin_ver_info
991 #define BIN_VER_INFO_SIZE 6
993 /* A list of string version information. */
995 typedef struct rc_ver_stringinfo
998 struct rc_ver_stringinfo
*next
;
1003 } rc_ver_stringinfo
;
1005 /* A list of variable version information. */
1007 typedef struct rc_ver_varinfo
1010 struct rc_ver_varinfo
*next
;
1012 rc_uint_type language
;
1013 /* Character set ID. */
1014 rc_uint_type charset
;
1017 typedef struct rc_toolbar_item
1019 struct rc_toolbar_item
*next
;
1020 struct rc_toolbar_item
*prev
;
1024 struct __attribute__ ((__packed__
)) bin_messagetable_item
1030 #define BIN_MESSAGETABLE_ITEM_SIZE 4
1032 #define MESSAGE_RESOURCE_UNICODE 0x0001
1034 struct __attribute__ ((__packed__
)) bin_messagetable_block
1040 #define BIN_MESSAGETABLE_BLOCK_SIZE 12
1042 struct __attribute__ ((__packed__
)) bin_messagetable
1044 bfd_byte cblocks
[4];
1045 struct bin_messagetable_block items
[1];
1047 #define BIN_MESSAGETABLE_SIZE 8
1049 typedef struct rc_toolbar
1051 rc_uint_type button_width
;
1052 rc_uint_type button_height
;
1053 rc_uint_type nitems
;
1054 rc_toolbar_item
*items
;
1057 struct __attribute__ ((__packed__
)) bin_toolbar
1059 bfd_byte button_width
[4];
1060 bfd_byte button_height
[4];
1062 /* { bfd_byte id[4]; } * nitems; */
1064 #define BIN_TOOLBAR_SIZE 12
1066 extern int target_is_bigendian
;
1068 typedef struct windres_bfd
1072 rc_uint_type kind
: 4;
1075 #define WR_KIND_TARGET 0
1076 #define WR_KIND_BFD 1
1077 #define WR_KIND_BFD_BIN_L 2
1078 #define WR_KIND_BFD_BIN_B 3
1080 #define WR_KIND(PTR) (PTR)->kind
1081 #define WR_SECTION(PTR) (PTR)->sec
1082 #define WR_BFD(PTR) (PTR)->abfd
1084 extern void set_windres_bfd_content (windres_bfd
*, const void *, rc_uint_type
, rc_uint_type
);
1085 extern void get_windres_bfd_content (windres_bfd
*, void *, rc_uint_type
, rc_uint_type
);
1087 extern void windres_put_8 (windres_bfd
*, void *, rc_uint_type
);
1088 extern void windres_put_16 (windres_bfd
*, void *, rc_uint_type
);
1089 extern void windres_put_32 (windres_bfd
*, void *, rc_uint_type
);
1090 extern rc_uint_type
windres_get_8 (windres_bfd
*, const void *, rc_uint_type
);
1091 extern rc_uint_type
windres_get_16 (windres_bfd
*, const void *, rc_uint_type
);
1092 extern rc_uint_type
windres_get_32 (windres_bfd
*, const void *, rc_uint_type
);
1094 extern void set_windres_bfd (windres_bfd
*, bfd
*, asection
*, rc_uint_type
);
1095 extern void set_windres_bfd_endianness (windres_bfd
*, int);