rotation: Move backend dependency code to common header. 40/55040/2
authorSeunghun Lee <shiin.lee@samsung.com>
Mon, 21 Dec 2015 10:41:29 +0000 (19:41 +0900)
committerGwanglim Lee <gl77.lee@samsung.com>
Tue, 22 Dec 2015 06:45:54 +0000 (22:45 -0800)
Change-Id: Iaab631248d4ed1a95c276b481f4a9eb08839999e

src/e_mod_rotation.c
src/e_mod_rotation.h

index 051c7b8..c3f3a4b 100644 (file)
 #include "e_mod_rotation.h"
 #include "e_mod_utils.h"
 
-#ifdef HAVE_WAYLAND_ONLY
-#include "e_mod_rotation_wl.h"
-#endif
-
 static Eina_List *_event_handlers = NULL;
 
 /* externally accessible functions */
@@ -75,7 +71,6 @@ _e_mod_pol_rotation_cb_info_rotation_message(void *data EINA_UNUSED, int ev_type
    if (EINA_UNLIKELY((ev == NULL) || (ev->zone == NULL)))
      goto end;
 
-#ifdef HAVE_WAYLAND_ONLY
    switch (ev->message)
      {
       case E_INFO_ROTATION_MESSAGE_SET:
@@ -89,7 +84,6 @@ _e_mod_pol_rotation_cb_info_rotation_message(void *data EINA_UNUSED, int ev_type
       default:
          ERR("Unknown message");
      }
-#endif
 
 end:
    return ECORE_CALLBACK_RENEW;
index 7a94e47..f8da00a 100644 (file)
@@ -2,6 +2,22 @@
 #define E_MOD_ROTATION_H
 #include <e.h>
 
+#ifdef HAVE_WAYLAND_ONLY
+#include "e_mod_rotation_wl.h"
+#else /* HAVE_WAYLAND_ONLY */
+static inline void
+e_zone_rotation_set(E_Zone *zone EINA_UNUSED, int rot EINA_UNUSED)
+{
+   return;
+}
+
+static inline Eina_Bool
+e_zone_rotation_block_set(E_Zone *zone EINA_UNUSED, const char *name_hint EINA_UNUSED, Eina_Bool set EINA_UNUSED)
+{
+   return EINA_FALSE;
+}
+#endif /* HAVE_WAYLAND_ONLY */
+
 EINTERN int e_client_rotation_curr_angle_get(const E_Client *ec);
 EINTERN void e_mod_pol_rotation_init(void);
 EINTERN void e_mod_pol_rotation_shutdown(void);