- adapted kernel32 so that it no longer (directly) manages console
[wine.git] / include / wine / obj_olefont.h
blobe4d55c5c5966784222440dfa473655728b795e70
1 /*
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
26 #ifdef __cplusplus
27 extern "C" {
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 /*****************************************************************************
42 * IFont interface
44 #define INTERFACE IFont
45 #define IFont_METHODS \
46 IUnknown_METHODS \
47 STDMETHOD(get_Name)(THIS_ BSTR * pname) PURE; \
48 STDMETHOD(put_Name)(THIS_ BSTR name) PURE; \
49 STDMETHOD(get_Size)(THIS_ CY * psize) PURE; \
50 STDMETHOD(put_Size)(THIS_ CY size) PURE; \
51 STDMETHOD(get_Bold)(THIS_ BOOL * pbold) PURE; \
52 STDMETHOD(put_Bold)(THIS_ BOOL bold) PURE; \
53 STDMETHOD(get_Italic)(THIS_ BOOL * pitalic) PURE; \
54 STDMETHOD(put_Italic)(THIS_ BOOL italic) PURE; \
55 STDMETHOD(get_Underline)(THIS_ BOOL * punderline) PURE; \
56 STDMETHOD(put_Underline)(THIS_ BOOL underline) PURE; \
57 STDMETHOD(get_Strikethrough)(THIS_ BOOL * pstrikethrough) PURE; \
58 STDMETHOD(put_Strikethrough)(THIS_ BOOL strikethrough) PURE; \
59 STDMETHOD(get_Weight)(THIS_ short * pweight) PURE; \
60 STDMETHOD(put_Weight)(THIS_ short weight) PURE; \
61 STDMETHOD(get_Charset)(THIS_ short * pcharset) PURE; \
62 STDMETHOD(put_Charset)(THIS_ short charset) PURE; \
63 STDMETHOD(get_hFont)(THIS_ HFONT * phfont) PURE; \
64 STDMETHOD(Clone)(THIS_ IFont ** ppfont) PURE; \
65 STDMETHOD(IsEqual)(THIS_ IFont * pFontOther) PURE; \
66 STDMETHOD(SetRatio)(THIS_ long cyLogical, long cyHimetric) PURE; \
67 STDMETHOD(QueryTextMetrics)(THIS_ TEXTMETRICOLE * ptm) PURE; \
68 STDMETHOD(AddRefHfont)(THIS_ HFONT hfont) PURE; \
69 STDMETHOD(ReleaseHfont)(THIS_ HFONT hfont) PURE; \
70 STDMETHOD(SetHdc)(THIS_ HDC hdc) PURE;
71 ICOM_DEFINE(IFont,IUnknown)
72 #undef INTERFACE
74 #ifdef COBJMACROS
75 /*** IUnknown methods ***/
76 #define IFont_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
77 #define IFont_AddRef(p) (p)->lpVtbl->AddRef(p)
78 #define IFont_Release(p) (p)->lpVtbl->Release(p)
79 /*** IFont methods ***/
80 #define IFont_getName(p,a) (p)->lpVtbl->get_Name(p,a)
81 #define IFont_putName(p,a) (p)->lpVtbl->put_Name(p,a)
82 #define IFont_get_Size(p,a) (p)->lpVtbl->get_Size(p,a)
83 #define IFont_put_Size(p,a) (p)->lpVtbl->put_Size(p,a)
84 #define IFont_get_Bold(p,a) (p)->lpVtbl->get_Bold(p,a)
85 #define IFont_put_Bold(p,a) (p)->lpVtbl->put_Bold(p,a)
86 #define IFont_get_Italic(p,a) (p)->lpVtbl->get_Italic(p,a)
87 #define IFont_put_Italic(p,a) (p)->lpVtbl->put_Italic(p,a)
88 #define IFont_get_Underline(p,a) (p)->lpVtbl->get_Underline(p,a)
89 #define IFont_put_Underline(p,a) (p)->lpVtbl->put_Underline(p,a)
90 #define IFont_get_Strikethrough(p,a) (p)->lpVtbl->get_Strikethrough(p,a)
91 #define IFont_put_Strikethrough(p,a) (p)->lpVtbl->put_Strikethrough(p,a)
92 #define IFont_get_Weight(p,a) (p)->lpVtbl->get_Weight(p,a)
93 #define IFont_put_Weight(p,a) (p)->lpVtbl->put_Weight(p,a)
94 #define IFont_get_Charset(p,a) (p)->lpVtbl->get_Charset(p,a)
95 #define IFont_put_Charset(p,a) (p)->lpVtbl->put_Charset(p,a)
96 #define IFont_get_hFont(p,a) (p)->lpVtbl->get_hFont(p,a)
97 #define IFont_put_hFont(p,a) (p)->lpVtbl->put_hFont(p,a)
98 #define IFont_Clone(p,a) (p)->lpVtbl->Clone(p,a)
99 #define IFont_IsEqual(p,a) (p)->lpVtbl->IsEqual(p,a)
100 #define IFont_SetRatio(p,a,b) (p)->lpVtbl->SetRatio(p,a,b)
101 #define IFont_QueryTextMetrics(p,a) (p)->lpVtbl->QueryTextMetrics(p,a)
102 #define IFont_AddRefHfont(p,a) (p)->lpVtbl->AddRefHfont(p,a)
103 #define IFont_ReleaseHfont(p,a) (p)->lpVtbl->ReleaseHfont(p,a)
104 #define IFont_SetHdc(p,a) (p)->lpVtbl->SetHdc(p,a)
105 #endif
107 /*****************************************************************************
108 * IFont interface
110 #define INTERFACE IFontDisp
111 #define IFontDisp_METHODS \
112 IDispatch_METHODS
113 ICOM_DEFINE(IFontDisp,IDispatch)
114 #undef INTERFACE
116 #ifdef COBJMACROS
117 /*** IUnknown methods ***/
118 #define IFontDisp_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
119 #define IFontDisp_AddRef(p) (p)->lpVtbl->AddRef(p)
120 #define IFontDisp_Release(p) (p)->lpVtbl->Release(p)
121 /*** IDispatch methods ***/
122 #define IFontDisp_GetTypeInfoCount(p,a) (p)->lpVtbl->GetTypeInfoCount(p,a)
123 #define IFontDisp_GetTypeInfo(p,a,b,c) (p)->lpVtbl->GetTypeInfo(p,a,b,c)
124 #define IFontDisp_GetIDsOfNames(p,a,b,c,d,e) (p)->lpVtbl->GetIDsOfNames(p,a,b,c,d,e)
125 #define IFontDisp_Invoke(p,a,b,c,d,e,f,g,h) (p)->lpVtbl->Invoke(p,a,b,c,d,e,f,g,h)
126 /*** IFontDisp methods ***/
127 #endif
129 #ifdef __cplusplus
130 } /* extern "C" */
131 #endif /* defined(__cplusplus) */
133 #endif /* __WINE_WINE_OBJ_OLEFONT_H */