91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 2MB
    文件類型: .zip
    金幣: 2
    下載: 0 次
    發(fā)布日期: 2023-08-10
  • 語(yǔ)言: Java
  • 標(biāo)簽: 安卓??輸入法??代碼??

資源簡(jiǎn)介

簡(jiǎn)單適用于學(xué)習(xí)的安卓輸入法代碼,要用android studio打開(kāi)

資源截圖

代碼片段和文件信息

/*
?*?Copyright?(C)?2009?The?Android?Open?Source?Project
?*
?*?Licensed?under?the?Apache?License?Version?2.0?(the?“License“);
?*?you?may?not?use?this?file?except?in?compliance?with?the?License.
?*?You?may?obtain?a?copy?of?the?License?at
?*
?*??????http://www.apache.org/licenses/LICENSE-2.0
?*
?*?Unless?required?by?applicable?law?or?agreed?to?in?writing?software
?*?distributed?under?the?License?is?distributed?on?an?“AS?IS“?BASIS
?*?WITHOUT?WARRANTIES?OR?CONDITIONS?OF?ANY?KIND?either?express?or?implied.
?*?See?the?License?for?the?specific?language?governing?permissions?and
?*?limitations?under?the?License.
?*/

#include?
#include?
#include?
#include?
#include?
#include?

#include?“../include/pinyinime.h“
#include?“../include/sync.h“
#include?“../include/userdict.h“

#ifdef?__cplusplus
extern?“C“?{
#endif

using?namespace?ime_pinyin;

#define?RET_BUF_LEN?256

static?char16?retbuf[RET_BUF_LEN];
static?char16?(*predict_buf)[kMaxPredictSize?+?1]?=?NULL;
static?size_t?predict_len;

static?Sync?sync_worker;

static?struct?file_descriptor_offsets_t
{
??jclass?mClass;
??jfieldID?mDescriptor;
}?gFileDescriptorOffsets;

JNIEXPORT?jboolean?JNICALL?nativeImOpenDecoder(JNIEnv*?env?jclass?jclazz
???????????????????????????????????????????????jbyteArray?fn_sys_dict
???????????????????????????????????????????????jbyteArray?fn_usr_dict)?{
??jbyte?*fsd?=?(*env).GetByteArrayElements(fn_sys_dict?0);
??jbyte?*fud?=?(*env).GetByteArrayElements(fn_usr_dict?0);

??jboolean?jret?=?JNI_FALSE;

??if?(im_open_decoder((const?char*)fsd?(const?char*)fud))
????jret?=?JNI_TRUE;

??(*env).ReleaseByteArrayElements(fn_sys_dict?fsd?0);
??(*env).ReleaseByteArrayElements(fn_usr_dict?fud?0);

??return?jret;
}

JNIEXPORT?jboolean?JNICALL?nativeImOpenDecoderFd(JNIEnv*?env?jclass?jclazz
?????????????????????????????????????????????????jobject?fd_sys_dict
?????????????????????????????????????????????????jlong?startoffset
?????????????????????????????????????????????????jlong?length
?????????????????????????????????????????????????jbyteArray?fn_usr_dict)?{
??jint?fd?=?env->GetIntField(fd_sys_dict?gFileDescriptorOffsets.mDescriptor);
??jbyte?*fud?=?(*env).GetByteArrayElements(fn_usr_dict?0);

??jboolean?jret?=?JNI_FALSE;

??int?newfd?=?dup(fd);
??if?(im_open_decoder_fd(newfd?startoffset?length?(const?char*)fud))
????jret?=?JNI_TRUE;

??close(newfd);

??(*env).ReleaseByteArrayElements(fn_usr_dict?fud?0);

??return?jret;
}

JNIEXPORT?void?JNICALL?nativeImSetMaxLens(JNIEnv*?env?jclass?jclazz
??????????????????????????????????????????jint?max_sps_len
??????????????????????????????????????????jint?max_hzs_len)?{
??im_set_max_lens(static_cast(max_sps_len)
??????????????????static_cast(max_hzs_len));
??return;
}

JNIEXPORT?jboolean?JNICALL?nativeImCloseDecoder(JNIEnv*?env?jclass?jclazz)?{
??im_close_decoder();
??return?JNI_TRUE;
}

JNIEXPORT?jint?JNICALL?nativeImSearch(JNIEnv*?env?jclass?jc

?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2018-07-26?17:47??PinyinIME\
?????目錄???????????0??2012-01-10?16:19??PinyinIME\res\
?????目錄???????????0??2012-01-10?16:19??PinyinIME\res\drawable\
?????文件?????????424??2011-11-15?13:22??PinyinIME\res\drawable\space_icon.png
?????目錄???????????0??2018-08-04?13:38??__MACOSX\
?????目錄???????????0??2018-08-04?13:38??__MACOSX\PinyinIME\
?????目錄???????????0??2018-08-04?13:38??__MACOSX\PinyinIME\res\
?????目錄???????????0??2018-08-04?13:38??__MACOSX\PinyinIME\res\drawable\
?????文件?????????212??2011-11-15?13:22??__MACOSX\PinyinIME\res\drawable\._space_icon.png
?????文件?????????365??2011-11-15?13:22??PinyinIME\res\drawable\arrow_right.png
?????文件?????????212??2011-11-15?13:22??__MACOSX\PinyinIME\res\drawable\._arrow_right.png
?????文件?????????534??2011-11-15?13:22??PinyinIME\res\drawable\emotion_icon_12_popup.png
?????文件?????????212??2011-11-15?13:22??__MACOSX\PinyinIME\res\drawable\._emotion_icon_12_popup.png
?????文件?????????908??2011-11-15?13:22??PinyinIME\res\drawable\ime_en.png
?????文件?????????212??2011-11-15?13:22??__MACOSX\PinyinIME\res\drawable\._ime_en.png
?????文件?????????492??2011-11-15?13:22??PinyinIME\res\drawable\emotion_icon_06_popup.png
?????文件?????????212??2011-11-15?13:22??__MACOSX\PinyinIME\res\drawable\._emotion_icon_06_popup.png
?????文件?????????954??2011-11-15?13:22??PinyinIME\res\drawable\numstar.png
?????文件?????????212??2011-11-15?13:22??__MACOSX\PinyinIME\res\drawable\._numstar.png
?????文件????????1017??2011-11-15?13:22??PinyinIME\res\drawable\shift_off_icon.png
?????文件?????????212??2011-11-15?13:22??__MACOSX\PinyinIME\res\drawable\._shift_off_icon.png
?????文件?????????151??2011-11-15?13:22??PinyinIME\res\drawable\cands_container_bg.9.png
?????文件?????????212??2011-11-15?13:22??__MACOSX\PinyinIME\res\drawable\._cands_container_bg.9.png
?????文件?????????593??2011-11-15?13:22??PinyinIME\res\drawable\candidate_balloon_bg.9.png
?????文件?????????212??2011-11-15?13:22??__MACOSX\PinyinIME\res\drawable\._candidate_balloon_bg.9.png
?????文件?????????226??2011-11-15?13:22??PinyinIME\res\drawable\comma_full_popup_icon.png
?????文件?????????212??2011-11-15?13:22??__MACOSX\PinyinIME\res\drawable\._comma_full_popup_icon.png
?????文件?????????128??2011-11-15?13:22??PinyinIME\res\drawable\skb_bg.png
?????文件?????????212??2011-11-15?13:22??__MACOSX\PinyinIME\res\drawable\._skb_bg.png
?????文件?????????229??2011-11-15?13:22??PinyinIME\res\drawable\emotion_icon_14_popup.png
?????文件?????????212??2011-11-15?13:22??__MACOSX\PinyinIME\res\drawable\._emotion_icon_14_popup.png
............此處省略455個(gè)文件信息

評(píng)論

共有 條評(píng)論

相關(guān)資源