Enlightenment CVS committal
Author : xenith
Project : misc
Module : envision
Dir : misc/envision/src
Modified Files:
callbacks.c callbacks.h envision.c
Log Message:
More hushups
Ok, screw doing aspect ratios in the resize callback. I like raster's idea of a
smart object to handle that. :)
===================================================================
RCS file: /cvsroot/enlightenment/misc/envision/src/callbacks.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- callbacks.c 31 Aug 2004 09:06:28 -0000 1.4
+++ callbacks.c 2 Sep 2004 07:18:18 -0000 1.5
@@ -1,5 +1,5 @@
/*
- * $Id: callbacks.c,v 1.4 2004/08/31 09:06:28 xenith Exp $
+ * $Id: callbacks.c,v 1.5 2004/09/02 07:18:18 xenith Exp $
* vim:expandtab:ts=3:sts=3:sw=3
*/
@@ -16,18 +16,15 @@
Evas * evas = ecore_evas_get(ee);
Evas_Object * edje = evas_object_name_find(evas, "edje");
Evas_Object * emotion = evas_object_name_find(evas, "emotion");
- Evas_Coord x, y, w, h;
- int vw, vh;
+ int w, h, vw, vh;
double ratio;
-
- /* resize the video object AND retain aspect ratio */
- /* get the video size in pixels */
- emotion_object_size_get(emotion, &vw, &vh);
- /* get the video ratio */
+
+ ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
+ evas_object_resize(edje, (Evas_Coord)w, (Evas_Coord)h);
+
+ /*emotion_object_size_get(emotion, &vw, &vh);
ratio = emotion_object_ratio_get(emotion);
- /* if the ratio > 0.0 then the video wants awidth / height ratio on the */
- /* screen as returned indicated by this ratio value. this is irrespective */
- /* of the pixel size of the video and indicates the video wants to scale */
+
if (ratio > 0.0) {
x = 0;
y = (h - (w / ratio)) / 2;
@@ -39,11 +36,10 @@
} else {
h = w / ratio;
}
-
- evas_object_resize(edje, w, h);
+
+ evas_object_resize(edje, (Evas_Coord)w, (Evas_Coord)h);
} else {
if (vh > 0) {
- /* generate ratio from the pixel size */
ratio = (double)vw / (double)vh;
} else {
ratio = 1.0;
@@ -59,20 +55,9 @@
} else {
h = w / ratio;
}
-
- evas_object_resize(edje, w, h);
- }
-}
-
-void
-ecore_resize(Ecore_Evas *ee)
-{
- Evas * evas = ecore_evas_get(ee);
- Evas_Object * edje = evas_object_name_find(evas, "edje");
- int ws = 0, hs = 0;
- ecore_evas_geometry_get(ee, NULL, NULL, &ws, &hs);
- evas_object_resize(edje, (Evas_Coord)ws, (Evas_Coord)hs);
+ evas_object_resize(edje, (Evas_Coord)w+25, (Evas_Coord)h+106);
+ }*/
}
void
===================================================================
RCS file: /cvsroot/enlightenment/misc/envision/src/callbacks.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- callbacks.h 31 Aug 2004 09:06:28 -0000 1.1
+++ callbacks.h 2 Sep 2004 07:18:19 -0000 1.2
@@ -1,5 +1,5 @@
/*
- * $Id: callbacks.h,v 1.1 2004/08/31 09:06:28 xenith Exp $
+ * $Id: callbacks.h,v 1.2 2004/09/02 07:18:19 xenith Exp $
* vim:expandtab:ts=3:sts=3:sw=3
*/
@@ -17,7 +17,6 @@
// callbacks.c
void canvas_resize(Ecore_Evas *ee);
-void ecore_resize(Ecore_Evas *ee);
void update_timer(void *data, Evas_Object *obj, void *event_info);
void callback_evas_keydown(void *data, Evas *e, Evas_Object *obj,
void *event_info);
===================================================================
RCS file: /cvsroot/enlightenment/misc/envision/src/envision.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -3 -r1.12 -r1.13
--- envision.c 31 Aug 2004 09:06:28 -0000 1.12
+++ envision.c 2 Sep 2004 07:18:19 -0000 1.13
@@ -1,5 +1,5 @@
/*
- * $Id: envision.c,v 1.12 2004/08/31 09:06:28 xenith Exp $
+ * $Id: envision.c,v 1.13 2004/09/02 07:18:19 xenith Exp $
* vim:expandtab:ts=3:sts=3:sw=3
*/
@@ -73,7 +73,6 @@
// Trakvision: 106 25
ecore_evas_resize(e->gui.ee, w+25, h+106); // Resize EVAS
evas_object_resize(e->gui.edje, w+25, h+106); // Resize Edje
- //evas_object_move(e->gui.emotion, 0, 0); // Move Video
evas_object_resize(e->gui.emotion, w, h); // Resize Video
evas_object_focus_set(e->gui.emotion, 1);
@@ -98,7 +97,7 @@
/* Callbacks */
- ecore_evas_callback_resize_set(e->gui.ee, ecore_resize);
+ ecore_evas_callback_resize_set(e->gui.ee, canvas_resize);
evas_object_event_callback_add(e->gui.emotion, EVAS_CALLBACK_KEY_DOWN,
callback_evas_keydown, NULL);
evas_object_smart_callback_add(e->gui.emotion, "frame_decode", update_timer,
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs