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