Enlightenment CVS committal
Author : moom
Project : e17
Module : proto
Dir : e17/proto/etk/src/bin
Modified Files:
etk_embed_test.c
Log Message:
* [Misc] Add etk_current_time_get()
* [Misc] Add etk_mouse_position_get()
* [Event] We can now add "global" event callbacks to catch events that
occurs everywhere on the screen. See etk_event_global_callback_add/del()
* [Event] Documentation++
* [Engine/Popup Window] A lot of code for the popup window has been
moved from the engine to etk_popup_window.c itself. It makes engine
a lot creation easier
* [Popup Window] Fix the slide effect if the mouse has not left the
popup window
* [Menu Bar] We can now select another menu bar's item when a menu is
already popped up
===================================================================
RCS file: /cvs/e/e17/proto/etk/src/bin/etk_embed_test.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- etk_embed_test.c 15 Aug 2006 16:33:26 -0000 1.6
+++ etk_embed_test.c 3 Sep 2006 18:36:11 -0000 1.7
@@ -1,5 +1,4 @@
#include "etk_test.h"
-#include <sys/time.h>
#include <math.h>
#include <Ecore.h>
#include <Ecore_Evas.h>
@@ -14,7 +13,6 @@
static void _etk_test_embed_update();
static void _etk_test_embed_resize_cb(Ecore_Evas *ecore_evas);
static int _etk_test_embed_animator_cb(void *data);
-static double _etk_test_embed_time_get();
static Ecore_Evas *ecore_evas = NULL;
static Evas_Object *e_logo, *backdrop;
@@ -23,7 +21,7 @@
static Evas_Object *embed_object;
static Etk_Widget *embed;
static int win_w = 240, win_h = 320;
-static double starting_time = 0.0;
+static unsigned int starting_time;
/* Creates the window for the embed widget test */
void etk_test_embed_window_create(void *data)
@@ -34,7 +32,7 @@
if (ecore_evas)
{
- starting_time = _etk_test_embed_time_get();
+ starting_time = etk_current_time_get();
_etk_test_embed_update();
ecore_evas_show(ecore_evas);
return;
@@ -82,7 +80,7 @@
ecore_evas_size_min_set(ecore_evas, min_size.w + 50, min_size.h + 120);
/* Updates the position of the objects */
- starting_time = _etk_test_embed_time_get();
+ starting_time = etk_current_time_get();
_etk_test_embed_update();
ecore_animator_add(_etk_test_embed_animator_cb, NULL);
@@ -151,7 +149,7 @@
Etk_Size embed_size;
int y;
- t = ETK_MAX(0.0, _etk_test_embed_time_get() - starting_time);
+ t = ETK_MAX(0.0, etk_current_time_get() - starting_time) / 1000.0;
if (t <= 2.0)
y = win_h - (0.75 * sin((t / 2.0) * (ETK_TEST_PI / 2)) * win_h);
else
@@ -202,14 +200,4 @@
{
_etk_test_embed_update();
return 1;
-}
-
-/* Gets the current time in seconds */
-static double _etk_test_embed_time_get()
-{
- struct timeval timev;
-
- gettimeofday(&timev, NULL);
- return (double)timev.tv_sec + (((double)timev.tv_usec) / 1000000);
-
}
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs