forked from enlightenment/efl
From: Doyoun Kang <doyoun.kang@samsung.com>
Subject: Add feature for showing/hiding indicator Hi, raster. As we discussed about indicator, i added feature for indicator. Please check attached patch files. 1. elementary i added enumeration to Elm_Illume_Command as below. - ELM_ILLUME_COMMAND_INDICATOR_SHOW - ELM_ILLUME_COMMAND_INDICATOR_HIDE 2. ecore i added atoms/enumerations/APIs as below. - Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_INDICATOR_STATE; - Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_INDICATOR_ON; - Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_INDICATOR_OFF; typedef enum _Ecore_X_Illume_Indicator_State { ECORE_X_ILLUME_INDICATOR_STATE_UNKNOWN = 0, ECORE_X_ILLUME_INDICATOR_STATE_OFF, ECORE_X_ILLUME_INDICATOR_STATE_ON } Ecore_X_Illume_Indicator_State; EAPI void ecore_x_e_illume_indicator_state_set(Ecore_X_Window win, Ecore_X_Illume_Indicator_State state); EAPI Ecore_X_Illume_Indicator_State ecore_x_e_illume_indicator_state_get(Ecore_X_Window win); EAPI void ecore_x_e_illume_indicator_state_send(Ecore_X_Window win, Ecore_X_Illume_Indicator_State state); SVN revision: 68410
This commit is contained in:
parent
4fcca0a938
commit
a441e218c6
|
@ -1104,6 +1104,13 @@ typedef enum _Ecore_X_Illume_Quickpanel_State
|
||||||
ECORE_X_ILLUME_QUICKPANEL_STATE_ON
|
ECORE_X_ILLUME_QUICKPANEL_STATE_ON
|
||||||
} Ecore_X_Illume_Quickpanel_State;
|
} Ecore_X_Illume_Quickpanel_State;
|
||||||
|
|
||||||
|
typedef enum _Ecore_X_Illume_Indicator_State
|
||||||
|
{
|
||||||
|
ECORE_X_ILLUME_INDICATOR_STATE_UNKNOWN = 0,
|
||||||
|
ECORE_X_ILLUME_INDICATOR_STATE_OFF,
|
||||||
|
ECORE_X_ILLUME_INDICATOR_STATE_ON
|
||||||
|
} Ecore_X_Illume_Indicator_State;
|
||||||
|
|
||||||
/* Window layer constants */
|
/* Window layer constants */
|
||||||
#define ECORE_X_WINDOW_LAYER_BELOW 2
|
#define ECORE_X_WINDOW_LAYER_BELOW 2
|
||||||
#define ECORE_X_WINDOW_LAYER_NORMAL 4
|
#define ECORE_X_WINDOW_LAYER_NORMAL 4
|
||||||
|
@ -3638,6 +3645,14 @@ ecore_x_gesture_event_ungrab(Ecore_X_Window win,
|
||||||
Ecore_X_Gesture_Event_Type type,
|
Ecore_X_Gesture_Event_Type type,
|
||||||
int num_fingers);
|
int num_fingers);
|
||||||
|
|
||||||
|
EAPI void
|
||||||
|
ecore_x_e_illume_indicator_state_set(Ecore_X_Window win,
|
||||||
|
Ecore_X_Illume_Indicator_State state);
|
||||||
|
EAPI Ecore_X_Illume_Indicator_State
|
||||||
|
ecore_x_e_illume_indicator_state_get(Ecore_X_Window win);
|
||||||
|
EAPI void
|
||||||
|
ecore_x_e_illume_indicator_state_send(Ecore_X_Window win,
|
||||||
|
Ecore_X_Illume_Indicator_State state);
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif // ifdef __cplusplus
|
#endif // ifdef __cplusplus
|
||||||
|
|
|
@ -238,6 +238,9 @@ EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MAJOR;
|
||||||
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MINOR;
|
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MINOR;
|
||||||
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ZONE;
|
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ZONE;
|
||||||
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_POSITION_UPDATE;
|
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_POSITION_UPDATE;
|
||||||
|
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_INDICATOR_STATE;
|
||||||
|
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_INDICATOR_ON;
|
||||||
|
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_INDICATOR_OFF;
|
||||||
|
|
||||||
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_COMP_SYNC_COUNTER;
|
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_COMP_SYNC_COUNTER;
|
||||||
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_COMP_SYNC_DRAW_DONE;
|
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_COMP_SYNC_DRAW_DONE;
|
||||||
|
|
|
@ -264,6 +264,9 @@ EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MAJOR = 0;
|
||||||
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MINOR = 0;
|
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MINOR = 0;
|
||||||
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ZONE = 0;
|
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ZONE = 0;
|
||||||
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_POSITION_UPDATE = 0;
|
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_POSITION_UPDATE = 0;
|
||||||
|
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_INDICATOR_STATE = 0;
|
||||||
|
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_INDICATOR_ON = 0;
|
||||||
|
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_INDICATOR_OFF = 0;
|
||||||
|
|
||||||
EAPI Ecore_X_Atom ECORE_X_ATOM_E_COMP_SYNC_COUNTER = 0;
|
EAPI Ecore_X_Atom ECORE_X_ATOM_E_COMP_SYNC_COUNTER = 0;
|
||||||
EAPI Ecore_X_Atom ECORE_X_ATOM_E_COMP_SYNC_DRAW_DONE = 0;
|
EAPI Ecore_X_Atom ECORE_X_ATOM_E_COMP_SYNC_DRAW_DONE = 0;
|
||||||
|
|
|
@ -249,6 +249,9 @@ static Xcb_Atom atoms[] =
|
||||||
{ "_E_ILLUME_QUICKPANEL_ZONE", &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ZONE },
|
{ "_E_ILLUME_QUICKPANEL_ZONE", &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ZONE },
|
||||||
{ "_E_ILLUME_QUICKPANEL_POSITION_UPDATE",
|
{ "_E_ILLUME_QUICKPANEL_POSITION_UPDATE",
|
||||||
&ECORE_X_ATOM_E_ILLUME_QUICKPANEL_POSITION_UPDATE },
|
&ECORE_X_ATOM_E_ILLUME_QUICKPANEL_POSITION_UPDATE },
|
||||||
|
{ "_E_ILLUME_INDICATOR_STATE", &ECORE_X_ATOM_E_ILLUME_INDICATOR_STATE },
|
||||||
|
{ "_E_ILLUME_INDICATOR_ON", &ECORE_X_ATOM_E_ILLUME_INDICATOR_ON },
|
||||||
|
{ "_E_ILLUME_INDICATOR_OFF", &ECORE_X_ATOM_E_ILLUME_INDICATOR_OFF },
|
||||||
|
|
||||||
{ "_E_COMP_SYNC_COUNTER", &ECORE_X_ATOM_E_COMP_SYNC_COUNTER },
|
{ "_E_COMP_SYNC_COUNTER", &ECORE_X_ATOM_E_COMP_SYNC_COUNTER },
|
||||||
{ "_E_COMP_SYNC_DRAW_DONE", &ECORE_X_ATOM_E_COMP_SYNC_DRAW_DONE },
|
{ "_E_COMP_SYNC_DRAW_DONE", &ECORE_X_ATOM_E_COMP_SYNC_DRAW_DONE },
|
||||||
|
|
|
@ -7,6 +7,8 @@ static Ecore_X_Atom _ecore_xcb_e_quickpanel_atom_get(Ecore_X_
|
||||||
static Ecore_X_Illume_Quickpanel_State _ecore_xcb_e_quickpanel_state_get(Ecore_X_Atom atom);
|
static Ecore_X_Illume_Quickpanel_State _ecore_xcb_e_quickpanel_state_get(Ecore_X_Atom atom);
|
||||||
static Ecore_X_Atom _ecore_xcb_e_illume_atom_get(Ecore_X_Illume_Mode mode);
|
static Ecore_X_Atom _ecore_xcb_e_illume_atom_get(Ecore_X_Illume_Mode mode);
|
||||||
static Ecore_X_Illume_Mode _ecore_xcb_e_illume_mode_get(Ecore_X_Atom atom);
|
static Ecore_X_Illume_Mode _ecore_xcb_e_illume_mode_get(Ecore_X_Atom atom);
|
||||||
|
static Ecore_X_Atom _ecore_xcb_e_indicator_atom_get(Ecore_X_Illume_Indicator_State state);
|
||||||
|
static Ecore_X_Illume_Indicator_State _ecore_xcb_e_indicator_state_get(Ecore_X_Atom atom);
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
ecore_x_e_init(void)
|
ecore_x_e_init(void)
|
||||||
|
@ -1069,3 +1071,70 @@ _ecore_xcb_e_illume_mode_get(Ecore_X_Atom atom)
|
||||||
return ECORE_X_ILLUME_MODE_UNKNOWN;
|
return ECORE_X_ILLUME_MODE_UNKNOWN;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static Ecore_X_Atom
|
||||||
|
_ecore_xcb_e_indicator_atom_get(Ecore_X_Illume_Indicator_State state)
|
||||||
|
{
|
||||||
|
switch (state)
|
||||||
|
{
|
||||||
|
case ECORE_X_ILLUME_INDICATOR_STATE_ON:
|
||||||
|
return ECORE_X_ATOM_E_ILLUME_INDICATOR_ON;
|
||||||
|
|
||||||
|
case ECORE_X_ILLUME_INDICATOR_STATE_OFF:
|
||||||
|
return ECORE_X_ATOM_E_ILLUME_INDICATOR_OFF;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static Ecore_X_Illume_Indicator_State
|
||||||
|
_ecore_xcb_e_indicator_state_get(Ecore_X_Atom atom)
|
||||||
|
{
|
||||||
|
if (atom == ECORE_X_ATOM_E_ILLUME_INDICATOR_ON)
|
||||||
|
return ECORE_X_ILLUME_INDICATOR_STATE_ON;
|
||||||
|
if (atom == ECORE_X_ATOM_E_ILLUME_INDICATOR_OFF)
|
||||||
|
return ECORE_X_ILLUME_INDICATOR_STATE_OFF;
|
||||||
|
|
||||||
|
return ECORE_X_ILLUME_INDICATOR_STATE_UNKNOWN;
|
||||||
|
}
|
||||||
|
|
||||||
|
EAPI void
|
||||||
|
ecore_x_e_illume_indicator_state_set(Ecore_X_Window win,
|
||||||
|
Ecore_X_Illume_Indicator_State state)
|
||||||
|
{
|
||||||
|
Ecore_X_Atom atom = 0;
|
||||||
|
|
||||||
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||||
|
|
||||||
|
atom = _ecore_xcb_e_indicator_atom_get(state);
|
||||||
|
ecore_x_window_prop_atom_set(win, ECORE_X_ATOM_E_ILLUME_INDICATOR_STATE,
|
||||||
|
&atom, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
EAPI Ecore_X_Illume_Indicator_State
|
||||||
|
ecore_x_e_illume_indicator_state_get(Ecore_X_Window win)
|
||||||
|
{
|
||||||
|
Ecore_X_Atom atom = 0;
|
||||||
|
|
||||||
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||||
|
|
||||||
|
if (!ecore_x_window_prop_atom_get(win,
|
||||||
|
ECORE_X_ATOM_E_ILLUME_INDICATOR_STATE,
|
||||||
|
&atom, 1))
|
||||||
|
return ECORE_X_ILLUME_INDICATOR_STATE_UNKNOWN;
|
||||||
|
|
||||||
|
return _ecore_xcb_e_indicator_state_get(atom);
|
||||||
|
}
|
||||||
|
|
||||||
|
EAPI void
|
||||||
|
ecore_x_e_illume_indicator_state_send(Ecore_X_Window win,
|
||||||
|
Ecore_X_Illume_Indicator_State state)
|
||||||
|
{
|
||||||
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||||
|
ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_INDICATOR_STATE,
|
||||||
|
ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
|
||||||
|
_ecore_xcb_e_indicator_atom_get(state),
|
||||||
|
0, 0, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -270,6 +270,9 @@ _ecore_x_atoms_init(void)
|
||||||
{ "_E_ILLUME_QUICKPANEL_ZONE", &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ZONE },
|
{ "_E_ILLUME_QUICKPANEL_ZONE", &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ZONE },
|
||||||
{ "_E_ILLUME_QUICKPANEL_POSITION_UPDATE",
|
{ "_E_ILLUME_QUICKPANEL_POSITION_UPDATE",
|
||||||
&ECORE_X_ATOM_E_ILLUME_QUICKPANEL_POSITION_UPDATE },
|
&ECORE_X_ATOM_E_ILLUME_QUICKPANEL_POSITION_UPDATE },
|
||||||
|
{ "_E_ILLUME_INDICATOR_STATE", &ECORE_X_ATOM_E_ILLUME_INDICATOR_STATE },
|
||||||
|
{ "_E_ILLUME_INDICATOR_ON", &ECORE_X_ATOM_E_ILLUME_INDICATOR_ON },
|
||||||
|
{ "_E_ILLUME_INDICATOR_OFF", &ECORE_X_ATOM_E_ILLUME_INDICATOR_OFF },
|
||||||
|
|
||||||
{ "_E_COMP_SYNC_COUNTER", &ECORE_X_ATOM_E_COMP_SYNC_COUNTER },
|
{ "_E_COMP_SYNC_COUNTER", &ECORE_X_ATOM_E_COMP_SYNC_COUNTER },
|
||||||
{ "_E_COMP_SYNC_DRAW_DONE", &ECORE_X_ATOM_E_COMP_SYNC_DRAW_DONE },
|
{ "_E_COMP_SYNC_DRAW_DONE", &ECORE_X_ATOM_E_COMP_SYNC_DRAW_DONE },
|
||||||
|
|
|
@ -1058,3 +1058,69 @@ ecore_x_e_comp_pixmap_get(Ecore_X_Window win)
|
||||||
return pixmap;
|
return pixmap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static Ecore_X_Atom
|
||||||
|
_ecore_x_e_indicator_atom_get(Ecore_X_Illume_Indicator_State state)
|
||||||
|
{
|
||||||
|
switch (state)
|
||||||
|
{
|
||||||
|
case ECORE_X_ILLUME_INDICATOR_STATE_ON:
|
||||||
|
return ECORE_X_ATOM_E_ILLUME_INDICATOR_ON;
|
||||||
|
|
||||||
|
case ECORE_X_ILLUME_INDICATOR_STATE_OFF:
|
||||||
|
return ECORE_X_ATOM_E_ILLUME_INDICATOR_OFF;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static Ecore_X_Illume_Indicator_State
|
||||||
|
_ecore_x_e_indicator_state_get(Ecore_X_Atom atom)
|
||||||
|
{
|
||||||
|
if (atom == ECORE_X_ATOM_E_ILLUME_INDICATOR_ON)
|
||||||
|
return ECORE_X_ILLUME_INDICATOR_STATE_ON;
|
||||||
|
|
||||||
|
if (atom == ECORE_X_ATOM_E_ILLUME_INDICATOR_OFF)
|
||||||
|
return ECORE_X_ILLUME_INDICATOR_STATE_OFF;
|
||||||
|
|
||||||
|
return ECORE_X_ILLUME_INDICATOR_STATE_UNKNOWN;
|
||||||
|
}
|
||||||
|
|
||||||
|
EAPI void
|
||||||
|
ecore_x_e_illume_indicator_state_set(Ecore_X_Window win,
|
||||||
|
Ecore_X_Illume_Indicator_State state)
|
||||||
|
{
|
||||||
|
Ecore_X_Atom atom = 0;
|
||||||
|
|
||||||
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||||
|
atom = _ecore_x_e_indicator_atom_get(state);
|
||||||
|
ecore_x_window_prop_atom_set(win, ECORE_X_ATOM_E_ILLUME_INDICATOR_STATE,
|
||||||
|
&atom, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
EAPI Ecore_X_Illume_Indicator_State
|
||||||
|
ecore_x_e_illume_indicator_state_get(Ecore_X_Window win)
|
||||||
|
{
|
||||||
|
Ecore_X_Atom atom;
|
||||||
|
|
||||||
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||||
|
if (!ecore_x_window_prop_atom_get(win,
|
||||||
|
ECORE_X_ATOM_E_ILLUME_INDICATOR_STATE,
|
||||||
|
&atom, 1))
|
||||||
|
return ECORE_X_ILLUME_INDICATOR_STATE_UNKNOWN;
|
||||||
|
|
||||||
|
return _ecore_x_e_indicator_state_get(atom);
|
||||||
|
}
|
||||||
|
|
||||||
|
EAPI void
|
||||||
|
ecore_x_e_illume_indicator_state_send(Ecore_X_Window win,
|
||||||
|
Ecore_X_Illume_Indicator_State state)
|
||||||
|
{
|
||||||
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||||
|
ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_INDICATOR_STATE,
|
||||||
|
ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
|
||||||
|
_ecore_x_e_indicator_atom_get(state),
|
||||||
|
0, 0, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue