summaryrefslogtreecommitdiff
path: root/src/lib/ecore_x
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-12-22 15:11:02 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-12-22 15:17:43 +0900
commitcc5dd2bd87d0febc71be682501ecdc0b660d2f0f (patch)
tree605ed7023063a561436a92d75c2b9a4a8f861386 /src/lib/ecore_x
parent176b0c8d03f7f6e851f1cfd4aa6dd0ec4d67b43a (diff)
efl window stacks - implement pop to for x11 in the portable way
Diffstat (limited to 'src/lib/ecore_x')
-rw-r--r--src/lib/ecore_x/Ecore_X.h11
-rw-r--r--src/lib/ecore_x/Ecore_X_Atoms.h1
-rw-r--r--src/lib/ecore_x/ecore_x_atoms_decl.h2
-rw-r--r--src/lib/ecore_x/ecore_x_e.c35
4 files changed, 48 insertions, 1 deletions
diff --git a/src/lib/ecore_x/Ecore_X.h b/src/lib/ecore_x/Ecore_X.h
index f08d020..21a94fa 100644
--- a/src/lib/ecore_x/Ecore_X.h
+++ b/src/lib/ecore_x/Ecore_X.h
@@ -1387,6 +1387,15 @@ typedef enum _Ecore_X_Stack_Type
1387 ECORE_X_STACK_LAST 1387 ECORE_X_STACK_LAST
1388} Ecore_X_Stack_Type; 1388} Ecore_X_Stack_Type;
1389 1389
1390typedef enum _Ecore_X_Stack_Position
1391{
1392 ECORE_X_STACK_POSITION_NONE = 0,
1393 ECORE_X_STACK_POSITION_BOTTOM = 1,
1394 ECORE_X_STACK_POSITION_MIDDLE,
1395 ECORE_X_STACK_POSITION_TOP,
1396 ECORE_X_STACK_POSITION_LAST
1397} Ecore_X_Stack_Position;
1398
1390/* Window layer constants */ 1399/* Window layer constants */
1391#define ECORE_X_WINDOW_LAYER_BELOW 2 1400#define ECORE_X_WINDOW_LAYER_BELOW 2
1392#define ECORE_X_WINDOW_LAYER_NORMAL 4 1401#define ECORE_X_WINDOW_LAYER_NORMAL 4
@@ -2749,6 +2758,8 @@ EAPI Eina_Bool ecore_x_e_keyrouter_get(Ecore_X_Windo
2749 2758
2750EAPI void ecore_x_e_stack_type_set(Ecore_X_Window win, Ecore_X_Stack_Type stack_type); 2759EAPI void ecore_x_e_stack_type_set(Ecore_X_Window win, Ecore_X_Stack_Type stack_type);
2751EAPI Ecore_X_Stack_Type ecore_x_e_stack_type_get(Ecore_X_Window win); 2760EAPI Ecore_X_Stack_Type ecore_x_e_stack_type_get(Ecore_X_Window win);
2761EAPI void ecore_x_e_stack_position_set(Ecore_X_Window win, Ecore_X_Stack_Position stack_position);
2762EAPI Ecore_X_Stack_Position ecore_x_e_stack_position_get(Ecore_X_Window win);
2752 2763
2753#include <Ecore_X_Atoms.h> 2764#include <Ecore_X_Atoms.h>
2754#include <Ecore_X_Cursor.h> 2765#include <Ecore_X_Cursor.h>
diff --git a/src/lib/ecore_x/Ecore_X_Atoms.h b/src/lib/ecore_x/Ecore_X_Atoms.h
index 014a241..8e91dd7 100644
--- a/src/lib/ecore_x/Ecore_X_Atoms.h
+++ b/src/lib/ecore_x/Ecore_X_Atoms.h
@@ -313,6 +313,7 @@ EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_SLIDING_WIN_GEOMETRY;
313 313
314/* for window stacks */ 314/* for window stacks */
315EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_STACK_TYPE; 315EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_STACK_TYPE;
316EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_STACK_POSITION;
316 317
317/* for SDB(Samsung Debug Bridge) */ 318/* for SDB(Samsung Debug Bridge) */
318EAPI extern Ecore_X_Atom ECORE_X_ATOM_SDB_SERVER_CONNECT; 319EAPI extern Ecore_X_Atom ECORE_X_ATOM_SDB_SERVER_CONNECT;
diff --git a/src/lib/ecore_x/ecore_x_atoms_decl.h b/src/lib/ecore_x/ecore_x_atoms_decl.h
index 7f1a51a..78545c7 100644
--- a/src/lib/ecore_x/ecore_x_atoms_decl.h
+++ b/src/lib/ecore_x/ecore_x_atoms_decl.h
@@ -329,6 +329,7 @@ EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_SLIDING_WIN_GEOMETRY = 0;
329 329
330/* for window stacks */ 330/* for window stacks */
331EAPI Ecore_X_Atom ECORE_X_ATOM_E_STACK_TYPE = 0; 331EAPI Ecore_X_Atom ECORE_X_ATOM_E_STACK_TYPE = 0;
332EAPI Ecore_X_Atom ECORE_X_ATOM_E_STACK_POSITION = 0;
332 333
333/* for SDB(Samsung Debug Bridge) */ 334/* for SDB(Samsung Debug Bridge) */
334EAPI Ecore_X_Atom ECORE_X_ATOM_SDB_SERVER_CONNECT = 0; 335EAPI Ecore_X_Atom ECORE_X_ATOM_SDB_SERVER_CONNECT = 0;
@@ -693,6 +694,7 @@ const Atom_Item atom_items[] =
693 { "_E_WINDOW_PROFILE_CHANGE_DONE", &ECORE_X_ATOM_E_WINDOW_PROFILE_CHANGE_DONE }, 694 { "_E_WINDOW_PROFILE_CHANGE_DONE", &ECORE_X_ATOM_E_WINDOW_PROFILE_CHANGE_DONE },
694 695
695 { "_E_STACK_TYPE", &ECORE_X_ATOM_E_STACK_TYPE }, 696 { "_E_STACK_TYPE", &ECORE_X_ATOM_E_STACK_TYPE },
697 { "_E_STACK_POSITION", &ECORE_X_ATOM_E_STACK_POSITION },
696 698
697 { "_E_DEICONIFY_APPROVE", &ECORE_X_ATOM_E_DEICONIFY_APPROVE }, 699 { "_E_DEICONIFY_APPROVE", &ECORE_X_ATOM_E_DEICONIFY_APPROVE },
698 700
diff --git a/src/lib/ecore_x/ecore_x_e.c b/src/lib/ecore_x/ecore_x_e.c
index a7c5b60..a879970 100644
--- a/src/lib/ecore_x/ecore_x_e.c
+++ b/src/lib/ecore_x/ecore_x_e.c
@@ -2404,6 +2404,7 @@ EAPI void
2404ecore_x_e_stack_type_set(Ecore_X_Window win, 2404ecore_x_e_stack_type_set(Ecore_X_Window win,
2405 Ecore_X_Stack_Type stack_type) 2405 Ecore_X_Stack_Type stack_type)
2406{ 2406{
2407 unsigned int val = stack_type;
2407 LOGFN(__FILE__, __LINE__, __FUNCTION__); 2408 LOGFN(__FILE__, __LINE__, __FUNCTION__);
2408 2409
2409 EINA_SAFETY_ON_NULL_RETURN(_ecore_x_disp); 2410 EINA_SAFETY_ON_NULL_RETURN(_ecore_x_disp);
@@ -2412,7 +2413,7 @@ ecore_x_e_stack_type_set(Ecore_X_Window win,
2412 ecore_x_window_prop_property_del(win, ECORE_X_ATOM_E_STACK_TYPE); 2413 ecore_x_window_prop_property_del(win, ECORE_X_ATOM_E_STACK_TYPE);
2413 else 2414 else
2414 ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_STACK_TYPE, 2415 ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_STACK_TYPE,
2415 &stack_type, 1); 2416 &val, 1);
2416} 2417}
2417 2418
2418EAPI Ecore_X_Stack_Type 2419EAPI Ecore_X_Stack_Type
@@ -2430,3 +2431,35 @@ ecore_x_e_stack_type_get(Ecore_X_Window win)
2430 if (val >= ECORE_X_STACK_LAST) val = ECORE_X_STACK_STANDARD; 2431 if (val >= ECORE_X_STACK_LAST) val = ECORE_X_STACK_STANDARD;
2431 return (Ecore_X_Stack_Type)val; 2432 return (Ecore_X_Stack_Type)val;
2432} 2433}
2434
2435EAPI void
2436ecore_x_e_stack_position_set(Ecore_X_Window win,
2437 Ecore_X_Stack_Position stack_position)
2438{
2439 unsigned int val = stack_position;
2440 LOGFN(__FILE__, __LINE__, __FUNCTION__);
2441
2442 EINA_SAFETY_ON_NULL_RETURN(_ecore_x_disp);
2443
2444 if (stack_position == ECORE_X_STACK_POSITION_NONE)
2445 ecore_x_window_prop_property_del(win, ECORE_X_ATOM_E_STACK_POSITION);
2446 else
2447 ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_STACK_POSITION,
2448 &val, 1);
2449}
2450
2451EAPI Ecore_X_Stack_Position
2452ecore_x_e_stack_position_get(Ecore_X_Window win)
2453{
2454 int ret;
2455 unsigned int val;
2456 LOGFN(__FILE__, __LINE__, __FUNCTION__);
2457
2458 EINA_SAFETY_ON_NULL_RETURN_VAL(_ecore_x_disp, ECORE_X_STACK_NONE);
2459
2460 ret = ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_E_STACK_POSITION,
2461 &val, 1);
2462 if (ret != 1) return ECORE_X_STACK_POSITION_NONE;
2463 if (val >= ECORE_X_STACK_POSITION_LAST) val = ECORE_X_STACK_POSITION_BOTTOM;
2464 return (Ecore_X_Stack_Position)val;
2465}