summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2016-05-25 14:48:35 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2016-05-25 15:00:34 +0900
commitf212b62d5282774c278555bc78d9308626e8dae2 (patch)
tree7c923007e9c769f9fd4ac111f497bfc0b4a1e778
parent317ce60ab6aa9c5ba31e5cd71735684b62481d9d (diff)
fileselector button: Move EO APIs to legacy
-rw-r--r--src/lib/elementary/elc_fileselector_button.c40
-rw-r--r--src/lib/elementary/elc_fileselector_button_legacy.h91
-rw-r--r--src/lib/elementary/elm_fileselector_button.eo82
3 files changed, 117 insertions, 96 deletions
diff --git a/src/lib/elementary/elc_fileselector_button.c b/src/lib/elementary/elc_fileselector_button.c
index 75cee4d1d9..3f726a70cf 100644
--- a/src/lib/elementary/elc_fileselector_button.c
+++ b/src/lib/elementary/elc_fileselector_button.c
@@ -232,32 +232,40 @@ _elm_fileselector_button_eo_base_constructor(Eo *obj, Elm_Fileselector_Button_Da
232 return obj; 232 return obj;
233} 233}
234 234
235EOLIAN static void 235EAPI void
236_elm_fileselector_button_window_title_set(Eo *obj EINA_UNUSED, Elm_Fileselector_Button_Data *sd, const char *title) 236elm_fileselector_button_window_title_set(Eo *obj, const char *title)
237{ 237{
238 ELM_FILESELECTOR_BUTTON_CHECK(obj);
239 ELM_FILESELECTOR_BUTTON_DATA_GET_OR_RETURN(obj, sd);
238 eina_stringshare_replace(&sd->window_title, title); 240 eina_stringshare_replace(&sd->window_title, title);
239
240 if (sd->fsw) elm_win_title_set(sd->fsw, sd->window_title); 241 if (sd->fsw) elm_win_title_set(sd->fsw, sd->window_title);
241} 242}
242 243
243EOLIAN static const char * 244EAPI const char *
244_elm_fileselector_button_window_title_get(Eo *obj EINA_UNUSED, Elm_Fileselector_Button_Data *sd) 245elm_fileselector_button_window_title_get(const Eo *obj)
245{ 246{
247 ELM_FILESELECTOR_BUTTON_CHECK(obj) NULL;
248 ELM_FILESELECTOR_BUTTON_DATA_GET_OR_RETURN_VAL(obj, sd, NULL);
246 return sd->window_title; 249 return sd->window_title;
247} 250}
248 251
249EOLIAN static void 252EAPI void
250_elm_fileselector_button_window_size_set(Eo *obj EINA_UNUSED, Elm_Fileselector_Button_Data *sd, Evas_Coord width, Evas_Coord height) 253elm_fileselector_button_window_size_set(Eo *obj, Evas_Coord width, Evas_Coord height)
251{ 254{
255 ELM_FILESELECTOR_BUTTON_CHECK(obj);
256 ELM_FILESELECTOR_BUTTON_DATA_GET_OR_RETURN(obj, sd);
252 sd->w = width; 257 sd->w = width;
253 sd->h = height; 258 sd->h = height;
254
255 if (sd->fsw) evas_object_resize(sd->fsw, sd->w, sd->h); 259 if (sd->fsw) evas_object_resize(sd->fsw, sd->w, sd->h);
256} 260}
257 261
258EOLIAN static void 262EAPI void
259_elm_fileselector_button_window_size_get(Eo *obj EINA_UNUSED, Elm_Fileselector_Button_Data *sd, Evas_Coord *width, Evas_Coord *height) 263elm_fileselector_button_window_size_get(const Eo *obj, Evas_Coord *width, Evas_Coord *height)
260{ 264{
265 if (width) *width = 0;
266 if (height) *height = 0;
267 ELM_FILESELECTOR_BUTTON_CHECK(obj);
268 ELM_FILESELECTOR_BUTTON_DATA_GET_OR_RETURN(obj, sd);
261 if (width) *width = sd->w; 269 if (width) *width = sd->w;
262 if (height) *height = sd->h; 270 if (height) *height = sd->h;
263} 271}
@@ -502,15 +510,19 @@ _elm_fileselector_button_elm_interface_fileselector_hidden_visible_get(Eo *obj E
502 return sd->fsd.hidden_visible; 510 return sd->fsd.hidden_visible;
503} 511}
504 512
505EOLIAN static void 513EAPI void
506_elm_fileselector_button_inwin_mode_set(Eo *obj EINA_UNUSED, Elm_Fileselector_Button_Data *sd, Eina_Bool value) 514elm_fileselector_button_inwin_mode_set(Eo *obj, Eina_Bool value)
507{ 515{
516 ELM_FILESELECTOR_BUTTON_CHECK(obj);
517 ELM_FILESELECTOR_BUTTON_DATA_GET_OR_RETURN(obj, sd);
508 sd->inwin_mode = value; 518 sd->inwin_mode = value;
509} 519}
510 520
511EOLIAN static Eina_Bool 521EAPI Eina_Bool
512_elm_fileselector_button_inwin_mode_get(Eo *obj EINA_UNUSED, Elm_Fileselector_Button_Data *sd) 522elm_fileselector_button_inwin_mode_get(const Eo *obj)
513{ 523{
524 ELM_FILESELECTOR_BUTTON_CHECK(obj) EINA_FALSE;
525 ELM_FILESELECTOR_BUTTON_DATA_GET_OR_RETURN_VAL(obj, sd, EINA_FALSE);
514 return sd->inwin_mode; 526 return sd->inwin_mode;
515} 527}
516 528
diff --git a/src/lib/elementary/elc_fileselector_button_legacy.h b/src/lib/elementary/elc_fileselector_button_legacy.h
index 54c2bac92e..0b74a9117f 100644
--- a/src/lib/elementary/elc_fileselector_button_legacy.h
+++ b/src/lib/elementary/elc_fileselector_button_legacy.h
@@ -11,3 +11,94 @@
11EAPI Evas_Object *elm_fileselector_button_add(Evas_Object *parent); 11EAPI Evas_Object *elm_fileselector_button_add(Evas_Object *parent);
12 12
13#include "elm_fileselector_button.eo.legacy.h" 13#include "elm_fileselector_button.eo.legacy.h"
14
15/**
16 * @brief Set whether a given file selector button widget's internal file
17 * selector will raise an Elementary "inner window", instead of a dedicated
18 * Elementary window. By default, it depends on the current profile.
19 *
20 * See @ref elm_win_inwin_add for more information on inner windows. See also
21 * @ref elm_fileselector_button_inwin_mode_get.
22 *
23 * @param[in] value true to make it use an inner window, false to make it use a
24 * dedicated window
25 *
26 * @ingroup Elm_Fileselector_Button
27 */
28EAPI void elm_fileselector_button_inwin_mode_set(Elm_Fileselector_Button *obj, Eina_Bool value);
29
30/**
31 * @brief Get whether a given file selector button widget's internal file
32 * selector will raise an Elementary "inner window", instead of a dedicated
33 * Elementary window.
34 *
35 * See also @ref elm_fileselector_button_inwin_mode_set for more details.
36 *
37 * @return true to make it use an inner window, false to make it use a
38 * dedicated window
39 *
40 * @ingroup Elm_Fileselector_Button
41 */
42EAPI Eina_Bool elm_fileselector_button_inwin_mode_get(const Elm_Fileselector_Button *obj);
43
44/**
45 * @brief Set the size of a given file selector button widget's window, holding
46 * the file selector itself.
47 *
48 * @note it will only take any effect if the file selector button widget is not
49 * under "inwin mode". The default size for the window (when applicable) is
50 * 400x400 pixels.
51 *
52 * See also @ref elm_fileselector_button_window_size_get.
53 *
54 * @param[in] width The window's width
55 * @param[in] height The window's height
56 *
57 * @ingroup Elm_Fileselector_Button
58 */
59EAPI void elm_fileselector_button_window_size_set(Elm_Fileselector_Button *obj, Evas_Coord width, Evas_Coord height);
60
61/**
62 * @brief Get the size of a given file selector button widget's window, holding
63 * the file selector itself.
64 *
65 * @note Use null pointers on the size values you're not interested in: they'll
66 * be ignored by the function.
67 *
68 * See also @ref elm_fileselector_button_window_size_set for more details.
69 *
70 * @param[out] width The window's width
71 * @param[out] height The window's height
72 *
73 * @ingroup Elm_Fileselector_Button
74 */
75EAPI void elm_fileselector_button_window_size_get(const Elm_Fileselector_Button *obj, Evas_Coord *width, Evas_Coord *height);
76
77/**
78 * @brief Set the title for a given file selector button widget's window
79 *
80 * This will change the popup window's title, when the file selector pops out
81 * after a click on the button. Those windows have the default (unlocalized)
82 * value of "Select a file" as titles.
83 *
84 * @note It will only take effect if the file selector button widget is not
85 * under "inwin mode".
86 *
87 * See also @ref elm_fileselector_button_window_title_get.
88 *
89 * @param[in] title The title string.
90 *
91 * @ingroup Elm_Fileselector_Button
92 */
93EAPI void elm_fileselector_button_window_title_set(Elm_Fileselector_Button *obj, const char *title);
94
95/**
96 * @brief Get the title for a given file selector button widget's window
97 *
98 * See also @ref elm_fileselector_button_window_title_set for more details.
99 *
100 * @return The title string.
101 *
102 * @ingroup Elm_Fileselector_Button
103 */
104EAPI const char *elm_fileselector_button_window_title_get(const Elm_Fileselector_Button *obj);
diff --git a/src/lib/elementary/elm_fileselector_button.eo b/src/lib/elementary/elm_fileselector_button.eo
index a025ee2a5e..dc81ec0696 100644
--- a/src/lib/elementary/elm_fileselector_button.eo
+++ b/src/lib/elementary/elm_fileselector_button.eo
@@ -1,88 +1,6 @@
1class Elm.Fileselector_Button (Elm.Button, Elm.Interface.Fileselector) 1class Elm.Fileselector_Button (Elm.Button, Elm.Interface.Fileselector)
2{ 2{
3 legacy_prefix: elm_fileselector_button;
4 eo_prefix: elm_obj_fileselector_button;
5 event_prefix: elm_fileselector_button; 3 event_prefix: elm_fileselector_button;
6 methods {
7 @property inwin_mode {
8 set {
9 [[Set whether a given file selector button widget's internal file
10 selector will raise an Elementary "inner window", instead of a
11 dedicated Elementary window. By default, it depends on the
12 current profile.
13
14 See \@ref elm_win_inwin_add for more information on inner windows.
15 See also @.inwin_mode.get.
16 ]]
17 }
18 get {
19 [[Get whether a given file selector button widget's internal file
20 selector will raise an Elementary "inner window", instead of a
21 dedicated Elementary window.
22
23 See also @.inwin_mode.set for more details.
24 ]]
25 }
26 values {
27 value: bool; [[true to make it use an inner window, false to make
28 it use a dedicated window]]
29 }
30 }
31 @property window_size {
32 set {
33 [[Set the size of a given file selector button widget's window,
34 holding the file selector itself.
35
36 Note: it will only take any effect if the file selector button
37 widget is not under "inwin mode". The default size for the
38 window (when applicable) is 400x400 pixels.
39
40 See also @.window_size.get.
41 ]]
42 }
43 get {
44 [[Get the size of a given file selector button widget's window,
45 holding the file selector itself.
46
47 Note: Use null pointers on the size values you're not
48 interested in: they'll be ignored by the function.
49
50 See also @.window_size.set for more
51 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 button widget's window
62
63 This will change the popup window's title, when the file selector
64 pops out after a click on the button. Those windows have the
65 default (unlocalized) value of "Select a file" as titles.
66
67 Note: It will only take effect if the file selector
68 button widget is not under "inwin mode".
69
70 See also @.window_title.get.
71 ]]
72 }
73 get {
74 [[Get the title for a given file selector button widget's
75 window
76
77 See also @.window_title.set for more
78 details.
79 ]]
80 }
81 values {
82 title: const(char)*; [[The title string.]]
83 }
84 }
85 }
86 implements { 4 implements {
87 Eo.Base.constructor; 5 Eo.Base.constructor;
88 Evas.Object.Smart.add; 6 Evas.Object.Smart.add;