2012-08-30 09:45:28 -07:00
|
|
|
//FIXME this widget should inherit from file selector button
|
2013-04-25 22:13:00 -07:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
# include "elementary_config.h"
|
|
|
|
#endif
|
2012-08-30 09:45:28 -07:00
|
|
|
|
2018-04-03 04:27:30 -07:00
|
|
|
#define EFL_ACCESS_OBJECT_PROTECTED
|
2018-05-03 16:34:17 -07:00
|
|
|
#define EFL_PART_PROTECTED
|
2014-10-17 08:56:11 -07:00
|
|
|
|
2010-10-13 18:18:14 -07:00
|
|
|
#include <Elementary.h>
|
2018-01-26 16:56:31 -08:00
|
|
|
#include "Eio_Eo.h"
|
2010-10-13 18:18:14 -07:00
|
|
|
#include "elm_priv.h"
|
2019-03-05 14:00:37 -08:00
|
|
|
#include "elm_fileselector_button_eo.h"
|
|
|
|
#include "elm_fileselector_entry_eo.h"
|
2014-01-21 05:50:35 -08:00
|
|
|
#include "elm_interface_fileselector.h"
|
2012-08-30 09:45:28 -07:00
|
|
|
#include "elm_widget_fileselector_entry.h"
|
2019-03-05 14:00:37 -08:00
|
|
|
#include "elm_entry_eo.h"
|
2019-03-05 14:00:37 -08:00
|
|
|
#include "elm_fileselector_eo.h"
|
2010-10-13 18:18:14 -07:00
|
|
|
|
edje/elm: Rename _internal_ to _part_ (EO)
In Edje and Elementary, we have part objects, which are what is returned
by the interface efl_part(). Those objects can't be of an opaque type as
this doesn't work nicely with strongly typed languages such as C++ or
C#. In JS, Lua, C the types are weak and mostly runtime-based so it
doesn't matter much.
As a consequence, the documentation and the types need to look nice in
this EO API. Thus, we remove the abusive term "internal" and explicitly
call all those classes "part" something.
Eventually we want the types to be declared in the EO file so bindings
(C#, C++, ...) can generate the proper access methods, returning the
best possible types.
Note that right now a few of those part types are used in the legacy API
but don't actually need to be exposed externally.
This is kind of a mega commit that does all the renaming at once, but
it's really just a big sed operation. The power of good IDEs :)
Ref T5315
Ref T5306
2017-09-12 21:29:25 -07:00
|
|
|
#include "elm_fileselector_entry_part.eo.h"
|
2016-05-24 04:40:18 -07:00
|
|
|
#include "elm_part_helper.h"
|
|
|
|
|
2014-06-03 03:35:28 -07:00
|
|
|
#define MY_CLASS ELM_FILESELECTOR_ENTRY_CLASS
|
2012-11-25 22:32:53 -08:00
|
|
|
|
2013-11-07 03:44:22 -08:00
|
|
|
#define MY_CLASS_NAME "Elm_Fileselector_Entry"
|
|
|
|
#define MY_CLASS_NAME_LEGACY "elm_fileselector_entry"
|
2012-11-25 22:32:53 -08:00
|
|
|
|
2013-09-02 16:39:02 -07:00
|
|
|
#define ELM_PRIV_FILESELECTOR_ENTRY_SIGNALS(cmd) \
|
|
|
|
cmd(SIG_CHANGED, "changed", "") \
|
|
|
|
cmd(SIG_ACTIVATED, "activated", "") \
|
|
|
|
cmd(SIG_PRESS, "press", "") \
|
|
|
|
cmd(SIG_LONGPRESSED, "longpressed", "") \
|
|
|
|
cmd(SIG_CLICKED, "clicked", "") \
|
|
|
|
cmd(SIG_CLICKED_DOUBLE, "clicked,double", "") \
|
|
|
|
cmd(SIG_FOCUSED, "focused", "") \
|
|
|
|
cmd(SIG_UNFOCUSED, "unfocused", "") \
|
|
|
|
cmd(SIG_SELECTION_PASTE, "selection,paste", "") \
|
|
|
|
cmd(SIG_SELECTION_COPY, "selection,copy", "") \
|
|
|
|
cmd(SIG_SELECTION_CUT, "selection,cut", "") \
|
|
|
|
cmd(SIG_UNPRESSED, "unpressed", "") \
|
2016-08-22 17:59:10 -07:00
|
|
|
cmd(SIG_FILE_CHOSEN, "file,chosen", "s") \
|
2013-09-02 16:39:02 -07:00
|
|
|
|
|
|
|
ELM_PRIV_FILESELECTOR_ENTRY_SIGNALS(ELM_PRIV_STATIC_VARIABLE_DECLARE);
|
2013-04-23 05:00:50 -07:00
|
|
|
|
2012-08-30 09:45:28 -07:00
|
|
|
static const Evas_Smart_Cb_Description _smart_callbacks[] =
|
|
|
|
{
|
2013-09-02 16:39:02 -07:00
|
|
|
ELM_PRIV_FILESELECTOR_ENTRY_SIGNALS(ELM_PRIV_SMART_CALLBACKS_DESC)
|
2014-01-23 02:30:34 -08:00
|
|
|
{SIG_WIDGET_LANG_CHANGED, ""}, /**< handled by elm_widget */
|
2014-02-07 21:05:06 -08:00
|
|
|
{SIG_WIDGET_ACCESS_CHANGED, ""}, /**< handled by elm_widget */
|
2012-08-30 09:45:28 -07:00
|
|
|
{NULL, NULL}
|
2010-10-13 18:18:14 -07:00
|
|
|
};
|
2013-10-18 10:20:34 -07:00
|
|
|
#undef ELM_PRIV_FILESELECTOR_ENTRY_SIGNALS
|
2010-10-13 18:18:14 -07:00
|
|
|
|
2015-05-17 00:37:49 -07:00
|
|
|
#define SIG_FWD(name, event) \
|
2016-06-20 07:31:31 -07:00
|
|
|
static void \
|
2016-08-30 05:34:10 -07:00
|
|
|
_##name##_fwd(void *data, const Efl_Event *ev EINA_UNUSED) \
|
2012-08-30 09:45:28 -07:00
|
|
|
{ \
|
2016-08-22 15:40:39 -07:00
|
|
|
efl_event_callback_legacy_call(data, event, ev->info); \
|
2012-08-30 09:45:28 -07:00
|
|
|
}
|
2015-05-17 00:37:49 -07:00
|
|
|
SIG_FWD(CHANGED, ELM_FILESELECTOR_ENTRY_EVENT_CHANGED)
|
|
|
|
SIG_FWD(PRESS, ELM_FILESELECTOR_ENTRY_EVENT_PRESS)
|
Efl.Ui.Text : all related interfaces
Summary:
Change summary:
Removed :
- efl_ui_text_selectable.eo and add it functionality into efl_text_interactive.eo
- efl_ui_text_editable.eo because it is same as efl_ui_text.eo (just set one property by default)
Modifications:
- Move all Text Input enums and functionality from efl_ui_text class into its own interface, this interface will be implemented at efl_ui_internal_text_interactive class.
- Rename selection_allowed property to selectable (same as other "editable" property) in efl_text_interactive
- Add select_all function into efl_text_interactive interface
- Add have_selection property into efl_text_interactive interface
- Move user_change , selection_start/change/clear and undo/redo events into efl_text_interactive interface.
- Move methods and events of copy/paste/cut into efl_ui_text
- Fix password-related functionality
- Remove context menu clear and add_item methods. (these should be added later with better design)
- Remove Validation event from EFL_UI_TEXT. (these should be added later with better design)
Reviewers: woohyun, tasn, segfaultxavi, zmike, bu5hm4n
Subscribers: stefan_schmidt, a.srour, q66, zmike, segfaultxavi, cedric
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D10711
2019-12-08 17:58:39 -08:00
|
|
|
SIG_FWD(SELECTION_PASTE, EFL_UI_TEXT_EVENT_SELECTION_PASTE)
|
|
|
|
SIG_FWD(SELECTION_COPY, EFL_UI_TEXT_EVENT_SELECTION_COPY)
|
|
|
|
SIG_FWD(SELECTION_CUT, EFL_UI_TEXT_EVENT_SELECTION_CUT)
|
2010-10-13 18:18:14 -07:00
|
|
|
#undef SIG_FWD
|
|
|
|
|
2019-05-13 12:14:20 -07:00
|
|
|
#define SIG_FWD(name, event) \
|
|
|
|
static void \
|
|
|
|
_##name##_fwd(void *data, Evas_Object *obj EINA_UNUSED, void *event_info) \
|
|
|
|
{ \
|
|
|
|
evas_object_smart_callback_call(data, event, event_info); \
|
|
|
|
}
|
|
|
|
SIG_FWD(CLICKED, "clicked")
|
|
|
|
SIG_FWD(CLICKED_DOUBLE, "clicked,double")
|
|
|
|
SIG_FWD(UNPRESSED, "unpressed")
|
|
|
|
SIG_FWD(LONGPRESSED, "longpressed")
|
|
|
|
#undef SIG_FWD
|
|
|
|
|
|
|
|
|
2016-06-06 00:16:57 -07:00
|
|
|
static void
|
2018-01-26 16:56:31 -08:00
|
|
|
_FILE_CHOSEN_fwd(void *data, const Efl_Event *event)
|
2010-10-13 18:18:14 -07:00
|
|
|
{
|
2018-01-26 16:56:31 -08:00
|
|
|
Efl_Model *model = event->info;
|
|
|
|
Eo *fs = data;
|
|
|
|
Eina_Value *path;
|
|
|
|
char *file = NULL;
|
2016-08-22 17:59:10 -07:00
|
|
|
ELM_FILESELECTOR_ENTRY_DATA_GET(fs, sd);
|
2012-08-30 09:45:28 -07:00
|
|
|
|
2018-01-26 16:56:31 -08:00
|
|
|
efl_ui_view_model_set(sd->entry, model);
|
2019-01-31 03:59:19 -08:00
|
|
|
efl_ui_property_bind(sd->entry, "default", "path");
|
2018-01-26 16:56:31 -08:00
|
|
|
|
|
|
|
path = efl_model_property_get(model, "path");
|
|
|
|
file = eina_value_to_string(path);
|
2016-08-26 17:06:49 -07:00
|
|
|
|
2016-08-22 17:59:10 -07:00
|
|
|
_model_event_call
|
2019-03-13 10:39:49 -07:00
|
|
|
(fs, ELM_FILESELECTOR_ENTRY_EVENT_FILE_CHOSEN, ELM_FILESELECTOR_ENTRY_EVENT_FILE_CHOSEN->name, model, file);
|
2016-06-06 00:16:57 -07:00
|
|
|
|
2018-01-26 16:56:31 -08:00
|
|
|
eina_value_free(path);
|
|
|
|
free(file);
|
2016-06-06 00:16:57 -07:00
|
|
|
}
|
|
|
|
|
2016-06-20 07:31:31 -07:00
|
|
|
static void
|
2016-08-30 05:34:10 -07:00
|
|
|
_ACTIVATED_fwd(void *data, const Efl_Event *event)
|
2010-10-13 18:18:14 -07:00
|
|
|
{
|
2012-08-30 09:45:28 -07:00
|
|
|
const char *file;
|
2016-06-06 00:16:57 -07:00
|
|
|
Efl_Model *bmodel, *model;
|
2010-10-13 18:18:14 -07:00
|
|
|
|
2012-08-30 09:45:28 -07:00
|
|
|
ELM_FILESELECTOR_ENTRY_DATA_GET(data, sd);
|
2011-10-30 17:13:32 -07:00
|
|
|
|
2012-08-30 09:45:28 -07:00
|
|
|
file = elm_object_text_get(sd->entry);
|
2016-06-06 00:16:57 -07:00
|
|
|
|
2018-02-14 18:14:52 -08:00
|
|
|
bmodel = efl_ui_view_model_get(sd->button);
|
2016-06-06 00:16:57 -07:00
|
|
|
if (bmodel)
|
|
|
|
{
|
2019-04-02 11:42:48 -07:00
|
|
|
model = efl_add(efl_class_get(bmodel), sd->button,
|
|
|
|
efl_io_model_path_set(efl_added, file));
|
|
|
|
efl_ui_view_model_set(sd->button, model);
|
2016-06-06 00:16:57 -07:00
|
|
|
}
|
|
|
|
|
2016-08-22 15:40:39 -07:00
|
|
|
efl_event_callback_legacy_call
|
2016-04-12 07:23:55 -07:00
|
|
|
(data, ELM_FILESELECTOR_ENTRY_EVENT_ACTIVATED, event->info);
|
2010-10-13 18:18:14 -07:00
|
|
|
}
|
|
|
|
|
2019-03-04 10:37:07 -08:00
|
|
|
EOLIAN static Eina_Error
|
2018-01-07 20:55:35 -08:00
|
|
|
_elm_fileselector_entry_efl_ui_widget_theme_apply(Eo *obj, Elm_Fileselector_Entry_Data *sd)
|
2010-10-13 18:18:14 -07:00
|
|
|
{
|
2012-08-30 09:45:28 -07:00
|
|
|
const char *style;
|
2010-10-14 11:24:24 -07:00
|
|
|
char buf[1024];
|
|
|
|
|
2019-03-04 10:36:41 -08:00
|
|
|
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EFL_UI_THEME_APPLY_ERROR_GENERIC);
|
2012-11-25 22:32:53 -08:00
|
|
|
|
2019-03-04 10:37:07 -08:00
|
|
|
Eina_Error int_ret = EFL_UI_THEME_APPLY_ERROR_GENERIC;
|
2017-10-23 22:03:46 -07:00
|
|
|
int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
|
2019-03-04 10:36:41 -08:00
|
|
|
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
|
2012-08-30 09:45:28 -07:00
|
|
|
|
|
|
|
style = elm_widget_style_get(obj);
|
|
|
|
|
2017-06-13 03:41:15 -07:00
|
|
|
efl_ui_mirrored_set(sd->button, efl_ui_mirrored_get(obj));
|
2011-02-10 07:13:05 -08:00
|
|
|
|
2010-10-13 18:18:14 -07:00
|
|
|
if (elm_object_disabled_get(obj))
|
2012-08-30 09:45:28 -07:00
|
|
|
elm_layout_signal_emit(obj, "elm,state,disabled", "elm");
|
2010-10-13 18:18:14 -07:00
|
|
|
|
2010-10-14 11:24:24 -07:00
|
|
|
if (!style) style = "default";
|
|
|
|
snprintf(buf, sizeof(buf), "fileselector_entry/%s", style);
|
2012-08-30 09:45:28 -07:00
|
|
|
elm_widget_style_set(sd->button, buf);
|
|
|
|
elm_widget_style_set(sd->entry, buf);
|
2010-10-14 11:24:24 -07:00
|
|
|
|
2012-11-25 22:32:53 -08:00
|
|
|
edje_object_message_signal_process(wd->resize_obj);
|
2010-10-13 18:18:14 -07:00
|
|
|
|
2012-08-30 09:45:28 -07:00
|
|
|
elm_layout_sizing_eval(obj);
|
|
|
|
|
theme: return enum from elm_widget_style_set instead of bool
Summary:
if trying to apply incorrect theme, widget apply default theme and return TRUE.
so there is no way to check it really apply correct theme.
To resolve this problem, _elm_theme_set return three type enum
* related history : 4ca3ef45146e05908a13d1010909abeba9693ad6
* elm_object_style_set is public api, so I didn't change it.
* typedef name [ Theme_Apply ] is temporarily, please suggest better one.
@fix
Reviewers: singh.amitesh, herb, Hermet, cedric, jpeg, raster
Subscribers: cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D4073
2016-06-30 23:09:42 -07:00
|
|
|
return int_ret;
|
2010-10-13 18:18:14 -07:00
|
|
|
}
|
|
|
|
|
2017-07-05 04:06:24 -07:00
|
|
|
static Eina_Bool
|
2017-06-04 07:25:36 -07:00
|
|
|
_elm_fileselector_entry_text_set(Eo *obj, Elm_Fileselector_Entry_Data *sd, const char *part, const char *label)
|
2011-07-04 03:14:05 -07:00
|
|
|
{
|
2018-05-23 03:35:18 -07:00
|
|
|
if (part && strcmp(part, "elm.text"))
|
2012-11-25 22:32:53 -08:00
|
|
|
{
|
2017-06-04 07:25:36 -07:00
|
|
|
efl_text_set(efl_part(efl_super(obj, MY_CLASS), part), label);
|
2012-11-25 22:32:53 -08:00
|
|
|
}
|
2012-08-30 09:45:28 -07:00
|
|
|
|
|
|
|
elm_object_text_set(sd->button, label);
|
2014-03-29 23:48:21 -07:00
|
|
|
return EINA_TRUE;
|
2011-07-04 03:14:05 -07:00
|
|
|
}
|
|
|
|
|
2017-07-05 04:06:24 -07:00
|
|
|
static const char *
|
2017-06-04 07:25:36 -07:00
|
|
|
_elm_fileselector_entry_text_get(Eo *obj, Elm_Fileselector_Entry_Data *sd, const char *part)
|
2011-07-04 03:14:05 -07:00
|
|
|
{
|
2018-05-23 03:35:18 -07:00
|
|
|
if (part && strcmp(part, "elm.text"))
|
2012-11-25 22:32:53 -08:00
|
|
|
{
|
2014-03-29 23:48:21 -07:00
|
|
|
const char *text = NULL;
|
2017-06-04 07:25:36 -07:00
|
|
|
text = efl_text_get(efl_part(efl_super(obj, MY_CLASS), part));
|
2014-03-29 23:48:21 -07:00
|
|
|
return text;
|
2012-11-25 22:32:53 -08:00
|
|
|
}
|
2012-08-30 09:45:28 -07:00
|
|
|
|
2014-03-29 23:48:21 -07:00
|
|
|
return elm_object_text_get(sd->button);
|
2011-07-04 03:14:05 -07:00
|
|
|
}
|
|
|
|
|
2016-05-24 04:40:18 -07:00
|
|
|
static Eina_Bool
|
|
|
|
_elm_fileselector_entry_content_set(Eo *obj, Elm_Fileselector_Entry_Data *sd, const char *part, Evas_Object *content)
|
2012-01-09 00:06:43 -08:00
|
|
|
{
|
2012-08-30 09:45:28 -07:00
|
|
|
if (part && strcmp(part, "button icon"))
|
2012-11-25 22:32:53 -08:00
|
|
|
{
|
2016-08-15 06:44:41 -07:00
|
|
|
return efl_content_set(efl_part(efl_super(obj, MY_CLASS), part), content);
|
2012-11-25 22:32:53 -08:00
|
|
|
}
|
2012-08-30 09:45:28 -07:00
|
|
|
|
|
|
|
elm_layout_content_set(sd->button, NULL, content);
|
|
|
|
|
2014-03-29 23:48:21 -07:00
|
|
|
return EINA_TRUE;
|
2012-01-09 00:06:43 -08:00
|
|
|
}
|
|
|
|
|
2016-05-24 04:40:18 -07:00
|
|
|
static Evas_Object *
|
|
|
|
_elm_fileselector_entry_content_get(Eo *obj, Elm_Fileselector_Entry_Data *sd, const char *part)
|
2012-01-09 00:06:43 -08:00
|
|
|
{
|
2012-08-30 09:45:28 -07:00
|
|
|
if (part && strcmp(part, "button icon"))
|
2012-11-25 22:32:53 -08:00
|
|
|
{
|
2016-08-15 06:44:41 -07:00
|
|
|
return efl_content_get(efl_part(efl_super(obj, MY_CLASS), part));
|
2012-11-25 22:32:53 -08:00
|
|
|
}
|
2012-08-30 09:45:28 -07:00
|
|
|
|
2014-03-29 23:48:21 -07:00
|
|
|
return elm_layout_content_get(sd->button, NULL);
|
2012-01-09 00:06:43 -08:00
|
|
|
}
|
|
|
|
|
2016-05-24 04:40:18 -07:00
|
|
|
static Evas_Object *
|
|
|
|
_elm_fileselector_entry_content_unset(Eo *obj, Elm_Fileselector_Entry_Data *sd, const char *part)
|
2012-01-09 00:06:43 -08:00
|
|
|
{
|
2012-08-30 09:45:28 -07:00
|
|
|
if (part && strcmp(part, "button icon"))
|
2012-11-25 22:32:53 -08:00
|
|
|
{
|
2016-08-15 06:44:41 -07:00
|
|
|
return efl_content_unset(efl_part(efl_super(obj, MY_CLASS), part));
|
2012-11-25 22:32:53 -08:00
|
|
|
}
|
2012-08-30 09:45:28 -07:00
|
|
|
|
2014-03-29 23:48:21 -07:00
|
|
|
return elm_layout_content_unset(sd->button, NULL);
|
2012-01-09 00:06:43 -08:00
|
|
|
}
|
|
|
|
|
2014-03-29 23:48:21 -07:00
|
|
|
EOLIAN static void
|
2016-06-17 01:26:08 -07:00
|
|
|
_elm_fileselector_entry_efl_canvas_group_group_add(Eo *obj, Elm_Fileselector_Entry_Data *priv)
|
2010-10-13 18:18:14 -07:00
|
|
|
{
|
2016-08-15 06:44:41 -07:00
|
|
|
efl_canvas_group_add(efl_super(obj, MY_CLASS));
|
2013-08-26 08:29:45 -07:00
|
|
|
|
2012-08-30 09:45:28 -07:00
|
|
|
priv->button = elm_fileselector_button_add(obj);
|
2017-06-14 19:12:00 -07:00
|
|
|
efl_ui_mirrored_automatic_set(priv->button, EINA_FALSE);
|
2017-06-13 03:41:15 -07:00
|
|
|
efl_ui_mirrored_set(priv->button, efl_ui_mirrored_get(obj));
|
2012-08-30 09:45:28 -07:00
|
|
|
elm_widget_style_set(priv->button, "fileselector_entry/default");
|
2019-01-24 02:40:34 -08:00
|
|
|
efl_composite_attach(obj, priv->button);
|
2019-07-30 10:11:48 -07:00
|
|
|
efl_ui_layout_finger_size_multiplier_set(obj, 0, 0);
|
2012-08-30 09:45:28 -07:00
|
|
|
|
2014-01-21 05:50:35 -08:00
|
|
|
elm_fileselector_expandable_set
|
2012-08-30 09:45:28 -07:00
|
|
|
(priv->button, _elm_config->fileselector_expand_enable);
|
|
|
|
|
2019-05-13 12:14:20 -07:00
|
|
|
#define SIG_FWD(name, event) \
|
|
|
|
evas_object_smart_callback_add(priv->button, event, _##name##_fwd, obj)
|
|
|
|
SIG_FWD(CLICKED, "clicked");
|
|
|
|
SIG_FWD(UNPRESSED, "unpressed");
|
|
|
|
#undef SIG_FWD
|
|
|
|
|
2015-05-17 00:37:49 -07:00
|
|
|
#define SIG_FWD(name, event) \
|
2016-08-10 07:23:04 -07:00
|
|
|
efl_event_callback_add(priv->button, event, _##name##_fwd, obj)
|
2016-08-22 17:59:10 -07:00
|
|
|
SIG_FWD(FILE_CHOSEN, ELM_FILESELECTOR_BUTTON_EVENT_FILE_CHOSEN);
|
2010-10-13 18:18:14 -07:00
|
|
|
#undef SIG_FWD
|
|
|
|
|
2012-08-30 09:45:28 -07:00
|
|
|
priv->entry = elm_entry_add(obj);
|
|
|
|
elm_entry_scrollable_set(priv->entry, EINA_TRUE);
|
2017-06-14 19:12:00 -07:00
|
|
|
efl_ui_mirrored_automatic_set(priv->entry, EINA_FALSE);
|
2012-08-30 09:45:28 -07:00
|
|
|
elm_widget_style_set(priv->entry, "fileselector_entry/default");
|
|
|
|
elm_entry_single_line_set(priv->entry, EINA_TRUE);
|
|
|
|
elm_entry_editable_set(priv->entry, EINA_TRUE);
|
|
|
|
|
2015-05-17 00:37:49 -07:00
|
|
|
#define SIG_FWD(name, event) \
|
2016-08-10 07:23:04 -07:00
|
|
|
efl_event_callback_add(priv->entry, event, _##name##_fwd, obj)
|
2015-09-02 08:41:04 -07:00
|
|
|
SIG_FWD(CHANGED, ELM_ENTRY_EVENT_CHANGED);
|
|
|
|
SIG_FWD(ACTIVATED, ELM_ENTRY_EVENT_ACTIVATED);
|
|
|
|
SIG_FWD(PRESS, ELM_ENTRY_EVENT_PRESS);
|
Efl.Ui.Text : all related interfaces
Summary:
Change summary:
Removed :
- efl_ui_text_selectable.eo and add it functionality into efl_text_interactive.eo
- efl_ui_text_editable.eo because it is same as efl_ui_text.eo (just set one property by default)
Modifications:
- Move all Text Input enums and functionality from efl_ui_text class into its own interface, this interface will be implemented at efl_ui_internal_text_interactive class.
- Rename selection_allowed property to selectable (same as other "editable" property) in efl_text_interactive
- Add select_all function into efl_text_interactive interface
- Add have_selection property into efl_text_interactive interface
- Move user_change , selection_start/change/clear and undo/redo events into efl_text_interactive interface.
- Move methods and events of copy/paste/cut into efl_ui_text
- Fix password-related functionality
- Remove context menu clear and add_item methods. (these should be added later with better design)
- Remove Validation event from EFL_UI_TEXT. (these should be added later with better design)
Reviewers: woohyun, tasn, segfaultxavi, zmike, bu5hm4n
Subscribers: stefan_schmidt, a.srour, q66, zmike, segfaultxavi, cedric
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D10711
2019-12-08 17:58:39 -08:00
|
|
|
SIG_FWD(SELECTION_PASTE, EFL_UI_TEXT_EVENT_SELECTION_PASTE);
|
|
|
|
SIG_FWD(SELECTION_COPY, EFL_UI_TEXT_EVENT_SELECTION_COPY);
|
|
|
|
SIG_FWD(SELECTION_CUT, EFL_UI_TEXT_EVENT_SELECTION_CUT);
|
2010-10-13 18:18:14 -07:00
|
|
|
#undef SIG_FWD
|
2019-05-13 12:14:20 -07:00
|
|
|
#define SIG_FWD(name, event) \
|
|
|
|
evas_object_smart_callback_add(priv->entry, event, _##name##_fwd, obj)
|
|
|
|
SIG_FWD(LONGPRESSED, "longpressed");
|
|
|
|
SIG_FWD(CLICKED, "clicked");
|
|
|
|
SIG_FWD(CLICKED_DOUBLE, "clicked,double");
|
|
|
|
#undef SIG_FWD
|
2017-11-20 13:25:46 -08:00
|
|
|
efl_event_callback_forwarder_add(priv->entry, EFL_UI_FOCUS_OBJECT_EVENT_FOCUS_CHANGED, obj);
|
|
|
|
|
2014-01-15 04:44:21 -08:00
|
|
|
if (!elm_layout_theme_set
|
|
|
|
(obj, "fileselector_entry", "base", elm_widget_style_get(obj)))
|
|
|
|
CRI("Failed to set layout!");
|
|
|
|
else
|
|
|
|
{
|
|
|
|
elm_layout_content_set(obj, "elm.swallow.button", priv->button);
|
|
|
|
elm_layout_content_set(obj, "elm.swallow.entry", priv->entry);
|
|
|
|
}
|
|
|
|
|
2012-08-30 09:45:28 -07:00
|
|
|
elm_layout_sizing_eval(obj);
|
|
|
|
}
|
|
|
|
|
2014-03-29 23:48:21 -07:00
|
|
|
EOLIAN static void
|
2016-06-17 01:26:08 -07:00
|
|
|
_elm_fileselector_entry_efl_canvas_group_group_del(Eo *obj, Elm_Fileselector_Entry_Data *sd)
|
2012-08-30 09:45:28 -07:00
|
|
|
{
|
2014-01-21 18:08:47 -08:00
|
|
|
free(sd->path);
|
2012-08-30 09:45:28 -07:00
|
|
|
|
2016-08-15 06:44:41 -07:00
|
|
|
efl_canvas_group_del(efl_super(obj, MY_CLASS));
|
2012-08-30 09:45:28 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
EAPI Evas_Object *
|
|
|
|
elm_fileselector_entry_add(Evas_Object *parent)
|
|
|
|
{
|
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
|
2017-11-06 21:00:43 -08:00
|
|
|
return elm_legacy_add(MY_CLASS, parent);
|
2012-11-25 22:32:53 -08:00
|
|
|
}
|
2012-08-30 09:45:28 -07:00
|
|
|
|
2015-05-19 05:34:07 -07:00
|
|
|
EOLIAN static Eo *
|
2016-08-10 07:23:04 -07:00
|
|
|
_elm_fileselector_entry_efl_object_constructor(Eo *obj, Elm_Fileselector_Entry_Data *sd EINA_UNUSED)
|
2012-11-25 22:32:53 -08:00
|
|
|
{
|
2016-08-15 06:44:41 -07:00
|
|
|
obj = efl_constructor(efl_super(obj, MY_CLASS));
|
2016-06-20 21:26:15 -07:00
|
|
|
efl_canvas_object_type_set(obj, MY_CLASS_NAME_LEGACY);
|
2016-06-16 22:12:02 -07:00
|
|
|
evas_object_smart_callbacks_descriptions_set(obj, _smart_callbacks);
|
2018-04-03 04:27:30 -07:00
|
|
|
efl_access_object_role_set(obj, EFL_ACCESS_ROLE_GROUPING);
|
2018-10-22 04:39:06 -07:00
|
|
|
legacy_child_focus_handle(obj);
|
2015-05-19 05:34:07 -07:00
|
|
|
|
|
|
|
return obj;
|
2010-10-13 18:18:14 -07:00
|
|
|
}
|
|
|
|
|
2014-01-21 06:50:31 -08:00
|
|
|
EINA_DEPRECATED EAPI void
|
2016-06-06 00:16:57 -07:00
|
|
|
elm_fileselector_entry_selected_set(Evas_Object *obj, const char *path)
|
2010-10-13 18:18:14 -07:00
|
|
|
{
|
2014-01-21 05:50:35 -08:00
|
|
|
ELM_FILESELECTOR_INTERFACE_CHECK(obj);
|
2016-09-14 17:02:15 -07:00
|
|
|
elm_fileselector_selected_set(obj, path);
|
|
|
|
}
|
|
|
|
|
|
|
|
Eina_Bool
|
|
|
|
_elm_fileselector_entry_selected_set_internal(Evas_Object *obj, const char *path)
|
|
|
|
{
|
|
|
|
ELM_FILESELECTOR_ENTRY_DATA_GET_OR_RETURN_VAL(obj, sd, EINA_FALSE);
|
|
|
|
elm_fileselector_path_set(sd->button, path);
|
|
|
|
return EINA_TRUE;
|
2012-11-25 22:32:53 -08:00
|
|
|
}
|
|
|
|
|
2018-01-26 16:56:31 -08:00
|
|
|
EOLIAN static Eina_Bool
|
2016-06-06 00:16:57 -07:00
|
|
|
_elm_fileselector_entry_elm_interface_fileselector_selected_model_set(Eo *obj EINA_UNUSED,
|
|
|
|
Elm_Fileselector_Entry_Data *sd,
|
2016-09-29 09:12:09 -07:00
|
|
|
Efl_Model *model)
|
2012-11-25 22:32:53 -08:00
|
|
|
{
|
2018-02-14 18:14:52 -08:00
|
|
|
efl_ui_view_model_set(sd->button, model);
|
2018-01-26 16:56:31 -08:00
|
|
|
|
|
|
|
return EINA_TRUE;
|
2010-10-13 18:18:14 -07:00
|
|
|
}
|
|
|
|
|
2014-01-21 06:50:31 -08:00
|
|
|
EINA_DEPRECATED EAPI const char *
|
2010-10-13 18:18:14 -07:00
|
|
|
elm_fileselector_entry_selected_get(const Evas_Object *obj)
|
|
|
|
{
|
2014-01-21 05:50:35 -08:00
|
|
|
ELM_FILESELECTOR_INTERFACE_CHECK(obj, NULL);
|
2016-09-14 17:02:15 -07:00
|
|
|
return elm_fileselector_selected_get((Eo *) obj);
|
|
|
|
}
|
|
|
|
|
|
|
|
const char *
|
|
|
|
_elm_fileselector_entry_selected_get_internal(const Evas_Object *obj)
|
|
|
|
{
|
2016-06-06 00:16:57 -07:00
|
|
|
ELM_FILESELECTOR_ENTRY_DATA_GET_OR_RETURN_VAL(obj, sd, NULL);
|
2016-09-14 17:02:15 -07:00
|
|
|
return elm_fileselector_path_get(sd->button);
|
2012-11-25 22:32:53 -08:00
|
|
|
}
|
2012-08-30 09:45:28 -07:00
|
|
|
|
2016-06-06 00:16:57 -07:00
|
|
|
EOLIAN static Efl_Model *
|
2018-01-26 16:56:31 -08:00
|
|
|
_elm_fileselector_entry_elm_interface_fileselector_selected_model_get(const Eo *obj EINA_UNUSED, Elm_Fileselector_Entry_Data *sd)
|
2010-10-13 18:18:14 -07:00
|
|
|
{
|
2018-02-14 18:14:52 -08:00
|
|
|
return efl_ui_view_model_get(sd->button);
|
2012-11-25 22:32:53 -08:00
|
|
|
}
|
|
|
|
|
2016-05-24 19:56:59 -07:00
|
|
|
EAPI void
|
|
|
|
elm_fileselector_entry_window_title_set(Eo *obj, const char *title)
|
2012-11-25 22:32:53 -08:00
|
|
|
{
|
2016-05-24 19:56:59 -07:00
|
|
|
ELM_FILESELECTOR_ENTRY_CHECK(obj);
|
|
|
|
ELM_FILESELECTOR_ENTRY_DATA_GET_OR_RETURN(obj, sd);
|
2012-08-30 09:45:28 -07:00
|
|
|
elm_fileselector_button_window_title_set(sd->button, title);
|
2010-10-13 18:18:14 -07:00
|
|
|
}
|
|
|
|
|
2016-05-24 19:56:59 -07:00
|
|
|
EAPI const char *
|
|
|
|
elm_fileselector_entry_window_title_get(const Eo *obj)
|
2010-10-13 18:18:14 -07:00
|
|
|
{
|
2016-05-24 19:56:59 -07:00
|
|
|
ELM_FILESELECTOR_ENTRY_CHECK(obj) NULL;
|
|
|
|
ELM_FILESELECTOR_ENTRY_DATA_GET_OR_RETURN_VAL(obj, sd, NULL);
|
2014-03-29 23:48:21 -07:00
|
|
|
return elm_fileselector_button_window_title_get(sd->button);
|
2012-11-25 22:32:53 -08:00
|
|
|
}
|
|
|
|
|
2016-05-24 19:56:59 -07:00
|
|
|
EAPI void
|
|
|
|
elm_fileselector_entry_window_size_set(Eo *obj, Evas_Coord width, Evas_Coord height)
|
2012-11-25 22:32:53 -08:00
|
|
|
{
|
2016-05-24 19:56:59 -07:00
|
|
|
ELM_FILESELECTOR_ENTRY_CHECK(obj);
|
|
|
|
ELM_FILESELECTOR_ENTRY_DATA_GET_OR_RETURN(obj, sd);
|
2012-08-30 09:45:28 -07:00
|
|
|
elm_fileselector_button_window_size_set(sd->button, width, height);
|
2010-10-13 18:18:14 -07:00
|
|
|
}
|
|
|
|
|
2016-05-24 19:56:59 -07:00
|
|
|
EAPI void
|
|
|
|
elm_fileselector_entry_window_size_get(const Eo *obj, Evas_Coord *width, Evas_Coord *height)
|
2012-11-25 22:32:53 -08:00
|
|
|
{
|
2016-05-24 19:56:59 -07:00
|
|
|
if (width) *width = 0;
|
|
|
|
if (height) *height = 0;
|
|
|
|
ELM_FILESELECTOR_ENTRY_CHECK(obj);
|
|
|
|
ELM_FILESELECTOR_ENTRY_DATA_GET_OR_RETURN(obj, sd);
|
2012-08-30 09:45:28 -07:00
|
|
|
elm_fileselector_button_window_size_get(sd->button, width, height);
|
2010-10-13 18:18:14 -07:00
|
|
|
}
|
|
|
|
|
2014-01-21 06:50:31 -08:00
|
|
|
EINA_DEPRECATED EAPI void
|
2012-08-30 09:45:28 -07:00
|
|
|
elm_fileselector_entry_path_set(Evas_Object *obj,
|
|
|
|
const char *path)
|
2012-11-25 22:32:53 -08:00
|
|
|
{
|
2014-01-21 05:50:35 -08:00
|
|
|
ELM_FILESELECTOR_INTERFACE_CHECK(obj);
|
2016-09-14 17:02:15 -07:00
|
|
|
elm_fileselector_path_set(obj, path);
|
2016-07-22 14:43:12 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
_elm_fileselector_entry_path_set_internal(Evas_Object *obj, const char *path)
|
|
|
|
{
|
2016-06-06 00:16:57 -07:00
|
|
|
ELM_FILESELECTOR_ENTRY_DATA_GET_OR_RETURN(obj, sd);
|
2016-09-14 17:02:15 -07:00
|
|
|
char *s;
|
|
|
|
|
|
|
|
elm_fileselector_path_set(sd->button, path);
|
|
|
|
|
|
|
|
s = elm_entry_utf8_to_markup(path);
|
2016-06-06 00:16:57 -07:00
|
|
|
if (s)
|
|
|
|
{
|
|
|
|
elm_object_text_set(sd->entry, s);
|
|
|
|
free(s);
|
|
|
|
}
|
2012-11-25 22:32:53 -08:00
|
|
|
}
|
|
|
|
|
2016-06-06 00:16:57 -07:00
|
|
|
EOLIAN static void
|
2018-02-14 18:14:52 -08:00
|
|
|
_elm_fileselector_entry_efl_ui_view_model_set(Eo *obj EINA_UNUSED, Elm_Fileselector_Entry_Data *sd, Efl_Model *model)
|
2016-06-06 00:16:57 -07:00
|
|
|
{
|
2019-04-18 16:17:05 -07:00
|
|
|
if (!efl_isa(model, EFL_IO_MODEL_CLASS))
|
|
|
|
return ;
|
2018-02-14 18:14:52 -08:00
|
|
|
efl_ui_view_model_set(sd->button, model);
|
2018-01-26 16:56:31 -08:00
|
|
|
efl_ui_view_model_set(sd->entry, model);
|
2019-01-31 03:59:19 -08:00
|
|
|
efl_ui_property_bind(sd->entry, "default", "path");
|
2016-06-06 00:16:57 -07:00
|
|
|
}
|
|
|
|
|
2014-01-21 06:50:31 -08:00
|
|
|
EINA_DEPRECATED EAPI const char *
|
2010-10-13 18:18:14 -07:00
|
|
|
elm_fileselector_entry_path_get(const Evas_Object *obj)
|
|
|
|
{
|
2014-01-21 05:50:35 -08:00
|
|
|
ELM_FILESELECTOR_INTERFACE_CHECK(obj, NULL);
|
2016-09-14 17:02:15 -07:00
|
|
|
return elm_fileselector_path_get(obj);
|
2016-07-22 14:43:12 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
const char *
|
|
|
|
_elm_fileselector_entry_path_get_internal(const Evas_Object *obj)
|
|
|
|
{
|
2016-06-06 00:16:57 -07:00
|
|
|
ELM_FILESELECTOR_ENTRY_DATA_GET_OR_RETURN_VAL(obj, sd, NULL);
|
|
|
|
free(sd->path);
|
|
|
|
sd->path = elm_entry_markup_to_utf8(elm_object_text_get(sd->entry));
|
|
|
|
return sd->path;
|
2012-11-25 22:32:53 -08:00
|
|
|
}
|
|
|
|
|
2016-06-06 00:16:57 -07:00
|
|
|
EOLIAN static Efl_Model *
|
2019-04-02 10:04:32 -07:00
|
|
|
_elm_fileselector_entry_efl_ui_view_model_get(const Eo *obj, Elm_Fileselector_Entry_Data *sd)
|
2012-11-25 22:32:53 -08:00
|
|
|
{
|
2016-06-06 00:16:57 -07:00
|
|
|
Efl_Model *bmodel, *ret;
|
2019-04-02 10:04:32 -07:00
|
|
|
|
2018-02-14 18:14:52 -08:00
|
|
|
bmodel = efl_ui_view_model_get(sd->button);
|
2016-06-06 00:16:57 -07:00
|
|
|
if (!bmodel)
|
|
|
|
{
|
|
|
|
WRN("no base Efl.Model");
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2014-01-21 18:08:47 -08:00
|
|
|
free(sd->path);
|
2012-08-30 09:45:28 -07:00
|
|
|
sd->path = elm_entry_markup_to_utf8(elm_object_text_get(sd->entry));
|
2019-04-02 10:04:32 -07:00
|
|
|
|
|
|
|
if (!strcmp(sd->path, efl_io_model_path_get(bmodel)))
|
|
|
|
return bmodel;
|
|
|
|
|
|
|
|
ret = efl_add_ref(efl_class_get(bmodel), (Eo*) obj,
|
|
|
|
efl_io_model_path_set(efl_added, sd->path),
|
|
|
|
efl_loop_model_volatile_make(efl_added));
|
|
|
|
eina_freeq_ptr_add(postponed_fq, ret, EINA_FREE_CB(efl_unref), sizeof (void*));
|
2016-06-06 00:16:57 -07:00
|
|
|
|
|
|
|
return ret;
|
2010-10-13 18:18:14 -07:00
|
|
|
}
|
|
|
|
|
2014-01-21 06:50:31 -08:00
|
|
|
EINA_DEPRECATED EAPI void
|
2012-08-30 09:45:28 -07:00
|
|
|
elm_fileselector_entry_expandable_set(Evas_Object *obj,
|
|
|
|
Eina_Bool value)
|
2010-10-13 18:18:14 -07:00
|
|
|
{
|
2014-01-21 05:50:35 -08:00
|
|
|
ELM_FILESELECTOR_INTERFACE_CHECK(obj);
|
2016-03-02 04:10:48 -08:00
|
|
|
elm_interface_fileselector_expandable_set(obj, value);
|
2012-11-25 22:32:53 -08:00
|
|
|
}
|
|
|
|
|
2014-03-29 23:48:21 -07:00
|
|
|
EOLIAN static void
|
2014-04-22 05:51:46 -07:00
|
|
|
_elm_fileselector_entry_elm_interface_fileselector_expandable_set(Eo *obj EINA_UNUSED, Elm_Fileselector_Entry_Data *sd, Eina_Bool value)
|
2012-11-25 22:32:53 -08:00
|
|
|
{
|
2014-01-21 05:50:35 -08:00
|
|
|
elm_fileselector_expandable_set(sd->button, value);
|
2010-10-13 18:18:14 -07:00
|
|
|
}
|
|
|
|
|
2014-01-21 06:50:31 -08:00
|
|
|
EINA_DEPRECATED EAPI Eina_Bool
|
2010-10-13 18:18:14 -07:00
|
|
|
elm_fileselector_entry_expandable_get(const Evas_Object *obj)
|
|
|
|
{
|
2014-01-21 05:50:35 -08:00
|
|
|
ELM_FILESELECTOR_INTERFACE_CHECK(obj, EINA_FALSE);
|
2016-05-24 19:56:59 -07:00
|
|
|
return elm_interface_fileselector_expandable_get((Eo *) obj);
|
2012-11-25 22:32:53 -08:00
|
|
|
}
|
|
|
|
|
2014-03-29 23:48:21 -07:00
|
|
|
EOLIAN static Eina_Bool
|
2018-04-17 11:09:44 -07:00
|
|
|
_elm_fileselector_entry_elm_interface_fileselector_expandable_get(const Eo *obj EINA_UNUSED, Elm_Fileselector_Entry_Data *sd)
|
2012-11-25 22:32:53 -08:00
|
|
|
{
|
2014-03-29 23:48:21 -07:00
|
|
|
return elm_fileselector_expandable_get(sd->button);
|
2010-10-13 18:18:14 -07:00
|
|
|
}
|
|
|
|
|
2014-01-21 06:50:31 -08:00
|
|
|
EINA_DEPRECATED EAPI void
|
2012-08-30 09:45:28 -07:00
|
|
|
elm_fileselector_entry_folder_only_set(Evas_Object *obj,
|
|
|
|
Eina_Bool value)
|
2010-10-13 18:18:14 -07:00
|
|
|
{
|
2014-01-21 05:50:35 -08:00
|
|
|
ELM_FILESELECTOR_INTERFACE_CHECK(obj);
|
2016-03-02 04:10:48 -08:00
|
|
|
elm_interface_fileselector_folder_only_set(obj, value);
|
2012-11-25 22:32:53 -08:00
|
|
|
}
|
|
|
|
|
2014-03-29 23:48:21 -07:00
|
|
|
EOLIAN static void
|
2014-04-22 05:51:46 -07:00
|
|
|
_elm_fileselector_entry_elm_interface_fileselector_folder_only_set(Eo *obj EINA_UNUSED, Elm_Fileselector_Entry_Data *sd, Eina_Bool value)
|
2012-11-25 22:32:53 -08:00
|
|
|
{
|
2014-01-21 05:50:35 -08:00
|
|
|
elm_fileselector_folder_only_set(sd->button, value);
|
2010-10-13 18:18:14 -07:00
|
|
|
}
|
|
|
|
|
2014-01-21 06:50:31 -08:00
|
|
|
EINA_DEPRECATED EAPI Eina_Bool
|
2010-10-13 18:18:14 -07:00
|
|
|
elm_fileselector_entry_folder_only_get(const Evas_Object *obj)
|
|
|
|
{
|
2014-01-21 05:50:35 -08:00
|
|
|
ELM_FILESELECTOR_INTERFACE_CHECK(obj, EINA_FALSE);
|
2016-05-24 19:56:59 -07:00
|
|
|
return elm_interface_fileselector_folder_only_get((Eo *) obj);
|
2012-11-25 22:32:53 -08:00
|
|
|
}
|
|
|
|
|
2014-03-29 23:48:21 -07:00
|
|
|
EOLIAN static Eina_Bool
|
2018-04-17 11:09:44 -07:00
|
|
|
_elm_fileselector_entry_elm_interface_fileselector_folder_only_get(const Eo *obj EINA_UNUSED, Elm_Fileselector_Entry_Data *sd)
|
2012-11-25 22:32:53 -08:00
|
|
|
{
|
2014-03-29 23:48:21 -07:00
|
|
|
return elm_fileselector_folder_only_get(sd->button);
|
2010-10-13 18:18:14 -07:00
|
|
|
}
|
|
|
|
|
2014-01-21 06:50:31 -08:00
|
|
|
EINA_DEPRECATED EAPI void
|
2012-08-30 09:45:28 -07:00
|
|
|
elm_fileselector_entry_is_save_set(Evas_Object *obj,
|
|
|
|
Eina_Bool value)
|
2010-10-13 18:18:14 -07:00
|
|
|
{
|
2014-01-21 05:50:35 -08:00
|
|
|
ELM_FILESELECTOR_INTERFACE_CHECK(obj);
|
2016-03-02 04:10:48 -08:00
|
|
|
elm_interface_fileselector_is_save_set(obj, value);
|
2012-11-25 22:32:53 -08:00
|
|
|
}
|
|
|
|
|
2014-03-29 23:48:21 -07:00
|
|
|
EOLIAN static void
|
2014-04-22 05:51:46 -07:00
|
|
|
_elm_fileselector_entry_elm_interface_fileselector_is_save_set(Eo *obj EINA_UNUSED, Elm_Fileselector_Entry_Data *sd, Eina_Bool value)
|
2012-11-25 22:32:53 -08:00
|
|
|
{
|
2014-01-21 05:50:35 -08:00
|
|
|
elm_fileselector_is_save_set(sd->button, value);
|
2010-10-13 18:18:14 -07:00
|
|
|
}
|
|
|
|
|
2014-01-21 06:50:31 -08:00
|
|
|
EINA_DEPRECATED EAPI Eina_Bool
|
2010-10-13 18:18:14 -07:00
|
|
|
elm_fileselector_entry_is_save_get(const Evas_Object *obj)
|
|
|
|
{
|
2014-01-21 05:50:35 -08:00
|
|
|
ELM_FILESELECTOR_INTERFACE_CHECK(obj, EINA_FALSE);
|
2016-05-24 19:56:59 -07:00
|
|
|
return elm_interface_fileselector_is_save_get((Eo *) obj);
|
2012-11-25 22:32:53 -08:00
|
|
|
}
|
|
|
|
|
2014-03-29 23:48:21 -07:00
|
|
|
EOLIAN static Eina_Bool
|
2018-04-17 11:09:44 -07:00
|
|
|
_elm_fileselector_entry_elm_interface_fileselector_is_save_get(const Eo *obj EINA_UNUSED, Elm_Fileselector_Entry_Data *sd)
|
2010-10-13 18:18:14 -07:00
|
|
|
{
|
2014-03-29 23:48:21 -07:00
|
|
|
return elm_fileselector_is_save_get(sd->button);
|
2012-11-25 22:32:53 -08:00
|
|
|
}
|
|
|
|
|
2016-05-24 19:56:59 -07:00
|
|
|
EAPI void
|
|
|
|
elm_fileselector_entry_inwin_mode_set(Eo *obj, Eina_Bool value)
|
2012-11-25 22:32:53 -08:00
|
|
|
{
|
2016-05-24 19:56:59 -07:00
|
|
|
ELM_FILESELECTOR_ENTRY_CHECK(obj);
|
|
|
|
ELM_FILESELECTOR_ENTRY_DATA_GET_OR_RETURN(obj, sd);
|
2012-08-30 09:45:28 -07:00
|
|
|
elm_fileselector_button_inwin_mode_set(sd->button, value);
|
2010-10-13 18:18:14 -07:00
|
|
|
}
|
|
|
|
|
2016-05-24 19:56:59 -07:00
|
|
|
EAPI Eina_Bool
|
|
|
|
elm_fileselector_entry_inwin_mode_get(const Eo *obj)
|
2010-10-13 18:18:14 -07:00
|
|
|
{
|
2016-05-24 19:56:59 -07:00
|
|
|
ELM_FILESELECTOR_ENTRY_CHECK(obj) EINA_FALSE;
|
|
|
|
ELM_FILESELECTOR_ENTRY_DATA_GET_OR_RETURN_VAL(obj, sd, EINA_FALSE);
|
2014-03-29 23:48:21 -07:00
|
|
|
return elm_fileselector_button_inwin_mode_get(sd->button);
|
2012-11-25 22:32:53 -08:00
|
|
|
}
|
|
|
|
|
2014-03-29 23:48:21 -07:00
|
|
|
EOLIAN static void
|
2016-08-10 07:23:04 -07:00
|
|
|
_elm_fileselector_entry_class_constructor(Efl_Class *klass)
|
2012-11-25 22:32:53 -08:00
|
|
|
{
|
2013-11-07 03:44:22 -08:00
|
|
|
evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass);
|
2012-11-25 22:32:53 -08:00
|
|
|
}
|
2014-03-29 23:48:21 -07:00
|
|
|
|
2016-05-24 04:40:18 -07:00
|
|
|
/* Efl.Part begin */
|
|
|
|
|
2017-09-19 04:02:26 -07:00
|
|
|
ELM_PART_OVERRIDE(elm_fileselector_entry, ELM_FILESELECTOR_ENTRY, Elm_Fileselector_Entry_Data)
|
|
|
|
ELM_PART_OVERRIDE_CONTENT_SET(elm_fileselector_entry, ELM_FILESELECTOR_ENTRY, Elm_Fileselector_Entry_Data)
|
|
|
|
ELM_PART_OVERRIDE_CONTENT_GET(elm_fileselector_entry, ELM_FILESELECTOR_ENTRY, Elm_Fileselector_Entry_Data)
|
|
|
|
ELM_PART_OVERRIDE_CONTENT_UNSET(elm_fileselector_entry, ELM_FILESELECTOR_ENTRY, Elm_Fileselector_Entry_Data)
|
|
|
|
ELM_PART_OVERRIDE_TEXT_SET(elm_fileselector_entry, ELM_FILESELECTOR_ENTRY, Elm_Fileselector_Entry_Data)
|
|
|
|
ELM_PART_OVERRIDE_TEXT_GET(elm_fileselector_entry, ELM_FILESELECTOR_ENTRY, Elm_Fileselector_Entry_Data)
|
2017-11-28 20:43:21 -08:00
|
|
|
ELM_PART_CONTENT_DEFAULT_GET(elm_fileselector_entry, "button icon")
|
edje/elm: Rename _internal_ to _part_ (EO)
In Edje and Elementary, we have part objects, which are what is returned
by the interface efl_part(). Those objects can't be of an opaque type as
this doesn't work nicely with strongly typed languages such as C++ or
C#. In JS, Lua, C the types are weak and mostly runtime-based so it
doesn't matter much.
As a consequence, the documentation and the types need to look nice in
this EO API. Thus, we remove the abusive term "internal" and explicitly
call all those classes "part" something.
Eventually we want the types to be declared in the EO file so bindings
(C#, C++, ...) can generate the proper access methods, returning the
best possible types.
Note that right now a few of those part types are used in the legacy API
but don't actually need to be exposed externally.
This is kind of a mega commit that does all the renaming at once, but
it's really just a big sed operation. The power of good IDEs :)
Ref T5315
Ref T5306
2017-09-12 21:29:25 -07:00
|
|
|
#include "elm_fileselector_entry_part.eo.c"
|
2016-05-24 04:40:18 -07:00
|
|
|
|
|
|
|
/* Efl.Part end */
|
|
|
|
|
2017-05-18 01:52:17 -07:00
|
|
|
/* Internal EO APIs and hidden overrides */
|
|
|
|
|
|
|
|
#define ELM_FILESELECTOR_ENTRY_EXTRA_OPS \
|
2017-06-29 04:02:59 -07:00
|
|
|
ELM_PART_CONTENT_DEFAULT_OPS(elm_fileselector_entry), \
|
2017-05-18 01:52:17 -07:00
|
|
|
EFL_CANVAS_GROUP_ADD_DEL_OPS(elm_fileselector_entry)
|
|
|
|
|
2019-03-05 14:00:37 -08:00
|
|
|
#include "elm_fileselector_entry_eo.c"
|