princeamd pushed a commit to branch enlightenment-0.17.
commit d1d8dc41248548f29765c28a83e860b2b962734e
Author: Christopher Michael <[email protected]>
Date: Tue Feb 19 10:55:50 2013 +0000
Backport: 69b1266 :: Start code for monitors create - Create monitor smart
object - Set crtc and output config for monitor.
Signed-off-by: Christopher Michael <[email protected]>
SVN revision: 84131
Signed-off-by: Deon Thomas <[email protected]>
---
src/modules/conf_randr/e_smart_randr.c | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/src/modules/conf_randr/e_smart_randr.c
b/src/modules/conf_randr/e_smart_randr.c
index 79aa869..3b2cfbe 100644
--- a/src/modules/conf_randr/e_smart_randr.c
+++ b/src/modules/conf_randr/e_smart_randr.c
@@ -54,9 +54,38 @@ void
e_smart_randr_monitors_create(Evas_Object *obj)
{
E_Smart_Data *sd;
+ Evas *evas;
+ Eina_List *l = NULL;
+ E_Randr_Crtc_Config *crtc;
/* try to get the objects smart data */
if (!(sd = evas_object_smart_data_get(obj))) return;
+
+ /* grab the canvas of the layout widget */
+ evas = evas_object_evas_get(sd->o_layout);
+
+ /* loop the list of crtcs in our config */
+ EINA_LIST_FOREACH(e_randr_cfg->crtcs, l, crtc)
+ {
+ Eina_List *o = NULL;
+ E_Randr_Output_Config *output;
+
+ /* loop the list of outputs in this crtc */
+ EINA_LIST_FOREACH(crtc->outputs, o, output)
+ {
+ Evas_Object *mon;
+
+ /* for each output, try to create a monitor */
+ if (!(mon = e_smart_monitor_add(evas)))
+ continue;
+
+ /* tell monitor what crtc it uses */
+ e_smart_monitor_crtc_set(mon, crtc);
+
+ /* tell monitor what output it uses */
+ e_smart_monitor_output_set(mon, output);
+ }
+ }
}
/* local functions */
--
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev