ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

textserv.h
Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2005 Mike McCormack
00003  *
00004  * This library is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU Lesser General Public
00006  * License as published by the Free Software Foundation; either
00007  * version 2.1 of the License, or (at your option) any later version.
00008  *
00009  * This library is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012  * Lesser General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU Lesser General Public
00015  * License along with this library; if not, write to the Free Software
00016  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
00017  */
00018 
00019 #ifndef _TEXTSERV_H
00020 #define _TEXTSERV_H
00021 
00022 #ifdef __cplusplus
00023 extern "C" {
00024 #endif
00025 
00026 DEFINE_GUID(IID_ITextServices,0x8d33f740,0xcf58,0x11ce,0xa8,0x9d,0x00,0xaa,0x00,0x6c,0xad,0xc5);
00027 DEFINE_GUID(IID_ITextHost,    0xc5bdd8d0,0xd26e,0x11ce,0xa8,0x9e,0x00,0xaa,0x00,0x6c,0xad,0xc5);
00028 DEFINE_GUID(IID_ITextHost2,   0xc5bdd8d0,0xd26e,0x11ce,0xa8,0x9e,0x00,0xaa,0x00,0x6c,0xad,0xc5);
00029 
00030 /*****************************************************************************
00031  * ITextServices interface
00032  */
00033 #define INTERFACE ITextServices
00034 DECLARE_INTERFACE_(ITextServices,IUnknown)
00035 {
00036     /*** IUnknown methods ***/
00037     STDMETHOD(QueryInterface)(THIS_
00038         REFIID riid,
00039         void** ppvObject) PURE;
00040 
00041     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
00042 
00043     STDMETHOD_(ULONG,Release)(THIS) PURE;
00044 
00045     /*** ITextServices methods ***/
00046 
00047     STDMETHOD(TxSendMessage)( THIS_
00048         UINT msg, WPARAM wparam, LPARAM lparam, LRESULT* plresult) PURE;
00049 
00050     STDMETHOD(TxDraw)( THIS_
00051         DWORD dwDrawAspect,
00052         LONG lindex,
00053         void* pvAspect,
00054         DVTARGETDEVICE* ptd,
00055         HDC hdcDraw,
00056         HDC hicTargetDev,
00057         LPCRECTL lprcBounds,
00058         LPCRECTL lprcWBounds,
00059         LPRECT lprcUpdate,
00060         BOOL (CALLBACK * pfnContinue)(DWORD),
00061         DWORD dwContinue,
00062         LONG lViewId) PURE;
00063 
00064     STDMETHOD(TxGetHScroll)( THIS_
00065         LONG* plMin,
00066         LONG* plMax,
00067         LONG* plPos,
00068         LONG* plPage,
00069         BOOL* pfEnabled) PURE;
00070 
00071     STDMETHOD(TxGetVScroll)( THIS_
00072         LONG* plMin,
00073         LONG* plMax,
00074         LONG* plPos,
00075         LONG* plPage,
00076         BOOL* pfEnabled) PURE;
00077 
00078     STDMETHOD(OnTxSetCursor)( THIS_
00079         DWORD dwDrawAspect,
00080         LONG lindex,
00081         void* pvAspect,
00082         DVTARGETDEVICE* ptd,
00083         HDC hdcDraw,
00084         HDC hicTargetDev,
00085         LPCRECT lprcClient,
00086         INT x,
00087         INT y) PURE;
00088 
00089     STDMETHOD(TxQueryHitPoint)( THIS_
00090         DWORD dwDrawAspect,
00091         LONG lindex,
00092         void* pvAspect,
00093         DVTARGETDEVICE* ptd,
00094         HDC hdcDraw,
00095         HDC hicTargetDev,
00096         LPCRECT lprcClient,
00097         INT x,
00098         INT y,
00099         DWORD* pHitResult) PURE;
00100 
00101     STDMETHOD(OnTxInplaceActivate)( THIS_
00102         LPCRECT prcClient) PURE;
00103 
00104     STDMETHOD(OnTxInplaceDeactivate)( THIS ) PURE;
00105 
00106     STDMETHOD(OnTxUIActivate)( THIS ) PURE;
00107 
00108     STDMETHOD(OnTxUIDeactivate)( THIS ) PURE;
00109 
00110     STDMETHOD(TxGetText)( THIS_
00111         BSTR* pbstrText) PURE;
00112 
00113     STDMETHOD(TxSetText)( THIS_
00114         LPCWSTR pszText) PURE;
00115 
00116     STDMETHOD(TxGetCurrentTargetX)( THIS_
00117         LONG* x) PURE;
00118 
00119     STDMETHOD(TxGetBaseLinePos)( THIS_
00120         LONG* x) PURE;
00121 
00122     STDMETHOD(TxGetNaturalSize)( THIS_
00123         DWORD dwAspect,
00124         HDC hdcDraw,
00125         HDC hicTargetDev,
00126         DVTARGETDEVICE* ptd,
00127         DWORD dwMode,
00128         const SIZEL* psizelExtent,
00129         LONG* pwidth,
00130         LONG* pheight) PURE;
00131 
00132     STDMETHOD(TxGetDropTarget)( THIS_
00133         IDropTarget** ppDropTarget) PURE;
00134 
00135     STDMETHOD(OnTxPropertyBitsChange)( THIS_
00136         DWORD dwMask,
00137         DWORD dwBits) PURE;
00138 
00139     STDMETHOD(TxGetCachedSize)( THIS_
00140         DWORD* pdwWidth,
00141         DWORD* pdwHeight) PURE;
00142 
00143 };
00144 
00145 #ifdef COBJMACROS
00146 /*** IUnknown methods ***/
00147 #define ITextServices_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
00148 #define ITextServices_AddRef(p) (p)->lpVtbl->AddRef(p)
00149 #define ITextServices_Release(p) (p)->lpVtbl->Release(p)
00150 #endif
00151 
00152 #undef INTERFACE
00153 
00154 typedef enum _TXTBACKSTYLE {
00155     TXTBACK_TRANSPARENT = 0,
00156     TXTBACK_OPAQUE
00157 } TXTBACKSTYLE;
00158 
00159 enum TXTHITRESULT {
00160     TXTHITRESULT_NOHIT = 0,
00161     TXTHITRESULT_TRANSPARENT = 1,
00162     TXTHITRESULT_CLOSE = 2,
00163     TXTHITRESULT_HIT = 3
00164 };
00165 
00166 enum TXTNATURALSIZE {
00167     TXTNS_FITTOCONTENT = 1,
00168     TXTNS_ROUNDTOLINE = 2
00169 };
00170 
00171 enum TXTVIEW {
00172     TXTVIEW_ACTIVE = 0,
00173     TXTVIEW_INACTIVE = 1
00174 };
00175 
00176 #define TXTBIT_RICHTEXT         0x000001
00177 #define TXTBIT_MULTILINE        0x000002
00178 #define TXTBIT_READONLY         0x000004
00179 #define TXTBIT_SHOWACCELERATOR  0x000008
00180 #define TXTBIT_USEPASSWORD      0x000010
00181 #define TXTBIT_HIDESELECTION    0x000020
00182 #define TXTBIT_SAVESELECTION    0x000040
00183 #define TXTBIT_AUTOWORDSEL      0x000080
00184 #define TXTBIT_VERTICAL         0x000100
00185 #define TXTBIT_SELBARCHANGE     0x000200
00186 #define TXTBIT_WORDWRAP         0x000400
00187 #define TXTBIT_ALLOWBEEP        0x000800
00188 #define TXTBIT_DISABLEDRAG      0x001000
00189 #define TXTBIT_VIEWINSETCHANGE  0x002000
00190 #define TXTBIT_BACKSTYLECHANGE  0x004000
00191 #define TXTBIT_MAXLENGTHCHANGE  0x008000
00192 #define TXTBIT_SCROLLBARCHANGE  0x010000
00193 #define TXTBIT_CHARFORMATCHANGE 0x020000
00194 #define TXTBIT_PARAFORMATCHANGE 0x040000
00195 #define TXTBIT_EXTENTCHANGE     0x080000
00196 #define TXTBIT_CLIENTRECTCHANGE 0x100000
00197 #define TXTBIT_USECURRENTBKG    0x200000
00198 
00199 /*****************************************************************************
00200  * ITextHost interface
00201  */
00202 #define INTERFACE ITextHost
00203 DECLARE_INTERFACE_(ITextHost,IUnknown)
00204 {
00205     /*** IUnknown methods ***/
00206     STDMETHOD(QueryInterface)(THIS_
00207         REFIID riid,
00208         void** ppvObject) PURE;
00209 
00210     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
00211 
00212     STDMETHOD_(ULONG,Release)(THIS) PURE;
00213 
00214     /*** ITextHost methods ***/
00215     STDMETHOD_(HDC,TxGetDC)( THIS
00216         ) PURE;
00217 
00218     STDMETHOD_(INT,TxReleaseDC)( THIS_
00219         HDC hdc) PURE;
00220 
00221     STDMETHOD_(BOOL,TxShowScrollBar)( THIS_
00222         INT fnBar,
00223         BOOL fShow) PURE;
00224 
00225     STDMETHOD_(BOOL,TxEnableScrollBar)( THIS_
00226         INT fuSBFlags,
00227         INT fuArrowflags) PURE;
00228 
00229     STDMETHOD_(BOOL,TxSetScrollRange)( THIS_
00230         INT fnBar,
00231         LONG nMinPos,
00232         INT nMaxPos,
00233         BOOL fRedraw) PURE;
00234 
00235     STDMETHOD_(BOOL,TxSetScrollPos)( THIS_
00236         INT fnBar,
00237         INT nPos,
00238         BOOL fRedraw) PURE;
00239 
00240     STDMETHOD_(void,TxInvalidateRect)( THIS_
00241         LPCRECT prc,
00242         BOOL fMode) PURE;
00243 
00244     STDMETHOD_(void,TxViewChange)( THIS_
00245         BOOL fUpdate) PURE;
00246 
00247     STDMETHOD_(BOOL,TxCreateCaret)( THIS_
00248         HBITMAP hbmp,
00249         INT xWidth,
00250         INT yHeight) PURE;
00251 
00252     STDMETHOD_(BOOL,TxShowCaret)( THIS_
00253         BOOL fShow) PURE;
00254 
00255     STDMETHOD_(BOOL,TxSetCaretPos)( THIS_
00256         INT x,
00257         INT y) PURE;
00258 
00259     STDMETHOD_(BOOL,TxSetTimer)( THIS_
00260         UINT idTimer,
00261         UINT uTimeout) PURE;
00262 
00263     STDMETHOD_(void,TxKillTimer)( THIS_
00264         UINT idTimer) PURE;
00265 
00266     STDMETHOD_(void,TxScrollWindowEx)( THIS_
00267         INT dx,
00268         INT dy,
00269         LPCRECT lprcScroll,
00270         LPCRECT lprcClip,
00271         HRGN hRgnUpdate,
00272         LPRECT lprcUpdate,
00273         UINT fuScroll) PURE;
00274 
00275     STDMETHOD_(void,TxSetCapture)( THIS_
00276         BOOL fCapture) PURE;
00277 
00278     STDMETHOD_(void,TxSetFocus)( THIS
00279         ) PURE;
00280 
00281     STDMETHOD_(void,TxSetCursor)( THIS_
00282         HCURSOR hcur,
00283         BOOL fText) PURE;
00284 
00285     STDMETHOD_(BOOL,TxScreenToClient)( THIS_
00286         LPPOINT lppt) PURE;
00287 
00288     STDMETHOD_(BOOL,TxClientToScreen)( THIS_
00289         LPPOINT lppt) PURE;
00290 
00291     STDMETHOD(TxActivate)( THIS_
00292         LONG* plOldState) PURE;
00293 
00294     STDMETHOD(TxDeactivate)( THIS_
00295         LONG lNewState) PURE;
00296 
00297     STDMETHOD(TxGetClientRect)( THIS_
00298         LPRECT prc) PURE;
00299 
00300     STDMETHOD(TxGetViewInset)( THIS_
00301         LPRECT prc) PURE;
00302 
00303     STDMETHOD(TxGetCharFormat)( THIS_
00304         const CHARFORMATW** ppCF) PURE;
00305 
00306     STDMETHOD(TxGetParaFormat)( THIS_
00307         const PARAFORMAT** ppPF) PURE;
00308 
00309     STDMETHOD_(COLORREF,TxGetSysColor)( THIS_
00310         int nIndex) PURE;
00311 
00312     STDMETHOD(TxGetBackStyle)( THIS_
00313         TXTBACKSTYLE* pStyle) PURE;
00314 
00315     STDMETHOD(TxGetMaxLength)( THIS_
00316         DWORD* plength) PURE;
00317 
00318     STDMETHOD(TxGetScrollBars)( THIS_
00319         DWORD* pdwScrollBar) PURE;
00320 
00321     STDMETHOD(TxGetPasswordChar)( THIS_
00322         WCHAR* pch) PURE;
00323 
00324     STDMETHOD(TxGetAcceleratorPos)( THIS_
00325         LONG* pch) PURE;
00326 
00327     STDMETHOD(TxGetExtent)( THIS_
00328         LPSIZEL lpExtent) PURE;
00329 
00330     STDMETHOD(OnTxCharFormatChange)( THIS_
00331         const CHARFORMATW* pcf) PURE;
00332 
00333     STDMETHOD(OnTxParaFormatChange)( THIS_
00334         const PARAFORMAT* ppf) PURE;
00335 
00336     STDMETHOD(TxGetPropertyBits)( THIS_
00337         DWORD dwMask,
00338         DWORD* pdwBits) PURE;
00339 
00340     STDMETHOD(TxNotify)( THIS_
00341         DWORD iNotify,
00342         void* pv) PURE;
00343 
00344     STDMETHOD_(HIMC,TxImmGetContext)( THIS
00345         ) PURE;
00346 
00347     STDMETHOD_(void,TxImmReleaseContext)( THIS_
00348         HIMC himc) PURE;
00349 
00350     STDMETHOD(TxGetSelectionBarWidth)( THIS_
00351         LONG* lSelBarWidth) PURE;
00352 
00353 };
00354 
00355 #ifdef COBJMACROS
00356 /*** IUnknown methods ***/
00357 #define ITextHost_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
00358 #define ITextHost_AddRef(p) (p)->lpVtbl->AddRef(p)
00359 #define ITextHost_Release(p) (p)->lpVtbl->Release(p)
00360 #endif
00361 
00362 #undef INTERFACE
00363 
00364 HRESULT WINAPI CreateTextServices(IUnknown*,ITextHost*,IUnknown**);
00365 
00366 typedef HRESULT (WINAPI *PCreateTextServices)(IUnknown*,ITextHost*,IUnknown**);
00367 
00368 #ifdef __cplusplus
00369 }
00370 #endif
00371 
00372 #endif /* _TEXTSERV_H */

Generated on Sun May 27 2012 04:32:27 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.