summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-05-30 23:13:02 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-05-31 15:41:20 +0900
commitf767e8bea4b817ca900221d98b432f28488d07a9 (patch)
tree4ae8dd1b635c20a468c21fc7884747c886976da9
parent2949329d4ba5f7b4b3f59c173b31186dfb381d8b (diff)
edje: Move part drag APIs to efl_part
This moves all part_drag APIs to legacy and implements them for EO using efl_part(). All parts now support these APIs, even if they are not draggable. Making this more fine grained would probably be much extra work for little gain. This creates a new interface Efl.Ui.Drag.
-rw-r--r--src/Makefile_Efl.am2
-rw-r--r--src/lib/edje/Edje_Common.h23
-rw-r--r--src/lib/edje/Edje_Legacy.h253
-rw-r--r--src/lib/edje/edje_legacy.c67
-rw-r--r--src/lib/edje/edje_object.eo176
-rw-r--r--src/lib/edje/edje_part.c70
-rw-r--r--src/lib/edje/edje_private.h13
-rw-r--r--src/lib/edje/edje_types.eot8
-rw-r--r--src/lib/edje/edje_util.c44
-rw-r--r--src/lib/edje/efl_canvas_layout_internal.eo12
-rw-r--r--src/lib/efl/Efl.h3
-rw-r--r--src/lib/efl/interfaces/efl_interfaces_main.c1
-rw-r--r--src/lib/efl/interfaces/efl_ui_drag.eo163
-rw-r--r--src/lib/efl/interfaces/efl_ui_types.eot7
-rw-r--r--src/lib/elementary/elm_spinner.c6
-rw-r--r--src/lib/evas/canvas/efl_ui_draggable.eo1
-rw-r--r--src/tests/emotion/emotion_test_main-eo.c12
17 files changed, 621 insertions, 240 deletions
diff --git a/src/Makefile_Efl.am b/src/Makefile_Efl.am
index 60041ed..dbf968e 100644
--- a/src/Makefile_Efl.am
+++ b/src/Makefile_Efl.am
@@ -44,6 +44,7 @@ efl_eolian_files = \
44 lib/efl/interfaces/efl_vpath_file.eo \ 44 lib/efl/interfaces/efl_vpath_file.eo \
45 lib/efl/interfaces/efl_vpath_core.eo \ 45 lib/efl/interfaces/efl_vpath_core.eo \
46 lib/efl/interfaces/efl_vpath_file_core.eo \ 46 lib/efl/interfaces/efl_vpath_file_core.eo \
47 lib/efl/interfaces/efl_ui_drag.eo \
47 lib/efl/interfaces/efl_ui_spin.eo \ 48 lib/efl/interfaces/efl_ui_spin.eo \
48 lib/efl/interfaces/efl_ui_progress.eo \ 49 lib/efl/interfaces/efl_ui_progress.eo \
49 lib/efl/interfaces/efl_ui_view.eo \ 50 lib/efl/interfaces/efl_ui_view.eo \
@@ -68,6 +69,7 @@ efl_eolian_files = \
68 69
69efl_eolian_type_files = \ 70efl_eolian_type_files = \
70 lib/efl/interfaces/efl_gfx_types.eot \ 71 lib/efl/interfaces/efl_gfx_types.eot \
72 lib/efl/interfaces/efl_ui_types.eot \
71 lib/efl/interfaces/efl_input_types.eot \ 73 lib/efl/interfaces/efl_input_types.eot \
72 lib/efl/interfaces/efl_types.eot \ 74 lib/efl/interfaces/efl_types.eot \
73 lib/efl/interfaces/efl_text_types.eot \ 75 lib/efl/interfaces/efl_text_types.eot \
diff --git a/src/lib/edje/Edje_Common.h b/src/lib/edje/Edje_Common.h
index baa6846..3a1ec21 100644
--- a/src/lib/edje/Edje_Common.h
+++ b/src/lib/edje/Edje_Common.h
@@ -1449,29 +1449,6 @@ typedef enum _Edje_Aspect_Control
1449 */ 1449 */
1450 1450
1451/** 1451/**
1452 * @defgroup Edje_Part_Drag Edje Drag
1453 * @ingroup Edje_Object_Part
1454 *
1455 * @brief Functions that deal with dragable parts.
1456 *
1457 * To create a movable part it must be declared as dragable
1458 * in EDC file. To do so, one must define a "dragable" block inside
1459 * the "part" block.
1460 *
1461 * These functions are used to set dragging properties to a
1462 * part or get dragging information about it.
1463 *
1464 * @see @ref tutorial_edje_drag
1465 *
1466 *
1467 * @{
1468 */
1469
1470/**
1471 * @}
1472 */
1473
1474/**
1475 * @defgroup Edje_Part_Box Edje Box Part 1452 * @defgroup Edje_Part_Box Edje Box Part
1476 * @ingroup Edje_Object_Part 1453 * @ingroup Edje_Object_Part
1477 * 1454 *
diff --git a/src/lib/edje/Edje_Legacy.h b/src/lib/edje/Edje_Legacy.h
index 3a802d4..891fd7c 100644
--- a/src/lib/edje/Edje_Legacy.h
+++ b/src/lib/edje/Edje_Legacy.h
@@ -1019,5 +1019,258 @@ EAPI Eina_Bool edje_object_color_class_get(const Evas_Object *obj, const char *
1019 */ 1019 */
1020EAPI void edje_object_part_text_select_allow_set(const Edje_Object *obj, const char *part, Eina_Bool allow); 1020EAPI void edje_object_part_text_select_allow_set(const Edje_Object *obj, const char *part, Eina_Bool allow);
1021 1021
1022/**
1023 * @defgroup Edje_Part_Drag Edje Drag
1024 * @ingroup Edje_Object_Part
1025 *
1026 * @brief Functions that deal with dragable parts.
1027 *
1028 * To create a movable part it must be declared as dragable
1029 * in EDC file. To do so, one must define a "dragable" block inside
1030 * the "part" block.
1031 *
1032 * These functions are used to set dragging properties to a
1033 * part or get dragging information about it.
1034 *
1035 * @see @ref tutorial_edje_drag *
1036 *
1037 * @{
1038 */
1039
1040/** Dragable properties values */
1041typedef Efl_Ui_Drag_Dir Edje_Drag_Dir;
1042/** Not dragable */
1043#define EDJE_DRAG_DIR_NONE EFL_UI_DRAG_DIR_NONE
1044/** Dragable horizontally */
1045#define EDJE_DRAG_DIR_X EFL_UI_DRAG_DIR_X
1046/** Dragable verically */
1047#define EDJE_DRAG_DIR_Y EFL_UI_DRAG_DIR_Y
1048/** Dragable in both directions */
1049#define EDJE_DRAG_DIR_XY EFL_UI_DRAG_DIR_XY
1050
1051
1052/**
1053 * @brief Sets the dragable object location.
1054 *
1055 * Places the dragable object at the given location.
1056 *
1057 * Values for dx and dy are real numbers that range from 0 to 1, representing
1058 * the relative position to the dragable area on that axis.
1059 *
1060 * This value means, for the vertical axis, that 0.0 will be at the top if the
1061 * first parameter of @c y in the dragable part theme is 1, and at bottom if it
1062 * is -1.
1063 *
1064 * For the horizontal axis, 0.0 means left if the first parameter of @c x in
1065 * the dragable part theme is 1, and right if it is -1.
1066 *
1067 * See also @ref edje_object_part_drag_value_get()
1068 *
1069 * @param[in] part The part name
1070 * @param[in] dx The x value
1071 * @param[in] dy The y value
1072 *
1073 * @return @c true on success, @c false otherwise
1074 *
1075 * @ingroup Edje_Object
1076 */
1077EAPI Eina_Bool edje_object_part_drag_value_set(Edje_Object *obj, const char * part, double dx, double dy);
1078
1079/**
1080 * @brief Gets the dragable object location.
1081 *
1082 * Values for dx and dy are real numbers that range from 0 to 1, representing
1083 * the relative position to the dragable area on that axis.
1084 *
1085 * See also @ref edje_object_part_drag_value_set()
1086 *
1087 * Gets the drag location values.
1088 *
1089 * @param[in] part The part name
1090 * @param[out] dx The x value
1091 * @param[out] dy The y value
1092 *
1093 * @return @c true on success, @c false otherwise
1094 *
1095 * @ingroup Edje_Object
1096 */
1097EAPI Eina_Bool edje_object_part_drag_value_get(const Edje_Object *obj, const char * part, double *dx, double *dy);
1098
1099/**
1100 * @brief Sets the dragable object size.
1101 *
1102 * Values for dw and dh are real numbers that range from 0 to 1, representing
1103 * the relative size of the dragable area on that axis.
1104 *
1105 * Sets the size of the dragable object.
1106 *
1107 * See also @ref edje_object_part_drag_size_get()
1108 *
1109 * @param[in] part The part name
1110 * @param[in] dw The drag width
1111 * @param[in] dh The drag height
1112 *
1113 * @return @c true on success, @c false otherwise
1114 *
1115 * @ingroup Edje_Object
1116 */
1117EAPI Eina_Bool edje_object_part_drag_size_set(Edje_Object *obj, const char * part, double dw, double dh);
1118
1119/**
1120 * @brief Gets the dragable object size.
1121 *
1122 * Gets the dragable object size.
1123 *
1124 * See also @ref edje_object_part_drag_size_set()
1125 *
1126 * @param[in] part The part name
1127 * @param[out] dw The drag width
1128 * @param[out] dh The drag height
1129 *
1130 * @return @c true on success, @c false otherwise
1131 *
1132 * @ingroup Edje_Object
1133 */
1134EAPI Eina_Bool edje_object_part_drag_size_get(const Edje_Object *obj, const char * part, double *dw, double *dh);
1135
1136/**
1137 * @brief Determines dragable directions.
1138 *
1139 * The dragable directions are defined in the EDC file, inside the @ref
1140 * dragable section, by the attributes @c x and @c y. See the @ref edcref for
1141 * more information.
1142 *
1143 * @param[in] part The part name
1144 *
1145 * @return #EDJE_DRAG_DIR_NONE: Not dragable #EDJE_DRAG_DIR_X: Dragable in X
1146 * direction #EDJE_DRAG_DIR_Y: Dragable in Y direction #EDJE_DRAG_DIR_XY:
1147 * Dragable in X & Y directions
1148 *
1149 * @ingroup Edje_Object
1150 */
1151EAPI Edje_Drag_Dir edje_object_part_drag_dir_get(const Edje_Object *obj, const char * part);
1152
1153/**
1154 * @brief Sets the drag step increment.
1155 *
1156 * Sets the x,y step increments for a dragable object.
1157 *
1158 * Values for dx and dy are real numbers that range from 0 to 1, representing
1159 * the relative size of the dragable area on that axis by which the part will
1160 * be moved.
1161 *
1162 * See also @ref edje_object_part_drag_step_get()
1163 *
1164 * @param[in] part The part name
1165 * @param[in] dx The x step amount
1166 * @param[in] dy The y step amount
1167 *
1168 * @return @c true on success, @c false otherwise
1169 *
1170 * @ingroup Edje_Object
1171 */
1172EAPI Eina_Bool edje_object_part_drag_step_set(Edje_Object *obj, const char * part, double dx, double dy);
1173
1174/**
1175 * @brief Gets the drag step increment values.
1176 *
1177 * Gets the x and y step increments for the dragable object.
1178 *
1179 * See also @ref edje_object_part_drag_step_set()
1180 *
1181 * @param[in] part The part name
1182 * @param[out] dx The x step amount
1183 * @param[out] dy The y step amount
1184 *
1185 * @return @c true on success, @c false otherwise
1186 *
1187 * @ingroup Edje_Object
1188 */
1189EAPI Eina_Bool edje_object_part_drag_step_get(const Edje_Object *obj, const char * part, double *dx, double *dy);
1190
1191/**
1192 * @brief Steps the dragable x,y steps.
1193 *
1194 * Steps x,y where the step increment is the amount set by
1195 * @ref edje_object_part_drag_step_set().
1196 *
1197 * Values for dx and dy are real numbers that range from 0 to 1.
1198 *
1199 * See also @ref edje_object_part_drag_page()
1200 *
1201 * @param[in] part The part name
1202 * @param[in] dx The x step
1203 * @param[in] dy The y step
1204 *
1205 * @return @c true on success, @c false otherwise
1206 *
1207 * @ingroup Edje_Object
1208 */
1209EAPI Eina_Bool edje_object_part_drag_step(Edje_Object *obj, const char *part, double dx, double dy);
1210
1211/**
1212 * @brief Sets the page step increments.
1213 *
1214 * Sets the x,y page step increment values.
1215 *
1216 * Values for dx and dy are real numbers that range from 0 to 1, representing
1217 * the relative size of the dragable area on that axis by which the part will
1218 * be moved.
1219 *
1220 * See also @ref edje_object_part_drag_page_get()
1221 *
1222 * @param[in] part The part name
1223 * @param[in] dx The x page step increment
1224 * @param[in] dy The y page step increment
1225 *
1226 * @return @c true on success, @c false otherwise
1227 *
1228 * @ingroup Edje_Object
1229 */
1230EAPI Eina_Bool edje_object_part_drag_page_set(Edje_Object *obj, const char * part, double dx, double dy);
1231
1232/**
1233 * @brief Gets the page step increments.
1234 *
1235 * Gets the x,y page step increments for the dragable object.
1236 *
1237 * See also @ref edje_object_part_drag_page_set()
1238 *
1239 * @param[in] part The part name
1240 * @param[out] dx The x page step increment
1241 * @param[out] dy The y page step increment
1242 *
1243 * @return @c true on success, @c false otherwise
1244 *
1245 * @ingroup Edje_Object
1246 */
1247EAPI Eina_Bool edje_object_part_drag_page_get(const Edje_Object *obj, const char * part, double *dx, double *dy);
1248
1249/**
1250 * @brief Pages x,y steps.
1251 *
1252 * Pages x,y where the increment is defined by
1253 * @ref edje_object_part_drag_page_set().
1254 *
1255 * Values for dx and dy are real numbers that range from 0 to 1.
1256 *
1257 * @warning Paging is bugged!
1258 *
1259 * See also @ref edje_object_part_drag_step()
1260 *
1261 * @param[in] part The part name
1262 * @param[in] dx The x step
1263 * @param[in] dy The y step
1264 *
1265 * @return @c true on success, @c false otherwise
1266 *
1267 * @ingroup Edje_Object
1268 */
1269EAPI Eina_Bool edje_object_part_drag_page(Edje_Object *obj, const char *part, double dx, double dy);
1270
1271/**
1272 * @}
1273 */
1274
1022#include "edje_object.eo.legacy.h" 1275#include "edje_object.eo.legacy.h"
1023#include "edje_edit.eo.legacy.h" 1276#include "edje_edit.eo.legacy.h"
diff --git a/src/lib/edje/edje_legacy.c b/src/lib/edje/edje_legacy.c
index c2608ae..f1e8ba4 100644
--- a/src/lib/edje/edje_legacy.c
+++ b/src/lib/edje/edje_legacy.c
@@ -132,3 +132,70 @@ edje_object_part_external_content_get(const Edje_Object *obj, const char *part,
132 Edje *ed = _edje_fetch(obj); 132 Edje *ed = _edje_fetch(obj);
133 return _edje_object_part_external_content_get(ed, part, content); 133 return _edje_object_part_external_content_get(ed, part, content);
134} 134}
135
136/* Legacy part drag APIs */
137EAPI Edje_Drag_Dir
138edje_object_part_drag_dir_get(const Evas_Object *obj, const char *part)
139{
140 return efl_ui_drag_dir_get(efl_part(obj, part));
141}
142
143EAPI Eina_Bool
144edje_object_part_drag_value_set(Evas_Object *obj, const char *part, double dx, double dy)
145{
146 return efl_ui_drag_value_set(efl_part(obj, part), dx, dy);
147}
148
149EAPI Eina_Bool
150edje_object_part_drag_value_get(const Evas_Object *obj, const char *part, double *dx, double *dy)
151{
152 return efl_ui_drag_value_get(efl_part(obj, part), dx, dy);
153}
154
155EAPI Eina_Bool
156edje_object_part_drag_size_set(Evas_Object *obj, const char *part, double dw, double dh)
157{
158 return efl_ui_drag_size_set(efl_part(obj, part), dw, dh);
159}
160
161EAPI Eina_Bool
162edje_object_part_drag_size_get(const Evas_Object *obj, const char *part, double *dw, double *dh)
163{
164 return efl_ui_drag_size_get(efl_part(obj, part), dw, dh);
165}
166
167EAPI Eina_Bool
168edje_object_part_drag_step_set(Evas_Object *obj, const char *part, double dx, double dy)
169{
170 return efl_ui_drag_step_set(efl_part(obj, part), dx, dy);
171}
172
173EAPI Eina_Bool
174edje_object_part_drag_step_get(const Evas_Object *obj, const char *part, double *dx, double *dy)
175{
176 return efl_ui_drag_step_get(efl_part(obj, part), dx, dy);
177}
178
179EAPI Eina_Bool
180edje_object_part_drag_page_set(Evas_Object *obj, const char *part, double dx, double dy)
181{
182 return efl_ui_drag_page_set(efl_part(obj, part), dx, dy);
183}
184
185EAPI Eina_Bool
186edje_object_part_drag_page_get(const Evas_Object *obj, const char *part, double *dx, double *dy)
187{
188 return efl_ui_drag_page_get(efl_part(obj, part), dx, dy);
189}
190
191EAPI Eina_Bool
192edje_object_part_drag_step(Evas_Object *obj, const char *part, double dx, double dy)
193{
194 return efl_ui_drag_step_move(efl_part(obj, part), dx, dy);
195}
196
197EAPI Eina_Bool
198edje_object_part_drag_page(Evas_Object *obj, const char *part, double dx, double dy)
199{
200 return efl_ui_drag_page_move(efl_part(obj, part), dx, dy);
201}
diff --git a/src/lib/edje/edje_object.eo b/src/lib/edje/edje_object.eo
index ec7947d..d40a6a3 100644
--- a/src/lib/edje/edje_object.eo
+++ b/src/lib/edje/edje_object.eo
@@ -827,7 +827,7 @@ class Edje.Object (Efl.Canvas.Group.Clipped, Efl.File, Efl.Container, Efl.Part,
827 [[Checks if a part exists in a given Edje object's group definition. 827 [[Checks if a part exists in a given Edje object's group definition.
828 828
829 This function returns if a given part exists in the Edje group 829 This function returns if a given part exists in the Edje group
830 bound to this object (with @Efl.File.set()). 830 bound to this object (with @Efl.File.file.set()).
831 831
832 This call is useful, for example, when one could expect or not a 832 This call is useful, for example, when one could expect or not a
833 given GUI element, depending on the theme applied to the object. 833 given GUI element, depending on the theme applied to the object.
@@ -843,180 +843,6 @@ class Edje.Object (Efl.Canvas.Group.Clipped, Efl.File, Efl.Container, Efl.Part,
843 } 843 }
844 } 844 }
845 845
846 /* DRAG PART APIS BEGIN ---------------------------------------------- */
847 // FIXME: "dragable" or "draggable"? Only EFL uses "dragable"...
848 @property part_drag_value {
849 [[The dragable object relative location.
850
851 Some parts in Edje can be dragged along the X/Y axes, if the part
852 contains a "dragable" section (in EDC). For instance, scroll bars
853 can be dragable objects.
854
855 $dx and $dy are real numbers that range from 0 to 1, representing
856 the relative position to the dragable area on that axis.
857
858 This value means, for the vertical axis, that 0.0 will be at the top
859 if the first parameter of $y in the dragable part theme is 1, and at
860 the bottom if it is -1.
861
862 For the horizontal axis, 0.0 means left if the first parameter of $x
863 in the dragable part theme is 1, and right if it is -1.
864 ]]
865 set {
866 [[Sets the dragable object location.
867
868 This places the dragable object at the given location.
869 ]]
870 return: bool; [[$true on success, $false otherwise]]
871 }
872 get {
873 [[Gets the dragable object location.]]
874 return: bool; [[$true on success, $false otherwise]]
875 }
876 keys {
877 part: string; [[The part name]]
878 }
879 values {
880 dx: double; [[The x relative position, from 0 to 1.]]
881 dy: double; [[The y relative position, from 0 to 1.]]
882 }
883 }
884 @property part_drag_size {
885 [[The dragable object relative size.
886
887 Values for $dw and $dh are real numbers that range from 0 to 1,
888 representing the relative size of the dragable area on that axis.
889
890 For instance a scroll bar handle size may depend on much large is
891 the scroller's content.
892 ]]
893 set {
894 [[Sets the size of the dragable object.]]
895 return: bool; [[$true on success, $false otherwise]]
896 }
897 get {
898 [[Gets the size of the dradgable object.]]
899 return: bool; [[$true on success, $false otherwise]]
900 }
901 keys {
902 part: string; [[The part name]]
903 }
904 values {
905 dw: double; [[The drag relative width, from 0 to 1.]]
906 dh: double; [[The drag relative height, from 0 to 1.]]
907 }
908 }
909 @property part_drag_dir {
910 [[Determines the dragable directions (read-only).
911
912 The dragable directions are defined in the EDC file, inside the
913 "dragable" section, by the attributes $x and $y. See the EDC
914 reference documentation for more information.
915 ]]
916 get {
917 [[Gets the dragable direction.]]
918 return: Edje.Drag_Dir; [[#EDJE_DRAG_DIR_NONE: Not dragable
919 #EDJE_DRAG_DIR_X: dragable in X direction
920 #EDJE_DRAG_DIR_Y: dragable in Y direction
921 #EDJE_DRAG_DIR_XY: dragable in X & Y directions]]
922 }
923 keys {
924 part: string; [[The part name]]
925 }
926 }
927 @property part_drag_step {
928 [[The drag step increment.
929
930 Values for $dx and $dy are real numbers that range from 0 to 1,
931 representing the relative size of the dragable area on that axis by
932 which the part will be moved.
933
934 This differs from @.part_drag_page in that this is meant to
935 represent a unit increment, like a single line for example.
936
937 See also @.part_drag_page.
938 ]]
939 set {
940 [[Sets the x,y step increments for a dragable object.]]
941 return: bool; [[$true on success, $false otherwise]]
942 }
943 get {
944 [[Gets the x and y step increments for the dragable object.]]
945 return: bool; [[$true on success, $false otherwise]]
946 }
947 keys {
948 part: string; [[The part name]]
949 }
950 values {
951 dx: double; [[The x step relative amount, from 0 to 1.]]
952 dy: double; [[The y step relative amount, from 0 to 1.]]
953 }
954 }
955 part_drag_step {
956 [[Moves the dragable by $dx,$dy steps.
957
958 This moves the dragable part by $dx,$dy steps where the step
959 increment is the amount set by @.part_drag_step.set().
960
961 $dx and $dy can be positive or negative numbers, integer values are
962 recommended.
963 ]]
964 return: bool; [[$true on success, $false otherwise]]
965 params {
966 @in part: string; [[The part name]]
967 @in dx: double; [[The number of steps horizontally.]]
968 @in dy: double; [[The number of steps vertically.]]
969 }
970 }
971 @property part_drag_page {
972 [[The page step increments.
973
974 Values for $dx and $dy are real numbers that range from 0 to 1,
975 representing the relative size of the dragable area on that axis by
976 which the part will be moved.
977
978 This differs from @.part_drag_step in that this is meant to be a
979 larger step size, basically an entire page as opposed to a single
980 or couple of lines.
981
982 See also @.part_drag_step.
983 ]]
984 set {
985 [[Sets the x,y page step increment values.]]
986 return: bool; [[$true on success, $false otherwise]]
987 }
988 get {
989 [[Gets the x,y page step increments for the dragable object.]]
990 return: bool; [[$true on success, $false otherwise]]
991 }
992 keys {
993 part: string; [[The part name]]
994 }
995 values {
996 dx: double; [[The x page step increment]]
997 dy: double; [[The y page step increment]]
998 }
999 }
1000 part_drag_page {
1001 [[Moves the dragable by $dx,$dy pages.
1002
1003 This moves the dragable by $dx,$dy pages where the increment is
1004 defined by @.part_drag_page.set().
1005
1006 $dx and $dy can be positive or negative numbers, integer values are
1007 recommended.
1008
1009 Warning: Paging is bugged!
1010 ]]
1011 return: bool; [[$true on success, $false otherwise]]
1012 params {
1013 @in part: string; [[The part name]]
1014 @in dx: double; [[The number of pages horizontally.]]
1015 @in dy: double; [[The number of pages vertically.]]
1016 }
1017 }
1018 /* DRAG PART APIS END ------------------------------------------------ */
1019
1020 /* TEXT PART APIS BEGIN ---------------------------------------------- */ 846 /* TEXT PART APIS BEGIN ---------------------------------------------- */
1021 @property text_change_cb { 847 @property text_change_cb {
1022 set { 848 set {
diff --git a/src/lib/edje/edje_part.c b/src/lib/edje/edje_part.c
index b4049ed..deeb0d1 100644
--- a/src/lib/edje/edje_part.c
+++ b/src/lib/edje/edje_part.c
@@ -40,7 +40,7 @@ _efl_canvas_layout_internal_efl_object_finalize(Eo *obj, Efl_Canvas_Layout_Inter
40} 40}
41 41
42EOLIAN void 42EOLIAN void
43_efl_canvas_layout_internal_efl_gfx_geometry_get(Eo *obj EINA_UNUSED, Efl_Canvas_Layout_Internal_Data *pd, int *x, int *y, int *w, int *h) 43_efl_canvas_layout_internal_efl_gfx_geometry_get(Eo *obj, Efl_Canvas_Layout_Internal_Data *pd, int *x, int *y, int *w, int *h)
44{ 44{
45 Edje_Real_Part *rp = pd->rp; 45 Edje_Real_Part *rp = pd->rp;
46 46
@@ -61,7 +61,7 @@ _efl_canvas_layout_internal_efl_gfx_geometry_get(Eo *obj EINA_UNUSED, Efl_Canvas
61} 61}
62 62
63EOLIAN static void 63EOLIAN static void
64_efl_canvas_layout_internal_state_get(Eo *obj EINA_UNUSED, Efl_Canvas_Layout_Internal_Data *pd, const char **name, double *val) 64_efl_canvas_layout_internal_state_get(Eo *obj, Efl_Canvas_Layout_Internal_Data *pd, const char **name, double *val)
65{ 65{
66 const char *str; 66 const char *str;
67 67
@@ -71,4 +71,70 @@ _efl_canvas_layout_internal_state_get(Eo *obj EINA_UNUSED, Efl_Canvas_Layout_Int
71 RETURN_VOID; 71 RETURN_VOID;
72} 72}
73 73
74EOLIAN static Eina_Bool
75_efl_canvas_layout_internal_efl_ui_drag_drag_value_set(Eo *obj, Efl_Canvas_Layout_Internal_Data *pd, double dx, double dy)
76{
77 RETURN_VAL(_edje_object_part_drag_value_set(pd->ed, pd->part, dx, dy));
78}
79
80EOLIAN static Eina_Bool
81_efl_canvas_layout_internal_efl_ui_drag_drag_value_get(Eo *obj, Efl_Canvas_Layout_Internal_Data *pd, double *dx, double *dy)
82{
83 RETURN_VAL(_edje_object_part_drag_value_get(pd->ed, pd->part, dx, dy));
84}
85
86EOLIAN static Eina_Bool
87_efl_canvas_layout_internal_efl_ui_drag_drag_size_set(Eo *obj, Efl_Canvas_Layout_Internal_Data *pd, double dw, double dh)
88{
89 RETURN_VAL(_edje_object_part_drag_size_set(pd->ed, pd->part, dw, dh));
90}
91
92EOLIAN static Eina_Bool
93_efl_canvas_layout_internal_efl_ui_drag_drag_size_get(Eo *obj, Efl_Canvas_Layout_Internal_Data *pd, double *dw, double *dh)
94{
95 RETURN_VAL(_edje_object_part_drag_size_get(pd->ed, pd->part, dw, dh));
96}
97
98EOLIAN static Efl_Ui_Drag_Dir
99_efl_canvas_layout_internal_efl_ui_drag_drag_dir_get(Eo *obj, Efl_Canvas_Layout_Internal_Data *pd)
100{
101 RETURN_VAL(_edje_object_part_drag_dir_get(pd->ed, pd->part));
102}
103
104EOLIAN static Eina_Bool
105_efl_canvas_layout_internal_efl_ui_drag_drag_step_set(Eo *obj, Efl_Canvas_Layout_Internal_Data *pd, double dx, double dy)
106{
107 RETURN_VAL(_edje_object_part_drag_step_set(pd->ed, pd->part, dx, dy));
108}
109
110EOLIAN static Eina_Bool
111_efl_canvas_layout_internal_efl_ui_drag_drag_step_get(Eo *obj, Efl_Canvas_Layout_Internal_Data *pd, double *dx, double *dy)
112{
113 RETURN_VAL(_edje_object_part_drag_step_get(pd->ed, pd->part, dx, dy));
114}
115
116EOLIAN static Eina_Bool
117_efl_canvas_layout_internal_efl_ui_drag_drag_step_move(Eo *obj, Efl_Canvas_Layout_Internal_Data *pd, double dx, double dy)
118{
119 RETURN_VAL(_edje_object_part_drag_step(pd->ed, pd->part, dx, dy));
120}
121
122EOLIAN static Eina_Bool
123_efl_canvas_layout_internal_efl_ui_drag_drag_page_set(Eo *obj, Efl_Canvas_Layout_Internal_Data *pd, double dx, double dy)
124{
125 RETURN_VAL(_edje_object_part_drag_page_set(pd->ed, pd->part, dx, dy));
126}
127
128EOLIAN static Eina_Bool
129_efl_canvas_layout_internal_efl_ui_drag_drag_page_get(Eo *obj, Efl_Canvas_Layout_Internal_Data *pd, double *dx, double *dy)
130{
131 RETURN_VAL(_edje_object_part_drag_page_get(pd->ed, pd->part, dx, dy));
132}
133
134EOLIAN static Eina_Bool
135_efl_canvas_layout_internal_efl_ui_drag_drag_page_move(Eo *obj, Efl_Canvas_Layout_Internal_Data *pd, double dx, double dy)
136{
137 RETURN_VAL(_edje_object_part_drag_page(pd->ed, pd->part, dx, dy));
138}
139
74#include "efl_canvas_layout_internal.eo.c" 140#include "efl_canvas_layout_internal.eo.c"
diff --git a/src/lib/edje/edje_private.h b/src/lib/edje/edje_private.h
index 79dddb5..11d3055 100644
--- a/src/lib/edje/edje_private.h
+++ b/src/lib/edje/edje_private.h
@@ -3095,6 +3095,19 @@ void _edje_real_part_ignore_flags_set(Edje *ed, Edje_Real_Part *rp, Evas_Event_F
3095Evas_Event_Flags _edje_real_part_mask_flags_get(Edje *ed, Edje_Real_Part *rp); 3095Evas_Event_Flags _edje_real_part_mask_flags_get(Edje *ed, Edje_Real_Part *rp);
3096void _edje_real_part_mask_flags_set(Edje *ed, Edje_Real_Part *rp, Evas_Event_Flags mask_flags); 3096void _edje_real_part_mask_flags_set(Edje *ed, Edje_Real_Part *rp, Evas_Event_Flags mask_flags);
3097 3097
3098/* part drag apis */
3099Edje_Drag_Dir _edje_object_part_drag_dir_get(Edje *ed, const char *part);
3100Eina_Bool _edje_object_part_drag_value_set(Edje *ed, const char *part, double dx, double dy);
3101Eina_Bool _edje_object_part_drag_value_get(Edje *ed, const char *part, double *dx, double *dy);
3102Eina_Bool _edje_object_part_drag_size_set(Edje *ed, const char *part, double dw, double dh);
3103Eina_Bool _edje_object_part_drag_size_get(Edje *ed, const char *part, double *dw, double *dh);
3104Eina_Bool _edje_object_part_drag_step_set(Edje *ed, const char *part, double dx, double dy);
3105Eina_Bool _edje_object_part_drag_step_get(Edje *ed, const char *part, double *dx, double *dy);
3106Eina_Bool _edje_object_part_drag_page_set(Edje *ed, const char *part, double dx, double dy);
3107Eina_Bool _edje_object_part_drag_page_get(Edje *ed, const char *part, double *dx, double *dy);
3108Eina_Bool _edje_object_part_drag_step(Edje *ed, const char *part, double dx, double dy);
3109Eina_Bool _edje_object_part_drag_page(Edje *ed, const char *part, double dx, double dy);
3110
3098/* part proxy */ 3111/* part proxy */
3099Eo *_edje_other_internal_proxy_get(Edje_Object *obj, Edje *ed, Edje_Real_Part *rp); 3112Eo *_edje_other_internal_proxy_get(Edje_Object *obj, Edje *ed, Edje_Real_Part *rp);
3100 3113
diff --git a/src/lib/edje/edje_types.eot b/src/lib/edje/edje_types.eot
index 9d7478b..2820bec 100644
--- a/src/lib/edje/edje_types.eot
+++ b/src/lib/edje/edje_types.eot
@@ -9,14 +9,6 @@ enum Edje.Cursor {
9 user_extra [[User extra cursor state]] 9 user_extra [[User extra cursor state]]
10} 10}
11 11
12enum Edje.Drag_Dir {
13 [[Dragable properties values]]
14 none = 0, [[Not dragable value]]
15 x = 1, [[X dragable value]]
16 y = 2, [[Y dragable value]]
17 xy = 3 [[X and Y dragable value]]
18}
19
20enum Edje.Text.Autocapital_Type { 12enum Edje.Text.Autocapital_Type {
21 [[All Text auto capital mode type values]] 13 [[All Text auto capital mode type values]]
22 none, [[None mode value]] 14 none, [[None mode value]]
diff --git a/src/lib/edje/edje_util.c b/src/lib/edje/edje_util.c
index 847fa61..252a4e4 100644
--- a/src/lib/edje/edje_util.c
+++ b/src/lib/edje/edje_util.c
@@ -4003,8 +4003,8 @@ _edje_object_part_state_get(Edje *ed, const char *part, double *val_ret)
4003 return ret; 4003 return ret;
4004} 4004}
4005 4005
4006EOLIAN Edje_Drag_Dir 4006Edje_Drag_Dir
4007_edje_object_part_drag_dir_get(Eo *obj EINA_UNUSED, Edje *ed, const char *part) 4007_edje_object_part_drag_dir_get(Edje *ed, const char *part)
4008{ 4008{
4009 Edje_Drag_Dir ret; 4009 Edje_Drag_Dir ret;
4010 Edje_Real_Part *rp; 4010 Edje_Real_Part *rp;
@@ -4026,8 +4026,8 @@ _edje_object_part_drag_dir_get(Eo *obj EINA_UNUSED, Edje *ed, const char *part)
4026 return ret; 4026 return ret;
4027} 4027}
4028 4028
4029EOLIAN Eina_Bool 4029Eina_Bool
4030_edje_object_part_drag_value_set(Eo *obj EINA_UNUSED, Edje *ed, const char *part, double dx, double dy) 4030_edje_object_part_drag_value_set(Edje *ed, const char *part, double dx, double dy)
4031{ 4031{
4032 Edje_Real_Part *rp; 4032 Edje_Real_Part *rp;
4033 Edje_User_Defined *eud; 4033 Edje_User_Defined *eud;
@@ -4079,8 +4079,8 @@ _edje_object_part_drag_value_set(Eo *obj EINA_UNUSED, Edje *ed, const char *part
4079} 4079}
4080 4080
4081/* FIXME: Should this be x and y instead of dx/dy? */ 4081/* FIXME: Should this be x and y instead of dx/dy? */
4082EOLIAN Eina_Bool 4082Eina_Bool
4083_edje_object_part_drag_value_get(Eo *obj EINA_UNUSED, Edje *ed, const char *part, double *dx, double *dy) 4083_edje_object_part_drag_value_get(Edje *ed, const char *part, double *dx, double *dy)
4084{ 4084{
4085 Edje_Real_Part *rp; 4085 Edje_Real_Part *rp;
4086 double ddx, ddy; 4086 double ddx, ddy;
@@ -4112,8 +4112,8 @@ _edje_object_part_drag_value_get(Eo *obj EINA_UNUSED, Edje *ed, const char *part
4112 return EINA_TRUE; 4112 return EINA_TRUE;
4113} 4113}
4114 4114
4115EOLIAN Eina_Bool 4115Eina_Bool
4116_edje_object_part_drag_size_set(Eo *obj EINA_UNUSED, Edje *ed, const char *part, double dw, double dh) 4116_edje_object_part_drag_size_set(Edje *ed, const char *part, double dw, double dh)
4117{ 4117{
4118 Edje_Real_Part *rp; 4118 Edje_Real_Part *rp;
4119 Edje_User_Defined *eud; 4119 Edje_User_Defined *eud;
@@ -4163,8 +4163,8 @@ _edje_object_part_drag_size_set(Eo *obj EINA_UNUSED, Edje *ed, const char *part,
4163 return EINA_TRUE; 4163 return EINA_TRUE;
4164} 4164}
4165 4165
4166EOLIAN Eina_Bool 4166Eina_Bool
4167_edje_object_part_drag_size_get(Eo *obj EINA_UNUSED, Edje *ed, const char *part, double *dw, double *dh) 4167_edje_object_part_drag_size_get(Edje *ed, const char *part, double *dw, double *dh)
4168{ 4168{
4169 Edje_Real_Part *rp; 4169 Edje_Real_Part *rp;
4170 4170
@@ -4191,8 +4191,8 @@ _edje_object_part_drag_size_get(Eo *obj EINA_UNUSED, Edje *ed, const char *part,
4191 return EINA_TRUE; 4191 return EINA_TRUE;
4192} 4192}
4193 4193
4194EOLIAN Eina_Bool 4194Eina_Bool
4195_edje_object_part_drag_step_set(Eo *obj EINA_UNUSED, Edje *ed, const char *part, double dx, double dy) 4195_edje_object_part_drag_step_set(Edje *ed, const char *part, double dx, double dy)
4196{ 4196{
4197 Edje_Real_Part *rp; 4197 Edje_Real_Part *rp;
4198 Edje_User_Defined *eud; 4198 Edje_User_Defined *eud;
@@ -4235,8 +4235,8 @@ _edje_object_part_drag_step_set(Eo *obj EINA_UNUSED, Edje *ed, const char *part,
4235 return EINA_TRUE; 4235 return EINA_TRUE;
4236} 4236}
4237 4237
4238EOLIAN Eina_Bool 4238Eina_Bool
4239_edje_object_part_drag_step_get(Eo *obj EINA_UNUSED, Edje *ed, const char *part, double *dx, double *dy) 4239_edje_object_part_drag_step_get(Edje *ed, const char *part, double *dx, double *dy)
4240{ 4240{
4241 Edje_Real_Part *rp; 4241 Edje_Real_Part *rp;
4242 4242
@@ -4263,8 +4263,8 @@ _edje_object_part_drag_step_get(Eo *obj EINA_UNUSED, Edje *ed, const char *part,
4263 return EINA_TRUE; 4263 return EINA_TRUE;
4264} 4264}
4265 4265
4266EOLIAN Eina_Bool 4266Eina_Bool
4267_edje_object_part_drag_page_set(Eo *obj EINA_UNUSED, Edje *ed, const char *part, double dx, double dy) 4267_edje_object_part_drag_page_set(Edje *ed, const char *part, double dx, double dy)
4268{ 4268{
4269 Edje_Real_Part *rp; 4269 Edje_Real_Part *rp;
4270 Edje_User_Defined *eud; 4270 Edje_User_Defined *eud;
@@ -4307,8 +4307,8 @@ _edje_object_part_drag_page_set(Eo *obj EINA_UNUSED, Edje *ed, const char *part,
4307 return EINA_TRUE; 4307 return EINA_TRUE;
4308} 4308}
4309 4309
4310EOLIAN Eina_Bool 4310Eina_Bool
4311_edje_object_part_drag_page_get(Eo *obj EINA_UNUSED, Edje *ed, const char *part, double *dx, double *dy) 4311_edje_object_part_drag_page_get(Edje *ed, const char *part, double *dx, double *dy)
4312{ 4312{
4313 Edje_Real_Part *rp; 4313 Edje_Real_Part *rp;
4314 4314
@@ -4335,8 +4335,8 @@ _edje_object_part_drag_page_get(Eo *obj EINA_UNUSED, Edje *ed, const char *part,
4335 return EINA_TRUE; 4335 return EINA_TRUE;
4336} 4336}
4337 4337
4338EOLIAN Eina_Bool 4338Eina_Bool
4339_edje_object_part_drag_step(Eo *obj EINA_UNUSED, Edje *ed, const char *part, double dx, double dy) 4339_edje_object_part_drag_step(Edje *ed, const char *part, double dx, double dy)
4340{ 4340{
4341 Edje_Real_Part *rp; 4341 Edje_Real_Part *rp;
4342 FLOAT_T px, py; 4342 FLOAT_T px, py;
@@ -4387,8 +4387,8 @@ _edje_object_part_drag_step(Eo *obj EINA_UNUSED, Edje *ed, const char *part, dou
4387 return EINA_TRUE; 4387 return EINA_TRUE;
4388} 4388}
4389 4389
4390EOLIAN Eina_Bool 4390Eina_Bool
4391_edje_object_part_drag_page(Eo *obj EINA_UNUSED, Edje *ed, const char *part, double dx, double dy) 4391_edje_object_part_drag_page(Edje *ed, const char *part, double dx, double dy)
4392{ 4392{
4393 Edje_Real_Part *rp; 4393 Edje_Real_Part *rp;
4394 FLOAT_T px, py; 4394 FLOAT_T px, py;
diff --git a/src/lib/edje/efl_canvas_layout_internal.eo b/src/lib/edje/efl_canvas_layout_internal.eo
index 74a1d3a..c06613f 100644
--- a/src/lib/edje/efl_canvas_layout_internal.eo
+++ b/src/lib/edje/efl_canvas_layout_internal.eo
@@ -1,5 +1,5 @@
1/* FIXME: Rename to Efl.Canvas.Layout.Part */ 1/* FIXME: Rename to Efl.Canvas.Layout.Part */
2class Efl.Canvas.Layout_Internal (Efl.Object, Efl.Gfx) 2class Efl.Canvas.Layout_Internal (Efl.Object, Efl.Gfx, Efl.Ui.Drag)
3{ 3{
4 [[Common class for part proxy objects for $Efl.Canvas.Layout. 4 [[Common class for part proxy objects for $Efl.Canvas.Layout.
5 5
@@ -28,5 +28,15 @@ class Efl.Canvas.Layout_Internal (Efl.Object, Efl.Gfx)
28 implements { 28 implements {
29 Efl.Object.finalize; 29 Efl.Object.finalize;
30 Efl.Gfx.geometry { get; } 30 Efl.Gfx.geometry { get; }
31 Efl.Ui.Drag.drag_value { set; get; }
32 Efl.Ui.Drag.drag_size { set; get; }
33 Efl.Ui.Drag.drag_dir { get; }
34 Efl.Ui.Drag.drag_step { set; get; }
35 Efl.Ui.Drag.drag_step_move;
36 Efl.Ui.Drag.drag_page { set; get; }
37 Efl.Ui.Drag.drag_page_move;
38 }
39 events {
40 /* FIXME: Are there really no events? */
31 } 41 }
32} 42}
diff --git a/src/lib/efl/Efl.h b/src/lib/efl/Efl.h
index c428a2d..2310890 100644
--- a/src/lib/efl/Efl.h
+++ b/src/lib/efl/Efl.h
@@ -65,6 +65,7 @@ typedef struct tm Efl_Time;
65 65
66/* Data types */ 66/* Data types */
67#include "interfaces/efl_gfx_types.eot.h" 67#include "interfaces/efl_gfx_types.eot.h"
68#include "interfaces/efl_ui_types.eot.h"
68typedef Efl_Gfx_Path_Command_Type Efl_Gfx_Path_Command; 69typedef Efl_Gfx_Path_Command_Type Efl_Gfx_Path_Command;
69 70
70/* Interfaces */ 71/* Interfaces */
@@ -81,6 +82,7 @@ typedef Efl_Gfx_Path_Command_Type Efl_Gfx_Path_Command;
81#include "interfaces/efl_text_properties.eo.h" 82#include "interfaces/efl_text_properties.eo.h"
82#include "interfaces/efl_orientation.eo.h" 83#include "interfaces/efl_orientation.eo.h"
83#include "interfaces/efl_flipable.eo.h" 84#include "interfaces/efl_flipable.eo.h"
85#include "interfaces/efl_ui_drag.eo.h"
84#include "interfaces/efl_ui_spin.eo.h" 86#include "interfaces/efl_ui_spin.eo.h"
85#include "interfaces/efl_ui_progress.eo.h" 87#include "interfaces/efl_ui_progress.eo.h"
86#include "interfaces/efl_ui_item.eo.h" 88#include "interfaces/efl_ui_item.eo.h"
@@ -152,6 +154,7 @@ typedef Efl_Gfx_Path_Command_Type Efl_Gfx_Path_Command;
152 154
153#ifndef EFL_NOLEGACY_API_SUPPORT 155#ifndef EFL_NOLEGACY_API_SUPPORT
154#include "interfaces/efl_gfx_types.eot.h" 156#include "interfaces/efl_gfx_types.eot.h"
157#include "interfaces/efl_ui_types.eot.h"
155#include "interfaces/efl_input_types.eot.h" 158#include "interfaces/efl_input_types.eot.h"
156#include "interfaces/efl_gfx_fill.eo.legacy.h" 159#include "interfaces/efl_gfx_fill.eo.legacy.h"
157#include "interfaces/efl_gfx.eo.legacy.h" 160#include "interfaces/efl_gfx.eo.legacy.h"
diff --git a/src/lib/efl/interfaces/efl_interfaces_main.c b/src/lib/efl/interfaces/efl_interfaces_main.c
index 209f9e4..6e3f75c 100644
--- a/src/lib/efl/interfaces/efl_interfaces_main.c
+++ b/src/lib/efl/interfaces/efl_interfaces_main.c
@@ -48,6 +48,7 @@
48#include "interfaces/efl_animator.eo.c" 48#include "interfaces/efl_animator.eo.c"
49#include "interfaces/efl_orientation.eo.c" 49#include "interfaces/efl_orientation.eo.c"
50#include "interfaces/efl_flipable.eo.c" 50#include "interfaces/efl_flipable.eo.c"
51#include "interfaces/efl_ui_drag.eo.c"
51#include "interfaces/efl_ui_spin.eo.c" 52#include "interfaces/efl_ui_spin.eo.c"
52#include "interfaces/efl_ui_progress.eo.c" 53#include "interfaces/efl_ui_progress.eo.c"
53#include "interfaces/efl_ui_menu.eo.c" 54#include "interfaces/efl_ui_menu.eo.c"
diff --git a/src/lib/efl/interfaces/efl_ui_drag.eo b/src/lib/efl/interfaces/efl_ui_drag.eo
new file mode 100644
index 0000000..6fcd1f9
--- /dev/null
+++ b/src/lib/efl/interfaces/efl_ui_drag.eo
@@ -0,0 +1,163 @@
1/* FIXME: "dragable" is not as common as "draggable" outside EFL... */
2
3import efl_ui_types;
4
5interface Efl.Ui.Drag
6{
7 [[Common interface for draggable objects and parts.
8
9 @since 1.20
10 ]]
11 methods {
12 @property drag_value {
13 [[The dragable object relative location.
14
15 Some parts in Edje can be dragged along the X/Y axes, if the part
16 contains a "dragable" section (in EDC). For instance, scroll bars
17 can be dragable objects.
18
19 $dx and $dy are real numbers that range from 0 to 1, representing
20 the relative position to the dragable area on that axis.
21
22 This value means, for the vertical axis, that 0.0 will be at the top
23 if the first parameter of $y in the dragable part theme is 1, and at
24 the bottom if it is -1.
25
26 For the horizontal axis, 0.0 means left if the first parameter of $x
27 in the dragable part theme is 1, and right if it is -1.
28 ]]
29 set {
30 [[Sets the dragable object location.
31
32 This places the dragable object at the given location.
33 ]]
34 return: bool; [[$true on success, $false otherwise]]
35 }
36 get {
37 [[Gets the dragable object location.]]
38 return: bool; [[$true on success, $false otherwise]]
39 }
40 values {
41 dx: double; [[The x relative position, from 0 to 1.]]
42 dy: double; [[The y relative position, from 0 to 1.]]
43 }
44 }
45 @property drag_size {
46 [[The dragable object relative size.
47
48 Values for $dw and $dh are real numbers that range from 0 to 1,
49 representing the relative size of the dragable area on that axis.
50
51 For instance a scroll bar handle size may depend on much large is
52 the scroller's content.
53 ]]
54 set {
55 [[Sets the size of the dragable object.]]
56 return: bool; [[$true on success, $false otherwise]]
57 }
58 get {
59 [[Gets the size of the dradgable object.]]
60 return: bool; [[$true on success, $false otherwise]]
61 }
62 values {
63 dw: double; [[The drag relative width, from 0 to 1.]]
64 dh: double; [[The drag relative height, from 0 to 1.]]
65 }
66 }
67 @property drag_dir {
68 [[Determines the dragable directions (read-only).
69
70 The dragable directions are defined in the EDC file, inside the
71 "dragable" section, by the attributes $x and $y. See the EDC
72 reference documentation for more information.
73 ]]
74 get {
75 [[Gets the dragable direction.]]
76 return: Efl.Ui.Drag.Dir; [[The direction(s) premitted for drag.]]
77 }
78 }
79 @property drag_step {
80 [[The drag step increment.
81
82 Values for $dx and $dy are real numbers that range from 0 to 1,
83 representing the relative size of the dragable area on that axis by
84 which the part will be moved.
85
86 This differs from @.drag_page in that this is meant to
87 represent a unit increment, like a single line for example.
88
89 See also @.drag_page.
90 ]]
91 set {
92 [[Sets the x,y step increments for a dragable object.]]
93 return: bool; [[$true on success, $false otherwise]]
94 }
95 get {
96 [[Gets the x and y step increments for the dragable object.]]
97 return: bool; [[$true on success, $false otherwise]]
98 }
99 values {
100 dx: double; [[The x step relative amount, from 0 to 1.]]
101 dy: double; [[The y step relative amount, from 0 to 1.]]
102 }
103 }
104 drag_step_move {
105 [[Moves the dragable by $dx,$dy steps.
106
107 This moves the dragable part by $dx,$dy steps where the step
108 increment is the amount set by @.drag_step.set().
109
110 $dx and $dy can be positive or negative numbers, integer values are
111 recommended.
112 ]]
113 return: bool; [[$true on success, $false otherwise]]
114 params {
115 @in dx: double; [[The number of steps horizontally.]]
116 @in dy: double; [[The number of steps vertically.]]
117 }
118 }
119 @property drag_page {
120 [[The page step increments.
121
122 Values for $dx and $dy are real numbers that range from 0 to 1,
123 representing the relative size of the dragable area on that axis by
124 which the part will be moved.
125
126 This differs from @.drag_step in that this is meant to be a
127 larger step size, basically an entire page as opposed to a single
128 or couple of lines.
129
130 See also @.drag_step.
131 ]]
132 set {
133 [[Sets the x,y page step increment values.]]
134 return: bool; [[$true on success, $false otherwise]]
135 }
136 get {
137 [[Gets the x,y page step increments for the dragable object.]]
138 return: bool; [[$true on success, $false otherwise]]
139 }
140 values {
141 dx: double; [[The x page step increment]]
142 dy: double; [[The y page step increment]]
143 }
144 }
145 drag_page_move {
146 [[Moves the dragable by $dx,$dy pages.
147
148 This moves the dragable by $dx,$dy pages where the increment is
149 defined by @.drag_page.set().
150
151 $dx and $dy can be positive or negative numbers, integer values are
152 recommended.
153
154 Warning: Paging is bugged!
155 ]]
156 return: bool; [[$true on success, $false otherwise]]
157 params {
158 @in dx: double; [[The number of pages horizontally.]]
159 @in dy: double; [[The number of pages vertically.]]
160 }
161 }
162 }
163}
diff --git a/src/lib/efl/interfaces/efl_ui_types.eot b/src/lib/efl/interfaces/efl_ui_types.eot
new file mode 100644
index 0000000..275d82f
--- /dev/null
+++ b/src/lib/efl/interfaces/efl_ui_types.eot
@@ -0,0 +1,7 @@
1enum Efl.Ui.Drag.Dir {
2 [[Permitted directions for dragging objects.]]
3 none = 0, [[Not draggable in any direction.]]
4 x = 1, [[Draggable horizontally.]]
5 y = 2, [[Draggable vertically.]]
6 xy = 3 [[Draggable in both directions.]]
7}
diff --git a/src/lib/elementary/elm_spinner.c b/src/lib/elementary/elm_spinner.c
index c3921f3..6df1449 100644
--- a/src/lib/elementary/elm_spinner.c
+++ b/src/lib/elementary/elm_spinner.c
@@ -321,12 +321,12 @@ _drag_cb(void *data,
321 if (sd->button_layout) 321 if (sd->button_layout)
322 { 322 {
323 if (!strncmp(style, "vertical", 8)) 323 if (!strncmp(style, "vertical", 8))
324 edje_obj_part_drag_value_get((Eo *)wd->resize_obj, "elm.dragable.slider", NULL, &pos); 324 efl_ui_drag_value_get(efl_part(wd->resize_obj, "elm.dragable.slider"), NULL, &pos);
325 else 325 else
326 edje_obj_part_drag_value_get((Eo *)wd->resize_obj, "elm.dragable.slider", &pos, NULL); 326 efl_ui_drag_value_get(efl_part(wd->resize_obj, "elm.dragable.slider"), &pos, NULL);
327 } 327 }
328 else 328 else
329 edje_obj_part_drag_value_get((Eo *)wd->resize_obj, "elm.dragable.slider", &pos, NULL); 329 efl_ui_drag_value_get(efl_part(wd->resize_obj, "elm.dragable.slider"), &pos, NULL);
330 330
331 if (sd->drag_prev_pos != 0) 331 if (sd->drag_prev_pos != 0)
332 sd->drag_val_step = pow((pos - sd->drag_prev_pos), 2); 332 sd->drag_val_step = pow((pos - sd->drag_prev_pos), 2);
diff --git a/src/lib/evas/canvas/efl_ui_draggable.eo b/src/lib/evas/canvas/efl_ui_draggable.eo
index 16ea1a1..c3b8a68 100644
--- a/src/lib/evas/canvas/efl_ui_draggable.eo
+++ b/src/lib/evas/canvas/efl_ui_draggable.eo
@@ -1,3 +1,4 @@
1/* FIXME: Edje Drag and this Dnd Draggable have confusingly similar names! */
1interface Efl.Ui.Draggable () 2interface Efl.Ui.Draggable ()
2{ 3{
3 [[Efl UI draggable interface]] 4 [[Efl UI draggable interface]]
diff --git a/src/tests/emotion/emotion_test_main-eo.c b/src/tests/emotion/emotion_test_main-eo.c
index b096137..fd8a513 100644
--- a/src/tests/emotion/emotion_test_main-eo.c
+++ b/src/tests/emotion/emotion_test_main-eo.c
@@ -306,7 +306,7 @@ video_obj_time_changed(Evas_Object *obj, Evas_Object *edje)
306 pos = emotion_object_position_get(obj); 306 pos = emotion_object_position_get(obj);
307 len = emotion_object_play_length_get(obj); 307 len = emotion_object_play_length_get(obj);
308 scale = (len > 0.0) ? pos / len : 0.0; 308 scale = (len > 0.0) ? pos / len : 0.0;
309 edje_obj_part_drag_value_set(edje, "video_progress", scale, 0.0); 309 efl_ui_drag_value_set(efl_part(edje, "video_progress"), scale, 0.0);
310 310
311 lh = len / 3600; 311 lh = len / 3600;
312 lm = len / 60 - (lh * 60); 312 lm = len / 60 - (lh * 60);
@@ -461,7 +461,7 @@ video_obj_signal_jump_cb(void *data, Evas_Object *o, const char *emission EINA_U
461 double len; 461 double len;
462 double x, y; 462 double x, y;
463 463
464 edje_obj_part_drag_value_get(o, source, &x, &y); 464 efl_ui_drag_value_get(efl_part(o, source), &x, &y);
465 len = emotion_object_play_length_get(ov); 465 len = emotion_object_play_length_get(ov);
466 emotion_object_position_set(ov, x * len); 466 emotion_object_position_set(ov, x * len);
467} 467}
@@ -474,7 +474,7 @@ video_obj_signal_alpha_cb(void *data, Evas_Object *o, const char *emission EINA_
474 double x, y; 474 double x, y;
475 char buf[256]; 475 char buf[256];
476 476
477 edje_obj_part_drag_value_get(o, source, &x, &y); 477 efl_ui_drag_value_get(efl_part(o, source), &x, &y);
478 alpha = 255 * y; 478 alpha = 255 * y;
479 efl_gfx_color_set(ov, alpha, alpha, alpha, alpha); 479 efl_gfx_color_set(ov, alpha, alpha, alpha, alpha);
480 snprintf(buf, sizeof(buf), "alpha %.0f", alpha); 480 snprintf(buf, sizeof(buf), "alpha %.0f", alpha);
@@ -488,7 +488,7 @@ video_obj_signal_vol_cb(void *data, Evas_Object *o, const char *emission EINA_UN
488 double vol; 488 double vol;
489 char buf[256]; 489 char buf[256];
490 490
491 edje_obj_part_drag_value_get(o, source, NULL, &vol); 491 efl_ui_drag_value_get(efl_part(o, source), NULL, &vol);
492 emotion_object_audio_volume_set(ov, vol); 492 emotion_object_audio_volume_set(ov, vol);
493 snprintf(buf, sizeof(buf), "vol %.2f", vol); 493 snprintf(buf, sizeof(buf), "vol %.2f", vol);
494 edje_obj_part_text_set(o, "video_volume_txt", buf); 494 edje_obj_part_text_set(o, "video_volume_txt", buf);
@@ -641,9 +641,9 @@ init_video_object(const char *module_filename, const char *filename)
641 edje_obj_signal_callback_add(oe, "frame_resize", "start", video_obj_signal_frame_resize_start_cb, oe); 641 edje_obj_signal_callback_add(oe, "frame_resize", "start", video_obj_signal_frame_resize_start_cb, oe);
642 edje_obj_signal_callback_add(oe, "frame_resize", "stop", video_obj_signal_frame_resize_stop_cb, oe); 642 edje_obj_signal_callback_add(oe, "frame_resize", "stop", video_obj_signal_frame_resize_stop_cb, oe);
643 edje_obj_signal_callback_add(oe, "mouse, move", "*", video_obj_signal_frame_move_cb, oe); 643 edje_obj_signal_callback_add(oe, "mouse, move", "*", video_obj_signal_frame_move_cb, oe);
644 edje_obj_part_drag_value_set(oe, "video_alpha", 0.0, 1.0); 644 efl_ui_drag_value_set(efl_part(oe, "video_alpha"), 0.0, 1.0);
645 edje_obj_part_text_set(oe, "video_alpha_txt", "alpha 255"); 645 edje_obj_part_text_set(oe, "video_alpha_txt", "alpha 255");
646 edje_obj_part_drag_value_set(oe, "video_volume", 0.0, 0.5); 646 efl_ui_drag_value_set(efl_part(oe, "video_volume"), 0.0, 0.5);
647 edje_obj_part_text_set(oe, "video_volume_txt", "vol 0.50"); 647 edje_obj_part_text_set(oe, "video_volume_txt", "vol 0.50");
648 edje_obj_signal_emit(oe, "video_state", "play"); 648 edje_obj_signal_emit(oe, "video_state", "play");
649 efl_gfx_visible_set(oe, EINA_TRUE); 649 efl_gfx_visible_set(oe, EINA_TRUE);