windres.h 5.7 KB

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