custcntl.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. /*
  2. * Copyright (C) 2002 György 'Nog' Jeney
  3. *
  4. * This library is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU Lesser General Public
  6. * License as published by the Free Software Foundation; either
  7. * version 2.1 of the License, or (at your option) any later version.
  8. *
  9. * This library is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. * Lesser General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU Lesser General Public
  15. * License along with this library; if not, write to the Free Software
  16. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  17. */
  18. #ifndef _INC_CUSTCNTL
  19. #define _INC_CUSTCNTL
  20. #ifdef __cplusplus
  21. extern "C" {
  22. #endif
  23. /* Size defs */
  24. #define CCHCCCLASS 32
  25. #define CCHCCDESC 32
  26. #define CCHCCTEXT 256
  27. /* Custom Control Syte Structure */
  28. typedef struct tagCCSYLEA {
  29. DWORD flStyle;
  30. DWORD flExtStyle;
  31. char szText[CCHCCTEXT];
  32. LANGID lgid;
  33. WORD wReserved1;
  34. } CCSTYLEA, *LPCCSTYLEA;
  35. typedef struct tagCCSYLEW {
  36. DWORD flStyle;
  37. DWORD flExtStyle;
  38. WCHAR szText[CCHCCTEXT];
  39. LANGID lgid;
  40. WORD wReserved1;
  41. } CCSTYLEW, *LPCCSTYLEW;
  42. #define CCSTYLE WINELIB_NAME_AW(CCSTYLE)
  43. #define LPCCSTYLE WINELIB_NAME_AW(LPCCSTYLE)
  44. typedef BOOL (CALLBACK *LPFNCCSTYLEA)(HWND, LPCCSTYLEA);
  45. typedef BOOL (CALLBACK *LPFNCCSTYLEW)(HWND, LPCCSTYLEW);
  46. #define LPFNCCSTYLE WINELIB_NAME_AW(LPFNCCSTYLE)
  47. typedef int (CALLBACK *LPFNCCSIZETOTEXTA)(DWORD, DWORD, HFONT, LPSTR);
  48. typedef int (CALLBACK *LPFNCCSIZETOTEXTW)(DWORD, DWORD, HFONT, LPWSTR);
  49. #define LPFNCCSIZETOTEXT WINELIB_NAME_AW(LPFNCCSIZETOTEXT)
  50. /* Custom Control style flags sturcture */
  51. typedef struct tagCCSTYLEFLAGA {
  52. DWORD flStyle;
  53. DWORD flStyleMask;
  54. LPSTR pszStyle;
  55. } CCSTYLEFLAGA, *LPCCSTYLEFLAGA;
  56. typedef struct tagCCSTYLEFLAGW {
  57. DWORD flStyle;
  58. DWORD flStyleMask;
  59. LPWSTR pszStyle;
  60. } CCSTYLEFLAGW, *LPCCSTYLEFLAGW;
  61. #define CCSTYLEFLAG WINELIB_NAME_AW(CCSTYLEFLAG)
  62. /* Custom Control Flags */
  63. #define CCF_NOTEXT 0x00000001
  64. /* CustomControl info structure */
  65. typedef struct tagCCINFOA {
  66. char szClass[CCHCCCLASS];
  67. DWORD flOptions;
  68. char szDesc[CCHCCDESC];
  69. UINT cxDefault;
  70. UINT cyDefault;
  71. DWORD flStyleDefault;
  72. DWORD flExtStyleDefault;
  73. DWORD flCtrlTypeMask;
  74. char szTextDefault[CCHCCTEXT];
  75. int cStyleFlags;
  76. LPCCSTYLEFLAGA aStyleFlags;
  77. LPFNCCSTYLEA lpfnStyle;
  78. LPFNCCSIZETOTEXTA lpfnSizeToText;
  79. DWORD dwReserved1;
  80. DWORD dwReserved2;
  81. } CCINFOA, *LPCCINFOA;
  82. typedef struct tagCCINFOW {
  83. WCHAR szClass[CCHCCCLASS];
  84. DWORD flOptions;
  85. WCHAR szDesc[CCHCCDESC];
  86. UINT cxDefault;
  87. UINT cyDefault;
  88. DWORD flStyleDefault;
  89. DWORD flExtStyleDefault;
  90. DWORD flCtrlTypeMask;
  91. int cStyleFlags;
  92. LPCCSTYLEFLAGW aStyleFlags;
  93. WCHAR szTextDefault[CCHCCTEXT];
  94. LPFNCCSTYLEW lpfnStyle;
  95. LPFNCCSIZETOTEXTW lpfnSizeToText;
  96. DWORD dwReserved1;
  97. DWORD dwReserved2;
  98. } CCINFOW, *LPCCINFOW;
  99. DECL_WINELIB_TYPE_AW(CCINFO)
  100. DECL_WINELIB_TYPE_AW(LPCCINFO)
  101. typedef UINT (CALLBACK *LPFNCCINFOA)(LPCCINFOA);
  102. typedef UINT (CALLBACK *LPFNCCINFOW)(LPCCINFOW);
  103. DECL_WINELIB_TYPE_AW(LPFNCCINFO)
  104. #ifdef __cplusplus
  105. }
  106. #endif
  107. #endif /* _INC_CUSTCNTL */