custcntl.h 3.21 KB
Newer Older
1
/*
2
 * Copyright (C) 2002 Gyorgy 'Nog' Jeney  
3 4 5 6 7 8 9 10 11 12 13 14 15
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
16
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17 18 19 20 21 22 23 24 25 26 27 28 29 30
 */

#ifndef _INC_CUSTCNTL
#define _INC_CUSTCNTL

#ifdef __cplusplus
extern "C" {
#endif

/* Size defs */
#define CCHCCCLASS 32
#define CCHCCDESC 32
#define CCHCCTEXT 256

Austin English's avatar
Austin English committed
31
/* Custom Control Style Structure */
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
typedef struct tagCCSYLEA {
  DWORD flStyle;
  DWORD flExtStyle;
  char szText[CCHCCTEXT];
  LANGID lgid;
  WORD wReserved1;
} CCSTYLEA, *LPCCSTYLEA;

typedef struct tagCCSYLEW {
  DWORD flStyle;
  DWORD flExtStyle;
  WCHAR szText[CCHCCTEXT];
  LANGID lgid;
  WORD wReserved1;
} CCSTYLEW, *LPCCSTYLEW;

#define CCSTYLE   WINELIB_NAME_AW(CCSTYLE)
#define LPCCSTYLE WINELIB_NAME_AW(LPCCSTYLE)

typedef BOOL (CALLBACK *LPFNCCSTYLEA)(HWND, LPCCSTYLEA);
typedef BOOL (CALLBACK *LPFNCCSTYLEW)(HWND, LPCCSTYLEW);

#define LPFNCCSTYLE WINELIB_NAME_AW(LPFNCCSTYLE)

typedef int (CALLBACK *LPFNCCSIZETOTEXTA)(DWORD, DWORD, HFONT, LPSTR);
typedef int (CALLBACK *LPFNCCSIZETOTEXTW)(DWORD, DWORD, HFONT, LPWSTR);

#define LPFNCCSIZETOTEXT WINELIB_NAME_AW(LPFNCCSIZETOTEXT)

61
/* Custom Control style flags structure */
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115
typedef struct tagCCSTYLEFLAGA {
  DWORD flStyle;
  DWORD flStyleMask;
  LPSTR pszStyle;
} CCSTYLEFLAGA, *LPCCSTYLEFLAGA;

typedef struct tagCCSTYLEFLAGW {
  DWORD flStyle;
  DWORD flStyleMask;
  LPWSTR pszStyle;
} CCSTYLEFLAGW, *LPCCSTYLEFLAGW;

#define CCSTYLEFLAG WINELIB_NAME_AW(CCSTYLEFLAG)

/* Custom Control Flags */
#define CCF_NOTEXT 0x00000001

/* CustomControl info structure */
typedef struct tagCCINFOA {
  char szClass[CCHCCCLASS];
  DWORD flOptions;
  char szDesc[CCHCCDESC];
  UINT cxDefault;
  UINT cyDefault;
  DWORD flStyleDefault;
  DWORD flExtStyleDefault;
  DWORD flCtrlTypeMask;
  char szTextDefault[CCHCCTEXT];
  int cStyleFlags;
  LPCCSTYLEFLAGA aStyleFlags;
  LPFNCCSTYLEA lpfnStyle;
  LPFNCCSIZETOTEXTA lpfnSizeToText;
  DWORD dwReserved1;
  DWORD dwReserved2;
} CCINFOA, *LPCCINFOA;

typedef struct tagCCINFOW {
  WCHAR szClass[CCHCCCLASS];
  DWORD flOptions;
  WCHAR szDesc[CCHCCDESC];
  UINT cxDefault;
  UINT cyDefault;
  DWORD flStyleDefault;
  DWORD flExtStyleDefault;
  DWORD flCtrlTypeMask;
  int cStyleFlags;
  LPCCSTYLEFLAGW aStyleFlags;
  WCHAR szTextDefault[CCHCCTEXT];
  LPFNCCSTYLEW lpfnStyle;
  LPFNCCSIZETOTEXTW lpfnSizeToText;
  DWORD dwReserved1;
  DWORD dwReserved2;
} CCINFOW, *LPCCINFOW;

116 117
DECL_WINELIB_TYPE_AW(CCINFO)
DECL_WINELIB_TYPE_AW(LPCCINFO)
118 119 120 121

typedef UINT (CALLBACK *LPFNCCINFOA)(LPCCINFOA);
typedef UINT (CALLBACK *LPFNCCINFOW)(LPCCINFOW);

122
DECL_WINELIB_TYPE_AW(LPFNCCINFO)
123 124 125 126 127 128

#ifdef __cplusplus
}
#endif

#endif /* _INC_CUSTCNTL */