7 #ifndef _FCITX_INPUTCONTEXTPROPERTY_H_ 8 #define _FCITX_INPUTCONTEXTPROPERTY_H_ 11 #include <fcitx-utils/macros.h> 13 #include "fcitxcore_export.h" 50 virtual bool needCopy()
const {
return false; }
54 class InputContextPropertyFactoryPrivate;
76 bool registered()
const;
81 std::unique_ptr<InputContextPropertyFactoryPrivate> d_ptr;
88 typedef T PropertyType;
92 template <
typename Ret>
95 typedef Ret PropertyType;
97 : func_(std::move(f)) {}
104 std::function<Ret *(InputContext &)> func_;
136 template <
typename T>
140 #endif // _FCITX_INPUTCONTEXTPROPERTY_H_ Utitliy classes for statically tracking the life of a object.
virtual void copyTo(InputContextProperty *)
copy state to another property.
Helper class to be used with TrackableObjectReference.
Factory class for input context property.
virtual bool needCopy() const
Quick check if there's need to copy over the state.
An input context represents a client of Fcitx.
This is a class that designed to store state that is specific to certain input context.