void on_draw_image(const char *image_path, int dest_x, int dest_y, int dest_weight, int dest_height, int src_x, int src_y, int src_width, int src_height, SCLWindowType type, void* user_data);
- void on_draw_rectangle(int pos_x, int pos_y, int width, int height, bool fill, int fill_color_r, int fill_color_g, int fill_color_b, int fill_color_a, void* user_data);
+ void on_draw_rectangle(int pos_x, int pos_y, int width, int height, bool fill, int fill_color_r, int fill_color_g, int fill_color_b, int fill_color_a, SCLWindowType type, void* user_data);
};
#endif /* __SCL_GRAPHICS_BACKEND_H__ */
LabelAlignment align, int padding_x, int padding_y, int inner_width, int inner_height, WindowType type, void* user_data);
typedef void (*scl_nui_draw_image_cb)(const char *image_path, int dest_x, int dest_y, int dest_weight, int dest_height, int src_x, int src_y, int src_width, int src_height, WindowType type, void* user_data);
-typedef void (*scl_nui_draw_rectangle_cb)(int pos_x, int pos_y, int width, int height, bool fill, int fill_color_r, int fill_color_g, int fill_color_b, int fill_color_a, void* user_data);
+typedef void (*scl_nui_draw_rectangle_cb)(int pos_x, int pos_y, int width, int height, bool fill, int fill_color_r, int fill_color_g, int fill_color_b, int fill_color_a, SCLWindowType type, void* user_data);
/* window backend */
typedef void (*scl_nui_update_window_cb)(int x, int y, int width, int height, void* user_data);
typedef int (*scl_nui_key_click_event_cb)(SclUIEventDesc event_desc);
typedef int (*scl_nui_drag_state_changed_cb)(SclUIEventDesc event_desc);
+typedef int (*scl_nui_event_notification_cb)(SCLUINotiType noti_type, SclNotiDesc *etc_info);
typedef void (*scl_nui_update_window_position_cb)(SCLWindowType type, int pos_x, int pos_y, int rot_x, int rot_y, void* user_data);
int scl_nui_init(const char *entry_filepath);
int scl_nui_set_key_click_event_cb(scl_nui_key_click_event_cb callback);
int scl_nui_set_drag_state_changed_cb(scl_nui_drag_state_changed_cb callback);
+int scl_nui_set_event_notification_cb(scl_nui_event_notification_cb callback);
int scl_nui_set_update_window_position_cb(scl_nui_update_window_position_cb callback, void *user_data);
int scl_nui_enable_magnifier(bool enabled);
static scl_nui_key_click_event_cb g_key_click_event_cb = NULL;
static scl_nui_drag_state_changed_cb g_drag_state_changed_cb = NULL;
+static scl_nui_event_notification_cb g_event_notification_cb = NULL;
static scl_nui_update_window_position_cb g_update_window_position_cb = NULL;
static void *g_update_window_position_cb_data = NULL;
}
}
-void CUIGraphicsBackendCallback::on_draw_rectangle(int pos_x, int pos_y, int width, int height, bool fill, int fill_color_r, int fill_color_g, int fill_color_b, int fill_color_a, void* user_data)
+void CUIGraphicsBackendCallback::on_draw_rectangle(int pos_x, int pos_y, int width, int height, bool fill, int fill_color_r, int fill_color_g, int fill_color_b, int fill_color_a, SCLWindowType type, void* user_data)
{
LOGD("draw rectangle : %p", g_draw_rectangle_cb);
if (g_draw_rectangle_cb) {
g_draw_rectangle_cb(pos_x, pos_y, width, height,
- fill, fill_color_r, fill_color_g, fill_color_b, fill_color_a, user_data);
+ fill, fill_color_r, fill_color_g, fill_color_b, fill_color_a, type, user_data);
}
}
SCLEventReturnType CUIEventCallback::on_event_notification(SCLUINotiType noti_type, SclNotiDesc *etc_info)
{
LOGI("");
- return SCL_EVENT_PASS_ON;
+ int ret = 0;
+ if (g_event_notification_cb) {
+ ret = g_event_notification_cb(noti_type, etc_info);
+ }
+
+ return (SCLEventReturnType)ret;
}
SCLEventReturnType CUIEventCallback::on_event_drag_state_changed(SclUIEventDesc event_desc)
return 0;
}
+EXPORT_API int scl_nui_set_event_notification_cb(scl_nui_event_notification_cb callback)
+{
+ g_event_notification_cb = callback;
+
+ return 0;
+}
+
EXPORT_API int scl_nui_set_update_window_position_cb(scl_nui_update_window_position_cb callback, void *user_data)
{
g_update_window_position_cb = callback;
if (windows) {
if (context && context->get_magnifier_enabled())
windows->update_window(window, coordinate->x, coordinate->y, coordinate->width, coordinate->height, WINDOW_MAGNIFIER);
- else
- windows->update_window(window, coordinate->x, coordinate->y, coordinate->width, coordinate->height, WINDOW_KEYPAD);
+
+ windows->update_window(window, coordinate->x, coordinate->y, coordinate->width, coordinate->height, WINDOW_KEYPAD);
}
#endif
}
}
/* Handles signals to manage contexts mainly focusing on resetting variables and cleaning up states */
-void CSCLController::handle_engine_signal(SclInternalSignal signal, sclwindow targetWindow )
+void CSCLController::handle_engine_signal(SclInternalSignal signal, sclwindow targetWindow, SCLWindowType type)
{
SCL_DEBUG();
case SIGACTION_RECOMPUTE_LAYOUT: {
if (targetWindow != SCLWINDOW_INVALID) {
if (cache)
- cache->recompute_layout(targetWindow);
+ cache->recompute_layout(targetWindow, type);
}
}
break;
sclboolean check_farthest, scltouchdevice touch_id, sclbyte extra_option);
public:
- void handle_engine_signal(SclInternalSignal signal, sclwindow skip_window = SCLWINDOW_INVALID);
+ void handle_engine_signal(SclInternalSignal signal, sclwindow skip_window = SCLWINDOW_INVALID, SCLWindowType type = WINDOW_KEYPAD);
sclboolean process_input_mode_change(const sclbyte mode);
sclboolean process_rotation_change(const SCLRotation rotation);
*/
scldrawing
CSCLGraphicsImplNui::draw_rectangle(sclwindow window, const scldrawctx draw_ctx, scldouble pos_x, scldouble pos_y,
- scldouble width, scldouble height, const scldouble line_width, const SclColor& line_color, sclboolean fill, const SclColor& fill_color, scldouble radius, sclfloat alpha)
+ scldouble width, scldouble height, const scldouble line_width, const SclColor& line_color, sclboolean fill, const SclColor& fill_color, scldouble radius, sclfloat alpha, SCLWindowType type)
{
SCL_DEBUG();
if (m_backend_callback) {
LOGI("call draw rectangle callback");
SCL_DEBUG_ELAPSED_TIME_START();
- m_backend_callback->on_draw_rectangle(pos_x, pos_y, width, height, fill, fill_color.r, fill_color.g, fill_color.b, fill_color.a, m_backend_callback_data);
+ m_backend_callback->on_draw_rectangle(pos_x, pos_y, width, height, fill, fill_color.r, fill_color.g, fill_color.b, fill_color.a, type, m_backend_callback_data);
SCL_DEBUG_ELAPSED_TIME_END();
}
else {
scldrawing draw_rectangle(sclwindow window, const scldrawctx draw_ctx, scldouble pos_x, scldouble pos_y,
scldouble width, scldouble height, const scldouble line_width, const SclColor& line_color,
- sclboolean fill, const SclColor& fill_color, scldouble radius, sclfloat alpha);
+ sclboolean fill, const SclColor& fill_color, scldouble radius, sclfloat alpha, SCLWindowType type);
scldrawctx begin_paint(const sclwindow window, const sclboolean force_draw = FALSE);
void end_paint(const sclwindow window, scldrawctx draw_ctx);
SclSize get_image_size(sclchar* image_path);
virtual void destroy_font(sclfont font) = 0;
virtual scldrawing draw_rectangle(sclwindow window, const scldrawctx draw_ctx, scldouble pos_x, scldouble pos_y,
scldouble width, scldouble height, const scldouble line_width, const SclColor& line_color,
- sclboolean fill, const SclColor& fill_color, scldouble radius, sclfloat alpha) = 0;
+ sclboolean fill, const SclColor& fill_color, scldouble radius, sclfloat alpha, SCLWindowType type) = 0;
virtual SclSize get_image_size(sclchar* image_path) = 0;
virtual SclSize get_text_size(const SclFontInfo &fontinfo, const sclchar *str) = 0;
virtual void register_atspi_object(sclwindow window, scldrawing drawing, const sclchar* name) = 0;
scldrawing draw_rectangle(sclwindow window, const scldrawctx draw_ctx, scldouble pos_x, scldouble pos_y,
scldouble width, scldouble height, const scldouble line_width, const SclColor& line_color,
- sclboolean fill, const SclColor& fill_color, scldouble radius = 0, sclfloat alpha = 1.0) {
- return get_scl_graphics_impl()->draw_rectangle(window, draw_ctx, pos_x, pos_y, width, height, line_width, line_color, fill, fill_color, radius, alpha);
+ sclboolean fill, const SclColor& fill_color, scldouble radius = 0, sclfloat alpha = 1.0, SCLWindowType type = WINDOW_KEYPAD) {
+ return get_scl_graphics_impl()->draw_rectangle(window, draw_ctx, pos_x, pos_y, width, height, line_width, line_color, fill, fill_color, radius, alpha, type);
}
SclSize get_image_size(sclchar* image_path) {
virtual void on_draw_image(const char *image_path, int dest_x, int dest_y, int dest_weight, int dest_height, int src_x, int src_y, int src_width, int src_height, SCLWindowType type, void* user_data) { }
- virtual void on_draw_rectangle(int pos_x, int pos_y, int width, int height, bool fill, int fill_color_r, int fill_color_g, int fill_color_b, int fill_color_a, void* user_data) { }
+ virtual void on_draw_rectangle(int pos_x, int pos_y, int width, int height, bool fill, int fill_color_r, int fill_color_g, int fill_color_b, int fill_color_a, SCLWindowType type, void* user_data) { }
//virtual void update_window(int x, int w, int width, int height, void* user_data) { }
* This func will be called when a newly window is created
*/
sclboolean
-CSCLResourceCache::recompute_layout(sclwindow window)
+CSCLResourceCache::recompute_layout(sclwindow window, SCLWindowType type)
{
SCL_DEBUG();
/* EFL testing */
if (window) {
- windows->update_window(window);
+ windows->update_window(window, 0, 0, 0, 0, type);
}
}
}
static CSCLResourceCache* get_instance();
sclboolean init();
- sclboolean recompute_layout(sclwindow window);
+ sclboolean recompute_layout(sclwindow window, SCLWindowType type = WINDOW_KEYPAD);
const SclLayout* get_cur_layout(sclwindow window) const;
SclLayoutKeyCoordinate* get_cur_layout_key_coordinate(sclwindow window, sclbyte key_index);
size.width = dim_window_context->geometry.width;
size.height = dim_window_context->geometry.height;
color = default_configure->dim_color;
- draw_window_bg_by_sw(window, draw_ctx, size, 0.0, color, color);
+ draw_window_bg_by_sw(window, draw_ctx, size, 0.0, color, color, type);
/*sclchar composed_path[_POSIX_PATH_MAX] = {0,};
const SclLayout* layout = cache->get_cur_layout(windows->get_base_window());
m_utils->get_composed_path(composed_path, layout->image_path[BUTTON_STATE_NORMAL]);
SclSize size;
size.width = window_context->geometry.width;
size.height = window_context->geometry.height;
- draw_window_bg_by_sw(window, draw_ctx, size, layout->bg_line_width, layout->bg_line_color, layout->bg_color);
+ draw_window_bg_by_sw(window, draw_ctx, size, layout->bg_line_width, layout->bg_line_color, layout->bg_color, type);
}
} else if (layout->image_path[BUTTON_STATE_NORMAL]) {
sclint targetx = 0;
graphics->draw_image(targetwin, draw_ctx, composed_path, NULL,
targetx, targety, layout->width, layout->height,
window_context->layout_image_offset.x, window_context->layout_image_offset.y,
- -1, -1, layout->extract_background);
+ -1, -1, layout->extract_background, type);
}
}
}
}
- draw_button_all(window, draw_ctx, x, y, width, height);
+ draw_button_all(window, draw_ctx, x, y, width, height, type);
//if (highlight_ui_enabled)
if (focus_handler->get_current_focus_window() == window) {
if (coordinate) {
// Draw highlight
graphics->draw_image(window, draw_ctx, composed_path, NULL,
- startx + coordinate->x, starty + coordinate->y, coordinate->width, coordinate->height);
+ startx + coordinate->x, starty + coordinate->y, coordinate->width, coordinate->height, 0, 0, -1, -1, FALSE, type);
}
}
}
* Draws all of buttons
*/
sclboolean
-CSCLUIBuilder::draw_button_all(const sclwindow window, const scldrawctx draw_ctx, const scl16 x /* = 0 */, const scl16 y /* = 0 */, const scl16 width /* = 0 */, const scl16 height /* = 0 */)
+CSCLUIBuilder::draw_button_all(const sclwindow window, const scldrawctx draw_ctx, const scl16 x /* = 0 */, const scl16 y /* = 0 */, const scl16 width /* = 0 */, const scl16 height /* = 0 */, const SCLWindowType type)
{
SCL_DEBUG();
scl_assert_return_false(window);
if (button_context->toggled) {
state = BUTTON_STATE_TOGGLED;
}
- if (!draw_button(window, draw_ctx, idx, state)) {
+ if (!draw_button(window, draw_ctx, idx, state, FALSE, type)) {
break;
}
}
* @remark draw_button_all
*/
sclboolean
-CSCLUIBuilder::draw_button(const sclwindow window, scldrawctx draw_ctx, const scl16 key_index, const SCLButtonState state, const sclboolean force_draw_bg /* = FALSE */)
+CSCLUIBuilder::draw_button(const sclwindow window, scldrawctx draw_ctx, const scl16 key_index, const SCLButtonState state, const sclboolean force_draw_bg /* = FALSE */, const SCLWindowType type)
{
SCL_DEBUG();
scl_assert_return_false(window);
scldrawing background = NULL;
if (layout->use_sw_button) {
/* case 1 (uses Software button) */
- background = draw_button_bg_by_sw(window, draw_ctx, key_index, state);
+ background = draw_button_bg_by_sw(window, draw_ctx, key_index, state, type);
} else {
/* check it whether uses an individual images */
if (coordinate->bg_image_path[shift_index][state]) {
if (strcmp(coordinate->bg_image_path[shift_index][state], SCL_BACKGROUND_IMAGE_STRING) != 0) {
/* case 2 (uses an individual image) */
- background = draw_button_bg_by_img(window, draw_ctx, key_index, state, shift_index);
+ background = draw_button_bg_by_img(window, draw_ctx, key_index, state, shift_index, type);
} else {
/* case 3 (uses the layout background image) */
- background = draw_button_bg_by_layoutimg(window, draw_ctx, key_index, state, shift_index);
+ background = draw_button_bg_by_layoutimg(window, draw_ctx, key_index, state, shift_index, type);
}
} else if (force_draw_bg) {
- background = draw_button_bg_by_layoutimg(window, draw_ctx, key_index, state, shift_index);
+ background = draw_button_bg_by_layoutimg(window, draw_ctx, key_index, state, shift_index, type);
}
/* case 4 (don't draw anything for button's background if image_path is NULL) */
}
/* 2. displaying the label of the button */
- draw_button_label(window, draw_ctx, key_index, state, shift_index);
+ draw_button_label(window, draw_ctx, key_index, state, shift_index, type);
/* 3. register button as atspi object */
const sclchar * text = get_button_text_to_read(window, key_index, shift_index);
graphics->register_atspi_object(window, background, text);
* @remark draw_button
*/
sclboolean
-CSCLUIBuilder::draw_button_label(const sclwindow window, const scldrawctx draw_ctx, const scl16 key_index, SCLButtonState state, SCLShiftState shift)
+CSCLUIBuilder::draw_button_label(const sclwindow window, const scldrawctx draw_ctx, const scl16 key_index, SCLButtonState state, SCLShiftState shift, const SCLWindowType type)
{
SCL_DEBUG();
pos.x + targetaddx,
pos.y + targetaddy,
imgSize.width,
- imgSize.height);
+ imgSize.height,
+ 0, 0, -1, -1, FALSE, type);
}
}
labelproperties->padding_x * utils->get_custom_scale_rate_x(),
labelproperties->padding_y * utils->get_custom_scale_rate_y(),
labelproperties->inner_width * utils->get_custom_scale_rate_x(),
- labelproperties->inner_height * utils->get_custom_scale_rate_y());
+ labelproperties->inner_height * utils->get_custom_scale_rate_y(),
+ type);
}
graphics->draw_text(
targetwin,
labelproperties->padding_x * utils->get_custom_scale_rate_x(),
labelproperties->padding_y * utils->get_custom_scale_rate_y(),
labelproperties->inner_width * utils->get_custom_scale_rate_x(),
- labelproperties->inner_height * utils->get_custom_scale_rate_y());
+ labelproperties->inner_height * utils->get_custom_scale_rate_y(),
+ type);
}
}
}
*/
sclboolean
CSCLUIBuilder::draw_window_bg_by_sw(const sclwindow window, const scldrawctx draw_ctx, const SclSize size,
- const scldouble line_width, const SclColor line_color, const SclColor fill_color)
+ const scldouble line_width, const SclColor line_color, const SclColor fill_color, const SCLWindowType type)
{
SCL_DEBUG();
scl_assert_return_false(window);
graphics->draw_rectangle(targetwin, draw_ctx,
cache->get_custom_starting_coordinates().x, cache->get_custom_starting_coordinates().y,
- size.width, size.height, line_width, line_color, TRUE, fill_color);
+ size.width, size.height, line_width, line_color, TRUE, fill_color, 0.0, 1.0f, type);
}
return TRUE;
* @remark draw_button
*/
scldrawing
-CSCLUIBuilder::draw_button_bg_by_sw(const sclwindow window, const scldrawctx draw_ctx, const scl16 key_index, const SCLButtonState state)
+CSCLUIBuilder::draw_button_bg_by_sw(const sclwindow window, const scldrawctx draw_ctx, const scl16 key_index, const SCLButtonState state, const SCLWindowType type)
{
//SCL_DEBUG();
* @remark draw_button
*/
scldrawing
-CSCLUIBuilder::draw_button_bg_by_img(const sclwindow window, const scldrawctx draw_ctx, scl16 key_index, SCLButtonState state, SCLShiftState shift)
+CSCLUIBuilder::draw_button_bg_by_img(const sclwindow window, const scldrawctx draw_ctx, scl16 key_index, SCLButtonState state, SCLShiftState shift, const SCLWindowType type)
{
SCL_DEBUG();
(sclint)targetx,
(sclint)targety,
(sclint)coordinate->width,
- (sclint)coordinate->height);
+ (sclint)coordinate->height,
+ 0, 0, -1, -1, FALSE, type);
//}
}
* @remark draw_button
*/
scldrawing
-CSCLUIBuilder::draw_button_bg_by_layoutimg(const sclwindow window, const scldrawctx draw_ctx, const scl16 key_index, const SCLButtonState state, const sclboolean shift)
+CSCLUIBuilder::draw_button_bg_by_layoutimg(const sclwindow window, const scldrawctx draw_ctx, const scl16 key_index, const SCLButtonState state, const sclboolean shift, const SCLWindowType type)
{
SCL_DEBUG();
window_context->layout_image_offset.y + (sclint)coordinate->y,
(sclint)coordinate->width,
(sclint)coordinate->height,
- TRUE);
+ TRUE,
+ type);
//}
}
return NULL;
void init(sclwindow parent);
sclboolean show_layout(const sclwindow window, const scl16 x = 0, const scl16 y = 0, const scl16 width = 0, const scl16 height = 0, const SCLWindowType type = WINDOW_KEYPAD);
- sclboolean draw_button(const sclwindow window, scldrawctx draw_ctx, const scl16 key_index, const SCLButtonState state, const sclboolean force_draw_bg = FALSE);
+ sclboolean draw_button(const sclwindow window, scldrawctx draw_ctx, const scl16 key_index, const SCLButtonState state, const sclboolean force_draw_bg = FALSE, const SCLWindowType type = WINDOW_KEYPAD);
sclboolean show_magnifier(const sclwindow window, scldrawctx draw_ctx);
sclboolean show_autopopup(const sclwindow parent, scldrawctx draw_ctx, const scl16 key_index);
void set_window_backend_callback(ISCLUIWindowBackendCallback *callback, void *data);
private:
- sclboolean draw_button_all(const sclwindow window, const scldrawctx draw_ctx, const scl16 x, const scl16 y, const scl16 width, const scl16 height);
- scldrawing draw_button_bg_by_sw(const sclwindow window, const scldrawctx draw_ctx, const scl16 key_index, const SCLButtonState state);
+ sclboolean draw_button_all(const sclwindow window, const scldrawctx draw_ctx, const scl16 x, const scl16 y, const scl16 width, const scl16 height, const SCLWindowType type);
+ scldrawing draw_button_bg_by_sw(const sclwindow window, const scldrawctx draw_ctx, const scl16 key_index, const SCLButtonState state, const SCLWindowType type);
sclboolean draw_window_bg_by_sw(const sclwindow window, const scldrawctx draw_ctx, const SclSize size,
- const scldouble line_width, const SclColor line_color, const SclColor fill_color);
+ const scldouble line_width, const SclColor line_color, const SclColor fill_color, const SCLWindowType type);
scldrawing draw_button_bg_by_img(const sclwindow window, const scldrawctx draw_ctx, const scl16 key_index,
- SCLButtonState state, SCLShiftState shift);
+ SCLButtonState state, SCLShiftState shift, const SCLWindowType type);
scldrawing draw_button_bg_by_layoutimg(const sclwindow window, const scldrawctx draw_ctx, const scl16 key_index,
- const SCLButtonState state, const sclboolean shift);
+ const SCLButtonState state, const sclboolean shift, const SCLWindowType type);
sclboolean draw_button_label(const sclwindow window, const scldrawctx draw_ctx, const scl16 key_index,
- SCLButtonState state, SCLShiftState shift);
+ SCLButtonState state, SCLShiftState shift, const SCLWindowType type);
sclboolean draw_magnifier_label(const sclwindow window, const scldrawctx draw_ctx, const scl16 label_index, const sclchar* label);
Evas_Object *win = NULL;
CSCLUtils *utils = CSCLUtils::get_instance();
- win = elm_win_add(static_cast<Evas_Object*>(parent), "SCLPopup", ELM_WIN_UTILITY);
-
- elm_win_borderless_set(win, EINA_TRUE);
- elm_win_alpha_set(win, EINA_TRUE);
- elm_win_title_set(win, "ISF Popup");
-
- set_window_accepts_focus(win, FALSE);
-
- int rots[4] = {0, 90, 180, 270};
- elm_win_wm_rotation_available_rotations_set(win, rots, 4);
-
- scl16 new_width = 0;
- scl16 new_height = 0;
- CSCLContext *context = CSCLContext::get_instance();
- if (context) {
- if (context->get_rotation() == ROTATION_90_CW || context->get_rotation() == ROTATION_90_CCW) {
- new_width = height;
- new_height = width;
- } else {
- new_width = width;
- new_height = height;
- }
- }
-
-#ifndef FULL_SCREEN_TEST
- //evas_object_resize(win, width, height);
-#endif
-
-#ifdef WAYLAND
- Ecore_Wl2_Window *wl_window = (Ecore_Wl2_Window *)(elm_win_wl_window_get(win));
- ecore_wl2_window_rotation_geometry_set(wl_window,
- rotation_values_EFL[ROTATION_0], 0, 0, new_width, new_height);
- ecore_wl2_window_rotation_geometry_set(wl_window,
- rotation_values_EFL[ROTATION_90_CW], 0, 0, new_width, new_height);
- ecore_wl2_window_rotation_geometry_set(wl_window,
- rotation_values_EFL[ROTATION_180], 0, 0, new_width, new_height);
- ecore_wl2_window_rotation_geometry_set(wl_window,
- rotation_values_EFL[ROTATION_90_CCW], 0, 0, new_width, new_height);
-#else
- /*
- ecore_x_e_window_rotation_geometry_set(elm_win_xwindow_get(win),
- rotation_values_EFL[ROTATION_0], 0, 0, new_width, new_height);
- ecore_x_e_window_rotation_geometry_set(elm_win_xwindow_get(win),
- rotation_values_EFL[ROTATION_90_CW], 0, 0, new_width, new_height);
- ecore_x_e_window_rotation_geometry_set(elm_win_xwindow_get(win),
- rotation_values_EFL[ROTATION_180], 0, 0, new_width, new_height);
- ecore_x_e_window_rotation_geometry_set(elm_win_xwindow_get(win),
- rotation_values_EFL[ROTATION_90_CCW], 0, 0, new_width, new_height);
- */
- ecore_x_icccm_name_class_set(elm_win_xwindow_get(static_cast<Evas_Object*>(win)), "ISF Popup", "ISF");
-
- Ecore_X_Atom ATOM_WINDOW_EFFECT_ENABLE = 0;
- unsigned int effect_state = 0; // 0 -> disable effect 1-> enable effect
-
- ATOM_WINDOW_EFFECT_ENABLE = ecore_x_atom_get("_NET_CM_WINDOW_EFFECT_ENABLE");
- if (ATOM_WINDOW_EFFECT_ENABLE) {
- ecore_x_window_prop_card32_set(elm_win_xwindow_get(static_cast<Evas_Object*>(win)), ATOM_WINDOW_EFFECT_ENABLE, &effect_state, 1);
- } else {
- if (utils) {
- utils->log("Could not get _NET_CM_WINDOW_EFFECT_ENABLE ATOM \n");
- }
- }
-#endif
-
- if (context)
- set_window_rotation(win, context->get_rotation());
-
//elm_win_override_set(win, EINA_TRUE);
if (utils) {
utils->log("WinNui_createwin %p, %d %d\n",
Evas_Object *win = NULL;
CSCLUtils *utils = CSCLUtils::get_instance();
- win = elm_win_add(static_cast<Evas_Object*>(parent), "SCLPopup", ELM_WIN_UTILITY);
-
- elm_win_borderless_set(win, EINA_TRUE);
- elm_win_alpha_set(win, EINA_TRUE);
- elm_win_title_set(win, "ISF Dim");
-
- evas_object_resize(win, width, height);
-
- int rots[4] = {0, 90, 180, 270};
- elm_win_wm_rotation_available_rotations_set(win, rots, 4);
-
- set_window_accepts_focus(win, FALSE);
-
-#ifndef WAYLAND
- ecore_x_icccm_name_class_set(elm_win_xwindow_get(static_cast<Evas_Object*>(win)), "ISF Popup", "ISF");
-
- Ecore_X_Atom ATOM_WINDOW_EFFECT_ENABLE = 0;
- unsigned int effect_state = 0; // 0 -> disable effect 1-> enable effect
-
- ATOM_WINDOW_EFFECT_ENABLE = ecore_x_atom_get("_NET_CM_WINDOW_EFFECT_ENABLE");
- if (ATOM_WINDOW_EFFECT_ENABLE) {
- ecore_x_window_prop_card32_set(elm_win_xwindow_get(static_cast<Evas_Object*>(win)), ATOM_WINDOW_EFFECT_ENABLE, &effect_state, 1);
- } else {
- if (utils) {
- utils->log("Could not get _NET_CM_WINDOW_EFFECT_ENABLE ATOM \n");
- }
- }
-#endif
-
- CSCLContext *context = CSCLContext::get_instance();
- if (context)
- set_window_rotation(win, context->get_rotation());
-
- hide_window(win);
if (utils) {
utils->log("WinNui_createdimwin %p, %d %d\n",
* Shows the given window
*/
void
-CSCLWindowsImplNui::show_window(const sclwindow window, sclboolean queue)
+CSCLWindowsImplNui::show_window(const sclwindow window, sclboolean queue, SCLWindowType type)
{
SCL_DEBUG();
CSCLWindows *windows = CSCLWindows::get_instance();
}
if (!(windows->get_update_pending())) {
- update_window(window);
+ update_window(window, 0, 0, 0, 0, type);
}
}
}
{
SCL_DEBUG();
- if (m_window_backend_callback) {
+ if (m_window_backend_callback && type == WINDOW_KEYPAD) {
LOGI("call update_window. x(%d), y(%d), w(%d), h(%d)", x, y, width, height);
m_window_backend_callback->update_window(x, y, width, height, m_window_backend_callback_data);
}
sclwindow create_magnifier_window(const sclwindow parent, SclWindowContext *window_context, scl16 width, scl16 height);
sclwindow create_dim_window(const sclwindow parent, SclWindowContext *window_context, scl16 width, scl16 height);
bool destroy_window(sclwindow window);
- void show_window(const sclwindow window, sclboolean queue);
+ void show_window(const sclwindow window, sclboolean queue, SCLWindowType type = WINDOW_KEYPAD);
void hide_window(const sclwindow window, sclboolean fForce = FALSE);
void move_window(const sclwindow window, scl16 x, scl16 y, SCLWindowType type = WINDOW_KEYPAD);
void resize_window(const sclwindow window, scl16 width, scl16 height);
window, geometry.x, geometry.y, geometry.width, geometry.height, layout, popup_type);
events->connect_window_events(window, SCL_EVENT_MOUSE | SCL_EVENT_EXPOSE);
- controller->handle_engine_signal(SCL_SIG_POPUP_SHOW, window);
+ controller->handle_engine_signal(SCL_SIG_POPUP_SHOW, window, WINDOW_POPUP);
/* Shows the dim window if it uses the dim_window */
if (use_dim_window) {
set_parent(dim_window, window);
}
}
- show_window(dim_window);
+ show_window(dim_window, FALSE, WINDOW_DIM);
} else {
/*If we use transient_for them the ISE will occur some crash. It needs to check X11*/
set_parent(opener.window, window);
}
- show_window(window);
+ show_window(window, FALSE, WINDOW_POPUP);
push_window_in_Z_order_list(window);
}*/
if (windows && coordinate)
- windows->update_window(window, coordinate->x, coordinate->y, coordinate->width, coordinate->height);
+ windows->update_window(window, coordinate->x, coordinate->y, coordinate->width, coordinate->height, WINDOW_POPUP);
}
}
}
void
-CSCLWindows::show_window(const sclwindow window, sclboolean queue /*= FALSE*/)
+CSCLWindows::show_window(const sclwindow window, sclboolean queue /*= FALSE*/, SCLWindowType type)
{
SCL_DEBUG();
CSCLWindowsImpl* impl = get_scl_windows_impl();
if (impl) {
- impl->show_window(window, queue);
+ impl->show_window(window, queue, type);
}
}
LOGD("startx: %d, starty: %d", startx, starty);
LOGD("coordinate x(%d), y(%d), w(%d), h(%d)", coordinate->x, coordinate->y, coordinate->width, coordinate->height);
- impl->update_window(window, startx + coordinate->x, starty + coordinate->y, coordinate->width, coordinate->height);
+ impl->update_window(window, startx + coordinate->x, starty + coordinate->y, coordinate->width, coordinate->height, type);
}
}
}
SclWindowContext *window_context, scl16 width, scl16 height) = 0;
virtual bool destroy_window(sclwindow window) = 0;
virtual void set_parent(const sclwindow parent, const sclwindow window) = 0;
- virtual void show_window(const sclwindow window, sclboolean queue) = 0;
+ virtual void show_window(const sclwindow window, sclboolean queue, SCLWindowType type = WINDOW_KEYPAD) = 0;
virtual void set_window_rotation(const sclwindow window, SCLRotation rotation) = 0;
virtual void hide_window(const sclwindow window, sclboolean force = FALSE) = 0;
virtual void move_window(const sclwindow window, scl16 x, scl16 y, SCLWindowType type = WINDOW_KEYPAD) = 0;
sclwindow create_base_window(const sclwindow parent, scl16 width, scl16 height);
- void show_window(const sclwindow window, sclboolean queue = FALSE);
+ void show_window(const sclwindow window, sclboolean queue = FALSE, SCLWindowType type = WINDOW_KEYPAD);
void hide_window(const sclwindow window, sclboolean force = FALSE);
void set_parent(const sclwindow parent, const sclwindow window);
void set_keep_above(const sclwindow window, sclboolean keep_above);