2 * Defines the COM interfaces and APIs related to OLE font support.
4 * Depends on 'obj_base.h'.
6 * Copyright (C) 1999 Francis Beaudet
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 #ifndef __WINE_WINE_OBJ_OLEFONT_H
24 #define __WINE_WINE_OBJ_OLEFONT_H
28 #endif /* defined(__cplusplus) */
30 /*****************************************************************************
31 * Predeclare the interfaces
33 DEFINE_GUID(IID_IFont, 0xBEF6E002, 0xA874, 0x101A, 0x8B, 0xBA, 0x00, 0xAA, 0x00, 0x30, 0x0C, 0xAB);
34 typedef struct IFont IFont,*LPFONT;
36 DEFINE_GUID(IID_IFontDisp, 0xBEF6E003, 0xA874, 0x101A, 0x8B, 0xBA, 0x00, 0xAA, 0x00, 0x30, 0x0C, 0xAB);
37 typedef struct IFontDisp IFontDisp,*LPFONTDISP;
39 typedef TEXTMETRICW TEXTMETRICOLE;
41 /*****************************************************************************
44 #define ICOM_INTERFACE IFont
45 #define IFont_METHODS \
46 ICOM_METHOD1(HRESULT, get_Name, BSTR*, pname) \
47 ICOM_METHOD1(HRESULT, put_Name, BSTR, name) \
48 ICOM_METHOD1(HRESULT, get_Size, CY*, psize) \
49 ICOM_METHOD1(HRESULT, put_Size, CY, size) \
50 ICOM_METHOD1(HRESULT, get_Bold, BOOL*, pbold) \
51 ICOM_METHOD1(HRESULT, put_Bold, BOOL, bold) \
52 ICOM_METHOD1(HRESULT, get_Italic, BOOL*, pitalic) \
53 ICOM_METHOD1(HRESULT, put_Italic, BOOL, italic) \
54 ICOM_METHOD1(HRESULT, get_Underline, BOOL*, punderline) \
55 ICOM_METHOD1(HRESULT, put_Underline, BOOL, underline) \
56 ICOM_METHOD1(HRESULT, get_Strikethrough, BOOL*, pstrikethrough) \
57 ICOM_METHOD1(HRESULT, put_Strikethrough, BOOL, strikethrough) \
58 ICOM_METHOD1(HRESULT, get_Weight, short*, pweight) \
59 ICOM_METHOD1(HRESULT, put_Weight, short, weight) \
60 ICOM_METHOD1(HRESULT, get_Charset, short*, pcharset) \
61 ICOM_METHOD1(HRESULT, put_Charset, short, charset) \
62 ICOM_METHOD1(HRESULT, get_hFont, HFONT*, phfont) \
63 ICOM_METHOD1(HRESULT, Clone, IFont**, ppfont) \
64 ICOM_METHOD1(HRESULT, IsEqual, IFont*, pFontOther) \
65 ICOM_METHOD2(HRESULT, SetRatio, long, cyLogical, long, cyHimetric) \
66 ICOM_METHOD1(HRESULT, QueryTextMetrics, TEXTMETRICOLE*, ptm) \
67 ICOM_METHOD1(HRESULT, AddRefHfont, HFONT, hfont) \
68 ICOM_METHOD1(HRESULT, ReleaseHfont, HFONT, hfont) \
69 ICOM_METHOD1(HRESULT, SetHdc, HDC, hdc)
70 #define IFont_IMETHODS \
73 ICOM_DEFINE(IFont,IUnknown)
76 /*** IUnknown methods ***/
77 #define IFont_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
78 #define IFont_AddRef(p) ICOM_CALL (AddRef,p)
79 #define IFont_Release(p) ICOM_CALL (Release,p)
80 /*** IFont methods ***/
81 #define IFont_getName(p,a) ICOM_CALL1(get_Name,p,a)
82 #define IFont_putName(p,a) ICOM_CALL1(put_Name,p,a)
83 #define IFont_get_Size(p,a) ICOM_CALL1(get_Size,p,a)
84 #define IFont_put_Size(p,a) ICOM_CALL1(put_Size,p,a)
85 #define IFont_get_Bold(p,a) ICOM_CALL1(get_Bold,a)
86 #define IFont_put_Bold(p,a) ICOM_CALL1(put_Bold,a)
87 #define IFont_get_Italic(p,a) ICOM_CALL1(get_Italic,a)
88 #define IFont_put_Italic(p,a) ICOM_CALL1(put_Italic,a)
89 #define IFont_get_Underline(p,a) ICOM_CALL1(get_Underline,a)
90 #define IFont_put_Underline(p,a) ICOM_CALL1(put_Underline,a)
91 #define IFont_get_Strikethrough(p,a) ICOM_CALL1(get_Strikethrough,a)
92 #define IFont_put_Strikethrough(p,a) ICOM_CALL1(put_Strikethrough,a)
93 #define IFont_get_Weight(p,a) ICOM_CALL1(get_Weight,a)
94 #define IFont_put_Weight(p,a) ICOM_CALL1(put_Weight,a)
95 #define IFont_get_Charset(p,a) ICOM_CALL1(get_Charset,a)
96 #define IFont_put_Charset(p,a) ICOM_CALL1(put_Charset,a)
97 #define IFont_get_hFont(p,a) ICOM_CALL1(get_hFont,a)
98 #define IFont_put_hFont(p,a) ICOM_CALL1(put_hFont,a)
99 #define IFont_Clone(p,a) ICOM_CALL1(Clone,a)
100 #define IFont_IsEqual(p,a) ICOM_CALL1(IsEqual,a)
101 #define IFont_SetRatio(p,a,b) ICOM_CALL2(SetRatio,a,b)
102 #define IFont_QueryTextMetrics(p,a) ICOM_CALL1(QueryTextMetrics,a)
103 #define IFont_AddRefHfont(p,a) ICOM_CALL1(AddRefHfont,a)
104 #define IFont_ReleaseHfont(p,a) ICOM_CALL1(ReleaseHfont,a)
105 #define IFont_SetHdc(p,a) ICOM_CALL1(SetHdc,a)
107 /*****************************************************************************
110 #define ICOM_INTERFACE IFontDisp
111 #define IFontDisp_METHODS
112 #define IFontDisp_IMETHODS \
115 ICOM_DEFINE(IFontDisp,IDispatch)
116 #undef ICOM_INTERFACE
118 /*** IUnknown methods ***/
119 #define IFontDisp_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
120 #define IFontDisp_AddRef(p) ICOM_CALL (AddRef,p)
121 #define IFontDisp_Release(p) ICOM_CALL (Release,p)
122 /*** IDispatch methods ***/
123 #define IFontDisp_GetTypeInfoCount(p,a) ICOM_CALL1 (GetTypeInfoCount,p,a)
124 #define IFontDisp_GetTypeInfo(p,a,b,c) ICOM_CALL3 (GetTypeInfo,p,b,c)
125 #define IFontDisp_GetIDsOfNames(p,a,b,c,d,e) ICOM_CALL5 (GetIDsOfNames,p,a,b,c,d,e)
126 #define IFontDisp_Invoke(p,a,b,c,d,e,f,g,h) ICOM_CALL8 (Invoke,p,a,b,c,d,e,f,g,h)
127 /*** IFontDisp methods ***/
131 #endif /* defined(__cplusplus) */
133 #endif /* __WINE_WINE_OBJ_OLEFONT_H */