Fcitx
Files | Classes | Macros | Typedefs | Enumerations | Enumerator | Functions | Variables | Friends
FcitxUtils
Collaboration diagram for FcitxUtils:

Files

file  capabilityflags.h
 Enum type for input context capability.
 
file  charutils.h
 Local independent API to detect character type.
 
file  color.h
 Simple color class that represent a 64bit color.
 
file  connectableobject.h
 Utilities to enable use object with signal.
 
file  cutf8.h
 C-style utf8 utility functions.
 
file  bus.h
 API for DBus bus.
 
file  matchrule.h
 API for DBus matching rule.
 
file  message.h
 API for DBus message.
 
file  objectvtable.h
 High level API for dbus objects.
 
file  servicewatcher.h
 API for service monitoring.
 
file  variant.h
 API for dbus variant type.
 
file  element.h
 Utility class that provides a hierarchy between multiple objects.
 
file  flags.h
 Helper template class to make easier to use type safe enum flags.
 
file  fs.h
 Simple file system related API for checking file status.
 
file  inputbuffer.h
 Generic InputBuffer to be used to handle user's preedit.
 
file  key.h
 Class to represent a key.
 
file  keysym.h
 Key sym related types.
 
file  library.h
 Class to handler dynamic library.
 
file  log.h
 Log utilities.
 
file  metastring.h
 Static string based on template argument.
 
file  rect.h
 Provide utility to handle rectangle.
 
file  signals.h
 A signal-slot implemention.
 
file  standardpath.h
 Utility classes to handle XDG file path.
 
file  standardpaths.h
 New Utility classes to handle application specific path.
 
file  stringutils.h
 String handle utilities.
 
file  testing.h
 Utility functions for testing.
 
file  textformatflags.h
 Enum flag for text formatting.
 
file  trackableobject.h
 Utitliy classes for statically tracking the life of a object.
 
file  unixfd.h
 Utility class to handle unix file decriptor.
 
file  utf8.h
 C++ Utility functions for handling utf8 strings.
 

Classes

struct  fcitx::ColorParseException
 
class  fcitx::Color
 Color class for handling color. More...
 
class  fcitx::SignalAdaptor< T, Combiner >
 Helper class to register class. More...
 
struct  fcitx::ConnectableObject::Destroyed
 
class  fcitx::ConnectableObject
 Base class for all object supports connection. More...
 
class  fcitx::dbus::Slot
 Virtual base class represent some internal registration of the bus. More...
 
class  fcitx::dbus::Bus
 A class that represents a connection to the Bus. More...
 
struct  fcitx::dbus::MatchRule
 A dbus matching rule to be used with add match. More...
 
struct  std::hash< fcitx::dbus::MatchRule >
 
struct  fcitx::dbus::DBusStruct< Args >
 A type to represent DBus struct. More...
 
struct  fcitx::dbus::VariantHelperBase
 
class  fcitx::dbus::VariantHelper< Value >
 
class  fcitx::dbus::DictEntry< Key, Value >
 A type to represent DBus dict entry. More...
 
class  fcitx::dbus::ObjectPath
 String like type object path 'o'. More...
 
class  fcitx::dbus::Signature
 String like type object signature 'g'. More...
 
class  fcitx::dbus::Container
 Helper type for serialization, should not be used directly. More...
 
class  fcitx::dbus::ContainerEnd
 Helper type for serialization, should not be used directly. More...
 
struct  fcitx::dbus::TupleMarshaller< Tuple, N >
 
struct  fcitx::dbus::TupleMarshaller< Tuple, 1 >
 
struct  fcitx::dbus::TupleMarshaller< Tuple, 0 >
 
class  fcitx::dbus::Message
 Basic DBus type of a DBus message. More...
 
class  fcitx::dbus::MethodCallError
 An exception if you want message to return a DBus error. More...
 
class  fcitx::dbus::ObjectVTableMethod
 Register a DBus method to current DBus VTable. More...
 
struct  fcitx::dbus::ReturnValueHelper< T >
 
struct  fcitx::dbus::ReturnValueHelper< void >
 
class  fcitx::dbus::ObjectVTableSignal
 Register a DBus signal to current DBus VTable. More...
 
class  fcitx::dbus::ObjectVTableProperty
 Register a DBus read-only property to current DBus VTable. More...
 
class  fcitx::dbus::ObjectVTableWritableProperty
 Register a DBus property to current DBus VTable. More...
 
class  fcitx::dbus::ObjectVTableBase
 
class  fcitx::dbus::ObjectVTable< T >
 Base class of any DBus object. More...
 
class  fcitx::dbus::ObjectVTablePropertyObjectMethodAdaptor< Ret, Args, Callback >
 
class  fcitx::dbus::ObjectVTablePropertyGetMethodAdaptor< Ret, Callback >
 
class  fcitx::dbus::ObjectVTablePropertySetMethodAdaptor< Ret, Callback >
 
class  fcitx::dbus::ServiceWatcher
 A class to be used to monitor the services registered on the Bus. More...
 
class  fcitx::dbus::VariantTypeRegistry
 We need to "predefine some of the variant type that we want to handle". More...
 
class  fcitx::dbus::Variant
 Variant type to be used to box or unbox the dbus variant type. More...
 
class  fcitx::Element
 Base class that can be used for UI composition or graph. More...
 
class  fcitx::Flags< Enum >
 Class provides bit flag support for Enum. More...
 
class  fcitx::InputBuffer
 A string buffer that come with convinient functions to handle use input. More...
 
class  fcitx::Key
 Describe a Key in fcitx. More...
 
class  fcitx::Library
 
class  fcitx::LogCategory
 
class  fcitx::Log
 
class  fcitx::LogMessageBuilder
 
class  fcitx::LogMessageBuilderWrapper< MetaStringFileName, N >
 
struct  fcitx::MetaString< c >
 
struct  fcitx::MetaStringCombine< T >
 
struct  fcitx::MetaStringCombine< MetaString< c... > >
 
struct  fcitx::MetaStringCombine< MetaString<'\0'> >
 
struct  fcitx::MetaStringCombine< MetaString< c... >, MetaString<'\0'>, Rem... >
 
struct  fcitx::MetaStringCombine< MetaString< c... >, MetaString< c2 >, Rem... >
 
struct  fcitx::ConcatMetaString<... >
 
struct  fcitx::ConcatMetaString< MetaString<> >
 
struct  fcitx::ConcatMetaString< MetaString< c... > >
 
struct  fcitx::ConcatMetaString< MetaString< c1s... >, MetaString< c2s... >, _Rem... >
 
struct  fcitx::RemoveMetaStringTail< T >
 
struct  fcitx::RemoveMetaStringTail< MetaString< first, next... > >
 
struct  fcitx::RemoveMetaStringTail< MetaString< first > >
 
struct  fcitx::MetaStringBasenameHelper< T >
 
struct  fcitx::MetaStringBasenameHelper<>
 
struct  fcitx::MetaStringBasenameHelper< MetaString< c... > >
 
struct  fcitx::MetaStringBasenameHelper< MetaString<'/', c... > >
 
struct  fcitx::MetaStringBasenameHelper< MetaString< c... >, MetaString< c2 >, Rem... >
 
struct  fcitx::MetaStringBasenameHelper< MetaString< c... >, MetaString<'/'>, Rem... >
 
struct  fcitx::MetaStringBasename< T >
 
struct  fcitx::MetaStringBasename< MetaString< c... > >
 
struct  fcitx::MetaStringTrim< c >
 
class  fcitx::Rect
 
class  fcitx::LastValue< T >
 Combiner that return the last value. More...
 
class  fcitx::LastValue< void >
 
class  fcitx::Connection
 A connection instance. More...
 
class  fcitx::ScopedConnection
 Connection that will disconnection when it goes out of scope. More...
 
class  fcitx::SignalBase
 
class  fcitx::Signal< T, Combiner >
 Class to represent a signal. May be used like a functor. More...
 
class  fcitx::Signal< Ret(Args...), Combiner >
 
class  fcitx::filter::Chainer< Types >
 Filter class to chain sub filters together. More...
 
class  fcitx::filter::Chainer<>
 
class  fcitx::filter::Chainer< First, Rest... >
 
struct  fcitx::filter::NotFilter< T >
 Filter class that revert the sub filter result. More...
 
struct  fcitx::filter::User
 Filter class that filters based on user file. More...
 
struct  fcitx::filter::Prefix
 Filter class that filters file based on prefix. More...
 
struct  fcitx::filter::Suffix
 Filter class that filters file based on suffix. More...
 
class  fcitx::StandardPathTempFile
 File descriptor wrapper that handles file descriptor and rename automatically. More...
 
class  fcitx::StandardPathFile
 Utility class that wraps around UnixFD. More...
 
class  fcitx::StandardPath
 Utility class to open, locate, list files based on XDG standard. More...
 
class  fcitx::StandardPathsTypeConverter< StandardPath::Type >
 
class  fcitx::StandardPaths
 
class  fcitx::StandardPathsTypeConverter< T >
 
class  fcitx::TrackableObject< T >
 Helper class to be used with TrackableObjectReference. More...
 
class  fcitx::TrackableObjectReference< T >
 Utility class provides a weak reference to the object. More...
 
class  fcitx::UnixFD
 Class wrap around the unix fd. More...
 
class  fcitx::utf8::UTF8CharIterator< Iter >
 Helper class to iterate character, you need to validate the string before using it. More...
 
class  fcitx::utf8::UTF8StringViewIter< Iter >
 

Macros

#define FCITX_DECLARE_SIGNAL(CLASS_NAME, NAME, ...)
 Declare signal by type. More...
 
#define FCITX_DEFINE_SIGNAL(CLASS_NAME, NAME)   ::fcitx::SignalAdaptor<CLASS_NAME::NAME> CLASS_NAME##NAME##Adaptor { this }
 Declare a signal.
 
#define FCITX_DEFINE_SIGNAL_PRIVATE(CLASS_NAME, NAME)   ::fcitx::SignalAdaptor<CLASS_NAME::NAME> CLASS_NAME##NAME##Adaptor { q_ptr }
 Declare a signal in pimpl class.
 
#define FCITX_UTF8_MAX_LENGTH   6
 
#define FCITX_OBJECT_VTABLE_METHOD(FUNCTION, FUNCTION_NAME, SIGNATURE, RET)
 Register a class member function as a DBus method. More...
 
#define FCITX_OBJECT_VTABLE_SIGNAL(SIGNAL, SIGNAL_NAME, SIGNATURE)
 Register a new DBus signal. More...
 
#define FCITX_OBJECT_VTABLE_PROPERTY(PROPERTY, NAME, SIGNATURE, GETMETHOD, ...)
 Register a new DBus read-only property. More...
 
#define FCITX_OBJECT_VTABLE_WRITABLE_PROPERTY(PROPERTY, NAME, SIGNATURE, GETMETHOD, SETMETHOD, ...)
 Register a new DBus read-only property. More...
 
#define FCITX_SIMPLE_LOG(TYPE)
 
#define FCITX_LOGC_IF(CATEGORY, LEVEL, CONDITION)
 
#define FCITX_LOGC(CATEGORY, LEVEL)
 
#define FCITX_LOG(LEVEL)   FCITX_LOGC(::fcitx::Log::defaultCategory, LEVEL)
 
#define FCITX_DEBUG()   FCITX_LOG(Debug)
 
#define FCITX_WARN()   FCITX_LOG(Warn)
 
#define FCITX_INFO()   FCITX_LOG(Info)
 
#define FCITX_ERROR()   FCITX_LOG(Error)
 
#define FCITX_FATAL()   FCITX_LOG(Fatal)
 
#define FCITX_LOG_IF(LEVEL, CONDITION)   FCITX_LOGC_IF(::fcitx::Log::defaultCategory, LEVEL, CONDITION)
 
#define FCITX_ASSERT(...)   FCITX_LOG_IF(Fatal, !(__VA_ARGS__)) << #__VA_ARGS__ << " failed. "
 
#define FCITX_DEFINE_LOG_CATEGORY(name, ...)
 
#define FCITX_DECLARE_LOG_CATEGORY(name)   const ::fcitx::LogCategory &name()
 
#define FCITX_METASTRING_TEMPLATE_16(N, S)
 
#define FCITX_METASTRING_TEMPLATE_256(N, S)
 
#define fcitxMakeMetaString(STRING)   ::fcitx::MetaStringTrimType<FCITX_METASTRING_TEMPLATE_256(, STRING)>
 Create meta string from string literal.
 

Typedefs

using fcitx::CapabilityFlags = Flags< CapabilityFlag >
 
using fcitx::ConnectableObject::Destroyed::signalType = void(void *)
 
using fcitx::ConnectableObject::Destroyed::signature = fcitxMakeMetaString("ConnectableObject" "::" "Destroyed")
 
using fcitx::ObjectDestroyed = ConnectableObject::Destroyed
 Short hand for destroyed signal.
 
using fcitx::dbus::DBusStruct< Args >::tuple_type = std::tuple< Args... >
 
using fcitx::dbus::MessageCallback = std::function< bool(Message &)>
 
using fcitx::dbus::ObjectMethod = std::function< bool(Message)>
 
using fcitx::dbus::ObjectMethodClosure = std::function< bool(Message, const ObjectMethod &)>
 
using fcitx::dbus::PropertyGetMethod = std::function< void(Message &)>
 
using fcitx::dbus::PropertySetMethod = std::function< bool(Message &)>
 
using fcitx::dbus::ReturnValueHelper< T >::type = T
 
using fcitx::dbus::ReturnValueHelper< void >::type = std::tuple<>
 
using fcitx::dbus::PropertyOptions = Flags< PropertyOption >
 
using fcitx::dbus::ServiceWatcherCallback = std::function< void(const std::string &, const std::string &, const std::string &)>
 
using fcitx::dbus::ServiceWatcherEntry = HandlerTableEntry< ServiceWatcherCallback >
 
using fcitx::Flags< Enum >::storage_type = typename std::underlying_type_t< Enum >
 
using fcitx::InputBufferOptions = Flags< InputBufferOption >
 
using fcitx::KeySym = FcitxKeySym
 
using fcitx::KeyStates = Flags< KeyState >
 
using fcitx::KeyList = std::vector< Key >
 
using fcitx::MetaString< c >::array_type = char const(&)[sizeof...(c)+1]
 
using fcitx::MetaStringCombine< MetaString< c... > >::type = MetaString< c... >
 
using fcitx::MetaStringCombine< MetaString<'\0'> >::type = MetaString<>
 
using fcitx::MetaStringCombine< MetaString< c... >, MetaString<'\0'>, Rem... >::type = typename MetaStringCombine< MetaString< c... > >::type
 
using fcitx::MetaStringCombine< MetaString< c... >, MetaString< c2 >, Rem... >::type = typename MetaStringCombine< MetaString< c..., c2 >, Rem... >::type
 
using fcitx::ConcatMetaString< MetaString<> >::type = MetaString<>
 
using fcitx::ConcatMetaString< MetaString< c... > >::type = MetaString< c... >
 
using fcitx::ConcatMetaString< MetaString< c1s... >, MetaString< c2s... >, _Rem... >::type = typename ConcatMetaString< MetaString< c1s..., c2s... >, _Rem... >::type
 
template<typename... Args>
using fcitx::ConcatMetaStringType = typename ConcatMetaString< Args... >::type
 
template<typename T >
using fcitx::RemoveMetaStringTailType = typename RemoveMetaStringTail< T >::type
 
using fcitx::RemoveMetaStringTail< MetaString< first, next... > >::type = ConcatMetaStringType< MetaString< first >, RemoveMetaStringTailType< MetaString< next... > >>
 
using fcitx::RemoveMetaStringTail< MetaString< first > >::type = MetaString<>
 
template<typename... T>
using fcitx::MetaStringBasenameHelperType = typename MetaStringBasenameHelper< T... >::type
 
using fcitx::MetaStringBasenameHelper<>::type = MetaString<>
 
using fcitx::MetaStringBasenameHelper< MetaString< c... > >::type = MetaString< c... >
 
using fcitx::MetaStringBasenameHelper< MetaString<'/', c... > >::type = MetaStringBasenameHelperType< MetaString< c... > >
 
using fcitx::MetaStringBasenameHelper< MetaString< c... >, MetaString< c2 >, Rem... >::type = MetaStringBasenameHelperType< MetaString< c..., c2 >, Rem... >
 
using fcitx::MetaStringBasenameHelper< MetaString< c... >, MetaString<'/'>, Rem... >::type = MetaStringBasenameHelperType< Rem... >
 
using fcitx::MetaStringBasename< MetaString< c... > >::type = MetaStringBasenameHelperType< MetaString< c >... >
 
template<typename T >
using fcitx::MetaStringBasenameType = typename MetaStringBasename< T >::type
 
using fcitx::MetaStringTrim< c >::type = typename MetaStringCombine< MetaString< c >... >::type
 
template<char... c>
using fcitx::MetaStringTrimType = typename MetaStringTrim< c... >::type
 
using fcitx::Signal< Ret(Args...), Combiner >::return_type = Ret
 
using fcitx::Signal< Ret(Args...), Combiner >::function_type = Ret(Args...)
 
using fcitx::StandardPathFileMap = std::map< std::string, StandardPathFile >
 
using fcitx::StandardPathFilesMap = std::map< std::string, std::vector< StandardPathFile > >
 
using fcitx::StandardPathsTypeConverter< StandardPath::Type >::self_type = StandardPath::Type
 
using fcitx::StandardPathsModes = Flags< StandardPathsMode >
 
using fcitx::StandardPathsOptions = Flags< StandardPathsOption >
 
using fcitx::StandardPathsFilterCallback = std::function< bool(const std::filesystem::path &)>
 
using fcitx::TextFormatFlags = Flags< TextFormatFlag >
 
using fcitx::utf8::UTF8CharIterator< Iter >::iterator_category = std::input_iterator_tag
 
using fcitx::utf8::UTF8CharIterator< Iter >::value_type = uint32_t
 
using fcitx::utf8::UTF8CharIterator< Iter >::difference_type = std::ptrdiff_t
 
using fcitx::utf8::UTF8CharIterator< Iter >::reference = const value_type &
 
using fcitx::utf8::UTF8CharIterator< Iter >::pointer = const value_type *
 
using fcitx::utf8::UTF8StringViewIter< Iter >::iterator_category = std::input_iterator_tag
 
using fcitx::utf8::UTF8StringViewIter< Iter >::value_type = std::string_view
 
using fcitx::utf8::UTF8StringViewIter< Iter >::difference_type = std::ptrdiff_t
 
using fcitx::utf8::UTF8StringViewIter< Iter >::reference = const value_type &
 
using fcitx::utf8::UTF8StringViewIter< Iter >::pointer = const value_type *
 

Enumerations

enum  fcitx::CapabilityFlag : uint64_t {
  NoFlag = 0, ClientSideUI = (1 << 0), Preedit = (1 << 1), ClientSideControlState = (1 << 2),
  Password = (1 << 3), FormattedPreedit = (1 << 4), ClientUnfocusCommit = (1 << 5), SurroundingText = (1 << 6),
  Email = (1 << 7), Digit = (1 << 8), Uppercase = (1 << 9), Lowercase = (1 << 10),
  NoAutoUpperCase = (1 << 11), Url = (1 << 12), Dialable = (1 << 13), Number = (1 << 14),
  NoOnScreenKeyboard = (1 << 15), SpellCheck = (1 << 16), NoSpellCheck = (1 << 17), WordCompletion = (1 << 18),
  UppercaseWords = (1 << 19), UppwercaseSentences = (1 << 20), Alpha = (1 << 21), Name = (1 << 22),
  GetIMInfoOnFocus = (1 << 23), RelativeRect = (1 << 24), Terminal = (1ULL << 32), Date = (1ULL << 33),
  Time = (1ULL << 34), Multiline = (1ULL << 35), Sensitive = (1ULL << 36), KeyEventOrderFix = (1ULL << 37),
  fcitx::CapabilityFlag::ReportKeyRepeat = (1ULL << 38), fcitx::CapabilityFlag::ClientSideInputPanel = (1ULL << 39), fcitx::CapabilityFlag::Disable = (1ULL << 40), fcitx::CapabilityFlag::CommitStringWithCursor = (1ULL << 41),
  PasswordOrSensitive = Password | Sensitive
}
 Input context CapabilityFlags. More...
 
enum  BusType { Default, Session, System }
 
enum  RequestNameFlag { None = 0, ReplaceExisting = 1ULL << 0, AllowReplacement = 1ULL << 1, Queue = 1ULL << 2 }
 
enum  MessageType {
  Invalid, Signal, MethodCall, Reply,
  Error
}
 
enum  Type { Array, DictEntry, Struct, Variant }
 
enum  PropertyOption : uint32_t { Hidden = (1 << 0) }
 
enum  fcitx::InputBufferOption { fcitx::InputBufferOption::NoOption = 0, fcitx::InputBufferOption::AsciiOnly = 1, fcitx::InputBufferOption::FixedCursor = 1 << 1 }
 
enum  fcitx::KeyStringFormat { fcitx::KeyStringFormat::Portable, fcitx::KeyStringFormat::Localized }
 Control the behavior of toString function. More...
 
enum  fcitx::KeyState : uint32_t {
  NoState = 0, Shift = 1U << 0, CapsLock = 1U << 1, Ctrl = 1U << 2,
  Alt = 1U << 3, Mod1 = Alt, Alt_Shift = Alt | Shift, Ctrl_Shift = Ctrl | Shift,
  Ctrl_Alt = Ctrl | Alt, Ctrl_Alt_Shift = Ctrl | Alt | Shift, NumLock = 1U << 4, Mod2 = NumLock,
  Hyper = 1U << 5, Mod3 = Hyper, Super = 1U << 6, Mod4 = Super,
  Mod5 = 1U << 7, MousePressed = 1U << 8, HandledMask = 1U << 24, IgnoredMask = 1U << 25,
  Super2 = 1U << 26, Hyper2 = 1U << 27, Meta = 1U << 28, Virtual = 1U << 29,
  fcitx::KeyState::Repeat = 1U << 31, UsedMask = 0x5c001fff, SimpleMask = Ctrl_Alt_Shift | Super | Super2 | Hyper | Meta
}
 KeyState to represent modifier keys. More...
 
enum  LibraryLoadHint {
  NoHint = 0, ResolveAllSymbolsHint = 0x1, PreventUnloadHint = 0x2, ExportExternalSymbolsHint = 0x4,
  NewNameSpace = 0x8, DefaultHint = PreventUnloadHint
}
 
enum  fcitx::LogLevel : int {
  NoLog = 0, fcitx::Fatal = 1, Error = 2, Warn = 3,
  Info = 4, Debug = 5, LastLogLevel = Debug
}
 LogLevel from high to low. More...
 
enum  fcitx::StandardPath::Type {
  fcitx::StandardPath::Type::Config, fcitx::StandardPath::Type::PkgConfig, fcitx::StandardPath::Type::Data, fcitx::StandardPath::Type::Cache,
  fcitx::StandardPath::Type::Runtime, fcitx::StandardPath::Type::Addon, fcitx::StandardPath::Type::PkgData
}
 Enum for location type. More...
 
enum  fcitx::StandardPathsType {
  Config, PkgConfig, Data, Cache,
  Runtime, Addon, PkgData
}
 Enum for location type. More...
 
enum  StandardPathsMode : uint8_t { User = (1 << 0), System = (1 << 1), Default = User | System }
 
enum  fcitx::StandardPathsOption : uint8_t { SkipUserPath = (1 << 0), SkipSystemPath = (1 << 1), SkipBuiltInPath = (1 << 2) }
 Options for standard paths. More...
 
enum  SplitBehavior { KeepEmpty, SkipEmpty }
 
enum  fcitx::TextFormatFlag : int {
  fcitx::TextFormatFlag::Underline = (1 << 3), fcitx::TextFormatFlag::HighLight = (1 << 4), DontCommit = (1 << 5), Bold = (1 << 6),
  Strike = (1 << 7), Italic = (1 << 8), NoFlag = 0
}
 Enum flag for text formatting. More...
 

Functions

const char * fcitx::ColorParseException::what () const noexcept override
 
 fcitx::Color::Color (unsigned short r, unsigned short g, unsigned short b, unsigned short alpha=255)
 
 fcitx::Color::Color (const char *s)
 
 fcitx::Color::Color (const std::string &s)
 
 fcitx::Color::FCITX_INLINE_DEFINE_DEFAULT_DTOR_AND_COPY (Color)
 
std::string fcitx::Color::toString () const
 Get color string in the format of "#rrggbbaa".
 
bool fcitx::Color::operator== (const Color &other) const
 
bool fcitx::Color::operator!= (const Color &other)
 
bool fcitx::Color::operator!= (const Color &other) const
 
void fcitx::Color::setFromString (const char *s)
 
void fcitx::Color::setFromString (const std::string &s)
 
void fcitx::Color::setRed (unsigned short)
 
void fcitx::Color::setGreen (unsigned short)
 
void fcitx::Color::setBlue (unsigned short)
 
void fcitx::Color::setAlpha (unsigned short)
 
void fcitx::Color::setRedF (float)
 
void fcitx::Color::setGreenF (float)
 
void fcitx::Color::setBlueF (float)
 
void fcitx::Color::setAlphaF (float)
 
unsigned short fcitx::Color::red () const
 
unsigned short fcitx::Color::green () const
 
unsigned short fcitx::Color::blue () const
 
unsigned short fcitx::Color::alpha () const
 
float fcitx::Color::redF () const
 
float fcitx::Color::greenF () const
 
float fcitx::Color::blueF () const
 
float fcitx::Color::alphaF () const
 
std::ostream & fcitx::operator<< (std::ostream &os, const Color &c)
 
 fcitx::SignalAdaptor< T, Combiner >::SignalAdaptor (ConnectableObject *d)
 
template<typename SignalType , typename F >
Connection fcitx::ConnectableObject::connect (F &&func)
 
template<typename SignalType >
void fcitx::ConnectableObject::disconnectAll ()
 
void fcitx::ConnectableObject::destroy ()
 Allow user to notify the destroy event earlier. More...
 
template<typename SignalType , typename... Args>
auto fcitx::ConnectableObject::emit (Args &&...args)
 
template<typename SignalType , typename... Args>
auto fcitx::ConnectableObject::emit (Args &&...args) const
 
template<typename SignalType , typename Combiner = LastValue<typename std::function< typename SignalType::signalType>::result_type>>
void fcitx::ConnectableObject::registerSignal ()
 
template<typename SignalType >
void fcitx::ConnectableObject::unregisterSignal ()
 
FCITXUTILS_EXPORT size_t fcitx_utf8_strlen (const char *s)
 Get utf8 string length.
 
FCITXUTILS_EXPORT char * fcitx_utf8_get_char (const char *in, uint32_t *chr)
 Get UCS-4 char in the utf8 string.
 
FCITXUTILS_EXPORT unsigned int fcitx_utf8_char_len (const char *in)
 Get the number of bytes of next character.
 
FCITXUTILS_EXPORT char * fcitx_utf8_get_nth_char (const char *s, uint32_t n)
 Get the pointer to the nth character. More...
 
FCITXUTILS_EXPORT bool fcitx_utf8_check_string (const char *s)
 Check if the string is valid utf8 string.
 
FCITXUTILS_EXPORT uint32_t fcitx_utf8_get_char_validated (const char *p, int max_len, int *plen)
 Get validated character. More...
 
FCITXUTILS_EXPORT void fcitx_utf8_strncpy (char *str, const char *s, size_t byte)
 Copy most byte length, but keep utf8 valid.
 
FCITXUTILS_EXPORT size_t fcitx_utf8_strnlen (const char *str, size_t byte)
 Count most byte length, utf8 string length.
 
FCITXUTILS_EXPORT size_t fcitx_utf8_strnlen_validated (const char *str, size_t byte)
 Count most byte length, utf8 string length and validates the string.
 
FCITXUTILS_EXPORT int fcitx_ucs4_char_len (uint32_t c)
 Return the utf8 bytes of a UCS4 char.
 
FCITXUTILS_EXPORT int fcitx_ucs4_to_utf8 (uint32_t c, char *output)
 Convert ucs4 char to utf8, need to have enough memory for it.
 
 fcitx::dbus::Bus::Bus (const std::string &address)
 Connect to given address.
 
 fcitx::dbus::Bus::Bus (BusType type)
 Connect to given dbus type.
 
 fcitx::dbus::Bus::Bus (const Bus &other)=delete
 
 fcitx::dbus::Bus::Bus (Bus &&other) noexcept
 
FCITX_NODISCARD bool fcitx::dbus::Bus::isOpen () const
 Check if the connection is open.
 
void fcitx::dbus::Bus::attachEventLoop (EventLoop *loop)
 Attach this bus to an event loop.
 
void fcitx::dbus::Bus::detachEventLoop ()
 Remove this bus from an event loop.
 
FCITX_NODISCARD EventLoopfcitx::dbus::Bus::eventLoop () const
 Return the attached event loop. More...
 
FCITX_NODISCARD std::unique_ptr< Slotfcitx::dbus::Bus::addMatch (const MatchRule &rule, MessageCallback callback)
 
FCITX_NODISCARD std::unique_ptr< Slotfcitx::dbus::Bus::addFilter (MessageCallback callback)
 
FCITX_NODISCARD std::unique_ptr< Slotfcitx::dbus::Bus::addObject (const std::string &path, MessageCallback callback)
 
bool fcitx::dbus::Bus::addObjectVTable (const std::string &path, const std::string &interface, ObjectVTableBase &vtable)
 Register a new object on the dbus. More...
 
Message fcitx::dbus::Bus::createSignal (const char *path, const char *interface, const char *member)
 Create a new signal message.
 
Message fcitx::dbus::Bus::createMethodCall (const char *destination, const char *path, const char *interface, const char *member)
 Create a new method message.
 
static const char * fcitx::dbus::Bus::impl ()
 Return the name of the compiled implentation of fcitx dbus. More...
 
FCITX_NODISCARD void * fcitx::dbus::Bus::nativeHandle () const
 Return the internal pointer of the implemenation. More...
 
bool fcitx::dbus::Bus::requestName (const std::string &name, Flags< RequestNameFlag > flags)
 Request the dbus name on the bus. More...
 
bool fcitx::dbus::Bus::releaseName (const std::string &name)
 Release the dbus name.
 
std::string fcitx::dbus::Bus::serviceOwner (const std::string &name, uint64_t usec)
 Helper function to query the service owner. More...
 
std::unique_ptr< Slotfcitx::dbus::Bus::serviceOwnerAsync (const std::string &name, uint64_t usec, MessageCallback callback)
 
std::string fcitx::dbus::Bus::uniqueName ()
 Return the unique name of current connection. More...
 
std::string fcitx::dbus::Bus::address ()
 Return the dbus address being connected to. More...
 
void fcitx::dbus::Bus::flush ()
 Flush the bus immediately.
 
 fcitx::dbus::MatchRule::MatchRule (std::string service, std::string path="", std::string interface="", std::string name="", std::vector< std::string > argumentMatch={})
 
 fcitx::dbus::MatchRule::MatchRule (MessageType type, std::string service, std::string destination="", std::string path="", std::string interface="", std::string name="", std::vector< std::string > argumentMatch={}, bool eavesdrop=false)
 
MessageType fcitx::dbus::MatchRule::messageType () const noexcept
 
const std::string & fcitx::dbus::MatchRule::rule () const noexcept
 
const std::string & fcitx::dbus::MatchRule::service () const noexcept
 
const std::string & fcitx::dbus::MatchRule::destination () const noexcept
 
const std::string & fcitx::dbus::MatchRule::path () const noexcept
 
const std::string & fcitx::dbus::MatchRule::interface () const noexcept
 
const std::string & fcitx::dbus::MatchRule::name () const noexcept
 
const std::vector< std::string > & fcitx::dbus::MatchRule::argumentMatch () const noexcept
 
bool fcitx::dbus::MatchRule::eavesdrop () const noexcept
 
bool fcitx::dbus::MatchRule::check (Message &, const std::string &alterName={}) const
 
bool fcitx::dbus::MatchRule::operator== (const MatchRule &other) const
 
bool fcitx::dbus::MatchRule::operator!= (const MatchRule &other) const
 
size_t std::hash< fcitx::dbus::MatchRule >::operator() (const fcitx::dbus::MatchRule &rule) const noexcept
 
template<typename Element , typename... Elements>
 fcitx::dbus::DBusStruct< Args >::DBusStruct (Element &&ele, Elements &&...elements) requires(sizeof...(Elements) !=0||!std
 
 fcitx::dbus::DBusStruct< Args >::DBusStruct (const DBusStruct &)=default
 
 fcitx::dbus::DBusStruct< Args >::DBusStruct (DBusStruct &&) noexcept(std::is_nothrow_move_constructible< tuple_type >::value)=default
 
DBusStructfcitx::dbus::DBusStruct< Args >::operator= (const DBusStruct &other)=default
 
DBusStructfcitx::dbus::DBusStruct< Args >::operator= (DBusStruct &&other) noexcept(std::is_nothrow_move_assignable< tuple_type >::value)=default
 
 fcitx::dbus::DBusStruct< Args >::DBusStruct (const tuple_type &other)
 
 fcitx::dbus::DBusStruct< Args >::DBusStruct (tuple_type &&other)
 
constexpr tuple_type & fcitx::dbus::DBusStruct< Args >::data ()
 
constexpr const tuple_type & fcitx::dbus::DBusStruct< Args >::data () const
 
virtual std::shared_ptr< void > fcitx::dbus::VariantHelperBase::copy (const void *) const =0
 
virtual void fcitx::dbus::VariantHelperBase::serialize (dbus::Message &msg, const void *data) const =0
 
virtual void fcitx::dbus::VariantHelperBase::print (LogMessageBuilder &builder, const void *data) const =0
 
virtual void fcitx::dbus::VariantHelperBase::deserialize (dbus::Message &msg, void *data) const =0
 
virtual std::string fcitx::dbus::VariantHelperBase::signature () const =0
 
 fcitx::dbus::DictEntry< Key, Value >::DictEntry (const DictEntry &)=default
 
 fcitx::dbus::DictEntry< Key, Value >::DictEntry (DictEntry &&) noexcept=default
 
DictEntryfcitx::dbus::DictEntry< Key, Value >::operator= (const DictEntry &other)=default
 
DictEntryfcitx::dbus::DictEntry< Key, Value >::operator= (DictEntry &&other) noexcept=default
 
 fcitx::dbus::DictEntry< Key, Value >::DictEntry (const Key &key, const Value &value)
 
constexpr Keyfcitx::dbus::DictEntry< Key, Value >::key ()
 
constexpr const Keyfcitx::dbus::DictEntry< Key, Value >::key () const
 
constexpr Value & fcitx::dbus::DictEntry< Key, Value >::value ()
 
constexpr const Value & fcitx::dbus::DictEntry< Key, Value >::value () const
 
 fcitx::dbus::ObjectPath::ObjectPath (const std::string &path={})
 
const std::string & fcitx::dbus::ObjectPath::path () const
 
 fcitx::dbus::Signature::Signature (const std::string &sig={})
 
const std::string & fcitx::dbus::Signature::sig () const
 
 fcitx::dbus::Container::Container (Type t=Type::Array, const Signature &content=Signature())
 
Type fcitx::dbus::Container::type () const
 
const Signaturefcitx::dbus::Container::content () const
 
static void fcitx::dbus::TupleMarshaller< Tuple, N >::marshall (Message &msg, const Tuple &t)
 
static void fcitx::dbus::TupleMarshaller< Tuple, N >::unmarshall (Message &msg, Tuple &t)
 
static void fcitx::dbus::TupleMarshaller< Tuple, 1 >::marshall (Message &msg, const Tuple &t)
 
static void fcitx::dbus::TupleMarshaller< Tuple, 1 >::unmarshall (Message &msg, Tuple &t)
 
static void fcitx::dbus::TupleMarshaller< Tuple, 0 >::marshall (Message &, const Tuple &)
 
static void fcitx::dbus::TupleMarshaller< Tuple, 0 >::unmarshall (Message &, Tuple &)
 
 fcitx::dbus::Message::FCITX_DECLARE_VIRTUAL_DTOR_MOVE (Message)
 
Message fcitx::dbus::Message::createReply () const
 Create a reply to this message.
 
Message fcitx::dbus::Message::createError (const char *name, const char *message) const
 Create a error reply to this message.
 
MessageType fcitx::dbus::Message::type () const
 Return the message type.
 
bool fcitx::dbus::Message::isError () const
 Check if the message is error.
 
std::string fcitx::dbus::Message::destination () const
 Return the destination of the message.
 
void fcitx::dbus::Message::setDestination (const std::string &dest)
 Set the destination of the message. More...
 
std::string fcitx::dbus::Message::sender () const
 Return the sender of the message.
 
std::string fcitx::dbus::Message::member () const
 Return the member of the message.
 
std::string fcitx::dbus::Message::interface () const
 Return the interface of the message.
 
std::string fcitx::dbus::Message::signature () const
 Return the signature of the message.
 
std::string fcitx::dbus::Message::errorName () const
 Return the error name of the message. More...
 
std::string fcitx::dbus::Message::errorMessage () const
 Return the error message of the message. More...
 
std::string fcitx::dbus::Message::path () const
 Return the path of the message.
 
void * fcitx::dbus::Message::nativeHandle () const
 Return the low level internal pointer of the message. More...
 
Message fcitx::dbus::Message::call (uint64_t usec)
 Synchronously call a dbus method with a timeout in microseconds.
 
std::unique_ptr< Slotfcitx::dbus::Message::callAsync (uint64_t usec, MessageCallback callback)
 Asynchronously call a dbus method with a timeout in microseconds. More...
 
bool fcitx::dbus::Message::send ()
 Send this message.
 
 fcitx::dbus::Message::operator bool () const
 Check if message is not empty and has no serialization error.
 
bool fcitx::dbus::Message::end () const
 Check if message reaches end.
 
void fcitx::dbus::Message::resetError ()
 Clear serialization error.
 
void fcitx::dbus::Message::rewind ()
 Rewind the message to the beginning.
 
void fcitx::dbus::Message::skip ()
 Skip the next data.
 
std::pair< char, std::string > fcitx::dbus::Message::peekType ()
 Check the next type of data in the message.
 
Messagefcitx::dbus::Message::operator<< (uint8_t v)
 
Messagefcitx::dbus::Message::operator<< (bool b)
 
Messagefcitx::dbus::Message::operator<< (int16_t v)
 
Messagefcitx::dbus::Message::operator<< (uint16_t v)
 
Messagefcitx::dbus::Message::operator<< (int32_t v)
 
Messagefcitx::dbus::Message::operator<< (uint32_t v)
 
Messagefcitx::dbus::Message::operator<< (int64_t v)
 
Messagefcitx::dbus::Message::operator<< (uint64_t v)
 
Messagefcitx::dbus::Message::operator<< (double v)
 
Messagefcitx::dbus::Message::operator<< (const std::string &s)
 
Messagefcitx::dbus::Message::operator<< (const char *s)
 
Messagefcitx::dbus::Message::operator<< (const ObjectPath &o)
 
Messagefcitx::dbus::Message::operator<< (const Signature &s)
 
Messagefcitx::dbus::Message::operator<< (const UnixFD &fd)
 
Messagefcitx::dbus::Message::operator<< (const Container &c)
 
Messagefcitx::dbus::Message::operator<< (const ContainerEnd &c)
 
Messagefcitx::dbus::Message::operator<< (const Variant &v)
 
template<typename K , typename V >
Messagefcitx::dbus::Message::operator<< (const std::pair< K, V > &t)
 
template<typename... Args>
Messagefcitx::dbus::Message::operator<< (const std::tuple< Args... > &t)
 
template<typename... Args>
Messagefcitx::dbus::Message::operator<< (const DBusStruct< Args... > &t)
 
template<typename Key , typename Value >
Messagefcitx::dbus::Message::operator<< (const DictEntry< Key, Value > &t)
 
template<typename T >
Messagefcitx::dbus::Message::operator<< (const std::vector< T > &t)
 
Messagefcitx::dbus::Message::operator>> (uint8_t &v)
 
Messagefcitx::dbus::Message::operator>> (bool &b)
 
Messagefcitx::dbus::Message::operator>> (int16_t &v)
 
Messagefcitx::dbus::Message::operator>> (uint16_t &v)
 
Messagefcitx::dbus::Message::operator>> (int32_t &v)
 
Messagefcitx::dbus::Message::operator>> (uint32_t &v)
 
Messagefcitx::dbus::Message::operator>> (int64_t &v)
 
Messagefcitx::dbus::Message::operator>> (uint64_t &v)
 
Messagefcitx::dbus::Message::operator>> (double &v)
 
Messagefcitx::dbus::Message::operator>> (std::string &s)
 
Messagefcitx::dbus::Message::operator>> (ObjectPath &o)
 
Messagefcitx::dbus::Message::operator>> (Signature &s)
 
Messagefcitx::dbus::Message::operator>> (UnixFD &fd)
 
Messagefcitx::dbus::Message::operator>> (const Container &c)
 
Messagefcitx::dbus::Message::operator>> (const ContainerEnd &c)
 
Messagefcitx::dbus::Message::operator>> (Variant &variant)
 
template<typename K , typename V >
Messagefcitx::dbus::Message::operator>> (std::pair< K, V > &t)
 
template<typename... Args>
Messagefcitx::dbus::Message::operator>> (std::tuple< Args... > &t)
 
template<typename... Args>
Messagefcitx::dbus::Message::operator>> (DBusStruct< Args... > &t)
 
template<typename Key , typename Value >
Messagefcitx::dbus::Message::operator>> (DictEntry< Key, Value > &t)
 
template<typename T >
Messagefcitx::dbus::Message::operator>> (std::vector< T > &t)
 
template<typename K , typename V >
LogMessageBuilderfcitx::dbus::operator<< (LogMessageBuilder &builder, const DictEntry< K, V > &entry)
 
template<typename... Args>
LogMessageBuilderfcitx::dbus::operator<< (LogMessageBuilder &builder, const DBusStruct< Args... > &st)
 
template<std::size_t i, typename... _Elements>
constexpr auto & std::get (fcitx::dbus::DBusStruct< _Elements... > &t) noexcept
 
template<std::size_t i, typename... _Elements>
constexpr auto & std::get (const fcitx::dbus::DBusStruct< _Elements... > &t) noexcept
 
 fcitx::dbus::MethodCallError::MethodCallError (const char *name, const char *error)
 
const char * fcitx::dbus::MethodCallError::what () const noexcept override
 
const char * fcitx::dbus::MethodCallError::name () const
 
 fcitx::dbus::ObjectVTableMethod::ObjectVTableMethod (ObjectVTableBase *vtable, const std::string &name, const std::string &signature, const std::string &ret, ObjectMethod handler)
 
const std::string & fcitx::dbus::ObjectVTableMethod::name () const
 
const std::string & fcitx::dbus::ObjectVTableMethod::signature () const
 
const std::string & fcitx::dbus::ObjectVTableMethod::ret () const
 
const ObjectMethod & fcitx::dbus::ObjectVTableMethod::handler () const
 
ObjectVTableBasefcitx::dbus::ObjectVTableMethod::vtable () const
 
void fcitx::dbus::ObjectVTableMethod::setClosureFunction (ObjectMethodClosure closure)
 Set a closure function to call the handler with in it. More...
 
template<typename U >
void fcitx::dbus::ReturnValueHelper< T >::call (U u)
 
template<typename U >
void fcitx::dbus::ReturnValueHelper< void >::call (U u)
 
 fcitx::dbus::ObjectVTableSignal::ObjectVTableSignal (ObjectVTableBase *vtable, std::string name, std::string signature)
 
Message fcitx::dbus::ObjectVTableSignal::createSignal ()
 
const std::string & fcitx::dbus::ObjectVTableSignal::name () const
 
const std::string & fcitx::dbus::ObjectVTableSignal::signature () const
 
 fcitx::dbus::ObjectVTableProperty::ObjectVTableProperty (ObjectVTableBase *vtable, std::string name, std::string signature, PropertyGetMethod getMethod, PropertyOptions options)
 
const std::string & fcitx::dbus::ObjectVTableProperty::name () const
 
const std::string & fcitx::dbus::ObjectVTableProperty::signature () const
 
bool fcitx::dbus::ObjectVTableProperty::writable () const
 
const PropertyGetMethod & fcitx::dbus::ObjectVTableProperty::getMethod () const
 
const PropertyOptionsfcitx::dbus::ObjectVTableProperty::options () const
 
 fcitx::dbus::ObjectVTableProperty::ObjectVTableProperty (std::unique_ptr< ObjectVTablePropertyPrivate > d)
 
 fcitx::dbus::ObjectVTableProperty::FCITX_DECLARE_PRIVATE (ObjectVTableProperty)
 
 fcitx::dbus::ObjectVTableWritableProperty::ObjectVTableWritableProperty (ObjectVTableBase *vtable, std::string name, std::string signature, PropertyGetMethod getMethod, PropertySetMethod setMethod, PropertyOptions options)
 
const PropertySetMethod & fcitx::dbus::ObjectVTableWritableProperty::setMethod () const
 
void fcitx::dbus::ObjectVTableBase::addMethod (ObjectVTableMethod *method)
 
void fcitx::dbus::ObjectVTableBase::addSignal (ObjectVTableSignal *sig)
 
void fcitx::dbus::ObjectVTableBase::addProperty (ObjectVTableProperty *property)
 
void fcitx::dbus::ObjectVTableBase::releaseSlot ()
 Unregister the dbus object from the bus. More...
 
Busfcitx::dbus::ObjectVTableBase::bus ()
 Return the bus that the object is registered to.
 
Busfcitx::dbus::ObjectVTableBase::bus () const
 
bool fcitx::dbus::ObjectVTableBase::isRegistered () const
 Return whether this object is registered to a bus.
 
const std::string & fcitx::dbus::ObjectVTableBase::path () const
 Return the registered dbus object path of the object.
 
const std::string & fcitx::dbus::ObjectVTableBase::interface () const
 Return the registered dbus interface of the object.
 
Messagefcitx::dbus::ObjectVTableBase::currentMessage () const
 Return the current dbus message for current method. More...
 
void fcitx::dbus::ObjectVTableBase::setCurrentMessage (Message *message)
 Set the current dbus message. More...
 
ObjectVTableMethodfcitx::dbus::ObjectVTableBase::findMethod (const std::string &name)
 
ObjectVTablePropertyfcitx::dbus::ObjectVTableBase::findProperty (const std::string &name)
 
virtual std::mutex & fcitx::dbus::ObjectVTableBase::privateDataMutexForType ()=0
 
virtual ObjectVTablePrivatefcitx::dbus::ObjectVTableBase::privateDataForType ()=0
 
static std::shared_ptr< ObjectVTablePrivatefcitx::dbus::ObjectVTableBase::newSharedPrivateData ()
 
std::mutex & fcitx::dbus::ObjectVTable< T >::privateDataMutexForType () override
 
ObjectVTablePrivatefcitx::dbus::ObjectVTable< T >::privateDataForType () override
 
static std::mutex & fcitx::dbus::ObjectVTable< T >::privateDataMutex ()
 
static ObjectVTablePrivatefcitx::dbus::ObjectVTable< T >::privateData ()
 
 fcitx::dbus::ObjectVTablePropertyObjectMethodAdaptor< Ret, Args, Callback >::ObjectVTablePropertyObjectMethodAdaptor (ObjectVTableBase *base, Callback callback)
 
 fcitx::dbus::ObjectVTablePropertyObjectMethodAdaptor< Ret, Args, Callback >::FCITX_INLINE_DEFINE_DEFAULT_DTOR_COPY_AND_MOVE (ObjectVTablePropertyObjectMethodAdaptor)
 
bool fcitx::dbus::ObjectVTablePropertyObjectMethodAdaptor< Ret, Args, Callback >::operator() (Message msg)
 
template<typename Ret , typename Args , typename Callback >
auto fcitx::dbus::makeObjectVTablePropertyObjectMethodAdaptor (ObjectVTableBase *base, Callback &&callback)
 
 fcitx::dbus::ObjectVTablePropertyGetMethodAdaptor< Ret, Callback >::ObjectVTablePropertyGetMethodAdaptor (ObjectVTableBase *base, Callback callback)
 
 fcitx::dbus::ObjectVTablePropertyGetMethodAdaptor< Ret, Callback >::FCITX_INLINE_DEFINE_DEFAULT_DTOR_COPY_AND_MOVE (ObjectVTablePropertyGetMethodAdaptor)
 
void fcitx::dbus::ObjectVTablePropertyGetMethodAdaptor< Ret, Callback >::operator() (Message &msg)
 
template<typename Ret , typename Callback >
auto fcitx::dbus::makeObjectVTablePropertyGetMethodAdaptor (ObjectVTableBase *base, Callback &&callback)
 
 fcitx::dbus::ObjectVTablePropertySetMethodAdaptor< Ret, Callback >::ObjectVTablePropertySetMethodAdaptor (ObjectVTableBase *base, Callback callback)
 
 fcitx::dbus::ObjectVTablePropertySetMethodAdaptor< Ret, Callback >::FCITX_INLINE_DEFINE_DEFAULT_DTOR_COPY_AND_MOVE (ObjectVTablePropertySetMethodAdaptor)
 
bool fcitx::dbus::ObjectVTablePropertySetMethodAdaptor< Ret, Callback >::operator() (Message &msg)
 
template<typename Ret , typename Callback >
auto fcitx::dbus::makeObjectVTablePropertySetMethodAdaptor (ObjectVTableBase *base, Callback &&callback)
 
 fcitx::dbus::ServiceWatcher::ServiceWatcher (Bus &bus)
 
FCITX_NODISCARD std::unique_ptr< ServiceWatcherEntryfcitx::dbus::ServiceWatcher::watchService (const std::string &name, ServiceWatcherCallback callback)
 
static VariantTypeRegistryfcitx::dbus::VariantTypeRegistry::defaultRegistry ()
 
template<typename TypeName >
void fcitx::dbus::VariantTypeRegistry::registerType ()
 
std::shared_ptr< VariantHelperBasefcitx::dbus::VariantTypeRegistry::lookupType (const std::string &signature) const
 
std::shared_ptr< VariantHelperBasefcitx::dbus::lookupVariantType (const std::string &signature)
 
template<typename TypeName >
void fcitx::dbus::registerVariantType ()
 
 fcitx::dbus::Variant::Variant ()=default
 Construct an empty variant.
 
template<typename Value , typename Dummy = std::enable_if_t< !std::is_same_v<std::remove_cv_t<std::remove_reference_t<Value>>, Variant>, void>>
 fcitx::dbus::Variant::Variant (Value &&value)
 Construct a variant from some existing data.
 
 fcitx::dbus::Variant::Variant (const Variant &v)
 Copy Construct a variant from another variant.
 
 fcitx::dbus::Variant::Variant (Variant &&v)=default
 Copy another variant data to current.
 
Variantfcitx::dbus::Variant::operator= (const Variant &v)
 
Variantfcitx::dbus::Variant::operator= (Variant &&v)=default
 
template<typename Value , typename = std::enable_if_t<!std::is_same< std::remove_cv_t<std::remove_reference_t<Value>>, dbus::Variant>::value>>
void fcitx::dbus::Variant::setData (Value &&value)
 Set variant data from some existing data.
 
void fcitx::dbus::Variant::setData (const Variant &v)
 Copy variant data from another variant.
 
void fcitx::dbus::Variant::setData (Variant &&v)
 Set variant data from anthoer variant.
 
void fcitx::dbus::Variant::setData (const char *str)
 Set variant data with a C-string.
 
void fcitx::dbus::Variant::setRawData (std::shared_ptr< void > data, std::shared_ptr< VariantHelperBase > helper)
 
template<typename Value >
const Value & fcitx::dbus::Variant::dataAs () const
 Return data as given type. More...
 
void fcitx::dbus::Variant::writeToMessage (dbus::Message &msg) const
 
const std::string & fcitx::dbus::Variant::signature () const
 Return the signature of the data.
 
void fcitx::dbus::Variant::printData (LogMessageBuilder &builder) const
 Print the variant data to log.
 
bool fcitx::Element::isChild (const Element *element) const
 Enable query between different elements.
 
bool fcitx::Element::isParent (const Element *element) const
 Enable query between different elements.
 
const std::list< Element * > & fcitx::Element::parents () const
 List all parents. More...
 
const std::list< Element * > & fcitx::Element::childs () const
 List all childs. More...
 
void fcitx::Element::addChild (Element *child)
 
void fcitx::Element::addParent (Element *parent)
 
void fcitx::Element::insertChild (Element *before, Element *child)
 
void fcitx::Element::insertParent (Element *before, Element *parent)
 
void fcitx::Element::removeParent (Element *parent)
 
void fcitx::Element::removeChild (Element *child)
 
void fcitx::Element::removeAllChild ()
 
void fcitx::Element::removeAllParent ()
 
static void fcitx::Element::addEdge (Element *parent, Element *child, Element *beforeChild, Element *beforeParent)
 
static void fcitx::Element::removeEdge (Element *parent, Element *child)
 
constexpr fcitx::Flags< Enum >::Flags (Enum f)
 
 fcitx::Flags< Enum >::Flags (storage_type i=0)
 
constexpr fcitx::Flags< Enum >::Flags (const std::initializer_list< Enum > &l)
 
constexpr fcitx::Flags< Enum >::operator storage_type () const
 
constexpr storage_type fcitx::Flags< Enum >::toInteger () const
 
Flagsfcitx::Flags< Enum >::operator= (Enum f)
 
Flagsfcitx::Flags< Enum >::operator= (storage_type f)
 
constexpr bool fcitx::Flags< Enum >::operator! () const
 
constexpr Flagsfcitx::Flags< Enum >::operator &= (Flags flag)
 
Flagsfcitx::Flags< Enum >::operator &= (Enum flag)
 
Flagsfcitx::Flags< Enum >::operator|= (Flags flag)
 
constexpr Flagsfcitx::Flags< Enum >::operator|= (Enum flag)
 
Flagsfcitx::Flags< Enum >::operator^= (Flags flag)
 
Flagsfcitx::Flags< Enum >::operator^= (Enum flag)
 
constexpr Flags fcitx::Flags< Enum >::operator| (Flags f) const
 
constexpr Flags fcitx::Flags< Enum >::operator| (Enum f) const
 
constexpr Flags fcitx::Flags< Enum >::operator^ (Flags f) const
 
constexpr Flags fcitx::Flags< Enum >::operator^ (Enum f) const
 
constexpr Flags fcitx::Flags< Enum >::operator & (Flags f) const
 
constexpr Flags fcitx::Flags< Enum >::operator & (Enum f) const
 
constexpr Flags fcitx::Flags< Enum >::operator~ () const
 
constexpr Flags fcitx::Flags< Enum >::unset (Enum f) const
 
constexpr Flags fcitx::Flags< Enum >::unset (Flags f) const
 
template<typename T >
constexpr bool fcitx::Flags< Enum >::test (T f) const
 
template<typename T >
constexpr bool fcitx::Flags< Enum >::testAny (T f) const
 
constexpr bool fcitx::Flags< Enum >::operator== (const Flags &f) const
 
constexpr bool fcitx::Flags< Enum >::operator== (Enum f) const
 
constexpr bool fcitx::Flags< Enum >::operator!= (const Flags &f) const
 
constexpr bool fcitx::Flags< Enum >::operator!= (Enum f) const
 
bool fcitx::fs::isdir (const std::string &path)
 check whether path is a directory.
 
bool fcitx::fs::isreg (const std::string &path)
 check whether path is a regular file.
 
bool fcitx::fs::isexe (const std::string &path)
 check whether path is an executable regular file. More...
 
bool fcitx::fs::islnk (const std::string &path)
 check whether path is a link.
 
std::string fcitx::fs::cleanPath (const std::string &path)
 Get the clean path by removing . , .. , and duplicate / in the path.
 
bool fcitx::fs::makePath (const std::filesystem::path &path)
 Create directory recursively.
 
std::string fcitx::fs::dirName (const std::string &path)
 Get directory name of path.
 
std::string fcitx::fs::baseName (std::string_view path)
 Get base file name of path.
 
ssize_t fcitx::fs::safeRead (int fd, void *data, size_t maxlen)
 a simple wrapper around read(), ignore EINTR.
 
ssize_t fcitx::fs::safeWrite (int fd, const void *data, size_t maxlen)
 a simple wrapper around write(), ignore EINTR.
 
std::optional< std::string > fcitx::fs::readlink (const std::string &path)
 read symlink.
 
int64_t fcitx::fs::modifiedTime (const std::filesystem::path &path)
 Return modified time in seconds of given path. More...
 
UniqueFilePtr fcitx::fs::openFD (UnixFD &fd, const char *modes)
 open the unix fd with fdopen. More...
 
FCITXUTILS_DEPRECATED_EXPORT UniqueFilePtr fcitx::fs::openFD (StandardPathFile &file, const char *modes)
 open the standard path file fd with fdopen. More...
 
 fcitx::InputBuffer::InputBuffer (InputBufferOptions options=InputBufferOption::NoOption)
 Create a input buffer with options. More...
 
InputBufferOptions fcitx::InputBuffer::options () const
 Get the buffer option.
 
bool fcitx::InputBuffer::type (const char *s, size_t length)
 Type a C-String with length into buffer.
 
bool fcitx::InputBuffer::type (const std::string &s)
 Type an std::stirng to buffer.
 
bool fcitx::InputBuffer::type (const char *s)
 Type a C-String to buffer.
 
bool fcitx::InputBuffer::type (uint32_t unicode)
 Type a ucs4 character to buffer.
 
virtual void fcitx::InputBuffer::erase (size_t from, size_t to)
 Erase a range of character.
 
virtual void fcitx::InputBuffer::setCursor (size_t cursor)
 Set cursor position, by character.
 
size_t fcitx::InputBuffer::maxSize () const
 Get the max size of the buffer.
 
void fcitx::InputBuffer::setMaxSize (size_t s)
 Set max size of the buffer.
 
const std::string & fcitx::InputBuffer::userInput () const
 Utf8 string in the buffer.
 
size_t fcitx::InputBuffer::cursor () const
 Cursor position by utf8 character.
 
size_t fcitx::InputBuffer::cursorByChar () const
 Cursor position by char (byte).
 
size_t fcitx::InputBuffer::size () const
 Size of buffer, by number of utf8 character.
 
uint32_t fcitx::InputBuffer::charAt (size_t i) const
 UCS-4 char in the buffer. Will raise exception if i is out of range.
 
std::pair< size_t, size_t > fcitx::InputBuffer::rangeAt (size_t i) const
 Byte range for character at position i.
 
std::string_view fcitx::InputBuffer::viewAt (size_t i) const
 
size_t fcitx::InputBuffer::sizeAt (size_t i) const
 Byte size at position i.
 
bool fcitx::InputBuffer::empty () const
 Whether buffer is empty.
 
bool fcitx::InputBuffer::del ()
 Helper function to implement "delete" key.
 
bool fcitx::InputBuffer::backspace ()
 Helper function to implement "backspace" key.
 
void fcitx::InputBuffer::clear ()
 Clear all buffer.
 
void fcitx::InputBuffer::shrinkToFit ()
 Save memory by call shrink to fit to internal buffer.
 
virtual bool fcitx::InputBuffer::typeImpl (const char *s, size_t length)
 Type a certain length of utf8 character to the buffer. More...
 
 fcitx::Key::Key (KeySym sym=FcitxKey_None, KeyStates states=KeyStates(), int code=0)
 
 fcitx::Key::Key (const char *keyString)
 Parse a key from string. More...
 
 fcitx::Key::Key (const std::string &keyString)
 Parse a key from std::string. More...
 
static Key fcitx::Key::fromKeyCode (int code=0, KeyStates states=KeyStates())
 Create a key code based key with empty key symbol.
 
bool fcitx::Key::operator== (const Key &key) const
 Check if key is exactly same.
 
bool fcitx::Key::operator!= (const Key &key) const
 Check if key is not same;.
 
bool fcitx::Key::check (const Key &key) const
 Check if current key match the key.
 
bool fcitx::Key::check (KeySym sym=FcitxKey_None, KeyStates states=KeyStates()) const
 Check if current key match the sym and states. More...
 
bool fcitx::Key::isReleaseOfModifier (const Key &key) const
 Check if current key is a key release of given modifier only key. More...
 
bool fcitx::Key::isDigit () const
 Check if key is digit key or keypad digit key. More...
 
int fcitx::Key::digit () const
 Return the value of digit key. More...
 
int fcitx::Key::digitSelection (KeyStates states=KeyStates()) const
 Return index when using digit key for selection. More...
 
bool fcitx::Key::isUAZ () const
 Check if key is upper case.
 
bool fcitx::Key::isLAZ () const
 Check if key is lower case.
 
bool fcitx::Key::isSimple () const
 Check if key is in the range of ascii and has no states.
 
bool fcitx::Key::isModifier () const
 Check if the key is a modifier press.
 
bool fcitx::Key::isCursorMove () const
 Check if this key will cause cursor to move, e.g. More...
 
bool fcitx::Key::isKeyPad () const
 Check if this key is a key pad key.
 
bool fcitx::Key::hasModifier () const
 Check if states has modifier.
 
bool fcitx::Key::isVirtual () const
 Check if states has virtual bit.
 
Key fcitx::Key::normalize () const
 Normalize a key, usually used when key is from frontend. More...
 
std::string fcitx::Key::toString (KeyStringFormat format=KeyStringFormat::Portable) const
 Convert key to a string. More...
 
bool fcitx::Key::isValid () const
 Check if the sym is not FcitxKey_None or FcitxKey_VoidSymbol.
 
KeySym fcitx::Key::sym () const
 
KeyStates fcitx::Key::states () const
 
int fcitx::Key::code () const
 
static KeyStates fcitx::Key::keySymToStates (KeySym sym)
 Convert the modifier symbol to its corresponding states.
 
static KeySym fcitx::Key::keySymFromString (const std::string &keyString)
 Convert a key symbol string to KeySym.
 
static std::string fcitx::Key::keySymToString (KeySym sym, KeyStringFormat format=KeyStringFormat::Portable)
 Convert keysym to a string. More...
 
static KeySym fcitx::Key::keySymFromUnicode (uint32_t unicode)
 Convert unicode to key symbol. More...
 
static uint32_t fcitx::Key::keySymToUnicode (KeySym sym)
 Convert keysym to a unicode. More...
 
static std::string fcitx::Key::keySymToUTF8 (KeySym sym)
 Convert keysym to a unicode string. More...
 
static KeyList fcitx::Key::keyListFromString (const std::string &str)
 Parse a list of key string into a KeyList.
 
template<typename Container >
static std::string fcitx::Key::keyListToString (const Container &container, KeyStringFormat format=KeyStringFormat::Portable)
 Convert a key list to string.
 
template<typename Container >
bool fcitx::Key::checkKeyList (const Container &c) const
 Check the current key against a key list. More...
 
template<typename Container >
int fcitx::Key::keyListIndex (const Container &c) const
 Check the current key against a key list and get the matched key index. More...
 
 fcitx::Library::Library (const std::string &path)
 
 fcitx::Library::Library (const char *path)
 
 fcitx::Library::Library (const std::filesystem::path &path={})
 
 fcitx::Library::FCITX_DECLARE_VIRTUAL_DTOR_MOVE (Library)
 
bool fcitx::Library::loaded () const
 
bool fcitx::Library::load (Flags< LibraryLoadHint > hint=LibraryLoadHint::DefaultHint)
 
bool fcitx::Library::unload ()
 
void * fcitx::Library::resolve (const char *name)
 
bool fcitx::Library::findData (const char *slug, const char *magic, size_t lenOfMagic, const std::function< void(const char *data)> &parser)
 
std::string fcitx::Library::error ()
 
const std::string & fcitx::Library::path () const
 
const std::filesystem::path & fcitx::Library::fspath () const
 
template<typename Func >
static auto fcitx::Library::toFunction (void *ptr)
 
static bool fcitx::Library::isNewNamespaceSupported ()
 
 fcitx::LogCategory::LogCategory (const char *name, LogLevel level=LogLevel::Info)
 
LogLevel fcitx::LogCategory::logLevel () const
 
bool fcitx::LogCategory::checkLogLevel (LogLevel l) const
 
void fcitx::LogCategory::setLogLevel (LogLevel l)
 
void fcitx::LogCategory::setLogLevel (std::underlying_type_t< LogLevel > l)
 
void fcitx::LogCategory::resetLogLevel ()
 
const std::string & fcitx::LogCategory::name () const
 
bool fcitx::LogCategory::fatalWrapper (LogLevel l) const
 
static bool fcitx::LogCategory::fatalWrapper2 (LogLevel l)
 
static const LogCategoryfcitx::Log::defaultCategory ()
 
static void fcitx::Log::setLogRule (const std::string &rule)
 
static void fcitx::Log::setLogStream (std::ostream &stream)
 set the global log stream to be used by default. More...
 
static std::ostream & fcitx::Log::logStream ()
 Return the default log stream to be used. More...
 
 fcitx::LogMessageBuilder::LogMessageBuilder (std::ostream &out, LogLevel l, const char *filename, int lineNumber)
 
LogMessageBuilderfcitx::LogMessageBuilder::self ()
 
LogMessageBuilderfcitx::LogMessageBuilder::operator<< (const std::string &s)
 
LogMessageBuilderfcitx::LogMessageBuilder::operator<< (const Key &key)
 
LogMessageBuilderfcitx::LogMessageBuilder::operator<< (char v)
 
LogMessageBuilderfcitx::LogMessageBuilder::operator<< (bool v)
 
LogMessageBuilderfcitx::LogMessageBuilder::operator<< (signed short v)
 
LogMessageBuilderfcitx::LogMessageBuilder::operator<< (unsigned short v)
 
LogMessageBuilderfcitx::LogMessageBuilder::operator<< (signed int v)
 
LogMessageBuilderfcitx::LogMessageBuilder::operator<< (unsigned int v)
 
LogMessageBuilderfcitx::LogMessageBuilder::operator<< (signed long v)
 
LogMessageBuilderfcitx::LogMessageBuilder::operator<< (unsigned long v)
 
LogMessageBuilderfcitx::LogMessageBuilder::operator<< (float v)
 
LogMessageBuilderfcitx::LogMessageBuilder::operator<< (double v)
 
LogMessageBuilderfcitx::LogMessageBuilder::operator<< (char *v)
 
LogMessageBuilderfcitx::LogMessageBuilder::operator<< (const char *v)
 
LogMessageBuilderfcitx::LogMessageBuilder::operator<< (const void *v)
 
LogMessageBuilderfcitx::LogMessageBuilder::operator<< (long double v)
 
LogMessageBuilderfcitx::LogMessageBuilder::operator<< (signed long long v)
 
LogMessageBuilderfcitx::LogMessageBuilder::operator<< (unsigned long long v)
 
template<typename T >
LogMessageBuilderfcitx::LogMessageBuilder::operator<< (T v)
 
template<typename T >
LogMessageBuilderfcitx::LogMessageBuilder::operator<< (const std::optional< T > &opt)
 
template<typename T >
LogMessageBuilderfcitx::LogMessageBuilder::operator<< (const std::unique_ptr< T > &ptr)
 
template<typename T >
LogMessageBuilderfcitx::LogMessageBuilder::operator<< (const std::vector< T > &vec)
 
template<typename T >
LogMessageBuilderfcitx::LogMessageBuilder::operator<< (const std::span< T > &vec)
 
template<typename T >
LogMessageBuilderfcitx::LogMessageBuilder::operator<< (const std::list< T > &lst)
 
template<typename K , typename V >
LogMessageBuilderfcitx::LogMessageBuilder::operator<< (const std::pair< K, V > &pair)
 
template<typename... Args>
LogMessageBuilderfcitx::LogMessageBuilder::operator<< (const std::tuple< Args... > &tuple)
 
template<typename K , typename V >
LogMessageBuilderfcitx::LogMessageBuilder::operator<< (const std::unordered_map< K, V > &vec)
 
template<typename V >
LogMessageBuilderfcitx::LogMessageBuilder::operator<< (const std::unordered_set< V > &vec)
 
template<typename K , typename V >
LogMessageBuilderfcitx::LogMessageBuilder::operator<< (const std::map< K, V > &vec)
 
template<typename V >
LogMessageBuilderfcitx::LogMessageBuilder::operator<< (const std::set< V > &vec)
 
template<typename K , typename V >
LogMessageBuilderfcitx::LogMessageBuilder::operator<< (const std::multimap< K, V > &vec)
 
template<typename V >
LogMessageBuilderfcitx::LogMessageBuilder::operator<< (const std::multiset< V > &vec)
 
template<typename K , typename V >
LogMessageBuilderfcitx::LogMessageBuilder::operator<< (const std::unordered_multimap< K, V > &vec)
 
template<typename V >
LogMessageBuilderfcitx::LogMessageBuilder::operator<< (const std::unordered_multiset< V > &vec)
 
 fcitx::LogMessageBuilderWrapper< MetaStringFileName, N >::LogMessageBuilderWrapper (LogLevel l)
 
LogMessageBuilderfcitx::LogMessageBuilderWrapper< MetaStringFileName, N >::self ()
 
static constexpr std::size_t fcitx::MetaString< c >::size ()
 
static constexpr const char * fcitx::MetaString< c >::data ()
 
static constexpr bool fcitx::MetaString< c >::empty ()
 
static constexpr array_type fcitx::MetaString< c >::str ()
 
template<int N, int M>
constexpr char fcitx::__getChar (char const (&str)[M]) noexcept
 
template<int N>
constexpr char fcitx::__getChar (std::string_view str) noexcept
 
 fcitx::Rect::Rect (int _x1=0, int _y1=0, int _x2=0, int _y2=0)
 
 fcitx::Rect::Rect (const Rect &rect)=default
 
Rectfcitx::Rect::operator= (const Rect &rect)=default
 
Rectfcitx::Rect::setPosition (int x, int y) noexcept
 
Rectfcitx::Rect::setSize (int width, int height) noexcept
 
Rectfcitx::Rect::setLeft (int pos) noexcept
 
Rectfcitx::Rect::setTop (int pos) noexcept
 
Rectfcitx::Rect::setRight (int pos) noexcept
 
Rectfcitx::Rect::setBottom (int pos) noexcept
 
Rect fcitx::Rect::intersected (const Rect &rect) noexcept
 
Rect fcitx::Rect::intersected (const Rect &rect) const noexcept
 
Rect fcitx::Rect::translated (int offsetX, int offsetY) const
 
bool fcitx::Rect::contains (int x, int y) const noexcept
 
bool fcitx::Rect::contains (const Rect &other) const noexcept
 
int fcitx::Rect::distance (int x, int y) const noexcept
 
int fcitx::Rect::left () const noexcept
 
int fcitx::Rect::top () const noexcept
 
int fcitx::Rect::right () const noexcept
 
int fcitx::Rect::bottom () const noexcept
 
int fcitx::Rect::width () const noexcept
 
int fcitx::Rect::height () const noexcept
 
bool fcitx::Rect::operator== (const Rect &other) const
 
bool fcitx::Rect::operator!= (const Rect &other) const
 
bool fcitx::Rect::isEmpty () const
 
std::ostream & fcitx::operator<< (std::ostream &os, const Rect &r)
 
 fcitx::LastValue< T >::LastValue (T defaultValue=T())
 
template<typename InputIterator >
fcitx::LastValue< T >::operator() (InputIterator begin, InputIterator end)
 
template<typename InputIterator >
void fcitx::LastValue< void >::operator() (InputIterator begin, InputIterator end)
 
 fcitx::Connection::Connection (TrackableObjectReference< ConnectionBody > body)
 
bool fcitx::Connection::connected ()
 
bool fcitx::Connection::connected () const
 
void fcitx::Connection::disconnect ()
 
bool fcitx::Connection::operator== (const Connection &other) const
 
bool fcitx::Connection::operator!= (const Connection &other) const
 
 fcitx::ScopedConnection::ScopedConnection (ScopedConnection &&other) noexcept
 
 fcitx::ScopedConnection::ScopedConnection (Connection &&other) noexcept
 
 fcitx::ScopedConnection::ScopedConnection (const ScopedConnection &)=delete
 
ScopedConnectionfcitx::ScopedConnection::operator= (ScopedConnection &&other) noexcept
 
ScopedConnectionfcitx::ScopedConnection::operator= (const ScopedConnection &other)=delete
 
Connection fcitx::ScopedConnection::release ()
 
 fcitx::Signal< Ret(Args...), Combiner >::SignalData::SignalData (Combiner combiner)
 
 fcitx::Signal< Ret(Args...), Combiner >::Signal (Combiner combiner=Combiner())
 
 fcitx::Signal< Ret(Args...), Combiner >::Signal (Signal &&other) noexcept
 
Signalfcitx::Signal< Ret(Args...), Combiner >::operator= (Signal &&other) noexcept
 
Ret fcitx::Signal< Ret(Args...), Combiner >::operator() (Args... args)
 
template<typename Func >
Connection fcitx::Signal< Ret(Args...), Combiner >::connect (Func &&func)
 
void fcitx::Signal< Ret(Args...), Combiner >::disconnectAll ()
 
bool fcitx::filter::Chainer<>::operator() (const std::string &, const std::string &, bool)
 
 fcitx::filter::Chainer< First, Rest... >::Chainer (First first, Rest... rest)
 
bool fcitx::filter::Chainer< First, Rest... >::operator() (const std::string &path, const std::string &dir, bool user)
 
 fcitx::filter::NotFilter< T >::NotFilter (T filter_)
 
bool fcitx::filter::NotFilter< T >::operator() (const std::string &path, const std::string &dir, bool isUser)
 
template<typename T >
NotFilter< T > fcitx::filter::Not (T t)
 
bool fcitx::filter::User::operator() (const std::string &, const std::string &, bool isUser)
 
 fcitx::filter::Prefix::Prefix (const std::string &prefix_)
 
bool fcitx::filter::Prefix::operator() (const std::string &path, const std::string &, bool) const
 
 fcitx::filter::Suffix::Suffix (const std::string &suffix_)
 
bool fcitx::filter::Suffix::operator() (const std::string &path, const std::string &, bool) const
 
 fcitx::StandardPathTempFile::StandardPathTempFile (int fd=-1, const std::string &realFile={}, const std::string &tempPath={})
 
 fcitx::StandardPathTempFile::StandardPathTempFile (StandardPathTempFile &&other)=default
 
int fcitx::StandardPathTempFile::fd () const
 
bool fcitx::StandardPathTempFile::isValid () const
 
const std::string & fcitx::StandardPathTempFile::path () const
 
const std::string & fcitx::StandardPathTempFile::tempPath () const
 
int fcitx::StandardPathTempFile::release ()
 
void fcitx::StandardPathTempFile::close ()
 
void fcitx::StandardPathTempFile::removeTemp ()
 
 fcitx::StandardPathFile::StandardPathFile (int fd=-1, const std::string &path={})
 
 fcitx::StandardPathFile::StandardPathFile (StandardPathFile &&other)=default
 
StandardPathFilefcitx::StandardPathFile::operator= (StandardPathFile &&other)=default
 
int fcitx::StandardPathFile::fd () const
 
bool fcitx::StandardPathFile::isValid () const
 
const std::string & fcitx::StandardPathFile::path () const
 
int fcitx::StandardPathFile::release ()
 
 fcitx::StandardPath::StandardPath (const std::string &packageName, const std::unordered_map< std::string, std::string > &builtInPath, bool skipBuiltInPath, bool skipUserPath)
 Allow to construct a StandardPath with customized internal value. More...
 
 fcitx::StandardPath::StandardPath (bool skipFcitxPath, bool skipUserPath)
 
 fcitx::StandardPath::StandardPath (bool skipFcitxPath=false)
 
static const StandardPathfcitx::StandardPath::global ()
 Return the global instance of StandardPath. More...
 
static const char * fcitx::StandardPath::fcitxPath (const char *path)
 Return fcitx specific path defined at compile time. More...
 
static std::string fcitx::StandardPath::fcitxPath (const char *path, const char *subPath)
 Return a path under specific fcitxPath directory. More...
 
void fcitx::StandardPath::scanDirectories (Type type, const std::function< bool(const std::string &path, bool user)> &scanner) const
 Scan the directories of given type. More...
 
void fcitx::StandardPath::scanDirectories (const std::string &userDir, const std::vector< std::string > &directories, const std::function< bool(const std::string &path, bool user)> &scanner) const
 Scan the given directories. More...
 
void fcitx::StandardPath::scanFiles (Type type, const std::string &path, const std::function< bool(const std::string &path, const std::string &dir, bool user)> &scanner) const
 Scan files scan file under [directory]/[path]. More...
 
std::string fcitx::StandardPath::userDirectory (Type type) const
 Get user writable directory for given type.
 
std::vector< std::string > fcitx::StandardPath::directories (Type type) const
 Get all directories in the order of priority.
 
std::string fcitx::StandardPath::locate (Type type, const std::string &path) const
 Check if a file exists.
 
std::vector< std::string > fcitx::StandardPath::locateAll (Type type, const std::string &path) const
 list all matched files.
 
StandardPathFile fcitx::StandardPath::open (Type type, const std::string &path, int flags) const
 Open the first matched and succeeded file. More...
 
StandardPathFile fcitx::StandardPath::openUser (Type type, const std::string &path, int flags) const
 Open the user file.
 
StandardPathFile fcitx::StandardPath::openSystem (Type type, const std::string &path, int flags) const
 Open the non-user file. More...
 
StandardPathTempFile fcitx::StandardPath::openUserTemp (Type type, const std::string &pathOrig) const
 Open user file, but create file with mktemp.
 
bool fcitx::StandardPath::safeSave (Type type, const std::string &pathOrig, const std::function< bool(int)> &callback) const
 Save the file safely with write and rename to make sure the operation is atomic. More...
 
std::map< std::string, std::string > fcitx::StandardPath::locateWithFilter (Type type, const std::string &path, std::function< bool(const std::string &path, const std::string &dir, bool user)> filter) const
 Locate all files match the filter under first [directory]/[path]. More...
 
template<typename Arg1 , typename... Args>
std::map< std::string, std::string > fcitx::StandardPath::locate (Type type, const std::string &path, Arg1 arg1, Args... args) const
 Locate all files match the filter under first [directory]/[path]. More...
 
std::vector< StandardPathFilefcitx::StandardPath::openAll (Type type, const std::string &path, int flags) const
 Open all files match the first [directory]/[path].
 
StandardPathFileMap fcitx::StandardPath::multiOpenFilter (Type type, const std::string &path, int flags, std::function< bool(const std::string &path, const std::string &dir, bool user)> filter) const
 Open all files match the filter under first [directory]/[path].
 
template<typename... Args>
StandardPathFileMap fcitx::StandardPath::multiOpen (Type type, const std::string &path, int flags, Args... args) const
 Open all files match the filter under first [directory]/[path]. More...
 
StandardPathFilesMap fcitx::StandardPath::multiOpenAllFilter (Type type, const std::string &path, int flags, std::function< bool(const std::string &path, const std::string &dir, bool user)> filter) const
 Open all files match the filter under all [directory]/[path].
 
template<typename... Args>
StandardPathFilesMap fcitx::StandardPath::multiOpenAll (Type type, const std::string &path, int flags, Args... args) const
 Open all files match the filter under all [directory]/[path]. More...
 
int64_t fcitx::StandardPath::timestamp (Type type, const std::string &path) const
 
static std::string fcitx::StandardPath::findExecutable (const std::string &name)
 Check if certain executable presents in PATH. More...
 
static bool fcitx::StandardPath::hasExecutable (const std::string &name)
 Check if certain executable presents in PATH. More...
 
void fcitx::StandardPath::syncUmask () const
 Sync system umask to internal state. More...
 
bool fcitx::StandardPath::skipBuiltInPath () const
 Whether this StandardPath is configured to Skip built-in path. More...
 
bool fcitx::StandardPath::skipUserPath () const
 Whether this StandardPath is configured to Skip user path. More...
 
static constexpr StandardPathsType fcitx::StandardPathsTypeConverter< StandardPath::Type >::convert (StandardPath::Type type)
 
 fcitx::StandardPaths::StandardPaths (const std::string &packageName, const std::unordered_map< std::string, std::vector< std::filesystem::path >> &builtInPath, StandardPathsOptions options)
 Allow to construct a StandardPath with customized internal value. More...
 
static const StandardPathsfcitx::StandardPaths::global ()
 Return the global instance of StandardPath.
 
static std::filesystem::path fcitx::StandardPaths::fcitxPath (const char *path, const std::filesystem::path &subPath={})
 Return fcitx specific path defined at compile time. More...
 
static std::filesystem::path fcitx::StandardPaths::findExecutable (const std::filesystem::path &name)
 
static bool fcitx::StandardPaths::hasExecutable (const std::filesystem::path &name)
 
const std::filesystem::path & fcitx::StandardPaths::userDirectory (StandardPathsType type) const
 Get user writable directory for given type. More...
 
std::span< const std::filesystem::path > fcitx::StandardPaths::directories (StandardPathsType type, StandardPathsModes modes=StandardPathsMode::Default) const
 Get all directories in the order of priority.
 
std::filesystem::path fcitx::StandardPaths::locate (StandardPathsType type, const std::filesystem::path &path, StandardPathsModes modes=StandardPathsMode::Default) const
 Check if a file exists. More...
 
std::vector< std::filesystem::path > fcitx::StandardPaths::locateAll (StandardPathsType type, const std::filesystem::path &path, StandardPathsModes modes=StandardPathsMode::Default) const
 Check if path exists in all directories. More...
 
std::map< std::filesystem::path, std::filesystem::path > fcitx::StandardPaths::locate (StandardPathsType type, const std::filesystem::path &path, const StandardPathsFilterCallback &callback, StandardPathsModes modes=StandardPathsMode::Default) const
 All subpath under path with filter. More...
 
UnixFD fcitx::StandardPaths::open (StandardPathsType type, const std::filesystem::path &path, StandardPathsModes modes=StandardPathsMode::Default, std::filesystem::path *outPath=nullptr) const
 Open the first matched and succeeded file for read. More...
 
static UnixFD fcitx::StandardPaths::openPath (const std::filesystem::path &path, std::optional< int > flags=std::nullopt, std::optional< mode_t > mode=std::nullopt)
 Open the path. More...
 
std::vector< UnixFDfcitx::StandardPaths::openAll (StandardPathsType type, const std::filesystem::path &path, StandardPathsModes modes=StandardPathsMode::Default, std::vector< std::filesystem::path > *outPath=nullptr) const
 Open the all matched and file for read.
 
bool fcitx::StandardPaths::safeSave (StandardPathsType type, const std::filesystem::path &pathOrig, const std::function< bool(int)> &callback) const
 Save the file safely with write and rename to make sure the operation is atomic. More...
 
int64_t fcitx::StandardPaths::timestamp (StandardPathsType type, const std::filesystem::path &path, StandardPathsModes modes=StandardPathsMode::Default) const
 
void fcitx::StandardPaths::syncUmask () const
 Sync system umask to internal state. More...
 
bool fcitx::StandardPaths::skipBuiltInPath () const
 Whether this StandardPath is configured to Skip built-in path. More...
 
bool fcitx::StandardPaths::skipUserPath () const
 Whether this StandardPath is configured to Skip user path.
 
bool fcitx::StandardPaths::skipSystemPath () const
 Whether this StandardPath is configured to Skip system path.
 
StandardPathsOptions fcitx::StandardPaths::options () const
 Get the options for the StandardPaths. More...
 
bool fcitx::stringutils::startsWith (std::string_view str, std::string_view prefix)
 Check if a string starts with a prefix.
 
bool fcitx::stringutils::startsWith (std::string_view str, char prefix)
 Check if a string starts with a prefix char.
 
bool fcitx::stringutils::endsWith (std::string_view str, std::string_view suffix)
 Check if a string ends with a suffix.
 
bool fcitx::stringutils::endsWith (std::string_view str, char suffix)
 Check if a string ends with a suffix char.
 
bool fcitx::stringutils::isConcatOf (std::string_view str, std::string_view sub1, std::string_view sub2)
 Check if a string is a concatenation of two other strings.
 
std::pair< std::string::size_type, std::string::size_type > fcitx::stringutils::trimInplace (std::string_view str)
 Trim the whitespace by returning start end end of first and list non whitespace character position. More...
 
std::string_view fcitx::stringutils::trimView (std::string_view)
 Trim the white space in string view. More...
 
std::string fcitx::stringutils::trim (std::string_view str)
 Trim the white space in str. More...
 
std::vector< std::string > fcitx::stringutils::split (std::string_view str, std::string_view delim)
 Split the string by delim.
 
std::vector< std::string > fcitx::stringutils::split (std::string_view str, std::string_view delim, SplitBehavior behavior)
 Split the string by delim.
 
std::string fcitx::stringutils::replaceAll (std::string str, const std::string &before, const std::string &after)
 Replace all substring appearance of before with after.
 
const char * fcitx::stringutils::backwardSearch (const char *haystack, size_t l, const char *needle, size_t ol, size_t from)
 Search string needle of size ol in string haystack. More...
 
char * fcitx::stringutils::backwardSearch (char *haystack, size_t l, const char *needle, size_t ol, size_t from)
 The non-const version of backwardSearch. More...
 
size_t fcitx::stringutils::backwardSearch (const std::string &haystack, const std::string &needle, size_t from)
 Fast backward substring search. More...
 
template<typename Iter , typename T >
std::string fcitx::stringutils::join (Iter start, Iter end, T &&delim)
 Join a range of string with delim.
 
template<typename C , typename T >
std::string fcitx::stringutils::join (C &&container, T &&delim)
 Join a set of string with delim.
 
template<typename C , typename T >
std::string fcitx::stringutils::join (std::initializer_list< C > &&container, T &&delim)
 Join the strings with delim.
 
template<typename... Args>
std::string fcitx::stringutils::concat (const Args &...args)
 
template<typename FirstArg , typename... Args>
std::string fcitx::stringutils::joinPath (const FirstArg &firstArg, const Args &...args)
 
constexpr bool fcitx::stringutils::literalEqual (char const *a, char const *b)
 
bool fcitx::stringutils::unescape (std::string &str, bool unescapeQuote)
 Inplace unescape a string contains slash, new line, optionally quote.
 
std::optional< std::string > fcitx::stringutils::unescapeForValue (std::string_view str)
 unescape a string, that is potentially quoted. More...
 
std::string fcitx::stringutils::escapeForValue (std::string_view str)
 escape a string, add quote if needed. More...
 
bool fcitx::stringutils::consumePrefix (std::string_view &str, std::string_view prefix)
 Return a substring of input str if str starts with given prefix. More...
 
void fcitx::setupTestingEnvironment (const std::string &testBinaryDir, const std::vector< std::string > &addonDirs, const std::vector< std::string > &dataDirs)
 Set corresponding environment variable to make sure fcitx can be run properly for testing. More...
 
void fcitx::setupTestingEnvironmentPath (const std::filesystem::path &testBinaryDir, const std::vector< std::filesystem::path > &addonDirs, const std::vector< std::filesystem::path > &dataDirs)
 
bool fcitx::TrackableObjectReference< T >::isValid () const
 Check if the reference is still valid.
 
bool fcitx::TrackableObjectReference< T >::isNull () const
 Check if the reference is not tracking anything.
 
T * fcitx::TrackableObjectReference< T >::get () const
 Get the referenced object. Return nullptr if it is not available.
 
void fcitx::TrackableObjectReference< T >::unwatch ()
 Reset reference to empty state.
 
 fcitx::TrackableObject< T >::TrackableObject (const TrackableObject &)=delete
 
TrackableObjectReference< T > fcitx::TrackableObject< T >::watch ()
 
TrackableObjectReference< const T > fcitx::TrackableObject< T >::watch () const
 
 fcitx::UnixFD::UnixFD () noexcept
 Create an empty UnixFD.
 
 fcitx::UnixFD::UnixFD (int fd)
 Create a UnixFD by using dup.
 
 fcitx::UnixFD::UnixFD (int fd, int min)
 Create UnixFD with dup, with give parameter to dup. More...
 
 fcitx::UnixFD::UnixFD (const UnixFD &other)=delete
 
 fcitx::UnixFD::FCITX_DECLARE_MOVE (UnixFD)
 
static UnixFD fcitx::UnixFD::own (int fd)
 Create a UnixFD by owning the fd.
 
bool fcitx::UnixFD::isValid () const noexcept
 Check if fd is not empty.
 
void fcitx::UnixFD::set (int fd)
 Set a new FD. More...
 
void fcitx::UnixFD::set (int fd, int min)
 Set a new FD. More...
 
void fcitx::UnixFD::reset () noexcept
 Clear the FD and close it.
 
int fcitx::UnixFD::release () noexcept
 Get the internal fd and release the ownership.
 
int fcitx::UnixFD::fd () const noexcept
 Get the internal fd.
 
void fcitx::UnixFD::give (int fd) noexcept
 Set a new FD and transfer the ownership to UnixFD.
 
template<typename Iter >
size_t fcitx::utf8::length (Iter start, Iter end)
 Return the number UTF-8 characters in the string iterator range. More...
 
template<typename T >
size_t fcitx::utf8::length (const T &s)
 Return the number UTF-8 characters in the string. More...
 
template<typename T >
size_t fcitx::utf8::length (const T &s, size_t start, size_t end)
 Return the number UTF-8 characters in the string.
 
template<typename Iter >
size_t fcitx::utf8::lengthValidated (Iter start, Iter end)
 Validate and return the number UTF-8 characters in the string iterator range. More...
 
template<typename T >
size_t fcitx::utf8::lengthValidated (const T &s)
 Validate and return the number UTF-8 characters in the string. More...
 
template<typename Iter >
bool fcitx::utf8::validate (Iter start, Iter end)
 Check if the string iterator range is valid utf8 string.
 
template<typename T >
bool fcitx::utf8::validate (const T &s)
 Check if the string is valid utf8 string.
 
std::string fcitx::utf8::UCS4ToUTF8 (uint32_t code)
 Convert UCS4 to UTF8 string.
 
bool fcitx::utf8::UCS4IsValid (uint32_t code)
 Check if a ucs4 is valid.
 
bool fcitx::utf8::isValidChar (uint32_t c)
 Check the chr value is not two invalid value above.
 
template<typename Iter >
uint32_t fcitx::utf8::getChar (Iter iter, Iter end)
 Get next UCS4 char from iter, do not cross end. More...
 
template<typename T >
uint32_t fcitx::utf8::getChar (const T &s)
 Get next UCS4 char, may return INVALID_CHAR or NOT_ENOUGH_SPACE.
 
template<typename Iter >
Iter fcitx::utf8::getNextChar (Iter iter, Iter end, uint32_t *chr)
 
template<typename Iter >
ssize_t fcitx::utf8::ncharByteLength (Iter iter, size_t n)
 get the byte length of next N utf-8 character. More...
 
template<typename Iter >
Iter fcitx::utf8::nextNChar (Iter iter, size_t n)
 Move iter over next n character.
 
template<typename Iter >
Iter fcitx::utf8::nextChar (Iter iter)
 Move iter over next one character.
 
template<typename Iter >
uint32_t fcitx::utf8::getLastChar (Iter iter, Iter end)
 
template<typename T >
uint32_t fcitx::utf8::getLastChar (const T &str)
 
 fcitx::utf8::UTF8CharIterator< Iter >::UTF8CharIterator (Iter iter, Iter end)
 
reference fcitx::utf8::UTF8CharIterator< Iter >::operator* () const
 
pointer fcitx::utf8::UTF8CharIterator< Iter >::operator-> () const
 
std::pair< Iter, Iter > fcitx::utf8::UTF8CharIterator< Iter >::charRange () const
 
size_t fcitx::utf8::UTF8CharIterator< Iter >::charLength () const
 
std::string_view fcitx::utf8::UTF8CharIterator< Iter >::view () const
 
UTF8CharIteratorfcitx::utf8::UTF8CharIterator< Iter >::operator++ ()
 
UTF8CharIterator fcitx::utf8::UTF8CharIterator< Iter >::operator++ (int)
 
bool fcitx::utf8::UTF8CharIterator< Iter >::operator== (const UTF8CharIterator &other)
 
bool fcitx::utf8::UTF8CharIterator< Iter >::operator!= (const UTF8CharIterator &other)
 
template<typename Iter >
auto fcitx::utf8::MakeUTF8CharIterator (Iter iter, Iter end)
 
template<typename T >
auto fcitx::utf8::MakeUTF8CharRange (const T &str)
 
 fcitx::utf8::UTF8StringViewIter< Iter >::UTF8StringViewIter (Iter iter, Iter end)
 
reference fcitx::utf8::UTF8StringViewIter< Iter >::operator* () const
 
pointer fcitx::utf8::UTF8StringViewIter< Iter >::operator-> () const
 
size_t fcitx::utf8::UTF8StringViewIter< Iter >::charLength () const
 
uint32_t fcitx::utf8::UTF8StringViewIter< Iter >::chr () const
 
UTF8StringViewIterfcitx::utf8::UTF8StringViewIter< Iter >::operator++ ()
 
UTF8StringViewIter fcitx::utf8::UTF8StringViewIter< Iter >::operator++ (int)
 
bool fcitx::utf8::UTF8StringViewIter< Iter >::operator== (const UTF8StringViewIter &other)
 
bool fcitx::utf8::UTF8StringViewIter< Iter >::operator!= (const UTF8StringViewIter &other)
 
template<typename Iter >
auto fcitx::utf8::MakeUTF8StringViewIterator (Iter iter, Iter end)
 
template<typename T >
auto fcitx::utf8::MakeUTF8StringViewRange (const T &str)
 

Variables

static const std::string fcitx::dbus::MatchRule::nullArg {nullArray, nullArray + 1}
 
type fcitx::dbus::ReturnValueHelper< T >::ret
 
type fcitx::dbus::ReturnValueHelper< void >::ret
 
std::unique_ptr< ObjectVTablePropertyPrivate > fcitx::dbus::ObjectVTableProperty::d_ptr
 
TrackableObjectReference< ConnectionBodyfcitx::Connection::body_
 
HandlerTable< std::function< Ret(Args...)> > fcitx::Signal< Ret(Args...), Combiner >::SignalData::table_
 
IntrusiveList< ConnectionBodyfcitx::Signal< Ret(Args...), Combiner >::SignalData::connections_
 
Combiner fcitx::Signal< Ret(Args...), Combiner >::SignalData::combiner_
 
std::string fcitx::filter::Prefix::prefix
 
std::string fcitx::filter::Suffix::suffix
 
constexpr size_t fcitx::utf8::INVALID_LENGTH = static_cast<size_t>(-1)
 Possible return value of lengthValidated if the string is not valid. More...
 
constexpr uint32_t fcitx::utf8::INVALID_CHAR = static_cast<uint32_t>(-1)
 Possible return value for getChar.
 
constexpr uint32_t fcitx::utf8::NOT_ENOUGH_SPACE = static_cast<uint32_t>(-2)
 Possible return value for getChar.
 

Friends

template<typename T , typename Combiner >
class fcitx::ConnectableObject::SignalAdaptor
 
class fcitx::dbus::Message::Bus
 
class fcitx::dbus::ObjectVTableBase::Bus
 
class fcitx::dbus::ObjectVTableBase::MessageSetter
 
class fcitx::TrackableObjectReference< T >::TrackableObject< std::remove_const_t< T > >
 

Detailed Description

Macro Definition Documentation

◆ FCITX_DECLARE_SIGNAL

#define FCITX_DECLARE_SIGNAL (   CLASS_NAME,
  NAME,
  ... 
)
Value:
struct NAME { \
using signalType = __VA_ARGS__; \
using signature = fcitxMakeMetaString(#CLASS_NAME "::" #NAME); \
}
#define fcitxMakeMetaString(STRING)
Create meta string from string literal.
Definition: metastring.h:192

Declare signal by type.

Definition at line 25 of file connectableobject.h.

◆ FCITX_DEFINE_LOG_CATEGORY

#define FCITX_DEFINE_LOG_CATEGORY (   name,
  ... 
)
Value:
const ::fcitx::LogCategory &name() { \
static const ::fcitx::LogCategory category(__VA_ARGS__); \
return category; \
}

Definition at line 342 of file log.h.

◆ FCITX_LOGC

#define FCITX_LOGC (   CATEGORY,
  LEVEL 
)
Value:
for (bool fcitxLogEnabled = \
CATEGORY().fatalWrapper(::fcitx::LogLevel::LEVEL); \
fcitxLogEnabled; \
fcitxLogEnabled = CATEGORY().fatalWrapper2(::fcitx::LogLevel::LEVEL)) \
fcitx::MetaStringBasenameType<fcitxMakeMetaString( \
std::source_location::current().file_name())>, \
std::source_location::current().line()>(::fcitx::LogLevel::LEVEL) \
.self()
#define fcitxMakeMetaString(STRING)
Create meta string from string literal.
Definition: metastring.h:192

Definition at line 317 of file log.h.

◆ FCITX_LOGC_IF

#define FCITX_LOGC_IF (   CATEGORY,
  LEVEL,
  CONDITION 
)
Value:
for (bool fcitxLogEnabled = \
(CONDITION) && CATEGORY().fatalWrapper(::fcitx::LogLevel::LEVEL); \
fcitxLogEnabled; \
fcitxLogEnabled = CATEGORY().fatalWrapper2(::fcitx::LogLevel::LEVEL)) \
fcitx::MetaStringBasenameType<fcitxMakeMetaString( \
std::source_location::current().file_name())>, \
std::source_location::current().line()>(::fcitx::LogLevel::LEVEL) \
.self()
#define fcitxMakeMetaString(STRING)
Create meta string from string literal.
Definition: metastring.h:192

Definition at line 306 of file log.h.

◆ FCITX_METASTRING_TEMPLATE_16

#define FCITX_METASTRING_TEMPLATE_16 (   N,
 
)
Value:
::fcitx::__getChar<0x##N##0>(S), ::fcitx::__getChar<0x##N##1>(S), \
::fcitx::__getChar<0x##N##2>(S), ::fcitx::__getChar<0x##N##3>(S), \
::fcitx::__getChar<0x##N##4>(S), ::fcitx::__getChar<0x##N##5>(S), \
::fcitx::__getChar<0x##N##6>(S), ::fcitx::__getChar<0x##N##7>(S), \
::fcitx::__getChar<0x##N##8>(S), ::fcitx::__getChar<0x##N##9>(S), \
::fcitx::__getChar<0x##N##A>(S), ::fcitx::__getChar<0x##N##B>(S), \
::fcitx::__getChar<0x##N##C>(S), ::fcitx::__getChar<0x##N##D>(S), \
::fcitx::__getChar<0x##N##E>(S), ::fcitx::__getChar<0x##N##F>(S)

Definition at line 163 of file metastring.h.

◆ FCITX_METASTRING_TEMPLATE_256

#define FCITX_METASTRING_TEMPLATE_256 (   N,
 
)
Value:
FCITX_METASTRING_TEMPLATE_16(N##0, S) \
, FCITX_METASTRING_TEMPLATE_16(N##1, S), \
FCITX_METASTRING_TEMPLATE_16(N##2, S), \
FCITX_METASTRING_TEMPLATE_16(N##3, S), \
FCITX_METASTRING_TEMPLATE_16(N##4, S), \
FCITX_METASTRING_TEMPLATE_16(N##5, S), \
FCITX_METASTRING_TEMPLATE_16(N##6, S), \
FCITX_METASTRING_TEMPLATE_16(N##7, S), \
FCITX_METASTRING_TEMPLATE_16(N##8, S), \
FCITX_METASTRING_TEMPLATE_16(N##9, S), \
FCITX_METASTRING_TEMPLATE_16(N##A, S), \
FCITX_METASTRING_TEMPLATE_16(N##B, S), \
FCITX_METASTRING_TEMPLATE_16(N##C, S), \
FCITX_METASTRING_TEMPLATE_16(N##D, S), \
FCITX_METASTRING_TEMPLATE_16(N##E, S), \
FCITX_METASTRING_TEMPLATE_16(N##F, S)

Definition at line 173 of file metastring.h.

◆ FCITX_OBJECT_VTABLE_METHOD

#define FCITX_OBJECT_VTABLE_METHOD (   FUNCTION,
  FUNCTION_NAME,
  SIGNATURE,
  RET 
)
Value:
this, FUNCTION_NAME, SIGNATURE, RET, \
::fcitx::dbus::makeObjectVTablePropertyObjectMethodAdaptor< \
FCITX_STRING_TO_DBUS_TYPE(RET), \
FCITX_STRING_TO_DBUS_TUPLE(SIGNATURE)>( \
this, [this](auto &&...args) { \
return this->FUNCTION( \
std::forward<decltype(args)>(args)...); \
}) \
}
Register a DBus method to current DBus VTable.
Definition: objectvtable.h:75

Register a class member function as a DBus method.

It will also check if the dbus signature matches the function type.

Parameters
FUNCTIONa member function of the class
FUNCTION_NAMEa string of DBus method name
SIGNATUREThe dbus signature of arguments.
RETThe dbus signature of the return value.
See also
https://dbus.freedesktop.org/doc/dbus-specification.html#type-system

Definition at line 137 of file objectvtable.h.

◆ FCITX_OBJECT_VTABLE_PROPERTY

#define FCITX_OBJECT_VTABLE_PROPERTY (   PROPERTY,
  NAME,
  SIGNATURE,
  GETMETHOD,
  ... 
)
Value:
this, NAME, SIGNATURE, \
::fcitx::dbus::makeObjectVTablePropertyGetMethodAdaptor< \
FCITX_STRING_TO_DBUS_TUPLE(SIGNATURE)>(this, GETMETHOD), \
Register a DBus read-only property to current DBus VTable.
Definition: objectvtable.h:260
Class provides bit flag support for Enum.
Definition: flags.h:33

Register a new DBus read-only property.

Parameters
PROPERTYwill be used to define class member.
NAMEa string of DBus property name
SIGNATUREThe dbus signature of the property.
GETMETHODThe method used to return the value of the property
See also
https://dbus.freedesktop.org/doc/dbus-specification.html#type-system

Definition at line 192 of file objectvtable.h.

◆ FCITX_OBJECT_VTABLE_SIGNAL

#define FCITX_OBJECT_VTABLE_SIGNAL (   SIGNAL,
  SIGNAL_NAME,
  SIGNATURE 
)
Value:
::fcitx::dbus::ObjectVTableSignal SIGNAL##Signal{this, SIGNAL_NAME, \
SIGNATURE}; \
using SIGNAL##ArgType = FCITX_STRING_TO_DBUS_TUPLE(SIGNATURE); \
template <typename... Args> \
void SIGNAL(Args &&...args) { \
auto msg = SIGNAL##Signal.createSignal(); \
SIGNAL##ArgType tupleArg{std::forward<Args>(args)...}; \
msg << tupleArg; \
msg.send(); \
} \
template <typename... Args> \
void SIGNAL##To(const std::string &dest, Args &&...args) { \
auto msg = SIGNAL##Signal.createSignal(); \
msg.setDestination(dest); \
SIGNAL##ArgType tupleArg{std::forward<Args>(args)...}; \
msg << tupleArg; \
msg.send(); \
}
Register a DBus signal to current DBus VTable.
Definition: objectvtable.h:232

Register a new DBus signal.

This macro will define two new function, SIGNAL and SIGNALTo.

The latter one will only be send to one DBus destination.

Parameters
SIGNALwill be used to define two member functions.
SIGNAL_NAMEa string of DBus signal name
SIGNATUREThe dbus signature of the signal.
See also
https://dbus.freedesktop.org/doc/dbus-specification.html#type-system

Definition at line 162 of file objectvtable.h.

◆ FCITX_OBJECT_VTABLE_WRITABLE_PROPERTY

#define FCITX_OBJECT_VTABLE_WRITABLE_PROPERTY (   PROPERTY,
  NAME,
  SIGNATURE,
  GETMETHOD,
  SETMETHOD,
  ... 
)
Value:
this, \
NAME, \
SIGNATURE, \
::fcitx::dbus::makeObjectVTablePropertyGetMethodAdaptor< \
FCITX_STRING_TO_DBUS_TUPLE(SIGNATURE)>(this, GETMETHOD), \
::fcitx::dbus::makeObjectVTablePropertySetMethodAdaptor< \
FCITX_STRING_TO_DBUS_TUPLE(SIGNATURE)>(this, SETMETHOD), \
Register a DBus property to current DBus VTable.
Definition: objectvtable.h:287
Class provides bit flag support for Enum.
Definition: flags.h:33

Register a new DBus read-only property.

Parameters
PROPERTYwill be used to define class member.
NAMEa string of DBus property name
SIGNATUREThe dbus signature of the property.
GETMETHODThe method used to return the value of the property
SETMETHODThe method used to update the value of the property
See also
https://dbus.freedesktop.org/doc/dbus-specification.html#type-system

Definition at line 211 of file objectvtable.h.

◆ FCITX_SIMPLE_LOG

#define FCITX_SIMPLE_LOG (   TYPE)
Value:
inline LogMessageBuilder &operator<<(TYPE v) { \
out_ << v; \
return *this; \
}

Definition at line 52 of file log.h.

Enumeration Type Documentation

◆ CapabilityFlag

enum fcitx::CapabilityFlag : uint64_t
strong

Input context CapabilityFlags.

Enumerator
ReportKeyRepeat 

Whether client will set KeyState::Repeat on the key event.

See also
KeyState::Repeat
Since
5.0.4
ClientSideInputPanel 

Whether client display input panel by itself.

Since
5.0.5
Disable 

Whether client request input method to be disabled.

Usually this means only allow to type with raw keyboard.

Since
5.0.20
CommitStringWithCursor 

Whether client support commit string with cursor location.

Since
5.1.2

Definition at line 21 of file capabilityflags.h.

◆ InputBufferOption

Enumerator
NoOption 

No option.

AsciiOnly 

The input buffer is ascii character only, non ascii char will raise exception.

FixedCursor 

Whether the input buffer only supports cursor at the end of buffer.

Definition at line 28 of file inputbuffer.h.

◆ KeyState

enum fcitx::KeyState : uint32_t
strong

KeyState to represent modifier keys.

Enumerator
Repeat 

Whether a Key Press is from key repetition.

Since
5.0.4

Definition at line 22 of file keysym.h.

◆ KeyStringFormat

Control the behavior of toString function.

Enumerator
Portable 

Can be used to parse from a string.

Localized 

Return the human readable string in localized format.

Definition at line 33 of file key.h.

◆ LogLevel

enum fcitx::LogLevel : int

LogLevel from high to low.

Enumerator
Fatal 

Fatal will always abort regardless of log or not.

Definition at line 41 of file log.h.

◆ StandardPathsOption

enum fcitx::StandardPathsOption : uint8_t
strong

Options for standard paths.

This flag controls the behavior of StandardPaths. If you want to skip some paths, you can use these flags. User Path and System Path are derived from platform specific variables. Built-in Path is based on installation path.

Definition at line 64 of file standardpaths.h.

◆ StandardPathsType

Enum for location type.

Definition at line 41 of file standardpaths.h.

◆ TextFormatFlag

enum fcitx::TextFormatFlag : int
strong

Enum flag for text formatting.

Enumerator
Underline 

underline is a flag

HighLight 

highlight the preedit

Definition at line 20 of file textformatflags.h.

◆ Type

Enum for location type.

Enumerator
Config 

Xdg Config dir.

PkgConfig 

Xdg Config dir/fcitx5.

Data 

Xdg data dir.

Cache 

Xdg cache dir.

Runtime 

Xdg runtime dir.

Addon 

addon shared library dir.

PkgData 

Xdg data dir/fcitx5.

Definition at line 184 of file standardpath.h.

Function Documentation

◆ addObjectVTable()

bool fcitx::dbus::Bus::addObjectVTable ( const std::string &  path,
const std::string &  interface,
ObjectVTableBase vtable 
)

Register a new object on the dbus.

Parameters
pathobject path
interfaceobject interface
objobject
Returns
registration succeeds or not.

Definition at line 771 of file bus.cpp.

◆ address()

std::string fcitx::dbus::Bus::address ( )

Return the dbus address being connected to.

Returns
dbus address

Definition at line 861 of file bus.cpp.

◆ backwardSearch() [1/3]

FCITXUTILS_EXPORT const char * fcitx::stringutils::backwardSearch ( const char *  haystack,
size_t  l,
const char *  needle,
size_t  ol,
size_t  from 
)

Search string needle of size ol in string haystack.

Parameters
fromthe number of bytes from end.
Returns
point to data or null.

Definition at line 274 of file stringutils.cpp.

◆ backwardSearch() [2/3]

FCITXUTILS_EXPORT char * fcitx::stringutils::backwardSearch ( char *  haystack,
size_t  l,
const char *  needle,
size_t  ol,
size_t  from 
)

The non-const version of backwardSearch.

See also
backwardSearch()

Definition at line 311 of file stringutils.cpp.

◆ backwardSearch() [3/3]

FCITXUTILS_EXPORT size_t fcitx::stringutils::backwardSearch ( const std::string &  haystack,
const std::string &  needle,
size_t  from 
)

Fast backward substring search.

Returns
back from end.

Example: stringutils::backwardSearch("abcabc", "bc", 1) == 1 stringutils::backwardSearch("abcabc", "bc", 1) == 1 stringutils::backwardSearch("abcabc", "bc", 4) == 4

Definition at line 317 of file stringutils.cpp.

◆ callAsync()

std::unique_ptr< Slot > fcitx::dbus::Message::callAsync ( uint64_t  usec,
MessageCallback  callback 
)

Asynchronously call a dbus method with a timeout in microseconds.

Parameters
usectimeout
callbackCallback function if anything happens.

Definition at line 197 of file message.cpp.

◆ check()

bool fcitx::Key::check ( KeySym  sym = FcitxKey_None,
KeyStates  states = KeyStates() 
) const
inline

Check if current key match the sym and states.

See also
fcitx::Key::check(const Key &key)

Definition at line 75 of file key.h.

◆ checkKeyList()

template<typename Container >
bool fcitx::Key::checkKeyList ( const Container &  c) const
inline

Check the current key against a key list.

See also
fcitx::Key::check

Definition at line 222 of file key.h.

◆ childs()

const std::list< Element * > & fcitx::Element::childs ( ) const
protected

List all childs.

See also
parents

Definition at line 30 of file element.cpp.

◆ consumePrefix()

FCITXUTILS_EXPORT bool fcitx::stringutils::consumePrefix ( std::string_view &  str,
std::string_view  prefix 
)

Return a substring of input str if str starts with given prefix.

Parameters
strinput string
prefixto check
See also
startsWith
Since
5.1.12

Definition at line 418 of file stringutils.cpp.

◆ currentMessage()

Message * fcitx::dbus::ObjectVTableBase::currentMessage ( ) const

Return the current dbus message for current method.

This should only be used with in a registered callback.

Returns
DBus message

Definition at line 146 of file objectvtable_libdbus.cpp.

◆ dataAs()

template<typename Value >
const Value& fcitx::dbus::Variant::dataAs ( ) const
inline

Return data as given type.

You need to make sure that signature matches before using it.

Definition at line 131 of file variant.h.

◆ destroy()

void fcitx::ConnectableObject::destroy ( )
protected

Allow user to notify the destroy event earlier.

Due the C++ destructor calling order, the subclass is not "subclass" anymore at the time when parent destructor is called. This protected function allow user to notify the destruction of objects when they are still the original type.

Definition at line 58 of file connectableobject.cpp.

◆ digit()

int fcitx::Key::digit ( ) const

Return the value of digit key.

The key must not have modifier. For example, FcitxKey_7 will return 7.

Returns
value of digit key. If the key is not a digit key, it returns -1.
Since
5.0.20

Definition at line 420 of file key.cpp.

◆ digitSelection()

int fcitx::Key::digitSelection ( KeyStates  states = KeyStates()) const

Return index when using digit key for selection.

The return value will return in the order of 1234567890.

Returns
index of digit key. If the key is not a digit key, it returns -1.
Since
5.0.20
See also
digit

Definition at line 433 of file key.cpp.

◆ errorMessage()

std::string fcitx::dbus::Message::errorMessage ( ) const

Return the error message of the message.

Should only be used when message is a received error.

Returns
DBus Error type

Definition at line 143 of file message.cpp.

◆ errorName()

std::string fcitx::dbus::Message::errorName ( ) const

Return the error name of the message.

Should only be used when message is a received error.

Returns
DBus Error type

Definition at line 134 of file message.cpp.

◆ escapeForValue()

FCITXUTILS_EXPORT std::string fcitx::stringutils::escapeForValue ( std::string_view  str)

escape a string, add quote if needed.

Parameters
strinput string.
Returns
escaped string
See also
unescapeForValue
Since
5.0.16

Definition at line 387 of file stringutils.cpp.

◆ eventLoop()

EventLoop * fcitx::dbus::Bus::eventLoop ( ) const

Return the attached event loop.

Returns
attached event loop, not necessary a valid pointer if event loop is destructed before bus.
Since
5.0.22

Definition at line 693 of file bus.cpp.

◆ fcitx_utf8_get_char_validated()

FCITXUTILS_EXPORT uint32_t fcitx_utf8_get_char_validated ( const char *  p,
int  max_len,
int *  plen 
)

Get validated character.

Returns the UCS-4 value if its valid character. Returns (uint32_t) -1 if it is not a valid char, (uint32_t)-2 if length is not enough.

Definition at line 275 of file cutf8.cpp.

◆ fcitx_utf8_get_nth_char()

FCITXUTILS_EXPORT char* fcitx_utf8_get_nth_char ( const char *  s,
uint32_t  n 
)

Get the pointer to the nth character.

This function will not touch the content for s, so const pointer can be safely passed and converted.

Definition at line 191 of file cutf8.cpp.

◆ fcitxPath() [1/3]

std::filesystem::path fcitx::StandardPaths::fcitxPath ( const char *  path,
const std::filesystem::path &  subPath = {} 
)
static

Return fcitx specific path defined at compile time.

Currently, available value of fcitxPath are: datadir, pkgdatadir, libdir, bindir, localedir, addondir, libdatadir. Otherwise it will return nullptr.

Definition at line 125 of file standardpaths.cpp.

◆ fcitxPath() [2/3]

const char * fcitx::StandardPath::fcitxPath ( const char *  path)
static

Return fcitx specific path defined at compile time.

Currently, available value of fcitxPath are: datadir, pkgdatadir, libdir, bindir, localedir, addondir, libdatadir. Otherwise it will return nullptr.

Definition at line 344 of file standardpath.cpp.

◆ fcitxPath() [3/3]

std::string fcitx::StandardPath::fcitxPath ( const char *  path,
const char *  subPath 
)
static

Return a path under specific fcitxPath directory.

path is required to be a valid value.

Definition at line 376 of file standardpath.cpp.

◆ findExecutable()

std::string fcitx::StandardPath::findExecutable ( const std::string &  name)
static

Check if certain executable presents in PATH.

If the file presents, return the absolute PATH. If name is absolute path, check the absolute path instead of using PATH.

Since
5.0.18

Definition at line 748 of file standardpath.cpp.

◆ getChar()

template<typename Iter >
uint32_t fcitx::utf8::getChar ( Iter  iter,
Iter  end 
)
inline

Get next UCS4 char from iter, do not cross end.

May return INVALID_CHAR or NOT_ENOUGH_SPACE

Definition at line 104 of file utf8.h.

◆ global()

const StandardPath & fcitx::StandardPath::global ( )
static

Return the global instance of StandardPath.

return a global default so we can share it, C++11 static initialization is thread-safe

Definition at line 337 of file standardpath.cpp.

◆ hasExecutable()

bool fcitx::StandardPath::hasExecutable ( const std::string &  name)
static

Check if certain executable presents in PATH.

See also
findExecutable *
Since
5.0.18

Definition at line 785 of file standardpath.cpp.

◆ impl()

const char * fcitx::dbus::Bus::impl ( )
static

Return the name of the compiled implentation of fcitx dbus.

Returns
"sdbus" or "libdbus"

Definition at line 798 of file bus.cpp.

◆ InputBuffer()

fcitx::InputBuffer::InputBuffer ( InputBufferOptions  options = InputBufferOption::NoOption)

Create a input buffer with options.

See also
InputBufferOption

Definition at line 60 of file inputbuffer.cpp.

◆ isCursorMove()

bool fcitx::Key::isCursorMove ( ) const

Check if this key will cause cursor to move, e.g.

arrow key and page up/ down.

Definition at line 471 of file key.cpp.

◆ isDigit()

bool fcitx::Key::isDigit ( ) const

Check if key is digit key or keypad digit key.

Since 5.0.20, it will also return true for keypad digit key.

Returns
Whether the key is a digit key without modifier.

Definition at line 415 of file key.cpp.

◆ isexe()

FCITXUTILS_EXPORT bool fcitx::fs::isexe ( const std::string &  path)

check whether path is an executable regular file.

Since
5.0.18

Definition at line 88 of file fs.cpp.

◆ isReleaseOfModifier()

bool fcitx::Key::isReleaseOfModifier ( const Key key) const

Check if current key is a key release of given modifier only key.

This is a very specialized check for modifier release case. And it's designed to handle modifier only key.

For example, if Alt+Shift_L is pressed, then the following release key of this event can be either: Alt+Shift+Shift_L, or Alt+Shift+Meta_{L,R}. This is because: Alt -> Meta_{L,R}, if alt is released first, then it will produce Alt+Shift+Meta_{L,R}. If shift is released first, then it will produce Alt+Shift+Shift_L.

Return false if key is not a modifier.

Definition at line 338 of file key.cpp.

◆ Key() [1/2]

fcitx::Key::Key ( const char *  keyString)
explicit

Parse a key from string.

If string is invalid, it will be set to FcitxKey_None

Definition at line 296 of file key.cpp.

◆ Key() [2/2]

fcitx::Key::Key ( const std::string &  keyString)
inlineexplicit

Parse a key from std::string.

See also
fcitx::Key::Key(const char *)

Definition at line 53 of file key.h.

◆ keyListIndex()

template<typename Container >
int fcitx::Key::keyListIndex ( const Container &  c) const
inline

Check the current key against a key list and get the matched key index.

Returns
Returns the matched key index or -1 if there is no match.
See also
fcitx::Key::check

Definition at line 232 of file key.h.

◆ keySymFromUnicode()

KeySym fcitx::Key::keySymFromUnicode ( uint32_t  unicode)
static

Convert unicode to key symbol.

Useful when you want to create a synthetic key event.

Definition at line 691 of file key.cpp.

◆ keySymToString()

std::string fcitx::Key::keySymToString ( KeySym  sym,
KeyStringFormat  format = KeyStringFormat::Portable 
)
static

Convert keysym to a string.

  • format will control the format of return value.

Definition at line 662 of file key.cpp.

◆ keySymToUnicode()

uint32_t fcitx::Key::keySymToUnicode ( KeySym  sym)
static

Convert keysym to a unicode.

Will return a valid value UCS-4 value if this key may produce a character.

Definition at line 740 of file key.cpp.

◆ keySymToUTF8()

std::string fcitx::Key::keySymToUTF8 ( KeySym  sym)
static

Convert keysym to a unicode string.

Will return a non empty value UTF-8 string if this key may produce a character.

See also
fcitx::Key::keySymToUnicode

Definition at line 805 of file key.cpp.

◆ length() [1/2]

template<typename Iter >
size_t fcitx::utf8::length ( Iter  start,
Iter  end 
)
inline

Return the number UTF-8 characters in the string iterator range.

See also
lengthValidated()

Definition at line 33 of file utf8.h.

◆ length() [2/2]

template<typename T >
size_t fcitx::utf8::length ( const T &  s)
inline

Return the number UTF-8 characters in the string.

See also
lengthValidated()

Definition at line 40 of file utf8.h.

◆ lengthValidated() [1/2]

template<typename Iter >
size_t fcitx::utf8::lengthValidated ( Iter  start,
Iter  end 
)
inline

Validate and return the number UTF-8 characters in the string iterator range.

Will return INVALID_LENGTH if string is not a valid utf8 string.

Definition at line 60 of file utf8.h.

◆ lengthValidated() [2/2]

template<typename T >
size_t fcitx::utf8::lengthValidated ( const T &  s)
inline

Validate and return the number UTF-8 characters in the string.

Will return INVALID_LENGTH if string is not a valid utf8 string.

Definition at line 68 of file utf8.h.

◆ locate() [1/3]

std::filesystem::path fcitx::StandardPaths::locate ( StandardPathsType  type,
const std::filesystem::path &  path,
StandardPathsModes  modes = StandardPathsMode::Default 
) const

Check if a file exists.

Definition at line 166 of file standardpaths.cpp.

◆ locate() [2/3]

std::map< std::filesystem::path, std::filesystem::path > fcitx::StandardPaths::locate ( StandardPathsType  type,
const std::filesystem::path &  path,
const StandardPathsFilterCallback &  callback,
StandardPathsModes  modes = StandardPathsMode::Default 
) const

All subpath under path with filter.

Definition at line 202 of file standardpaths.cpp.

◆ locate() [3/3]

template<typename Arg1 , typename... Args>
std::map<std::string, std::string> fcitx::StandardPath::locate ( Type  type,
const std::string &  path,
Arg1  arg1,
Args...  args 
) const
inline

Locate all files match the filter under first [directory]/[path].

You may pass multiple filter to it. Prefer this function over multiOpen, if there could be too many files that exceeds the systems file descriptor limit.

Since
5.1.10
See also
multiOpen

Definition at line 333 of file standardpath.h.

◆ locateAll()

std::vector< std::filesystem::path > fcitx::StandardPaths::locateAll ( StandardPathsType  type,
const std::filesystem::path &  path,
StandardPathsModes  modes = StandardPathsMode::Default 
) const

Check if path exists in all directories.

It will enumerate all directories returned by directories() and check if the file exists. The order is same as directories().

Definition at line 184 of file standardpaths.cpp.

◆ locateWithFilter()

std::map< std::string, std::string > fcitx::StandardPath::locateWithFilter ( Type  type,
const std::string &  path,
std::function< bool(const std::string &path, const std::string &dir, bool user)>  filter 
) const

Locate all files match the filter under first [directory]/[path].

Prefer this function over multiOpenFilter, if there could be too many files that exceeds the systems file descriptor limit.

Since
5.1.10
See also
multiOpenFilter

Definition at line 666 of file standardpath.cpp.

◆ logStream()

std::ostream & fcitx::Log::logStream ( )
static

Return the default log stream to be used.

Returns
std::ostream&
Since
5.0.6

Definition at line 201 of file log.cpp.

◆ modifiedTime()

FCITXUTILS_EXPORT int64_t fcitx::fs::modifiedTime ( const std::filesystem::path &  path)

Return modified time in seconds of given path.

When error, it will return the time equal to std::chrono::system_clock:: time_point::min().

Parameters
paththe path to check
Since
5.1.13

Definition at line 271 of file fs.cpp.

◆ multiOpen()

template<typename... Args>
StandardPathFileMap fcitx::StandardPath::multiOpen ( Type  type,
const std::string &  path,
int  flags,
Args...  args 
) const
inline

Open all files match the filter under first [directory]/[path].

You may pass multiple filter to it.

Definition at line 354 of file standardpath.h.

◆ multiOpenAll()

template<typename... Args>
StandardPathFilesMap fcitx::StandardPath::multiOpenAll ( Type  type,
const std::string &  path,
int  flags,
Args...  args 
) const
inline

Open all files match the filter under all [directory]/[path].

You may pass multiple filter to it.

Definition at line 371 of file standardpath.h.

◆ nativeHandle() [1/2]

void * fcitx::dbus::Bus::nativeHandle ( ) const

Return the internal pointer of the implemenation.

Returns
internal pointer

Definition at line 800 of file bus.cpp.

◆ nativeHandle() [2/2]

void * fcitx::dbus::Message::nativeHandle ( ) const

Return the low level internal pointer of the message.

See also
dbus::Bus::impl
Returns
internal pointer

Definition at line 156 of file message.cpp.

◆ ncharByteLength()

template<typename Iter >
ssize_t fcitx::utf8::ncharByteLength ( Iter  iter,
size_t  n 
)
inline

get the byte length of next N utf-8 character.

This function has no error check on invalid string or end of string. Check the string before use it.

Definition at line 128 of file utf8.h.

◆ normalize()

Key fcitx::Key::normalize ( ) const

Normalize a key, usually used when key is from frontend.

states will be filtered to have only ctrl alt shift and super. Shift will be removed if it is key symbol is a-z/A-Z. Shift + any other modifier and a-z will be reset to A-Z. So key in configuration does not need to bother the case.

Definition at line 495 of file key.cpp.

◆ open() [1/2]

UnixFD fcitx::StandardPaths::open ( StandardPathsType  type,
const std::filesystem::path &  path,
StandardPathsModes  modes = StandardPathsMode::Default,
std::filesystem::path *  outPath = nullptr 
) const

Open the first matched and succeeded file for read.

This function is preferred over locate if you just want to open the file. Then you can avoid the race condition.

Definition at line 231 of file standardpaths.cpp.

◆ open() [2/2]

StandardPathFile fcitx::StandardPath::open ( Type  type,
const std::string &  path,
int  flags 
) const

Open the first matched and succeeded file.

This function is preferred over locale if you just want to open the file. Then you can avoid the race condition.

See also
openUser()

Definition at line 509 of file standardpath.cpp.

◆ openFD() [1/2]

UniqueFilePtr fcitx::fs::openFD ( StandardPathFile file,
const char *  modes 
)

open the standard path file fd with fdopen.

Parameters
fdfile descriptor
modesmodes passed to fdopen
Returns
FILE pointer if fd is valid and successfully opened.
See also
openUnixFD
Since
5.0.16

Definition at line 33 of file fs_deprecated.cpp.

◆ openFD() [2/2]

FCITXUTILS_EXPORT UniqueFilePtr fcitx::fs::openFD ( UnixFD fd,
const char *  modes 
)

open the unix fd with fdopen.

since fdopen'ed fd will be closed upon fclose, the ownership of fd will be transferred to the FILE if the file descriptor is opened. Otherwise fd is untouched. This helps user to avoid double close on the same file descriptor, since the file descriptor number might be reused.

Parameters
fdfile descriptor
modesmodes passed to fdopen
Returns
FILE pointer if fd is valid and successfully opened.
Since
5.0.16

Definition at line 282 of file fs.cpp.

◆ openPath()

UnixFD fcitx::StandardPaths::openPath ( const std::filesystem::path &  path,
std::optional< int >  flags = std::nullopt,
std::optional< mode_t >  mode = std::nullopt 
)
static

Open the path.

This function will use _wopen on Windows and open on Unix. By default, it will open the file with O_RDONLY. _O_BINARY will be set on Windows.

Definition at line 251 of file standardpaths.cpp.

◆ openSystem()

StandardPathFile fcitx::StandardPath::openSystem ( Type  type,
const std::string &  path,
int  flags 
) const

Open the non-user file.

Since
5.0.6

Definition at line 562 of file standardpath.cpp.

◆ options()

StandardPathsOptions fcitx::StandardPaths::options ( ) const

Get the options for the StandardPaths.

This function returns the current configuration options for the StandardPaths instance.

Definition at line 362 of file standardpaths.cpp.

◆ parents()

const std::list< Element * > & fcitx::Element::parents ( ) const
protected

List all parents.

For the sake of type safety, list parents are protected by default.

Definition at line 51 of file element.cpp.

◆ releaseSlot()

void fcitx::dbus::ObjectVTableBase::releaseSlot ( )

Unregister the dbus object from the bus.

The object will automatically unregister itself upon destruction. So this method should only be used if you want to temporarily remove a object from dbus.

Definition at line 117 of file objectvtable_libdbus.cpp.

◆ requestName()

bool fcitx::dbus::Bus::requestName ( const std::string &  name,
Flags< RequestNameFlag >  flags 
)

Request the dbus name on the bus.

Parameters
nameservice name
flagsrequest name flag.
Returns
requesting name is successful or not.

Definition at line 805 of file bus.cpp.

◆ safeSave() [1/2]

bool fcitx::StandardPaths::safeSave ( StandardPathsType  type,
const std::filesystem::path &  pathOrig,
const std::function< bool(int)> &  callback 
) const

Save the file safely with write and rename to make sure the operation is atomic.

Callback shall not close the file descriptor. If the API you are using does cannot do that, you may use UnixFD to help you dup it first.

Parameters
callbackCallback function that accept a file descriptor and return whether the save if success or not.

Definition at line 295 of file standardpaths.cpp.

◆ safeSave() [2/2]

bool fcitx::StandardPath::safeSave ( Type  type,
const std::string &  pathOrig,
const std::function< bool(int)> &  callback 
) const

Save the file safely with write and rename to make sure the operation is atomic.

Callback shall not close the file descriptor. If the API you are using does cannot do that, you may use UnixFD to help you dup it first.

Parameters
callbackCallback function that accept a file descriptor and return whether the save if success or not.

Definition at line 642 of file standardpath.cpp.

◆ scanDirectories() [1/2]

void fcitx::StandardPath::scanDirectories ( Type  type,
const std::function< bool(const std::string &path, bool user)> &  scanner 
) const

Scan the directories of given type.

Callback returns true to continue the scan.

Definition at line 390 of file standardpath.cpp.

◆ scanDirectories() [2/2]

void fcitx::StandardPath::scanDirectories ( const std::string &  userDir,
const std::vector< std::string > &  directories,
const std::function< bool(const std::string &path, bool user)> &  scanner 
) const

Scan the given directories.

Callback returns true to continue the scan.

Since
5.0.4

Definition at line 403 of file standardpath.cpp.

◆ scanFiles()

void fcitx::StandardPath::scanFiles ( Type  type,
const std::string &  path,
const std::function< bool(const std::string &path, const std::string &dir, bool user)> &  scanner 
) const

Scan files scan file under [directory]/[path].

Parameters
pathsub directory name.

Definition at line 436 of file standardpath.cpp.

◆ serviceOwner()

std::string fcitx::dbus::Bus::serviceOwner ( const std::string &  name,
uint64_t  usec 
)

Helper function to query the service owner.

Parameters
namedbus name
usecdbus timeout
Returns
unique name of the owner.

Definition at line 829 of file bus.cpp.

◆ set() [1/2]

void fcitx::UnixFD::set ( int  fd)

Set a new FD.

if fd is -1, reset it. Otherwise use dup to make copy.

Definition at line 69 of file unixfd.cpp.

◆ set() [2/2]

void fcitx::UnixFD::set ( int  fd,
int  min 
)

Set a new FD.

if fd is -1, reset it. Otherwise use dup to make copy.

Parameters
fdfile descriptor to duplicate.
minminimum file descriptor number
Since
5.1.6

Definition at line 51 of file unixfd.cpp.

◆ setClosureFunction()

void fcitx::dbus::ObjectVTableMethod::setClosureFunction ( ObjectMethodClosure  closure)

Set a closure function to call the handler with in it.

This is useful when you want to do something before and after the dbus message delivery.

Parameters
wrapperwrapper function.

Definition at line 44 of file objectvtable.cpp.

◆ setCurrentMessage()

void fcitx::dbus::ObjectVTableBase::setCurrentMessage ( Message message)

Set the current dbus message.

This is only used by internal dbus class and not supposed to be used anywhere else.

Parameters
messagecurrent message.

Definition at line 151 of file objectvtable_libdbus.cpp.

◆ setDestination()

void fcitx::dbus::Message::setDestination ( const std::string &  dest)

Set the destination of the message.

Should only be used on message to send.

Parameters
destdestination

Definition at line 76 of file message.cpp.

◆ setLogStream()

void fcitx::Log::setLogStream ( std::ostream &  stream)
static

set the global log stream to be used by default.

This function is not thread safe. Please ensure there is no other thread using it at the same time. By default is std::cerr. When you pass a stream into it, you need to ensure it out-live the last call to the function. You may reset it to std::cerr when you don't want to keep the old stream anymore.

Parameters
stream
Since
5.0.6

Definition at line 197 of file log.cpp.

◆ setupTestingEnvironment()

FCITXUTILS_EXPORT void fcitx::setupTestingEnvironment ( const std::string &  testBinaryDir,
const std::vector< std::string > &  addonDirs,
const std::vector< std::string > &  dataDirs 
)

Set corresponding environment variable to make sure fcitx can be run properly for testing.

This function will do following things:

  1. set SKIP_FCITX_PATH to 1, so StandardPath won't try to resolve it's hardcoded installation path.
  2. Setup addonDirs, which should point to all the directories of shared library that need to be loaded.
  3. Set user path to invalid path to prevent write user data.
  4. Set up the data dirs, in order to find necessary data files, addon's .conf files, and setup the path to find the testing only addons.

For example, you want to test a test addon A in current project. And your code directory looks like: src/a a.conf.in test/ testa.cpp build/ : cmake binary dir. Then you need to first create a cmake rule to make sure addon config file follow the fcitx directory structure. Which is $fcitx_data_dir/addon.

This can be achieved by: Create test/addon, and have a CMake rule to copy generated a.conf to build/test/addon.

Then you can invoke setupTestingEnvironment like: setupTestingEnvironment(PATH_TO_build, {"src/a"}, {"test"}); So fcitx_data_dir will include build/test, so build/test/addon/a.conf will loaded. And build/src/a will be used to locate build/src/a.so.

Parameters
testBinaryDirbase directory for build data
addonDirsdirectory of addons
dataDirsdirectory of fcitx data

Definition at line 21 of file testing.cpp.

◆ skipBuiltInPath() [1/2]

bool fcitx::StandardPaths::skipBuiltInPath ( ) const

Whether this StandardPath is configured to Skip built-in path.

Built-in path is usually configured at build time, hardcoded. In portable environment (Install prefix is not fixed), this should be set to false.

Definition at line 347 of file standardpaths.cpp.

◆ skipBuiltInPath() [2/2]

bool fcitx::StandardPath::skipBuiltInPath ( ) const

Whether this StandardPath is configured to Skip built-in path.

Built-in path is usually configured at build time, hardcoded. In portable environment (Install prefix is not fixed), this should be set to false.

Since
5.1.9

Definition at line 791 of file standardpath.cpp.

◆ skipUserPath()

bool fcitx::StandardPath::skipUserPath ( ) const

Whether this StandardPath is configured to Skip user path.

Since
5.1.9

Definition at line 796 of file standardpath.cpp.

◆ StandardPath()

fcitx::StandardPath::StandardPath ( const std::string &  packageName,
const std::unordered_map< std::string, std::string > &  builtInPath,
bool  skipBuiltInPath,
bool  skipUserPath 
)
explicit

Allow to construct a StandardPath with customized internal value.

Parameters
packageNamethe sub directory under other paths.
builtInPaththis will override the value from fcitxPath.
skipBuiltInPathskip built-in path
skipUserPathskip user path, useful when doing readonly-test.
Since
5.1.9

Definition at line 322 of file standardpath.cpp.

◆ StandardPaths()

fcitx::StandardPaths::StandardPaths ( const std::string &  packageName,
const std::unordered_map< std::string, std::vector< std::filesystem::path >> &  builtInPath,
StandardPathsOptions  options 
)
explicit

Allow to construct a StandardPath with customized internal value.

Parameters
packageNamethe sub directory under other paths.
builtInPaththis will override the value from fcitxPath.
optionsoptions to customize the behavior.

Definition at line 88 of file standardpaths.cpp.

◆ syncUmask() [1/2]

void fcitx::StandardPaths::syncUmask ( ) const

Sync system umask to internal state.

This will affect the file permission created by safeSave.

See also
safeSave

Definition at line 345 of file standardpaths.cpp.

◆ syncUmask() [2/2]

void fcitx::StandardPath::syncUmask ( ) const

Sync system umask to internal state.

This will affect the file permission created by safeSave.

See also
safeSave
Since
5.1.2

Definition at line 789 of file standardpath.cpp.

◆ toString()

std::string fcitx::Key::toString ( KeyStringFormat  format = KeyStringFormat::Portable) const

Convert key to a string.

  • format will control the format of return value.

Definition at line 543 of file key.cpp.

◆ trim()

FCITXUTILS_EXPORT std::string fcitx::stringutils::trim ( std::string_view  str)

Trim the white space in str.

See also
trimInplace

Definition at line 137 of file stringutils.cpp.

◆ trimInplace()

FCITXUTILS_EXPORT std::pair< std::string::size_type, std::string::size_type > fcitx::stringutils::trimInplace ( std::string_view  str)

Trim the whitespace by returning start end end of first and list non whitespace character position.

Will return a pair of equal value all characters are whitespace.

Definition at line 130 of file stringutils.cpp.

◆ trimView()

FCITXUTILS_EXPORT std::string_view fcitx::stringutils::trimView ( std::string_view  )

Trim the white space in string view.

See also
trimInplace
Since
5.0.16

Definition at line 142 of file stringutils.cpp.

◆ typeImpl()

bool fcitx::InputBuffer::typeImpl ( const char *  s,
size_t  length 
)
protectedvirtual

Type a certain length of utf8 character to the buffer.

[s, s+length] need to be valid utf8 string.

Definition at line 79 of file inputbuffer.cpp.

◆ unescapeForValue()

FCITXUTILS_EXPORT std::optional< std::string > fcitx::stringutils::unescapeForValue ( std::string_view  str)

unescape a string, that is potentially quoted.

Parameters
strinput string.
Returns
unescaped string
See also
escapeForValue
Since
5.0.16

Definition at line 369 of file stringutils.cpp.

◆ uniqueName()

std::string fcitx::dbus::Bus::uniqueName ( )

Return the unique name of current connection.

E.g. :1.34

Returns
unique name

Definition at line 852 of file bus.cpp.

◆ UnixFD()

fcitx::UnixFD::UnixFD ( int  fd,
int  min 
)
explicit

Create UnixFD with dup, with give parameter to dup.

Parameters
fdfile descriptor to duplicate.
minminimum file descriptor number
Since
5.1.6

Definition at line 23 of file unixfd.cpp.

◆ userDirectory()

const std::filesystem::path & fcitx::StandardPaths::userDirectory ( StandardPathsType  type) const

Get user writable directory for given type.

The path will be empty if there is no relevant user directory.

Definition at line 150 of file standardpaths.cpp.

Variable Documentation

◆ INVALID_LENGTH

constexpr size_t fcitx::utf8::INVALID_LENGTH = static_cast<size_t>(-1)

Possible return value of lengthValidated if the string is not valid.

See also
lengthValidated()

Definition at line 53 of file utf8.h.