merge the formfield patch from ooo-build
[ooovba.git] / vcl / unx / inc / i18n_im.hxx
blobdd56470922bf7fc3659a0a61a228512719984741
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: i18n_im.hxx,v $
10 * $Revision: 1.15 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _SAL_I18N_INPUTMETHOD_HXX
32 #define _SAL_I18N_INPUTMETHOD_HXX
34 #include <vcl/dllapi.h>
36 extern "C" char* GetMethodName( XIMStyle nStyle, char *pBuf, int nBufSize);
38 #define bUseInputMethodDefault True
40 class VCL_DLLPUBLIC SalI18N_InputMethod
42 Bool mbUseable; // system supports locale as well as status
43 // and preedit style ?
44 Bool mbMultiLingual; // system supports iiimp
45 XIM maMethod;
46 XIMCallback maDestroyCallback;
47 XIMStyles *mpStyles;
49 public:
51 Bool IsMultiLingual() { return mbMultiLingual; }
52 Bool PosixLocale();
53 Bool UseMethod() { return mbUseable; }
54 XIM GetMethod() { return maMethod; }
55 void HandleDestroyIM();
56 Bool CreateMethod( Display *pDisplay );
57 XIMStyles *GetSupportedStyles() { return mpStyles; }
58 Bool SetLocale( const char* pLocale = "" );
59 Bool FilterEvent( XEvent *pEvent, XLIB_Window window );
60 Bool AddConnectionWatch (Display *pDisplay, void *pConnectionHandler);
62 #ifdef _USE_PRINT_EXTENSION_
63 void Invalidate() { mbUseable = False; }
64 #endif
66 SalI18N_InputMethod();
67 ~SalI18N_InputMethod();
70 #endif // _SAL_I18N_INPUTMETHOD_HXX