Merge branch 'master' into devs/hermet/lottie

This commit is contained in:
Hermet Park 2019-08-20 10:24:53 +09:00
commit 4575b2f92c
67 changed files with 775 additions and 249 deletions

View File

@ -1281,6 +1281,22 @@ group { name: "efl/scroller:noclip";
}
}
group { name: "efl/scroller:popup/no_inset_shadow";
inherit: "efl/scroller";
parts {
part { name: "inset";
description { state: "default" 0.0;
visible: 0;
}
}
part { name: "shadow";
description { state: "default" 0.0;
visible: 0;
}
}
}
}
group { name: "efl/scroller/contents";
parts {
part { name: "efl.content";

View File

@ -248,8 +248,6 @@ config_h.set('SIZEOF_INT', cc.sizeof('int'))
config_h.set('SIZEOF_LONG', cc.sizeof('long'))
if sys_windows == true
config_h.set('HAVE_DLSYM', '1')
config_h.set('HAVE_NOTIFY_WIN32', '1')
config_h.set10('HAVE_WINDOWS_H', true)
config_h.set10('HAVE_DDRAW_H', true)
endif

View File

@ -34,9 +34,13 @@
#include <errno.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/mman.h>
#include <unistd.h>
#include <ctype.h>
#ifdef _WIN32
# include <evil_private.h> /* mmap */
#else
# include <sys/mman.h>
#endif
#include "edje_cc.h"

View File

@ -32,7 +32,6 @@
#include <errno.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/mman.h>
#include <unistd.h>
#include "elm_prefs_cc.h"

View File

@ -393,6 +393,8 @@ test_label_colors(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *ev
elm_object_text_set(lb,
"<color=red>this is red color line(color = red)<color><br>"
"<color=#0000FF>this is blue color line (color = #0000FF)<color><br>"
"<color=rgb(0,255,0)>this is green color line (color = rgb(0,255,0))<color><br>"
"<color=rgba(0,255,0,255)>this is blue color line (color = rgba(0,255,0,255))<color><br>"
);
evas_object_size_hint_weight_set(lb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(win, lb);

View File

@ -251,8 +251,26 @@ struct property_extension_method_definition_generator
if (property.setter.is_engaged())
{
attributes::type_def prop_type = property.setter->parameters[0].type;
if (!as_generator("public static Efl.Bindable<" << type(true) << "> " << managed_name << "<T>(this Efl.Ui.ItemFactory<T> fac) where T : " << name_helpers::klass_full_concrete_or_interface_name(cls) << " {\n"
<< scope_tab << scope_tab << "return new Efl.Bindable<" << type(true) << ">(\"" << property.name << "\", fac);\n"
if (!as_generator("public static Efl.BindableProperty<" << type(true) << "> " << managed_name << "<T>(this Efl.Ui.ItemFactory<T> fac, Efl.Csharp.ExtensionTag<"
<< name_helpers::klass_full_concrete_or_interface_name(cls)
<< ", T>magic = null) where T : " << name_helpers::klass_full_concrete_or_interface_name(cls) << " {\n"
<< scope_tab << scope_tab << "return new Efl.BindableProperty<" << type(true) << ">(\"" << property.name << "\", fac);\n"
<< scope_tab << "}\n"
).generate(sink, std::make_tuple(prop_type, prop_type), context))
return false;
}
// Do we need BindablePart extensions for this class?
if (!helpers::inherits_from(cls, "Efl.Ui.LayoutPart"))
return true;
if (property.setter.is_engaged())
{
attributes::type_def prop_type = property.setter->parameters[0].type;
if (!as_generator("public static Efl.BindableProperty<" << type(true) << "> " << managed_name << "<T>(this Efl.BindablePart<T> part, Efl.Csharp.ExtensionTag<"
<< name_helpers::klass_full_concrete_or_interface_name(cls)
<< ", T>magic = null) where T : " << name_helpers::klass_full_concrete_or_interface_name(cls) << " {\n"
<< scope_tab << scope_tab << "return new Efl.BindableProperty<" << type(true) << ">(part.PartName, \"" << property.name << "\", part.Binder);\n"
<< scope_tab << "}\n"
).generate(sink, std::make_tuple(prop_type, prop_type), context))
return false;

View File

@ -163,6 +163,18 @@ bool has_regular_ancestor(attributes::klass_def const& cls)
return std::any_of(inherits.begin(), inherits.end(), is_regular);
}
/*
* Sugar for checking if a given class in in the inheritance tree
*/
bool inherits_from(attributes::klass_def const& cls, std::string const& name)
{
return std::any_of(cls.inherits.begin(), cls.inherits.end(),
[&](attributes::klass_name const& inherit)
{
return name_helpers::klass_full_concrete_or_interface_name(inherit) == name;
});
}
/*
* Gets all methods that this class should implement (i.e. that come from an unimplemented interface/mixin and the class itself)
*/

View File

@ -348,14 +348,24 @@ struct klass
if(!name_helpers::close_namespaces(sink, cls.namespaces, context))
return false;
std::vector<attributes::property_def> implementable_properties;
std::copy(cls.properties.begin(), cls.properties.end(), std::back_inserter(implementable_properties));
for (auto&& klass : helpers::non_implemented_interfaces(cls, context))
{
attributes::klass_def c(get_klass(klass, cls.unit), cls.unit);
std::copy(c.properties.begin(), c.properties.end(), std::back_inserter(implementable_properties));
}
if(!as_generator
(lit("#pragma warning disable CS1591\n") // Disabling warnings as DocFx will hide these classes
<<"public static class " << (string % "_") << name_helpers::klass_inherit_name(cls)
<< "_ExtensionMethods {\n"
<< *((scope_tab << property_extension_method_definition(cls)) << "\n")
<< *((scope_tab << part_extension_method_definition(cls)) << "\n")
<< "}\n"
<< lit("#pragma warning restore CS1591\n"))
.generate(sink, std::make_tuple(cls.namespaces, cls.properties), context))
.generate(sink, std::make_tuple(cls.namespaces, implementable_properties, cls.parts), context))
return false;
return true;

View File

@ -35,6 +35,39 @@ struct part_definition_generator
} const part_definition {};
struct part_extension_method_definition_generator
{
template<typename OutputIterator, typename Context>
bool generate(OutputIterator sink, attributes::part_def const& part, Context context) const
{
if (blacklist::is_class_blacklisted(part.klass, context))
return true;
auto part_klass_name = name_helpers::klass_full_concrete_or_interface_name(part.klass);
/* auto unit = (const Eolian_Unit*) context_find_tag<eolian_state_context>(context).state; */
/* auto klass = get_klass(part.klass, unit); */
if (!as_generator(
scope_tab << "public static Efl.BindablePart<" << part_klass_name << "> " << name_helpers::managed_part_name(part) << "<T>(this Efl.Ui.ItemFactory<T> fac, Efl.Csharp.ExtensionTag<"
<< name_helpers::klass_full_concrete_or_interface_name(cls)
<< ", T> x=null) where T : " << name_helpers::klass_full_concrete_or_interface_name(cls) << "\n"
<< scope_tab << "{\n"
<< scope_tab << scope_tab << "return new Efl.BindablePart<" << part_klass_name << ">(\"" << part.name << "\" ,fac);\n"
<< scope_tab << "}\n"
).generate(sink, attributes::unused, context))
return false;
return true;
}
grammar::attributes::klass_def const& cls;
};
part_extension_method_definition_generator part_extension_method_definition (grammar::attributes::klass_def const& cls)
{
return {cls};
}
}
namespace efl { namespace eolian { namespace grammar {
@ -44,10 +77,17 @@ struct is_eager_generator< ::eolian_mono::part_definition_generator> : std::true
template <>
struct is_generator< ::eolian_mono::part_definition_generator> : std::true_type {};
template <>
struct is_eager_generator< ::eolian_mono::part_extension_method_definition_generator> : std::true_type {};
template <>
struct is_generator< ::eolian_mono::part_extension_method_definition_generator> : std::true_type {};
namespace type_traits {
template <>
struct attributes_needed< ::eolian_mono::part_definition_generator> : std::integral_constant<int, 1> {};
template <>
struct attributes_needed< ::eolian_mono::part_extension_method_definition_generator> : std::integral_constant<int, 1> {};
}
} } }

View File

@ -8,29 +8,95 @@ using System.ComponentModel;
namespace Efl {
/// <summary>Representas a bindable property as used by <see cref="Efl.Ui.ItemFactory&lt;T&gt;" /> instances.
/// <summary>Represents a bindable property as used by <see cref="Efl.Ui.ItemFactory&lt;T&gt;" /> instances.
///
/// <para>It is internally instantiated and returned by generated extension methods.</para>
/// </summary>
public class Bindable<T>
public class BindableProperty<T>
{
/// <summary>Creates a new bindable property with the source name <c>name</c>.</summary>
public Bindable(string name, Efl.Ui.IPropertyBind binder)
public BindableProperty(string name, Efl.Ui.IPropertyBind binder)
{
this.name = name;
this.propertyName = name;
this.partName = null;
this.binder = binder;
}
/// <summary>Binds the model property <c>model_property</c> to the property <c>name</c> set in the constructor.</summary>
public void Bind(string model_property)
/// <summary>Creates a new bindable property for part <c>part</c>.</summary>
public BindableProperty(string partName, string partProperty, Efl.Ui.IPropertyBind binder)
{
binder.PropertyBind(name, model_property);
this.partName = partName;
this.propertyName = partProperty;
this.binder = binder;
}
string name;
/// <summary>Binds the model property <c>modelProperty</c> to the property <c>name</c> set in the constructor.</summary>
public Eina.Error Bind(string modelProperty)
{
if (this.partName == null)
{
return this.binder.PropertyBind(this.propertyName, modelProperty);
}
else
{
var partHolder = this.binder as Efl.IPart;
if (partHolder == null)
{
throw new InvalidOperationException($"Failed to cast binder {binder} to IPart");
}
var partBinder = partHolder.GetPart(this.partName) as Efl.Ui.IPropertyBind;
if (partBinder != null)
{
return partBinder.PropertyBind(this.propertyName, modelProperty);
}
else
{
throw new InvalidOperationException($"Failed to get part {this.partName}");
}
}
}
string propertyName;
string partName;
Efl.Ui.IPropertyBind binder;
}
/// <summary>Represents bindable parts as used by <see cref="Efl.Ui.ItemFactory&lt;T&gt;" /> instances.
///
/// <para>It is internally instantiated and returned by generated extension methods.</para>
/// </summary>
public class BindablePart<T>
{
/// <summary>Creates a new bindable property with the binder <c>binder</c>.</summary>
public BindablePart(string partName, Efl.Ui.IPropertyBind binder)
{
this.PartName = partName;
this.Binder = binder;
}
/// <summary>The name of the part this instance wraps.</summary>
public string PartName { get; private set; }
/// <summary>The binder that will be used to bind the properties.</summary>
public Efl.Ui.IPropertyBind Binder { get; private set; }
}
namespace Csharp
{
/// <summary>Helper class to differentiate between factory extension methods.
///
/// For internal use only.</summary>
public class ExtensionTag<TBase, TInherited>
where TInherited : TBase
{
}
}
}
#endif

View File

@ -8,7 +8,6 @@
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <pthread.h>

View File

@ -11,16 +11,19 @@
# include <netinet/in.h>
#endif
#include <time.h>
#ifdef HAVE_SHM_OPEN
# include <sys/mman.h>
#endif
#include <sys/stat.h>
#include <fcntl.h>
#include <string.h>
#include <zlib.h>
#ifdef _WIN32
# ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN
# endif
# include <windows.h>
# undef WIN32_LEAN_AND_MEAN
#else
# include <sys/mman.h>
#endif
#ifdef __cplusplus

View File

@ -2,9 +2,6 @@
# include <config.h>
#endif
#ifdef HAVE_SHM_OPEN
# include <sys/mman.h>
#endif
#include <fcntl.h>
#include <unistd.h>
@ -272,7 +269,11 @@ main(int argc, char **argv)
if (!head_only)
{
#ifdef _WIN32
if (shm_fd)
#else
if (shm_fd >= 0)
#endif
{
printf("shmfile %s\n", shmfile);
}

View File

@ -2,7 +2,6 @@
# include <config.h>
#endif
#include <sys/mman.h>
#include <fcntl.h>
#include <unistd.h>

View File

@ -2,9 +2,6 @@
# include <config.h>
#endif
#ifdef HAVE_SHM_OPEN
# include <sys/mman.h>
#endif
#include <fcntl.h>
#include <stdio.h>
#include <unistd.h>
@ -317,11 +314,13 @@ main(int argc, char **argv)
if (!head_only)
{
#ifdef HAVE_SHM_OPEN
#ifdef _WIN32
if (shm_fd)
#else
if (shm_fd >= 0)
#endif
printf("shmfile %s\n", shmfile);
else
#endif
{
// could also to "tmpfile %s\n" like shmfile but just
// a mmaped tmp file on the system

View File

@ -2,7 +2,6 @@
# include <config.h>
#endif
#include <sys/mman.h>
#include <fcntl.h>
#include <libspectre/spectre.h>
@ -270,7 +269,11 @@ main(int argc, char **argv)
if (!head_only)
{
#ifdef _WIN32
if (shm_fd) printf("shmfile %s\n", shmfile);
#else
if (shm_fd >= 0) printf("shmfile %s\n", shmfile);
#endif
else
{
// could also to "tmpfile %s\n" like shmfile but just

View File

@ -3,7 +3,6 @@
#endif
#include <fcntl.h>
#include <stdio.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
@ -15,6 +14,12 @@
# include <unistd.h>
#endif
#ifdef _WIN32
# include <evil_private.h> /* mmap */
#else
# include <sys/mman.h>
#endif
#include <Eina.h>
@ -204,7 +209,7 @@ int main(int argc, char **argv)
}
timeout_init(4);
if (!_raw_init(file)) return -1;
if (head_only != 0)
{
@ -221,7 +226,11 @@ int main(int argc, char **argv)
{
printf("size %d %d\n", width, height);
printf("alpha 1\n");
#ifdef _WIN32
if (shm_fd) printf("shmfile %s\n", shmfile);
#else
if (shm_fd >= 0) printf("shmfile %s\n", shmfile);
#endif
else
{
printf("data\n");

View File

@ -214,7 +214,11 @@ int main(int argc, char **argv)
{
printf("size %d %d\n", width, height);
printf("alpha 1\n");
#ifdef _WIN32
if (shm_fd) printf("shmfile %s\n", shmfile);
#else
if (shm_fd >= 0) printf("shmfile %s\n", shmfile);
#endif
else
{
printf("data\n");

View File

@ -14,7 +14,6 @@
# include <netinet/in.h>
#endif
#include <time.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <string.h>

View File

@ -1714,7 +1714,11 @@ main(int argc, char **argv)
printf("alpha 1\n");
if (!head_only)
{
#ifdef _WIN32
if (shm_fd) printf("shmfile %s\n", shmfile);
#else
if (shm_fd >= 0) printf("shmfile %s\n", shmfile);
#endif
else
{
// could also to "tmpfile %s\n" like shmfile but just

View File

@ -15,7 +15,9 @@
# include <langinfo.h>
#endif
#if defined(HAVE_SYS_MMAN_H) || defined(_WIN32)
#ifdef _WIN32
# include <evil_private.h> /* mmap */
#else
# include <sys/mman.h>
#endif

View File

@ -14,7 +14,9 @@
#include <fcntl.h>
#include <unistd.h>
#if defined(HAVE_SYS_MMAN_H) || defined(_WIN32)
#ifdef _WIN32
# include <evil_private.h> /* mmap */
#else
# include <sys/mman.h>
#endif

View File

@ -2482,6 +2482,7 @@ EAPI extern Eet_Data_Descriptor *_edje_edd_edje_part_collection;
extern Eina_Inlist *_edje_edjes;
extern char *_edje_fontset_append;
extern char *_edje_fontset_append_escaped;
extern FLOAT_T _edje_scale;
extern int _edje_util_freeze_val;
extern int _edje_util_freeze_calc_count;

View File

@ -1,29 +1,12 @@
#include "edje_private.h"
static int
_edje_font_is_embedded(Edje_File *edf, char *font)
_edje_font_is_embedded(Edje_File *edf, const char *font)
{
if (!eina_hash_find(edf->fonts, font)) return 0;
return 1;
}
static void
_edje_format_param_parse(char *item, char **key, char **val)
{
char *p, *k, *v;
p = strchr(item, '=');
if (!p) return;
k = malloc(p - item + 1);
strncpy(k, item, p - item);
k[p - item] = 0;
*key = k;
p++;
v = strdup(p);
*val = v;
}
static char *
_edje_format_parse(const char **s)
{
@ -69,13 +52,6 @@ _edje_format_parse(const char **s)
return NULL;
}
static int
_edje_format_is_param(char *item)
{
if (strchr(item, '=')) return 1;
return 0;
}
static char *
_edje_format_reparse(Edje_File *edf, const char *str, Edje_Style_Tag **tag_ret)
{
@ -87,16 +63,18 @@ _edje_format_reparse(Edje_File *edf, const char *str, Edje_Style_Tag **tag_ret)
s = str;
while ((item = _edje_format_parse(&s)))
{
if (_edje_format_is_param(item))
const char *pos = strchr(item, '=');
if (pos)
{
char *key = NULL, *val = NULL;
size_t key_len = pos - item;
const char *key = item;
const char *val = pos + 1;
_edje_format_param_parse(item, &key, &val);
if (!strcmp(key, "font_source"))
if (!strncmp(key, "font_source", key_len))
{
/* dont allow font sources */
}
else if (!strcmp(key, "text_class"))
else if (!strncmp(key, "text_class", key_len))
{
if (tag_ret)
(*tag_ret)->text_class = eina_stringshare_add(val);
@ -106,12 +84,12 @@ _edje_format_reparse(Edje_File *edf, const char *str, Edje_Style_Tag **tag_ret)
// text_class tag.
continue;
}
else if (!strcmp(key, "font_size"))
else if (!strncmp(key, "font_size", key_len))
{
if (tag_ret)
(*tag_ret)->font_size = atof(val);
}
else if (!strcmp(key, "font")) /* Fix fonts */
else if (!strncmp(key, "font", key_len)) /* Fix fonts */
{
if (tag_ret)
{
@ -137,8 +115,6 @@ _edje_format_reparse(Edje_File *edf, const char *str, Edje_Style_Tag **tag_ret)
eina_strbuf_append(txt, s2);
free(s2);
}
free(key);
free(val);
}
else
{
@ -168,7 +144,7 @@ _edje_textblock_style_update(Edje *ed, Edje_Style *stl, Eina_Bool force)
Eina_Strbuf *txt = NULL;
Edje_Style_Tag *tag;
Edje_Text_Class *tc;
char *fontset = NULL, *fontsource = NULL;
char *fontset = _edje_fontset_append_escaped, *fontsource = NULL;
if (!ed->file) return;
@ -208,44 +184,36 @@ _edje_textblock_style_update(Edje *ed, Edje_Style *stl, Eina_Bool force)
{
if (fontset)
{
eina_strbuf_append(txt, " ");
eina_strbuf_append(txt, "font_fallbacks=");
eina_strbuf_append(txt, " font_fallbacks=");
eina_strbuf_append(txt, fontset);
}
if (fontsource)
{
eina_strbuf_append(txt, " ");
eina_strbuf_append(txt, "font_source=");
eina_strbuf_append(txt, " font_source=");
eina_strbuf_append(txt, fontsource);
}
}
if (!EINA_DBL_EQ(tag->font_size, 0))
if (tc && tc->size && !EINA_DBL_EQ(tag->font_size, 0))
{
char font_size[32];
double new_size = _edje_text_size_calc(tag->font_size, tc);
if (!EINA_DBL_EQ(tag->font_size, new_size))
{
char buffer[32];
if (tc && tc->size)
snprintf(font_size, sizeof(font_size), "%f",
(double)_edje_text_size_calc(tag->font_size, tc));
else
snprintf(font_size, sizeof(font_size), "%f",
tag->font_size);
eina_strbuf_append(txt, " ");
eina_strbuf_append(txt, "font_size=");
eina_strbuf_append(txt, font_size);
snprintf(buffer, sizeof(buffer), "%.1f", new_size);
eina_strbuf_append(txt, " font_size=");
eina_strbuf_append(txt, buffer);
}
}
/* Add font name last to save evas from multiple loads */
if (tag->font)
if (tc && tc->font && tag->font)
{
const char *f;
char *sfont = NULL;
eina_strbuf_append(txt, " ");
eina_strbuf_append(txt, "font=");
if (tc) f = _edje_text_font_get(tag->font, tc->font, &sfont);
else f = tag->font;
eina_strbuf_append(txt, " font=");
f = _edje_text_font_get(tag->font, tc->font, &sfont);
eina_strbuf_append_escaped(txt, f);
if (sfont) free(sfont);
@ -253,7 +221,6 @@ _edje_textblock_style_update(Edje *ed, Edje_Style *stl, Eina_Bool force)
eina_strbuf_append(txt, "'");
}
if (fontset) free(fontset);
if (fontsource) free(fontsource);
/* Configure the style */
@ -448,11 +415,12 @@ _edje_textblock_style_parse_and_fix(Edje_File *edf)
Eina_Strbuf *txt = NULL;
Eina_List *l, *ll;
Edje_Style *stl;
char *fontset = _edje_fontset_append_escaped;
EINA_LIST_FOREACH(edf->styles, l, stl)
{
Edje_Style_Tag *tag;
char *fontset = NULL, *fontsource = NULL, *ts;
char *fontsource = NULL, *ts;
if (stl->style) break;
@ -464,8 +432,6 @@ _edje_textblock_style_parse_and_fix(Edje_File *edf)
stl->style = evas_textblock_style_new();
evas_textblock_style_set(stl->style, NULL);
if (_edje_fontset_append)
fontset = eina_str_escape(_edje_fontset_append);
if (edf->fonts)
fontsource = eina_str_escape(edf->path);
@ -495,8 +461,7 @@ _edje_textblock_style_parse_and_fix(Edje_File *edf)
{
if (fontset)
{
eina_strbuf_append(txt, " ");
eina_strbuf_append(txt, "font_fallbacks=");
eina_strbuf_append(txt, " font_fallbacks=");
eina_strbuf_append(txt, fontset);
}
if (fontsource)
@ -510,7 +475,6 @@ _edje_textblock_style_parse_and_fix(Edje_File *edf)
if (tag->text_class) stl->readonly = EINA_FALSE;
}
if (fontset) free(fontset);
if (fontsource) free(fontsource);
/* Configure the style */

View File

@ -27,6 +27,7 @@ Efl_Observable *_edje_size_class_member = NULL;
static Eina_Rbtree *_edje_box_layout_registry = NULL;
char *_edje_fontset_append = NULL;
char *_edje_fontset_append_escaped = NULL;
FLOAT_T _edje_scale = ZERO;
Eina_Bool _edje_password_show_last = EINA_FALSE;
double _edje_password_show_last_timeout = 0;
@ -357,8 +358,12 @@ EAPI void
edje_fontset_append_set(const char *fonts)
{
if (_edje_fontset_append)
free(_edje_fontset_append);
{
free(_edje_fontset_append);
free(_edje_fontset_append_escaped);
}
_edje_fontset_append = fonts ? strdup(fonts) : NULL;
_edje_fontset_append_escaped = fonts ? eina_str_escape(fonts) : NULL;
}
EAPI const char *

View File

@ -9,7 +9,11 @@
#include <unistd.h>
#ifdef HAVE_SIGNATURE
# include <sys/mman.h>
# ifdef _WIN32
# include <evil_private.h> /* mmap */
# else
# include <sys/mman.h>
# endif
# ifdef HAVE_GNUTLS
# include <gnutls/gnutls.h>
# include <gnutls/x509.h>

View File

@ -6,7 +6,6 @@
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/mman.h>
#include <fnmatch.h>
#include <Ecore.h>

View File

@ -6,7 +6,12 @@
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/mman.h>
#ifdef _WIN32
# include <evil_private.h> /* mmap */
#else
# include <sys/mman.h>
#endif
#include <Ecore_File.h>

View File

@ -29,8 +29,13 @@
# include <memcheck.h>
#endif
#ifdef HAVE_MMAP
#ifdef _WIN32
# include <evil_private.h> /* mmap */
#else
# include <sys/mman.h>
#endif
#ifdef HAVE_MMAP
// custom memory allocators to avoid malloc/free during backtrace handling
// just in case we're inside some signal handler due to mem corruption and

View File

@ -36,9 +36,11 @@
#include <time.h>
#include <unistd.h>
# ifdef HAVE_MMAP
# include <sys/mman.h>
# endif
#ifdef _WIN32
# include <evil_private.h> /* mmap */
#else
# include <sys/mman.h>
#endif
#if __BYTE_ORDER == __LITTLE_ENDIAN
#define SWAP_64(x) x

View File

@ -10,10 +10,15 @@
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/mman.h>
#include <fcntl.h>
#include <inttypes.h>
#ifdef _WIN32
# include <evil_private.h> /* mmap */
#else
# include <sys/mman.h>
#endif
#include "eina_config.h"
#include "eina_private.h"

View File

@ -23,7 +23,6 @@
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/mman.h>
#include <unistd.h>
#include <fcntl.h>

View File

@ -1,4 +1,4 @@
class @beta Efl.Ui.Collection.Focus_Manager extends Efl.Ui.Focus.Manager_Calc {
class @beta Efl.Ui.Collection_Focus_Manager extends Efl.Ui.Focus.Manager_Calc {
[[Internal class which implements collection specific behaviour, cannot be used outside of collection]]
implements {
Efl.Ui.Focus.Manager.manager_focus { set; }

View File

@ -139,6 +139,7 @@ _efl_ui_layout_factory_efl_ui_property_bind_property_bind(Eo *obj EINA_UNUSED, E
ss_prop = eina_stringshare_add(property);
ss_old = eina_hash_set(pd->bind.properties, ss_key, ss_prop);
if (ss_old) eina_stringshare_del(ss_old);
else ss_key = NULL; // Prevent destruction of key to keep at least one reference
end:
efl_event_callback_call(obj, EFL_UI_PROPERTY_BIND_EVENT_PROPERTY_BOUND, (void*) ss_key);

View File

@ -37,20 +37,20 @@ _scroller_sizing_eval(Eo *obj, Efl_Ui_Scroll_Alert_Popup_Data *pd,
if ((max_size.w == -1) && (max_size.h == -1))
{
elm_scroller_content_min_limit(pd->scroller, EINA_FALSE, EINA_FALSE);
efl_ui_scrollable_match_content_set(pd->scroller, EINA_FALSE, EINA_FALSE);
efl_gfx_entity_size_set(obj, size);
}
else if ((max_size.w == -1) && (max_size.h != -1))
{
if (max_size.h < scr_min.h)
{
elm_scroller_content_min_limit(pd->scroller, EINA_FALSE, EINA_FALSE);
efl_ui_scrollable_match_content_set(pd->scroller, EINA_FALSE, EINA_FALSE);
efl_gfx_entity_size_set(obj, EINA_SIZE2D(size.w, max_size.h));
}
else
{
new_min.h = scr_min.h;
elm_scroller_content_min_limit(pd->scroller, EINA_FALSE, EINA_TRUE);
efl_ui_scrollable_match_content_set(pd->scroller, EINA_FALSE, EINA_TRUE);
efl_gfx_entity_size_set(obj, EINA_SIZE2D(size.w, scr_min.h));
}
}
@ -58,13 +58,13 @@ _scroller_sizing_eval(Eo *obj, Efl_Ui_Scroll_Alert_Popup_Data *pd,
{
if (max_size.w < scr_min.w)
{
elm_scroller_content_min_limit(pd->scroller, EINA_FALSE, EINA_FALSE);
efl_ui_scrollable_match_content_set(pd->scroller, EINA_FALSE, EINA_FALSE);
efl_gfx_entity_size_set(obj, EINA_SIZE2D(max_size.w, size.h));
}
else
{
new_min.w = scr_min.w;
elm_scroller_content_min_limit(pd->scroller, EINA_TRUE, EINA_FALSE);
efl_ui_scrollable_match_content_set(pd->scroller, EINA_TRUE, EINA_FALSE);
efl_gfx_entity_size_set(obj, EINA_SIZE2D(scr_min.w, size.h));
}
}
@ -96,7 +96,7 @@ _scroller_sizing_eval(Eo *obj, Efl_Ui_Scroll_Alert_Popup_Data *pd,
new_size.h = scr_min.h;
}
elm_scroller_content_min_limit(pd->scroller, min_limit_w, min_limit_h);
efl_ui_scrollable_match_content_set(pd->scroller, min_limit_w, min_limit_h);
efl_gfx_entity_size_set(obj, new_size);
}
efl_canvas_group_calculate(pd->scroller);
@ -113,7 +113,7 @@ _sizing_eval(Eo *obj, Efl_Ui_Scroll_Alert_Popup_Data *pd)
//Calculate popup's min size including scroller's min size
{
elm_scroller_content_min_limit(pd->scroller, EINA_TRUE, EINA_TRUE);
efl_ui_scrollable_match_content_set(pd->scroller, EINA_TRUE, EINA_TRUE);
efl_canvas_group_calculate(pd->scroller);
elm_coords_finger_size_adjust(1, &scr_minw, 1, &scr_minh);
@ -123,14 +123,13 @@ _sizing_eval(Eo *obj, Efl_Ui_Scroll_Alert_Popup_Data *pd)
//Calculate popup's min size except scroller's min size
{
elm_scroller_content_min_limit(pd->scroller, EINA_FALSE, EINA_FALSE);
efl_ui_scrollable_match_content_set(pd->scroller, EINA_FALSE, EINA_FALSE);
efl_canvas_group_calculate(pd->scroller);
elm_coords_finger_size_adjust(1, &obj_minw, 1, &obj_minh);
edje_object_size_min_restricted_calc
(wd->resize_obj, &obj_minw, &obj_minh, obj_minw, obj_minh);
}
_scroller_sizing_eval(obj, pd, EINA_SIZE2D(obj_minw, obj_minh), EINA_SIZE2D(scr_minw, scr_minh));
}
@ -139,13 +138,10 @@ _efl_ui_scroll_alert_popup_efl_canvas_group_group_calculate(Eo *obj, Efl_Ui_Scro
{
EFL_UI_POPUP_DATA_GET_OR_RETURN(obj, ppd);
ppd->in_calc = EINA_TRUE;
/* When efl_canvas_group_change() is called, just flag is set instead of size
* calculation.
* The actual size calculation is done here when the object is rendered to
* avoid duplicate size calculations. */
efl_canvas_group_need_recalculate_set(obj, EINA_FALSE);
_sizing_eval(obj, pd);
efl_canvas_group_need_recalculate_set(pd->scroller, EINA_FALSE);
efl_canvas_group_need_recalculate_set(obj, EINA_FALSE);
//Not to calculate size by super class
efl_canvas_group_calculate(efl_super(obj, MY_CLASS));
@ -226,10 +222,9 @@ _efl_ui_scroll_alert_popup_efl_object_constructor(Eo *obj,
obj = efl_constructor(efl_super(obj, MY_CLASS));
efl_canvas_object_type_set(obj, MY_CLASS_NAME);
pd->scroller = elm_scroller_add(obj);
elm_object_style_set(pd->scroller, "popup/no_inset_shadow");
elm_scroller_policy_set(pd->scroller, ELM_SCROLLER_POLICY_AUTO,
ELM_SCROLLER_POLICY_AUTO);
pd->scroller = efl_add(EFL_UI_SCROLLER_CLASS, obj,
efl_ui_widget_style_set(efl_added, "popup/no_inset_shadow"),
efl_ui_scrollbar_bar_mode_set(efl_added, EFL_UI_SCROLLBAR_MODE_AUTO, EFL_UI_SCROLLBAR_MODE_AUTO));
efl_content_set(efl_part(efl_super(obj, MY_CLASS), "efl.content"),
pd->scroller);

View File

@ -210,19 +210,6 @@ _scroll_connector_bar_hide_cb(void *data, const Efl_Event *event)
else if (type == EFL_UI_SCROLLBAR_DIRECTION_VERTICAL)
efl_layout_signal_emit(wd->resize_obj, "efl,action,hide,vbar", "efl");
}
static void
_scroll_connector_resized_cb(void *data, const Efl_Event *ev EINA_UNUSED)
{
Scroll_Connector_Context *ctx = data;
efl_canvas_group_change(ctx->obj);
}
static void
_scroll_connector_size_hint_changed_cb(void *data, const Efl_Event *ev EINA_UNUSED)
{
Scroll_Connector_Context *ctx = data;
efl_canvas_group_change(ctx->obj);
}
void
efl_ui_scroll_connector_bind(Eo *obj, Eo *manager)
@ -276,10 +263,6 @@ efl_ui_scroll_connector_bind(Eo *obj, Eo *manager)
_scroll_connector_bar_show_cb, ctx);
efl_event_callback_add(obj, EFL_UI_SCROLLBAR_EVENT_BAR_HIDE,
_scroll_connector_bar_hide_cb, ctx);
efl_event_callback_add(obj, EFL_GFX_ENTITY_EVENT_SIZE_CHANGED,
_scroll_connector_resized_cb, ctx);
efl_event_callback_add(obj, EFL_GFX_ENTITY_EVENT_HINTS_CHANGED,
_scroll_connector_size_hint_changed_cb, ctx);
}
void

View File

@ -214,7 +214,10 @@ _efl_ui_scroller_efl_content_content_unset(Eo *obj EINA_UNUSED, Efl_Ui_Scroller_
static void
_efl_ui_scroller_pan_resized_cb(void *data, const Efl_Event *ev EINA_UNUSED)
{
efl_canvas_group_change(data);
if (efl_canvas_scene_group_objects_calculating_get(evas_object_evas_get(data)))
efl_canvas_group_calculate(data);
else
efl_canvas_group_change(data);
}
static void
@ -238,12 +241,18 @@ _focused_element(void *data, const Efl_Event *event)
EOLIAN static Eo *
_efl_ui_scroller_efl_object_constructor(Eo *obj,
Efl_Ui_Scroller_Data *sd EINA_UNUSED)
Efl_Ui_Scroller_Data *sd)
{
if (!elm_widget_theme_klass_get(obj))
elm_widget_theme_klass_set(obj, "scroller");
obj = efl_constructor(efl_super(obj, MY_CLASS));
sd->smanager = efl_add(EFL_UI_SCROLL_MANAGER_CLASS, obj);
efl_ui_mirrored_set(sd->smanager, efl_ui_mirrored_get(obj));
efl_composite_attach(obj, sd->smanager);
efl_ui_scroll_connector_bind(obj, sd->smanager);
return obj;
}
@ -255,10 +264,6 @@ _efl_ui_scroller_efl_object_finalize(Eo *obj,
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL);
sd->smanager = efl_add(EFL_UI_SCROLL_MANAGER_CLASS, obj);
efl_ui_mirrored_set(sd->smanager, efl_ui_mirrored_get(obj));
efl_composite_attach(obj, sd->smanager);
sd->pan_obj = efl_add(EFL_UI_PAN_CLASS, obj);
efl_ui_scroll_manager_pan_set(sd->smanager, sd->pan_obj);
@ -266,7 +271,6 @@ _efl_ui_scroller_efl_object_finalize(Eo *obj,
elm_widget_can_focus_set(obj, EINA_TRUE);
efl_ui_scroll_connector_bind(obj, sd->smanager);
efl_event_callback_add(sd->pan_obj, EFL_GFX_ENTITY_EVENT_SIZE_CHANGED,
_efl_ui_scroller_pan_resized_cb, obj);

View File

@ -4,7 +4,10 @@
#include <Elementary.h>
#include "elm_priv.h"
#ifdef HAVE_SYS_MMAN_H
#ifdef _WIN32
# include <evil_private.h> /* mmap */
#else
# include <sys/mman.h>
#endif

View File

@ -911,8 +911,17 @@ _efl_ui_text_efl_canvas_group_group_calculate(Eo *obj, Efl_Ui_Text_Data *sd)
}
else
{
Eina_Size2D text_sz = efl_gfx_entity_size_get(sd->text_obj);
edje_object_size_min_calc(wd->resize_obj, &edmin.w, &edmin.h);
efl_canvas_text_size_formatted_get(sd->text_obj, &min.w, &min.h);
efl_event_freeze(sd->text_obj);
efl_gfx_entity_size_set(sd->text_obj, EINA_SIZE2D(sz.w, 0));
/* ignore current object size for single-line since we always need to know the actual size */
if (sd->single_line)
efl_canvas_text_size_native_get(sd->text_obj, &min.w, &min.h);
else
efl_canvas_text_size_formatted_get(sd->text_obj, &min.w, &min.h);
efl_gfx_entity_size_set(sd->text_obj, text_sz);
efl_event_thaw(sd->text_obj);
min.w += edmin.w;
min.h += edmin.h;
efl_gfx_hint_size_restricted_min_set(obj, min);

View File

@ -42,35 +42,35 @@ _scroller_sizing_eval(Eo *obj, Efl_Ui_Text_Alert_Popup_Data *pd, Eina_Size2D obj
if ((max_size.w == -1) && (max_size.h == -1))
{
elm_scroller_content_min_limit(pd->scroller, EINA_FALSE, EINA_FALSE);
efl_ui_scrollable_match_content_set(pd->scroller, EINA_FALSE, EINA_FALSE);
efl_gfx_entity_size_set(obj, size);
}
else if ((max_size.w == -1) && (max_size.h != -1))
{
if (max_size.h < text_min.h)
{
elm_scroller_content_min_limit(pd->scroller, EINA_FALSE, EINA_FALSE);
efl_gfx_entity_size_set(obj, EINA_SIZE2D(size.w, max_size.h));
efl_ui_scrollable_match_content_set(pd->scroller, EINA_FALSE, EINA_FALSE);
size = EINA_SIZE2D(size.w, max_size.h);
}
else
{
new_min.h = text_min.h;
elm_scroller_content_min_limit(pd->scroller, EINA_FALSE, EINA_TRUE);
efl_gfx_entity_size_set(obj, EINA_SIZE2D(size.w, text_min.h));
efl_ui_scrollable_match_content_set(pd->scroller, EINA_FALSE, EINA_TRUE);
size = EINA_SIZE2D(size.w, text_min.h);
}
}
else if ((max_size.w != -1) && (max_size.h == -1))
{
if (max_size.w < text_min.w)
{
elm_scroller_content_min_limit(pd->scroller, EINA_FALSE, EINA_FALSE);
efl_gfx_entity_size_set(obj, EINA_SIZE2D(max_size.w, size.h));
efl_ui_scrollable_match_content_set(pd->scroller, EINA_FALSE, EINA_FALSE);
size = EINA_SIZE2D(max_size.w, size.h);
}
else
{
new_min.w = text_min.w;
elm_scroller_content_min_limit(pd->scroller, EINA_TRUE, EINA_FALSE);
efl_gfx_entity_size_set(obj, EINA_SIZE2D(text_min.w, size.h));
efl_ui_scrollable_match_content_set(pd->scroller, EINA_TRUE, EINA_FALSE);
size = EINA_SIZE2D(text_min.w, size.h);
}
}
else if ((max_size.w != -1) && (max_size.h != -1))
@ -101,9 +101,10 @@ _scroller_sizing_eval(Eo *obj, Efl_Ui_Text_Alert_Popup_Data *pd, Eina_Size2D obj
new_size.h = text_min.h;
}
elm_scroller_content_min_limit(pd->scroller, min_limit_w, min_limit_h);
efl_gfx_entity_size_set(obj, new_size);
efl_ui_scrollable_match_content_set(pd->scroller, min_limit_w, min_limit_h);
size = new_size;
}
efl_gfx_entity_size_set(obj, size);
efl_canvas_group_calculate(pd->scroller);
efl_gfx_hint_size_restricted_min_set(obj, new_min);
@ -125,7 +126,7 @@ _sizing_eval(Eo *obj, Efl_Ui_Text_Alert_Popup_Data *pd)
elm_label_line_wrap_set(pd->message, ELM_WRAP_MIXED);
efl_canvas_group_calculate(pd->message);
elm_scroller_content_min_limit(pd->scroller, EINA_FALSE, EINA_TRUE);
efl_ui_scrollable_match_content_set(pd->scroller, EINA_FALSE, EINA_TRUE);
efl_canvas_group_calculate(pd->scroller);
elm_coords_finger_size_adjust(1, &text_minw, 1, &text_minh);
@ -135,7 +136,7 @@ _sizing_eval(Eo *obj, Efl_Ui_Text_Alert_Popup_Data *pd)
//Calculate popup's min size except scroller's min size
{
elm_scroller_content_min_limit(pd->scroller, EINA_FALSE, EINA_FALSE);
efl_ui_scrollable_match_content_set(pd->scroller, EINA_FALSE, EINA_FALSE);
efl_canvas_group_calculate(pd->scroller);
elm_coords_finger_size_adjust(1, &obj_minw, 1, &obj_minh);
@ -152,13 +153,9 @@ _efl_ui_text_alert_popup_efl_canvas_group_group_calculate(Eo *obj, Efl_Ui_Text_A
{
EFL_UI_POPUP_DATA_GET_OR_RETURN(obj, ppd);
ppd->in_calc = EINA_TRUE;
/* When efl_canvas_group_change() is called, just flag is set instead of size
* calculation.
* The actual size calculation is done here when the object is rendered to
* avoid duplicate size calculations. */
efl_canvas_group_need_recalculate_set(obj, EINA_FALSE);
_sizing_eval(obj, pd);
efl_canvas_group_need_recalculate_set(pd->scroller, EINA_FALSE);
efl_canvas_group_need_recalculate_set(obj, EINA_FALSE);
efl_canvas_group_calculate(efl_super(obj, MY_CLASS));
ppd->in_calc = EINA_FALSE;
@ -242,10 +239,9 @@ _efl_ui_text_alert_popup_efl_object_constructor(Eo *obj,
obj = efl_constructor(efl_super(obj, MY_CLASS));
efl_canvas_object_type_set(obj, MY_CLASS_NAME);
pd->scroller = elm_scroller_add(obj);
elm_object_style_set(pd->scroller, "popup/no_inset_shadow");
elm_scroller_policy_set(pd->scroller, ELM_SCROLLER_POLICY_OFF,
ELM_SCROLLER_POLICY_AUTO);
pd->scroller = efl_add(EFL_UI_SCROLLER_CLASS, obj,
efl_ui_widget_style_set(efl_added, "popup/no_inset_shadow"),
efl_ui_scrollbar_bar_mode_set(efl_added, EFL_UI_SCROLLBAR_MODE_OFF, EFL_UI_SCROLLBAR_MODE_AUTO));
efl_content_set(efl_part(efl_super(obj, MY_CLASS), "efl.content"),
pd->scroller);

View File

@ -501,6 +501,7 @@ _activate(Evas_Object *obj)
{
ELM_HOVERSEL_ITEM_DATA_GET(eo_item, item);
evas_object_show(VIEW(item));
efl_canvas_group_calculate(VIEW(item));
elm_box_pack_end(sd->bx, VIEW(item));
}
@ -678,7 +679,8 @@ _elm_hoversel_efl_gfx_entity_visible_set(Eo *obj, Elm_Hoversel_Data *sd, Eina_Bo
return;
efl_gfx_entity_visible_set(efl_super(obj, MY_CLASS), vis);
efl_gfx_entity_visible_set(sd->hover, vis);
if (sd->hover)
efl_gfx_entity_visible_set(sd->hover, vis);
}
EOLIAN static void

View File

@ -1437,6 +1437,8 @@ _hoversel_position(Evas_Object *obj)
edje_object_part_text_cursor_geometry_get
(sd->entry_edje, "elm.text", &cx, &cy, &cw, &ch);
if (efl_canvas_group_need_recalculate_get(sd->hoversel))
efl_canvas_group_calculate(sd->hoversel);
evas_object_size_hint_combined_min_get(sd->hoversel, &mw, &mh);
if (cx + mw > w)
cx = w - mw;
@ -1811,8 +1813,8 @@ _menu_call(Evas_Object *obj)
if (sd->hoversel)
{
_hoversel_position(obj);
evas_object_show(sd->hoversel);
elm_hoversel_hover_begin(sd->hoversel);
evas_object_show(sd->hoversel);
}
if (!_elm_config->desktop_entry)

View File

@ -13,7 +13,6 @@
# include <Elput.h>
# include <ctype.h>
# include <sys/mman.h>
# include <fcntl.h>
# include <unistd.h>
# include <linux/vt.h>

View File

@ -2,7 +2,6 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/mman.h>
#include <fcntl.h>
#include <unistd.h>

View File

@ -1,9 +1,12 @@
#include <assert.h>
#ifdef HAVE_MMAP
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/mman.h>
#ifdef _WIN32
# include <evil_private.h> /* mmap mprotect */
#else
# include <sys/mman.h>
#endif
#ifdef HAVE_VALGRIND

View File

@ -12,9 +12,6 @@
#include <sys/types.h>
#include <unistd.h>
#ifdef HAVE_SYS_MMAN_H
# include <sys/mman.h>
#endif
#include <math.h>
#include "evas_private.h"

View File

@ -657,6 +657,7 @@ struct _Evas_Object_Textblock
} gfx_filter;
Eina_Bool redraw : 1;
Eina_Bool changed : 1;
Eina_Bool pause_change : 1;
Eina_Bool obstacle_changed : 1;
Eina_Bool content_changed : 1;
Eina_Bool format_changed : 1;
@ -1952,6 +1953,8 @@ _format_command(Evas_Object *eo_obj, Evas_Object_Textblock_Format *fmt, const ch
* @li "#RRGGBBAA"
* @li "#RGB"
* @li "#RGBA"
* @li "rgb(r,g,b)"
* @li "rgba(r,g,b,a)"
* @li "color_name" like "red"
* @code
* color=<color>
@ -1971,6 +1974,8 @@ _format_command(Evas_Object *eo_obj, Evas_Object_Textblock_Format *fmt, const ch
* @li "#RRGGBBAA"
* @li "#RGB"
* @li "#RGBA"
* @li "rgb(r,g,b)"
* @li "rgba(r,g,b,a)"
* @li "color_name" like "red"
* @code
* underline_color=<color>
@ -1991,6 +1996,8 @@ _format_command(Evas_Object *eo_obj, Evas_Object_Textblock_Format *fmt, const ch
* @li "#RRGGBBAA"
* @li "#RGB"
* @li "#RGBA"
* @li "rgb(r,g,b)"
* @li "rgba(r,g,b,a)"
* @li "color_name" like "red"
* @code
* underline2_color=<color>
@ -2010,6 +2017,8 @@ _format_command(Evas_Object *eo_obj, Evas_Object_Textblock_Format *fmt, const ch
* @li "#RRGGBBAA"
* @li "#RGB"
* @li "#RGBA"
* @li "rgb(r,g,b)"
* @li "rgba(r,g,b,a)"
* @li "color_name" like "red"
* @code
* underline_dash_color=<color>
@ -2030,6 +2039,8 @@ _format_command(Evas_Object *eo_obj, Evas_Object_Textblock_Format *fmt, const ch
* @li "#RRGGBBAA"
* @li "#RGB"
* @li "#RGBA"
* @li "rgb(r,g,b)"
* @li "rgba(r,g,b,a)"
* @li "color_name" like "red"
* @code
* outline_color=<color>
@ -2050,6 +2061,8 @@ _format_command(Evas_Object *eo_obj, Evas_Object_Textblock_Format *fmt, const ch
* @li "#RRGGBBAA"
* @li "#RGB"
* @li "#RGBA"
* @li "rgb(r,g,b)"
* @li "rgba(r,g,b,a)"
* @li "color_name" like "red"
* @code
* shadow_color=<color>
@ -2070,6 +2083,8 @@ _format_command(Evas_Object *eo_obj, Evas_Object_Textblock_Format *fmt, const ch
* @li "#RRGGBBAA"
* @li "#RGB"
* @li "#RGBA"
* @li "rgb(r,g,b)"
* @li "rgba(r,g,b,a)"
* @li "color_name" like "red"
* @code
* glow_color=<color>
@ -2090,6 +2105,8 @@ _format_command(Evas_Object *eo_obj, Evas_Object_Textblock_Format *fmt, const ch
* @li "#RRGGBBAA"
* @li "#RGB"
* @li "#RGBA"
* @li "rgb(r,g,b)"
* @li "rgba(r,g,b,a)"
* @li "color_name" like "red"
* @code
* glow2_color=<color>
@ -2110,6 +2127,8 @@ _format_command(Evas_Object *eo_obj, Evas_Object_Textblock_Format *fmt, const ch
* @li "#RRGGBBAA"
* @li "#RGB"
* @li "#RGBA"
* @li "rgb(r,g,b)"
* @li "rgba(r,g,b,a)"
* @li "color_name" like "red"
* @code
* backing_color=<color>
@ -2130,6 +2149,8 @@ _format_command(Evas_Object *eo_obj, Evas_Object_Textblock_Format *fmt, const ch
* @li "#RRGGBBAA"
* @li "#RGB"
* @li "#RGBA"
* @li "rgb(r,g,b)"
* @li "rgba(r,g,b,a)"
* @li "color_name" like "red"
* @code
* strikethrough_color=<color>
@ -8075,6 +8096,10 @@ _evas_object_textblock_text_markup_prepend(Eo *eo_obj,
Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
evas_object_async_block(obj);
TB_HEAD();
/* Stop calls for _evas_textblock_changed for each cursor_text_append or cursor_format_append
* this should be done once, when markup_prepend finished */
o->pause_change = EINA_TRUE;
if (text)
{
char *s, *p;
@ -8119,6 +8144,12 @@ _evas_object_textblock_text_markup_prepend(Eo *eo_obj,
_prepend_escaped_char(cur, esc_start, esc_end + 1);
esc_start = esc_end = NULL;
}
else if (*p == 0 && esc_start) /* escape start with no end, append it as text */
{
_prepend_text_run(cur, esc_start, p);
esc_start = esc_end = NULL;
s = NULL;
}
else if (*p == 0)
{
_prepend_text_run(cur, s, p);
@ -8129,6 +8160,12 @@ _evas_object_textblock_text_markup_prepend(Eo *eo_obj,
}
if (*p == '<')
{
if (esc_start) /* escape start with no end, append it as text */
{
_prepend_text_run(cur, esc_start, p);
esc_start = esc_end = NULL;
s = NULL;
}
if (!esc_start)
{
/* Append the text prior to this to the textblock and mark
@ -8149,6 +8186,12 @@ _evas_object_textblock_text_markup_prepend(Eo *eo_obj,
}
else if (*p == '&')
{
if (esc_start) /* escape start with no end, append it as text */
{
_prepend_text_run(cur, esc_start, p);
esc_start = esc_end = NULL;
s = NULL;
}
if (!tag_start)
{
/* Append the text prior to this to the textblock and mark
@ -8189,6 +8232,7 @@ _evas_object_textblock_text_markup_prepend(Eo *eo_obj,
p++;
}
}
o->pause_change = EINA_FALSE;
_evas_textblock_changed(o, eo_obj);
}
@ -10996,7 +11040,8 @@ _evas_textblock_cursor_text_append(Efl_Text_Cursor_Cursor *cur, const char *_tex
/* Update all the cursors after our position. */
_evas_textblock_cursors_update_offset(cur, cur->node, cur->pos, len);
_evas_textblock_changed(o, cur->obj);
if (!o->pause_change)
_evas_textblock_changed(o, cur->obj);
n->dirty = EINA_TRUE;
free(text);
@ -11342,7 +11387,8 @@ _evas_textblock_cursor_format_append(Efl_Text_Cursor_Cursor *cur,
o->format_changed = EINA_TRUE;
}
_evas_textblock_changed(o, cur->obj);
if (!o->pause_change)
_evas_textblock_changed(o, cur->obj);
Efl_Text_Cursor_Cursor *ocur = o->cursor;
if (!ocur->node)

View File

@ -2,7 +2,9 @@
# include "config.h" /* so that EAPI in Eet.h is correctly defined */
#endif
#ifdef HAVE_SYS_MMAN_H
#ifdef _WIN32
# include <evil_private.h> /* mmap */
#else
# include <sys/mman.h>
#endif

View File

@ -1299,7 +1299,7 @@ _hex_string_get(char ch, Eina_Bool *ok)
*
* @param source source buffer
* @param dest destination buffer
* @param max maximum number of chars to be copyed
* @param max maximum number of chars to be copied
* @return number of spaces removed
*/
@ -1323,6 +1323,36 @@ size_t remove_spaces_lowercase(const char* source,char * dest,size_t max)
return spaces;
}
/**
* @internal
* read color component from string
*
* @param source source string
* @param[out] next position after the color compnent
* @param byte store color value read from string
* @return if read success
*/
Eina_Bool read_byte_color_component(const char* source,char ** next,unsigned char * byte)
{
const char *p_start = source;
char *p_stop = NULL;
Eina_Bool b_ret = EINA_TRUE;
long value = 0;
value = strtol(p_start, &p_stop, 10);
if ( value > 255 || value < 0 || p_start == p_stop )
{
b_ret = EINA_FALSE;
}
if (next)
*next = p_stop;
if (byte)
*byte = (unsigned char) value;
return b_ret;
}
/**
* @internal
@ -1332,12 +1362,11 @@ size_t remove_spaces_lowercase(const char* source,char * dest,size_t max)
* 3. "#RGB"
* 4. "#RGBA"
* 5. "color names"
* 6. "rgb(r,g,b)"
* 7. "rgba(r,g,b,a)"
* TODO (we may use specific color parser)
* 6. "rgb(RR,GG,BB)"
* 7. "rgba(RR,GG,BB,AA)"
* 8. "rgb(%R,%G,%B)"
* 9. "rgba(%R,%G,%B,%A)"
* 10."hsv(HH,SS,VV)"
* 8. "hsl(H,S,L)"
* 9. "hsla(H,S,L,A)"
* To the rgba values.
*
* @param[in] str The string to parse - NOT NULL.
@ -1393,24 +1422,61 @@ evas_common_format_color_parse(const char *str, int slen,
}
else v = EINA_FALSE;
}
else
else if (slen <= 21)/* search for rgb(),hsv(),colorname, 20 is length of rgba(255,255,255,255) */
{
/*remove spaces and convert name to lowercase*/
char color_name[0xFF] = {0};
slen = slen - (int) remove_spaces_lowercase(str,color_name,0xFF);
static size_t color_array_length = sizeof(color_name_value_sorted)/sizeof(Color_Name_Value);
Color_Name_Value* pcolor = (Color_Name_Value*) bsearch(color_name, color_name_value_sorted, color_array_length, sizeof(Color_Name_Value),_color_name_search);
if (pcolor)
if ((strncmp(color_name,"rgb(",4) == 0) && color_name[slen-1] == ')'&& slen >= 10 && slen <=16) /* rgb() */
{
*r = pcolor->r;
*g = pcolor->g;
*b = pcolor->b;
*a = 0xff;
char * p_color = &color_name[3];
if (
(!read_byte_color_component(++p_color,&p_color,r) || !p_color || *p_color != ',') ||
(!read_byte_color_component(++p_color,&p_color,g) || !p_color || *p_color != ',') ||
(!read_byte_color_component(++p_color,&p_color,b) || !p_color || *p_color != ')')
)
{
*r = *g = *b = *a = 0;
v = EINA_FALSE;
}
else
{
*a = 0xff;
}
}
else if ((strncmp(color_name,"rgba(",4) == 0) && color_name[slen-1] == ')'&& slen >= 13 && slen <=21) /* rgba() */
{
char * p_color = &color_name[4];
if (
(!read_byte_color_component(++p_color,&p_color,r) || !p_color || *p_color != ',') ||
(!read_byte_color_component(++p_color,&p_color,g) || !p_color || *p_color != ',') ||
(!read_byte_color_component(++p_color,&p_color,b) || !p_color || *p_color != ',') ||
(!read_byte_color_component(++p_color,&p_color,a) || !p_color || *p_color != ')')
)
{
*r = *g = *b = *a = 0;
v = EINA_FALSE;
}
}
else
{
v = EINA_FALSE;
}
static size_t color_array_length = sizeof(color_name_value_sorted)/sizeof(Color_Name_Value);
Color_Name_Value* pcolor = (Color_Name_Value*) bsearch(color_name, color_name_value_sorted, color_array_length, sizeof(Color_Name_Value),_color_name_search);
if (pcolor)
{
*r = pcolor->r;
*g = pcolor->g;
*b = pcolor->b;
*a = 0xff;
}
else
{
v = EINA_FALSE;
}
}
}
if(*a != 0xFF)

View File

@ -10,7 +10,6 @@
#include <io.h>
#include "sys/mman.h"
#include "evil_private.h"
/*

View File

@ -3,25 +3,6 @@
#include <sys/types.h>
#ifdef EAPI
# undef EAPI
#endif
#ifdef EFL_BUILD
# ifdef DLL_EXPORT
# define EAPI __declspec(dllexport)
# else
# define EAPI
# endif
#else
# define EAPI __declspec(dllimport)
#endif
#ifdef __cplusplus
extern "C" {
#endif
/**
* @def PROT_NONE
@ -177,14 +158,5 @@ EAPI int munmap(void *addr,
EAPI int mprotect(void *addr, size_t len, int prot);
#ifdef __cplusplus
}
#endif
#undef EAPI
#define EAPI
#endif /* __EVIL_SYS_MMAN_H__ */

View File

@ -49,6 +49,7 @@ extern "C" {
#include "evil_langinfo.h"
#include "evil_locale.h"
#include "evil_main.h"
#include "evil_mman.h"
#include "evil_stdlib.h"
#include "evil_stdio.h"
#include "evil_string.h"

View File

@ -15,9 +15,7 @@ if target_machine.system() == 'windows'
'evil_time.h',
'evil_unistd.h',
'evil_util.h',
'dirent.h',
]
evil_header_sys_src = [join_paths('sys','mman.h')]
evil_src = [
'evil_dlfcn.c',

View File

@ -14,9 +14,13 @@
#include <unistd.h>
#include <math.h>
#include <time.h>
#ifdef HAVE_SYS_MMAN_H
#ifdef _WIN32
# include <evil_private.h> /* mmap */
#else
# include <sys/mman.h>
#endif
#include <sys/stat.h>
#include <fcntl.h>
#include <string.h>

View File

@ -2,15 +2,17 @@
#include "evas_private.h"
#include "evas_native_common.h"
#if defined HAVE_DLSYM && ! defined _WIN32
#if defined HAVE_DLSYM
# include <dlfcn.h> /* dlopen,dlclose,etc */
#elif _WIN32
# include <evil_private.h> /* dlopen dlclose dlsym */
# include <evil_private.h> /* dlopen dlclose dlsym mmap */
#else
# warning native_dmabuf should not get compiled if dlsym is not found on the system!
#endif
#include <sys/mman.h>
#ifndef _WIN32
# include <sys/mman.h>
#endif
#define DRM_FORMAT_ARGB8888 0x34325241
#define DRM_FORMAT_XRGB8888 0x34325258

View File

@ -7,11 +7,16 @@
#include <stdio.h>
#include <sys/types.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <ctype.h>
#ifdef _WIN32
# include <evil_private.h> /* mmap */
#else
# include <sys/mman.h>
#endif
#ifndef O_BINARY
# define O_BINARY 0
#endif

View File

@ -116,7 +116,7 @@ static Eina_Bool
_evas_image_load_file_internal_head_png(Evas_Loader_Internal *loader,
Evas_Image_Property *prop,
Evas_PNG_Info *epi,
int *error, Eina_Bool close_file)
int *error, Eina_Bool is_for_data)
{
Evas_Image_Load_Opts *opts = loader->opts;
Eina_File *f = loader->f;
@ -125,7 +125,10 @@ _evas_image_load_file_internal_head_png(Evas_Loader_Internal *loader,
*error = EVAS_LOAD_ERROR_NONE;
epi->hasa = 0;
epi->map = eina_file_map_all(f, EINA_FILE_RANDOM);
if (!is_for_data)
epi->map = eina_file_map_all(f, EINA_FILE_RANDOM);
else
epi->map = eina_file_map_all(f, EINA_FILE_SEQUENTIAL);
if (!epi->map)
{
*error = EVAS_LOAD_ERROR_CORRUPT_FILE;
@ -216,7 +219,7 @@ _evas_image_load_file_internal_head_png(Evas_Loader_Internal *loader,
if (png_get_valid(epi->png_ptr, epi->info_ptr, PNG_INFO_tRNS))
{
/* expand transparency entry -> alpha channel if present */
if (!close_file) png_set_tRNS_to_alpha(epi->png_ptr);
if (!is_for_data) png_set_tRNS_to_alpha(epi->png_ptr);
epi->hasa = 1;
}
@ -245,7 +248,7 @@ _evas_image_load_file_internal_head_png(Evas_Loader_Internal *loader,
r = EINA_TRUE;
if (!close_file) return r;
if (!is_for_data) return r;
close_file:
if (epi->png_ptr) png_destroy_read_struct(&epi->png_ptr,

View File

@ -784,6 +784,15 @@ _apply_vg_property(Svg_Node *node, Efl_VG *vg, Efl_VG *parent, Vg_File_Data *vg_
efl_gfx_shape_stroke_color_set(vg, style->stroke.paint.r, style->stroke.paint.g,
style->stroke.paint.b, style->stroke.opacity);
}
//apply node opacity to stroke color
if (style->opacity < 255)
{
int r, g, b, a;
efl_gfx_shape_stroke_color_get(vg, &r, &g, &b, &a);
float fa = ((float) style->opacity / 255);
efl_gfx_shape_stroke_color_set(vg, ((float) r) * fa, ((float) g) * fa, ((float) b) * fa, ((float) a) * fa);
}
}
static void

View File

@ -39,6 +39,19 @@ public static class TestParts
}
}
public static class TestMVVMParts
{
public static void mvvm_dynamic_parts()
{
var factory = new Efl.Ui.ItemFactory<Efl.Ui.ListDefaultItem>();
var bindablePart = factory.TextPart();
var error = bindablePart.Markup().Bind("name");
Test.AssertEquals(error, Eina.Error.NO_ERROR);
}
}
#endif
}

View File

@ -5,7 +5,6 @@
#include <stdio.h>
#include <limits.h>
#include <sys/stat.h>
#include <sys/mman.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>

View File

@ -30,6 +30,7 @@ static const Efl_Test_Case etc[] = {
{ "efl_ui_popup", efl_ui_test_popup },
{ "efl_ui_progressbar", efl_ui_test_progressbar },
{ "efl_ui_radio_group", efl_ui_test_radio_group },
{ "efl_ui_scroller", efl_ui_test_scroller },
{ "efl_ui_slider", efl_ui_test_slider },
{ "efl_ui_win", efl_ui_test_win },
{ "efl_ui_spin", efl_ui_test_spin },

View File

@ -48,6 +48,7 @@ void efl_ui_test_list_container(TCase *tc);
void efl_ui_test_grid_container(TCase *tc);
void efl_ui_test_config(TCase *tc);
void efl_ui_test_popup(TCase *tc);
void efl_ui_test_scroller(TCase *tc);
void loop_timer_interval_set(Eo *obj, double in);

View File

@ -0,0 +1,150 @@
#ifdef HAVE_CONFIG_H
# include "elementary_config.h"
#endif
#include <Efl_Ui.h>
#include <Elementary.h>
#include "efl_ui_suite.h"
static void
_startstop_event_cb(void *data, const Efl_Event *ev EINA_UNUSED)
{
int *called = data;
(*called)++;
/* start/stop always come in pairs */
if (*called == 2) ecore_main_loop_quit();
}
EFL_START_TEST(efl_ui_test_scroller_events)
{
Eo *sc, *sc2, *sc3, *bx, *bx2, *gd, *gd2;
int i, j, called = 0, called2 = 0, called3 = 0;
Eo *win = win_add();
efl_gfx_entity_size_set(win, EINA_SIZE2D(500, 500));
sc = efl_add(EFL_UI_SCROLLER_CLASS, win,
efl_event_callback_add(efl_added, EFL_UI_EVENT_SCROLL_START, _startstop_event_cb, &called),
efl_event_callback_add(efl_added, EFL_UI_EVENT_SCROLL_STOP, _startstop_event_cb, &called),
efl_gfx_entity_size_set(efl_added, EINA_SIZE2D(500, 500))
);
bx = efl_add(EFL_UI_BOX_CLASS, sc,
efl_ui_layout_orientation_set(efl_added, EFL_UI_LAYOUT_ORIENTATION_VERTICAL),
efl_gfx_hint_weight_set(efl_added, EVAS_HINT_EXPAND, 0),
efl_gfx_hint_align_set(efl_added, 0.5, 0),
efl_gfx_hint_fill_set(efl_added, EINA_TRUE, EINA_FALSE),
efl_content_set(sc, efl_added));
efl_add(EFL_UI_SLIDER_CLASS, bx,
efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(160, 0)),
efl_pack(bx, efl_added));
for (i = 0; i < 3; i++)
{
efl_add(EFL_UI_BUTTON_CLASS, bx,
efl_text_set(efl_added, "Vertical"),
efl_gfx_hint_weight_set(efl_added, EVAS_HINT_EXPAND, 0.0),
efl_gfx_hint_fill_set(efl_added, EINA_TRUE, EINA_FALSE),
//efl_event_callback_add(efl_added, EFL_INPUT_EVENT_CLICKED, _bt_clicked, NULL),
efl_pack(bx, efl_added));
}
sc2 = efl_add(EFL_UI_SCROLLER_CLASS, bx,
efl_ui_scrollable_match_content_set(efl_added, EINA_FALSE, EINA_TRUE),
efl_event_callback_add(efl_added, EFL_UI_EVENT_SCROLL_START, _startstop_event_cb, &called2),
efl_event_callback_add(efl_added, EFL_UI_EVENT_SCROLL_STOP, _startstop_event_cb, &called2),
efl_pack(bx, efl_added));
bx2 = efl_add(EFL_UI_BOX_CLASS, sc2,
efl_ui_layout_orientation_set(efl_added, EFL_UI_LAYOUT_ORIENTATION_HORIZONTAL),
efl_content_set(sc2, efl_added));
for (i = 0; i < 10; i++)
{
efl_add(EFL_UI_BUTTON_CLASS, bx2,
efl_text_set(efl_added, "... Horizontal scrolling ..."),
//efl_event_callback_add(efl_added, EFL_INPUT_EVENT_CLICKED, _bt_clicked, NULL),
efl_pack(bx2, efl_added));
}
for (i = 0; i < 3; i++)
{
efl_add(EFL_UI_BUTTON_CLASS, bx,
efl_text_set(efl_added, "Vertical"),
efl_gfx_hint_weight_set(efl_added, EVAS_HINT_EXPAND, 0.0),
efl_gfx_hint_fill_set(efl_added, EINA_TRUE, EINA_FALSE),
//efl_event_callback_add(efl_added, EFL_INPUT_EVENT_CLICKED, _bt_clicked, NULL),
efl_pack(bx, efl_added));
}
gd = efl_add(EFL_UI_TABLE_CLASS, bx,
efl_gfx_hint_weight_set(efl_added, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND),
efl_gfx_hint_align_set(efl_added, 0.5, 0),
efl_pack(bx, efl_added));
efl_add(EFL_CANVAS_RECTANGLE_CLASS, win,
efl_gfx_color_set(efl_added, 0, 0, 0, 0),
efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(200, 120)),
efl_pack_table(gd, efl_added, 0, 0, 1, 1));
sc3 = efl_add(EFL_UI_SCROLLER_CLASS, win,
efl_gfx_hint_weight_set(efl_added, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND),
efl_gfx_hint_fill_set(efl_added, EINA_TRUE, EINA_TRUE),
efl_event_callback_add(efl_added, EFL_UI_EVENT_SCROLL_START, _startstop_event_cb, &called3),
efl_event_callback_add(efl_added, EFL_UI_EVENT_SCROLL_STOP, _startstop_event_cb, &called3),
efl_pack_table(gd, efl_added, 0, 0, 1, 1));
gd2 = efl_add(EFL_UI_TABLE_CLASS, sc3,
efl_content_set(sc3, efl_added));
for (j = 0; j < 4; j++)
{
for (i = 0; i < 4; i++)
{
efl_add(EFL_UI_BUTTON_CLASS, win,
efl_text_set(efl_added, "Both"),
//efl_event_callback_add(efl_added, EFL_INPUT_EVENT_CLICKED, _bt_clicked, NULL),
efl_pack_table(gd2, efl_added, i, j, 1, 1));
}
}
for (i = 0; i < 10; i++)
{
efl_add(EFL_UI_BUTTON_CLASS, bx,
efl_text_set(efl_added, "Vertical"),
efl_gfx_hint_weight_set(efl_added, EVAS_HINT_EXPAND, 0.0),
efl_gfx_hint_fill_set(efl_added, EINA_TRUE, EINA_FALSE),
//efl_event_callback_add(efl_added, EFL_INPUT_EVENT_CLICKED, _bt_clicked, NULL),
efl_pack(bx, efl_added));
}
get_me_to_those_events(sc);
/* this should only trigger the inner scroller */
wheel_object(sc3, 0, 1);
ecore_main_loop_begin();
ck_assert_int_eq(called3, 2);
ck_assert_int_eq(called2, 0);
ck_assert_int_eq(called, 0);
called3 = 0;
/* this should only trigger the horizontal scroller */
wheel_object(sc2, 1, 1);
ecore_main_loop_begin();
ck_assert_int_eq(called3, 0);
ck_assert_int_eq(called2, 2);
ck_assert_int_eq(called, 0);
called2 = 0;
/* this should only trigger the outer scroller */
wheel_object_at(sc, 250, 400, 0, 1);
ecore_main_loop_begin();
ck_assert_int_eq(called3, 0);
ck_assert_int_eq(called2, 0);
ck_assert_int_eq(called, 2);
}
EFL_END_TEST
void efl_ui_test_scroller(TCase *tc)
{
tcase_add_test(tc, efl_ui_test_scroller_events);
}

View File

@ -153,6 +153,7 @@ efl_ui_suite_src = [
'efl_ui_test_grid_collection.c',
'efl_ui_test_position_manager_common.c',
'efl_ui_test_popup.c',
'efl_ui_test_scroller.c',
]
efl_ui_suite = executable('efl_ui_suite',

View File

@ -400,11 +400,10 @@ enum
BOTTOM = 1 << 3,
};
static void
click_object_internal(Eo *obj, int dir)
static Eina_Position2D
attempt_to_find_the_right_point_for_mouse_positioning(Eo *obj, int dir)
{
int x, y;
Evas *e = evas_object_evas_get(obj);
Eina_Rect r = efl_gfx_entity_geometry_get(obj);
if (dir & LEFT)
x = r.x + (.1 * r.w);
@ -418,7 +417,15 @@ click_object_internal(Eo *obj, int dir)
y = r.y + (.9 * r.h);
else
y = r.y + r.h / 2;
evas_event_feed_mouse_move(e, x, y, 0, NULL);
return EINA_POSITION2D(x, y);
}
static void
click_object_internal(Eo *obj, int dir)
{
Evas *e = evas_object_evas_get(obj);
Eina_Position2D pos = attempt_to_find_the_right_point_for_mouse_positioning(obj, dir);
evas_event_feed_mouse_move(e, pos.x, pos.y, 0, NULL);
evas_event_feed_mouse_down(e, 1, 0, 0, NULL);
evas_event_feed_mouse_up(e, 1, 0, 0, NULL);
}
@ -457,6 +464,47 @@ click_part(Eo *obj, const char *part)
efl_unref(part_obj);
}
static void
wheel_object_internal(Eo *obj, int dir, Eina_Bool horiz, Eina_Bool down)
{
Eina_Position2D pos = attempt_to_find_the_right_point_for_mouse_positioning(obj, dir);
wheel_object_at(obj, pos.x, pos.y, horiz, down);
}
void
wheel_object(Eo *obj, Eina_Bool horiz, Eina_Bool down)
{
wheel_object_internal(obj, NONE, horiz, down);
}
void
wheel_part(Eo *obj, const char *part, Eina_Bool horiz, Eina_Bool down)
{
Efl_Part *part_obj = efl_ref(efl_part(obj, part));
Eo *content;
int dir = 0;
if (efl_canvas_layout_part_type_get(part_obj) == EFL_CANVAS_LAYOUT_PART_TYPE_SWALLOW)
content = efl_content_get(part_obj);
else
{
content = part_obj;
if (strstr(part, "left"))
dir |= LEFT;
else if (strstr(part, "right"))
dir |= RIGHT;
if (strstr(part, "top"))
dir |= TOP;
else if (strstr(part, "bottom"))
dir |= BOTTOM;
}
wheel_object_internal(content, dir, horiz, down);
if (efl_isa(content, EFL_LAYOUT_SIGNAL_INTERFACE))
edje_object_message_signal_process(content);
edje_object_message_signal_process(obj);
efl_unref(part_obj);
}
void
event_callback_that_is_called_exactly_one_time_and_sets_a_single_int_data_pointer_when_called(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
@ -480,3 +528,11 @@ click_object_at(Eo *obj, int x, int y)
evas_event_feed_mouse_down(e, 1, 0, 0, NULL);
evas_event_feed_mouse_up(e, 1, 0, 0, NULL);
}
void
wheel_object_at(Eo *obj, int x, int y, Eina_Bool horiz, Eina_Bool down)
{
Evas *e = evas_object_evas_get(obj);
evas_event_feed_mouse_move(e, x, y, 0, NULL);
evas_event_feed_mouse_wheel(e, horiz, down, 0, NULL);
}

View File

@ -14,6 +14,9 @@ void get_me_to_those_events(Eo *obj);
void click_object(Eo *obj);
void click_part(Eo *obj, const char *part);
void click_object_at(Eo *obj, int x, int y);
void wheel_object(Eo *obj, Eina_Bool horiz, Eina_Bool down);
void wheel_part(Eo *obj, const char *part, Eina_Bool horiz, Eina_Bool down);
void wheel_object_at(Eo *obj, int x, int y, Eina_Bool horiz, Eina_Bool down);
void event_callback_that_is_called_exactly_one_time_and_sets_a_single_int_data_pointer_when_called(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED);
void event_callback_that_quits_the_main_loop_when_called();
#endif

View File

@ -4654,6 +4654,29 @@ EFL_START_TEST(efl_canvas_text_markup)
}
EFL_END_TEST
EFL_START_TEST(efl_canvas_text_markup_invalid_escape)
{
START_EFL_CANVAS_TEXT_TEST();
char * text1 = "Hello";
char * text2 = "Hello&123";
char * text3 = "Hello&123&456";
Evas_Coord fw1, fw2, fw3;
efl_text_markup_set(txt,text1);
efl_canvas_text_size_native_get(txt, &fw1, NULL);
efl_text_markup_set(txt,text2);
efl_canvas_text_size_native_get(txt, &fw2, NULL);
fail_if(fw2 <= fw1);
efl_text_markup_set(txt,text3);
efl_canvas_text_size_native_get(txt, &fw3, NULL);
fail_if(fw3 <= fw2);
END_EFL_CANVAS_TEXT_TEST();
}
EFL_END_TEST
EFL_START_TEST(efl_text_font)
{
START_EFL_CANVAS_TEXT_TEST();
@ -4715,6 +4738,7 @@ void evas_test_textblock(TCase *tc)
tcase_add_test(tc, efl_text);
tcase_add_test(tc, efl_canvas_text_cursor);
tcase_add_test(tc, efl_canvas_text_markup);
tcase_add_test(tc, efl_canvas_text_markup_invalid_escape);
tcase_add_test(tc, efl_text_font);
}