*/
EAPI Eina_Bool ecore_evas_maximized_get(const Ecore_Evas *ee);
/**
+ * @brief Set Ecore_Evas's window profile list.
+ *
+ * @param ee The Ecore_Evas
+ * @param profiles The profile name list
+ * @param num_profiles The number of profile names
+ *
+ * @warning Support for this depends on the underlying windowing system.
+ * @since 1.3.0
+ */
+EAPI void ecore_evas_profiles_set(Ecore_Evas *ee, const char **profiles, unsigned int num_profiles);
+/**
+ * @brief Get Ecore_Evas's window profile name.
+ *
+ * @param ee The Ecore_Evas
+ * @return The profile name
+ *
+ * @since 1.3.0
+ */
+EAPI const char *ecore_evas_profile_get(const Ecore_Evas *ee);
+/**
* @brief Move an Ecore_Evas.
*
* @param ee The Ecore_Evas to move
}
EAPI void
+ecore_evas_profiles_set(Ecore_Evas *ee, const char **profiles, unsigned int num_profiles)
+{
+ if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
+ {
+ ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
+ "ecore_evas_profiles_set");
+ return;
+ }
+ IFC(ee, fn_profiles_set) (ee, profiles, num_profiles);
+ IFE;
+}
+
+EAPI const char *
+ecore_evas_profile_get(const Ecore_Evas *ee)
+{
+ if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
+ {
+ ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
+ "ecore_evas_profile_get");
+ return NULL;
+ }
+ return ee->prop.profile;
+}
+
+EAPI void
ecore_evas_fullscreen_set(Ecore_Evas *ee, Eina_Bool on)
{
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
NULL,
_ecore_evas_buffer_alpha_set,
NULL, //transparent
+ NULL, // profiles_set
NULL,
NULL,
NULL,
NULL,
NULL, //transparent
+ NULL, // profiles_set
NULL,
NULL,
NULL, /* ignore events */
NULL, /* alpha */
NULL, //transparent
+ NULL, // profiles_set
NULL,
NULL,
_ecore_evas_ews_ignore_events_set,
_ecore_evas_ews_alpha_set,
_ecore_evas_ews_transparent_set,
+ NULL, // profiles_set
NULL,
NULL,
NULL,
_ecore_evas_extn_socket_alpha_set,
NULL, //transparent
+ NULL, // profiles_set
NULL,
NULL,
NULL,
NULL,
NULL, //transparent
+ NULL, // profiles_set
NULL,
NULL,
void (*fn_ignore_events_set) (Ecore_Evas *ee, int ignore);
void (*fn_alpha_set) (Ecore_Evas *ee, int alpha);
void (*fn_transparent_set) (Ecore_Evas *ee, int transparent);
+ void (*fn_profiles_set) (Ecore_Evas *ee, const char **profiles, int num_profiles);
void (*fn_window_group_set) (Ecore_Evas *ee, const Ecore_Evas *ee_group);
void (*fn_aspect_set) (Ecore_Evas *ee, double aspect);
char *title;
char *name;
char *clas;
+ char *profile;
struct {
int w, h;
} min,
NULL,
NULL,
NULL, //transparent
+ NULL, // profiles_set
NULL,
NULL,
NULL,
NULL,
NULL, //transparent
+ NULL, // profiles_set
NULL,
NULL,
_ecore_evas_wl_ignore_events_set,
_ecore_evas_wl_alpha_set,
_ecore_evas_wl_transparent_set,
+ NULL, // func profiles set
NULL,
NULL,
NULL,
_ecore_evas_wl_ignore_events_set,
_ecore_evas_wl_alpha_set,
_ecore_evas_wl_transparent_set,
+ NULL, // func profiles set
NULL,
NULL,
NULL,
NULL, /* _ecore_evas_x_ignore_events_set */
NULL, /* _ecore_evas_x_alpha_set */
NULL, //transparent
+ NULL, // profiles_set
NULL,
NULL,
NULL, /* _ecore_evas_x_ignore_events_set */
NULL, /* _ecore_evas_x_alpha_set */
NULL, //transparent
+ NULL, // profiles_set
NULL,
NULL,
break;
}
}
+ else if (e->atom == ECORE_X_ATOM_E_PROFILE)
+ {
+ char *p = ecore_x_e_window_profile_get(e->win);
+ if ((p) && (ee->prop.profile))
+ {
+ if (strcmp(p, ee->prop.profile) != 0)
+ {
+ free(ee->prop.profile);
+ ee->prop.profile = strdup(p);
+ state_change = 1;
+ }
+ }
+ else if ((!p) && (ee->prop.profile))
+ {
+ free(ee->prop.profile);
+ ee->prop.profile = NULL;
+ state_change = 1;
+ }
+ else if ((p) && (!ee->prop.profile))
+ {
+ ee->prop.profile = strdup(p);
+ state_change = 1;
+ }
+
+ if (p)
+ free(p);
+ }
+
if (state_change)
{
if (ee->func.fn_state_change) ee->func.fn_state_change(ee);
}
static void
+_ecore_evas_x_profiles_set(Ecore_Evas *ee, const char **plist, int n)
+{
+ /* Ecore_Evas's profile will be updated when WM sets the E_PROFILE. */
+ ecore_x_e_window_profile_list_set(ee->prop.window, plist, n);
+}
+
+static void
_ecore_evas_x_avoid_damage_set(Ecore_Evas *ee, int on)
{
if (ee->prop.avoid_damage == on) return;
_ecore_evas_x_ignore_events_set,
_ecore_evas_x_alpha_set,
_ecore_evas_x_transparent_set,
+ _ecore_evas_x_profiles_set,
_ecore_evas_x_window_group_set,
_ecore_evas_x_aspect_set,
EAPI Ecore_X_Pixmap
ecore_x_e_comp_pixmap_get(Ecore_X_Window win);
+/**
+ * @brief Set the window profile list.
+ *
+ * @param win The window
+ * @param profiles The profile name list
+ * @param num_profiles The number of profile names
+ *
+ * @since 1.3.0
+ */
+EAPI void
+ecore_x_e_window_profile_list_set(Ecore_X_Window win,
+ const char **profiles,
+ unsigned int num_profiles);
+
+/**
+ * @brief Get the window profile list.
+ *
+ * @param win The window
+ * @param[out] profiles Returns the profile name list
+ * @param[out] ret_num Returns the number of profile names
+ *
+ * @since 1.3.0
+ */
+EAPI Eina_Bool
+ecore_x_e_window_profile_list_get(Ecore_X_Window win,
+ const char ***profiles,
+ int *ret_num);
+
+/**
+ * @brief Set the window profile.
+ *
+ * @param win The window
+ * @param profile The profile name
+ *
+ * @since 1.3.0
+ */
+EAPI void
+ecore_x_e_window_profile_set(Ecore_X_Window win,
+ const char *profile);
+
+/**
+ * @brief Get the window profile.
+ *
+ * @param win The window
+ * @return The profile name
+ *
+ * @since 1.3.0
+ */
+EAPI char *
+ecore_x_e_window_profile_get(Ecore_X_Window win);
+
EAPI Ecore_X_Sync_Alarm
ecore_x_sync_alarm_new(Ecore_X_Sync_Counter counter);
EAPI Eina_Bool
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_VIDEO_PARENT;
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_VIDEO_POSITION;
+/* currently elementary and E specific extension */
+EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_PROFILE;
+EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_PROFILE_LIST;
+
/* for sliding window */
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_SLIDING_WIN_STATE;
EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_SLIDING_WIN_GEOMETRY;
/* for SDB(Samsung Debug Bridge) */
EAPI Ecore_X_Atom ECORE_X_ATOM_SDB_SERVER_CONNECT = 0;
EAPI Ecore_X_Atom ECORE_X_ATOM_SDB_SERVER_DISCONNECT = 0;
+
+/* currently elementary and E specific extension */
+EAPI Ecore_X_Atom ECORE_X_ATOM_E_PROFILE = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_E_PROFILE_LIST = 0;
{ "_E_COMP_DUMP", &ECORE_X_ATOM_E_COMP_DUMP },
{ "_E_COMP_PIXMAP", &ECORE_X_ATOM_E_COMP_PIXMAP },
{ "_E_VIDEO_PARENT", &ECORE_X_ATOM_E_VIDEO_PARENT },
- { "_E_VIDEO_POSITION", &ECORE_X_ATOM_E_VIDEO_POSITION }
+ { "_E_VIDEO_POSITION", &ECORE_X_ATOM_E_VIDEO_POSITION },
+
+ { "_E_PROFILE", &ECORE_X_ATOM_E_PROFILE },
+ { "_E_PROFILE_LIST", &ECORE_X_ATOM_E_PROFILE_LIST }
};
void
}
EAPI void
+ecore_x_e_window_profile_list_set(Ecore_X_Window win,
+ const char **profiles,
+ unsigned int num_profiles)
+{
+ Ecore_X_Atom *atoms;
+
+ LOGFN(__FILE__, __LINE__, __FUNCTION__);
+ if (!win)
+ return;
+
+ if (!num_profiles)
+ ecore_x_window_prop_property_del(win, ECORE_X_ATOM_E_PROFILE_LIST);
+ else
+ {
+ atoms = alloca(num_profiles * sizeof(Ecore_X_Atom));
+ ecore_x_atoms_get(profiles, num_profiles, atoms);
+ ecore_x_window_prop_property_set(win,
+ ECORE_X_ATOM_E_PROFILE_LIST,
+ XA_ATOM, 32, (void *)atoms,
+ num_profiles);
+ }
+}
+
+EAPI Eina_Bool
+ecore_x_e_window_profile_list_get(Ecore_X_Window win,
+ const char ***profiles,
+ int *ret_num)
+{
+ unsigned char *data = NULL;
+ Ecore_X_Atom *atoms;
+ int num, i;
+
+ if (ret_num)
+ *ret_num = 0;
+
+ if (profiles)
+ *profiles = NULL;
+
+ if (!win)
+ return EINA_FALSE;
+
+ LOGFN(__FILE__, __LINE__, __FUNCTION__);
+ if (!ecore_x_window_prop_property_get(win,
+ ECORE_X_ATOM_E_PROFILE_LIST,
+ XA_ATOM, 32, &data, &num))
+ return EINA_FALSE;
+
+ if (ret_num)
+ *ret_num = num;
+
+ if (profiles)
+ {
+ (*profiles) = calloc(num, sizeof(char *));
+ if (!(*profiles))
+ {
+ if (ret_num)
+ *ret_num = 0;
+
+ if (data)
+ free(data);
+
+ return EINA_FALSE;
+ }
+
+ atoms = (Ecore_X_Atom *)data;
+ for (i = 0; i < num; i++)
+ (*profiles)[i] = ecore_x_atom_name_get(atoms[i]);
+ }
+
+ if (data)
+ free(data);
+
+ return EINA_TRUE;
+}
+
+EAPI void
+ecore_x_e_window_profile_set(Ecore_X_Window win,
+ const char *profile)
+{
+ Ecore_X_Atom atom;
+
+ LOGFN(__FILE__, __LINE__, __FUNCTION__);
+ if (!win)
+ return;
+
+ if (!profile)
+ ecore_x_window_prop_property_del(win, ECORE_X_ATOM_E_PROFILE);
+ else
+ {
+ atom = ecore_x_atom_get(profile);
+ ecore_x_window_prop_property_set(win, ECORE_X_ATOM_E_PROFILE,
+ XA_ATOM, 32, (void *)&atom, 1);
+ }
+}
+
+EAPI char *
+ecore_x_e_window_profile_get(Ecore_X_Window win)
+{
+ Ecore_X_Atom *atom = NULL;
+ unsigned char *data;
+ char *profile = NULL;
+ int num;
+
+ LOGFN(__FILE__, __LINE__, __FUNCTION__);
+ if (!ecore_x_window_prop_property_get(win, ECORE_X_ATOM_E_PROFILE,
+ XA_ATOM, 32, &data, &num))
+ return NULL;
+
+ if (data)
+ atom = (Ecore_X_Atom *)data;
+
+ if (atom)
+ profile = ecore_x_atom_name_get(atom[0]);
+
+ return profile;
+}
+
+EAPI void
ecore_x_e_comp_sync_supported_set(Ecore_X_Window root,
Eina_Bool enabled)
{
{ "_E_COMP_DUMP", &ECORE_X_ATOM_E_COMP_DUMP },
{ "_E_COMP_PIXMAP", &ECORE_X_ATOM_E_COMP_PIXMAP },
{ "_E_VIDEO_PARENT", &ECORE_X_ATOM_E_VIDEO_PARENT },
- { "_E_VIDEO_POSITION", &ECORE_X_ATOM_E_VIDEO_POSITION }
+ { "_E_VIDEO_POSITION", &ECORE_X_ATOM_E_VIDEO_POSITION },
+
+ { "_E_PROFILE", &ECORE_X_ATOM_E_PROFILE },
+ { "_E_PROFILE_LIST", &ECORE_X_ATOM_E_PROFILE_LIST }
/* SLP additions after the comma */ ,
}
EAPI void
+ecore_x_e_window_profile_list_set(Ecore_X_Window win,
+ const char **profiles,
+ unsigned int num_profiles)
+{
+ Ecore_X_Atom *atoms;
+
+ LOGFN(__FILE__, __LINE__, __FUNCTION__);
+ if (!win)
+ return;
+
+ if (!num_profiles)
+ ecore_x_window_prop_property_del(win, ECORE_X_ATOM_E_PROFILE_LIST);
+ else
+ {
+ atoms = alloca(num_profiles * sizeof(Ecore_X_Atom));
+ ecore_x_atoms_get(profiles, num_profiles, atoms);
+ ecore_x_window_prop_property_set(win,
+ ECORE_X_ATOM_E_PROFILE_LIST,
+ XA_ATOM, 32, (void *)atoms,
+ num_profiles);
+ }
+}
+
+EAPI Eina_Bool
+ecore_x_e_window_profile_list_get(Ecore_X_Window win,
+ const char ***profiles,
+ int *ret_num)
+{
+ unsigned char *data;
+ Ecore_X_Atom *atoms;
+ int num, i;
+
+ if (ret_num)
+ *ret_num = 0;
+
+ if (profiles)
+ *profiles = NULL;
+
+ if (!win)
+ return EINA_FALSE;
+
+ LOGFN(__FILE__, __LINE__, __FUNCTION__);
+ if (!ecore_x_window_prop_property_get(win,
+ ECORE_X_ATOM_E_PROFILE_LIST,
+ XA_ATOM, 32, &data, &num))
+ return EINA_FALSE;
+
+ if (ret_num)
+ *ret_num = num;
+
+ if (profiles)
+ {
+ (*profiles) = calloc(num, sizeof(char *));
+ if (!(*profiles))
+ {
+ if (ret_num)
+ *ret_num = 0;
+
+ if (data)
+ free(data);
+
+ return EINA_FALSE;
+ }
+
+ atoms = (Ecore_X_Atom *)data;
+ for (i = 0; i < num; i++)
+ (*profiles)[i] = ecore_x_atom_name_get(atoms[i]);
+ }
+
+ if (data)
+ XFree(data);
+
+ return EINA_TRUE;
+}
+
+EAPI void
+ecore_x_e_window_profile_set(Ecore_X_Window win,
+ const char *profile)
+{
+ Ecore_X_Atom atom;
+
+ LOGFN(__FILE__, __LINE__, __FUNCTION__);
+ if (!win)
+ return;
+
+ if (!profile)
+ ecore_x_window_prop_property_del(win, ECORE_X_ATOM_E_PROFILE);
+ else
+ {
+ atom = ecore_x_atom_get(profile);
+ ecore_x_window_prop_property_set(win, ECORE_X_ATOM_E_PROFILE,
+ XA_ATOM, 32, (void *)&atom, 1);
+ }
+}
+
+EAPI char *
+ecore_x_e_window_profile_get(Ecore_X_Window win)
+{
+ Ecore_X_Atom *atom = NULL;
+ unsigned char *data;
+ char *profile = NULL;
+ int num;
+
+ LOGFN(__FILE__, __LINE__, __FUNCTION__);
+ if (!ecore_x_window_prop_property_get(win, ECORE_X_ATOM_E_PROFILE,
+ XA_ATOM, 32, &data, &num))
+ return NULL;
+
+ if (data)
+ atom = (Ecore_X_Atom *)data;
+
+ if (atom)
+ profile = ecore_x_atom_name_get(atom[0]);
+
+ return profile;
+}
+
+EAPI void
ecore_x_e_comp_sync_supported_set(Ecore_X_Window root,
Eina_Bool enabled)
{