forked from enlightenment/efl
ecore-imf-wayland: Formatting fixes
NB: No functional changes Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
f8f71d05cd
commit
6d4357d943
|
@ -146,7 +146,8 @@ update_state(WaylandIMContext *imcontext)
|
|||
_clear_hide_timer();
|
||||
}
|
||||
|
||||
static Eina_Bool _clear_hide_timer()
|
||||
static Eina_Bool
|
||||
_clear_hide_timer(void)
|
||||
{
|
||||
if (_hide_timer)
|
||||
{
|
||||
|
@ -158,14 +159,16 @@ static Eina_Bool _clear_hide_timer()
|
|||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
static void _send_input_panel_hide_request(Ecore_IMF_Context *ctx)
|
||||
static void
|
||||
_send_input_panel_hide_request(Ecore_IMF_Context *ctx)
|
||||
{
|
||||
WaylandIMContext *imcontext = (WaylandIMContext *)ecore_imf_context_data_get(ctx);
|
||||
if (imcontext && imcontext->text_input)
|
||||
zwp_text_input_v1_hide_input_panel(imcontext->text_input);
|
||||
}
|
||||
|
||||
static Eina_Bool _hide_timer_handler(void *data)
|
||||
static Eina_Bool
|
||||
_hide_timer_handler(void *data)
|
||||
{
|
||||
Ecore_IMF_Context *ctx = (Ecore_IMF_Context *)data;
|
||||
_send_input_panel_hide_request(ctx);
|
||||
|
@ -174,13 +177,18 @@ static Eina_Bool _hide_timer_handler(void *data)
|
|||
return ECORE_CALLBACK_CANCEL;
|
||||
}
|
||||
|
||||
static void _input_panel_hide_timer_start(void *data)
|
||||
static void
|
||||
_input_panel_hide_timer_start(void *data)
|
||||
{
|
||||
if (!_hide_timer)
|
||||
_hide_timer = ecore_timer_add(HIDE_TIMER_INTERVAL, _hide_timer_handler, data);
|
||||
{
|
||||
_hide_timer =
|
||||
ecore_timer_add(HIDE_TIMER_INTERVAL, _hide_timer_handler, data);
|
||||
}
|
||||
}
|
||||
|
||||
static void _input_panel_hide(Ecore_IMF_Context *ctx, Eina_Bool instant)
|
||||
static void
|
||||
_input_panel_hide(Ecore_IMF_Context *ctx, Eina_Bool instant)
|
||||
{
|
||||
if (instant || (_hide_timer && ecore_timer_pending_get(_hide_timer) <= 0.0))
|
||||
{
|
||||
|
@ -256,8 +264,7 @@ clear_preedit(WaylandIMContext *imcontext)
|
|||
static void
|
||||
text_input_commit_string(void *data,
|
||||
struct zwp_text_input_v1 *text_input EINA_UNUSED,
|
||||
uint32_t serial,
|
||||
const char *text)
|
||||
uint32_t serial, const char *text)
|
||||
{
|
||||
WaylandIMContext *imcontext = (WaylandIMContext *)data;
|
||||
Eina_Bool old_preedit = EINA_FALSE;
|
||||
|
@ -410,9 +417,7 @@ show_input_panel(Ecore_IMF_Context *ctx)
|
|||
static void
|
||||
text_input_preedit_string(void *data,
|
||||
struct zwp_text_input_v1 *text_input EINA_UNUSED,
|
||||
uint32_t serial,
|
||||
const char *text,
|
||||
const char *commit)
|
||||
uint32_t serial, const char *text, const char *commit)
|
||||
{
|
||||
WaylandIMContext *imcontext = (WaylandIMContext *)data;
|
||||
Eina_Bool old_preedit = EINA_FALSE;
|
||||
|
@ -463,8 +468,7 @@ text_input_preedit_string(void *data,
|
|||
static void
|
||||
text_input_delete_surrounding_text(void *data,
|
||||
struct zwp_text_input_v1 *text_input EINA_UNUSED,
|
||||
int32_t index,
|
||||
uint32_t length)
|
||||
int32_t index, uint32_t length)
|
||||
{
|
||||
WaylandIMContext *imcontext = (WaylandIMContext *)data;
|
||||
Ecore_IMF_Event_Delete_Surrounding ev;
|
||||
|
@ -482,8 +486,7 @@ text_input_delete_surrounding_text(void *data,
|
|||
static void
|
||||
text_input_cursor_position(void *data,
|
||||
struct zwp_text_input_v1 *text_input EINA_UNUSED,
|
||||
int32_t index,
|
||||
int32_t anchor)
|
||||
int32_t index, int32_t anchor)
|
||||
{
|
||||
WaylandIMContext *imcontext = (WaylandIMContext *)data;
|
||||
|
||||
|
@ -498,9 +501,7 @@ text_input_cursor_position(void *data,
|
|||
static void
|
||||
text_input_preedit_styling(void *data,
|
||||
struct zwp_text_input_v1 *text_input EINA_UNUSED,
|
||||
uint32_t index,
|
||||
uint32_t length,
|
||||
uint32_t style)
|
||||
uint32_t index, uint32_t length, uint32_t style)
|
||||
{
|
||||
WaylandIMContext *imcontext = (WaylandIMContext *)data;
|
||||
Ecore_IMF_Preedit_Attr *attr = calloc(1, sizeof(*attr));
|
||||
|
@ -559,8 +560,7 @@ modifiers_get_index(struct wl_array *modifiers_map, const char *name)
|
|||
}
|
||||
|
||||
static xkb_mod_mask_t
|
||||
modifiers_get_mask(struct wl_array *modifiers_map,
|
||||
const char *name)
|
||||
modifiers_get_mask(struct wl_array *modifiers_map, const char *name)
|
||||
{
|
||||
xkb_mod_index_t index = modifiers_get_index(modifiers_map, name);
|
||||
|
||||
|
@ -569,6 +569,7 @@ modifiers_get_mask(struct wl_array *modifiers_map,
|
|||
|
||||
return 1 << index;
|
||||
}
|
||||
|
||||
static void
|
||||
text_input_modifiers_map(void *data,
|
||||
struct zwp_text_input_v1 *text_input EINA_UNUSED,
|
||||
|
@ -584,11 +585,8 @@ text_input_modifiers_map(void *data,
|
|||
static void
|
||||
text_input_keysym(void *data,
|
||||
struct zwp_text_input_v1 *text_input EINA_UNUSED,
|
||||
uint32_t serial EINA_UNUSED,
|
||||
uint32_t time,
|
||||
uint32_t sym,
|
||||
uint32_t state,
|
||||
uint32_t modifiers)
|
||||
uint32_t serial EINA_UNUSED, uint32_t time, uint32_t sym,
|
||||
uint32_t state, uint32_t modifiers)
|
||||
{
|
||||
WaylandIMContext *imcontext = (WaylandIMContext *)data;
|
||||
char string[32], key[32], keyname[32];
|
||||
|
@ -675,8 +673,7 @@ text_input_input_panel_state(void *data EINA_UNUSED,
|
|||
static void
|
||||
text_input_language(void *data,
|
||||
struct zwp_text_input_v1 *text_input EINA_UNUSED,
|
||||
uint32_t serial EINA_UNUSED,
|
||||
const char *language)
|
||||
uint32_t serial EINA_UNUSED, const char *language)
|
||||
{
|
||||
WaylandIMContext *imcontext = (WaylandIMContext *)data;
|
||||
Eina_Bool changed = EINA_FALSE;
|
||||
|
@ -816,8 +813,7 @@ wayland_im_context_focus_out(Ecore_IMF_Context *ctx)
|
|||
|
||||
void
|
||||
wayland_im_context_preedit_string_get(Ecore_IMF_Context *ctx,
|
||||
char **str,
|
||||
int *cursor_pos)
|
||||
char **str, int *cursor_pos)
|
||||
{
|
||||
WaylandIMContext *imcontext = (WaylandIMContext *)ecore_imf_context_data_get(ctx);
|
||||
|
||||
|
@ -865,8 +861,7 @@ wayland_im_context_preedit_string_with_attributes_get(Ecore_IMF_Context *ctx,
|
|||
}
|
||||
|
||||
void
|
||||
wayland_im_context_cursor_position_set(Ecore_IMF_Context *ctx,
|
||||
int cursor_pos)
|
||||
wayland_im_context_cursor_position_set(Ecore_IMF_Context *ctx, int cursor_pos)
|
||||
{
|
||||
WaylandIMContext *imcontext = (WaylandIMContext *)ecore_imf_context_data_get(ctx);
|
||||
|
||||
|
@ -884,8 +879,7 @@ wayland_im_context_use_preedit_set(Ecore_IMF_Context *ctx EINA_UNUSED,
|
|||
}
|
||||
|
||||
void
|
||||
wayland_im_context_client_window_set(Ecore_IMF_Context *ctx,
|
||||
void *window)
|
||||
wayland_im_context_client_window_set(Ecore_IMF_Context *ctx, void *window)
|
||||
{
|
||||
WaylandIMContext *imcontext = (WaylandIMContext *)ecore_imf_context_data_get(ctx);
|
||||
|
||||
|
@ -899,8 +893,7 @@ wayland_im_context_client_window_set(Ecore_IMF_Context *ctx,
|
|||
}
|
||||
|
||||
void
|
||||
wayland_im_context_client_canvas_set(Ecore_IMF_Context *ctx,
|
||||
void *canvas)
|
||||
wayland_im_context_client_canvas_set(Ecore_IMF_Context *ctx, void *canvas)
|
||||
{
|
||||
WaylandIMContext *imcontext = (WaylandIMContext *)ecore_imf_context_data_get(ctx);
|
||||
|
||||
|
@ -962,7 +955,8 @@ wayland_im_context_cursor_location_set(Ecore_IMF_Context *ctx, int x, int y, int
|
|||
}
|
||||
}
|
||||
|
||||
void wayland_im_context_autocapital_type_set(Ecore_IMF_Context *ctx,
|
||||
void
|
||||
wayland_im_context_autocapital_type_set(Ecore_IMF_Context *ctx,
|
||||
Ecore_IMF_Autocapital_Type autocapital_type)
|
||||
{
|
||||
WaylandIMContext *imcontext = (WaylandIMContext *)ecore_imf_context_data_get(ctx);
|
||||
|
@ -1089,7 +1083,8 @@ wayland_im_context_prediction_allow_set(Ecore_IMF_Context *ctx,
|
|||
imcontext->content_hint &= ~ZWP_TEXT_INPUT_V1_CONTENT_HINT_AUTO_COMPLETION;
|
||||
}
|
||||
|
||||
WaylandIMContext *wayland_im_context_new (struct zwp_text_input_manager_v1 *text_input_manager)
|
||||
WaylandIMContext *
|
||||
wayland_im_context_new(struct zwp_text_input_manager_v1 *text_input_manager)
|
||||
{
|
||||
WaylandIMContext *context = calloc(1, sizeof(WaylandIMContext));
|
||||
|
||||
|
|
Loading…
Reference in New Issue