summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdoc/efl_copy.sh1
-rw-r--r--doc/meson.build10
-rw-r--r--src/bin/eolian_mono/eolian/mono/alias_definition.hh61
-rw-r--r--src/bin/eolian_mono/eolian/mono/name_helpers.hh20
-rw-r--r--src/bin/eolian_mono/eolian/mono/struct_definition.hh114
-rw-r--r--src/bindings/mono/eina_mono/eina_container_common.cs96
-rw-r--r--src/bindings/mono/eina_mono/eina_hash.cs48
-rw-r--r--src/bindings/mono/eina_mono/eina_slice.cs90
-rw-r--r--src/bindings/mono/eina_mono/eina_value.cs45
-rw-r--r--src/bindings/mono/eldbus_mono/eldbus_common.cs132
-rw-r--r--src/bindings/mono/eo_mono/EoWrapper.cs48
-rw-r--r--src/bindings/mono/eo_mono/workaround.cs209
-rw-r--r--src/lib/ecore_wl2/Ecore_Wl2.h61
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_display.c44
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_window.c22
-rw-r--r--src/lib/elementary/efl_ui_slider.c29
-rw-r--r--src/lib/elementary/elm_slider.c21
-rw-r--r--src/tests/ecore_wl2/ecore_wl2_test_window.c44
-rw-r--r--src/tests/efl_mono/Eo.cs36
-rw-r--r--src/tests/efl_mono/Structs.cs44
20 files changed, 1144 insertions, 31 deletions
diff --git a/doc/efl_copy.sh b/doc/efl_copy.sh
new file mode 100755
index 0000000000..af975fbd8f
--- /dev/null
+++ b/doc/efl_copy.sh
@@ -0,0 +1 @@
cp $@
diff --git a/doc/meson.build b/doc/meson.build
index 81c0e34910..18b9aeecf4 100644
--- a/doc/meson.build
+++ b/doc/meson.build
@@ -104,6 +104,7 @@ widget_preview_eps = custom_target('widget_preview_prefs_epc',
104 104
105shot_sh = find_program('shot.sh') 105shot_sh = find_program('shot.sh')
106tar = find_program('tar') 106tar = find_program('tar')
107efl_copy = find_program('efl_copy.sh')
107 108
108foreach text_filter_property : text_filter_properties 109foreach text_filter_property : text_filter_properties
109 text = text_filter_property[0] 110 text = text_filter_property[0]
@@ -181,10 +182,17 @@ doc_target += custom_target('doxygen',
181 build_by_default: false 182 build_by_default: false
182) 183)
183 184
185# This is not pretty but meson does not seem to allow wildcards in plain cp commands
186copy_images = custom_target('documentation images',
187 command: [efl_copy, '-rf', join_paths(meson.current_source_dir(), 'img', '*.png'), 'html'],
188 output: ['empty_img_copy'],
189 build_by_default: false
190)
191
184compress_target = custom_target('package_doc_tar', 192compress_target = custom_target('package_doc_tar',
185 command: [tar, '-C', meson.build_root(), '--xz', '-cf', 'efl-'+meson.project_version()+'-doc.tar.xz', 'html', 'man'], 193 command: [tar, '-C', meson.build_root(), '--xz', '-cf', 'efl-'+meson.project_version()+'-doc.tar.xz', 'html', 'man'],
186 output: 'efl-'+meson.project_version()+'-doc.tar.xz', 194 output: 'efl-'+meson.project_version()+'-doc.tar.xz',
187 depends: doc_target, 195 depends: [doc_target, copy_images],
188 build_by_default: false 196 build_by_default: false
189) 197)
190 198
diff --git a/src/bin/eolian_mono/eolian/mono/alias_definition.hh b/src/bin/eolian_mono/eolian/mono/alias_definition.hh
index 7f3f2588f3..31d86fe10d 100644
--- a/src/bin/eolian_mono/eolian/mono/alias_definition.hh
+++ b/src/bin/eolian_mono/eolian/mono/alias_definition.hh
@@ -59,7 +59,7 @@ struct alias_definition_generator
59 std::string const alias_name = utils::remove_all(alias.eolian_name, '_'); 59 std::string const alias_name = utils::remove_all(alias.eolian_name, '_');
60 if (!as_generator( 60 if (!as_generator(
61 documentation 61 documentation
62 << "public struct " << alias_name << "\n" 62 << "public struct " << alias_name << " : IEquatable<" << alias_name << ">\n"
63 << "{\n" 63 << "{\n"
64 << scope_tab << "private " << alias_type << " payload;\n\n" 64 << scope_tab << "private " << alias_type << " payload;\n\n"
65 65
@@ -93,7 +93,64 @@ struct alias_definition_generator
93 << scope_tab << "{\n" 93 << scope_tab << "{\n"
94 << scope_tab << scope_tab << "return this;\n" 94 << scope_tab << scope_tab << "return this;\n"
95 << scope_tab << "}\n" 95 << scope_tab << "}\n"
96 << "}\n" 96 ).generate(sink, alias, context))
97 return false;
98
99 std::string since_line;
100 if (!alias.documentation.since.empty())
101 if (!as_generator(scope_tab << "/// <para>Since EFL " + alias.documentation.since + ".</para>\n"
102 ).generate(std::back_inserter(since_line), attributes::unused, context))
103 return false;
104
105 // GetHashCode (needed by the equality comparisons)
106 if (!as_generator(
107 scope_tab << "/// <summary>Get a hash code for this item.\n"
108 << since_line
109 << scope_tab << "/// </summary>\n"
110 << scope_tab << "public override int GetHashCode() => payload.GetHashCode();\n"
111 ).generate(sink, attributes::unused, context))
112 return false;
113
114 // IEquatble<T> Equals
115 if (!as_generator(
116 scope_tab << "/// <summary>Equality comparison.\n"
117 << since_line
118 << scope_tab << "/// </summary>\n"
119 << scope_tab << "public bool Equals(" << alias_name << " other) => payload == other.payload;\n"
120 ).generate(sink, attributes::unused, context))
121 return false;
122
123 // ValueType.Equals
124 if (!as_generator(
125 scope_tab << "/// <summary>Equality comparison.\n"
126 << since_line
127 << scope_tab << "/// </summary>\n"
128 << scope_tab << "public override bool Equals(object other)\n"
129 << scope_tab << scope_tab << "=> ((other is " << alias_name << ") ? Equals((" << alias_name << ")other) : false);\n"
130 ).generate(sink, attributes::unused, context))
131 return false;
132
133 // Equality operators
134 if (!as_generator(
135 scope_tab << "/// <summary>Equality comparison.\n"
136 << since_line
137 << scope_tab << "/// </summary>\n"
138 << scope_tab << "public static bool operator ==(" << alias_name << " lhs, " << alias_name << " rhs)\n"
139 << scope_tab << scope_tab << "=> lhs.payload == rhs.payload;\n"
140 ).generate(sink, attributes::unused, context))
141 return false;
142
143 if (!as_generator(
144 scope_tab << "/// <summary>Equality comparison.\n"
145 << since_line
146 << scope_tab << "/// </summary>\n"
147 << scope_tab << "public static bool operator !=(" << alias_name << " lhs, " << alias_name << " rhs)\n"
148 << scope_tab << scope_tab << "=> lhs.payload != rhs.payload;\n"
149 ).generate(sink, attributes::unused, context))
150 return false;
151
152 if (!as_generator(
153 "}\n"
97 ).generate(sink, alias, context)) 154 ).generate(sink, alias, context))
98 return false; 155 return false;
99 156
diff --git a/src/bin/eolian_mono/eolian/mono/name_helpers.hh b/src/bin/eolian_mono/eolian/mono/name_helpers.hh
index 2f3026dfdc..a3ffe47a3b 100644
--- a/src/bin/eolian_mono/eolian/mono/name_helpers.hh
+++ b/src/bin/eolian_mono/eolian/mono/name_helpers.hh
@@ -563,6 +563,17 @@ std::string translate_value_type(std::string const& name)
563 return name; 563 return name;
564} 564}
565 565
566
567// Field names //
568struct struct_field_name_generator
569{
570 template <typename OutputIterator, typename Context>
571 bool generate(OutputIterator sink, attributes::struct_field_def const& field, Context const& context) const
572 {
573 return as_generator(string).generate(sink, name_helpers::to_field_name(field.name), context);
574 }
575} const struct_field_name {};
576
566} // namespace name_helpers 577} // namespace name_helpers
567 578
568} // namespace eolian_mono 579} // namespace eolian_mono
@@ -590,9 +601,18 @@ struct is_eager_generator<eolian_mono::name_helpers::klass_full_concrete_name_ge
590template <> 601template <>
591struct is_generator<eolian_mono::name_helpers::klass_full_concrete_name_generator> : std::true_type {}; 602struct is_generator<eolian_mono::name_helpers::klass_full_concrete_name_generator> : std::true_type {};
592 603
604template <>
605struct is_eager_generator<eolian_mono::name_helpers::struct_field_name_generator> : std::true_type {};
606template <>
607struct is_generator< ::eolian_mono::name_helpers::struct_field_name_generator> : std::true_type {};
608
593namespace type_traits { 609namespace type_traits {
594template <> 610template <>
595struct attributes_needed<struct ::eolian_mono::name_helpers::klass_full_concrete_or_interface_name_generator> : std::integral_constant<int, 1> {}; 611struct attributes_needed<struct ::eolian_mono::name_helpers::klass_full_concrete_or_interface_name_generator> : std::integral_constant<int, 1> {};
612
613template <>
614struct attributes_needed< ::eolian_mono::name_helpers::struct_field_name_generator> : std::integral_constant<int, 1> {};
615
596} 616}
597 617
598} } } 618} } }
diff --git a/src/bin/eolian_mono/eolian/mono/struct_definition.hh b/src/bin/eolian_mono/eolian/mono/struct_definition.hh
index b3b8d717f6..7c0bc9e4e1 100644
--- a/src/bin/eolian_mono/eolian/mono/struct_definition.hh
+++ b/src/bin/eolian_mono/eolian/mono/struct_definition.hh
@@ -21,6 +21,7 @@
21#include "grammar/indentation.hpp" 21#include "grammar/indentation.hpp"
22#include "grammar/list.hpp" 22#include "grammar/list.hpp"
23#include "grammar/alternative.hpp" 23#include "grammar/alternative.hpp"
24#include "grammar/attribute_reorder.hpp"
24#include "name_helpers.hh" 25#include "name_helpers.hh"
25#include "helpers.hh" 26#include "helpers.hh"
26#include "type.hh" 27#include "type.hh"
@@ -408,14 +409,15 @@ struct struct_definition_generator
408 auto const& indent = current_indentation(context); 409 auto const& indent = current_indentation(context);
409 if(!as_generator(documentation).generate(sink, struct_, context)) 410 if(!as_generator(documentation).generate(sink, struct_, context))
410 return false; 411 return false;
412 auto struct_managed_name = binding_struct_name(struct_);
411 if(!as_generator 413 if(!as_generator
412 ( 414 (
413 indent << "[StructLayout(LayoutKind.Sequential)]\n" 415 indent << "[StructLayout(LayoutKind.Sequential)]\n"
414 << indent << "[Efl.Eo.BindingEntity]\n" 416 << indent << "[Efl.Eo.BindingEntity]\n"
415 << indent << "public struct " << string << "\n" 417 << indent << "public struct " << struct_managed_name << " : IEquatable<" << struct_managed_name << ">\n"
416 << indent << "{\n" 418 << indent << "{\n"
417 ) 419 )
418 .generate(sink, binding_struct_name(struct_), context)) 420 .generate(sink, attributes::unused, context))
419 return false; 421 return false;
420 422
421 // iterate struct fields 423 // iterate struct fields
@@ -472,6 +474,114 @@ struct struct_definition_generator
472 return false; 474 return false;
473 } 475 }
474 476
477 std::string since_line;
478 if (!struct_.documentation.since.empty())
479 if (!as_generator(indent << scope_tab << "/// <para>Since EFL " + struct_.documentation.since + ".</para>\n"
480 ).generate(std::back_inserter(since_line), attributes::unused, context))
481 return false;
482
483 // GetHashCode (needed by the equality comparisons)
484 if (!as_generator(
485 indent << scope_tab << "/// <summary>Get a hash code for this item.\n"
486 << since_line
487 << indent << scope_tab << "/// </summary>\n"
488 << indent << scope_tab << "public override int GetHashCode()\n"
489 << indent << scope_tab << "{\n"
490 ).generate(sink, attributes::unused, context))
491 return false;
492
493 if (struct_.fields.size() != 0 )
494 {
495 // int hash = 17;
496 // hash = 23 * fieldA.GetHashCode();
497 // hash = 23 * fieldB.GetHashCode();
498 // hash = 23 * fieldC.GetHashCode();
499 // return hash
500 if (!as_generator(
501 indent << scope_tab << scope_tab << "int hash = 17;\n"
502 << *(indent << scope_tab << scope_tab << "hash = hash * 23 + " << name_helpers::struct_field_name << ".GetHashCode();\n")
503 << indent << scope_tab << scope_tab << "return hash;\n"
504 ).generate(sink, struct_.fields, context))
505 return false;
506 }
507 else
508 {
509 // Just compare the place holder pointers
510 if (!as_generator(
511 "return field.GetHashCode();\n"
512 ).generate(sink, attributes::unused, context))
513 return false;
514 }
515
516 if (!as_generator(
517 indent << scope_tab << "}\n"
518 ).generate(sink, attributes::unused, context))
519 return false;
520
521 // IEquatable<T> Equals
522 if (!as_generator(
523 indent << scope_tab << "/// <summary>Equality comparison.\n"
524 << since_line
525 << indent << scope_tab << "/// </summary>\n"
526 << indent << scope_tab << "public bool Equals(" << struct_managed_name << " other)\n"
527 << indent << scope_tab << "{\n"
528 << indent << scope_tab << scope_tab << "return "
529 ).generate(sink, attributes::unused, context))
530 return false;
531
532 if (struct_.fields.size() != 0 )
533 {
534 if (!as_generator(
535 grammar::attribute_reorder<-1, -1>((name_helpers::struct_field_name << " == other." << name_helpers::struct_field_name)) % " && "
536 ).generate(sink, struct_.fields, context))
537 return false;
538 }
539 else
540 {
541 // Just compare the place holder pointers
542 if (!as_generator(
543 "field.Equals(other.field)"
544 ).generate(sink, attributes::unused, context))
545 return false;
546 }
547
548
549 if (!as_generator(
550 indent << scope_tab << scope_tab << ";\n"
551 << indent << scope_tab << "}\n"
552 ).generate(sink, attributes::unused, context))
553 return false;
554
555 // ValueType.Equals
556 if (!as_generator(
557 indent << scope_tab << "/// <summary>Equality comparison.\n"
558 << since_line
559 << indent << scope_tab << "/// </summary>\n"
560 << indent << scope_tab << "public override bool Equals(object other)\n"
561 << indent << scope_tab << scope_tab << "=> ((other is " << struct_managed_name << ") ? Equals((" << struct_managed_name << ")other) : false);\n"
562 ).generate(sink, attributes::unused, context))
563 return false;
564
565 // Equality operators
566 if (!as_generator(
567 indent << scope_tab << "/// <summary>Equality comparison.\n"
568 << since_line
569 << indent << scope_tab << "/// </summary>\n"
570 << indent << scope_tab << "public static bool operator ==(" << struct_managed_name << " lhs, " << struct_managed_name << " rhs)\n"
571 << indent << scope_tab << scope_tab << "=> lhs.Equals(rhs);"
572 ).generate(sink, attributes::unused, context))
573 return false;
574
575 if (!as_generator(
576 indent << scope_tab << "/// <summary>Equality comparison.\n"
577 << since_line
578 << indent << scope_tab << "/// </summary>\n"
579 << indent << scope_tab << "public static bool operator !=(" << struct_managed_name << " lhs, " << struct_managed_name << " rhs)\n"
580 << indent << scope_tab << scope_tab << "=> !lhs.Equals(rhs);"
581 ).generate(sink, attributes::unused, context))
582 return false;
583
584 // Conversions from/to internal struct and IntPtrs
475 if(!as_generator( 585 if(!as_generator(
476 indent << scope_tab << "/// <summary>Implicit conversion to the managed representation from a native pointer.\n" 586 indent << scope_tab << "/// <summary>Implicit conversion to the managed representation from a native pointer.\n"
477 ).generate(sink, attributes::unused, context)) 587 ).generate(sink, attributes::unused, context))
diff --git a/src/bindings/mono/eina_mono/eina_container_common.cs b/src/bindings/mono/eina_mono/eina_container_common.cs
index 7b94ab7924..5366fab20c 100644
--- a/src/bindings/mono/eina_mono/eina_container_common.cs
+++ b/src/bindings/mono/eina_mono/eina_container_common.cs
@@ -43,19 +43,111 @@ public enum ElementType
43 43
44[EditorBrowsable(EditorBrowsableState.Never)] 44[EditorBrowsable(EditorBrowsableState.Never)]
45[StructLayout(LayoutKind.Sequential)] 45[StructLayout(LayoutKind.Sequential)]
46public struct InlistMem 46public struct InlistMem : IEquatable<InlistMem>
47{ 47{
48 public IntPtr next {get;set;} 48 public IntPtr next {get;set;}
49 public IntPtr prev {get;set;} 49 public IntPtr prev {get;set;}
50 public IntPtr last {get;set;} 50 public IntPtr last {get;set;}
51
52 /// <summary>
53 /// Gets a hash for <see cref="InlistMem" />.
54 /// <para>Since EFL 1.24.</para>
55 /// </summary>
56 /// <returns>A hash code.</returns>
57 public override int GetHashCode()
58 => next.GetHashCode() ^ prev.GetHashCode() ^ last.GetHashCode();
59
60 /// <summary>Returns whether this <see cref="InlistMem" />
61 /// is equal to the given <see cref="object" />.
62 /// <para>Since EFL 1.24.</para>
63 /// </summary>
64 /// <param name="other">The <see cref="object" /> to be compared to.</param>
65 /// <returns><c>true</c> if is equal to <c>other</c>.</returns>
66 public override bool Equals(object other)
67 => (!(other is InlistMem)) ? false : Equals((InlistMem)other);
68
69 /// <summary>Returns whether this <see cref="InlistMem" /> is equal
70 /// to the given <see cref="InlistMem" />.
71 /// <para>Since EFL 1.24.</para>
72 /// </summary>
73 /// <param name="other">The <see cref="InlistMem" /> to be compared to.</param>
74 /// <returns><c>true</c> if is equal to <c>other</c>.</returns>
75 public bool Equals(InlistMem other)
76 => (next == other.next) && (prev == other.prev)
77 && (last == other.last);
78
79 /// <summary>Returns whether <c>lhs</c> is equal to <c>rhs</c>.
80 /// <para>Since EFL 1.24.</para>
81 /// </summary>
82 /// <param name="lhs">The left hand side of the operator.</param>
83 /// <param name="rhs">The right hand side of the operator.</param>
84 /// <returns><c>true</c> if <c>lhs</c> is equal
85 /// to <c>rhs</c>.</returns>
86 public static bool operator==(InlistMem lhs, InlistMem rhs)
87 => lhs.Equals(rhs);
88
89 /// <summary>Returns whether <c>lhs</c> is not equal to <c>rhs</c>.
90 /// <para>Since EFL 1.24.</para>
91 /// </summary>
92 /// <param name="lhs">The left hand side of the operator.</param>
93 /// <param name="rhs">The right hand side of the operator.</param>
94 /// <returns><c>true</c> if <c>lhs</c> is not equal
95 /// to <c>rhs</c>.</returns>
96 public static bool operator!=(InlistMem lhs, InlistMem rhs) => !(lhs == rhs);
51} 97}
52 98
53[EditorBrowsable(EditorBrowsableState.Never)] 99[EditorBrowsable(EditorBrowsableState.Never)]
54[StructLayout(LayoutKind.Sequential)] 100[StructLayout(LayoutKind.Sequential)]
55public struct InlistNode<T> 101public struct InlistNode<T> : IEquatable<InlistNode<T>>
56{ 102{
57 public InlistMem __in_list {get;set;} 103 public InlistMem __in_list {get;set;}
58 public T Val {get;set;} 104 public T Val {get;set;}
105
106 /// <summary>
107 /// Gets a hash for <see cref="InlistNode{T}" />.
108 /// <para>Since EFL 1.24.</para>
109 /// </summary>
110 /// <returns>A hash code.</returns>
111 public override int GetHashCode()
112 => __in_list.GetHashCode() ^ Val.GetHashCode();
113
114 /// <summary>Returns whether this <see cref="InlistNode{T}" />
115 /// is equal to the given <see cref="object" />.
116 /// <para>Since EFL 1.24.</para>
117 /// </summary>
118 /// <param name="other">The <see cref="object" /> to be compared to.</param>
119 /// <returns><c>true</c> if is equal to <c>other</c>.</returns>
120 public override bool Equals(object other)
121 => (!(other is InlistNode<T>)) ? false : Equals((InlistNode<T>)other);
122
123 /// <summary>Returns whether this <see cref="InlistNode{T}" /> is equal
124 /// to the given <see cref="InlistNode{T}" />.
125 /// <para>Since EFL 1.24.</para>
126 /// </summary>
127 /// <param name="other">The <see cref="InlistNode{T}" /> to be compared to.</param>
128 /// <returns><c>true</c> if is equal to <c>other</c>.</returns>
129 public bool Equals(InlistNode<T> other)
130 => (__in_list == other.__in_list) && (Val.Equals(other.Val));
131
132 /// <summary>Returns whether <c>lhs</c> is equal to <c>rhs</c>.
133 /// <para>Since EFL 1.24.</para>
134 /// </summary>
135 /// <param name="lhs">The left hand side of the operator.</param>
136 /// <param name="rhs">The right hand side of the operator.</param>
137 /// <returns><c>true</c> if <c>lhs</c> is equal
138 /// to <c>rhs</c>.</returns>
139 public static bool operator==(InlistNode<T> lhs, InlistNode<T> rhs)
140 => lhs.Equals(rhs);
141
142 /// <summary>Returns whether <c>lhs</c> is not equal to <c>rhs</c>.
143 /// <para>Since EFL 1.24.</para>
144 /// </summary>
145 /// <param name="lhs">The left hand side of the operator.</param>
146 /// <param name="rhs">The right hand side of the operator.</param>
147 /// <returns><c>true</c> if <c>lhs</c> is not equal
148 /// to <c>rhs</c>.</returns>
149 public static bool operator!=(InlistNode<T> lhs, InlistNode<T> rhs)
150 => !(lhs == rhs);
59} 151}
60 152
61[EditorBrowsable(EditorBrowsableState.Never)] 153[EditorBrowsable(EditorBrowsableState.Never)]
diff --git a/src/bindings/mono/eina_mono/eina_hash.cs b/src/bindings/mono/eina_mono/eina_hash.cs
index 29f0d0ddcd..c254d58ae5 100644
--- a/src/bindings/mono/eina_mono/eina_hash.cs
+++ b/src/bindings/mono/eina_mono/eina_hash.cs
@@ -30,11 +30,57 @@ namespace Eina
30 30
31[StructLayout(LayoutKind.Sequential)] 31[StructLayout(LayoutKind.Sequential)]
32[EditorBrowsable(EditorBrowsableState.Never)] 32[EditorBrowsable(EditorBrowsableState.Never)]
33public struct HashTupleNative 33public struct HashTupleNative : IEquatable<HashTupleNative>
34{ 34{
35 public IntPtr key; 35 public IntPtr key;
36 public IntPtr data; 36 public IntPtr data;
37 public uint key_length; 37 public uint key_length;
38
39 /// <summary>
40 /// Gets a hash for <see cref="HashTupleNative" />.
41 /// <para>Since EFL 1.24.</para>
42 /// </summary>
43 /// <returns>A hash code.</returns>
44 public override int GetHashCode()
45 => key.GetHashCode() ^ data.GetHashCode() ^ key_length.GetHashCode();
46
47 /// <summary>Returns whether this <see cref="HashTupleNative" />
48 /// is equal to the given <see cref="object" />.
49 /// <para>Since EFL 1.24.</para>
50 /// </summary>
51 /// <param name="other">The <see cref="object" /> to be compared to.</param>
52 /// <returns><c>true</c> if is equal to <c>other</c>.</returns>
53 public override bool Equals(object other)
54 => (!(other is HashTupleNative)) ? false : Equals((HashTupleNative)other);
55
56 /// <summary>Returns whether this <see cref="HashTupleNative" /> is equal
57 /// to the given <see cref="HashTupleNative" />.
58 /// <para>Since EFL 1.24.</para>
59 /// </summary>
60 /// <param name="other">The <see cref="HashTupleNative" /> to be compared to.</param>
61 /// <returns><c>true</c> if is equal to <c>other</c>.</returns>
62 public bool Equals(HashTupleNative other)
63 => (key == other.key) && (data == other.data)
64 && (key_length == other.key_length);
65
66 /// <summary>Returns whether <c>lhs</c> is equal to <c>rhs</c>.
67 /// <para>Since EFL 1.24.</para>
68 /// </summary>
69 /// <param name="lhs">The left hand side of the operator.</param>
70 /// <param name="rhs">The right hand side of the operator.</param>
71 /// <returns><c>true</c> if <c>lhs</c> is equal
72 /// to <c>rhs</c>.</returns>
73 public static bool operator==(HashTupleNative lhs, HashTupleNative rhs)
74 => lhs.Equals(rhs);
75
76 /// <summary>Returns whether <c>lhs</c> is not equal to <c>rhs</c>.
77 /// <para>Since EFL 1.24.</para>
78 /// </summary>
79 /// <param name="lhs">The left hand side of the operator.</param>
80 /// <param name="rhs">The right hand side of the operator.</param>
81 /// <returns><c>true</c> if <c>lhs</c> is not equal
82 /// to <c>rhs</c>.</returns>
83 public static bool operator!=(HashTupleNative lhs, HashTupleNative rhs) => !(lhs == rhs);
38} 84}
39 85
40[EditorBrowsable(EditorBrowsableState.Never)] 86[EditorBrowsable(EditorBrowsableState.Never)]
diff --git a/src/bindings/mono/eina_mono/eina_slice.cs b/src/bindings/mono/eina_mono/eina_slice.cs
index 8bf056e37b..c7a1fd984f 100644
--- a/src/bindings/mono/eina_mono/eina_slice.cs
+++ b/src/bindings/mono/eina_mono/eina_slice.cs
@@ -52,7 +52,7 @@ public interface ISliceBase
52/// Since EFL 1.23. 52/// Since EFL 1.23.
53/// </summary> 53/// </summary>
54[StructLayout(LayoutKind.Sequential)] 54[StructLayout(LayoutKind.Sequential)]
55public struct Slice : ISliceBase 55public struct Slice : ISliceBase, IEquatable<Slice>
56{ 56{
57 /// <summary> 57 /// <summary>
58 /// The length of this slice. 58 /// The length of this slice.
@@ -87,6 +87,49 @@ public struct Slice : ISliceBase
87 Mem = mem; 87 Mem = mem;
88 Len = len; 88 Len = len;
89 } 89 }
90
91 /// <summary>
92 /// Gets a hash for <see cref="Slice" />.
93 /// <para>Since EFL 1.24.</para>
94 /// </summary>
95 /// <returns>A hash code.</returns>
96 public override int GetHashCode() => Length.GetHashCode() ^ Mem.GetHashCode();
97
98 /// <summary>Returns whether this <see cref="Slice" />
99 /// is equal to the given <see cref="object" />.
100 /// <para>Since EFL 1.24.</para>
101 /// </summary>
102 /// <param name="other">The <see cref="object" /> to be compared to.</param>
103 /// <returns><c>true</c> if is equal to <c>other</c>.</returns>
104 public override bool Equals(object other)
105 => (!(other is Slice)) ? false : Equals((Slice)other);
106
107 /// <summary>Returns whether this <see cref="Slice" /> is equal
108 /// to the given <see cref="Slice" />.
109 /// <para>Since EFL 1.24.</para>
110 /// </summary>
111 /// <param name="other">The <see cref="Slice" /> to be compared to.</param>
112 /// <returns><c>true</c> if is equal to <c>other</c>.</returns>
113 public bool Equals(Slice other)
114 => (Length == other.Length) ^ (Mem == other.Mem);
115
116 /// <summary>Returns whether <c>lhs</c> is equal to <c>rhs</c>.
117 /// <para>Since EFL 1.24</para>
118 /// </summary>
119 /// <param name="lhs">The left hand side of the operator.</param>
120 /// <param name="rhs">The right hand side of the operator.</param>
121 /// <returns><c>true</c> if <c>lhs</c> is equal
122 /// to <c>rhs</c>.</returns>
123 public static bool operator==(Slice lhs, Slice rhs) => lhs.Equals(rhs);
124
125 /// <summary>Returns whether <c>lhs</c> is not equal to <c>rhs</c>.
126 /// <para>Since EFL 1.24.</para>
127 /// </summary>
128 /// <param name="lhs">The left hand side of the operator.</param>
129 /// <param name="rhs">The right hand side of the operator.</param>
130 /// <returns><c>true</c> if <c>lhs</c> is not equal
131 /// to <c>rhs</c>.</returns>
132 public static bool operator!=(Slice lhs, Slice rhs) => !(lhs == rhs);
90} 133}
91 134
92/// <summary>Pointer to a slice of native memory. 135/// <summary>Pointer to a slice of native memory.
@@ -94,7 +137,7 @@ public struct Slice : ISliceBase
94/// Since EFL 1.23. 137/// Since EFL 1.23.
95/// </summary> 138/// </summary>
96[StructLayout(LayoutKind.Sequential)] 139[StructLayout(LayoutKind.Sequential)]
97public struct RwSlice : ISliceBase 140public struct RwSlice : ISliceBase, IEquatable<RwSlice>
98{ 141{
99 /// <summary> 142 /// <summary>
100 /// The length of this slice. 143 /// The length of this slice.
@@ -141,6 +184,49 @@ public struct RwSlice : ISliceBase
141 r.Len = Len; 184 r.Len = Len;
142 return r; 185 return r;
143 } 186 }
187
188 /// <summary>
189 /// Gets a hash for <see cref="RwSlice" />.
190 /// <para>Since EFL 1.24.</para>
191 /// </summary>
192 /// <returns>A hash code.</returns>
193 public override int GetHashCode() => Mem.GetHashCode() ^ Length.GetHashCode();
194
195 /// <summary>Returns whether this <see cref="RwSlice" />
196 /// is equal to the given <see cref="object" />.
197 /// <para>Since EFL 1.24.</para>
198 /// </summary>
199 /// <param name="other">The <see cref="object" /> to be compared to.</param>
200 /// <returns><c>true</c> if is equal to <c>other</c>.</returns>
201 public override bool Equals(object other)
202 => (!(other is RwSlice)) ? false : Equals((RwSlice)other);
203
204 /// <summary>Returns whether this <see cref="RwSlice" /> is equal
205 /// to the given <see cref="RwSlice" />.
206 /// <para>Since EFL 1.24.</para>
207 /// </summary>
208 /// <param name="other">The <see cref="RwSlice" /> to be compared to.</param>
209 /// <returns><c>true</c> if is equal to <c>other</c>.</returns>
210 public bool Equals(RwSlice other)
211 => (Length == other.Length) && (Mem == other.Mem);
212
213 /// <summary>Returns whether <c>lhs</c> is equal to <c>rhs</c>.
214 /// <para>Since EFL 1.24.</para>
215 /// </summary>
216 /// <param name="lhs">The left hand side of the operator.</param>
217 /// <param name="rhs">The right hand side of the operator.</param>
218 /// <returns><c>true</c> if <c>lhs</c> is equal
219 /// to <c>rhs</c>.</returns>
220 public static bool operator==(RwSlice lhs, RwSlice rhs) => lhs.Equals(rhs);
221
222 /// <summary>Returns whether <c>lhs</c> is not equal to <c>rhs</c>.
223 /// <para>Since EFL 1.24.</para>
224 /// </summary>
225 /// <param name="lhs">The left hand side of the operator.</param>
226 /// <param name="rhs">The right hand side of the operator.</param>
227 /// <returns><c>true</c> if <c>lhs</c> is not equal
228 /// to <c>rhs</c>.</returns>
229 public static bool operator!=(RwSlice lhs, RwSlice rhs) => !(lhs == rhs);
144} 230}
145 231
146} 232}
diff --git a/src/bindings/mono/eina_mono/eina_value.cs b/src/bindings/mono/eina_mono/eina_value.cs
index 12d43fd990..2a2508e08b 100644
--- a/src/bindings/mono/eina_mono/eina_value.cs
+++ b/src/bindings/mono/eina_mono/eina_value.cs
@@ -563,7 +563,7 @@ static internal class UnsafeNativeMethods
563/// </summary> 563/// </summary>
564[StructLayout(LayoutKind.Sequential)] 564[StructLayout(LayoutKind.Sequential)]
565[EditorBrowsable(EditorBrowsableState.Never)] 565[EditorBrowsable(EditorBrowsableState.Never)]
566public struct ValueNative 566public struct ValueNative : IEquatable<ValueNative>
567{ 567{
568 public IntPtr Type; 568 public IntPtr Type;
569 public IntPtr Value; // Actually an Eina_Value_Union, but it is padded to 8 bytes. 569 public IntPtr Value; // Actually an Eina_Value_Union, but it is padded to 8 bytes.
@@ -572,6 +572,49 @@ public struct ValueNative
572 { 572 {
573 return $"ValueNative<Type:0x{Type.ToInt64():x}, Value:0x{Value.ToInt64():x}>"; 573 return $"ValueNative<Type:0x{Type.ToInt64():x}, Value:0x{Value.ToInt64():x}>";
574 } 574 }
575
576 /// <summary>
577 /// Gets a hash for <see cref="ValueNative" />.
578 /// <para>Since EFL 1.24.</para>
579 /// </summary>
580 /// <returns>A hash code.</returns>
581 public override int GetHashCode() => Type.GetHashCode() ^ Value.GetHashCode();
582
583 /// <summary>Returns whether this <see cref="ValueNative" />
584 /// is equal to the given <see cref="object" />.
585 /// <para>Since EFL 1.24.</para>
586 /// </summary>
587 /// <param name="other">The <see cref="object" /> to be compared to.</param>
588 /// <returns><c>true</c> if is equal to <c>other</c>.</returns>
589 public override bool Equals(object other)
590 => (!(other is ValueNative)) ? false : Equals((ValueNative)other);
591
592 /// <summary>Returns whether this <see cref="ValueNative" /> is equal
593 /// to the given <see cref="ValueNative" />.
594 /// <para>Since EFL 1.24.</para>
595 /// </summary>
596 /// <param name="other">The <see cref="ValueNative" /> to be compared to.</param>
597 /// <returns><c>true</c> if is equal to <c>other</c>.</returns>
598 public bool Equals(ValueNative other)
599 => (Type == other.Type) ^ (Value == other.Value);
600
601 /// <summary>Returns whether <c>lhs</c> is equal to <c>rhs</c>.
602 /// <para>Since EFL 1.24.</para>
603 /// </summary>
604 /// <param name="lhs">The left hand side of the operator.</param>
605 /// <param name="rhs">The right hand side of the operator.</param>
606 /// <returns><c>true</c> if <c>lhs</c> is equal
607 /// to <c>rhs</c>.</returns>
608 public static bool operator==(ValueNative lhs, ValueNative rhs) => lhs.Equals(rhs);
609
610 /// <summary>Returns whether <c>lhs</c> is not equal to <c>rhs</c>.
611 /// <para>Since EFL 1.24.</para>
612 /// </summary>
613 /// <param name="lhs">The left hand side of the operator.</param>
614 /// <param name="rhs">The right hand side of the operator.</param>
615 /// <returns><c>true</c> if <c>lhs</c> is not equal
616 /// to <c>rhs</c>.</returns>
617 public static bool operator!=(ValueNative lhs, ValueNative rhs) => !(lhs == rhs);
575} 618}
576 619
577/// <summary>Exception for failures when setting an container item. 620/// <summary>Exception for failures when setting an container item.
diff --git a/src/bindings/mono/eldbus_mono/eldbus_common.cs b/src/bindings/mono/eldbus_mono/eldbus_common.cs
index ed32cbbc5c..b6306953a1 100644
--- a/src/bindings/mono/eldbus_mono/eldbus_common.cs
+++ b/src/bindings/mono/eldbus_mono/eldbus_common.cs
@@ -41,7 +41,7 @@ public static class Timeout
41/// <para>Since EFL 1.23.</para> 41/// <para>Since EFL 1.23.</para>
42/// </summary> 42/// </summary>
43[StructLayout(LayoutKind.Sequential)] 43[StructLayout(LayoutKind.Sequential)]
44public struct ObjectPath 44public struct ObjectPath : IEquatable<ObjectPath>
45{ 45{
46 /// <summary> 46 /// <summary>
47 /// The string of the path. 47 /// The string of the path.
@@ -86,6 +86,48 @@ public struct ObjectPath
86 /// </summary> 86 /// </summary>
87 /// <param name="path">The ObjectPath to be converted.</param> 87 /// <param name="path">The ObjectPath to be converted.</param>
88 public static string ToString(ObjectPath path) => path.value; 88 public static string ToString(ObjectPath path) => path.value;
89
90 /// <summary>
91 /// Gets a hash for <see cref="ObjectPath" />.
92 /// <para>Since EFL 1.24.</para>
93 /// </summary>
94 /// <returns>A hash code.</returns>
95 public override int GetHashCode() => value.GetHashCode();
96
97 /// <summary>Returns whether this <see cref="ObjectPath" />
98 /// is equal to the given <see cref="object" />.
99 /// <para>Since EFL 1.24.</para>
100 /// </summary>
101 /// <param name="other">The <see cref="object" /> to be compared to.</param>
102 /// <returns><c>true</c> if is equal to <c>other</c>.</returns>
103 public override bool Equals(object other)
104 => (!(other is ObjectPath)) ? false : Equals((ObjectPath)other);
105
106 /// <summary>Returns whether this <see cref="ObjectPath" /> is equal
107 /// to the given <see cref="ObjectPath" />.
108 /// <para>Since EFL 1.24.</para>
109 /// </summary>
110 /// <param name="other">The <see cref="ObjectPath" /> to be compared to.</param>
111 /// <returns><c>true</c> if is equal to <c>other</c>.</returns>
112 public bool Equals(ObjectPath other) => value == other.value;
113
114 /// <summary>Returns whether <c>lhs</c> is equal to <c>rhs</c>.
115 /// <para>Since EFL 1.24.</para>
116 /// </summary>
117 /// <param name="lhs">The left hand side of the operator.</param>
118 /// <param name="rhs">The right hand side of the operator.</param>
119 /// <returns><c>true</c> if <c>lhs</c> is equal
120 /// to <c>rhs</c>.</returns>
121 public static bool operator==(ObjectPath lhs, ObjectPath rhs) => lhs.Equals(rhs);
122
123 /// <summary>Returns whether <c>lhs</c> is not equal to <c>rhs</c>.
124 /// <para>Since EFL 1.24.</para>
125 /// </summary>
126 /// <param name="lhs">The left hand side of the operator.</param>
127 /// <param name="rhs">The right hand side of the operator.</param>
128 /// <returns><c>true</c> if <c>lhs</c> is not equal
129 /// to <c>rhs</c>.</returns>
130 public static bool operator!=(ObjectPath lhs, ObjectPath rhs) => !(lhs == rhs);
89 131
90} 132}
91 133
@@ -94,7 +136,7 @@ public struct ObjectPath
94/// <para>Since EFL 1.23.</para> 136/// <para>Since EFL 1.23.</para>
95/// </summary> 137/// </summary>
96[StructLayout(LayoutKind.Sequential)] 138[StructLayout(LayoutKind.Sequential)]
97public struct SignatureString 139public struct SignatureString : IEquatable<SignatureString>
98{ 140{
99 /// <summary> 141 /// <summary>
100 /// The string of the signature. 142 /// The string of the signature.
@@ -137,6 +179,48 @@ public struct SignatureString
137 => ToString(sig); 179 => ToString(sig);
138 180
139 public static string ToString(SignatureString sig) => sig.value; 181 public static string ToString(SignatureString sig) => sig.value;
182
183 /// <summary>
184 /// Gets a hash for <see cref="SignatureString" />.
185 /// <para>Since EFL 1.24.</para>
186 /// </summary>
187 /// <returns>A hash code.</returns>
188 public override int GetHashCode() => value.GetHashCode();
189
190 /// <summary>Returns whether this <see cref="SignatureString" />
191 /// is equal to the given <see cref="object" />.
192 /// <para>Since EFL 1.24.</para>
193 /// </summary>
194 /// <param name="other">The <see cref="object" /> to be compared to.</param>
195 /// <returns><c>true</c> if is equal to <c>other</c>.</returns>
196 public override bool Equals(object other)
197 => (!(other is SignatureString)) ? false : Equals((SignatureString)other);
198
199 /// <summary>Returns whether this <see cref="SignatureString" /> is equal
200 /// to the given <see cref="SignatureString" />.
201 /// <para>Since EFL 1.24.</para>
202 /// </summary>
203 /// <param name="other">The <see cref="SignatureString" /> to be compared to.</param>
204 /// <returns><c>true</c> if is equal to <c>other</c>.</returns>
205 public bool Equals(SignatureString other) => value == other.value;
206
207 /// <summary>Returns whether <c>lhs</c> is equal to <c>rhs</c>.
208 /// <para>Since EFL 1.24.</para>
209 /// </summary>
210 /// <param name="lhs">The left hand side of the operator.</param>
211 /// <param name="rhs">The right hand side of the operator.</param>
212 /// <returns><c>true</c> if <c>lhs</c> is equal
213 /// to <c>rhs</c>.</returns>
214 public static bool operator==(SignatureString lhs, SignatureString rhs) => lhs.Equals(rhs);
215
216 /// <summary>Returns whether <c>lhs</c> is not equal to <c>rhs</c>.
217 /// <para>Since EFL 1.24.</para>
218 /// </summary>
219 /// <param name="lhs">The left hand side of the operator.</param>
220 /// <param name="rhs">The right hand side of the operator.</param>
221 /// <returns><c>true</c> if <c>lhs</c> is not equal
222 /// to <c>rhs</c>.</returns>
223 public static bool operator!=(SignatureString lhs, SignatureString rhs) => !(lhs == rhs);
140} 224}
141 225
142/// <summary> 226/// <summary>
@@ -144,7 +228,7 @@ public struct SignatureString
144/// <para>Since EFL 1.23.</para> 228/// <para>Since EFL 1.23.</para>
145/// </summary> 229/// </summary>
146[StructLayout(LayoutKind.Sequential)] 230[StructLayout(LayoutKind.Sequential)]
147public struct UnixFd 231public struct UnixFd : IEquatable<UnixFd>
148{ 232{
149 /// <summary> 233 /// <summary>
150 /// The value of the file descriptor. 234 /// The value of the file descriptor.
@@ -189,6 +273,48 @@ public struct UnixFd
189 /// </summary> 273 /// </summary>
190 /// <param name="unix_fd">The <see cref="UnixFd" /> to be converted.</param> 274 /// <param name="unix_fd">The <see cref="UnixFd" /> to be converted.</param>
191 public static Int32 ToInt32(UnixFd unix_fd) => unix_fd.value; 275 public static Int32 ToInt32(UnixFd unix_fd) => unix_fd.value;
276
277 /// <summary>
278 /// Gets a hash for <see cref="UnixFd" />.
279 /// <para>Since EFL 1.24.</para>
280 /// </summary>
281 /// <returns>A hash code.</returns>
282 public override int GetHashCode() => value.GetHashCode();
283
284 /// <summary>Returns whether this <see cref="UnixFd" />
285 /// is equal to the given <see cref="object" />.
286 /// <para>Since EFL 1.24.</para>
287 /// </summary>
288 /// <param name="other">The <see cref="object" /> to be compared to.</param>
289 /// <returns><c>true</c> if is equal to <c>other</c>.</returns>
290 public override bool Equals(object other)
291 => (!(other is UnixFd)) ? false : Equals((UnixFd)other);
292
293 /// <summary>Returns whether this <see cref="UnixFd" /> is equal
294 /// to the given <see cref="UnixFd" />.
295 /// <para>Since EFL 1.24.</para>
296 /// </summary>
297 /// <param name="other">The <see cref="UnixFd" /> to be compared to.</param>
298 /// <returns><c>true</c> if is equal to <c>other</c>.</returns>
299 public bool Equals(UnixFd other) => value == other.value;
300
301 /// <summary>Returns whether <c>lhs</c> is equal to <c>rhs</c>.
302 /// <para>Since EFL 1.24.</para>
303 /// </summary>
304 /// <param name="lhs">The left hand side of the operator.</param>
305 /// <param name="rhs">The right hand side of the operator.</param>
306 /// <returns><c>true</c> if <c>lhs</c> is equal
307 /// to <c>rhs</c>.</returns>
308 public static bool operator==(UnixFd lhs, UnixFd rhs) => lhs.Equals(rhs);
309
310 /// <summary>Returns whether <c>lhs</c> is not equal to <c>rhs</c>.
311 /// <para>Since EFL 1.24.</para>
312 /// </summary>
313 /// <param name="lhs">The left hand side of the operator.</param>
314 /// <param name="rhs">The right hand side of the operator.</param>
315 /// <returns><c>true</c> if <c>lhs</c> is not equal
316 /// to <c>rhs</c>.</returns>
317 public static bool operator!=(UnixFd lhs, UnixFd rhs) => !(lhs == rhs);
192} 318}
193/// <summary> 319/// <summary>
194/// Arguments of EldBus. 320/// Arguments of EldBus.
diff --git a/src/bindings/mono/eo_mono/EoWrapper.cs b/src/bindings/mono/eo_mono/EoWrapper.cs
index 0ab80e503a..554f4ec9bd 100644
--- a/src/bindings/mono/eo_mono/EoWrapper.cs
+++ b/src/bindings/mono/eo_mono/EoWrapper.cs
@@ -404,7 +404,7 @@ public abstract class EoWrapper : IWrapper, IDisposable
404 /// <para>Wraps the pointer handle to the native object instance.</para> 404 /// <para>Wraps the pointer handle to the native object instance.</para>
405 /// <para>Since EFL 1.23.</para> 405 /// <para>Since EFL 1.23.</para>
406 /// </summary> 406 /// </summary>
407 protected struct ConstructingHandle 407 protected struct ConstructingHandle : IEquatable<ConstructingHandle>
408 { 408 {
409 /// <summary>Constructor for wrapping the native handle. 409 /// <summary>Constructor for wrapping the native handle.
410 /// <para>Since EFL 1.23.</para> 410 /// <para>Since EFL 1.23.</para>
@@ -418,6 +418,52 @@ public abstract class EoWrapper : IWrapper, IDisposable
418 /// <para>Since EFL 1.23.</para> 418 /// <para>Since EFL 1.23.</para>
419 /// </summary> 419 /// </summary>
420 public IntPtr NativeHandle { get; private set; } 420 public IntPtr NativeHandle { get; private set; }
421
422 /// <summary>
423 /// Gets a hash for <see cref="ConstructingHandle" />.
424 /// <para>Since EFL 1.24.</para>
425 /// </summary>
426 /// <returns>A hash code.</returns>
427 public override int GetHashCode() => NativeHandle.GetHashCode();
428
429 /// <summary>Returns whether this <see cref="ConstructingHandle" />
430 /// is equal to the given <see cref="object" />.
431 /// <para>Since EFL 1.24.</para>
432 /// </summary>
433 /// <param name="other">The <see cref="object" /> to be compared to.</param>
434 /// <returns><c>true</c> if is equal to <c>other</c>.</returns>
435 public override bool Equals(object other)
436 => (!(other is ConstructingHandle))
437 ? false : Equals((ConstructingHandle)other);
438
439 /// <summary>Returns whether this <see cref="ConstructingHandle" /> is equal
440 /// to the given <see cref="ConstructingHandle" />.
441 /// <para>Since EFL 1.24.</para>
442 /// </summary>
443 /// <param name="other">The <see cref="ConstructingHandle" /> to be compared to.</param>
444 /// <returns><c>true</c> if is equal to <c>other</c>.</returns>
445 public bool Equals(ConstructingHandle other)
446 => NativeHandle == other.NativeHandle;
447
448 /// <summary>Returns whether <c>lhs</c> is equal to <c>rhs</c>.
449 /// <para>Since EFL 1.24.</para>
450 /// </summary>
451 /// <param name="lhs">The left hand side of the operator.</param>
452 /// <param name="rhs">The right hand side of the operator.</param>
453 /// <returns><c>true</c> if <c>lhs</c> is equal
454 /// to <c>rhs</c>.</returns>
455 public static bool operator==(ConstructingHandle lhs, ConstructingHandle rhs)
456 => lhs.Equals(rhs);
457
458 /// <summary>Returns whether <c>lhs</c> is not equal to <c>rhs</c>.
459 /// <para>Since EFL 1.24.</para>
460 /// </summary>
461 /// <param name="lhs">The left hand side of the operator.</param>
462 /// <param name="rhs">The right hand side of the operator.</param>
463 /// <returns><c>true</c> if <c>lhs</c> is not equal
464 /// to <c>rhs</c>.</returns>
465 public static bool operator!=(ConstructingHandle lhs, ConstructingHandle rhs)
466 => !(lhs == rhs);
421 } 467 }
422 468
423 /// <summary> 469 /// <summary>
diff --git a/src/bindings/mono/eo_mono/workaround.cs b/src/bindings/mono/eo_mono/workaround.cs
index b946a06d44..107a7cd237 100644
--- a/src/bindings/mono/eo_mono/workaround.cs
+++ b/src/bindings/mono/eo_mono/workaround.cs
@@ -21,7 +21,7 @@ using System.Collections.Generic;
21 21
22///<summary>Eo class description, passed to efl_class_new.</summary> 22///<summary>Eo class description, passed to efl_class_new.</summary>
23[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Ansi)] 23[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Ansi)]
24internal struct ClassDescription 24internal struct ClassDescription : IEquatable<ClassDescription>
25{ 25{
26 ///<summary>Current Eo version.</summary> 26 ///<summary>Current Eo version.</summary>
27 internal uint version; 27 internal uint version;
@@ -37,6 +37,55 @@ internal struct ClassDescription
37 internal IntPtr class_constructor; 37 internal IntPtr class_constructor;
38 ///<summary>Destructor of the class.</summary> 38 ///<summary>Destructor of the class.</summary>
39 internal IntPtr class_destructor; 39 internal IntPtr class_destructor;
40
41 /// <summary>
42 /// Gets a hash for <see cref="ClassDescription" />.
43 /// <para>Since EFL 1.24.</para>
44 /// </summary>
45 /// <returns>A hash code.</returns>
46 public override int GetHashCode()
47 => version.GetHashCode() ^ name.GetHashCode()
48 ^ class_type ^ data_size.GetHashCode();
49
50 /// <summary>Returns whether this <see cref="ClassDescription" />
51 /// is equal to the given <see cref="object" />.
52 /// <para>Since EFL 1.24.</para>
53 /// </summary>
54 /// <param name="other">The <see cref="object" /> to be compared to.</param>
55 /// <returns><c>true</c> if is equal to <c>other</c>.</returns>
56 public override bool Equals(object other)
57 => (!(other is ClassDescription)) ? false
58 : Equals((ClassDescription)other);
59
60
61 /// <summary>Returns whether this <see cref="ClassDescription" /> is equal
62 /// to the given <see cref="ClassDescription" />.
63 /// <para>Since EFL 1.24.</para>
64 /// </summary>
65 /// <param name="other">The <see cref="ClassDescription" /> to be compared to.</param>
66 /// <returns><c>true</c> if is equal to <c>other</c>.</returns>
67 public bool Equals(ClassDescription other)
68 => (name == other.name) && (class_type == other.class_type);
69
70 /// <summary>Returns whether <c>lhs</c> is equal to <c>rhs</c>.
71 /// <para>Since EFL 1.24.</para>
72 /// </summary>
73 /// <param name="lhs">The left hand side of the operator.</param>
74 /// <param name="rhs">The right hand side of the operator.</param>
75 /// <returns><c>true</c> if <c>lhs</c> is equal
76 /// to <c>rhs</c>.</returns>
77 public static bool operator==(ClassDescription lhs, ClassDescription rhs)
78 => lhs.Equals(rhs);
79
80 /// <summary>Returns whether <c>lhs</c> is not equal to <c>rhs</c>.
81 /// <para>Since EFL 1.24.</para>
82 /// </summary>
83 /// <param name="lhs">The left hand side of the operator.</param>
84 /// <param name="rhs">The right hand side of the operator.</param>
85 /// <returns><c>true</c> if <c>lhs</c> is not equal
86 /// to <c>rhs</c>.</returns>
87 public static bool operator!=(ClassDescription lhs, ClassDescription rhs)
88 => !(lhs == rhs);
40} 89}
41 90
42///<summary>Description of an Eo API operation.</summary> 91///<summary>Description of an Eo API operation.</summary>
@@ -198,33 +247,185 @@ internal delegate void EventCb(System.IntPtr data, ref Event.NativeStruct evt);
198internal delegate void FreeWrapperSupervisorCb(System.IntPtr obj); 247internal delegate void FreeWrapperSupervisorCb(System.IntPtr obj);
199 248
200[StructLayout(LayoutKind.Sequential)] 249[StructLayout(LayoutKind.Sequential)]
201public struct TextCursorCursor 250public struct TextCursorCursor : IEquatable<TextCursorCursor>
202{ 251{
203 IntPtr obj; 252 IntPtr obj;
204 UIntPtr pos; // UIntPtr to automatically change size_t between 32/64 253 UIntPtr pos; // UIntPtr to automatically change size_t between 32/64
205 IntPtr node; 254 IntPtr node;
206 [MarshalAsAttribute(UnmanagedType.U1)]bool changed; 255 [MarshalAsAttribute(UnmanagedType.U1)]bool changed;
256
257 /// <summary>
258 /// Gets a hash for <see cref="TextCursorCursor" />.
259 /// <para>Since EFL 1.24.</para>
260 /// </summary>
261 /// <returns>A hash code.</returns>
262 public override int GetHashCode()
263 => obj.GetHashCode() ^ pos.GetHashCode()
264 ^ node.GetHashCode() ^ changed.GetHashCode();
265
266 /// <summary>Returns whether this <see cref="TextCursorCursor" />
267 /// is equal to the given <see cref="object" />.
268 /// <para>Since EFL 1.24.</para>
269 /// </summary>
270 /// <param name="other">The <see cref="object" /> to be compared to.</param>
271 /// <returns><c>true</c> if is equal to <c>other</c>.</returns>
272 public override bool Equals(object other)
273 => (!(other is TextCursorCursor)) ? false
274 : Equals((TextAnnotateAnnotation)other);
275
276
277 /// <summary>Returns whether this <see cref="TextCursorCursor" /> is equal
278 /// to the given <see cref="TextCursorCursor" />.
279 /// <para>Since EFL 1.24.</para>
280 /// </summary>
281 /// <param name="other">The <see cref="TextCursorCursor" /> to be compared to.</param>
282 /// <returns><c>true</c> if is equal to <c>other</c>.</returns>
283 public bool Equals(TextCursorCursor other)
284 => (obj == other.obj) && (pos == other.pos)
285 && (node == other.node) && (changed == other.changed);
286
287 /// <summary>Returns whether <c>lhs</c> is equal to <c>rhs</c>.
288 /// <para>Since EFL 1.24.</para>
289 /// </summary>
290 /// <param name="lhs">The left hand side of the operator.</param>
291 /// <param name="rhs">The right hand side of the operator.</param>
292 /// <returns><c>true</c> if <c>lhs</c> is equal
293 /// to <c>rhs</c>.</returns>
294 public static bool operator==(TextCursorCursor lhs, TextCursorCursor rhs)
295 => lhs.Equals(rhs);
296
297 /// <summary>Returns whether <c>lhs</c> is not equal to <c>rhs</c>.
298 /// <para>Since EFL 1.24.</para>
299 /// </summary>
300 /// <param name="lhs">The left hand side of the operator.</param>
301 /// <param name="rhs">The right hand side of the operator.</param>
302 /// <returns><c>true</c> if <c>lhs</c> is not equal
303 /// to <c>rhs</c>.</returns>
304 public static bool operator!=(TextCursorCursor lhs, TextCursorCursor rhs)
305 => !(lhs == rhs);
207} 306}
208 307
209[StructLayout(LayoutKind.Sequential)] 308[StructLayout(LayoutKind.Sequential)]
210public struct TextAnnotateAnnotation 309public struct TextAnnotateAnnotation : IEquatable<TextAnnotateAnnotation>
211{ 310{
212 IntPtr list; 311 IntPtr list;
213 IntPtr obj; 312 IntPtr obj;
214 IntPtr start_node; 313 IntPtr start_node;
215 IntPtr end_node; 314 IntPtr end_node;
216 [MarshalAsAttribute(UnmanagedType.U1)]bool is_item; 315 [MarshalAsAttribute(UnmanagedType.U1)]bool is_item;
316
317 /// <summary>
318 /// Gets a hash for <see cref="TextAnnotateAnnotation" />.
319 /// <para>Since EFL 1.24.</para>
320 /// </summary>
321 /// <returns>A hash code.</returns>
322 public override int GetHashCode()
323 => list.GetHashCode() ^ obj.GetHashCode()
324 ^ start_node.GetHashCode() ^ end_node.GetHashCode()
325 ^ is_item.GetHashCode();
326
327 /// <summary>Returns whether this <see cref="TextAnnotateAnnotation" />
328 /// is equal to the given <see cref="object" />.
329 /// <para>Since EFL 1.24.</para>
330 /// </summary>
331 /// <param name="other">The <see cref="object" /> to be compared to.</param>
332 /// <returns><c>true</c> if is equal to <c>other</c>.</returns>
333 public override bool Equals(object other)
334 => (!(other is TextAnnotateAnnotation)) ? false
335 : Equals((TextAnnotateAnnotation)other);
336
337
338 /// <summary>Returns whether this <see cref="TextAnnotateAnnotation" /> is equal
339 /// to the given <see cref="TextAnnotateAnnotation" />.
340 /// <para>Since EFL 1.24.</para>
341 /// </summary>
342 /// <param name="other">The <see cref="TextAnnotateAnnotation" /> to be compared to.</param>
343 /// <returns><c>true</c> if is equal to <c>other</c>.</returns>
344 public bool Equals(TextAnnotateAnnotation other)
345 => (list == other.list) && (obj == other.obj)
346 && (start_node == other.start_node) && (is_item == other.is_item);
347
348 /// <summary>Returns whether <c>lhs</c> is equal to <c>rhs</c>.
349 /// <para>Since EFL 1.24.</para>
350 /// </summary>
351 /// <param name="lhs">The left hand side of the operator.</param>
352 /// <param name="rhs">The right hand side of the operator.</param>
353 /// <returns><c>true</c> if <c>lhs</c> is equal
354 /// to <c>rhs</c>.</returns>
355 public static bool operator==(TextAnnotateAnnotation lhs, TextAnnotateAnnotation rhs)
356 => lhs.Equals(rhs);
357
358 /// <summary>Returns whether <c>lhs</c> is not equal to <c>rhs</c>.
359 /// <para>Since EFL 1.24.</para>
360 /// </summary>
361 /// <param name="lhs">The left hand side of the operator.</param>
362 /// <param name="rhs">The right hand side of the operator.</param>
363 /// <returns><c>true</c> if <c>lhs</c> is not equal
364 /// to <c>rhs</c>.</returns>
365 public static bool operator!=(TextAnnotateAnnotation lhs, TextAnnotateAnnotation rhs)
366 => !(lhs == rhs);
217} 367}
218 368
219namespace Access 369namespace Access
220{ 370{
221 371
222public struct ActionData 372public struct ActionData : IEquatable<ActionData>
223{ 373{
224 public IntPtr name; 374 public IntPtr name;
225 public IntPtr action; 375 public IntPtr action;
226 public IntPtr param; 376 public IntPtr param;
227 public IntPtr func; 377 public IntPtr func;
378
379
380 /// <summary>
381 /// Gets a hash for <see cref="ActionData" />.
382 /// <para>Since EFL 1.24.</para>
383 /// </summary>
384 /// <returns>A hash code.</returns>
385 public override int GetHashCode()
386 => name.GetHashCode() ^ action.GetHashCode()
387 ^ param.GetHashCode() ^ func.GetHashCode();
388
389 /// <summary>Returns whether this <see cref="ActionData" />
390 /// is equal to the given <see cref="object" />.
391 /// <para>Since EFL 1.24.</para>
392 /// </summary>
393 /// <param name="other">The <see cref="object" /> to be compared to.</param>
394 /// <returns><c>true</c> if is equal to <c>other</c>.</returns>
395 public override bool Equals(object other)
396 => (!(other is ActionData)) ? false
397 : Equals((ActionData)other);
398
399
400 /// <summary>Returns whether this <see cref="ActionData" /> is equal
401 /// to the given <see cref="ActionData" />.
402 /// <para>Since EFL 1.24.</para>
403 /// </summary>
404 /// <param name="other">The <see cref="ActionData" /> to be compared to.</param>
405 /// <returns><c>true</c> if is equal to <c>other</c>.</returns>
406 public bool Equals(ActionData other)
407 => (name == other.name) && (action == other.action)
408 && (param == other.param) && (func == other.func);
409
410 /// <summary>Returns whether <c>lhs</c> is equal to <c>rhs</c>.
411 /// <para>Since EFL 1.24.</para>
412 /// </summary>
413 /// <param name="lhs">The left hand side of the operator.</param>
414 /// <param name="rhs">The right hand side of the operator.</param>
415 /// <returns><c>true</c> if <c>lhs</c> is equal
416 /// to <c>rhs</c>.</returns>
417 public static bool operator==(ActionData lhs, ActionData rhs)
418 => lhs.Equals(rhs);
419
420 /// <summary>Returns whether <c>lhs</c> is not equal to <c>rhs</c>.
421 /// <para>Since EFL 1.24.</para>
422 /// </summary>
423 /// <param name="lhs">The left hand side of the operator.</param>
424 /// <param name="rhs">The right hand side of the operator.</param>
425 /// <returns><c>true</c> if <c>lhs</c> is not equal
426 /// to <c>rhs</c>.</returns>
427 public static bool operator!=(ActionData lhs, ActionData rhs)
428 => !(lhs == rhs);
228} 429}
229 430
230} // namespace Access 431} // namespace Access
diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h
index eca4733710..6f8f9dcd54 100644
--- a/src/lib/ecore_wl2/Ecore_Wl2.h
+++ b/src/lib/ecore_wl2/Ecore_Wl2.h
@@ -714,6 +714,47 @@ EAPI Eina_Bool ecore_wl2_display_sync_is_done(const Ecore_Wl2_Display *display);
714EAPI const char *ecore_wl2_display_name_get(const Ecore_Wl2_Display *display); 714EAPI const char *ecore_wl2_display_name_get(const Ecore_Wl2_Display *display);
715 715
716/** 716/**
717 * Finds an Ecore_Wl2_Window based on wl_surface
718 *
719 * @param display The display to search for the window
720 * @param surface The wl_surface of the window to find
721 *
722 * @return The Ecore_Wl2_Window if found, or NULL if no such window exists
723 *
724 * @ingroup Ecore_Wl2_Display_Group
725 * @since 1.24
726 */
727EAPI Ecore_Wl2_Window *ecore_wl2_display_window_find_by_surface(Ecore_Wl2_Display *display, struct wl_surface *surface);
728
729/**
730 * Gets the connected display object
731 *
732 * @brief This function is typically used by clients to get an
733 * ​existing Wayland display.
734 *
735 * ​@param name The display target name. If @c NULL, the default
736 * display is assumed.
737 *
738 * ​@return The Ecore_Wl2_Display which was connected to
739 *
740 * ​@ingroup Ecore_Wl2_Display_Group
741 * ​@since 1.24
742 */
743EAPI Ecore_Wl2_Display *ecore_wl2_connected_display_get(const char *name);
744
745/**
746 * Gets the wl_compositor which belongs to this display
747 *
748 * @param display The Ecore_Wl2_Display to get the compositor of
749 *
750 * @return The wl_compositor associated with this display
751 *
752 * @ingroup Ecore_Wl2_Display_Group
753 * @since 1.24
754 */
755EAPI struct wl_compositor *ecore_wl2_display_compositor_get(Ecore_Wl2_Display *display);
756
757/**
717 * @defgroup Ecore_Wl2_Window_Group Wayland Library Window Functions 758 * @defgroup Ecore_Wl2_Window_Group Wayland Library Window Functions
718 * @ingroup Ecore_Wl2_Group 759 * @ingroup Ecore_Wl2_Group
719 * 760 *
@@ -1037,6 +1078,16 @@ EAPI void ecore_wl2_window_iconified_set(Ecore_Wl2_Window *window, Eina_Bool ico
1037EAPI void ecore_wl2_window_type_set(Ecore_Wl2_Window *window, Ecore_Wl2_Window_Type type); 1078EAPI void ecore_wl2_window_type_set(Ecore_Wl2_Window *window, Ecore_Wl2_Window_Type type);
1038 1079
1039/** 1080/**
1081 * Get the type of a given window
1082 *
1083 * @see Ecore_Wl2_Window_Type
1084 *
1085 * @ingroup Ecore_Wl2_Window_Group
1086 * @since 1.24
1087 */
1088EAPI Ecore_Wl2_Window_Type ecore_wl2_window_type_get(Ecore_Wl2_Window *window);
1089
1090/**
1040 * Find the output that a given window is on 1091 * Find the output that a given window is on
1041 * 1092 *
1042 * @param window The window to find the output for 1093 * @param window The window to find the output for
@@ -1310,6 +1361,16 @@ EAPI void ecore_wl2_window_floating_mode_set(Ecore_Wl2_Window *window, Eina_Bool
1310EAPI Eina_Bool ecore_wl2_window_floating_mode_get(Ecore_Wl2_Window *window); 1361EAPI Eina_Bool ecore_wl2_window_floating_mode_get(Ecore_Wl2_Window *window);
1311 1362
1312/** 1363/**
1364 * Finds a window by surface
1365 *
1366 * @param surface The surface to find the window of
1367 *
1368 * @ingroup Ecore_Wl2_Window_Group
1369 * @since 1.24
1370 */
1371EAPI Ecore_Wl2_Window *ecore_wl2_window_surface_find(struct wl_surface *surface);
1372
1373/**
1313 * @defgroup Ecore_Wl2_Input_Group Wayland Library Input Functions 1374 * @defgroup Ecore_Wl2_Input_Group Wayland Library Input Functions
1314 * @ingroup Ecore_Wl2_Group 1375 * @ingroup Ecore_Wl2_Group
1315 * 1376 *
diff --git a/src/lib/ecore_wl2/ecore_wl2_display.c b/src/lib/ecore_wl2/ecore_wl2_display.c
index a1511c4711..cc92b8f871 100644
--- a/src/lib/ecore_wl2/ecore_wl2_display.c
+++ b/src/lib/ecore_wl2/ecore_wl2_display.c
@@ -1163,3 +1163,47 @@ ecore_wl2_display_flush(Ecore_Wl2_Display *display)
1163 1163
1164 _begin_recovery_maybe(display, code); 1164 _begin_recovery_maybe(display, code);
1165} 1165}
1166
1167EAPI Ecore_Wl2_Window *
1168ecore_wl2_display_window_find_by_surface(Ecore_Wl2_Display *display, struct wl_surface *surface)
1169{
1170 return _ecore_wl2_display_window_surface_find(display, surface);
1171}
1172
1173EAPI Ecore_Wl2_Display *
1174ecore_wl2_connected_display_get(const char *name)
1175{
1176 Ecore_Wl2_Display *ewd;
1177
1178 EINA_SAFETY_ON_NULL_RETURN_VAL(_client_displays, NULL);
1179
1180 if (!name)
1181 {
1182 const char *n;
1183
1184 /* client wants to connected to default display */
1185 n = getenv("WAYLAND_DISPLAY");
1186 if (!n) n = "wayland-0";
1187
1188 /* we have a default wayland display */
1189
1190 /* check hash of cached client displays for this name */
1191 ewd = eina_hash_find(_client_displays, n);
1192 }
1193 else
1194 {
1195 /* client wants to connect to specific display */
1196
1197 /* check hash of cached client displays for this name */
1198 ewd = eina_hash_find(_client_displays, name);
1199 }
1200
1201 return ewd;
1202}
1203
1204EAPI struct wl_compositor *
1205ecore_wl2_display_compositor_get(Ecore_Wl2_Display *display)
1206{
1207 EINA_SAFETY_ON_NULL_RETURN_VAL(display, NULL);
1208 return display->wl.compositor;
1209}
diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c b/src/lib/ecore_wl2/ecore_wl2_window.c
index 97938339ce..d31dcafeb0 100644
--- a/src/lib/ecore_wl2/ecore_wl2_window.c
+++ b/src/lib/ecore_wl2/ecore_wl2_window.c
@@ -1741,3 +1741,25 @@ ecore_wl2_window_surface_flush(Ecore_Wl2_Window *window, Eina_Bool purge)
1741 if (!window->wl2_surface) return; 1741 if (!window->wl2_surface) return;
1742 ecore_wl2_surface_flush(window->wl2_surface, purge); 1742 ecore_wl2_surface_flush(window->wl2_surface, purge);
1743} 1743}
1744
1745EAPI Ecore_Wl2_Window_Type
1746ecore_wl2_window_type_get(Ecore_Wl2_Window *window)
1747{
1748 EINA_SAFETY_ON_NULL_RETURN_VAL(window, ECORE_WL2_WINDOW_TYPE_NONE);
1749 return window->type;
1750}
1751
1752EAPI Ecore_Wl2_Window *
1753ecore_wl2_window_surface_find(struct wl_surface *surface)
1754{
1755 Ecore_Wl2_Display *ewd;
1756 Ecore_Wl2_Window *win;
1757
1758 EINA_SAFETY_ON_NULL_RETURN_VAL(surface, NULL);
1759
1760 ewd = ecore_wl2_connected_display_get(NULL);
1761 EINA_SAFETY_ON_NULL_RETURN_VAL(ewd, NULL);
1762
1763 win = ecore_wl2_display_window_find_by_surface(ewd, surface);
1764 return win;
1765}
diff --git a/src/lib/elementary/efl_ui_slider.c b/src/lib/elementary/efl_ui_slider.c
index 219a15bc94..920dcfada2 100644
--- a/src/lib/elementary/efl_ui_slider.c
+++ b/src/lib/elementary/efl_ui_slider.c
@@ -48,6 +48,21 @@ _is_horizontal(Efl_Ui_Layout_Orientation dir)
48 return efl_ui_layout_orientation_is_horizontal(dir, EINA_TRUE); 48 return efl_ui_layout_orientation_is_horizontal(dir, EINA_TRUE);
49} 49}
50 50
51static Eina_Bool
52_is_inverted(Eo *obj, Efl_Ui_Slider_Data *sd)
53{
54 Eina_Bool mirrored, inverted;
55
56 mirrored = efl_ui_mirrored_get(obj);
57 inverted = efl_ui_layout_orientation_is_inverted(sd->dir);
58
59 if ((_is_horizontal(sd->dir) && (mirrored ^ inverted)) ||
60 (!_is_horizontal(sd->dir) && inverted))
61 return EINA_TRUE;
62 else
63 return EINA_FALSE;
64}
65
51static void 66static void
52_emit_events(Eo *obj, Efl_Ui_Slider_Data *sd) 67_emit_events(Eo *obj, Efl_Ui_Slider_Data *sd)
53{ 68{
@@ -84,7 +99,7 @@ _step_value_update(Evas_Object *obj, double step)
84 99
85 EFL_UI_SLIDER_DATA_GET(obj, sd); 100 EFL_UI_SLIDER_DATA_GET(obj, sd);
86 101
87 if (efl_ui_mirrored_get(obj) ^ efl_ui_layout_orientation_is_inverted(sd->dir)) 102 if (_is_inverted(obj, sd))
88 step *= -1.0; 103 step *= -1.0;
89 104
90 value = CLAMP(sd->val + step, sd->val_min, sd->val_max); 105 value = CLAMP(sd->val + step, sd->val_min, sd->val_max);
@@ -105,10 +120,8 @@ _drag_value_fetch(Evas_Object *obj)
105 if (_is_horizontal(sd->dir)) pos = posx; 120 if (_is_horizontal(sd->dir)) pos = posx;
106 else pos = posy; 121 else pos = posy;
107 122
108 if (efl_ui_mirrored_get(obj) ^ efl_ui_layout_orientation_is_inverted(sd->dir)) 123 if (_is_inverted(obj, sd))
109 { 124 pos = 1.0 - pos;
110 pos = 1.0 - pos;
111 }
112 125
113 val = (pos * (sd->val_max - sd->val_min)) + sd->val_min; 126 val = (pos * (sd->val_max - sd->val_min)) + sd->val_min;
114 127
@@ -139,10 +152,8 @@ _drag_value_update(Evas_Object *obj)
139 152
140 pos = (sd->val - sd->val_min) / (sd->val_max - sd->val_min); 153 pos = (sd->val - sd->val_min) / (sd->val_max - sd->val_min);
141 154
142 if (efl_ui_mirrored_get(obj) ^ efl_ui_layout_orientation_is_inverted(sd->dir)) 155 if (_is_inverted(obj, sd))
143 { 156 pos = 1.0 - pos;
144 pos = 1.0 - pos;
145 }
146 157
147 efl_ui_drag_value_set(efl_part(wd->resize_obj, "efl.draggable.slider"), 158 efl_ui_drag_value_set(efl_part(wd->resize_obj, "efl.draggable.slider"),
148 pos, pos); 159 pos, pos);
diff --git a/src/lib/elementary/elm_slider.c b/src/lib/elementary/elm_slider.c
index c426a45aeb..2c6c26b84d 100644
--- a/src/lib/elementary/elm_slider.c
+++ b/src/lib/elementary/elm_slider.c
@@ -78,6 +78,21 @@ _is_horizontal(Efl_Ui_Layout_Orientation dir)
78 return efl_ui_layout_orientation_is_horizontal(dir, EINA_TRUE); 78 return efl_ui_layout_orientation_is_horizontal(dir, EINA_TRUE);
79} 79}
80 80
81static Eina_Bool
82_is_inverted(Eo *obj, Elm_Slider_Data *sd)
83{
84 Eina_Bool mirrored, inverted;
85
86 mirrored = efl_ui_mirrored_get(obj);
87 inverted = efl_ui_layout_orientation_is_inverted(sd->dir);
88
89 if ((_is_horizontal(sd->dir) && (mirrored ^ inverted)) ||
90 (!_is_horizontal(sd->dir) && inverted))
91 return EINA_TRUE;
92 else
93 return EINA_FALSE;
94}
95
81static void 96static void
82_units_set(Evas_Object *obj) 97_units_set(Evas_Object *obj)
83{ 98{
@@ -315,7 +330,7 @@ _val_set(Evas_Object *obj)
315 else if (pos2 > 1.0) 330 else if (pos2 > 1.0)
316 pos2 = 1.0; 331 pos2 = 1.0;
317 332
318 if (efl_ui_mirrored_get(obj) ^ efl_ui_layout_orientation_is_inverted(sd->dir)) 333 if (_is_inverted(obj, sd))
319 { 334 {
320 pos = 1.0 - pos; 335 pos = 1.0 - pos;
321 pos2 = 1.0 - pos2; 336 pos2 = 1.0 - pos2;
@@ -360,7 +375,7 @@ _step_value_update(Evas_Object *obj, double step)
360 375
361 ELM_SLIDER_DATA_GET(obj, sd); 376 ELM_SLIDER_DATA_GET(obj, sd);
362 377
363 if (efl_ui_mirrored_get(obj) ^ efl_ui_layout_orientation_is_inverted(sd->dir)) 378 if (_is_inverted(obj, sd))
364 step *= -1.0; 379 step *= -1.0;
365 380
366 absolute_step = step * (sd->val_max - sd->val_min); 381 absolute_step = step * (sd->val_max - sd->val_min);
@@ -392,7 +407,7 @@ _val_fetch(Evas_Object *obj, Eina_Bool user_event)
392 else pos2 = posy2; 407 else pos2 = posy2;
393 } 408 }
394 409
395 if (efl_ui_mirrored_get(obj) ^ efl_ui_layout_orientation_is_inverted(sd->dir)) 410 if (_is_inverted(obj, sd))
396 { 411 {
397 pos = 1.0 - pos; 412 pos = 1.0 - pos;
398 pos2 = 1.0 - pos2; 413 pos2 = 1.0 - pos2;
diff --git a/src/tests/ecore_wl2/ecore_wl2_test_window.c b/src/tests/ecore_wl2/ecore_wl2_test_window.c
index a3e1cbeb54..9c6462c5b9 100644
--- a/src/tests/ecore_wl2/ecore_wl2_test_window.c
+++ b/src/tests/ecore_wl2/ecore_wl2_test_window.c
@@ -287,6 +287,48 @@ EFL_START_TEST(wl2_wm_window_rotation_app)
287} 287}
288EFL_END_TEST 288EFL_END_TEST
289 289
290EFL_START_TEST(wl2_window_geometry)
291{
292 Ecore_Wl2_Display *disp;
293 Ecore_Wl2_Window *win;
294 int x, y, w, h;
295
296 disp = _display_connect();
297 ck_assert(disp != NULL);
298
299 win = _window_create(disp);
300 ck_assert(win != NULL);
301
302 ecore_wl2_window_geometry_set(win, 10, 10, 100, 100);
303
304 ecore_wl2_window_geometry_get(win, &x, &y, &w, &h);
305
306 fail_if(x != 10);
307 fail_if(y != 10);
308 fail_if(w != 100);
309 fail_if(h != 100);
310}
311EFL_END_TEST
312
313EFL_START_TEST(wl2_window_type)
314{
315 Ecore_Wl2_Display *disp;
316 Ecore_Wl2_Window *win;
317 Ecore_Wl2_Window_Type type = ECORE_WL2_WINDOW_TYPE_NONE;
318
319 disp = _display_connect();
320 ck_assert(disp != NULL);
321
322 win = _window_create(disp);
323 ck_assert(win != NULL);
324
325 ecore_wl2_window_type_set(win, ECORE_WL2_WINDOW_TYPE_TOPLEVEL);
326
327 type = ecore_wl2_window_type_get(win);
328 fail_if(type != ECORE_WL2_WINDOW_TYPE_TOPLEVEL);
329}
330EFL_END_TEST
331
290void 332void
291ecore_wl2_test_window(TCase *tc) 333ecore_wl2_test_window(TCase *tc)
292{ 334{
@@ -308,5 +350,7 @@ ecore_wl2_test_window(TCase *tc)
308 tcase_add_test(tc, wl2_window_preferred_rot); 350 tcase_add_test(tc, wl2_window_preferred_rot);
309 tcase_add_test(tc, wl2_window_rotation_app); 351 tcase_add_test(tc, wl2_window_rotation_app);
310 tcase_add_test(tc, wl2_wm_window_rotation_app); 352 tcase_add_test(tc, wl2_wm_window_rotation_app);
353 tcase_add_test(tc, wl2_window_geometry);
354 tcase_add_test(tc, wl2_window_type);
311 } 355 }
312} 356}
diff --git a/src/tests/efl_mono/Eo.cs b/src/tests/efl_mono/Eo.cs
index 9a52085902..fc3c0d4c86 100644
--- a/src/tests/efl_mono/Eo.cs
+++ b/src/tests/efl_mono/Eo.cs
@@ -675,4 +675,40 @@ class TestHiddenClasses
675 } 675 }
676} 676}
677 677
678class TestAliasEquality
679{
680 static Dummy.MyInt a = 4;
681 static Dummy.MyInt b = 4;
682 static Dummy.MyInt c = 5;
683
684 public static void test_equals()
685 {
686 Test.AssertEquals(a, b);
687 Test.AssertNotEquals(a, c);
688 }
689
690 public static void test_equals_different_types()
691 {
692 Test.Assert(!(a.Equals(new Object())));
693 }
694
695 public static void test_equatable()
696 {
697 Test.Assert(((IEquatable<Dummy.MyInt>)a).Equals(b));
698 Test.Assert(!((IEquatable<Dummy.MyInt>)a).Equals(c));
699 }
700
701 public static void test_equality_operators()
702 {
703 Test.Assert(a == b);
704 Test.Assert(a != c);
705 }
706
707 public static void test_hash_code()
708 {
709 Test.AssertEquals(a.GetHashCode(), b.GetHashCode());
710 Test.AssertNotEquals(a.GetHashCode(), c.GetHashCode());
711 }
712}
713
678} 714}
diff --git a/src/tests/efl_mono/Structs.cs b/src/tests/efl_mono/Structs.cs
index 998610c785..60be42eea5 100644
--- a/src/tests/efl_mono/Structs.cs
+++ b/src/tests/efl_mono/Structs.cs
@@ -377,4 +377,48 @@ internal class TestStructs
377 // } 377 // }
378} 378}
379 379
380internal class TestStructEquality
381{
382 static Dummy.StructSimple a = new Dummy.StructSimple(1, 2, (char)3, 4, Fstring: "", Fmstring: "", Fstringshare: "");
383 static Dummy.StructSimple b = new Dummy.StructSimple(1, 2, (char)3, 4, Fstring: "", Fmstring: "", Fstringshare: "");
384
385 static Dummy.StructSimple c = new Dummy.StructSimple(4, 3, (char)2, 1, Fstring: "", Fmstring: "", Fstringshare: "");
386
387 // to check if we differ on a single struct field
388 static Dummy.StructSimple singleDifferentField = new Dummy.StructSimple(1, 2, (char)3, 5, Fstring: "", Fmstring: "", Fstringshare: "");
389
390 public static void test_equals()
391 {
392 Test.AssertEquals(a, b);
393 Test.AssertNotEquals(a, c);
394 Test.AssertNotEquals(a, singleDifferentField);
395 }
396
397 public static void test_equals_different_types()
398 {
399 Test.Assert(!(a.Equals(new Object())));
400 }
401
402 public static void test_equatable()
403 {
404 Test.Assert(((IEquatable<Dummy.StructSimple>)a).Equals(b));
405 Test.Assert(!((IEquatable<Dummy.StructSimple>)a).Equals(c));
406 Test.Assert(!((IEquatable<Dummy.StructSimple>)a).Equals(singleDifferentField));
407 }
408
409 public static void test_equality_operators()
410 {
411 Test.Assert(a == b);
412 Test.Assert(a != c);
413 Test.Assert(a != singleDifferentField);
414 }
415
416 public static void test_hash_code()
417 {
418 Test.AssertEquals(a.GetHashCode(), b.GetHashCode());
419 Test.AssertNotEquals(a.GetHashCode(), c.GetHashCode());
420 Test.AssertNotEquals(a.GetHashCode(), singleDifferentField.GetHashCode());
421 }
422}
423
380} 424}