Auto update

This commit is contained in:
Fcitx5 Android Bot 2023-10-11 13:15:28 +00:00
parent fd3e6c4c17
commit 65ed2d60fb
35 changed files with 307109 additions and 1 deletions

View file

@ -0,0 +1,186 @@
/* libhangul
* Copyright (C) 2004 - 2007 Choe Hwanjin
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef libhangul_hangul_h
#define libhangul_hangul_h
#include <stdbool.h>
#include <inttypes.h>
#ifdef __GNUC__
#define LIBHANGUL_DEPRECATED __attribute__((deprecated))
#else
#define LIBHANGUL_DEPRECATED
#endif
#ifdef __cplusplus
extern "C" {
#endif
/* hangulctype.c */
enum {
HANGUL_CHOSEONG_FILLER = 0x115f, /* hangul choseong filler */
HANGUL_JUNGSEONG_FILLER = 0x1160 /* hangul jungseong filler */
};
typedef uint32_t ucschar;
bool hangul_is_choseong(ucschar c);
bool hangul_is_jungseong(ucschar c);
bool hangul_is_jongseong(ucschar c);
bool hangul_is_choseong_conjoinable(ucschar c);
bool hangul_is_jungseong_conjoinable(ucschar c);
bool hangul_is_jongseong_conjoinable(ucschar c);
bool hangul_is_jamo_conjoinable(ucschar c);
bool hangul_is_syllable(ucschar c);
bool hangul_is_jamo(ucschar c);
bool hangul_is_cjamo(ucschar c);
ucschar hangul_jamo_to_cjamo(ucschar ch);
const ucschar* hangul_syllable_iterator_prev(const ucschar* str,
const ucschar* begin);
const ucschar* hangul_syllable_iterator_next(const ucschar* str,
const ucschar* end);
int hangul_syllable_len(const ucschar* str, int max_len);
ucschar hangul_jamo_to_syllable(ucschar choseong,
ucschar jungseong,
ucschar jongseong);
void hangul_syllable_to_jamo(ucschar syllable,
ucschar* choseong,
ucschar* jungseong,
ucschar* jongseong);
int hangul_jamos_to_syllables(ucschar* dest, int destlen,
const ucschar* src, int srclen);
/* hangulinputcontext.c */
typedef struct _HangulKeyboard HangulKeyboard;
typedef struct _HangulCombination HangulCombination;
typedef struct _HangulBuffer HangulBuffer;
typedef struct _HangulInputContext HangulInputContext;
enum {
HANGUL_OUTPUT_SYLLABLE,
HANGUL_OUTPUT_JAMO
};
enum {
HANGUL_KEYBOARD_TYPE_JAMO,
HANGUL_KEYBOARD_TYPE_JASO,
HANGUL_KEYBOARD_TYPE_ROMAJA,
HANGUL_KEYBOARD_TYPE_JAMO_YET,
HANGUL_KEYBOARD_TYPE_JASO_YET,
};
enum {
HANGUL_IC_OPTION_AUTO_REORDER,
HANGUL_IC_OPTION_COMBI_ON_DOUBLE_STROKE,
HANGUL_IC_OPTION_NON_CHOSEONG_COMBI,
};
/* library */
int hangul_init();
int hangul_fini();
/* keyboard */
HangulKeyboard* hangul_keyboard_new(void);
HangulKeyboard* hangul_keyboard_new_from_file(const char* path);
void hangul_keyboard_delete(HangulKeyboard *keyboard);
void hangul_keyboard_set_type(HangulKeyboard *keyboard, int type);
unsigned int hangul_keyboard_list_get_count();
const char* hangul_keyboard_list_get_keyboard_id(unsigned index_);
const char* hangul_keyboard_list_get_keyboard_name(unsigned index_);
const HangulKeyboard* hangul_keyboard_list_get_keyboard(const char* id);
const char* hangul_keyboard_list_register_keyboard(HangulKeyboard* keyboard);
HangulKeyboard* hangul_keyboard_list_unregister_keyboard(const char* id);
/* combination */
HangulCombination* hangul_combination_new(void);
void hangul_combination_delete(HangulCombination *combination);
bool hangul_combination_set_data(HangulCombination* combination,
ucschar* first, ucschar* second, ucschar* result, unsigned int n);
/* input context */
HangulInputContext* hangul_ic_new(const char* keyboard);
void hangul_ic_delete(HangulInputContext *hic);
bool hangul_ic_process(HangulInputContext *hic, int ascii);
void hangul_ic_reset(HangulInputContext *hic);
bool hangul_ic_backspace(HangulInputContext *hic);
bool hangul_ic_is_empty(HangulInputContext *hic);
bool hangul_ic_has_choseong(HangulInputContext *hic);
bool hangul_ic_has_jungseong(HangulInputContext *hic);
bool hangul_ic_has_jongseong(HangulInputContext *hic);
bool hangul_ic_is_transliteration(HangulInputContext *hic);
bool hangul_ic_get_option(HangulInputContext *hic, int option);
void hangul_ic_set_option(HangulInputContext *hic, int option, bool value);
void hangul_ic_set_output_mode(HangulInputContext *hic, int mode);
void hangul_ic_set_keyboard(HangulInputContext *hic,
const HangulKeyboard *keyboard);
void hangul_ic_select_keyboard(HangulInputContext *hic,
const char* id);
void hangul_ic_connect_callback(HangulInputContext* hic, const char* event,
void* callback, void* user_data);
const ucschar* hangul_ic_get_preedit_string(HangulInputContext *hic);
const ucschar* hangul_ic_get_commit_string(HangulInputContext *hic);
const ucschar* hangul_ic_flush(HangulInputContext *hic);
/* hanja.c */
typedef struct _Hanja Hanja;
typedef struct _HanjaList HanjaList;
typedef struct _HanjaTable HanjaTable;
HanjaTable* hanja_table_load(const char *filename);
HanjaList* hanja_table_match_exact(const HanjaTable* table, const char *key);
HanjaList* hanja_table_match_prefix(const HanjaTable* table, const char *key);
HanjaList* hanja_table_match_suffix(const HanjaTable* table, const char *key);
void hanja_table_delete(HanjaTable *table);
int hanja_list_get_size(const HanjaList *list);
const char* hanja_list_get_key(const HanjaList *list);
const Hanja* hanja_list_get_nth(const HanjaList *list, unsigned int n);
const char* hanja_list_get_nth_key(const HanjaList *list, unsigned int n);
const char* hanja_list_get_nth_value(const HanjaList *list, unsigned int n);
const char* hanja_list_get_nth_comment(const HanjaList *list, unsigned int n);
void hanja_list_delete(HanjaList *list);
const char* hanja_get_key(const Hanja* hanja);
const char* hanja_get_value(const Hanja* hanja);
const char* hanja_get_comment(const Hanja* hanja);
#ifdef __cplusplus
}
#endif
void hangul_keyboard_set_value(HangulKeyboard *keyboard,
int key, ucschar value) LIBHANGUL_DEPRECATED;
void hangul_ic_set_combination(HangulInputContext *hic,
const HangulCombination *combination) LIBHANGUL_DEPRECATED;
unsigned hangul_ic_get_n_keyboards() LIBHANGUL_DEPRECATED;
const char* hangul_ic_get_keyboard_id(unsigned index_) LIBHANGUL_DEPRECATED;
const char* hangul_ic_get_keyboard_name(unsigned index_) LIBHANGUL_DEPRECATED;
#undef LIBHANGUL_DEPRECATED
#endif /* libhangul_hangul_h */

View file

@ -0,0 +1,48 @@
# This is a basic version file for the Config-mode of find_package().
# It is used by write_basic_package_version_file() as input file for configure_file()
# to create a version-file which can be installed along a config.cmake file.
#
# The created file sets PACKAGE_VERSION_EXACT if the current version string and
# the requested version string are exactly the same and it sets
# PACKAGE_VERSION_COMPATIBLE if the current version is >= requested version.
# The variable CVF_VERSION must be set before calling configure_file().
set(PACKAGE_VERSION "0.1.0")
if (PACKAGE_FIND_VERSION_RANGE)
# Package version must be in the requested version range
if ((PACKAGE_FIND_VERSION_RANGE_MIN STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION_MIN)
OR ((PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_GREATER PACKAGE_FIND_VERSION_MAX)
OR (PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "EXCLUDE" AND PACKAGE_VERSION VERSION_GREATER_EQUAL PACKAGE_FIND_VERSION_MAX)))
set(PACKAGE_VERSION_COMPATIBLE FALSE)
else()
set(PACKAGE_VERSION_COMPATIBLE TRUE)
endif()
else()
if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
set(PACKAGE_VERSION_COMPATIBLE FALSE)
else()
set(PACKAGE_VERSION_COMPATIBLE TRUE)
if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION)
set(PACKAGE_VERSION_EXACT TRUE)
endif()
endif()
endif()
# if the installed project requested no architecture check, don't perform the check
if("FALSE")
return()
endif()
# if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it:
if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "4" STREQUAL "")
return()
endif()
# check that the installed version has the same 32/64bit-ness as the one which is currently searching:
if(NOT CMAKE_SIZEOF_VOID_P STREQUAL "4")
math(EXPR installedBits "4 * 8")
set(PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)")
set(PACKAGE_VERSION_UNSUITABLE TRUE)
endif()

View file

@ -0,0 +1,60 @@
# libhangul
# Copyright 2021 Choe Hwanjin
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
include("${CMAKE_CURRENT_LIST_DIR}/hangul-config-version.cmake")
####### Expanded from @PACKAGE_INIT@ by configure_package_config_file() #######
####### Any changes to this file will be overwritten by the next CMake run ####
####### The input file was hangul-config.cmake.in ########
get_filename_component(PACKAGE_PREFIX_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../" ABSOLUTE)
macro(set_and_check _var _file)
set(${_var} "${_file}")
if(NOT EXISTS "${_file}")
message(FATAL_ERROR "File or directory ${_file} referenced by variable ${_var} does not exist !")
endif()
endmacro()
macro(check_required_components _NAME)
foreach(comp ${${_NAME}_FIND_COMPONENTS})
if(NOT ${_NAME}_${comp}_FOUND)
if(${_NAME}_FIND_REQUIRED_${comp})
set(${_NAME}_FOUND FALSE)
endif()
endif()
endforeach()
endmacro()
####################################################################################
message("LIBHANGUL_INCLUDE_DIR: ${PACKAGE_PREFIX_DIR}/include/hangul-1.0")
message("LIBHANGUL_LIBRARY_DIR: ${PACKAGE_PREFIX_DIR}/lib")
set_and_check(LIBHANGUL_INCLUDE_DIR "${PACKAGE_PREFIX_DIR}/include/hangul-1.0")
set_and_check(LIBHANGUL_LIBRARY_DIR "${PACKAGE_PREFIX_DIR}/lib")
set(LIBHANGUL_INCLUDE_DIR2 "include/hangul-1.0")
set(LIBHANGUL_LIBRARY_DIR2 "lib")
add_library(hangul SHARED IMPORTED)
set_target_properties(hangul PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${LIBHANGUL_INCLUDE_DIR}"
IMPORTED_LOCATION "${LIBHANGUL_LIBRARY_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}hangul${CMAKE_SHARED_LIBRARY_SUFFIX}"
)

Binary file not shown.

1
libhangul/armeabi-v7a/share Symbolic link
View file

@ -0,0 +1 @@
../data