LibreOffice Module vcl (master)  1
i18n_ic.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 
20 #ifndef INCLUDED_VCL_INC_UNX_I18N_IC_HXX
21 #define INCLUDED_VCL_INC_UNX_I18N_IC_HXX
22 
23 #include "i18n_cb.hxx"
24 
25 enum class EndExtTextInputFlags;
26 
28 {
29 
30 private:
31 
32  Bool mbUseable; // system supports current locale ?
33  XIC maContext;
34 
36  XIMStyle mnStatusStyle;
37  XIMStyle mnPreeditStyle;
38 
41  XIMCallback maPreeditDoneCallback;
42  XIMCallback maPreeditDrawCallback;
45  XIMCallback maSwitchIMCallback;
46  XIMCallback maDestroyCallback;
47 
48  XVaNestedList mpAttributes;
49  XVaNestedList mpStatusAttributes;
50  XVaNestedList mpPreeditAttributes;
51 
52  bool SupportInputMethodStyle( XIMStyles const *pIMStyles );
53  static unsigned int GetWeightingOfIMStyle( XIMStyle n_style );
54  bool IsSupportedIMStyle( XIMStyle n_style ) const;
55 
56 public:
57 
58  Bool UseContext() { return mbUseable; }
59  bool IsPreeditMode() const { return maClientData.eState == PreeditStatus::Active; }
60  XIC GetContext() { return maContext; }
61 
62  void ExtendEventMask( ::Window aFocusWindow );
63  void SetICFocus( SalFrame* pFocusFrame );
64  void UnsetICFocus();
65  void HandleDestroyIM();
66 
67  void EndExtTextInput();
68  void CommitKeyEvent( sal_Unicode const * pText, std::size_t nLength );
69  int UpdateSpotLocation();
70 
71  void Map( SalFrame *pFrame );
72  void Unmap();
73 
74  SalI18N_InputContext( SalFrame *aFrame );
76 };
77 
78 #endif // INCLUDED_VCL_INC_UNX_I18N_IC_HXX
79 
80 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
XIMCallback maPreeditDoneCallback
Definition: i18n_ic.hxx:41
void ExtendEventMask(::Window aFocusWindow)
bool IsSupportedIMStyle(XIMStyle n_style) const
static unsigned int GetWeightingOfIMStyle(XIMStyle n_style)
bool SupportInputMethodStyle(XIMStyles const *pIMStyles)
sal_uInt16 sal_Unicode
XIMCallback maDestroyCallback
Definition: i18n_ic.hxx:46
void CommitKeyEvent(sal_Unicode const *pText, std::size_t nLength)
XIMCallback maPreeditCaretCallback
Definition: i18n_ic.hxx:43
XVaNestedList mpStatusAttributes
Definition: i18n_ic.hxx:49
XIMStyle mnSupportedPreeditStyle
Definition: i18n_ic.hxx:35
XIMCallback maPreeditDrawCallback
Definition: i18n_ic.hxx:42
XVaNestedList mpAttributes
Definition: i18n_ic.hxx:48
void Map(SalFrame *pFrame)
XIMCallback maSwitchIMCallback
Definition: i18n_ic.hxx:45
EndExtTextInputFlags
Definition: window.hxx:379
XVaNestedList mpPreeditAttributes
Definition: i18n_ic.hxx:50
A SalFrame is a system window (e.g. an X11 window).
Definition: salframe.hxx:112
void SetICFocus(SalFrame *pFocusFrame)
bool IsPreeditMode() const
Definition: i18n_ic.hxx:59
XIMStyle mnPreeditStyle
Definition: i18n_ic.hxx:37
PreeditStatus eState
Definition: i18n_cb.hxx:78
XIMCallback maCommitStringCallback
Definition: i18n_ic.hxx:44
XIMCallback maPreeditStartCallback
Definition: i18n_ic.hxx:40
XIMStyle mnStatusStyle
Definition: i18n_ic.hxx:36
SalI18N_InputContext(SalFrame *aFrame)
preedit_data_t maClientData
Definition: i18n_ic.hxx:39