forked from enlightenment/efl
fileselector button: Move EO APIs to legacy
This commit is contained in:
parent
317ce60ab6
commit
f212b62d52
|
@ -232,32 +232,40 @@ _elm_fileselector_button_eo_base_constructor(Eo *obj, Elm_Fileselector_Button_Da
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static void
|
EAPI void
|
||||||
_elm_fileselector_button_window_title_set(Eo *obj EINA_UNUSED, Elm_Fileselector_Button_Data *sd, const char *title)
|
elm_fileselector_button_window_title_set(Eo *obj, const char *title)
|
||||||
{
|
{
|
||||||
|
ELM_FILESELECTOR_BUTTON_CHECK(obj);
|
||||||
|
ELM_FILESELECTOR_BUTTON_DATA_GET_OR_RETURN(obj, sd);
|
||||||
eina_stringshare_replace(&sd->window_title, title);
|
eina_stringshare_replace(&sd->window_title, title);
|
||||||
|
|
||||||
if (sd->fsw) elm_win_title_set(sd->fsw, sd->window_title);
|
if (sd->fsw) elm_win_title_set(sd->fsw, sd->window_title);
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static const char *
|
EAPI const char *
|
||||||
_elm_fileselector_button_window_title_get(Eo *obj EINA_UNUSED, Elm_Fileselector_Button_Data *sd)
|
elm_fileselector_button_window_title_get(const Eo *obj)
|
||||||
{
|
{
|
||||||
|
ELM_FILESELECTOR_BUTTON_CHECK(obj) NULL;
|
||||||
|
ELM_FILESELECTOR_BUTTON_DATA_GET_OR_RETURN_VAL(obj, sd, NULL);
|
||||||
return sd->window_title;
|
return sd->window_title;
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static void
|
EAPI void
|
||||||
_elm_fileselector_button_window_size_set(Eo *obj EINA_UNUSED, Elm_Fileselector_Button_Data *sd, Evas_Coord width, Evas_Coord height)
|
elm_fileselector_button_window_size_set(Eo *obj, Evas_Coord width, Evas_Coord height)
|
||||||
{
|
{
|
||||||
|
ELM_FILESELECTOR_BUTTON_CHECK(obj);
|
||||||
|
ELM_FILESELECTOR_BUTTON_DATA_GET_OR_RETURN(obj, sd);
|
||||||
sd->w = width;
|
sd->w = width;
|
||||||
sd->h = height;
|
sd->h = height;
|
||||||
|
|
||||||
if (sd->fsw) evas_object_resize(sd->fsw, sd->w, sd->h);
|
if (sd->fsw) evas_object_resize(sd->fsw, sd->w, sd->h);
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static void
|
EAPI void
|
||||||
_elm_fileselector_button_window_size_get(Eo *obj EINA_UNUSED, Elm_Fileselector_Button_Data *sd, Evas_Coord *width, Evas_Coord *height)
|
elm_fileselector_button_window_size_get(const Eo *obj, Evas_Coord *width, Evas_Coord *height)
|
||||||
{
|
{
|
||||||
|
if (width) *width = 0;
|
||||||
|
if (height) *height = 0;
|
||||||
|
ELM_FILESELECTOR_BUTTON_CHECK(obj);
|
||||||
|
ELM_FILESELECTOR_BUTTON_DATA_GET_OR_RETURN(obj, sd);
|
||||||
if (width) *width = sd->w;
|
if (width) *width = sd->w;
|
||||||
if (height) *height = sd->h;
|
if (height) *height = sd->h;
|
||||||
}
|
}
|
||||||
|
@ -502,15 +510,19 @@ _elm_fileselector_button_elm_interface_fileselector_hidden_visible_get(Eo *obj E
|
||||||
return sd->fsd.hidden_visible;
|
return sd->fsd.hidden_visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static void
|
EAPI void
|
||||||
_elm_fileselector_button_inwin_mode_set(Eo *obj EINA_UNUSED, Elm_Fileselector_Button_Data *sd, Eina_Bool value)
|
elm_fileselector_button_inwin_mode_set(Eo *obj, Eina_Bool value)
|
||||||
{
|
{
|
||||||
|
ELM_FILESELECTOR_BUTTON_CHECK(obj);
|
||||||
|
ELM_FILESELECTOR_BUTTON_DATA_GET_OR_RETURN(obj, sd);
|
||||||
sd->inwin_mode = value;
|
sd->inwin_mode = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static Eina_Bool
|
EAPI Eina_Bool
|
||||||
_elm_fileselector_button_inwin_mode_get(Eo *obj EINA_UNUSED, Elm_Fileselector_Button_Data *sd)
|
elm_fileselector_button_inwin_mode_get(const Eo *obj)
|
||||||
{
|
{
|
||||||
|
ELM_FILESELECTOR_BUTTON_CHECK(obj) EINA_FALSE;
|
||||||
|
ELM_FILESELECTOR_BUTTON_DATA_GET_OR_RETURN_VAL(obj, sd, EINA_FALSE);
|
||||||
return sd->inwin_mode;
|
return sd->inwin_mode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,3 +11,94 @@
|
||||||
EAPI Evas_Object *elm_fileselector_button_add(Evas_Object *parent);
|
EAPI Evas_Object *elm_fileselector_button_add(Evas_Object *parent);
|
||||||
|
|
||||||
#include "elm_fileselector_button.eo.legacy.h"
|
#include "elm_fileselector_button.eo.legacy.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Set whether a given file selector button widget's internal file
|
||||||
|
* selector will raise an Elementary "inner window", instead of a dedicated
|
||||||
|
* Elementary window. By default, it depends on the current profile.
|
||||||
|
*
|
||||||
|
* See @ref elm_win_inwin_add for more information on inner windows. See also
|
||||||
|
* @ref elm_fileselector_button_inwin_mode_get.
|
||||||
|
*
|
||||||
|
* @param[in] value true to make it use an inner window, false to make it use a
|
||||||
|
* dedicated window
|
||||||
|
*
|
||||||
|
* @ingroup Elm_Fileselector_Button
|
||||||
|
*/
|
||||||
|
EAPI void elm_fileselector_button_inwin_mode_set(Elm_Fileselector_Button *obj, Eina_Bool value);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Get whether a given file selector button widget's internal file
|
||||||
|
* selector will raise an Elementary "inner window", instead of a dedicated
|
||||||
|
* Elementary window.
|
||||||
|
*
|
||||||
|
* See also @ref elm_fileselector_button_inwin_mode_set for more details.
|
||||||
|
*
|
||||||
|
* @return true to make it use an inner window, false to make it use a
|
||||||
|
* dedicated window
|
||||||
|
*
|
||||||
|
* @ingroup Elm_Fileselector_Button
|
||||||
|
*/
|
||||||
|
EAPI Eina_Bool elm_fileselector_button_inwin_mode_get(const Elm_Fileselector_Button *obj);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Set the size of a given file selector button widget's window, holding
|
||||||
|
* the file selector itself.
|
||||||
|
*
|
||||||
|
* @note it will only take any effect if the file selector button widget is not
|
||||||
|
* under "inwin mode". The default size for the window (when applicable) is
|
||||||
|
* 400x400 pixels.
|
||||||
|
*
|
||||||
|
* See also @ref elm_fileselector_button_window_size_get.
|
||||||
|
*
|
||||||
|
* @param[in] width The window's width
|
||||||
|
* @param[in] height The window's height
|
||||||
|
*
|
||||||
|
* @ingroup Elm_Fileselector_Button
|
||||||
|
*/
|
||||||
|
EAPI void elm_fileselector_button_window_size_set(Elm_Fileselector_Button *obj, Evas_Coord width, Evas_Coord height);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Get the size of a given file selector button widget's window, holding
|
||||||
|
* the file selector itself.
|
||||||
|
*
|
||||||
|
* @note Use null pointers on the size values you're not interested in: they'll
|
||||||
|
* be ignored by the function.
|
||||||
|
*
|
||||||
|
* See also @ref elm_fileselector_button_window_size_set for more details.
|
||||||
|
*
|
||||||
|
* @param[out] width The window's width
|
||||||
|
* @param[out] height The window's height
|
||||||
|
*
|
||||||
|
* @ingroup Elm_Fileselector_Button
|
||||||
|
*/
|
||||||
|
EAPI void elm_fileselector_button_window_size_get(const Elm_Fileselector_Button *obj, Evas_Coord *width, Evas_Coord *height);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Set the title for a given file selector button widget's window
|
||||||
|
*
|
||||||
|
* This will change the popup window's title, when the file selector pops out
|
||||||
|
* after a click on the button. Those windows have the default (unlocalized)
|
||||||
|
* value of "Select a file" as titles.
|
||||||
|
*
|
||||||
|
* @note It will only take effect if the file selector button widget is not
|
||||||
|
* under "inwin mode".
|
||||||
|
*
|
||||||
|
* See also @ref elm_fileselector_button_window_title_get.
|
||||||
|
*
|
||||||
|
* @param[in] title The title string.
|
||||||
|
*
|
||||||
|
* @ingroup Elm_Fileselector_Button
|
||||||
|
*/
|
||||||
|
EAPI void elm_fileselector_button_window_title_set(Elm_Fileselector_Button *obj, const char *title);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Get the title for a given file selector button widget's window
|
||||||
|
*
|
||||||
|
* See also @ref elm_fileselector_button_window_title_set for more details.
|
||||||
|
*
|
||||||
|
* @return The title string.
|
||||||
|
*
|
||||||
|
* @ingroup Elm_Fileselector_Button
|
||||||
|
*/
|
||||||
|
EAPI const char *elm_fileselector_button_window_title_get(const Elm_Fileselector_Button *obj);
|
||||||
|
|
|
@ -1,88 +1,6 @@
|
||||||
class Elm.Fileselector_Button (Elm.Button, Elm.Interface.Fileselector)
|
class Elm.Fileselector_Button (Elm.Button, Elm.Interface.Fileselector)
|
||||||
{
|
{
|
||||||
legacy_prefix: elm_fileselector_button;
|
|
||||||
eo_prefix: elm_obj_fileselector_button;
|
|
||||||
event_prefix: elm_fileselector_button;
|
event_prefix: elm_fileselector_button;
|
||||||
methods {
|
|
||||||
@property inwin_mode {
|
|
||||||
set {
|
|
||||||
[[Set whether a given file selector button widget's internal file
|
|
||||||
selector will raise an Elementary "inner window", instead of a
|
|
||||||
dedicated Elementary window. By default, it depends on the
|
|
||||||
current profile.
|
|
||||||
|
|
||||||
See \@ref elm_win_inwin_add for more information on inner windows.
|
|
||||||
See also @.inwin_mode.get.
|
|
||||||
]]
|
|
||||||
}
|
|
||||||
get {
|
|
||||||
[[Get whether a given file selector button widget's internal file
|
|
||||||
selector will raise an Elementary "inner window", instead of a
|
|
||||||
dedicated Elementary window.
|
|
||||||
|
|
||||||
See also @.inwin_mode.set for more details.
|
|
||||||
]]
|
|
||||||
}
|
|
||||||
values {
|
|
||||||
value: bool; [[true to make it use an inner window, false to make
|
|
||||||
it use a dedicated window]]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@property window_size {
|
|
||||||
set {
|
|
||||||
[[Set the size of a given file selector button widget's window,
|
|
||||||
holding the file selector itself.
|
|
||||||
|
|
||||||
Note: it will only take any effect if the file selector button
|
|
||||||
widget is not under "inwin mode". The default size for the
|
|
||||||
window (when applicable) is 400x400 pixels.
|
|
||||||
|
|
||||||
See also @.window_size.get.
|
|
||||||
]]
|
|
||||||
}
|
|
||||||
get {
|
|
||||||
[[Get the size of a given file selector button widget's window,
|
|
||||||
holding the file selector itself.
|
|
||||||
|
|
||||||
Note: Use null pointers on the size values you're not
|
|
||||||
interested in: they'll be ignored by the function.
|
|
||||||
|
|
||||||
See also @.window_size.set for more
|
|
||||||
details.
|
|
||||||
]]
|
|
||||||
}
|
|
||||||
values {
|
|
||||||
width: Evas.Coord; [[The window's width]]
|
|
||||||
height: Evas.Coord; [[The window's height]]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@property window_title {
|
|
||||||
set {
|
|
||||||
[[Set the title for a given file selector button widget's window
|
|
||||||
|
|
||||||
This will change the popup window's title, when the file selector
|
|
||||||
pops out after a click on the button. Those windows have the
|
|
||||||
default (unlocalized) value of "Select a file" as titles.
|
|
||||||
|
|
||||||
Note: It will only take effect if the file selector
|
|
||||||
button widget is not under "inwin mode".
|
|
||||||
|
|
||||||
See also @.window_title.get.
|
|
||||||
]]
|
|
||||||
}
|
|
||||||
get {
|
|
||||||
[[Get the title for a given file selector button widget's
|
|
||||||
window
|
|
||||||
|
|
||||||
See also @.window_title.set for more
|
|
||||||
details.
|
|
||||||
]]
|
|
||||||
}
|
|
||||||
values {
|
|
||||||
title: const(char)*; [[The title string.]]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
implements {
|
implements {
|
||||||
Eo.Base.constructor;
|
Eo.Base.constructor;
|
||||||
Evas.Object.Smart.add;
|
Evas.Object.Smart.add;
|
||||||
|
|
Loading…
Reference in New Issue