| 1 | /*
|
|---|
| 2 | * Defines the COM interfaces and APIs related to OLE font support.
|
|---|
| 3 | *
|
|---|
| 4 | * Depends on 'obj_base.h'.
|
|---|
| 5 | */
|
|---|
| 6 |
|
|---|
| 7 | #ifndef __WINE_WINE_OBJ_OLEFONT_H
|
|---|
| 8 | #define __WINE_WINE_OBJ_OLEFONT_H
|
|---|
| 9 |
|
|---|
| 10 | #include "wine/obj_base.h"
|
|---|
| 11 | #include "wine/obj_oleaut.h"
|
|---|
| 12 | #include "wingdi.h" /* TEXTMETRIC*/
|
|---|
| 13 |
|
|---|
| 14 | #ifdef __cplusplus
|
|---|
| 15 | extern "C" {
|
|---|
| 16 | #endif /* defined(__cplusplus) */
|
|---|
| 17 |
|
|---|
| 18 | /*****************************************************************************
|
|---|
| 19 | * Predeclare the interfaces
|
|---|
| 20 | */
|
|---|
| 21 | DEFINE_GUID(IID_IFont, 0xBEF6E002, 0xA874, 0x101A, 0x8B, 0xBA, 0x00, 0xAA, 0x00, 0x30, 0x0C, 0xAB);
|
|---|
| 22 | typedef struct IFont IFont,*LPFONT;
|
|---|
| 23 |
|
|---|
| 24 | DEFINE_GUID(IID_IFontDisp, 0xBEF6E003, 0xA874, 0x101A, 0x8B, 0xBA, 0x00, 0xAA, 0x00, 0x30, 0x0C, 0xAB);
|
|---|
| 25 | typedef struct IFontDisp IFontDisp,*LPFONTDISP;
|
|---|
| 26 |
|
|---|
| 27 | typedef TEXTMETRICW TEXTMETRICOLE;
|
|---|
| 28 |
|
|---|
| 29 | /*****************************************************************************
|
|---|
| 30 | * IFont interface
|
|---|
| 31 | */
|
|---|
| 32 | #define ICOM_INTERFACE IFont
|
|---|
| 33 | #define IFont_METHODS \
|
|---|
| 34 | ICOM_METHOD1(HRESULT, get_Name, BSTR*, pname) \
|
|---|
| 35 | ICOM_METHOD1(HRESULT, put_Name, BSTR, name) \
|
|---|
| 36 | ICOM_METHOD1(HRESULT, get_Size, CY*, psize) \
|
|---|
| 37 | ICOM_METHOD1(HRESULT, put_Size, CY, size) \
|
|---|
| 38 | ICOM_METHOD1(HRESULT, get_Bold, BOOL*, pbold) \
|
|---|
| 39 | ICOM_METHOD1(HRESULT, put_Bold, BOOL, bold) \
|
|---|
| 40 | ICOM_METHOD1(HRESULT, get_Italic, BOOL*, pitalic) \
|
|---|
| 41 | ICOM_METHOD1(HRESULT, put_Italic, BOOL, italic) \
|
|---|
| 42 | ICOM_METHOD1(HRESULT, get_Underline, BOOL*, punderline) \
|
|---|
| 43 | ICOM_METHOD1(HRESULT, put_Underline, BOOL, underline) \
|
|---|
| 44 | ICOM_METHOD1(HRESULT, get_Strikethrough, BOOL*, pstrikethrough) \
|
|---|
| 45 | ICOM_METHOD1(HRESULT, put_Strikethrough, BOOL, strikethrough) \
|
|---|
| 46 | ICOM_METHOD1(HRESULT, get_Weight, short*, pweight) \
|
|---|
| 47 | ICOM_METHOD1(HRESULT, put_Weight, short, weight) \
|
|---|
| 48 | ICOM_METHOD1(HRESULT, get_Charset, short*, pcharset) \
|
|---|
| 49 | ICOM_METHOD1(HRESULT, put_Charset, short, charset) \
|
|---|
| 50 | ICOM_METHOD1(HRESULT, get_hFont, HFONT*, phfont) \
|
|---|
| 51 | ICOM_METHOD1(HRESULT, Clone, IFont**, ppfont) \
|
|---|
| 52 | ICOM_METHOD1(HRESULT, IsEqual, IFont*, pFontOther) \
|
|---|
| 53 | ICOM_METHOD2(HRESULT, SetRatio, long, cyLogical, long, cyHimetric) \
|
|---|
| 54 | ICOM_METHOD1(HRESULT, QueryTextMetrics, TEXTMETRICOLE*, ptm) \
|
|---|
| 55 | ICOM_METHOD1(HRESULT, AddRefHfont, HFONT, hfont) \
|
|---|
| 56 | ICOM_METHOD1(HRESULT, ReleaseHfont, HFONT, hfont) \
|
|---|
| 57 | ICOM_METHOD1(HRESULT, SetHdc, HDC, hdc)
|
|---|
| 58 | #define IFont_IMETHODS \
|
|---|
| 59 | IUnknown_IMETHODS \
|
|---|
| 60 | IFont_METHODS
|
|---|
| 61 | ICOM_DEFINE(IFont,IUnknown)
|
|---|
| 62 | #undef ICOM_INTERFACE
|
|---|
| 63 |
|
|---|
| 64 | #ifdef ICOM_CINTERFACE
|
|---|
| 65 | /*** IUnknown methods ***/
|
|---|
| 66 | #define IFont_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
|
|---|
| 67 | #define IFont_AddRef(p) ICOM_CALL (AddRef,p)
|
|---|
| 68 | #define IFont_Release(p) ICOM_CALL (Release,p)
|
|---|
| 69 | /*** IFont methods ***/
|
|---|
| 70 | #define IFont_getName(p,a) ICOM_CALL1(get_Name,p,a)
|
|---|
| 71 | #define IFont_putName(p,a) ICOM_CALL1(put_Name,p,a)
|
|---|
| 72 | #define IFont_get_Size(p,a) ICOM_CALL1(get_Size,p,a)
|
|---|
| 73 | #define IFont_put_Size(p,a) ICOM_CALL1(put_Size,p,a)
|
|---|
| 74 | #define IFont_get_Bold(p,a) ICOM_CALL1(get_Bold,a)
|
|---|
| 75 | #define IFont_put_Bold(p,a) ICOM_CALL1(put_Bold,a)
|
|---|
| 76 | #define IFont_get_Italic(p,a) ICOM_CALL1(get_Italic,a)
|
|---|
| 77 | #define IFont_put_Italic(p,a) ICOM_CALL1(put_Italic,a)
|
|---|
| 78 | #define IFont_get_Underline(p,a) ICOM_CALL1(get_Underline,a)
|
|---|
| 79 | #define IFont_put_Underline(p,a) ICOM_CALL1(put_Underline,a)
|
|---|
| 80 | #define IFont_get_Strikethrough(p,a) ICOM_CALL1(get_Strikethrough,a)
|
|---|
| 81 | #define IFont_put_Strikethrough(p,a) ICOM_CALL1(put_Strikethrough,a)
|
|---|
| 82 | #define IFont_get_Weight(p,a) ICOM_CALL1(get_Weight,a)
|
|---|
| 83 | #define IFont_put_Weight(p,a) ICOM_CALL1(put_Weight,a)
|
|---|
| 84 | #define IFont_get_Charset(p,a) ICOM_CALL1(get_Charset,a)
|
|---|
| 85 | #define IFont_put_Charset(p,a) ICOM_CALL1(put_Charset,a)
|
|---|
| 86 | #define IFont_get_hFont(p,a) ICOM_CALL1(get_hFont,a)
|
|---|
| 87 | #define IFont_put_hFont(p,a) ICOM_CALL1(put_hFont,a)
|
|---|
| 88 | #define IFont_Clone(p,a) ICOM_CALL1(Clone,a)
|
|---|
| 89 | #define IFont_IsEqual(p,a) ICOM_CALL1(IsEqual,a)
|
|---|
| 90 | #define IFont_SetRatio(p,a,b) ICOM_CALL2(SetRatio,a,b)
|
|---|
| 91 | #define IFont_QueryTextMetrics(p,a) ICOM_CALL1(QueryTextMetrics,a)
|
|---|
| 92 | #define IFont_AddRefHfont(p,a) ICOM_CALL1(AddRefHfont,a)
|
|---|
| 93 | #define IFont_ReleaseHfont(p,a) ICOM_CALL1(ReleaseHfont,a)
|
|---|
| 94 | #define IFont_SetHdc(p,a) ICOM_CALL1(SetHdc,a)
|
|---|
| 95 | #endif
|
|---|
| 96 |
|
|---|
| 97 | /*****************************************************************************
|
|---|
| 98 | * IFont interface
|
|---|
| 99 | */
|
|---|
| 100 | #define ICOM_INTERFACE IFontDisp
|
|---|
| 101 | #define IFontDisp_METHODS
|
|---|
| 102 | #define IFontDisp_IMETHODS \
|
|---|
| 103 | IUnknown_IMETHODS \
|
|---|
| 104 | IFontDisp_METHODS
|
|---|
| 105 | ICOM_DEFINE(IFontDisp,IDispatch)
|
|---|
| 106 | #undef ICOM_INTERFACE
|
|---|
| 107 |
|
|---|
| 108 | #ifdef ICOM_CINTERFACE
|
|---|
| 109 | /*** IUnknown methods ***/
|
|---|
| 110 | #define IFontDisp_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
|
|---|
| 111 | #define IFontDisp_AddRef(p) ICOM_CALL (AddRef,p)
|
|---|
| 112 | #define IFontDisp_Release(p) ICOM_CALL (Release,p)
|
|---|
| 113 | /*** IDispatch methods ***/
|
|---|
| 114 | #define IFontDisp_GetTypeInfoCount(p,a) ICOM_CALL1 (GetTypeInfoCount,p,a)
|
|---|
| 115 | #define IFontDisp_GetTypeInfo(p,a,b,c) ICOM_CALL3 (GetTypeInfo,p,b,c)
|
|---|
| 116 | #define IFontDisp_GetIDsOfNames(p,a,b,c,d,e) ICOM_CALL5 (GetIDsOfNames,p,a,b,c,d,e)
|
|---|
| 117 | #define IFontDisp_Invoke(p,a,b,c,d,e,f,g,h) ICOM_CALL8 (Invoke,p,a,b,c,d,e,f,g,h)
|
|---|
| 118 | /*** IFontDisp methods ***/
|
|---|
| 119 | #endif
|
|---|
| 120 |
|
|---|
| 121 | #ifdef __cplusplus
|
|---|
| 122 | } /* extern "C" */
|
|---|
| 123 | #endif /* defined(__cplusplus) */
|
|---|
| 124 |
|
|---|
| 125 | #endif /* __WINE_WINE_OBJ_OLEFONT_H */
|
|---|
| 126 |
|
|---|
| 127 |
|
|---|