Fcitx
|
![]() |
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 | 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. | |
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 EventLoop * | fcitx::dbus::Bus::eventLoop () const |
Return the attached event loop. More... | |
FCITX_NODISCARD std::unique_ptr< Slot > | fcitx::dbus::Bus::addMatch (const MatchRule &rule, MessageCallback callback) |
FCITX_NODISCARD std::unique_ptr< Slot > | fcitx::dbus::Bus::addFilter (MessageCallback callback) |
FCITX_NODISCARD std::unique_ptr< Slot > | fcitx::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< Slot > | fcitx::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 | |
DBusStruct & | fcitx::dbus::DBusStruct< Args >::operator= (const DBusStruct &other)=default |
DBusStruct & | fcitx::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 | |
DictEntry & | fcitx::dbus::DictEntry< Key, Value >::operator= (const DictEntry &other)=default |
DictEntry & | fcitx::dbus::DictEntry< Key, Value >::operator= (DictEntry &&other) noexcept=default |
fcitx::dbus::DictEntry< Key, Value >::DictEntry (const Key &key, const Value &value) | |
constexpr Key & | fcitx::dbus::DictEntry< Key, Value >::key () |
constexpr const Key & | fcitx::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 Signature & | fcitx::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< Slot > | fcitx::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. | |
Message & | fcitx::dbus::Message::operator<< (uint8_t v) |
Message & | fcitx::dbus::Message::operator<< (bool b) |
Message & | fcitx::dbus::Message::operator<< (int16_t v) |
Message & | fcitx::dbus::Message::operator<< (uint16_t v) |
Message & | fcitx::dbus::Message::operator<< (int32_t v) |
Message & | fcitx::dbus::Message::operator<< (uint32_t v) |
Message & | fcitx::dbus::Message::operator<< (int64_t v) |
Message & | fcitx::dbus::Message::operator<< (uint64_t v) |
Message & | fcitx::dbus::Message::operator<< (double v) |
Message & | fcitx::dbus::Message::operator<< (const std::string &s) |
Message & | fcitx::dbus::Message::operator<< (const char *s) |
Message & | fcitx::dbus::Message::operator<< (const ObjectPath &o) |
Message & | fcitx::dbus::Message::operator<< (const Signature &s) |
Message & | fcitx::dbus::Message::operator<< (const UnixFD &fd) |
Message & | fcitx::dbus::Message::operator<< (const Container &c) |
Message & | fcitx::dbus::Message::operator<< (const ContainerEnd &c) |
Message & | fcitx::dbus::Message::operator<< (const Variant &v) |
template<typename K , typename V > | |
Message & | fcitx::dbus::Message::operator<< (const std::pair< K, V > &t) |
template<typename... Args> | |
Message & | fcitx::dbus::Message::operator<< (const std::tuple< Args... > &t) |
template<typename... Args> | |
Message & | fcitx::dbus::Message::operator<< (const DBusStruct< Args... > &t) |
template<typename Key , typename Value > | |
Message & | fcitx::dbus::Message::operator<< (const DictEntry< Key, Value > &t) |
template<typename T > | |
Message & | fcitx::dbus::Message::operator<< (const std::vector< T > &t) |
Message & | fcitx::dbus::Message::operator>> (uint8_t &v) |
Message & | fcitx::dbus::Message::operator>> (bool &b) |
Message & | fcitx::dbus::Message::operator>> (int16_t &v) |
Message & | fcitx::dbus::Message::operator>> (uint16_t &v) |
Message & | fcitx::dbus::Message::operator>> (int32_t &v) |
Message & | fcitx::dbus::Message::operator>> (uint32_t &v) |
Message & | fcitx::dbus::Message::operator>> (int64_t &v) |
Message & | fcitx::dbus::Message::operator>> (uint64_t &v) |
Message & | fcitx::dbus::Message::operator>> (double &v) |
Message & | fcitx::dbus::Message::operator>> (std::string &s) |
Message & | fcitx::dbus::Message::operator>> (ObjectPath &o) |
Message & | fcitx::dbus::Message::operator>> (Signature &s) |
Message & | fcitx::dbus::Message::operator>> (UnixFD &fd) |
Message & | fcitx::dbus::Message::operator>> (const Container &c) |
Message & | fcitx::dbus::Message::operator>> (const ContainerEnd &c) |
Message & | fcitx::dbus::Message::operator>> (Variant &variant) |
template<typename K , typename V > | |
Message & | fcitx::dbus::Message::operator>> (std::pair< K, V > &t) |
template<typename... Args> | |
Message & | fcitx::dbus::Message::operator>> (std::tuple< Args... > &t) |
template<typename... Args> | |
Message & | fcitx::dbus::Message::operator>> (DBusStruct< Args... > &t) |
template<typename Key , typename Value > | |
Message & | fcitx::dbus::Message::operator>> (DictEntry< Key, Value > &t) |
template<typename T > | |
Message & | fcitx::dbus::Message::operator>> (std::vector< T > &t) |
template<typename K , typename V > | |
LogMessageBuilder & | fcitx::dbus::operator<< (LogMessageBuilder &builder, const DictEntry< K, V > &entry) |
template<typename... Args> | |
LogMessageBuilder & | fcitx::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 |
ObjectVTableBase * | fcitx::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 PropertyOptions & | fcitx::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... | |
Bus * | fcitx::dbus::ObjectVTableBase::bus () |
Return the bus that the object is registered to. | |
Bus * | fcitx::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. | |
Message * | fcitx::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... | |
ObjectVTableMethod * | fcitx::dbus::ObjectVTableBase::findMethod (const std::string &name) |
ObjectVTableProperty * | fcitx::dbus::ObjectVTableBase::findProperty (const std::string &name) |
virtual std::mutex & | fcitx::dbus::ObjectVTableBase::privateDataMutexForType ()=0 |
virtual ObjectVTablePrivate * | fcitx::dbus::ObjectVTableBase::privateDataForType ()=0 |
static std::shared_ptr< ObjectVTablePrivate > | fcitx::dbus::ObjectVTableBase::newSharedPrivateData () |
std::mutex & | fcitx::dbus::ObjectVTable< T >::privateDataMutexForType () override |
ObjectVTablePrivate * | fcitx::dbus::ObjectVTable< T >::privateDataForType () override |
static std::mutex & | fcitx::dbus::ObjectVTable< T >::privateDataMutex () |
static ObjectVTablePrivate * | fcitx::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< ServiceWatcherEntry > | fcitx::dbus::ServiceWatcher::watchService (const std::string &name, ServiceWatcherCallback callback) |
static VariantTypeRegistry & | fcitx::dbus::VariantTypeRegistry::defaultRegistry () |
template<typename TypeName > | |
void | fcitx::dbus::VariantTypeRegistry::registerType () |
std::shared_ptr< VariantHelperBase > | fcitx::dbus::VariantTypeRegistry::lookupType (const std::string &signature) const |
std::shared_ptr< VariantHelperBase > | fcitx::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. | |
Variant & | fcitx::dbus::Variant::operator= (const Variant &v) |
Variant & | fcitx::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 |
Flags & | fcitx::Flags< Enum >::operator= (Enum f) |
Flags & | fcitx::Flags< Enum >::operator= (storage_type f) |
constexpr bool | fcitx::Flags< Enum >::operator! () const |
constexpr Flags & | fcitx::Flags< Enum >::operator &= (Flags flag) |
Flags & | fcitx::Flags< Enum >::operator &= (Enum flag) |
Flags & | fcitx::Flags< Enum >::operator|= (Flags flag) |
constexpr Flags & | fcitx::Flags< Enum >::operator|= (Enum flag) |
Flags & | fcitx::Flags< Enum >::operator^= (Flags flag) |
Flags & | fcitx::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 LogCategory & | fcitx::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) | |
LogMessageBuilder & | fcitx::LogMessageBuilder::self () |
LogMessageBuilder & | fcitx::LogMessageBuilder::operator<< (const std::string &s) |
LogMessageBuilder & | fcitx::LogMessageBuilder::operator<< (const Key &key) |
LogMessageBuilder & | fcitx::LogMessageBuilder::operator<< (char v) |
LogMessageBuilder & | fcitx::LogMessageBuilder::operator<< (bool v) |
LogMessageBuilder & | fcitx::LogMessageBuilder::operator<< (signed short v) |
LogMessageBuilder & | fcitx::LogMessageBuilder::operator<< (unsigned short v) |
LogMessageBuilder & | fcitx::LogMessageBuilder::operator<< (signed int v) |
LogMessageBuilder & | fcitx::LogMessageBuilder::operator<< (unsigned int v) |
LogMessageBuilder & | fcitx::LogMessageBuilder::operator<< (signed long v) |
LogMessageBuilder & | fcitx::LogMessageBuilder::operator<< (unsigned long v) |
LogMessageBuilder & | fcitx::LogMessageBuilder::operator<< (float v) |
LogMessageBuilder & | fcitx::LogMessageBuilder::operator<< (double v) |
LogMessageBuilder & | fcitx::LogMessageBuilder::operator<< (char *v) |
LogMessageBuilder & | fcitx::LogMessageBuilder::operator<< (const char *v) |
LogMessageBuilder & | fcitx::LogMessageBuilder::operator<< (const void *v) |
LogMessageBuilder & | fcitx::LogMessageBuilder::operator<< (long double v) |
LogMessageBuilder & | fcitx::LogMessageBuilder::operator<< (signed long long v) |
LogMessageBuilder & | fcitx::LogMessageBuilder::operator<< (unsigned long long v) |
template<typename T > | |
LogMessageBuilder & | fcitx::LogMessageBuilder::operator<< (T v) |
template<typename T > | |
LogMessageBuilder & | fcitx::LogMessageBuilder::operator<< (const std::optional< T > &opt) |
template<typename T > | |
LogMessageBuilder & | fcitx::LogMessageBuilder::operator<< (const std::unique_ptr< T > &ptr) |
template<typename T > | |
LogMessageBuilder & | fcitx::LogMessageBuilder::operator<< (const std::vector< T > &vec) |
template<typename T > | |
LogMessageBuilder & | fcitx::LogMessageBuilder::operator<< (const std::span< T > &vec) |
template<typename T > | |
LogMessageBuilder & | fcitx::LogMessageBuilder::operator<< (const std::list< T > &lst) |
template<typename K , typename V > | |
LogMessageBuilder & | fcitx::LogMessageBuilder::operator<< (const std::pair< K, V > &pair) |
template<typename... Args> | |
LogMessageBuilder & | fcitx::LogMessageBuilder::operator<< (const std::tuple< Args... > &tuple) |
template<typename K , typename V > | |
LogMessageBuilder & | fcitx::LogMessageBuilder::operator<< (const std::unordered_map< K, V > &vec) |
template<typename V > | |
LogMessageBuilder & | fcitx::LogMessageBuilder::operator<< (const std::unordered_set< V > &vec) |
template<typename K , typename V > | |
LogMessageBuilder & | fcitx::LogMessageBuilder::operator<< (const std::map< K, V > &vec) |
template<typename V > | |
LogMessageBuilder & | fcitx::LogMessageBuilder::operator<< (const std::set< V > &vec) |
template<typename K , typename V > | |
LogMessageBuilder & | fcitx::LogMessageBuilder::operator<< (const std::multimap< K, V > &vec) |
template<typename V > | |
LogMessageBuilder & | fcitx::LogMessageBuilder::operator<< (const std::multiset< V > &vec) |
template<typename K , typename V > | |
LogMessageBuilder & | fcitx::LogMessageBuilder::operator<< (const std::unordered_multimap< K, V > &vec) |
template<typename V > | |
LogMessageBuilder & | fcitx::LogMessageBuilder::operator<< (const std::unordered_multiset< V > &vec) |
fcitx::LogMessageBuilderWrapper< MetaStringFileName, N >::LogMessageBuilderWrapper (LogLevel l) | |
LogMessageBuilder & | fcitx::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 | |
Rect & | fcitx::Rect::operator= (const Rect &rect)=default |
Rect & | fcitx::Rect::setPosition (int x, int y) noexcept |
Rect & | fcitx::Rect::setSize (int width, int height) noexcept |
Rect & | fcitx::Rect::setLeft (int pos) noexcept |
Rect & | fcitx::Rect::setTop (int pos) noexcept |
Rect & | fcitx::Rect::setRight (int pos) noexcept |
Rect & | fcitx::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 > | |
T | 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 | |
ScopedConnection & | fcitx::ScopedConnection::operator= (ScopedConnection &&other) noexcept |
ScopedConnection & | fcitx::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 | |
Signal & | fcitx::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 | |
StandardPathFile & | fcitx::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 StandardPath & | fcitx::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< StandardPathFile > | fcitx::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 StandardPaths & | fcitx::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< UnixFD > | fcitx::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 |
UTF8CharIterator & | fcitx::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 |
UTF8StringViewIter & | fcitx::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< ConnectionBody > | fcitx::Connection::body_ |
HandlerTable< std::function< Ret(Args...)> > | fcitx::Signal< Ret(Args...), Combiner >::SignalData::table_ |
IntrusiveList< ConnectionBody > | fcitx::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. | |
#define FCITX_DECLARE_SIGNAL | ( | CLASS_NAME, | |
NAME, | |||
... | |||
) |
Declare signal by type.
Definition at line 25 of file connectableobject.h.
#define FCITX_DEFINE_LOG_CATEGORY | ( | name, | |
... | |||
) |
#define FCITX_LOGC | ( | CATEGORY, | |
LEVEL | |||
) |
#define FCITX_LOGC_IF | ( | CATEGORY, | |
LEVEL, | |||
CONDITION | |||
) |
#define FCITX_METASTRING_TEMPLATE_16 | ( | N, | |
S | |||
) |
Definition at line 163 of file metastring.h.
#define FCITX_METASTRING_TEMPLATE_256 | ( | N, | |
S | |||
) |
Definition at line 173 of file metastring.h.
#define FCITX_OBJECT_VTABLE_METHOD | ( | FUNCTION, | |
FUNCTION_NAME, | |||
SIGNATURE, | |||
RET | |||
) |
Register a class member function as a DBus method.
It will also check if the dbus signature matches the function type.
FUNCTION | a member function of the class |
FUNCTION_NAME | a string of DBus method name |
SIGNATURE | The dbus signature of arguments. |
RET | The dbus signature of the return value. |
Definition at line 137 of file objectvtable.h.
#define FCITX_OBJECT_VTABLE_PROPERTY | ( | PROPERTY, | |
NAME, | |||
SIGNATURE, | |||
GETMETHOD, | |||
... | |||
) |
Register a new DBus read-only property.
PROPERTY | will be used to define class member. |
NAME | a string of DBus property name |
SIGNATURE | The dbus signature of the property. |
GETMETHOD | The method used to return the value of the property |
Definition at line 192 of file objectvtable.h.
#define FCITX_OBJECT_VTABLE_SIGNAL | ( | SIGNAL, | |
SIGNAL_NAME, | |||
SIGNATURE | |||
) |
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.
SIGNAL | will be used to define two member functions. |
SIGNAL_NAME | a string of DBus signal name |
SIGNATURE | The dbus signature of the signal. |
Definition at line 162 of file objectvtable.h.
#define FCITX_OBJECT_VTABLE_WRITABLE_PROPERTY | ( | PROPERTY, | |
NAME, | |||
SIGNATURE, | |||
GETMETHOD, | |||
SETMETHOD, | |||
... | |||
) |
Register a new DBus read-only property.
PROPERTY | will be used to define class member. |
NAME | a string of DBus property name |
SIGNATURE | The dbus signature of the property. |
GETMETHOD | The method used to return the value of the property |
SETMETHOD | The method used to update the value of the property |
Definition at line 211 of file objectvtable.h.
#define FCITX_SIMPLE_LOG | ( | TYPE | ) |
|
strong |
Input context CapabilityFlags.
Enumerator | |
---|---|
ReportKeyRepeat | Whether client will set KeyState::Repeat on the key event.
|
ClientSideInputPanel | Whether client display input panel by itself.
|
Disable | Whether client request input method to be disabled. Usually this means only allow to type with raw keyboard.
|
CommitStringWithCursor | Whether client support commit string with cursor location.
|
Definition at line 21 of file capabilityflags.h.
|
strong |
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.
|
strong |
|
strong |
enum fcitx::LogLevel : int |
|
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.
|
strong |
Enum for location type.
Definition at line 41 of file standardpaths.h.
|
strong |
Enum flag for text formatting.
Enumerator | |
---|---|
Underline | underline is a flag |
HighLight | highlight the preedit |
Definition at line 20 of file textformatflags.h.
|
strong |
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.
bool fcitx::dbus::Bus::addObjectVTable | ( | const std::string & | path, |
const std::string & | interface, | ||
ObjectVTableBase & | vtable | ||
) |
std::string fcitx::dbus::Bus::address | ( | ) |
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.
from | the number of bytes from end. |
Definition at line 274 of file stringutils.cpp.
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.
Definition at line 311 of file stringutils.cpp.
FCITXUTILS_EXPORT size_t fcitx::stringutils::backwardSearch | ( | const std::string & | haystack, |
const std::string & | needle, | ||
size_t | from | ||
) |
Fast backward substring search.
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.
std::unique_ptr< Slot > fcitx::dbus::Message::callAsync | ( | uint64_t | usec, |
MessageCallback | callback | ||
) |
Asynchronously call a dbus method with a timeout in microseconds.
usec | timeout |
callback | Callback function if anything happens. |
Definition at line 197 of file message.cpp.
|
inline |
Check the current key against a key list.
|
protected |
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.
str | input string |
prefix | to check |
Definition at line 418 of file stringutils.cpp.
Message * fcitx::dbus::ObjectVTableBase::currentMessage | ( | ) | const |
Return the current dbus message for current method.
This should only be used with in a registered callback.
Definition at line 146 of file objectvtable_libdbus.cpp.
|
inline |
|
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.
int fcitx::Key::digit | ( | ) | const |
std::string fcitx::dbus::Message::errorMessage | ( | ) | const |
Return the error message of the message.
Should only be used when message is a received error.
Definition at line 143 of file message.cpp.
std::string fcitx::dbus::Message::errorName | ( | ) | const |
Return the error name of the message.
Should only be used when message is a received error.
Definition at line 134 of file message.cpp.
FCITXUTILS_EXPORT std::string fcitx::stringutils::escapeForValue | ( | std::string_view | str | ) |
escape a string, add quote if needed.
str | input string. |
Definition at line 387 of file stringutils.cpp.
EventLoop * fcitx::dbus::Bus::eventLoop | ( | ) | const |
FCITXUTILS_EXPORT uint32_t fcitx_utf8_get_char_validated | ( | const char * | p, |
int | max_len, | ||
int * | plen | ||
) |
FCITXUTILS_EXPORT char* fcitx_utf8_get_nth_char | ( | const char * | s, |
uint32_t | n | ||
) |
|
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.
|
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.
|
static |
Return a path under specific fcitxPath directory.
path is required to be a valid value.
Definition at line 376 of file standardpath.cpp.
|
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.
Definition at line 748 of file standardpath.cpp.
|
inline |
|
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.
|
static |
Check if certain executable presents in PATH.
Definition at line 785 of file standardpath.cpp.
|
static |
fcitx::InputBuffer::InputBuffer | ( | InputBufferOptions | options = InputBufferOption::NoOption | ) |
Create a input buffer with options.
Definition at line 60 of file inputbuffer.cpp.
bool fcitx::Key::isCursorMove | ( | ) | const |
bool fcitx::Key::isDigit | ( | ) | const |
FCITXUTILS_EXPORT bool fcitx::fs::isexe | ( | const std::string & | path | ) |
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.
|
explicit |
|
inlineexplicit |
Parse a key from std::string.
|
inline |
Check the current key against a key list and get the matched key index.
|
static |
|
static |
|
static |
|
static |
Convert keysym to a unicode string.
Will return a non empty value UTF-8 string if this key may produce a character.
|
inline |
Return the number UTF-8 characters in the string iterator range.
|
inline |
Return the number UTF-8 characters in the string.
|
inline |
|
inline |
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.
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.
|
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.
Definition at line 333 of file standardpath.h.
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.
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.
Definition at line 666 of file standardpath.cpp.
|
static |
FCITXUTILS_EXPORT int64_t fcitx::fs::modifiedTime | ( | const std::filesystem::path & | path | ) |
|
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.
|
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.
void * fcitx::dbus::Bus::nativeHandle | ( | ) | const |
void * fcitx::dbus::Message::nativeHandle | ( | ) | const |
Return the low level internal pointer of the message.
Definition at line 156 of file message.cpp.
|
inline |
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.
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.
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.
Definition at line 509 of file standardpath.cpp.
UniqueFilePtr fcitx::fs::openFD | ( | StandardPathFile & | file, |
const char * | modes | ||
) |
open the standard path file fd with fdopen.
fd | file descriptor |
modes | modes passed to fdopen |
Definition at line 33 of file fs_deprecated.cpp.
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.
fd | file descriptor |
modes | modes passed to fdopen |
|
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.
StandardPathFile fcitx::StandardPath::openSystem | ( | Type | type, |
const std::string & | path, | ||
int | flags | ||
) | const |
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.
|
protected |
List all parents.
For the sake of type safety, list parents are protected by default.
Definition at line 51 of file element.cpp.
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.
bool fcitx::dbus::Bus::requestName | ( | const std::string & | name, |
Flags< RequestNameFlag > | flags | ||
) |
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.
callback | Callback function that accept a file descriptor and return whether the save if success or not. |
Definition at line 295 of file standardpaths.cpp.
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.
callback | Callback function that accept a file descriptor and return whether the save if success or not. |
Definition at line 642 of file standardpath.cpp.
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.
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.
Definition at line 403 of file standardpath.cpp.
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].
path | sub directory name. |
Definition at line 436 of file standardpath.cpp.
std::string fcitx::dbus::Bus::serviceOwner | ( | const std::string & | name, |
uint64_t | usec | ||
) |
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.
void fcitx::UnixFD::set | ( | int | fd, |
int | min | ||
) |
Set a new FD.
if fd is -1, reset it. Otherwise use dup to make copy.
fd | file descriptor to duplicate. |
min | minimum file descriptor number |
Definition at line 51 of file unixfd.cpp.
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.
wrapper | wrapper function. |
Definition at line 44 of file objectvtable.cpp.
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.
message | current message. |
Definition at line 151 of file objectvtable_libdbus.cpp.
void fcitx::dbus::Message::setDestination | ( | const std::string & | dest | ) |
Set the destination of the message.
Should only be used on message to send.
dest | destination |
Definition at line 76 of file message.cpp.
|
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.
stream |
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:
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.
testBinaryDir | base directory for build data |
addonDirs | directory of addons |
dataDirs | directory of fcitx data |
Definition at line 21 of file testing.cpp.
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.
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.
Definition at line 791 of file standardpath.cpp.
bool fcitx::StandardPath::skipUserPath | ( | ) | const |
Whether this StandardPath is configured to Skip user path.
Definition at line 796 of file standardpath.cpp.
|
explicit |
Allow to construct a StandardPath with customized internal value.
packageName | the sub directory under other paths. |
builtInPath | this will override the value from fcitxPath. |
skipBuiltInPath | skip built-in path |
skipUserPath | skip user path, useful when doing readonly-test. |
Definition at line 322 of file standardpath.cpp.
|
explicit |
Allow to construct a StandardPath with customized internal value.
packageName | the sub directory under other paths. |
builtInPath | this will override the value from fcitxPath. |
options | options to customize the behavior. |
Definition at line 88 of file standardpaths.cpp.
void fcitx::StandardPaths::syncUmask | ( | ) | const |
Sync system umask to internal state.
This will affect the file permission created by safeSave.
Definition at line 345 of file standardpaths.cpp.
void fcitx::StandardPath::syncUmask | ( | ) | const |
Sync system umask to internal state.
This will affect the file permission created by safeSave.
Definition at line 789 of file standardpath.cpp.
std::string fcitx::Key::toString | ( | KeyStringFormat | format = KeyStringFormat::Portable | ) | const |
FCITXUTILS_EXPORT std::string fcitx::stringutils::trim | ( | std::string_view | str | ) |
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.
FCITXUTILS_EXPORT std::string_view fcitx::stringutils::trimView | ( | std::string_view | ) |
Trim the white space in string view.
Definition at line 142 of file stringutils.cpp.
|
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.
FCITXUTILS_EXPORT std::optional< std::string > fcitx::stringutils::unescapeForValue | ( | std::string_view | str | ) |
unescape a string, that is potentially quoted.
str | input string. |
Definition at line 369 of file stringutils.cpp.
std::string fcitx::dbus::Bus::uniqueName | ( | ) |
|
explicit |
Create UnixFD with dup, with give parameter to dup.
fd | file descriptor to duplicate. |
min | minimum file descriptor number |
Definition at line 23 of file unixfd.cpp.
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.
constexpr size_t fcitx::utf8::INVALID_LENGTH = static_cast<size_t>(-1) |
Possible return value of lengthValidated if the string is not valid.