1 1.1 christos /* windres.h -- header file for windres program. 2 1.10 christos Copyright (C) 1997-2025 Free Software Foundation, Inc. 3 1.1 christos Written by Ian Lance Taylor, Cygnus Support. 4 1.1 christos Rewritten by Kai Tietz, Onevision. 5 1.1 christos 6 1.1 christos This file is part of GNU Binutils. 7 1.1 christos 8 1.1 christos This program is free software; you can redistribute it and/or modify 9 1.1 christos it under the terms of the GNU General Public License as published by 10 1.1 christos the Free Software Foundation; either version 3 of the License, or 11 1.1 christos (at your option) any later version. 12 1.1 christos 13 1.1 christos This program is distributed in the hope that it will be useful, 14 1.1 christos but WITHOUT ANY WARRANTY; without even the implied warranty of 15 1.1 christos MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 1.1 christos GNU General Public License for more details. 17 1.1 christos 18 1.1 christos You should have received a copy of the GNU General Public License 19 1.1 christos along with this program; if not, write to the Free Software 20 1.1 christos Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 21 1.1 christos 02110-1301, USA. */ 22 1.1 christos 23 1.1 christos #include "ansidecl.h" 24 1.1 christos 25 1.1 christos /* This is the header file for the windres program. It defines 26 1.1 christos structures and declares functions used within the program. */ 27 1.1 christos 28 1.1 christos #include "winduni.h" 29 1.1 christos #include "windint.h" 30 1.1 christos 31 1.1 christos extern int verbose; 32 1.1 christos 33 1.1 christos /* Function declarations. */ 34 1.1 christos 35 1.1 christos extern rc_res_directory *read_rc_file (const char *, const char *, const char *, int, int); 36 1.1 christos extern rc_res_directory *read_res_file (const char *); 37 1.1 christos extern rc_res_directory *read_coff_rsrc (const char *, const char *); 38 1.10 christos extern bool write_rc_file (const char *, const rc_res_directory *); 39 1.10 christos extern bool write_res_file (const char *, const rc_res_directory *); 40 1.10 christos extern bool write_coff_file (const char *, const char *, const rc_res_directory *); 41 1.1 christos 42 1.1 christos extern rc_res_resource *bin_to_res (windres_bfd *, rc_res_id, const bfd_byte *, 43 1.1 christos rc_uint_type); 44 1.1 christos extern rc_uint_type res_to_bin (windres_bfd *, rc_uint_type, const rc_res_resource *); 45 1.1 christos 46 1.1 christos extern FILE *open_file_search (const char *, const char *, const char *, char **); 47 1.1 christos 48 1.1 christos extern void *res_alloc (rc_uint_type); 49 1.1 christos extern void *reswr_alloc (rc_uint_type); 50 1.1 christos 51 1.1 christos /* Resource ID handling. */ 52 1.1 christos 53 1.1 christos extern int res_id_cmp (rc_res_id, rc_res_id); 54 1.1 christos extern void res_id_print (FILE *, rc_res_id, int); 55 1.1 christos extern void res_ids_print (FILE *, int, const rc_res_id *); 56 1.1 christos extern void res_string_to_id (rc_res_id *, const char *); 57 1.1 christos extern void res_unistring_to_id (rc_res_id *, const unichar *); 58 1.1 christos 59 1.1 christos /* Manipulation of the resource tree. */ 60 1.1 christos 61 1.1 christos extern rc_res_resource *define_resource (rc_res_directory **, int, const rc_res_id *, 62 1.1 christos int); 63 1.1 christos extern rc_res_resource *define_standard_resource (rc_res_directory **, int, rc_res_id, 64 1.1 christos rc_uint_type, int); 65 1.1 christos 66 1.1 christos extern int extended_dialog (const rc_dialog *); 67 1.1 christos extern int extended_menu (const rc_menu *); 68 1.1 christos 69 1.1 christos /* Communication between the rc file support and the parser and lexer. */ 70 1.1 christos 71 1.1 christos extern int yydebug; 72 1.1 christos extern char *rc_filename; 73 1.1 christos extern int rc_lineno; 74 1.1 christos 75 1.1 christos extern int yyparse (void); 76 1.1 christos extern int yylex (void); 77 1.1 christos extern void yyerror (const char *); 78 1.1 christos extern void rcparse_warning (const char *); 79 1.1 christos extern void rcparse_set_language (int); 80 1.1 christos extern void rcparse_discard_strings (void); 81 1.1 christos extern void rcparse_rcdata (void); 82 1.1 christos extern void rcparse_normal (void); 83 1.1 christos 84 1.1 christos extern void define_accelerator (rc_res_id, const rc_res_res_info *, rc_accelerator *); 85 1.1 christos extern void define_bitmap (rc_res_id, const rc_res_res_info *, const char *); 86 1.1 christos extern void define_cursor (rc_res_id, const rc_res_res_info *, const char *); 87 1.1 christos extern void define_dialog (rc_res_id, const rc_res_res_info *, const rc_dialog *); 88 1.1 christos extern rc_dialog_control *define_control (const rc_res_id, rc_uint_type, rc_uint_type, 89 1.1 christos rc_uint_type, rc_uint_type, rc_uint_type, 90 1.1 christos const rc_res_id, rc_uint_type, rc_uint_type); 91 1.1 christos extern rc_dialog_control *define_icon_control (rc_res_id, rc_uint_type, rc_uint_type, 92 1.1 christos rc_uint_type, rc_uint_type, rc_uint_type, 93 1.1 christos rc_uint_type, rc_rcdata_item *, 94 1.1 christos rc_dialog_ex *); 95 1.1 christos extern void define_font (rc_res_id, const rc_res_res_info *, const char *); 96 1.1 christos extern void define_icon (rc_res_id, const rc_res_res_info *, const char *); 97 1.1 christos extern void define_menu (rc_res_id, const rc_res_res_info *, rc_menuitem *); 98 1.1 christos extern rc_menuitem *define_menuitem (const unichar *, rc_uint_type, rc_uint_type, 99 1.1 christos rc_uint_type, rc_uint_type, rc_menuitem *); 100 1.1 christos extern void define_messagetable (rc_res_id, const rc_res_res_info *, const char *); 101 1.1 christos extern void define_rcdata (rc_res_id, const rc_res_res_info *, rc_rcdata_item *); 102 1.1 christos extern void define_rcdata_file (rc_res_id, const rc_res_res_info *, const char *); 103 1.1 christos extern rc_rcdata_item *define_rcdata_string (const char *, rc_uint_type); 104 1.1 christos extern rc_rcdata_item *define_rcdata_unistring (const unichar *, rc_uint_type); 105 1.1 christos extern rc_rcdata_item *define_rcdata_number (rc_uint_type, int); 106 1.1 christos extern void define_stringtable (const rc_res_res_info *, rc_uint_type, const unichar *, int); 107 1.1 christos extern void define_user_data (rc_res_id, rc_res_id, const rc_res_res_info *, rc_rcdata_item *); 108 1.1 christos extern void define_toolbar (rc_res_id, rc_res_res_info *, rc_uint_type ,rc_uint_type ,rc_toolbar_item *); 109 1.1 christos extern void define_user_file (rc_res_id, rc_res_id, const rc_res_res_info *, const char *); 110 1.1 christos extern void define_versioninfo (rc_res_id, rc_uint_type, rc_fixed_versioninfo *, rc_ver_info *); 111 1.1 christos extern rc_ver_info *append_ver_stringfileinfo (rc_ver_info *, rc_ver_stringtable *); 112 1.1 christos extern rc_ver_stringtable *append_ver_stringtable (rc_ver_stringtable *, const char *, rc_ver_stringinfo *); 113 1.1 christos extern rc_ver_info *append_ver_varfileinfo (rc_ver_info *, const unichar *, rc_ver_varinfo *); 114 1.1 christos extern rc_ver_stringinfo *append_verval (rc_ver_stringinfo *, const unichar *, const unichar *); 115 1.1 christos extern rc_ver_varinfo *append_vertrans (rc_ver_varinfo *, rc_uint_type, rc_uint_type); 116 1.1 christos 117 1.1 christos extern bfd *windres_open_as_binary (const char *, int); 118 1.1 christos extern void windres_add_include_dir (const char *); 119 1.1 christos 120 1.1 christos extern int wr_printcomment (FILE *, const char *, ...); 121 1.1 christos extern int wr_print (FILE *, const char *, ...); 122 1.1 christos #define wr_print_flush(FP) wr_print ((FP),NULL) 123