forked from enlightenment/efl
elm_win: remove illume command send from eo
1. remain elm_win_type_set 2. remain elm_win_alpha_set 3. remain elm_win_available_profile_set/get app usually set availble profile into window, and app fw or other lib can read it. so I remain get/set api both. 4. remove elm_win_profile_set/get from eo 5. remove illume feture in eo and move it to legacy
This commit is contained in:
parent
2bf508836d
commit
a3b8fefa24
|
@ -4626,44 +4626,6 @@ _elm_win_available_profiles_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, char ***p
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static void
|
|
||||||
_elm_win_profile_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, const char *profile)
|
|
||||||
{
|
|
||||||
/* check to see if a given profile is present in an available profiles */
|
|
||||||
if ((profile) && (sd->profile.available_list))
|
|
||||||
{
|
|
||||||
Eina_Bool found = EINA_FALSE;
|
|
||||||
unsigned int i;
|
|
||||||
for (i = 0; i < sd->profile.count; i++)
|
|
||||||
{
|
|
||||||
if (!strcmp(profile,
|
|
||||||
sd->profile.available_list[i]))
|
|
||||||
{
|
|
||||||
found = EINA_TRUE;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!found) return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ecore_evas_window_profile_supported_get(sd->ee))
|
|
||||||
{
|
|
||||||
if (!profile) _elm_win_profile_del(sd);
|
|
||||||
ecore_evas_window_profile_set(sd->ee, profile);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (_internal_elm_win_profile_set(sd, profile))
|
|
||||||
_elm_win_profile_update(sd);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
EOLIAN static const char*
|
|
||||||
_elm_win_profile_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd)
|
|
||||||
{
|
|
||||||
return sd->profile.name;
|
|
||||||
}
|
|
||||||
|
|
||||||
EOLIAN static void
|
EOLIAN static void
|
||||||
_elm_win_urgent_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, Elm_Win_Urgent_Mode urgent)
|
_elm_win_urgent_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, Elm_Win_Urgent_Mode urgent)
|
||||||
{
|
{
|
||||||
|
@ -5023,43 +4985,6 @@ _elm_win_prop_focus_skip_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, Eina_Bool sk
|
||||||
TRAP(sd, focus_skip_set, skip);
|
TRAP(sd, focus_skip_set, skip);
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static void
|
|
||||||
_elm_win_illume_command_send(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, Elm_Illume_Command command, void *params)
|
|
||||||
{
|
|
||||||
(void) params;
|
|
||||||
|
|
||||||
#ifdef HAVE_ELEMENTARY_X
|
|
||||||
_internal_elm_win_xwindow_get(sd);
|
|
||||||
if (sd->x.xwin)
|
|
||||||
{
|
|
||||||
switch (command)
|
|
||||||
{
|
|
||||||
case ELM_ILLUME_COMMAND_FOCUS_BACK:
|
|
||||||
ecore_x_e_illume_focus_back_send(sd->x.xwin);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case ELM_ILLUME_COMMAND_FOCUS_FORWARD:
|
|
||||||
ecore_x_e_illume_focus_forward_send(sd->x.xwin);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case ELM_ILLUME_COMMAND_FOCUS_HOME:
|
|
||||||
ecore_x_e_illume_focus_home_send(sd->x.xwin);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case ELM_ILLUME_COMMAND_CLOSE:
|
|
||||||
ecore_x_e_illume_close_send(sd->x.xwin);
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
(void)sd;
|
|
||||||
(void)command;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
EOLIAN static Eina_Bool
|
EOLIAN static Eina_Bool
|
||||||
_elm_win_keygrab_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, const char *key, Evas_Modifier_Mask modifiers EINA_UNUSED, Evas_Modifier_Mask not_modifiers EINA_UNUSED, int priority EINA_UNUSED, Elm_Win_Keygrab_Mode grab_mode)
|
_elm_win_keygrab_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, const char *key, Evas_Modifier_Mask modifiers EINA_UNUSED, Evas_Modifier_Mask not_modifiers EINA_UNUSED, int priority EINA_UNUSED, Elm_Win_Keygrab_Mode grab_mode)
|
||||||
{
|
{
|
||||||
|
@ -6360,4 +6285,88 @@ elm_win_size_step_get(const Evas_Object *obj, int *w, int *h)
|
||||||
efl_gfx_size_hint_step_get(obj, w, h);
|
efl_gfx_size_hint_step_get(obj, w, h);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EAPI void
|
||||||
|
elm_win_illume_command_send(Evas_Object *obj, Elm_Illume_Command command, void *params)
|
||||||
|
{
|
||||||
|
ELM_WIN_CHECK(obj);
|
||||||
|
ELM_WIN_DATA_GET_OR_RETURN(obj, sd);
|
||||||
|
|
||||||
|
(void) params;
|
||||||
|
|
||||||
|
#ifdef HAVE_ELEMENTARY_X
|
||||||
|
_internal_elm_win_xwindow_get(sd);
|
||||||
|
if (sd->x.xwin)
|
||||||
|
{
|
||||||
|
switch (command)
|
||||||
|
{
|
||||||
|
case ELM_ILLUME_COMMAND_FOCUS_BACK:
|
||||||
|
ecore_x_e_illume_focus_back_send(sd->x.xwin);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ELM_ILLUME_COMMAND_FOCUS_FORWARD:
|
||||||
|
ecore_x_e_illume_focus_forward_send(sd->x.xwin);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ELM_ILLUME_COMMAND_FOCUS_HOME:
|
||||||
|
ecore_x_e_illume_focus_home_send(sd->x.xwin);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ELM_ILLUME_COMMAND_CLOSE:
|
||||||
|
ecore_x_e_illume_close_send(sd->x.xwin);
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
(void)sd;
|
||||||
|
(void)command;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
EAPI void
|
||||||
|
elm_win_profile_set(Evas_Object *obj, const char *profile)
|
||||||
|
{
|
||||||
|
ELM_WIN_CHECK(obj);
|
||||||
|
ELM_WIN_DATA_GET_OR_RETURN(obj, sd);
|
||||||
|
|
||||||
|
/* check to see if a given profile is present in an available profiles */
|
||||||
|
if ((profile) && (sd->profile.available_list))
|
||||||
|
{
|
||||||
|
Eina_Bool found = EINA_FALSE;
|
||||||
|
unsigned int i;
|
||||||
|
for (i = 0; i < sd->profile.count; i++)
|
||||||
|
{
|
||||||
|
if (!strcmp(profile,
|
||||||
|
sd->profile.available_list[i]))
|
||||||
|
{
|
||||||
|
found = EINA_TRUE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!found) return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ecore_evas_window_profile_supported_get(sd->ee))
|
||||||
|
{
|
||||||
|
if (!profile) _elm_win_profile_del(sd);
|
||||||
|
ecore_evas_window_profile_set(sd->ee, profile);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (_internal_elm_win_profile_set(sd, profile))
|
||||||
|
_elm_win_profile_update(sd);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
EAPI const char*
|
||||||
|
elm_win_profile_get(const Evas_Object *obj)
|
||||||
|
{
|
||||||
|
ELM_WIN_CHECK(obj) NULL;
|
||||||
|
ELM_WIN_DATA_GET_OR_RETURN(obj, sd, NULL);
|
||||||
|
|
||||||
|
return sd->profile.name;
|
||||||
|
}
|
||||||
|
|
||||||
#include "elm_win.eo.c"
|
#include "elm_win.eo.c"
|
||||||
|
|
|
@ -130,20 +130,6 @@ enum Elm.Win.Keygrab_Mode
|
||||||
window]]
|
window]]
|
||||||
}
|
}
|
||||||
|
|
||||||
enum Elm.Illume_Command
|
|
||||||
{
|
|
||||||
[[Available commands that can be sent to the Illume manager.
|
|
||||||
|
|
||||||
When running under an Illume session, a window may send commands to the
|
|
||||||
Illume manager to perform different actions.
|
|
||||||
]]
|
|
||||||
|
|
||||||
focus_back, [[Reverts focus to the previous window]]
|
|
||||||
focus_forward, [[Sends focus to the next window in the list]]
|
|
||||||
focus_home, [[Hides all windows to show the Home screen]]
|
|
||||||
close [[Closes the currently active window]]
|
|
||||||
}
|
|
||||||
|
|
||||||
enum Elm.Win.Modal_Mode
|
enum Elm.Win.Modal_Mode
|
||||||
{
|
{
|
||||||
[[Defines the mode of a modal window]]
|
[[Defines the mode of a modal window]]
|
||||||
|
@ -583,6 +569,32 @@ class Elm.Win (Elm.Widget, Elm.Interface.Atspi.Window,
|
||||||
name: string @nullable;
|
name: string @nullable;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@property type { /* FIXME: before finalize */
|
||||||
|
[[The type of the window.
|
||||||
|
|
||||||
|
It is a hint of how the Window Manager should handle it.
|
||||||
|
|
||||||
|
The window type is a constructing property that need to be set at
|
||||||
|
creation within \@ref eo_add.
|
||||||
|
|
||||||
|
Note: Once set, it can NOT be modified afterward.
|
||||||
|
]]
|
||||||
|
/* FIXME-doc
|
||||||
|
Example:
|
||||||
|
@code
|
||||||
|
win = eo_add(ELM_WIN_CLASS, NULL, elm_obj_win_type_set(ELM_WIN_BASIC));
|
||||||
|
@endcode
|
||||||
|
*/
|
||||||
|
set {
|
||||||
|
[[Can only be used at creation time, within \@ref eo_add.]]
|
||||||
|
}
|
||||||
|
get {
|
||||||
|
[[If the object is not window object, return #ELM_WIN_UNKNOWN.]]
|
||||||
|
}
|
||||||
|
values {
|
||||||
|
type: Elm.Win.Type(Elm.Win.Type.unknown);
|
||||||
|
}
|
||||||
|
}
|
||||||
@property available_profiles {
|
@property available_profiles {
|
||||||
set {
|
set {
|
||||||
[[Set the array of available profiles to a window.
|
[[Set the array of available profiles to a window.
|
||||||
|
@ -664,23 +676,6 @@ class Elm.Win (Elm.Widget, Elm.Interface.Atspi.Window,
|
||||||
layer: int; [[The layer of the window.]]
|
layer: int; [[The layer of the window.]]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@property profile {
|
|
||||||
set {
|
|
||||||
[[Set the profile of a window.
|
|
||||||
|
|
||||||
@since 1.8
|
|
||||||
]]
|
|
||||||
}
|
|
||||||
get {
|
|
||||||
[[Get the profile of a window.
|
|
||||||
|
|
||||||
@since 1.8
|
|
||||||
]]
|
|
||||||
}
|
|
||||||
values {
|
|
||||||
profile: string; [[The string value of a window profile.]]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@property main_menu {
|
@property main_menu {
|
||||||
get {
|
get {
|
||||||
[[Get the Main Menu of a window.]]
|
[[Get the Main Menu of a window.]]
|
||||||
|
@ -714,32 +709,6 @@ class Elm.Win (Elm.Widget, Elm.Interface.Atspi.Window,
|
||||||
return: Evas.Object; [[The inlined image object or $null if none exists.]]
|
return: Evas.Object; [[The inlined image object or $null if none exists.]]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@property type { /* FIXME: before finalize */
|
|
||||||
[[The type of the window.
|
|
||||||
|
|
||||||
It is a hint of how the Window Manager should handle it.
|
|
||||||
|
|
||||||
The window type is a constructing property that need to be set at
|
|
||||||
creation within \@ref eo_add.
|
|
||||||
|
|
||||||
Note: Once set, it can NOT be modified afterward.
|
|
||||||
]]
|
|
||||||
/* FIXME-doc
|
|
||||||
Example:
|
|
||||||
@code
|
|
||||||
win = eo_add(ELM_WIN_CLASS, NULL, elm_obj_win_type_set(ELM_WIN_BASIC));
|
|
||||||
@endcode
|
|
||||||
*/
|
|
||||||
set {
|
|
||||||
[[Can only be used at creation time, within \@ref eo_add.]]
|
|
||||||
}
|
|
||||||
get {
|
|
||||||
[[If the object is not window object, return #ELM_WIN_UNKNOWN.]]
|
|
||||||
}
|
|
||||||
values {
|
|
||||||
type: Elm.Win.Type(Elm.Win.Type.unknown);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@property fake_canvas @protected {
|
@property fake_canvas @protected {
|
||||||
set {
|
set {
|
||||||
[[Internal. Used to completent the fake window type.]]
|
[[Internal. Used to completent the fake window type.]]
|
||||||
|
@ -764,21 +733,6 @@ class Elm.Win (Elm.Widget, Elm.Interface.Atspi.Window,
|
||||||
id that created the service.]]
|
id that created the service.]]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
illume_command_send {
|
|
||||||
[[Send a command to the windowing environment
|
|
||||||
|
|
||||||
This is intended to work in touchscreen or small screen device
|
|
||||||
environments where there is a more simplistic window management
|
|
||||||
policy in place. This uses the window object indicated to select
|
|
||||||
which part of the environment to control (the part that this
|
|
||||||
window lives in), and provides a command and an optional
|
|
||||||
parameter structure (use NULL for this if not needed).
|
|
||||||
]]
|
|
||||||
params {
|
|
||||||
@in command: Elm.Illume_Command; [[The command to send.]]
|
|
||||||
@in params: void * @optional; [[Optional parameters for the command.]]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
activate {
|
activate {
|
||||||
[[Activate a window object.
|
[[Activate a window object.
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,25 @@ typedef enum
|
||||||
ELM_WIN_INDICATOR_TRANSPARENT /** Transparentizes the indicator */
|
ELM_WIN_INDICATOR_TRANSPARENT /** Transparentizes the indicator */
|
||||||
} Elm_Win_Indicator_Opacity_Mode;
|
} Elm_Win_Indicator_Opacity_Mode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Available commands that can be sent to the Illume manager.
|
||||||
|
*
|
||||||
|
* When running under an Illume session, a window may send commands to the
|
||||||
|
* Illume manager to perform different actions.
|
||||||
|
*
|
||||||
|
* @ingroup Elm
|
||||||
|
*/
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
ELM_ILLUME_COMMAND_FOCUS_BACK = 0, /** Reverts focus to the previous window
|
||||||
|
*/
|
||||||
|
ELM_ILLUME_COMMAND_FOCUS_FORWARD, /** Sends focus to the next window in the
|
||||||
|
* list */
|
||||||
|
ELM_ILLUME_COMMAND_FOCUS_HOME, /** Hides all windows to show the Home screen
|
||||||
|
*/
|
||||||
|
ELM_ILLUME_COMMAND_CLOSE /** Closes the currently active window */
|
||||||
|
} Elm_Illume_Command;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a window object. If this is the first window created, pass NULL as
|
* Adds a window object. If this is the first window created, pass NULL as
|
||||||
* @p parent.
|
* @p parent.
|
||||||
|
@ -904,3 +923,40 @@ EAPI void elm_win_size_step_set(Evas_Object *obj, int w, int h);
|
||||||
*/
|
*/
|
||||||
EAPI void elm_win_size_step_get(const Evas_Object *obj, int *w, int *h);
|
EAPI void elm_win_size_step_get(const Evas_Object *obj, int *w, int *h);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Send a command to the windowing environment
|
||||||
|
*
|
||||||
|
* This is intended to work in touchscreen or small screen device environments
|
||||||
|
* where there is a more simplistic window management policy in place. This
|
||||||
|
* uses the window object indicated to select which part of the environment to
|
||||||
|
* control (the part that this window lives in), and provides a command and an
|
||||||
|
* optional parameter structure (use NULL for this if not needed).
|
||||||
|
*
|
||||||
|
* @param[in] params Optional parameters for the command.
|
||||||
|
*
|
||||||
|
* @ingroup Elm_Win
|
||||||
|
*/
|
||||||
|
EAPI void elm_win_illume_command_send(Evas_Object *obj, Elm_Illume_Command command, void *params);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Set the profile of a window.
|
||||||
|
*
|
||||||
|
* @param[in] profile The string value of a window profile.
|
||||||
|
*
|
||||||
|
* @since 1.8
|
||||||
|
*
|
||||||
|
* @ingroup Elm_Win
|
||||||
|
*/
|
||||||
|
EAPI void elm_win_profile_set(Evas_Object *obj, const char *profile);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Get the profile of a window.
|
||||||
|
*
|
||||||
|
* @return The string value of a window profile.
|
||||||
|
*
|
||||||
|
* @since 1.8
|
||||||
|
*
|
||||||
|
* @ingroup Elm_Win
|
||||||
|
*/
|
||||||
|
EAPI const char *elm_win_profile_get(const Evas_Object *obj);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue