remove the unused file 21/293621/1
authorSooChan Lim <sc1.lim@samsung.com>
Thu, 1 Jun 2023 05:27:26 +0000 (14:27 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Thu, 1 Jun 2023 05:49:16 +0000 (14:49 +0900)
Change-Id: Ie70df1bc51f114d517817a8b1c3d578c8406acdc

src/bin/e_dialog.c [deleted file]
src/bin/e_win.c [deleted file]
src/bin/e_win.h [deleted file]

diff --git a/src/bin/e_dialog.c b/src/bin/e_dialog.c
deleted file mode 100644 (file)
index d538f57..0000000
+++ /dev/null
@@ -1,411 +0,0 @@
-#include "e.h"
-
-/* local subsystem functions */
-//static void _e_dialog_free(E_Dialog *dia);
-//static void _e_dialog_del_func_cb(void *data, E_Dialog *dia);
-//static void _e_dialog_cb_delete(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED);
-//static void _e_dialog_cb_key_down(void *data, Evas *e, Evas_Object *obj, void *event);
-//static void _e_dialog_cb_wid_on_focus(void *data, Evas_Object *obj);
-
-/* local subsystem globals */
-
-/* externally accessible functions */
-
-static E_Dialog *
-_e_dialog_internal_new(Evas_Object *parent, const char *name, const char *class, int dialog)
-{
-   // FIXME
-#if 0
-   E_Dialog *dia;
-   Evas_Object *o;
-   Evas_Modifier_Mask mask;
-   Eina_Bool kg;
-   Evas *e;
-
-   dia = E_OBJECT_ALLOC(E_Dialog, E_DIALOG_TYPE, _e_dialog_free);
-   if (!dia) return NULL;
-   if (dialog)
-     dia->win = elm_win_add(parent, name, ELM_WIN_DIALOG_BASIC);
-   else
-     dia->win = elm_win_add(parent, name, ELM_WIN_BASIC);
-   if (!dia->win)
-     {
-        free(dia);
-        return NULL;
-     }
-   elm_win_modal_set(dia->win, !!parent);
-   e = evas_object_evas_get(dia->win);
-   evas_object_event_callback_add(dia->win, EVAS_CALLBACK_DEL, _e_dialog_cb_delete, dia);
-   ecore_evas_name_class_set(ecore_evas_ecore_evas_get(e), name, class);
-   dia->bg_object = o = elm_layout_add(dia->win);
-   E_EXPAND(o);
-   E_FILL(o);
-   elm_win_resize_object_add(dia->win, o);
-   e_theme_edje_object_set(o, "base/theme/dialog",
-                           "e/widgets/dialog/main");
-   evas_object_show(o);
-
-   //o = e_widget_list_add(evas_object_evas_get(dia->win), 1, 1);
-   //e_widget_on_focus_hook_set(o, _e_dialog_cb_wid_on_focus, dia);
-   dia->box_object = o;
-   elm_object_part_content_set(dia->bg_object, "e.swallow.buttons", o);
-   elm_layout_signal_emit(dia->bg_object, "e,state,no_resizable", "e");
-
-   o = evas_object_rectangle_add(e);
-   dia->event_object = o;
-   mask = 0;
-   kg = evas_object_key_grab(o, "Tab", mask, ~mask, 0);
-   if (!kg)
-     fprintf(stderr, "ERROR: unable to redirect \"Tab\" key events to object %p.\n", o);
-   mask = evas_key_modifier_mask_get(evas_object_evas_get(dia->win), "Shift");
-   kg = evas_object_key_grab(o, "Tab", mask, ~mask, 0);
-   if (!kg)
-     fprintf(stderr, "ERROR: unable to redirect \"Tab\" key events to object %p.\n", o);
-   mask = 0;
-   kg = evas_object_key_grab(o, "Return", mask, ~mask, 0);
-   if (!kg)
-     fprintf(stderr, "ERROR: unable to redirect \"Return\" key events to object %p.\n", o);
-   mask = 0;
-   kg = evas_object_key_grab(o, "Escape", mask, ~mask, 0);
-   if (!kg)
-     fprintf(stderr, "ERROR: unable to redirect \"Escape\" key events to object %p.\n", o);
-   mask = 0;
-   kg = evas_object_key_grab(o, "KP_Enter", mask, ~mask, 0);
-   if (!kg)
-     fprintf(stderr, "ERROR: unable to redirect \"KP_Enter\" key events to object %p.\n", o);
-
-   evas_object_event_callback_add(o, EVAS_CALLBACK_KEY_DOWN, _e_dialog_cb_key_down, dia);
-
-   return dia;
-#endif
-   return NULL;
-}
-
-E_API E_Dialog *
-e_dialog_new(Evas_Object *parent, const char *name, const char *dialog_class)
-{
-   return _e_dialog_internal_new(parent, name, dialog_class, 1);
-}
-
-E_API E_Dialog *
-e_dialog_normal_win_new(Evas_Object *parent, const char *name, const char *dialog_class)
-{
-   return _e_dialog_internal_new(parent, name, dialog_class, 0);
-}
-
-E_API void
-e_dialog_button_add(E_Dialog *dia, const char *label, const char *icon, E_Dialog_Cb func, void *data)
-{
-   // FIXME
-#if 0
-   Evas_Object *o;
-
-   if (!func) func = _e_dialog_del_func_cb;
-   //o = e_widget_button_add(evas_object_evas_get(dia->win), label, icon, (void (*)(void *, void *))func, data, dia);
-   //e_widget_list_object_append(dia->box_object, o, 1, 0, 0.5);
-   dia->buttons = eina_list_append(dia->buttons, o);
-#endif
-}
-
-E_API int
-e_dialog_button_focus_num(E_Dialog *dia, int button)
-{
-   //Evas_Object *o;
-
-   //o = eina_list_nth(dia->buttons, button);
-   //if (o) e_widget_focus_steal(o);
-   return 1;
-}
-
-E_API int
-e_dialog_button_disable_num_set(E_Dialog *dia, int button, int disabled)
-{
-   //Evas_Object *o;
-
-   //o = eina_list_nth(dia->buttons, button);
-   //if (o) e_widget_disabled_set(o, disabled);
-   return 1;
-}
-
-E_API int
-e_dialog_button_disable_num_get(E_Dialog *dia, int button)
-{
-   //Evas_Object *o;
-   int ret = 0;
-
-   //o = eina_list_nth(dia->buttons, button);
-   //if (o) ret = e_widget_disabled_get(o);
-   return ret;
-}
-
-E_API void
-e_dialog_title_set(E_Dialog *dia, const char *title)
-{
-   // FIXME
-   //elm_win_title_set(dia->win, title);
-}
-
-E_API void
-e_dialog_text_set(E_Dialog *dia, const char *text)
-{
-   // FIXME
-#if 0
-   if (!dia->text_object)
-     {
-        Evas_Object *o;
-
-        o = elm_layout_add(dia->win);
-        dia->text_object = o;
-        e_theme_edje_object_set(o, "base/theme/dialog",
-                                "e/widgets/dialog/text");
-        elm_object_part_content_set(dia->bg_object, "e.swallow.content", o);
-        evas_object_show(o);
-     }
-   elm_object_part_text_set(dia->text_object, "e.textblock.message", text);
-#endif
-}
-
-E_API void
-e_dialog_icon_set(E_Dialog *dia, const char *icon, Evas_Coord size)
-{
-   // FIXME
-#if 0
-   if (!icon)
-     {
-        if (dia->icon_object)
-          {
-             evas_object_del(dia->icon_object);
-             dia->icon_object = NULL;
-          }
-        elm_layout_signal_emit(dia->bg_object, "e,state,icon", "e");
-        elm_layout_signal_emit(dia->bg_object, "e,icon,disabled", "e");
-     }
-   else
-     {
-        if (!dia->icon_object)
-          {
-             dia->icon_object = e_icon_add(evas_object_evas_get(dia->win));
-             elm_object_part_content_set(dia->bg_object, "e.swallow.icon", dia->icon_object);
-             evas_object_show(dia->icon_object);
-          }
-        if (!e_util_icon_theme_set(dia->icon_object, icon))
-          if (!e_icon_file_edje_set(dia->icon_object, icon, "icon"))
-            {
-               E_FREE_FUNC(dia->icon_object, evas_object_del);
-               return;
-            }
-        evas_object_size_hint_min_set(dia->icon_object, size * e_scale, size * e_scale);
-        elm_layout_signal_emit(dia->bg_object, "e,state,icon", "e");
-        elm_layout_signal_emit(dia->bg_object, "e,icon,enabled", "e");
-     }
-   edje_object_message_signal_process(elm_layout_edje_get(dia->bg_object));
-#endif
-}
-
-E_API void
-e_dialog_border_icon_set(E_Dialog *dia, const char *icon)
-{
-   ;
-}
-
-E_API void
-e_dialog_content_set(E_Dialog *dia, Evas_Object *obj, Evas_Coord minw, Evas_Coord minh)
-{
-   // FIXME
-#if 0
-   int mw, mh;
-   dia->content_object = obj;
-   //e_widget_on_focus_hook_set(obj, _e_dialog_cb_wid_on_focus, dia);
-   evas_object_size_hint_min_set(obj, minw, minh);
-   elm_object_part_content_set(dia->bg_object, "e.swallow.content", obj);
-   elm_layout_sizing_eval(dia->bg_object);
-   evas_object_smart_calculate(dia->bg_object);
-   evas_object_size_hint_min_get(dia->bg_object, &mw, &mh);
-   evas_object_resize(dia->win, mw, mh);
-   dia->min_w = mw;
-   dia->min_h = mh;
-   evas_object_show(obj);
-#endif
-}
-
-E_API void
-e_dialog_resizable_set(E_Dialog *dia, int resizable)
-{
-   // FIXME
-#if 0
-   dia->resizable = resizable;
-   if (dia->win)
-     {
-        if (resizable)
-          {
-             evas_object_size_hint_max_set(dia->bg_object, 99999, 99999);
-             evas_object_size_hint_weight_set(dia->bg_object, 1, 1);
-             e_util_win_auto_resize_fill(dia->win);
-             elm_layout_signal_emit(dia->bg_object, "e,state,resizable", "e");
-          }
-        else
-          {
-             evas_object_resize(dia->win, dia->min_w, dia->min_h);
-             evas_object_size_hint_weight_set(dia->bg_object, 0, 0);
-             evas_object_size_hint_max_set(dia->bg_object, dia->min_w, dia->min_h);
-             elm_layout_signal_emit(dia->bg_object, "e,state,no_resizable", "e");
-          }
-     }
-#endif
-}
-
-E_API void
-e_dialog_show(E_Dialog *dia)
-{
-   // FIXME
-#if 0
-   Evas_Coord mw, mh;
-   Evas_Object *o;
-
-   o = dia->text_object;
-   if (o)
-     elm_object_part_content_set(dia->bg_object, "e.swallow.content", o);
-
-   if (dia->min_w && dia->min_h)
-     mw = dia->min_w, mh = dia->min_h;
-   else
-     evas_object_size_hint_min_get(dia->bg_object, &mw, &mh);
-
-   evas_object_resize(dia->win, mw, mh);
-   if (!dia->resizable)
-     {
-        evas_object_size_hint_weight_set(dia->bg_object, 0, 0);
-        evas_object_size_hint_max_set(dia->bg_object, mw, mh);
-     }
-   else
-     {
-        evas_object_size_hint_max_set(dia->win, 99999, 99999);
-        e_util_win_auto_resize_fill(dia->win);
-     }
-   evas_object_show(dia->win);
-
-   //if (!e_widget_focus_get(dia->box_object))
-   //  e_widget_focus_set(dia->box_object, 1);
-#endif
-}
-
-/* local subsystem functions */
-// FIXME
-#if 0
-static void
-_e_dialog_free(E_Dialog *dia)
-{
-   if (dia->buttons) eina_list_free(dia->buttons);
-   if (dia->text_object) evas_object_del(dia->text_object);
-   if (dia->icon_object) evas_object_del(dia->icon_object);
-   if (dia->box_object) evas_object_del(dia->box_object);
-   if (dia->bg_object) evas_object_del(dia->bg_object);
-   if (dia->content_object) evas_object_del(dia->content_object);
-   if (dia->event_object) evas_object_del(dia->event_object);
-   evas_object_del(dia->win);
-   free(dia);
-}
-#endif
-
-// TODO: should be removed - yigl
-#if 0
-static void
-_e_dialog_del_func_cb(void *data EINA_UNUSED, E_Dialog *dia)
-{
-   e_util_defer_object_del(E_OBJECT(dia));
-}
-#endif
-
-// TODO: should be removed - yigl
-#if 0
-static void
-_e_dialog_cb_key_down(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event)
-{
-   Evas_Event_Key_Down *ev;
-   E_Dialog *dia;
-
-   ev = event;
-   dia = data;
-   if (!strcmp(ev->key, "Tab"))
-     {
-        if (evas_key_modifier_is_set(evas_key_modifier_get(evas_object_evas_get(dia->win)), "Shift"))
-          {
-             if (e_widget_focus_get(dia->box_object))
-               {
-                  if (!e_widget_focus_jump(dia->box_object, 0))
-                    {
-                       if (dia->text_object)
-                         e_widget_focus_set(dia->box_object, 0);
-                       else
-                         {
-                            e_widget_focus_set(dia->content_object, 0);
-                            if (!e_widget_focus_get(dia->content_object))
-                              e_widget_focus_set(dia->box_object, 0);
-                         }
-                    }
-               }
-             else
-               {
-                  if (!e_widget_focus_jump(dia->content_object, 0))
-                    e_widget_focus_set(dia->box_object, 0);
-               }
-          }
-        else
-          {
-             if (e_widget_focus_get(dia->box_object))
-               {
-                  if (!e_widget_focus_jump(dia->box_object, 1))
-                    {
-                       if (dia->text_object)
-                         e_widget_focus_set(dia->box_object, 1);
-                       else
-                         {
-                            e_widget_focus_set(dia->content_object, 1);
-                            if (!e_widget_focus_get(dia->content_object))
-                              e_widget_focus_set(dia->box_object, 1);
-                         }
-                    }
-               }
-             else
-               {
-                  if (!e_widget_focus_jump(dia->content_object, 1))
-                    e_widget_focus_set(dia->box_object, 1);
-               }
-          }
-     }
-   else if (((!strcmp(ev->key, "Return")) ||
-             (!strcmp(ev->key, "KP_Enter"))))
-     {
-        Evas_Object *o = NULL;
-
-        if ((dia->content_object) && (e_widget_focus_get(dia->content_object)))
-          o = e_widget_focused_object_get(dia->content_object);
-        else
-          o = e_widget_focused_object_get(dia->box_object);
-        if (o) e_widget_activate(o);
-     }
-   else if (!strcmp(ev->key, "Escape"))
-     e_object_del(E_OBJECT(dia));
-}
-#endif
-
-// FIXME
-#if 0
-static void
-_e_dialog_cb_delete(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
-{
-   e_object_del(E_OBJECT(data));
-}
-
-static void
-_e_dialog_cb_wid_on_focus(void *data, Evas_Object *obj)
-{
-   E_Dialog *dia;
-
-   dia = data;
-   if (obj == dia->content_object)
-     e_widget_focused_object_clear(dia->box_object);
-   else if (dia->content_object)
-     e_widget_focused_object_clear(dia->content_object);
-}
-#endif
diff --git a/src/bin/e_win.c b/src/bin/e_win.c
deleted file mode 100644 (file)
index cb71975..0000000
+++ /dev/null
@@ -1,560 +0,0 @@
-#include "e.h"
-
-/* intercept elm_win operations so we talk directly to e_client */
-#undef elm_win_add
-
-// FIXME
-#if 0
-typedef struct _Elm_Win_Trap_Ctx
-{
-   E_Client      *client;
-   E_Pointer     *pointer;
-   Eina_Bool      centered : 1;
-   Eina_Bool      placed : 1;
-   Eina_Bool      internal_no_reopen : 1;
-   Eina_Bool      visible : 1;
-   Eina_Bool      override : 1;
-} Elm_Win_Trap_Ctx;
-
-
-static Elm_Win_Trap_Ctx *current_win = NULL;
-
-static void *
-_e_elm_win_trap_add(Evas_Object *o)
-{
-   Elm_Win_Trap_Ctx *ctx = calloc(1, sizeof(Elm_Win_Trap_Ctx));
-   EINA_SAFETY_ON_NULL_RETURN_VAL(ctx, NULL);
-   evas_object_name_set(o, "E_Win");
-   return ctx;
-}
-
-static void
-_e_elm_win_trap_del(void *data, Evas_Object *o)
-{
-   Elm_Win_Trap_Ctx *ctx = data;
-   EINA_SAFETY_ON_NULL_RETURN(ctx);
-   if (ctx->client)
-     {
-        ctx->client->internal_elm_win = NULL;
-        e_object_del(E_OBJECT(ctx->client));
-        evas_object_data_set(o, "E_Client", NULL);
-     }
-   free(ctx);
-}
-
-static Eina_Bool
-_e_elm_win_trap_hide(void *data, Evas_Object *o)
-{
-   Elm_Win_Trap_Ctx *ctx = data;
-   EINA_SAFETY_ON_NULL_RETURN_VAL(ctx, EINA_TRUE);
-   if (!ctx->visible) return EINA_FALSE;
-   if (strncmp(ecore_evas_engine_name_get(e_win_ee_get(o)), "wayland", 7))
-     E_FREE_FUNC(ctx->pointer, e_object_del);
-
-   if (!ctx->client) return EINA_TRUE;
-   ctx->visible = 0;
-   evas_object_hide(ctx->client->frame);
-   return EINA_FALSE;
-}
-
-static Eina_Bool
-_e_elm_win_trap_show(void *data, Evas_Object *o)
-{
-   Elm_Win_Trap_Ctx *ctx = data;
-   Evas *e = evas_object_evas_get(o);
-   Ecore_Evas *ee = ecore_evas_ecore_evas_get(e);
-   Eina_Bool borderless;
-
-   EINA_SAFETY_ON_NULL_RETURN_VAL(ctx, EINA_TRUE);
-   borderless = elm_win_borderless_get(o);
-   if (!ctx->client)
-     {
-        E_Client *ec;
-        Ecore_Window win;
-        uintptr_t wl_win_id = NULL;
-        E_Pixmap_Type type = E_PIXMAP_TYPE_X;
-
-        win = elm_win_window_id_get(o);
-        if (!strncmp(ecore_evas_engine_name_get(ee), "wayland", 7))
-          {
-             type = E_PIXMAP_TYPE_WL;
-             ecore_evas_object_cursor_set(ee, NULL, 0, 0, 0);
-             ctx->pointer = e_comp->pointer;
-             elm_win_borderless_set(o, 1);
-             wl_win_id = win;
-          }
-        else
-          {
-             type = E_PIXMAP_TYPE_X;
-             ctx->pointer = e_pointer_window_new(win, EINA_TRUE);
-          }
-
-        if ((type == E_PIXMAP_TYPE_WL) && (wl_win_id))
-          ec = e_pixmap_find_client(type, wl_win_id);
-        else
-          ec = e_pixmap_find_client(type, win);
-        if (ec)
-          ctx->client = ec;
-        else
-          {
-             E_Pixmap *cp;
-             const char *title, *name, *clas;
-
-             ecore_evas_name_class_get(ee, &name, &clas);
-             if (!name) name = "E";
-             if (!clas) clas = "_e_internal_window";
-             ecore_evas_name_class_set(ee, name, clas);
-             title = elm_win_title_get(o);
-             if ((!title) || (!title[0]))
-               title = "E";
-             ecore_evas_title_set(ee, title);
-             if (type == E_PIXMAP_TYPE_WL)
-               {
-                  if ((cp = e_pixmap_find(type, wl_win_id)))
-                    {
-                       ERR("There is e_pixmap already, Delete old e_pixmap %p", cp);
-                       e_pixmap_win_id_del(cp);
-                       cp = NULL;
-                    }
-                  /* first creation of pixmap for internal window */
-                  if (!cp)
-                    cp = e_pixmap_new(type, wl_win_id);
-               }
-             else
-               cp = e_pixmap_new(type, win);
-             EINA_SAFETY_ON_NULL_RETURN_VAL(cp, EINA_TRUE);
-
-             current_win = ctx;
-             ctx->client = e_client_new(cp, 0, 1);
-             current_win = NULL;
-             EINA_SAFETY_ON_NULL_RETURN_VAL(ctx->client, EINA_TRUE);
-             eina_stringshare_replace(&ctx->client->icccm.name, name);
-             eina_stringshare_replace(&ctx->client->icccm.class, clas);
-             eina_stringshare_replace(&ctx->client->icccm.title, title);
-          }
-        ctx->client->placed = ctx->placed | ctx->centered;
-        ctx->client->internal_no_reopen = ctx->internal_no_reopen;
-        ctx->client->internal_elm_win = o;
-        elm_win_autodel_set(o, 1);
-        evas_object_data_set(o, "E_Client", ctx->client);
-
-        evas_object_size_hint_min_get(o, &ctx->client->icccm.min_w, &ctx->client->icccm.min_h);
-        evas_object_size_hint_max_get(o, &ctx->client->icccm.max_w, &ctx->client->icccm.max_h);
-     }
-//#endif
-   evas_object_geometry_get(o, &ctx->client->client.x, &ctx->client->client.y, &ctx->client->client.w, &ctx->client->client.h);
-   ecore_evas_show(ee);
-   if (!ctx->visible)
-     {
-        ctx->visible = 1;
-        evas_object_show(ctx->client->frame);
-     }
-   ctx->client->borderless |= borderless;
-   e_comp_object_frame_xy_adjust(ctx->client->frame, ctx->client->client.x, ctx->client->client.y, &ctx->client->x, &ctx->client->y);
-   e_comp_object_frame_wh_adjust(ctx->client->frame, ctx->client->client.w, ctx->client->client.h, &ctx->client->w, &ctx->client->h);
-   if (ctx->centered) e_comp_object_util_center(ctx->client->frame);
-   return EINA_TRUE;
-}
-
-static Eina_Bool
-_e_elm_win_trap_move(void *data, Evas_Object *o, int x, int y)
-{
-   Elm_Win_Trap_Ctx *ctx = data;
-   EINA_SAFETY_ON_NULL_RETURN_VAL(ctx, EINA_TRUE);
-   int ex, ey;
-
-   /* if the ee coords match the requested coords, this is coming from
-    * a configure event which the compositor sent. failing to reject this
-    * move will result in bad window positioning
-    */
-   ecore_evas_geometry_get(e_win_ee_get(o), &ex, &ey, NULL, NULL);
-   if ((x == ex) && (y == ey)) return EINA_FALSE;
-
-   ctx->placed = 1;
-   if (!ctx->client) return EINA_TRUE;
-   if ((ctx->client->client.x != x) || (ctx->client->client.y != y))
-     e_client_util_move_without_frame(ctx->client, x, y);
-   return EINA_TRUE;
-}
-
-static Eina_Bool
-_e_elm_win_trap_resize(void *data, Evas_Object *o EINA_UNUSED, int w, int h)
-{
-   Elm_Win_Trap_Ctx *ctx = data;
-   EINA_SAFETY_ON_NULL_RETURN_VAL(ctx, EINA_TRUE);
-   if (!ctx->client) return EINA_TRUE;
-   e_comp_object_frame_wh_adjust(ctx->client->frame, w, h, &w, &h);
-   e_client_resize_limit(ctx->client, &w, &h);
-   evas_object_resize(ctx->client->frame, w, h);
-   return EINA_TRUE;
-}
-
-static Eina_Bool
-_e_elm_win_trap_center(void *data, Evas_Object *o EINA_UNUSED, Eina_Bool h, Eina_Bool v)
-{
-   Elm_Win_Trap_Ctx *ctx = data;
-   EINA_SAFETY_ON_NULL_RETURN_VAL(ctx, EINA_TRUE);
-   ctx->centered = h | v;
-   ctx->placed = 1;
-   if (!ctx->client) return EINA_FALSE;
-   if (ctx->centered) e_comp_object_util_center(ctx->client->frame);
-   return EINA_FALSE;
-}
-
-static Eina_Bool
-_e_elm_win_trap_lower(void *data, Evas_Object *o EINA_UNUSED)
-{
-   Elm_Win_Trap_Ctx *ctx = data;
-   EINA_SAFETY_ON_NULL_RETURN_VAL(ctx, EINA_TRUE);
-   if (!ctx->client) return EINA_TRUE;
-   e_client_lower(ctx->client);
-   return EINA_FALSE;
-}
-
-static Eina_Bool
-_e_elm_win_trap_raise(void *data, Evas_Object *o EINA_UNUSED)
-{
-   Elm_Win_Trap_Ctx *ctx = data;
-   EINA_SAFETY_ON_NULL_RETURN_VAL(ctx, EINA_TRUE);
-   if (!ctx->client) return EINA_TRUE;
-   e_client_raise(ctx->client);
-   return EINA_FALSE;
-}
-
-static Eina_Bool
-_e_elm_win_trap_activate(void *data, Evas_Object *o EINA_UNUSED)
-{
-   Elm_Win_Trap_Ctx *ctx = data;
-   EINA_SAFETY_ON_NULL_RETURN_VAL(ctx, EINA_TRUE);
-   if (!ctx->client) return EINA_TRUE;
-   evas_object_focus_set(ctx->client->frame, 1);
-   if (!ctx->client->lock_user_stacking)
-     e_client_raise(ctx->client);
-   return EINA_FALSE;
-}
-
-static Eina_Bool
-_e_elm_win_trap_size_min_set(void *data, Evas_Object *o EINA_UNUSED, int w, int h)
-{
-   Elm_Win_Trap_Ctx *ctx = data;
-   int mw = 0, mh = 0;
-
-   EINA_SAFETY_ON_NULL_RETURN_VAL(ctx, EINA_TRUE);
-   if (!ctx->client) return EINA_TRUE;
-   ctx->client->icccm.min_w = w;
-   ctx->client->icccm.min_h = h;
-   e_client_resize_limit(ctx->client, &mw, &mh);
-   mw = ctx->client->w < w ? w : ctx->client->w;
-   mh = ctx->client->h < h ? h : ctx->client->h;
-   if ((ctx->client->w != mw) || (ctx->client->h != mh))
-     evas_object_resize(ctx->client->frame, mw, mh);
-
-   return EINA_TRUE;
-}
-
-static Eina_Bool
-_e_elm_win_trap_size_max_set(void *data, Evas_Object *o EINA_UNUSED, int w, int h)
-{
-   Elm_Win_Trap_Ctx *ctx = data;
-   int mw = 0, mh = 0;
-
-   EINA_SAFETY_ON_NULL_RETURN_VAL(ctx, EINA_TRUE);
-   if (!ctx->client) return EINA_TRUE;
-   ctx->client->icccm.max_w = w;
-   ctx->client->icccm.max_h = h;
-   e_client_resize_limit(ctx->client, &mw, &mh);
-   mw = ctx->client->w > w ? w : ctx->client->w;
-   mh = ctx->client->h > h ? h : ctx->client->h;
-   if ((ctx->client->w != mw) || (ctx->client->h != mh))
-     evas_object_resize(ctx->client->frame, mw, mh);
-
-   return EINA_TRUE;
-}
-
-static Eina_Bool
-_e_elm_win_trap_size_base_set(void *data, Evas_Object *o EINA_UNUSED, int w, int h)
-{
-   Elm_Win_Trap_Ctx *ctx = data;
-   int mw = 0, mh = 0;
-
-   EINA_SAFETY_ON_NULL_RETURN_VAL(ctx, EINA_TRUE);
-   if (!ctx->client) return EINA_TRUE;
-   ctx->client->icccm.base_w = w;
-   ctx->client->icccm.base_h = h;
-   e_client_resize_limit(ctx->client, &mw, &mh);
-   mw = ctx->client->w < w ? w : ctx->client->w;
-   mh = ctx->client->h < h ? h : ctx->client->h;
-   if ((ctx->client->w != mw) || (ctx->client->h != mh))
-     evas_object_resize(ctx->client->frame, mw, mh);
-
-   return EINA_TRUE;
-}
-
-static Eina_Bool
-_e_elm_win_trap_borderless_set(void *data, Evas_Object *o EINA_UNUSED, Eina_Bool borderless)
-{
-   Elm_Win_Trap_Ctx *ctx = data;
-   EINA_SAFETY_ON_NULL_RETURN_VAL(ctx, EINA_TRUE);
-   if (!ctx->client) return EINA_TRUE;
-
-   borderless = !!borderless;
-
-   ctx->client->borderless = borderless;
-   EC_CHANGED(ctx->client);
-   ctx->client->changes.border = 1;
-   return EINA_TRUE;
-}
-
-static Eina_Bool
-_e_elm_win_trap_override_set(void *data, Evas_Object *o EINA_UNUSED, Eina_Bool override)
-{
-   Elm_Win_Trap_Ctx *ctx = data;
-   EINA_SAFETY_ON_NULL_RETURN_VAL(ctx, EINA_TRUE);
-
-   if (ctx->client)
-     CRI("Override being set too late on internal client!");
-   ctx->override = !!override;
-   return EINA_TRUE;
-}
-
-static const Elm_Win_Trap _e_elm_win_trap = {
-   ELM_WIN_TRAP_VERSION,
-   _e_elm_win_trap_add,
-   _e_elm_win_trap_del,
-   _e_elm_win_trap_hide,
-   _e_elm_win_trap_show,
-   _e_elm_win_trap_move,
-   _e_elm_win_trap_resize,
-   _e_elm_win_trap_center,
-   _e_elm_win_trap_lower,
-   _e_elm_win_trap_raise,
-   _e_elm_win_trap_activate,
-   /* alpha_set */ NULL,
-   /* aspect_set */ NULL,
-   /* avoid_damage_set */ NULL,
-   _e_elm_win_trap_borderless_set,
-   /* demand_attention_set */ NULL,
-   /* focus_skip_set */ NULL,
-   /* fullscreen_set */ NULL,
-   /* iconified_set */ NULL,
-   /* layer_set */ NULL,
-   /* manual_render_set */ NULL,
-   /* maximized_set */ NULL,
-   /* modal_set */ NULL,
-   /* name_class_set */ NULL,
-   /* object_cursor_set */ NULL,
-   _e_elm_win_trap_override_set,
-   /* rotation_set */ NULL,
-   /* rotation_with_resize_set */ NULL,
-   /* shaped_set */ NULL,
-   _e_elm_win_trap_size_base_set,
-   /* size_step_set */ NULL,
-   _e_elm_win_trap_size_min_set,
-   _e_elm_win_trap_size_max_set,
-   /* sticky_set */ NULL,
-   /* title_set */ NULL,
-   /* urgent_set */ NULL,
-   /* withdrawn_set */ NULL
-};
-
-static void
-_e_win_client_hook_new(void *d EINA_UNUSED, E_Client *ec)
-{
-   if (!ec->internal) return;
-   if (current_win)
-     ec->override = current_win->override;
-}
-
-/* externally accessible functions */
-EINTERN int
-e_win_init(void)
-{
-   if (!elm_win_trap_set(&_e_elm_win_trap)) return 0;
-   e_client_hook_add(E_CLIENT_HOOK_NEW_CLIENT, _e_win_client_hook_new, NULL);
-   return 1;
-}
-
-EINTERN int
-e_win_shutdown(void)
-{
-   return 1;
-}
-
-E_API E_Client *
-e_win_client_get(Evas_Object *obj)
-{
-   Elm_Win_Trap_Ctx *ctx;
-
-   if (!e_obj_is_win(obj)) return NULL;
-   ctx = elm_win_trap_data_get(obj);
-
-   return ctx ? ctx->client : NULL;
-}
-
-E_API Ecore_Evas *
-e_win_ee_get(Evas_Object *obj)
-{
-   return ecore_evas_ecore_evas_get(evas_object_evas_get(obj));
-}
-
-E_API E_Pointer *
-e_win_pointer_get(Evas_Object *obj)
-{
-   Elm_Win_Trap_Ctx *ctx = elm_win_trap_data_get(obj);
-
-   return ctx ? ctx->pointer : NULL;
-}
-
-E_API Eina_Bool
-e_win_centered_get(Evas_Object *obj)
-{
-   Elm_Win_Trap_Ctx *ctx = elm_win_trap_data_get(obj);
-
-   return ctx ? ctx->centered : EINA_FALSE;
-}
-
-E_API void
-e_win_client_icon_set(Evas_Object *obj, const char *icon)
-{
-   Elm_Win_Trap_Ctx *ctx = elm_win_trap_data_get(obj);
-
-   if (ctx->client)
-     eina_stringshare_replace(&ctx->client->internal_icon, icon);
-}
-
-E_API void
-e_win_client_icon_key_set(Evas_Object *obj, const char *key)
-{
-   Elm_Win_Trap_Ctx *ctx = elm_win_trap_data_get(obj);
-
-   if (ctx->client)
-     eina_stringshare_replace(&ctx->client->internal_icon_key, key);
-}
-
-E_API void
-e_win_placed_set(Evas_Object *obj, Eina_Bool placed)
-{
-   Elm_Win_Trap_Ctx *ctx = elm_win_trap_data_get(obj);
-
-   EINA_SAFETY_ON_NULL_RETURN(obj);
-   ctx->placed = !!placed;
-   if (ctx->client)
-     {
-        ctx->client->placed = !!placed;
-        EC_CHANGED(ctx->client);
-     }
-}
-
-E_API void
-e_win_no_remember_set(Evas_Object *obj, Eina_Bool no_rem)
-{
-   Elm_Win_Trap_Ctx *ctx = elm_win_trap_data_get(obj);
-
-   EINA_SAFETY_ON_NULL_RETURN(obj);
-}
-
-E_API void
-e_win_no_reopen_set(Evas_Object *obj, Eina_Bool no_reopen)
-{
-   Elm_Win_Trap_Ctx *ctx = elm_win_trap_data_get(obj);
-
-   EINA_SAFETY_ON_NULL_RETURN(obj);
-   ctx->internal_no_reopen = !!no_reopen;
-   if (ctx->client)
-     ctx->client->internal_no_reopen = !!no_reopen;
-}
-
-// FIXME
-E_API Evas_Object *
-//e_elm_win_add(Evas_Object *parent, const char *name, Elm_Win_Type type)
-e_elm_win_add(Evas_Object *parent, const char *name, int type);
-{
-   Evas_Object *o = NULL;
-
-   // FIXME
-#if 0
-   char *eng;
-
-   if (type == ELM_WIN_INLINED_IMAGE) return elm_win_add(parent, name, type);
-   eng = eina_strdup(getenv("ELM_ACCEL"));
-   e_util_env_set("ELM_ACCEL", "none");
-   o = elm_win_add(parent, name, type);
-   e_util_env_set("ELM_ACCEL", eng);
-   elm_win_alpha_set(o, 1);
-   free(eng);
-#endif
-   return o;
-}
-#else
-EINTERN int
-e_win_init(void)
-{
-   return 1;
-}
-
-EINTERN int
-e_win_shutdown(void)
-{
-   return 1;
-}
-
-E_API E_Client *
-e_win_client_get(Evas_Object *obj)
-{
-   return NULL;
-}
-
-E_API Ecore_Evas *
-e_win_ee_get(Evas_Object *obj)
-{
-   return NULL;
-}
-
-E_API E_Pointer *
-e_win_pointer_get(Evas_Object *obj)
-{
-   return NULL;
-}
-
-E_API Eina_Bool
-e_win_centered_get(Evas_Object *obj)
-{
-   return EINA_FALSE;
-}
-
-E_API void
-e_win_client_icon_set(Evas_Object *win, const char *icon)
-{
-   return;
-}
-
-E_API void
-e_win_client_icon_key_set(Evas_Object *win, const char *key)
-{
-   return;
-}
-
-E_API void
-e_win_placed_set(Evas_Object *win, Eina_Bool placed)
-{
-   return;
-}
-
-E_API void
-e_win_no_remember_set(Evas_Object *win, Eina_Bool no_rem)
-{
-   return;
-}
-
-E_API void
-e_win_no_reopen_set(Evas_Object *win, Eina_Bool no_reopen)
-{
-   return;
-}
-
-E_API Evas_Object *
-e_elm_win_add(Evas_Object *parent, const char *name, int type)
-{
-   return NULL;
-}
-#endif
diff --git a/src/bin/e_win.h b/src/bin/e_win.h
deleted file mode 100644 (file)
index 38b70fc..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-#ifndef E_TYPEDEFS
-#ifndef E_WIN_H
-#define E_WIN_H
-
-EINTERN int    e_win_init               (void);
-EINTERN int    e_win_shutdown           (void);
-
-
-E_API E_Client *e_win_client_get(Evas_Object *obj);
-E_API Ecore_Evas *e_win_ee_get(Evas_Object *obj);
-E_API E_Pointer *e_win_pointer_get(Evas_Object *obj);
-E_API Eina_Bool e_win_centered_get(Evas_Object *obj);
-
-E_API void e_win_client_icon_set(Evas_Object *win, const char *icon);
-E_API void e_win_client_icon_key_set(Evas_Object *win, const char *key);
-
-E_API void e_win_placed_set(Evas_Object *win, Eina_Bool placed);
-E_API void e_win_no_remember_set(Evas_Object *win, Eina_Bool no_rem);
-E_API void e_win_no_reopen_set(Evas_Object *win, Eina_Bool no_reopen);
-
-static inline Evas_Object *
-e_win_evas_object_win_get(Evas_Object *obj)
-{
-   return (Evas_Object *)ecore_evas_data_get((const Ecore_Evas *)e_win_ee_get(obj), "elm_win");
-}
-
-static inline Evas_Object *
-e_win_evas_win_get(Evas *e)
-{
-   return (Evas_Object *)ecore_evas_data_get((const Ecore_Evas *)ecore_evas_ecore_evas_get(e), "elm_win");
-}
-
-static inline Eina_Bool
-e_obj_is_win(const void *obj)
-{
-   const char *type = evas_object_type_get((const Evas_Object *)obj);
-   return type && !strcmp(type, "elm_win");
-}
-
-// FIXME
-//E_API Evas_Object *e_elm_win_add(Evas_Object *parent, const char *name, Elm_Win_Type type);
-E_API Evas_Object *e_elm_win_add(Evas_Object *parent, const char *name, int type);
-
-#define elm_win_add(X, Y, Z) \
-   e_elm_win_add((X), (Y), (Z))
-
-#endif
-#endif