xref: /aoo42x/main/vcl/inc/unx/i18n_im.hxx (revision 161f4cd1)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef _SAL_I18N_INPUTMETHOD_HXX
25 #define _SAL_I18N_INPUTMETHOD_HXX
26 
27 #include <vclpluginapi.h>
28 
29 extern "C" char* GetMethodName( XIMStyle nStyle, char *pBuf, int nBufSize);
30 
31 #define bUseInputMethodDefault True
32 
33 class VCLPLUG_GEN_PUBLIC SalI18N_InputMethod
34 {
35 	Bool    	mbUseable; 	// system supports locale as well as status
36 							// and preedit style ?
37 	Bool    	mbMultiLingual;	// system supports iiimp
38 	XIM			maMethod;
39 	XIMCallback maDestroyCallback;
40 	XIMStyles  *mpStyles;
41 
42 public:
43 
IsMultiLingual()44 	Bool		IsMultiLingual()		{ return mbMultiLingual;	}
45     Bool        PosixLocale();
UseMethod()46 	Bool		UseMethod()				{ return mbUseable;	}
GetMethod()47 	XIM 		GetMethod() 			{ return maMethod;	}
48     void        HandleDestroyIM();
49 	Bool 		CreateMethod( Display *pDisplay );
GetSupportedStyles()50 	XIMStyles  *GetSupportedStyles() 	{ return mpStyles; 	}
51 	Bool		SetLocale( const char* pLocale = "" );
52 	Bool		FilterEvent( XEvent *pEvent, XLIB_Window window );
53 	Bool		AddConnectionWatch (Display *pDisplay, void *pConnectionHandler);
54 
55 	SalI18N_InputMethod();
56 	~SalI18N_InputMethod();
57 };
58 
59 #endif // _SAL_I18N_INPUTMETHOD_HXX
60 
61 
62