summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2015-01-12 10:13:34 +0000
committerTom Hacohen <tom@stosb.com>2015-01-12 10:13:34 +0000
commit49e669aafd9d4027a1be2719cf3ae23450404482 (patch)
tree18d3ae2f50c1caba29973d9aa529c72f74b7bb27
parentddb9e9f7aab0ab74e1fe5d1701ffc1d08c3a47ea (diff)
Elm win: Fix added internal parameter to the win constructor.
Internal hacks should not affect user facing API. This commit adds a new API to do the internal hack. This is still bad, but it's much less than what was there before. This fixes the main issue introduced by commit: 63a5cdf0f8516c16a62233da0c2af0e10a13264b
-rw-r--r--src/lib/elm_win.c17
-rw-r--r--src/lib/elm_win.eo9
2 files changed, 21 insertions, 5 deletions
diff --git a/src/lib/elm_win.c b/src/lib/elm_win.c
index c2d13c176..233e17b93 100644
--- a/src/lib/elm_win.c
+++ b/src/lib/elm_win.c
@@ -4,6 +4,7 @@
4 4
5#define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED 5#define ELM_INTERFACE_ATSPI_ACCESSIBLE_PROTECTED
6#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED 6#define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED
7#define ELM_WIN_PROTECTED
7 8
8#include <Elementary.h> 9#include <Elementary.h>
9#include <Elementary_Cursor.h> 10#include <Elementary_Cursor.h>
@@ -2913,14 +2914,16 @@ elm_win_add(Evas_Object *parent,
2913 const char *name, 2914 const char *name,
2914 Elm_Win_Type type) 2915 Elm_Win_Type type)
2915{ 2916{
2916 Evas_Object *obj = eo_add(MY_CLASS, parent, elm_obj_win_constructor(name, type, NULL)); 2917 Evas_Object *obj = eo_add(MY_CLASS, parent, elm_obj_win_constructor(name, type));
2917 return obj; 2918 return obj;
2918} 2919}
2919 2920
2920EAPI Evas_Object * 2921EAPI Evas_Object *
2921elm_win_fake_add(Ecore_Evas *ee) 2922elm_win_fake_add(Ecore_Evas *ee)
2922{ 2923{
2923 return eo_add(MY_CLASS, NULL, elm_obj_win_constructor(NULL, ELM_WIN_FAKE, ee)); 2924 return eo_add(MY_CLASS, NULL,
2925 elm_obj_win_fake_canvas_set(ee),
2926 elm_obj_win_constructor(NULL, ELM_WIN_FAKE));
2924} 2927}
2925 2928
2926static void 2929static void
@@ -3019,7 +3022,7 @@ _accel_is_gl(void)
3019} 3022}
3020 3023
3021EOLIAN static void 3024EOLIAN static void
3022_elm_win_constructor(Eo *obj, Elm_Win_Data *sd, const char *name, Elm_Win_Type type, Ecore_Evas *oee) 3025_elm_win_constructor(Eo *obj, Elm_Win_Data *sd, const char *name, Elm_Win_Type type)
3023{ 3026{
3024 sd->obj = obj; // in ctor 3027 sd->obj = obj; // in ctor
3025 3028
@@ -3039,7 +3042,7 @@ _elm_win_constructor(Eo *obj, Elm_Win_Data *sd, const char *name, Elm_Win_Type t
3039 switch (type) 3042 switch (type)
3040 { 3043 {
3041 case ELM_WIN_FAKE: 3044 case ELM_WIN_FAKE:
3042 tmp_sd.ee = oee; 3045 tmp_sd.ee = sd->ee;
3043 break; 3046 break;
3044 case ELM_WIN_INLINED_IMAGE: 3047 case ELM_WIN_INLINED_IMAGE:
3045 if (!parent) break; 3048 if (!parent) break;
@@ -3587,6 +3590,12 @@ _elm_win_eo_base_constructor(Eo *obj EINA_UNUSED, Elm_Win_Data *_pd EINA_UNUSED)
3587 /* Do nothing. */ 3590 /* Do nothing. */
3588} 3591}
3589 3592
3593EOLIAN static void
3594_elm_win_fake_canvas_set(Eo *obj EINA_UNUSED, Elm_Win_Data *pd, Ecore_Evas *oee)
3595{
3596 pd->ee = oee;
3597}
3598
3590EOLIAN static Elm_Win_Type 3599EOLIAN static Elm_Win_Type
3591_elm_win_type_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd) 3600_elm_win_type_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd)
3592{ 3601{
diff --git a/src/lib/elm_win.eo b/src/lib/elm_win.eo
index 9cea8eabb..75ca045af 100644
--- a/src/lib/elm_win.eo
+++ b/src/lib/elm_win.eo
@@ -1185,6 +1185,14 @@ class Elm_Win (Elm_Widget, Elm_Interface_Atspi_Window,
1185 void *trap_data; /*@ The trap data of the window */ 1185 void *trap_data; /*@ The trap data of the window */
1186 } 1186 }
1187 } 1187 }
1188 fake_canvas @protected {
1189 set {
1190 /*@ Internal. Used to completent the fake window type. */
1191 }
1192 values {
1193 Ecore_Evas *oee;
1194 }
1195 }
1188 } 1196 }
1189 methods { 1197 methods {
1190 constructor { 1198 constructor {
@@ -1193,7 +1201,6 @@ class Elm_Win (Elm_Widget, Elm_Interface_Atspi_Window,
1193 params { 1201 params {
1194 @in const(char)* name; 1202 @in const(char)* name;
1195 @in Elm_Win_Type type; 1203 @in Elm_Win_Type type;
1196 @in Ecore_Evas *oee;
1197 } 1204 }
1198 } 1205 }
1199 wm_manual_rotation_done_manual { 1206 wm_manual_rotation_done_manual {