Supports dim and popup windows 15/262115/1
authorInHong Han <inhong1.han@samsung.com>
Thu, 8 Jul 2021 05:20:43 +0000 (14:20 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Tue, 3 Aug 2021 02:57:58 +0000 (11:57 +0900)
Change-Id: I2fbef3a74cbbac70cb8f6897137432b4ebcf1891

17 files changed:
capi/include/cscl-ui-graphics-backend.h
capi/include/cscl-ui-nui.h
capi/src/cscl-ui-nui.cpp
scl/sclcontroller.cpp
scl/sclcontroller.h
scl/sclgraphics-nui.cpp
scl/sclgraphics-nui.h
scl/sclgraphics.h
scl/sclgraphicsbackendcallback.h
scl/sclresourcecache.cpp
scl/sclresourcecache.h
scl/scluibuilder.cpp
scl/scluibuilder.h
scl/sclwindows-nui.cpp
scl/sclwindows-nui.h
scl/sclwindows.cpp
scl/sclwindows.h

index 1270717ddef6a318babc9329b99833f583819948..772da8c30bbec0a733373b63b693e5e64f33b278 100644 (file)
@@ -27,7 +27,7 @@ public :
 
     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__ */
index 4f73a710ce67d65f5b076ec22a434d7c4ac5414b..b02c13ef36c1738d82726962e54cd0712b367775 100644 (file)
@@ -57,12 +57,13 @@ typedef void (*scl_nui_draw_text_cb)(const char *font_name, short font_size, boo
                                      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);
@@ -84,6 +85,7 @@ int scl_nui_set_update_window_cb(scl_nui_update_window_cb callback, void *user_d
 
 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);
index 603222a77270ed7cb81177ebeb168081ef756bf7..ab5ef7871c221c028b4878e43370f95ecd4bd31c 100644 (file)
@@ -52,6 +52,7 @@ static void *g_update_window_cb_data = NULL;
 
 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;
@@ -96,12 +97,12 @@ void CUIGraphicsBackendCallback::on_draw_image(const char *image_path, int dest_
     }
 }
 
-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);
     }
 }
 
@@ -127,7 +128,12 @@ SCLEventReturnType CUIEventCallback::on_event_key_clicked(SclUIEventDesc event_d
 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)
@@ -324,6 +330,13 @@ EXPORT_API int scl_nui_set_drag_state_changed_cb(scl_nui_drag_state_changed_cb c
     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;
index eb4b20ef0a497b94b31863dd3916831f8628c155..0ad9805a0d224bf6c22c178c0ea697fd4ff5468a 100644 (file)
@@ -786,8 +786,8 @@ CSCLController::process_button_pressed_event(sclwindow window, sclint x, sclint
             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
         }
@@ -3718,7 +3718,7 @@ CSCLController::timer_event(const scl32 data)
 }
 
 /* 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();
 
@@ -3812,7 +3812,7 @@ void CSCLController::handle_engine_signal(SclInternalSignal signal, sclwindow ta
             case SIGACTION_RECOMPUTE_LAYOUT: {
                 if (targetWindow != SCLWINDOW_INVALID) {
                     if (cache)
-                        cache->recompute_layout(targetWindow);
+                        cache->recompute_layout(targetWindow, type);
                 }
             }
             break;
index cbb2eba43df57f6ed724286f621483a7f5bfaf90..cc2d2540270c50d1d2e3970f585d6b90a8851444 100644 (file)
@@ -81,7 +81,7 @@ private:
         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);
 
index cfb506273befebd4bca50e238570e9a39654b6ef..a45c01d63e33303cfee3e86c73b809dbc9052645 100644 (file)
@@ -914,7 +914,7 @@ CSCLGraphicsImplNui::draw_text(sclwindow window, const scldrawctx draw_ctx, cons
  */
 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();
 
@@ -924,7 +924,7 @@ CSCLGraphicsImplNui::draw_rectangle(sclwindow window, const scldrawctx draw_ctx,
     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 {
index bf3ee81d4b60f2b0d4c080b516dd25507e6385f9..1e8dc0a64870f09d8c5b383401670a245f69b6ed 100644 (file)
@@ -101,7 +101,7 @@ public :
 
     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);
index a010a5d34cc6689fda7ff6dee527e2e4763bb8b3..c380450839c0df799840fa3cfcdbabf062dcd686 100644 (file)
@@ -79,7 +79,7 @@ private:
     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;
@@ -124,8 +124,8 @@ public :
 
     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) {
index 1bed3ebdc4b0d2f6de0932c83e03877bb2366572..8cbf4ca7e497d5ca461a562aa3c12c4931fd68c3 100644 (file)
@@ -41,7 +41,7 @@ struct ISCLUIGraphicsBackendCallback {
 
     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) { }
 
index 21b49ea5a997ac7de6e8820b24befd6cf4db5486..94d5c6544f53733b92d23cdd46cbbd3f10c2206d 100644 (file)
@@ -902,7 +902,7 @@ CSCLResourceCache::clear_private_keys()
  * 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();
 
@@ -1105,7 +1105,7 @@ CSCLResourceCache::recompute_layout(sclwindow window)
 
             /* EFL testing */
             if (window) {
-                windows->update_window(window);
+                windows->update_window(window, 0, 0, 0, 0, type);
             }
         }
     }
index df1af1afd38cf257b1f73e5c4f128c1abb678fd7..bbcb3e868735cc601ebe3d14639184c569a29bf5 100644 (file)
@@ -50,7 +50,7 @@ public:
     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);
index aaaa90ecb6ee0edd5437477577fa77ed0bb63bc0..2a09b874164738926dd16b5f8d63bc4201f69594 100644 (file)
@@ -201,7 +201,7 @@ CSCLUIBuilder::show_layout(const sclwindow window, const scl16 x, const scl16 y,
                 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]);
@@ -222,7 +222,7 @@ CSCLUIBuilder::show_layout(const sclwindow window, const scl16 x, const scl16 y,
                         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;
@@ -261,12 +261,12 @@ CSCLUIBuilder::show_layout(const sclwindow window, const scl16 x, const scl16 y,
                                 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) {
@@ -305,7 +305,7 @@ CSCLUIBuilder::show_layout(const sclwindow window, const scl16 x, const scl16 y,
                         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);
                         }
                     }
                 }
@@ -321,7 +321,7 @@ CSCLUIBuilder::show_layout(const sclwindow window, const scl16 x, const scl16 y,
  * 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);
@@ -356,7 +356,7 @@ CSCLUIBuilder::draw_button_all(const sclwindow window, const scldrawctx draw_ctx
                         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;
                         }
                     }
@@ -401,7 +401,7 @@ CSCLUIBuilder::get_button_text_to_read(const sclwindow window, const scl16 key_i
  * @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);
@@ -442,25 +442,25 @@ CSCLUIBuilder::draw_button(const sclwindow window, scldrawctx draw_ctx, const sc
                     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);
@@ -483,7 +483,7 @@ CSCLUIBuilder::draw_button(const sclwindow window, scldrawctx draw_ctx, const sc
  * @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();
 
@@ -592,7 +592,8 @@ CSCLUIBuilder::draw_button_label(const sclwindow window, const scldrawctx draw_c
                     pos.x + targetaddx,
                     pos.y + targetaddy,
                     imgSize.width,
-                    imgSize.height);
+                    imgSize.height,
+                    0, 0, -1, -1, FALSE, type);
             }
         }
 
@@ -664,7 +665,8 @@ CSCLUIBuilder::draw_button_label(const sclwindow window, const scldrawctx draw_c
                             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,
@@ -681,7 +683,8 @@ CSCLUIBuilder::draw_button_label(const sclwindow window, const scldrawctx draw_c
                         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);
                 }
             }
         }
@@ -696,7 +699,7 @@ CSCLUIBuilder::draw_button_label(const sclwindow window, const scldrawctx draw_c
 */
 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);
@@ -719,7 +722,7 @@ CSCLUIBuilder::draw_window_bg_by_sw(const sclwindow window, const scldrawctx dra
 
         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;
@@ -730,7 +733,7 @@ CSCLUIBuilder::draw_window_bg_by_sw(const sclwindow window, const scldrawctx dra
  * @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();
 
@@ -784,7 +787,7 @@ CSCLUIBuilder::draw_button_bg_by_sw(const sclwindow window, const scldrawctx dra
  * @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();
 
@@ -886,7 +889,8 @@ CSCLUIBuilder::draw_button_bg_by_img(const sclwindow window, const scldrawctx dr
                 (sclint)targetx,
                 (sclint)targety,
                 (sclint)coordinate->width,
-                (sclint)coordinate->height);
+                (sclint)coordinate->height,
+                0, 0, -1, -1, FALSE, type);
         //}
     }
 
@@ -898,7 +902,7 @@ CSCLUIBuilder::draw_button_bg_by_img(const sclwindow window, const scldrawctx dr
  * @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();
 
@@ -1001,7 +1005,8 @@ CSCLUIBuilder::draw_button_bg_by_layoutimg(const sclwindow window, const scldraw
                 window_context->layout_image_offset.y + (sclint)coordinate->y,
                 (sclint)coordinate->width,
                 (sclint)coordinate->height,
-                TRUE);
+                TRUE,
+                type);
         //}
     }
     return NULL;
index 2beff8f29d161b75e2e4b5193e97066d2551be94..54108ed3b6686f0678f69e336a8a213d944288bf 100644 (file)
@@ -49,7 +49,7 @@ public:
 
     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);
 
@@ -57,16 +57,16 @@ public:
     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);
 
index 9bb275406811c7d73c8917e3cbca3445b45d18a6..73b99bd664f3958479872104a2a30f4bc0e75b27 100644 (file)
@@ -143,73 +143,6 @@ CSCLWindowsImplNui::create_window(const sclwindow parent, SclWindowContext *wind
     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",
@@ -316,40 +249,6 @@ CSCLWindowsImplNui::create_dim_window(const sclwindow parent, SclWindowContext *
 
     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",
@@ -474,7 +373,7 @@ CSCLWindowsImplNui::destroy_window(sclwindow window)
  * 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();
@@ -489,7 +388,7 @@ CSCLWindowsImplNui::show_window(const sclwindow window, sclboolean queue)
                 }
 
                 if (!(windows->get_update_pending())) {
-                    update_window(window);
+                    update_window(window, 0, 0, 0, 0, type);
                 }
             }
         }
@@ -838,7 +737,7 @@ CSCLWindowsImplNui::update_window(const sclwindow window, scl16 x, scl16 y, scl1
 {
     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);
     }
index 897a7179bafa308f6b3d173d9787f7d484b6a723..9a38508e763936e3848f306493f74f3f1ee811ed 100644 (file)
@@ -56,7 +56,7 @@ public :
     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);
index 0d60945ecce319082d99f3359e16486e64702e7a..42b112e441dcb31fd5a527e76bf9e28d89fb32f7 100644 (file)
@@ -170,7 +170,7 @@ sclwindow CSCLWindows::open_popup(const SclWindowOpener opener, const SclRectang
             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) {
@@ -192,12 +192,12 @@ sclwindow CSCLWindows::open_popup(const SclWindowOpener opener, const SclRectang
                     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);
 
@@ -270,7 +270,7 @@ sclwindow CSCLWindows::open_popup(const SclWindowOpener opener, const SclRectang
                 }*/
 
                 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);
             }
         }
     }
@@ -958,7 +958,7 @@ void CSCLWindows::set_window_rotation(const sclwindow window, SCLRotation rotati
 
 
 void
-CSCLWindows::show_window(const sclwindow window, sclboolean queue /*= FALSE*/)
+CSCLWindows::show_window(const sclwindow window, sclboolean queue /*= FALSE*/, SCLWindowType type)
 {
     SCL_DEBUG();
 
@@ -979,7 +979,7 @@ CSCLWindows::show_window(const sclwindow window, sclboolean queue /*= FALSE*/)
 
     CSCLWindowsImpl* impl = get_scl_windows_impl();
     if (impl) {
-        impl->show_window(window, queue);
+        impl->show_window(window, queue, type);
     }
 }
 
@@ -1084,7 +1084,7 @@ CSCLWindows::update_window(const sclwindow window,
                             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);
                         }
                     }
                 }
index 5ed8880512d6c9ebf0d585961ccb563b1bd8c86e..37d1f463732bf7ed023377b2470c216ddcd2bc73 100644 (file)
@@ -86,7 +86,7 @@ public :
         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;
@@ -120,7 +120,7 @@ public :
 
     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);