wmctypes.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. /*
  2. * Main definitions and externals
  3. *
  4. * Copyright 2000 Bertho A. Stultiens (BS)
  5. *
  6. * This library is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU Lesser General Public
  8. * License as published by the Free Software Foundation; either
  9. * version 2.1 of the License, or (at your option) any later version.
  10. *
  11. * This library is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * Lesser General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Lesser General Public
  17. * License along with this library; if not, write to the Free Software
  18. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  19. */
  20. #ifndef __WMC_WMCTYPES_H
  21. #define __WMC_WMCTYPES_H
  22. #include <stdarg.h>
  23. #include "windef.h"
  24. #include "winbase.h"
  25. /*
  26. * Tokenizer types
  27. */
  28. enum tok_enum {
  29. tok_null = 0,
  30. tok_keyword,
  31. tok_severity,
  32. tok_facility,
  33. tok_language
  34. };
  35. struct token {
  36. enum tok_enum type;
  37. const WCHAR *name; /* Parsed name of token */
  38. int token; /* Tokenvalue or language code */
  39. int codepage;
  40. const WCHAR *alias; /* Alias or filename */
  41. int fixed; /* Cleared if token may change */
  42. };
  43. struct lan_cp {
  44. int language;
  45. int codepage;
  46. };
  47. struct cp_xlat {
  48. int lan;
  49. int cpin;
  50. int cpout;
  51. };
  52. struct lanmsg {
  53. int lan; /* Language code of message */
  54. int cp; /* Codepage of message */
  55. WCHAR *msg; /* Message text */
  56. int len; /* Message length including trailing '\0' */
  57. const char *file; /* File location for definition */
  58. int line;
  59. };
  60. struct msg {
  61. int id; /* Message ID */
  62. unsigned realid; /* Combined message ID */
  63. WCHAR *sym; /* Symbolic name */
  64. int sev; /* Severity code */
  65. int fac; /* Facility code */
  66. struct lanmsg **msgs; /* Array message texts */
  67. int nmsgs; /* Number of message texts in array */
  68. int base; /* Base of number to print */
  69. WCHAR *cast; /* Typecase to use */
  70. };
  71. enum node_type {
  72. nd_msg,
  73. nd_comment
  74. };
  75. struct node {
  76. struct node *next;
  77. struct node *prev;
  78. enum node_type type;
  79. union {
  80. void *all;
  81. WCHAR *comment;
  82. struct msg *msg;
  83. } u;
  84. };
  85. struct block {
  86. unsigned idlo; /* Lowest ID in this set */
  87. unsigned idhi; /* Highest ID in this set */
  88. int size; /* Size of this set */
  89. struct lanmsg **msgs; /* Array of messages in this set */
  90. int nmsg; /* Number of array entries */
  91. };
  92. struct lan_blk {
  93. struct lan_blk *next; /* Linkage for languages */
  94. struct lan_blk *prev;
  95. int lan; /* The language of this block */
  96. int version; /* The resource version for auto-translated resources */
  97. struct block *blks; /* Array of blocks for this language */
  98. int nblk; /* Nr of blocks in array */
  99. };
  100. #endif