clipper: removed.
authorChunEon Park <hermet@hermet.pe.kr>
Thu, 28 May 2015 08:41:49 +0000 (17:41 +0900)
committerChunEon Park <hermet@hermet.pe.kr>
Thu, 28 May 2015 08:41:49 +0000 (17:41 +0900)
we've discussed and concluded it's unncessary.

src/lib/Elementary.h.in
src/lib/Makefile.am
src/lib/elm_clipper.c [deleted file]
src/lib/elm_clipper.eo [deleted file]
src/lib/elm_clipper.h [deleted file]
src/lib/elm_clipper_eo.h [deleted file]
src/lib/elm_clipper_legacy.h [deleted file]

index 87d9045..cd17bbf 100644 (file)
@@ -195,7 +195,6 @@ EAPI extern Elm_Version *elm_version;
 #include <elm_cache.h>
 #include <elm_calendar.h>
 #include <elm_check.h>
-#include <elm_clipper.h>
 #include <elm_clock.h>
 #include <elm_cnp.h>
 #include <elm_colorselector.h>
index 2a52436..de85749 100644 (file)
@@ -48,7 +48,6 @@ elm_widget_bubble.h \
 elm_widget_button.h \
 elm_widget_calendar.h \
 elm_widget_check.h \
-elm_widget_clipper.h \
 elm_widget_clock.h \
 elm_widget_colorselector.h \
 elm_widget_conform.h \
@@ -178,9 +177,6 @@ elm_calendar_common.h \
 elm_check.h \
 elm_check_eo.h \
 elm_check_legacy.h \
-elm_clipper.h \
-elm_clipper_eo.h \
-elm_clipper_legacy.h \
 elm_clock.h \
 elm_clock_eo.h \
 elm_clock_legacy.h \
@@ -426,7 +422,6 @@ elm_bubble.c \
 elm_button.c \
 elm_calendar.c \
 elm_check.c \
-elm_clipper.c \
 elm_clock.c \
 elm_cnp.c \
 elm_colorselector.c \
@@ -548,7 +543,6 @@ elm_bubble.eo \
 elm_button.eo \
 elm_calendar.eo \
 elm_check.eo \
-elm_clipper.eo \
 elm_clock.eo \
 elm_colorselector.eo \
 elm_conformant.eo \
@@ -701,7 +695,6 @@ elementaryeolianfiles_DATA = \
             elm_button.eo \
             elm_calendar.eo \
             elm_check.eo \
-            elm_clipper.eo \
             elm_clock.eo \
             elm_colorselector.eo \
             elm_conformant.eo \
diff --git a/src/lib/elm_clipper.c b/src/lib/elm_clipper.c
deleted file mode 100644 (file)
index 5b869e8..0000000
+++ /dev/null
@@ -1,229 +0,0 @@
-#ifdef HAVE_CONFIG_H
-# include "elementary_config.h"
-#endif
-
-#define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED
-
-#include <Elementary.h>
-
-#include "elm_priv.h"
-#include "elm_widget_clipper.h"
-#include "elm_widget_container.h"
-
-#define MY_CLASS ELM_CLIPPER_CLASS
-
-#define MY_CLASS_NAME "Elm_Clipper"
-#define MY_CLASS_NAME_LEGACY "elm_clipper"
-
-static void
-_calc_region(Eo *obj)
-{
-   int x, y, w, h;
-   int calx1, caly1, calx2, caly2;
-
-   ELM_CLIPPER_DATA_GET(obj, sd);
-   evas_object_geometry_get(sd->content, &x, &y, &w, &h);
-
-   calx1 = (int)(w * sd->region_x1 + x);
-   caly1 = (int)(h * sd->region_y1 + y);
-
-   if (sd->region_x2 < sd->region_x1) calx2 = 0;
-   else calx2 = (int)(w * (sd->region_x2 - sd->region_x1));
-   if (sd->region_y2 < sd->region_y1) caly2 = 0;
-   else caly2 = (int)(h * (sd->region_y2 - sd->region_y1));
-
-   evas_object_move(sd->clipper, calx1, caly1);
-   evas_object_resize(sd->clipper, calx2, caly2);
-}
-
-EOLIAN static void
-_elm_clipper_clip_set(Eo *obj, Elm_Clipper_Data *sd, Evas_Object *clip)
-{
-   if (sd->clipper != clip)
-     {
-        if (sd->clipper)
-          {
-             elm_widget_sub_object_del(obj, sd->clipper);
-             if (sd->content) evas_object_clip_unset(sd->content);
-             sd->clipper = NULL;
-          }
-        if (clip)
-          {
-             elm_widget_sub_object_add(obj, clip);
-             evas_object_smart_member_add(clip, obj);
-             _calc_region(obj);
-             if (sd->content) evas_object_clip_set(sd->content, clip);
-             sd->clipper = clip;
-          }
-     }
-}
-
-EOLIAN static Evas_Object *
-_elm_clipper_clip_get(Eo *obj EINA_UNUSED, Elm_Clipper_Data *sd)
-{
-   return sd->clipper;
-}
-
-#if 0
-EOLIAN static void
-_elm_clipper_region_set(Eo *obj, Elm_Clipper_Data *sd, double x1, double y1, double x2, double y2)
-{
-   if (x2 < x1  || y2 < y1)
-     ERR("Clipper region x2/y2 should be greater than or equal to x1/y1!\n");
-
-   if (sd->region_x1 != x1 || sd->region_y1 != y1 ||
-       sd->region_x2 != x2 || sd->region_y2 != y2)
-     {
-        sd->region_x1 = x1;
-        sd->region_y1 = y1;
-        sd->region_x2 = x2;
-        sd->region_y2 = y2;
-        _calc_region(obj);
-     }
-}
-
-EOLIAN static void
-_elm_clipper_region_get(Eo *obj EINA_UNUSED, Elm_Clipper_Data *sd, double *x1, double *y1, double *x2, double *y2)
-{
-   if (x1) *x1 = sd->region_x1;
-   if (y1) *y1 = sd->region_y1;
-   if (x2) *x2 = sd->region_x2;
-   if (y2) *y2 = sd->region_y2;
-}
-#endif
-
-EOLIAN static Eina_Bool
-_elm_clipper_elm_widget_sub_object_del(Eo *obj, Elm_Clipper_Data *sd, Evas_Object *sobj)
-{
-   Eina_Bool int_ret = EINA_FALSE;
-   eo_do_super(obj, MY_CLASS, int_ret = elm_obj_widget_sub_object_del(sobj));
-   if (!int_ret) return EINA_FALSE;
-   if (sobj == sd->content) evas_object_data_del(sobj, "_elm_leaveme");
-   evas_object_smart_member_del(sobj);
-   return EINA_TRUE;
-}
-
-EOLIAN static void
-_elm_clipper_evas_object_smart_resize(Eo *obj, Elm_Clipper_Data *sd EINA_UNUSED, Evas_Coord w, Evas_Coord h)
-{
-   eo_do_super(obj, MY_CLASS, evas_obj_smart_resize(w, h));
-   if(sd->content) evas_object_resize(sd->content, w, h);
-   _calc_region(obj);
-}
-
-EOLIAN static void
-_elm_clipper_evas_object_smart_move(Eo *obj, Elm_Clipper_Data *sd EINA_UNUSED, Evas_Coord x, Evas_Coord y)
-{
-   eo_do_super(obj, MY_CLASS, evas_obj_smart_move(x, y));
-   evas_object_move(sd->content, x, y);
-   _calc_region(obj);
-}
-
-EOLIAN static void
-_elm_clipper_evas_object_smart_show(Eo *obj, Elm_Clipper_Data *sd)
-{
-   eo_do_super(obj, MY_CLASS, evas_obj_smart_show());
-   if(sd->content) evas_object_show(sd->content);
-   if(sd->clipper) evas_object_show(sd->clipper);
-
-}
-
-EOLIAN static void
-_elm_clipper_evas_object_smart_hide(Eo *obj, Elm_Clipper_Data *sd)
-{
-   eo_do_super(obj, MY_CLASS, evas_obj_smart_hide());
-   if(sd->content) evas_object_hide(sd->content);
-   if(sd->clipper) evas_object_hide(sd->clipper);
-}
-
-EOLIAN static Eina_Bool
-_elm_clipper_elm_container_content_set(Eo *obj, Elm_Clipper_Data *sd, const char *part, Evas_Object *content)
-{
-   if (part && strcmp(part, "default")) return EINA_FALSE;
-   if (sd->content != content)
-     {
-        if (sd->content)
-          {
-             elm_widget_sub_object_del(obj, sd->content);
-             sd->content = NULL;
-          }
-        if (content)
-          {
-             elm_widget_sub_object_add(content,obj);
-             evas_object_data_set(content, "_elm_leaveme", (void *)1);
-             evas_object_smart_member_add(content, obj);
-             _calc_region(obj);
-             if (sd->clipper) evas_object_clip_set(content, sd->clipper);
-             sd->content = content;
-          }
-     }
-   return EINA_TRUE;
-}
-
-EOLIAN static Evas_Object*
-_elm_clipper_elm_container_content_get(Eo *obj EINA_UNUSED, Elm_Clipper_Data *sd, const char *part)
-{
-   if (part && strcmp(part, "default")) return NULL;
-   return sd->content;
-}
-
-EOLIAN static Evas_Object*
-_elm_clipper_elm_container_content_unset(Eo *obj, Elm_Clipper_Data *sd, const char *part)
-{
-   Evas_Object *content;
-   if (part && strcmp(part, "default")) return NULL;
-   content = sd->content;
-   elm_widget_sub_object_del(obj, sd->content);
-   sd->content = NULL;
-   return content;
-}
-
-EOLIAN static void
-_elm_clipper_evas_object_smart_add(Eo *obj, Elm_Clipper_Data *priv)
-{
-   eo_do_super(obj, MY_CLASS, evas_obj_smart_add());
-   elm_widget_sub_object_parent_add(obj);
-   elm_widget_can_focus_set(obj, EINA_FALSE);
-   priv->content = NULL;
-   priv->clipper = NULL;
-   priv->region_x1 = 0;
-   priv->region_y1 = 0;
-   priv->region_x2 = 1;
-   priv->region_y2 = 1;
-}
-
-EOLIAN static void
-_elm_clipper_evas_object_smart_del(Eo *obj, Elm_Clipper_Data *sd)
-{
-   eo_do_super(obj, MY_CLASS, evas_obj_smart_del());
-   ELM_SAFE_FREE(sd->content, evas_object_del);
-   ELM_SAFE_FREE(sd->clipper, evas_object_del);
-   sd->content = NULL;
-   sd->clipper = NULL;
-}
-
-
-EAPI Evas_Object *
-elm_clipper_add(Evas_Object *parent)
-{
-   EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
-   Evas_Object *obj = eo_add(MY_CLASS, parent);
-   return obj;
-}
-
-EOLIAN static Eo *
-_elm_clipper_eo_base_constructor(Eo *obj, Elm_Clipper_Data *sd EINA_UNUSED)
-{
-   obj = eo_do_super_ret(obj, MY_CLASS, obj, eo_constructor());
-   eo_do(obj, evas_obj_type_set(MY_CLASS_NAME_LEGACY));
-
-   return obj;
-}
-
-static void
-_elm_clipper_class_constructor(Eo_Class *klass)
-{
-   evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass);
-}
-
-#include "elm_clipper.eo.c"
diff --git a/src/lib/elm_clipper.eo b/src/lib/elm_clipper.eo
deleted file mode 100644 (file)
index 9be4215..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-class Elm.Clipper (Elm.Container)
-{
-   eo_prefix: elm_obj_clipper;
-   methods {
-      @property clip {
-         set {
-            /*@
-            @brief Set the clip(mask) object of the clipper
-
-            Sets the clip(mask) object for clipping
-
-            @note
-            Allow setting only an Evas_Object_Rectangle and an Evas_Object_Image as clip on 1.14
-
-            @since 1.15
-
-            @ingroup Clipper */
-         }
-         get {
-            /*@
-            @brief Get the clip(mask) object of the clipper
-
-            @see elm_clipper_clip_set()
-
-            @since 1.15
-
-            @ingroup Clipper */
-         }
-         values {
-            clip: Evas_Object *;
-         }
-      }
-   }
-   implements {
-      class.constructor;
-      Eo.Base.constructor;
-      Evas.Object_Smart.hide;
-      Evas.Object_Smart.show;
-      Evas.Object_Smart.move;
-      Evas.Object_Smart.add;
-      Evas.Object_Smart.del;
-      Evas.Object_Smart.resize;
-      Elm.Widget.sub_object_del;
-      Elm.Container.content_get;
-      Elm.Container.content_set;
-      Elm.Container.content_unset;
-   }
-}
diff --git a/src/lib/elm_clipper.h b/src/lib/elm_clipper.h
deleted file mode 100644 (file)
index fa15cc9..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * @defgroup Clipper Clipper
- * @ingroup Elementary
- *
- * This widget displays a clipped(masked) object.
- * For this widget, you need one clipper and one content objects.
- * The content would be clipped out by the clipper.
- * If clipper is not set, you would see the content without cuts
- *
- * The Evas_Object_Rectangle and the Evas_Object_Image object can be a clipper.
- * A content can have only a clipper even if user set some objects as the clipper.
- * 
- * This widget can display a clipped object into many shapes according to the clipper.
- * The shape of the clipped object be decided by pixel's transparency of the clipper object.
- * If you want to cut out the content into a circle,
- * the clipper's pixel should have non-zero as alpha value into the circle.
- * In case of outside of the circle, should have zero as alpha value.
- *
- * This widget inherits from @ref elm-container-class,
- * So you can use are:
- *
- * @li @ref elm_object_part_content_set
- * @li @ref elm_object_part_content_get
- * @li @ref elm_object_part_content_unset
- *
- * Default content parts of the clipper widget that you can use are:
- * @li @c "default" - The content to be clipped off
- *
- * @{
- */
-
-#ifdef EFL_EO_API_SUPPORT
-#include <elm_clipper_eo.h>
-#endif
-#ifndef EFL_NOLEGACY_API_SUPPORT
-#include <elm_clipper_legacy.h>
-#endif
-
-/**
- * @}
- */
diff --git a/src/lib/elm_clipper_eo.h b/src/lib/elm_clipper_eo.h
deleted file mode 100644 (file)
index 3b9a71c..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-/**
- * @ingroup Clipper
- *
- * @{
- */
-
-#include "elm_clipper.eo.h"
-
-/**
- * @}
- */
diff --git a/src/lib/elm_clipper_legacy.h b/src/lib/elm_clipper_legacy.h
deleted file mode 100644 (file)
index 0972573..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-/**
- * @brief Add a new clipper object to the parent
- *
- * @param parent The parent object
- * @return The new object or NULL if it cannot be created
- * @since 1.14
- *
- * @ingroup Clipper
- */
-EAPI Evas_Object                 *elm_clipper_add(Evas_Object *parent);
-
-#include "elm_clipper.eo.legacy.h"