--- /dev/null
+<manifest>
+ <request>
+ <domain name="_"/>
+ </request>
+</manifest>
#include "isf_demo_efl.h"
#include "isf_mime_type_efl.h"
+static Evas_Object *item_provider(void *data, Evas_Object *en, const char *item)
+{
+ Evas_Object *obj = NULL;
+
+ obj = elm_image_add(en);
+ elm_image_file_set(obj, item, NULL);
+ elm_image_animated_set(obj, EINA_TRUE);
+ elm_image_animated_play_set(obj, EINA_TRUE);
+ evas_object_show(obj);
+
+ return obj;
+}
+
+static void _imf_event_commit_content_cb(void *data, Ecore_IMF_Context *ctx, void *event_info)
+{
+ Ecore_IMF_Event_Commit_Content *commit_content = (Ecore_IMF_Event_Commit_Content *)event_info;
+ Evas_Object *obj = (Evas_Object *)data;
+
+ if (!commit_content || !obj) return;
+
+ char buf[4096];
+ const char *text = elm_object_text_get(obj);
+ if (text)
+ snprintf(buf, sizeof(buf), "%s<br><item absize=300x300 vsize=full href=%s></item>", text, commit_content->content_uri);
+ else
+ snprintf(buf, sizeof(buf), "<item absize=300x300 vsize=full href=%s></item>", commit_content->content_uri);
+
+ elm_object_text_set(obj, buf);
+ elm_entry_cursor_end_set(obj);
+ evas_object_show(obj);
+}
+
static Evas_Object *_create_ef_layout (Evas_Object *parent, const char *label, const char *guide_text, const char *mime_type)
{
Evas_Object *en;
ic = (Ecore_IMF_Context *)elm_entry_imf_context_get (en);
ecore_imf_context_mime_type_accept_set (ic, mime_type);
+ elm_entry_single_line_set (en, EINA_FALSE);
+ ecore_imf_context_event_callback_add(ic, ECORE_IMF_CALLBACK_COMMIT_CONTENT, _imf_event_commit_content_cb, (void *)en);
+ elm_entry_item_provider_append(en, item_provider, NULL);
return ef;
}
static Eina_Bool g_key_rate_checked = EINA_FALSE, g_focused = EINA_FALSE;
static double g_original_key_rate = 0.0, g_original_key_delay = 0.0, g_desired_key_rate = 0.0;
static double g_filter_event_elapsed_time = 0.0;
+static int g_last_key_event_serial = 0;
//
typedef struct __LanguageInfo {
imcontext->input = NULL;
_preedit_cursor_changed = EINA_FALSE;
+ g_filter_event_elapsed_time = 0.0;
+ g_last_key_event_serial = 0;
if (g_desired_key_rate > 0.0 && g_focused) {
g_focused = EINA_FALSE;
break;
}
- if (!_check_filter_event(imcontext)) {
- LOGE("elapsed time : %.3f ms, serial (last, require) : (%d, %d)", g_filter_event_elapsed_time * 1000, imcontext->last_key_event_filter.serial, imcontext->serial + 1);
- ret = EINA_TRUE;
- break;
- }
-
- int serial = imcontext->serial++;
- double start_time = ecore_time_get();
-
/* xkb_mod_mask */
uint32_t modifiers = 0;
if (ecore_key_ev.modifiers & ECORE_EVENT_MODIFIER_SHIFT)
if (ecore_key_ev.modifiers & ECORE_EVENT_LOCK_NUM)
modifiers |= imcontext->num_mask;
+ if (g_last_key_event_serial <= imcontext->last_key_event_filter.serial)
+ g_filter_event_elapsed_time = 0.0;
+
+ if (!_check_filter_event(imcontext)) {
+ LOGE("elapsed time : %.3f ms, serial (last, require) : (%d, %d)", g_filter_event_elapsed_time * 1000, imcontext->last_key_event_filter.serial, imcontext->serial + 1);
+ ret = modifiers ? EINA_FALSE : EINA_TRUE;
+ break;
+ }
+
+ int serial = imcontext->serial++;
+ g_last_key_event_serial = serial;
+ double start_time = ecore_time_get();
+
SECURE_LOGD ("ev:modifiers=0x%x, modifiers=0x%x, shift_mask=0x%x, control_mask=0x%0x, alt_mask=0x%x, caps_mask=0x%x, num_mask=0x%x, keycode=%u", ecore_key_ev.modifiers, modifiers, imcontext->shift_mask, imcontext->control_mask, imcontext->alt_mask, imcontext->caps_mask, imcontext->num_mask, ecore_key_ev.keycode);
//Send key event to IME.
wl_text_input_filter_key_event(imcontext->text_input, serial, ecore_key_ev.timestamp, ecore_key_ev.key,
/* Handle the case where we occasionally need to read a line
that is longer than the initial buffer size. */
- while ((line[LT_STRLEN(line) -1] != '\n') && (!feof (file)))
+ while (((LT_STRLEN(line) >= 1) && (line[LT_STRLEN(line) -1] != '\n')) && (!feof (file)))
{
line = LT_DLREALLOC (char, line, line_len *2);
if (!fgets (&line[line_len -1], (int) line_len +1, file))
if (code == 0xFFFFFF) {
codestr = String ("VoidSymbol");
- } else if (code <= 0xFFFFFFFF){
+ } else {
__KeyName *it = std::lower_bound (__scim_keys_by_code,
__scim_keys_by_code + SCIM_NUM_KEY_NAMES,
code,
%{APP_PREFIX}/*
%files unittests
+%manifest isf-unittests.manifest
+%license COPYING
%defattr(-,root,root,-)
-%{_bindir}/*
+%{_bindir}/isf-tests
%files -n ise-engine-loader
%manifest ise-engine-loader.manifest