Version 5.4.3.2, tag libreoffice-5.4.3.2
[LibreOffice.git] / vcl / inc / unx / i18n_ic.hxx
blob17e973f2d429dac3e3d42606a504c434780a9f93
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_VCL_INC_UNX_I18N_IC_HXX
21 #define INCLUDED_VCL_INC_UNX_I18N_IC_HXX
23 #include <i18nlangtag/lang.h>
24 #include "i18n_cb.hxx"
26 enum class EndExtTextInputFlags;
28 class SalI18N_InputContext
31 private:
33 Bool mbUseable; // system supports current locale ?
34 XIC maContext;
36 XIMStyle mnSupportedPreeditStyle;
37 XIMStyle mnStatusStyle;
38 XIMStyle mnPreeditStyle;
40 preedit_data_t maClientData;
41 XIMCallback maPreeditStartCallback;
42 XIMCallback maPreeditDoneCallback;
43 XIMCallback maPreeditDrawCallback;
44 XIMCallback maPreeditCaretCallback;
45 XIMCallback maCommitStringCallback;
46 XIMCallback maSwitchIMCallback;
47 XIMCallback maDestroyCallback;
49 XVaNestedList mpAttributes;
50 XVaNestedList mpStatusAttributes;
51 XVaNestedList mpPreeditAttributes;
53 bool SupportInputMethodStyle( XIMStyles *pIMStyles );
54 static unsigned int GetWeightingOfIMStyle( XIMStyle n_style );
55 Bool IsSupportedIMStyle( XIMStyle n_style ) const;
57 public:
59 Bool UseContext() { return mbUseable; }
60 bool IsPreeditMode() { return maClientData.eState == PreeditStatus::Active; }
61 XIC GetContext() { return maContext; }
63 void ExtendEventMask( ::Window aFocusWindow );
64 void SetICFocus( SalFrame* pFocusFrame );
65 void UnsetICFocus( SalFrame* pFrame );
66 void HandleDestroyIM();
68 void EndExtTextInput();
69 void CommitKeyEvent( sal_Unicode* pText, std::size_t nLength );
70 int UpdateSpotLocation();
72 void Map( SalFrame *pFrame );
73 void Unmap( SalFrame* pFrame );
75 SalI18N_InputContext( SalFrame *aFrame );
76 ~SalI18N_InputContext();
79 #endif // INCLUDED_VCL_INC_UNX_I18N_IC_HXX
81 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */