])
e_libs="$E_LIBS $LIBINTL $fnmatch_libs $execinfo_libs"
-e_cflags="-DUSE_E_CONFIG_H $E_CFLAGS"
-e_configflags="-DUSE_E_CONFIG_H"
+e_cflags="-DUSE_E_CONFIG_H $E_CFLAGS -D_F_ZONE_WINDOW_ROTATION_"
+e_configflags="-DUSE_E_CONFIG_H -D_F_ZONE_WINDOW_ROTATION_"
AC_SUBST([e_libs])
AC_SUBST([e_cflags])
EAPI int E_EVENT_CLIENT_PROPERTY = -1;
EAPI int E_EVENT_CLIENT_FULLSCREEN = -1;
EAPI int E_EVENT_CLIENT_UNFULLSCREEN = -1;
+#ifdef _F_ZONE_WINDOW_ROTATION_
+EAPI int E_EVENT_CLIENT_ROTATION_CHANGE_BEGIN = -1;
+EAPI int E_EVENT_CLIENT_ROTATION_CHANGE_CANCEL = -1;
+EAPI int E_EVENT_CLIENT_ROTATION_CHANGE_END = -1;
+#endif
static Eina_Hash *clients_hash = NULL; // pixmap->client
eina_stringshare_replace(&ec->netwm.icon_name, NULL);
eina_stringshare_replace(&ec->internal_icon, NULL);
eina_stringshare_replace(&ec->internal_icon_key, NULL);
-
+
focus_stack = eina_list_remove(focus_stack, ec);
raise_stack = eina_list_remove(raise_stack, ec);
E_EVENT_CLIENT_PROPERTY = ecore_event_type_new();
E_EVENT_CLIENT_FULLSCREEN = ecore_event_type_new();
E_EVENT_CLIENT_UNFULLSCREEN = ecore_event_type_new();
+#ifdef _F_ZONE_WINDOW_ROTATION_
+ E_EVENT_CLIENT_ROTATION_CHANGE_BEGIN = ecore_event_type_new();
+ E_EVENT_CLIENT_ROTATION_CHANGE_CANCEL = ecore_event_type_new();
+ E_EVENT_CLIENT_ROTATION_CHANGE_END = ecore_event_type_new();
+#endif
return (!!clients_hash);
}
E_CLIENT_PROPERTY_STICKY = (1 << 7),
} E_Client_Property;
+#ifdef _F_ZONE_WINDOW_ROTATION_
+typedef enum _E_Client_Rotation_Type
+{
+ E_CLIENT_ROTATION_TYPE_NORMAL = 0,
+ E_CLIENT_ROTATION_TYPE_DEPENDENT = 1
+} E_Client_Rotation_Type;
+#endif
+
typedef struct E_Client E_Client;
typedef struct E_Event_Client E_Event_Client;
typedef struct E_Event_Client_Zone_Set E_Event_Client_Zone_Set;
typedef struct E_Event_Client_Desk_Set E_Event_Client_Desk_Set;
typedef struct _E_Client_Hook E_Client_Hook;
+#ifdef _F_ZONE_WINDOW_ROTATION_
+typedef struct E_Event_Client E_Event_Client_Rotation_Change_Begin;
+typedef struct E_Event_Client E_Event_Client_Rotation_Change_Cancel;
+typedef struct E_Event_Client E_Event_Client_Rotation_Change_End;
+#endif
typedef enum _E_Client_Hook_Point
{
} profile;
unsigned char centered : 1;
unsigned char video : 1;
+#ifdef _F_ZONE_WINDOW_ROTATION_
+ struct
+ {
+ E_Client_Rotation_Type type;
+ struct
+ {
+ int prev, curr, next, reserve;
+ } ang;
+ struct
+ {
+ int x, y, w, h;
+ } geom[4];
+ unsigned char support : 1;
+ unsigned char geom_hint: 1;
+ unsigned char pending_change_request : 1;
+ unsigned char pending_show : 1; // newly created window that has to be rotated will be show after rotating done.
+ // so, it will be used pending e_border_show called at main eval time.
+ unsigned char wait_for_done: 1;
+ unsigned char app_set : 1; // app wants to communicate with the window manager
+ int rot; // decided rotation by the window manager
+ int preferred_rot; // app specified rotation
+ int *available_rots; // app specified available rotations
+ unsigned int count; // number of elements of available rotations
+ } rot;
+#endif
} state;
struct
{
+#ifdef _F_ZONE_WINDOW_ROTATION_
+ struct
+ {
+ unsigned char support : 1;
+ unsigned char geom_hint : 1;
+ unsigned char app_set : 1; // app wants to communicate with the window manager
+ unsigned char preferred_rot : 1; // app specified rotation
+ unsigned char available_rots : 1; // app specified available rotations
+ unsigned char need_rotation : 1;
+ } rot;
+#endif
unsigned char state : 1;
unsigned char video_parent : 1;
unsigned char video_position : 1;
Eina_Bool internal_state : 1;
Eina_Bool need_maximize : 1;
Eina_Bool need_unmaximize : 1;
+#ifdef _F_ZONE_WINDOW_ROTATION_
+ Eina_Bool rotation : 1;
+#endif
} changes;
unsigned int visible : 1; // client is set to be visible by display server (never use this)
EAPI extern int E_EVENT_CLIENT_PROPERTY;
EAPI extern int E_EVENT_CLIENT_FULLSCREEN;
EAPI extern int E_EVENT_CLIENT_UNFULLSCREEN;
-
+#ifdef _F_ZONE_WINDOW_ROTATION_
+EAPI extern int E_EVENT_CLIENT_ROTATION_CHANGE_BEGIN;
+EAPI extern int E_EVENT_CLIENT_ROTATION_CHANGE_CANCEL;
+EAPI extern int E_EVENT_CLIENT_ROTATION_CHANGE_END;
+#endif
EINTERN void e_client_idler_before(void);
EINTERN Eina_Bool e_client_init(void);
c->comp_type = E_PIXMAP_TYPE_X;
success = _e_comp_x_setup(c, root, rw, rh);
if (!success) break;
+#ifdef _F_ZONE_WINDOW_ROTATION_
+ if (e_config->wm_win_rotation)
+ {
+ ecore_x_e_window_rotation_supported_set(roots[i],
+ e_config->wm_win_rotation);
+ }
+#endif
}
free(roots);
return success;
E_CONFIG_VAL(D, T, exe_always_single_instance, UCHAR);
E_CONFIG_VAL(D, T, use_desktop_window_profile, INT);
+#ifdef _F_ZONE_WINDOW_ROTATION_
+ E_CONFIG_VAL(D, T, wm_win_rotation, UCHAR);
+#endif
}
/* externally accessible functions */
Eina_List *menu_applications;
unsigned char exe_always_single_instance; // GUI
int use_desktop_window_profile; // GUI
+#ifdef _F_ZONE_WINDOW_ROTATION_
+ unsigned char wm_win_rotation;
+#endif
};
struct E_Config_Bindings
EAPI int E_EVENT_ZONE_EDGE_IN = 0;
EAPI int E_EVENT_ZONE_EDGE_OUT = 0;
EAPI int E_EVENT_ZONE_EDGE_MOVE = 0;
+#ifdef _F_ZONE_WINDOW_ROTATION_
+EAPI int E_EVENT_ZONE_ROTATION_CHANGE_BEGIN = 0;
+EAPI int E_EVENT_ZONE_ROTATION_CHANGE_CANCEL = 0;
+EAPI int E_EVENT_ZONE_ROTATION_CHANGE_END = 0;
+#endif
#define E_ZONE_FLIP_LEFT(zone) (((e_config->desk_flip_wrap && ((zone)->desk_x_count > 1)) || ((zone)->desk_x_current > 0)) && (zone)->edge.left)
#define E_ZONE_FLIP_RIGHT(zone) (((e_config->desk_flip_wrap && ((zone)->desk_x_count > 1)) || (((zone)->desk_x_current + 1) < (zone)->desk_x_count)) && (zone)->edge.right)
E_EVENT_ZONE_EDGE_IN = ecore_event_type_new();
E_EVENT_ZONE_EDGE_OUT = ecore_event_type_new();
E_EVENT_ZONE_EDGE_MOVE = ecore_event_type_new();
+#ifdef _F_ZONE_WINDOW_ROTATION_
+ E_EVENT_ZONE_ROTATION_CHANGE_BEGIN = ecore_event_type_new();
+ E_EVENT_ZONE_ROTATION_CHANGE_CANCEL = ecore_event_type_new();
+ E_EVENT_ZONE_ROTATION_CHANGE_END = ecore_event_type_new();
+#endif
return 1;
}
/* TODO: Move this to a general place? */
typedef struct _E_Event_Pointer_Warp E_Event_Pointer_Warp;
typedef struct _E_Event_Zone_Edge E_Event_Zone_Edge;
+#ifdef _F_ZONE_WINDOW_ROTATION_
+typedef struct _E_Event_Zone_Rotation_Change_Begin E_Event_Zone_Rotation_Change_Begin;
+typedef struct _E_Event_Zone_Rotation_Change_Cancel E_Event_Zone_Rotation_Change_Cancel;
+typedef struct _E_Event_Zone_Rotation_Change_End E_Event_Zone_Rotation_Change_End;
+#endif
#else
#ifndef E_ZONE_H
int x, y, w, h;
Eina_Bool dirty : 1;
} useful_geometry;
+#ifdef _F_ZONE_WINDOW_ROTATION_
+ struct
+ {
+ int prev, curr, next, sub;
+ int block_count;
+
+ Eina_Bool wait_for_done : 1;
+ Eina_Bool pending : 1;
+ Eina_Bool unknown_state : 1;
+ } rot;
+#endif
};
struct _E_Event_Zone_Desk_Count_Set
Eina_Bool drag : 1;
};
+#ifdef _F_ZONE_WINDOW_ROTATION_
+struct _E_Event_Zone_Rotation_Change_Begin
+{
+ E_Zone *zone;
+};
+
+struct _E_Event_Zone_Rotation_Change_Cancel
+{
+ E_Zone *zone;
+};
+
+struct _E_Event_Zone_Rotation_Change_End
+{
+ E_Zone *zone;
+};
+#endif
+
EINTERN int e_zone_init(void);
EINTERN int e_zone_shutdown(void);
EAPI E_Zone *e_zone_new(E_Comp *con, int num, int id, int x, int y, int w, int h);
extern EAPI int E_EVENT_ZONE_EDGE_OUT;
extern EAPI int E_EVENT_ZONE_EDGE_MOVE;
+#ifdef _F_ZONE_WINDOW_ROTATION_
+extern EAPI int E_EVENT_ZONE_ROTATION_CHANGE_BEGIN;
+extern EAPI int E_EVENT_ZONE_ROTATION_CHANGE_CANCEL;
+extern EAPI int E_EVENT_ZONE_ROTATION_CHANGE_END;
+#endif
+
#endif
#endif