#include <assert.h>
#include <stdbool.h>
-#include <hal/hal-touchscreen.h>
+#include <hal/hal-device-touchscreen.h>
#include <libsyscommon/libgdbus.h>
#include <vconf.h>
#include <dlfcn.h>
hal_device_touchscreen_put_backend();
}
-static int touchscreen_set_state(enum touchscreen_state state)
+static int touchscreen_set_state(hal_device_touchscreen_state_e state)
{
int ret;
char *act;
return -ENOENT;
}
- if (state != TOUCHSCREEN_ON && state != TOUCHSCREEN_OFF) {
+ if (state != HAL_DEVICE_TOUCHSCREEN_ON && state != HAL_DEVICE_TOUCHSCREEN_OFF) {
_E("Invalid parameter.");
return -EINVAL;
}
- act = (state == TOUCHSCREEN_ON) ? "enable" : "disable";
+ act = (state == HAL_DEVICE_TOUCHSCREEN_ON) ? "enable" : "disable";
ret = hal_device_touchscreen_set_state(state);
if (ret == 0)
/*
* It is safe to turn touchscreen on before powersaving on/off.
*/
- ret = touchscreen_set_state(TOUCHSCREEN_ON);
+ ret = touchscreen_set_state(HAL_DEVICE_TOUCHSCREEN_ON);
state = display_panel_get_dpms_cached_state();
if (flags & TOUCH_SCREEN_OFF_MODE) {
touchscreen_powersaving(POWERSAVING_OFF);
- return touchscreen_set_state(TOUCHSCREEN_OFF);
+ return touchscreen_set_state(HAL_DEVICE_TOUCHSCREEN_OFF);
}
if (battery && battery->charger_connected == 1) {
exit:
touchscreen_powersaving(POWERSAVING_OFF);
- return touchscreen_set_state(TOUCHSCREEN_OFF);
+ return touchscreen_set_state(HAL_DEVICE_TOUCHSCREEN_OFF);
}
static int touchscreen_dump(FILE *fp, int mode, void *dump_data)
{
- enum touchscreen_state state;
+ hal_device_touchscreen_state_e state;
int ret;
ret = hal_device_touchscreen_get_state(&state);
return ret;
}
- if (state == TOUCHSCREEN_ON)
+ if (state == HAL_DEVICE_TOUCHSCREEN_ON)
LOG_DUMP(fp, "Touchscreen is enabled\n");
else
LOG_DUMP(fp, "Touchscreen is disabled\n");