#define CONTINUOUS_SAMPLING 1
#define LCDOFF_TIMEOUT 300 /* milli second */
-static struct display_config display_conf = {
+static struct deviced_display_config display_conf = {
.lock_wait_time = LOCK_SCREEN_WATING_TIME,
.longpress_interval = LONG_PRESS_INTERVAL,
.lightsensor_interval = SAMPLING_INTERVAL,
.continuous_sampling = CONTINUOUS_SAMPLING,
.timeout_enable = true,
.input_support = true,
- .display_init_direction = DISPLAY_INIT_DIRECTION_HORIZONTAL,
+ .display_init_direction = DEVICED_DISPLAY_ORIENTATION_HORIZONTAL,
.aod_enter_level = 40,
.aod_tsp = true,
.touch_wakeup = false,
.display_on_usb_conn_changed = true,
- .display_dpms_type = DISPLAY_DPMS_TYPE_WINDOW_MANAGER,
+ .display_dpms_type = DEVICED_DPMS_TYPE_WINDOW_MANAGER,
};
-inline const struct display_config* get_var_display_config()
+inline const struct deviced_display_config* get_var_display_config()
{
return &display_conf;
}
#include "device-interface.h"
static struct display_backlight_ops backlight_ops;
-static const struct display_config *display_conf;
+static const struct deviced_display_config *display_conf;
inline struct display_backlight_ops *get_var_backlight_ops(void)
{
int ignore = true;
static int value = KEY_RELEASED;
unsigned int caps;
- const struct display_config *display_conf = get_var_display_config();
+ const struct deviced_display_config *display_conf = get_var_display_config();
if (!display_conf) {
_E("Failed to get display configuration variable.");
return ignore;
#include <vconf-keys.h>
#include <sys/time.h>
#include <libsyscommon/list.h>
+#include <system/syscommon-plugin-deviced-display-interface.h>
#include <hal/device/hal-device-power.h>
#include <libsyscommon/log.h>
#define CONTINUOUS_SAMPLING 1
#define LCDOFF_TIMEOUT 300 /* milli second */
-static struct display_config display_conf = {
+static struct deviced_display_config display_conf = {
.lock_wait_time = LOCK_SCREEN_WATING_TIME,
.longpress_interval = LONG_PRESS_INTERVAL,
.lightsensor_interval = SAMPLING_INTERVAL,
.continuous_sampling = CONTINUOUS_SAMPLING,
.timeout_enable = true,
.input_support = true,
- .display_init_direction = DISPLAY_INIT_DIRECTION_HORIZONTAL,
+ .display_init_direction = DEVICED_DISPLAY_ORIENTATION_HORIZONTAL,
.aod_enter_level = 40,
.aod_tsp = true,
.touch_wakeup = false,
.display_on_usb_conn_changed = true,
- .display_dpms_type = DISPLAY_DPMS_TYPE_WINDOW_MANAGER,
+ .display_dpms_type = DEVICED_DPMS_TYPE_WINDOW_MANAGER,
};
-inline const struct display_config* get_var_display_config()
+inline const struct deviced_display_config* get_var_display_config()
{
return &display_conf;
}
#include "power/power-suspend.h"
static struct display_backlight_ops backlight_ops;
-static const struct display_config *display_conf;
+static const struct deviced_display_config *display_conf;
inline struct display_backlight_ops *get_var_backlight_ops(void)
{
int ignore = true;
static int value = KEY_RELEASED;
unsigned int caps;
- const struct display_config *display_conf = get_var_display_config();
+ const struct deviced_display_config *display_conf = get_var_display_config();
if (!display_conf) {
_E("Failed to get display configuration variable.");
return ignore;
#include <sys/time.h>
#include <libsyscommon/list.h>
#include <libsyscommon/log.h>
+#include <system/syscommon-plugin-deviced-display-interface.h>
#include <hal/device/hal-device-power.h>
#include "ambient-mode.h"
#define CONTINUOUS_SAMPLING 1
#define LCDOFF_TIMEOUT 300 /* milli second */
-static struct display_config display_conf = {
+static struct deviced_display_config display_conf = {
.lock_wait_time = LOCK_SCREEN_WATING_TIME,
.longpress_interval = LONG_PRESS_INTERVAL,
.lightsensor_interval = SAMPLING_INTERVAL,
.continuous_sampling = CONTINUOUS_SAMPLING,
.timeout_enable = true,
.input_support = true,
- .display_init_direction = DISPLAY_INIT_DIRECTION_HORIZONTAL,
+ .display_init_direction = DEVICED_DISPLAY_ORIENTATION_HORIZONTAL,
.aod_enter_level = 40,
.aod_tsp = true,
.touch_wakeup = false,
.display_on_usb_conn_changed = true,
- .display_dpms_type = DISPLAY_DPMS_TYPE_WINDOW_MANAGER,
+ .display_dpms_type = DEVICED_DPMS_TYPE_WINDOW_MANAGER,
};
-inline const struct display_config* get_var_display_config()
+inline const struct deviced_display_config* get_var_display_config()
{
return &display_conf;
}
#include "display-lock.h"
static struct display_backlight_ops backlight_ops;
-static const struct display_config *display_conf;
+static const struct deviced_display_config *display_conf;
inline struct display_backlight_ops *get_var_backlight_ops(void)
{
int ignore = true;
static int value = KEY_RELEASED;
unsigned int caps;
- const struct display_config *display_conf = get_var_display_config();
+ const struct deviced_display_config *display_conf = get_var_display_config();
if(!display_conf) {
_E("Failed to get display configuration variable.");
return ignore;
static void change_brightness_transit(int start, int end)
{
- const struct display_config *display_conf = get_var_display_config();
+ const struct deviced_display_config *display_conf = get_var_display_config();
if(!display_conf) {
_E("Failed to get display configuration variable.");
return ;
#include <sys/time.h>
#include <libsyscommon/list.h>
#include <libsyscommon/common.h>
+#include <system/syscommon-plugin-deviced-display-interface.h>
#include <hal/device/hal-device-power.h>
#include <libsyscommon/log.h>
#define FORCE_RELEASE_LOCK_INTERVAL 5 /* seconds */
-static struct display_config display_conf = {
+static struct deviced_display_config display_conf = {
.lock_wait_time = LOCK_SCREEN_WATING_TIME,
.longpress_interval = LONG_PRESS_INTERVAL,
.lightsensor_interval = SAMPLING_INTERVAL,
.continuous_sampling = CONTINUOUS_SAMPLING,
.timeout_enable = true,
.input_support = true,
- .display_init_direction = DISPLAY_INIT_DIRECTION_HORIZONTAL,
+ .display_init_direction = DEVICED_DISPLAY_ORIENTATION_HORIZONTAL,
.aod_enter_level = 40,
.aod_tsp = true,
.touch_wakeup = false,
.display_on_usb_conn_changed = true,
- .display_dpms_type = DISPLAY_DPMS_TYPE_WINDOW_MANAGER,
+ .display_dpms_type = DEVICED_DPMS_TYPE_WINDOW_MANAGER,
};
-inline const struct display_config *get_var_display_config()
+inline const struct deviced_display_config *get_var_display_config()
{
return &display_conf;
}
static int aod_normal_level = -1;
static int aod_min_level = -1;
static int aod_charging_level = -1;
-static const struct display_config *display_conf;
+static const struct deviced_display_config *display_conf;
static struct battery_status *battery = NULL;
static struct battery_status* (*fp_get_var_battery_status)(void);
int ignore = true;
static int value = KEY_RELEASED;
unsigned int caps;
- const struct display_config *display_conf = get_var_display_config();
+ const struct deviced_display_config *display_conf = get_var_display_config();
if (!display_conf) {
_E("Failed to get display configuration variable.");
return ignore;
* Global variables
* display_conf : configuration of display
*/
-const struct display_config* get_var_display_config();
+const struct deviced_display_config* get_var_display_config();
typedef struct {
pid_t pid;
static int display_config_parse(struct parse_result *result, void *user_data)
{
- struct display_config *c = user_data;
+ struct deviced_display_config *c = user_data;
_D("display_load_config: section=%s name=%s value=%s", result->section, result->name, result->value);
c->display_on_usb_conn_changed = (MATCH(result->value, "yes") ? true : false);
} else if (MATCH(result->name, "DisplayInitDirection")) {
c->display_init_direction = (MATCH(result->value, "vertical") ? \
- DISPLAY_INIT_DIRECTION_VERTICAL : DISPLAY_INIT_DIRECTION_HORIZONTAL);
+ DEVICED_DISPLAY_ORIENTATION_VERTICAL : DEVICED_DISPLAY_ORIENTATION_HORIZONTAL);
} else if (MATCH(result->name, "DisplayDPMSType")) {
c->display_dpms_type = (MATCH(result->value, "none") ? \
- DISPLAY_DPMS_TYPE_NONE : DISPLAY_DPMS_TYPE_WINDOW_MANAGER);
+ DEVICED_DPMS_TYPE_NONE : DEVICED_DPMS_TYPE_WINDOW_MANAGER);
}
return 0;
}
-int display_load_config(struct display_config *config)
+int display_load_config(struct deviced_display_config *config)
{
return config_parse(DISPLAY_CONF_FILE, display_config_parse, config);
}
#ifndef __DISPLAY_CONFIG_H__
#define __DISPLAY_CONFIG_H__
-#include <stdbool.h>
-#include "display-panel.h"
+#include <system/syscommon-plugin-deviced-display-interface.h>
#define DISPLAY_CONF_FILE "/etc/deviced/display.conf"
-/*
- * @brief Configuration structure
- */
-struct display_config {
- double lock_wait_time;
- double longpress_interval;
- double lightsensor_interval;
- int lcdoff_timeout;
- const int pm_default_brightness;
- int brightness_change_step;
- int lcd_always_on;
- int dimming;
- int framerate_app[4];
- int control_display;
- int powerkey_doublepress;
- int alpm_on;
- int accel_sensor_on;
- int continuous_sampling;
- int display_init_direction;
- int aod_enter_level;
- bool aod_tsp;
- bool timeout_enable;
- bool input_support;
- bool touch_wakeup;
- bool display_on_usb_conn_changed;
-
- enum display_dpms_type display_dpms_type;
-};
-int display_load_config(struct display_config *config);
+int display_load_config(struct deviced_display_config *config);
#endif //__DISPLAY_CONFIG_H__
#include <libsyscommon/libgdbus.h>
#include <libsyscommon/proc.h>
#include <system/syscommon-plugin-deviced-common-interface.h>
+#include <system/syscommon-plugin-deviced-display-interface.h>
#include <device/display.h>
#include <device/power.h>
int ret;
int display_index;
enum hal_device_display_rotation_angle angle;
- enum display_init_direction_e init_direction;
+ enum deviced_display_orientation init_direction;
g_variant_get(param, "(i)", &display_index);
ret = hal_device_display_get_rotation_angle(display_index, &angle);
#include <tizen-extension-client-protocol.h>
#include <tizen-dpms-client-protocol.h>
#include <libsyscommon/list.h>
+#include <system/syscommon-plugin-deviced-display-interface.h>
#include "core/log.h"
#include "shared/device-notifier.h"
}
switch (g_display_plugin.config->display_dpms_type) {
- case DISPLAY_DPMS_TYPE_WINDOW_MANAGER:
+ case DEVICED_DPMS_TYPE_WINDOW_MANAGER:
g_dpms_ops.set_state = wm_dpms_set_state;
g_dpms_ops.get_state = wm_dpms_get_state;
g_dpms_ops.get_cached_state = wm_dpms_get_cached_state;
g_dpms_ops.init = wm_dpms_init;
g_dpms_ops.exit = wm_dpms_exit;
break;
- case DISPLAY_DPMS_TYPE_NONE:
+ case DEVICED_DPMS_TYPE_NONE:
g_dpms_ops.set_state = none_dpms_set_state;
g_dpms_ops.get_state = none_dpms_get_state;
g_dpms_ops.get_cached_state = none_dpms_get_cached_state;
DPMS_DETACH, /* Display detached */
};
-enum display_dpms_type {
- DISPLAY_DPMS_TYPE_NONE,
- DISPLAY_DPMS_TYPE_WINDOW_MANAGER,
-};
-
void dpms_set_state(int on);
int dpms_get_state(void);
int dpms_get_cached_state(void);
void (*reset_autobrightness_min) (GDBusConnection *conn, const gchar *sender,
const gchar *unique_name, gpointer data);
- struct display_config *config;
+ struct deviced_display_config *config;
struct display_backlight_ops *backlight;
struct state* display_states[DEVICED_DISPLAY_STATE_END];
};
static const struct device_ops *display_plugin_device_ops;
static unsigned int pm_status_flag;
-static enum display_init_direction_e g_display_init_direction;
+static enum deviced_display_orientation g_display_init_direction;
static bool g_display_hal_backend_available = false;
static GList *display_dependent_device_ops;
static enum device_ops_status display_ops_status = DEVICE_OPS_STATUS_UNINIT;
pm_status_flag &= ~status_flag;
}
-inline enum display_init_direction_e get_display_init_direction(void)
+inline enum deviced_display_orientation get_display_init_direction(void)
{
return g_display_init_direction;
}
-inline void set_display_init_direction(enum display_init_direction_e display_init_direction)
+inline void set_display_init_direction(enum deviced_display_orientation display_init_direction)
{
g_display_init_direction = display_init_direction;
}
#define BATTERY_FLAG 0x00020000
#define COOLDOWN_FLAG 0x00040000
-enum display_init_direction_e {
- DISPLAY_INIT_DIRECTION_HORIZONTAL,
- DISPLAY_INIT_DIRECTION_VERTICAL,
-};
-
void lcd_direct_control(enum dpms_state dpms_state, int flags);
int get_pm_cur_state(void);
int get_pm_old_state(void);
unsigned int get_pm_status_flag(void);
void set_pm_status_flag(unsigned int status_flag);
void clear_pm_status_flag(unsigned int status_flag);
-enum display_init_direction_e get_display_init_direction(void);
-void set_display_init_direction(enum display_init_direction_e display_init_direction);
+enum deviced_display_orientation get_display_init_direction(void);
+void set_display_init_direction(enum deviced_display_orientation display_init_direction);
bool display_is_hal_backend_available(void);
void display_start_dependent_device(unsigned long flags);
void display_stop_dependent_device(unsigned long flags);