void Browser_Common_View::show_notify_popup(const char *msg, int timeout, Eina_Bool has_control_bar)
{
	if (m_selection_info_layout) {
		evas_object_del(m_selection_info_layout);
		m_selection_info_layout = NULL;
	}

	if (m_selection_info) {
		evas_object_del(m_selection_info);
		m_selection_info = NULL;
	}

	int angle = 0;
	angle = elm_win_rotation_get(m_win);
	m_selection_info = elm_notify_add(m_navi_bar);
	if (!m_selection_info) {
		BROWSER_LOGD("elm_notify_add failed");
		return;
	}
	elm_notify_orient_set(m_selection_info, ELM_NOTIFY_ORIENT_BOTTOM);
	evas_object_size_hint_weight_set(m_selection_info, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
	evas_object_size_hint_align_set(m_selection_info, EVAS_HINT_FILL, EVAS_HINT_FILL);
	m_selection_info_layout = elm_layout_add(m_selection_info);
	if (!m_selection_info_layout) {
		BROWSER_LOGD("elm_layout_add failed");
		return;
	}
	evas_object_size_hint_weight_set(m_selection_info_layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
	evas_object_size_hint_align_set(m_selection_info_layout, EVAS_HINT_FILL, EVAS_HINT_FILL);

	elm_object_content_set(m_selection_info, m_selection_info_layout);

	if (has_control_bar) {
		if(angle == 0 || angle == 180)
		   elm_layout_theme_set(m_selection_info_layout, "standard", "selectioninfo",
		   						"vertical/bottom_64");
		else
		   elm_layout_theme_set(m_selection_info_layout, "standard", "selectioninfo",
		   						"horizontal/bottom_64");
	} else {
		if(angle == 0 || angle == 180)
		   elm_layout_theme_set(m_selection_info_layout, "standard", "selectioninfo",
		   						"vertical/bottom_12");
		else
		   elm_layout_theme_set(m_selection_info_layout, "standard", "selectioninfo",
		   						"horizontal/bottom_12");
	}
	edje_object_part_text_set(elm_layout_edje_get(m_selection_info_layout), "elm.text", msg);

	if (timeout)
		elm_notify_timeout_set(m_selection_info, timeout);

	evas_object_show(m_selection_info);
}
void GLViewImpl::setIMEKeyboardState(bool open)
{
    if (open)
    {
        if (!s_keypadWin)
        {
            auto frameSize = Director::getInstance()->getOpenGLView()->getFrameSize();
            auto app = Application::getInstance();

            s_keypadWin = elm_win_add(app->_win, "cocos2d-x textfield", ELM_WIN_BASIC);
            elm_win_autodel_set(s_keypadWin, EINA_TRUE);
            elm_win_conformant_set(s_keypadWin, EINA_TRUE);
            elm_win_alpha_set(s_keypadWin, EINA_TRUE);
            eext_object_event_callback_add(s_keypadWin, EEXT_CALLBACK_BACK, keyPadBackCallback, NULL);
            evas_object_show(s_keypadWin);

            int rots[2];
            rots[0] = (int)elm_win_rotation_get(app->_win);
            rots[1] = rots[0] + 180 % 360;
            elm_win_wm_rotation_available_rotations_set(s_keypadWin, rots, 2);

            auto rectangle = elm_bg_add(s_keypadWin);
            evas_object_resize(rectangle, frameSize.width, frameSize.height + 50);
            evas_object_color_set(rectangle, 0xff, 0xff, 0xff, 0);
            evas_object_move(rectangle, 0, -50);
            evas_object_show(rectangle);

            evas_object_repeat_events_set(rectangle, EINA_TRUE);
            evas_object_event_callback_add(rectangle, EVAS_CALLBACK_MOUSE_UP, blankAreaClickedCallback, NULL);
            evas_object_event_callback_add(rectangle, EVAS_CALLBACK_MULTI_UP, blankAreaClickedCallback, NULL);

            s_keypadEntry = elm_entry_add(rectangle);
            elm_entry_single_line_set(s_keypadEntry, EINA_TRUE);
            evas_object_resize(s_keypadEntry, frameSize.width, 50);
            evas_object_move(s_keypadEntry, 0, -50);
            elm_entry_input_panel_return_key_type_set(s_keypadEntry, ELM_INPUT_PANEL_RETURN_KEY_TYPE_DONE);
            elm_entry_prediction_allow_set(s_keypadEntry, EINA_FALSE);
            evas_object_event_callback_add(s_keypadEntry, EVAS_CALLBACK_KEY_UP, entryKeyCallback, NULL);
            evas_object_show(s_keypadEntry);

            elm_object_focus_set(s_keypadEntry, EINA_TRUE);
            evas_object_smart_callback_add(s_keypadEntry, "activated", entryActivatedCallback, NULL);
            elm_entry_input_panel_show(s_keypadEntry);

            s_imf = (Ecore_IMF_Context*)elm_entry_imf_context_get(s_keypadEntry);
            ecore_imf_context_event_callback_add(s_imf, ECORE_IMF_CALLBACK_COMMIT, imfEventCommitCallback, s_keypadEntry);
        }
    }
    else if (s_keypadWin)
    {
        closeKeypad();
    }
}
void EditBoxImplTizen::openKeyboard()
{
    if (s_keypadWin)
    {
        return;
    }

    if (_delegate != NULL)
    {
        _delegate->editBoxEditingDidBegin(_editBox);
    }

#if CC_ENABLE_SCRIPT_BINDING
    EditBox* pEditBox = this->getEditBox();
    if (NULL != pEditBox && 0 != pEditBox->getScriptEditBoxHandler())
    {
        CommonScriptData data(pEditBox->getScriptEditBoxHandler(), "began",pEditBox);
        ScriptEvent event(cocos2d::kCommonEvent,(void*)&data);
        ScriptEngineManager::getInstance()->getScriptEngine()->sendEvent(&event);
    }
#endif

    Evas_Object* parent = Application::getInstance()->_win;
    GLView* glView = Director::getInstance()->getOpenGLView();
    Size frameSize = glView->getFrameSize();

    s_keypadWin = elm_win_add(parent, "cocos2d-x", ELM_WIN_BASIC);
    elm_win_autodel_set(s_keypadWin, EINA_TRUE);
    elm_win_conformant_set(s_keypadWin, EINA_TRUE);
    elm_win_alpha_set(s_keypadWin, EINA_TRUE);
    evas_object_show(s_keypadWin);
    eext_object_event_callback_add(s_keypadWin, EEXT_CALLBACK_BACK, entry_back_cb, this);
    int rots[2];
    rots[0] = (int)(elm_win_rotation_get(parent));
    rots[1] = rots[0] + 180 % 360;
    elm_win_wm_rotation_available_rotations_set(s_keypadWin, rots, 2);

    Evas_Object* bgFull = elm_bg_add(s_keypadWin);
    evas_object_color_set(bgFull, 0, 0, 0, 0xa0);
    evas_object_resize(bgFull, frameSize.width, frameSize.height);
    evas_object_show(bgFull);

    int height = frameSize.height / 10;
    Evas_Object* rectangle = elm_bg_add(bgFull);
    evas_object_resize(rectangle, frameSize.width, height);
    evas_object_move(rectangle, 0, height);
    evas_object_color_set(rectangle, 0xff, 0xff, 0xff, 0xff);
    evas_object_show(rectangle);

    Evas_Object* title = elm_entry_add(rectangle);
    evas_object_resize(title, frameSize.width, height);
    auto text = _placeHolder.c_str();
    auto richText = (char*)malloc(strlen(text) + 50);
    sprintf(richText,"<color=#ffffff>%s</>", text);
    elm_entry_entry_set(title, richText);
    elm_entry_editable_set(title, EINA_FALSE);
    //elm_entry_drag_disabled_set(title, EINA_TRUE);
    //elm_entry_drop_disabled_set(title, EINA_TRUE);
    evas_object_show(title);
    free(richText);

    Evas_Object* entry = elm_entry_add(bgFull);
    elm_object_focus_set(entry, EINA_TRUE);
    evas_object_resize(entry, frameSize.width, height);
    evas_object_move(entry, 0, height);
    elm_entry_single_line_set(entry, EINA_TRUE);
    elm_entry_line_wrap_set(entry, ELM_WRAP_MIXED);
    elm_entry_entry_set(entry, _text.c_str());
    evas_object_show(entry);
    elm_object_focus_set(entry, EINA_TRUE);
    eext_entry_selection_back_event_allow_set(entry, EINA_TRUE);
    Elm_Entry_Filter_Limit_Size limit_size = { 0, };
    limit_size.max_char_count = _maxLength;
    elm_entry_markup_filter_append(entry, elm_entry_filter_limit_size, &limit_size);
    elm_entry_input_panel_return_key_type_set(entry, ELM_INPUT_PANEL_RETURN_KEY_TYPE_DONE);
    elm_entry_prediction_allow_set(entry, EINA_FALSE);

    evas_object_smart_callback_add(entry, "activated", entry_activated_cb, this);

    switch(_editBoxInputFlag)
    {
    case EditBox::InputFlag::PASSWORD:
        elm_entry_password_set(entry, EINA_TRUE);
        elm_entry_input_panel_layout_set(entry, ELM_INPUT_PANEL_LAYOUT_EMAIL);
        break;
    case EditBox::InputFlag::SENSITIVE:
        elm_entry_input_hint_set(entry, ELM_INPUT_HINT_SENSITIVE_DATA);
        break;
    case EditBox::InputFlag::INITIAL_CAPS_WORD:
        elm_entry_autocapital_type_set(entry, ELM_AUTOCAPITAL_TYPE_WORD);
        break;
    case EditBox::InputFlag::INITIAL_CAPS_SENTENCE:
        elm_entry_autocapital_type_set(entry, ELM_AUTOCAPITAL_TYPE_SENTENCE);
        break;
    case EditBox::InputFlag::INITIAL_CAPS_ALL_CHARACTERS:
        elm_entry_autocapital_type_set(entry, ELM_AUTOCAPITAL_TYPE_ALLCHARACTER);
        break;
    }

    switch(_editBoxInputMode)
    {
    case EditBox::InputMode::ANY:
        break;
    case EditBox::InputMode::EMAIL_ADDRESS:
        elm_entry_input_panel_layout_set(entry, ELM_INPUT_PANEL_LAYOUT_EMAIL);
        break;
    case EditBox::InputMode::NUMERIC:
        elm_entry_input_panel_layout_set(entry, ELM_INPUT_PANEL_LAYOUT_NUMBER);
        break;
    case EditBox::InputMode::PHONE_NUMBER:
        elm_entry_input_panel_layout_set(entry, ELM_INPUT_PANEL_LAYOUT_PHONENUMBER);
        break;
    case EditBox::InputMode::URL:
        elm_entry_input_panel_layout_set(entry, ELM_INPUT_PANEL_LAYOUT_URL);
        break;
    case EditBox::InputMode::DECIMAL:
        elm_entry_input_panel_layout_set(entry, ELM_INPUT_PANEL_LAYOUT_HEX); //fixme?
        break;
    case EditBox::InputMode::SINGLE_LINE:
        break;
    }
}