Add quickpanel state functions (get/set/send).
Add quickpanel atoms. SVN revision: 44739
This commit is contained in:
parent
09d1853ea0
commit
fcbe8a2eca
|
@ -967,22 +967,24 @@ typedef enum _Ecore_X_Window_Type {
|
|||
ECORE_X_WINDOW_TYPE_UNKNOWN
|
||||
} Ecore_X_Window_Type;
|
||||
|
||||
typedef enum _Ecore_X_Action {
|
||||
ECORE_X_ACTION_MOVE,
|
||||
ECORE_X_ACTION_RESIZE,
|
||||
ECORE_X_ACTION_MINIMIZE,
|
||||
ECORE_X_ACTION_SHADE,
|
||||
ECORE_X_ACTION_STICK,
|
||||
ECORE_X_ACTION_MAXIMIZE_HORZ,
|
||||
ECORE_X_ACTION_MAXIMIZE_VERT,
|
||||
ECORE_X_ACTION_FULLSCREEN,
|
||||
ECORE_X_ACTION_CHANGE_DESKTOP,
|
||||
ECORE_X_ACTION_CLOSE,
|
||||
ECORE_X_ACTION_ABOVE,
|
||||
ECORE_X_ACTION_BELOW
|
||||
typedef enum _Ecore_X_Action
|
||||
{
|
||||
ECORE_X_ACTION_MOVE,
|
||||
ECORE_X_ACTION_RESIZE,
|
||||
ECORE_X_ACTION_MINIMIZE,
|
||||
ECORE_X_ACTION_SHADE,
|
||||
ECORE_X_ACTION_STICK,
|
||||
ECORE_X_ACTION_MAXIMIZE_HORZ,
|
||||
ECORE_X_ACTION_MAXIMIZE_VERT,
|
||||
ECORE_X_ACTION_FULLSCREEN,
|
||||
ECORE_X_ACTION_CHANGE_DESKTOP,
|
||||
ECORE_X_ACTION_CLOSE,
|
||||
ECORE_X_ACTION_ABOVE,
|
||||
ECORE_X_ACTION_BELOW
|
||||
} Ecore_X_Action;
|
||||
|
||||
typedef enum _Ecore_X_Window_Configure_Mask {
|
||||
typedef enum _Ecore_X_Window_Configure_Mask
|
||||
{
|
||||
ECORE_X_WINDOW_CONFIGURE_MASK_X = (1 << 0),
|
||||
ECORE_X_WINDOW_CONFIGURE_MASK_Y = (1 << 1),
|
||||
ECORE_X_WINDOW_CONFIGURE_MASK_W = (1 << 2),
|
||||
|
@ -992,23 +994,24 @@ typedef enum _Ecore_X_Window_Configure_Mask {
|
|||
ECORE_X_WINDOW_CONFIGURE_MASK_STACK_MODE = (1 << 6)
|
||||
} Ecore_X_Window_Configure_Mask;
|
||||
|
||||
typedef enum _Ecore_X_Virtual_Keyboard_State {
|
||||
ECORE_X_VIRTUAL_KEYBOARD_STATE_UNKNOWN = 0,
|
||||
ECORE_X_VIRTUAL_KEYBOARD_STATE_OFF,
|
||||
ECORE_X_VIRTUAL_KEYBOARD_STATE_ON,
|
||||
ECORE_X_VIRTUAL_KEYBOARD_STATE_ALPHA,
|
||||
ECORE_X_VIRTUAL_KEYBOARD_STATE_NUMERIC,
|
||||
ECORE_X_VIRTUAL_KEYBOARD_STATE_PIN,
|
||||
ECORE_X_VIRTUAL_KEYBOARD_STATE_PHONE_NUMBER,
|
||||
ECORE_X_VIRTUAL_KEYBOARD_STATE_HEX,
|
||||
ECORE_X_VIRTUAL_KEYBOARD_STATE_TERMINAL,
|
||||
ECORE_X_VIRTUAL_KEYBOARD_STATE_PASSWORD,
|
||||
ECORE_X_VIRTUAL_KEYBOARD_STATE_IP,
|
||||
ECORE_X_VIRTUAL_KEYBOARD_STATE_HOST,
|
||||
ECORE_X_VIRTUAL_KEYBOARD_STATE_FILE,
|
||||
ECORE_X_VIRTUAL_KEYBOARD_STATE_URL,
|
||||
ECORE_X_VIRTUAL_KEYBOARD_STATE_KEYPAD,
|
||||
ECORE_X_VIRTUAL_KEYBOARD_STATE_J2ME
|
||||
typedef enum _Ecore_X_Virtual_Keyboard_State
|
||||
{
|
||||
ECORE_X_VIRTUAL_KEYBOARD_STATE_UNKNOWN = 0,
|
||||
ECORE_X_VIRTUAL_KEYBOARD_STATE_OFF,
|
||||
ECORE_X_VIRTUAL_KEYBOARD_STATE_ON,
|
||||
ECORE_X_VIRTUAL_KEYBOARD_STATE_ALPHA,
|
||||
ECORE_X_VIRTUAL_KEYBOARD_STATE_NUMERIC,
|
||||
ECORE_X_VIRTUAL_KEYBOARD_STATE_PIN,
|
||||
ECORE_X_VIRTUAL_KEYBOARD_STATE_PHONE_NUMBER,
|
||||
ECORE_X_VIRTUAL_KEYBOARD_STATE_HEX,
|
||||
ECORE_X_VIRTUAL_KEYBOARD_STATE_TERMINAL,
|
||||
ECORE_X_VIRTUAL_KEYBOARD_STATE_PASSWORD,
|
||||
ECORE_X_VIRTUAL_KEYBOARD_STATE_IP,
|
||||
ECORE_X_VIRTUAL_KEYBOARD_STATE_HOST,
|
||||
ECORE_X_VIRTUAL_KEYBOARD_STATE_FILE,
|
||||
ECORE_X_VIRTUAL_KEYBOARD_STATE_URL,
|
||||
ECORE_X_VIRTUAL_KEYBOARD_STATE_KEYPAD,
|
||||
ECORE_X_VIRTUAL_KEYBOARD_STATE_J2ME
|
||||
} Ecore_X_Virtual_Keyboard_State;
|
||||
|
||||
typedef enum _Ecore_X_Illume_Mode
|
||||
|
@ -1018,6 +1021,13 @@ typedef enum _Ecore_X_Illume_Mode
|
|||
ECORE_X_ILLUME_MODE_DUAL
|
||||
} Ecore_X_Illume_Mode;
|
||||
|
||||
typedef enum _Ecore_X_Illume_Quickpanel_State
|
||||
{
|
||||
ECORE_X_ILLUME_QUICKPANEL_STATE_UNKNOWN = 0,
|
||||
ECORE_X_ILLUME_QUICKPANEL_STATE_OFF,
|
||||
ECORE_X_ILLUME_QUICKPANEL_STATE_ON
|
||||
} Ecore_X_Illume_Quickpanel_State;
|
||||
|
||||
/* Window layer constants */
|
||||
#define ECORE_X_WINDOW_LAYER_BELOW 2
|
||||
#define ECORE_X_WINDOW_LAYER_NORMAL 4
|
||||
|
@ -1552,6 +1562,9 @@ EAPI void ecore_x_e_illume_drag_start_send(Ecore_X_Window win);
|
|||
EAPI void ecore_x_e_illume_drag_end_send(Ecore_X_Window win);
|
||||
EAPI void ecore_x_e_illume_quickpanel_set(Ecore_X_Window win, unsigned int is_quickpanel);
|
||||
EAPI int ecore_x_e_illume_quickpanel_get(Ecore_X_Window win);
|
||||
EAPI void ecore_x_e_illume_quickpanel_state_set(Ecore_X_Window win, Ecore_X_Illume_Quickpanel_State state);
|
||||
EAPI Ecore_X_Illume_Quickpanel_State ecore_x_e_illume_quickpanel_state_get(Ecore_X_Window win);
|
||||
EAPI void ecore_x_e_illume_quickpanel_state_send(Ecore_X_Window win, Ecore_X_Illume_Quickpanel_State state);
|
||||
|
||||
EAPI void ecore_x_xinerama_query_screens_prefetch(void);
|
||||
EAPI void ecore_x_xinerama_query_screens_fetch(void);
|
||||
|
|
|
@ -215,5 +215,8 @@ EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_DRAG_LOCKED;
|
|||
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_DRAG_START;
|
||||
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_DRAG_END;
|
||||
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL;
|
||||
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE;
|
||||
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ON;
|
||||
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_OFF;
|
||||
|
||||
#endif /* _ECORE_X_ATOMS_H */
|
||||
|
|
|
@ -238,3 +238,6 @@ EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_DRAG_LOCKED = 0;
|
|||
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_DRAG_START = 0;
|
||||
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_DRAG_END = 0;
|
||||
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL = 0;
|
||||
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE = 0;
|
||||
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ON = 0;
|
||||
EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_QUICKPANEL_OFF = 0;
|
||||
|
|
|
@ -227,7 +227,10 @@ _ecore_x_atoms_init(void)
|
|||
{ "_E_ILLUME_DRAG_LOCKED", &ECORE_X_ATOM_E_ILLUME_DRAG_LOCKED },
|
||||
{ "_E_ILLUME_DRAG_START", &ECORE_X_ATOM_E_ILLUME_DRAG_START },
|
||||
{ "_E_ILLUME_DRAG_END", &ECORE_X_ATOM_E_ILLUME_DRAG_END },
|
||||
{ "_E_ILLUME_QUICKPANEL", &ECORE_X_ATOM_E_ILLUME_QUICKPANEL }
|
||||
{ "_E_ILLUME_QUICKPANEL", &ECORE_X_ATOM_E_ILLUME_QUICKPANEL },
|
||||
{ "_E_ILLUME_QUICKPANEL_STATE", &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE },
|
||||
{ "_E_ILLUME_QUICKPANEL_ON", &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ON },
|
||||
{ "_E_ILLUME_QUICKPANEL_OFF", &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_OFF }
|
||||
};
|
||||
Atom *atoms;
|
||||
char **names;
|
||||
|
|
|
@ -139,7 +139,7 @@ EAPI Ecore_X_Virtual_Keyboard_State
|
|||
ecore_x_e_virtual_keyboard_state_get(Ecore_X_Window win)
|
||||
{
|
||||
Ecore_X_Atom atom;
|
||||
|
||||
|
||||
if (!ecore_x_window_prop_atom_get(win, ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_STATE,
|
||||
&atom, 1))
|
||||
return ECORE_X_VIRTUAL_KEYBOARD_STATE_UNKNOWN;
|
||||
|
@ -293,6 +293,31 @@ ecore_x_e_illume_drag_end_send(Ecore_X_Window win)
|
|||
1, 0, 0, 0, 0);
|
||||
}
|
||||
|
||||
static Ecore_X_Atom
|
||||
_ecore_x_e_quickpanel_atom_get(Ecore_X_Illume_Quickpanel_State state)
|
||||
{
|
||||
switch (state)
|
||||
{
|
||||
case ECORE_X_ILLUME_QUICKPANEL_STATE_ON:
|
||||
return ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ON;
|
||||
case ECORE_X_ILLUME_QUICKPANEL_STATE_OFF:
|
||||
return ECORE_X_ATOM_E_ILLUME_QUICKPANEL_OFF;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static Ecore_X_Illume_Quickpanel_State
|
||||
_ecore_x_e_quickpanel_state_get(Ecore_X_Atom atom)
|
||||
{
|
||||
if (atom == ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ON)
|
||||
return ECORE_X_ILLUME_QUICKPANEL_STATE_ON;
|
||||
if (atom == ECORE_X_ATOM_E_ILLUME_QUICKPANEL_OFF)
|
||||
return ECORE_X_ILLUME_QUICKPANEL_STATE_OFF;
|
||||
return ECORE_X_ILLUME_QUICKPANEL_STATE_UNKNOWN;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
ecore_x_e_illume_quickpanel_set(Ecore_X_Window win, unsigned int is_quickpanel)
|
||||
{
|
||||
|
@ -310,3 +335,33 @@ ecore_x_e_illume_quickpanel_get(Ecore_X_Window win)
|
|||
return 0;
|
||||
return val;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
ecore_x_e_illume_quickpanel_state_set(Ecore_X_Window win, Ecore_X_Illume_Quickpanel_State state)
|
||||
{
|
||||
Ecore_X_Atom atom = 0;
|
||||
|
||||
atom = _ecore_x_e_quickpanel_atom_get(state);
|
||||
ecore_x_window_prop_atom_set(win, ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE,
|
||||
&atom, 1);
|
||||
}
|
||||
|
||||
EAPI Ecore_X_Illume_Quickpanel_State
|
||||
ecore_x_e_illume_quickpanel_state_get(Ecore_X_Window win)
|
||||
{
|
||||
Ecore_X_Atom atom;
|
||||
|
||||
if (!ecore_x_window_prop_atom_get(win, ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE,
|
||||
&atom, 1))
|
||||
return ECORE_X_ILLUME_QUICKPANEL_STATE_UNKNOWN;
|
||||
return _ecore_x_e_quickpanel_state_get(atom);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
ecore_x_e_illume_quickpanel_state_send(Ecore_X_Window win, Ecore_X_Illume_Quickpanel_State state)
|
||||
{
|
||||
ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE,
|
||||
ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
|
||||
_ecore_x_e_quickpanel_atom_get(state),
|
||||
0, 0, 0, 0);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue