aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2018-02-14 21:14:52 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2018-02-15 13:11:00 -0500
commit1a65fa5dbc261bde4b73bdc88e6ce3dc99461b35 (patch)
tree98f98404564562f7d999bdb1b9efd31de55c8970
parentelm_entry: remove 'calc_force' (diff)
downloadefl-1a65fa5dbc261bde4b73bdc88e6ce3dc99461b35.tar.gz
elm_gengrid: remove some properties implemented in scrollable
-rw-r--r--src/lib/elementary/elm_gengrid.c28
-rw-r--r--src/lib/elementary/elm_gengrid.eo42
-rw-r--r--src/lib/elementary/elm_gengrid_legacy.h64
-rw-r--r--src/lib/elementary/elm_widget_gengrid.h1
4 files changed, 76 insertions, 59 deletions
diff --git a/src/lib/elementary/elm_gengrid.c b/src/lib/elementary/elm_gengrid.c
index 3130ea65a7..114890b969 100644
--- a/src/lib/elementary/elm_gengrid.c
+++ b/src/lib/elementary/elm_gengrid.c
@@ -4980,8 +4980,8 @@ elm_gengrid_bounce_get(const Evas_Object *obj,
elm_interface_scrollable_bounce_allow_get(obj, h_bounce, v_bounce);
}
-EOLIAN static void
-_elm_gengrid_page_relative_set(Eo *obj, Elm_Gengrid_Data *_pd EINA_UNUSED, double h_pagerel, double v_pagerel)
+EAPI void
+elm_gengrid_page_relative_set(Eo *obj, double h_pagerel, double v_pagerel)
{
Evas_Coord pagesize_h;
Evas_Coord pagesize_v;
@@ -4991,14 +4991,14 @@ _elm_gengrid_page_relative_set(Eo *obj, Elm_Gengrid_Data *_pd EINA_UNUSED, doubl
(obj, h_pagerel, v_pagerel, pagesize_h, pagesize_v);
}
-EOLIAN static void
-_elm_gengrid_page_relative_get(Eo *obj, Elm_Gengrid_Data *_pd EINA_UNUSED, double *h_pagerel, double *v_pagerel)
+EAPI void
+elm_gengrid_page_relative_get(const Eo *obj, double *h_pagerel, double *v_pagerel)
{
elm_interface_scrollable_paging_get(obj, h_pagerel, v_pagerel, NULL, NULL);
}
-EOLIAN static void
-_elm_gengrid_page_size_set(Eo *obj, Elm_Gengrid_Data *_pd EINA_UNUSED, Evas_Coord h_pagesize, Evas_Coord v_pagesize)
+EAPI void
+elm_gengrid_page_size_set(Eo *obj, Evas_Coord h_pagesize, Evas_Coord v_pagesize)
{
double pagerel_h;
double pagerel_v;
@@ -5535,20 +5535,16 @@ _elm_gengrid_elm_interface_scrollable_item_loop_enabled_get(Eo *obj EINA_UNUSED,
return sd->item_loop_enable;
}
-EOLIAN static void
-_elm_gengrid_wheel_disabled_set(Eo *obj, Elm_Gengrid_Data *sd, Eina_Bool disabled)
+EAPI void
+elm_gengrid_wheel_disabled_set(Eo *obj, Eina_Bool disabled)
{
- disabled = !!disabled;
- if (sd->wheel_disabled != disabled)
- elm_interface_scrollable_wheel_disabled_set(obj, disabled);
-
- sd->wheel_disabled = disabled;
+ elm_interface_scrollable_wheel_disabled_set(obj, disabled);
}
-EOLIAN static Eina_Bool
-_elm_gengrid_wheel_disabled_get(Eo *obj EINA_UNUSED, Elm_Gengrid_Data *sd)
+EAPI Eina_Bool
+elm_gengrid_wheel_disabled_get(const Eo *obj)
{
- return sd->wheel_disabled;
+ return elm_interface_scrollable_wheel_disabled_get(obj);
}
EOLIAN static void
diff --git a/src/lib/elementary/elm_gengrid.eo b/src/lib/elementary/elm_gengrid.eo
index 508bb9a449..f392c1a0ff 100644
--- a/src/lib/elementary/elm_gengrid.eo
+++ b/src/lib/elementary/elm_gengrid.eo
@@ -67,17 +67,6 @@ class Elm.Gengrid (Efl.Ui.Layout, Efl.Ui.Focus.Composition, Elm.Interface_Scroll
fill: bool; [[$true if the grid is filled, $false otherwise]]
}
}
- @property page_relative {
- [[Control a given gengrid widget's scrolling page size, relative
- to its viewport size.
- ]]
- set {}
- get {}
- values {
- h_pagerel: double; [[Page relation horizontal]]
- v_pagerel: double; [[Page relation vertical]]
- }
- }
@property multi_select {
set {
[[Enable or disable multi-selection in a given gengrid widget.
@@ -269,15 +258,6 @@ class Elm.Gengrid (Efl.Ui.Layout, Efl.Ui.Focus.Composition, Elm.Interface_Scroll
$false to expand vertically.]]
}
}
- @property page_size {
- set {
- [[Set a given gengrid widget's scrolling page size.]]
- }
- values {
- h_pagesize: int; [[Page size horizontal]]
- v_pagesize: int; [[Page size vertical]]
- }
- }
@property selected_item {
get {
[[Get the selected item in a given gengrid widget.
@@ -348,28 +328,6 @@ class Elm.Gengrid (Efl.Ui.Layout, Efl.Ui.Focus.Composition, Elm.Interface_Scroll
(and on errors).]]
}
}
- @property wheel_disabled {
- set {
- [[Enable or disable mouse wheel to be used to scroll the gengrid.
-
- Mouse wheel can be used for the user to scroll up and down
- the gengrid.
-
- Wheel is enabled by default.
- ]]
- }
- get {
- [[Get a value whether mouse wheel is enabled or not.
-
- Mouse wheel can be used for the user to scroll up and down
- the gengrid.
- ]]
- }
- values {
- disabled: bool; [[Use $true to disable mouse wheel or $false
- to enable it.]]
- }
- }
item_insert_before {
[[Insert an item before another in a gengrid widget.
diff --git a/src/lib/elementary/elm_gengrid_legacy.h b/src/lib/elementary/elm_gengrid_legacy.h
index d1ee0cc516..0b30cb51a7 100644
--- a/src/lib/elementary/elm_gengrid_legacy.h
+++ b/src/lib/elementary/elm_gengrid_legacy.h
@@ -211,5 +211,69 @@ EINA_DEPRECATED EAPI void elm_gengrid_last_page_get(const Evas_Object *
*/
EINA_DEPRECATED EAPI void elm_gengrid_page_bring_in(const Evas_Object *obj, int h_pagenumber, int v_pagenumber);
+/**
+ * @brief Set a given gengrid widget's scrolling page size.
+ *
+ * @param[in] obj The object.
+ * @param[in] h_pagesize Page size horizontal
+ * @param[in] v_pagesize Page size vertical
+ *
+ * @ingroup Elm_Gengrid
+ */
+EAPI void elm_gengrid_page_size_set(Evas_Object *obj, int h_pagesize, int v_pagesize);
+
+/**
+ * @brief Control a given gengrid widget's scrolling page size, relative to
+ * its viewport size.
+ *
+ * @param[in] obj The object.
+ * @param[in] h_pagerel Page relation horizontal
+ * @param[in] v_pagerel Page relation vertical
+ *
+ * @ingroup Elm_Gengrid
+ */
+EAPI void elm_gengrid_page_relative_set(Evas_Object *obj, double h_pagerel, double v_pagerel);
+
+/**
+ * @brief Control a given gengrid widget's scrolling page size, relative to
+ * its viewport size.
+ *
+ * @param[in] obj The object.
+ * @param[out] h_pagerel Page relation horizontal
+ * @param[out] v_pagerel Page relation vertical
+ *
+ * @ingroup Elm_Gengrid
+ */
+EAPI void elm_gengrid_page_relative_get(const Evas_Object *obj, double *h_pagerel, double *v_pagerel);
+
+
+/**
+ * @brief Enable or disable mouse wheel to be used to scroll the gengrid.
+ *
+ * Mouse wheel can be used for the user to scroll up and down the gengrid.
+ *
+ * Wheel is enabled by default.
+ *
+ * @param[in] obj The object.
+ * @param[in] disabled Use @c true to disable mouse wheel or @c false to enable
+ * it.
+ *
+ * @ingroup Elm_Gengrid
+ */
+EAPI void elm_gengrid_wheel_disabled_set(Evas_Object *obj, Eina_Bool disabled);
+
+/**
+ * @brief Get a value whether mouse wheel is enabled or not.
+ *
+ * Mouse wheel can be used for the user to scroll up and down the gengrid.
+ *
+ * @param[in] obj The object.
+ *
+ * @return Use @c true to disable mouse wheel or @c false to enable it.
+ *
+ * @ingroup Elm_Gengrid
+ */
+EAPI Eina_Bool elm_gengrid_wheel_disabled_get(const Evas_Object *obj);
+
#include "elm_gengrid_item.eo.legacy.h"
#include "elm_gengrid.eo.legacy.h"
diff --git a/src/lib/elementary/elm_widget_gengrid.h b/src/lib/elementary/elm_widget_gengrid.h
index 56e5813300..8f728b1c9a 100644
--- a/src/lib/elementary/elm_widget_gengrid.h
+++ b/src/lib/elementary/elm_widget_gengrid.h
@@ -129,7 +129,6 @@ struct _Elm_Gengrid_Data
Eina_Bool show_region : 1;
Eina_Bool bring_in : 1;
Eina_Bool mouse_down : 1; /**< a flag that mouse is down on the list at the moment. this flag is set to true on mouse and reset to false on mouse up */
- Eina_Bool wheel_disabled : 1; /**< a flag that shows mouse wheel is disabled or not. */
/**< value whether item loop feature is enabled or not. */
Eina_Bool item_loop_enable : 1;