aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristopher Michael <cp.michael@samsung.com>2013-02-19 10:59:52 +0000
committerChristopher Michael <cpmichael1@comcast.net>2013-02-19 10:59:52 +0000
commitc889d84b8766b5087ce748d53bc2d54e5c3f8b07 (patch)
tree2629b16302a221a01c4a9c6aa7c385c5f325d2d9 /src
parentb0dff981530001726146fba832983f54d401519f (diff)
downloadenlightenment-c889d84b8766b5087ce748d53bc2d54e5c3f8b07.tar.gz
enlightenment-c889d84b8766b5087ce748d53bc2d54e5c3f8b07.tar.xz
enlightenment-c889d84b8766b5087ce748d53bc2d54e5c3f8b07.zip
Add hook for randr widget changed.
Signed-off-by: Christopher Michael <cp.michael@samsung.com> SVN revision: 84215
Diffstat (limited to 'src')
-rw-r--r--src/modules/conf_randr/e_int_config_randr.c28
1 files changed, 25 insertions, 3 deletions
diff --git a/src/modules/conf_randr/e_int_config_randr.c b/src/modules/conf_randr/e_int_config_randr.c
index 575dee1b5..1aa213ea4 100644
--- a/src/modules/conf_randr/e_int_config_randr.c
+++ b/src/modules/conf_randr/e_int_config_randr.c
@@ -13,7 +13,8 @@ struct _E_Config_Dialog_Data
static void *_create_data(E_Config_Dialog *cfd EINA_UNUSED);
static void _free_data(E_Config_Dialog *cfd EINA_UNUSED, E_Config_Dialog_Data *cfdata);
static Evas_Object *_basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata);
-static int _basic_apply(E_Config_Dialog *cfd EINA_UNUSED, E_Config_Dialog_Data *cfdata EINA_UNUSED);
+static int _basic_apply(E_Config_Dialog *cfd EINA_UNUSED, E_Config_Dialog_Data *cfdata);
+static void _randr_cb_changed(void *data, Evas_Object *obj, void *event EINA_UNUSED);
/* public functions */
E_Config_Dialog *
@@ -86,6 +87,10 @@ _basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
{
Evas_Coord mw = 0, mh = 0;
+ /* hook into randr widget changed callback */
+ evas_object_smart_callback_add(cfdata->o_randr, "randr_changed",
+ _randr_cb_changed, cfd);
+
/* tell randr widget to calculate virtual size */
e_smart_randr_virtual_size_calc(cfdata->o_randr);
@@ -109,8 +114,25 @@ _basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
}
static int
-_basic_apply(E_Config_Dialog *cfd EINA_UNUSED, E_Config_Dialog_Data *cfdata EINA_UNUSED)
+_basic_apply(E_Config_Dialog *cfd EINA_UNUSED, E_Config_Dialog_Data *cfdata)
{
- /* return success */
+ e_smart_randr_changes_apply(cfdata->o_randr);
+
+ /* FIXME: NB: TODO: TESTING !!! */
+ /* ecore_x_randr_crtc_clone_set(ecore_x_window_root_first_get(), 96, 95); */
+ /* ecore_x_randr_screen_reset(ecore_x_window_root_first_get()); */
+
return 1;
}
+
+static void
+_randr_cb_changed(void *data, Evas_Object *obj, void *event EINA_UNUSED)
+{
+ E_Config_Dialog *cfd;
+ Eina_Bool changed = EINA_FALSE;
+
+ if (!(cfd = data)) return;
+
+ changed = e_smart_randr_changed_get(obj);
+ e_config_dialog_changed_set(cfd, changed);
+}