Auto update

This commit is contained in:
Fcitx5 Android Bot 2024-06-01 13:40:34 +00:00
parent 4ee83775a9
commit 78fc216ae4
24 changed files with 175 additions and 111 deletions

View file

@ -44,8 +44,12 @@ extern "C" {
* specific functionality.
*/
#ifdef WITH_RUST
# include "chewing_rs.h"
#else
# include "global.h"
#endif
#include "chewingio.h"
#include "global.h"
#include "mod_aux.h"
/* backward compatibility */

View file

@ -22,7 +22,11 @@
* \author libchewing Core Team
*/
#include "global.h"
#ifdef WITH_RUST
# include "chewing_rs.h"
#else
# include "global.h"
#endif
#define KEYSTROKE_IGNORE 1
#define KEYSTROKE_COMMIT 2
@ -498,6 +502,30 @@ CHEWING_API int chewing_get_phraseChoiceRearward(const ChewingContext *ctx);
/*@}*/
/*! \name Behavior of automatic learning after committing
*/
/*@{*/
/**
* @brief Set the behavior of automatic learning
*
* @param ctx
* @param mode AUTOLEARN_ENABLED or AUTOLEARN_DISABLED
*/
CHEWING_API void chewing_set_autoLearn(ChewingContext *ctx, int mode);
/**
* @brief Get the behavior of automatic learning
*
* @param ctx
* @return AUTOLEARN_ENABLED or AUTOLEARN_DISABLED
*/
CHEWING_API int chewing_get_autoLearn(const ChewingContext *ctx);
/*@}*/
/*! \name Phonetic sequence in Chewing internal state machine
*/
@ -552,6 +580,8 @@ CHEWING_API ChewingContext *chewing_new2(const char *syspath,
void (*logger) (void *data, int level, const char *fmt, ...),
void *loggerdata);
CHEWING_API int chewing_phone_to_bopomofo(unsigned short phone, char *buf, unsigned short len);
/* *INDENT-OFF* */
#endif /* _CHEWING_IO_H */
/* *INDENT-ON* */

View file

@ -26,6 +26,8 @@
#define SYMBOL_MODE 0
#define FULLSHAPE_MODE 1
#define HALFSHAPE_MODE 0
#define AUTOLEARN_DISABLED 1
#define AUTOLEARN_ENABLED 0
/* specified to Chewing API */
#if defined(_WIN32) || defined(_WIN64) || defined(_WIN32_WCE)
@ -73,30 +75,6 @@
# endif
#endif
/* The following macros are modified from GLIB.
* from GNU cpp Manual:
* C99 introduces the _Pragma operator. This feature addresses a major problem
* with `#pragma': being a directive, it cannot be produced as the result of
* macro expansion. _Pragma is an operator, much like sizeof or defined, and
* can be embedded in a macro.
*/
#if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)))
# define BEGIN_IGNORE_DEPRECATIONS \
_Pragma ("GCC diagnostic push") \
_Pragma ("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
# define END_IGNORE_DEPRECATIONS \
_Pragma ("GCC diagnostic pop")
#elif defined (_MSC_VER) && (_MSC_VER >= 1500)
# define BEGIN_IGNORE_DEPRECATIONS \
__pragma (warning (push)) \
__pragma (warning (disable : 4996))
# define END_IGNORE_DEPRECATIONS \
__pragma (warning (pop))
#else
# define BEGIN_IGNORE_DEPRECATIONS
# define END_IGNORE_DEPRECATIONS
#endif
#define MIN_SELKEY 1
#define MAX_SELKEY 10

View file

@ -18,7 +18,11 @@
* \author libchewing Core Team
*/
#include "global.h"
#ifdef WITH_RUST
# include "chewing_rs.h"
#else
# include "global.h"
#endif
/**
* @brief Chewing the state for input context during commit process

Binary file not shown.