Back to index

lightning-sunbird  0.9+nobinonly
aimm.h
Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
00002 /* ***** BEGIN LICENSE BLOCK *****
00003  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00004  *
00005  * The contents of this file are subject to the Mozilla Public License Version
00006  * 1.1 (the "License"); you may not use this file except in compliance with
00007  * the License. You may obtain a copy of the License at
00008  * http://www.mozilla.org/MPL/
00009  *
00010  * Software distributed under the License is distributed on an "AS IS" basis,
00011  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00012  * for the specific language governing rights and limitations under the
00013  * License.
00014  *
00015  * The Original Code is mozilla.org code.
00016  *
00017  * The Initial Developer of the Original Code is
00018  * Netscape Communications Corporation.
00019  * Portions created by the Initial Developer are Copyright (C) 1998
00020  * the Initial Developer. All Rights Reserved.
00021  *
00022  * Contributor(s):
00023  *
00024  * Alternatively, the contents of this file may be used under the terms of
00025  * either the GNU General Public License Version 2 or later (the "GPL"), or
00026  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00027  * in which case the provisions of the GPL or the LGPL are applicable instead
00028  * of those above. If you wish to allow use of your version of this file only
00029  * under the terms of either the GPL or the LGPL, and not to allow others to
00030  * use your version of this file under the terms of the MPL, indicate your
00031  * decision by deleting the provisions above and replace them with the notice
00032  * and other provisions required by the GPL or the LGPL. If you do not delete
00033  * the provisions above, a recipient may use your version of this file under
00034  * the terms of any one of the MPL, the GPL or the LGPL.
00035  *
00036  * ***** END LICENSE BLOCK ***** */
00037 
00038 /* 
00039    This file contains the interface definitation of the Active IMM. 
00040    Please do not change it since the interface have already been fixed.
00041  */
00042 
00043 #ifndef  __AIMM_DEFINED__
00044 #define  __AIMM_DEFINED__
00045 
00046 #include <unknwn.h>
00047 #include <imm.h>
00048 
00049 #if defined(__cplusplus) && !defined(CINTERFACE)
00050 
00051 interface IEnumRegisterWordA;
00052 interface IEnumRegisterWordW;
00053 interface IEnumInputContext;
00054 struct NS_IMEMENUITEMINFOA;
00055 struct NS_IMEMENUITEMINFOW;
00056     
00057     interface
00058     IActiveIMMApp : public IUnknown
00059     {
00060     public:
00061         virtual HRESULT STDMETHODCALLTYPE AssociateContext( 
00062             /* [in] */ HWND hWnd,
00063             /* [in] */ HIMC hIME,
00064             /* [out] */ HIMC __RPC_FAR *phPrev) = 0;
00065         
00066         virtual HRESULT STDMETHODCALLTYPE ConfigureIMEA( 
00067             /* [in] */ HKL hKL,
00068             /* [in] */ HWND hWnd,
00069             /* [in] */ DWORD dwMode,
00070             /* [in] */ REGISTERWORDA __RPC_FAR *pData) = 0;
00071         
00072         virtual HRESULT STDMETHODCALLTYPE ConfigureIMEW( 
00073             /* [in] */ HKL hKL,
00074             /* [in] */ HWND hWnd,
00075             /* [in] */ DWORD dwMode,
00076             /* [in] */ REGISTERWORDW __RPC_FAR *pData) = 0;
00077         
00078         virtual HRESULT STDMETHODCALLTYPE CreateContext( 
00079             /* [out] */ HIMC __RPC_FAR *phIMC) = 0;
00080         
00081         virtual HRESULT STDMETHODCALLTYPE DestroyContext( 
00082             /* [in] */ HIMC hIME) = 0;
00083         
00084         virtual HRESULT STDMETHODCALLTYPE EnumRegisterWordA( 
00085             /* [in] */ HKL hKL,
00086             /* [in] */ LPSTR szReading,
00087             /* [in] */ DWORD dwStyle,
00088             /* [in] */ LPSTR szRegister,
00089             /* [in] */ LPVOID pData,
00090             /* [out] */ IEnumRegisterWordA __RPC_FAR *__RPC_FAR *pEnum) = 0;
00091         
00092         virtual HRESULT STDMETHODCALLTYPE EnumRegisterWordW( 
00093             /* [in] */ HKL hKL,
00094             /* [in] */ LPWSTR szReading,
00095             /* [in] */ DWORD dwStyle,
00096             /* [in] */ LPWSTR szRegister,
00097             /* [in] */ LPVOID pData,
00098             /* [out] */ IEnumRegisterWordW __RPC_FAR *__RPC_FAR *pEnum) = 0;
00099         
00100         virtual HRESULT STDMETHODCALLTYPE EscapeA( 
00101             /* [in] */ HKL hKL,
00102             /* [in] */ HIMC hIMC,
00103             /* [in] */ UINT uEscape,
00104             /* [out][in] */ LPVOID pData,
00105             /* [out] */ LRESULT __RPC_FAR *plResult) = 0;
00106         
00107         virtual HRESULT STDMETHODCALLTYPE EscapeW( 
00108             /* [in] */ HKL hKL,
00109             /* [in] */ HIMC hIMC,
00110             /* [in] */ UINT uEscape,
00111             /* [out][in] */ LPVOID pData,
00112             /* [out] */ LRESULT __RPC_FAR *plResult) = 0;
00113         
00114         virtual HRESULT STDMETHODCALLTYPE GetCandidateListA( 
00115             /* [in] */ HIMC hIMC,
00116             /* [in] */ DWORD dwIndex,
00117             /* [in] */ UINT uBufLen,
00118             /* [out] */ CANDIDATELIST __RPC_FAR *pCandList,
00119             /* [out] */ UINT __RPC_FAR *puCopied) = 0;
00120         
00121         virtual HRESULT STDMETHODCALLTYPE GetCandidateListW( 
00122             /* [in] */ HIMC hIMC,
00123             /* [in] */ DWORD dwIndex,
00124             /* [in] */ UINT uBufLen,
00125             /* [out] */ CANDIDATELIST __RPC_FAR *pCandList,
00126             /* [out] */ UINT __RPC_FAR *puCopied) = 0;
00127         
00128         virtual HRESULT STDMETHODCALLTYPE GetCandidateListCountA( 
00129             /* [in] */ HIMC hIMC,
00130             /* [out] */ DWORD __RPC_FAR *pdwListSize,
00131             /* [out] */ DWORD __RPC_FAR *pdwBufLen) = 0;
00132         
00133         virtual HRESULT STDMETHODCALLTYPE GetCandidateListCountW( 
00134             /* [in] */ HIMC hIMC,
00135             /* [out] */ DWORD __RPC_FAR *pdwListSize,
00136             /* [out] */ DWORD __RPC_FAR *pdwBufLen) = 0;
00137         
00138         virtual HRESULT STDMETHODCALLTYPE GetCandidateWindow( 
00139             /* [in] */ HIMC hIMC,
00140             /* [in] */ DWORD dwIndex,
00141             /* [out] */ CANDIDATEFORM __RPC_FAR *pCandidate) = 0;
00142         
00143         virtual HRESULT STDMETHODCALLTYPE GetCompositionFontA( 
00144             /* [in] */ HIMC hIMC,
00145             /* [out] */ LOGFONTA __RPC_FAR *plf) = 0;
00146         
00147         virtual HRESULT STDMETHODCALLTYPE GetCompositionFontW( 
00148             /* [in] */ HIMC hIMC,
00149             /* [out] */ LOGFONTW __RPC_FAR *plf) = 0;
00150         
00151         virtual HRESULT STDMETHODCALLTYPE GetCompositionStringA( 
00152             /* [in] */ HIMC hIMC,
00153             /* [in] */ DWORD dwIndex,
00154             /* [in] */ DWORD dwBufLen,
00155             /* [out] */ LONG __RPC_FAR *plCopied,
00156             /* [out] */ LPVOID pBuf) = 0;
00157         
00158         virtual HRESULT STDMETHODCALLTYPE GetCompositionStringW( 
00159             /* [in] */ HIMC hIMC,
00160             /* [in] */ DWORD dwIndex,
00161             /* [in] */ DWORD dwBufLen,
00162             /* [out] */ LONG __RPC_FAR *plCopied,
00163             /* [out] */ LPVOID pBuf) = 0;
00164         
00165         virtual HRESULT STDMETHODCALLTYPE GetCompositionWindow( 
00166             /* [in] */ HIMC hIMC,
00167             /* [out] */ COMPOSITIONFORM __RPC_FAR *pCompForm) = 0;
00168         
00169         virtual HRESULT STDMETHODCALLTYPE GetContext( 
00170             /* [in] */ HWND hWnd,
00171             /* [out] */ HIMC __RPC_FAR *phIMC) = 0;
00172         
00173         virtual HRESULT STDMETHODCALLTYPE GetConversionListA( 
00174             /* [in] */ HKL hKL,
00175             /* [in] */ HIMC hIMC,
00176             /* [in] */ LPSTR pSrc,
00177             /* [in] */ UINT uBufLen,
00178             /* [in] */ UINT uFlag,
00179             /* [out] */ CANDIDATELIST __RPC_FAR *pDst,
00180             /* [out] */ UINT __RPC_FAR *puCopied) = 0;
00181         
00182         virtual HRESULT STDMETHODCALLTYPE GetConversionListW( 
00183             /* [in] */ HKL hKL,
00184             /* [in] */ HIMC hIMC,
00185             /* [in] */ LPWSTR pSrc,
00186             /* [in] */ UINT uBufLen,
00187             /* [in] */ UINT uFlag,
00188             /* [out] */ CANDIDATELIST __RPC_FAR *pDst,
00189             /* [out] */ UINT __RPC_FAR *puCopied) = 0;
00190         
00191         virtual HRESULT STDMETHODCALLTYPE GetConversionStatus( 
00192             /* [in] */ HIMC hIMC,
00193             /* [out] */ DWORD __RPC_FAR *pfdwConversion,
00194             /* [out] */ DWORD __RPC_FAR *pfdwSentence) = 0;
00195         
00196         virtual HRESULT STDMETHODCALLTYPE GetDefaultIMEWnd( 
00197             /* [in] */ HWND hWnd,
00198             /* [out] */ HWND __RPC_FAR *phDefWnd) = 0;
00199         
00200         virtual HRESULT STDMETHODCALLTYPE GetDescriptionA( 
00201             /* [in] */ HKL hKL,
00202             /* [in] */ UINT uBufLen,
00203             /* [out] */ LPSTR szDescription,
00204             /* [out] */ UINT __RPC_FAR *puCopied) = 0;
00205         
00206         virtual HRESULT STDMETHODCALLTYPE GetDescriptionW( 
00207             /* [in] */ HKL hKL,
00208             /* [in] */ UINT uBufLen,
00209             /* [out] */ LPWSTR szDescription,
00210             /* [out] */ UINT __RPC_FAR *puCopied) = 0;
00211         
00212         virtual HRESULT STDMETHODCALLTYPE GetGuideLineA( 
00213             /* [in] */ HIMC hIMC,
00214             /* [in] */ DWORD dwIndex,
00215             /* [in] */ DWORD dwBufLen,
00216             /* [out] */ LPSTR pBuf,
00217             /* [out] */ DWORD __RPC_FAR *pdwResult) = 0;
00218         
00219         virtual HRESULT STDMETHODCALLTYPE GetGuideLineW( 
00220             /* [in] */ HIMC hIMC,
00221             /* [in] */ DWORD dwIndex,
00222             /* [in] */ DWORD dwBufLen,
00223             /* [out] */ LPWSTR pBuf,
00224             /* [out] */ DWORD __RPC_FAR *pdwResult) = 0;
00225         
00226         virtual HRESULT STDMETHODCALLTYPE GetIMEFileNameA( 
00227             /* [in] */ HKL hKL,
00228             /* [in] */ UINT uBufLen,
00229             /* [out] */ LPSTR szFileName,
00230             /* [out] */ UINT __RPC_FAR *puCopied) = 0;
00231         
00232         virtual HRESULT STDMETHODCALLTYPE GetIMEFileNameW( 
00233             /* [in] */ HKL hKL,
00234             /* [in] */ UINT uBufLen,
00235             /* [out] */ LPWSTR szFileName,
00236             /* [out] */ UINT __RPC_FAR *puCopied) = 0;
00237         
00238         virtual HRESULT STDMETHODCALLTYPE GetOpenStatus( 
00239             /* [in] */ HIMC hIMC) = 0;
00240         
00241         virtual HRESULT STDMETHODCALLTYPE GetProperty( 
00242             /* [in] */ HKL hKL,
00243             /* [in] */ DWORD fdwIndex,
00244             /* [out] */ DWORD __RPC_FAR *pdwProperty) = 0;
00245         
00246         virtual HRESULT STDMETHODCALLTYPE GetRegisterWordStyleA( 
00247             /* [in] */ HKL hKL,
00248             /* [in] */ UINT nItem,
00249             /* [out] */ STYLEBUFA __RPC_FAR *pStyleBuf,
00250             /* [out] */ UINT __RPC_FAR *puCopied) = 0;
00251         
00252         virtual HRESULT STDMETHODCALLTYPE GetRegisterWordStyleW( 
00253             /* [in] */ HKL hKL,
00254             /* [in] */ UINT nItem,
00255             /* [out] */ STYLEBUFW __RPC_FAR *pStyleBuf,
00256             /* [out] */ UINT __RPC_FAR *puCopied) = 0;
00257         
00258         virtual HRESULT STDMETHODCALLTYPE GetStatusWindowPos( 
00259             /* [in] */ HIMC hIMC,
00260             /* [out] */ POINT __RPC_FAR *pptPos) = 0;
00261         
00262         virtual HRESULT STDMETHODCALLTYPE GetVirtualKey( 
00263             /* [in] */ HWND hWnd,
00264             /* [out] */ UINT __RPC_FAR *puVirtualKey) = 0;
00265         
00266         virtual HRESULT STDMETHODCALLTYPE InstallIMEA( 
00267             /* [in] */ LPSTR szIMEFileName,
00268             /* [in] */ LPSTR szLayoutText,
00269             /* [out] */ HKL __RPC_FAR *phKL) = 0;
00270         
00271         virtual HRESULT STDMETHODCALLTYPE InstallIMEW( 
00272             /* [in] */ LPWSTR szIMEFileName,
00273             /* [in] */ LPWSTR szLayoutText,
00274             /* [out] */ HKL __RPC_FAR *phKL) = 0;
00275         
00276         virtual HRESULT STDMETHODCALLTYPE IsIME( 
00277             /* [in] */ HKL hKL) = 0;
00278         
00279         virtual HRESULT STDMETHODCALLTYPE IsUIMessageA( 
00280             /* [in] */ HWND hWndIME,
00281             /* [in] */ UINT msg,
00282             /* [in] */ WPARAM wParam,
00283             /* [in] */ LPARAM lParam) = 0;
00284         
00285         virtual HRESULT STDMETHODCALLTYPE IsUIMessageW( 
00286             /* [in] */ HWND hWndIME,
00287             /* [in] */ UINT msg,
00288             /* [in] */ WPARAM wParam,
00289             /* [in] */ LPARAM lParam) = 0;
00290         
00291         virtual HRESULT STDMETHODCALLTYPE NotifyIME( 
00292             /* [in] */ HIMC hIMC,
00293             /* [in] */ DWORD dwAction,
00294             /* [in] */ DWORD dwIndex,
00295             /* [in] */ DWORD dwValue) = 0;
00296         
00297         virtual HRESULT STDMETHODCALLTYPE RegisterWordA( 
00298             /* [in] */ HKL hKL,
00299             /* [in] */ LPSTR szReading,
00300             /* [in] */ DWORD dwStyle,
00301             /* [in] */ LPSTR szRegister) = 0;
00302         
00303         virtual HRESULT STDMETHODCALLTYPE RegisterWordW( 
00304             /* [in] */ HKL hKL,
00305             /* [in] */ LPWSTR szReading,
00306             /* [in] */ DWORD dwStyle,
00307             /* [in] */ LPWSTR szRegister) = 0;
00308         
00309         virtual HRESULT STDMETHODCALLTYPE ReleaseContext( 
00310             /* [in] */ HWND hWnd,
00311             /* [in] */ HIMC hIMC) = 0;
00312         
00313         virtual HRESULT STDMETHODCALLTYPE SetCandidateWindow( 
00314             /* [in] */ HIMC hIMC,
00315             /* [in] */ CANDIDATEFORM __RPC_FAR *pCandidate) = 0;
00316         
00317         virtual HRESULT STDMETHODCALLTYPE SetCompositionFontA( 
00318             /* [in] */ HIMC hIMC,
00319             /* [in] */ LOGFONTA __RPC_FAR *plf) = 0;
00320         
00321         virtual HRESULT STDMETHODCALLTYPE SetCompositionFontW( 
00322             /* [in] */ HIMC hIMC,
00323             /* [in] */ LOGFONTW __RPC_FAR *plf) = 0;
00324         
00325         virtual HRESULT STDMETHODCALLTYPE SetCompositionStringA( 
00326             /* [in] */ HIMC hIMC,
00327             /* [in] */ DWORD dwIndex,
00328             /* [in] */ LPVOID pComp,
00329             /* [in] */ DWORD dwCompLen,
00330             /* [in] */ LPVOID pRead,
00331             /* [in] */ DWORD dwReadLen) = 0;
00332         
00333         virtual HRESULT STDMETHODCALLTYPE SetCompositionStringW( 
00334             /* [in] */ HIMC hIMC,
00335             /* [in] */ DWORD dwIndex,
00336             /* [in] */ LPVOID pComp,
00337             /* [in] */ DWORD dwCompLen,
00338             /* [in] */ LPVOID pRead,
00339             /* [in] */ DWORD dwReadLen) = 0;
00340         
00341         virtual HRESULT STDMETHODCALLTYPE SetCompositionWindow( 
00342             /* [in] */ HIMC hIMC,
00343             /* [in] */ COMPOSITIONFORM __RPC_FAR *pCompForm) = 0;
00344         
00345         virtual HRESULT STDMETHODCALLTYPE SetConversionStatus( 
00346             /* [in] */ HIMC hIMC,
00347             /* [in] */ DWORD fdwConversion,
00348             /* [in] */ DWORD fdwSentence) = 0;
00349         
00350         virtual HRESULT STDMETHODCALLTYPE SetOpenStatus( 
00351             /* [in] */ HIMC hIMC,
00352             /* [in] */ BOOL fOpen) = 0;
00353         
00354         virtual HRESULT STDMETHODCALLTYPE SetStatusWindowPos( 
00355             /* [in] */ HIMC hIMC,
00356             /* [in] */ POINT __RPC_FAR *pptPos) = 0;
00357         
00358         virtual HRESULT STDMETHODCALLTYPE SimulateHotKey( 
00359             /* [in] */ HWND hWnd,
00360             /* [in] */ DWORD dwHotKeyID) = 0;
00361         
00362         virtual HRESULT STDMETHODCALLTYPE UnregisterWordA( 
00363             /* [in] */ HKL hKL,
00364             /* [in] */ LPSTR szReading,
00365             /* [in] */ DWORD dwStyle,
00366             /* [in] */ LPSTR szUnregister) = 0;
00367         
00368         virtual HRESULT STDMETHODCALLTYPE UnregisterWordW( 
00369             /* [in] */ HKL hKL,
00370             /* [in] */ LPWSTR szReading,
00371             /* [in] */ DWORD dwStyle,
00372             /* [in] */ LPWSTR szUnregister) = 0;
00373         
00374         virtual HRESULT STDMETHODCALLTYPE Activate( 
00375             /* [in] */ BOOL fRestoreLayout) = 0;
00376         
00377         virtual HRESULT STDMETHODCALLTYPE Deactivate( void) = 0;
00378         
00379         virtual HRESULT STDMETHODCALLTYPE OnDefWindowProc( 
00380             /* [in] */ HWND hWnd,
00381             /* [in] */ UINT Msg,
00382             /* [in] */ WPARAM wParam,
00383             /* [in] */ LPARAM lParam,
00384             /* [out] */ LRESULT __RPC_FAR *plResult) = 0;
00385         
00386         virtual HRESULT STDMETHODCALLTYPE FilterClientWindows( 
00387             /* [in] */ ATOM __RPC_FAR *aaClassList,
00388             /* [in] */ UINT uSize) = 0;
00389         
00390         virtual HRESULT STDMETHODCALLTYPE GetCodePageA( 
00391             /* [in] */ HKL hKL,
00392             /* [out] */ UINT __RPC_FAR *uCodePage) = 0;
00393         
00394         virtual HRESULT STDMETHODCALLTYPE GetLangId( 
00395             /* [in] */ HKL hKL,
00396             /* [out] */ LANGID __RPC_FAR *plid) = 0;
00397         
00398         virtual HRESULT STDMETHODCALLTYPE AssociateContextEx( 
00399             /* [in] */ HWND hWnd,
00400             /* [in] */ HIMC hIMC,
00401             /* [in] */ DWORD dwFlags) = 0;
00402         
00403         virtual HRESULT STDMETHODCALLTYPE DisableIME( 
00404             /* [in] */ DWORD idThread) = 0;
00405         
00406         virtual HRESULT STDMETHODCALLTYPE GetImeMenuItemsA( 
00407             /* [in] */ HIMC hIMC,
00408             /* [in] */ DWORD dwFlags,
00409             /* [in] */ DWORD dwType,
00410             /* [in] */ NS_IMEMENUITEMINFOA __RPC_FAR *pImeParentMenu,
00411             /* [out] */ NS_IMEMENUITEMINFOA __RPC_FAR *pImeMenu,
00412             /* [in] */ DWORD dwSize,
00413             /* [out] */ DWORD __RPC_FAR *pdwResult) = 0;
00414         
00415         virtual HRESULT STDMETHODCALLTYPE GetImeMenuItemsW( 
00416             /* [in] */ HIMC hIMC,
00417             /* [in] */ DWORD dwFlags,
00418             /* [in] */ DWORD dwType,
00419             /* [in] */ NS_IMEMENUITEMINFOW __RPC_FAR *pImeParentMenu,
00420             /* [out] */ NS_IMEMENUITEMINFOW __RPC_FAR *pImeMenu,
00421             /* [in] */ DWORD dwSize,
00422             /* [out] */ DWORD __RPC_FAR *pdwResult) = 0;
00423         
00424         virtual HRESULT STDMETHODCALLTYPE EnumInputContext( 
00425             /* [in] */ DWORD idThread,
00426             /* [out] */ IEnumInputContext __RPC_FAR *__RPC_FAR *ppEnum) = 0;
00427         
00428     };
00429     
00430     interface
00431     IActiveIMMMessagePumpOwner : public IUnknown
00432     {
00433     public:
00434         virtual HRESULT STDMETHODCALLTYPE Start( void) = 0;
00435         
00436         virtual HRESULT STDMETHODCALLTYPE End( void) = 0;
00437         
00438         virtual HRESULT STDMETHODCALLTYPE OnTranslateMessage( 
00439             /* [in] */ const MSG __RPC_FAR *pMsg) = 0;
00440         
00441         virtual HRESULT STDMETHODCALLTYPE Pause( 
00442             /* [out] */ DWORD __RPC_FAR *pdwCookie) = 0;
00443         
00444         virtual HRESULT STDMETHODCALLTYPE Resume( 
00445             /* [in] */ DWORD dwCookie) = 0;
00446         
00447     };
00448 
00449 
00450 #endif        /* C style interface */
00451 
00452 #endif /* __AIMM_DEFINED__ */