Blob Blame History Raw
/* emojier.c generated by valac 0.40.8, the Vala compiler
 * generated from emojier.vala, do not modify */

/* vim:set et sts=4 sw=4:
 *
 * ibus - The Input Bus
 *
 * Copyright (c) 2017-2018 Takao Fujiwara <takao.fujiwara1@gmail.com>
 *
 * 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 Street, Fifth Floor, Boston, MA  02110-1301
 * USA
 */


#include <glib.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include <stdlib.h>
#include <string.h>
#include <ibus.h>
#include <float.h>
#include <math.h>
#include <gdk/gdk.h>
#include <glib/gi18n-lib.h>
#include <gio/gio.h>
#include <atk/atk.h>
#include <config.h>
#include <locale.h>
#include <cairo.h>
#include <pango/pango.h>


#define TYPE_IBUS_EMOJIER (ibus_emojier_get_type ())
#define IBUS_EMOJIER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_IBUS_EMOJIER, IBusEmojier))
#define IBUS_EMOJIER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_IBUS_EMOJIER, IBusEmojierClass))
#define IS_IBUS_EMOJIER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_IBUS_EMOJIER))
#define IS_IBUS_EMOJIER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_IBUS_EMOJIER))
#define IBUS_EMOJIER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_IBUS_EMOJIER, IBusEmojierClass))

typedef struct _IBusEmojier IBusEmojier;
typedef struct _IBusEmojierClass IBusEmojierClass;
typedef struct _IBusEmojierPrivate IBusEmojierPrivate;

#define TYPE_THEMED_RGBA (themed_rgba_get_type ())
#define THEMED_RGBA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_THEMED_RGBA, ThemedRGBA))
#define THEMED_RGBA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_THEMED_RGBA, ThemedRGBAClass))
#define IS_THEMED_RGBA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_THEMED_RGBA))
#define IS_THEMED_RGBA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_THEMED_RGBA))
#define THEMED_RGBA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_THEMED_RGBA, ThemedRGBAClass))

typedef struct _ThemedRGBA ThemedRGBA;
typedef struct _ThemedRGBAClass ThemedRGBAClass;

#define IBUS_EMOJIER_TYPE_EENTRY (ibus_emojier_eentry_get_type ())
#define IBUS_EMOJIER_EENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), IBUS_EMOJIER_TYPE_EENTRY, IBusEmojierEEntry))
#define IBUS_EMOJIER_EENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), IBUS_EMOJIER_TYPE_EENTRY, IBusEmojierEEntryClass))
#define IBUS_EMOJIER_IS_EENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), IBUS_EMOJIER_TYPE_EENTRY))
#define IBUS_EMOJIER_IS_EENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), IBUS_EMOJIER_TYPE_EENTRY))
#define IBUS_EMOJIER_EENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), IBUS_EMOJIER_TYPE_EENTRY, IBusEmojierEEntryClass))

typedef struct _IBusEmojierEEntry IBusEmojierEEntry;
typedef struct _IBusEmojierEEntryClass IBusEmojierEEntryClass;

#define IBUS_EMOJIER_TYPE_ESCROLLED_WINDOW (ibus_emojier_escrolled_window_get_type ())
#define IBUS_EMOJIER_ESCROLLED_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), IBUS_EMOJIER_TYPE_ESCROLLED_WINDOW, IBusEmojierEScrolledWindow))
#define IBUS_EMOJIER_ESCROLLED_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), IBUS_EMOJIER_TYPE_ESCROLLED_WINDOW, IBusEmojierEScrolledWindowClass))
#define IBUS_EMOJIER_IS_ESCROLLED_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), IBUS_EMOJIER_TYPE_ESCROLLED_WINDOW))
#define IBUS_EMOJIER_IS_ESCROLLED_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), IBUS_EMOJIER_TYPE_ESCROLLED_WINDOW))
#define IBUS_EMOJIER_ESCROLLED_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), IBUS_EMOJIER_TYPE_ESCROLLED_WINDOW, IBusEmojierEScrolledWindowClass))

typedef struct _IBusEmojierEScrolledWindow IBusEmojierEScrolledWindow;
typedef struct _IBusEmojierEScrolledWindowClass IBusEmojierEScrolledWindowClass;

#define IBUS_EMOJIER_TYPE_ELIST_BOX (ibus_emojier_elist_box_get_type ())
#define IBUS_EMOJIER_ELIST_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), IBUS_EMOJIER_TYPE_ELIST_BOX, IBusEmojierEListBox))
#define IBUS_EMOJIER_ELIST_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), IBUS_EMOJIER_TYPE_ELIST_BOX, IBusEmojierEListBoxClass))
#define IBUS_EMOJIER_IS_ELIST_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), IBUS_EMOJIER_TYPE_ELIST_BOX))
#define IBUS_EMOJIER_IS_ELIST_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), IBUS_EMOJIER_TYPE_ELIST_BOX))
#define IBUS_EMOJIER_ELIST_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), IBUS_EMOJIER_TYPE_ELIST_BOX, IBusEmojierEListBoxClass))

typedef struct _IBusEmojierEListBox IBusEmojierEListBox;
typedef struct _IBusEmojierEListBoxClass IBusEmojierEListBoxClass;
enum  {
	IBUS_EMOJIER_0_PROPERTY,
	IBUS_EMOJIER_NUM_PROPERTIES
};
static GParamSpec* ibus_emojier_properties[IBUS_EMOJIER_NUM_PROPERTIES];

#define IBUS_EMOJIER_TYPE_TRAVEL_DIRECTION (ibus_emojier_travel_direction_get_type ())

#define IBUS_EMOJIER_TYPE_LOAD_PROGRESS_OBJECT (ibus_emojier_load_progress_object_get_type ())
#define IBUS_EMOJIER_LOAD_PROGRESS_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), IBUS_EMOJIER_TYPE_LOAD_PROGRESS_OBJECT, IBusEmojierLoadProgressObject))
#define IBUS_EMOJIER_LOAD_PROGRESS_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), IBUS_EMOJIER_TYPE_LOAD_PROGRESS_OBJECT, IBusEmojierLoadProgressObjectClass))
#define IBUS_EMOJIER_IS_LOAD_PROGRESS_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), IBUS_EMOJIER_TYPE_LOAD_PROGRESS_OBJECT))
#define IBUS_EMOJIER_IS_LOAD_PROGRESS_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), IBUS_EMOJIER_TYPE_LOAD_PROGRESS_OBJECT))
#define IBUS_EMOJIER_LOAD_PROGRESS_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), IBUS_EMOJIER_TYPE_LOAD_PROGRESS_OBJECT, IBusEmojierLoadProgressObjectClass))

typedef struct _IBusEmojierLoadProgressObject IBusEmojierLoadProgressObject;
typedef struct _IBusEmojierLoadProgressObjectClass IBusEmojierLoadProgressObjectClass;
#define _themed_rgba_unref0(var) ((var == NULL) ? NULL : (var = (themed_rgba_unref (var), NULL)))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_main_loop_unref0(var) ((var == NULL) ? NULL : (var = (g_main_loop_unref (var), NULL)))
#define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
#define _g_string_free0(var) ((var == NULL) ? NULL : (var = (g_string_free (var, TRUE), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))

#define IBUS_EMOJIER_TYPE_EBOX_ROW (ibus_emojier_ebox_row_get_type ())
#define IBUS_EMOJIER_EBOX_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), IBUS_EMOJIER_TYPE_EBOX_ROW, IBusEmojierEBoxRow))
#define IBUS_EMOJIER_EBOX_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), IBUS_EMOJIER_TYPE_EBOX_ROW, IBusEmojierEBoxRowClass))
#define IBUS_EMOJIER_IS_EBOX_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), IBUS_EMOJIER_TYPE_EBOX_ROW))
#define IBUS_EMOJIER_IS_EBOX_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), IBUS_EMOJIER_TYPE_EBOX_ROW))
#define IBUS_EMOJIER_EBOX_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), IBUS_EMOJIER_TYPE_EBOX_ROW, IBusEmojierEBoxRowClass))

typedef struct _IBusEmojierEBoxRow IBusEmojierEBoxRow;
typedef struct _IBusEmojierEBoxRowClass IBusEmojierEBoxRowClass;

#define IBUS_EMOJIER_TYPE_EPADDED_LABEL_BOX (ibus_emojier_epadded_label_box_get_type ())
#define IBUS_EMOJIER_EPADDED_LABEL_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), IBUS_EMOJIER_TYPE_EPADDED_LABEL_BOX, IBusEmojierEPaddedLabelBox))
#define IBUS_EMOJIER_EPADDED_LABEL_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), IBUS_EMOJIER_TYPE_EPADDED_LABEL_BOX, IBusEmojierEPaddedLabelBoxClass))
#define IBUS_EMOJIER_IS_EPADDED_LABEL_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), IBUS_EMOJIER_TYPE_EPADDED_LABEL_BOX))
#define IBUS_EMOJIER_IS_EPADDED_LABEL_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), IBUS_EMOJIER_TYPE_EPADDED_LABEL_BOX))
#define IBUS_EMOJIER_EPADDED_LABEL_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), IBUS_EMOJIER_TYPE_EPADDED_LABEL_BOX, IBusEmojierEPaddedLabelBoxClass))

typedef struct _IBusEmojierEPaddedLabelBox IBusEmojierEPaddedLabelBox;
typedef struct _IBusEmojierEPaddedLabelBoxClass IBusEmojierEPaddedLabelBoxClass;
typedef struct _Block1Data Block1Data;
#define _pango_attr_list_unref0(var) ((var == NULL) ? NULL : (var = (pango_attr_list_unref (var), NULL)))

#define IBUS_EMOJIER_TYPE_EGRID (ibus_emojier_egrid_get_type ())
#define IBUS_EMOJIER_EGRID(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), IBUS_EMOJIER_TYPE_EGRID, IBusEmojierEGrid))
#define IBUS_EMOJIER_EGRID_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), IBUS_EMOJIER_TYPE_EGRID, IBusEmojierEGridClass))
#define IBUS_EMOJIER_IS_EGRID(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), IBUS_EMOJIER_TYPE_EGRID))
#define IBUS_EMOJIER_IS_EGRID_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), IBUS_EMOJIER_TYPE_EGRID))
#define IBUS_EMOJIER_EGRID_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), IBUS_EMOJIER_TYPE_EGRID, IBusEmojierEGridClass))

typedef struct _IBusEmojierEGrid IBusEmojierEGrid;
typedef struct _IBusEmojierEGridClass IBusEmojierEGridClass;
typedef struct _Block2Data Block2Data;

#define IBUS_EMOJIER_TYPE_EWHITE_LABEL (ibus_emojier_ewhite_label_get_type ())
#define IBUS_EMOJIER_EWHITE_LABEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), IBUS_EMOJIER_TYPE_EWHITE_LABEL, IBusEmojierEWhiteLabel))
#define IBUS_EMOJIER_EWHITE_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), IBUS_EMOJIER_TYPE_EWHITE_LABEL, IBusEmojierEWhiteLabelClass))
#define IBUS_EMOJIER_IS_EWHITE_LABEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), IBUS_EMOJIER_TYPE_EWHITE_LABEL))
#define IBUS_EMOJIER_IS_EWHITE_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), IBUS_EMOJIER_TYPE_EWHITE_LABEL))
#define IBUS_EMOJIER_EWHITE_LABEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), IBUS_EMOJIER_TYPE_EWHITE_LABEL, IBusEmojierEWhiteLabelClass))

typedef struct _IBusEmojierEWhiteLabel IBusEmojierEWhiteLabel;
typedef struct _IBusEmojierEWhiteLabelClass IBusEmojierEWhiteLabelClass;

#define IBUS_EMOJIER_TYPE_ESELECTED_LABEL (ibus_emojier_eselected_label_get_type ())
#define IBUS_EMOJIER_ESELECTED_LABEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), IBUS_EMOJIER_TYPE_ESELECTED_LABEL, IBusEmojierESelectedLabel))
#define IBUS_EMOJIER_ESELECTED_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), IBUS_EMOJIER_TYPE_ESELECTED_LABEL, IBusEmojierESelectedLabelClass))
#define IBUS_EMOJIER_IS_ESELECTED_LABEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), IBUS_EMOJIER_TYPE_ESELECTED_LABEL))
#define IBUS_EMOJIER_IS_ESELECTED_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), IBUS_EMOJIER_TYPE_ESELECTED_LABEL))
#define IBUS_EMOJIER_ESELECTED_LABEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), IBUS_EMOJIER_TYPE_ESELECTED_LABEL, IBusEmojierESelectedLabelClass))

typedef struct _IBusEmojierESelectedLabel IBusEmojierESelectedLabel;
typedef struct _IBusEmojierESelectedLabelClass IBusEmojierESelectedLabelClass;

#define IBUS_EMOJIER_TYPE_EGOLD_LABEL (ibus_emojier_egold_label_get_type ())
#define IBUS_EMOJIER_EGOLD_LABEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), IBUS_EMOJIER_TYPE_EGOLD_LABEL, IBusEmojierEGoldLabel))
#define IBUS_EMOJIER_EGOLD_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), IBUS_EMOJIER_TYPE_EGOLD_LABEL, IBusEmojierEGoldLabelClass))
#define IBUS_EMOJIER_IS_EGOLD_LABEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), IBUS_EMOJIER_TYPE_EGOLD_LABEL))
#define IBUS_EMOJIER_IS_EGOLD_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), IBUS_EMOJIER_TYPE_EGOLD_LABEL))
#define IBUS_EMOJIER_EGOLD_LABEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), IBUS_EMOJIER_TYPE_EGOLD_LABEL, IBusEmojierEGoldLabelClass))

typedef struct _IBusEmojierEGoldLabel IBusEmojierEGoldLabel;
typedef struct _IBusEmojierEGoldLabelClass IBusEmojierEGoldLabelClass;
#define __vala_GdkEventMotion_free0(var) ((var == NULL) ? NULL : (var = (_vala_GdkEventMotion_free (var), NULL)))
#define __vala_PangoFontDescription_free0(var) ((var == NULL) ? NULL : (var = (_vala_PangoFontDescription_free (var), NULL)))
typedef struct _IBusEmojierEEntryPrivate IBusEmojierEEntryPrivate;
enum  {
	IBUS_EMOJIER_EENTRY_0_PROPERTY,
	IBUS_EMOJIER_EENTRY_NUM_PROPERTIES
};
static GParamSpec* ibus_emojier_eentry_properties[IBUS_EMOJIER_EENTRY_NUM_PROPERTIES];
typedef struct _IBusEmojierEListBoxPrivate IBusEmojierEListBoxPrivate;
enum  {
	IBUS_EMOJIER_ELIST_BOX_0_PROPERTY,
	IBUS_EMOJIER_ELIST_BOX_NUM_PROPERTIES
};
static GParamSpec* ibus_emojier_elist_box_properties[IBUS_EMOJIER_ELIST_BOX_NUM_PROPERTIES];
typedef struct _IBusEmojierEBoxRowPrivate IBusEmojierEBoxRowPrivate;
enum  {
	IBUS_EMOJIER_EBOX_ROW_0_PROPERTY,
	IBUS_EMOJIER_EBOX_ROW_TEXT_PROPERTY,
	IBUS_EMOJIER_EBOX_ROW_NUM_PROPERTIES
};
static GParamSpec* ibus_emojier_ebox_row_properties[IBUS_EMOJIER_EBOX_ROW_NUM_PROPERTIES];
typedef struct _IBusEmojierEScrolledWindowPrivate IBusEmojierEScrolledWindowPrivate;
enum  {
	IBUS_EMOJIER_ESCROLLED_WINDOW_0_PROPERTY,
	IBUS_EMOJIER_ESCROLLED_WINDOW_NUM_PROPERTIES
};
static GParamSpec* ibus_emojier_escrolled_window_properties[IBUS_EMOJIER_ESCROLLED_WINDOW_NUM_PROPERTIES];
typedef struct _IBusEmojierEGridPrivate IBusEmojierEGridPrivate;
enum  {
	IBUS_EMOJIER_EGRID_0_PROPERTY,
	IBUS_EMOJIER_EGRID_NUM_PROPERTIES
};
static GParamSpec* ibus_emojier_egrid_properties[IBUS_EMOJIER_EGRID_NUM_PROPERTIES];
typedef struct _IBusEmojierEWhiteLabelPrivate IBusEmojierEWhiteLabelPrivate;
enum  {
	IBUS_EMOJIER_EWHITE_LABEL_0_PROPERTY,
	IBUS_EMOJIER_EWHITE_LABEL_NUM_PROPERTIES
};
static GParamSpec* ibus_emojier_ewhite_label_properties[IBUS_EMOJIER_EWHITE_LABEL_NUM_PROPERTIES];
typedef struct _IBusEmojierESelectedLabelPrivate IBusEmojierESelectedLabelPrivate;
enum  {
	IBUS_EMOJIER_ESELECTED_LABEL_0_PROPERTY,
	IBUS_EMOJIER_ESELECTED_LABEL_NUM_PROPERTIES
};
static GParamSpec* ibus_emojier_eselected_label_properties[IBUS_EMOJIER_ESELECTED_LABEL_NUM_PROPERTIES];
typedef struct _IBusEmojierEGoldLabelPrivate IBusEmojierEGoldLabelPrivate;
enum  {
	IBUS_EMOJIER_EGOLD_LABEL_0_PROPERTY,
	IBUS_EMOJIER_EGOLD_LABEL_NUM_PROPERTIES
};
static GParamSpec* ibus_emojier_egold_label_properties[IBUS_EMOJIER_EGOLD_LABEL_NUM_PROPERTIES];

#define IBUS_EMOJIER_TYPE_EPADDED_LABEL (ibus_emojier_epadded_label_get_type ())
#define IBUS_EMOJIER_EPADDED_LABEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), IBUS_EMOJIER_TYPE_EPADDED_LABEL, IBusEmojierEPaddedLabel))
#define IBUS_EMOJIER_EPADDED_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), IBUS_EMOJIER_TYPE_EPADDED_LABEL, IBusEmojierEPaddedLabelClass))
#define IBUS_EMOJIER_IS_EPADDED_LABEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), IBUS_EMOJIER_TYPE_EPADDED_LABEL))
#define IBUS_EMOJIER_IS_EPADDED_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), IBUS_EMOJIER_TYPE_EPADDED_LABEL))
#define IBUS_EMOJIER_EPADDED_LABEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), IBUS_EMOJIER_TYPE_EPADDED_LABEL, IBusEmojierEPaddedLabelClass))

typedef struct _IBusEmojierEPaddedLabel IBusEmojierEPaddedLabel;
typedef struct _IBusEmojierEPaddedLabelClass IBusEmojierEPaddedLabelClass;
typedef struct _IBusEmojierEPaddedLabelPrivate IBusEmojierEPaddedLabelPrivate;
enum  {
	IBUS_EMOJIER_EPADDED_LABEL_0_PROPERTY,
	IBUS_EMOJIER_EPADDED_LABEL_NUM_PROPERTIES
};
static GParamSpec* ibus_emojier_epadded_label_properties[IBUS_EMOJIER_EPADDED_LABEL_NUM_PROPERTIES];
typedef struct _IBusEmojierEPaddedLabelBoxPrivate IBusEmojierEPaddedLabelBoxPrivate;
enum  {
	IBUS_EMOJIER_EPADDED_LABEL_BOX_0_PROPERTY,
	IBUS_EMOJIER_EPADDED_LABEL_BOX_NUM_PROPERTIES
};
static GParamSpec* ibus_emojier_epadded_label_box_properties[IBUS_EMOJIER_EPADDED_LABEL_BOX_NUM_PROPERTIES];

#define TYPE_ICON_WIDGET (icon_widget_get_type ())
#define ICON_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ICON_WIDGET, IconWidget))
#define ICON_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ICON_WIDGET, IconWidgetClass))
#define IS_ICON_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ICON_WIDGET))
#define IS_ICON_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ICON_WIDGET))
#define ICON_WIDGET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ICON_WIDGET, IconWidgetClass))

typedef struct _IconWidget IconWidget;
typedef struct _IconWidgetClass IconWidgetClass;
typedef struct _IBusEmojierLoadProgressObjectPrivate IBusEmojierLoadProgressObjectPrivate;
enum  {
	IBUS_EMOJIER_LOAD_PROGRESS_OBJECT_0_PROPERTY,
	IBUS_EMOJIER_LOAD_PROGRESS_OBJECT_NUM_PROPERTIES
};
static GParamSpec* ibus_emojier_load_progress_object_properties[IBUS_EMOJIER_LOAD_PROGRESS_OBJECT_NUM_PROPERTIES];
enum  {
	IBUS_EMOJIER_LOAD_PROGRESS_OBJECT_DESERIALIZE_UNICODE_SIGNAL,
	IBUS_EMOJIER_LOAD_PROGRESS_OBJECT_NUM_SIGNALS
};
static guint ibus_emojier_load_progress_object_signals[IBUS_EMOJIER_LOAD_PROGRESS_OBJECT_NUM_SIGNALS] = {0};
enum  {
	IBUS_EMOJIER_CANDIDATE_CLICKED_SIGNAL,
	IBUS_EMOJIER_NUM_SIGNALS
};
static guint ibus_emojier_signals[IBUS_EMOJIER_NUM_SIGNALS] = {0};
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; }
#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; }
#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

struct _IBusEmojier {
	GtkApplicationWindow parent_instance;
	IBusEmojierPrivate * priv;
};

struct _IBusEmojierClass {
	GtkApplicationWindowClass parent_class;
};

struct _IBusEmojierPrivate {
	ThemedRGBA* m_rgba;
	GtkBox* m_vbox;
	IBusEmojierEEntry* m_entry;
	gchar* m_annotation;
	gchar* m_backward;
	gint m_backward_index;
	IBusEmojierEScrolledWindow* m_scrolled_window;
	IBusEmojierEListBox* m_list_box;
	gboolean m_is_running;
	gchar* m_input_context_path;
	GMainLoop* m_loop;
	gchar* m_result;
	gboolean m_candidate_panel_is_visible;
	gboolean m_candidate_panel_mode;
	gint m_category_active_index;
	IBusLookupTable* m_lookup_table;
	GtkLabel** m_candidates;
	gint m_candidates_length1;
	gint _m_candidates_size_;
	gboolean m_enter_notify_enable;
	guint m_entry_notify_show_id;
	guint m_entry_notify_disable_id;
	GtkProgressBar* m_unicode_progress_bar;
	guint m_unicode_progress_id;
	GtkLabel* m_unicode_percent_label;
	gdouble m_unicode_percent;
	GdkRectangle m_cursor_location;
	gboolean m_is_up_side_down;
	guint m_redraw_window_id;
};

typedef enum  {
	IBUS_EMOJIER_TRAVEL_DIRECTION_NONE,
	IBUS_EMOJIER_TRAVEL_DIRECTION_BACKWARD
} IBusEmojierTravelDirection;

struct _Block1Data {
	int _ref_count_;
	IBusEmojier* self;
	GtkButton* warning_button;
};

struct _Block2Data {
	int _ref_count_;
	IBusEmojier* self;
	guint index;
};

struct _IBusEmojierEEntry {
	GtkSearchEntry parent_instance;
	IBusEmojierEEntryPrivate * priv;
};

struct _IBusEmojierEEntryClass {
	GtkSearchEntryClass parent_class;
};

struct _IBusEmojierEListBox {
	GtkListBox parent_instance;
	IBusEmojierEListBoxPrivate * priv;
};

struct _IBusEmojierEListBoxClass {
	GtkListBoxClass parent_class;
};

struct _IBusEmojierEBoxRow {
	GtkListBoxRow parent_instance;
	IBusEmojierEBoxRowPrivate * priv;
};

struct _IBusEmojierEBoxRowClass {
	GtkListBoxRowClass parent_class;
};

struct _IBusEmojierEBoxRowPrivate {
	gchar* _text;
};

struct _IBusEmojierEScrolledWindow {
	GtkScrolledWindow parent_instance;
	IBusEmojierEScrolledWindowPrivate * priv;
};

struct _IBusEmojierEScrolledWindowClass {
	GtkScrolledWindowClass parent_class;
};

struct _IBusEmojierEGrid {
	GtkGrid parent_instance;
	IBusEmojierEGridPrivate * priv;
};

struct _IBusEmojierEGridClass {
	GtkGridClass parent_class;
};

struct _IBusEmojierEWhiteLabel {
	GtkLabel parent_instance;
	IBusEmojierEWhiteLabelPrivate * priv;
};

struct _IBusEmojierEWhiteLabelClass {
	GtkLabelClass parent_class;
};

struct _IBusEmojierEWhiteLabelPrivate {
	gint m_minimum_width;
	gint m_natural_width;
	gint m_minimum_height;
	gint m_natural_height;
};

struct _IBusEmojierESelectedLabel {
	IBusEmojierEWhiteLabel parent_instance;
	IBusEmojierESelectedLabelPrivate * priv;
};

struct _IBusEmojierESelectedLabelClass {
	IBusEmojierEWhiteLabelClass parent_class;
};

struct _IBusEmojierEGoldLabel {
	IBusEmojierEWhiteLabel parent_instance;
	IBusEmojierEGoldLabelPrivate * priv;
};

struct _IBusEmojierEGoldLabelClass {
	IBusEmojierEWhiteLabelClass parent_class;
};

struct _IBusEmojierEPaddedLabel {
	GtkLabel parent_instance;
	IBusEmojierEPaddedLabelPrivate * priv;
};

struct _IBusEmojierEPaddedLabelClass {
	GtkLabelClass parent_class;
};

struct _IBusEmojierEPaddedLabelBox {
	GtkBox parent_instance;
	IBusEmojierEPaddedLabelBoxPrivate * priv;
};

struct _IBusEmojierEPaddedLabelBoxClass {
	GtkBoxClass parent_class;
};

struct _IBusEmojierLoadProgressObject {
	GObject parent_instance;
	IBusEmojierLoadProgressObjectPrivate * priv;
};

struct _IBusEmojierLoadProgressObjectClass {
	GObjectClass parent_class;
};


static gpointer ibus_emojier_parent_class = NULL;
static gchar* ibus_emojier_m_current_lang_id;
static gchar* ibus_emojier_m_current_lang_id = NULL;
static gchar* ibus_emojier_m_emoji_font_family;
static gchar* ibus_emojier_m_emoji_font_family = NULL;
static gint ibus_emojier_m_emoji_font_size;
static gint ibus_emojier_m_emoji_font_size = 0;
static gboolean ibus_emojier_m_emoji_font_changed;
static gboolean ibus_emojier_m_emoji_font_changed = FALSE;
static gchar** ibus_emojier_m_favorites;
static gint ibus_emojier_m_favorites_length1;
static gchar** ibus_emojier_m_favorites = NULL;
static gint ibus_emojier_m_favorites_length1 = 0;
static gint _ibus_emojier_m_favorites_size_ = 0;
static gchar** ibus_emojier_m_favorite_annotations;
static gint ibus_emojier_m_favorite_annotations_length1;
static gchar** ibus_emojier_m_favorite_annotations = NULL;
static gint ibus_emojier_m_favorite_annotations_length1 = 0;
static gint _ibus_emojier_m_favorite_annotations_size_ = 0;
static gint ibus_emojier_m_emoji_max_seq_len;
static gint ibus_emojier_m_emoji_max_seq_len = 0;
static gboolean ibus_emojier_m_has_partial_match;
static gboolean ibus_emojier_m_has_partial_match = FALSE;
static guint ibus_emojier_m_partial_match_length;
static guint ibus_emojier_m_partial_match_length = 0U;
static guint ibus_emojier_m_partial_match_condition;
static guint ibus_emojier_m_partial_match_condition = 0U;
static gboolean ibus_emojier_m_show_emoji_variant;
static gboolean ibus_emojier_m_show_emoji_variant = FALSE;
static gint ibus_emojier_m_default_window_width;
static gint ibus_emojier_m_default_window_width = 0;
static gint ibus_emojier_m_default_window_height;
static gint ibus_emojier_m_default_window_height = 0;
static GHashTable* ibus_emojier_m_annotation_to_emojis_dict;
static GHashTable* ibus_emojier_m_annotation_to_emojis_dict = NULL;
static GHashTable* ibus_emojier_m_emoji_to_data_dict;
static GHashTable* ibus_emojier_m_emoji_to_data_dict = NULL;
static GHashTable* ibus_emojier_m_category_to_emojis_dict;
static GHashTable* ibus_emojier_m_category_to_emojis_dict = NULL;
static GHashTable* ibus_emojier_m_emoji_to_emoji_variants_dict;
static GHashTable* ibus_emojier_m_emoji_to_emoji_variants_dict = NULL;
static GHashTable* ibus_emojier_m_unicode_to_data_dict;
static GHashTable* ibus_emojier_m_unicode_to_data_dict = NULL;
static GHashTable* ibus_emojier_m_name_to_unicodes_dict;
static GHashTable* ibus_emojier_m_name_to_unicodes_dict = NULL;
static GSList* ibus_emojier_m_unicode_block_list;
static GSList* ibus_emojier_m_unicode_block_list = NULL;
static gboolean ibus_emojier_m_show_unicode;
static gboolean ibus_emojier_m_show_unicode = FALSE;
static IBusEmojierLoadProgressObject* ibus_emojier_m_unicode_progress_object;
static IBusEmojierLoadProgressObject* ibus_emojier_m_unicode_progress_object = NULL;
static gboolean ibus_emojier_m_loaded_unicode;
static gboolean ibus_emojier_m_loaded_unicode = FALSE;
static gchar* ibus_emojier_m_warning_message;
static gchar* ibus_emojier_m_warning_message = NULL;
extern gdouble ibus_emojier_m_mouse_x;
gdouble ibus_emojier_m_mouse_x = 0.0;
extern gdouble ibus_emojier_m_mouse_y;
gdouble ibus_emojier_m_mouse_y = 0.0;
static gpointer ibus_emojier_eentry_parent_class = NULL;
static gpointer ibus_emojier_elist_box_parent_class = NULL;
static gpointer ibus_emojier_ebox_row_parent_class = NULL;
static gpointer ibus_emojier_escrolled_window_parent_class = NULL;
static gpointer ibus_emojier_egrid_parent_class = NULL;
static gpointer ibus_emojier_ewhite_label_parent_class = NULL;
static gpointer ibus_emojier_eselected_label_parent_class = NULL;
static gpointer ibus_emojier_egold_label_parent_class = NULL;
static gpointer ibus_emojier_epadded_label_parent_class = NULL;
static gpointer ibus_emojier_epadded_label_box_parent_class = NULL;
static gpointer ibus_emojier_load_progress_object_parent_class = NULL;

GType ibus_emojier_get_type (void) G_GNUC_CONST;
gpointer themed_rgba_ref (gpointer instance);
void themed_rgba_unref (gpointer instance);
GParamSpec* param_spec_themed_rgba (const gchar* name,
                                    const gchar* nick,
                                    const gchar* blurb,
                                    GType object_type,
                                    GParamFlags flags);
void value_set_themed_rgba (GValue* value,
                            gpointer v_object);
void value_take_themed_rgba (GValue* value,
                             gpointer v_object);
gpointer value_get_themed_rgba (const GValue* value);
GType themed_rgba_get_type (void) G_GNUC_CONST;
static GType ibus_emojier_eentry_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
static GType ibus_emojier_escrolled_window_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
static GType ibus_emojier_elist_box_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
#define IBUS_EMOJIER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_IBUS_EMOJIER, IBusEmojierPrivate))
static GType ibus_emojier_travel_direction_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
static GType ibus_emojier_load_progress_object_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
#define IBUS_EMOJIER_BUTTON_CLOSE_BUTTON ((guint) 1000)
#define IBUS_EMOJIER_EMOJI_GRID_PAGE ((guint) 10)
#define IBUS_EMOJIER_EMOJI_CATEGORY_FAVORITES N_ ("Favorites")
#define IBUS_EMOJIER_EMOJI_CATEGORY_OTHERS N_ ("Others")
#define IBUS_EMOJIER_EMOJI_CATEGORY_UNICODE N_ ("Open Unicode choice")
IBusEmojier* ibus_emojier_new (void);
IBusEmojier* ibus_emojier_construct (GType object_type);
static void ibus_emojier_check_action_variant_cb (IBusEmojier* self,
                                           GSimpleAction* action,
                                           GVariant* parameter);
static void _ibus_emojier_check_action_variant_cb_g_simple_action_activate (GSimpleAction* _sender,
                                                                     GVariant* parameter,
                                                                     gpointer self);
static void ibus_emojier_action_close_cb (IBusEmojier* self,
                                   GSimpleAction* action,
                                   GVariant* parameter);
static void _ibus_emojier_action_close_cb_g_simple_action_activate (GSimpleAction* _sender,
                                                             GVariant* parameter,
                                                             gpointer self);
static void ibus_emojier_set_css_data (IBusEmojier* self);
static IBusEmojierEEntry* ibus_emojier_eentry_new (void);
static IBusEmojierEEntry* ibus_emojier_eentry_construct (GType object_type);
static void __lambda7_ (IBusEmojier* self);
static void ibus_emojier_update_candidate_window (IBusEmojier* self);
static void ___lambda7__gtk_editable_changed (GtkEditable* _sender,
                                       gpointer self);
static void __lambda8_ (IBusEmojier* self,
                 GtkEntryIconPosition icon_pos,
                 GdkEventButton* event);
static void ibus_emojier_hide_candidate_panel (IBusEmojier* self);
static void ___lambda8__gtk_entry_icon_release (GtkEntry* _sender,
                                         GtkEntryIconPosition icon_pos,
                                         GdkEventButton* event,
                                         gpointer self);
static void __lambda10_ (IBusEmojier* self);
static void ___lambda10__gtk_widget_hide (GtkWidget* _sender,
                                   gpointer self);
static void __lambda11_ (IBusEmojier* self,
                  GtkWidget* w,
                  GtkAllocation* a);
static void ibus_emojier_adjust_window_position (IBusEmojier* self);
static void ___lambda11__gtk_widget_size_allocate (GtkWidget* _sender,
                                            GtkAllocation* allocation,
                                            gpointer self);
static void __lambda26_ (IBusEmojier* self,
                  guint i,
                  guint b,
                  guint s);
static void ibus_emojier_candidate_panel_select_index (IBusEmojier* self,
                                                guint index,
                                                guint button);
static void ___lambda26__ibus_emojier_candidate_clicked (IBusEmojier* _sender,
                                                  guint index,
                                                  guint button,
                                                  guint state,
                                                  gpointer self);
static void ibus_emojier_reload_emoji_dict (void);
static GObject* ibus_emojier_get_load_progress_object (void);
static void ibus_emojier_init_emoji_dict (void);
static void ibus_emojier_make_emoji_dict (const gchar* lang);
void ibus_emojier_update_favorite_emoji_dict (void);
static void _g_free0_ (gpointer var);
static inline void _g_slist_free__g_free0_ (GSList* self);
static void __g_slist_free__g_free0_0_ (gpointer var);
static void _g_object_unref0_ (gpointer var);
static void _g_slist_free0_ (gpointer var);
static inline void _g_slist_free__g_object_unref0_ (GSList* self);
static void ibus_emojier_update_emoji_to_data_dict (IBusEmojiData* data,
                                             const gchar* lang);
static void ibus_emojier_update_annotation_to_emojis_dict (IBusEmojiData* data);
static void ibus_emojier_update_category_to_emojis_dict (IBusEmojiData* data,
                                                  const gchar* lang);
static gpointer _g_strdup_gcopy_func (gconstpointer src,
                               gpointer self);
static gchar* ibus_emojier_utf8_code_point (const gchar* str);
static gchar* ibus_emojier_utf8_entity (const gchar* str);
static void ibus_emojier_update_annotations_with_description (IBusEmojiData* data,
                                                       const gchar* description);
static void ibus_emojier_make_unicode_block_dict (void);
static void ibus_emojier_make_unicode_name_dict (GObject* source_object);
static void ibus_emojier_make_unicode_name_dict_finish (GSList* unicode_list);
static void ibus_emojier_update_unicode_to_data_dict (IBusUnicodeData* data);
static void ibus_emojier_update_name_to_unicodes_dict (IBusUnicodeData* data);
ThemedRGBA* themed_rgba_new (GtkWidget* widget);
ThemedRGBA* themed_rgba_construct (GType object_type,
                                   GtkWidget* widget);
GdkRGBA* themed_rgba_get_normal_bg (ThemedRGBA* self);
GdkRGBA* themed_rgba_get_selected_fg (ThemedRGBA* self);
GdkRGBA* themed_rgba_get_selected_bg (ThemedRGBA* self);
static void ibus_emojier_set_fixed_size (IBusEmojier* self);
static void ibus_emojier_remove_all_children (IBusEmojier* self);
static void ibus_emojier_clamp_page (IBusEmojier* self);
static void ibus_emojier_show_category_list (IBusEmojier* self);
static IBusEmojierEScrolledWindow* ibus_emojier_escrolled_window_new (GtkAdjustment* hadjustment,
                                                               GtkAdjustment* vadjustment);
static IBusEmojierEScrolledWindow* ibus_emojier_escrolled_window_construct (GType object_type,
                                                                     GtkAdjustment* hadjustment,
                                                                     GtkAdjustment* vadjustment);
static IBusEmojierEListBox* ibus_emojier_elist_box_new (void);
static IBusEmojierEListBox* ibus_emojier_elist_box_construct (GType object_type);
static void __lambda25_ (IBusEmojier* self,
                  GtkListBox* box,
                  GtkListBoxRow* gtkrow);
static GType ibus_emojier_ebox_row_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
static void ibus_emojier_show_emoji_for_category (IBusEmojier* self,
                                           const gchar* category);
static const gchar* ibus_emojier_ebox_row_get_text (IBusEmojierEBoxRow* self);
static void ___lambda25__gtk_list_box_row_activated (GtkListBox* _sender,
                                              GtkListBoxRow* row,
                                              gpointer self);
static IBusEmojierEBoxRow* ibus_emojier_ebox_row_new (const gchar* text);
static IBusEmojierEBoxRow* ibus_emojier_ebox_row_construct (GType object_type,
                                                     const gchar* text);
static GType ibus_emojier_epadded_label_box_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
static IBusEmojierEPaddedLabelBox* ibus_emojier_epadded_label_box_new (const gchar* text,
                                                                GtkAlign align,
                                                                IBusEmojierTravelDirection direction,
                                                                const gchar* caption);
static IBusEmojierEPaddedLabelBox* ibus_emojier_epadded_label_box_construct (GType object_type,
                                                                      const gchar* text,
                                                                      GtkAlign align,
                                                                      IBusEmojierTravelDirection direction,
                                                                      const gchar* caption);
static void ibus_emojier_update_unicode_blocks (IBusEmojier* self);
static void ibus_emojier_show_emoji_variants (IBusEmojier* self,
                                       GSList* emojis);
static void ibus_emojier_show_unicode_blocks (IBusEmojier* self);
static gboolean __lambda22_ (IBusEmojier* self,
                      GtkWidget* w,
                      GdkEventButton* e);
static gboolean ___lambda22__gtk_widget_button_press_event (GtkWidget* _sender,
                                                     GdkEventButton* event,
                                                     gpointer self);
static void __lambda23_ (IBusEmojier* self,
                  GtkListBox* box,
                  GtkListBoxRow* gtkrow);
static void ibus_emojier_show_unicode_for_block (IBusEmojier* self,
                                          const gchar* block_name);
static void ibus_emojier_show_candidate_panel (IBusEmojier* self);
static void ___lambda23__gtk_list_box_row_activated (GtkListBox* _sender,
                                              GtkListBoxRow* row,
                                              gpointer self);
static void __lambda24_ (IBusEmojier* self,
                  GtkWidget* w,
                  GtkAllocation* a);
static void ___lambda24__gtk_widget_size_allocate (GtkWidget* _sender,
                                            GtkAllocation* allocation,
                                            gpointer self);
static void ibus_emojier_show_arrow_buttons (IBusEmojier* self);
static Block1Data* block1_data_ref (Block1Data* _data1_);
static void block1_data_unref (void * _userdata_);
static void __lambda17_ (IBusEmojier* self);
static void ___lambda17__gtk_button_clicked (GtkButton* _sender,
                                      gpointer self);
static void __lambda18_ (IBusEmojier* self);
static void ___lambda18__gtk_button_clicked (GtkButton* _sender,
                                      gpointer self);
IBusText* ibus_emojier_get_title_text (IBusEmojier* self);
PangoAttrList* get_pango_attr_list_from_ibus_text (IBusText* text);
static void ___lambda19_ (Block1Data* _data1_);
static void ____lambda19__gtk_button_clicked (GtkButton* _sender,
                                       gpointer self);
static void ibus_emojier_show_unicode_progress_bar (IBusEmojier* self);
static void __lambda20_ (IBusEmojier* self,
                  guint i,
                  guint n);
static void ___lambda20__ibus_emojier_load_progress_object_deserialize_unicode (IBusEmojierLoadProgressObject* _sender,
                                                                         guint done,
                                                                         guint total,
                                                                         gpointer self);
static gboolean __lambda21_ (IBusEmojier* self);
static gboolean ___lambda21__gsource_func (gpointer self);
static gchar* ibus_emojier_check_unicode_point (const gchar* annotation);
static GSList* ibus_emojier_lookup_emojis_from_annotation (const gchar* annotation);
static void ibus_emojier_update_category_list (IBusEmojier* self);
static void ibus_emojier_reset_window_mode (IBusEmojier* self);
static gint __lambda9_ (const gchar* a,
                 const gchar* b);
static gint ___lambda9__gcompare_func (gconstpointer a,
                                gconstpointer b);
static void ibus_emojier_show_code_point_description (IBusEmojier* self,
                                               const gchar* text);
static gboolean ___lambda13_ (IBusEmojier* self,
                       GtkWidget* w,
                       GdkEventButton* e);
static gboolean ____lambda13__gtk_widget_button_press_event (GtkWidget* _sender,
                                                      GdkEventButton* event,
                                                      gpointer self);
static GType ibus_emojier_egrid_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
static IBusEmojierEGrid* ibus_emojier_egrid_new (void);
static IBusEmojierEGrid* ibus_emojier_egrid_construct (GType object_type);
static Block2Data* block2_data_ref (Block2Data* _data2_);
static void block2_data_unref (void * _userdata_);
static IBusEmojierESelectedLabel* ibus_emojier_eselected_label_new (const gchar* text);
static IBusEmojierESelectedLabel* ibus_emojier_eselected_label_construct (GType object_type,
                                                                   const gchar* text);
static GType ibus_emojier_ewhite_label_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
static GType ibus_emojier_eselected_label_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
static IBusEmojierEGoldLabel* ibus_emojier_egold_label_new (const gchar* text);
static IBusEmojierEGoldLabel* ibus_emojier_egold_label_construct (GType object_type,
                                                           const gchar* text);
static GType ibus_emojier_egold_label_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
static IBusEmojierEWhiteLabel* ibus_emojier_ewhite_label_new (const gchar* text);
static IBusEmojierEWhiteLabel* ibus_emojier_ewhite_label_construct (GType object_type,
                                                             const gchar* text);
static gboolean _____lambda14_ (Block2Data* _data2_,
                         GtkWidget* w,
                         GdkEventButton* e);
static gboolean ______lambda14__gtk_widget_button_press_event (GtkWidget* _sender,
                                                        GdkEventButton* event,
                                                        gpointer self);
static gboolean _____lambda15_ (Block2Data* _data2_,
                         GdkEventMotion* e);
static GdkEventMotion* _vala_GdkEventMotion_copy (GdkEventMotion* self);
static void _vala_GdkEventMotion_free (GdkEventMotion* self);
static gboolean __lambda16_ (IBusEmojier* self);
static gboolean ___lambda16__gsource_func (gpointer self);
static gboolean ______lambda15__gtk_widget_motion_notify_event (GtkWidget* _sender,
                                                         GdkEventMotion* event,
                                                         gpointer self);
static void _vala_array_add2 (GtkLabel** * array,
                       int* length,
                       int* size,
                       GtkLabel* value);
static void ibus_emojier_show_description (IBusEmojier* self);
static void ibus_emojier_show_emoji_description (IBusEmojier* self,
                                          IBusEmojiData* data,
                                          const gchar* text);
static void ibus_emojier_show_unicode_description (IBusEmojier* self,
                                            IBusUnicodeData* data,
                                            const gchar* text);
static void ibus_emojier_enter_notify_disable_with_timer (IBusEmojier* self);
static gboolean __lambda27_ (IBusEmojier* self);
static gboolean ___lambda27__gsource_func (gpointer self);
static void ibus_emojier_candidate_panel_cursor_down (IBusEmojier* self);
static void ibus_emojier_candidate_panel_cursor_up (IBusEmojier* self);
static gint ibus_emojier_get_page_num (IBusEmojier* self);
static gboolean ibus_emojier_category_list_cursor_move (IBusEmojier* self,
                                                 guint keyval);
gboolean ibus_emojier_has_variants (IBusEmojier* self,
                                    guint index);
gboolean ibus_emojier_key_press_cursor_horizontal (IBusEmojier* self,
                                                   guint keyval,
                                                   guint modifiers);
gboolean ibus_emojier_key_press_cursor_vertical (IBusEmojier* self,
                                                 guint keyval,
                                                 guint modifiers);
gboolean ibus_emojier_key_press_cursor_home_end (IBusEmojier* self,
                                                 guint keyval,
                                                 guint modifiers);
gboolean ibus_emojier_key_press_escape (IBusEmojier* self);
gboolean ibus_emojier_key_press_enter (IBusEmojier* self);
static void ibus_emojier_entry_enter_keyval (IBusEmojier* self,
                                      guint keyval);
static void ibus_emojier_get_monitor_geometry (IBusEmojier* self,
                                        GdkRectangle* result);
static gboolean ___lambda12_ (IBusEmojier* self);
static gboolean ____lambda12__gsource_func (gpointer self);
void ibus_emojier_set_annotation (IBusEmojier* self,
                                  const gchar* annotation);
IBusLookupTable* ibus_emojier_get_one_dimension_lookup_table (IBusEmojier* self);
guint ibus_emojier_get_number_of_candidates (IBusEmojier* self);
guint ibus_emojier_get_cursor_pos (IBusEmojier* self);
void ibus_emojier_set_cursor_pos (IBusEmojier* self,
                                  guint cursor_pos);
gchar* ibus_emojier_get_current_candidate (IBusEmojier* self);
static void ibus_emojier_real_show_all (GtkWidget* base);
static void ibus_emojier_real_hide (GtkWidget* base);
static gboolean ibus_emojier_real_key_press_event (GtkWidget* base,
                                            GdkEventKey* event);
gboolean ibus_emojier_is_running (IBusEmojier* self);
gchar* ibus_emojier_get_input_context_path (IBusEmojier* self);
void ibus_emojier_set_input_context_path (IBusEmojier* self,
                                          const gchar* input_context_path);
gchar* ibus_emojier_get_selected_string (IBusEmojier* self);
void ibus_emojier_reset (IBusEmojier* self);
void ibus_emojier_present_centralize (IBusEmojier* self,
                                      GdkEvent* event);
void ibus_emojier_set_cursor_location (IBusEmojier* self,
                                       gint x,
                                       gint y,
                                       gint width,
                                       gint height);
static gboolean _cairo_rectangle_int_equal (const cairo_rectangle_int_t * s1,
                                     const cairo_rectangle_int_t * s2);
gboolean ibus_emojier_is_candidate_panel_mode (IBusEmojier* self);
gboolean ibus_emojier_has_loaded_emoji_dict (void);
void ibus_emojier_set_annotation_lang (const gchar* lang);
gchar* ibus_emojier_get_annotation_lang (void);
void ibus_emojier_set_emoji_font (const gchar* emoji_font);
static void _vala_PangoFontDescription_free (PangoFontDescription* self);
void ibus_emojier_set_partial_match (gboolean has_partial_match);
void ibus_emojier_set_partial_match_length (gint length);
void ibus_emojier_set_partial_match_condition (gint condition);
void ibus_emojier_set_favorites (gchar** unowned_favorites,
                                 int unowned_favorites_length1,
                                 gchar** unowned_favorite_annotations,
                                 int unowned_favorite_annotations_length1);
static void _vala_array_add3 (gchar** * array,
                       int* length,
                       int* size,
                       gchar* value);
static void _vala_array_add4 (gchar** * array,
                       int* length,
                       int* size,
                       gchar* value);
static IBusEmojierLoadProgressObject* ibus_emojier_load_progress_object_new (void);
static IBusEmojierLoadProgressObject* ibus_emojier_load_progress_object_construct (GType object_type);
void ibus_emojier_load_unicode_dict (void);
static void g_cclosure_user_marshal_VOID__UINT_UINT_UINT (GClosure * closure,
                                                   GValue * return_value,
                                                   guint n_param_values,
                                                   const GValue * param_values,
                                                   gpointer invocation_hint,
                                                   gpointer marshal_data);
static gboolean __lambda5_ (IBusEmojierEListBox* self,
                     GdkEventMotion* e);
static gboolean ___lambda5__gtk_widget_motion_notify_event (GtkWidget* _sender,
                                                     GdkEventMotion* event,
                                                     gpointer self);
static gboolean __lambda6_ (IBusEmojierEListBox* self,
                     GdkEventCrossing* e);
static gboolean ___lambda6__gtk_widget_enter_notify_event (GtkWidget* _sender,
                                                    GdkEventCrossing* event,
                                                    gpointer self);
#define IBUS_EMOJIER_EBOX_ROW_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), IBUS_EMOJIER_TYPE_EBOX_ROW, IBusEmojierEBoxRowPrivate))
static void ibus_emojier_ebox_row_set_text (IBusEmojierEBoxRow* self,
                                     const gchar* value);
static void ibus_emojier_ebox_row_finalize (GObject * obj);
static void _vala_ibus_emojier_ebox_row_get_property (GObject * object,
                                               guint property_id,
                                               GValue * value,
                                               GParamSpec * pspec);
static void _vala_ibus_emojier_ebox_row_set_property (GObject * object,
                                               guint property_id,
                                               const GValue * value,
                                               GParamSpec * pspec);
#define IBUS_EMOJIER_EWHITE_LABEL_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), IBUS_EMOJIER_TYPE_EWHITE_LABEL, IBusEmojierEWhiteLabelPrivate))
static void ibus_emojier_ewhite_label_real_get_preferred_width (GtkWidget* base,
                                                         gint* minimum_width,
                                                         gint* natural_width);
static void ibus_emojier_ewhite_label_real_get_preferred_height (GtkWidget* base,
                                                          gint* minimum_height,
                                                          gint* natural_height);
static void ibus_emojier_ewhite_label_finalize (GObject * obj);
static GType ibus_emojier_epadded_label_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
static IBusEmojierEPaddedLabel* ibus_emojier_epadded_label_new (const gchar* text,
                                                         GtkAlign align);
static IBusEmojierEPaddedLabel* ibus_emojier_epadded_label_construct (GType object_type,
                                                               const gchar* text,
                                                               GtkAlign align);
GType icon_widget_get_type (void) G_GNUC_CONST;
IconWidget* icon_widget_new (const gchar* icon_name_or_path,
                             GtkIconSize size);
IconWidget* icon_widget_construct (GType object_type,
                                   const gchar* icon_name_or_path,
                                   GtkIconSize size);
static void g_cclosure_user_marshal_VOID__UINT_UINT (GClosure * closure,
                                              GValue * return_value,
                                              guint n_param_values,
                                              const GValue * param_values,
                                              gpointer invocation_hint,
                                              gpointer marshal_data);
static void ibus_emojier_finalize (GObject * obj);
static void _vala_array_destroy (gpointer array,
                          gint array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gint array_length,
                       GDestroyNotify destroy_func);
static gint _vala_array_length (gpointer array);

static const gunichar IBUS_EMOJIER_EMOJI_VARIANT_LIST[6] = {(gunichar) 0x1f3fb, (gunichar) 0x1f3fc, (gunichar) 0x1f3fd, (gunichar) 0x1f3fe, (gunichar) 0x1f3ff, (gunichar) 0x200d};

static GType
ibus_emojier_travel_direction_get_type (void)
{
	static volatile gsize ibus_emojier_travel_direction_type_id__volatile = 0;
	if (g_once_init_enter (&ibus_emojier_travel_direction_type_id__volatile)) {
		static const GEnumValue values[] = {{IBUS_EMOJIER_TRAVEL_DIRECTION_NONE, "IBUS_EMOJIER_TRAVEL_DIRECTION_NONE", "none"}, {IBUS_EMOJIER_TRAVEL_DIRECTION_BACKWARD, "IBUS_EMOJIER_TRAVEL_DIRECTION_BACKWARD", "backward"}, {0, NULL, NULL}};
		GType ibus_emojier_travel_direction_type_id;
		ibus_emojier_travel_direction_type_id = g_enum_register_static ("IBusEmojierTravelDirection", values);
		g_once_init_leave (&ibus_emojier_travel_direction_type_id__volatile, ibus_emojier_travel_direction_type_id);
	}
	return ibus_emojier_travel_direction_type_id__volatile;
}


static void
_ibus_emojier_check_action_variant_cb_g_simple_action_activate (GSimpleAction* _sender,
                                                                GVariant* parameter,
                                                                gpointer self)
{
	ibus_emojier_check_action_variant_cb ((IBusEmojier*) self, _sender, parameter);
}


static void
_ibus_emojier_action_close_cb_g_simple_action_activate (GSimpleAction* _sender,
                                                        GVariant* parameter,
                                                        gpointer self)
{
	ibus_emojier_action_close_cb ((IBusEmojier*) self, _sender, parameter);
}


static void
__lambda7_ (IBusEmojier* self)
{
	ibus_emojier_update_candidate_window (self);
}


static void
___lambda7__gtk_editable_changed (GtkEditable* _sender,
                                  gpointer self)
{
	__lambda7_ ((IBusEmojier*) self);
}


static void
__lambda8_ (IBusEmojier* self,
            GtkEntryIconPosition icon_pos,
            GdkEventButton* event)
{
	g_return_if_fail (event != NULL);
	ibus_emojier_hide_candidate_panel (self);
}


static void
___lambda8__gtk_entry_icon_release (GtkEntry* _sender,
                                    GtkEntryIconPosition icon_pos,
                                    GdkEventButton* event,
                                    gpointer self)
{
	__lambda8_ ((IBusEmojier*) self, icon_pos, event);
}


static gpointer
_g_object_ref0 (gpointer self)
{
	return self ? g_object_ref (self) : NULL;
}


static void
__lambda10_ (IBusEmojier* self)
{
	gboolean _tmp0_ = FALSE;
	GMainLoop* _tmp1_;
	_tmp1_ = self->priv->m_loop;
	if (_tmp1_ != NULL) {
		GMainLoop* _tmp2_;
		_tmp2_ = self->priv->m_loop;
		_tmp0_ = g_main_loop_is_running (_tmp2_);
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		GMainLoop* _tmp3_;
		_tmp3_ = self->priv->m_loop;
		g_main_loop_quit (_tmp3_);
	}
}


static void
___lambda10__gtk_widget_hide (GtkWidget* _sender,
                              gpointer self)
{
	__lambda10_ ((IBusEmojier*) self);
}


static void
__lambda11_ (IBusEmojier* self,
             GtkWidget* w,
             GtkAllocation* a)
{
	g_return_if_fail (w != NULL);
	g_return_if_fail (a != NULL);
	ibus_emojier_adjust_window_position (self);
}


static void
___lambda11__gtk_widget_size_allocate (GtkWidget* _sender,
                                       GtkAllocation* allocation,
                                       gpointer self)
{
	__lambda11_ ((IBusEmojier*) self, _sender, allocation);
}


static void
__lambda26_ (IBusEmojier* self,
             guint i,
             guint b,
             guint s)
{
	const gchar* _tmp0_;
	_tmp0_ = self->priv->m_input_context_path;
	if (g_strcmp0 (_tmp0_, "") != 0) {
		ibus_emojier_candidate_panel_select_index (self, i, b);
	}
}


static void
___lambda26__ibus_emojier_candidate_clicked (IBusEmojier* _sender,
                                             guint index,
                                             guint button,
                                             guint state,
                                             gpointer self)
{
	__lambda26_ ((IBusEmojier*) self, index, button, state);
}


IBusEmojier*
ibus_emojier_construct (GType object_type)
{
	IBusEmojier * self = NULL;
	GSimpleAction* action = NULL;
	gboolean _tmp0_;
	GVariant* _tmp1_;
	GVariant* _tmp2_;
	GSimpleAction* _tmp3_;
	GSimpleAction* _tmp4_;
	GSimpleAction* _tmp5_;
	GSimpleAction* _tmp6_;
	GSimpleAction* _tmp7_;
	GSimpleAction* _tmp8_;
	GSimpleAction* _tmp9_;
	const gchar* _tmp10_;
	const gchar* _tmp12_;
	gint _tmp14_;
	gchar** _tmp15_;
	gint _tmp15__length1;
	gchar** _tmp17_;
	gint _tmp17__length1;
	GtkBox* _tmp19_;
	GtkBox* _tmp20_;
	IBusEmojierEEntry* _tmp21_;
	IBusEmojierEEntry* _tmp22_;
	IBusEmojierEEntry* _tmp23_;
	IBusEmojierEEntry* _tmp24_;
	AtkObject* obj = NULL;
	IBusEmojierEEntry* _tmp25_;
	AtkObject* _tmp26_;
	AtkObject* _tmp27_;
	AtkObject* _tmp28_;
	IBusLookupTable* _tmp29_;
	IBusLookupTable* _tmp30_;
	GHashTable* _tmp31_;
	GObject* _tmp32_;
	GObject* _tmp33_;
	self = (IBusEmojier*) g_object_new (object_type, "type", GTK_WINDOW_POPUP, NULL);
	_tmp0_ = ibus_emojier_m_show_emoji_variant;
	_tmp1_ = g_variant_new_boolean (_tmp0_);
	g_variant_ref_sink (_tmp1_);
	_tmp2_ = _tmp1_;
	_tmp3_ = g_simple_action_new_stateful ("variant", NULL, _tmp2_);
	_tmp4_ = _tmp3_;
	_g_variant_unref0 (_tmp2_);
	action = _tmp4_;
	_tmp5_ = action;
	g_signal_connect_object (_tmp5_, "activate", (GCallback) _ibus_emojier_check_action_variant_cb_g_simple_action_activate, self, 0);
	_tmp6_ = action;
	g_action_map_add_action ((GActionMap*) self, (GAction*) _tmp6_);
	_tmp7_ = g_simple_action_new ("close", NULL);
	_g_object_unref0 (action);
	action = _tmp7_;
	_tmp8_ = action;
	g_signal_connect_object (_tmp8_, "activate", (GCallback) _ibus_emojier_action_close_cb_g_simple_action_activate, self, 0);
	_tmp9_ = action;
	g_action_map_add_action ((GActionMap*) self, (GAction*) _tmp9_);
	_tmp10_ = ibus_emojier_m_current_lang_id;
	if (_tmp10_ == NULL) {
		gchar* _tmp11_;
		_tmp11_ = g_strdup ("en");
		_g_free0 (ibus_emojier_m_current_lang_id);
		ibus_emojier_m_current_lang_id = _tmp11_;
	}
	_tmp12_ = ibus_emojier_m_emoji_font_family;
	if (_tmp12_ == NULL) {
		gchar* _tmp13_;
		_tmp13_ = g_strdup ("Monospace");
		_g_free0 (ibus_emojier_m_emoji_font_family);
		ibus_emojier_m_emoji_font_family = _tmp13_;
		ibus_emojier_m_emoji_font_changed = TRUE;
	}
	_tmp14_ = ibus_emojier_m_emoji_font_size;
	if (_tmp14_ == 0) {
		ibus_emojier_m_emoji_font_size = 16;
		ibus_emojier_m_emoji_font_changed = TRUE;
	}
	_tmp15_ = ibus_emojier_m_favorites;
	_tmp15__length1 = ibus_emojier_m_favorites_length1;
	if (_tmp15_ == NULL) {
		gchar** _tmp16_;
		_tmp16_ = g_new0 (gchar*, 0 + 1);
		ibus_emojier_m_favorites = (_vala_array_free (ibus_emojier_m_favorites, ibus_emojier_m_favorites_length1, (GDestroyNotify) g_free), NULL);
		ibus_emojier_m_favorites = _tmp16_;
		ibus_emojier_m_favorites_length1 = 0;
		_ibus_emojier_m_favorites_size_ = ibus_emojier_m_favorites_length1;
	}
	_tmp17_ = ibus_emojier_m_favorite_annotations;
	_tmp17__length1 = ibus_emojier_m_favorite_annotations_length1;
	if (_tmp17_ == NULL) {
		gchar** _tmp18_;
		_tmp18_ = g_new0 (gchar*, 0 + 1);
		ibus_emojier_m_favorite_annotations = (_vala_array_free (ibus_emojier_m_favorite_annotations, ibus_emojier_m_favorite_annotations_length1, (GDestroyNotify) g_free), NULL);
		ibus_emojier_m_favorite_annotations = _tmp18_;
		ibus_emojier_m_favorite_annotations_length1 = 0;
		_ibus_emojier_m_favorite_annotations_size_ = ibus_emojier_m_favorite_annotations_length1;
	}
	ibus_emojier_set_css_data (self);
	_tmp19_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	g_object_ref_sink (_tmp19_);
	_g_object_unref0 (self->priv->m_vbox);
	self->priv->m_vbox = _tmp19_;
	_tmp20_ = self->priv->m_vbox;
	gtk_container_add ((GtkContainer*) self, (GtkWidget*) _tmp20_);
	_tmp21_ = ibus_emojier_eentry_new ();
	g_object_ref_sink (_tmp21_);
	_g_object_unref0 (self->priv->m_entry);
	self->priv->m_entry = _tmp21_;
	_tmp22_ = self->priv->m_entry;
	gtk_entry_set_placeholder_text ((GtkEntry*) _tmp22_, _ ("Type annotation or choose emoji"));
	_tmp23_ = self->priv->m_entry;
	g_signal_connect_object ((GtkEditable*) _tmp23_, "changed", (GCallback) ___lambda7__gtk_editable_changed, self, 0);
	_tmp24_ = self->priv->m_entry;
	g_signal_connect_object ((GtkEntry*) _tmp24_, "icon-release", (GCallback) ___lambda8__gtk_entry_icon_release, self, 0);
	_tmp25_ = self->priv->m_entry;
	_tmp26_ = gtk_widget_get_accessible ((GtkWidget*) _tmp25_);
	_tmp27_ = _g_object_ref0 (_tmp26_);
	obj = _tmp27_;
	_tmp28_ = obj;
	atk_object_set_role (_tmp28_, ATK_ROLE_STATUSBAR);
	_tmp29_ = ibus_lookup_table_new ((guint) 1, (guint) 0, TRUE, TRUE);
	g_object_ref_sink (_tmp29_);
	_g_object_unref0 (self->priv->m_lookup_table);
	self->priv->m_lookup_table = _tmp29_;
	_tmp30_ = self->priv->m_lookup_table;
	ibus_lookup_table_set_page_size (_tmp30_, IBUS_EMOJIER_EMOJI_GRID_PAGE * IBUS_EMOJIER_EMOJI_GRID_PAGE);
	g_signal_connect_object ((GtkWidget*) self, "hide", (GCallback) ___lambda10__gtk_widget_hide, self, 0);
	g_signal_connect_object ((GtkWidget*) self, "size-allocate", (GCallback) ___lambda11__gtk_widget_size_allocate, self, 0);
	g_signal_connect_object (self, "candidate-clicked", (GCallback) ___lambda26__ibus_emojier_candidate_clicked, self, 0);
	_tmp31_ = ibus_emojier_m_annotation_to_emojis_dict;
	if (_tmp31_ == NULL) {
		ibus_emojier_reload_emoji_dict ();
	}
	_tmp32_ = ibus_emojier_get_load_progress_object ();
	_tmp33_ = _tmp32_;
	_g_object_unref0 (_tmp33_);
	_g_object_unref0 (obj);
	_g_object_unref0 (action);
	return self;
}


IBusEmojier*
ibus_emojier_new (void)
{
	return ibus_emojier_construct (TYPE_IBUS_EMOJIER);
}


static void
ibus_emojier_reload_emoji_dict (void)
{
	const gchar* _tmp0_;
	ibus_emojier_init_emoji_dict ();
	ibus_emojier_make_emoji_dict ("en");
	_tmp0_ = ibus_emojier_m_current_lang_id;
	if (g_strcmp0 (_tmp0_, "en") != 0) {
		gchar** lang_ids = NULL;
		const gchar* _tmp1_;
		gchar** _tmp2_;
		gchar** _tmp3_;
		gint lang_ids_length1;
		gint _lang_ids_size_;
		gchar** _tmp4_;
		gint _tmp4__length1;
		const gchar* _tmp9_;
		_tmp1_ = ibus_emojier_m_current_lang_id;
		_tmp3_ = _tmp2_ = g_strsplit (_tmp1_, "_", 0);
		lang_ids = _tmp3_;
		lang_ids_length1 = _vala_array_length (_tmp2_);
		_lang_ids_size_ = lang_ids_length1;
		_tmp4_ = lang_ids;
		_tmp4__length1 = lang_ids_length1;
		if (_tmp4__length1 > 1) {
			gchar* sub_id = NULL;
			gchar** _tmp5_;
			gint _tmp5__length1;
			const gchar* _tmp6_;
			gchar* _tmp7_;
			const gchar* _tmp8_;
			_tmp5_ = lang_ids;
			_tmp5__length1 = lang_ids_length1;
			_tmp6_ = _tmp5_[0];
			_tmp7_ = g_strdup (_tmp6_);
			sub_id = _tmp7_;
			_tmp8_ = sub_id;
			ibus_emojier_make_emoji_dict (_tmp8_);
			_g_free0 (sub_id);
		}
		_tmp9_ = ibus_emojier_m_current_lang_id;
		ibus_emojier_make_emoji_dict (_tmp9_);
		lang_ids = (_vala_array_free (lang_ids, lang_ids_length1, (GDestroyNotify) g_free), NULL);
	}
	ibus_emojier_update_favorite_emoji_dict ();
}


static void
_g_free0_ (gpointer var)
{
	var = (g_free (var), NULL);
}


static inline void
_g_slist_free__g_free0_ (GSList* self)
{
	g_slist_free_full (self, (GDestroyNotify) _g_free0_);
}


static void
__g_slist_free__g_free0_0_ (gpointer var)
{
	(var == NULL) ? NULL : (var = (_g_slist_free__g_free0_ (var), NULL));
}


static void
_g_object_unref0_ (gpointer var)
{
	(var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
}


static void
_g_slist_free0_ (gpointer var)
{
	(var == NULL) ? NULL : (var = (g_slist_free (var), NULL));
}


static void
ibus_emojier_init_emoji_dict (void)
{
	GHashFunc _tmp0_;
	GEqualFunc _tmp1_;
	GHashTable* _tmp2_;
	GHashFunc _tmp3_;
	GEqualFunc _tmp4_;
	GHashTable* _tmp5_;
	GHashFunc _tmp6_;
	GEqualFunc _tmp7_;
	GHashTable* _tmp8_;
	GHashFunc _tmp9_;
	GEqualFunc _tmp10_;
	GHashTable* _tmp11_;
	GHashFunc _tmp12_;
	GEqualFunc _tmp13_;
	GHashTable* _tmp14_;
	GHashFunc _tmp15_;
	GEqualFunc _tmp16_;
	GHashTable* _tmp17_;
	_tmp0_ = g_str_hash;
	_tmp1_ = g_str_equal;
	_tmp2_ = g_hash_table_new_full (_tmp0_, _tmp1_, _g_free0_, __g_slist_free__g_free0_0_);
	_g_hash_table_unref0 (ibus_emojier_m_annotation_to_emojis_dict);
	ibus_emojier_m_annotation_to_emojis_dict = _tmp2_;
	_tmp3_ = g_str_hash;
	_tmp4_ = g_str_equal;
	_tmp5_ = g_hash_table_new_full (_tmp3_, _tmp4_, _g_free0_, _g_object_unref0_);
	_g_hash_table_unref0 (ibus_emojier_m_emoji_to_data_dict);
	ibus_emojier_m_emoji_to_data_dict = _tmp5_;
	_tmp6_ = g_str_hash;
	_tmp7_ = g_str_equal;
	_tmp8_ = g_hash_table_new_full (_tmp6_, _tmp7_, _g_free0_, __g_slist_free__g_free0_0_);
	_g_hash_table_unref0 (ibus_emojier_m_category_to_emojis_dict);
	ibus_emojier_m_category_to_emojis_dict = _tmp8_;
	_tmp9_ = g_str_hash;
	_tmp10_ = g_str_equal;
	_tmp11_ = g_hash_table_new_full (_tmp9_, _tmp10_, _g_free0_, __g_slist_free__g_free0_0_);
	_g_hash_table_unref0 (ibus_emojier_m_emoji_to_emoji_variants_dict);
	ibus_emojier_m_emoji_to_emoji_variants_dict = _tmp11_;
	_tmp12_ = g_direct_hash;
	_tmp13_ = g_direct_equal;
	_tmp14_ = g_hash_table_new_full (_tmp12_, _tmp13_, NULL, _g_object_unref0_);
	_g_hash_table_unref0 (ibus_emojier_m_unicode_to_data_dict);
	ibus_emojier_m_unicode_to_data_dict = _tmp14_;
	_tmp15_ = g_str_hash;
	_tmp16_ = g_str_equal;
	_tmp17_ = g_hash_table_new_full (_tmp15_, _tmp16_, _g_free0_, _g_slist_free0_);
	_g_hash_table_unref0 (ibus_emojier_m_name_to_unicodes_dict);
	ibus_emojier_m_name_to_unicodes_dict = _tmp17_;
}


static inline void
_g_slist_free__g_object_unref0_ (GSList* self)
{
	g_slist_free_full (self, (GDestroyNotify) _g_object_unref0_);
}


static void
ibus_emojier_make_emoji_dict (const gchar* lang)
{
	GSList* emoji_list = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	GSList* _tmp4_;
	GSList* _tmp5_;
	GSList* _tmp6_;
	GSList* _tmp7_;
	GList* annotations = NULL;
	GHashTable* _tmp12_;
	GList* _tmp13_;
	GList* _tmp14_;
	g_return_if_fail (lang != NULL);
	_tmp0_ = g_strconcat (PKGDATADIR "/dicts/emoji-", lang, NULL);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_strconcat (_tmp1_, ".dict", NULL);
	_tmp3_ = _tmp2_;
	_tmp4_ = ibus_emoji_data_load (_tmp3_);
	_tmp5_ = _tmp4_;
	_g_free0 (_tmp3_);
	_g_free0 (_tmp1_);
	emoji_list = _tmp5_;
	_tmp6_ = emoji_list;
	if (_tmp6_ == NULL) {
		(emoji_list == NULL) ? NULL : (emoji_list = (_g_slist_free__g_object_unref0_ (emoji_list), NULL));
		return;
	}
	_tmp7_ = emoji_list;
	{
		GSList* data_collection = NULL;
		GSList* data_it = NULL;
		data_collection = _tmp7_;
		for (data_it = data_collection; data_it != NULL; data_it = data_it->next) {
			IBusEmojiData* _tmp8_;
			IBusEmojiData* data = NULL;
			_tmp8_ = _g_object_ref0 ((IBusEmojiData*) data_it->data);
			data = _tmp8_;
			{
				IBusEmojiData* _tmp9_;
				IBusEmojiData* _tmp10_;
				IBusEmojiData* _tmp11_;
				_tmp9_ = data;
				ibus_emojier_update_emoji_to_data_dict (_tmp9_, lang);
				_tmp10_ = data;
				ibus_emojier_update_annotation_to_emojis_dict (_tmp10_);
				_tmp11_ = data;
				ibus_emojier_update_category_to_emojis_dict (_tmp11_, lang);
				_g_object_unref0 (data);
			}
		}
	}
	_tmp12_ = ibus_emojier_m_annotation_to_emojis_dict;
	_tmp13_ = g_hash_table_get_keys (_tmp12_);
	annotations = _tmp13_;
	_tmp14_ = annotations;
	{
		GList* annotation_collection = NULL;
		GList* annotation_it = NULL;
		annotation_collection = _tmp14_;
		for (annotation_it = annotation_collection; annotation_it != NULL; annotation_it = annotation_it->next) {
			const gchar* annotation = NULL;
			annotation = (const gchar*) annotation_it->data;
			{
				gint _tmp15_;
				const gchar* _tmp16_;
				gint _tmp17_;
				gint _tmp18_;
				_tmp15_ = ibus_emojier_m_emoji_max_seq_len;
				_tmp16_ = annotation;
				_tmp17_ = strlen (_tmp16_);
				_tmp18_ = _tmp17_;
				if (_tmp15_ < _tmp18_) {
					const gchar* _tmp19_;
					gint _tmp20_;
					gint _tmp21_;
					_tmp19_ = annotation;
					_tmp20_ = strlen (_tmp19_);
					_tmp21_ = _tmp20_;
					ibus_emojier_m_emoji_max_seq_len = _tmp21_;
				}
			}
		}
	}
	(annotations == NULL) ? NULL : (annotations = (g_list_free (annotations), NULL));
	(emoji_list == NULL) ? NULL : (emoji_list = (_g_slist_free__g_object_unref0_ (emoji_list), NULL));
}


static gpointer
_g_strdup_gcopy_func (gconstpointer src,
                      gpointer self)
{
	gpointer result;
	result = g_strdup ((const gchar*) src);
	return result;
}


static void
ibus_emojier_update_annotation_to_emojis_dict (IBusEmojiData* data)
{
	gchar* emoji = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	GSList* annotations = NULL;
	GSList* _tmp2_;
	GSList* _tmp3_;
	g_return_if_fail (data != NULL);
	_tmp0_ = ibus_emoji_data_get_emoji (data);
	_tmp1_ = g_strdup (_tmp0_);
	emoji = _tmp1_;
	_tmp2_ = ibus_emoji_data_get_annotations (data);
	annotations = _tmp2_;
	_tmp3_ = annotations;
	{
		GSList* annotation_collection = NULL;
		GSList* annotation_it = NULL;
		annotation_collection = _tmp3_;
		for (annotation_it = annotation_collection; annotation_it != NULL; annotation_it = annotation_it->next) {
			gchar* _tmp4_;
			gchar* annotation = NULL;
			_tmp4_ = g_strdup ((const gchar*) annotation_it->data);
			annotation = _tmp4_;
			{
				gboolean has_emoji = FALSE;
				GSList* hits = NULL;
				GHashTable* _tmp5_;
				const gchar* _tmp6_;
				gconstpointer _tmp7_;
				GSList* _tmp8_;
				GSList* _tmp9_;
				gboolean _tmp13_;
				has_emoji = FALSE;
				_tmp5_ = ibus_emojier_m_annotation_to_emojis_dict;
				_tmp6_ = annotation;
				_tmp7_ = g_hash_table_lookup (_tmp5_, _tmp6_);
				_tmp8_ = g_slist_copy_deep ((GSList*) _tmp7_, _g_strdup_gcopy_func, NULL);
				hits = _tmp8_;
				_tmp9_ = hits;
				{
					GSList* hit_emoji_collection = NULL;
					GSList* hit_emoji_it = NULL;
					hit_emoji_collection = _tmp9_;
					for (hit_emoji_it = hit_emoji_collection; hit_emoji_it != NULL; hit_emoji_it = hit_emoji_it->next) {
						gchar* _tmp10_;
						gchar* hit_emoji = NULL;
						_tmp10_ = g_strdup ((const gchar*) hit_emoji_it->data);
						hit_emoji = _tmp10_;
						{
							const gchar* _tmp11_;
							const gchar* _tmp12_;
							_tmp11_ = hit_emoji;
							_tmp12_ = emoji;
							if (g_strcmp0 (_tmp11_, _tmp12_) == 0) {
								has_emoji = TRUE;
								_g_free0 (hit_emoji);
								break;
							}
							_g_free0 (hit_emoji);
						}
					}
				}
				_tmp13_ = has_emoji;
				if (!_tmp13_) {
					const gchar* _tmp14_;
					gchar* _tmp15_;
					GHashTable* _tmp16_;
					const gchar* _tmp17_;
					gchar* _tmp18_;
					GSList* _tmp19_;
					GSList* _tmp20_;
					_tmp14_ = emoji;
					_tmp15_ = g_strdup (_tmp14_);
					hits = g_slist_append (hits, _tmp15_);
					_tmp16_ = ibus_emojier_m_annotation_to_emojis_dict;
					_tmp17_ = annotation;
					_tmp18_ = g_strdup (_tmp17_);
					_tmp19_ = hits;
					_tmp20_ = g_slist_copy_deep (_tmp19_, _g_strdup_gcopy_func, NULL);
					g_hash_table_replace (_tmp16_, _tmp18_, _tmp20_);
				}
				(hits == NULL) ? NULL : (hits = (_g_slist_free__g_free0_ (hits), NULL));
				_g_free0 (annotation);
			}
		}
	}
	_g_free0 (emoji);
}


static gunichar
string_get_char (const gchar* self,
                 glong index)
{
	gunichar result = 0U;
	g_return_val_if_fail (self != NULL, 0U);
	result = g_utf8_get_char (((gchar*) self) + index);
	return result;
}


static gchar*
ibus_emojier_utf8_code_point (const gchar* str)
{
	gchar* result = NULL;
	GString* buff = NULL;
	GString* _tmp0_;
	gint length = 0;
	gint _tmp1_;
	GString* _tmp22_;
	const gchar* _tmp23_;
	gchar* _tmp24_;
	g_return_val_if_fail (str != NULL, NULL);
	_tmp0_ = g_string_new ("");
	buff = _tmp0_;
	length = g_utf8_strlen (str, (gssize) -1);
	_tmp1_ = length;
	if (_tmp1_ == 0) {
		GString* _tmp2_;
		gchar* _tmp3_;
		gchar* _tmp4_;
		GString* _tmp5_;
		const gchar* _tmp6_;
		gchar* _tmp7_;
		_tmp2_ = buff;
		_tmp3_ = g_strdup_printf ("U+%04X", (guint) 0);
		_tmp4_ = _tmp3_;
		g_string_append (_tmp2_, _tmp4_);
		_g_free0 (_tmp4_);
		_tmp5_ = buff;
		_tmp6_ = _tmp5_->str;
		_tmp7_ = g_strdup (_tmp6_);
		result = _tmp7_;
		_g_string_free0 (buff);
		return result;
	}
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp8_ = FALSE;
			_tmp8_ = TRUE;
			while (TRUE) {
				gint _tmp10_;
				gint _tmp11_;
				gunichar ch = 0U;
				gint _tmp12_;
				const gchar* _tmp21_;
				if (!_tmp8_) {
					gint _tmp9_;
					_tmp9_ = i;
					i = _tmp9_ + 1;
				}
				_tmp8_ = FALSE;
				_tmp10_ = i;
				_tmp11_ = length;
				if (!(_tmp10_ < _tmp11_)) {
					break;
				}
				ch = string_get_char (str, (glong) 0);
				_tmp12_ = i;
				if (_tmp12_ == 0) {
					GString* _tmp13_;
					gunichar _tmp14_;
					gchar* _tmp15_;
					gchar* _tmp16_;
					_tmp13_ = buff;
					_tmp14_ = ch;
					_tmp15_ = g_strdup_printf ("U+%04X", (guint) _tmp14_);
					_tmp16_ = _tmp15_;
					g_string_append (_tmp13_, _tmp16_);
					_g_free0 (_tmp16_);
				} else {
					GString* _tmp17_;
					gunichar _tmp18_;
					gchar* _tmp19_;
					gchar* _tmp20_;
					_tmp17_ = buff;
					_tmp18_ = ch;
					_tmp19_ = g_strdup_printf (" %04X", (guint) _tmp18_);
					_tmp20_ = _tmp19_;
					g_string_append (_tmp17_, _tmp20_);
					_g_free0 (_tmp20_);
				}
				_tmp21_ = g_utf8_next_char (str);
				str = _tmp21_;
			}
		}
	}
	_tmp22_ = buff;
	_tmp23_ = _tmp22_->str;
	_tmp24_ = g_strdup (_tmp23_);
	result = _tmp24_;
	_g_string_free0 (buff);
	return result;
}


static gchar*
ibus_emojier_utf8_entity (const gchar* str)
{
	gchar* result = NULL;
	GString* buff = NULL;
	GString* _tmp0_;
	gint length = 0;
	GString* _tmp12_;
	const gchar* _tmp13_;
	gchar* _tmp14_;
	g_return_val_if_fail (str != NULL, NULL);
	_tmp0_ = g_string_new ("");
	buff = _tmp0_;
	length = g_utf8_strlen (str, (gssize) -1);
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp1_ = FALSE;
			_tmp1_ = TRUE;
			while (TRUE) {
				gint _tmp3_;
				gint _tmp4_;
				gunichar ch = 0U;
				gunichar _tmp5_;
				const gchar* _tmp11_;
				if (!_tmp1_) {
					gint _tmp2_;
					_tmp2_ = i;
					i = _tmp2_ + 1;
				}
				_tmp1_ = FALSE;
				_tmp3_ = i;
				_tmp4_ = length;
				if (!(_tmp3_ < _tmp4_)) {
					break;
				}
				ch = string_get_char (str, (glong) 0);
				_tmp5_ = ch;
				switch (_tmp5_) {
					case '<':
					{
						GString* _tmp6_;
						_tmp6_ = buff;
						g_string_append (_tmp6_, "&lt;");
						break;
					}
					case '>':
					{
						GString* _tmp7_;
						_tmp7_ = buff;
						g_string_append (_tmp7_, "&gt;");
						break;
					}
					case '&':
					{
						GString* _tmp8_;
						_tmp8_ = buff;
						g_string_append (_tmp8_, "&amp;");
						break;
					}
					default:
					{
						GString* _tmp9_;
						gunichar _tmp10_;
						_tmp9_ = buff;
						_tmp10_ = ch;
						g_string_append_unichar (_tmp9_, _tmp10_);
						break;
					}
				}
				_tmp11_ = g_utf8_next_char (str);
				str = _tmp11_;
			}
		}
	}
	_tmp12_ = buff;
	_tmp13_ = _tmp12_->str;
	_tmp14_ = g_strdup (_tmp13_);
	result = _tmp14_;
	_g_string_free0 (buff);
	return result;
}


static gint
string_index_of (const gchar* self,
                 const gchar* needle,
                 gint start_index)
{
	gint result = 0;
	gchar* _result_ = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	g_return_val_if_fail (self != NULL, 0);
	g_return_val_if_fail (needle != NULL, 0);
	_tmp0_ = strstr (((gchar*) self) + start_index, (gchar*) needle);
	_result_ = _tmp0_;
	_tmp1_ = _result_;
	if (_tmp1_ != NULL) {
		gchar* _tmp2_;
		_tmp2_ = _result_;
		result = (gint) (_tmp2_ - ((gchar*) self));
		return result;
	} else {
		result = -1;
		return result;
	}
}


static glong
string_strnlen (gchar* str,
                glong maxlen)
{
	glong result = 0L;
	gchar* end = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	_tmp0_ = memchr (str, 0, (gsize) maxlen);
	end = _tmp0_;
	_tmp1_ = end;
	if (_tmp1_ == NULL) {
		result = maxlen;
		return result;
	} else {
		gchar* _tmp2_;
		_tmp2_ = end;
		result = (glong) (_tmp2_ - str);
		return result;
	}
}


static gchar*
string_substring (const gchar* self,
                  glong offset,
                  glong len)
{
	gchar* result = NULL;
	glong string_length = 0L;
	gboolean _tmp0_ = FALSE;
	glong _tmp6_;
	gchar* _tmp7_;
	g_return_val_if_fail (self != NULL, NULL);
	if (offset >= ((glong) 0)) {
		_tmp0_ = len >= ((glong) 0);
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		string_length = string_strnlen ((gchar*) self, offset + len);
	} else {
		gint _tmp1_;
		gint _tmp2_;
		_tmp1_ = strlen (self);
		_tmp2_ = _tmp1_;
		string_length = (glong) _tmp2_;
	}
	if (offset < ((glong) 0)) {
		glong _tmp3_;
		_tmp3_ = string_length;
		offset = _tmp3_ + offset;
		g_return_val_if_fail (offset >= ((glong) 0), NULL);
	} else {
		glong _tmp4_;
		_tmp4_ = string_length;
		g_return_val_if_fail (offset <= _tmp4_, NULL);
	}
	if (len < ((glong) 0)) {
		glong _tmp5_;
		_tmp5_ = string_length;
		len = _tmp5_ - offset;
	}
	_tmp6_ = string_length;
	g_return_val_if_fail ((offset + len) <= _tmp6_, NULL);
	_tmp7_ = g_strndup (((gchar*) self) + offset, (gsize) len);
	result = _tmp7_;
	return result;
}


static void
ibus_emojier_update_annotations_with_description (IBusEmojiData* data,
                                                  const gchar* description)
{
	GSList* annotations = NULL;
	GSList* _tmp0_;
	GSList* _tmp1_;
	gboolean update_annotations = FALSE;
	gchar* former = NULL;
	gchar* later = NULL;
	gint index = 0;
	gint _tmp2_;
	gchar** words = NULL;
	const gchar* _tmp14_;
	gchar** _tmp15_;
	gchar** _tmp16_;
	gint words_length1;
	gint _words_size_;
	gboolean _tmp17_ = FALSE;
	gchar** _tmp18_;
	gint _tmp18__length1;
	gboolean _tmp25_;
	g_return_if_fail (data != NULL);
	g_return_if_fail (description != NULL);
	_tmp0_ = ibus_emoji_data_get_annotations (data);
	_tmp1_ = g_slist_copy_deep (_tmp0_, _g_strdup_gcopy_func, NULL);
	annotations = _tmp1_;
	update_annotations = FALSE;
	former = NULL;
	later = NULL;
	index = string_index_of (description, ": ", 0);
	_tmp2_ = index;
	if (_tmp2_ > 0) {
		gint _tmp3_;
		gchar* _tmp4_;
		GSList* _tmp5_;
		const gchar* _tmp6_;
		GCompareFunc _tmp7_;
		GSList* _tmp8_;
		gint _tmp11_;
		gchar* _tmp12_;
		_tmp3_ = index;
		_tmp4_ = string_substring (description, (glong) 0, (glong) _tmp3_);
		_g_free0 (former);
		former = _tmp4_;
		_tmp5_ = annotations;
		_tmp6_ = former;
		_tmp7_ = g_strcmp0;
		_tmp8_ = g_slist_find_custom (_tmp5_, _tmp6_, _tmp7_);
		if (_tmp8_ == NULL) {
			const gchar* _tmp9_;
			gchar* _tmp10_;
			_tmp9_ = former;
			_tmp10_ = g_strdup (_tmp9_);
			annotations = g_slist_append (annotations, _tmp10_);
			update_annotations = TRUE;
		}
		_tmp11_ = index;
		_tmp12_ = string_substring (description, (glong) (_tmp11_ + 2), (glong) -1);
		_g_free0 (later);
		later = _tmp12_;
	} else {
		gchar* _tmp13_;
		_tmp13_ = g_strdup (description);
		_g_free0 (later);
		later = _tmp13_;
	}
	_tmp14_ = later;
	_tmp16_ = _tmp15_ = g_strsplit (_tmp14_, " ", 0);
	words = _tmp16_;
	words_length1 = _vala_array_length (_tmp15_);
	_words_size_ = words_length1;
	_tmp18_ = words;
	_tmp18__length1 = words_length1;
	if (_tmp18__length1 < 3) {
		GSList* _tmp19_;
		const gchar* _tmp20_;
		GCompareFunc _tmp21_;
		GSList* _tmp22_;
		_tmp19_ = annotations;
		_tmp20_ = later;
		_tmp21_ = g_strcmp0;
		_tmp22_ = g_slist_find_custom (_tmp19_, _tmp20_, _tmp21_);
		_tmp17_ = _tmp22_ == NULL;
	} else {
		_tmp17_ = FALSE;
	}
	if (_tmp17_) {
		const gchar* _tmp23_;
		gchar* _tmp24_;
		_tmp23_ = later;
		_tmp24_ = g_strdup (_tmp23_);
		annotations = g_slist_append (annotations, _tmp24_);
		update_annotations = TRUE;
	}
	_tmp25_ = update_annotations;
	if (_tmp25_) {
		GSList* _tmp26_;
		GSList* _tmp27_;
		_tmp26_ = annotations;
		_tmp27_ = g_slist_copy_deep (_tmp26_, _g_strdup_gcopy_func, NULL);
		ibus_emoji_data_set_annotations (data, _tmp27_);
	}
	words = (_vala_array_free (words, words_length1, (GDestroyNotify) g_free), NULL);
	_g_free0 (later);
	_g_free0 (former);
	(annotations == NULL) ? NULL : (annotations = (_g_slist_free__g_free0_ (annotations), NULL));
}


static void
ibus_emojier_update_emoji_to_data_dict (IBusEmojiData* data,
                                        const gchar* lang)
{
	gchar* emoji = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	g_return_if_fail (data != NULL);
	g_return_if_fail (lang != NULL);
	_tmp0_ = ibus_emoji_data_get_emoji (data);
	_tmp1_ = g_strdup (_tmp0_);
	emoji = _tmp1_;
	if (g_strcmp0 (lang, "en") == 0) {
		gchar* description = NULL;
		const gchar* _tmp2_;
		gchar* _tmp3_;
		const gchar* _tmp4_;
		GHashTable* _tmp5_;
		const gchar* _tmp6_;
		gchar* _tmp7_;
		IBusEmojiData* _tmp8_;
		_tmp2_ = ibus_emoji_data_get_description (data);
		_tmp3_ = g_utf8_strdown (_tmp2_, (gssize) -1);
		description = _tmp3_;
		_tmp4_ = description;
		ibus_emojier_update_annotations_with_description (data, _tmp4_);
		_tmp5_ = ibus_emojier_m_emoji_to_data_dict;
		_tmp6_ = emoji;
		_tmp7_ = g_strdup (_tmp6_);
		_tmp8_ = _g_object_ref0 (data);
		g_hash_table_replace (_tmp5_, _tmp7_, _tmp8_);
		_g_free0 (description);
	} else {
		IBusEmojiData* en_data = NULL;
		GHashTable* _tmp9_;
		const gchar* _tmp10_;
		gconstpointer _tmp11_;
		IBusEmojiData* _tmp12_;
		gchar* trans_description = NULL;
		const gchar* _tmp17_;
		gchar* _tmp18_;
		IBusEmojiData* _tmp19_;
		const gchar* _tmp20_;
		const gchar* _tmp21_;
		gchar* _tmp22_;
		const gchar* _tmp23_;
		GSList* annotations = NULL;
		GSList* _tmp24_;
		GSList* en_annotations = NULL;
		IBusEmojiData* _tmp25_;
		GSList* _tmp26_;
		GSList* _tmp27_;
		IBusEmojiData* _tmp35_;
		GSList* _tmp36_;
		GSList* _tmp37_;
		en_data = NULL;
		_tmp9_ = ibus_emojier_m_emoji_to_data_dict;
		_tmp10_ = emoji;
		_tmp11_ = g_hash_table_lookup (_tmp9_, _tmp10_);
		en_data = (IBusEmojiData*) _tmp11_;
		_tmp12_ = en_data;
		if (_tmp12_ == NULL) {
			GHashTable* _tmp13_;
			const gchar* _tmp14_;
			gchar* _tmp15_;
			IBusEmojiData* _tmp16_;
			_tmp13_ = ibus_emojier_m_emoji_to_data_dict;
			_tmp14_ = emoji;
			_tmp15_ = g_strdup (_tmp14_);
			_tmp16_ = _g_object_ref0 (data);
			g_hash_table_insert (_tmp13_, _tmp15_, _tmp16_);
			_g_free0 (emoji);
			return;
		}
		_tmp17_ = ibus_emoji_data_get_description (data);
		_tmp18_ = g_strdup (_tmp17_);
		trans_description = _tmp18_;
		_tmp19_ = en_data;
		_tmp20_ = trans_description;
		ibus_emoji_data_set_description (_tmp19_, _tmp20_);
		_tmp21_ = trans_description;
		_tmp22_ = g_utf8_strdown (_tmp21_, (gssize) -1);
		_g_free0 (trans_description);
		trans_description = _tmp22_;
		_tmp23_ = trans_description;
		ibus_emojier_update_annotations_with_description (data, _tmp23_);
		_tmp24_ = ibus_emoji_data_get_annotations (data);
		annotations = _tmp24_;
		_tmp25_ = en_data;
		_tmp26_ = ibus_emoji_data_get_annotations (_tmp25_);
		en_annotations = _tmp26_;
		_tmp27_ = en_annotations;
		{
			GSList* annotation_collection = NULL;
			GSList* annotation_it = NULL;
			annotation_collection = _tmp27_;
			for (annotation_it = annotation_collection; annotation_it != NULL; annotation_it = annotation_it->next) {
				gchar* _tmp28_;
				gchar* annotation = NULL;
				_tmp28_ = g_strdup ((const gchar*) annotation_it->data);
				annotation = _tmp28_;
				{
					GSList* _tmp29_;
					const gchar* _tmp30_;
					GCompareFunc _tmp31_;
					GSList* _tmp32_;
					_tmp29_ = annotations;
					_tmp30_ = annotation;
					_tmp31_ = g_strcmp0;
					_tmp32_ = g_slist_find_custom (_tmp29_, _tmp30_, _tmp31_);
					if (_tmp32_ == NULL) {
						const gchar* _tmp33_;
						gchar* _tmp34_;
						_tmp33_ = annotation;
						_tmp34_ = g_strdup (_tmp33_);
						annotations = g_slist_append (annotations, _tmp34_);
					}
					_g_free0 (annotation);
				}
			}
		}
		_tmp35_ = en_data;
		_tmp36_ = annotations;
		_tmp37_ = g_slist_copy_deep (_tmp36_, _g_strdup_gcopy_func, NULL);
		ibus_emoji_data_set_annotations (_tmp35_, _tmp37_);
		_g_free0 (trans_description);
	}
	_g_free0 (emoji);
}


static gint
string_index_of_char (const gchar* self,
                      gunichar c,
                      gint start_index)
{
	gint result = 0;
	gchar* _result_ = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	g_return_val_if_fail (self != NULL, 0);
	_tmp0_ = g_utf8_strchr (((gchar*) self) + start_index, (gssize) -1, c);
	_result_ = _tmp0_;
	_tmp1_ = _result_;
	if (_tmp1_ != NULL) {
		gchar* _tmp2_;
		_tmp2_ = _result_;
		result = (gint) (_tmp2_ - ((gchar*) self));
		return result;
	} else {
		result = -1;
		return result;
	}
}


static gchar*
g_unichar_to_string (gunichar self)
{
	gchar* result = NULL;
	gchar* str = NULL;
	gchar* _tmp0_;
	const gchar* _tmp1_;
	_tmp0_ = g_new0 (gchar, 7);
	str = (gchar*) _tmp0_;
	_tmp1_ = str;
	g_unichar_to_utf8 (self, _tmp1_);
	result = str;
	return result;
}


static void
ibus_emojier_update_category_to_emojis_dict (IBusEmojiData* data,
                                             const gchar* lang)
{
	gchar* emoji = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* category = NULL;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	const gchar* _tmp4_;
	g_return_if_fail (data != NULL);
	g_return_if_fail (lang != NULL);
	_tmp0_ = ibus_emoji_data_get_emoji (data);
	_tmp1_ = g_strdup (_tmp0_);
	emoji = _tmp1_;
	_tmp2_ = ibus_emoji_data_get_category (data);
	_tmp3_ = g_strdup (_tmp2_);
	category = _tmp3_;
	_tmp4_ = category;
	if (g_strcmp0 (_tmp4_, "") == 0) {
		gchar* _tmp5_;
		_tmp5_ = g_strdup (IBUS_EMOJIER_EMOJI_CATEGORY_OTHERS);
		_g_free0 (category);
		category = _tmp5_;
	}
	if (g_strcmp0 (lang, "en") == 0) {
		gboolean has_variant = FALSE;
		gboolean _tmp8_;
		gboolean has_emoji = FALSE;
		GSList* hits = NULL;
		GHashTable* _tmp41_;
		const gchar* _tmp42_;
		gconstpointer _tmp43_;
		GSList* _tmp44_;
		GSList* _tmp45_;
		gboolean _tmp49_;
		has_variant = FALSE;
		{
			gunichar* ch_collection = NULL;
			gint ch_collection_length1 = 0;
			gint _ch_collection_size_ = 0;
			gint ch_it = 0;
			ch_collection = IBUS_EMOJIER_EMOJI_VARIANT_LIST;
			ch_collection_length1 = G_N_ELEMENTS (IBUS_EMOJIER_EMOJI_VARIANT_LIST);
			for (ch_it = 0; ch_it < G_N_ELEMENTS (IBUS_EMOJIER_EMOJI_VARIANT_LIST); ch_it = ch_it + 1) {
				gunichar ch = 0U;
				ch = ch_collection[ch_it];
				{
					const gchar* _tmp6_;
					gunichar _tmp7_;
					_tmp6_ = emoji;
					_tmp7_ = ch;
					if (string_index_of_char (_tmp6_, _tmp7_, 0) >= 0) {
						has_variant = TRUE;
						break;
					}
				}
			}
		}
		_tmp8_ = has_variant;
		if (_tmp8_) {
			gunichar base_ch = 0U;
			const gchar* _tmp9_;
			gchar* base_emoji = NULL;
			gunichar _tmp10_;
			gchar* _tmp11_;
			GString* buff = NULL;
			GString* _tmp12_;
			GString* _tmp13_;
			gunichar _tmp14_;
			GString* _tmp15_;
			GHashTable* _tmp16_;
			GString* _tmp17_;
			const gchar* _tmp18_;
			gconstpointer _tmp19_;
			GSList* variants = NULL;
			GHashTable* _tmp23_;
			const gchar* _tmp24_;
			gconstpointer _tmp25_;
			GSList* _tmp26_;
			GSList* _tmp27_;
			const gchar* _tmp28_;
			GCompareFunc _tmp29_;
			GSList* _tmp30_;
			_tmp9_ = emoji;
			base_ch = string_get_char (_tmp9_, (glong) 0);
			_tmp10_ = base_ch;
			_tmp11_ = g_unichar_to_string (_tmp10_);
			base_emoji = _tmp11_;
			_tmp12_ = g_string_new ("");
			buff = _tmp12_;
			_tmp13_ = buff;
			_tmp14_ = base_ch;
			g_string_append_unichar (_tmp13_, _tmp14_);
			_tmp15_ = buff;
			g_string_append_unichar (_tmp15_, (gunichar) 0xfe0f);
			_tmp16_ = ibus_emojier_m_emoji_to_data_dict;
			_tmp17_ = buff;
			_tmp18_ = _tmp17_->str;
			_tmp19_ = g_hash_table_lookup (_tmp16_, _tmp18_);
			if (((IBusEmojiData*) _tmp19_) != NULL) {
				GString* _tmp20_;
				const gchar* _tmp21_;
				gchar* _tmp22_;
				_tmp20_ = buff;
				_tmp21_ = _tmp20_->str;
				_tmp22_ = g_strdup (_tmp21_);
				_g_free0 (base_emoji);
				base_emoji = _tmp22_;
			}
			_tmp23_ = ibus_emojier_m_emoji_to_emoji_variants_dict;
			_tmp24_ = base_emoji;
			_tmp25_ = g_hash_table_lookup (_tmp23_, _tmp24_);
			_tmp26_ = g_slist_copy_deep ((GSList*) _tmp25_, _g_strdup_gcopy_func, NULL);
			variants = _tmp26_;
			_tmp27_ = variants;
			_tmp28_ = emoji;
			_tmp29_ = g_strcmp0;
			_tmp30_ = g_slist_find_custom (_tmp27_, _tmp28_, _tmp29_);
			if (_tmp30_ == NULL) {
				GSList* _tmp31_;
				const gchar* _tmp34_;
				gchar* _tmp35_;
				GHashTable* _tmp36_;
				const gchar* _tmp37_;
				gchar* _tmp38_;
				GSList* _tmp39_;
				GSList* _tmp40_;
				_tmp31_ = variants;
				if (_tmp31_ == NULL) {
					const gchar* _tmp32_;
					gchar* _tmp33_;
					_tmp32_ = base_emoji;
					_tmp33_ = g_strdup (_tmp32_);
					variants = g_slist_append (variants, _tmp33_);
				}
				_tmp34_ = emoji;
				_tmp35_ = g_strdup (_tmp34_);
				variants = g_slist_append (variants, _tmp35_);
				_tmp36_ = ibus_emojier_m_emoji_to_emoji_variants_dict;
				_tmp37_ = base_emoji;
				_tmp38_ = g_strdup (_tmp37_);
				_tmp39_ = variants;
				_tmp40_ = g_slist_copy_deep (_tmp39_, _g_strdup_gcopy_func, NULL);
				g_hash_table_replace (_tmp36_, _tmp38_, _tmp40_);
			}
			(variants == NULL) ? NULL : (variants = (_g_slist_free__g_free0_ (variants), NULL));
			_g_string_free0 (buff);
			_g_free0 (base_emoji);
			_g_free0 (category);
			_g_free0 (emoji);
			return;
		}
		has_emoji = FALSE;
		_tmp41_ = ibus_emojier_m_category_to_emojis_dict;
		_tmp42_ = category;
		_tmp43_ = g_hash_table_lookup (_tmp41_, _tmp42_);
		_tmp44_ = g_slist_copy_deep ((GSList*) _tmp43_, _g_strdup_gcopy_func, NULL);
		hits = _tmp44_;
		_tmp45_ = hits;
		{
			GSList* hit_emoji_collection = NULL;
			GSList* hit_emoji_it = NULL;
			hit_emoji_collection = _tmp45_;
			for (hit_emoji_it = hit_emoji_collection; hit_emoji_it != NULL; hit_emoji_it = hit_emoji_it->next) {
				gchar* _tmp46_;
				gchar* hit_emoji = NULL;
				_tmp46_ = g_strdup ((const gchar*) hit_emoji_it->data);
				hit_emoji = _tmp46_;
				{
					const gchar* _tmp47_;
					const gchar* _tmp48_;
					_tmp47_ = hit_emoji;
					_tmp48_ = emoji;
					if (g_strcmp0 (_tmp47_, _tmp48_) == 0) {
						has_emoji = TRUE;
						_g_free0 (hit_emoji);
						break;
					}
					_g_free0 (hit_emoji);
				}
			}
		}
		_tmp49_ = has_emoji;
		if (!_tmp49_) {
			const gchar* _tmp50_;
			gchar* _tmp51_;
			GHashTable* _tmp52_;
			const gchar* _tmp53_;
			gchar* _tmp54_;
			GSList* _tmp55_;
			GSList* _tmp56_;
			_tmp50_ = emoji;
			_tmp51_ = g_strdup (_tmp50_);
			hits = g_slist_append (hits, _tmp51_);
			_tmp52_ = ibus_emojier_m_category_to_emojis_dict;
			_tmp53_ = category;
			_tmp54_ = g_strdup (_tmp53_);
			_tmp55_ = hits;
			_tmp56_ = g_slist_copy_deep (_tmp55_, _g_strdup_gcopy_func, NULL);
			g_hash_table_replace (_tmp52_, _tmp54_, _tmp56_);
		}
		(hits == NULL) ? NULL : (hits = (_g_slist_free__g_free0_ (hits), NULL));
	}
	_g_free0 (category);
	_g_free0 (emoji);
}


static void
ibus_emojier_make_unicode_block_dict (void)
{
	GSList* _tmp0_;
	GSList* _tmp1_;
	_tmp0_ = ibus_unicode_block_load (PKGDATADIR "/dicts/unicode-blocks.dict");
	(ibus_emojier_m_unicode_block_list == NULL) ? NULL : (ibus_emojier_m_unicode_block_list = (_g_slist_free__g_object_unref0_ (ibus_emojier_m_unicode_block_list), NULL));
	ibus_emojier_m_unicode_block_list = _tmp0_;
	_tmp1_ = ibus_emojier_m_unicode_block_list;
	{
		GSList* block_collection = NULL;
		GSList* block_it = NULL;
		block_collection = _tmp1_;
		for (block_it = block_collection; block_it != NULL; block_it = block_it->next) {
			IBusUnicodeBlock* block = NULL;
			block = (IBusUnicodeBlock*) block_it->data;
			{
				const gchar* name = NULL;
				IBusUnicodeBlock* _tmp2_;
				const gchar* _tmp3_;
				gint _tmp4_;
				const gchar* _tmp5_;
				gint _tmp6_;
				gint _tmp7_;
				_tmp2_ = block;
				_tmp3_ = ibus_unicode_block_get_name (_tmp2_);
				name = _tmp3_;
				_tmp4_ = ibus_emojier_m_emoji_max_seq_len;
				_tmp5_ = name;
				_tmp6_ = strlen (_tmp5_);
				_tmp7_ = _tmp6_;
				if (_tmp4_ < _tmp7_) {
					const gchar* _tmp8_;
					gint _tmp9_;
					gint _tmp10_;
					_tmp8_ = name;
					_tmp9_ = strlen (_tmp8_);
					_tmp10_ = _tmp9_;
					ibus_emojier_m_emoji_max_seq_len = _tmp10_;
				}
			}
		}
	}
}


static void
ibus_emojier_make_unicode_name_dict (GObject* source_object)
{
	g_return_if_fail (source_object != NULL);
	ibus_unicode_data_load_async (PKGDATADIR "/dicts/unicode-names.dict", source_object, NULL, (IBusUnicodeDataLoadAsyncFinish) ibus_emojier_make_unicode_name_dict_finish, NULL);
}


static void
ibus_emojier_make_unicode_name_dict_finish (GSList* unicode_list)
{
	GList* names = NULL;
	GHashTable* _tmp3_;
	GList* _tmp4_;
	GList* _tmp5_;
	if (unicode_list == NULL) {
		return;
	}
	{
		GSList* data_collection = NULL;
		GSList* data_it = NULL;
		data_collection = unicode_list;
		for (data_it = data_collection; data_it != NULL; data_it = data_it->next) {
			IBusUnicodeData* _tmp0_;
			IBusUnicodeData* data = NULL;
			_tmp0_ = _g_object_ref0 ((IBusUnicodeData*) data_it->data);
			data = _tmp0_;
			{
				IBusUnicodeData* _tmp1_;
				IBusUnicodeData* _tmp2_;
				_tmp1_ = data;
				ibus_emojier_update_unicode_to_data_dict (_tmp1_);
				_tmp2_ = data;
				ibus_emojier_update_name_to_unicodes_dict (_tmp2_);
				_g_object_unref0 (data);
			}
		}
	}
	_tmp3_ = ibus_emojier_m_name_to_unicodes_dict;
	_tmp4_ = g_hash_table_get_keys (_tmp3_);
	names = _tmp4_;
	_tmp5_ = names;
	{
		GList* name_collection = NULL;
		GList* name_it = NULL;
		name_collection = _tmp5_;
		for (name_it = name_collection; name_it != NULL; name_it = name_it->next) {
			const gchar* name = NULL;
			name = (const gchar*) name_it->data;
			{
				gint _tmp6_;
				const gchar* _tmp7_;
				gint _tmp8_;
				gint _tmp9_;
				_tmp6_ = ibus_emojier_m_emoji_max_seq_len;
				_tmp7_ = name;
				_tmp8_ = strlen (_tmp7_);
				_tmp9_ = _tmp8_;
				if (_tmp6_ < _tmp9_) {
					const gchar* _tmp10_;
					gint _tmp11_;
					gint _tmp12_;
					_tmp10_ = name;
					_tmp11_ = strlen (_tmp10_);
					_tmp12_ = _tmp11_;
					ibus_emojier_m_emoji_max_seq_len = _tmp12_;
				}
			}
		}
	}
	ibus_emojier_m_loaded_unicode = TRUE;
	(names == NULL) ? NULL : (names = (g_list_free (names), NULL));
}


static void
ibus_emojier_update_unicode_to_data_dict (IBusUnicodeData* data)
{
	gunichar code = 0U;
	GHashTable* _tmp0_;
	IBusUnicodeData* _tmp1_;
	g_return_if_fail (data != NULL);
	code = ibus_unicode_data_get_code (data);
	_tmp0_ = ibus_emojier_m_unicode_to_data_dict;
	_tmp1_ = _g_object_ref0 (data);
	g_hash_table_replace (_tmp0_, (gpointer) ((gintptr) code), _tmp1_);
}


static void
ibus_emojier_update_name_to_unicodes_dict (IBusUnicodeData* data)
{
	gunichar code = 0U;
	gchar** names = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gchar** _tmp4_;
	gint names_length1;
	gint _names_size_;
	gchar** _tmp5_;
	gint _tmp5__length1;
	g_return_if_fail (data != NULL);
	code = ibus_unicode_data_get_code (data);
	_tmp0_ = ibus_unicode_data_get_name (data);
	_tmp1_ = g_utf8_strdown (_tmp0_, (gssize) -1);
	_tmp2_ = ibus_unicode_data_get_alias (data);
	_tmp3_ = g_utf8_strdown (_tmp2_, (gssize) -1);
	_tmp4_ = g_new0 (gchar*, 2 + 1);
	_tmp4_[0] = _tmp1_;
	_tmp4_[1] = _tmp3_;
	names = _tmp4_;
	names_length1 = 2;
	_names_size_ = names_length1;
	_tmp5_ = names;
	_tmp5__length1 = names_length1;
	{
		gchar** name_collection = NULL;
		gint name_collection_length1 = 0;
		gint _name_collection_size_ = 0;
		gint name_it = 0;
		name_collection = _tmp5_;
		name_collection_length1 = _tmp5__length1;
		for (name_it = 0; name_it < _tmp5__length1; name_it = name_it + 1) {
			const gchar* name = NULL;
			name = name_collection[name_it];
			{
				const gchar* _tmp6_;
				gboolean has_code = FALSE;
				GSList* hits = NULL;
				GHashTable* _tmp7_;
				const gchar* _tmp8_;
				gconstpointer _tmp9_;
				GSList* _tmp10_;
				GSList* _tmp11_;
				gboolean _tmp14_;
				_tmp6_ = name;
				if (g_strcmp0 (_tmp6_, "") == 0) {
					continue;
				}
				has_code = FALSE;
				_tmp7_ = ibus_emojier_m_name_to_unicodes_dict;
				_tmp8_ = name;
				_tmp9_ = g_hash_table_lookup (_tmp7_, _tmp8_);
				_tmp10_ = g_slist_copy ((GSList*) _tmp9_);
				hits = _tmp10_;
				_tmp11_ = hits;
				{
					GSList* hit_code_collection = NULL;
					GSList* hit_code_it = NULL;
					hit_code_collection = _tmp11_;
					for (hit_code_it = hit_code_collection; hit_code_it != NULL; hit_code_it = hit_code_it->next) {
						gunichar hit_code = 0U;
						hit_code = (gunichar) ((gintptr) hit_code_it->data);
						{
							gunichar _tmp12_;
							gunichar _tmp13_;
							_tmp12_ = hit_code;
							_tmp13_ = code;
							if (_tmp12_ == _tmp13_) {
								has_code = TRUE;
								break;
							}
						}
					}
				}
				_tmp14_ = has_code;
				if (!_tmp14_) {
					gunichar _tmp15_;
					GHashTable* _tmp16_;
					const gchar* _tmp17_;
					gchar* _tmp18_;
					GSList* _tmp19_;
					GSList* _tmp20_;
					_tmp15_ = code;
					hits = g_slist_append (hits, (gpointer) ((gintptr) _tmp15_));
					_tmp16_ = ibus_emojier_m_name_to_unicodes_dict;
					_tmp17_ = name;
					_tmp18_ = g_strdup (_tmp17_);
					_tmp19_ = hits;
					_tmp20_ = g_slist_copy (_tmp19_);
					g_hash_table_replace (_tmp16_, _tmp18_, _tmp20_);
				}
				(hits == NULL) ? NULL : (hits = (g_slist_free (hits), NULL));
			}
		}
	}
	names = (_vala_array_free (names, names_length1, (GDestroyNotify) g_free), NULL);
}


static void
ibus_emojier_set_css_data (IBusEmojier* self)
{
	GdkDisplay* display = NULL;
	GdkDisplay* _tmp0_;
	GdkDisplay* _tmp1_;
	GdkScreen* _tmp2_ = NULL;
	GdkDisplay* _tmp3_;
	GdkScreen* screen = NULL;
	GdkScreen* _tmp6_;
	GdkScreen* _tmp7_;
	gchar* backup_locale = NULL;
	const gchar* _tmp8_;
	gchar* _tmp9_;
	const gchar* _tmp10_;
	ThemedRGBA* _tmp13_;
	guint bg_red = 0U;
	ThemedRGBA* _tmp15_;
	GdkRGBA* _tmp16_;
	GdkRGBA* _tmp17_;
	gdouble _tmp18_;
	guint bg_green = 0U;
	ThemedRGBA* _tmp19_;
	GdkRGBA* _tmp20_;
	GdkRGBA* _tmp21_;
	gdouble _tmp22_;
	guint bg_blue = 0U;
	ThemedRGBA* _tmp23_;
	GdkRGBA* _tmp24_;
	GdkRGBA* _tmp25_;
	gdouble _tmp26_;
	gdouble bg_alpha = 0.0;
	ThemedRGBA* _tmp27_;
	GdkRGBA* _tmp28_;
	GdkRGBA* _tmp29_;
	gdouble _tmp30_;
	gchar* data = NULL;
	guint _tmp31_;
	guint _tmp32_;
	guint _tmp33_;
	gdouble _tmp34_;
	gchar* _tmp35_;
	gchar* _tmp36_;
	gchar* _tmp37_;
	gchar* _tmp38_;
	const gchar* _tmp39_;
	gint _tmp40_;
	gchar* _tmp41_;
	gchar* _tmp42_;
	gchar* _tmp43_;
	gchar* _tmp44_;
	gchar* _tmp45_;
	gchar* _tmp46_;
	guint fg_red = 0U;
	ThemedRGBA* _tmp47_;
	GdkRGBA* _tmp48_;
	GdkRGBA* _tmp49_;
	gdouble _tmp50_;
	guint fg_green = 0U;
	ThemedRGBA* _tmp51_;
	GdkRGBA* _tmp52_;
	GdkRGBA* _tmp53_;
	gdouble _tmp54_;
	guint fg_blue = 0U;
	ThemedRGBA* _tmp55_;
	GdkRGBA* _tmp56_;
	GdkRGBA* _tmp57_;
	gdouble _tmp58_;
	gdouble fg_alpha = 0.0;
	ThemedRGBA* _tmp59_;
	GdkRGBA* _tmp60_;
	GdkRGBA* _tmp61_;
	gdouble _tmp62_;
	ThemedRGBA* _tmp63_;
	GdkRGBA* _tmp64_;
	GdkRGBA* _tmp65_;
	gdouble _tmp66_;
	ThemedRGBA* _tmp67_;
	GdkRGBA* _tmp68_;
	GdkRGBA* _tmp69_;
	gdouble _tmp70_;
	ThemedRGBA* _tmp71_;
	GdkRGBA* _tmp72_;
	GdkRGBA* _tmp73_;
	gdouble _tmp74_;
	ThemedRGBA* _tmp75_;
	GdkRGBA* _tmp76_;
	GdkRGBA* _tmp77_;
	gdouble _tmp78_;
	const gchar* _tmp79_;
	guint _tmp80_;
	guint _tmp81_;
	guint _tmp82_;
	gdouble _tmp83_;
	gchar* _tmp84_;
	gchar* _tmp85_;
	gchar* _tmp86_;
	gchar* _tmp87_;
	const gchar* _tmp88_;
	gint _tmp89_;
	gchar* _tmp90_;
	gchar* _tmp91_;
	gchar* _tmp92_;
	gchar* _tmp93_;
	gchar* _tmp94_;
	gchar* _tmp95_;
	guint _tmp96_;
	guint _tmp97_;
	guint _tmp98_;
	gdouble _tmp99_;
	gchar* _tmp100_;
	gchar* _tmp101_;
	gchar* _tmp102_;
	gchar* _tmp103_;
	gchar* _tmp104_;
	gchar* _tmp105_;
	gchar* _tmp106_;
	const gchar* _tmp107_;
	guint _tmp108_;
	guint _tmp109_;
	guint _tmp110_;
	gdouble _tmp111_;
	gchar* _tmp112_;
	gchar* _tmp113_;
	gchar* _tmp114_;
	gchar* _tmp115_;
	const gchar* _tmp116_;
	gint _tmp117_;
	gchar* _tmp118_;
	gchar* _tmp119_;
	gchar* _tmp120_;
	gchar* _tmp121_;
	gchar* _tmp122_;
	gchar* _tmp123_;
	gchar* _tmp124_;
	gchar* _tmp125_;
	gchar* _tmp126_;
	GtkCssProvider* css_provider = NULL;
	GtkCssProvider* _tmp127_;
	const gchar* _tmp132_;
	GdkScreen* _tmp134_;
	GtkCssProvider* _tmp135_;
	GError * _inner_error_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = gdk_display_get_default ();
	_tmp1_ = _g_object_ref0 (_tmp0_);
	display = _tmp1_;
	_tmp3_ = display;
	if (_tmp3_ != NULL) {
		GdkDisplay* _tmp4_;
		GdkScreen* _tmp5_;
		_tmp4_ = display;
		_tmp5_ = gdk_display_get_default_screen (_tmp4_);
		_tmp2_ = _tmp5_;
	} else {
		_tmp2_ = NULL;
	}
	_tmp6_ = _g_object_ref0 (_tmp2_);
	screen = _tmp6_;
	_tmp7_ = screen;
	if (_tmp7_ == NULL) {
		g_warning ("emojier.vala:737: Could not open display.");
		_g_object_unref0 (screen);
		_g_object_unref0 (display);
		return;
	}
	_tmp8_ = setlocale (LC_NUMERIC, NULL);
	_tmp9_ = g_strdup (_tmp8_);
	backup_locale = _tmp9_;
	_tmp10_ = setlocale (LC_NUMERIC, "en_US.UTF-8");
	if (_tmp10_ == NULL) {
		const gchar* _tmp11_;
		_tmp11_ = setlocale (LC_NUMERIC, "C.UTF-8");
		if (_tmp11_ == NULL) {
			const gchar* _tmp12_;
			_tmp12_ = setlocale (LC_NUMERIC, "C");
			if (_tmp12_ == NULL) {
				g_warning ("emojier.vala:746: %s", "You don't install either en_US.UTF-8 or C.UTF-8 " "or C locale");
			}
		}
	}
	_tmp13_ = self->priv->m_rgba;
	if (_tmp13_ == NULL) {
		ThemedRGBA* _tmp14_;
		_tmp14_ = themed_rgba_new ((GtkWidget*) self);
		_themed_rgba_unref0 (self->priv->m_rgba);
		self->priv->m_rgba = _tmp14_;
	}
	_tmp15_ = self->priv->m_rgba;
	_tmp16_ = themed_rgba_get_normal_bg (_tmp15_);
	_tmp17_ = _tmp16_;
	_tmp18_ = (*_tmp17_).red;
	bg_red = (guint) (_tmp18_ * 255);
	_tmp19_ = self->priv->m_rgba;
	_tmp20_ = themed_rgba_get_normal_bg (_tmp19_);
	_tmp21_ = _tmp20_;
	_tmp22_ = (*_tmp21_).green;
	bg_green = (guint) (_tmp22_ * 255);
	_tmp23_ = self->priv->m_rgba;
	_tmp24_ = themed_rgba_get_normal_bg (_tmp23_);
	_tmp25_ = _tmp24_;
	_tmp26_ = (*_tmp25_).blue;
	bg_blue = (guint) (_tmp26_ * 255);
	_tmp27_ = self->priv->m_rgba;
	_tmp28_ = themed_rgba_get_normal_bg (_tmp27_);
	_tmp29_ = _tmp28_;
	_tmp30_ = (*_tmp29_).alpha;
	bg_alpha = _tmp30_;
	_tmp31_ = bg_red;
	_tmp32_ = bg_green;
	_tmp33_ = bg_blue;
	_tmp34_ = bg_alpha;
	_tmp35_ = g_strdup_printf ("rgba(%u, %u, %u, %lf); ", _tmp31_, _tmp32_, _tmp33_, _tmp34_);
	_tmp36_ = _tmp35_;
	_tmp37_ = g_strconcat ("#IBusEmojierWhiteLabel { background-color: ", _tmp36_, NULL);
	_tmp38_ = _tmp37_;
	_tmp39_ = ibus_emojier_m_emoji_font_family;
	_tmp40_ = ibus_emojier_m_emoji_font_size;
	_tmp41_ = g_strdup_printf ("font-family: %s; font-size: %dpt; ", _tmp39_, _tmp40_);
	_tmp42_ = _tmp41_;
	_tmp43_ = g_strconcat (_tmp38_, _tmp42_, NULL);
	_tmp44_ = _tmp43_;
	_tmp45_ = g_strconcat (_tmp44_, "border-width: 4px; border-radius: 3px; } ", NULL);
	_tmp46_ = _tmp45_;
	_g_free0 (_tmp44_);
	_g_free0 (_tmp42_);
	_g_free0 (_tmp38_);
	_g_free0 (_tmp36_);
	data = _tmp46_;
	_tmp47_ = self->priv->m_rgba;
	_tmp48_ = themed_rgba_get_selected_fg (_tmp47_);
	_tmp49_ = _tmp48_;
	_tmp50_ = (*_tmp49_).red;
	fg_red = (guint) (_tmp50_ * 255);
	_tmp51_ = self->priv->m_rgba;
	_tmp52_ = themed_rgba_get_selected_fg (_tmp51_);
	_tmp53_ = _tmp52_;
	_tmp54_ = (*_tmp53_).green;
	fg_green = (guint) (_tmp54_ * 255);
	_tmp55_ = self->priv->m_rgba;
	_tmp56_ = themed_rgba_get_selected_fg (_tmp55_);
	_tmp57_ = _tmp56_;
	_tmp58_ = (*_tmp57_).blue;
	fg_blue = (guint) (_tmp58_ * 255);
	_tmp59_ = self->priv->m_rgba;
	_tmp60_ = themed_rgba_get_selected_fg (_tmp59_);
	_tmp61_ = _tmp60_;
	_tmp62_ = (*_tmp61_).alpha;
	fg_alpha = _tmp62_;
	_tmp63_ = self->priv->m_rgba;
	_tmp64_ = themed_rgba_get_selected_bg (_tmp63_);
	_tmp65_ = _tmp64_;
	_tmp66_ = (*_tmp65_).red;
	bg_red = (guint) (_tmp66_ * 255);
	_tmp67_ = self->priv->m_rgba;
	_tmp68_ = themed_rgba_get_selected_bg (_tmp67_);
	_tmp69_ = _tmp68_;
	_tmp70_ = (*_tmp69_).green;
	bg_green = (guint) (_tmp70_ * 255);
	_tmp71_ = self->priv->m_rgba;
	_tmp72_ = themed_rgba_get_selected_bg (_tmp71_);
	_tmp73_ = _tmp72_;
	_tmp74_ = (*_tmp73_).blue;
	bg_blue = (guint) (_tmp74_ * 255);
	_tmp75_ = self->priv->m_rgba;
	_tmp76_ = themed_rgba_get_selected_bg (_tmp75_);
	_tmp77_ = _tmp76_;
	_tmp78_ = (*_tmp77_).alpha;
	bg_alpha = _tmp78_;
	_tmp79_ = data;
	_tmp80_ = fg_red;
	_tmp81_ = fg_green;
	_tmp82_ = fg_blue;
	_tmp83_ = fg_alpha;
	_tmp84_ = g_strdup_printf ("rgba(%u, %u, %u, %lf); ", _tmp80_, _tmp81_, _tmp82_, _tmp83_);
	_tmp85_ = _tmp84_;
	_tmp86_ = g_strconcat ("#IBusEmojierSelectedLabel { color: ", _tmp85_, NULL);
	_tmp87_ = _tmp86_;
	_tmp88_ = ibus_emojier_m_emoji_font_family;
	_tmp89_ = ibus_emojier_m_emoji_font_size;
	_tmp90_ = g_strdup_printf ("font-family: %s; font-size: %dpt; ", _tmp88_, _tmp89_);
	_tmp91_ = _tmp90_;
	_tmp92_ = g_strconcat (_tmp87_, _tmp91_, NULL);
	_tmp93_ = _tmp92_;
	_tmp94_ = g_strconcat (_tmp93_, "background-color: ", NULL);
	_tmp95_ = _tmp94_;
	_tmp96_ = bg_red;
	_tmp97_ = bg_green;
	_tmp98_ = bg_blue;
	_tmp99_ = bg_alpha;
	_tmp100_ = g_strdup_printf ("rgba(%u, %u, %u, %lf); ", _tmp96_, _tmp97_, _tmp98_, _tmp99_);
	_tmp101_ = _tmp100_;
	_tmp102_ = g_strconcat (_tmp95_, _tmp101_, NULL);
	_tmp103_ = _tmp102_;
	_tmp104_ = g_strconcat (_tmp103_, "border-width: 4px; border-radius: 3px; }", NULL);
	_tmp105_ = _tmp104_;
	_tmp106_ = g_strconcat (_tmp79_, _tmp105_, NULL);
	_g_free0 (data);
	data = _tmp106_;
	_g_free0 (_tmp105_);
	_g_free0 (_tmp103_);
	_g_free0 (_tmp101_);
	_g_free0 (_tmp95_);
	_g_free0 (_tmp93_);
	_g_free0 (_tmp91_);
	_g_free0 (_tmp87_);
	_g_free0 (_tmp85_);
	_tmp107_ = data;
	_tmp108_ = fg_red;
	_tmp109_ = fg_green;
	_tmp110_ = fg_blue;
	_tmp111_ = fg_alpha;
	_tmp112_ = g_strdup_printf ("rgba(%u, %u, %u, %lf); ", _tmp108_, _tmp109_, _tmp110_, _tmp111_);
	_tmp113_ = _tmp112_;
	_tmp114_ = g_strconcat ("#IBusEmojierGoldLabel { color: ", _tmp113_, NULL);
	_tmp115_ = _tmp114_;
	_tmp116_ = ibus_emojier_m_emoji_font_family;
	_tmp117_ = ibus_emojier_m_emoji_font_size;
	_tmp118_ = g_strdup_printf ("font-family: %s; font-size: %dpt; ", _tmp116_, _tmp117_);
	_tmp119_ = _tmp118_;
	_tmp120_ = g_strconcat (_tmp115_, _tmp119_, NULL);
	_tmp121_ = _tmp120_;
	_tmp122_ = g_strconcat (_tmp121_, "background-color: #b09c5f; ", NULL);
	_tmp123_ = _tmp122_;
	_tmp124_ = g_strconcat (_tmp123_, "border-width: 4px; border-radius: 3px; }", NULL);
	_tmp125_ = _tmp124_;
	_tmp126_ = g_strconcat (_tmp107_, _tmp125_, NULL);
	_g_free0 (data);
	data = _tmp126_;
	_g_free0 (_tmp125_);
	_g_free0 (_tmp123_);
	_g_free0 (_tmp121_);
	_g_free0 (_tmp119_);
	_g_free0 (_tmp115_);
	_g_free0 (_tmp113_);
	_tmp127_ = gtk_css_provider_new ();
	css_provider = _tmp127_;
	{
		GtkCssProvider* _tmp128_;
		const gchar* _tmp129_;
		_tmp128_ = css_provider;
		_tmp129_ = data;
		gtk_css_provider_load_from_data (_tmp128_, _tmp129_, (gssize) -1, &_inner_error_);
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			goto __catch1_g_error;
		}
	}
	goto __finally1;
	__catch1_g_error:
	{
		GError* e = NULL;
		GError* _tmp130_;
		const gchar* _tmp131_;
		e = _inner_error_;
		_inner_error_ = NULL;
		_tmp130_ = e;
		_tmp131_ = _tmp130_->message;
		g_warning ("emojier.vala:794: Failed css_provider_from_data: %s", _tmp131_);
		_g_error_free0 (e);
		_g_object_unref0 (css_provider);
		_g_free0 (data);
		_g_free0 (backup_locale);
		_g_object_unref0 (screen);
		_g_object_unref0 (display);
		return;
	}
	__finally1:
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		_g_object_unref0 (css_provider);
		_g_free0 (data);
		_g_free0 (backup_locale);
		_g_object_unref0 (screen);
		_g_object_unref0 (display);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return;
	}
	_tmp132_ = backup_locale;
	if (_tmp132_ != NULL) {
		const gchar* _tmp133_;
		_tmp133_ = backup_locale;
		setlocale (LC_NUMERIC, _tmp133_);
	} else {
		setlocale (LC_NUMERIC, "");
	}
	_tmp134_ = screen;
	_tmp135_ = css_provider;
	gtk_style_context_add_provider_for_screen (_tmp134_, (GtkStyleProvider*) _tmp135_, (guint) GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
	_g_object_unref0 (css_provider);
	_g_free0 (data);
	_g_free0 (backup_locale);
	_g_object_unref0 (screen);
	_g_object_unref0 (display);
}


static void
ibus_emojier_set_fixed_size (IBusEmojier* self)
{
	g_return_if_fail (self != NULL);
	gtk_window_resize ((GtkWindow*) self, 20, 1);
}


static void
ibus_emojier_remove_all_children (IBusEmojier* self)
{
	IBusEmojierEListBox* _tmp0_;
	GtkBox* _tmp5_;
	GList* _tmp6_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->m_list_box;
	if (_tmp0_ != NULL) {
		IBusEmojierEListBox* _tmp1_;
		GList* _tmp2_;
		_tmp1_ = self->priv->m_list_box;
		_tmp2_ = gtk_container_get_children ((GtkContainer*) _tmp1_);
		{
			GList* w_collection = NULL;
			GList* w_it = NULL;
			w_collection = _tmp2_;
			for (w_it = w_collection; w_it != NULL; w_it = w_it->next) {
				GtkWidget* _tmp3_;
				GtkWidget* w = NULL;
				_tmp3_ = _g_object_ref0 ((GtkWidget*) w_it->data);
				w = _tmp3_;
				{
					GtkWidget* _tmp4_;
					_tmp4_ = w;
					gtk_widget_destroy (_tmp4_);
					_g_object_unref0 (w);
				}
			}
			(w_collection == NULL) ? NULL : (w_collection = (g_list_free (w_collection), NULL));
		}
		_g_object_unref0 (self->priv->m_list_box);
		self->priv->m_list_box = NULL;
	}
	_tmp5_ = self->priv->m_vbox;
	_tmp6_ = gtk_container_get_children ((GtkContainer*) _tmp5_);
	{
		GList* w_collection = NULL;
		GList* w_it = NULL;
		w_collection = _tmp6_;
		for (w_it = w_collection; w_it != NULL; w_it = w_it->next) {
			GtkWidget* _tmp7_;
			GtkWidget* w = NULL;
			_tmp7_ = _g_object_ref0 ((GtkWidget*) w_it->data);
			w = _tmp7_;
			{
				gboolean _tmp8_ = FALSE;
				GtkWidget* _tmp9_;
				const gchar* _tmp10_;
				const gchar* _tmp11_;
				GtkWidget* _tmp15_;
				_tmp9_ = w;
				_tmp10_ = gtk_widget_get_name (_tmp9_);
				_tmp11_ = _tmp10_;
				if (g_strcmp0 (_tmp11_, "IBusEmojierEntry") == 0) {
					_tmp8_ = TRUE;
				} else {
					GtkWidget* _tmp12_;
					const gchar* _tmp13_;
					const gchar* _tmp14_;
					_tmp12_ = w;
					_tmp13_ = gtk_widget_get_name (_tmp12_);
					_tmp14_ = _tmp13_;
					_tmp8_ = g_strcmp0 (_tmp14_, "IBusEmojierTitleLabelBox") == 0;
				}
				if (_tmp8_) {
					_g_object_unref0 (w);
					continue;
				}
				_tmp15_ = w;
				gtk_widget_destroy (_tmp15_);
				_g_object_unref0 (w);
			}
		}
		(w_collection == NULL) ? NULL : (w_collection = (g_list_free (w_collection), NULL));
	}
}


static void
ibus_emojier_clamp_page (IBusEmojier* self)
{
	GtkListBoxRow* row = NULL;
	gint _tmp0_;
	GtkAllocation alloc = {0};
	GtkAllocation _tmp10_ = {0};
	GtkListBoxRow* _tmp11_;
	GtkAllocation _tmp12_ = {0};
	GtkAdjustment* adjustment = NULL;
	IBusEmojierEScrolledWindow* _tmp13_;
	GtkAdjustment* _tmp14_;
	GtkAdjustment* _tmp15_;
	GtkAllocation _tmp16_;
	gint _tmp17_;
	GtkAllocation _tmp18_;
	gint _tmp19_;
	GtkAllocation _tmp20_;
	gint _tmp21_;
	gint _tmp22_;
	IBusLookupTable* _tmp23_;
	gint _tmp24_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->m_category_active_index;
	if (_tmp0_ >= 0) {
		IBusEmojierEListBox* _tmp1_;
		gint _tmp2_;
		GtkListBoxRow* _tmp3_;
		GtkListBoxRow* _tmp4_;
		IBusEmojierEListBox* _tmp5_;
		GtkListBoxRow* _tmp6_;
		_tmp1_ = self->priv->m_list_box;
		_tmp2_ = self->priv->m_category_active_index;
		_tmp3_ = gtk_list_box_get_row_at_index ((GtkListBox*) _tmp1_, _tmp2_);
		_tmp4_ = _g_object_ref0 (_tmp3_);
		_g_object_unref0 (row);
		row = _tmp4_;
		_tmp5_ = self->priv->m_list_box;
		_tmp6_ = row;
		gtk_list_box_select_row ((GtkListBox*) _tmp5_, _tmp6_);
	} else {
		IBusEmojierEListBox* _tmp7_;
		GtkListBoxRow* _tmp8_;
		GtkListBoxRow* _tmp9_;
		_tmp7_ = self->priv->m_list_box;
		_tmp8_ = gtk_list_box_get_row_at_index ((GtkListBox*) _tmp7_, 0);
		_tmp9_ = _g_object_ref0 (_tmp8_);
		_g_object_unref0 (row);
		row = _tmp9_;
	}
	_tmp10_.x = 0;
	_tmp10_.y = 0;
	_tmp10_.width = 0;
	_tmp10_.height = 0;
	alloc = _tmp10_;
	_tmp11_ = row;
	gtk_widget_get_allocation ((GtkWidget*) _tmp11_, &_tmp12_);
	alloc = _tmp12_;
	_tmp13_ = self->priv->m_scrolled_window;
	_tmp14_ = gtk_scrolled_window_get_vadjustment ((GtkScrolledWindow*) _tmp13_);
	_tmp15_ = _g_object_ref0 (_tmp14_);
	adjustment = _tmp15_;
	_tmp16_ = alloc;
	_tmp17_ = _tmp16_.y;
	_tmp18_ = alloc;
	_tmp19_ = _tmp18_.y;
	_tmp20_ = alloc;
	_tmp21_ = _tmp20_.height;
	gtk_adjustment_clamp_page (adjustment, (gdouble) _tmp17_, (gdouble) (_tmp19_ + _tmp21_));
	_tmp22_ = self->priv->m_category_active_index;
	g_return_val_if_fail (_tmp22_ >= 0, FALSE);
	_tmp23_ = self->priv->m_lookup_table;
	_tmp24_ = self->priv->m_category_active_index;
	ibus_lookup_table_set_cursor_pos (_tmp23_, (guint) _tmp24_);
	_g_object_unref0 (adjustment);
	_g_object_unref0 (row);
}


static void
__lambda25_ (IBusEmojier* self,
             GtkListBox* box,
             GtkListBoxRow* gtkrow)
{
	IBusEmojierEBoxRow* row = NULL;
	IBusEmojierEBoxRow* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	g_return_if_fail (box != NULL);
	g_return_if_fail (gtkrow != NULL);
	self->priv->m_category_active_index = gtk_list_box_row_get_index (gtkrow);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (gtkrow, IBUS_EMOJIER_TYPE_EBOX_ROW) ? ((IBusEmojierEBoxRow*) gtkrow) : NULL);
	row = _tmp0_;
	_tmp1_ = ibus_emojier_ebox_row_get_text (row);
	_tmp2_ = _tmp1_;
	ibus_emojier_show_emoji_for_category (self, _tmp2_);
	gtk_widget_show_all ((GtkWidget*) self);
	_g_object_unref0 (row);
}


static void
___lambda25__gtk_list_box_row_activated (GtkListBox* _sender,
                                         GtkListBoxRow* row,
                                         gpointer self)
{
	__lambda25_ ((IBusEmojier*) self, _sender, row);
}


static void
ibus_emojier_show_category_list (IBusEmojier* self)
{
	gboolean _tmp0_ = FALSE;
	gint _tmp1_;
	gint _tmp9_;
	IBusEmojierEScrolledWindow* _tmp10_;
	GtkBox* _tmp11_;
	IBusEmojierEScrolledWindow* _tmp12_;
	GtkViewport* viewport = NULL;
	GtkViewport* _tmp13_;
	IBusEmojierEScrolledWindow* _tmp14_;
	GtkViewport* _tmp15_;
	IBusEmojierEListBox* _tmp16_;
	GtkViewport* _tmp17_;
	IBusEmojierEListBox* _tmp18_;
	GtkAdjustment* adjustment = NULL;
	IBusEmojierEScrolledWindow* _tmp19_;
	GtkAdjustment* _tmp20_;
	GtkAdjustment* _tmp21_;
	IBusEmojierEListBox* _tmp22_;
	GtkAdjustment* _tmp23_;
	IBusEmojierEListBox* _tmp24_;
	guint ncandidates = 0U;
	IBusLookupTable* _tmp25_;
	IBusEmojierEScrolledWindow* _tmp47_;
	gint _tmp48_;
	IBusEmojierEListBox* _tmp50_;
	IBusEmojierEListBox* _tmp51_;
	g_return_if_fail (self != NULL);
	_tmp1_ = self->priv->m_category_active_index;
	if (_tmp1_ >= 0) {
		IBusEmojierEListBox* _tmp2_;
		_tmp2_ = self->priv->m_list_box;
		_tmp0_ = _tmp2_ != NULL;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		GtkListBoxRow* row = NULL;
		IBusEmojierEListBox* _tmp3_;
		gint _tmp4_;
		GtkListBoxRow* _tmp5_;
		GtkListBoxRow* _tmp6_;
		IBusEmojierEListBox* _tmp7_;
		GtkListBoxRow* _tmp8_;
		_tmp3_ = self->priv->m_list_box;
		_tmp4_ = self->priv->m_category_active_index;
		_tmp5_ = gtk_list_box_get_row_at_index ((GtkListBox*) _tmp3_, _tmp4_);
		_tmp6_ = _g_object_ref0 (_tmp5_);
		row = _tmp6_;
		_tmp7_ = self->priv->m_list_box;
		_tmp8_ = row;
		gtk_list_box_select_row ((GtkListBox*) _tmp7_, _tmp8_);
		_g_object_unref0 (row);
		return;
	}
	_tmp9_ = self->priv->m_category_active_index;
	if (_tmp9_ < 0) {
		self->priv->m_category_active_index = 0;
	}
	ibus_emojier_remove_all_children (self);
	_tmp10_ = ibus_emojier_escrolled_window_new (NULL, NULL);
	g_object_ref_sink (_tmp10_);
	_g_object_unref0 (self->priv->m_scrolled_window);
	self->priv->m_scrolled_window = _tmp10_;
	ibus_emojier_set_fixed_size (self);
	_tmp11_ = self->priv->m_vbox;
	_tmp12_ = self->priv->m_scrolled_window;
	gtk_container_add ((GtkContainer*) _tmp11_, (GtkWidget*) _tmp12_);
	_tmp13_ = (GtkViewport*) gtk_viewport_new (NULL, NULL);
	g_object_ref_sink (_tmp13_);
	viewport = _tmp13_;
	_tmp14_ = self->priv->m_scrolled_window;
	_tmp15_ = viewport;
	gtk_container_add ((GtkContainer*) _tmp14_, (GtkWidget*) _tmp15_);
	_tmp16_ = ibus_emojier_elist_box_new ();
	g_object_ref_sink (_tmp16_);
	_g_object_unref0 (self->priv->m_list_box);
	self->priv->m_list_box = _tmp16_;
	_tmp17_ = viewport;
	_tmp18_ = self->priv->m_list_box;
	gtk_container_add ((GtkContainer*) _tmp17_, (GtkWidget*) _tmp18_);
	_tmp19_ = self->priv->m_scrolled_window;
	_tmp20_ = gtk_scrolled_window_get_vadjustment ((GtkScrolledWindow*) _tmp19_);
	_tmp21_ = _g_object_ref0 (_tmp20_);
	adjustment = _tmp21_;
	_tmp22_ = self->priv->m_list_box;
	_tmp23_ = adjustment;
	gtk_list_box_set_adjustment ((GtkListBox*) _tmp22_, _tmp23_);
	_tmp24_ = self->priv->m_list_box;
	g_signal_connect_object ((GtkListBox*) _tmp24_, "row-activated", (GCallback) ___lambda25__gtk_list_box_row_activated, self, 0);
	_tmp25_ = self->priv->m_lookup_table;
	ncandidates = ibus_lookup_table_get_number_of_candidates (_tmp25_);
	{
		guint i = 0U;
		i = (guint) 0;
		{
			gboolean _tmp26_ = FALSE;
			_tmp26_ = TRUE;
			while (TRUE) {
				guint _tmp28_;
				guint _tmp29_;
				gchar* category = NULL;
				IBusLookupTable* _tmp30_;
				guint _tmp31_;
				IBusText* _tmp32_;
				const gchar* _tmp33_;
				gchar* _tmp34_;
				IBusEmojierEBoxRow* row = NULL;
				const gchar* _tmp35_;
				IBusEmojierEBoxRow* _tmp36_;
				IBusEmojierEPaddedLabelBox* widget = NULL;
				const gchar* _tmp37_;
				IBusEmojierEPaddedLabelBox* _tmp38_;
				IBusEmojierEBoxRow* _tmp39_;
				IBusEmojierEPaddedLabelBox* _tmp40_;
				IBusEmojierEListBox* _tmp41_;
				IBusEmojierEBoxRow* _tmp42_;
				guint _tmp43_;
				gint _tmp44_;
				if (!_tmp26_) {
					guint _tmp27_;
					_tmp27_ = i;
					i = _tmp27_ + 1;
				}
				_tmp26_ = FALSE;
				_tmp28_ = i;
				_tmp29_ = ncandidates;
				if (!(_tmp28_ < _tmp29_)) {
					break;
				}
				_tmp30_ = self->priv->m_lookup_table;
				_tmp31_ = i;
				_tmp32_ = ibus_lookup_table_get_candidate (_tmp30_, _tmp31_);
				_tmp33_ = _tmp32_->text;
				_tmp34_ = g_strdup (_tmp33_);
				category = _tmp34_;
				_tmp35_ = category;
				_tmp36_ = ibus_emojier_ebox_row_new (_tmp35_);
				g_object_ref_sink (_tmp36_);
				row = _tmp36_;
				_tmp37_ = category;
				_tmp38_ = ibus_emojier_epadded_label_box_new (_ (_tmp37_), GTK_ALIGN_CENTER, IBUS_EMOJIER_TRAVEL_DIRECTION_NONE, NULL);
				g_object_ref_sink (_tmp38_);
				widget = _tmp38_;
				_tmp39_ = row;
				_tmp40_ = widget;
				gtk_container_add ((GtkContainer*) _tmp39_, (GtkWidget*) _tmp40_);
				_tmp41_ = self->priv->m_list_box;
				_tmp42_ = row;
				gtk_container_add ((GtkContainer*) _tmp41_, (GtkWidget*) _tmp42_);
				_tmp43_ = i;
				_tmp44_ = self->priv->m_category_active_index;
				if (_tmp43_ == ((guint) _tmp44_)) {
					IBusEmojierEListBox* _tmp45_;
					IBusEmojierEBoxRow* _tmp46_;
					_tmp45_ = self->priv->m_list_box;
					_tmp46_ = row;
					gtk_list_box_select_row ((GtkListBox*) _tmp45_, (GtkListBoxRow*) _tmp46_);
				}
				_g_object_unref0 (widget);
				_g_object_unref0 (row);
				_g_free0 (category);
			}
		}
	}
	_tmp47_ = self->priv->m_scrolled_window;
	gtk_widget_show_all ((GtkWidget*) _tmp47_);
	_tmp48_ = self->priv->m_category_active_index;
	if (_tmp48_ == -1) {
		IBusEmojierEListBox* _tmp49_;
		_tmp49_ = self->priv->m_list_box;
		gtk_list_box_unselect_all ((GtkListBox*) _tmp49_);
	}
	_tmp50_ = self->priv->m_list_box;
	gtk_list_box_invalidate_filter ((GtkListBox*) _tmp50_);
	_tmp51_ = self->priv->m_list_box;
	gtk_list_box_set_selection_mode ((GtkListBox*) _tmp51_, GTK_SELECTION_SINGLE);
	_g_object_unref0 (adjustment);
	_g_object_unref0 (viewport);
}


static void
ibus_emojier_show_emoji_for_category (IBusEmojier* self,
                                      const gchar* category)
{
	IBusLookupTable* _tmp16_;
	IBusText* _tmp17_;
	const gchar* _tmp18_;
	gchar* _tmp19_;
	gint _tmp20_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (category != NULL);
	if (g_strcmp0 (category, IBUS_EMOJIER_EMOJI_CATEGORY_FAVORITES) == 0) {
		IBusLookupTable* _tmp0_;
		gchar** _tmp1_;
		gint _tmp1__length1;
		gchar* _tmp6_;
		_tmp0_ = self->priv->m_lookup_table;
		ibus_lookup_table_clear (_tmp0_);
		self->priv->m_candidate_panel_mode = TRUE;
		_tmp1_ = ibus_emojier_m_favorites;
		_tmp1__length1 = ibus_emojier_m_favorites_length1;
		{
			gchar** favorate_collection = NULL;
			gint favorate_collection_length1 = 0;
			gint _favorate_collection_size_ = 0;
			gint favorate_it = 0;
			favorate_collection = _tmp1_;
			favorate_collection_length1 = _tmp1__length1;
			for (favorate_it = 0; favorate_it < _tmp1__length1; favorate_it = favorate_it + 1) {
				const gchar* favorate = NULL;
				favorate = favorate_collection[favorate_it];
				{
					IBusText* text = NULL;
					const gchar* _tmp2_;
					IBusText* _tmp3_;
					IBusLookupTable* _tmp4_;
					IBusText* _tmp5_;
					_tmp2_ = favorate;
					_tmp3_ = ibus_text_new_from_string (_tmp2_);
					g_object_ref_sink (_tmp3_);
					text = _tmp3_;
					_tmp4_ = self->priv->m_lookup_table;
					_tmp5_ = text;
					ibus_lookup_table_append_candidate (_tmp4_, _tmp5_);
					_g_object_unref0 (text);
				}
			}
		}
		_tmp6_ = g_strdup (category);
		_g_free0 (self->priv->m_backward);
		self->priv->m_backward = _tmp6_;
	} else {
		if (g_strcmp0 (category, IBUS_EMOJIER_EMOJI_CATEGORY_UNICODE) == 0) {
			self->priv->m_category_active_index = -1;
			ibus_emojier_m_show_unicode = TRUE;
			ibus_emojier_update_unicode_blocks (self);
			return;
		} else {
			GSList* emojis = NULL;
			GHashTable* _tmp7_;
			gconstpointer _tmp8_;
			IBusLookupTable* _tmp9_;
			GSList* _tmp10_;
			gchar* _tmp15_;
			_tmp7_ = ibus_emojier_m_category_to_emojis_dict;
			_tmp8_ = g_hash_table_lookup (_tmp7_, category);
			emojis = (GSList*) _tmp8_;
			_tmp9_ = self->priv->m_lookup_table;
			ibus_lookup_table_clear (_tmp9_);
			self->priv->m_candidate_panel_mode = TRUE;
			_tmp10_ = emojis;
			{
				GSList* emoji_collection = NULL;
				GSList* emoji_it = NULL;
				emoji_collection = _tmp10_;
				for (emoji_it = emoji_collection; emoji_it != NULL; emoji_it = emoji_it->next) {
					const gchar* emoji = NULL;
					emoji = (const gchar*) emoji_it->data;
					{
						IBusText* text = NULL;
						const gchar* _tmp11_;
						IBusText* _tmp12_;
						IBusLookupTable* _tmp13_;
						IBusText* _tmp14_;
						_tmp11_ = emoji;
						_tmp12_ = ibus_text_new_from_string (_tmp11_);
						g_object_ref_sink (_tmp12_);
						text = _tmp12_;
						_tmp13_ = self->priv->m_lookup_table;
						_tmp14_ = text;
						ibus_lookup_table_append_candidate (_tmp13_, _tmp14_);
						_g_object_unref0 (text);
					}
				}
			}
			_tmp15_ = g_strdup (category);
			_g_free0 (self->priv->m_backward);
			self->priv->m_backward = _tmp15_;
		}
	}
	_tmp16_ = self->priv->m_lookup_table;
	_tmp17_ = ibus_lookup_table_get_candidate (_tmp16_, (guint) 0);
	_tmp18_ = _tmp17_->text;
	_tmp19_ = g_strdup (_tmp18_);
	_g_free0 (self->priv->m_annotation);
	self->priv->m_annotation = _tmp19_;
	_tmp20_ = self->priv->m_backward_index;
	if (_tmp20_ >= 0) {
		IBusLookupTable* _tmp21_;
		gint _tmp22_;
		_tmp21_ = self->priv->m_lookup_table;
		_tmp22_ = self->priv->m_backward_index;
		ibus_lookup_table_set_cursor_pos (_tmp21_, (guint) _tmp22_);
		self->priv->m_backward_index = -1;
	}
}


static void
ibus_emojier_show_emoji_variants (IBusEmojier* self,
                                  GSList* emojis)
{
	IBusLookupTable* _tmp0_;
	IBusLookupTable* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->m_lookup_table;
	self->priv->m_backward_index = (gint) ibus_lookup_table_get_cursor_pos (_tmp0_);
	_tmp1_ = self->priv->m_lookup_table;
	ibus_lookup_table_clear (_tmp1_);
	{
		GSList* emoji_collection = NULL;
		GSList* emoji_it = NULL;
		emoji_collection = emojis;
		for (emoji_it = emoji_collection; emoji_it != NULL; emoji_it = emoji_it->next) {
			const gchar* emoji = NULL;
			emoji = (const gchar*) emoji_it->data;
			{
				IBusText* text = NULL;
				const gchar* _tmp2_;
				IBusText* _tmp3_;
				IBusLookupTable* _tmp4_;
				IBusText* _tmp5_;
				_tmp2_ = emoji;
				_tmp3_ = ibus_text_new_from_string (_tmp2_);
				g_object_ref_sink (_tmp3_);
				text = _tmp3_;
				_tmp4_ = self->priv->m_lookup_table;
				_tmp5_ = text;
				ibus_lookup_table_append_candidate (_tmp4_, _tmp5_);
				_g_object_unref0 (text);
			}
		}
	}
}


static gboolean
__lambda22_ (IBusEmojier* self,
             GtkWidget* w,
             GdkEventButton* e)
{
	gboolean result = FALSE;
	g_return_val_if_fail (w != NULL, FALSE);
	g_return_val_if_fail (e != NULL, FALSE);
	self->priv->m_category_active_index = -1;
	ibus_emojier_m_show_unicode = FALSE;
	ibus_emojier_hide_candidate_panel (self);
	gtk_widget_show_all ((GtkWidget*) self);
	result = TRUE;
	return result;
}


static gboolean
___lambda22__gtk_widget_button_press_event (GtkWidget* _sender,
                                            GdkEventButton* event,
                                            gpointer self)
{
	gboolean result;
	result = __lambda22_ ((IBusEmojier*) self, _sender, event);
	return result;
}


static void
__lambda23_ (IBusEmojier* self,
             GtkListBox* box,
             GtkListBoxRow* gtkrow)
{
	IBusEmojierEBoxRow* row = NULL;
	IBusEmojierEBoxRow* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	g_return_if_fail (box != NULL);
	g_return_if_fail (gtkrow != NULL);
	self->priv->m_category_active_index = gtk_list_box_row_get_index (gtkrow);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (gtkrow, IBUS_EMOJIER_TYPE_EBOX_ROW) ? ((IBusEmojierEBoxRow*) gtkrow) : NULL);
	row = _tmp0_;
	_tmp1_ = ibus_emojier_ebox_row_get_text (row);
	_tmp2_ = _tmp1_;
	ibus_emojier_show_unicode_for_block (self, _tmp2_);
	ibus_emojier_show_candidate_panel (self);
	_g_object_unref0 (row);
}


static void
___lambda23__gtk_list_box_row_activated (GtkListBox* _sender,
                                         GtkListBoxRow* row,
                                         gpointer self)
{
	__lambda23_ ((IBusEmojier*) self, _sender, row);
}


static void
__lambda24_ (IBusEmojier* self,
             GtkWidget* w,
             GtkAllocation* a)
{
	g_return_if_fail (w != NULL);
	g_return_if_fail (a != NULL);
	ibus_emojier_clamp_page (self);
}


static void
___lambda24__gtk_widget_size_allocate (GtkWidget* _sender,
                                       GtkAllocation* allocation,
                                       gpointer self)
{
	__lambda24_ ((IBusEmojier*) self, _sender, allocation);
}


static void
ibus_emojier_show_unicode_blocks (IBusEmojier* self)
{
	gboolean _tmp0_ = FALSE;
	gint _tmp1_;
	gint _tmp9_;
	gboolean _tmp10_ = FALSE;
	gint _tmp11_;
	IBusEmojierEPaddedLabelBox* label = NULL;
	IBusEmojierEPaddedLabelBox* _tmp15_;
	GtkButton* button = NULL;
	GtkButton* _tmp16_;
	GtkButton* _tmp17_;
	IBusEmojierEPaddedLabelBox* _tmp18_;
	GtkBox* _tmp19_;
	GtkButton* _tmp20_;
	GtkButton* _tmp21_;
	GtkButton* _tmp22_;
	IBusEmojierEScrolledWindow* _tmp23_;
	GtkBox* _tmp24_;
	IBusEmojierEScrolledWindow* _tmp25_;
	GtkViewport* viewport = NULL;
	GtkViewport* _tmp26_;
	IBusEmojierEScrolledWindow* _tmp27_;
	GtkViewport* _tmp28_;
	IBusEmojierEListBox* _tmp29_;
	GtkViewport* _tmp30_;
	IBusEmojierEListBox* _tmp31_;
	GtkAdjustment* adjustment = NULL;
	IBusEmojierEScrolledWindow* _tmp32_;
	GtkAdjustment* _tmp33_;
	GtkAdjustment* _tmp34_;
	IBusEmojierEListBox* _tmp35_;
	GtkAdjustment* _tmp36_;
	IBusEmojierEListBox* _tmp37_;
	guint n = 0U;
	GSList* _tmp38_;
	gint _tmp57_;
	IBusEmojierEScrolledWindow* _tmp58_;
	IBusEmojierEScrolledWindow* _tmp59_;
	gint _tmp60_;
	IBusEmojierEListBox* _tmp62_;
	IBusEmojierEListBox* _tmp63_;
	GtkListBoxRow* row = NULL;
	IBusEmojierEListBox* _tmp64_;
	guint _tmp65_;
	GtkListBoxRow* _tmp66_;
	GtkListBoxRow* _tmp67_;
	GtkListBoxRow* _tmp68_;
	g_return_if_fail (self != NULL);
	_tmp1_ = self->priv->m_category_active_index;
	if (_tmp1_ >= 0) {
		IBusEmojierEListBox* _tmp2_;
		_tmp2_ = self->priv->m_list_box;
		_tmp0_ = _tmp2_ != NULL;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		GtkListBoxRow* row = NULL;
		IBusEmojierEListBox* _tmp3_;
		gint _tmp4_;
		GtkListBoxRow* _tmp5_;
		GtkListBoxRow* _tmp6_;
		IBusEmojierEListBox* _tmp7_;
		GtkListBoxRow* _tmp8_;
		_tmp3_ = self->priv->m_list_box;
		_tmp4_ = self->priv->m_category_active_index;
		_tmp5_ = gtk_list_box_get_row_at_index ((GtkListBox*) _tmp3_, _tmp4_);
		_tmp6_ = _g_object_ref0 (_tmp5_);
		row = _tmp6_;
		_tmp7_ = self->priv->m_list_box;
		_tmp8_ = row;
		gtk_list_box_select_row ((GtkListBox*) _tmp7_, _tmp8_);
		_g_object_unref0 (row);
		return;
	}
	_tmp9_ = self->priv->m_category_active_index;
	if (_tmp9_ < 0) {
		self->priv->m_category_active_index = 0;
	}
	ibus_emojier_m_show_unicode = TRUE;
	_tmp11_ = ibus_emojier_m_default_window_width;
	if (_tmp11_ == 0) {
		gint _tmp12_;
		_tmp12_ = ibus_emojier_m_default_window_height;
		_tmp10_ = _tmp12_ == 0;
	} else {
		_tmp10_ = FALSE;
	}
	if (_tmp10_) {
		gint _tmp13_ = 0;
		gint _tmp14_ = 0;
		gtk_window_get_size ((GtkWindow*) self, &_tmp13_, &_tmp14_);
		ibus_emojier_m_default_window_width = _tmp13_;
		ibus_emojier_m_default_window_height = _tmp14_;
	}
	ibus_emojier_remove_all_children (self);
	ibus_emojier_set_fixed_size (self);
	_tmp15_ = ibus_emojier_epadded_label_box_new (_ ("Bring back emoji choice"), GTK_ALIGN_CENTER, IBUS_EMOJIER_TRAVEL_DIRECTION_BACKWARD, NULL);
	g_object_ref_sink (_tmp15_);
	label = _tmp15_;
	_tmp16_ = (GtkButton*) gtk_button_new ();
	g_object_ref_sink (_tmp16_);
	button = _tmp16_;
	_tmp17_ = button;
	_tmp18_ = label;
	gtk_container_add ((GtkContainer*) _tmp17_, (GtkWidget*) _tmp18_);
	_tmp19_ = self->priv->m_vbox;
	_tmp20_ = button;
	gtk_container_add ((GtkContainer*) _tmp19_, (GtkWidget*) _tmp20_);
	_tmp21_ = button;
	gtk_widget_show_all ((GtkWidget*) _tmp21_);
	_tmp22_ = button;
	g_signal_connect_object ((GtkWidget*) _tmp22_, "button-press-event", (GCallback) ___lambda22__gtk_widget_button_press_event, self, 0);
	_tmp23_ = ibus_emojier_escrolled_window_new (NULL, NULL);
	g_object_ref_sink (_tmp23_);
	_g_object_unref0 (self->priv->m_scrolled_window);
	self->priv->m_scrolled_window = _tmp23_;
	_tmp24_ = self->priv->m_vbox;
	_tmp25_ = self->priv->m_scrolled_window;
	gtk_container_add ((GtkContainer*) _tmp24_, (GtkWidget*) _tmp25_);
	_tmp26_ = (GtkViewport*) gtk_viewport_new (NULL, NULL);
	g_object_ref_sink (_tmp26_);
	viewport = _tmp26_;
	_tmp27_ = self->priv->m_scrolled_window;
	_tmp28_ = viewport;
	gtk_container_add ((GtkContainer*) _tmp27_, (GtkWidget*) _tmp28_);
	_tmp29_ = ibus_emojier_elist_box_new ();
	g_object_ref_sink (_tmp29_);
	_g_object_unref0 (self->priv->m_list_box);
	self->priv->m_list_box = _tmp29_;
	_tmp30_ = viewport;
	_tmp31_ = self->priv->m_list_box;
	gtk_container_add ((GtkContainer*) _tmp30_, (GtkWidget*) _tmp31_);
	_tmp32_ = self->priv->m_scrolled_window;
	_tmp33_ = gtk_scrolled_window_get_vadjustment ((GtkScrolledWindow*) _tmp32_);
	_tmp34_ = _g_object_ref0 (_tmp33_);
	adjustment = _tmp34_;
	_tmp35_ = self->priv->m_list_box;
	_tmp36_ = adjustment;
	gtk_list_box_set_adjustment ((GtkListBox*) _tmp35_, _tmp36_);
	_tmp37_ = self->priv->m_list_box;
	g_signal_connect_object ((GtkListBox*) _tmp37_, "row-activated", (GCallback) ___lambda23__gtk_list_box_row_activated, self, 0);
	n = (guint) 0;
	_tmp38_ = ibus_emojier_m_unicode_block_list;
	{
		GSList* block_collection = NULL;
		GSList* block_it = NULL;
		block_collection = _tmp38_;
		for (block_it = block_collection; block_it != NULL; block_it = block_it->next) {
			IBusUnicodeBlock* block = NULL;
			block = (IBusUnicodeBlock*) block_it->data;
			{
				gchar* name = NULL;
				IBusUnicodeBlock* _tmp39_;
				const gchar* _tmp40_;
				gchar* _tmp41_;
				gchar* caption = NULL;
				IBusUnicodeBlock* _tmp42_;
				gchar* _tmp43_;
				IBusEmojierEBoxRow* row = NULL;
				const gchar* _tmp44_;
				IBusEmojierEBoxRow* _tmp45_;
				IBusEmojierEPaddedLabelBox* widget = NULL;
				const gchar* _tmp46_;
				const gchar* _tmp47_;
				IBusEmojierEPaddedLabelBox* _tmp48_;
				IBusEmojierEBoxRow* _tmp49_;
				IBusEmojierEPaddedLabelBox* _tmp50_;
				IBusEmojierEListBox* _tmp51_;
				IBusEmojierEBoxRow* _tmp52_;
				guint _tmp53_;
				gint _tmp54_;
				_tmp39_ = block;
				_tmp40_ = ibus_unicode_block_get_name (_tmp39_);
				_tmp41_ = g_strdup (_tmp40_);
				name = _tmp41_;
				_tmp42_ = block;
				_tmp43_ = g_strdup_printf ("U+%08X", (guint) ibus_unicode_block_get_start (_tmp42_));
				caption = _tmp43_;
				_tmp44_ = name;
				_tmp45_ = ibus_emojier_ebox_row_new (_tmp44_);
				g_object_ref_sink (_tmp45_);
				row = _tmp45_;
				_tmp46_ = name;
				_tmp47_ = caption;
				_tmp48_ = ibus_emojier_epadded_label_box_new (_ (_tmp46_), GTK_ALIGN_CENTER, IBUS_EMOJIER_TRAVEL_DIRECTION_NONE, _tmp47_);
				g_object_ref_sink (_tmp48_);
				widget = _tmp48_;
				_tmp49_ = row;
				_tmp50_ = widget;
				gtk_container_add ((GtkContainer*) _tmp49_, (GtkWidget*) _tmp50_);
				_tmp51_ = self->priv->m_list_box;
				_tmp52_ = row;
				gtk_container_add ((GtkContainer*) _tmp51_, (GtkWidget*) _tmp52_);
				_tmp53_ = n;
				n = _tmp53_ + 1;
				_tmp54_ = self->priv->m_category_active_index;
				if (_tmp53_ == ((guint) _tmp54_)) {
					IBusEmojierEListBox* _tmp55_;
					IBusEmojierEBoxRow* _tmp56_;
					_tmp55_ = self->priv->m_list_box;
					_tmp56_ = row;
					gtk_list_box_select_row ((GtkListBox*) _tmp55_, (GtkListBoxRow*) _tmp56_);
				}
				_g_object_unref0 (widget);
				_g_object_unref0 (row);
				_g_free0 (caption);
				_g_free0 (name);
			}
		}
	}
	_tmp57_ = ibus_emojier_m_default_window_height;
	gtk_widget_set_size_request ((GtkWidget*) self, -1, _tmp57_ + 100);
	_tmp58_ = self->priv->m_scrolled_window;
	gtk_scrolled_window_set_policy ((GtkScrolledWindow*) _tmp58_, GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
	_tmp59_ = self->priv->m_scrolled_window;
	gtk_widget_show_all ((GtkWidget*) _tmp59_);
	_tmp60_ = self->priv->m_category_active_index;
	if (_tmp60_ == -1) {
		IBusEmojierEListBox* _tmp61_;
		_tmp61_ = self->priv->m_list_box;
		gtk_list_box_unselect_all ((GtkListBox*) _tmp61_);
	}
	_tmp62_ = self->priv->m_list_box;
	gtk_list_box_invalidate_filter ((GtkListBox*) _tmp62_);
	_tmp63_ = self->priv->m_list_box;
	gtk_list_box_set_selection_mode ((GtkListBox*) _tmp63_, GTK_SELECTION_SINGLE);
	_tmp64_ = self->priv->m_list_box;
	_tmp65_ = n;
	_tmp66_ = gtk_list_box_get_row_at_index ((GtkListBox*) _tmp64_, ((gint) _tmp65_) - 1);
	_tmp67_ = _g_object_ref0 (_tmp66_);
	row = _tmp67_;
	_tmp68_ = row;
	g_signal_connect_object ((GtkWidget*) _tmp68_, "size-allocate", (GCallback) ___lambda24__gtk_widget_size_allocate, self, 0);
	_g_object_unref0 (row);
	_g_object_unref0 (adjustment);
	_g_object_unref0 (viewport);
	_g_object_unref0 (button);
	_g_object_unref0 (label);
}


static void
ibus_emojier_show_unicode_for_block (IBusEmojier* self,
                                     const gchar* block_name)
{
	gunichar start = 0U;
	gunichar end = 0U;
	GSList* _tmp0_;
	IBusLookupTable* _tmp7_;
	gchar* _tmp21_;
	IBusLookupTable* _tmp22_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (block_name != NULL);
	start = (gunichar) 0;
	end = (gunichar) 0;
	_tmp0_ = ibus_emojier_m_unicode_block_list;
	{
		GSList* block_collection = NULL;
		GSList* block_it = NULL;
		block_collection = _tmp0_;
		for (block_it = block_collection; block_it != NULL; block_it = block_it->next) {
			IBusUnicodeBlock* block = NULL;
			block = (IBusUnicodeBlock*) block_it->data;
			{
				gchar* name = NULL;
				IBusUnicodeBlock* _tmp1_;
				const gchar* _tmp2_;
				gchar* _tmp3_;
				const gchar* _tmp4_;
				_tmp1_ = block;
				_tmp2_ = ibus_unicode_block_get_name (_tmp1_);
				_tmp3_ = g_strdup (_tmp2_);
				name = _tmp3_;
				_tmp4_ = name;
				if (g_strcmp0 (block_name, _tmp4_) == 0) {
					IBusUnicodeBlock* _tmp5_;
					IBusUnicodeBlock* _tmp6_;
					_tmp5_ = block;
					start = ibus_unicode_block_get_start (_tmp5_);
					_tmp6_ = block;
					end = ibus_unicode_block_get_end (_tmp6_);
				}
				_g_free0 (name);
			}
		}
	}
	_tmp7_ = self->priv->m_lookup_table;
	ibus_lookup_table_clear (_tmp7_);
	self->priv->m_candidate_panel_mode = TRUE;
	{
		gunichar ch = 0U;
		gunichar _tmp8_;
		_tmp8_ = start;
		ch = _tmp8_;
		{
			gboolean _tmp9_ = FALSE;
			_tmp9_ = TRUE;
			while (TRUE) {
				gunichar _tmp11_;
				gunichar _tmp12_;
				IBusUnicodeData* data = NULL;
				GHashTable* _tmp13_;
				gunichar _tmp14_;
				gconstpointer _tmp15_;
				IBusUnicodeData* _tmp16_;
				IBusText* text = NULL;
				gunichar _tmp17_;
				IBusText* _tmp18_;
				IBusLookupTable* _tmp19_;
				IBusText* _tmp20_;
				if (!_tmp9_) {
					gunichar _tmp10_;
					_tmp10_ = ch;
					ch = _tmp10_ + 1;
				}
				_tmp9_ = FALSE;
				_tmp11_ = ch;
				_tmp12_ = end;
				if (!(_tmp11_ < _tmp12_)) {
					break;
				}
				_tmp13_ = ibus_emojier_m_unicode_to_data_dict;
				_tmp14_ = ch;
				_tmp15_ = g_hash_table_lookup (_tmp13_, (gpointer) ((gintptr) _tmp14_));
				data = (IBusUnicodeData*) _tmp15_;
				_tmp16_ = data;
				if (_tmp16_ == NULL) {
					continue;
				}
				_tmp17_ = ch;
				_tmp18_ = ibus_text_new_from_unichar (_tmp17_);
				g_object_ref_sink (_tmp18_);
				text = _tmp18_;
				_tmp19_ = self->priv->m_lookup_table;
				_tmp20_ = text;
				ibus_lookup_table_append_candidate (_tmp19_, _tmp20_);
				_g_object_unref0 (text);
			}
		}
	}
	_tmp21_ = g_strdup (block_name);
	_g_free0 (self->priv->m_backward);
	self->priv->m_backward = _tmp21_;
	_tmp22_ = self->priv->m_lookup_table;
	if (ibus_lookup_table_get_number_of_candidates (_tmp22_) > ((guint) 0)) {
		IBusLookupTable* _tmp23_;
		IBusText* _tmp24_;
		const gchar* _tmp25_;
		gchar* _tmp26_;
		_tmp23_ = self->priv->m_lookup_table;
		_tmp24_ = ibus_lookup_table_get_candidate (_tmp23_, (guint) 0);
		_tmp25_ = _tmp24_->text;
		_tmp26_ = g_strdup (_tmp25_);
		_g_free0 (self->priv->m_annotation);
		self->priv->m_annotation = _tmp26_;
	}
}


static Block1Data*
block1_data_ref (Block1Data* _data1_)
{
	g_atomic_int_inc (&_data1_->_ref_count_);
	return _data1_;
}


static void
block1_data_unref (void * _userdata_)
{
	Block1Data* _data1_;
	_data1_ = (Block1Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data1_->_ref_count_)) {
		IBusEmojier* self;
		self = _data1_->self;
		_g_object_unref0 (_data1_->warning_button);
		_g_object_unref0 (self);
		g_slice_free (Block1Data, _data1_);
	}
}


static void
__lambda17_ (IBusEmojier* self)
{
	IBusLookupTable* _tmp0_;
	_tmp0_ = self->priv->m_lookup_table;
	ibus_lookup_table_page_down (_tmp0_);
	ibus_emojier_show_candidate_panel (self);
}


static void
___lambda17__gtk_button_clicked (GtkButton* _sender,
                                 gpointer self)
{
	__lambda17_ ((IBusEmojier*) self);
}


static void
__lambda18_ (IBusEmojier* self)
{
	IBusLookupTable* _tmp0_;
	_tmp0_ = self->priv->m_lookup_table;
	ibus_lookup_table_page_up (_tmp0_);
	ibus_emojier_show_candidate_panel (self);
}


static void
___lambda18__gtk_button_clicked (GtkButton* _sender,
                                 gpointer self)
{
	__lambda18_ ((IBusEmojier*) self);
}


static void
___lambda19_ (Block1Data* _data1_)
{
	IBusEmojier* self;
	GtkLabel* warning_label = NULL;
	const gchar* _tmp0_;
	GtkLabel* _tmp1_;
	GtkPopover* popover = NULL;
	GtkButton* _tmp2_;
	GtkPopover* _tmp3_;
	self = _data1_->self;
	_tmp0_ = ibus_emojier_m_warning_message;
	_tmp1_ = (GtkLabel*) gtk_label_new (_tmp0_);
	g_object_ref_sink (_tmp1_);
	warning_label = _tmp1_;
	gtk_label_set_line_wrap (warning_label, TRUE);
	gtk_label_set_max_width_chars (warning_label, 40);
	_tmp2_ = _data1_->warning_button;
	_tmp3_ = (GtkPopover*) gtk_popover_new ((GtkWidget*) _tmp2_);
	g_object_ref_sink (_tmp3_);
	popover = _tmp3_;
	gtk_container_add ((GtkContainer*) popover, (GtkWidget*) warning_label);
	gtk_widget_show_all ((GtkWidget*) popover);
	gtk_popover_popup (popover);
	_g_object_unref0 (popover);
	_g_object_unref0 (warning_label);
}


static void
____lambda19__gtk_button_clicked (GtkButton* _sender,
                                  gpointer self)
{
	___lambda19_ (self);
}


static void
ibus_emojier_show_arrow_buttons (IBusEmojier* self)
{
	Block1Data* _data1_;
	GtkButton* next_button = NULL;
	GtkButton* _tmp0_;
	GtkButton* _tmp1_;
	GtkButton* _tmp2_;
	GtkImage* _tmp3_;
	GtkImage* _tmp4_;
	GtkButton* _tmp5_;
	GtkButton* _tmp6_;
	GtkButton* prev_button = NULL;
	GtkButton* _tmp7_;
	GtkButton* _tmp8_;
	GtkButton* _tmp9_;
	GtkImage* _tmp10_;
	GtkImage* _tmp11_;
	GtkButton* _tmp12_;
	GtkButton* _tmp13_;
	GMenu* menu = NULL;
	GMenu* _tmp14_;
	GMenu* _tmp15_;
	GMenu* _tmp16_;
	GtkMenuButton* menu_button = NULL;
	GtkMenuButton* _tmp17_;
	GtkMenuButton* _tmp18_;
	GtkMenuButton* _tmp19_;
	GtkMenuButton* _tmp20_;
	GMenu* _tmp21_;
	GtkMenuButton* _tmp22_;
	GtkMenuButton* _tmp23_;
	IBusText* text = NULL;
	IBusText* _tmp24_;
	PangoAttrList* attrs = NULL;
	IBusText* _tmp25_;
	PangoAttrList* _tmp26_;
	GtkLabel* title_label = NULL;
	IBusText* _tmp27_;
	const gchar* _tmp28_;
	GtkLabel* _tmp29_;
	GtkLabel* _tmp30_;
	PangoAttrList* _tmp31_;
	const gchar* _tmp32_;
	GtkBox* buttons_hbox = NULL;
	GtkBox* _tmp40_;
	GtkLabel* state_label = NULL;
	GtkLabel* _tmp41_;
	GtkLabel* _tmp42_;
	GtkLabel* _tmp43_;
	GtkLabel* _tmp44_;
	GtkBox* _tmp45_;
	GtkLabel* _tmp46_;
	GtkBox* _tmp47_;
	GtkButton* _tmp48_;
	GtkBox* _tmp49_;
	GtkButton* _tmp50_;
	GtkBox* _tmp51_;
	GtkLabel* _tmp52_;
	GtkButton* _tmp53_;
	GtkBox* _tmp56_;
	GtkMenuButton* _tmp57_;
	GtkBox* _tmp58_;
	GtkBox* _tmp59_;
	GtkBox* _tmp60_;
	g_return_if_fail (self != NULL);
	_data1_ = g_slice_new0 (Block1Data);
	_data1_->_ref_count_ = 1;
	_data1_->self = g_object_ref (self);
	_tmp0_ = (GtkButton*) gtk_button_new ();
	g_object_ref_sink (_tmp0_);
	next_button = _tmp0_;
	_tmp1_ = next_button;
	g_signal_connect_object (_tmp1_, "clicked", (GCallback) ___lambda17__gtk_button_clicked, self, 0);
	_tmp2_ = next_button;
	_tmp3_ = (GtkImage*) gtk_image_new_from_icon_name ("go-down", (GtkIconSize) GTK_ICON_SIZE_MENU);
	g_object_ref_sink (_tmp3_);
	_tmp4_ = _tmp3_;
	gtk_button_set_image (_tmp2_, (GtkWidget*) _tmp4_);
	_g_object_unref0 (_tmp4_);
	_tmp5_ = next_button;
	gtk_button_set_relief (_tmp5_, GTK_RELIEF_NONE);
	_tmp6_ = next_button;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp6_, _ ("Page Down"));
	_tmp7_ = (GtkButton*) gtk_button_new ();
	g_object_ref_sink (_tmp7_);
	prev_button = _tmp7_;
	_tmp8_ = prev_button;
	g_signal_connect_object (_tmp8_, "clicked", (GCallback) ___lambda18__gtk_button_clicked, self, 0);
	_tmp9_ = prev_button;
	_tmp10_ = (GtkImage*) gtk_image_new_from_icon_name ("go-up", (GtkIconSize) GTK_ICON_SIZE_MENU);
	g_object_ref_sink (_tmp10_);
	_tmp11_ = _tmp10_;
	gtk_button_set_image (_tmp9_, (GtkWidget*) _tmp11_);
	_g_object_unref0 (_tmp11_);
	_tmp12_ = prev_button;
	gtk_button_set_relief (_tmp12_, GTK_RELIEF_NONE);
	_tmp13_ = prev_button;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp13_, _ ("Page Up"));
	_tmp14_ = g_menu_new ();
	menu = _tmp14_;
	_tmp15_ = menu;
	g_menu_append (_tmp15_, _ ("Show emoji variants"), "win.variant");
	_tmp16_ = menu;
	g_menu_append (_tmp16_, _ ("Close"), "win.close");
	_tmp17_ = (GtkMenuButton*) gtk_menu_button_new ();
	g_object_ref_sink (_tmp17_);
	menu_button = _tmp17_;
	_tmp18_ = menu_button;
	gtk_menu_button_set_direction (_tmp18_, GTK_ARROW_NONE);
	_tmp19_ = menu_button;
	gtk_widget_set_valign ((GtkWidget*) _tmp19_, GTK_ALIGN_CENTER);
	_tmp20_ = menu_button;
	_tmp21_ = menu;
	gtk_menu_button_set_menu_model (_tmp20_, (GMenuModel*) _tmp21_);
	_tmp22_ = menu_button;
	gtk_button_set_relief ((GtkButton*) _tmp22_, GTK_RELIEF_NONE);
	_tmp23_ = menu_button;
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp23_, _ ("Menu"));
	_tmp24_ = ibus_emojier_get_title_text (self);
	text = _tmp24_;
	_tmp25_ = text;
	_tmp26_ = get_pango_attr_list_from_ibus_text (_tmp25_);
	attrs = _tmp26_;
	_tmp27_ = text;
	_tmp28_ = ibus_text_get_text (_tmp27_);
	_tmp29_ = (GtkLabel*) gtk_label_new (_tmp28_);
	g_object_ref_sink (_tmp29_);
	title_label = _tmp29_;
	_tmp30_ = title_label;
	_tmp31_ = attrs;
	gtk_label_set_attributes (_tmp30_, _tmp31_);
	_data1_->warning_button = NULL;
	_tmp32_ = ibus_emojier_m_warning_message;
	if (g_strcmp0 (_tmp32_, "") != 0) {
		GtkButton* _tmp33_;
		GtkButton* _tmp34_;
		GtkButton* _tmp35_;
		GtkImage* _tmp36_;
		GtkImage* _tmp37_;
		GtkButton* _tmp38_;
		GtkButton* _tmp39_;
		_tmp33_ = (GtkButton*) gtk_button_new ();
		g_object_ref_sink (_tmp33_);
		_g_object_unref0 (_data1_->warning_button);
		_data1_->warning_button = _tmp33_;
		_tmp34_ = _data1_->warning_button;
		gtk_widget_set_tooltip_text ((GtkWidget*) _tmp34_, _ ("Click to view a warning message"));
		_tmp35_ = _data1_->warning_button;
		_tmp36_ = (GtkImage*) gtk_image_new_from_icon_name ("dialog-warning", (GtkIconSize) GTK_ICON_SIZE_MENU);
		g_object_ref_sink (_tmp36_);
		_tmp37_ = _tmp36_;
		gtk_button_set_image (_tmp35_, (GtkWidget*) _tmp37_);
		_g_object_unref0 (_tmp37_);
		_tmp38_ = _data1_->warning_button;
		gtk_button_set_relief (_tmp38_, GTK_RELIEF_NONE);
		_tmp39_ = _data1_->warning_button;
		g_signal_connect_data (_tmp39_, "clicked", (GCallback) ____lambda19__gtk_button_clicked, block1_data_ref (_data1_), (GClosureNotify) block1_data_unref, 0);
	}
	_tmp40_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
	g_object_ref_sink (_tmp40_);
	buttons_hbox = _tmp40_;
	_tmp41_ = (GtkLabel*) gtk_label_new (NULL);
	g_object_ref_sink (_tmp41_);
	state_label = _tmp41_;
	_tmp42_ = state_label;
	gtk_widget_set_size_request ((GtkWidget*) _tmp42_, 10, -1);
	_tmp43_ = state_label;
	gtk_widget_set_halign ((GtkWidget*) _tmp43_, GTK_ALIGN_CENTER);
	_tmp44_ = state_label;
	gtk_widget_set_valign ((GtkWidget*) _tmp44_, GTK_ALIGN_CENTER);
	_tmp45_ = buttons_hbox;
	_tmp46_ = state_label;
	gtk_box_pack_start (_tmp45_, (GtkWidget*) _tmp46_, FALSE, TRUE, (guint) 0);
	_tmp47_ = buttons_hbox;
	_tmp48_ = prev_button;
	gtk_box_pack_start (_tmp47_, (GtkWidget*) _tmp48_, FALSE, FALSE, (guint) 0);
	_tmp49_ = buttons_hbox;
	_tmp50_ = next_button;
	gtk_box_pack_start (_tmp49_, (GtkWidget*) _tmp50_, FALSE, FALSE, (guint) 0);
	_tmp51_ = buttons_hbox;
	_tmp52_ = title_label;
	gtk_box_pack_start (_tmp51_, (GtkWidget*) _tmp52_, FALSE, FALSE, (guint) 0);
	_tmp53_ = _data1_->warning_button;
	if (_tmp53_ != NULL) {
		GtkBox* _tmp54_;
		GtkButton* _tmp55_;
		_tmp54_ = buttons_hbox;
		_tmp55_ = _data1_->warning_button;
		gtk_box_pack_start (_tmp54_, (GtkWidget*) _tmp55_, FALSE, FALSE, (guint) 0);
	}
	_tmp56_ = buttons_hbox;
	_tmp57_ = menu_button;
	gtk_box_pack_end (_tmp56_, (GtkWidget*) _tmp57_, FALSE, FALSE, (guint) 0);
	_tmp58_ = self->priv->m_vbox;
	_tmp59_ = buttons_hbox;
	gtk_box_pack_start (_tmp58_, (GtkWidget*) _tmp59_, FALSE, FALSE, (guint) 0);
	_tmp60_ = buttons_hbox;
	gtk_widget_show_all ((GtkWidget*) _tmp60_);
	_g_object_unref0 (state_label);
	_g_object_unref0 (buttons_hbox);
	_g_object_unref0 (title_label);
	_pango_attr_list_unref0 (attrs);
	_g_object_unref0 (text);
	_g_object_unref0 (menu_button);
	_g_object_unref0 (menu);
	_g_object_unref0 (prev_button);
	_g_object_unref0 (next_button);
	block1_data_unref (_data1_);
	_data1_ = NULL;
}


static void
__lambda20_ (IBusEmojier* self,
             guint i,
             guint n)
{
	self->priv->m_unicode_percent = ((gdouble) i) / n;
}


static void
___lambda20__ibus_emojier_load_progress_object_deserialize_unicode (IBusEmojierLoadProgressObject* _sender,
                                                                    guint done,
                                                                    guint total,
                                                                    gpointer self)
{
	__lambda20_ ((IBusEmojier*) self, done, total);
}


static gboolean
__lambda21_ (IBusEmojier* self)
{
	gboolean result = FALSE;
	GtkProgressBar* _tmp0_;
	gdouble _tmp1_;
	GtkLabel* _tmp2_;
	gdouble _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	GtkProgressBar* _tmp6_;
	GtkLabel* _tmp7_;
	gboolean _tmp8_;
	gboolean _tmp9_;
	self->priv->m_unicode_progress_id = (guint) 0;
	_tmp0_ = self->priv->m_unicode_progress_bar;
	_tmp1_ = self->priv->m_unicode_percent;
	gtk_progress_bar_set_fraction (_tmp0_, _tmp1_);
	_tmp2_ = self->priv->m_unicode_percent_label;
	_tmp3_ = self->priv->m_unicode_percent;
	_tmp4_ = g_strdup_printf ("%.0f%%\n", _tmp3_ * 100);
	_tmp5_ = _tmp4_;
	gtk_label_set_text (_tmp2_, _tmp5_);
	_g_free0 (_tmp5_);
	_tmp6_ = self->priv->m_unicode_progress_bar;
	gtk_widget_show ((GtkWidget*) _tmp6_);
	_tmp7_ = self->priv->m_unicode_percent_label;
	gtk_widget_show ((GtkWidget*) _tmp7_);
	_tmp8_ = ibus_emojier_m_loaded_unicode;
	if (_tmp8_) {
		ibus_emojier_show_candidate_panel (self);
	}
	_tmp9_ = ibus_emojier_m_loaded_unicode;
	result = !_tmp9_;
	return result;
}


static gboolean
___lambda21__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda21_ ((IBusEmojier*) self);
	return result;
}


static void
ibus_emojier_show_unicode_progress_bar (IBusEmojier* self)
{
	GtkProgressBar* _tmp0_;
	GtkProgressBar* _tmp1_;
	GtkProgressBar* _tmp2_;
	GtkProgressBar* _tmp3_;
	GtkBox* _tmp4_;
	GtkProgressBar* _tmp5_;
	GtkProgressBar* _tmp6_;
	GtkBox* hbox = NULL;
	GtkBox* _tmp7_;
	GtkBox* _tmp8_;
	GtkBox* _tmp9_;
	GtkBox* _tmp10_;
	GtkBox* _tmp11_;
	GtkLabel* label = NULL;
	GtkLabel* _tmp12_;
	GtkBox* _tmp13_;
	GtkLabel* _tmp14_;
	GtkLabel* _tmp15_;
	GtkBox* _tmp16_;
	GtkLabel* _tmp17_;
	GtkBox* _tmp18_;
	IBusEmojierLoadProgressObject* _tmp19_;
	guint _tmp20_;
	g_return_if_fail (self != NULL);
	_tmp0_ = (GtkProgressBar*) gtk_progress_bar_new ();
	g_object_ref_sink (_tmp0_);
	_g_object_unref0 (self->priv->m_unicode_progress_bar);
	self->priv->m_unicode_progress_bar = _tmp0_;
	_tmp1_ = self->priv->m_unicode_progress_bar;
	gtk_progress_bar_set_ellipsize (_tmp1_, PANGO_ELLIPSIZE_MIDDLE);
	_tmp2_ = self->priv->m_unicode_progress_bar;
	gtk_widget_set_halign ((GtkWidget*) _tmp2_, GTK_ALIGN_CENTER);
	_tmp3_ = self->priv->m_unicode_progress_bar;
	gtk_widget_set_valign ((GtkWidget*) _tmp3_, GTK_ALIGN_CENTER);
	_tmp4_ = self->priv->m_vbox;
	_tmp5_ = self->priv->m_unicode_progress_bar;
	gtk_container_add ((GtkContainer*) _tmp4_, (GtkWidget*) _tmp5_);
	_tmp6_ = self->priv->m_unicode_progress_bar;
	gtk_widget_show ((GtkWidget*) _tmp6_);
	_tmp7_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 5);
	g_object_ref_sink (_tmp7_);
	hbox = _tmp7_;
	_tmp8_ = hbox;
	gtk_widget_set_halign ((GtkWidget*) _tmp8_, GTK_ALIGN_CENTER);
	_tmp9_ = hbox;
	gtk_widget_set_valign ((GtkWidget*) _tmp9_, GTK_ALIGN_CENTER);
	_tmp10_ = self->priv->m_vbox;
	_tmp11_ = hbox;
	gtk_container_add ((GtkContainer*) _tmp10_, (GtkWidget*) _tmp11_);
	_tmp12_ = (GtkLabel*) gtk_label_new (_ ("Loading a Unicode dictionary:"));
	g_object_ref_sink (_tmp12_);
	label = _tmp12_;
	_tmp13_ = hbox;
	_tmp14_ = label;
	gtk_box_pack_start (_tmp13_, (GtkWidget*) _tmp14_, FALSE, TRUE, (guint) 0);
	_tmp15_ = (GtkLabel*) gtk_label_new ("");
	g_object_ref_sink (_tmp15_);
	_g_object_unref0 (self->priv->m_unicode_percent_label);
	self->priv->m_unicode_percent_label = _tmp15_;
	_tmp16_ = hbox;
	_tmp17_ = self->priv->m_unicode_percent_label;
	gtk_box_pack_start (_tmp16_, (GtkWidget*) _tmp17_, FALSE, TRUE, (guint) 0);
	_tmp18_ = hbox;
	gtk_widget_show_all ((GtkWidget*) _tmp18_);
	_tmp19_ = ibus_emojier_m_unicode_progress_object;
	g_signal_connect_object (_tmp19_, "deserialize-unicode", (GCallback) ___lambda20__ibus_emojier_load_progress_object_deserialize_unicode, self, 0);
	_tmp20_ = self->priv->m_unicode_progress_id;
	if (_tmp20_ > ((guint) 0)) {
		guint _tmp21_;
		_tmp21_ = self->priv->m_unicode_progress_id;
		g_source_remove (_tmp21_);
	}
	self->priv->m_unicode_progress_id = g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 100, ___lambda21__gsource_func, g_object_ref (self), g_object_unref);
	_g_object_unref0 (label);
	_g_object_unref0 (hbox);
}


static guint64
uint64_parse (const gchar* str)
{
	guint64 result = 0ULL;
	guint64 _tmp0_;
	g_return_val_if_fail (str != NULL, 0ULL);
	_tmp0_ = g_ascii_strtoull (str, NULL, (guint) 0);
	result = _tmp0_;
	return result;
}


static gchar*
ibus_emojier_check_unicode_point (const gchar* annotation)
{
	gchar* result = NULL;
	gchar* unicode_point = NULL;
	GString* buff = NULL;
	GString* _tmp0_;
	GString* retval = NULL;
	GString* _tmp1_;
	gunichar code = 0U;
	GString* _tmp19_;
	const gchar* _tmp20_;
	gunichar _tmp21_;
	GString* _tmp22_;
	gunichar _tmp23_;
	gchar* _tmp24_;
	gchar* _tmp25_;
	GString* _tmp26_;
	const gchar* _tmp27_;
	gchar* _tmp28_;
	const gchar* _tmp29_;
	g_return_val_if_fail (annotation != NULL, NULL);
	unicode_point = NULL;
	_tmp0_ = g_string_new ("0x");
	buff = _tmp0_;
	_tmp1_ = g_string_new ("");
	retval = _tmp1_;
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp2_ = FALSE;
			_tmp2_ = TRUE;
			while (TRUE) {
				gint _tmp4_;
				gunichar ch = 0U;
				gint _tmp5_;
				gunichar _tmp6_;
				gunichar _tmp7_;
				gunichar _tmp16_;
				GString* _tmp17_;
				gunichar _tmp18_;
				if (!_tmp2_) {
					gint _tmp3_;
					_tmp3_ = i;
					i = _tmp3_ + 1;
				}
				_tmp2_ = FALSE;
				_tmp4_ = i;
				if (!(_tmp4_ < g_utf8_strlen (annotation, (gssize) -1))) {
					break;
				}
				_tmp5_ = i;
				ch = string_get_char (annotation, (glong) _tmp5_);
				_tmp6_ = ch;
				if (_tmp6_ == ((gunichar) 0)) {
					result = NULL;
					_g_string_free0 (retval);
					_g_string_free0 (buff);
					_g_free0 (unicode_point);
					return result;
				}
				_tmp7_ = ch;
				if (g_unichar_isspace (_tmp7_)) {
					gunichar code = 0U;
					GString* _tmp8_;
					const gchar* _tmp9_;
					GString* _tmp10_;
					gunichar _tmp11_;
					GString* _tmp12_;
					gunichar _tmp13_;
					gchar* _tmp14_;
					gchar* _tmp15_;
					_tmp8_ = buff;
					_tmp9_ = _tmp8_->str;
					code = (gunichar) uint64_parse (_tmp9_);
					_tmp10_ = buff;
					g_string_assign (_tmp10_, "0x");
					_tmp11_ = code;
					if (!g_unichar_validate (_tmp11_)) {
						result = NULL;
						_g_string_free0 (retval);
						_g_string_free0 (buff);
						_g_free0 (unicode_point);
						return result;
					}
					_tmp12_ = retval;
					_tmp13_ = code;
					_tmp14_ = g_unichar_to_string (_tmp13_);
					_tmp15_ = _tmp14_;
					g_string_append (_tmp12_, _tmp15_);
					_g_free0 (_tmp15_);
					continue;
				}
				_tmp16_ = ch;
				if (!g_unichar_isxdigit (_tmp16_)) {
					result = NULL;
					_g_string_free0 (retval);
					_g_string_free0 (buff);
					_g_free0 (unicode_point);
					return result;
				}
				_tmp17_ = buff;
				_tmp18_ = ch;
				g_string_append_unichar (_tmp17_, _tmp18_);
			}
		}
	}
	_tmp19_ = buff;
	_tmp20_ = _tmp19_->str;
	code = (gunichar) uint64_parse (_tmp20_);
	_tmp21_ = code;
	if (!g_unichar_validate (_tmp21_)) {
		result = NULL;
		_g_string_free0 (retval);
		_g_string_free0 (buff);
		_g_free0 (unicode_point);
		return result;
	}
	_tmp22_ = retval;
	_tmp23_ = code;
	_tmp24_ = g_unichar_to_string (_tmp23_);
	_tmp25_ = _tmp24_;
	g_string_append (_tmp22_, _tmp25_);
	_g_free0 (_tmp25_);
	_tmp26_ = retval;
	_tmp27_ = _tmp26_->str;
	_tmp28_ = g_strdup (_tmp27_);
	_g_free0 (unicode_point);
	unicode_point = _tmp28_;
	_tmp29_ = unicode_point;
	if (_tmp29_ == NULL) {
		result = NULL;
		_g_string_free0 (retval);
		_g_string_free0 (buff);
		_g_free0 (unicode_point);
		return result;
	}
	result = unicode_point;
	_g_string_free0 (retval);
	_g_string_free0 (buff);
	return result;
}


static GSList*
ibus_emojier_lookup_emojis_from_annotation (const gchar* annotation)
{
	GSList* result = NULL;
	GSList* total_emojis = NULL;
	GSList* sub_emojis = NULL;
	GSList* sub_exact_unicodes = NULL;
	GSList* sub_unicodes = NULL;
	gint length = 0;
	gint _tmp0_;
	gint _tmp1_;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_;
	GHashTable* _tmp41_;
	gconstpointer _tmp42_;
	GSList* _tmp43_;
	gint _tmp52_;
	guint _tmp53_;
	g_return_val_if_fail (annotation != NULL, NULL);
	total_emojis = NULL;
	sub_emojis = NULL;
	sub_exact_unicodes = NULL;
	sub_unicodes = NULL;
	_tmp0_ = strlen (annotation);
	_tmp1_ = _tmp0_;
	length = _tmp1_;
	_tmp3_ = ibus_emojier_m_has_partial_match;
	if (_tmp3_) {
		gint _tmp4_;
		guint _tmp5_;
		_tmp4_ = length;
		_tmp5_ = ibus_emojier_m_partial_match_length;
		_tmp2_ = ((guint) _tmp4_) >= _tmp5_;
	} else {
		_tmp2_ = FALSE;
	}
	if (_tmp2_) {
		GSList* sorted_emojis = NULL;
		GHashTable* _tmp6_;
		GList* _tmp7_;
		GSList* _tmp28_;
		sorted_emojis = NULL;
		_tmp6_ = ibus_emojier_m_annotation_to_emojis_dict;
		_tmp7_ = g_hash_table_get_keys (_tmp6_);
		{
			GList* key_collection = NULL;
			GList* key_it = NULL;
			key_collection = _tmp7_;
			for (key_it = key_collection; key_it != NULL; key_it = key_it->next) {
				const gchar* key = NULL;
				key = (const gchar*) key_it->data;
				{
					const gchar* _tmp8_;
					gint _tmp9_;
					gint _tmp10_;
					gint _tmp11_;
					gboolean matched = FALSE;
					guint _tmp12_;
					gboolean _tmp16_;
					GHashTable* _tmp17_;
					const gchar* _tmp18_;
					gconstpointer _tmp19_;
					GSList* _tmp20_;
					_tmp8_ = key;
					_tmp9_ = strlen (_tmp8_);
					_tmp10_ = _tmp9_;
					_tmp11_ = length;
					if (_tmp10_ < _tmp11_) {
						continue;
					}
					matched = FALSE;
					_tmp12_ = ibus_emojier_m_partial_match_condition;
					switch (_tmp12_) {
						case 0:
						{
							const gchar* _tmp13_;
							_tmp13_ = key;
							if (g_str_has_prefix (_tmp13_, annotation)) {
								matched = TRUE;
							}
							break;
						}
						case 1:
						{
							const gchar* _tmp14_;
							_tmp14_ = key;
							if (g_str_has_suffix (_tmp14_, annotation)) {
								matched = TRUE;
							}
							break;
						}
						case 2:
						{
							const gchar* _tmp15_;
							_tmp15_ = key;
							if (string_index_of (_tmp15_, annotation, 0) >= 0) {
								matched = TRUE;
							}
							break;
						}
						default:
						{
							break;
						}
					}
					_tmp16_ = matched;
					if (!_tmp16_) {
						continue;
					}
					_tmp17_ = ibus_emojier_m_annotation_to_emojis_dict;
					_tmp18_ = key;
					_tmp19_ = g_hash_table_lookup (_tmp17_, _tmp18_);
					sub_emojis = (GSList*) _tmp19_;
					_tmp20_ = sub_emojis;
					{
						GSList* emoji_collection = NULL;
						GSList* emoji_it = NULL;
						emoji_collection = _tmp20_;
						for (emoji_it = emoji_collection; emoji_it != NULL; emoji_it = emoji_it->next) {
							const gchar* emoji = NULL;
							emoji = (const gchar*) emoji_it->data;
							{
								GSList* _tmp21_;
								const gchar* _tmp22_;
								GCompareFunc _tmp23_;
								GSList* _tmp24_;
								_tmp21_ = total_emojis;
								_tmp22_ = emoji;
								_tmp23_ = g_strcmp0;
								_tmp24_ = g_slist_find_custom (_tmp21_, _tmp22_, _tmp23_);
								if (_tmp24_ == NULL) {
									const gchar* _tmp25_;
									gchar* _tmp26_;
									GCompareFunc _tmp27_;
									_tmp25_ = emoji;
									_tmp26_ = g_strdup (_tmp25_);
									_tmp27_ = g_strcmp0;
									sorted_emojis = g_slist_insert_sorted (sorted_emojis, _tmp26_, _tmp27_);
								}
							}
						}
					}
				}
			}
			(key_collection == NULL) ? NULL : (key_collection = (g_list_free (key_collection), NULL));
		}
		_tmp28_ = sorted_emojis;
		{
			GSList* emoji_collection = NULL;
			GSList* emoji_it = NULL;
			emoji_collection = _tmp28_;
			for (emoji_it = emoji_collection; emoji_it != NULL; emoji_it = emoji_it->next) {
				gchar* _tmp29_;
				gchar* emoji = NULL;
				_tmp29_ = g_strdup ((const gchar*) emoji_it->data);
				emoji = _tmp29_;
				{
					GSList* _tmp30_;
					const gchar* _tmp31_;
					GCompareFunc _tmp32_;
					GSList* _tmp33_;
					_tmp30_ = total_emojis;
					_tmp31_ = emoji;
					_tmp32_ = g_strcmp0;
					_tmp33_ = g_slist_find_custom (_tmp30_, _tmp31_, _tmp32_);
					if (_tmp33_ == NULL) {
						const gchar* _tmp34_;
						gchar* _tmp35_;
						_tmp34_ = emoji;
						_tmp35_ = g_strdup (_tmp34_);
						total_emojis = g_slist_append (total_emojis, _tmp35_);
					}
					_g_free0 (emoji);
				}
			}
		}
		(sorted_emojis == NULL) ? NULL : (sorted_emojis = (_g_slist_free__g_free0_ (sorted_emojis), NULL));
	} else {
		GHashTable* _tmp36_;
		gconstpointer _tmp37_;
		GSList* _tmp38_;
		_tmp36_ = ibus_emojier_m_annotation_to_emojis_dict;
		_tmp37_ = g_hash_table_lookup (_tmp36_, annotation);
		sub_emojis = (GSList*) _tmp37_;
		_tmp38_ = sub_emojis;
		{
			GSList* emoji_collection = NULL;
			GSList* emoji_it = NULL;
			emoji_collection = _tmp38_;
			for (emoji_it = emoji_collection; emoji_it != NULL; emoji_it = emoji_it->next) {
				const gchar* emoji = NULL;
				emoji = (const gchar*) emoji_it->data;
				{
					const gchar* _tmp39_;
					gchar* _tmp40_;
					_tmp39_ = emoji;
					_tmp40_ = g_strdup (_tmp39_);
					total_emojis = g_slist_append (total_emojis, _tmp40_);
				}
			}
		}
	}
	_tmp41_ = ibus_emojier_m_name_to_unicodes_dict;
	_tmp42_ = g_hash_table_lookup (_tmp41_, annotation);
	sub_exact_unicodes = (GSList*) _tmp42_;
	_tmp43_ = sub_exact_unicodes;
	{
		GSList* code_collection = NULL;
		GSList* code_it = NULL;
		code_collection = _tmp43_;
		for (code_it = code_collection; code_it != NULL; code_it = code_it->next) {
			gunichar code = 0U;
			code = (gunichar) ((gintptr) code_it->data);
			{
				gchar* ch = NULL;
				gunichar _tmp44_;
				gchar* _tmp45_;
				GSList* _tmp46_;
				const gchar* _tmp47_;
				GCompareFunc _tmp48_;
				GSList* _tmp49_;
				_tmp44_ = code;
				_tmp45_ = g_unichar_to_string (_tmp44_);
				ch = _tmp45_;
				_tmp46_ = total_emojis;
				_tmp47_ = ch;
				_tmp48_ = g_strcmp0;
				_tmp49_ = g_slist_find_custom (_tmp46_, _tmp47_, _tmp48_);
				if (_tmp49_ == NULL) {
					const gchar* _tmp50_;
					gchar* _tmp51_;
					_tmp50_ = ch;
					_tmp51_ = g_strdup (_tmp50_);
					total_emojis = g_slist_append (total_emojis, _tmp51_);
				}
				_g_free0 (ch);
			}
		}
	}
	_tmp52_ = length;
	_tmp53_ = ibus_emojier_m_partial_match_length;
	if (((guint) _tmp52_) >= _tmp53_) {
		GSList* sorted_unicodes = NULL;
		GHashTable* _tmp54_;
		GList* _tmp55_;
		GSList* _tmp71_;
		sorted_unicodes = NULL;
		_tmp54_ = ibus_emojier_m_name_to_unicodes_dict;
		_tmp55_ = g_hash_table_get_keys (_tmp54_);
		{
			GList* key_collection = NULL;
			GList* key_it = NULL;
			key_collection = _tmp55_;
			for (key_it = key_collection; key_it != NULL; key_it = key_it->next) {
				const gchar* key = NULL;
				key = (const gchar*) key_it->data;
				{
					gboolean matched = FALSE;
					const gchar* _tmp56_;
					gboolean _tmp57_;
					GHashTable* _tmp58_;
					const gchar* _tmp59_;
					gconstpointer _tmp60_;
					GSList* _tmp61_;
					matched = FALSE;
					_tmp56_ = key;
					if (string_index_of (_tmp56_, annotation, 0) >= 0) {
						matched = TRUE;
					}
					_tmp57_ = matched;
					if (!_tmp57_) {
						continue;
					}
					_tmp58_ = ibus_emojier_m_name_to_unicodes_dict;
					_tmp59_ = key;
					_tmp60_ = g_hash_table_lookup (_tmp58_, _tmp59_);
					sub_unicodes = (GSList*) _tmp60_;
					_tmp61_ = sub_unicodes;
					{
						GSList* code_collection = NULL;
						GSList* code_it = NULL;
						code_collection = _tmp61_;
						for (code_it = code_collection; code_it != NULL; code_it = code_it->next) {
							gunichar code = 0U;
							code = (gunichar) ((gintptr) code_it->data);
							{
								gchar* ch = NULL;
								gunichar _tmp62_;
								gchar* _tmp63_;
								GSList* _tmp64_;
								const gchar* _tmp65_;
								GCompareFunc _tmp66_;
								GSList* _tmp67_;
								_tmp62_ = code;
								_tmp63_ = g_unichar_to_string (_tmp62_);
								ch = _tmp63_;
								_tmp64_ = sorted_unicodes;
								_tmp65_ = ch;
								_tmp66_ = g_strcmp0;
								_tmp67_ = g_slist_find_custom (_tmp64_, _tmp65_, _tmp66_);
								if (_tmp67_ == NULL) {
									const gchar* _tmp68_;
									gchar* _tmp69_;
									GCompareFunc _tmp70_;
									_tmp68_ = ch;
									_tmp69_ = g_strdup (_tmp68_);
									_tmp70_ = g_strcmp0;
									sorted_unicodes = g_slist_insert_sorted (sorted_unicodes, _tmp69_, _tmp70_);
								}
								_g_free0 (ch);
							}
						}
					}
				}
			}
			(key_collection == NULL) ? NULL : (key_collection = (g_list_free (key_collection), NULL));
		}
		_tmp71_ = sorted_unicodes;
		{
			GSList* ch_collection = NULL;
			GSList* ch_it = NULL;
			ch_collection = _tmp71_;
			for (ch_it = ch_collection; ch_it != NULL; ch_it = ch_it->next) {
				gchar* _tmp72_;
				gchar* ch = NULL;
				_tmp72_ = g_strdup ((const gchar*) ch_it->data);
				ch = _tmp72_;
				{
					GSList* _tmp73_;
					const gchar* _tmp74_;
					GCompareFunc _tmp75_;
					GSList* _tmp76_;
					_tmp73_ = total_emojis;
					_tmp74_ = ch;
					_tmp75_ = g_strcmp0;
					_tmp76_ = g_slist_find_custom (_tmp73_, _tmp74_, _tmp75_);
					if (_tmp76_ == NULL) {
						const gchar* _tmp77_;
						gchar* _tmp78_;
						_tmp77_ = ch;
						_tmp78_ = g_strdup (_tmp77_);
						total_emojis = g_slist_append (total_emojis, _tmp78_);
					}
					_g_free0 (ch);
				}
			}
		}
		(sorted_unicodes == NULL) ? NULL : (sorted_unicodes = (_g_slist_free__g_free0_ (sorted_unicodes), NULL));
	}
	result = total_emojis;
	return result;
}


static void
ibus_emojier_update_candidate_window (IBusEmojier* self)
{
	gchar* annotation = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	const gchar* _tmp2_;
	gint _tmp3_;
	gint _tmp4_;
	IBusLookupTable* _tmp5_;
	const gchar* _tmp6_;
	gint _tmp7_;
	gint _tmp8_;
	gint _tmp9_;
	gchar* unicode_point = NULL;
	const gchar* _tmp10_;
	gchar* _tmp11_;
	GSList* total_emojis = NULL;
	const gchar* _tmp12_;
	GSList* _tmp21_;
	GSList* _tmp24_;
	gboolean _tmp29_ = FALSE;
	GSList* _tmp30_;
	const gchar* _tmp32_;
	GSList* _tmp37_;
	gboolean _tmp42_ = FALSE;
	IBusLookupTable* _tmp43_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->m_annotation;
	_tmp1_ = g_strdup (_tmp0_);
	annotation = _tmp1_;
	_tmp2_ = annotation;
	_tmp3_ = strlen (_tmp2_);
	_tmp4_ = _tmp3_;
	if (_tmp4_ == 0) {
		_g_free0 (self->priv->m_backward);
		self->priv->m_backward = NULL;
		_g_free0 (annotation);
		return;
	}
	_tmp5_ = self->priv->m_lookup_table;
	ibus_lookup_table_clear (_tmp5_);
	self->priv->m_category_active_index = -1;
	_tmp6_ = annotation;
	_tmp7_ = strlen (_tmp6_);
	_tmp8_ = _tmp7_;
	_tmp9_ = ibus_emojier_m_emoji_max_seq_len;
	if (_tmp8_ > _tmp9_) {
		_g_free0 (annotation);
		return;
	}
	_tmp10_ = annotation;
	_tmp11_ = ibus_emojier_check_unicode_point (_tmp10_);
	unicode_point = _tmp11_;
	total_emojis = NULL;
	_tmp12_ = annotation;
	if (g_ascii_strcasecmp (_tmp12_, "history") == 0) {
		{
			gint i = 0;
			i = 0;
			{
				gboolean _tmp13_ = FALSE;
				_tmp13_ = TRUE;
				while (TRUE) {
					gint _tmp15_;
					gchar** _tmp16_;
					gint _tmp16__length1;
					gchar** _tmp17_;
					gint _tmp17__length1;
					gint _tmp18_;
					const gchar* _tmp19_;
					gchar* _tmp20_;
					if (!_tmp13_) {
						gint _tmp14_;
						_tmp14_ = i;
						i = _tmp14_ + 1;
					}
					_tmp13_ = FALSE;
					_tmp15_ = i;
					_tmp16_ = ibus_emojier_m_favorites;
					_tmp16__length1 = ibus_emojier_m_favorites_length1;
					if (!(_tmp15_ < _tmp16__length1)) {
						break;
					}
					_tmp17_ = ibus_emojier_m_favorites;
					_tmp17__length1 = ibus_emojier_m_favorites_length1;
					_tmp18_ = i;
					_tmp19_ = _tmp17_[_tmp18_];
					_tmp20_ = g_strdup (_tmp19_);
					total_emojis = g_slist_append (total_emojis, _tmp20_);
				}
			}
		}
	}
	_tmp21_ = total_emojis;
	if (_tmp21_ == NULL) {
		const gchar* _tmp22_;
		GSList* _tmp23_;
		_tmp22_ = annotation;
		_tmp23_ = ibus_emojier_lookup_emojis_from_annotation (_tmp22_);
		(total_emojis == NULL) ? NULL : (total_emojis = (_g_slist_free__g_free0_ (total_emojis), NULL));
		total_emojis = _tmp23_;
	}
	_tmp24_ = total_emojis;
	if (_tmp24_ == NULL) {
		const gchar* _tmp25_;
		gchar* _tmp26_;
		const gchar* _tmp27_;
		GSList* _tmp28_;
		_tmp25_ = annotation;
		_tmp26_ = g_utf8_strdown (_tmp25_, (gssize) -1);
		_g_free0 (annotation);
		annotation = _tmp26_;
		_tmp27_ = annotation;
		_tmp28_ = ibus_emojier_lookup_emojis_from_annotation (_tmp27_);
		(total_emojis == NULL) ? NULL : (total_emojis = (_g_slist_free__g_free0_ (total_emojis), NULL));
		total_emojis = _tmp28_;
	}
	_tmp30_ = total_emojis;
	if (_tmp30_ == NULL) {
		const gchar* _tmp31_;
		_tmp31_ = unicode_point;
		_tmp29_ = _tmp31_ == NULL;
	} else {
		_tmp29_ = FALSE;
	}
	if (_tmp29_) {
		(total_emojis == NULL) ? NULL : (total_emojis = (_g_slist_free__g_free0_ (total_emojis), NULL));
		_g_free0 (unicode_point);
		_g_free0 (annotation);
		return;
	}
	_tmp32_ = unicode_point;
	if (_tmp32_ != NULL) {
		IBusText* text = NULL;
		const gchar* _tmp33_;
		IBusText* _tmp34_;
		IBusLookupTable* _tmp35_;
		IBusText* _tmp36_;
		_tmp33_ = unicode_point;
		_tmp34_ = ibus_text_new_from_string (_tmp33_);
		g_object_ref_sink (_tmp34_);
		text = _tmp34_;
		_tmp35_ = self->priv->m_lookup_table;
		_tmp36_ = text;
		ibus_lookup_table_append_candidate (_tmp35_, _tmp36_);
		_g_object_unref0 (text);
	}
	_tmp37_ = total_emojis;
	{
		GSList* emoji_collection = NULL;
		GSList* emoji_it = NULL;
		emoji_collection = _tmp37_;
		for (emoji_it = emoji_collection; emoji_it != NULL; emoji_it = emoji_it->next) {
			const gchar* emoji = NULL;
			emoji = (const gchar*) emoji_it->data;
			{
				IBusText* text = NULL;
				const gchar* _tmp38_;
				IBusText* _tmp39_;
				IBusLookupTable* _tmp40_;
				IBusText* _tmp41_;
				_tmp38_ = emoji;
				_tmp39_ = ibus_text_new_from_string (_tmp38_);
				g_object_ref_sink (_tmp39_);
				text = _tmp39_;
				_tmp40_ = self->priv->m_lookup_table;
				_tmp41_ = text;
				ibus_lookup_table_append_candidate (_tmp40_, _tmp41_);
				_g_object_unref0 (text);
			}
		}
	}
	_tmp43_ = self->priv->m_lookup_table;
	if (ibus_lookup_table_get_number_of_candidates (_tmp43_) > ((guint) 0)) {
		_tmp42_ = TRUE;
	} else {
		_tmp42_ = FALSE;
	}
	self->priv->m_candidate_panel_is_visible = _tmp42_;
	self->priv->m_candidate_panel_mode = TRUE;
	(total_emojis == NULL) ? NULL : (total_emojis = (_g_slist_free__g_free0_ (total_emojis), NULL));
	_g_free0 (unicode_point);
	_g_free0 (annotation);
}


static gint
__lambda9_ (const gchar* a,
            const gchar* b)
{
	gint result = 0;
	gboolean _tmp0_ = FALSE;
	GCompareFunc _tmp2_;
	g_return_val_if_fail (a != NULL, 0);
	g_return_val_if_fail (b != NULL, 0);
	if (g_strcmp0 (a, IBUS_EMOJIER_EMOJI_CATEGORY_OTHERS) == 0) {
		_tmp0_ = g_strcmp0 (b, IBUS_EMOJIER_EMOJI_CATEGORY_OTHERS) != 0;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		result = 1;
		return result;
	} else {
		gboolean _tmp1_ = FALSE;
		if (g_strcmp0 (a, IBUS_EMOJIER_EMOJI_CATEGORY_OTHERS) != 0) {
			_tmp1_ = g_strcmp0 (b, IBUS_EMOJIER_EMOJI_CATEGORY_OTHERS) == 0;
		} else {
			_tmp1_ = FALSE;
		}
		if (_tmp1_) {
			result = -1;
			return result;
		}
	}
	_tmp2_ = g_strcmp0;
	result = _tmp2_ (_ (a), _ (b));
	return result;
}


static gint
___lambda9__gcompare_func (gconstpointer a,
                           gconstpointer b)
{
	gint result;
	result = __lambda9_ ((const gchar*) a, (const gchar*) b);
	return result;
}


static void
ibus_emojier_update_category_list (IBusEmojier* self)
{
	IBusLookupTable* _tmp0_;
	IBusText* text = NULL;
	gchar** _tmp1_;
	gint _tmp1__length1;
	GList* categories = NULL;
	GHashTable* _tmp5_;
	GList* _tmp6_;
	GList* _tmp7_;
	GSList* _tmp13_;
	g_return_if_fail (self != NULL);
	ibus_emojier_reset_window_mode (self);
	_tmp0_ = self->priv->m_lookup_table;
	ibus_lookup_table_clear (_tmp0_);
	_tmp1_ = ibus_emojier_m_favorites;
	_tmp1__length1 = ibus_emojier_m_favorites_length1;
	if (_tmp1__length1 > 0) {
		IBusText* _tmp2_;
		IBusLookupTable* _tmp3_;
		IBusText* _tmp4_;
		_tmp2_ = ibus_text_new_from_string (IBUS_EMOJIER_EMOJI_CATEGORY_FAVORITES);
		g_object_ref_sink (_tmp2_);
		_g_object_unref0 (text);
		text = _tmp2_;
		_tmp3_ = self->priv->m_lookup_table;
		_tmp4_ = text;
		ibus_lookup_table_append_candidate (_tmp3_, _tmp4_);
	}
	_tmp5_ = ibus_emojier_m_category_to_emojis_dict;
	_tmp6_ = g_hash_table_get_keys (_tmp5_);
	categories = _tmp6_;
	categories = g_list_sort (categories, ___lambda9__gcompare_func);
	_tmp7_ = categories;
	{
		GList* category_collection = NULL;
		GList* category_it = NULL;
		category_collection = _tmp7_;
		for (category_it = category_collection; category_it != NULL; category_it = category_it->next) {
			const gchar* category = NULL;
			category = (const gchar*) category_it->data;
			{
				const gchar* _tmp8_;
				const gchar* _tmp9_;
				IBusText* _tmp10_;
				IBusLookupTable* _tmp11_;
				IBusText* _tmp12_;
				_tmp8_ = category;
				if (g_strcmp0 (_tmp8_, IBUS_EMOJIER_EMOJI_CATEGORY_OTHERS) == 0) {
					continue;
				}
				_tmp9_ = category;
				_tmp10_ = ibus_text_new_from_string (_tmp9_);
				g_object_ref_sink (_tmp10_);
				_g_object_unref0 (text);
				text = _tmp10_;
				_tmp11_ = self->priv->m_lookup_table;
				_tmp12_ = text;
				ibus_lookup_table_append_candidate (_tmp11_, _tmp12_);
			}
		}
	}
	_tmp13_ = ibus_emojier_m_unicode_block_list;
	if (g_slist_length (_tmp13_) > ((guint) 0)) {
		IBusText* _tmp14_;
		IBusLookupTable* _tmp15_;
		IBusText* _tmp16_;
		_tmp14_ = ibus_text_new_from_string (IBUS_EMOJIER_EMOJI_CATEGORY_UNICODE);
		g_object_ref_sink (_tmp14_);
		_g_object_unref0 (text);
		text = _tmp14_;
		_tmp15_ = self->priv->m_lookup_table;
		_tmp16_ = text;
		ibus_lookup_table_append_candidate (_tmp15_, _tmp16_);
	}
	(categories == NULL) ? NULL : (categories = (g_list_free (categories), NULL));
	_g_object_unref0 (text);
}


static void
ibus_emojier_update_unicode_blocks (IBusEmojier* self)
{
	IBusLookupTable* _tmp0_;
	GSList* _tmp1_;
	g_return_if_fail (self != NULL);
	ibus_emojier_reset_window_mode (self);
	_tmp0_ = self->priv->m_lookup_table;
	ibus_lookup_table_clear (_tmp0_);
	ibus_emojier_m_show_unicode = TRUE;
	_tmp1_ = ibus_emojier_m_unicode_block_list;
	{
		GSList* block_collection = NULL;
		GSList* block_it = NULL;
		block_collection = _tmp1_;
		for (block_it = block_collection; block_it != NULL; block_it = block_it->next) {
			IBusUnicodeBlock* block = NULL;
			block = (IBusUnicodeBlock*) block_it->data;
			{
				gchar* name = NULL;
				IBusUnicodeBlock* _tmp2_;
				const gchar* _tmp3_;
				gchar* _tmp4_;
				IBusText* text = NULL;
				const gchar* _tmp5_;
				IBusText* _tmp6_;
				IBusLookupTable* _tmp7_;
				IBusText* _tmp8_;
				_tmp2_ = block;
				_tmp3_ = ibus_unicode_block_get_name (_tmp2_);
				_tmp4_ = g_strdup (_tmp3_);
				name = _tmp4_;
				_tmp5_ = name;
				_tmp6_ = ibus_text_new_from_string (_tmp5_);
				g_object_ref_sink (_tmp6_);
				text = _tmp6_;
				_tmp7_ = self->priv->m_lookup_table;
				_tmp8_ = text;
				ibus_lookup_table_append_candidate (_tmp7_, _tmp8_);
				_g_object_unref0 (text);
				_g_free0 (name);
			}
		}
	}
}


static void
ibus_emojier_show_code_point_description (IBusEmojier* self,
                                          const gchar* text)
{
	IBusEmojierEPaddedLabelBox* widget_code = NULL;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	IBusEmojierEPaddedLabelBox* _tmp4_;
	IBusEmojierEPaddedLabelBox* _tmp5_;
	GtkBox* _tmp6_;
	IBusEmojierEPaddedLabelBox* _tmp7_;
	IBusEmojierEPaddedLabelBox* _tmp8_;
	GHashTable* _tmp9_;
	gconstpointer _tmp10_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (text != NULL);
	_tmp0_ = ibus_emojier_utf8_code_point (text);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_strdup_printf (_ ("Code point: %s"), _tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = ibus_emojier_epadded_label_box_new (_tmp3_, GTK_ALIGN_START, IBUS_EMOJIER_TRAVEL_DIRECTION_NONE, NULL);
	g_object_ref_sink (_tmp4_);
	_tmp5_ = _tmp4_;
	_g_free0 (_tmp3_);
	_g_free0 (_tmp1_);
	widget_code = _tmp5_;
	_tmp6_ = self->priv->m_vbox;
	_tmp7_ = widget_code;
	gtk_container_add ((GtkContainer*) _tmp6_, (GtkWidget*) _tmp7_);
	_tmp8_ = widget_code;
	gtk_widget_show_all ((GtkWidget*) _tmp8_);
	_tmp9_ = ibus_emojier_m_emoji_to_emoji_variants_dict;
	_tmp10_ = g_hash_table_lookup (_tmp9_, text);
	if (((GSList*) _tmp10_) != NULL) {
		IBusEmojierEPaddedLabelBox* widget_has_variant = NULL;
		IBusEmojierEPaddedLabelBox* _tmp11_;
		GtkBox* _tmp12_;
		IBusEmojierEPaddedLabelBox* _tmp13_;
		IBusEmojierEPaddedLabelBox* _tmp14_;
		_tmp11_ = ibus_emojier_epadded_label_box_new (_ ("Has emoji variants"), GTK_ALIGN_START, IBUS_EMOJIER_TRAVEL_DIRECTION_NONE, NULL);
		g_object_ref_sink (_tmp11_);
		widget_has_variant = _tmp11_;
		_tmp12_ = self->priv->m_vbox;
		_tmp13_ = widget_has_variant;
		gtk_container_add ((GtkContainer*) _tmp12_, (GtkWidget*) _tmp13_);
		_tmp14_ = widget_has_variant;
		gtk_widget_show_all ((GtkWidget*) _tmp14_);
		_g_object_unref0 (widget_has_variant);
	}
	_g_object_unref0 (widget_code);
}


static gboolean
___lambda13_ (IBusEmojier* self,
              GtkWidget* w,
              GdkEventButton* e)
{
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
	gint _tmp1_;
	g_return_val_if_fail (w != NULL, FALSE);
	g_return_val_if_fail (e != NULL, FALSE);
	_tmp1_ = self->priv->m_backward_index;
	if (_tmp1_ >= 0) {
		const gchar* _tmp2_;
		_tmp2_ = self->priv->m_backward;
		_tmp0_ = _tmp2_ != NULL;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		const gchar* _tmp3_;
		_tmp3_ = self->priv->m_backward;
		ibus_emojier_show_emoji_for_category (self, _tmp3_);
		ibus_emojier_show_candidate_panel (self);
	} else {
		ibus_emojier_hide_candidate_panel (self);
		gtk_widget_show_all ((GtkWidget*) self);
	}
	result = TRUE;
	return result;
}


static gboolean
____lambda13__gtk_widget_button_press_event (GtkWidget* _sender,
                                             GdkEventButton* event,
                                             gpointer self)
{
	gboolean result;
	result = ___lambda13_ ((IBusEmojier*) self, _sender, event);
	return result;
}


static Block2Data*
block2_data_ref (Block2Data* _data2_)
{
	g_atomic_int_inc (&_data2_->_ref_count_);
	return _data2_;
}


static void
block2_data_unref (void * _userdata_)
{
	Block2Data* _data2_;
	_data2_ = (Block2Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data2_->_ref_count_)) {
		IBusEmojier* self;
		self = _data2_->self;
		_g_object_unref0 (self);
		g_slice_free (Block2Data, _data2_);
	}
}


static gboolean
_____lambda14_ (Block2Data* _data2_,
                GtkWidget* w,
                GdkEventButton* e)
{
	IBusEmojier* self;
	gboolean result = FALSE;
	guint _tmp0_;
	guint _tmp1_;
	GdkModifierType _tmp2_;
	self = _data2_->self;
	g_return_val_if_fail (w != NULL, FALSE);
	g_return_val_if_fail (e != NULL, FALSE);
	_tmp0_ = _data2_->index;
	_tmp1_ = e->button;
	_tmp2_ = e->state;
	g_signal_emit (self, ibus_emojier_signals[IBUS_EMOJIER_CANDIDATE_CLICKED_SIGNAL], 0, _tmp0_, _tmp1_, (guint) _tmp2_);
	result = TRUE;
	return result;
}


static gboolean
______lambda14__gtk_widget_button_press_event (GtkWidget* _sender,
                                               GdkEventButton* event,
                                               gpointer self)
{
	gboolean result;
	result = _____lambda14_ (self, _sender, event);
	return result;
}


static GdkEventMotion*
_vala_GdkEventMotion_copy (GdkEventMotion* self)
{
	return g_boxed_copy (gdk_event_get_type (), self);
}


static gpointer
__vala_GdkEventMotion_copy0 (gpointer self)
{
	return self ? _vala_GdkEventMotion_copy (self) : NULL;
}


static void
_vala_GdkEventMotion_free (GdkEventMotion* self)
{
	g_boxed_free (gdk_event_get_type (), self);
}


static gboolean
__lambda16_ (IBusEmojier* self)
{
	gboolean result = FALSE;
	ibus_emojier_show_candidate_panel (self);
	result = FALSE;
	return result;
}


static gboolean
___lambda16__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda16_ ((IBusEmojier*) self);
	return result;
}


static gboolean
_____lambda15_ (Block2Data* _data2_,
                GdkEventMotion* e)
{
	IBusEmojier* self;
	gboolean result = FALSE;
	gboolean _tmp0_;
	IBusLookupTable* _tmp1_;
	guint _tmp2_;
	GdkEventMotion* pe = NULL;
	GdkEventMotion* _tmp3_;
	gboolean _tmp4_ = FALSE;
	gdouble _tmp5_;
	GdkEventMotion* _tmp6_;
	gdouble _tmp7_;
	GdkEventMotion* _tmp11_;
	gdouble _tmp12_;
	GdkEventMotion* _tmp13_;
	gdouble _tmp14_;
	IBusLookupTable* _tmp15_;
	guint _tmp16_;
	gboolean _tmp17_ = FALSE;
	guint _tmp18_;
	self = _data2_->self;
	g_return_val_if_fail (e != NULL, FALSE);
	_tmp0_ = self->priv->m_enter_notify_enable;
	if (!_tmp0_) {
		result = FALSE;
		return result;
	}
	_tmp1_ = self->priv->m_lookup_table;
	_tmp2_ = _data2_->index;
	if (ibus_lookup_table_get_cursor_pos (_tmp1_) == _tmp2_) {
		result = FALSE;
		return result;
	}
	_tmp3_ = __vala_GdkEventMotion_copy0 (e);
	pe = _tmp3_;
	_tmp5_ = ibus_emojier_m_mouse_x;
	_tmp6_ = pe;
	_tmp7_ = _tmp6_->x_root;
	if (_tmp5_ == _tmp7_) {
		gdouble _tmp8_;
		GdkEventMotion* _tmp9_;
		gdouble _tmp10_;
		_tmp8_ = ibus_emojier_m_mouse_y;
		_tmp9_ = pe;
		_tmp10_ = _tmp9_->y_root;
		_tmp4_ = _tmp8_ == _tmp10_;
	} else {
		_tmp4_ = FALSE;
	}
	if (_tmp4_) {
		result = FALSE;
		__vala_GdkEventMotion_free0 (pe);
		return result;
	}
	_tmp11_ = pe;
	_tmp12_ = _tmp11_->x_root;
	ibus_emojier_m_mouse_x = _tmp12_;
	_tmp13_ = pe;
	_tmp14_ = _tmp13_->y_root;
	ibus_emojier_m_mouse_y = _tmp14_;
	_tmp15_ = self->priv->m_lookup_table;
	_tmp16_ = _data2_->index;
	ibus_lookup_table_set_cursor_pos (_tmp15_, _tmp16_);
	_tmp18_ = self->priv->m_entry_notify_show_id;
	if (_tmp18_ > ((guint) 0)) {
		GMainContext* _tmp19_;
		guint _tmp20_;
		GSource* _tmp21_;
		_tmp19_ = g_main_context_default ();
		_tmp20_ = self->priv->m_entry_notify_show_id;
		_tmp21_ = g_main_context_find_source_by_id (_tmp19_, _tmp20_);
		_tmp17_ = _tmp21_ != NULL;
	} else {
		_tmp17_ = FALSE;
	}
	if (_tmp17_) {
		guint _tmp22_;
		_tmp22_ = self->priv->m_entry_notify_show_id;
		g_source_remove (_tmp22_);
	}
	self->priv->m_entry_notify_show_id = g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 100, ___lambda16__gsource_func, g_object_ref (self), g_object_unref);
	result = FALSE;
	__vala_GdkEventMotion_free0 (pe);
	return result;
}


static gboolean
______lambda15__gtk_widget_motion_notify_event (GtkWidget* _sender,
                                                GdkEventMotion* event,
                                                gpointer self)
{
	gboolean result;
	result = _____lambda15_ (self, event);
	return result;
}


static void
_vala_array_add2 (GtkLabel** * array,
                  int* length,
                  int* size,
                  GtkLabel* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (GtkLabel*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}


static void
ibus_emojier_show_candidate_panel (IBusEmojier* self)
{
	gboolean _tmp0_;
	guint page_size = 0U;
	IBusLookupTable* _tmp1_;
	guint ncandidates = 0U;
	IBusLookupTable* _tmp2_;
	guint cursor = 0U;
	IBusLookupTable* _tmp3_;
	guint page_start_pos = 0U;
	guint _tmp4_;
	guint _tmp5_;
	guint _tmp6_;
	guint page_end_pos = 0U;
	guint _tmp7_;
	guint _tmp8_;
	guint _tmp9_;
	GtkButton* backward_button = NULL;
	const gchar* _tmp10_;
	IBusEmojierEGrid* grid = NULL;
	IBusEmojierEGrid* _tmp19_;
	gint n = 0;
	gboolean _tmp81_;
	g_return_if_fail (self != NULL);
	ibus_emojier_remove_all_children (self);
	ibus_emojier_set_fixed_size (self);
	_tmp0_ = ibus_emojier_m_emoji_font_changed;
	if (_tmp0_) {
		ibus_emojier_set_css_data (self);
		ibus_emojier_m_emoji_font_changed = FALSE;
	}
	_tmp1_ = self->priv->m_lookup_table;
	page_size = ibus_lookup_table_get_page_size (_tmp1_);
	_tmp2_ = self->priv->m_lookup_table;
	ncandidates = ibus_lookup_table_get_number_of_candidates (_tmp2_);
	_tmp3_ = self->priv->m_lookup_table;
	cursor = ibus_lookup_table_get_cursor_pos (_tmp3_);
	_tmp4_ = cursor;
	_tmp5_ = page_size;
	_tmp6_ = page_size;
	page_start_pos = (_tmp4_ / _tmp5_) * _tmp6_;
	_tmp7_ = page_start_pos;
	_tmp8_ = page_size;
	_tmp9_ = ncandidates;
	page_end_pos = MIN (_tmp7_ + _tmp8_, _tmp9_);
	backward_button = NULL;
	_tmp10_ = self->priv->m_backward;
	if (_tmp10_ != NULL) {
		gchar* backward_desc = NULL;
		const gchar* _tmp11_;
		gchar* _tmp12_;
		IBusEmojierEPaddedLabelBox* label = NULL;
		const gchar* _tmp13_;
		IBusEmojierEPaddedLabelBox* _tmp14_;
		GtkButton* _tmp15_;
		GtkButton* _tmp16_;
		IBusEmojierEPaddedLabelBox* _tmp17_;
		GtkButton* _tmp18_;
		_tmp11_ = self->priv->m_backward;
		_tmp12_ = g_strdup (_ (_tmp11_));
		backward_desc = _tmp12_;
		_tmp13_ = backward_desc;
		_tmp14_ = ibus_emojier_epadded_label_box_new (_tmp13_, GTK_ALIGN_CENTER, IBUS_EMOJIER_TRAVEL_DIRECTION_BACKWARD, NULL);
		g_object_ref_sink (_tmp14_);
		label = _tmp14_;
		_tmp15_ = (GtkButton*) gtk_button_new ();
		g_object_ref_sink (_tmp15_);
		_g_object_unref0 (backward_button);
		backward_button = _tmp15_;
		_tmp16_ = backward_button;
		_tmp17_ = label;
		gtk_container_add ((GtkContainer*) _tmp16_, (GtkWidget*) _tmp17_);
		_tmp18_ = backward_button;
		g_signal_connect_object ((GtkWidget*) _tmp18_, "button-press-event", (GCallback) ____lambda13__gtk_widget_button_press_event, self, 0);
		_g_object_unref0 (label);
		_g_free0 (backward_desc);
	}
	_tmp19_ = ibus_emojier_egrid_new ();
	g_object_ref_sink (_tmp19_);
	grid = _tmp19_;
	n = 0;
	{
		guint i = 0U;
		guint _tmp20_;
		_tmp20_ = page_start_pos;
		i = _tmp20_;
		{
			gboolean _tmp21_ = FALSE;
			_tmp21_ = TRUE;
			while (TRUE) {
				Block2Data* _data2_;
				guint _tmp23_;
				guint _tmp24_;
				gchar* text = NULL;
				IBusLookupTable* _tmp25_;
				guint _tmp26_;
				IBusText* _tmp27_;
				const gchar* _tmp28_;
				gchar* _tmp29_;
				gboolean has_variant = FALSE;
				GHashTable* _tmp30_;
				const gchar* _tmp31_;
				gconstpointer _tmp32_;
				GtkLabel* label = NULL;
				guint _tmp33_;
				guint _tmp34_;
				const gchar* _tmp49_;
				GtkLabel* _tmp64_;
				GtkLabel* _tmp65_;
				GtkEventBox* candidate_ebox = NULL;
				GtkEventBox* _tmp66_;
				GtkEventBox* _tmp67_;
				GtkEventBox* _tmp68_;
				GtkLabel* _tmp69_;
				guint _tmp70_;
				GtkEventBox* _tmp71_;
				GtkEventBox* _tmp72_;
				IBusEmojierEGrid* _tmp73_;
				GtkEventBox* _tmp74_;
				gint _tmp75_;
				gint _tmp76_;
				gint _tmp77_;
				GtkLabel** _tmp78_;
				gint _tmp78__length1;
				GtkLabel* _tmp79_;
				GtkLabel* _tmp80_;
				_data2_ = g_slice_new0 (Block2Data);
				_data2_->_ref_count_ = 1;
				_data2_->self = g_object_ref (self);
				if (!_tmp21_) {
					guint _tmp22_;
					_tmp22_ = i;
					i = _tmp22_ + 1;
				}
				_tmp21_ = FALSE;
				_tmp23_ = i;
				_tmp24_ = page_end_pos;
				if (!(_tmp23_ < _tmp24_)) {
					block2_data_unref (_data2_);
					_data2_ = NULL;
					break;
				}
				_tmp25_ = self->priv->m_lookup_table;
				_tmp26_ = i;
				_tmp27_ = ibus_lookup_table_get_candidate (_tmp25_, _tmp26_);
				_tmp28_ = _tmp27_->text;
				_tmp29_ = g_strdup (_tmp28_);
				text = _tmp29_;
				_tmp30_ = ibus_emojier_m_emoji_to_emoji_variants_dict;
				_tmp31_ = text;
				_tmp32_ = g_hash_table_lookup (_tmp30_, _tmp31_);
				has_variant = ((GSList*) _tmp32_) != NULL;
				_tmp33_ = i;
				_tmp34_ = cursor;
				if (_tmp33_ == _tmp34_) {
					const gchar* _tmp35_;
					IBusEmojierESelectedLabel* _tmp36_;
					GtkLabel* _tmp37_;
					_tmp35_ = text;
					_tmp36_ = ibus_emojier_eselected_label_new (_tmp35_);
					g_object_ref_sink (_tmp36_);
					_tmp37_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp36_, gtk_label_get_type ()) ? ((GtkLabel*) _tmp36_) : NULL;
					if (_tmp37_ == NULL) {
						_g_object_unref0 (_tmp36_);
					}
					_g_object_unref0 (label);
					label = _tmp37_;
				} else {
					gboolean _tmp38_ = FALSE;
					gboolean _tmp39_ = FALSE;
					gboolean _tmp40_;
					_tmp40_ = ibus_emojier_m_show_emoji_variant;
					if (_tmp40_) {
						gboolean _tmp41_;
						_tmp41_ = has_variant;
						_tmp39_ = _tmp41_;
					} else {
						_tmp39_ = FALSE;
					}
					if (_tmp39_) {
						gint _tmp42_;
						_tmp42_ = self->priv->m_backward_index;
						_tmp38_ = _tmp42_ < 0;
					} else {
						_tmp38_ = FALSE;
					}
					if (_tmp38_) {
						const gchar* _tmp43_;
						IBusEmojierEGoldLabel* _tmp44_;
						GtkLabel* _tmp45_;
						_tmp43_ = text;
						_tmp44_ = ibus_emojier_egold_label_new (_tmp43_);
						g_object_ref_sink (_tmp44_);
						_tmp45_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp44_, gtk_label_get_type ()) ? ((GtkLabel*) _tmp44_) : NULL;
						if (_tmp45_ == NULL) {
							_g_object_unref0 (_tmp44_);
						}
						_g_object_unref0 (label);
						label = _tmp45_;
					} else {
						const gchar* _tmp46_;
						IBusEmojierEWhiteLabel* _tmp47_;
						GtkLabel* _tmp48_;
						_tmp46_ = text;
						_tmp47_ = ibus_emojier_ewhite_label_new (_tmp46_);
						g_object_ref_sink (_tmp47_);
						_tmp48_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp47_, gtk_label_get_type ()) ? ((GtkLabel*) _tmp47_) : NULL;
						if (_tmp48_ == NULL) {
							_g_object_unref0 (_tmp47_);
						}
						_g_object_unref0 (label);
						label = _tmp48_;
					}
				}
				_tmp49_ = text;
				if (g_utf8_strlen (_tmp49_, (gssize) -1) > 2) {
					gchar* font_family = NULL;
					const gchar* _tmp50_;
					gchar* _tmp51_;
					gint font_size = 0;
					gint _tmp52_;
					gchar* emoji_font = NULL;
					const gchar* _tmp53_;
					gint _tmp54_;
					gchar* _tmp55_;
					gchar* markup = NULL;
					const gchar* _tmp56_;
					const gchar* _tmp57_;
					gchar* _tmp58_;
					gchar* _tmp59_;
					gchar* _tmp60_;
					gchar* _tmp61_;
					GtkLabel* _tmp62_;
					const gchar* _tmp63_;
					_tmp50_ = ibus_emojier_m_emoji_font_family;
					_tmp51_ = g_strdup (_tmp50_);
					font_family = _tmp51_;
					_tmp52_ = ibus_emojier_m_emoji_font_size;
					font_size = _tmp52_ - 2;
					_tmp53_ = font_family;
					_tmp54_ = font_size;
					_tmp55_ = g_strdup_printf ("%s %d", _tmp53_, _tmp54_);
					emoji_font = _tmp55_;
					_tmp56_ = emoji_font;
					_tmp57_ = text;
					_tmp58_ = ibus_emojier_utf8_entity (_tmp57_);
					_tmp59_ = _tmp58_;
					_tmp60_ = g_strdup_printf ("<span font=\"%s\">%s</span>", _tmp56_, _tmp59_);
					_tmp61_ = _tmp60_;
					_g_free0 (_tmp59_);
					markup = _tmp61_;
					_tmp62_ = label;
					_tmp63_ = markup;
					gtk_label_set_markup (_tmp62_, _tmp63_);
					_g_free0 (markup);
					_g_free0 (emoji_font);
					_g_free0 (font_family);
				}
				_tmp64_ = label;
				gtk_widget_set_halign ((GtkWidget*) _tmp64_, GTK_ALIGN_FILL);
				_tmp65_ = label;
				gtk_widget_set_valign ((GtkWidget*) _tmp65_, GTK_ALIGN_FILL);
				_tmp66_ = (GtkEventBox*) gtk_event_box_new ();
				g_object_ref_sink (_tmp66_);
				candidate_ebox = _tmp66_;
				_tmp67_ = candidate_ebox;
				gtk_widget_add_events ((GtkWidget*) _tmp67_, (gint) GDK_POINTER_MOTION_MASK);
				_tmp68_ = candidate_ebox;
				_tmp69_ = label;
				gtk_container_add ((GtkContainer*) _tmp68_, (GtkWidget*) _tmp69_);
				_tmp70_ = i;
				_data2_->index = _tmp70_;
				_tmp71_ = candidate_ebox;
				g_signal_connect_data ((GtkWidget*) _tmp71_, "button-press-event", (GCallback) ______lambda14__gtk_widget_button_press_event, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0);
				_tmp72_ = candidate_ebox;
				g_signal_connect_data ((GtkWidget*) _tmp72_, "motion-notify-event", (GCallback) ______lambda15__gtk_widget_motion_notify_event, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref, 0);
				_tmp73_ = grid;
				_tmp74_ = candidate_ebox;
				_tmp75_ = n;
				_tmp76_ = n;
				gtk_grid_attach ((GtkGrid*) _tmp73_, (GtkWidget*) _tmp74_, _tmp75_ % ((gint) IBUS_EMOJIER_EMOJI_GRID_PAGE), _tmp76_ / ((gint) IBUS_EMOJIER_EMOJI_GRID_PAGE), 1, 1);
				_tmp77_ = n;
				n = _tmp77_ + 1;
				_tmp78_ = self->priv->m_candidates;
				_tmp78__length1 = self->priv->m_candidates_length1;
				_tmp79_ = label;
				_tmp80_ = _g_object_ref0 (_tmp79_);
				_vala_array_add2 (&self->priv->m_candidates, &self->priv->m_candidates_length1, &self->priv->_m_candidates_size_, _tmp80_);
				_g_object_unref0 (candidate_ebox);
				_g_object_unref0 (label);
				_g_free0 (text);
				block2_data_unref (_data2_);
				_data2_ = NULL;
			}
		}
	}
	self->priv->m_candidate_panel_is_visible = TRUE;
	_tmp81_ = self->priv->m_is_up_side_down;
	if (!_tmp81_) {
		GtkButton* _tmp82_;
		gint _tmp86_;
		gboolean _tmp90_;
		ibus_emojier_show_arrow_buttons (self);
		_tmp82_ = backward_button;
		if (_tmp82_ != NULL) {
			GtkBox* _tmp83_;
			GtkButton* _tmp84_;
			GtkButton* _tmp85_;
			_tmp83_ = self->priv->m_vbox;
			_tmp84_ = backward_button;
			gtk_container_add ((GtkContainer*) _tmp83_, (GtkWidget*) _tmp84_);
			_tmp85_ = backward_button;
			gtk_widget_show_all ((GtkWidget*) _tmp85_);
		}
		_tmp86_ = n;
		if (_tmp86_ > 0) {
			GtkBox* _tmp87_;
			IBusEmojierEGrid* _tmp88_;
			IBusEmojierEGrid* _tmp89_;
			_tmp87_ = self->priv->m_vbox;
			_tmp88_ = grid;
			gtk_container_add ((GtkContainer*) _tmp87_, (GtkWidget*) _tmp88_);
			_tmp89_ = grid;
			gtk_widget_show_all ((GtkWidget*) _tmp89_);
			ibus_emojier_show_description (self);
		}
		_tmp90_ = ibus_emojier_m_loaded_unicode;
		if (!_tmp90_) {
			ibus_emojier_show_unicode_progress_bar (self);
		}
	} else {
		gboolean _tmp91_;
		gint _tmp92_;
		GtkButton* _tmp96_;
		_tmp91_ = ibus_emojier_m_loaded_unicode;
		if (!_tmp91_) {
			ibus_emojier_show_unicode_progress_bar (self);
		}
		_tmp92_ = n;
		if (_tmp92_ > 0) {
			GtkBox* _tmp93_;
			IBusEmojierEGrid* _tmp94_;
			IBusEmojierEGrid* _tmp95_;
			ibus_emojier_show_description (self);
			_tmp93_ = self->priv->m_vbox;
			_tmp94_ = grid;
			gtk_container_add ((GtkContainer*) _tmp93_, (GtkWidget*) _tmp94_);
			_tmp95_ = grid;
			gtk_widget_show_all ((GtkWidget*) _tmp95_);
		}
		_tmp96_ = backward_button;
		if (_tmp96_ != NULL) {
			GtkBox* _tmp97_;
			GtkButton* _tmp98_;
			GtkButton* _tmp99_;
			_tmp97_ = self->priv->m_vbox;
			_tmp98_ = backward_button;
			gtk_container_add ((GtkContainer*) _tmp97_, (GtkWidget*) _tmp98_);
			_tmp99_ = backward_button;
			gtk_widget_show_all ((GtkWidget*) _tmp99_);
		}
		ibus_emojier_show_arrow_buttons (self);
	}
	_g_object_unref0 (grid);
	_g_object_unref0 (backward_button);
}


static void
ibus_emojier_show_description (IBusEmojier* self)
{
	guint cursor = 0U;
	IBusLookupTable* _tmp0_;
	gchar* text = NULL;
	IBusLookupTable* _tmp1_;
	guint _tmp2_;
	IBusText* _tmp3_;
	const gchar* _tmp4_;
	gchar* _tmp5_;
	IBusEmojiData* data = NULL;
	GHashTable* _tmp6_;
	const gchar* _tmp7_;
	gconstpointer _tmp8_;
	IBusEmojiData* _tmp9_;
	const gchar* _tmp12_;
	IBusEmojierEPaddedLabelBox* widget = NULL;
	gchar* _tmp20_;
	gchar* _tmp21_;
	IBusEmojierEPaddedLabelBox* _tmp22_;
	IBusEmojierEPaddedLabelBox* _tmp23_;
	GtkBox* _tmp24_;
	IBusEmojierEPaddedLabelBox* _tmp25_;
	IBusEmojierEPaddedLabelBox* _tmp26_;
	const gchar* _tmp27_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->m_lookup_table;
	cursor = ibus_lookup_table_get_cursor_pos (_tmp0_);
	_tmp1_ = self->priv->m_lookup_table;
	_tmp2_ = cursor;
	_tmp3_ = ibus_lookup_table_get_candidate (_tmp1_, _tmp2_);
	_tmp4_ = _tmp3_->text;
	_tmp5_ = g_strdup (_tmp4_);
	text = _tmp5_;
	_tmp6_ = ibus_emojier_m_emoji_to_data_dict;
	_tmp7_ = text;
	_tmp8_ = g_hash_table_lookup (_tmp6_, _tmp7_);
	data = (IBusEmojiData*) _tmp8_;
	_tmp9_ = data;
	if (_tmp9_ != NULL) {
		IBusEmojiData* _tmp10_;
		const gchar* _tmp11_;
		_tmp10_ = data;
		_tmp11_ = text;
		ibus_emojier_show_emoji_description (self, _tmp10_, _tmp11_);
		_g_free0 (text);
		return;
	}
	_tmp12_ = text;
	if (g_utf8_strlen (_tmp12_, (gssize) -1) <= 1) {
		gunichar code = 0U;
		const gchar* _tmp13_;
		IBusUnicodeData* udata = NULL;
		GHashTable* _tmp14_;
		gunichar _tmp15_;
		gconstpointer _tmp16_;
		IBusUnicodeData* _tmp17_;
		_tmp13_ = text;
		code = string_get_char (_tmp13_, (glong) 0);
		_tmp14_ = ibus_emojier_m_unicode_to_data_dict;
		_tmp15_ = code;
		_tmp16_ = g_hash_table_lookup (_tmp14_, (gpointer) ((gintptr) _tmp15_));
		udata = (IBusUnicodeData*) _tmp16_;
		_tmp17_ = udata;
		if (_tmp17_ != NULL) {
			IBusUnicodeData* _tmp18_;
			const gchar* _tmp19_;
			_tmp18_ = udata;
			_tmp19_ = text;
			ibus_emojier_show_unicode_description (self, _tmp18_, _tmp19_);
			_g_free0 (text);
			return;
		}
	}
	_tmp20_ = g_strdup_printf (_ ("Description: %s"), _ ("None"));
	_tmp21_ = _tmp20_;
	_tmp22_ = ibus_emojier_epadded_label_box_new (_tmp21_, GTK_ALIGN_START, IBUS_EMOJIER_TRAVEL_DIRECTION_NONE, NULL);
	g_object_ref_sink (_tmp22_);
	_tmp23_ = _tmp22_;
	_g_free0 (_tmp21_);
	widget = _tmp23_;
	_tmp24_ = self->priv->m_vbox;
	_tmp25_ = widget;
	gtk_container_add ((GtkContainer*) _tmp24_, (GtkWidget*) _tmp25_);
	_tmp26_ = widget;
	gtk_widget_show_all ((GtkWidget*) _tmp26_);
	_tmp27_ = text;
	ibus_emojier_show_code_point_description (self, _tmp27_);
	_g_object_unref0 (widget);
	_g_free0 (text);
}


static void
ibus_emojier_show_emoji_description (IBusEmojier* self,
                                     IBusEmojiData* data,
                                     const gchar* text)
{
	const gchar* description = NULL;
	const gchar* _tmp0_;
	GSList* annotations = NULL;
	GSList* _tmp9_;
	GString* buff = NULL;
	GString* _tmp10_;
	gint i = 0;
	GSList* _tmp11_;
	GString* _tmp26_;
	const gchar* _tmp27_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (data != NULL);
	g_return_if_fail (text != NULL);
	_tmp0_ = ibus_emoji_data_get_description (data);
	description = _tmp0_;
	{
		IBusEmojierEPaddedLabelBox* widget = NULL;
		const gchar* _tmp1_;
		gchar* _tmp2_;
		gchar* _tmp3_;
		IBusEmojierEPaddedLabelBox* _tmp4_;
		IBusEmojierEPaddedLabelBox* _tmp5_;
		GtkBox* _tmp6_;
		IBusEmojierEPaddedLabelBox* _tmp7_;
		IBusEmojierEPaddedLabelBox* _tmp8_;
		_tmp1_ = description;
		_tmp2_ = g_strdup_printf (_ ("Description: %s"), _tmp1_);
		_tmp3_ = _tmp2_;
		_tmp4_ = ibus_emojier_epadded_label_box_new (_tmp3_, GTK_ALIGN_START, IBUS_EMOJIER_TRAVEL_DIRECTION_NONE, NULL);
		g_object_ref_sink (_tmp4_);
		_tmp5_ = _tmp4_;
		_g_free0 (_tmp3_);
		widget = _tmp5_;
		_tmp6_ = self->priv->m_vbox;
		_tmp7_ = widget;
		gtk_container_add ((GtkContainer*) _tmp6_, (GtkWidget*) _tmp7_);
		_tmp8_ = widget;
		gtk_widget_show_all ((GtkWidget*) _tmp8_);
		_g_object_unref0 (widget);
	}
	_tmp9_ = ibus_emoji_data_get_annotations (data);
	annotations = _tmp9_;
	_tmp10_ = g_string_new ("");
	buff = _tmp10_;
	i = 0;
	_tmp11_ = annotations;
	{
		GSList* annotation_collection = NULL;
		GSList* annotation_it = NULL;
		annotation_collection = _tmp11_;
		for (annotation_it = annotation_collection; annotation_it != NULL; annotation_it = annotation_it->next) {
			const gchar* annotation = NULL;
			annotation = (const gchar*) annotation_it->data;
			{
				gint _tmp12_;
				GString* _tmp17_;
				const gchar* _tmp18_;
				_tmp12_ = i;
				i = _tmp12_ + 1;
				if (_tmp12_ == 0) {
					GString* _tmp13_;
					const gchar* _tmp14_;
					_tmp13_ = buff;
					_tmp14_ = annotation;
					g_string_append_printf (_tmp13_, _ ("Annotations: %s"), _tmp14_);
				} else {
					GString* _tmp15_;
					const gchar* _tmp16_;
					_tmp15_ = buff;
					_tmp16_ = annotation;
					g_string_append_printf (_tmp15_, " | %s", _tmp16_);
				}
				_tmp17_ = buff;
				_tmp18_ = _tmp17_->str;
				if (g_utf8_strlen (_tmp18_, (gssize) -1) > 30) {
					IBusEmojierEPaddedLabelBox* widget = NULL;
					GString* _tmp19_;
					const gchar* _tmp20_;
					IBusEmojierEPaddedLabelBox* _tmp21_;
					GtkBox* _tmp22_;
					IBusEmojierEPaddedLabelBox* _tmp23_;
					IBusEmojierEPaddedLabelBox* _tmp24_;
					GString* _tmp25_;
					_tmp19_ = buff;
					_tmp20_ = _tmp19_->str;
					_tmp21_ = ibus_emojier_epadded_label_box_new (_tmp20_, GTK_ALIGN_START, IBUS_EMOJIER_TRAVEL_DIRECTION_NONE, NULL);
					g_object_ref_sink (_tmp21_);
					widget = _tmp21_;
					_tmp22_ = self->priv->m_vbox;
					_tmp23_ = widget;
					gtk_container_add ((GtkContainer*) _tmp22_, (GtkWidget*) _tmp23_);
					_tmp24_ = widget;
					gtk_widget_show_all ((GtkWidget*) _tmp24_);
					_tmp25_ = buff;
					g_string_erase (_tmp25_, (gssize) 0, (gssize) -1);
					_g_object_unref0 (widget);
				}
			}
		}
	}
	_tmp26_ = buff;
	_tmp27_ = _tmp26_->str;
	if (g_strcmp0 (_tmp27_, "") != 0) {
		IBusEmojierEPaddedLabelBox* widget = NULL;
		GString* _tmp28_;
		const gchar* _tmp29_;
		IBusEmojierEPaddedLabelBox* _tmp30_;
		GtkBox* _tmp31_;
		IBusEmojierEPaddedLabelBox* _tmp32_;
		IBusEmojierEPaddedLabelBox* _tmp33_;
		_tmp28_ = buff;
		_tmp29_ = _tmp28_->str;
		_tmp30_ = ibus_emojier_epadded_label_box_new (_tmp29_, GTK_ALIGN_START, IBUS_EMOJIER_TRAVEL_DIRECTION_NONE, NULL);
		g_object_ref_sink (_tmp30_);
		widget = _tmp30_;
		_tmp31_ = self->priv->m_vbox;
		_tmp32_ = widget;
		gtk_container_add ((GtkContainer*) _tmp31_, (GtkWidget*) _tmp32_);
		_tmp33_ = widget;
		gtk_widget_show_all ((GtkWidget*) _tmp33_);
		_g_object_unref0 (widget);
	}
	ibus_emojier_show_code_point_description (self, text);
	_g_string_free0 (buff);
}


static void
ibus_emojier_show_unicode_description (IBusEmojier* self,
                                       IBusUnicodeData* data,
                                       const gchar* text)
{
	const gchar* name = NULL;
	const gchar* _tmp0_;
	const gchar* alias = NULL;
	const gchar* _tmp6_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (data != NULL);
	g_return_if_fail (text != NULL);
	_tmp0_ = ibus_unicode_data_get_name (data);
	name = _tmp0_;
	{
		IBusEmojierEPaddedLabelBox* widget = NULL;
		gchar* _tmp1_;
		gchar* _tmp2_;
		IBusEmojierEPaddedLabelBox* _tmp3_;
		IBusEmojierEPaddedLabelBox* _tmp4_;
		GtkBox* _tmp5_;
		_tmp1_ = g_strdup_printf (_ ("Name: %s"), name);
		_tmp2_ = _tmp1_;
		_tmp3_ = ibus_emojier_epadded_label_box_new (_tmp2_, GTK_ALIGN_START, IBUS_EMOJIER_TRAVEL_DIRECTION_NONE, NULL);
		g_object_ref_sink (_tmp3_);
		_tmp4_ = _tmp3_;
		_g_free0 (_tmp2_);
		widget = _tmp4_;
		_tmp5_ = self->priv->m_vbox;
		gtk_container_add ((GtkContainer*) _tmp5_, (GtkWidget*) widget);
		gtk_widget_show_all ((GtkWidget*) widget);
		_g_object_unref0 (widget);
	}
	_tmp6_ = ibus_unicode_data_get_alias (data);
	alias = _tmp6_;
	{
		IBusEmojierEPaddedLabelBox* widget = NULL;
		gchar* _tmp7_;
		gchar* _tmp8_;
		IBusEmojierEPaddedLabelBox* _tmp9_;
		IBusEmojierEPaddedLabelBox* _tmp10_;
		GtkBox* _tmp11_;
		_tmp7_ = g_strdup_printf (_ ("Alias: %s"), alias);
		_tmp8_ = _tmp7_;
		_tmp9_ = ibus_emojier_epadded_label_box_new (_tmp8_, GTK_ALIGN_START, IBUS_EMOJIER_TRAVEL_DIRECTION_NONE, NULL);
		g_object_ref_sink (_tmp9_);
		_tmp10_ = _tmp9_;
		_g_free0 (_tmp8_);
		widget = _tmp10_;
		_tmp11_ = self->priv->m_vbox;
		gtk_container_add ((GtkContainer*) _tmp11_, (GtkWidget*) widget);
		gtk_widget_show_all ((GtkWidget*) widget);
		_g_object_unref0 (widget);
	}
	ibus_emojier_show_code_point_description (self, text);
}


static void
ibus_emojier_hide_candidate_panel (IBusEmojier* self)
{
	gchar* _tmp0_;
	gboolean _tmp1_;
	g_return_if_fail (self != NULL);
	gtk_widget_hide ((GtkWidget*) self);
	self->priv->m_enter_notify_enable = TRUE;
	_tmp0_ = g_strdup ("");
	_g_free0 (self->priv->m_annotation);
	self->priv->m_annotation = _tmp0_;
	ibus_emojier_remove_all_children (self);
	_tmp1_ = ibus_emojier_m_show_unicode;
	if (_tmp1_) {
		ibus_emojier_update_unicode_blocks (self);
	} else {
		ibus_emojier_update_category_list (self);
	}
}


static gboolean
__lambda27_ (IBusEmojier* self)
{
	gboolean result = FALSE;
	self->priv->m_enter_notify_enable = TRUE;
	result = FALSE;
	return result;
}


static gboolean
___lambda27__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda27_ ((IBusEmojier*) self);
	return result;
}


static void
ibus_emojier_enter_notify_disable_with_timer (IBusEmojier* self)
{
	guint _tmp0_;
	g_return_if_fail (self != NULL);
	self->priv->m_enter_notify_enable = FALSE;
	_tmp0_ = self->priv->m_entry_notify_disable_id;
	if (_tmp0_ > ((guint) 0)) {
		guint _tmp1_;
		_tmp1_ = self->priv->m_entry_notify_disable_id;
		g_source_remove (_tmp1_);
	}
	self->priv->m_entry_notify_show_id = g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 100, ___lambda27__gsource_func, g_object_ref (self), g_object_unref);
}


static void
ibus_emojier_candidate_panel_select_index (IBusEmojier* self,
                                           guint index,
                                           guint button)
{
	gchar* text = NULL;
	IBusLookupTable* _tmp4_;
	IBusText* _tmp5_;
	const gchar* _tmp6_;
	gchar* _tmp7_;
	GSList* emojis = NULL;
	GHashTable* _tmp8_;
	const gchar* _tmp9_;
	gconstpointer _tmp10_;
	gboolean _tmp11_ = FALSE;
	gboolean _tmp12_ = FALSE;
	gboolean _tmp13_;
	g_return_if_fail (self != NULL);
	if (button == IBUS_EMOJIER_BUTTON_CLOSE_BUTTON) {
		gboolean _tmp0_ = FALSE;
		gboolean _tmp1_;
		gchar* _tmp3_;
		gtk_widget_hide ((GtkWidget*) self);
		_tmp1_ = self->priv->m_candidate_panel_mode;
		if (_tmp1_) {
			IBusLookupTable* _tmp2_;
			_tmp2_ = self->priv->m_lookup_table;
			_tmp0_ = ibus_lookup_table_get_number_of_candidates (_tmp2_) > ((guint) 0);
		} else {
			_tmp0_ = FALSE;
		}
		if (_tmp0_) {
			ibus_emojier_remove_all_children (self);
		}
		_tmp3_ = g_strdup ("");
		_g_free0 (self->priv->m_result);
		self->priv->m_result = _tmp3_;
		return;
	}
	_tmp4_ = self->priv->m_lookup_table;
	_tmp5_ = ibus_lookup_table_get_candidate (_tmp4_, index);
	_tmp6_ = _tmp5_->text;
	_tmp7_ = g_strdup (_tmp6_);
	text = _tmp7_;
	_tmp8_ = ibus_emojier_m_emoji_to_emoji_variants_dict;
	_tmp9_ = text;
	_tmp10_ = g_hash_table_lookup (_tmp8_, _tmp9_);
	emojis = (GSList*) _tmp10_;
	_tmp13_ = ibus_emojier_m_show_emoji_variant;
	if (_tmp13_) {
		GSList* _tmp14_;
		_tmp14_ = emojis;
		_tmp12_ = _tmp14_ != NULL;
	} else {
		_tmp12_ = FALSE;
	}
	if (_tmp12_) {
		gint _tmp15_;
		_tmp15_ = self->priv->m_backward_index;
		_tmp11_ = _tmp15_ < 0;
	} else {
		_tmp11_ = FALSE;
	}
	if (_tmp11_) {
		GSList* _tmp16_;
		_tmp16_ = emojis;
		ibus_emojier_show_emoji_variants (self, _tmp16_);
		gtk_widget_show_all ((GtkWidget*) self);
	} else {
		const gchar* _tmp17_;
		gchar* _tmp18_;
		_tmp17_ = text;
		_tmp18_ = g_strdup (_tmp17_);
		_g_free0 (self->priv->m_result);
		self->priv->m_result = _tmp18_;
		gtk_widget_hide ((GtkWidget*) self);
	}
	_g_free0 (text);
}


static void
ibus_emojier_candidate_panel_cursor_down (IBusEmojier* self)
{
	guint ncandidates = 0U;
	IBusLookupTable* _tmp0_;
	guint cursor = 0U;
	IBusLookupTable* _tmp1_;
	guint _tmp2_;
	guint _tmp3_;
	g_return_if_fail (self != NULL);
	ibus_emojier_enter_notify_disable_with_timer (self);
	_tmp0_ = self->priv->m_lookup_table;
	ncandidates = ibus_lookup_table_get_number_of_candidates (_tmp0_);
	_tmp1_ = self->priv->m_lookup_table;
	cursor = ibus_lookup_table_get_cursor_pos (_tmp1_);
	_tmp2_ = cursor;
	_tmp3_ = ncandidates;
	if ((_tmp2_ + IBUS_EMOJIER_EMOJI_GRID_PAGE) < _tmp3_) {
		IBusLookupTable* _tmp4_;
		guint _tmp5_;
		_tmp4_ = self->priv->m_lookup_table;
		_tmp5_ = cursor;
		ibus_lookup_table_set_cursor_pos (_tmp4_, _tmp5_ + IBUS_EMOJIER_EMOJI_GRID_PAGE);
	} else {
		guint _tmp6_;
		guint _tmp7_;
		_tmp6_ = cursor;
		_tmp7_ = ncandidates;
		if ((_tmp6_ % IBUS_EMOJIER_EMOJI_GRID_PAGE) < _tmp7_) {
			IBusLookupTable* _tmp8_;
			guint _tmp9_;
			_tmp8_ = self->priv->m_lookup_table;
			_tmp9_ = cursor;
			ibus_lookup_table_set_cursor_pos (_tmp8_, _tmp9_ % IBUS_EMOJIER_EMOJI_GRID_PAGE);
		} else {
			IBusLookupTable* _tmp10_;
			_tmp10_ = self->priv->m_lookup_table;
			ibus_lookup_table_set_cursor_pos (_tmp10_, (guint) 0);
		}
	}
}


static void
ibus_emojier_candidate_panel_cursor_up (IBusEmojier* self)
{
	gint ncandidates = 0;
	IBusLookupTable* _tmp0_;
	gint cursor = 0;
	IBusLookupTable* _tmp1_;
	gint highest_pos = 0;
	gint _tmp2_;
	gint _tmp3_;
	gint _tmp4_;
	g_return_if_fail (self != NULL);
	ibus_emojier_enter_notify_disable_with_timer (self);
	_tmp0_ = self->priv->m_lookup_table;
	ncandidates = (gint) ibus_lookup_table_get_number_of_candidates (_tmp0_);
	_tmp1_ = self->priv->m_lookup_table;
	cursor = (gint) ibus_lookup_table_get_cursor_pos (_tmp1_);
	_tmp2_ = ncandidates;
	_tmp3_ = cursor;
	highest_pos = (((_tmp2_ - 1) / ((gint) IBUS_EMOJIER_EMOJI_GRID_PAGE)) * ((gint) IBUS_EMOJIER_EMOJI_GRID_PAGE)) + (_tmp3_ % ((gint) IBUS_EMOJIER_EMOJI_GRID_PAGE));
	_tmp4_ = cursor;
	if ((_tmp4_ - ((gint) IBUS_EMOJIER_EMOJI_GRID_PAGE)) >= 0) {
		IBusLookupTable* _tmp5_;
		gint _tmp6_;
		_tmp5_ = self->priv->m_lookup_table;
		_tmp6_ = cursor;
		ibus_lookup_table_set_cursor_pos (_tmp5_, (guint) (_tmp6_ - ((gint) IBUS_EMOJIER_EMOJI_GRID_PAGE)));
	} else {
		gint _tmp7_;
		gint _tmp8_;
		_tmp7_ = highest_pos;
		_tmp8_ = ncandidates;
		if (_tmp7_ < _tmp8_) {
			IBusLookupTable* _tmp9_;
			gint _tmp10_;
			_tmp9_ = self->priv->m_lookup_table;
			_tmp10_ = highest_pos;
			ibus_lookup_table_set_cursor_pos (_tmp9_, (guint) _tmp10_);
		} else {
			IBusLookupTable* _tmp11_;
			_tmp11_ = self->priv->m_lookup_table;
			ibus_lookup_table_set_cursor_pos (_tmp11_, (guint) 0);
		}
	}
}


static gint
ibus_emojier_get_page_num (IBusEmojier* self)
{
	gint result = 0;
	gint _tmp0_;
	GtkListBoxRow* row = NULL;
	IBusEmojierEListBox* _tmp1_;
	gint _tmp2_;
	GtkListBoxRow* _tmp3_;
	GtkListBoxRow* _tmp4_;
	GtkAllocation alloc = {0};
	GtkAllocation _tmp5_ = {0};
	GtkListBoxRow* _tmp6_;
	GtkAllocation _tmp7_ = {0};
	GtkAdjustment* adjustment = NULL;
	IBusEmojierEScrolledWindow* _tmp8_;
	GtkAdjustment* _tmp9_;
	GtkAdjustment* _tmp10_;
	gint page_size = 0;
	GtkAdjustment* _tmp11_;
	gint page_num = 0;
	gint _tmp12_;
	GtkAllocation _tmp13_;
	gint _tmp14_;
	gint _tmp15_ = 0;
	gint _tmp16_;
	GtkAllocation _tmp17_;
	gint _tmp18_;
	gint _tmp19_;
	g_return_val_if_fail (self != NULL, 0);
	_tmp0_ = self->priv->m_category_active_index;
	if (_tmp0_ < 0) {
		self->priv->m_category_active_index = 0;
	}
	_tmp1_ = self->priv->m_list_box;
	_tmp2_ = self->priv->m_category_active_index;
	_tmp3_ = gtk_list_box_get_row_at_index ((GtkListBox*) _tmp1_, _tmp2_);
	_tmp4_ = _g_object_ref0 (_tmp3_);
	row = _tmp4_;
	_tmp5_.x = 0;
	_tmp5_.y = 0;
	_tmp5_.width = 0;
	_tmp5_.height = 0;
	alloc = _tmp5_;
	_tmp6_ = row;
	gtk_widget_get_allocation ((GtkWidget*) _tmp6_, &_tmp7_);
	alloc = _tmp7_;
	_tmp8_ = self->priv->m_scrolled_window;
	_tmp9_ = gtk_scrolled_window_get_vadjustment ((GtkScrolledWindow*) _tmp8_);
	_tmp10_ = _g_object_ref0 (_tmp9_);
	adjustment = _tmp10_;
	_tmp11_ = adjustment;
	page_size = (gint) gtk_adjustment_get_page_size (_tmp11_);
	_tmp12_ = page_size;
	_tmp13_ = alloc;
	_tmp14_ = _tmp13_.height;
	page_num = _tmp12_ / _tmp14_;
	_tmp16_ = page_size;
	_tmp17_ = alloc;
	_tmp18_ = _tmp17_.height;
	if ((_tmp16_ % _tmp18_) > 0) {
		_tmp15_ = 1;
	} else {
		_tmp15_ = 0;
	}
	_tmp19_ = page_num;
	page_num = _tmp19_ + _tmp15_;
	result = page_num;
	_g_object_unref0 (adjustment);
	_g_object_unref0 (row);
	return result;
}


static gboolean
ibus_emojier_category_list_cursor_move (IBusEmojier* self,
                                        guint keyval)
{
	gboolean result = FALSE;
	IBusEmojierEListBox* _tmp0_;
	GList* list = NULL;
	IBusEmojierEListBox* _tmp1_;
	GList* _tmp2_;
	gint length = 0;
	GList* _tmp3_;
	gint _tmp4_;
	GtkListBoxRow* row = NULL;
	IBusEmojierEListBox* _tmp26_;
	GtkListBoxRow* _tmp27_;
	GtkListBoxRow* _tmp28_;
	GtkListBoxRow* _tmp29_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->m_list_box;
	g_return_val_if_fail (_tmp0_ != NULL, FALSE);
	_tmp1_ = self->priv->m_list_box;
	_tmp2_ = gtk_container_get_children ((GtkContainer*) _tmp1_);
	list = _tmp2_;
	_tmp3_ = list;
	length = (gint) g_list_length (_tmp3_);
	_tmp4_ = length;
	if (_tmp4_ == 0) {
		result = FALSE;
		(list == NULL) ? NULL : (list = (g_list_free (list), NULL));
		return result;
	}
	switch (keyval) {
		case GDK_KEY_Down:
		{
			gint _tmp5_;
			gint _tmp6_;
			gint _tmp7_;
			_tmp5_ = self->priv->m_category_active_index;
			self->priv->m_category_active_index = _tmp5_ + 1;
			_tmp6_ = self->priv->m_category_active_index;
			_tmp7_ = length;
			if (_tmp6_ == _tmp7_) {
				self->priv->m_category_active_index = 0;
			}
			break;
		}
		case GDK_KEY_Up:
		{
			gint _tmp8_;
			gint _tmp9_;
			_tmp8_ = self->priv->m_category_active_index;
			self->priv->m_category_active_index = _tmp8_ - 1;
			_tmp9_ = self->priv->m_category_active_index;
			if (_tmp9_ < 0) {
				gint _tmp10_;
				_tmp10_ = length;
				self->priv->m_category_active_index = _tmp10_ - 1;
			}
			break;
		}
		case GDK_KEY_Home:
		{
			self->priv->m_category_active_index = 0;
			break;
		}
		case GDK_KEY_End:
		{
			gint _tmp11_;
			_tmp11_ = length;
			self->priv->m_category_active_index = _tmp11_ - 1;
			break;
		}
		case GDK_KEY_Page_Down:
		{
			gint page_num = 0;
			gint _tmp12_;
			gint _tmp13_;
			page_num = ibus_emojier_get_page_num (self);
			_tmp12_ = self->priv->m_category_active_index;
			_tmp13_ = length;
			if ((_tmp12_ + 1) == _tmp13_) {
				self->priv->m_category_active_index = 0;
			} else {
				gint _tmp14_;
				gint _tmp15_;
				gint _tmp16_;
				_tmp14_ = self->priv->m_category_active_index;
				_tmp15_ = page_num;
				_tmp16_ = length;
				if ((_tmp14_ + _tmp15_) >= _tmp16_) {
					gint _tmp17_;
					_tmp17_ = length;
					self->priv->m_category_active_index = _tmp17_ - 1;
				} else {
					gint _tmp18_;
					gint _tmp19_;
					_tmp18_ = self->priv->m_category_active_index;
					_tmp19_ = page_num;
					self->priv->m_category_active_index = _tmp18_ + _tmp19_;
				}
			}
			break;
		}
		case GDK_KEY_Page_Up:
		{
			gint page_num = 0;
			gint _tmp20_;
			page_num = ibus_emojier_get_page_num (self);
			_tmp20_ = self->priv->m_category_active_index;
			if (_tmp20_ == 0) {
				gint _tmp21_;
				_tmp21_ = length;
				self->priv->m_category_active_index = _tmp21_ - 1;
			} else {
				gint _tmp22_;
				gint _tmp23_;
				_tmp22_ = self->priv->m_category_active_index;
				_tmp23_ = page_num;
				if ((_tmp22_ - _tmp23_) < 0) {
					self->priv->m_category_active_index = 0;
				} else {
					gint _tmp24_;
					gint _tmp25_;
					_tmp24_ = self->priv->m_category_active_index;
					_tmp25_ = page_num;
					self->priv->m_category_active_index = _tmp24_ - _tmp25_;
				}
			}
			break;
		}
		default:
		break;
	}
	_tmp26_ = self->priv->m_list_box;
	_tmp27_ = gtk_list_box_get_selected_row ((GtkListBox*) _tmp26_);
	_tmp28_ = _g_object_ref0 (_tmp27_);
	row = _tmp28_;
	_tmp29_ = row;
	if (_tmp29_ != NULL) {
		IBusEmojierEListBox* _tmp30_;
		GtkListBoxRow* _tmp31_;
		_tmp30_ = self->priv->m_list_box;
		_tmp31_ = row;
		gtk_list_box_unselect_row ((GtkListBox*) _tmp30_, _tmp31_);
	}
	ibus_emojier_clamp_page (self);
	result = TRUE;
	_g_object_unref0 (row);
	(list == NULL) ? NULL : (list = (g_list_free (list), NULL));
	return result;
}


gboolean
ibus_emojier_has_variants (IBusEmojier* self,
                           guint index)
{
	gboolean result = FALSE;
	IBusLookupTable* _tmp0_;
	gchar* text = NULL;
	IBusLookupTable* _tmp1_;
	IBusText* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	GSList* emojis = NULL;
	GHashTable* _tmp5_;
	const gchar* _tmp6_;
	gconstpointer _tmp7_;
	gboolean _tmp8_ = FALSE;
	gboolean _tmp9_ = FALSE;
	gboolean _tmp10_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->m_lookup_table;
	if (index >= ibus_lookup_table_get_number_of_candidates (_tmp0_)) {
		result = FALSE;
		return result;
	}
	_tmp1_ = self->priv->m_lookup_table;
	_tmp2_ = ibus_lookup_table_get_candidate (_tmp1_, index);
	_tmp3_ = _tmp2_->text;
	_tmp4_ = g_strdup (_tmp3_);
	text = _tmp4_;
	_tmp5_ = ibus_emojier_m_emoji_to_emoji_variants_dict;
	_tmp6_ = text;
	_tmp7_ = g_hash_table_lookup (_tmp5_, _tmp6_);
	emojis = (GSList*) _tmp7_;
	_tmp10_ = ibus_emojier_m_show_emoji_variant;
	if (_tmp10_) {
		GSList* _tmp11_;
		_tmp11_ = emojis;
		_tmp9_ = _tmp11_ != NULL;
	} else {
		_tmp9_ = FALSE;
	}
	if (_tmp9_) {
		gint _tmp12_;
		_tmp12_ = self->priv->m_backward_index;
		_tmp8_ = _tmp12_ < 0;
	} else {
		_tmp8_ = FALSE;
	}
	if (_tmp8_) {
		GSList* _tmp13_;
		_tmp13_ = emojis;
		ibus_emojier_show_emoji_variants (self, _tmp13_);
		result = TRUE;
		_g_free0 (text);
		return result;
	}
	result = FALSE;
	_g_free0 (text);
	return result;
}


gboolean
ibus_emojier_key_press_cursor_horizontal (IBusEmojier* self,
                                          guint keyval,
                                          guint modifiers)
{
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_;
	g_return_val_if_fail (self != NULL, FALSE);
	if (keyval == ((guint) GDK_KEY_Left)) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = keyval == ((guint) GDK_KEY_Right);
	}
	_vala_assert (_tmp0_, "keyval == Gdk.Key.Left || keyval == Gdk.Key.Right");
	_tmp2_ = self->priv->m_candidate_panel_mode;
	if (_tmp2_) {
		IBusLookupTable* _tmp3_;
		_tmp3_ = self->priv->m_lookup_table;
		_tmp1_ = ibus_lookup_table_get_number_of_candidates (_tmp3_) > ((guint) 0);
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		ibus_emojier_enter_notify_disable_with_timer (self);
		if (keyval == ((guint) GDK_KEY_Left)) {
			IBusLookupTable* _tmp4_;
			_tmp4_ = self->priv->m_lookup_table;
			ibus_lookup_table_cursor_up (_tmp4_);
		} else {
			if (keyval == ((guint) GDK_KEY_Right)) {
				IBusLookupTable* _tmp5_;
				_tmp5_ = self->priv->m_lookup_table;
				ibus_lookup_table_cursor_down (_tmp5_);
			}
		}
	} else {
		IBusEmojierEEntry* _tmp6_;
		const gchar* _tmp7_;
		gint _tmp8_;
		gint _tmp9_;
		_tmp6_ = self->priv->m_entry;
		_tmp7_ = gtk_entry_get_text ((GtkEntry*) _tmp6_);
		_tmp8_ = strlen (_tmp7_);
		_tmp9_ = _tmp8_;
		if (_tmp9_ > 0) {
			gint step = 0;
			gboolean _tmp10_ = FALSE;
			IBusEmojierEEntry* _tmp11_;
			gint _tmp12_;
			step = 0;
			if (keyval == ((guint) GDK_KEY_Left)) {
				step = -1;
			} else {
				if (keyval == ((guint) GDK_KEY_Right)) {
					step = 1;
				}
			}
			if ((modifiers & GDK_SHIFT_MASK) != ((guint) 0)) {
				_tmp10_ = TRUE;
			} else {
				_tmp10_ = FALSE;
			}
			_tmp11_ = self->priv->m_entry;
			_tmp12_ = step;
			g_signal_emit_by_name (_tmp11_, "move-cursor", GTK_MOVEMENT_VISUAL_POSITIONS, _tmp12_, _tmp10_, NULL);
		} else {
			if (keyval == ((guint) GDK_KEY_Left)) {
				keyval = (guint) GDK_KEY_Up;
			} else {
				if (keyval == ((guint) GDK_KEY_Right)) {
					keyval = (guint) GDK_KEY_Down;
				}
			}
			result = ibus_emojier_category_list_cursor_move (self, keyval);
			return result;
		}
	}
	result = TRUE;
	return result;
}


gboolean
ibus_emojier_key_press_cursor_vertical (IBusEmojier* self,
                                        guint keyval,
                                        guint modifiers)
{
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
	gboolean _tmp4_ = FALSE;
	gboolean _tmp5_;
	g_return_val_if_fail (self != NULL, FALSE);
	if (keyval == ((guint) GDK_KEY_Down)) {
		_tmp2_ = TRUE;
	} else {
		_tmp2_ = keyval == ((guint) GDK_KEY_Up);
	}
	if (_tmp2_) {
		_tmp1_ = TRUE;
	} else {
		_tmp1_ = keyval == ((guint) GDK_KEY_Page_Down);
	}
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = keyval == ((guint) GDK_KEY_Page_Up);
	}
	_vala_assert (_tmp0_, "keyval == Gdk.Key.Down || keyval == Gdk.Key.Up ||                 keyval == Gdk.Key.Page_Down || keyval == Gdk.Key.Page_Up");
	if ((modifiers & GDK_SHIFT_MASK) != ((guint) 0)) {
		if (keyval == ((guint) GDK_KEY_Down)) {
			keyval = (guint) GDK_KEY_Page_Down;
		} else {
			if (keyval == ((guint) GDK_KEY_Up)) {
				keyval = (guint) GDK_KEY_Page_Up;
			}
		}
	}
	_tmp5_ = self->priv->m_candidate_panel_is_visible;
	if (_tmp5_) {
		_tmp4_ = TRUE;
	} else {
		const gchar* _tmp6_;
		gint _tmp7_;
		gint _tmp8_;
		_tmp6_ = self->priv->m_annotation;
		_tmp7_ = strlen (_tmp6_);
		_tmp8_ = _tmp7_;
		_tmp4_ = _tmp8_ > 0;
	}
	if (_tmp4_) {
		IBusLookupTable* _tmp9_;
		_tmp9_ = self->priv->m_lookup_table;
		_tmp3_ = ibus_lookup_table_get_number_of_candidates (_tmp9_) > ((guint) 0);
	} else {
		_tmp3_ = FALSE;
	}
	if (_tmp3_) {
		switch (keyval) {
			case GDK_KEY_Down:
			{
				ibus_emojier_candidate_panel_cursor_down (self);
				break;
			}
			case GDK_KEY_Up:
			{
				ibus_emojier_candidate_panel_cursor_up (self);
				break;
			}
			case GDK_KEY_Page_Down:
			{
				IBusLookupTable* _tmp10_;
				ibus_emojier_enter_notify_disable_with_timer (self);
				_tmp10_ = self->priv->m_lookup_table;
				ibus_lookup_table_page_down (_tmp10_);
				break;
			}
			case GDK_KEY_Page_Up:
			{
				IBusLookupTable* _tmp11_;
				ibus_emojier_enter_notify_disable_with_timer (self);
				_tmp11_ = self->priv->m_lookup_table;
				ibus_lookup_table_page_up (_tmp11_);
				break;
			}
			default:
			break;
		}
	} else {
		result = ibus_emojier_category_list_cursor_move (self, keyval);
		return result;
	}
	result = TRUE;
	return result;
}


gboolean
ibus_emojier_key_press_cursor_home_end (IBusEmojier* self,
                                        guint keyval,
                                        guint modifiers)
{
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
	guint ncandidates = 0U;
	IBusLookupTable* _tmp1_;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_;
	IBusEmojierEEntry* _tmp8_;
	const gchar* _tmp9_;
	gint _tmp10_;
	gint _tmp11_;
	g_return_val_if_fail (self != NULL, FALSE);
	if (keyval == ((guint) GDK_KEY_Home)) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = keyval == ((guint) GDK_KEY_End);
	}
	_vala_assert (_tmp0_, "keyval == Gdk.Key.Home || keyval == Gdk.Key.End");
	_tmp1_ = self->priv->m_lookup_table;
	ncandidates = ibus_lookup_table_get_number_of_candidates (_tmp1_);
	_tmp3_ = self->priv->m_candidate_panel_mode;
	if (_tmp3_) {
		guint _tmp4_;
		_tmp4_ = ncandidates;
		_tmp2_ = _tmp4_ > ((guint) 0);
	} else {
		_tmp2_ = FALSE;
	}
	if (_tmp2_) {
		ibus_emojier_enter_notify_disable_with_timer (self);
		if (keyval == ((guint) GDK_KEY_Home)) {
			IBusLookupTable* _tmp5_;
			_tmp5_ = self->priv->m_lookup_table;
			ibus_lookup_table_set_cursor_pos (_tmp5_, (guint) 0);
		} else {
			if (keyval == ((guint) GDK_KEY_End)) {
				IBusLookupTable* _tmp6_;
				guint _tmp7_;
				_tmp6_ = self->priv->m_lookup_table;
				_tmp7_ = ncandidates;
				ibus_lookup_table_set_cursor_pos (_tmp6_, _tmp7_ - 1);
			}
		}
		result = TRUE;
		return result;
	}
	_tmp8_ = self->priv->m_entry;
	_tmp9_ = gtk_entry_get_text ((GtkEntry*) _tmp8_);
	_tmp10_ = strlen (_tmp9_);
	_tmp11_ = _tmp10_;
	if (_tmp11_ > 0) {
		gint step = 0;
		gboolean _tmp12_ = FALSE;
		IBusEmojierEEntry* _tmp13_;
		gint _tmp14_;
		step = 0;
		if (keyval == ((guint) GDK_KEY_Home)) {
			step = -1;
		} else {
			if (keyval == ((guint) GDK_KEY_End)) {
				step = 1;
			}
		}
		if ((modifiers & GDK_SHIFT_MASK) != ((guint) 0)) {
			_tmp12_ = TRUE;
		} else {
			_tmp12_ = FALSE;
		}
		_tmp13_ = self->priv->m_entry;
		_tmp14_ = step;
		g_signal_emit_by_name (_tmp13_, "move-cursor", GTK_MOVEMENT_DISPLAY_LINE_ENDS, _tmp14_, _tmp12_, NULL);
		result = TRUE;
		return result;
	}
	result = ibus_emojier_category_list_cursor_move (self, keyval);
	return result;
}


gboolean
ibus_emojier_key_press_escape (IBusEmojier* self)
{
	gboolean result = FALSE;
	gboolean _tmp0_;
	gboolean _tmp9_ = FALSE;
	gboolean _tmp10_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = ibus_emojier_m_show_unicode;
	if (_tmp0_) {
		gboolean _tmp1_;
		_tmp1_ = self->priv->m_candidate_panel_is_visible;
		if (!_tmp1_) {
			ibus_emojier_m_show_unicode = FALSE;
			self->priv->m_category_active_index = -1;
		}
		ibus_emojier_hide_candidate_panel (self);
		result = TRUE;
		return result;
	} else {
		gboolean _tmp2_ = FALSE;
		gint _tmp3_;
		_tmp3_ = self->priv->m_backward_index;
		if (_tmp3_ >= 0) {
			const gchar* _tmp4_;
			_tmp4_ = self->priv->m_backward;
			_tmp2_ = _tmp4_ != NULL;
		} else {
			_tmp2_ = FALSE;
		}
		if (_tmp2_) {
			const gchar* _tmp5_;
			_tmp5_ = self->priv->m_backward;
			ibus_emojier_show_emoji_for_category (self, _tmp5_);
			result = TRUE;
			return result;
		} else {
			gboolean _tmp6_ = FALSE;
			gboolean _tmp7_;
			_tmp7_ = self->priv->m_candidate_panel_is_visible;
			if (_tmp7_) {
				const gchar* _tmp8_;
				_tmp8_ = self->priv->m_backward;
				_tmp6_ = _tmp8_ != NULL;
			} else {
				_tmp6_ = FALSE;
			}
			if (_tmp6_) {
				ibus_emojier_hide_candidate_panel (self);
				result = TRUE;
				return result;
			}
		}
	}
	gtk_widget_hide ((GtkWidget*) self);
	_tmp10_ = self->priv->m_candidate_panel_mode;
	if (_tmp10_) {
		IBusLookupTable* _tmp11_;
		_tmp11_ = self->priv->m_lookup_table;
		_tmp9_ = ibus_lookup_table_get_number_of_candidates (_tmp11_) > ((guint) 0);
	} else {
		_tmp9_ = FALSE;
	}
	if (_tmp9_) {
		ibus_emojier_remove_all_children (self);
	}
	result = FALSE;
	return result;
}


gboolean
ibus_emojier_key_press_enter (IBusEmojier* self)
{
	gboolean result = FALSE;
	gboolean _tmp0_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->m_candidate_panel_is_visible;
	if (_tmp0_) {
		guint index = 0U;
		IBusLookupTable* _tmp1_;
		guint _tmp2_;
		_tmp1_ = self->priv->m_lookup_table;
		index = ibus_lookup_table_get_cursor_pos (_tmp1_);
		_tmp2_ = index;
		result = ibus_emojier_has_variants (self, _tmp2_);
		return result;
	} else {
		gint _tmp3_;
		_tmp3_ = self->priv->m_category_active_index;
		if (_tmp3_ >= 0) {
			GtkListBoxRow* gtkrow = NULL;
			IBusEmojierEListBox* _tmp4_;
			GtkListBoxRow* _tmp5_;
			GtkListBoxRow* _tmp6_;
			IBusEmojierEBoxRow* row = NULL;
			GtkListBoxRow* _tmp7_;
			IBusEmojierEBoxRow* _tmp8_;
			gboolean _tmp9_;
			_tmp4_ = self->priv->m_list_box;
			_tmp5_ = gtk_list_box_get_selected_row ((GtkListBox*) _tmp4_);
			_tmp6_ = _g_object_ref0 (_tmp5_);
			gtkrow = _tmp6_;
			_tmp7_ = gtkrow;
			_tmp8_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp7_, IBUS_EMOJIER_TYPE_EBOX_ROW) ? ((IBusEmojierEBoxRow*) _tmp7_) : NULL);
			row = _tmp8_;
			_tmp9_ = ibus_emojier_m_show_unicode;
			if (_tmp9_) {
				IBusEmojierEBoxRow* _tmp10_;
				const gchar* _tmp11_;
				const gchar* _tmp12_;
				_tmp10_ = row;
				_tmp11_ = ibus_emojier_ebox_row_get_text (_tmp10_);
				_tmp12_ = _tmp11_;
				ibus_emojier_show_unicode_for_block (self, _tmp12_);
			} else {
				IBusEmojierEBoxRow* _tmp13_;
				const gchar* _tmp14_;
				const gchar* _tmp15_;
				_tmp13_ = row;
				_tmp14_ = ibus_emojier_ebox_row_get_text (_tmp13_);
				_tmp15_ = _tmp14_;
				ibus_emojier_show_emoji_for_category (self, _tmp15_);
			}
			_g_object_unref0 (row);
			_g_object_unref0 (gtkrow);
		}
	}
	result = TRUE;
	return result;
}


static void
ibus_emojier_entry_enter_keyval (IBusEmojier* self,
                                 guint keyval)
{
	gunichar ch = 0U;
	gunichar _tmp0_;
	gchar* str = NULL;
	gunichar _tmp1_;
	gchar* _tmp2_;
	IBusEmojierEEntry* _tmp3_;
	gboolean _tmp4_;
	gint pos = 0;
	IBusEmojierEEntry* _tmp14_;
	IBusEmojierEEntry* _tmp15_;
	const gchar* _tmp16_;
	IBusEmojierEEntry* _tmp17_;
	gint _tmp18_;
	g_return_if_fail (self != NULL);
	ch = ibus_keyval_to_unicode (keyval);
	_tmp0_ = ch;
	if (g_unichar_iscntrl (_tmp0_)) {
		return;
	}
	_tmp1_ = ch;
	_tmp2_ = g_unichar_to_string (_tmp1_);
	str = _tmp2_;
	_tmp3_ = self->priv->m_entry;
	_tmp4_ = gtk_editable_get_selection_bounds ((GtkEditable*) _tmp3_, NULL, NULL);
	if (_tmp4_) {
		IBusEmojierEEntry* _tmp5_;
		_tmp5_ = self->priv->m_entry;
		gtk_editable_delete_selection ((GtkEditable*) _tmp5_);
	} else {
		IBusEmojierEEntry* _tmp6_;
		_tmp6_ = self->priv->m_entry;
		if (gtk_entry_get_overwrite_mode ((GtkEntry*) _tmp6_)) {
			guint text_length = 0U;
			IBusEmojierEEntry* _tmp7_;
			GtkEntryBuffer* _tmp8_;
			IBusEmojierEEntry* _tmp9_;
			gint _tmp10_;
			gint _tmp11_;
			guint _tmp12_;
			_tmp7_ = self->priv->m_entry;
			_tmp8_ = gtk_entry_get_buffer ((GtkEntry*) _tmp7_);
			text_length = gtk_entry_buffer_get_length (_tmp8_);
			_tmp9_ = self->priv->m_entry;
			g_object_get ((GtkEntry*) _tmp9_, "cursor-position", &_tmp10_, NULL);
			_tmp11_ = _tmp10_;
			_tmp12_ = text_length;
			if (((guint) _tmp11_) < _tmp12_) {
				IBusEmojierEEntry* _tmp13_;
				_tmp13_ = self->priv->m_entry;
				g_signal_emit_by_name ((GtkEntry*) _tmp13_, "delete-from-cursor", GTK_DELETE_CHARS, 1);
			}
		}
	}
	_tmp14_ = self->priv->m_entry;
	pos = gtk_editable_get_position ((GtkEditable*) _tmp14_);
	_tmp15_ = self->priv->m_entry;
	_tmp16_ = str;
	g_signal_emit_by_name ((GtkEditable*) _tmp15_, "insert-text", _tmp16_, -1, &pos);
	_tmp17_ = self->priv->m_entry;
	_tmp18_ = pos;
	gtk_editable_set_position ((GtkEditable*) _tmp17_, _tmp18_);
	_g_free0 (str);
}


static void
ibus_emojier_get_monitor_geometry (IBusEmojier* self,
                                   GdkRectangle* result)
{
	GdkRectangle monitor_area = {0};
	GdkRectangle _tmp0_ = {0};
	GdkMonitor* monitor = NULL;
	GdkDisplay* _tmp1_;
	GdkRectangle _tmp2_;
	gint _tmp3_;
	GdkRectangle _tmp4_;
	gint _tmp5_;
	GdkMonitor* _tmp6_;
	GdkMonitor* _tmp7_;
	GdkRectangle _tmp8_ = {0};
	g_return_if_fail (self != NULL);
	_tmp0_.x = 0;
	monitor_area = _tmp0_;
	_tmp1_ = gdk_display_get_default ();
	_tmp2_ = self->priv->m_cursor_location;
	_tmp3_ = _tmp2_.x;
	_tmp4_ = self->priv->m_cursor_location;
	_tmp5_ = _tmp4_.y;
	_tmp6_ = gdk_display_get_monitor_at_point (_tmp1_, _tmp3_, _tmp5_);
	_tmp7_ = _g_object_ref0 (_tmp6_);
	monitor = _tmp7_;
	gdk_monitor_get_geometry (monitor, &_tmp8_);
	monitor_area = _tmp8_;
	*result = monitor_area;
	_g_object_unref0 (monitor);
	return;
}


static gboolean
___lambda12_ (IBusEmojier* self)
{
	gboolean result = FALSE;
	self->priv->m_redraw_window_id = (guint) 0;
	gtk_widget_show_all ((GtkWidget*) self);
	result = FALSE;
	return result;
}


static gboolean
____lambda12__gsource_func (gpointer self)
{
	gboolean result;
	result = ___lambda12_ ((IBusEmojier*) self);
	return result;
}


static void
ibus_emojier_adjust_window_position (IBusEmojier* self)
{
	GdkPoint cursor_right_bottom = {0};
	GdkRectangle _tmp0_;
	gint _tmp1_;
	GdkRectangle _tmp2_;
	gint _tmp3_;
	GdkRectangle _tmp4_;
	gint _tmp5_;
	GdkRectangle _tmp6_;
	gint _tmp7_;
	GdkPoint _tmp8_ = {0};
	GtkAllocation allocation = {0};
	GtkAllocation _tmp9_ = {0};
	GdkPoint window_right_bottom = {0};
	GdkPoint _tmp10_;
	gint _tmp11_;
	GtkAllocation _tmp12_;
	gint _tmp13_;
	GdkPoint _tmp14_;
	gint _tmp15_;
	GtkAllocation _tmp16_;
	gint _tmp17_;
	GdkPoint _tmp18_ = {0};
	GdkRectangle monitor_area = {0};
	GdkRectangle _tmp19_ = {0};
	gint monitor_right = 0;
	GdkRectangle _tmp20_;
	gint _tmp21_;
	GdkRectangle _tmp22_;
	gint _tmp23_;
	gint monitor_bottom = 0;
	GdkRectangle _tmp24_;
	gint _tmp25_;
	GdkRectangle _tmp26_;
	gint _tmp27_;
	gint x = 0;
	gint y = 0;
	GdkPoint _tmp28_;
	gint _tmp29_;
	gint _tmp30_;
	gint _tmp36_;
	gboolean changed = FALSE;
	GdkPoint _tmp37_;
	gint _tmp38_;
	gint _tmp39_;
	gint _tmp50_;
	gint _tmp51_;
	gint _tmp52_;
	gboolean _tmp53_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->m_cursor_location;
	_tmp1_ = _tmp0_.x;
	_tmp2_ = self->priv->m_cursor_location;
	_tmp3_ = _tmp2_.width;
	_tmp4_ = self->priv->m_cursor_location;
	_tmp5_ = _tmp4_.y;
	_tmp6_ = self->priv->m_cursor_location;
	_tmp7_ = _tmp6_.height;
	_tmp8_.x = _tmp1_ + _tmp3_;
	_tmp8_.y = _tmp5_ + _tmp7_;
	cursor_right_bottom = _tmp8_;
	gtk_widget_get_allocation ((GtkWidget*) self, &_tmp9_);
	allocation = _tmp9_;
	_tmp10_ = cursor_right_bottom;
	_tmp11_ = _tmp10_.x;
	_tmp12_ = allocation;
	_tmp13_ = _tmp12_.width;
	_tmp14_ = cursor_right_bottom;
	_tmp15_ = _tmp14_.y;
	_tmp16_ = allocation;
	_tmp17_ = _tmp16_.height;
	_tmp18_.x = _tmp11_ + _tmp13_;
	_tmp18_.y = _tmp15_ + _tmp17_;
	window_right_bottom = _tmp18_;
	ibus_emojier_get_monitor_geometry (self, &_tmp19_);
	monitor_area = _tmp19_;
	_tmp20_ = monitor_area;
	_tmp21_ = _tmp20_.x;
	_tmp22_ = monitor_area;
	_tmp23_ = _tmp22_.width;
	monitor_right = _tmp21_ + _tmp23_;
	_tmp24_ = monitor_area;
	_tmp25_ = _tmp24_.y;
	_tmp26_ = monitor_area;
	_tmp27_ = _tmp26_.height;
	monitor_bottom = _tmp25_ + _tmp27_;
	_tmp28_ = window_right_bottom;
	_tmp29_ = _tmp28_.x;
	_tmp30_ = monitor_right;
	if (_tmp29_ > _tmp30_) {
		gint _tmp31_;
		GtkAllocation _tmp32_;
		gint _tmp33_;
		_tmp31_ = monitor_right;
		_tmp32_ = allocation;
		_tmp33_ = _tmp32_.width;
		x = _tmp31_ - _tmp33_;
	} else {
		GdkPoint _tmp34_;
		gint _tmp35_;
		_tmp34_ = cursor_right_bottom;
		_tmp35_ = _tmp34_.x;
		x = _tmp35_;
	}
	_tmp36_ = x;
	if (_tmp36_ < 0) {
		x = 0;
	}
	changed = FALSE;
	_tmp37_ = window_right_bottom;
	_tmp38_ = _tmp37_.y;
	_tmp39_ = monitor_bottom;
	if (_tmp38_ > _tmp39_) {
		GdkRectangle _tmp40_;
		gint _tmp41_;
		GtkAllocation _tmp42_;
		gint _tmp43_;
		const gchar* _tmp44_;
		_tmp40_ = self->priv->m_cursor_location;
		_tmp41_ = _tmp40_.y;
		_tmp42_ = allocation;
		_tmp43_ = _tmp42_.height;
		y = _tmp41_ - _tmp43_;
		_tmp44_ = self->priv->m_input_context_path;
		if (g_strcmp0 (_tmp44_, "") == 0) {
			gboolean _tmp45_;
			_tmp45_ = self->priv->m_is_up_side_down;
			changed = _tmp45_ == FALSE;
			self->priv->m_is_up_side_down = TRUE;
		} else {
			gboolean _tmp46_;
			_tmp46_ = self->priv->m_is_up_side_down;
			changed = _tmp46_ == TRUE;
			self->priv->m_is_up_side_down = FALSE;
		}
	} else {
		GdkPoint _tmp47_;
		gint _tmp48_;
		gboolean _tmp49_;
		_tmp47_ = cursor_right_bottom;
		_tmp48_ = _tmp47_.y;
		y = _tmp48_;
		_tmp49_ = self->priv->m_is_up_side_down;
		changed = _tmp49_ == TRUE;
		self->priv->m_is_up_side_down = FALSE;
	}
	_tmp50_ = y;
	if (_tmp50_ < 0) {
		y = 0;
	}
	_tmp51_ = x;
	_tmp52_ = y;
	gtk_window_move ((GtkWindow*) self, _tmp51_, _tmp52_);
	_tmp53_ = changed;
	if (_tmp53_) {
		guint _tmp54_;
		_tmp54_ = self->priv->m_redraw_window_id;
		if (_tmp54_ > ((guint) 0)) {
			guint _tmp55_;
			_tmp55_ = self->priv->m_redraw_window_id;
			g_source_remove (_tmp55_);
		}
		self->priv->m_redraw_window_id = g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 100, ____lambda12__gsource_func, g_object_ref (self), g_object_unref);
	}
}


static void
ibus_emojier_check_action_variant_cb (IBusEmojier* self,
                                      GSimpleAction* action,
                                      GVariant* parameter)
{
	GVariant* _tmp0_;
	GVariant* _tmp1_;
	gboolean _tmp2_;
	GVariant* _tmp3_;
	GVariant* _tmp4_;
	gboolean _tmp5_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (action != NULL);
	_tmp0_ = g_action_get_state ((GAction*) action);
	_tmp1_ = _tmp0_;
	ibus_emojier_m_show_emoji_variant = !g_variant_get_boolean (_tmp1_);
	_g_variant_unref0 (_tmp1_);
	_tmp2_ = ibus_emojier_m_show_emoji_variant;
	_tmp3_ = g_variant_new_boolean (_tmp2_);
	g_variant_ref_sink (_tmp3_);
	_tmp4_ = _tmp3_;
	g_simple_action_set_state (action, _tmp4_);
	_g_variant_unref0 (_tmp4_);
	_tmp5_ = self->priv->m_candidate_panel_is_visible;
	if (_tmp5_) {
		gtk_widget_queue_draw ((GtkWidget*) self);
	}
}


static void
ibus_emojier_action_close_cb (IBusEmojier* self,
                              GSimpleAction* action,
                              GVariant* parameter)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (action != NULL);
	g_signal_emit (self, ibus_emojier_signals[IBUS_EMOJIER_CANDIDATE_CLICKED_SIGNAL], 0, (guint) 0, IBUS_EMOJIER_BUTTON_CLOSE_BUTTON, (guint) 0);
}


void
ibus_emojier_update_favorite_emoji_dict (void)
{
	gboolean _tmp0_ = FALSE;
	GHashTable* _tmp1_;
	_tmp1_ = ibus_emojier_m_emoji_to_data_dict;
	if (_tmp1_ == NULL) {
		_tmp0_ = TRUE;
	} else {
		GHashTable* _tmp2_;
		_tmp2_ = ibus_emojier_m_annotation_to_emojis_dict;
		_tmp0_ = _tmp2_ == NULL;
	}
	if (_tmp0_) {
		return;
	}
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp3_ = FALSE;
			_tmp3_ = TRUE;
			while (TRUE) {
				gint _tmp5_;
				gchar** _tmp6_;
				gint _tmp6__length1;
				gchar* favorite = NULL;
				gchar** _tmp7_;
				gint _tmp7__length1;
				gint _tmp8_;
				const gchar* _tmp9_;
				gchar* _tmp10_;
				gchar* annotation = NULL;
				gchar* _tmp11_;
				gint _tmp12_;
				gchar** _tmp13_;
				gint _tmp13__length1;
				const gchar* _tmp18_;
				IBusEmojiData* data = NULL;
				GHashTable* _tmp19_;
				const gchar* _tmp20_;
				gconstpointer _tmp21_;
				IBusEmojiData* _tmp22_;
				GSList* emojis = NULL;
				GHashTable* _tmp52_;
				const gchar* _tmp53_;
				gconstpointer _tmp54_;
				GSList* _tmp55_;
				const gchar* _tmp56_;
				GCompareFunc _tmp57_;
				GSList* _tmp58_;
				if (!_tmp3_) {
					gint _tmp4_;
					_tmp4_ = i;
					i = _tmp4_ + 1;
				}
				_tmp3_ = FALSE;
				_tmp5_ = i;
				_tmp6_ = ibus_emojier_m_favorites;
				_tmp6__length1 = ibus_emojier_m_favorites_length1;
				if (!(_tmp5_ < _tmp6__length1)) {
					break;
				}
				_tmp7_ = ibus_emojier_m_favorites;
				_tmp7__length1 = ibus_emojier_m_favorites_length1;
				_tmp8_ = i;
				_tmp9_ = _tmp7_[_tmp8_];
				_tmp10_ = g_strdup (_tmp9_);
				favorite = _tmp10_;
				_tmp11_ = g_strdup ("");
				annotation = _tmp11_;
				_tmp12_ = i;
				_tmp13_ = ibus_emojier_m_favorite_annotations;
				_tmp13__length1 = ibus_emojier_m_favorite_annotations_length1;
				if (_tmp12_ < _tmp13__length1) {
					gchar** _tmp14_;
					gint _tmp14__length1;
					gint _tmp15_;
					const gchar* _tmp16_;
					gchar* _tmp17_;
					_tmp14_ = ibus_emojier_m_favorite_annotations;
					_tmp14__length1 = ibus_emojier_m_favorite_annotations_length1;
					_tmp15_ = i;
					_tmp16_ = _tmp14_[_tmp15_];
					_tmp17_ = g_strdup (_tmp16_);
					_g_free0 (annotation);
					annotation = _tmp17_;
				}
				_tmp18_ = annotation;
				if (g_strcmp0 (_tmp18_, "") == 0) {
					_g_free0 (annotation);
					_g_free0 (favorite);
					continue;
				}
				_tmp19_ = ibus_emojier_m_emoji_to_data_dict;
				_tmp20_ = favorite;
				_tmp21_ = g_hash_table_lookup (_tmp19_, _tmp20_);
				data = (IBusEmojiData*) _tmp21_;
				_tmp22_ = data;
				if (_tmp22_ == NULL) {
					GSList* new_annotations = NULL;
					const gchar* _tmp23_;
					gchar* _tmp24_;
					IBusEmojiData* new_data = NULL;
					const gchar* _tmp25_;
					gchar* _tmp26_;
					gchar* _tmp27_;
					GSList* _tmp28_;
					const gchar* _tmp29_;
					gchar* _tmp30_;
					gchar* _tmp31_;
					GObject* _tmp32_;
					GObject* _tmp33_;
					IBusEmojiData* _tmp34_;
					IBusEmojiData* _tmp35_;
					GHashTable* _tmp36_;
					const gchar* _tmp37_;
					gchar* _tmp38_;
					IBusEmojiData* _tmp39_;
					IBusEmojiData* _tmp40_;
					new_annotations = NULL;
					_tmp23_ = annotation;
					_tmp24_ = g_strdup (_tmp23_);
					new_annotations = g_slist_append (new_annotations, _tmp24_);
					_tmp25_ = favorite;
					_tmp26_ = g_strdup (_tmp25_);
					_tmp27_ = _tmp26_;
					_tmp28_ = new_annotations;
					_tmp29_ = annotation;
					_tmp30_ = g_strdup (_tmp29_);
					_tmp31_ = _tmp30_;
					_tmp32_ = g_object_new (ibus_emoji_data_get_type (), "emoji", _tmp27_, "annotations", _tmp28_, "description", _tmp31_, NULL);
					_tmp33_ = G_IS_INITIALLY_UNOWNED (_tmp32_) ? g_object_ref_sink (_tmp32_) : _tmp32_;
					_tmp34_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp33_, ibus_emoji_data_get_type ()) ? ((IBusEmojiData*) _tmp33_) : NULL;
					if (_tmp34_ == NULL) {
						_g_object_unref0 (_tmp33_);
					}
					_tmp35_ = _tmp34_;
					_g_free0 (_tmp31_);
					_g_free0 (_tmp27_);
					new_data = _tmp35_;
					_tmp36_ = ibus_emojier_m_emoji_to_data_dict;
					_tmp37_ = favorite;
					_tmp38_ = g_strdup (_tmp37_);
					_tmp39_ = new_data;
					_tmp40_ = _g_object_ref0 (_tmp39_);
					g_hash_table_insert (_tmp36_, _tmp38_, _tmp40_);
					_g_object_unref0 (new_data);
					(new_annotations == NULL) ? NULL : (new_annotations = (_g_slist_free__g_free0_ (new_annotations), NULL));
				} else {
					GSList* annotations = NULL;
					IBusEmojiData* _tmp41_;
					GSList* _tmp42_;
					GSList* _tmp43_;
					const gchar* _tmp44_;
					GCompareFunc _tmp45_;
					GSList* _tmp46_;
					_tmp41_ = data;
					_tmp42_ = ibus_emoji_data_get_annotations (_tmp41_);
					annotations = _tmp42_;
					_tmp43_ = annotations;
					_tmp44_ = annotation;
					_tmp45_ = g_strcmp0;
					_tmp46_ = g_slist_find_custom (_tmp43_, _tmp44_, _tmp45_);
					if (_tmp46_ == NULL) {
						const gchar* _tmp47_;
						gchar* _tmp48_;
						IBusEmojiData* _tmp49_;
						GSList* _tmp50_;
						GSList* _tmp51_;
						_tmp47_ = annotation;
						_tmp48_ = g_strdup (_tmp47_);
						annotations = g_slist_append (annotations, _tmp48_);
						_tmp49_ = data;
						_tmp50_ = annotations;
						_tmp51_ = g_slist_copy (_tmp50_);
						ibus_emoji_data_set_annotations (_tmp49_, _tmp51_);
					}
				}
				_tmp52_ = ibus_emojier_m_annotation_to_emojis_dict;
				_tmp53_ = annotation;
				_tmp54_ = g_hash_table_lookup (_tmp52_, _tmp53_);
				emojis = (GSList*) _tmp54_;
				_tmp55_ = emojis;
				_tmp56_ = favorite;
				_tmp57_ = g_strcmp0;
				_tmp58_ = g_slist_find_custom (_tmp55_, _tmp56_, _tmp57_);
				if (_tmp58_ == NULL) {
					const gchar* _tmp59_;
					gchar* _tmp60_;
					GHashTable* _tmp61_;
					const gchar* _tmp62_;
					gchar* _tmp63_;
					GSList* _tmp64_;
					GSList* _tmp65_;
					_tmp59_ = favorite;
					_tmp60_ = g_strdup (_tmp59_);
					emojis = g_slist_append (emojis, _tmp60_);
					_tmp61_ = ibus_emojier_m_annotation_to_emojis_dict;
					_tmp62_ = annotation;
					_tmp63_ = g_strdup (_tmp62_);
					_tmp64_ = emojis;
					_tmp65_ = g_slist_copy (_tmp64_);
					g_hash_table_replace (_tmp61_, _tmp63_, _tmp65_);
				}
				_g_free0 (annotation);
				_g_free0 (favorite);
			}
		}
	}
}


void
ibus_emojier_set_annotation (IBusEmojier* self,
                             const gchar* annotation)
{
	gchar* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (annotation != NULL);
	_tmp0_ = g_strdup (annotation);
	_g_free0 (self->priv->m_annotation);
	self->priv->m_annotation = _tmp0_;
	ibus_emojier_remove_all_children (self);
	_tmp1_ = strlen (annotation);
	_tmp2_ = _tmp1_;
	if (_tmp2_ > 0) {
		ibus_emojier_update_candidate_window (self);
	} else {
		gboolean _tmp3_;
		_tmp3_ = ibus_emojier_m_show_unicode;
		if (_tmp3_) {
			ibus_emojier_update_unicode_blocks (self);
		} else {
			ibus_emojier_update_category_list (self);
		}
	}
}


IBusLookupTable*
ibus_emojier_get_one_dimension_lookup_table (IBusEmojier* self)
{
	IBusLookupTable* result = NULL;
	IBusLookupTable* lookup_table = NULL;
	IBusLookupTable* _tmp0_;
	guint i = 0U;
	guint _tmp12_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = ibus_lookup_table_new (IBUS_EMOJIER_EMOJI_GRID_PAGE, (guint) 0, TRUE, TRUE);
	g_object_ref_sink (_tmp0_);
	lookup_table = _tmp0_;
	i = (guint) 0;
	{
		gboolean _tmp1_ = FALSE;
		_tmp1_ = TRUE;
		while (TRUE) {
			guint _tmp3_;
			IBusLookupTable* _tmp4_;
			IBusText* text = NULL;
			IBusText* _tmp5_;
			IBusText* _tmp6_;
			IBusLookupTable* _tmp7_;
			guint _tmp8_;
			IBusText* _tmp9_;
			IBusLookupTable* _tmp10_;
			IBusText* _tmp11_;
			if (!_tmp1_) {
				guint _tmp2_;
				_tmp2_ = i;
				i = _tmp2_ + 1;
			}
			_tmp1_ = FALSE;
			_tmp3_ = i;
			_tmp4_ = self->priv->m_lookup_table;
			if (!(_tmp3_ < ibus_lookup_table_get_number_of_candidates (_tmp4_))) {
				break;
			}
			_tmp5_ = ibus_text_new_from_string ("");
			g_object_ref_sink (_tmp5_);
			text = _tmp5_;
			_tmp6_ = text;
			_tmp7_ = self->priv->m_lookup_table;
			_tmp8_ = i;
			_tmp9_ = ibus_lookup_table_get_candidate (_tmp7_, _tmp8_);
			IBUS_SERIALIZABLE_GET_CLASS ((IBusSerializable*) _tmp6_)->copy ((IBusSerializable*) _tmp6_, (IBusSerializable*) _tmp9_);
			_tmp10_ = lookup_table;
			_tmp11_ = text;
			ibus_lookup_table_append_candidate (_tmp10_, _tmp11_);
			_g_object_unref0 (text);
		}
	}
	_tmp12_ = i;
	if (_tmp12_ > ((guint) 0)) {
		IBusLookupTable* _tmp13_;
		IBusLookupTable* _tmp14_;
		_tmp13_ = lookup_table;
		_tmp14_ = self->priv->m_lookup_table;
		ibus_lookup_table_set_cursor_pos (_tmp13_, ibus_lookup_table_get_cursor_pos (_tmp14_));
	}
	result = lookup_table;
	return result;
}


guint
ibus_emojier_get_number_of_candidates (IBusEmojier* self)
{
	guint result = 0U;
	IBusLookupTable* _tmp0_;
	g_return_val_if_fail (self != NULL, 0U);
	_tmp0_ = self->priv->m_lookup_table;
	result = ibus_lookup_table_get_number_of_candidates (_tmp0_);
	return result;
}


guint
ibus_emojier_get_cursor_pos (IBusEmojier* self)
{
	guint result = 0U;
	IBusLookupTable* _tmp0_;
	g_return_val_if_fail (self != NULL, 0U);
	_tmp0_ = self->priv->m_lookup_table;
	result = ibus_lookup_table_get_cursor_pos (_tmp0_);
	return result;
}


void
ibus_emojier_set_cursor_pos (IBusEmojier* self,
                             guint cursor_pos)
{
	IBusLookupTable* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->m_lookup_table;
	ibus_lookup_table_set_cursor_pos (_tmp0_, cursor_pos);
}


gchar*
ibus_emojier_get_current_candidate (IBusEmojier* self)
{
	gchar* result = NULL;
	gboolean _tmp0_;
	guint cursor = 0U;
	IBusLookupTable* _tmp2_;
	IBusLookupTable* _tmp3_;
	guint _tmp4_;
	IBusText* _tmp5_;
	const gchar* _tmp6_;
	gchar* _tmp7_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->m_candidate_panel_mode;
	if (!_tmp0_) {
		gchar* _tmp1_;
		_tmp1_ = g_strdup ("");
		result = _tmp1_;
		return result;
	}
	_tmp2_ = self->priv->m_lookup_table;
	cursor = ibus_lookup_table_get_cursor_pos (_tmp2_);
	_tmp3_ = self->priv->m_lookup_table;
	_tmp4_ = cursor;
	_tmp5_ = ibus_lookup_table_get_candidate (_tmp3_, _tmp4_);
	_tmp6_ = _tmp5_->text;
	_tmp7_ = g_strdup (_tmp6_);
	result = _tmp7_;
	return result;
}


IBusText*
ibus_emojier_get_title_text (IBusEmojier* self)
{
	IBusText* result = NULL;
	gchar* language = NULL;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	guint ncandidates = 0U;
	gchar* main_title = NULL;
	gchar* _tmp3_;
	gboolean _tmp4_;
	IBusText* text = NULL;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	guint _tmp8_;
	gchar* _tmp9_;
	gchar* _tmp10_;
	IBusText* _tmp11_;
	IBusText* _tmp12_;
	gint char_count = 0;
	IBusText* _tmp13_;
	const gchar* _tmp14_;
	gint start_index = 0;
	gint _tmp25_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = ibus_emojier_m_current_lang_id;
	_tmp1_ = ibus_get_language_name (_tmp0_);
	_tmp2_ = g_strdup (_ (_tmp1_));
	language = _tmp2_;
	ncandidates = ibus_emojier_get_number_of_candidates (self);
	_tmp3_ = g_strdup (_ ("Emoji Choice"));
	main_title = _tmp3_;
	_tmp4_ = ibus_emojier_m_show_unicode;
	if (_tmp4_) {
		gchar* _tmp5_;
		_tmp5_ = g_strdup (_ ("Unicode Choice"));
		_g_free0 (main_title);
		main_title = _tmp5_;
	}
	_tmp6_ = main_title;
	_tmp7_ = language;
	_tmp8_ = ncandidates;
	_tmp9_ = g_strdup_printf ("%s (%s) (%u / %u)", _tmp6_, _tmp7_, ibus_emojier_get_cursor_pos (self) + 1, _tmp8_);
	_tmp10_ = _tmp9_;
	_tmp11_ = ibus_text_new_from_string (_tmp10_);
	g_object_ref_sink (_tmp11_);
	_tmp12_ = _tmp11_;
	_g_free0 (_tmp10_);
	text = _tmp12_;
	_tmp13_ = text;
	_tmp14_ = _tmp13_->text;
	char_count = g_utf8_strlen (_tmp14_, (gssize) -1);
	start_index = -1;
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp15_ = FALSE;
			_tmp15_ = TRUE;
			while (TRUE) {
				gint _tmp17_;
				gint _tmp18_;
				IBusText* _tmp19_;
				const gchar* _tmp20_;
				gint _tmp21_;
				const gchar* _tmp22_;
				const gchar* _tmp23_;
				if (!_tmp15_) {
					gint _tmp16_;
					_tmp16_ = i;
					i = _tmp16_ + 1;
				}
				_tmp15_ = FALSE;
				_tmp17_ = i;
				_tmp18_ = char_count;
				if (!(_tmp17_ < _tmp18_)) {
					break;
				}
				_tmp19_ = text;
				_tmp20_ = _tmp19_->text;
				_tmp21_ = i;
				_tmp22_ = g_utf8_offset_to_pointer (_tmp20_, (glong) _tmp21_);
				_tmp23_ = language;
				if (g_str_has_prefix (_tmp22_, _tmp23_)) {
					gint _tmp24_;
					_tmp24_ = i;
					start_index = _tmp24_;
					break;
				}
			}
		}
	}
	_tmp25_ = start_index;
	if (_tmp25_ >= 0) {
		IBusAttribute* attr = NULL;
		gint _tmp26_;
		gint _tmp27_;
		const gchar* _tmp28_;
		IBusAttribute* _tmp29_;
		IBusAttrList* attrs = NULL;
		IBusAttrList* _tmp30_;
		IBusAttrList* _tmp31_;
		IBusAttribute* _tmp32_;
		IBusText* _tmp33_;
		IBusAttrList* _tmp34_;
		_tmp26_ = start_index;
		_tmp27_ = start_index;
		_tmp28_ = language;
		_tmp29_ = ibus_attribute_new ((guint) IBUS_ATTR_TYPE_FOREGROUND, (guint) 0x808080, (guint) _tmp26_, (guint) (_tmp27_ + g_utf8_strlen (_tmp28_, (gssize) -1)));
		g_object_ref_sink (_tmp29_);
		attr = _tmp29_;
		_tmp30_ = ibus_attr_list_new ();
		g_object_ref_sink (_tmp30_);
		attrs = _tmp30_;
		_tmp31_ = attrs;
		_tmp32_ = attr;
		ibus_attr_list_append (_tmp31_, _tmp32_);
		_tmp33_ = text;
		_tmp34_ = attrs;
		ibus_text_set_attributes (_tmp33_, _tmp34_);
		_g_object_unref0 (attrs);
		_g_object_unref0 (attr);
	}
	result = text;
	_g_free0 (main_title);
	_g_free0 (language);
	return result;
}


static void
ibus_emojier_real_show_all (GtkWidget* base)
{
	IBusEmojier * self;
	gboolean _tmp0_;
	self = (IBusEmojier*) base;
	GTK_WIDGET_CLASS (ibus_emojier_parent_class)->show_all ((GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (self, gtk_application_window_get_type (), GtkApplicationWindow));
	_tmp0_ = self->priv->m_candidate_panel_mode;
	if (_tmp0_) {
		ibus_emojier_show_candidate_panel (self);
	} else {
		gboolean _tmp1_;
		_tmp1_ = ibus_emojier_m_show_unicode;
		if (_tmp1_) {
			ibus_emojier_show_unicode_blocks (self);
		} else {
			ibus_emojier_show_category_list (self);
		}
	}
}


static void
ibus_emojier_real_hide (GtkWidget* base)
{
	IBusEmojier * self;
	guint _tmp0_;
	guint _tmp2_;
	self = (IBusEmojier*) base;
	GTK_WIDGET_CLASS (ibus_emojier_parent_class)->hide ((GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (self, gtk_application_window_get_type (), GtkApplicationWindow));
	self->priv->m_candidate_panel_is_visible = FALSE;
	_tmp0_ = self->priv->m_redraw_window_id;
	if (_tmp0_ > ((guint) 0)) {
		guint _tmp1_;
		_tmp1_ = self->priv->m_redraw_window_id;
		g_source_remove (_tmp1_);
		self->priv->m_redraw_window_id = (guint) 0;
	}
	_tmp2_ = self->priv->m_unicode_progress_id;
	if (_tmp2_ > ((guint) 0)) {
		guint _tmp3_;
		_tmp3_ = self->priv->m_unicode_progress_id;
		g_source_remove (_tmp3_);
		self->priv->m_unicode_progress_id = (guint) 0;
	}
}


static gboolean
ibus_emojier_real_key_press_event (GtkWidget* base,
                                   GdkEventKey* event)
{
	IBusEmojier * self;
	gboolean result = FALSE;
	guint keyval = 0U;
	guint _tmp0_;
	guint modifiers = 0U;
	GdkModifierType _tmp1_;
	guint _tmp2_;
	guint _tmp35_;
	guint _tmp77_;
	self = (IBusEmojier*) base;
	g_return_val_if_fail (event != NULL, FALSE);
	_tmp0_ = event->keyval;
	keyval = _tmp0_;
	_tmp1_ = event->state;
	modifiers = (guint) _tmp1_;
	_tmp2_ = keyval;
	switch (_tmp2_) {
		case GDK_KEY_Escape:
		{
			if (ibus_emojier_key_press_escape (self)) {
				gtk_widget_show_all ((GtkWidget*) self);
			}
			result = TRUE;
			return result;
		}
		case GDK_KEY_Return:
		case GDK_KEY_KP_Enter:
		{
			if (ibus_emojier_key_press_enter (self)) {
				gtk_widget_show_all ((GtkWidget*) self);
			} else {
				gchar* _tmp3_;
				_tmp3_ = ibus_emojier_get_current_candidate (self);
				_g_free0 (self->priv->m_result);
				self->priv->m_result = _tmp3_;
				gtk_widget_hide ((GtkWidget*) self);
			}
			result = TRUE;
			return result;
		}
		case GDK_KEY_BackSpace:
		{
			IBusEmojierEEntry* _tmp4_;
			const gchar* _tmp5_;
			gint _tmp6_;
			gint _tmp7_;
			_tmp4_ = self->priv->m_entry;
			_tmp5_ = gtk_entry_get_text ((GtkEntry*) _tmp4_);
			_tmp6_ = strlen (_tmp5_);
			_tmp7_ = _tmp6_;
			if (_tmp7_ > 0) {
				guint _tmp8_;
				_tmp8_ = modifiers;
				if ((_tmp8_ & GDK_CONTROL_MASK) != ((guint) 0)) {
					IBusEmojierEEntry* _tmp9_;
					_tmp9_ = self->priv->m_entry;
					g_signal_emit_by_name (_tmp9_, "delete-from-cursor", GTK_DELETE_WORD_ENDS, -1, NULL);
				} else {
					IBusEmojierEEntry* _tmp10_;
					_tmp10_ = self->priv->m_entry;
					g_signal_emit_by_name (_tmp10_, "backspace", NULL);
				}
				result = TRUE;
				return result;
			}
			break;
		}
		case GDK_KEY_Delete:
		case GDK_KEY_KP_Delete:
		{
			IBusEmojierEEntry* _tmp11_;
			const gchar* _tmp12_;
			gint _tmp13_;
			gint _tmp14_;
			_tmp11_ = self->priv->m_entry;
			_tmp12_ = gtk_entry_get_text ((GtkEntry*) _tmp11_);
			_tmp13_ = strlen (_tmp12_);
			_tmp14_ = _tmp13_;
			if (_tmp14_ > 0) {
				guint _tmp15_;
				_tmp15_ = modifiers;
				if ((_tmp15_ & GDK_CONTROL_MASK) != ((guint) 0)) {
					IBusEmojierEEntry* _tmp16_;
					_tmp16_ = self->priv->m_entry;
					g_signal_emit_by_name (_tmp16_, "delete-from-cursor", GTK_DELETE_WORD_ENDS, 1, NULL);
				} else {
					IBusEmojierEEntry* _tmp17_;
					_tmp17_ = self->priv->m_entry;
					g_signal_emit_by_name (_tmp17_, "delete-from-cursor", GTK_DELETE_CHARS, 1, NULL);
				}
				result = TRUE;
				return result;
			}
			break;
		}
		case GDK_KEY_space:
		case GDK_KEY_KP_Space:
		{
			guint _tmp18_;
			_tmp18_ = modifiers;
			if ((_tmp18_ & GDK_SHIFT_MASK) != ((guint) 0)) {
				IBusEmojierEEntry* _tmp19_;
				const gchar* _tmp20_;
				gint _tmp21_;
				gint _tmp22_;
				_tmp19_ = self->priv->m_entry;
				_tmp20_ = gtk_entry_get_text ((GtkEntry*) _tmp19_);
				_tmp21_ = strlen (_tmp20_);
				_tmp22_ = _tmp21_;
				if (_tmp22_ > 0) {
					guint _tmp23_;
					_tmp23_ = keyval;
					ibus_emojier_entry_enter_keyval (self, _tmp23_);
				}
			} else {
				gboolean _tmp24_;
				_tmp24_ = self->priv->m_candidate_panel_is_visible;
				if (_tmp24_) {
					IBusLookupTable* _tmp25_;
					ibus_emojier_enter_notify_disable_with_timer (self);
					_tmp25_ = self->priv->m_lookup_table;
					ibus_lookup_table_cursor_down (_tmp25_);
					ibus_emojier_show_candidate_panel (self);
				} else {
					ibus_emojier_category_list_cursor_move (self, (guint) GDK_KEY_Down);
					gtk_widget_show_all ((GtkWidget*) self);
				}
			}
			result = TRUE;
			return result;
		}
		case GDK_KEY_Right:
		case GDK_KEY_KP_Right:
		{
			guint _tmp26_;
			_tmp26_ = modifiers;
			ibus_emojier_key_press_cursor_horizontal (self, (guint) GDK_KEY_Right, _tmp26_);
			gtk_widget_show_all ((GtkWidget*) self);
			result = TRUE;
			return result;
		}
		case GDK_KEY_Left:
		case GDK_KEY_KP_Left:
		{
			guint _tmp27_;
			_tmp27_ = modifiers;
			ibus_emojier_key_press_cursor_horizontal (self, (guint) GDK_KEY_Left, _tmp27_);
			gtk_widget_show_all ((GtkWidget*) self);
			result = TRUE;
			return result;
		}
		case GDK_KEY_Down:
		case GDK_KEY_KP_Down:
		{
			guint _tmp28_;
			_tmp28_ = modifiers;
			ibus_emojier_key_press_cursor_vertical (self, (guint) GDK_KEY_Down, _tmp28_);
			gtk_widget_show_all ((GtkWidget*) self);
			result = TRUE;
			return result;
		}
		case GDK_KEY_Up:
		case GDK_KEY_KP_Up:
		{
			guint _tmp29_;
			_tmp29_ = modifiers;
			ibus_emojier_key_press_cursor_vertical (self, (guint) GDK_KEY_Up, _tmp29_);
			gtk_widget_show_all ((GtkWidget*) self);
			result = TRUE;
			return result;
		}
		case GDK_KEY_Page_Down:
		case GDK_KEY_KP_Page_Down:
		{
			guint _tmp30_;
			_tmp30_ = modifiers;
			ibus_emojier_key_press_cursor_vertical (self, (guint) GDK_KEY_Page_Down, _tmp30_);
			gtk_widget_show_all ((GtkWidget*) self);
			result = TRUE;
			return result;
		}
		case GDK_KEY_Page_Up:
		case GDK_KEY_KP_Page_Up:
		{
			guint _tmp31_;
			_tmp31_ = modifiers;
			ibus_emojier_key_press_cursor_vertical (self, (guint) GDK_KEY_Page_Up, _tmp31_);
			gtk_widget_show_all ((GtkWidget*) self);
			result = TRUE;
			return result;
		}
		case GDK_KEY_Home:
		case GDK_KEY_KP_Home:
		{
			guint _tmp32_;
			_tmp32_ = modifiers;
			ibus_emojier_key_press_cursor_home_end (self, (guint) GDK_KEY_Home, _tmp32_);
			gtk_widget_show_all ((GtkWidget*) self);
			result = TRUE;
			return result;
		}
		case GDK_KEY_End:
		case GDK_KEY_KP_End:
		{
			guint _tmp33_;
			_tmp33_ = modifiers;
			ibus_emojier_key_press_cursor_home_end (self, (guint) GDK_KEY_End, _tmp33_);
			gtk_widget_show_all ((GtkWidget*) self);
			result = TRUE;
			return result;
		}
		case GDK_KEY_Insert:
		case GDK_KEY_KP_Insert:
		{
			IBusEmojierEEntry* _tmp34_;
			_tmp34_ = self->priv->m_entry;
			g_signal_emit_by_name (_tmp34_, "toggle-overwrite", NULL);
			result = TRUE;
			return result;
		}
		default:
		break;
	}
	_tmp35_ = modifiers;
	if ((_tmp35_ & GDK_CONTROL_MASK) != ((guint) 0)) {
		guint _tmp36_;
		_tmp36_ = keyval;
		switch (_tmp36_) {
			case GDK_KEY_f:
			{
				guint _tmp37_;
				_tmp37_ = modifiers;
				ibus_emojier_key_press_cursor_horizontal (self, (guint) GDK_KEY_Right, _tmp37_);
				gtk_widget_show_all ((GtkWidget*) self);
				result = TRUE;
				return result;
			}
			case GDK_KEY_b:
			{
				guint _tmp38_;
				_tmp38_ = modifiers;
				ibus_emojier_key_press_cursor_horizontal (self, (guint) GDK_KEY_Left, _tmp38_);
				gtk_widget_show_all ((GtkWidget*) self);
				result = TRUE;
				return result;
			}
			case GDK_KEY_n:
			case GDK_KEY_N:
			{
				guint _tmp39_;
				_tmp39_ = modifiers;
				ibus_emojier_key_press_cursor_vertical (self, (guint) GDK_KEY_Down, _tmp39_);
				gtk_widget_show_all ((GtkWidget*) self);
				result = TRUE;
				return result;
			}
			case GDK_KEY_p:
			case GDK_KEY_P:
			{
				guint _tmp40_;
				_tmp40_ = modifiers;
				ibus_emojier_key_press_cursor_vertical (self, (guint) GDK_KEY_Up, _tmp40_);
				gtk_widget_show_all ((GtkWidget*) self);
				result = TRUE;
				return result;
			}
			case GDK_KEY_h:
			{
				guint _tmp41_;
				_tmp41_ = modifiers;
				ibus_emojier_key_press_cursor_home_end (self, (guint) GDK_KEY_Home, _tmp41_);
				gtk_widget_show_all ((GtkWidget*) self);
				result = TRUE;
				return result;
			}
			case GDK_KEY_e:
			{
				guint _tmp42_;
				_tmp42_ = modifiers;
				ibus_emojier_key_press_cursor_home_end (self, (guint) GDK_KEY_End, _tmp42_);
				gtk_widget_show_all ((GtkWidget*) self);
				result = TRUE;
				return result;
			}
			case GDK_KEY_u:
			{
				IBusEmojierEEntry* _tmp43_;
				const gchar* _tmp44_;
				gint _tmp45_;
				gint _tmp46_;
				_tmp43_ = self->priv->m_entry;
				_tmp44_ = gtk_entry_get_text ((GtkEntry*) _tmp43_);
				_tmp45_ = strlen (_tmp44_);
				_tmp46_ = _tmp45_;
				if (_tmp46_ > 0) {
					IBusEmojierEEntry* _tmp47_;
					_tmp47_ = self->priv->m_entry;
					g_signal_emit_by_name (_tmp47_, "delete-from-cursor", GTK_DELETE_PARAGRAPH_ENDS, -1, NULL);
					result = TRUE;
					return result;
				}
				break;
			}
			case GDK_KEY_a:
			{
				IBusEmojierEEntry* _tmp48_;
				const gchar* _tmp49_;
				gint _tmp50_;
				gint _tmp51_;
				_tmp48_ = self->priv->m_entry;
				_tmp49_ = gtk_entry_get_text ((GtkEntry*) _tmp48_);
				_tmp50_ = strlen (_tmp49_);
				_tmp51_ = _tmp50_;
				if (_tmp51_ > 0) {
					IBusEmojierEEntry* _tmp52_;
					_tmp52_ = self->priv->m_entry;
					gtk_editable_select_region ((GtkEditable*) _tmp52_, 0, -1);
					result = TRUE;
					return result;
				}
				break;
			}
			case GDK_KEY_x:
			{
				IBusEmojierEEntry* _tmp53_;
				const gchar* _tmp54_;
				gint _tmp55_;
				gint _tmp56_;
				_tmp53_ = self->priv->m_entry;
				_tmp54_ = gtk_entry_get_text ((GtkEntry*) _tmp53_);
				_tmp55_ = strlen (_tmp54_);
				_tmp56_ = _tmp55_;
				if (_tmp56_ > 0) {
					IBusEmojierEEntry* _tmp57_;
					_tmp57_ = self->priv->m_entry;
					g_signal_emit_by_name (_tmp57_, "cut-clipboard", NULL);
					result = TRUE;
					return result;
				}
				break;
			}
			case GDK_KEY_C:
			case GDK_KEY_c:
			{
				guint _tmp58_;
				_tmp58_ = modifiers;
				if ((_tmp58_ & GDK_SHIFT_MASK) != ((guint) 0)) {
					gboolean _tmp59_;
					_tmp59_ = self->priv->m_candidate_panel_is_visible;
					if (_tmp59_) {
						guint index = 0U;
						IBusLookupTable* _tmp60_;
						gchar* text = NULL;
						IBusLookupTable* _tmp61_;
						guint _tmp62_;
						IBusText* _tmp63_;
						const gchar* _tmp64_;
						gchar* _tmp65_;
						GtkClipboard* clipboard = NULL;
						GtkClipboard* _tmp66_;
						GtkClipboard* _tmp67_;
						GtkClipboard* _tmp68_;
						const gchar* _tmp69_;
						GtkClipboard* _tmp70_;
						_tmp60_ = self->priv->m_lookup_table;
						index = ibus_lookup_table_get_cursor_pos (_tmp60_);
						_tmp61_ = self->priv->m_lookup_table;
						_tmp62_ = index;
						_tmp63_ = ibus_lookup_table_get_candidate (_tmp61_, _tmp62_);
						_tmp64_ = _tmp63_->text;
						_tmp65_ = g_strdup (_tmp64_);
						text = _tmp65_;
						_tmp66_ = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD);
						_tmp67_ = _g_object_ref0 (_tmp66_);
						clipboard = _tmp67_;
						_tmp68_ = clipboard;
						_tmp69_ = text;
						gtk_clipboard_set_text (_tmp68_, _tmp69_, -1);
						_tmp70_ = clipboard;
						gtk_clipboard_store (_tmp70_);
						result = TRUE;
						_g_object_unref0 (clipboard);
						_g_free0 (text);
						return result;
					}
				} else {
					IBusEmojierEEntry* _tmp71_;
					const gchar* _tmp72_;
					gint _tmp73_;
					gint _tmp74_;
					_tmp71_ = self->priv->m_entry;
					_tmp72_ = gtk_entry_get_text ((GtkEntry*) _tmp71_);
					_tmp73_ = strlen (_tmp72_);
					_tmp74_ = _tmp73_;
					if (_tmp74_ > 0) {
						IBusEmojierEEntry* _tmp75_;
						_tmp75_ = self->priv->m_entry;
						g_signal_emit_by_name (_tmp75_, "copy-clipboard", NULL);
						result = TRUE;
						return result;
					}
				}
				break;
			}
			case GDK_KEY_v:
			{
				IBusEmojierEEntry* _tmp76_;
				_tmp76_ = self->priv->m_entry;
				g_signal_emit_by_name (_tmp76_, "paste-clipboard", NULL);
				result = TRUE;
				return result;
			}
			default:
			break;
		}
		result = FALSE;
		return result;
	}
	_tmp77_ = keyval;
	ibus_emojier_entry_enter_keyval (self, _tmp77_);
	result = TRUE;
	return result;
}


gboolean
ibus_emojier_is_running (IBusEmojier* self)
{
	gboolean result = FALSE;
	gboolean _tmp0_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->m_is_running;
	result = _tmp0_;
	return result;
}


gchar*
ibus_emojier_get_input_context_path (IBusEmojier* self)
{
	gchar* result = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->m_input_context_path;
	_tmp1_ = g_strdup (_tmp0_);
	result = _tmp1_;
	return result;
}


void
ibus_emojier_set_input_context_path (IBusEmojier* self,
                                     const gchar* input_context_path)
{
	gchar* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (input_context_path != NULL);
	_tmp0_ = g_strdup (input_context_path);
	_g_free0 (self->priv->m_input_context_path);
	self->priv->m_input_context_path = _tmp0_;
	if (g_strcmp0 (input_context_path, "") == 0) {
		gchar* _tmp1_;
		_tmp1_ = g_strdup (_ ("" "Failed to get the current text application. " "Please re-focus your application. E.g. Press Esc key " "several times to release the emoji typing mode, " "click your desktop and click your text application again."));
		_g_free0 (ibus_emojier_m_warning_message);
		ibus_emojier_m_warning_message = _tmp1_;
	} else {
		gchar* _tmp2_;
		_tmp2_ = g_strdup ("");
		_g_free0 (ibus_emojier_m_warning_message);
		ibus_emojier_m_warning_message = _tmp2_;
	}
}


gchar*
ibus_emojier_get_selected_string (IBusEmojier* self)
{
	gchar* result = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->m_result;
	_tmp1_ = g_strdup (_tmp0_);
	result = _tmp1_;
	return result;
}


static void
ibus_emojier_reset_window_mode (IBusEmojier* self)
{
	g_return_if_fail (self != NULL);
	self->priv->m_backward_index = -1;
	_g_free0 (self->priv->m_backward);
	self->priv->m_backward = NULL;
	self->priv->m_candidate_panel_is_visible = FALSE;
	self->priv->m_candidate_panel_mode = FALSE;
}


void
ibus_emojier_reset (IBusEmojier* self)
{
	gchar* _tmp0_;
	g_return_if_fail (self != NULL);
	ibus_emojier_reset_window_mode (self);
	_tmp0_ = g_strdup ("");
	_g_free0 (self->priv->m_input_context_path);
	self->priv->m_input_context_path = _tmp0_;
	_g_free0 (self->priv->m_result);
	self->priv->m_result = NULL;
	self->priv->m_category_active_index = -1;
	ibus_emojier_m_show_unicode = FALSE;
}


void
ibus_emojier_present_centralize (IBusEmojier* self,
                                 GdkEvent* event)
{
	GtkAllocation allocation = {0};
	GtkAllocation _tmp0_ = {0};
	GdkRectangle monitor_area = {0};
	GdkRectangle work_area = {0};
	GdkDisplay* display = NULL;
	GdkDisplay* _tmp1_;
	GdkDisplay* _tmp2_;
	GdkMonitor* monitor = NULL;
	GdkDisplay* _tmp3_;
	GdkWindow* _tmp4_;
	GdkMonitor* _tmp5_;
	GdkMonitor* _tmp6_;
	GdkMonitor* _tmp7_;
	GdkRectangle _tmp8_ = {0};
	GdkMonitor* _tmp9_;
	GdkRectangle _tmp10_ = {0};
	gint x = 0;
	GdkRectangle _tmp11_;
	gint _tmp12_;
	GdkRectangle _tmp13_;
	gint _tmp14_;
	GtkAllocation _tmp15_;
	gint _tmp16_;
	gint y = 0;
	GdkRectangle _tmp17_;
	gint _tmp18_;
	GdkRectangle _tmp19_;
	gint _tmp20_;
	GtkAllocation _tmp21_;
	gint _tmp22_;
	GdkRectangle _tmp23_;
	gint _tmp24_;
	gint _tmp25_;
	gint _tmp28_;
	gint _tmp29_;
	guint32 timestamp = 0U;
	IBusEmojierEEntry* _tmp30_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (event != NULL);
	gtk_widget_get_allocation ((GtkWidget*) self, &_tmp0_);
	allocation = _tmp0_;
	_tmp1_ = gdk_display_get_default ();
	_tmp2_ = _g_object_ref0 (_tmp1_);
	display = _tmp2_;
	_tmp3_ = display;
	_tmp4_ = gtk_widget_get_window ((GtkWidget*) self);
	_tmp5_ = gdk_display_get_monitor_at_window (_tmp3_, _tmp4_);
	_tmp6_ = _g_object_ref0 (_tmp5_);
	monitor = _tmp6_;
	_tmp7_ = monitor;
	gdk_monitor_get_geometry (_tmp7_, &_tmp8_);
	monitor_area = _tmp8_;
	_tmp9_ = monitor;
	gdk_monitor_get_workarea (_tmp9_, &_tmp10_);
	work_area = _tmp10_;
	_tmp11_ = monitor_area;
	_tmp12_ = _tmp11_.x;
	_tmp13_ = monitor_area;
	_tmp14_ = _tmp13_.width;
	_tmp15_ = allocation;
	_tmp16_ = _tmp15_.width;
	x = ((_tmp12_ + _tmp14_) - _tmp16_) / 2;
	_tmp17_ = monitor_area;
	_tmp18_ = _tmp17_.y;
	_tmp19_ = monitor_area;
	_tmp20_ = _tmp19_.height;
	_tmp21_ = allocation;
	_tmp22_ = _tmp21_.height;
	y = ((_tmp18_ + _tmp20_) - _tmp22_) / 2;
	_tmp23_ = work_area;
	_tmp24_ = _tmp23_.y;
	_tmp25_ = y;
	if (_tmp24_ < _tmp25_) {
		GdkRectangle _tmp26_;
		gint _tmp27_;
		_tmp26_ = work_area;
		_tmp27_ = _tmp26_.y;
		y = _tmp27_;
	}
	_tmp28_ = x;
	_tmp29_ = y;
	gtk_window_move ((GtkWindow*) self, _tmp28_, _tmp29_);
	timestamp = gdk_event_get_time (event);
	gtk_window_present_with_time ((GtkWindow*) self, timestamp);
	_tmp30_ = self->priv->m_entry;
	gtk_entry_set_activates_default ((GtkEntry*) _tmp30_, TRUE);
	_g_object_unref0 (monitor);
	_g_object_unref0 (display);
}


static gboolean
_cairo_rectangle_int_equal (const cairo_rectangle_int_t * s1,
                            const cairo_rectangle_int_t * s2)
{
	if (s1 == s2) {
		return TRUE;
	}
	if (s1 == NULL) {
		return FALSE;
	}
	if (s2 == NULL) {
		return FALSE;
	}
	if (s1->x != s2->x) {
		return FALSE;
	}
	if (s1->y != s2->y) {
		return FALSE;
	}
	if (s1->width != s2->width) {
		return FALSE;
	}
	if (s1->height != s2->height) {
		return FALSE;
	}
	return TRUE;
}


void
ibus_emojier_set_cursor_location (IBusEmojier* self,
                                  gint x,
                                  gint y,
                                  gint width,
                                  gint height)
{
	GdkRectangle location = {0};
	GdkRectangle _tmp0_ = {0};
	GdkRectangle _tmp1_;
	GdkRectangle _tmp2_;
	GdkRectangle _tmp3_;
	g_return_if_fail (self != NULL);
	memset (&_tmp0_, 0, sizeof (GdkRectangle));
	_tmp0_.x = x;
	_tmp0_.y = y;
	_tmp0_.width = width;
	_tmp0_.height = height;
	location = _tmp0_;
	_tmp1_ = self->priv->m_cursor_location;
	_tmp2_ = location;
	if (_cairo_rectangle_int_equal (&_tmp1_, &_tmp2_) == TRUE) {
		return;
	}
	_tmp3_ = location;
	self->priv->m_cursor_location = _tmp3_;
}


gboolean
ibus_emojier_is_candidate_panel_mode (IBusEmojier* self)
{
	gboolean result = FALSE;
	gboolean _tmp0_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->m_candidate_panel_mode;
	result = _tmp0_;
	return result;
}


gboolean
ibus_emojier_has_loaded_emoji_dict (void)
{
	gboolean result = FALSE;
	GHashTable* _tmp0_;
	GList* keys = NULL;
	GHashTable* _tmp1_;
	GList* _tmp2_;
	GList* _tmp3_;
	_tmp0_ = ibus_emojier_m_emoji_to_data_dict;
	if (_tmp0_ == NULL) {
		result = FALSE;
		return result;
	}
	_tmp1_ = ibus_emojier_m_emoji_to_data_dict;
	_tmp2_ = g_hash_table_get_keys (_tmp1_);
	keys = _tmp2_;
	_tmp3_ = keys;
	if (g_list_length (_tmp3_) == ((guint) 0)) {
		result = FALSE;
		(keys == NULL) ? NULL : (keys = (g_list_free (keys), NULL));
		return result;
	}
	result = TRUE;
	(keys == NULL) ? NULL : (keys = (g_list_free (keys), NULL));
	return result;
}


void
ibus_emojier_set_annotation_lang (const gchar* lang)
{
	gboolean _tmp0_ = FALSE;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	if (lang == NULL) {
		_tmp0_ = TRUE;
	} else {
		_tmp0_ = g_strcmp0 (lang, "") == 0;
	}
	if (_tmp0_) {
		lang = "en";
	}
	_tmp1_ = ibus_emojier_m_current_lang_id;
	if (g_strcmp0 (_tmp1_, lang) == 0) {
		return;
	}
	_tmp2_ = g_strdup (lang);
	_g_free0 (ibus_emojier_m_current_lang_id);
	ibus_emojier_m_current_lang_id = _tmp2_;
	ibus_emojier_reload_emoji_dict ();
}


gchar*
ibus_emojier_get_annotation_lang (void)
{
	gchar* result = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_;
	_tmp0_ = ibus_emojier_m_current_lang_id;
	_tmp1_ = g_strdup (_tmp0_);
	result = _tmp1_;
	return result;
}


static void
_vala_PangoFontDescription_free (PangoFontDescription* self)
{
	g_boxed_free (pango_font_description_get_type (), self);
}


void
ibus_emojier_set_emoji_font (const gchar* emoji_font)
{
	gboolean _tmp0_ = FALSE;
	PangoFontDescription* font_desc = NULL;
	PangoFontDescription* _tmp1_;
	gchar* font_family = NULL;
	PangoFontDescription* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	const gchar* _tmp5_;
	gint font_size = 0;
	PangoFontDescription* _tmp8_;
	gint _tmp9_;
	if (emoji_font != NULL) {
		_tmp0_ = g_strcmp0 (emoji_font, "") != 0;
	} else {
		_tmp0_ = FALSE;
	}
	g_return_if_fail (_tmp0_);
	_tmp1_ = pango_font_description_from_string (emoji_font);
	font_desc = _tmp1_;
	_tmp2_ = font_desc;
	_tmp3_ = pango_font_description_get_family (_tmp2_);
	_tmp4_ = g_strdup (_tmp3_);
	font_family = _tmp4_;
	_tmp5_ = font_family;
	if (_tmp5_ != NULL) {
		const gchar* _tmp6_;
		gchar* _tmp7_;
		_tmp6_ = font_family;
		_tmp7_ = g_strdup (_tmp6_);
		_g_free0 (ibus_emojier_m_emoji_font_family);
		ibus_emojier_m_emoji_font_family = _tmp7_;
		ibus_emojier_m_emoji_font_changed = TRUE;
	}
	_tmp8_ = font_desc;
	font_size = pango_font_description_get_size (_tmp8_) / PANGO_SCALE;
	_tmp9_ = font_size;
	if (_tmp9_ != 0) {
		gint _tmp10_;
		_tmp10_ = font_size;
		ibus_emojier_m_emoji_font_size = _tmp10_;
		ibus_emojier_m_emoji_font_changed = TRUE;
	}
	_g_free0 (font_family);
	__vala_PangoFontDescription_free0 (font_desc);
}


void
ibus_emojier_set_partial_match (gboolean has_partial_match)
{
	ibus_emojier_m_has_partial_match = has_partial_match;
}


void
ibus_emojier_set_partial_match_length (gint length)
{
	if (length < 1) {
		return;
	}
	ibus_emojier_m_partial_match_length = (guint) length;
}


void
ibus_emojier_set_partial_match_condition (gint condition)
{
	if (condition < 0) {
		return;
	}
	ibus_emojier_m_partial_match_condition = (guint) condition;
}


static void
_vala_array_add3 (gchar** * array,
                  int* length,
                  int* size,
                  gchar* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (gchar*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}


static void
_vala_array_add4 (gchar** * array,
                  int* length,
                  int* size,
                  gchar* value)
{
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (gchar*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}


void
ibus_emojier_set_favorites (gchar** unowned_favorites,
                            int unowned_favorites_length1,
                            gchar** unowned_favorite_annotations,
                            int unowned_favorite_annotations_length1)
{
	gchar** _tmp0_;
	gchar** _tmp1_;
	_tmp0_ = g_new0 (gchar*, 0 + 1);
	ibus_emojier_m_favorites = (_vala_array_free (ibus_emojier_m_favorites, ibus_emojier_m_favorites_length1, (GDestroyNotify) g_free), NULL);
	ibus_emojier_m_favorites = _tmp0_;
	ibus_emojier_m_favorites_length1 = 0;
	_ibus_emojier_m_favorites_size_ = ibus_emojier_m_favorites_length1;
	_tmp1_ = g_new0 (gchar*, 0 + 1);
	ibus_emojier_m_favorite_annotations = (_vala_array_free (ibus_emojier_m_favorite_annotations, ibus_emojier_m_favorite_annotations_length1, (GDestroyNotify) g_free), NULL);
	ibus_emojier_m_favorite_annotations = _tmp1_;
	ibus_emojier_m_favorite_annotations_length1 = 0;
	_ibus_emojier_m_favorite_annotations_size_ = ibus_emojier_m_favorite_annotations_length1;
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp2_ = FALSE;
			_tmp2_ = TRUE;
			while (TRUE) {
				gint _tmp4_;
				gchar* favorite = NULL;
				gint _tmp5_;
				const gchar* _tmp6_;
				gchar* _tmp7_;
				const gchar* _tmp8_;
				gchar** _tmp9_;
				gint _tmp9__length1;
				const gchar* _tmp10_;
				gchar* _tmp11_;
				if (!_tmp2_) {
					gint _tmp3_;
					_tmp3_ = i;
					i = _tmp3_ + 1;
				}
				_tmp2_ = FALSE;
				_tmp4_ = i;
				if (!(_tmp4_ < unowned_favorites_length1)) {
					break;
				}
				_tmp5_ = i;
				_tmp6_ = unowned_favorites[_tmp5_];
				_tmp7_ = g_strdup (_tmp6_);
				favorite = _tmp7_;
				_tmp8_ = favorite;
				g_return_if_fail (_tmp8_ != NULL);
				_tmp9_ = ibus_emojier_m_favorites;
				_tmp9__length1 = ibus_emojier_m_favorites_length1;
				_tmp10_ = favorite;
				_tmp11_ = g_strdup (_tmp10_);
				_vala_array_add3 (&ibus_emojier_m_favorites, &ibus_emojier_m_favorites_length1, &_ibus_emojier_m_favorites_size_, _tmp11_);
				_g_free0 (favorite);
			}
		}
	}
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp12_ = FALSE;
			_tmp12_ = TRUE;
			while (TRUE) {
				gint _tmp14_;
				gchar* favorite_annotation = NULL;
				gint _tmp15_;
				const gchar* _tmp16_;
				gchar* _tmp17_;
				const gchar* _tmp18_;
				gchar** _tmp19_;
				gint _tmp19__length1;
				const gchar* _tmp20_;
				gchar* _tmp21_;
				if (!_tmp12_) {
					gint _tmp13_;
					_tmp13_ = i;
					i = _tmp13_ + 1;
				}
				_tmp12_ = FALSE;
				_tmp14_ = i;
				if (!(_tmp14_ < unowned_favorite_annotations_length1)) {
					break;
				}
				_tmp15_ = i;
				_tmp16_ = unowned_favorite_annotations[_tmp15_];
				_tmp17_ = g_strdup (_tmp16_);
				favorite_annotation = _tmp17_;
				_tmp18_ = favorite_annotation;
				g_return_if_fail (_tmp18_ != NULL);
				_tmp19_ = ibus_emojier_m_favorite_annotations;
				_tmp19__length1 = ibus_emojier_m_favorite_annotations_length1;
				_tmp20_ = favorite_annotation;
				_tmp21_ = g_strdup (_tmp20_);
				_vala_array_add4 (&ibus_emojier_m_favorite_annotations, &ibus_emojier_m_favorite_annotations_length1, &_ibus_emojier_m_favorite_annotations_size_, _tmp21_);
				_g_free0 (favorite_annotation);
			}
		}
	}
	ibus_emojier_update_favorite_emoji_dict ();
}


static GObject*
ibus_emojier_get_load_progress_object (void)
{
	GObject* result = NULL;
	IBusEmojierLoadProgressObject* _tmp0_;
	IBusEmojierLoadProgressObject* _tmp2_;
	GObject* _tmp3_;
	_tmp0_ = ibus_emojier_m_unicode_progress_object;
	if (_tmp0_ == NULL) {
		IBusEmojierLoadProgressObject* _tmp1_;
		_tmp1_ = ibus_emojier_load_progress_object_new ();
		_g_object_unref0 (ibus_emojier_m_unicode_progress_object);
		ibus_emojier_m_unicode_progress_object = _tmp1_;
	}
	_tmp2_ = ibus_emojier_m_unicode_progress_object;
	_tmp3_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, G_TYPE_OBJECT) ? ((GObject*) _tmp2_) : NULL);
	result = _tmp3_;
	return result;
}


void
ibus_emojier_load_unicode_dict (void)
{
	GSList* _tmp0_;
	GHashTable* _tmp1_;
	_tmp0_ = ibus_emojier_m_unicode_block_list;
	if (g_slist_length (_tmp0_) == ((guint) 0)) {
		ibus_emojier_make_unicode_block_dict ();
	}
	_tmp1_ = ibus_emojier_m_name_to_unicodes_dict;
	if (g_hash_table_size (_tmp1_) == ((guint) 0)) {
		GObject* _tmp2_;
		GObject* _tmp3_;
		_tmp2_ = ibus_emojier_get_load_progress_object ();
		_tmp3_ = _tmp2_;
		ibus_emojier_make_unicode_name_dict (_tmp3_);
		_g_object_unref0 (_tmp3_);
	}
}


static void
g_cclosure_user_marshal_VOID__UINT_UINT_UINT (GClosure * closure,
                                              GValue * return_value,
                                              guint n_param_values,
                                              const GValue * param_values,
                                              gpointer invocation_hint,
                                              gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__UINT_UINT_UINT) (gpointer data1, guint arg_1, guint arg_2, guint arg_3, gpointer data2);
	register GMarshalFunc_VOID__UINT_UINT_UINT callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
	g_return_if_fail (n_param_values == 4);
	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = param_values->data[0].v_pointer;
	} else {
		data1 = param_values->data[0].v_pointer;
		data2 = closure->data;
	}
	callback = (GMarshalFunc_VOID__UINT_UINT_UINT) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_uint (param_values + 1), g_value_get_uint (param_values + 2), g_value_get_uint (param_values + 3), data2);
}


static IBusEmojierEEntry*
ibus_emojier_eentry_construct (GType object_type)
{
	IBusEmojierEEntry * self = NULL;
	self = (IBusEmojierEEntry*) g_object_new (object_type, "name", "IBusEmojierEntry", "margin-start", 6, "margin-end", 6, "margin-top", 6, "margin-bottom", 6, NULL);
	return self;
}


static IBusEmojierEEntry*
ibus_emojier_eentry_new (void)
{
	return ibus_emojier_eentry_construct (IBUS_EMOJIER_TYPE_EENTRY);
}


static void
ibus_emojier_eentry_class_init (IBusEmojierEEntryClass * klass)
{
	ibus_emojier_eentry_parent_class = g_type_class_peek_parent (klass);
}


static void
ibus_emojier_eentry_instance_init (IBusEmojierEEntry * self)
{
}


static GType
ibus_emojier_eentry_get_type (void)
{
	static volatile gsize ibus_emojier_eentry_type_id__volatile = 0;
	if (g_once_init_enter (&ibus_emojier_eentry_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (IBusEmojierEEntryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) ibus_emojier_eentry_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (IBusEmojierEEntry), 0, (GInstanceInitFunc) ibus_emojier_eentry_instance_init, NULL };
		GType ibus_emojier_eentry_type_id;
		ibus_emojier_eentry_type_id = g_type_register_static (gtk_search_entry_get_type (), "IBusEmojierEEntry", &g_define_type_info, 0);
		g_once_init_leave (&ibus_emojier_eentry_type_id__volatile, ibus_emojier_eentry_type_id);
	}
	return ibus_emojier_eentry_type_id__volatile;
}


static gboolean
__lambda5_ (IBusEmojierEListBox* self,
            GdkEventMotion* e)
{
	gboolean result = FALSE;
	GdkEventMotion* pe = NULL;
	GdkEventMotion* _tmp0_;
	gboolean _tmp1_ = FALSE;
	gdouble _tmp2_;
	GdkEventMotion* _tmp3_;
	gdouble _tmp4_;
	GdkEventMotion* _tmp8_;
	gdouble _tmp9_;
	GdkEventMotion* _tmp10_;
	gdouble _tmp11_;
	GtkListBoxRow* row = NULL;
	gdouble _tmp12_;
	GtkListBoxRow* _tmp13_;
	GtkListBoxRow* _tmp14_;
	GtkListBoxRow* _tmp15_;
	g_return_val_if_fail (e != NULL, FALSE);
	_tmp0_ = __vala_GdkEventMotion_copy0 (e);
	pe = _tmp0_;
	_tmp2_ = ibus_emojier_m_mouse_x;
	_tmp3_ = pe;
	_tmp4_ = _tmp3_->x_root;
	if (_tmp2_ == _tmp4_) {
		gdouble _tmp5_;
		GdkEventMotion* _tmp6_;
		gdouble _tmp7_;
		_tmp5_ = ibus_emojier_m_mouse_y;
		_tmp6_ = pe;
		_tmp7_ = _tmp6_->y_root;
		_tmp1_ = _tmp5_ == _tmp7_;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		result = FALSE;
		__vala_GdkEventMotion_free0 (pe);
		return result;
	}
	_tmp8_ = pe;
	_tmp9_ = _tmp8_->x_root;
	ibus_emojier_m_mouse_x = _tmp9_;
	_tmp10_ = pe;
	_tmp11_ = _tmp10_->y_root;
	ibus_emojier_m_mouse_y = _tmp11_;
	_tmp12_ = e->y;
	_tmp13_ = gtk_list_box_get_row_at_y ((GtkListBox*) self, (gint) _tmp12_);
	_tmp14_ = _g_object_ref0 (_tmp13_);
	row = _tmp14_;
	_tmp15_ = row;
	if (_tmp15_ != NULL) {
		GtkListBoxRow* _tmp16_;
		_tmp16_ = row;
		gtk_list_box_select_row ((GtkListBox*) self, _tmp16_);
	}
	result = FALSE;
	_g_object_unref0 (row);
	__vala_GdkEventMotion_free0 (pe);
	return result;
}


static gboolean
___lambda5__gtk_widget_motion_notify_event (GtkWidget* _sender,
                                            GdkEventMotion* event,
                                            gpointer self)
{
	gboolean result;
	result = __lambda5_ ((IBusEmojierEListBox*) self, event);
	return result;
}


static gboolean
__lambda6_ (IBusEmojierEListBox* self,
            GdkEventCrossing* e)
{
	gboolean result = FALSE;
	g_return_val_if_fail (e != NULL, FALSE);
	result = TRUE;
	return result;
}


static gboolean
___lambda6__gtk_widget_enter_notify_event (GtkWidget* _sender,
                                           GdkEventCrossing* event,
                                           gpointer self)
{
	gboolean result;
	result = __lambda6_ ((IBusEmojierEListBox*) self, event);
	return result;
}


static IBusEmojierEListBox*
ibus_emojier_elist_box_construct (GType object_type)
{
	IBusEmojierEListBox * self = NULL;
	self = (IBusEmojierEListBox*) g_object_new (object_type, "vexpand", TRUE, "halign", GTK_ALIGN_FILL, "valign", GTK_ALIGN_FILL, NULL);
	g_signal_connect_object ((GtkWidget*) self, "motion-notify-event", (GCallback) ___lambda5__gtk_widget_motion_notify_event, self, 0);
	g_signal_connect_object ((GtkWidget*) self, "enter-notify-event", (GCallback) ___lambda6__gtk_widget_enter_notify_event, self, 0);
	return self;
}


static IBusEmojierEListBox*
ibus_emojier_elist_box_new (void)
{
	return ibus_emojier_elist_box_construct (IBUS_EMOJIER_TYPE_ELIST_BOX);
}


static void
ibus_emojier_elist_box_class_init (IBusEmojierEListBoxClass * klass)
{
	ibus_emojier_elist_box_parent_class = g_type_class_peek_parent (klass);
}


static void
ibus_emojier_elist_box_instance_init (IBusEmojierEListBox * self)
{
}


static GType
ibus_emojier_elist_box_get_type (void)
{
	static volatile gsize ibus_emojier_elist_box_type_id__volatile = 0;
	if (g_once_init_enter (&ibus_emojier_elist_box_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (IBusEmojierEListBoxClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) ibus_emojier_elist_box_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (IBusEmojierEListBox), 0, (GInstanceInitFunc) ibus_emojier_elist_box_instance_init, NULL };
		GType ibus_emojier_elist_box_type_id;
		ibus_emojier_elist_box_type_id = g_type_register_static (gtk_list_box_get_type (), "IBusEmojierEListBox", &g_define_type_info, 0);
		g_once_init_leave (&ibus_emojier_elist_box_type_id__volatile, ibus_emojier_elist_box_type_id);
	}
	return ibus_emojier_elist_box_type_id__volatile;
}


static IBusEmojierEBoxRow*
ibus_emojier_ebox_row_construct (GType object_type,
                                 const gchar* text)
{
	IBusEmojierEBoxRow * self = NULL;
	g_return_val_if_fail (text != NULL, NULL);
	self = (IBusEmojierEBoxRow*) g_object_new (object_type, NULL);
	ibus_emojier_ebox_row_set_text (self, text);
	return self;
}


static IBusEmojierEBoxRow*
ibus_emojier_ebox_row_new (const gchar* text)
{
	return ibus_emojier_ebox_row_construct (IBUS_EMOJIER_TYPE_EBOX_ROW, text);
}


static const gchar*
ibus_emojier_ebox_row_get_text (IBusEmojierEBoxRow* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_text;
	result = _tmp0_;
	return result;
}


static void
ibus_emojier_ebox_row_set_text (IBusEmojierEBoxRow* self,
                                const gchar* value)
{
	g_return_if_fail (self != NULL);
	if (g_strcmp0 (value, ibus_emojier_ebox_row_get_text (self)) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_text);
		self->priv->_text = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, ibus_emojier_ebox_row_properties[IBUS_EMOJIER_EBOX_ROW_TEXT_PROPERTY]);
	}
}


static void
ibus_emojier_ebox_row_class_init (IBusEmojierEBoxRowClass * klass)
{
	ibus_emojier_ebox_row_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (IBusEmojierEBoxRowPrivate));
	G_OBJECT_CLASS (klass)->get_property = _vala_ibus_emojier_ebox_row_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_ibus_emojier_ebox_row_set_property;
	G_OBJECT_CLASS (klass)->finalize = ibus_emojier_ebox_row_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), IBUS_EMOJIER_EBOX_ROW_TEXT_PROPERTY, ibus_emojier_ebox_row_properties[IBUS_EMOJIER_EBOX_ROW_TEXT_PROPERTY] = g_param_spec_string ("text", "text", "text", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}


static void
ibus_emojier_ebox_row_instance_init (IBusEmojierEBoxRow * self)
{
	self->priv = IBUS_EMOJIER_EBOX_ROW_GET_PRIVATE (self);
}


static void
ibus_emojier_ebox_row_finalize (GObject * obj)
{
	IBusEmojierEBoxRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, IBUS_EMOJIER_TYPE_EBOX_ROW, IBusEmojierEBoxRow);
	_g_free0 (self->priv->_text);
	G_OBJECT_CLASS (ibus_emojier_ebox_row_parent_class)->finalize (obj);
}


static GType
ibus_emojier_ebox_row_get_type (void)
{
	static volatile gsize ibus_emojier_ebox_row_type_id__volatile = 0;
	if (g_once_init_enter (&ibus_emojier_ebox_row_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (IBusEmojierEBoxRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) ibus_emojier_ebox_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (IBusEmojierEBoxRow), 0, (GInstanceInitFunc) ibus_emojier_ebox_row_instance_init, NULL };
		GType ibus_emojier_ebox_row_type_id;
		ibus_emojier_ebox_row_type_id = g_type_register_static (gtk_list_box_row_get_type (), "IBusEmojierEBoxRow", &g_define_type_info, 0);
		g_once_init_leave (&ibus_emojier_ebox_row_type_id__volatile, ibus_emojier_ebox_row_type_id);
	}
	return ibus_emojier_ebox_row_type_id__volatile;
}


static void
_vala_ibus_emojier_ebox_row_get_property (GObject * object,
                                          guint property_id,
                                          GValue * value,
                                          GParamSpec * pspec)
{
	IBusEmojierEBoxRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, IBUS_EMOJIER_TYPE_EBOX_ROW, IBusEmojierEBoxRow);
	switch (property_id) {
		case IBUS_EMOJIER_EBOX_ROW_TEXT_PROPERTY:
		g_value_set_string (value, ibus_emojier_ebox_row_get_text (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void
_vala_ibus_emojier_ebox_row_set_property (GObject * object,
                                          guint property_id,
                                          const GValue * value,
                                          GParamSpec * pspec)
{
	IBusEmojierEBoxRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, IBUS_EMOJIER_TYPE_EBOX_ROW, IBusEmojierEBoxRow);
	switch (property_id) {
		case IBUS_EMOJIER_EBOX_ROW_TEXT_PROPERTY:
		ibus_emojier_ebox_row_set_text (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static IBusEmojierEScrolledWindow*
ibus_emojier_escrolled_window_construct (GType object_type,
                                         GtkAdjustment* hadjustment,
                                         GtkAdjustment* vadjustment)
{
	IBusEmojierEScrolledWindow * self = NULL;
	self = (IBusEmojierEScrolledWindow*) g_object_new (object_type, "hscrollbar-policy", GTK_POLICY_NEVER, "vscrollbar-policy", GTK_POLICY_NEVER, "shadow-type", GTK_SHADOW_IN, "margin-start", 6, "margin-end", 6, "margin-top", 6, "margin-bottom", 6, NULL);
	if (hadjustment != NULL) {
		gtk_scrolled_window_set_hadjustment ((GtkScrolledWindow*) self, hadjustment);
	}
	if (vadjustment != NULL) {
		gtk_scrolled_window_set_hadjustment ((GtkScrolledWindow*) self, vadjustment);
	}
	return self;
}


static IBusEmojierEScrolledWindow*
ibus_emojier_escrolled_window_new (GtkAdjustment* hadjustment,
                                   GtkAdjustment* vadjustment)
{
	return ibus_emojier_escrolled_window_construct (IBUS_EMOJIER_TYPE_ESCROLLED_WINDOW, hadjustment, vadjustment);
}


static void
ibus_emojier_escrolled_window_class_init (IBusEmojierEScrolledWindowClass * klass)
{
	ibus_emojier_escrolled_window_parent_class = g_type_class_peek_parent (klass);
}


static void
ibus_emojier_escrolled_window_instance_init (IBusEmojierEScrolledWindow * self)
{
}


static GType
ibus_emojier_escrolled_window_get_type (void)
{
	static volatile gsize ibus_emojier_escrolled_window_type_id__volatile = 0;
	if (g_once_init_enter (&ibus_emojier_escrolled_window_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (IBusEmojierEScrolledWindowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) ibus_emojier_escrolled_window_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (IBusEmojierEScrolledWindow), 0, (GInstanceInitFunc) ibus_emojier_escrolled_window_instance_init, NULL };
		GType ibus_emojier_escrolled_window_type_id;
		ibus_emojier_escrolled_window_type_id = g_type_register_static (gtk_scrolled_window_get_type (), "IBusEmojierEScrolledWindow", &g_define_type_info, 0);
		g_once_init_leave (&ibus_emojier_escrolled_window_type_id__volatile, ibus_emojier_escrolled_window_type_id);
	}
	return ibus_emojier_escrolled_window_type_id__volatile;
}


static IBusEmojierEGrid*
ibus_emojier_egrid_construct (GType object_type)
{
	IBusEmojierEGrid * self = NULL;
	self = (IBusEmojierEGrid*) g_object_new (object_type, "row-homogeneous", FALSE, "vexpand", TRUE, "halign", GTK_ALIGN_FILL, "valign", GTK_ALIGN_FILL, "row-spacing", 5, "column-spacing", 5, "border-width", 2, NULL);
	return self;
}


static IBusEmojierEGrid*
ibus_emojier_egrid_new (void)
{
	return ibus_emojier_egrid_construct (IBUS_EMOJIER_TYPE_EGRID);
}


static void
ibus_emojier_egrid_class_init (IBusEmojierEGridClass * klass)
{
	ibus_emojier_egrid_parent_class = g_type_class_peek_parent (klass);
}


static void
ibus_emojier_egrid_instance_init (IBusEmojierEGrid * self)
{
}


static GType
ibus_emojier_egrid_get_type (void)
{
	static volatile gsize ibus_emojier_egrid_type_id__volatile = 0;
	if (g_once_init_enter (&ibus_emojier_egrid_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (IBusEmojierEGridClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) ibus_emojier_egrid_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (IBusEmojierEGrid), 0, (GInstanceInitFunc) ibus_emojier_egrid_instance_init, NULL };
		GType ibus_emojier_egrid_type_id;
		ibus_emojier_egrid_type_id = g_type_register_static (gtk_grid_get_type (), "IBusEmojierEGrid", &g_define_type_info, 0);
		g_once_init_leave (&ibus_emojier_egrid_type_id__volatile, ibus_emojier_egrid_type_id);
	}
	return ibus_emojier_egrid_type_id__volatile;
}


static IBusEmojierEWhiteLabel*
ibus_emojier_ewhite_label_construct (GType object_type,
                                     const gchar* text)
{
	IBusEmojierEWhiteLabel * self = NULL;
	g_return_val_if_fail (text != NULL, NULL);
	self = (IBusEmojierEWhiteLabel*) g_object_new (object_type, "name", "IBusEmojierWhiteLabel", NULL);
	gtk_label_set_label ((GtkLabel*) self, text);
	return self;
}


static IBusEmojierEWhiteLabel*
ibus_emojier_ewhite_label_new (const gchar* text)
{
	return ibus_emojier_ewhite_label_construct (IBUS_EMOJIER_TYPE_EWHITE_LABEL, text);
}


static void
ibus_emojier_ewhite_label_real_get_preferred_width (GtkWidget* base,
                                                    gint* minimum_width,
                                                    gint* natural_width)
{
	IBusEmojierEWhiteLabel * self;
	gint _vala_minimum_width = 0;
	gint _vala_natural_width = 0;
	gboolean _tmp0_ = FALSE;
	gint _tmp1_;
	gchar* text = NULL;
	const gchar* _tmp5_;
	gchar* _tmp6_;
	gunichar ch = 0U;
	const gchar* _tmp7_;
	gboolean _tmp8_ = FALSE;
	const gchar* _tmp9_;
	gint _tmp10_;
	gint _tmp11_;
	gint _tmp17_ = 0;
	gint _tmp18_ = 0;
	gboolean _tmp19_ = FALSE;
	const gchar* _tmp20_;
	gint _tmp21_;
	gint _tmp22_;
	gint _tmp30_;
	gint _tmp31_;
	gint _tmp33_;
	gint _tmp34_;
	gint _tmp36_;
	gint _tmp37_;
	self = (IBusEmojierEWhiteLabel*) base;
	_tmp1_ = self->priv->m_minimum_height;
	if (_tmp1_ == 0) {
		gint _tmp2_;
		_tmp2_ = self->priv->m_natural_height;
		_tmp0_ = _tmp2_ == 0;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		gint _tmp3_ = 0;
		gint _tmp4_ = 0;
		GTK_WIDGET_CLASS (ibus_emojier_ewhite_label_parent_class)->get_preferred_height ((GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (self, gtk_label_get_type (), GtkLabel), &_tmp3_, &_tmp4_);
		self->priv->m_minimum_height = _tmp3_;
		self->priv->m_natural_height = _tmp4_;
	}
	_tmp5_ = gtk_label_get_label ((GtkLabel*) self);
	_tmp6_ = g_strdup (_tmp5_);
	text = _tmp6_;
	_tmp7_ = text;
	ch = string_get_char (_tmp7_, (glong) 0);
	_tmp9_ = text;
	_tmp10_ = strlen (_tmp9_);
	_tmp11_ = _tmp10_;
	if (_tmp11_ == 1) {
		gunichar _tmp12_;
		_tmp12_ = ch;
		_tmp8_ = _tmp12_ == ((gunichar) '\t');
	} else {
		_tmp8_ = FALSE;
	}
	if (_tmp8_) {
		gint _tmp13_;
		gint _tmp14_;
		gint _tmp15_;
		gint _tmp16_;
		_tmp13_ = self->priv->m_minimum_height;
		_vala_minimum_width = _tmp13_;
		_tmp14_ = _vala_minimum_width;
		self->priv->m_minimum_width = _tmp14_;
		_tmp15_ = self->priv->m_natural_height;
		_vala_natural_width = _tmp15_;
		_tmp16_ = _vala_natural_width;
		self->priv->m_natural_width = _tmp16_;
		_g_free0 (text);
		if (minimum_width) {
			*minimum_width = _vala_minimum_width;
		}
		if (natural_width) {
			*natural_width = _vala_natural_width;
		}
		return;
	}
	GTK_WIDGET_CLASS (ibus_emojier_ewhite_label_parent_class)->get_preferred_width ((GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (self, gtk_label_get_type (), GtkLabel), &_tmp17_, &_tmp18_);
	_vala_minimum_width = _tmp17_;
	_vala_natural_width = _tmp18_;
	_tmp20_ = text;
	_tmp21_ = strlen (_tmp20_);
	_tmp22_ = _tmp21_;
	if (_tmp22_ == 1) {
		gboolean _tmp23_ = FALSE;
		gunichar _tmp24_;
		_tmp24_ = ch;
		if (_tmp24_ == ((gunichar) '\n')) {
			_tmp23_ = TRUE;
		} else {
			gunichar _tmp25_;
			_tmp25_ = ch;
			_tmp23_ = _tmp25_ == ((gunichar) '\r');
		}
		_tmp19_ = _tmp23_;
	} else {
		_tmp19_ = FALSE;
	}
	if (_tmp19_) {
		gint _tmp26_;
		gint _tmp27_;
		gint _tmp28_;
		gint _tmp29_;
		_tmp26_ = _vala_minimum_width;
		_vala_minimum_width = _tmp26_ / 2;
		_tmp27_ = _vala_natural_width;
		_vala_natural_width = _tmp27_ / 2;
		_tmp28_ = _vala_minimum_width;
		self->priv->m_minimum_width = _tmp28_;
		_tmp29_ = _vala_natural_width;
		self->priv->m_natural_width = _tmp29_;
		_g_free0 (text);
		if (minimum_width) {
			*minimum_width = _vala_minimum_width;
		}
		if (natural_width) {
			*natural_width = _vala_natural_width;
		}
		return;
	}
	_tmp30_ = _vala_minimum_width;
	_tmp31_ = self->priv->m_minimum_height;
	if (_tmp30_ < _tmp31_) {
		gint _tmp32_;
		_tmp32_ = self->priv->m_minimum_height;
		_vala_minimum_width = _tmp32_;
	}
	_tmp33_ = _vala_natural_width;
	_tmp34_ = self->priv->m_natural_height;
	if (_tmp33_ < _tmp34_) {
		gint _tmp35_;
		_tmp35_ = self->priv->m_natural_height;
		_vala_natural_width = _tmp35_;
	}
	_tmp36_ = _vala_minimum_width;
	self->priv->m_minimum_width = _tmp36_;
	_tmp37_ = _vala_natural_width;
	self->priv->m_natural_width = _tmp37_;
	_g_free0 (text);
	if (minimum_width) {
		*minimum_width = _vala_minimum_width;
	}
	if (natural_width) {
		*natural_width = _vala_natural_width;
	}
}


static void
ibus_emojier_ewhite_label_real_get_preferred_height (GtkWidget* base,
                                                     gint* minimum_height,
                                                     gint* natural_height)
{
	IBusEmojierEWhiteLabel * self;
	gint _vala_minimum_height = 0;
	gint _vala_natural_height = 0;
	gboolean _tmp0_ = FALSE;
	gint _tmp1_;
	gchar* text = NULL;
	const gchar* _tmp5_;
	gchar* _tmp6_;
	gunichar ch = 0U;
	const gchar* _tmp7_;
	gboolean _tmp8_ = FALSE;
	const gchar* _tmp9_;
	gint _tmp10_;
	gint _tmp11_;
	gint _tmp17_ = 0;
	gint _tmp18_ = 0;
	gboolean _tmp19_ = FALSE;
	const gchar* _tmp20_;
	gint _tmp21_;
	gint _tmp22_;
	gint _tmp30_;
	gint _tmp31_;
	self = (IBusEmojierEWhiteLabel*) base;
	_tmp1_ = self->priv->m_minimum_width;
	if (_tmp1_ == 0) {
		gint _tmp2_;
		_tmp2_ = self->priv->m_natural_width;
		_tmp0_ = _tmp2_ == 0;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		gint _tmp3_ = 0;
		gint _tmp4_ = 0;
		GTK_WIDGET_CLASS (ibus_emojier_ewhite_label_parent_class)->get_preferred_width ((GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (self, gtk_label_get_type (), GtkLabel), &_tmp3_, &_tmp4_);
		self->priv->m_minimum_width = _tmp3_;
		self->priv->m_natural_width = _tmp4_;
	}
	_tmp5_ = gtk_label_get_label ((GtkLabel*) self);
	_tmp6_ = g_strdup (_tmp5_);
	text = _tmp6_;
	_tmp7_ = text;
	ch = string_get_char (_tmp7_, (glong) 0);
	_tmp9_ = text;
	_tmp10_ = strlen (_tmp9_);
	_tmp11_ = _tmp10_;
	if (_tmp11_ == 1) {
		gunichar _tmp12_;
		_tmp12_ = ch;
		_tmp8_ = _tmp12_ == ((gunichar) '\v');
	} else {
		_tmp8_ = FALSE;
	}
	if (_tmp8_) {
		gint _tmp13_;
		gint _tmp14_;
		gint _tmp15_;
		gint _tmp16_;
		_tmp13_ = self->priv->m_minimum_width;
		_vala_minimum_height = _tmp13_;
		_tmp14_ = _vala_minimum_height;
		self->priv->m_minimum_height = _tmp14_;
		_tmp15_ = self->priv->m_natural_width;
		_vala_natural_height = _tmp15_;
		_tmp16_ = _vala_natural_height;
		self->priv->m_natural_height = _tmp16_;
		_g_free0 (text);
		if (minimum_height) {
			*minimum_height = _vala_minimum_height;
		}
		if (natural_height) {
			*natural_height = _vala_natural_height;
		}
		return;
	}
	GTK_WIDGET_CLASS (ibus_emojier_ewhite_label_parent_class)->get_preferred_height ((GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (self, gtk_label_get_type (), GtkLabel), &_tmp17_, &_tmp18_);
	_vala_minimum_height = _tmp17_;
	_vala_natural_height = _tmp18_;
	_tmp20_ = text;
	_tmp21_ = strlen (_tmp20_);
	_tmp22_ = _tmp21_;
	if (_tmp22_ == 1) {
		gboolean _tmp23_ = FALSE;
		gunichar _tmp24_;
		_tmp24_ = ch;
		if (_tmp24_ == ((gunichar) '\n')) {
			_tmp23_ = TRUE;
		} else {
			gunichar _tmp25_;
			_tmp25_ = ch;
			_tmp23_ = _tmp25_ == ((gunichar) '\r');
		}
		_tmp19_ = _tmp23_;
	} else {
		_tmp19_ = FALSE;
	}
	if (_tmp19_) {
		gint _tmp26_;
		gint _tmp27_;
		gint _tmp28_;
		gint _tmp29_;
		_tmp26_ = _vala_minimum_height;
		_vala_minimum_height = _tmp26_ / 2;
		_tmp27_ = _vala_natural_height;
		_vala_natural_height = _tmp27_ / 2;
		_tmp28_ = _vala_minimum_height;
		self->priv->m_minimum_height = _tmp28_;
		_tmp29_ = _vala_natural_height;
		self->priv->m_natural_height = _tmp29_;
		_g_free0 (text);
		if (minimum_height) {
			*minimum_height = _vala_minimum_height;
		}
		if (natural_height) {
			*natural_height = _vala_natural_height;
		}
		return;
	}
	_tmp30_ = _vala_minimum_height;
	self->priv->m_minimum_height = _tmp30_;
	_tmp31_ = _vala_natural_height;
	self->priv->m_natural_height = _tmp31_;
	_g_free0 (text);
	if (minimum_height) {
		*minimum_height = _vala_minimum_height;
	}
	if (natural_height) {
		*natural_height = _vala_natural_height;
	}
}


static void
ibus_emojier_ewhite_label_class_init (IBusEmojierEWhiteLabelClass * klass)
{
	ibus_emojier_ewhite_label_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (IBusEmojierEWhiteLabelPrivate));
	((GtkWidgetClass *) klass)->get_preferred_width = (void (*) (GtkWidget *, gint*, gint*)) ibus_emojier_ewhite_label_real_get_preferred_width;
	((GtkWidgetClass *) klass)->get_preferred_height = (void (*) (GtkWidget *, gint*, gint*)) ibus_emojier_ewhite_label_real_get_preferred_height;
	G_OBJECT_CLASS (klass)->finalize = ibus_emojier_ewhite_label_finalize;
}


static void
ibus_emojier_ewhite_label_instance_init (IBusEmojierEWhiteLabel * self)
{
	self->priv = IBUS_EMOJIER_EWHITE_LABEL_GET_PRIVATE (self);
	self->priv->m_minimum_width = 0;
	self->priv->m_natural_width = 0;
	self->priv->m_minimum_height = 0;
	self->priv->m_natural_height = 0;
}


static void
ibus_emojier_ewhite_label_finalize (GObject * obj)
{
	IBusEmojierEWhiteLabel * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, IBUS_EMOJIER_TYPE_EWHITE_LABEL, IBusEmojierEWhiteLabel);
	G_OBJECT_CLASS (ibus_emojier_ewhite_label_parent_class)->finalize (obj);
}


static GType
ibus_emojier_ewhite_label_get_type (void)
{
	static volatile gsize ibus_emojier_ewhite_label_type_id__volatile = 0;
	if (g_once_init_enter (&ibus_emojier_ewhite_label_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (IBusEmojierEWhiteLabelClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) ibus_emojier_ewhite_label_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (IBusEmojierEWhiteLabel), 0, (GInstanceInitFunc) ibus_emojier_ewhite_label_instance_init, NULL };
		GType ibus_emojier_ewhite_label_type_id;
		ibus_emojier_ewhite_label_type_id = g_type_register_static (gtk_label_get_type (), "IBusEmojierEWhiteLabel", &g_define_type_info, 0);
		g_once_init_leave (&ibus_emojier_ewhite_label_type_id__volatile, ibus_emojier_ewhite_label_type_id);
	}
	return ibus_emojier_ewhite_label_type_id__volatile;
}


static IBusEmojierESelectedLabel*
ibus_emojier_eselected_label_construct (GType object_type,
                                        const gchar* text)
{
	IBusEmojierESelectedLabel * self = NULL;
	g_return_val_if_fail (text != NULL, NULL);
	self = (IBusEmojierESelectedLabel*) g_object_new (object_type, "name", "IBusEmojierSelectedLabel", NULL);
	if (g_strcmp0 (text, "") != 0) {
		gtk_label_set_label ((GtkLabel*) self, text);
	}
	return self;
}


static IBusEmojierESelectedLabel*
ibus_emojier_eselected_label_new (const gchar* text)
{
	return ibus_emojier_eselected_label_construct (IBUS_EMOJIER_TYPE_ESELECTED_LABEL, text);
}


static void
ibus_emojier_eselected_label_class_init (IBusEmojierESelectedLabelClass * klass)
{
	ibus_emojier_eselected_label_parent_class = g_type_class_peek_parent (klass);
}


static void
ibus_emojier_eselected_label_instance_init (IBusEmojierESelectedLabel * self)
{
}


static GType
ibus_emojier_eselected_label_get_type (void)
{
	static volatile gsize ibus_emojier_eselected_label_type_id__volatile = 0;
	if (g_once_init_enter (&ibus_emojier_eselected_label_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (IBusEmojierESelectedLabelClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) ibus_emojier_eselected_label_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (IBusEmojierESelectedLabel), 0, (GInstanceInitFunc) ibus_emojier_eselected_label_instance_init, NULL };
		GType ibus_emojier_eselected_label_type_id;
		ibus_emojier_eselected_label_type_id = g_type_register_static (IBUS_EMOJIER_TYPE_EWHITE_LABEL, "IBusEmojierESelectedLabel", &g_define_type_info, 0);
		g_once_init_leave (&ibus_emojier_eselected_label_type_id__volatile, ibus_emojier_eselected_label_type_id);
	}
	return ibus_emojier_eselected_label_type_id__volatile;
}


static IBusEmojierEGoldLabel*
ibus_emojier_egold_label_construct (GType object_type,
                                    const gchar* text)
{
	IBusEmojierEGoldLabel * self = NULL;
	g_return_val_if_fail (text != NULL, NULL);
	self = (IBusEmojierEGoldLabel*) g_object_new (object_type, "name", "IBusEmojierGoldLabel", NULL);
	if (g_strcmp0 (text, "") != 0) {
		gtk_label_set_label ((GtkLabel*) self, text);
	}
	return self;
}


static IBusEmojierEGoldLabel*
ibus_emojier_egold_label_new (const gchar* text)
{
	return ibus_emojier_egold_label_construct (IBUS_EMOJIER_TYPE_EGOLD_LABEL, text);
}


static void
ibus_emojier_egold_label_class_init (IBusEmojierEGoldLabelClass * klass)
{
	ibus_emojier_egold_label_parent_class = g_type_class_peek_parent (klass);
}


static void
ibus_emojier_egold_label_instance_init (IBusEmojierEGoldLabel * self)
{
}


static GType
ibus_emojier_egold_label_get_type (void)
{
	static volatile gsize ibus_emojier_egold_label_type_id__volatile = 0;
	if (g_once_init_enter (&ibus_emojier_egold_label_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (IBusEmojierEGoldLabelClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) ibus_emojier_egold_label_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (IBusEmojierEGoldLabel), 0, (GInstanceInitFunc) ibus_emojier_egold_label_instance_init, NULL };
		GType ibus_emojier_egold_label_type_id;
		ibus_emojier_egold_label_type_id = g_type_register_static (IBUS_EMOJIER_TYPE_EWHITE_LABEL, "IBusEmojierEGoldLabel", &g_define_type_info, 0);
		g_once_init_leave (&ibus_emojier_egold_label_type_id__volatile, ibus_emojier_egold_label_type_id);
	}
	return ibus_emojier_egold_label_type_id__volatile;
}


static IBusEmojierEPaddedLabel*
ibus_emojier_epadded_label_construct (GType object_type,
                                      const gchar* text,
                                      GtkAlign align)
{
	IBusEmojierEPaddedLabel * self = NULL;
	g_return_val_if_fail (text != NULL, NULL);
	self = (IBusEmojierEPaddedLabel*) g_object_new (object_type, "name", "IBusEmojierPaddedLabel", "halign", align, "valign", GTK_ALIGN_CENTER, "margin-start", 20, "margin-end", 20, "margin-top", 6, "margin-bottom", 6, NULL);
	gtk_label_set_text ((GtkLabel*) self, text);
	return self;
}


static IBusEmojierEPaddedLabel*
ibus_emojier_epadded_label_new (const gchar* text,
                                GtkAlign align)
{
	return ibus_emojier_epadded_label_construct (IBUS_EMOJIER_TYPE_EPADDED_LABEL, text, align);
}


static void
ibus_emojier_epadded_label_class_init (IBusEmojierEPaddedLabelClass * klass)
{
	ibus_emojier_epadded_label_parent_class = g_type_class_peek_parent (klass);
}


static void
ibus_emojier_epadded_label_instance_init (IBusEmojierEPaddedLabel * self)
{
}


static GType
ibus_emojier_epadded_label_get_type (void)
{
	static volatile gsize ibus_emojier_epadded_label_type_id__volatile = 0;
	if (g_once_init_enter (&ibus_emojier_epadded_label_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (IBusEmojierEPaddedLabelClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) ibus_emojier_epadded_label_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (IBusEmojierEPaddedLabel), 0, (GInstanceInitFunc) ibus_emojier_epadded_label_instance_init, NULL };
		GType ibus_emojier_epadded_label_type_id;
		ibus_emojier_epadded_label_type_id = g_type_register_static (gtk_label_get_type (), "IBusEmojierEPaddedLabel", &g_define_type_info, 0);
		g_once_init_leave (&ibus_emojier_epadded_label_type_id__volatile, ibus_emojier_epadded_label_type_id);
	}
	return ibus_emojier_epadded_label_type_id__volatile;
}


static IBusEmojierEPaddedLabelBox*
ibus_emojier_epadded_label_box_construct (GType object_type,
                                          const gchar* text,
                                          GtkAlign align,
                                          IBusEmojierTravelDirection direction,
                                          const gchar* caption)
{
	IBusEmojierEPaddedLabelBox * self = NULL;
	IBusEmojierEPaddedLabel* label = NULL;
	IBusEmojierEPaddedLabel* _tmp3_;
	IBusEmojierEPaddedLabel* _tmp4_;
	g_return_val_if_fail (text != NULL, NULL);
	self = (IBusEmojierEPaddedLabelBox*) g_object_new (object_type, "name", "IBusEmojierPaddedLabelBox", "orientation", GTK_ORIENTATION_HORIZONTAL, "spacing", 0, NULL);
	if (direction == IBUS_EMOJIER_TRAVEL_DIRECTION_BACKWARD) {
		IconWidget* icon = NULL;
		IconWidget* _tmp2_;
		if (gtk_widget_get_default_direction () == GTK_TEXT_DIR_RTL) {
			IconWidget* _tmp0_;
			_tmp0_ = icon_widget_new ("go-previous-rtl-symbolic", GTK_ICON_SIZE_MENU);
			g_object_ref_sink (_tmp0_);
			_g_object_unref0 (icon);
			icon = _tmp0_;
		} else {
			IconWidget* _tmp1_;
			_tmp1_ = icon_widget_new ("go-previous-symbolic", GTK_ICON_SIZE_MENU);
			g_object_ref_sink (_tmp1_);
			_g_object_unref0 (icon);
			icon = _tmp1_;
		}
		_tmp2_ = icon;
		gtk_box_pack_start ((GtkBox*) self, (GtkWidget*) _tmp2_, FALSE, TRUE, (guint) 0);
		_g_object_unref0 (icon);
	}
	_tmp3_ = ibus_emojier_epadded_label_new (text, align);
	g_object_ref_sink (_tmp3_);
	label = _tmp3_;
	_tmp4_ = label;
	gtk_box_pack_start ((GtkBox*) self, (GtkWidget*) _tmp4_, TRUE, TRUE, (guint) 0);
	if (caption != NULL) {
		IBusEmojierEPaddedLabel* label_r = NULL;
		IBusEmojierEPaddedLabel* _tmp5_;
		IBusEmojierEPaddedLabel* _tmp6_;
		_tmp5_ = ibus_emojier_epadded_label_new (caption, GTK_ALIGN_END);
		g_object_ref_sink (_tmp5_);
		label_r = _tmp5_;
		_tmp6_ = label_r;
		gtk_box_pack_end ((GtkBox*) self, (GtkWidget*) _tmp6_, TRUE, TRUE, (guint) 0);
		_g_object_unref0 (label_r);
	}
	_g_object_unref0 (label);
	return self;
}


static IBusEmojierEPaddedLabelBox*
ibus_emojier_epadded_label_box_new (const gchar* text,
                                    GtkAlign align,
                                    IBusEmojierTravelDirection direction,
                                    const gchar* caption)
{
	return ibus_emojier_epadded_label_box_construct (IBUS_EMOJIER_TYPE_EPADDED_LABEL_BOX, text, align, direction, caption);
}


static void
ibus_emojier_epadded_label_box_class_init (IBusEmojierEPaddedLabelBoxClass * klass)
{
	ibus_emojier_epadded_label_box_parent_class = g_type_class_peek_parent (klass);
}


static void
ibus_emojier_epadded_label_box_instance_init (IBusEmojierEPaddedLabelBox * self)
{
}


static GType
ibus_emojier_epadded_label_box_get_type (void)
{
	static volatile gsize ibus_emojier_epadded_label_box_type_id__volatile = 0;
	if (g_once_init_enter (&ibus_emojier_epadded_label_box_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (IBusEmojierEPaddedLabelBoxClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) ibus_emojier_epadded_label_box_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (IBusEmojierEPaddedLabelBox), 0, (GInstanceInitFunc) ibus_emojier_epadded_label_box_instance_init, NULL };
		GType ibus_emojier_epadded_label_box_type_id;
		ibus_emojier_epadded_label_box_type_id = g_type_register_static (gtk_box_get_type (), "IBusEmojierEPaddedLabelBox", &g_define_type_info, 0);
		g_once_init_leave (&ibus_emojier_epadded_label_box_type_id__volatile, ibus_emojier_epadded_label_box_type_id);
	}
	return ibus_emojier_epadded_label_box_type_id__volatile;
}


static IBusEmojierLoadProgressObject*
ibus_emojier_load_progress_object_construct (GType object_type)
{
	IBusEmojierLoadProgressObject * self = NULL;
	self = (IBusEmojierLoadProgressObject*) g_object_new (object_type, NULL);
	return self;
}


static IBusEmojierLoadProgressObject*
ibus_emojier_load_progress_object_new (void)
{
	return ibus_emojier_load_progress_object_construct (IBUS_EMOJIER_TYPE_LOAD_PROGRESS_OBJECT);
}


static void
g_cclosure_user_marshal_VOID__UINT_UINT (GClosure * closure,
                                         GValue * return_value,
                                         guint n_param_values,
                                         const GValue * param_values,
                                         gpointer invocation_hint,
                                         gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__UINT_UINT) (gpointer data1, guint arg_1, guint arg_2, gpointer data2);
	register GMarshalFunc_VOID__UINT_UINT callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
	g_return_if_fail (n_param_values == 3);
	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = param_values->data[0].v_pointer;
	} else {
		data1 = param_values->data[0].v_pointer;
		data2 = closure->data;
	}
	callback = (GMarshalFunc_VOID__UINT_UINT) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_uint (param_values + 1), g_value_get_uint (param_values + 2), data2);
}


static void
ibus_emojier_load_progress_object_class_init (IBusEmojierLoadProgressObjectClass * klass)
{
	ibus_emojier_load_progress_object_parent_class = g_type_class_peek_parent (klass);
	ibus_emojier_load_progress_object_signals[IBUS_EMOJIER_LOAD_PROGRESS_OBJECT_DESERIALIZE_UNICODE_SIGNAL] = g_signal_new ("deserialize-unicode", IBUS_EMOJIER_TYPE_LOAD_PROGRESS_OBJECT, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__UINT_UINT, G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_UINT);
}


static void
ibus_emojier_load_progress_object_instance_init (IBusEmojierLoadProgressObject * self)
{
}


static GType
ibus_emojier_load_progress_object_get_type (void)
{
	static volatile gsize ibus_emojier_load_progress_object_type_id__volatile = 0;
	if (g_once_init_enter (&ibus_emojier_load_progress_object_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (IBusEmojierLoadProgressObjectClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) ibus_emojier_load_progress_object_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (IBusEmojierLoadProgressObject), 0, (GInstanceInitFunc) ibus_emojier_load_progress_object_instance_init, NULL };
		GType ibus_emojier_load_progress_object_type_id;
		ibus_emojier_load_progress_object_type_id = g_type_register_static (G_TYPE_OBJECT, "IBusEmojierLoadProgressObject", &g_define_type_info, 0);
		g_once_init_leave (&ibus_emojier_load_progress_object_type_id__volatile, ibus_emojier_load_progress_object_type_id);
	}
	return ibus_emojier_load_progress_object_type_id__volatile;
}


static void
ibus_emojier_class_init (IBusEmojierClass * klass)
{
	gchar* _tmp0_;
	ibus_emojier_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (IBusEmojierPrivate));
	((GtkWidgetClass *) klass)->show_all = (void (*) (GtkWidget *)) ibus_emojier_real_show_all;
	((GtkWidgetClass *) klass)->hide = (void (*) (GtkWidget *)) ibus_emojier_real_hide;
	((GtkWidgetClass *) klass)->key_press_event = (gboolean (*) (GtkWidget *, GdkEventKey*)) ibus_emojier_real_key_press_event;
	G_OBJECT_CLASS (klass)->finalize = ibus_emojier_finalize;
	ibus_emojier_signals[IBUS_EMOJIER_CANDIDATE_CLICKED_SIGNAL] = g_signal_new ("candidate-clicked", TYPE_IBUS_EMOJIER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__UINT_UINT_UINT, G_TYPE_NONE, 3, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT);
	_tmp0_ = g_strdup ("");
	ibus_emojier_m_warning_message = _tmp0_;
}


static void
ibus_emojier_instance_init (IBusEmojier * self)
{
	gchar* _tmp0_;
	gchar* _tmp1_;
	self->priv = IBUS_EMOJIER_GET_PRIVATE (self);
	_tmp0_ = g_strdup ("");
	self->priv->m_annotation = _tmp0_;
	self->priv->m_backward_index = -1;
	self->priv->m_scrolled_window = NULL;
	self->priv->m_is_running = FALSE;
	_tmp1_ = g_strdup ("");
	self->priv->m_input_context_path = _tmp1_;
	self->priv->m_category_active_index = -1;
	self->priv->m_enter_notify_enable = TRUE;
	self->priv->m_is_up_side_down = FALSE;
}


static void
ibus_emojier_finalize (GObject * obj)
{
	IBusEmojier * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_IBUS_EMOJIER, IBusEmojier);
	_themed_rgba_unref0 (self->priv->m_rgba);
	_g_object_unref0 (self->priv->m_vbox);
	_g_object_unref0 (self->priv->m_entry);
	_g_free0 (self->priv->m_annotation);
	_g_free0 (self->priv->m_backward);
	_g_object_unref0 (self->priv->m_scrolled_window);
	_g_object_unref0 (self->priv->m_list_box);
	_g_free0 (self->priv->m_input_context_path);
	_g_main_loop_unref0 (self->priv->m_loop);
	_g_free0 (self->priv->m_result);
	_g_object_unref0 (self->priv->m_lookup_table);
	self->priv->m_candidates = (_vala_array_free (self->priv->m_candidates, self->priv->m_candidates_length1, (GDestroyNotify) g_object_unref), NULL);
	_g_object_unref0 (self->priv->m_unicode_progress_bar);
	_g_object_unref0 (self->priv->m_unicode_percent_label);
	G_OBJECT_CLASS (ibus_emojier_parent_class)->finalize (obj);
}


GType
ibus_emojier_get_type (void)
{
	static volatile gsize ibus_emojier_type_id__volatile = 0;
	if (g_once_init_enter (&ibus_emojier_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (IBusEmojierClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) ibus_emojier_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (IBusEmojier), 0, (GInstanceInitFunc) ibus_emojier_instance_init, NULL };
		GType ibus_emojier_type_id;
		ibus_emojier_type_id = g_type_register_static (gtk_application_window_get_type (), "IBusEmojier", &g_define_type_info, 0);
		g_once_init_leave (&ibus_emojier_type_id__volatile, ibus_emojier_type_id);
	}
	return ibus_emojier_type_id__volatile;
}


static void
_vala_array_destroy (gpointer array,
                     gint array_length,
                     GDestroyNotify destroy_func)
{
	if ((array != NULL) && (destroy_func != NULL)) {
		int i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}


static void
_vala_array_free (gpointer array,
                  gint array_length,
                  GDestroyNotify destroy_func)
{
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}


static gint
_vala_array_length (gpointer array)
{
	int length;
	length = 0;
	if (array) {
		while (((gpointer*) array)[length]) {
			length++;
		}
	}
	return length;
}