1 /* 2 * SPDX-FileCopyrightText: 2016-2016 CSSlayer <wengxt@gmail.com> 3 * 4 * SPDX-License-Identifier: LGPL-2.1-or-later 5 * 6 */ 7 #ifndef _FCITX_USERINTERFACE_H_ 8 #define _FCITX_USERINTERFACE_H_ 9 10 #include <memory> 11 #include <fcitx-utils/macros.h> 12 #include <fcitx/addoninstance.h> 13 14 /// \addtogroup FcitxCore 15 /// \{ 16 /// \file 17 /// \brief Base class for User Interface addon. 18 19 namespace fcitx { 20 21 class InputContext; 22 23 enum class UserInterfaceComponent { 24 /** 25 * Input Panel component 26 * @see InputPanel 27 */ 28 InputPanel, 29 /** 30 * Status Area component 31 * @see StatusArea 32 */ 33 StatusArea, 34 }; 35 36 /** 37 * @brief ... 38 * 39 */ 40 class FCITXCORE_EXPORT UserInterface : public AddonInstance { 41 public: 42 virtual ~UserInterface(); 43 44 virtual void update(UserInterfaceComponent component, 45 InputContext *inputContext) = 0; 46 virtual bool available() = 0; 47 virtual void suspend() = 0; 48 virtual void resume() = 0; 49 }; 50 }; // namespace fcitx 51 52 #endif // _FCITX_USERINTERFACE_H_ 53