summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSungtaek Hong <sth253.hong@samsung.com>2017-02-13 20:42:23 +0900
committerKangho Hur <kangho.hur@samsung.com>2017-02-20 14:09:12 +0900
commit22095af77a7f932c55c1557899e355d06fb99a0c (patch)
treeab4ebe0c91300fc586d0a12f424bf5bce21007f0
parentb71c87c927b186a1630c22e34f8bca09525a2842 (diff)
downloadelm-sharp-22095af77a7f932c55c1557899e355d06fb99a0c.tar.gz
elm-sharp-22095af77a7f932c55c1557899e355d06fb99a0c.tar.bz2
elm-sharp-22095af77a7f932c55c1557899e355d06fb99a0c.zip
add opacity layout for layout inherited wiegets
Change-Id: I4c6dc47d135f606cf295c78ff59df2450990f3d7 Signed-off-by: Sungtaek Hong <sth253.hong@samsung.com>
-rwxr-xr-x[-rw-r--r--]ElmSharp/ElmSharp/Background.cs18
-rw-r--r--ElmSharp/ElmSharp/Box.cs17
-rwxr-xr-x[-rw-r--r--]ElmSharp/ElmSharp/Button.cs28
-rwxr-xr-x[-rw-r--r--]ElmSharp/ElmSharp/Calendar.cs40
-rwxr-xr-x[-rw-r--r--]ElmSharp/ElmSharp/Check.cs14
-rwxr-xr-x[-rw-r--r--]ElmSharp/ElmSharp/ColorSelector.cs13
-rwxr-xr-x[-rw-r--r--]ElmSharp/ElmSharp/ContextPopup.cs33
-rwxr-xr-x[-rw-r--r--]ElmSharp/ElmSharp/DateTimeSelector.cs32
-rwxr-xr-x[-rw-r--r--]ElmSharp/ElmSharp/EdjeObject.cs0
-rwxr-xr-x[-rw-r--r--]ElmSharp/ElmSharp/Entry.cs72
-rw-r--r--ElmSharp/ElmSharp/EvasObject.cs6
-rwxr-xr-xElmSharp/ElmSharp/FloatingButton.cs13
-rwxr-xr-x[-rw-r--r--]ElmSharp/ElmSharp/GenGrid.cs72
-rwxr-xr-x[-rw-r--r--]ElmSharp/ElmSharp/GenList.cs56
-rwxr-xr-x[-rw-r--r--]ElmSharp/ElmSharp/Icon.cs18
-rwxr-xr-x[-rw-r--r--]ElmSharp/ElmSharp/Image.cs15
-rwxr-xr-x[-rw-r--r--]ElmSharp/ElmSharp/Index.cs36
-rwxr-xr-x[-rw-r--r--]ElmSharp/ElmSharp/Label.cs32
-rw-r--r--ElmSharp/ElmSharp/Layout.cs10
-rwxr-xr-x[-rw-r--r--]ElmSharp/ElmSharp/List.cs32
-rwxr-xr-x[-rw-r--r--]ElmSharp/ElmSharp/Naviframe.cs28
-rwxr-xr-x[-rw-r--r--]ElmSharp/ElmSharp/Panel.cs26
-rwxr-xr-x[-rw-r--r--]ElmSharp/ElmSharp/Panes.cs24
-rwxr-xr-x[-rw-r--r--]ElmSharp/ElmSharp/Popup.cs13
-rwxr-xr-x[-rw-r--r--]ElmSharp/ElmSharp/ProgressBar.cs40
-rwxr-xr-x[-rw-r--r--]ElmSharp/ElmSharp/Radio.cs20
-rwxr-xr-x[-rw-r--r--]ElmSharp/ElmSharp/Scroller.cs54
-rwxr-xr-x[-rw-r--r--]ElmSharp/ElmSharp/Slider.cs52
-rwxr-xr-x[-rw-r--r--]ElmSharp/ElmSharp/Spinner.cs54
-rwxr-xr-x[-rw-r--r--]ElmSharp/ElmSharp/Table.cs15
-rwxr-xr-x[-rw-r--r--]ElmSharp/ElmSharp/Toolbar.cs42
-rw-r--r--ElmSharp/ElmSharp/Widget.cs72
-rw-r--r--packaging/elm-sharp.spec2
33 files changed, 626 insertions, 373 deletions
diff --git a/ElmSharp/ElmSharp/Background.cs b/ElmSharp/ElmSharp/Background.cs
index bb2d71c..5d6b023 100644..100755
--- a/ElmSharp/ElmSharp/Background.cs
+++ b/ElmSharp/ElmSharp/Background.cs
@@ -45,7 +45,7 @@ namespace ElmSharp
var swallowContent = GetPartContent("elm.swallow.rectangle");
if(swallowContent == IntPtr.Zero)
{
- Interop.Elementary.elm_bg_color_set(Handle, value.R, value.G, value.B);
+ Interop.Elementary.elm_bg_color_set(RealHandle, value.R, value.G, value.B);
swallowContent = GetPartContent("elm.swallow.rectangle");
}
Interop.Evas.evas_object_color_set(swallowContent, value.R, value.G, value.B, value.A);
@@ -56,11 +56,11 @@ namespace ElmSharp
{
get
{
- return Interop.Elementary.BackgroundFileGet(Handle);
+ return Interop.Elementary.BackgroundFileGet(RealHandle);
}
set
{
- Interop.Elementary.elm_bg_file_set(Handle, value, IntPtr.Zero);
+ Interop.Elementary.elm_bg_file_set(RealHandle, value, IntPtr.Zero);
}
}
@@ -68,17 +68,23 @@ namespace ElmSharp
{
get
{
- return (BackgroundOptions) Interop.Elementary.elm_bg_option_get(Handle);
+ return (BackgroundOptions) Interop.Elementary.elm_bg_option_get(RealHandle);
}
set
{
- Interop.Elementary.elm_bg_option_set(Handle, (Interop.Elementary.BackgroundOptions) value);
+ Interop.Elementary.elm_bg_option_set(RealHandle, (Interop.Elementary.BackgroundOptions) value);
}
}
protected override IntPtr CreateHandle(EvasObject parent)
{
- return Interop.Elementary.elm_bg_add(parent.Handle);
+ IntPtr handle = Interop.Elementary.elm_layout_add(parent.Handle);
+ Interop.Elementary.elm_layout_theme_set(handle, "layout", "elm_widget", "default");
+
+ RealHandle = Interop.Elementary.elm_bg_add(handle);
+ Interop.Elementary.elm_object_part_content_set(handle, "elm.swallow.content", RealHandle);
+
+ return handle;
}
}
diff --git a/ElmSharp/ElmSharp/Box.cs b/ElmSharp/ElmSharp/Box.cs
index 8bec6c3..c9c2142 100644
--- a/ElmSharp/ElmSharp/Box.cs
+++ b/ElmSharp/ElmSharp/Box.cs
@@ -77,9 +77,24 @@ namespace ElmSharp
Interop.Elementary.elm_box_layout_set(RealHandle, _layoutCallback, IntPtr.Zero, null);
}
+ public override void SetPartColor(string part, Color color)
+ {
+ Interop.Elementary.elm_object_color_class_color_set(Handle, part, color.R * color.A / 255,
+ color.G * color.A / 255,
+ color.B * color.A / 255,
+ color.A);
+ }
+
+ public override Color GetPartColor(string part)
+ {
+ int r, g, b, a;
+ Interop.Elementary.elm_object_color_class_color_get(Handle, part, out r, out g, out b, out a);
+ return new Color((int)(r / (a / 255.0)), (int)(g / (a / 255.0)), (int)(b / (a / 255.0)), a);
+ }
+
protected override IntPtr CreateHandle(EvasObject parent)
{
- IntPtr handle = Interop.Elementary.elm_layout_add(parent);
+ IntPtr handle = Interop.Elementary.elm_layout_add(parent.Handle);
Interop.Elementary.elm_layout_theme_set(handle, "layout", "background", "default");
RealHandle = Interop.Elementary.elm_box_add(handle);
diff --git a/ElmSharp/ElmSharp/Button.cs b/ElmSharp/ElmSharp/Button.cs
index 0b8edec..302bdf9 100644..100755
--- a/ElmSharp/ElmSharp/Button.cs
+++ b/ElmSharp/ElmSharp/Button.cs
@@ -27,10 +27,10 @@ namespace ElmSharp
public Button(EvasObject parent) : base(parent)
{
- _clicked = new SmartEvent(this, "clicked");
- _repeated = new SmartEvent(this, "repeated");
- _pressed = new SmartEvent(this, "pressed");
- _released = new SmartEvent(this, "unpressed");
+ _clicked = new SmartEvent(this, this.RealHandle, "clicked");
+ _repeated = new SmartEvent(this, this.RealHandle, "repeated");
+ _pressed = new SmartEvent(this, this.RealHandle, "pressed");
+ _released = new SmartEvent(this, this.RealHandle, "unpressed");
_clicked.On += (sender, e) =>
{
@@ -65,11 +65,11 @@ namespace ElmSharp
{
get
{
- return !Interop.Elementary.elm_button_autorepeat_get(Handle);
+ return !Interop.Elementary.elm_button_autorepeat_get(RealHandle);
}
set
{
- Interop.Elementary.elm_button_autorepeat_set(Handle, value);
+ Interop.Elementary.elm_button_autorepeat_set(RealHandle, value);
}
}
@@ -77,11 +77,11 @@ namespace ElmSharp
{
get
{
- return Interop.Elementary.elm_button_autorepeat_initial_timeout_get(Handle);
+ return Interop.Elementary.elm_button_autorepeat_initial_timeout_get(RealHandle);
}
set
{
- Interop.Elementary.elm_button_autorepeat_initial_timeout_set(Handle, value);
+ Interop.Elementary.elm_button_autorepeat_initial_timeout_set(RealHandle, value);
}
}
@@ -89,11 +89,11 @@ namespace ElmSharp
{
get
{
- return Interop.Elementary.elm_button_autorepeat_gap_timeout_get(Handle);
+ return Interop.Elementary.elm_button_autorepeat_gap_timeout_get(RealHandle);
}
set
{
- Interop.Elementary.elm_button_autorepeat_gap_timeout_set(Handle, value);
+ Interop.Elementary.elm_button_autorepeat_gap_timeout_set(RealHandle, value);
}
}
@@ -123,7 +123,13 @@ namespace ElmSharp
protected override IntPtr CreateHandle(EvasObject parent)
{
- return Interop.Elementary.elm_button_add(parent.Handle);
+ IntPtr handle = Interop.Elementary.elm_layout_add(parent.Handle);
+ Interop.Elementary.elm_layout_theme_set(handle, "layout", "elm_widget", "default");
+
+ RealHandle = Interop.Elementary.elm_button_add(handle);
+ Interop.Elementary.elm_object_part_content_set(handle, "elm.swallow.content", RealHandle);
+
+ return handle;
}
}
}
diff --git a/ElmSharp/ElmSharp/Calendar.cs b/ElmSharp/ElmSharp/Calendar.cs
index cecb080..75cfef0 100644..100755
--- a/ElmSharp/ElmSharp/Calendar.cs
+++ b/ElmSharp/ElmSharp/Calendar.cs
@@ -30,7 +30,7 @@ namespace ElmSharp
public Calendar(EvasObject parent) : base(parent)
{
- _changed = new SmartEvent(this, "changed");
+ _changed = new SmartEvent(this, this.RealHandle, "changed");
_changed.On += (sender, e) =>
{
DateTime selectedDate = SelectedDate;
@@ -38,7 +38,7 @@ namespace ElmSharp
_cacheSelectedDate = selectedDate;
};
- _displayedMonthChanged = new SmartEvent(this, "display,changed");
+ _displayedMonthChanged = new SmartEvent(this, this.RealHandle, "display,changed");
_displayedMonthChanged.On += (sender, e) =>
{
int currentDisplayedMonth = SelectedDate.Month;
@@ -57,15 +57,15 @@ namespace ElmSharp
{
int minimumYear;
int unused;
- Interop.Elementary.elm_calendar_min_max_year_get(Handle, out minimumYear, out unused);
+ Interop.Elementary.elm_calendar_min_max_year_get(RealHandle, out minimumYear, out unused);
return minimumYear;
}
set
{
int maximumYear;
int unused;
- Interop.Elementary.elm_calendar_min_max_year_get(Handle, out unused, out maximumYear);
- Interop.Elementary.elm_calendar_min_max_year_set(Handle, value, maximumYear);
+ Interop.Elementary.elm_calendar_min_max_year_get(RealHandle, out unused, out maximumYear);
+ Interop.Elementary.elm_calendar_min_max_year_set(RealHandle, value, maximumYear);
}
}
@@ -75,15 +75,15 @@ namespace ElmSharp
{
int maximumYear;
int unused;
- Interop.Elementary.elm_calendar_min_max_year_get(Handle, out unused, out maximumYear);
+ Interop.Elementary.elm_calendar_min_max_year_get(RealHandle, out unused, out maximumYear);
return maximumYear;
}
set
{
int minimumYear;
int unused;
- Interop.Elementary.elm_calendar_min_max_year_get(Handle, out minimumYear, out unused);
- Interop.Elementary.elm_calendar_min_max_year_set(Handle, minimumYear, value);
+ Interop.Elementary.elm_calendar_min_max_year_get(RealHandle, out minimumYear, out unused);
+ Interop.Elementary.elm_calendar_min_max_year_set(RealHandle, minimumYear, value);
}
}
@@ -91,11 +91,11 @@ namespace ElmSharp
{
get
{
- return (DayOfWeek)Interop.Elementary.elm_calendar_first_day_of_week_get(Handle);
+ return (DayOfWeek)Interop.Elementary.elm_calendar_first_day_of_week_get(RealHandle);
}
set
{
- Interop.Elementary.elm_calendar_first_day_of_week_set(Handle, (int)value);
+ Interop.Elementary.elm_calendar_first_day_of_week_set(RealHandle, (int)value);
}
}
@@ -103,7 +103,7 @@ namespace ElmSharp
{
get
{
- IntPtr stringArrayPtr = Interop.Elementary.elm_calendar_weekdays_names_get(Handle);
+ IntPtr stringArrayPtr = Interop.Elementary.elm_calendar_weekdays_names_get(RealHandle);
string[] stringArray;
IntPtrToStringArray(stringArrayPtr, 7, out stringArray);
return stringArray;
@@ -112,7 +112,7 @@ namespace ElmSharp
{
if (value != null && value.Count == 7)
{
- Interop.Elementary.elm_calendar_weekdays_names_set(Handle, value.ToArray());
+ Interop.Elementary.elm_calendar_weekdays_names_set(RealHandle, value.ToArray());
}
}
}
@@ -122,13 +122,13 @@ namespace ElmSharp
get
{
var tm = new Interop.Libc.SystemTime();
- Interop.Elementary.elm_calendar_selected_time_get(Handle, ref tm);
+ Interop.Elementary.elm_calendar_selected_time_get(RealHandle, ref tm);
return tm;
}
set
{
Interop.Libc.SystemTime tm = value;
- Interop.Elementary.elm_calendar_selected_time_set(Handle, ref tm);
+ Interop.Elementary.elm_calendar_selected_time_set(RealHandle, ref tm);
_cacheSelectedDate = value;
}
}
@@ -137,17 +137,23 @@ namespace ElmSharp
{
get
{
- return Interop.Elementary.elm_calendar_interval_get(Handle);
+ return Interop.Elementary.elm_calendar_interval_get(RealHandle);
}
set
{
- Interop.Elementary.elm_calendar_interval_set(Handle, value);
+ Interop.Elementary.elm_calendar_interval_set(RealHandle, value);
}
}
protected override IntPtr CreateHandle(EvasObject parent)
{
- return Interop.Elementary.elm_calendar_add(parent.Handle);
+ IntPtr handle = Interop.Elementary.elm_layout_add(parent.Handle);
+ Interop.Elementary.elm_layout_theme_set(handle, "layout", "elm_widget", "default");
+
+ RealHandle = Interop.Elementary.elm_calendar_add(handle);
+ Interop.Elementary.elm_object_part_content_set(handle, "elm.swallow.content", RealHandle);
+
+ return handle;
}
static private void IntPtrToStringArray(IntPtr unmanagedArray, int size, out string[] managedArray)
diff --git a/ElmSharp/ElmSharp/Check.cs b/ElmSharp/ElmSharp/Check.cs
index 8284503..c4419fd 100644..100755
--- a/ElmSharp/ElmSharp/Check.cs
+++ b/ElmSharp/ElmSharp/Check.cs
@@ -25,7 +25,7 @@ namespace ElmSharp
public Check(EvasObject parent) : base(parent)
{
- _changed = new SmartEvent(this, "changed");
+ _changed = new SmartEvent(this, this.RealHandle, "changed");
_changed.On += (sender, e) =>
{
StateChanged?.Invoke(this, new CheckStateChangedEventArgs(_currentState, IsChecked));
@@ -38,18 +38,24 @@ namespace ElmSharp
{
get
{
- _currentState = Interop.Elementary.elm_check_state_get(Handle);
+ _currentState = Interop.Elementary.elm_check_state_get(RealHandle);
return _currentState;
}
set
{
- Interop.Elementary.elm_check_state_set(Handle, value);
+ Interop.Elementary.elm_check_state_set(RealHandle, value);
}
}
protected override IntPtr CreateHandle(EvasObject parent)
{
- return Interop.Elementary.elm_check_add(parent.Handle);
+ IntPtr handle = Interop.Elementary.elm_layout_add(parent.Handle);
+ Interop.Elementary.elm_layout_theme_set(handle, "layout", "elm_widget", "default");
+
+ RealHandle = Interop.Elementary.elm_check_add(handle);
+ Interop.Elementary.elm_object_part_content_set(handle, "elm.swallow.content", RealHandle);
+
+ return handle;
}
}
}
diff --git a/ElmSharp/ElmSharp/ColorSelector.cs b/ElmSharp/ElmSharp/ColorSelector.cs
index 1b0d251..283e100 100644..100755
--- a/ElmSharp/ElmSharp/ColorSelector.cs
+++ b/ElmSharp/ElmSharp/ColorSelector.cs
@@ -64,6 +64,19 @@ namespace ElmSharp
}
}
+ public override int Opacity
+ {
+ get
+ {
+ return Color.Default.A;
+ }
+
+ set
+ {
+ Console.WriteLine("ColorSelector instance doesn't support to set Opacity.");
+ }
+ }
+
public ColorSelectorMode Mode
{
get
diff --git a/ElmSharp/ElmSharp/ContextPopup.cs b/ElmSharp/ElmSharp/ContextPopup.cs
index cb1fe2f..2970af1 100644..100755
--- a/ElmSharp/ElmSharp/ContextPopup.cs
+++ b/ElmSharp/ElmSharp/ContextPopup.cs
@@ -36,7 +36,7 @@ namespace ElmSharp
public ContextPopup(EvasObject parent) : base(parent)
{
- _dismissed = new SmartEvent(this, "dismissed");
+ _dismissed = new SmartEvent(this, this.RealHandle, "dismissed");
_dismissed.On += (sender, e) =>
{
Dismissed?.Invoke(this, EventArgs.Empty);
@@ -54,7 +54,7 @@ namespace ElmSharp
{
get
{
- return (ContextPopupDirection)Interop.Elementary.elm_ctxpopup_direction_get(Handle);
+ return (ContextPopupDirection)Interop.Elementary.elm_ctxpopup_direction_get(RealHandle);
}
}
@@ -62,11 +62,11 @@ namespace ElmSharp
{
get
{
- return Interop.Elementary.elm_ctxpopup_horizontal_get(Handle);
+ return Interop.Elementary.elm_ctxpopup_horizontal_get(RealHandle);
}
set
{
- Interop.Elementary.elm_ctxpopup_horizontal_set(Handle, value);
+ Interop.Elementary.elm_ctxpopup_horizontal_set(RealHandle, value);
}
}
@@ -74,17 +74,17 @@ namespace ElmSharp
{
get
{
- return !Interop.Elementary.elm_ctxpopup_auto_hide_disabled_get(Handle);
+ return !Interop.Elementary.elm_ctxpopup_auto_hide_disabled_get(RealHandle);
}
set
{
- Interop.Elementary.elm_ctxpopup_auto_hide_disabled_set(Handle, !value);
+ Interop.Elementary.elm_ctxpopup_auto_hide_disabled_set(RealHandle, !value);
}
}
public void SetDirectionPriorty(ContextPopupDirection first, ContextPopupDirection second, ContextPopupDirection third, ContextPopupDirection fourth)
{
- Interop.Elementary.elm_ctxpopup_direction_priority_set(Handle, (int)first, (int)second, (int)third, (int)fourth);
+ Interop.Elementary.elm_ctxpopup_direction_priority_set(RealHandle, (int)first, (int)second, (int)third, (int)fourth);
}
public ContextPopupItem Append(string label)
@@ -95,19 +95,32 @@ namespace ElmSharp
public ContextPopupItem Append(string label, EvasObject icon)
{
ContextPopupItem item = new ContextPopupItem(label, icon);
- item.Handle = Interop.Elementary.elm_ctxpopup_item_append(Handle, label, icon, _onSelected, (IntPtr)item.Id);
+ item.Handle = Interop.Elementary.elm_ctxpopup_item_append(RealHandle, label, icon, _onSelected, (IntPtr)item.Id);
AddInternal(item);
return item;
}
public void Dismiss()
{
- Interop.Elementary.elm_ctxpopup_dismiss(Handle);
+ Interop.Elementary.elm_ctxpopup_dismiss(RealHandle);
}
public bool IsAvailableDirection(ContextPopupDirection direction)
{
- return Interop.Elementary.elm_ctxpopup_direction_available_get(Handle, (int)direction);
+ return Interop.Elementary.elm_ctxpopup_direction_available_get(RealHandle, (int)direction);
+ }
+
+ public override int Opacity
+ {
+ get
+ {
+ return Color.Default.A;
+ }
+
+ set
+ {
+ Console.WriteLine("ContextPopup instance doesn't support to set Opacity.");
+ }
}
protected override IntPtr CreateHandle(EvasObject parent)
diff --git a/ElmSharp/ElmSharp/DateTimeSelector.cs b/ElmSharp/ElmSharp/DateTimeSelector.cs
index fd3012d..5aff93a 100644..100755
--- a/ElmSharp/ElmSharp/DateTimeSelector.cs
+++ b/ElmSharp/ElmSharp/DateTimeSelector.cs
@@ -35,7 +35,7 @@ namespace ElmSharp
public DateTimeSelector(EvasObject parent) : base(parent)
{
- _changed = new SmartEvent(this, "changed");
+ _changed = new SmartEvent(this, this.RealHandle, "changed");
_changed.On += (s, e) =>
{
DateTime newDateTime = DateTime;
@@ -50,11 +50,11 @@ namespace ElmSharp
{
get
{
- return Interop.Elementary.elm_datetime_format_get(Handle);
+ return Interop.Elementary.elm_datetime_format_get(RealHandle);
}
set
{
- Interop.Elementary.elm_datetime_format_set(Handle, value);
+ Interop.Elementary.elm_datetime_format_set(RealHandle, value);
}
}
@@ -63,13 +63,13 @@ namespace ElmSharp
get
{
var tm = new Interop.Libc.SystemTime();
- Interop.Elementary.elm_datetime_value_max_get(Handle, ref tm);
+ Interop.Elementary.elm_datetime_value_max_get(RealHandle, ref tm);
return tm;
}
set
{
Interop.Libc.SystemTime tm = value;
- Interop.Elementary.elm_datetime_value_max_set(Handle, ref tm);
+ Interop.Elementary.elm_datetime_value_max_set(RealHandle, ref tm);
}
}
@@ -78,13 +78,13 @@ namespace ElmSharp
get
{
var tm = new Interop.Libc.SystemTime();
- Interop.Elementary.elm_datetime_value_min_get(Handle, ref tm);
+ Interop.Elementary.elm_datetime_value_min_get(RealHandle, ref tm);
return tm;
}
set
{
Interop.Libc.SystemTime tm = value;
- Interop.Elementary.elm_datetime_value_min_set(Handle, ref tm);
+ Interop.Elementary.elm_datetime_value_min_set(RealHandle, ref tm);
}
}
@@ -93,35 +93,41 @@ namespace ElmSharp
get
{
var tm = new Interop.Libc.SystemTime();
- Interop.Elementary.elm_datetime_value_get(Handle, ref tm);
+ Interop.Elementary.elm_datetime_value_get(RealHandle, ref tm);
return tm;
}
set
{
Interop.Libc.SystemTime tm = value;
- Interop.Elementary.elm_datetime_value_set(Handle, ref tm);
+ Interop.Elementary.elm_datetime_value_set(RealHandle, ref tm);
_cacheDateTime = value;
}
}
public bool IsFieldVisible(DateTimeFieldType type)
{
- return Interop.Elementary.elm_datetime_field_visible_get(Handle, (int)type);
+ return Interop.Elementary.elm_datetime_field_visible_get(RealHandle, (int)type);
}
public void SetFieldLimit(DateTimeFieldType type, int minimum, int maximum)
{
- Interop.Elementary.elm_datetime_field_limit_set(Handle, (int)type, minimum, maximum);
+ Interop.Elementary.elm_datetime_field_limit_set(RealHandle, (int)type, minimum, maximum);
}
public void SetFieldVisible(DateTimeFieldType type, bool visible)
{
- Interop.Elementary.elm_datetime_field_visible_set(Handle, (int)type, visible);
+ Interop.Elementary.elm_datetime_field_visible_set(RealHandle, (int)type, visible);
}
protected override IntPtr CreateHandle(EvasObject parent)
{
- return Interop.Elementary.elm_datetime_add(parent.Handle);
+ IntPtr handle = Interop.Elementary.elm_layout_add(parent.Handle);
+ Interop.Elementary.elm_layout_theme_set(handle, "layout", "elm_widget", "default");
+
+ RealHandle = Interop.Elementary.elm_datetime_add(handle);
+ Interop.Elementary.elm_object_part_content_set(handle, "elm.swallow.content", RealHandle);
+
+ return handle;
}
}
}
diff --git a/ElmSharp/ElmSharp/EdjeObject.cs b/ElmSharp/ElmSharp/EdjeObject.cs
index 4dc7e28..4dc7e28 100644..100755
--- a/ElmSharp/ElmSharp/EdjeObject.cs
+++ b/ElmSharp/ElmSharp/EdjeObject.cs
diff --git a/ElmSharp/ElmSharp/Entry.cs b/ElmSharp/ElmSharp/Entry.cs
index 1c59e0e..5647f03 100644..100755
--- a/ElmSharp/ElmSharp/Entry.cs
+++ b/ElmSharp/ElmSharp/Entry.cs
@@ -113,16 +113,16 @@ namespace ElmSharp
public Entry(EvasObject parent) : base(parent)
{
- _clicked = new SmartEvent(this, "clicked");
+ _clicked = new SmartEvent(this, this.RealHandle, "clicked");
_clicked.On += (s, e) => Clicked?.Invoke(this, EventArgs.Empty);
- _changedByUser = new SmartEvent(this, "changed,user");
+ _changedByUser = new SmartEvent(this, this.RealHandle, "changed,user");
_changedByUser.On += (s, e) => ChangedByUser?.Invoke(this, EventArgs.Empty);
- _cursorChanged = new SmartEvent(this, "cursor,changed");
+ _cursorChanged = new SmartEvent(this, this.RealHandle, "cursor,changed");
_cursorChanged.On += (s, e) => CursorChanged?.Invoke(this, EventArgs.Empty);
- _activated = new SmartEvent(this, "activated");
+ _activated = new SmartEvent(this, this.RealHandle, "activated");
_activated.On += (s, e) => Activated?.Invoke(this, EventArgs.Empty);
}
@@ -138,11 +138,11 @@ namespace ElmSharp
{
get
{
- return Interop.Elementary.elm_entry_single_line_get(Handle);
+ return Interop.Elementary.elm_entry_single_line_get(RealHandle);
}
set
{
- Interop.Elementary.elm_entry_single_line_set(Handle, value);
+ Interop.Elementary.elm_entry_single_line_set(RealHandle, value);
}
}
@@ -150,11 +150,11 @@ namespace ElmSharp
{
get
{
- return Interop.Elementary.elm_entry_password_get(Handle);
+ return Interop.Elementary.elm_entry_password_get(RealHandle);
}
set
{
- Interop.Elementary.elm_entry_password_set(Handle, value);
+ Interop.Elementary.elm_entry_password_set(RealHandle, value);
}
}
@@ -162,11 +162,11 @@ namespace ElmSharp
{
get
{
- return Interop.Elementary.elm_entry_editable_get(Handle);
+ return Interop.Elementary.elm_entry_editable_get(RealHandle);
}
set
{
- Interop.Elementary.elm_entry_editable_set(Handle, value);
+ Interop.Elementary.elm_entry_editable_set(RealHandle, value);
}
}
@@ -174,7 +174,7 @@ namespace ElmSharp
{
get
{
- return Interop.Elementary.elm_entry_is_empty(Handle);
+ return Interop.Elementary.elm_entry_is_empty(RealHandle);
}
}
@@ -182,11 +182,11 @@ namespace ElmSharp
{
get
{
- return Interop.Elementary.elm_entry_entry_get(Handle);
+ return Interop.Elementary.elm_entry_entry_get(RealHandle);
}
set
{
- Interop.Elementary.elm_entry_entry_set(Handle, value);
+ Interop.Elementary.elm_entry_entry_set(RealHandle, value);
}
}
@@ -194,11 +194,11 @@ namespace ElmSharp
{
get
{
- return Interop.Elementary.elm_entry_text_style_user_peek(Handle);
+ return Interop.Elementary.elm_entry_text_style_user_peek(RealHandle);
}
set
{
- Interop.Elementary.elm_entry_text_style_user_push(Handle, value);
+ Interop.Elementary.elm_entry_text_style_user_push(RealHandle, value);
}
}
@@ -206,11 +206,11 @@ namespace ElmSharp
{
get
{
- return Interop.Elementary.elm_entry_cursor_pos_get(Handle);
+ return Interop.Elementary.elm_entry_cursor_pos_get(RealHandle);
}
set
{
- Interop.Elementary.elm_entry_cursor_pos_set(Handle, value);
+ Interop.Elementary.elm_entry_cursor_pos_set(RealHandle, value);
}
}
@@ -218,7 +218,7 @@ namespace ElmSharp
{
get
{
- return Interop.Elementary.elm_entry_scrollable_get(Handle);
+ return Interop.Elementary.elm_entry_scrollable_get(RealHandle);
}
set
{
@@ -229,7 +229,7 @@ namespace ElmSharp
{
var dummy = EdjeObject;
}
- Interop.Elementary.elm_entry_scrollable_set(Handle, value);
+ Interop.Elementary.elm_entry_scrollable_set(RealHandle, value);
}
}
@@ -240,72 +240,78 @@ namespace ElmSharp
public bool MoveCursorNext()
{
- return Interop.Elementary.elm_entry_cursor_next(Handle);
+ return Interop.Elementary.elm_entry_cursor_next(RealHandle);
}
public bool MoveCursorPrev()
{
- return Interop.Elementary.elm_entry_cursor_prev(Handle);
+ return Interop.Elementary.elm_entry_cursor_prev(RealHandle);
}
public bool MoveCursorUp()
{
- return Interop.Elementary.elm_entry_cursor_up(Handle);
+ return Interop.Elementary.elm_entry_cursor_up(RealHandle);
}
public bool MoveCursorDown()
{
- return Interop.Elementary.elm_entry_cursor_down(Handle);
+ return Interop.Elementary.elm_entry_cursor_down(RealHandle);
}
public void MoveCursorBegin()
{
- Interop.Elementary.elm_entry_cursor_begin_set(Handle);
+ Interop.Elementary.elm_entry_cursor_begin_set(RealHandle);
}
public void MoveCursorEnd()
{
- Interop.Elementary.elm_entry_cursor_end_set(Handle);
+ Interop.Elementary.elm_entry_cursor_end_set(RealHandle);
}
public void MoveCursorLineBegin()
{
- Interop.Elementary.elm_entry_cursor_line_begin_set(Handle);
+ Interop.Elementary.elm_entry_cursor_line_begin_set(RealHandle);
}
public void MoveCursorLineEnd()
{
- Interop.Elementary.elm_entry_cursor_line_end_set(Handle);
+ Interop.Elementary.elm_entry_cursor_line_end_set(RealHandle);
}
public void SetInputPanelLayout(InputPanelLayout layout)
{
- Interop.Elementary.elm_entry_input_panel_layout_set(Handle, (Interop.Elementary.InputPanelLayout)layout);
+ Interop.Elementary.elm_entry_input_panel_layout_set(RealHandle, (Interop.Elementary.InputPanelLayout)layout);
}
public void SetInputPanelEnabled(bool enabled)
{
- Interop.Elementary.elm_entry_input_panel_enabled_set(Handle, enabled);
+ Interop.Elementary.elm_entry_input_panel_enabled_set(RealHandle, enabled);
}
public void SetInputPanelReturnKeyType(InputPanelReturnKeyType keyType)
{
- Interop.Elementary.elm_entry_input_panel_return_key_type_set(Handle, (Interop.Elementary.ReturnKeyType)keyType);
+ Interop.Elementary.elm_entry_input_panel_return_key_type_set(RealHandle, (Interop.Elementary.ReturnKeyType)keyType);
}
public void SelectAll()
{
- Interop.Elementary.elm_entry_select_all(Handle);
+ Interop.Elementary.elm_entry_select_all(RealHandle);
}
public void SelectNone()
{
- Interop.Elementary.elm_entry_select_none(Handle);
+ Interop.Elementary.elm_entry_select_none(RealHandle);
}
protected override IntPtr CreateHandle(EvasObject parent)
{
- return Interop.Elementary.elm_entry_add(parent.Handle);
+ IntPtr handle = Interop.Elementary.elm_layout_add(parent.Handle);
+ Interop.Elementary.elm_layout_theme_set(handle, "layout", "elm_widget", "default");
+
+ RealHandle = Interop.Elementary.elm_entry_add(handle);
+ Interop.Elementary.elm_object_part_content_set(handle, "elm.swallow.content", RealHandle);
+
+ return handle;
}
}
}
diff --git a/ElmSharp/ElmSharp/EvasObject.cs b/ElmSharp/ElmSharp/EvasObject.cs
index 6b732c2..d756b97 100644
--- a/ElmSharp/ElmSharp/EvasObject.cs
+++ b/ElmSharp/ElmSharp/EvasObject.cs
@@ -91,7 +91,7 @@ namespace ElmSharp
{
get
{
- return Interop.Eo.eo_class_name_get(Interop.Eo.eo_class_get(Handle));
+ return Interop.Eo.eo_class_name_get(Interop.Eo.eo_class_get(RealHandle));
}
}
@@ -201,12 +201,12 @@ namespace ElmSharp
get
{
int r, g, b, a;
- Interop.Evas.evas_object_color_get(Handle, out r, out g, out b, out a);
+ Interop.Evas.evas_object_color_get(RealHandle, out r, out g, out b, out a);
return Color.FromRgba(r, g, b, a);
}
set
{
- Interop.Evas.SetPremultipliedColor(Handle, value.R, value.G, value.B, value.A);
+ Interop.Evas.SetPremultipliedColor(RealHandle, value.R, value.G, value.B, value.A);
}
}
diff --git a/ElmSharp/ElmSharp/FloatingButton.cs b/ElmSharp/ElmSharp/FloatingButton.cs
index cd76e36..368eef3 100755
--- a/ElmSharp/ElmSharp/FloatingButton.cs
+++ b/ElmSharp/ElmSharp/FloatingButton.cs
@@ -24,6 +24,19 @@ namespace ElmSharp
{
}
+ public override int Opacity
+ {
+ get
+ {
+ return Color.Default.A;
+ }
+
+ set
+ {
+ Console.WriteLine("FloatingButton instance doesn't support to set Opacity.");
+ }
+ }
+
protected override IntPtr CreateHandle(EvasObject parent)
{
return Interop.Eext.eext_floatingbutton_add(parent.Handle);
diff --git a/ElmSharp/ElmSharp/GenGrid.cs b/ElmSharp/ElmSharp/GenGrid.cs
index 22c73c8..fe7b2d0 100644..100755
--- a/ElmSharp/ElmSharp/GenGrid.cs
+++ b/ElmSharp/ElmSharp/GenGrid.cs
@@ -72,13 +72,13 @@ namespace ElmSharp
get
{
double align;
- Interop.Elementary.elm_gengrid_align_get(Handle, out align, IntPtr.Zero);
+ Interop.Elementary.elm_gengrid_align_get(RealHandle, out align, IntPtr.Zero);
return align;
}
set
{
double aligny = ItemAlignmentY;
- Interop.Elementary.elm_gengrid_align_set(Handle, value, aligny);
+ Interop.Elementary.elm_gengrid_align_set(RealHandle, value, aligny);
}
}
@@ -87,13 +87,13 @@ namespace ElmSharp
get
{
double align;
- Interop.Elementary.elm_gengrid_align_get(Handle, IntPtr.Zero, out align);
+ Interop.Elementary.elm_gengrid_align_get(RealHandle, IntPtr.Zero, out align);
return align;
}
set
{
double alignx = ItemAlignmentX;
- Interop.Elementary.elm_gengrid_align_set(Handle, alignx, value);
+ Interop.Elementary.elm_gengrid_align_set(RealHandle, alignx, value);
}
}
@@ -101,11 +101,11 @@ namespace ElmSharp
{
get
{
- return Interop.Elementary.elm_gengrid_filled_get(Handle);
+ return Interop.Elementary.elm_gengrid_filled_get(RealHandle);
}
set
{
- Interop.Elementary.elm_gengrid_filled_set(Handle, value);
+ Interop.Elementary.elm_gengrid_filled_set(RealHandle, value);
}
}
@@ -113,11 +113,11 @@ namespace ElmSharp
{
get
{
- return Interop.Elementary.elm_gengrid_multi_select_get(Handle);
+ return Interop.Elementary.elm_gengrid_multi_select_get(RealHandle);
}
set
{
- Interop.Elementary.elm_gengrid_multi_select_set(Handle, value);
+ Interop.Elementary.elm_gengrid_multi_select_set(RealHandle, value);
}
}
@@ -126,13 +126,13 @@ namespace ElmSharp
get
{
int width;
- Interop.Elementary.elm_gengrid_item_size_get(Handle, out width, IntPtr.Zero);
+ Interop.Elementary.elm_gengrid_item_size_get(RealHandle, out width, IntPtr.Zero);
return width;
}
set
{
int height = ItemHeight;
- Interop.Elementary.elm_gengrid_item_size_set(Handle, value, height);
+ Interop.Elementary.elm_gengrid_item_size_set(RealHandle, value, height);
}
}
@@ -142,13 +142,13 @@ namespace ElmSharp
get
{
int height;
- Interop.Elementary.elm_gengrid_item_size_get(Handle, IntPtr.Zero, out height);
+ Interop.Elementary.elm_gengrid_item_size_get(RealHandle, IntPtr.Zero, out height);
return height;
}
set
{
int width = ItemWidth;
- Interop.Elementary.elm_gengrid_item_size_set(Handle, width, value);
+ Interop.Elementary.elm_gengrid_item_size_set(RealHandle, width, value);
}
}
@@ -156,11 +156,11 @@ namespace ElmSharp
{
get
{
- return (GenGridSelectionMode)Interop.Elementary.elm_gengrid_select_mode_get(Handle);
+ return (GenGridSelectionMode)Interop.Elementary.elm_gengrid_select_mode_get(RealHandle);
}
set
{
- Interop.Elementary.elm_gengrid_select_mode_set(Handle, (int)value);
+ Interop.Elementary.elm_gengrid_select_mode_set(RealHandle, (int)value);
}
}
@@ -168,11 +168,11 @@ namespace ElmSharp
{
get
{
- return Interop.Elementary.elm_gengrid_horizontal_get(Handle);
+ return Interop.Elementary.elm_gengrid_horizontal_get(RealHandle);
}
set
{
- Interop.Elementary.elm_gengrid_horizontal_set(Handle, value);
+ Interop.Elementary.elm_gengrid_horizontal_set(RealHandle, value);
}
}
@@ -180,18 +180,18 @@ namespace ElmSharp
{
get
{
- return Interop.Elementary.elm_gengrid_highlight_mode_get(Handle);
+ return Interop.Elementary.elm_gengrid_highlight_mode_get(RealHandle);
}
set
{
- Interop.Elementary.elm_gengrid_highlight_mode_set(Handle, value);
+ Interop.Elementary.elm_gengrid_highlight_mode_set(RealHandle, value);
}
}
public GenGridItem Append(GenItemClass itemClass, object data)
{
GenGridItem item = new GenGridItem(data, itemClass);
- IntPtr handle = Interop.Elementary.elm_gengrid_item_append(Handle, itemClass.UnmanagedPtr, (IntPtr)item.Id, null, (IntPtr)item.Id);
+ IntPtr handle = Interop.Elementary.elm_gengrid_item_append(RealHandle, itemClass.UnmanagedPtr, (IntPtr)item.Id, null, (IntPtr)item.Id);
item.Handle = handle;
AddInternal(item);
return item;
@@ -200,7 +200,7 @@ namespace ElmSharp
public GenGridItem Prepend(GenItemClass itemClass, object data)
{
GenGridItem item = new GenGridItem(data, itemClass);
- IntPtr handle = Interop.Elementary.elm_gengrid_item_prepend(Handle, itemClass.UnmanagedPtr, (IntPtr)item.Id, null, (IntPtr)item.Id);
+ IntPtr handle = Interop.Elementary.elm_gengrid_item_prepend(RealHandle, itemClass.UnmanagedPtr, (IntPtr)item.Id, null, (IntPtr)item.Id);
item.Handle = handle;
AddInternal(item);
return item;
@@ -209,7 +209,7 @@ namespace ElmSharp
public GenGridItem InsertBefore(GenItemClass itemClass, object data, GenGridItem before)
{
GenGridItem item = new GenGridItem(data, itemClass);
- IntPtr handle = Interop.Elementary.elm_gengrid_item_insert_before(Handle, itemClass.UnmanagedPtr, (IntPtr)item.Id, before, null, (IntPtr)item.Id);
+ IntPtr handle = Interop.Elementary.elm_gengrid_item_insert_before(RealHandle, itemClass.UnmanagedPtr, (IntPtr)item.Id, before, null, (IntPtr)item.Id);
item.Handle = handle;
AddInternal(item);
return item;
@@ -229,30 +229,36 @@ namespace ElmSharp
public void UpdateRealizedItems()
{
- Interop.Elementary.elm_gengrid_realized_items_update(Handle);
+ Interop.Elementary.elm_gengrid_realized_items_update(RealHandle);
}
public void Clear()
{
- Interop.Elementary.elm_gengrid_clear(Handle);
+ Interop.Elementary.elm_gengrid_clear(RealHandle);
}
protected override IntPtr CreateHandle(EvasObject parent)
{
- return Interop.Elementary.elm_gengrid_add(parent);
+ IntPtr handle = Interop.Elementary.elm_layout_add(parent.Handle);
+ Interop.Elementary.elm_layout_theme_set(handle, "layout", "elm_widget", "default");
+
+ RealHandle = Interop.Elementary.elm_gengrid_add(handle);
+ Interop.Elementary.elm_object_part_content_set(handle, "elm.swallow.content", RealHandle);
+
+ return handle;
}
void InitializeSmartEvent()
{
- _selected = new SmartEvent<GenGridItemEventArgs>(this, "selected", GenGridItemEventArgs.CreateFromSmartEvent);
- _unselected = new SmartEvent<GenGridItemEventArgs>(this, "unselected", GenGridItemEventArgs.CreateFromSmartEvent);
- _activated = new SmartEvent<GenGridItemEventArgs>(this,"activated", GenGridItemEventArgs.CreateFromSmartEvent);
- _pressed = new SmartEvent<GenGridItemEventArgs>(this, "pressed", GenGridItemEventArgs.CreateFromSmartEvent);
- _released = new SmartEvent<GenGridItemEventArgs>(this, "released", GenGridItemEventArgs.CreateFromSmartEvent);
- _doubleClicked = new SmartEvent<GenGridItemEventArgs>(this, "clicked,double", GenGridItemEventArgs.CreateFromSmartEvent);
- _realized = new SmartEvent<GenGridItemEventArgs>(this, "realized", GenGridItemEventArgs.CreateFromSmartEvent);
- _unrealized = new SmartEvent<GenGridItemEventArgs>(this, "unrealized", GenGridItemEventArgs.CreateFromSmartEvent);
- _longpressed = new SmartEvent<GenGridItemEventArgs>(this, "longpressed", GenGridItemEventArgs.CreateFromSmartEvent);
+ _selected = new SmartEvent<GenGridItemEventArgs>(this, this.RealHandle, "selected", GenGridItemEventArgs.CreateFromSmartEvent);
+ _unselected = new SmartEvent<GenGridItemEventArgs>(this, this.RealHandle, "unselected", GenGridItemEventArgs.CreateFromSmartEvent);
+ _activated = new SmartEvent<GenGridItemEventArgs>(this, this.RealHandle, "activated", GenGridItemEventArgs.CreateFromSmartEvent);
+ _pressed = new SmartEvent<GenGridItemEventArgs>(this, this.RealHandle, "pressed", GenGridItemEventArgs.CreateFromSmartEvent);
+ _released = new SmartEvent<GenGridItemEventArgs>(this, this.RealHandle, "released", GenGridItemEventArgs.CreateFromSmartEvent);
+ _doubleClicked = new SmartEvent<GenGridItemEventArgs>(this, this.RealHandle, "clicked,double", GenGridItemEventArgs.CreateFromSmartEvent);
+ _realized = new SmartEvent<GenGridItemEventArgs>(this, this.RealHandle, "realized", GenGridItemEventArgs.CreateFromSmartEvent);
+ _unrealized = new SmartEvent<GenGridItemEventArgs>(this, this.RealHandle, "unrealized", GenGridItemEventArgs.CreateFromSmartEvent);
+ _longpressed = new SmartEvent<GenGridItemEventArgs>(this, this.RealHandle, "longpressed", GenGridItemEventArgs.CreateFromSmartEvent);
_selected.On += (s, e) => { if (e.Item != null) ItemSelected?.Invoke(this, e); };
_unselected.On += (s, e) => { if (e.Item != null) ItemUnselected?.Invoke(this, e); };
diff --git a/ElmSharp/ElmSharp/GenList.cs b/ElmSharp/ElmSharp/GenList.cs
index 9d542a2..eba52f5 100644..100755
--- a/ElmSharp/ElmSharp/GenList.cs
+++ b/ElmSharp/ElmSharp/GenList.cs
@@ -81,11 +81,11 @@ namespace ElmSharp
{
get
{
- return Interop.Elementary.elm_genlist_homogeneous_get(Handle);
+ return Interop.Elementary.elm_genlist_homogeneous_get(RealHandle);
}
set
{
- Interop.Elementary.elm_genlist_homogeneous_set(Handle, value);
+ Interop.Elementary.elm_genlist_homogeneous_set(RealHandle, value);
}
}
@@ -93,11 +93,11 @@ namespace ElmSharp
{
get
{
- return (GenListMode)Interop.Elementary.elm_genlist_mode_get(Handle);
+ return (GenListMode)Interop.Elementary.elm_genlist_mode_get(RealHandle);
}
set
{
- Interop.Elementary.elm_genlist_mode_set(Handle, (int)value);
+ Interop.Elementary.elm_genlist_mode_set(RealHandle, (int)value);
}
}
@@ -105,7 +105,7 @@ namespace ElmSharp
{
get
{
- IntPtr handle = Interop.Elementary.elm_genlist_first_item_get(Handle);
+ IntPtr handle = Interop.Elementary.elm_genlist_first_item_get(RealHandle);
return ItemObject.GetItemByHandle(handle) as GenListItem;
}
}
@@ -114,7 +114,7 @@ namespace ElmSharp
{
get
{
- IntPtr handle = Interop.Elementary.elm_genlist_last_item_get(Handle);
+ IntPtr handle = Interop.Elementary.elm_genlist_last_item_get(RealHandle);
return ItemObject.GetItemByHandle(handle) as GenListItem;
}
}
@@ -161,7 +161,7 @@ namespace ElmSharp
public GenListItem Append(GenItemClass itemClass, object data, GenListItemType type, GenListItem parent)
{
GenListItem item = new GenListItem(data, itemClass);
- IntPtr handle = Interop.Elementary.elm_genlist_item_append(Handle, itemClass.UnmanagedPtr, (IntPtr)item.Id, parent, (int)type, null, (IntPtr)item.Id);
+ IntPtr handle = Interop.Elementary.elm_genlist_item_append(RealHandle, itemClass.UnmanagedPtr, (IntPtr)item.Id, parent, (int)type, null, (IntPtr)item.Id);
item.Handle = handle;
AddInternal(item);
return item;
@@ -180,7 +180,7 @@ namespace ElmSharp
public GenListItem Prepend(GenItemClass itemClass, object data, GenListItemType type, GenListItem parent)
{
GenListItem item = new GenListItem(data, itemClass);
- IntPtr handle = Interop.Elementary.elm_genlist_item_prepend(Handle, itemClass.UnmanagedPtr, (IntPtr)item.Id, parent, (int)type, null, (IntPtr)item.Id);
+ IntPtr handle = Interop.Elementary.elm_genlist_item_prepend(RealHandle, itemClass.UnmanagedPtr, (IntPtr)item.Id, parent, (int)type, null, (IntPtr)item.Id);
item.Handle = handle;
AddInternal(item);
return item;
@@ -199,7 +199,7 @@ namespace ElmSharp
GenListItem item = new GenListItem(data, itemClass);
// insert before the `before` list item
IntPtr handle = Interop.Elementary.elm_genlist_item_insert_before(
- Handle, // genlist handle
+ RealHandle, // genlist handle
itemClass.UnmanagedPtr, // item class
(IntPtr)item.Id, // data
parent, // parent
@@ -226,34 +226,40 @@ namespace ElmSharp
public void UpdateRealizedItems()
{
- Interop.Elementary.elm_genlist_realized_items_update(Handle);
+ Interop.Elementary.elm_genlist_realized_items_update(RealHandle);
}
public void Clear()
{
- Interop.Elementary.elm_genlist_clear(Handle);
+ Interop.Elementary.elm_genlist_clear(RealHandle);
}
protected override IntPtr CreateHandle(EvasObject parent)
{
- return Interop.Elementary.elm_genlist_add(parent);
+ IntPtr handle = Interop.Elementary.elm_layout_add(parent.Handle);
+ Interop.Elementary.elm_layout_theme_set(handle, "layout", "elm_widget", "default");
+
+ RealHandle = Interop.Elementary.elm_genlist_add(handle);
+ Interop.Elementary.elm_object_part_content_set(handle, "elm.swallow.content", RealHandle);
+
+ return handle;
}
void InitializeSmartEvent()
{
- _selected = new SmartEvent<GenListItemEventArgs>(this, "selected", GenListItemEventArgs.CreateFromSmartEvent);
- _unselected = new SmartEvent<GenListItemEventArgs>(this, "unselected", GenListItemEventArgs.CreateFromSmartEvent);
- _activated = new SmartEvent<GenListItemEventArgs>(this, "activated", GenListItemEventArgs.CreateFromSmartEvent);
- _pressed = new SmartEvent<GenListItemEventArgs>(this, "pressed", GenListItemEventArgs.CreateFromSmartEvent);
- _released = new SmartEvent<GenListItemEventArgs>(this, "released", GenListItemEventArgs.CreateFromSmartEvent);
- _doubleClicked = new SmartEvent<GenListItemEventArgs>(this, "clicked,double", GenListItemEventArgs.CreateFromSmartEvent);
- _expanded = new SmartEvent<GenListItemEventArgs>(this, "expanded", GenListItemEventArgs.CreateFromSmartEvent);
- _realized = new SmartEvent<GenListItemEventArgs>(this, "realized", GenListItemEventArgs.CreateFromSmartEvent);
- _unrealized = new SmartEvent<GenListItemEventArgs>(this, "unrealized", GenListItemEventArgs.CreateFromSmartEvent);
- _longpressed = new SmartEvent<GenListItemEventArgs>(this, "longpressed", GenListItemEventArgs.CreateFromSmartEvent);
- _scrollAnimationStarted = new SmartEvent(this, "scroll,anim,start");
- _scrollAnimationStopped = new SmartEvent(this, "scroll,anim,stop");
- _changed = new SmartEvent(this, "changed");
+ _selected = new SmartEvent<GenListItemEventArgs>(this, this.RealHandle, "selected", GenListItemEventArgs.CreateFromSmartEvent);
+ _unselected = new SmartEvent<GenListItemEventArgs>(this, this.RealHandle, "unselected", GenListItemEventArgs.CreateFromSmartEvent);
+ _activated = new SmartEvent<GenListItemEventArgs>(this, this.RealHandle, "activated", GenListItemEventArgs.CreateFromSmartEvent);
+ _pressed = new SmartEvent<GenListItemEventArgs>(this, this.RealHandle, "pressed", GenListItemEventArgs.CreateFromSmartEvent);
+ _released = new SmartEvent<GenListItemEventArgs>(this, this.RealHandle, "released", GenListItemEventArgs.CreateFromSmartEvent);
+ _doubleClicked = new SmartEvent<GenListItemEventArgs>(this, this.RealHandle, "clicked,double", GenListItemEventArgs.CreateFromSmartEvent);
+ _expanded = new SmartEvent<GenListItemEventArgs>(this, this.RealHandle, "expanded", GenListItemEventArgs.CreateFromSmartEvent);
+ _realized = new SmartEvent<GenListItemEventArgs>(this, this.RealHandle, "realized", GenListItemEventArgs.CreateFromSmartEvent);
+ _unrealized = new SmartEvent<GenListItemEventArgs>(this, this.RealHandle, "unrealized", GenListItemEventArgs.CreateFromSmartEvent);
+ _longpressed = new SmartEvent<GenListItemEventArgs>(this, this.RealHandle, "longpressed", GenListItemEventArgs.CreateFromSmartEvent);
+ _scrollAnimationStarted = new SmartEvent(this, this.RealHandle, "scroll,anim,start");
+ _scrollAnimationStopped = new SmartEvent(this, this.RealHandle, "scroll,anim,stop");
+ _changed = new SmartEvent(this, this.RealHandle, "changed");
_selected.On += (s, e) => { if (e.Item != null) ItemSelected?.Invoke(this, e); };
_unselected.On += (s, e) => { if (e.Item != null) ItemUnselected?.Invoke(this, e); };
diff --git a/ElmSharp/ElmSharp/Icon.cs b/ElmSharp/ElmSharp/Icon.cs
index b06494e..6960e87 100644..100755
--- a/ElmSharp/ElmSharp/Icon.cs
+++ b/ElmSharp/ElmSharp/Icon.cs
@@ -35,11 +35,11 @@ namespace ElmSharp
{
get
{
- return Interop.Elementary.elm_icon_standard_get(Handle);
+ return Interop.Elementary.elm_icon_standard_get(RealHandle);
}
set
{
- Interop.Elementary.elm_icon_standard_set(Handle, value);
+ Interop.Elementary.elm_icon_standard_set(RealHandle, value);
}
}
@@ -47,22 +47,28 @@ namespace ElmSharp
{
get
{
- return (IconLookupOrder)Interop.Elementary.elm_icon_order_lookup_get(Handle);
+ return (IconLookupOrder)Interop.Elementary.elm_icon_order_lookup_get(RealHandle);
}
set
{
- Interop.Elementary.elm_icon_order_lookup_set(Handle, (int)value);
+ Interop.Elementary.elm_icon_order_lookup_set(RealHandle, (int)value);
}
}
public void SetThumb(string file, string group)
{
- Interop.Elementary.elm_icon_thumb_set(Handle, file, group);
+ Interop.Elementary.elm_icon_thumb_set(RealHandle, file, group);
}
protected override IntPtr CreateHandle(EvasObject parent)
{
- return Interop.Elementary.elm_icon_add(parent);
+ IntPtr handle = Interop.Elementary.elm_layout_add(parent.Handle);
+ Interop.Elementary.elm_layout_theme_set(handle, "layout", "background", "default");
+
+ RealHandle = Interop.Elementary.elm_icon_add(handle);
+ Interop.Elementary.elm_object_part_content_set(handle, "elm.swallow.content", RealHandle);
+
+ return handle;
}
}
}
diff --git a/ElmSharp/ElmSharp/Image.cs b/ElmSharp/ElmSharp/Image.cs
index 89d1aad..2cb614e 100644..100755
--- a/ElmSharp/ElmSharp/Image.cs
+++ b/ElmSharp/ElmSharp/Image.cs
@@ -426,6 +426,21 @@ namespace ElmSharp
return await tcs.Task;
}
+ public override void SetPartColor(string part, Color color)
+ {
+ Interop.Elementary.elm_object_color_class_color_set(Handle, part, color.R * color.A / 255,
+ color.G * color.A / 255,
+ color.B * color.A / 255,
+ color.A);
+ }
+
+ public override Color GetPartColor(string part)
+ {
+ int r, g, b, a;
+ Interop.Elementary.elm_object_color_class_color_get(Handle, part, out r, out g, out b, out a);
+ return new Color((int)(r / (a / 255.0)), (int)(g / (a / 255.0)), (int)(b / (a / 255.0)), a);
+ }
+
protected override IntPtr CreateHandle(EvasObject parent)
{
IntPtr handle = Interop.Elementary.elm_layout_add(parent);
diff --git a/ElmSharp/ElmSharp/Index.cs b/ElmSharp/ElmSharp/Index.cs
index 4ed1381..5f0e957 100644..100755
--- a/ElmSharp/ElmSharp/Index.cs
+++ b/ElmSharp/ElmSharp/Index.cs
@@ -26,7 +26,7 @@ namespace ElmSharp
public Index(EvasObject parent) : base(parent)
{
- _delayedChanged = new SmartEvent(this, "delay,changed");
+ _delayedChanged = new SmartEvent(this, this.RealHandle, "delay,changed");
_delayedChanged.On += _delayedChanged_On;
}
@@ -36,11 +36,11 @@ namespace ElmSharp
{
get
{
- return !Interop.Elementary.elm_index_autohide_disabled_get(Handle);
+ return !Interop.Elementary.elm_index_autohide_disabled_get(RealHandle);
}
set
{
- Interop.Elementary.elm_index_autohide_disabled_set(Handle, !value);
+ Interop.Elementary.elm_index_autohide_disabled_set(RealHandle, !value);
}
}
@@ -48,11 +48,11 @@ namespace ElmSharp
{
get
{
- return Interop.Elementary.elm_index_horizontal_get(Handle);
+ return Interop.Elementary.elm_index_horizontal_get(RealHandle);
}
set
{
- Interop.Elementary.elm_index_horizontal_set(Handle, value);
+ Interop.Elementary.elm_index_horizontal_set(RealHandle, value);
}
}
@@ -60,11 +60,11 @@ namespace ElmSharp
{
get
{
- return !Interop.Elementary.elm_index_indicator_disabled_get(Handle);
+ return !Interop.Elementary.elm_index_indicator_disabled_get(RealHandle);
}
set
{
- Interop.Elementary.elm_index_indicator_disabled_set(Handle, !value);
+ Interop.Elementary.elm_index_indicator_disabled_set(RealHandle, !value);
}
}
@@ -72,11 +72,11 @@ namespace ElmSharp
{
get
{
- return Interop.Elementary.elm_index_omit_enabled_get(Handle);
+ return Interop.Elementary.elm_index_omit_enabled_get(RealHandle);
}
set
{
- Interop.Elementary.elm_index_omit_enabled_set(Handle, value);
+ Interop.Elementary.elm_index_omit_enabled_set(RealHandle, value);
}
}
@@ -84,7 +84,7 @@ namespace ElmSharp
{
get
{
- IntPtr handle = Interop.Elementary.elm_index_selected_item_get(Handle, 0);
+ IntPtr handle = Interop.Elementary.elm_index_selected_item_get(RealHandle, 0);
return ItemObject.GetItemByHandle(handle) as IndexItem;
}
}
@@ -92,32 +92,38 @@ namespace ElmSharp
public IndexItem Append(string label)
{
IndexItem item = new IndexItem(label);
- item.Handle = Interop.Elementary.elm_index_item_append(Handle, label, null, (IntPtr)item.Id);
+ item.Handle = Interop.Elementary.elm_index_item_append(RealHandle, label, null, (IntPtr)item.Id);
return item;
}
public IndexItem Prepend(string label)
{
IndexItem item = new IndexItem(label);
- item.Handle = Interop.Elementary.elm_index_item_prepend(Handle, label, null, (IntPtr)item.Id);
+ item.Handle = Interop.Elementary.elm_index_item_prepend(RealHandle, label, null, (IntPtr)item.Id);
return item;
}
public IndexItem InsertBefore(string label, IndexItem before)
{
IndexItem item = new IndexItem(label);
- item.Handle = Interop.Elementary.elm_index_item_insert_before(Handle, before, label, null, (IntPtr)item.Id);
+ item.Handle = Interop.Elementary.elm_index_item_insert_before(RealHandle, before, label, null, (IntPtr)item.Id);
return item;
}
public void Update(int level)
{
- Interop.Elementary.elm_index_level_go(Handle, level);
+ Interop.Elementary.elm_index_level_go(RealHandle, level);
}
protected override IntPtr CreateHandle(EvasObject parent)
{
- return Interop.Elementary.elm_index_add(parent);
+ IntPtr handle = Interop.Elementary.elm_layout_add(parent.Handle);
+ Interop.Elementary.elm_layout_theme_set(handle, "layout", "elm_widget", "default");
+
+ RealHandle = Interop.Elementary.elm_index_add(handle);
+ Interop.Elementary.elm_object_part_content_set(handle, "elm.swallow.content", RealHandle);
+
+ return handle;
}
void _delayedChanged_On(object sender, EventArgs e)
diff --git a/ElmSharp/ElmSharp/Label.cs b/ElmSharp/ElmSharp/Label.cs
index e05eb24..1bcb5b3 100644..100755
--- a/ElmSharp/ElmSharp/Label.cs
+++ b/ElmSharp/ElmSharp/Label.cs
@@ -24,7 +24,7 @@ namespace ElmSharp
public Label(EvasObject parent) : base(parent)
{
- _slideCompleted = new SmartEvent(this, "slide,end");
+ _slideCompleted = new SmartEvent(this, this.RealHandle, "slide,end");
_slideCompleted.On += (s, e) =>
{
SlideCompleted?.Invoke(this, EventArgs.Empty);
@@ -37,11 +37,11 @@ namespace ElmSharp
{
get
{
- return Interop.Elementary.elm_label_wrap_width_get(Handle);
+ return Interop.Elementary.elm_label_wrap_width_get(RealHandle);
}
set
{
- Interop.Elementary.elm_label_wrap_width_set(Handle, value);
+ Interop.Elementary.elm_label_wrap_width_set(RealHandle, value);
}
}
@@ -49,11 +49,11 @@ namespace ElmSharp
{
get
{
- return (WrapType)Interop.Elementary.elm_label_line_wrap_get(Handle);
+ return (WrapType)Interop.Elementary.elm_label_line_wrap_get(RealHandle);
}
set
{
- Interop.Elementary.elm_label_line_wrap_set(Handle, (int)value);
+ Interop.Elementary.elm_label_line_wrap_set(RealHandle, (int)value);
}
}
@@ -61,11 +61,11 @@ namespace ElmSharp
{
get
{
- return (LabelSlideMode)Interop.Elementary.elm_label_slide_mode_get(Handle);
+ return (LabelSlideMode)Interop.Elementary.elm_label_slide_mode_get(RealHandle);
}
set
{
- Interop.Elementary.elm_label_slide_mode_set(Handle, (int)value);
+ Interop.Elementary.elm_label_slide_mode_set(RealHandle, (int)value);
}
}
@@ -73,11 +73,11 @@ namespace ElmSharp
{
get
{
- return Interop.Elementary.elm_label_slide_duration_get(Handle);
+ return Interop.Elementary.elm_label_slide_duration_get(RealHandle);
}
set
{
- Interop.Elementary.elm_label_slide_duration_set(Handle, value);
+ Interop.Elementary.elm_label_slide_duration_set(RealHandle, value);
}
}
@@ -85,22 +85,28 @@ namespace ElmSharp
{
get
{
- return Interop.Elementary.elm_label_ellipsis_get(Handle);
+ return Interop.Elementary.elm_label_ellipsis_get(RealHandle);
}
set
{
- Interop.Elementary.elm_label_ellipsis_set(Handle, value);
+ Interop.Elementary.elm_label_ellipsis_set(RealHandle, value);
}
}
public void PlaySlide()
{
- Interop.Elementary.elm_label_slide_go(Handle);
+ Interop.Elementary.elm_label_slide_go(RealHandle);
}
protected override IntPtr CreateHandle(EvasObject parent)
{
- return Interop.Elementary.elm_label_add(parent.Handle);
+ IntPtr handle = Interop.Elementary.elm_layout_add(parent.Handle);
+ Interop.Elementary.elm_layout_theme_set(handle, "layout", "elm_widget", "default");
+
+ RealHandle = Interop.Elementary.elm_label_add(handle);
+ Interop.Elementary.elm_object_part_content_set(handle, "elm.swallow.content", RealHandle);
+
+ return handle;
}
}
diff --git a/ElmSharp/ElmSharp/Layout.cs b/ElmSharp/ElmSharp/Layout.cs
index 4ae1fa6..4717adb 100644
--- a/ElmSharp/ElmSharp/Layout.cs
+++ b/ElmSharp/ElmSharp/Layout.cs
@@ -27,12 +27,12 @@ namespace ElmSharp
public Layout(EvasObject parent) : base(parent)
{
- _languageChanged = new SmartEvent(this, "language,changed");
+ _languageChanged = new SmartEvent(this, this.RealHandle, "language,changed");
_languageChanged.On += (s, e) => {
LanguageChanged?.Invoke(this, EventArgs.Empty);
};
- _themeChanged = new SmartEvent(this, "theme,changed");
+ _themeChanged = new SmartEvent(this, this.RealHandle, "theme,changed");
_themeChanged.On += (s, e) =>
{
ThemeChanged?.Invoke(this, EventArgs.Empty);
@@ -48,19 +48,19 @@ namespace ElmSharp
get
{
if (_edjeHandle == IntPtr.Zero)
- _edjeHandle = Interop.Elementary.elm_layout_edje_get(Handle);
+ _edjeHandle = Interop.Elementary.elm_layout_edje_get(RealHandle);
return new EdjeObject(_edjeHandle);
}
}
public void SetTheme(string klass, string group, string style)
{
- Interop.Elementary.elm_layout_theme_set(Handle, klass, group, style);
+ Interop.Elementary.elm_layout_theme_set(RealHandle, klass, group, style);
}
public void SetFile(string file, string group)
{
- Interop.Elementary.elm_layout_file_set(Handle, file, group);
+ Interop.Elementary.elm_layout_file_set(RealHandle, file, group);
}
public override Color BackgroundColor
diff --git a/ElmSharp/ElmSharp/List.cs b/ElmSharp/ElmSharp/List.cs
index b79d589..3201cca 100644..100755
--- a/ElmSharp/ElmSharp/List.cs
+++ b/ElmSharp/ElmSharp/List.cs
@@ -48,11 +48,11 @@ namespace ElmSharp
public List(EvasObject parent) : base(parent)
{
- _selected = new SmartEvent<ListItemEventArgs>(this, "selected", ListItemEventArgs.CreateFromSmartEvent);
- _unselected = new SmartEvent<ListItemEventArgs>(this, "unselected", ListItemEventArgs.CreateFromSmartEvent);
- _doubleClicked = new SmartEvent<ListItemEventArgs>(this, "clicked,double", ListItemEventArgs.CreateFromSmartEvent);
- _longpressed = new SmartEvent<ListItemEventArgs>(this, "longpressed", ListItemEventArgs.CreateFromSmartEvent);
- _activated = new SmartEvent<ListItemEventArgs>(this, "activated", ListItemEventArgs.CreateFromSmartEvent);
+ _selected = new SmartEvent<ListItemEventArgs>(this, this.RealHandle, "selected", ListItemEventArgs.CreateFromSmartEvent);
+ _unselected = new SmartEvent<ListItemEventArgs>(this, this.RealHandle, "unselected", ListItemEventArgs.CreateFromSmartEvent);
+ _doubleClicked = new SmartEvent<ListItemEventArgs>(this, this.RealHandle, "clicked,double", ListItemEventArgs.CreateFromSmartEvent);
+ _longpressed = new SmartEvent<ListItemEventArgs>(this, this.RealHandle, "longpressed", ListItemEventArgs.CreateFromSmartEvent);
+ _activated = new SmartEvent<ListItemEventArgs>(this, this.RealHandle, "activated", ListItemEventArgs.CreateFromSmartEvent);
_selected.On += (s, e) => { ItemSelected?.Invoke(this, e); };
_unselected.On += (s, e) => { ItemUnselected?.Invoke(this, e); };
_doubleClicked.On += (s, e) => { ItemDoubleClicked?.Invoke(this, e); };
@@ -64,11 +64,11 @@ namespace ElmSharp
{
get
{
- return (ListMode)Interop.Elementary.elm_list_mode_get(Handle);
+ return (ListMode)Interop.Elementary.elm_list_mode_get(RealHandle);
}
set
{
- Interop.Elementary.elm_list_mode_set(Handle, (Interop.Elementary.Elm_List_Mode)value);
+ Interop.Elementary.elm_list_mode_set(RealHandle, (Interop.Elementary.Elm_List_Mode)value);
}
}
@@ -76,7 +76,7 @@ namespace ElmSharp
{
get
{
- IntPtr item = Interop.Elementary.elm_list_selected_item_get(Handle);
+ IntPtr item = Interop.Elementary.elm_list_selected_item_get(RealHandle);
return ItemObject.GetItemByHandle(item) as ListItem;
}
}
@@ -89,7 +89,7 @@ namespace ElmSharp
public void Update()
{
- Interop.Elementary.elm_list_go(Handle);
+ Interop.Elementary.elm_list_go(RealHandle);
}
public ListItem Append(string label)
@@ -100,7 +100,7 @@ namespace ElmSharp
public ListItem Append(string label, EvasObject leftIcon, EvasObject rightIcon)
{
ListItem item = new ListItem(label, leftIcon, rightIcon);
- item.Handle = Interop.Elementary.elm_list_item_append(Handle, label, leftIcon, rightIcon, null, (IntPtr)item.Id);
+ item.Handle = Interop.Elementary.elm_list_item_append(RealHandle, label, leftIcon, rightIcon, null, (IntPtr)item.Id);
AddInternal(item);
return item;
}
@@ -113,14 +113,14 @@ namespace ElmSharp
public ListItem Prepend(string label, EvasObject leftIcon, EvasObject rigthIcon)
{
ListItem item = new ListItem(label, leftIcon, rigthIcon);
- item.Handle = Interop.Elementary.elm_list_item_prepend(Handle, label, leftIcon, rigthIcon, null, (IntPtr)item.Id);
+ item.Handle = Interop.Elementary.elm_list_item_prepend(RealHandle, label, leftIcon, rigthIcon, null, (IntPtr)item.Id);
AddInternal(item);
return item;
}
public void Clear()
{
- Interop.Elementary.elm_list_clear(Handle);
+ Interop.Elementary.elm_list_clear(RealHandle);
foreach (var item in _children)
{
item.Deleted -= Item_Deleted;
@@ -130,7 +130,13 @@ namespace ElmSharp
protected override IntPtr CreateHandle(EvasObject parent)
{
- return Interop.Elementary.elm_list_add(parent);
+ IntPtr handle = Interop.Elementary.elm_layout_add(parent.Handle);
+ Interop.Elementary.elm_layout_theme_set(handle, "layout", "elm_widget", "default");
+
+ RealHandle = Interop.Elementary.elm_list_add(handle);
+ Interop.Elementary.elm_object_part_content_set(handle, "elm.swallow.content", RealHandle);
+
+ return handle;
}
void AddInternal(ListItem item)
diff --git a/ElmSharp/ElmSharp/Naviframe.cs b/ElmSharp/ElmSharp/Naviframe.cs
index 0ff43b7..8944eff 100644..100755
--- a/ElmSharp/ElmSharp/Naviframe.cs
+++ b/ElmSharp/ElmSharp/Naviframe.cs
@@ -29,7 +29,7 @@ namespace ElmSharp
readonly List<NaviItem> _itemStack = new List<NaviItem>();
public Naviframe(EvasObject parent) : base(parent)
{
- _transitionFinished = new SmartEvent(this, "transition,finished");
+ _transitionFinished = new SmartEvent(this, this.RealHandle, "transition,finished");
_transitionFinished.On += (s, e) => AnimationFinished?.Invoke(this, EventArgs.Empty);
}
@@ -53,11 +53,11 @@ namespace ElmSharp
{
get
{
- return Interop.Elementary.elm_naviframe_content_preserve_on_pop_get(Handle);
+ return Interop.Elementary.elm_naviframe_content_preserve_on_pop_get(RealHandle);
}
set
{
- Interop.Elementary.elm_naviframe_content_preserve_on_pop_set(Handle, value);
+ Interop.Elementary.elm_naviframe_content_preserve_on_pop_set(RealHandle, value);
}
}
@@ -65,11 +65,11 @@ namespace ElmSharp
{
get
{
- return Interop.Elementary.elm_naviframe_prev_btn_auto_pushed_get(Handle);
+ return Interop.Elementary.elm_naviframe_prev_btn_auto_pushed_get(RealHandle);
}
set
{
- Interop.Elementary.elm_naviframe_prev_btn_auto_pushed_set(Handle, value);
+ Interop.Elementary.elm_naviframe_prev_btn_auto_pushed_set(RealHandle, value);
}
}
@@ -85,7 +85,7 @@ namespace ElmSharp
public NaviItem Push(EvasObject content, string title, string style)
{
- IntPtr item = Interop.Elementary.elm_naviframe_item_push(Handle, title, IntPtr.Zero, IntPtr.Zero, content.Handle, style);
+ IntPtr item = Interop.Elementary.elm_naviframe_item_push(RealHandle, title, IntPtr.Zero, IntPtr.Zero, content.Handle, null);
NaviItem naviItem = NaviItem.FromNativeHandle(item, content);
_itemStack.Add(naviItem);
naviItem.Popped += ItemPoppedHandler;
@@ -104,7 +104,7 @@ namespace ElmSharp
public NaviItem InsertBefore(NaviItem before, EvasObject content, string title, string style)
{
- IntPtr item = Interop.Elementary.elm_naviframe_item_insert_before(Handle, before, title, IntPtr.Zero, IntPtr.Zero, content, style);
+ IntPtr item = Interop.Elementary.elm_naviframe_item_insert_before(RealHandle, before, title, IntPtr.Zero, IntPtr.Zero, content, null);
NaviItem naviItem = NaviItem.FromNativeHandle(item, content);
int idx = _itemStack.IndexOf(before);
_itemStack.Insert(idx, naviItem);
@@ -124,7 +124,7 @@ namespace ElmSharp
public NaviItem InsertAfter(NaviItem after, EvasObject content, string title, string style)
{
- IntPtr item = Interop.Elementary.elm_naviframe_item_insert_after(Handle, after, title, IntPtr.Zero, IntPtr.Zero, content, style);
+ IntPtr item = Interop.Elementary.elm_naviframe_item_insert_after(RealHandle, after, title, IntPtr.Zero, IntPtr.Zero, content, null);
NaviItem naviItem = NaviItem.FromNativeHandle(item, content);
int idx = _itemStack.IndexOf(after);
_itemStack.Insert(idx + 1, naviItem);
@@ -134,12 +134,18 @@ namespace ElmSharp
public void Pop()
{
- Interop.Elementary.elm_naviframe_item_pop(Handle);
+ Interop.Elementary.elm_naviframe_item_pop(RealHandle);
}
-
+
protected override IntPtr CreateHandle(EvasObject parent)
{
- return Interop.Elementary.elm_naviframe_add(parent.Handle);
+ IntPtr handle = Interop.Elementary.elm_layout_add(parent);
+ Interop.Elementary.elm_layout_theme_set(handle, "layout", "elm_widget", "default");
+
+ RealHandle = Interop.Elementary.elm_naviframe_add(handle);
+ Interop.Elementary.elm_object_part_content_set(handle, "elm.swallow.content", RealHandle);
+
+ return handle;
}
void ItemPoppedHandler(object sender, EventArgs e)
diff --git a/ElmSharp/ElmSharp/Panel.cs b/ElmSharp/ElmSharp/Panel.cs
index 20fd61f..9174250 100644..100755
--- a/ElmSharp/ElmSharp/Panel.cs
+++ b/ElmSharp/ElmSharp/Panel.cs
@@ -43,7 +43,7 @@ namespace ElmSharp
SmartEvent _toggled;
public Panel(EvasObject parent) : base(parent)
{
- _toggled = new SmartEvent(this, "toggled");
+ _toggled = new SmartEvent(this, this.RealHandle, "toggled");
_toggled.On += (s, e) => Toggled?.Invoke(this, EventArgs.Empty);
}
@@ -51,11 +51,11 @@ namespace ElmSharp
{
get
{
- return !Interop.Elementary.elm_panel_hidden_get(Handle);
+ return !Interop.Elementary.elm_panel_hidden_get(RealHandle);
}
set
{
- Interop.Elementary.elm_panel_hidden_set(Handle, !value);
+ Interop.Elementary.elm_panel_hidden_set(RealHandle, !value);
}
}
@@ -63,11 +63,11 @@ namespace ElmSharp
{
get
{
- return (PanelDirection)Interop.Elementary.elm_panel_orient_get(Handle);
+ return (PanelDirection)Interop.Elementary.elm_panel_orient_get(RealHandle);
}
set
{
- Interop.Elementary.elm_panel_orient_set(Handle, (int)value);
+ Interop.Elementary.elm_panel_orient_set(RealHandle, (int)value);
}
}
@@ -75,22 +75,28 @@ namespace ElmSharp
public void SetScrollable(bool enable)
{
- Interop.Elementary.elm_panel_scrollable_set(Handle, enable);
+ Interop.Elementary.elm_panel_scrollable_set(RealHandle, enable);
}
public void SetScrollableArea(double ratio)
{
- Interop.Elementary.elm_panel_scrollable_content_size_set(Handle, ratio);
+ Interop.Elementary.elm_panel_scrollable_content_size_set(RealHandle, ratio);
}
public void Toggle()
{
- Interop.Elementary.elm_panel_toggle(Handle);
+ Interop.Elementary.elm_panel_toggle(RealHandle);
}
-
+
protected override IntPtr CreateHandle(EvasObject parent)
{
- return Interop.Elementary.elm_panel_add(parent);
+ IntPtr handle = Interop.Elementary.elm_layout_add(parent);
+ Interop.Elementary.elm_layout_theme_set(handle, "layout", "elm_widget", "default");
+
+ RealHandle = Interop.Elementary.elm_panel_add(handle);
+ Interop.Elementary.elm_object_part_content_set(handle, "elm.swallow.content", RealHandle);
+
+ return handle;
}
}
}
diff --git a/ElmSharp/ElmSharp/Panes.cs b/ElmSharp/ElmSharp/Panes.cs
index 6a80beb..3a223ae 100644..100755
--- a/ElmSharp/ElmSharp/Panes.cs
+++ b/ElmSharp/ElmSharp/Panes.cs
@@ -24,8 +24,8 @@ namespace ElmSharp
SmartEvent _unpressed;
public Panes(EvasObject parent) : base(parent)
{
- _press = new SmartEvent(this, "press");
- _unpressed = new SmartEvent(this, "unpressed");
+ _press = new SmartEvent(this, this.RealHandle, "press");
+ _unpressed = new SmartEvent(this, this.RealHandle, "unpressed");
_press.On += (s, e) => Pressed?.Invoke(this, e);
_unpressed.On += (s, e) => Unpressed?.Invoke(this, e);
@@ -37,11 +37,11 @@ namespace ElmSharp
{
get
{
- return Interop.Elementary.elm_panes_fixed_get(Handle);
+ return Interop.Elementary.elm_panes_fixed_get(RealHandle);
}
set
{
- Interop.Elementary.elm_panes_fixed_set(Handle, value);
+ Interop.Elementary.elm_panes_fixed_set(RealHandle, value);
}
}
@@ -49,11 +49,11 @@ namespace ElmSharp
{
get
{
- return Interop.Elementary.elm_panes_content_left_size_get(Handle);
+ return Interop.Elementary.elm_panes_content_left_size_get(RealHandle);
}
set
{
- Interop.Elementary.elm_panes_content_left_size_set(Handle, value);
+ Interop.Elementary.elm_panes_content_left_size_set(RealHandle, value);
}
}
@@ -61,17 +61,23 @@ namespace ElmSharp
{
get
{
- return Interop.Elementary.elm_panes_horizontal_get(Handle);
+ return Interop.Elementary.elm_panes_horizontal_get(RealHandle);
}
set
{
- Interop.Elementary.elm_panes_horizontal_set(Handle, value);
+ Interop.Elementary.elm_panes_horizontal_set(RealHandle, value);
}
}
protected override IntPtr CreateHandle(EvasObject parent)
{
- return Interop.Elementary.elm_panes_add(parent);
+ IntPtr handle = Interop.Elementary.elm_layout_add(parent.Handle);
+ Interop.Elementary.elm_layout_theme_set(handle, "layout", "elm_widget", "default");
+
+ RealHandle = Interop.Elementary.elm_panes_add(handle);
+ Interop.Elementary.elm_object_part_content_set(handle, "elm.swallow.content", RealHandle);
+
+ return handle;
}
}
}
diff --git a/ElmSharp/ElmSharp/Popup.cs b/ElmSharp/ElmSharp/Popup.cs
index f9c9305..6de02bc 100644..100755
--- a/ElmSharp/ElmSharp/Popup.cs
+++ b/ElmSharp/ElmSharp/Popup.cs
@@ -136,6 +136,19 @@ namespace ElmSharp
}
}
+ public override int Opacity
+ {
+ get
+ {
+ return Color.Default.A;
+ }
+
+ set
+ {
+ Console.WriteLine("Popup instance doesn't support to set Opacity.");
+ }
+ }
+
public PopupItem Append(string label)
{
return Append(label, null);
diff --git a/ElmSharp/ElmSharp/ProgressBar.cs b/ElmSharp/ElmSharp/ProgressBar.cs
index f72c6ef..1e65072 100644..100755
--- a/ElmSharp/ElmSharp/ProgressBar.cs
+++ b/ElmSharp/ElmSharp/ProgressBar.cs
@@ -24,7 +24,7 @@ namespace ElmSharp
public ProgressBar(EvasObject parent) : base(parent)
{
- _changed = new SmartEvent(this, "changed");
+ _changed = new SmartEvent(this, this.RealHandle, "changed");
_changed.On += (s, e) =>
{
ValueChanged?.Invoke(this, EventArgs.Empty);
@@ -37,11 +37,11 @@ namespace ElmSharp
{
get
{
- return Interop.Elementary.elm_progressbar_pulse_get(Handle);
+ return Interop.Elementary.elm_progressbar_pulse_get(RealHandle);
}
set
{
- Interop.Elementary.elm_progressbar_pulse_set(Handle, value);
+ Interop.Elementary.elm_progressbar_pulse_set(RealHandle, value);
}
}
@@ -49,11 +49,11 @@ namespace ElmSharp
{
get
{
- return Interop.Elementary.elm_progressbar_value_get(Handle);
+ return Interop.Elementary.elm_progressbar_value_get(RealHandle);
}
set
{
- Interop.Elementary.elm_progressbar_value_set(Handle, value);
+ Interop.Elementary.elm_progressbar_value_set(RealHandle, value);
}
}
@@ -61,11 +61,11 @@ namespace ElmSharp
{
get
{
- return Interop.Elementary.elm_progressbar_span_size_get(Handle);
+ return Interop.Elementary.elm_progressbar_span_size_get(RealHandle);
}
set
{
- Interop.Elementary.elm_progressbar_span_size_set(Handle, value);
+ Interop.Elementary.elm_progressbar_span_size_set(RealHandle, value);
}
}
@@ -73,11 +73,11 @@ namespace ElmSharp
{
get
{
- return Interop.Elementary.elm_progressbar_horizontal_get(Handle);
+ return Interop.Elementary.elm_progressbar_horizontal_get(RealHandle);
}
set
{
- Interop.Elementary.elm_progressbar_horizontal_set(Handle, value);
+ Interop.Elementary.elm_progressbar_horizontal_set(RealHandle, value);
}
}
@@ -85,11 +85,11 @@ namespace ElmSharp
{
get
{
- return Interop.Elementary.elm_progressbar_inverted_get(Handle);
+ return Interop.Elementary.elm_progressbar_inverted_get(RealHandle);
}
set
{
- Interop.Elementary.elm_progressbar_inverted_set(Handle, value);
+ Interop.Elementary.elm_progressbar_inverted_set(RealHandle, value);
}
}
@@ -97,33 +97,39 @@ namespace ElmSharp
{
get
{
- return Interop.Elementary.elm_progressbar_unit_format_get(Handle);
+ return Interop.Elementary.elm_progressbar_unit_format_get(RealHandle);
}
set
{
- Interop.Elementary.elm_progressbar_unit_format_set(Handle, value);
+ Interop.Elementary.elm_progressbar_unit_format_set(RealHandle, value);
}
}
public void PlayPulse()
{
- Interop.Elementary.elm_progressbar_pulse(Handle, true);
+ Interop.Elementary.elm_progressbar_pulse(RealHandle, true);
}
[Obsolete("use StopPulse instead")]
public void StopPluse()
{
- Interop.Elementary.elm_progressbar_pulse(Handle, false);
+ Interop.Elementary.elm_progressbar_pulse(RealHandle, false);
}
public void StopPulse()
{
- Interop.Elementary.elm_progressbar_pulse(Handle, false);
+ Interop.Elementary.elm_progressbar_pulse(RealHandle, false);
}
protected override IntPtr CreateHandle(EvasObject parent)
{
- return Interop.Elementary.elm_progressbar_add(parent);
+ IntPtr handle = Interop.Elementary.elm_layout_add(parent.Handle);
+ Interop.Elementary.elm_layout_theme_set(handle, "layout", "elm_widget", "default");
+
+ RealHandle = Interop.Elementary.elm_progressbar_add(handle);
+ Interop.Elementary.elm_object_part_content_set(handle, "elm.swallow.content", RealHandle);
+
+ return handle;
}
}
}
diff --git a/ElmSharp/ElmSharp/Radio.cs b/ElmSharp/ElmSharp/Radio.cs
index 20c9100..dec0c58 100644..100755
--- a/ElmSharp/ElmSharp/Radio.cs
+++ b/ElmSharp/ElmSharp/Radio.cs
@@ -24,7 +24,7 @@ namespace ElmSharp
public Radio(EvasObject parent) : base(parent)
{
- _changed = new SmartEvent(this, "changed");
+ _changed = new SmartEvent(this, this.RealHandle, "changed");
_changed.On += (s, e) => ValueChanged?.Invoke(this, EventArgs.Empty);
}
@@ -34,11 +34,11 @@ namespace ElmSharp
{
get
{
- return Interop.Elementary.elm_radio_state_value_get(Handle);
+ return Interop.Elementary.elm_radio_state_value_get(RealHandle);
}
set
{
- Interop.Elementary.elm_radio_state_value_set(Handle, value);
+ Interop.Elementary.elm_radio_state_value_set(RealHandle, value);
}
}
@@ -46,11 +46,11 @@ namespace ElmSharp
{
get
{
- return Interop.Elementary.elm_radio_value_get(Handle);
+ return Interop.Elementary.elm_radio_value_get(RealHandle);
}
set
{
- Interop.Elementary.elm_radio_value_set(Handle, value);
+ Interop.Elementary.elm_radio_value_set(RealHandle, value);
}
}
@@ -60,12 +60,18 @@ namespace ElmSharp
{
throw new ArgumentNullException("group");
}
- Interop.Elementary.elm_radio_group_add(Handle, group.Handle);
+ Interop.Elementary.elm_radio_group_add(RealHandle, group.RealHandle);
}
protected override IntPtr CreateHandle(EvasObject parent)
{
- return Interop.Elementary.elm_radio_add(parent);
+ IntPtr handle = Interop.Elementary.elm_layout_add(parent.Handle);
+ Interop.Elementary.elm_layout_theme_set(handle, "layout", "elm_widget", "default");
+
+ RealHandle = Interop.Elementary.elm_radio_add(handle);
+ Interop.Elementary.elm_object_part_content_set(handle, "elm.swallow.content", RealHandle);
+
+ return handle;
}
}
}
diff --git a/ElmSharp/ElmSharp/Scroller.cs b/ElmSharp/ElmSharp/Scroller.cs
index f7404f8..41f3685 100644..100755
--- a/ElmSharp/ElmSharp/Scroller.cs
+++ b/ElmSharp/ElmSharp/Scroller.cs
@@ -41,10 +41,10 @@ namespace ElmSharp
public Scroller(EvasObject parent) : base(parent)
{
- _scroll = new SmartEvent(this, "scroll");
- _dragStart = new SmartEvent(this, "scroll,drag,start");
- _dragStop = new SmartEvent(this, "scroll,drag,stop");
- _scrollpage = new SmartEvent(this, "scroll,page,changed");
+ _scroll = new SmartEvent(this, this.RealHandle, "scroll");
+ _dragStart = new SmartEvent(this, this.RealHandle, "scroll,drag,start");
+ _dragStop = new SmartEvent(this, this.RealHandle, "scroll,drag,stop");
+ _scrollpage = new SmartEvent(this, this.RealHandle, "scroll,page,changed");
}
public event EventHandler Scrolled
@@ -97,7 +97,7 @@ namespace ElmSharp
get
{
int x, y, w, h;
- Interop.Elementary.elm_scroller_region_get(Handle, out x, out y, out w, out h);
+ Interop.Elementary.elm_scroller_region_get(RealHandle, out x, out y, out w, out h);
return new Rect(x, y, w, h);
}
}
@@ -107,13 +107,13 @@ namespace ElmSharp
get
{
int policy;
- Interop.Elementary.elm_scroller_policy_get(Handle, out policy, IntPtr.Zero);
+ Interop.Elementary.elm_scroller_policy_get(RealHandle, out policy, IntPtr.Zero);
return (ScrollBarVisiblePolicy)policy;
}
set
{
ScrollBarVisiblePolicy v = VerticalScrollBarVisiblePolicy;
- Interop.Elementary.elm_scroller_policy_set(Handle, (int)value, (int)v);
+ Interop.Elementary.elm_scroller_policy_set(RealHandle, (int)value, (int)v);
}
}
@@ -122,13 +122,13 @@ namespace ElmSharp
get
{
int policy;
- Interop.Elementary.elm_scroller_policy_get(Handle, IntPtr.Zero, out policy);
+ Interop.Elementary.elm_scroller_policy_get(RealHandle, IntPtr.Zero, out policy);
return (ScrollBarVisiblePolicy)policy;
}
set
{
ScrollBarVisiblePolicy h = HorizontalScrollBarVisiblePolicy;
- Interop.Elementary.elm_scroller_policy_set(Handle, (int)h, (int)value);
+ Interop.Elementary.elm_scroller_policy_set(RealHandle, (int)h, (int)value);
}
}
@@ -136,11 +136,11 @@ namespace ElmSharp
{
get
{
- return (ScrollBlock)Interop.Elementary.elm_scroller_movement_block_get(Handle);
+ return (ScrollBlock)Interop.Elementary.elm_scroller_movement_block_get(RealHandle);
}
set
{
- Interop.Elementary.elm_scroller_movement_block_set(Handle, (int)value);
+ Interop.Elementary.elm_scroller_movement_block_set(RealHandle, (int)value);
}
}
@@ -149,7 +149,7 @@ namespace ElmSharp
get
{
int v, h;
- Interop.Elementary.elm_scroller_current_page_get(Handle, out h, out v);
+ Interop.Elementary.elm_scroller_current_page_get(RealHandle, out h, out v);
return v;
}
}
@@ -159,7 +159,7 @@ namespace ElmSharp
get
{
int v, h;
- Interop.Elementary.elm_scroller_current_page_get(Handle, out h, out v);
+ Interop.Elementary.elm_scroller_current_page_get(RealHandle, out h, out v);
return h;
}
}
@@ -169,13 +169,13 @@ namespace ElmSharp
get
{
int v, h;
- Interop.Elementary.elm_scroller_page_scroll_limit_get(Handle, out h, out v);
+ Interop.Elementary.elm_scroller_page_scroll_limit_get(RealHandle, out h, out v);
return v;
}
set
{
int h = HorizontalPageScrollLimit;
- Interop.Elementary.elm_scroller_page_scroll_limit_set(Handle, h, value);
+ Interop.Elementary.elm_scroller_page_scroll_limit_set(RealHandle, h, value);
}
}
@@ -184,35 +184,35 @@ namespace ElmSharp
get
{
int v, h;
- Interop.Elementary.elm_scroller_page_scroll_limit_get(Handle, out h, out v);
+ Interop.Elementary.elm_scroller_page_scroll_limit_get(RealHandle, out h, out v);
return h;
}
set
{
int v = VerticalPageScrollLimit;
- Interop.Elementary.elm_scroller_page_scroll_limit_set(Handle, value, v);
+ Interop.Elementary.elm_scroller_page_scroll_limit_set(RealHandle, value, v);
}
}
public void SetPageSize(int width, int height)
{
- Interop.Elementary.elm_scroller_page_size_set(Handle, width, height);
+ Interop.Elementary.elm_scroller_page_size_set(RealHandle, width, height);
}
public void SetPageSize(double width, double height)
{
- Interop.Elementary.elm_scroller_page_relative_set(Handle, width, height);
+ Interop.Elementary.elm_scroller_page_relative_set(RealHandle, width, height);
}
public void ScrollTo(int horizontalPageIndex, int verticalPageIndex, bool animated)
{
if (animated)
{
- Interop.Elementary.elm_scroller_page_bring_in(Handle, horizontalPageIndex, verticalPageIndex);
+ Interop.Elementary.elm_scroller_page_bring_in(RealHandle, horizontalPageIndex, verticalPageIndex);
}
else
{
- Interop.Elementary.elm_scroller_page_show(Handle, horizontalPageIndex, verticalPageIndex);
+ Interop.Elementary.elm_scroller_page_show(RealHandle, horizontalPageIndex, verticalPageIndex);
}
}
@@ -220,17 +220,23 @@ namespace ElmSharp
{
if (animated)
{
- Interop.Elementary.elm_scroller_region_bring_in(Handle, region.X, region.Y, region.Width, region.Height);
+ Interop.Elementary.elm_scroller_region_bring_in(RealHandle, region.X, region.Y, region.Width, region.Height);
}
else
{
- Interop.Elementary.elm_scroller_region_show(Handle, region.X, region.Y, region.Width, region.Height);
+ Interop.Elementary.elm_scroller_region_show(RealHandle, region.X, region.Y, region.Width, region.Height);
}
}
protected override IntPtr CreateHandle(EvasObject parent)
{
- return Interop.Elementary.elm_scroller_add(parent);
+ IntPtr handle = Interop.Elementary.elm_layout_add(parent.Handle);
+ Interop.Elementary.elm_layout_theme_set(handle, "layout", "elm_widget", "default");
+
+ RealHandle = Interop.Elementary.elm_scroller_add(handle);
+ Interop.Elementary.elm_object_part_content_set(handle, "elm.swallow.content", RealHandle);
+
+ return handle;
}
}
}
diff --git a/ElmSharp/ElmSharp/Slider.cs b/ElmSharp/ElmSharp/Slider.cs
index adf65b2..cd0b86a 100644..100755
--- a/ElmSharp/ElmSharp/Slider.cs
+++ b/ElmSharp/ElmSharp/Slider.cs
@@ -30,16 +30,16 @@ namespace ElmSharp
public Slider(EvasObject parent) : base(parent)
{
- _changed = new SmartEvent(this, "changed");
+ _changed = new SmartEvent(this, this.RealHandle, "changed");
_changed.On += (s, e) => ValueChanged?.Invoke(this, EventArgs.Empty);
- _delayedChanged = new SmartEvent(this, "delay,changed");
+ _delayedChanged = new SmartEvent(this, this.RealHandle, "delay,changed");
_delayedChanged.On += (s, e) => DelayedValueChanged?.Invoke(this, EventArgs.Empty);
- _dragStarted = new SmartEvent(this, "slider,drag,start");
+ _dragStarted = new SmartEvent(this, this.RealHandle, "slider,drag,start");
_dragStarted.On += (s, e) => DragStarted?.Invoke(this, EventArgs.Empty);
- _dragStopped = new SmartEvent(this, "slider,drag,stop");
+ _dragStopped = new SmartEvent(this, this.RealHandle, "slider,drag,stop");
_dragStopped.On += (s, e) => DragStopped?.Invoke(this, EventArgs.Empty);
}
@@ -55,11 +55,11 @@ namespace ElmSharp
{
get
{
- return Interop.Elementary.elm_slider_span_size_get(Handle);
+ return Interop.Elementary.elm_slider_span_size_get(RealHandle);
}
set
{
- Interop.Elementary.elm_slider_span_size_set(Handle, value);
+ Interop.Elementary.elm_slider_span_size_set(RealHandle, value);
}
}
@@ -67,11 +67,11 @@ namespace ElmSharp
{
get
{
- return Interop.Elementary.elm_slider_unit_format_get(Handle);
+ return Interop.Elementary.elm_slider_unit_format_get(RealHandle);
}
set
{
- Interop.Elementary.elm_slider_unit_format_set(Handle, value);
+ Interop.Elementary.elm_slider_unit_format_set(RealHandle, value);
}
}
@@ -79,11 +79,11 @@ namespace ElmSharp
{
get
{
- return Interop.Elementary.elm_slider_indicator_format_get(Handle);
+ return Interop.Elementary.elm_slider_indicator_format_get(RealHandle);
}
set
{
- Interop.Elementary.elm_slider_indicator_format_set(Handle, value);
+ Interop.Elementary.elm_slider_indicator_format_set(RealHandle, value);
}
}
@@ -91,11 +91,11 @@ namespace ElmSharp
{
get
{
- return Interop.Elementary.elm_slider_horizontal_get(Handle);
+ return Interop.Elementary.elm_slider_horizontal_get(RealHandle);
}
set
{
- Interop.Elementary.elm_slider_horizontal_set(Handle, value);
+ Interop.Elementary.elm_slider_horizontal_set(RealHandle, value);
}
}
@@ -108,7 +108,7 @@ namespace ElmSharp
set
{
_minimum = value;
- Interop.Elementary.elm_slider_min_max_set(Handle, _minimum, _maximum);
+ Interop.Elementary.elm_slider_min_max_set(RealHandle, _minimum, _maximum);
}
}
@@ -121,7 +121,7 @@ namespace ElmSharp
set
{
_maximum = value;
- Interop.Elementary.elm_slider_min_max_set(Handle, _minimum, _maximum);
+ Interop.Elementary.elm_slider_min_max_set(RealHandle, _minimum, _maximum);
}
}
@@ -129,11 +129,11 @@ namespace ElmSharp
{
get
{
- return Interop.Elementary.elm_slider_value_get(Handle);
+ return Interop.Elementary.elm_slider_value_get(RealHandle);
}
set
{
- Interop.Elementary.elm_slider_value_set(Handle, value);
+ Interop.Elementary.elm_slider_value_set(RealHandle, value);
}
}
@@ -141,11 +141,11 @@ namespace ElmSharp
{
get
{
- return Interop.Elementary.elm_slider_step_get(Handle);
+ return Interop.Elementary.elm_slider_step_get(RealHandle);
}
set
{
- Interop.Elementary.elm_slider_step_set(Handle, value);
+ Interop.Elementary.elm_slider_step_set(RealHandle, value);
}
}
@@ -153,11 +153,11 @@ namespace ElmSharp
{
get
{
- return Interop.Elementary.elm_slider_inverted_get(Handle);
+ return Interop.Elementary.elm_slider_inverted_get(RealHandle);
}
set
{
- Interop.Elementary.elm_slider_inverted_set(Handle, value);
+ Interop.Elementary.elm_slider_inverted_set(RealHandle, value);
}
}
@@ -165,17 +165,23 @@ namespace ElmSharp
{
get
{
- return Interop.Elementary.elm_slider_indicator_show_get(Handle);
+ return Interop.Elementary.elm_slider_indicator_show_get(RealHandle);
}
set
{
- Interop.Elementary.elm_slider_indicator_show_set(Handle, value);
+ Interop.Elementary.elm_slider_indicator_show_set(RealHandle, value);
}
}
protected override IntPtr CreateHandle(EvasObject parent)
{
- return Interop.Elementary.elm_slider_add(parent);
+ IntPtr handle = Interop.Elementary.elm_layout_add(parent.Handle);
+ Interop.Elementary.elm_layout_theme_set(handle, "layout", "elm_widget", "default");
+
+ RealHandle = Interop.Elementary.elm_slider_add(handle);
+ Interop.Elementary.elm_object_part_content_set(handle, "elm.swallow.content", RealHandle);
+
+ return handle;
}
}
}
diff --git a/ElmSharp/ElmSharp/Spinner.cs b/ElmSharp/ElmSharp/Spinner.cs
index e466e7a..cc852bf 100644..100755
--- a/ElmSharp/ElmSharp/Spinner.cs
+++ b/ElmSharp/ElmSharp/Spinner.cs
@@ -28,10 +28,10 @@ namespace ElmSharp
public Spinner(EvasObject parent) : base(parent)
{
- _changed = new SmartEvent(this, "changed");
+ _changed = new SmartEvent(this, this.RealHandle, "changed");
_changed.On += (s, e) => ValueChanged?.Invoke(this, EventArgs.Empty);
- _delayedChanged = new SmartEvent(this, "delay,changed");
+ _delayedChanged = new SmartEvent(this, this.RealHandle, "delay,changed");
_delayedChanged.On += (s, e) => DelayedValueChanged?.Invoke(this, EventArgs.Empty);
}
@@ -43,11 +43,11 @@ namespace ElmSharp
{
get
{
- return Interop.Elementary.elm_spinner_label_format_get(Handle);
+ return Interop.Elementary.elm_spinner_label_format_get(RealHandle);
}
set
{
- Interop.Elementary.elm_spinner_label_format_set(Handle, value);
+ Interop.Elementary.elm_spinner_label_format_set(RealHandle, value);
}
}
@@ -60,7 +60,7 @@ namespace ElmSharp
set
{
_minimum = value;
- Interop.Elementary.elm_spinner_min_max_set(Handle, _minimum, _maximum);
+ Interop.Elementary.elm_spinner_min_max_set(RealHandle, _minimum, _maximum);
}
}
@@ -73,7 +73,7 @@ namespace ElmSharp
set
{
_maximum = value;
- Interop.Elementary.elm_spinner_min_max_set(Handle, _minimum, _maximum);
+ Interop.Elementary.elm_spinner_min_max_set(RealHandle, _minimum, _maximum);
}
}
@@ -81,11 +81,11 @@ namespace ElmSharp
{
get
{
- return Interop.Elementary.elm_spinner_step_get(Handle);
+ return Interop.Elementary.elm_spinner_step_get(RealHandle);
}
set
{
- Interop.Elementary.elm_spinner_step_set(Handle, value);
+ Interop.Elementary.elm_spinner_step_set(RealHandle, value);
}
}
@@ -93,11 +93,11 @@ namespace ElmSharp
{
get
{
- return Interop.Elementary.elm_spinner_value_get(Handle);
+ return Interop.Elementary.elm_spinner_value_get(RealHandle);
}
set
{
- Interop.Elementary.elm_spinner_value_set(Handle, value);
+ Interop.Elementary.elm_spinner_value_set(RealHandle, value);
}
}
@@ -105,11 +105,11 @@ namespace ElmSharp
{
get
{
- return Interop.Elementary.elm_spinner_interval_get(Handle);
+ return Interop.Elementary.elm_spinner_interval_get(RealHandle);
}
set
{
- Interop.Elementary.elm_spinner_interval_set(Handle, value);
+ Interop.Elementary.elm_spinner_interval_set(RealHandle, value);
}
}
@@ -117,11 +117,11 @@ namespace ElmSharp
{
get
{
- return Interop.Elementary.elm_spinner_base_get(Handle);
+ return Interop.Elementary.elm_spinner_base_get(RealHandle);
}
set
{
- Interop.Elementary.elm_spinner_base_set(Handle, value);
+ Interop.Elementary.elm_spinner_base_set(RealHandle, value);
}
}
@@ -129,11 +129,11 @@ namespace ElmSharp
{
get
{
- return Interop.Elementary.elm_spinner_round_get(Handle);
+ return Interop.Elementary.elm_spinner_round_get(RealHandle);
}
set
{
- Interop.Elementary.elm_spinner_round_set(Handle, value);
+ Interop.Elementary.elm_spinner_round_set(RealHandle, value);
}
}
@@ -141,11 +141,11 @@ namespace ElmSharp
{
get
{
- return Interop.Elementary.elm_spinner_wrap_get(Handle);
+ return Interop.Elementary.elm_spinner_wrap_get(RealHandle);
}
set
{
- Interop.Elementary.elm_spinner_wrap_set(Handle, value);
+ Interop.Elementary.elm_spinner_wrap_set(RealHandle, value);
}
}
@@ -153,33 +153,39 @@ namespace ElmSharp
{
get
{
- return Interop.Elementary.elm_spinner_editable_get(Handle);
+ return Interop.Elementary.elm_spinner_editable_get(RealHandle);
}
set
{
- Interop.Elementary.elm_spinner_editable_set(Handle, value);
+ Interop.Elementary.elm_spinner_editable_set(RealHandle, value);
}
}
public void AddSpecialValue(double value, string label)
{
- Interop.Elementary.elm_spinner_special_value_add(Handle, value, label);
+ Interop.Elementary.elm_spinner_special_value_add(RealHandle, value, label);
}
public void RemoveSpecialValue(double value)
{
- Interop.Elementary.elm_spinner_special_value_del(Handle, value);
+ Interop.Elementary.elm_spinner_special_value_del(RealHandle, value);
}
public string GetSpecialValue(double value)
{
- return Interop.Elementary.elm_spinner_special_value_get(Handle, value);
+ return Interop.Elementary.elm_spinner_special_value_get(RealHandle, value);
}
protected override IntPtr CreateHandle(EvasObject parent)
{
- return Interop.Elementary.elm_spinner_add(parent);
+ IntPtr handle = Interop.Elementary.elm_layout_add(parent.Handle);
+ Interop.Elementary.elm_layout_theme_set(handle, "layout", "elm_widget", "default");
+
+ RealHandle = Interop.Elementary.elm_spinner_add(handle);
+ Interop.Elementary.elm_object_part_content_set(handle, "elm.swallow.content", RealHandle);
+
+ return handle;
}
}
}
diff --git a/ElmSharp/ElmSharp/Table.cs b/ElmSharp/ElmSharp/Table.cs
index 7b1792c..5e14162 100644..100755
--- a/ElmSharp/ElmSharp/Table.cs
+++ b/ElmSharp/ElmSharp/Table.cs
@@ -87,6 +87,21 @@ namespace ElmSharp
ClearChildren();
}
+ public override void SetPartColor(string part, Color color)
+ {
+ Interop.Elementary.elm_object_color_class_color_set(Handle, part, color.R * color.A / 255,
+ color.G * color.A / 255,
+ color.B * color.A / 255,
+ color.A);
+ }
+
+ public override Color GetPartColor(string part)
+ {
+ int r, g, b, a;
+ Interop.Elementary.elm_object_color_class_color_get(Handle, part, out r, out g, out b, out a);
+ return new Color((int)(r / (a / 255.0)), (int)(g / (a / 255.0)), (int)(b / (a / 255.0)), a);
+ }
+
protected override IntPtr CreateHandle(EvasObject parent)
{
IntPtr handle = Interop.Elementary.elm_layout_add(parent);
diff --git a/ElmSharp/ElmSharp/Toolbar.cs b/ElmSharp/ElmSharp/Toolbar.cs
index 7393328..9b1dfba 100644..100755
--- a/ElmSharp/ElmSharp/Toolbar.cs
+++ b/ElmSharp/ElmSharp/Toolbar.cs
@@ -53,7 +53,7 @@ namespace ElmSharp
SmartEvent<ToolbarItemEventArgs> _longpressed;
public Toolbar(EvasObject parent) : base(parent)
{
- _selected = new SmartEvent<ToolbarItemEventArgs>(this, "selected", ToolbarItemEventArgs.CreateFromSmartEvent);
+ _selected = new SmartEvent<ToolbarItemEventArgs>(this, this.RealHandle, "selected", ToolbarItemEventArgs.CreateFromSmartEvent);
_selected.On += (s, e) =>
{
if (e.Item != null)
@@ -62,12 +62,12 @@ namespace ElmSharp
e.Item.SendSelected();
}
};
- _longpressed = new SmartEvent<ToolbarItemEventArgs>(this, "longpressed", ToolbarItemEventArgs.CreateFromSmartEvent);
+ _longpressed = new SmartEvent<ToolbarItemEventArgs>(this, this.RealHandle, "longpressed", ToolbarItemEventArgs.CreateFromSmartEvent);
_longpressed.On += (s, e) =>
{
e.Item?.SendLongPressed();
};
- _clicked = new SmartEvent<ToolbarItemEventArgs>(this, "clicked", ToolbarItemEventArgs.CreateFromSmartEvent);
+ _clicked = new SmartEvent<ToolbarItemEventArgs>(this, this.RealHandle, "clicked", ToolbarItemEventArgs.CreateFromSmartEvent);
_clicked.On += (s, e) =>
{
e.Item?.SendClicked();
@@ -80,11 +80,11 @@ namespace ElmSharp
{
get
{
- return Interop.Elementary.elm_toolbar_homogeneous_get(Handle);
+ return Interop.Elementary.elm_toolbar_homogeneous_get(RealHandle);
}
set
{
- Interop.Elementary.elm_toolbar_homogeneous_set(Handle, value);
+ Interop.Elementary.elm_toolbar_homogeneous_set(RealHandle, value);
}
}
@@ -92,11 +92,11 @@ namespace ElmSharp
{
get
{
- return (ToolbarSelectionMode)Interop.Elementary.elm_toolbar_select_mode_get(Handle);
+ return (ToolbarSelectionMode)Interop.Elementary.elm_toolbar_select_mode_get(RealHandle);
}
set
{
- Interop.Elementary.elm_toolbar_select_mode_set(Handle, (int)value);
+ Interop.Elementary.elm_toolbar_select_mode_set(RealHandle, (int)value);
}
}
@@ -104,11 +104,11 @@ namespace ElmSharp
{
get
{
- return (ToolbarShrinkMode)Interop.Elementary.elm_toolbar_shrink_mode_get(Handle);
+ return (ToolbarShrinkMode)Interop.Elementary.elm_toolbar_shrink_mode_get(RealHandle);
}
set
{
- Interop.Elementary.elm_toolbar_shrink_mode_set(Handle, (int)value);
+ Interop.Elementary.elm_toolbar_shrink_mode_set(RealHandle, (int)value);
}
}
@@ -116,11 +116,11 @@ namespace ElmSharp
{
get
{
- return Interop.Elementary.elm_toolbar_align_get(Handle);
+ return Interop.Elementary.elm_toolbar_align_get(RealHandle);
}
set
{
- Interop.Elementary.elm_toolbar_align_set(Handle, value);
+ Interop.Elementary.elm_toolbar_align_set(RealHandle, value);
}
}
@@ -128,11 +128,11 @@ namespace ElmSharp
{
get
{
- return Interop.Elementary.elm_toolbar_transverse_expanded_get(Handle);
+ return Interop.Elementary.elm_toolbar_transverse_expanded_get(RealHandle);
}
set
{
- Interop.Elementary.elm_toolbar_transverse_expanded_set(Handle, value);
+ Interop.Elementary.elm_toolbar_transverse_expanded_set(RealHandle, value);
}
}
@@ -143,7 +143,7 @@ namespace ElmSharp
public ToolbarItem Append(string label, string icon)
{
ToolbarItem item = new ToolbarItem(label, icon);
- item.Handle = Interop.Elementary.elm_toolbar_item_append(Handle, icon, label, null, (IntPtr)item.Id);
+ item.Handle = Interop.Elementary.elm_toolbar_item_append(RealHandle, icon, label, null, (IntPtr)item.Id);
return item;
}
@@ -155,7 +155,7 @@ namespace ElmSharp
public ToolbarItem Prepend(string label, string icon)
{
ToolbarItem item = new ToolbarItem(label, icon);
- item.Handle = Interop.Elementary.elm_toolbar_item_prepend(Handle, icon, label, null, (IntPtr)item.Id);
+ item.Handle = Interop.Elementary.elm_toolbar_item_prepend(RealHandle, icon, label, null, (IntPtr)item.Id);
return item;
}
@@ -167,7 +167,7 @@ namespace ElmSharp
public ToolbarItem InsertBefore(ToolbarItem before, string label, string icon)
{
ToolbarItem item = new ToolbarItem(label, icon);
- item.Handle = Interop.Elementary.elm_toolbar_item_insert_before(Handle, before, icon, label, null, (IntPtr)item.Id);
+ item.Handle = Interop.Elementary.elm_toolbar_item_insert_before(RealHandle, before, icon, label, null, (IntPtr)item.Id);
return item;
}
@@ -175,14 +175,20 @@ namespace ElmSharp
{
get
{
- IntPtr handle = Interop.Elementary.elm_toolbar_selected_item_get(Handle);
+ IntPtr handle = Interop.Elementary.elm_toolbar_selected_item_get(RealHandle);
return ItemObject.GetItemByHandle(handle) as ToolbarItem;
}
}
protected override IntPtr CreateHandle(EvasObject parent)
{
- return Interop.Elementary.elm_toolbar_add(parent);
+ IntPtr handle = Interop.Elementary.elm_layout_add(parent.Handle);
+ Interop.Elementary.elm_layout_theme_set(handle, "layout", "elm_widget", "default");
+
+ RealHandle = Interop.Elementary.elm_toolbar_add(handle);
+ Interop.Elementary.elm_object_part_content_set(handle, "elm.swallow.content", RealHandle);
+
+ return handle;
}
}
}
diff --git a/ElmSharp/ElmSharp/Widget.cs b/ElmSharp/ElmSharp/Widget.cs
index d258145..1db45a5 100644
--- a/ElmSharp/ElmSharp/Widget.cs
+++ b/ElmSharp/ElmSharp/Widget.cs
@@ -27,6 +27,7 @@ namespace ElmSharp
SmartEvent _unfocused;
internal Color _backgroundColor = Color.Default;
+ internal int _opacity = Color.Default.A;
protected Widget()
{
@@ -49,11 +50,11 @@ namespace ElmSharp
{
get
{
- return !Interop.Elementary.elm_object_disabled_get(Handle);
+ return !Interop.Elementary.elm_object_disabled_get(RealHandle);
}
set
{
- Interop.Elementary.elm_object_disabled_set(Handle, !value);
+ Interop.Elementary.elm_object_disabled_set(RealHandle, !value);
}
}
@@ -61,11 +62,11 @@ namespace ElmSharp
{
get
{
- return Interop.Elementary.elm_object_style_get(Handle);
+ return Interop.Elementary.elm_object_style_get(RealHandle);
}
set
{
- Interop.Elementary.elm_object_style_set(Handle, value);
+ Interop.Elementary.elm_object_style_set(RealHandle, value);
}
}
@@ -73,7 +74,7 @@ namespace ElmSharp
{
get
{
- return Interop.Elementary.elm_object_focus_get(Handle);
+ return Interop.Elementary.elm_object_focus_get(RealHandle);
}
}
@@ -81,11 +82,11 @@ namespace ElmSharp
{
get
{
- return Interop.Elementary.elm_object_part_text_get(Handle);
+ return Interop.Elementary.elm_object_part_text_get(RealHandle);
}
set
{
- Interop.Elementary.elm_object_part_text_set(Handle, IntPtr.Zero, value);
+ Interop.Elementary.elm_object_part_text_set(RealHandle, IntPtr.Zero, value);
}
}
@@ -93,7 +94,7 @@ namespace ElmSharp
{
get
{
- if(!_backgroundColor.IsDefault)
+ if (!_backgroundColor.IsDefault)
{
_backgroundColor = GetPartColor("bg");
}
@@ -113,9 +114,26 @@ namespace ElmSharp
}
}
+ public virtual int Opacity
+ {
+ get
+ {
+ if (_opacity != Color.Default.A)
+ {
+ _opacity = GetPartOpacity("opacity");
+ }
+ return _opacity;
+ }
+ set
+ {
+ SetPartOpacity("opacity", value);
+ _opacity = value;
+ }
+ }
+
public void SetFocus(bool isFocus)
{
- Interop.Elementary.elm_object_focus_set(Handle, isFocus);
+ Interop.Elementary.elm_object_focus_set(RealHandle, isFocus);
}
public void SetPartContent(string part, EvasObject content)
@@ -127,9 +145,9 @@ namespace ElmSharp
{
if (preserveOldContent)
{
- Interop.Elementary.elm_object_part_content_unset(Handle, part);
+ Interop.Elementary.elm_object_part_content_unset(RealHandle, part);
}
- Interop.Elementary.elm_object_part_content_set(Handle, part, content);
+ Interop.Elementary.elm_object_part_content_set(RealHandle, part, content);
_partContents[part ?? "__default__"] = content;
}
@@ -143,41 +161,53 @@ namespace ElmSharp
{
if (preserveOldContent)
{
- Interop.Elementary.elm_object_content_unset(Handle);
+ Interop.Elementary.elm_object_content_unset(RealHandle);
}
- Interop.Elementary.elm_object_content_set(Handle, content);
- _partContents["___default__"] = content;
+ Interop.Elementary.elm_object_content_set(RealHandle, content);
+ _partContents["__default__"] = content;
}
public void SetPartText(string part, string text)
{
- Interop.Elementary.elm_object_part_text_set(Handle, part, text);
+ Interop.Elementary.elm_object_part_text_set(RealHandle, part, text);
}
public string GetPartText(string part)
{
- return Interop.Elementary.elm_object_part_text_get(Handle, part);
+ return Interop.Elementary.elm_object_part_text_get(RealHandle, part);
}
- public void SetPartColor(string part, Color color)
+ public virtual void SetPartColor(string part, Color color)
{
- Interop.Elementary.elm_object_color_class_color_set(Handle, part, color.R * color.A / 255,
+ Interop.Elementary.elm_object_color_class_color_set(RealHandle, part, color.R * color.A / 255,
color.G * color.A / 255,
color.B * color.A / 255,
color.A);
}
- public Color GetPartColor(string part)
+ public virtual Color GetPartColor(string part)
{
int r, g, b, a;
- Interop.Elementary.elm_object_color_class_color_get(Handle, part, out r, out g, out b, out a);
+ Interop.Elementary.elm_object_color_class_color_get(RealHandle, part, out r, out g, out b, out a);
return new Color((int)(r / (a / 255.0)), (int)(g / (a / 255.0)), (int)(b / (a / 255.0)), a);
}
+ public void SetPartOpacity(string part, int opacity)
+ {
+ Interop.Elementary.elm_object_color_class_color_set(Handle, part, 255, 255, 255, opacity);
+ }
+
+ public int GetPartOpacity(string part)
+ {
+ int r, g, b, a;
+ Interop.Elementary.elm_object_color_class_color_get(Handle, part, out r, out g, out b, out a);
+ return a;
+ }
+
internal IntPtr GetPartContent(string part)
{
- return Interop.Elementary.elm_object_part_content_get(Handle, part);
+ return Interop.Elementary.elm_object_part_content_get(RealHandle, part);
}
}
}
diff --git a/packaging/elm-sharp.spec b/packaging/elm-sharp.spec
index b690ec0..2adb00e 100644
--- a/packaging/elm-sharp.spec
+++ b/packaging/elm-sharp.spec
@@ -1,4 +1,4 @@
-%define DEV_VERSION beta-010
+%define DEV_VERSION beta-011
Name: elm-sharp
Summary: C# Binding for Elementary