1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 .
22 #include "i18n_cb.hxx"
24 enum class EndExtTextInputFlags
;
26 class SalI18N_InputContext
31 Bool mbUseable
; // system supports current locale ?
34 XIMStyle mnSupportedPreeditStyle
;
35 XIMStyle mnStatusStyle
;
36 XIMStyle mnPreeditStyle
;
38 preedit_data_t maClientData
;
39 XIMCallback maPreeditStartCallback
;
40 XIMCallback maPreeditDoneCallback
;
41 XIMCallback maPreeditDrawCallback
;
42 XIMCallback maPreeditCaretCallback
;
43 XIMCallback maCommitStringCallback
;
44 XIMCallback maSwitchIMCallback
;
45 XIMCallback maDestroyCallback
;
47 XVaNestedList mpAttributes
;
48 XVaNestedList mpStatusAttributes
;
49 XVaNestedList mpPreeditAttributes
;
51 bool SupportInputMethodStyle( XIMStyles
const *pIMStyles
);
52 static unsigned int GetWeightingOfIMStyle( XIMStyle n_style
);
53 bool IsSupportedIMStyle( XIMStyle n_style
) const;
57 Bool
UseContext() const { return mbUseable
; }
58 bool IsPreeditMode() const { return maClientData
.eState
== PreeditStatus::Active
; }
59 XIC
GetContext() const { return maContext
; }
61 void ExtendEventMask( ::Window aFocusWindow
);
62 void SetICFocus( SalFrame
* pFocusFrame
);
64 void HandleDestroyIM();
66 void EndExtTextInput();
67 void CommitKeyEvent( sal_Unicode
const * pText
, std::size_t nLength
);
68 int UpdateSpotLocation();
70 void Map( SalFrame
*pFrame
);
73 SalI18N_InputContext( SalFrame
*aFrame
);
74 ~SalI18N_InputContext();
77 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */