projects
/
framework
/
appfw
/
app-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tizen 2.4 release
[framework/appfw/app-core.git]
/
src
/
appcore-rotation.c
diff --git
a/src/appcore-rotation.c
b/src/appcore-rotation.c
index
d99dace
..
bc8bf86
100755
(executable)
--- a/
src/appcore-rotation.c
+++ b/
src/appcore-rotation.c
@@
-23,10
+23,6
@@
#include <errno.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <stdlib.h>
#include <unistd.h>
-
-#include <sensor_internal_deprecated.h>
-//#include <sensor_auto_rotation.h>
-
#include <vconf.h>
#include <Ecore_X.h>
#include <Ecore.h>
#include <vconf.h>
#include <Ecore_X.h>
#include <Ecore.h>
@@
-34,6
+30,9
@@
#include "appcore-internal.h"
#include "appcore-internal.h"
+#ifdef _APPFW_FEATURE_SENSOR_AUTO_ROTATION
+#include <sensor_internal_deprecated.h>
+
#define _MAKE_ATOM(a, s) \
do { \
a = ecore_x_atom_get(s); \
#define _MAKE_ATOM(a, s) \
do { \
a = ecore_x_atom_get(s); \
@@
-106,7
+105,6
@@
static void __changed_cb(unsigned int event_type, sensor_event_data_t *event,
{
int *cb_event_data;
enum appcore_rm m;
{
int *cb_event_data;
enum appcore_rm m;
- int ret;
if (rot.lock)
return;
if (rot.lock)
return;
@@
-184,10
+182,12
@@
static void __del_rotlock(void)
vconf_ignore_key_changed(VCONFKEY_SETAPPL_AUTO_ROTATE_SCREEN_BOOL, __lock_cb);
rot.lock = 0;
}
vconf_ignore_key_changed(VCONFKEY_SETAPPL_AUTO_ROTATE_SCREEN_BOOL, __lock_cb);
rot.lock = 0;
}
+#endif
EXPORT_API int appcore_set_rotation_cb(int (*cb) (void *event_info, enum appcore_rm, void *),
void *data)
{
EXPORT_API int appcore_set_rotation_cb(int (*cb) (void *event_info, enum appcore_rm, void *),
void *data)
{
+#ifdef _APPFW_FEATURE_SENSOR_AUTO_ROTATION
if (rot.wm_rotate) {
return rot.wm_rotate->set_rotation_cb(cb, data);
} else {
if (rot.wm_rotate) {
return rot.wm_rotate->set_rotation_cb(cb, data);
} else {
@@
-245,11
+245,13
@@
EXPORT_API int appcore_set_rotation_cb(int (*cb) (void *event_info, enum appcore
root = ecore_x_window_root_first_get();
XSelectInput(ecore_x_display_get(), root, PropertyChangeMask);
}
root = ecore_x_window_root_first_get();
XSelectInput(ecore_x_display_get(), root, PropertyChangeMask);
}
+#endif
return 0;
}
EXPORT_API int appcore_unset_rotation_cb(void)
{
return 0;
}
EXPORT_API int appcore_unset_rotation_cb(void)
{
+#ifdef _APPFW_FEATURE_SENSOR_AUTO_ROTATION
if (rot.wm_rotate) {
return rot.wm_rotate->unset_rotation_cb();
}
if (rot.wm_rotate) {
return rot.wm_rotate->unset_rotation_cb();
}
@@
-288,11
+290,13
@@
EXPORT_API int appcore_unset_rotation_cb(void)
}
rot.handle = -1;
}
}
rot.handle = -1;
}
+#endif
return 0;
}
EXPORT_API int appcore_get_rotation_state(enum appcore_rm *curr)
{
return 0;
}
EXPORT_API int appcore_get_rotation_state(enum appcore_rm *curr)
{
+#ifdef _APPFW_FEATURE_SENSOR_AUTO_ROTATION
if (rot.wm_rotate) {
return rot.wm_rotate->get_rotation_state(curr);
}
if (rot.wm_rotate) {
return rot.wm_rotate->get_rotation_state(curr);
}
@@
-317,11
+321,13
@@
EXPORT_API int appcore_get_rotation_state(enum appcore_rm *curr)
*curr = __get_mode(event);
}
*curr = __get_mode(event);
}
+#endif
return 0;
}
EXPORT_API int appcore_pause_rotation_cb(void)
{
return 0;
}
EXPORT_API int appcore_pause_rotation_cb(void)
{
+#ifdef _APPFW_FEATURE_SENSOR_AUTO_ROTATION
if (rot.wm_rotate) {
return rot.wm_rotate->pause_rotation_cb();
}
if (rot.wm_rotate) {
return rot.wm_rotate->pause_rotation_cb();
}
@@
-353,12
+359,13
@@
EXPORT_API int appcore_pause_rotation_cb(void)
rot.sf_started = 0;
}
}
rot.sf_started = 0;
}
}
-
+#endif
return 0;
}
EXPORT_API int appcore_resume_rotation_cb(void)
{
return 0;
}
EXPORT_API int appcore_resume_rotation_cb(void)
{
+#ifdef _APPFW_FEATURE_SENSOR_AUTO_ROTATION
if (rot.wm_rotate) {
return rot.wm_rotate->resume_rotation_cb();
}
if (rot.wm_rotate) {
return rot.wm_rotate->resume_rotation_cb();
}
@@
-404,11
+411,13
@@
EXPORT_API int appcore_resume_rotation_cb(void)
rot.mode = m;
}
}
rot.mode = m;
}
}
+#endif
return 0;
}
EXPORT_API int appcore_set_wm_rotation(struct ui_wm_rotate* wm_rotate)
{
return 0;
}
EXPORT_API int appcore_set_wm_rotation(struct ui_wm_rotate* wm_rotate)
{
+#ifdef _APPFW_FEATURE_SENSOR_AUTO_ROTATION
if (!wm_rotate) return -1;
if (rot.callback) {
if (!wm_rotate) return -1;
if (rot.callback) {
@@
-417,5
+426,6
@@
EXPORT_API int appcore_set_wm_rotation(struct ui_wm_rotate* wm_rotate)
}
rot.wm_rotate = wm_rotate;
_DBG("[APP %d] Support wm rotate:%p", getpid(), wm_rotate);
}
rot.wm_rotate = wm_rotate;
_DBG("[APP %d] Support wm rotate:%p", getpid(), wm_rotate);
+#endif
return 0;
}
return 0;
}