summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2016-05-25 11:56:59 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2016-05-25 15:00:34 +0900
commit317ce60ab6aa9c5ba31e5cd71735684b62481d9d (patch)
tree3002d99f0b90283f5c8156770321dab36d5a72af
parentd2ba9866fbd6c6b2b26715180fa132ca4b632cc4 (diff)
fileselector entry: Move EO API to legacy
-rw-r--r--src/lib/elementary/elc_fileselector_entry.c77
-rw-r--r--src/lib/elementary/elc_fileselector_entry_legacy.h91
-rw-r--r--src/lib/elementary/elm_fileselector_entry.eo81
3 files changed, 128 insertions, 121 deletions
diff --git a/src/lib/elementary/elc_fileselector_entry.c b/src/lib/elementary/elc_fileselector_entry.c
index 5792a474c9..f4ad6d7dc8 100644
--- a/src/lib/elementary/elc_fileselector_entry.c
+++ b/src/lib/elementary/elc_fileselector_entry.c
@@ -210,9 +210,7 @@ _elm_fileselector_entry_elm_layout_text_set(Eo *obj, Elm_Fileselector_Entry_Data
210{ 210{
211 if (part && strcmp(part, "default")) 211 if (part && strcmp(part, "default"))
212 { 212 {
213 Eina_Bool int_ret = EINA_FALSE; 213 return elm_obj_layout_text_set(eo_super(obj, MY_CLASS), part, label);
214 int_ret = elm_obj_layout_text_set(eo_super(obj, MY_CLASS), part, label);
215 return int_ret;
216 } 214 }
217 215
218 elm_object_text_set(sd->button, label); 216 elm_object_text_set(sd->button, label);
@@ -237,9 +235,7 @@ _elm_fileselector_entry_efl_container_content_set(Eo *obj, Elm_Fileselector_Entr
237{ 235{
238 if (part && strcmp(part, "button icon")) 236 if (part && strcmp(part, "button icon"))
239 { 237 {
240 Eina_Bool int_ret = EINA_FALSE; 238 return efl_content_set(eo_super(obj, MY_CLASS), part, content);
241 int_ret = efl_content_set(eo_super(obj, MY_CLASS), part, content);
242 return int_ret;
243 } 239 }
244 240
245 elm_layout_content_set(sd->button, NULL, content); 241 elm_layout_content_set(sd->button, NULL, content);
@@ -252,9 +248,7 @@ _elm_fileselector_entry_efl_container_content_get(Eo *obj, Elm_Fileselector_Entr
252{ 248{
253 if (part && strcmp(part, "button icon")) 249 if (part && strcmp(part, "button icon"))
254 { 250 {
255 Evas_Object *ret = NULL; 251 return efl_content_get(eo_super(obj, MY_CLASS), part);
256 ret = efl_content_get(eo_super(obj, MY_CLASS), part);
257 return ret;
258 } 252 }
259 253
260 return elm_layout_content_get(sd->button, NULL); 254 return elm_layout_content_get(sd->button, NULL);
@@ -265,9 +259,7 @@ _elm_fileselector_entry_efl_container_content_unset(Eo *obj, Elm_Fileselector_En
265{ 259{
266 if (part && strcmp(part, "button icon")) 260 if (part && strcmp(part, "button icon"))
267 { 261 {
268 Evas_Object *ret = NULL; 262 return efl_content_unset(eo_super(obj, MY_CLASS), part);
269 ret = efl_content_unset(eo_super(obj, MY_CLASS), part);
270 return ret;
271 } 263 }
272 264
273 return elm_layout_content_unset(sd->button, NULL); 265 return elm_layout_content_unset(sd->button, NULL);
@@ -342,8 +334,7 @@ EAPI Evas_Object *
342elm_fileselector_entry_add(Evas_Object *parent) 334elm_fileselector_entry_add(Evas_Object *parent)
343{ 335{
344 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 336 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
345 Evas_Object *obj = eo_add(MY_CLASS, parent); 337 return eo_add(MY_CLASS, parent);
346 return obj;
347} 338}
348 339
349EOLIAN static Eo * 340EOLIAN static Eo *
@@ -376,9 +367,7 @@ EINA_DEPRECATED EAPI const char *
376elm_fileselector_entry_selected_get(const Evas_Object *obj) 367elm_fileselector_entry_selected_get(const Evas_Object *obj)
377{ 368{
378 ELM_FILESELECTOR_INTERFACE_CHECK(obj, NULL); 369 ELM_FILESELECTOR_INTERFACE_CHECK(obj, NULL);
379 const char *ret = NULL; 370 return elm_interface_fileselector_selected_get((Eo *) obj);
380 ret = elm_interface_fileselector_selected_get((Eo *) obj);
381 return ret;
382} 371}
383 372
384EOLIAN static const char * 373EOLIAN static const char *
@@ -387,27 +376,37 @@ _elm_fileselector_entry_elm_interface_fileselector_selected_get(Eo *obj EINA_UNU
387 return elm_fileselector_path_get(sd->button); 376 return elm_fileselector_path_get(sd->button);
388} 377}
389 378
390EOLIAN static void 379EAPI void
391_elm_fileselector_entry_window_title_set(Eo *obj EINA_UNUSED, Elm_Fileselector_Entry_Data *sd, const char *title) 380elm_fileselector_entry_window_title_set(Eo *obj, const char *title)
392{ 381{
382 ELM_FILESELECTOR_ENTRY_CHECK(obj);
383 ELM_FILESELECTOR_ENTRY_DATA_GET_OR_RETURN(obj, sd);
393 elm_fileselector_button_window_title_set(sd->button, title); 384 elm_fileselector_button_window_title_set(sd->button, title);
394} 385}
395 386
396EOLIAN static const char * 387EAPI const char *
397_elm_fileselector_entry_window_title_get(Eo *obj EINA_UNUSED, Elm_Fileselector_Entry_Data *sd) 388elm_fileselector_entry_window_title_get(const Eo *obj)
398{ 389{
390 ELM_FILESELECTOR_ENTRY_CHECK(obj) NULL;
391 ELM_FILESELECTOR_ENTRY_DATA_GET_OR_RETURN_VAL(obj, sd, NULL);
399 return elm_fileselector_button_window_title_get(sd->button); 392 return elm_fileselector_button_window_title_get(sd->button);
400} 393}
401 394
402EOLIAN static void 395EAPI void
403_elm_fileselector_entry_window_size_set(Eo *obj EINA_UNUSED, Elm_Fileselector_Entry_Data *sd, Evas_Coord width, Evas_Coord height) 396elm_fileselector_entry_window_size_set(Eo *obj, Evas_Coord width, Evas_Coord height)
404{ 397{
398 ELM_FILESELECTOR_ENTRY_CHECK(obj);
399 ELM_FILESELECTOR_ENTRY_DATA_GET_OR_RETURN(obj, sd);
405 elm_fileselector_button_window_size_set(sd->button, width, height); 400 elm_fileselector_button_window_size_set(sd->button, width, height);
406} 401}
407 402
408EOLIAN static void 403EAPI void
409_elm_fileselector_entry_window_size_get(Eo *obj EINA_UNUSED, Elm_Fileselector_Entry_Data *sd, Evas_Coord *width, Evas_Coord *height) 404elm_fileselector_entry_window_size_get(const Eo *obj, Evas_Coord *width, Evas_Coord *height)
410{ 405{
406 if (width) *width = 0;
407 if (height) *height = 0;
408 ELM_FILESELECTOR_ENTRY_CHECK(obj);
409 ELM_FILESELECTOR_ENTRY_DATA_GET_OR_RETURN(obj, sd);
411 elm_fileselector_button_window_size_get(sd->button, width, height); 410 elm_fileselector_button_window_size_get(sd->button, width, height);
412} 411}
413 412
@@ -437,9 +436,7 @@ EINA_DEPRECATED EAPI const char *
437elm_fileselector_entry_path_get(const Evas_Object *obj) 436elm_fileselector_entry_path_get(const Evas_Object *obj)
438{ 437{
439 ELM_FILESELECTOR_INTERFACE_CHECK(obj, NULL); 438 ELM_FILESELECTOR_INTERFACE_CHECK(obj, NULL);
440 const char *ret = NULL; 439 return elm_interface_fileselector_path_get((Eo *) obj);
441 ret = elm_interface_fileselector_path_get((Eo *) obj);
442 return ret;
443} 440}
444 441
445EOLIAN static const char * 442EOLIAN static const char *
@@ -468,9 +465,7 @@ EINA_DEPRECATED EAPI Eina_Bool
468elm_fileselector_entry_expandable_get(const Evas_Object *obj) 465elm_fileselector_entry_expandable_get(const Evas_Object *obj)
469{ 466{
470 ELM_FILESELECTOR_INTERFACE_CHECK(obj, EINA_FALSE); 467 ELM_FILESELECTOR_INTERFACE_CHECK(obj, EINA_FALSE);
471 Eina_Bool ret = EINA_FALSE; 468 return elm_interface_fileselector_expandable_get((Eo *) obj);
472 ret = elm_interface_fileselector_expandable_get((Eo *) obj);
473 return ret;
474} 469}
475 470
476EOLIAN static Eina_Bool 471EOLIAN static Eina_Bool
@@ -497,9 +492,7 @@ EINA_DEPRECATED EAPI Eina_Bool
497elm_fileselector_entry_folder_only_get(const Evas_Object *obj) 492elm_fileselector_entry_folder_only_get(const Evas_Object *obj)
498{ 493{
499 ELM_FILESELECTOR_INTERFACE_CHECK(obj, EINA_FALSE); 494 ELM_FILESELECTOR_INTERFACE_CHECK(obj, EINA_FALSE);
500 Eina_Bool ret = EINA_FALSE; 495 return elm_interface_fileselector_folder_only_get((Eo *) obj);
501 ret = elm_interface_fileselector_folder_only_get((Eo *) obj);
502 return ret;
503} 496}
504 497
505EOLIAN static Eina_Bool 498EOLIAN static Eina_Bool
@@ -526,9 +519,7 @@ EINA_DEPRECATED EAPI Eina_Bool
526elm_fileselector_entry_is_save_get(const Evas_Object *obj) 519elm_fileselector_entry_is_save_get(const Evas_Object *obj)
527{ 520{
528 ELM_FILESELECTOR_INTERFACE_CHECK(obj, EINA_FALSE); 521 ELM_FILESELECTOR_INTERFACE_CHECK(obj, EINA_FALSE);
529 Eina_Bool ret = EINA_FALSE; 522 return elm_interface_fileselector_is_save_get((Eo *) obj);
530 ret = elm_interface_fileselector_is_save_get((Eo *) obj);
531 return ret;
532} 523}
533 524
534EOLIAN static Eina_Bool 525EOLIAN static Eina_Bool
@@ -537,15 +528,19 @@ _elm_fileselector_entry_elm_interface_fileselector_is_save_get(Eo *obj EINA_UNUS
537 return elm_fileselector_is_save_get(sd->button); 528 return elm_fileselector_is_save_get(sd->button);
538} 529}
539 530
540EOLIAN static void 531EAPI void
541_elm_fileselector_entry_inwin_mode_set(Eo *obj EINA_UNUSED, Elm_Fileselector_Entry_Data *sd, Eina_Bool value) 532elm_fileselector_entry_inwin_mode_set(Eo *obj, Eina_Bool value)
542{ 533{
534 ELM_FILESELECTOR_ENTRY_CHECK(obj);
535 ELM_FILESELECTOR_ENTRY_DATA_GET_OR_RETURN(obj, sd);
543 elm_fileselector_button_inwin_mode_set(sd->button, value); 536 elm_fileselector_button_inwin_mode_set(sd->button, value);
544} 537}
545 538
546EOLIAN static Eina_Bool 539EAPI Eina_Bool
547_elm_fileselector_entry_inwin_mode_get(Eo *obj EINA_UNUSED, Elm_Fileselector_Entry_Data *sd) 540elm_fileselector_entry_inwin_mode_get(const Eo *obj)
548{ 541{
542 ELM_FILESELECTOR_ENTRY_CHECK(obj) EINA_FALSE;
543 ELM_FILESELECTOR_ENTRY_DATA_GET_OR_RETURN_VAL(obj, sd, EINA_FALSE);
549 return elm_fileselector_button_inwin_mode_get(sd->button); 544 return elm_fileselector_button_inwin_mode_get(sd->button);
550} 545}
551 546
diff --git a/src/lib/elementary/elc_fileselector_entry_legacy.h b/src/lib/elementary/elc_fileselector_entry_legacy.h
index f4f9b98828..f06d403a37 100644
--- a/src/lib/elementary/elc_fileselector_entry_legacy.h
+++ b/src/lib/elementary/elc_fileselector_entry_legacy.h
@@ -12,3 +12,94 @@
12EAPI Evas_Object *elm_fileselector_entry_add(Evas_Object *parent); 12EAPI Evas_Object *elm_fileselector_entry_add(Evas_Object *parent);
13 13
14#include "elm_fileselector_entry.eo.legacy.h" 14#include "elm_fileselector_entry.eo.legacy.h"
15
16/**
17 * @brief Set whether a given file selector entry widget's internal file
18 * selector will raise an Elementary "inner window", instead of a dedicated
19 * Elementary window. By default, it depends on the current profile.
20 *
21 * See also @ref elm_win_inwin_add for more information on inner windows,
22 * @ref elm_fileselector_entry_inwin_mode_get.
23 *
24 * @param[in] value @c true to make it use an inner window, @c false to make it
25 * use a dedicated window.
26 *
27 * @ingroup Elm_Fileselector_Entry
28 */
29EAPI void elm_fileselector_entry_inwin_mode_set(Elm_Fileselector_Entry *obj, Eina_Bool value);
30
31/**
32 * @brief Get whether a given file selector entry widget's internal file
33 * selector will raise an Elementary "inner window", instead of a dedicated
34 * Elementary window.
35 *
36 * See also @ref elm_fileselector_entry_inwin_mode_set for more details.
37 *
38 * @return @c true to make it use an inner window, @c false to make it use a
39 * dedicated window.
40 *
41 * @ingroup Elm_Fileselector_Entry
42 */
43EAPI Eina_Bool elm_fileselector_entry_inwin_mode_get(const Elm_Fileselector_Entry *obj);
44
45/**
46 * @brief Set the size of a given file selector entry widget's window, holding
47 * the file selector itself.
48 *
49 * @note it will only take any effect if the file selector entry widget is not
50 * under "inwin mode". The default size for the window (when applicable) is
51 * 400x400 pixels.
52 *
53 * See also @ref elm_fileselector_entry_window_size_get.
54 *
55 * @param[in] width The window's width.
56 * @param[in] height The window's height.
57 *
58 * @ingroup Elm_Fileselector_Entry
59 */
60EAPI void elm_fileselector_entry_window_size_set(Elm_Fileselector_Entry *obj, Evas_Coord width, Evas_Coord height);
61
62/**
63 * @brief Get the size of a given file selector entry widget's window, holding
64 * the file selector itself.
65 *
66 * @note Use @c null pointers on the size values you're not interested in:
67 * they'll be ignored by the function.
68 *
69 * See also @ref elm_fileselector_entry_window_size_set, for more details.
70 *
71 * @param[out] width The window's width.
72 * @param[out] height The window's height.
73 *
74 * @ingroup Elm_Fileselector_Entry
75 */
76EAPI void elm_fileselector_entry_window_size_get(const Elm_Fileselector_Entry *obj, Evas_Coord *width, Evas_Coord *height);
77
78/**
79 * @brief Set the title for a given file selector entry widget's window
80 *
81 * This will change the window's title, when the file selector pops out after a
82 * click on the entry's button. Those windows have the default (unlocalized)
83 * value of $"Select a file" as titles.
84 *
85 * @note It will only take any effect if the file selector entry widget is not
86 * under "inwin mode".
87 *
88 * See also @ref elm_fileselector_entry_window_title_get.
89 *
90 * @param[in] title The title string.
91 *
92 * @ingroup Elm_Fileselector_Entry
93 */
94EAPI void elm_fileselector_entry_window_title_set(Elm_Fileselector_Entry *obj, const char *title);
95
96/**
97 * @brief Get the title set for a given file selector entry widget's window.
98 *
99 * See also @ref elm_fileselector_entry_window_title_set for more details.
100 *
101 * @return The title string.
102 *
103 * @ingroup Elm_Fileselector_Entry
104 */
105EAPI const char *elm_fileselector_entry_window_title_get(const Elm_Fileselector_Entry *obj);
diff --git a/src/lib/elementary/elm_fileselector_entry.eo b/src/lib/elementary/elm_fileselector_entry.eo
index 1cd1feb3e3..401d2959c6 100644
--- a/src/lib/elementary/elm_fileselector_entry.eo
+++ b/src/lib/elementary/elm_fileselector_entry.eo
@@ -1,87 +1,8 @@
1class Elm.Fileselector_Entry (Elm.Layout, Elm.Interface.Fileselector, 1class Elm.Fileselector_Entry (Elm.Layout, Elm.Interface.Fileselector,
2 Evas.Clickable_Interface, Evas.Selectable_Interface) 2 Evas.Clickable_Interface, Evas.Selectable_Interface)
3{ 3{
4 legacy_prefix: elm_fileselector_entry; 4 [[Not an EO API.]]
5 eo_prefix: elm_obj_fileselector_entry;
6 event_prefix: elm_fileselector_entry; 5 event_prefix: elm_fileselector_entry;
7 methods {
8 @property inwin_mode {
9 set {
10 [[Set whether a given file selector entry widget's internal file
11 selector will raise an Elementary "inner window", instead of a
12 dedicated Elementary window. By default, it depends on the current
13 profile.
14
15 See also \@ref elm_win_inwin_add for more information on inner windows,
16 @.inwin_mode.get.
17 ]]
18 }
19 get {
20 [[Get whether a given file selector entry widget's internal file
21 selector will raise an Elementary "inner window", instead of a
22 dedicated Elementary window.
23
24 See also @.inwin_mode.set for more details.
25 ]]
26 }
27 values {
28 value: bool; [[$true to make it use an inner window, $false
29 to make it use a dedicated window.]]
30 }
31 }
32 @property window_size {
33 set {
34 [[Set the size of a given file selector entry widget's window,
35 holding the file selector itself.
36
37 Note: it will only take any effect if the file selector entry
38 widget is not under "inwin mode". The default size for the
39 window (when applicable) is 400x400 pixels.
40
41 See also @.window_size.get.
42 ]]
43 }
44 get {
45 [[Get the size of a given file selector entry widget's window,
46 holding the file selector itself.
47
48 Note: Use $null pointers on the size values you're not
49 interested in: they'll be ignored by the function.
50
51 See also @.window_size.set, for more details.
52 ]]
53 }
54 values {
55 width: Evas.Coord; [[The window's width.]]
56 height: Evas.Coord; [[The window's height.]]
57 }
58 }
59 @property window_title {
60 set {
61 [[Set the title for a given file selector entry widget's window
62
63 This will change the window's title, when the file selector pops
64 out after a click on the entry's button. Those windows have the
65 default (unlocalized) value of $"Select a file" as titles.
66
67 Note: It will only take any effect if the file selector
68 entry widget is not under "inwin mode".
69
70 See also @.window_title.get.
71 ]]
72 }
73 get {
74 [[Get the title set for a given file selector entry widget's
75 window.
76
77 See also @.window_title.set for more details.
78 ]]
79 }
80 values {
81 title: const(char)*; [[The title string.]]
82 }
83 }
84 }
85 implements { 6 implements {
86 class.constructor; 7 class.constructor;
87 Eo.Base.constructor; 8 Eo.Base.constructor;