1 /* windint.h -- internal header file for windres program.
2 Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2007, 2011
3 Free Software Foundation, Inc.
4 Written by Kai Tietz, Onevision.
6 This file is part of GNU Binutils.
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
28 /* Use bfd_size_type to ensure a sufficient number of bits. */
29 #ifndef DEFINED_RC_UINT_TYPE
30 #define DEFINED_RC_UINT_TYPE
31 typedef bfd_size_type rc_uint_type;
34 /* Resource directory structure. */
36 typedef struct res_hdr
38 rc_uint_type data_size;
39 rc_uint_type header_size;
42 struct __attribute__ ((__packed__)) bin_res_hdr
44 bfd_byte data_size[4];
45 bfd_byte header_size[4];
47 #define BIN_RES_HDR_SIZE 8
49 struct __attribute__ ((__packed__)) bin_res_id
51 bfd_byte sig[2]; /* Has to be 0xffff for unnamed ids. */
56 /* This structure is used when converting resource information to
59 typedef struct bindata
69 /* This structure is used when converting resource information to
71 typedef struct coff_res_data
74 struct coff_res_data *next;
78 const struct rc_res_resource *res;
81 /* We represent resources internally as a tree, similar to the tree
82 used in the .rsrc section of a COFF file. The root is a
83 rc_res_directory structure. */
85 typedef struct rc_res_directory
87 /* Resource flags. According to the MS docs, this is currently
89 rc_uint_type characteristics;
90 /* Time/date stamp. */
92 /* Major version number. */
94 /* Minor version number. */
96 /* Directory entries. */
97 struct rc_res_entry *entries;
100 /* A resource ID is stored in a rc_res_id structure. */
102 typedef struct rc_res_id
104 /* Non-zero if this entry has a name rather than an ID. */
105 rc_uint_type named : 1;
108 /* If the named field is non-zero, this is the name. */
111 /* Length of the name. */
113 /* Pointer to the name, which is a Unicode string. */
116 /* If the named field is zero, this is the ID. */
121 /* Each entry in the tree is a rc_res_entry structure. We mix
122 directories and resources because in a COFF file all entries in a
123 directory are sorted together, whether the entries are
124 subdirectories or resources. */
126 typedef struct rc_res_entry
129 struct rc_res_entry *next;
132 /* Non-zero if this entry is a subdirectory rather than a leaf. */
133 rc_uint_type subdir : 1;
136 /* If the subdir field is non-zero, this is a pointer to the
138 rc_res_directory *dir;
139 /* If the subdir field is zero, this is a pointer to the resource
141 struct rc_res_resource *res;
145 /* Types of resources. */
149 RES_TYPE_UNINITIALIZED,
150 RES_TYPE_ACCELERATOR,
153 RES_TYPE_GROUP_CURSOR,
160 RES_TYPE_MESSAGETABLE,
162 RES_TYPE_STRINGTABLE,
164 RES_TYPE_VERSIONINFO,
174 /* A res file and a COFF file store information differently. The
175 res_info structures holds data which in a res file is stored with
176 each resource, but in a COFF file is stored elsewhere. */
178 typedef struct rc_res_res_info
180 /* Language. In a COFF file, the third level of the directory is
181 keyed by the language, so the language of a resource is defined
182 by its location in the resource tree. */
183 rc_uint_type language;
184 /* Characteristics of the resource. Entirely user defined. In a
185 COFF file, the rc_res_directory structure has a characteristics
186 field, but I don't know if it's related to the one in the res
188 rc_uint_type characteristics;
189 /* Version of the resource. Entirely user defined. In a COFF file,
190 the rc_res_directory structure has a characteristics field, but I
191 don't know if it's related to the one in the res file. */
192 rc_uint_type version;
193 /* Memory flags. This is a combination of the MEMFLAG values
194 defined below. Most of these values are historical, and are not
195 meaningful for win32. I don't think there is any way to store
196 this information in a COFF file. */
197 rc_uint_type memflags;
200 /* Binary layout of rc_res_info. */
202 struct __attribute__ ((__packed__)) bin_res_info
205 bfd_byte memflags[2];
206 bfd_byte language[2];
207 bfd_byte version2[4];
208 bfd_byte characteristics[4];
210 #define BIN_RES_INFO_SIZE 16
212 /* Each resource in a COFF file has some information which can does
213 not appear in a res file. */
215 typedef struct rc_res_coff_info
217 /* The code page used for the data. I don't really know what this
218 should be. It has something todo with ASCII to Unicode encoding. */
219 rc_uint_type codepage;
220 /* A resource entry in a COFF file has a reserved field, which we
221 record here when reading a COFF file. When writing a COFF file,
222 we set this field to zero. */
223 rc_uint_type reserved;
226 /* Resource data is stored in a rc_res_resource structure. */
228 typedef struct rc_res_resource
230 /* The type of resource. */
231 enum rc_res_type type;
232 /* The data for the resource. */
238 const bfd_byte *data;
240 struct rc_accelerator *acc;
241 struct rc_cursor *cursor;
242 struct rc_group_cursor *group_cursor;
243 struct rc_dialog *dialog;
244 struct rc_fontdir *fontdir;
245 struct rc_group_icon *group_icon;
246 struct rc_menu *menu;
247 struct rc_rcdata_item *rcdata;
248 struct rc_stringtable *stringtable;
249 struct rc_rcdata_item *userdata;
250 struct rc_versioninfo *versioninfo;
251 struct rc_toolbar *toolbar;
253 /* Information from a res file. */
254 struct rc_res_res_info res_info;
255 /* Information from a COFF file. */
256 rc_res_coff_info coff_info;
259 #define SUBLANG_SHIFT 10
261 /* Memory flags in the memflags field of a rc_res_resource. */
263 #define MEMFLAG_MOVEABLE 0x10
264 #define MEMFLAG_PURE 0x20
265 #define MEMFLAG_PRELOAD 0x40
266 #define MEMFLAG_DISCARDABLE 0x1000
268 /* Standard resource type codes. These are used in the ID field of a
269 rc_res_entry structure. */
279 #define RT_ACCELERATOR 9
281 #define RT_MESSAGETABLE 11
282 #define RT_GROUP_CURSOR 12
283 #define RT_GROUP_ICON 14
284 #define RT_VERSION 16
285 #define RT_DLGINCLUDE 17
286 #define RT_PLUGPLAY 19
288 #define RT_ANICURSOR 21
289 #define RT_ANIICON 22
291 #define RT_MANIFEST 24
292 #define RT_DLGINIT 240
293 #define RT_TOOLBAR 241
295 /* An accelerator resource is a linked list of these structures. */
297 typedef struct rc_accelerator
299 /* Next accelerator. */
300 struct rc_accelerator *next;
301 /* Flags. A combination of the ACC values defined below. */
309 struct __attribute__ ((__packed__)) bin_accelerator
316 #define BIN_ACCELERATOR_SIZE 8
318 /* Accelerator flags in the flags field of a rc_accelerator.
319 These are the same values that appear in a res file. I hope. */
321 #define ACC_VIRTKEY 0x01
322 #define ACC_NOINVERT 0x02
323 #define ACC_SHIFT 0x04
324 #define ACC_CONTROL 0x08
326 #define ACC_LAST 0x80
328 /* A cursor resource. */
330 typedef struct rc_cursor
332 /* X coordinate of hotspot. */
333 bfd_signed_vma xhotspot;
334 /* Y coordinate of hotspot. */
335 bfd_signed_vma yhotspot;
336 /* Length of bitmap data. */
339 const bfd_byte *data;
342 struct __attribute__ ((__packed__)) bin_cursor
344 bfd_byte xhotspot[2];
345 bfd_byte yhotspot[2];
347 #define BIN_CURSOR_SIZE 4
349 /* A group_cursor resource is a list of rc_i_group_cursor structures. */
351 typedef struct rc_group_cursor
353 /* Next cursor in group. */
354 struct rc_group_cursor *next;
361 /* Bits per pixel. */
363 /* Number of bytes in cursor resource. */
365 /* Index of cursor resource. */
369 struct __attribute__ ((__packed__)) bin_group_cursor_item
378 #define BIN_GROUP_CURSOR_ITEM_SIZE 14
380 struct __attribute__ ((__packed__)) bin_group_cursor
385 /* struct bin_group_cursor_item item[nitems]; */
387 #define BIN_GROUP_CURSOR_SIZE 6
389 /* A dialog resource. */
391 typedef struct rc_dialog
393 /* Basic window style. */
395 /* Extended window style. */
396 rc_uint_type exstyle;
411 /* Font point size. */
412 rc_uint_type pointsize;
415 /* Extended information for a dialogex. */
416 struct rc_dialog_ex *ex;
418 struct rc_dialog_control *controls;
421 struct __attribute__ ((__packed__)) bin_dialog
431 #define BIN_DIALOG_SIZE 18
433 /* An extended dialog has additional information. */
435 typedef struct rc_dialog_ex
441 /* Whether the font is italic. */
447 struct __attribute__ ((__packed__)) bin_dialogex
460 #define BIN_DIALOGEX_SIZE 26
462 struct __attribute__ ((__packed__)) bin_dialogfont
464 bfd_byte pointsize[2];
466 #define BIN_DIALOGFONT_SIZE 2
468 struct __attribute__ ((__packed__)) bin_dialogexfont
470 bfd_byte pointsize[2];
475 #define BIN_DIALOGEXFONT_SIZE 6
477 /* Window style flags, from the winsup Defines.h header file. These
478 can appear in the style field of a rc_dialog or a rc_dialog_control. */
480 #define CW_USEDEFAULT 0x80000000
481 #define WS_BORDER 0x800000L
482 #define WS_CAPTION 0xc00000L
483 #define WS_CHILD 0x40000000L
484 #define WS_CHILDWINDOW 0x40000000L
485 #define WS_CLIPCHILDREN 0x2000000L
486 #define WS_CLIPSIBLINGS 0x4000000L
487 #define WS_DISABLED 0x8000000L
488 #define WS_DLGFRAME 0x400000L
489 #define WS_GROUP 0x20000L
490 #define WS_HSCROLL 0x100000L
491 #define WS_ICONIC 0x20000000L
492 #define WS_MAXIMIZE 0x1000000L
493 #define WS_MAXIMIZEBOX 0x10000L
494 #define WS_MINIMIZE 0x20000000L
495 #define WS_MINIMIZEBOX 0x20000L
496 #define WS_OVERLAPPED 0L
497 #define WS_OVERLAPPEDWINDOW 0xcf0000L
498 #define WS_POPUP 0x80000000L
499 #define WS_POPUPWINDOW 0x80880000L
500 #define WS_SIZEBOX 0x40000L
501 #define WS_SYSMENU 0x80000L
502 #define WS_TABSTOP 0x10000L
503 #define WS_THICKFRAME 0x40000L
505 #define WS_TILEDWINDOW 0xcf0000L
506 #define WS_VISIBLE 0x10000000L
507 #define WS_VSCROLL 0x200000L
508 #define MDIS_ALLCHILDSTYLES 0x1
509 #define BS_3STATE 0x5L
510 #define BS_AUTO3STATE 0x6L
511 #define BS_AUTOCHECKBOX 0x3L
512 #define BS_AUTORADIOBUTTON 0x9L
513 #define BS_BITMAP 0x80L
514 #define BS_BOTTOM 0x800L
515 #define BS_CENTER 0x300L
516 #define BS_CHECKBOX 0x2L
517 #define BS_DEFPUSHBUTTON 0x1L
518 #define BS_GROUPBOX 0x7L
519 #define BS_ICON 0x40L
520 #define BS_LEFT 0x100L
521 #define BS_LEFTTEXT 0x20L
522 #define BS_MULTILINE 0x2000L
523 #define BS_NOTIFY 0x4000L
524 #define BS_OWNERDRAW 0xbL
525 #define BS_PUSHBOX 0xcL /* FIXME! What should this be? */
526 #define BS_PUSHBUTTON 0L
527 #define BS_PUSHLIKE 0x1000L
528 #define BS_RADIOBUTTON 0x4L
529 #define BS_RIGHT 0x200L
530 #define BS_RIGHTBUTTON 0x20L
532 #define BS_TOP 0x400L
533 #define BS_USERBUTTON 0x8L
534 #define BS_VCENTER 0xc00L
535 #define CBS_AUTOHSCROLL 0x40L
536 #define CBS_DISABLENOSCROLL 0x800L
537 #define CBS_DROPDOWN 0x2L
538 #define CBS_DROPDOWNLIST 0x3L
539 #define CBS_HASSTRINGS 0x200L
540 #define CBS_LOWERCASE 0x4000L
541 #define CBS_NOINTEGRALHEIGHT 0x400L
542 #define CBS_OEMCONVERT 0x80L
543 #define CBS_OWNERDRAWFIXED 0x10L
544 #define CBS_OWNERDRAWVARIABLE 0x20L
545 #define CBS_SIMPLE 0x1L
546 #define CBS_SORT 0x100L
547 #define CBS_UPPERCASE 0x2000L
548 #define ES_AUTOHSCROLL 0x80L
549 #define ES_AUTOVSCROLL 0x40L
550 #define ES_CENTER 0x1L
552 #define ES_LOWERCASE 0x10L
553 #define ES_MULTILINE 0x4L
554 #define ES_NOHIDESEL 0x100L
555 #define ES_NUMBER 0x2000L
556 #define ES_OEMCONVERT 0x400L
557 #define ES_PASSWORD 0x20L
558 #define ES_READONLY 0x800L
559 #define ES_RIGHT 0x2L
560 #define ES_UPPERCASE 0x8L
561 #define ES_WANTRETURN 0x1000L
562 #define LBS_DISABLENOSCROLL 0x1000L
563 #define LBS_EXTENDEDSEL 0x800L
564 #define LBS_HASSTRINGS 0x40L
565 #define LBS_MULTICOLUMN 0x200L
566 #define LBS_MULTIPLESEL 0x8L
567 #define LBS_NODATA 0x2000L
568 #define LBS_NOINTEGRALHEIGHT 0x100L
569 #define LBS_NOREDRAW 0x4L
570 #define LBS_NOSEL 0x4000L
571 #define LBS_NOTIFY 0x1L
572 #define LBS_OWNERDRAWFIXED 0x10L
573 #define LBS_OWNERDRAWVARIABLE 0x20L
574 #define LBS_SORT 0x2L
575 #define LBS_STANDARD 0xa00003L
576 #define LBS_USETABSTOPS 0x80L
577 #define LBS_WANTKEYBOARDINPUT 0x400L
578 #define SBS_BOTTOMALIGN 0x4L
580 #define SBS_LEFTALIGN 0x2L
581 #define SBS_RIGHTALIGN 0x4L
582 #define SBS_SIZEBOX 0x8L
583 #define SBS_SIZEBOXBOTTOMRIGHTALIGN 0x4L
584 #define SBS_SIZEBOXTOPLEFTALIGN 0x2L
585 #define SBS_SIZEGRIP 0x10L
586 #define SBS_TOPALIGN 0x2L
587 #define SBS_VERT 0x1L
588 #define SS_BITMAP 0xeL
589 #define SS_BLACKFRAME 0x7L
590 #define SS_BLACKRECT 0x4L
591 #define SS_CENTER 0x1L
592 #define SS_CENTERIMAGE 0x200L
593 #define SS_ENHMETAFILE 0xfL
594 #define SS_ETCHEDFRAME 0x12L
595 #define SS_ETCHEDHORZ 0x10L
596 #define SS_ETCHEDVERT 0x11L
597 #define SS_GRAYFRAME 0x8L
598 #define SS_GRAYRECT 0x5L
601 #define SS_LEFTNOWORDWRAP 0xcL
602 #define SS_NOPREFIX 0x80L
603 #define SS_NOTIFY 0x100L
604 #define SS_OWNERDRAW 0xdL
605 #define SS_REALSIZEIMAGE 0x800L
606 #define SS_RIGHT 0x2L
607 #define SS_RIGHTJUST 0x400L
608 #define SS_SIMPLE 0xbL
609 #define SS_SUNKEN 0x1000L
610 #define SS_USERITEM 0xaL
611 #define SS_WHITEFRAME 0x9L
612 #define SS_WHITERECT 0x6L
613 #define DS_3DLOOK 0x4L
614 #define DS_ABSALIGN 0x1L
615 #define DS_CENTER 0x800L
616 #define DS_CENTERMOUSE 0x1000L
617 #define DS_CONTEXTHELP 0x2000L
618 #define DS_CONTROL 0x400L
619 #define DS_FIXEDSYS 0x8L
620 #define DS_LOCALEDIT 0x20L
621 #define DS_MODALFRAME 0x80L
622 #define DS_NOFAILCREATE 0x10L
623 #define DS_NOIDLEMSG 0x100L
624 #define DS_SETFONT 0x40L
625 #define DS_SETFOREGROUND 0x200L
626 #define DS_SYSMODAL 0x2L
628 /* A dialog control. */
630 typedef struct rc_dialog_control
633 struct rc_dialog_control *next;
638 /* Extended style. */
639 rc_uint_type exstyle;
650 /* Associated text. */
652 /* Extra data for the window procedure. */
653 struct rc_rcdata_item *data;
654 /* Help ID. Only used in an extended dialog. */
658 struct __attribute__ ((__packed__)) bin_dialog_control
668 #define BIN_DIALOG_CONTROL_SIZE 18
670 struct __attribute__ ((__packed__)) bin_dialogex_control
681 #define BIN_DIALOGEX_CONTROL_SIZE 24
683 /* Control classes. These can be used as the ID field in a rc_dialog_control. */
685 #define CTL_BUTTON 0x80
686 #define CTL_EDIT 0x81
687 #define CTL_STATIC 0x82
688 #define CTL_LISTBOX 0x83
689 #define CTL_SCROLLBAR 0x84
690 #define CTL_COMBOBOX 0x85
692 /* A fontdir resource is a list of rc_fontdir. */
694 typedef struct rc_fontdir
696 struct rc_fontdir *next;
697 /* Index of font entry. */
699 /* Length of font information. */
701 /* Font information. */
702 const bfd_byte *data;
705 struct __attribute__ ((__packed__)) bin_fontdir_item
709 bfd_byte device_name[1];
710 /* bfd_byte face_name[]; */
713 /* A group_icon resource is a list of rc_group_icon. */
715 typedef struct rc_group_icon
717 /* Next icon in group. */
718 struct rc_group_icon *next;
727 /* Bits per pixel. */
729 /* Number of bytes in cursor resource. */
731 /* Index of cursor resource. */
735 struct __attribute__ ((__packed__)) bin_group_icon
741 #define BIN_GROUP_ICON_SIZE 6
743 struct __attribute__ ((__packed__)) bin_group_icon_item
754 #define BIN_GROUP_ICON_ITEM_SIZE 14
756 /* A menu resource. */
758 typedef struct rc_menu
760 /* List of menuitems. */
761 struct rc_menuitem *items;
762 /* Help ID. I don't think there is any way to set this in an rc
763 file, but it can appear in the binary format. */
767 struct __attribute__ ((__packed__)) bin_menu
772 #define BIN_MENU_SIZE 4
774 struct __attribute__ ((__packed__)) bin_menuex
780 #define BIN_MENUEX_SIZE 8
782 /* A menu resource is a list of rc_menuitem. */
784 typedef struct rc_menuitem
786 /* Next menu item. */
787 struct rc_menuitem *next;
788 /* Type. In a normal menu, rather than a menuex, this is the flags
791 /* State. This is only used in a menuex. */
797 /* Popup menu items for a popup. */
798 struct rc_menuitem *popup;
799 /* Help ID. This is only used in a menuex. */
803 struct __attribute__ ((__packed__)) bin_menuitem
808 #define BIN_MENUITEM_SIZE 4
809 #define BIN_MENUITEM_POPUP_SIZE 2
811 struct __attribute__ ((__packed__)) bin_menuitemex
818 /* if popup: align, bfd_byte help[4], align, bin_menuitemex[]; */
820 #define BIN_MENUITEMEX_SIZE 14
822 /* Menu item flags. These can appear in the flags field of a rc_menuitem. */
824 #define MENUITEM_GRAYED 0x001
825 #define MENUITEM_INACTIVE 0x002
826 #define MENUITEM_BITMAP 0x004
827 #define MENUITEM_OWNERDRAW 0x100
828 #define MENUITEM_CHECKED 0x008
829 #define MENUITEM_POPUP 0x010
830 #define MENUITEM_MENUBARBREAK 0x020
831 #define MENUITEM_MENUBREAK 0x040
832 #define MENUITEM_ENDMENU 0x080
833 #define MENUITEM_HELP 0x4000
835 /* An rcdata resource is a pointer to a list of rc_rcdata_item. */
837 typedef struct rc_rcdata_item
839 /* Next data item. */
840 struct rc_rcdata_item *next;
867 const bfd_byte *data;
872 /* A stringtable resource is a pointer to a rc_stringtable. */
874 typedef struct rc_stringtable
876 /* Each stringtable resource is a list of 16 unicode strings. */
879 /* Length of string. */
881 /* String data if length > 0. */
886 /* A versioninfo resource points to a rc_versioninfo. */
888 typedef struct rc_versioninfo
890 /* Fixed version information. */
891 struct rc_fixed_versioninfo *fixed;
892 /* Variable version information. */
893 struct rc_ver_info *var;
896 struct __attribute__ ((__packed__)) bin_versioninfo
899 bfd_byte fixed_size[2];
902 #define BIN_VERSIONINFO_SIZE 6
904 /* The fixed portion of a versioninfo resource. */
906 typedef struct rc_fixed_versioninfo
908 /* The file version, which is two 32 bit integers. */
909 rc_uint_type file_version_ms;
910 rc_uint_type file_version_ls;
911 /* The product version, which is two 32 bit integers. */
912 rc_uint_type product_version_ms;
913 rc_uint_type product_version_ls;
914 /* The file flags mask. */
915 rc_uint_type file_flags_mask;
916 /* The file flags. */
917 rc_uint_type file_flags;
919 rc_uint_type file_os;
921 rc_uint_type file_type;
922 /* The file subtype. */
923 rc_uint_type file_subtype;
924 /* The date, which in Windows is two 32 bit integers. */
925 rc_uint_type file_date_ms;
926 rc_uint_type file_date_ls;
927 } rc_fixed_versioninfo;
929 struct __attribute__ ((__packed__)) bin_fixed_versioninfo
933 bfd_byte file_version[4];
934 bfd_byte file_version_ls[4];
935 bfd_byte product_version_ms[4];
936 bfd_byte product_version_ls[4];
937 bfd_byte file_flags_mask[4];
938 bfd_byte file_flags[4];
940 bfd_byte file_type[4];
941 bfd_byte file_subtype[4];
942 bfd_byte file_date_ms[4];
943 bfd_byte file_date_ls[4];
945 #define BIN_FIXED_VERSIONINFO_SIZE 52
947 /* A list of variable version information. */
949 typedef struct rc_ver_info
952 struct rc_ver_info *next;
954 enum { VERINFO_STRING, VERINFO_VAR } type;
957 /* StringFileInfo data. */
963 struct rc_ver_stringinfo *strings;
965 /* VarFileInfo data. */
971 struct rc_ver_varinfo *var;
976 struct __attribute__ ((__packed__)) bin_ver_info
982 #define BIN_VER_INFO_SIZE 6
984 /* A list of string version information. */
986 typedef struct rc_ver_stringinfo
989 struct rc_ver_stringinfo *next;
996 /* A list of variable version information. */
998 typedef struct rc_ver_varinfo
1001 struct rc_ver_varinfo *next;
1003 rc_uint_type language;
1004 /* Character set ID. */
1005 rc_uint_type charset;
1008 typedef struct rc_toolbar_item
1010 struct rc_toolbar_item *next;
1011 struct rc_toolbar_item *prev;
1015 struct __attribute__ ((__packed__)) bin_messagetable_item
1021 #define BIN_MESSAGETABLE_ITEM_SIZE 4
1023 #define MESSAGE_RESOURCE_UNICODE 0x0001
1025 struct __attribute__ ((__packed__)) bin_messagetable_block
1031 #define BIN_MESSAGETABLE_BLOCK_SIZE 12
1033 struct __attribute__ ((__packed__)) bin_messagetable
1035 bfd_byte cblocks[4];
1036 struct bin_messagetable_block items[1];
1038 #define BIN_MESSAGETABLE_SIZE 8
1040 typedef struct rc_toolbar
1042 rc_uint_type button_width;
1043 rc_uint_type button_height;
1044 rc_uint_type nitems;
1045 rc_toolbar_item *items;
1048 struct __attribute__ ((__packed__)) bin_toolbar
1050 bfd_byte button_width[4];
1051 bfd_byte button_height[4];
1053 /* { bfd_byte id[4]; } * nitems; */
1055 #define BIN_TOOLBAR_SIZE 12
1057 extern int target_is_bigendian;
1059 typedef struct windres_bfd
1063 rc_uint_type kind : 4;
1066 #define WR_KIND_TARGET 0
1067 #define WR_KIND_BFD 1
1068 #define WR_KIND_BFD_BIN_L 2
1069 #define WR_KIND_BFD_BIN_B 3
1071 #define WR_KIND(PTR) (PTR)->kind
1072 #define WR_SECTION(PTR) (PTR)->sec
1073 #define WR_BFD(PTR) (PTR)->abfd
1075 extern void set_windres_bfd_content (windres_bfd *, const void *, rc_uint_type, rc_uint_type);
1076 extern void get_windres_bfd_content (windres_bfd *, void *, rc_uint_type, rc_uint_type);
1078 extern void windres_put_8 (windres_bfd *, void *, rc_uint_type);
1079 extern void windres_put_16 (windres_bfd *, void *, rc_uint_type);
1080 extern void windres_put_32 (windres_bfd *, void *, rc_uint_type);
1081 extern rc_uint_type windres_get_8 (windres_bfd *, const void *, rc_uint_type);
1082 extern rc_uint_type windres_get_16 (windres_bfd *, const void *, rc_uint_type);
1083 extern rc_uint_type windres_get_32 (windres_bfd *, const void *, rc_uint_type);
1085 extern void set_windres_bfd (windres_bfd *, bfd *, asection *, rc_uint_type);
1086 extern void set_windres_bfd_endianness (windres_bfd *, int);