Enlightenment CVS committal

Author  : doursse
Project : e17
Module  : libs/ecore

Dir     : e17/libs/ecore/src/lib/ecore_evas


Modified Files:
        Ecore_Evas.h Makefile.am ecore_evas.c ecore_evas_buffer.c 
        ecore_evas_private.h ecore_evas_sdl.c 
Added Files:
        ecore_evas_win32.c 


Log Message:
add windows support to ecore. ecore_evas is ported too (directdraw and 
direct3d. No opengl yet). It needs to be tested a lot, though. Remove some 
trailing spaces here and there. Replace WIN32 with _WIN32

===================================================================
RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore_evas/Ecore_Evas.h,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -3 -r1.29 -r1.30
--- Ecore_Evas.h        16 Jul 2007 07:23:11 -0000      1.29
+++ Ecore_Evas.h        26 Aug 2007 11:17:21 -0000      1.30
@@ -32,7 +32,7 @@
  * - iconfication api needs to work
  * - maximization api needs to work
  * - document all calls
- * 
+ *
  * later:
  * - buffer back-end that renders to an evas_image_object ???
  * - qt back-end ???
@@ -53,6 +53,7 @@
 #define HAVE_ECORE_EVAS_GL 1
 #define HAVE_ECORE_EVAS_X11_16 1
 #define HAVE_ECORE_EVAS_DIRECTFB 1
+#define HAVE_ECORE_EVAS_WIN32 1
 
 typedef enum _Ecore_Evas_Engine_Type
 {
@@ -63,6 +64,8 @@
    ECORE_EVAS_ENGINE_XRENDER_X11,
    ECORE_EVAS_ENGINE_DIRECTFB,
    ECORE_EVAS_ENGINE_SOFTWARE_X11_16,
+   ECORE_EVAS_ENGINE_SOFTWARE_DDRAW,
+   ECORE_EVAS_ENGINE_DIRECT3D,
    ECORE_EVAS_ENGINE_SDL
 } Ecore_Evas_Engine_Type;
 
@@ -70,12 +73,16 @@
 #define _ECORE_X_WINDOW_PREDEF
 typedef unsigned int Ecore_X_Window;
 #endif
-   
+
 #ifndef _ECORE_DIRECTFB_H
 #define _ECORE_DIRECTFB_WINDOW_PREDEF
 typedef struct _Ecore_DirectFB_Window Ecore_DirectFB_Window;
 #endif
-   
+
+#ifndef __ECORE_WIN32_H__
+typedef void Ecore_Win32_Window;
+#endif
+
 #ifndef _ECORE_EVAS_PRIVATE_H
 /* basic data types */
 typedef struct _Ecore_Evas Ecore_Evas;
@@ -84,7 +91,7 @@
 /* module setup/shutdown calls */
 
 EAPI int         ecore_evas_engine_type_supported_get(Ecore_Evas_Engine_Type 
engine);
-       
+
 EAPI int         ecore_evas_init(void);
 EAPI int         ecore_evas_shutdown(void);
 
@@ -95,7 +102,7 @@
 EAPI void            ecore_evas_software_x11_direct_resize_set(Ecore_Evas *ee, 
int on);
 EAPI int             ecore_evas_software_x11_direct_resize_get(Ecore_Evas *ee);
 EAPI void            ecore_evas_software_x11_extra_event_window_add(Ecore_Evas 
*ee, Ecore_X_Window win);
-   
+
 EAPI Ecore_Evas     *ecore_evas_gl_x11_new(const char *disp_name, 
Ecore_X_Window parent, int x, int y, int w, int h);
 EAPI Ecore_X_Window  ecore_evas_gl_x11_window_get(Ecore_Evas *ee);
 EAPI Ecore_X_Window  ecore_evas_gl_x11_subwindow_get(Ecore_Evas *ee);
@@ -124,9 +131,21 @@
 
 EAPI Ecore_Evas     *ecore_evas_buffer_new(int w, int h);
 EAPI const int      *ecore_evas_buffer_pixels_get(Ecore_Evas *ee);
-       
+
 EAPI Evas_Object    *ecore_evas_object_image_new(Ecore_Evas *ee_target);
 
+EAPI Ecore_Evas     *ecore_evas_software_ddraw_new(Ecore_Win32_Window *parent,
+                                                   int                 x,
+                                                   int                 y,
+                                                   int                 width,
+                                                   int                 height);
+
+EAPI Ecore_Evas     *ecore_evas_direct3d_new(Ecore_Win32_Window *parent,
+                                             int                 x,
+                                             int                 y,
+                                             int                 width,
+                                             int                 height);
+
 EAPI Ecore_Evas     *ecore_evas_sdl_new(const char* name, int w, int h, int 
fullscreen, int hwsurface, int noframe, int alpha);
 
 /* generic manipulation calls */
@@ -161,10 +180,10 @@
 EAPI void        ecore_evas_alpha_set(Ecore_Evas *ee, int alpha);
 EAPI int         ecore_evas_alpha_get(Ecore_Evas *ee);
 EAPI void        ecore_evas_show(Ecore_Evas *ee);
-EAPI void        ecore_evas_hide(Ecore_Evas *ee);   
+EAPI void        ecore_evas_hide(Ecore_Evas *ee);
 EAPI int         ecore_evas_visibility_get(Ecore_Evas *ee);
 EAPI void        ecore_evas_raise(Ecore_Evas *ee);
-EAPI void        ecore_evas_lower(Ecore_Evas *ee);       
+EAPI void        ecore_evas_lower(Ecore_Evas *ee);
 EAPI void        ecore_evas_title_set(Ecore_Evas *ee, const char *t);
 EAPI const char *ecore_evas_title_get(Ecore_Evas *ee);
 EAPI void        ecore_evas_name_class_set(Ecore_Evas *ee, const char *n, 
const char *c);
===================================================================
RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore_evas/Makefile.am,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -3 -r1.15 -r1.16
--- Makefile.am 16 Jul 2007 07:23:11 -0000      1.15
+++ Makefile.am 26 Aug 2007 11:17:21 -0000      1.16
@@ -30,6 +30,16 @@
 ECORE_DIRECTFB_LDF = 
 endif
 
+if BUILD_ECORE_WIN32
+ECORE_WIN32_INC = -I$(top_srcdir)/src/lib/ecore_win32
+ECORE_WIN32_LIB = $(top_builddir)/src/lib/ecore_win32/libecore_win32.la
+ECORE_WIN32_LDF = -L$(top_builddir)/src/lib/ecore_win32/.libs
+else
+ECORE_WIN32_INC =
+ECORE_WIN32_LIB = 
+ECORE_WIN32_LDF = 
+endif
+
 if BUILD_ECORE_SDL
 ECORE_SDL_INC = -I$(top_srcdir)/src/lib/ecore_sdl
 ECORE_SDL_LIB = $(top_builddir)/src/lib/ecore_sdl/libecore_sdl.la
@@ -48,6 +58,7 @@
 $(ECORE_X_INC) \
 $(ECORE_FB_INC) \
 $(ECORE_DIRECTFB_INC) \
+$(ECORE_WIN32_INC) \
 $(ECORE_SDL_INC) \
 @EVAS_CFLAGS@ \
 @XCB_CFLAGS@
@@ -56,6 +67,7 @@
 $(ECORE_X_LDF) \
 $(ECORE_FB_LDF) \
 $(ECORE_DIRECTFB_LDF) \
+$(ECORE_WIN32_LDF) \
 $(ECORE_SDL_LDF) \
 -L$(top_builddir)/src/lib/ecore/.libs
 
@@ -72,21 +84,25 @@
 ecore_evas_fb.c \
 ecore_evas_buffer.c \
 ecore_evas_directfb.c \
+ecore_evas_win32.c \
 ecore_evas_sdl.c
 
 libecore_evas_la_LIBADD = \
 $(ECORE_X_LIB) \
 $(ECORE_FB_LIB) \
 $(ECORE_DIRECTFB_LIB) \
+$(ECORE_WIN32_LIB) \
 $(ECORE_SDL_LIB) \
 $(top_builddir)/src/lib/ecore/libecore.la \
 @EVAS_LIBS@ \
[EMAIL PROTECTED]@
[EMAIL PROTECTED]@ \
[EMAIL PROTECTED]@
 
 libecore_evas_la_DEPENDENCIES = \
 $(ECORE_X_LIB) \
 $(ECORE_FB_LIB) \
 $(ECORE_DIRECTFB_LIB) \
+$(ECORE_WIN32_LIB) \
 $(ECORE_SDL_LIB) \
 $(top_builddir)/src/lib/ecore/libecore.la
 
@@ -99,4 +115,5 @@
 ecore_evas_fb.c \
 ecore_evas_buffer.c \
 ecore_evas_directfb.c \
+ecore_evas_win32.c \
 ecore_evas_sdl.c
===================================================================
RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore_evas/ecore_evas.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -3 -r1.37 -r1.38
--- ecore_evas.c        18 Aug 2007 14:26:49 -0000      1.37
+++ ecore_evas.c        26 Aug 2007 11:17:21 -0000      1.38
@@ -10,7 +10,7 @@
  * Query if a particular renginering engine target has support
  * @param  engine The engine to check support for
  * @return 1 if the particualr engine is supported, 0 if it is not
- * 
+ *
  * Query if engine @param engine is supported by ecore_evas. 1 is returned if
  * it is, and 0 is returned if it is not supported.
  */
@@ -24,42 +24,42 @@
        return 1;
 #else
        return 0;
-#endif 
+#endif
        break;
       case ECORE_EVAS_ENGINE_SOFTWARE_FB:
 #ifdef BUILD_ECORE_EVAS_FB
        return 1;
 #else
        return 0;
-#endif 
+#endif
        break;
       case ECORE_EVAS_ENGINE_GL_X11:
 #ifdef BUILD_ECORE_EVAS_GL
        return 1;
 #else
        return 0;
-#endif 
+#endif
        break;
       case ECORE_EVAS_ENGINE_XRENDER_X11:
 #ifdef BUILD_ECORE_EVAS_XRENDER
        return 1;
 #else
        return 0;
-#endif 
+#endif
 
       case ECORE_EVAS_ENGINE_SOFTWARE_X11_16:
 #ifdef BUILD_ECORE_EVAS_X11_16
        return 1;
 #else
        return 0;
-#endif 
+#endif
        break;
       case ECORE_EVAS_ENGINE_SOFTWARE_BUFFER:
 #ifdef BUILD_ECORE_EVAS_BUFFER
        return 1;
 #else
        return 0;
-#endif 
+#endif
        break;
       case ECORE_EVAS_ENGINE_DIRECTFB:
 #ifdef BUILD_ECORE_EVAS_DIRECTFB
@@ -83,7 +83,7 @@
 /**
  * Init the Evas system.
  * @return greater than 0 on success, 0 on failure
- * 
+ *
  * Set up the Evas wrapper system.
  */
 EAPI int
@@ -97,7 +97,7 @@
 /**
  * Shut down the Evas system.
  * @return 0 if ecore evas is fully shut down, or > 0 if it still needs to be 
shut down
- * 
+ *
  * This closes the Evas system down.
  */
 EAPI int
@@ -118,7 +118,7 @@
 #ifdef BUILD_ECORE_EVAS_DIRECTFB
        while (_ecore_evas_directfb_shutdown());
 #endif
-       evas_shutdown(); 
+       evas_shutdown();
      }
    if (_ecore_evas_init_count < 0) _ecore_evas_init_count = 0;
    return _ecore_evas_init_count;
@@ -126,7 +126,7 @@
 
 /**
  * Return the Ecore_Evas for this Evas
- * 
+ *
  * @param e The Evas to get the Ecore_Evas from
  * @return The Ecore_Evas that holds this Evas
  */
@@ -140,7 +140,7 @@
  * Free an Ecore_Evas
  * @param ee The Ecore_Evas to free
  *
- * This frees up any memory used by the Ecore_Evas. 
+ * This frees up any memory used by the Ecore_Evas.
  */
 EAPI void
 ecore_evas_free(Ecore_Evas *ee)
@@ -165,7 +165,7 @@
  *
  * @returns NULL on error or no data found, A pointer to the user data on
  *     success.
- * 
+ *
  * @see ecore_evas_data_set
  */
 EAPI void *
@@ -209,7 +209,7 @@
      }
 
    if (!key) return;
-   
+
    ee->data = evas_hash_del(ee->data, key, NULL);
    if (data)
      ee->data = evas_hash_add(ee->data, key, data);
@@ -219,10 +219,10 @@
 #define IFE            return;}
 
 /**
- * Set a callback for Ecore_Evas resize events. 
+ * Set a callback for Ecore_Evas resize events.
  * @param ee The Ecore_Evas to set callbacks on
  * @param func The function to call
- 
+
  * A call to this function will set a callback on an Ecore_Evas, causing
  * @p func to be called whenever @p ee is resized.
  */
@@ -241,10 +241,10 @@
 }
 
 /**
- * Set a callback for Ecore_Evas move events. 
+ * Set a callback for Ecore_Evas move events.
  * @param ee The Ecore_Evas to set callbacks on
  * @param func The function to call
- 
+
  * A call to this function will set a callback on an Ecore_Evas, causing
  * @p func to be called whenever @p ee is moved.
  */
@@ -263,10 +263,10 @@
 }
 
 /**
- * Set a callback for Ecore_Evas show events. 
+ * Set a callback for Ecore_Evas show events.
  * @param ee The Ecore_Evas to set callbacks on
  * @param func The function to call
- 
+
  * A call to this function will set a callback on an Ecore_Evas, causing
  * @p func to be called whenever @p ee is shown.
  */
@@ -285,10 +285,10 @@
 }
 
 /**
- * Set a callback for Ecore_Evas hide events. 
+ * Set a callback for Ecore_Evas hide events.
  * @param ee The Ecore_Evas to set callbacks on
  * @param func The function to call
- 
+
  * A call to this function will set a callback on an Ecore_Evas, causing
  * @p func to be called whenever @p ee is hidden.
  */
@@ -307,10 +307,10 @@
 }
 
 /**
- * Set a callback for Ecore_Evas delete request events. 
+ * Set a callback for Ecore_Evas delete request events.
  * @param ee The Ecore_Evas to set callbacks on
  * @param func The function to call
- 
+
  * A call to this function will set a callback on an Ecore_Evas, causing
  * @p func to be called whenever @p ee gets a delete request.
  */
@@ -329,10 +329,10 @@
 }
 
 /**
- * Set a callback for Ecore_Evas destroy events. 
+ * Set a callback for Ecore_Evas destroy events.
  * @param ee The Ecore_Evas to set callbacks on
  * @param func The function to call
- 
+
  * A call to this function will set a callback on an Ecore_Evas, causing
  * @p func to be called whenever @p ee is destroyed.
  */
@@ -351,10 +351,10 @@
 }
 
 /**
- * Set a callback for Ecore_Evas focus in events. 
+ * Set a callback for Ecore_Evas focus in events.
  * @param ee The Ecore_Evas to set callbacks on
  * @param func The function to call
- 
+
  * A call to this function will set a callback on an Ecore_Evas, causing
  * @p func to be called whenever @p ee gets focus.
  */
@@ -373,10 +373,10 @@
 }
 
 /**
- * Set a callback for Ecore_Evas focus out events. 
+ * Set a callback for Ecore_Evas focus out events.
  * @param ee The Ecore_Evas to set callbacks on
  * @param func The function to call
- 
+
  * A call to this function will set a callback on an Ecore_Evas, causing
  * @p func to be called whenever @p ee loses focus.
  */
@@ -398,7 +398,7 @@
  * Set a callback for Ecore_Evas sticky events.
  * @param ee The Ecore_Evas to set callbacks on
  * @param func The function to call
- 
+
  * A call to this function will set a callback on an Ecore_Evas, causing
  * @p func to be called whenever @p ee becomes sticky.
  */
@@ -420,7 +420,7 @@
  * Set a callback for Ecore_Evas un-sticky events.
  * @param ee The Ecore_Evas to set callbacks on
  * @param func The function to call
- 
+
  * A call to this function will set a callback on an Ecore_Evas, causing
  * @p func to be called whenever @p ee becomes un-sticky.
  */
@@ -439,10 +439,10 @@
 }
 
 /**
- * Set a callback for Ecore_Evas mouse in events. 
+ * Set a callback for Ecore_Evas mouse in events.
  * @param ee The Ecore_Evas to set callbacks on
  * @param func The function to call
- 
+
  * A call to this function will set a callback on an Ecore_Evas, causing
  * @p func to be called whenever the mouse enters @p ee.
  */
@@ -461,10 +461,10 @@
 }
 
 /**
- * Set a callback for Ecore_Evas mouse out events. 
+ * Set a callback for Ecore_Evas mouse out events.
  * @param ee The Ecore_Evas to set callbacks on
  * @param func The function to call
- 
+
  * A call to this function will set a callback on an Ecore_Evas, causing
  * @p func to be called whenever the mouse leaves @p ee.
  */
@@ -483,10 +483,10 @@
 }
 
 /**
- * Set a callback for Ecore_Evas mouse pre render events. 
+ * Set a callback for Ecore_Evas mouse pre render events.
  * @param ee The Ecore_Evas to set callbacks on
  * @param func The function to call
- 
+
  * A call to this function will set a callback on an Ecore_Evas, causing
  * @p func to be called just before the evas in @p ee is rendered.
  */
@@ -505,10 +505,10 @@
 }
 
 /**
- * Set a callback for Ecore_Evas mouse post render events. 
+ * Set a callback for Ecore_Evas mouse post render events.
  * @param ee The Ecore_Evas to set callbacks on
  * @param func The function to call
- 
+
  * A call to this function will set a callback on an Ecore_Evas, causing
  * @p func to be called just after the evas in @p ee is rendered.
  */
@@ -527,10 +527,10 @@
 }
 
 /**
- * Get an Ecore_Evas's Evas 
+ * Get an Ecore_Evas's Evas
  * @param ee The Ecore_Evas whose Evas you wish to get
  * @return The Evas wrapped by @p ee
- * 
+ *
  * This function returns the Evas contained within @p ee.
  */
 EAPI Evas *
@@ -740,7 +740,7 @@
 }
 
 /**
- * Set whether an Ecore_Evas is shaped or not. 
+ * Set whether an Ecore_Evas is shaped or not.
  * @param ee The Ecore_Evas to shape
  * @param shaped 1 to shape, 0 to not
  *
@@ -784,7 +784,7 @@
 }
 
 /**
- * Set whether an Ecore_Evas has an alpha channel or not. 
+ * Set whether an Ecore_Evas has an alpha channel or not.
  * @param ee The Ecore_Evas to shape
  * @param alpha 1 to enable the alpha channel, 0 to disable it
  *
@@ -829,7 +829,7 @@
 }
 
 /**
- * Show an Ecore_Evas' window 
+ * Show an Ecore_Evas' window
  * @param ee The Ecore_Evas to show.
  *
  * This function makes @p ee visible.
@@ -848,7 +848,7 @@
 }
 
 /**
- * Hide an Ecore_Evas' window 
+ * Hide an Ecore_Evas' window
  * @param ee The Ecore_Evas to show.
  *
  * This function makes @p ee hidden.
@@ -927,7 +927,7 @@
  * Set the title of an Ecore_Evas' window
  * @param ee The Ecore_Evas whose title you wish to set.
  * @param t The title
- * 
+ *
  * This function sets the title of @p ee to @p t.
  */
 EAPI void
@@ -1253,7 +1253,7 @@
  * @param layer
  * @param hot_x The x coordinate of the cursor's hot spot
  * @param hot_y The y coordinate of the cursor's hot spot
- * 
+ *
  * This function makes the mouse cursor over @p ee be the image specified by
  * @p file. The actual point within the image that the mouse is at is specified
  * by @p hot_x and @p hot_y, which are coordinates with respect to the top left
@@ -1568,12 +1568,12 @@
    return ee->prop.fullscreen ? 1:0;
 }
 
-/** 
- * Set whether or not an Ecore_Evas' window should avoid damage  
+/**
+ * Set whether or not an Ecore_Evas' window should avoid damage
  *
  * @param ee The Ecore_Evas
  * @param on 1 to avoid damage, 0 to not
- * 
+ *
  * This function causes @p ee to be drawn to a pixmap to avoid recalculations.
  * On expose events it will copy from the pixmap to the window.
  */
@@ -1623,7 +1623,7 @@
          "ecore_evas_withdrawn_set");
       return;
    }
-   
+
    IFC(ee, fn_withdrawn_set) (ee, withdrawn);
    IFE;
 }
@@ -1662,14 +1662,14 @@
          "ecore_evas_sticky_set");
       return;
    }
-   
+
    IFC(ee, fn_sticky_set) (ee, sticky);
    IFE;
 }
 
 /**
  * Returns the sticky state of an Ecore_Evas' window.
- * 
+ *
  * @param ee The Ecore_Evas whose window's sticky state is returned.
  * @return The Ecore_Evas window's sticky state.
  *
@@ -1702,14 +1702,14 @@
          "ecore_evas_ignore_events_set");
       return;
    }
-   
+
    IFC(ee, fn_ignore_events_set) (ee, ignore);
    IFE;
 }
 
 /**
  * Returns the ignore state of an Ecore_Evas' window.
- * 
+ *
  * @param ee The Ecore_Evas whose window's ignore events state is returned.
  * @return The Ecore_Evas window's ignore state.
  *
@@ -1726,7 +1726,7 @@
       return ee->ignore_events ? 1 : 0;
 }
 
-#ifndef WIN32
+#ifndef _WIN32
 /* fps debug calls - for debugging how much time your app actually spends */
 /* rendering graphics... :) */
 
@@ -1738,7 +1738,7 @@
 _ecore_evas_fps_debug_init(void)
 {
    char buf[4096];
-   
+
    _ecore_evas_fps_debug_init_count++;
    if (_ecore_evas_fps_debug_init_count > 1) return;
    snprintf(buf, sizeof(buf), "/tmp/.ecore_evas_fps_debug-%i", (int)getpid());
@@ -1751,7 +1751,7 @@
    if (_ecore_evas_fps_debug_fd >= 0)
      {
        unsigned int zero = 0;
-       
+
        write(_ecore_evas_fps_debug_fd, &zero, sizeof(unsigned int));
        _ecore_evas_fps_rendertime_mmap = mmap(NULL, sizeof(unsigned int),
                                               PROT_READ | PROT_WRITE,
@@ -1768,7 +1768,7 @@
    if (_ecore_evas_fps_debug_fd >= 0)
      {
        char buf[4096];
-       
+
        snprintf(buf, sizeof(buf), "/tmp/.ecore_evas_fps_debug-%i", 
(int)getpid());
        unlink(buf);
        if (_ecore_evas_fps_rendertime_mmap)
@@ -1784,11 +1784,11 @@
 void
 _ecore_evas_fps_debug_rendertime_add(double t)
 {
-   if ((_ecore_evas_fps_debug_fd >= 0) && 
+   if ((_ecore_evas_fps_debug_fd >= 0) &&
        (_ecore_evas_fps_rendertime_mmap))
      {
        unsigned int tm;
-       
+
        tm = (unsigned int)(t * 1000000.0);
        /* i know its not 100% theoretically guaranteed, but i'd say a write */
        /* of an int could be considered atomic for all practical purposes */
@@ -1836,7 +1836,7 @@
 _ecore_evas_cb_idle_flush(void *data)
 {
    Ecore_Evas *ee;
-   
+
    ee = (Ecore_Evas *)data;
    evas_render_idle_flush(ee->evas);
    ee->engine.idle_flush_timer = NULL;
===================================================================
RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore_evas/ecore_evas_buffer.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -3 -r1.16 -r1.17
--- ecore_evas_buffer.c 17 Jun 2007 03:41:43 -0000      1.16
+++ ecore_evas_buffer.c 26 Aug 2007 11:17:21 -0000      1.17
@@ -7,7 +7,9 @@
 #ifdef BUILD_ECORE_EVAS_BUFFER
 static int _ecore_evas_init_count = 0;
 
+#ifndef _WIN32
 static int _ecore_evas_fps_debug = 0;
+#endif /* _WIN32 */
 
 static Ecore_Evas *ecore_evases = NULL;
 
@@ -24,20 +26,22 @@
 {
    _ecore_evas_init_count++;
    if (_ecore_evas_init_count > 1) return _ecore_evas_init_count;
+#ifndef _WIN32
    if (getenv("ECORE_EVAS_FPS_DEBUG")) _ecore_evas_fps_debug = 1;
    if (_ecore_evas_fps_debug) _ecore_evas_fps_debug_init();
+#endif /* _WIN32 */
    return _ecore_evas_init_count;
 }
 
 static void
 _ecore_evas_buffer_free(Ecore_Evas *ee)
 {
-   ecore_evases = _ecore_list2_remove(ecore_evases, ee);   
+   ecore_evases = _ecore_list2_remove(ecore_evases, ee);
    _ecore_evas_buffer_shutdown();
    if (ee->engine.buffer.image)
      {
        Ecore_Evas *ee2;
-       
+
        ee2 = evas_object_data_get(ee->engine.buffer.image, 
"Ecore_Evas_Parent");
        evas_object_del(ee->engine.buffer.image);
        ee2->sub_ecore_evas = evas_list_remove(ee2->sub_ecore_evas, ee);
@@ -50,7 +54,7 @@
 _ecore_evas_resize(Ecore_Evas *ee, int w, int h)
 {
    Evas_Engine_Info_Buffer *einfo;
-   
+
    if (w < 1) w = 1;
    if (h < 1) h = 1;
    if ((w == ee->w) && (h == ee->h)) return;
@@ -69,7 +73,7 @@
        if (ee->engine.buffer.pixels) free(ee->engine.buffer.pixels);
        ee->engine.buffer.pixels = malloc(ee->w * ee->h * sizeof(int));
      }
-   
+
    einfo = (Evas_Engine_Info_Buffer *)evas_engine_info_get(ee->evas);
    if (einfo)
      {
@@ -82,9 +86,9 @@
        einfo->info.func.free_update_region = NULL;
        evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo);
      }
-   if (ee->func.fn_resize) ee->func.fn_resize(ee);     
+   if (ee->func.fn_resize) ee->func.fn_resize(ee);
 }
-    
+
 int
 _ecore_evas_buffer_shutdown(void)
 {
@@ -95,7 +99,9 @@
          {
             _ecore_evas_free((Ecore_Evas *)ecore_evases);
          }
+#ifndef _WIN32
        if (_ecore_evas_fps_debug) _ecore_evas_fps_debug_shutdown();
+#endif /* _WIN32 */
      }
    if (_ecore_evas_init_count < 0) _ecore_evas_init_count = 0;
    return _ecore_evas_init_count;
@@ -109,7 +115,7 @@
    for (ll = ee->sub_ecore_evas; ll; ll = ll->next)
      {
        Ecore_Evas *ee2;
-       
+
        ee2 = ll->data;
        if (ee2->func.fn_pre_render) ee2->func.fn_pre_render(ee2);
        _ecore_evas_buffer_render(ee2);
@@ -119,7 +125,7 @@
    if (ee->engine.buffer.image)
      {
        int w, h;
-       
+
        evas_object_image_size_get(ee->engine.buffer.image, &w, &h);
        if ((w != ee->w) || (h != ee->h))
          _ecore_evas_resize(ee, w, h);
@@ -128,9 +134,9 @@
    if (ee->engine.buffer.image)
      {
        for (l = updates; l; l = l->next)
-         {  
+         {
             Evas_Rectangle *r;
-            
+
             r = l->data;
             if (ee->engine.buffer.image)
               evas_object_image_data_update_add(ee->engine.buffer.image,
@@ -144,16 +150,16 @@
 _ecore_evas_buffer_coord_translate(Ecore_Evas *ee, Evas_Coord *x, Evas_Coord 
*y)
 {
    Evas_Coord xx, yy, fx, fy, fw, fh;
-   
+
    evas_object_geometry_get(ee->engine.buffer.image, &xx, &yy, NULL, NULL);
    evas_object_image_fill_get(ee->engine.buffer.image, &fx, &fy, &fw, &fh);
-   
+
    if (fw < 1) fw = 1;
    xx = (*x - xx) - fx;
    while (xx < 0) xx += fw;
    while (xx > fw) xx -= fw;
    *x = (ee->w * xx) / fw;
-   
+
    if (fh < 1) fh = 1;
    yy = (*y - yy) - fy;
    while (yy < 0) yy += fh;
@@ -166,7 +172,7 @@
 {
    Ecore_Evas *ee;
    Evas_Event_Mouse_In *ev;
-   
+
    ee = data;
    ev = event_info;
    evas_event_feed_mouse_in(ee->evas, ev->timestamp, NULL);
@@ -177,7 +183,7 @@
 {
    Ecore_Evas *ee;
    Evas_Event_Mouse_Out *ev;
-   
+
    ee = data;
    ev = event_info;
    evas_event_feed_mouse_out(ee->evas, ev->timestamp, NULL);
@@ -186,9 +192,9 @@
 static void
 _ecore_evas_buffer_cb_mouse_down(void *data, Evas *e __UNUSED__, Evas_Object 
*obj __UNUSED__, void *event_info)
 {
-   Ecore_Evas *ee; 
+   Ecore_Evas *ee;
    Evas_Event_Mouse_Down *ev;
-  
+
    ee = data;
    ev = event_info;
    evas_event_feed_mouse_down(ee->evas, ev->button, ev->flags, ev->timestamp, 
NULL);
@@ -199,7 +205,7 @@
 {
    Ecore_Evas *ee;
    Evas_Event_Mouse_Up *ev;
-   
+
    ee = data;
    ev = event_info;
    evas_event_feed_mouse_up(ee->evas, ev->button, ev->flags, ev->timestamp, 
NULL);
@@ -211,7 +217,7 @@
    Ecore_Evas *ee;
    Evas_Event_Mouse_Move *ev;
    Evas_Coord x, y;
-   
+
    ee = data;
    ev = event_info;
    x = ev->cur.canvas.x;
@@ -225,7 +231,7 @@
 {
    Ecore_Evas *ee;
    Evas_Event_Mouse_Wheel *ev;
-   
+
    ee = data;
    ev = event_info;
    evas_event_feed_mouse_wheel(ee->evas, ev->direction, ev->z, ev->timestamp, 
NULL);
@@ -235,7 +241,7 @@
 _ecore_evas_buffer_cb_free(void *data, Evas *e __UNUSED__, Evas_Object *obj 
__UNUSED__, void *event_info __UNUSED__)
 {
    Ecore_Evas *ee;
-   
+
    ee = data;
    if (ee->driver) _ecore_evas_free(ee);
 }
@@ -245,7 +251,7 @@
 {
    Ecore_Evas *ee;
    Evas_Event_Key_Down *ev;
-   
+
    ee = data;
    ev = event_info;
    if (evas_key_modifier_is_set(evas_key_modifier_get(e), "Shift"))
@@ -292,7 +298,7 @@
 {
    Ecore_Evas *ee;
    Evas_Event_Key_Up *ev;
-   
+
    ee = data;
    ev = event_info;
    if (evas_key_modifier_is_set(evas_key_modifier_get(e), "Shift"))
@@ -338,7 +344,7 @@
 _ecore_evas_buffer_cb_focus_in(void *data, Evas *e __UNUSED__, Evas_Object 
*obj __UNUSED__, void *event_info __UNUSED__)
 {
    Ecore_Evas *ee;
-   
+
    ee = data;
    ee->prop.focused = 1;
    if (ee->func.fn_focus_in) ee->func.fn_focus_in(ee);
@@ -348,7 +354,7 @@
 _ecore_evas_buffer_cb_focus_out(void *data, Evas *e __UNUSED__, Evas_Object 
*obj __UNUSED__, void *event_info __UNUSED__)
 {
    Ecore_Evas *ee;
-   
+
    ee = data;
    ee->prop.focused = 0;
    if (ee->func.fn_focus_out) ee->func.fn_focus_out(ee);
@@ -358,7 +364,7 @@
 _ecore_evas_buffer_cb_show(void *data, Evas *e __UNUSED__, Evas_Object *obj 
__UNUSED__, void *event_info __UNUSED__)
 {
    Ecore_Evas *ee;
-   
+
    ee = data;
    ee->visible = 1;
    if (ee->func.fn_show) ee->func.fn_show(ee);
@@ -368,7 +374,7 @@
 _ecore_evas_buffer_cb_hide(void *data, Evas *e __UNUSED__, Evas_Object *obj 
__UNUSED__, void *event_info __UNUSED__)
 {
    Ecore_Evas *ee;
-   
+
    ee = data;
    ee->visible = 0;
    if (ee->func.fn_hide) ee->func.fn_hide(ee);
@@ -442,11 +448,11 @@
    if (!ee) return NULL;
 
    ECORE_MAGIC_SET(ee, ECORE_MAGIC_EVAS);
-   
+
    _ecore_evas_buffer_init();
-   
+
    ee->engine.func = (Ecore_Evas_Engine_Func *)&_ecore_buffer_engine_func;
-   
+
    ee->driver = "buffer";
 
    if (w < 1) w = 1;
@@ -466,16 +472,16 @@
    ee->prop.fullscreen = 0;
    ee->prop.withdrawn = 0;
    ee->prop.sticky = 0;
-   
+
    /* init evas here */
    ee->evas = evas_new();
    evas_data_attach_set(ee->evas, ee);
    evas_output_method_set(ee->evas, rmethod);
    evas_output_size_set(ee->evas, w, h);
    evas_output_viewport_set(ee->evas, 0, 0, w, h);
-   
+
    ee->engine.buffer.pixels = malloc(w * h * sizeof(int));
-   
+
    einfo = (Evas_Engine_Info_Buffer *)evas_engine_info_get(ee->evas);
    if (einfo)
      {
@@ -497,14 +503,14 @@
    evas_key_lock_add(ee->evas, "Caps_Lock");
    evas_key_lock_add(ee->evas, "Num_Lock");
    evas_key_lock_add(ee->evas, "Scroll_Lock");
-   
+
    evas_event_feed_mouse_in(ee->evas, 0, NULL);
 
    ecore_evases = _ecore_list2_prepend(ecore_evases, ee);
    return ee;
 #else
    return NULL;
-#endif   
+#endif
 }
 
 EAPI const int *
@@ -515,7 +521,7 @@
    return ee->engine.buffer.pixels;
 #else
    return NULL;
-#endif   
+#endif
 }
 
 EAPI Evas_Object *
@@ -534,13 +540,13 @@
    if (!ee) return NULL;
 
    o = evas_object_image_add(ee_target->evas);
-   
+
    ECORE_MAGIC_SET(ee, ECORE_MAGIC_EVAS);
-   
+
    _ecore_evas_buffer_init();
-   
+
    ee->engine.func = (Ecore_Evas_Engine_Func *)&_ecore_buffer_engine_func;
-   
+
    ee->driver = "buffer";
 
    w = 1;
@@ -560,14 +566,14 @@
    ee->prop.fullscreen = 0;
    ee->prop.withdrawn = 0;
    ee->prop.sticky = 0;
-   
+
    /* init evas here */
    ee->evas = evas_new();
    evas_data_attach_set(ee->evas, ee);
    evas_output_method_set(ee->evas, rmethod);
    evas_output_size_set(ee->evas, w, h);
    evas_output_viewport_set(ee->evas, 0, 0, w, h);
-   
+
    ee->engine.buffer.image = o;
    evas_object_data_set(ee->engine.buffer.image, "Ecore_Evas", ee);
    evas_object_data_set(ee->engine.buffer.image, "Ecore_Evas_Parent", 
ee_target);
@@ -635,10 +641,10 @@
    evas_key_lock_add(ee->evas, "Caps_Lock");
    evas_key_lock_add(ee->evas, "Num_Lock");
    evas_key_lock_add(ee->evas, "Scroll_Lock");
-   
+
    ee_target->sub_ecore_evas = evas_list_append(ee_target->sub_ecore_evas, ee);
    return o;
 #else
    return NULL;
-#endif   
+#endif
 }
===================================================================
RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore_evas/ecore_evas_private.h,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -3 -r1.29 -r1.30
--- ecore_evas_private.h        21 Jun 2007 22:49:36 -0000      1.29
+++ ecore_evas_private.h        26 Aug 2007 11:17:21 -0000      1.30
@@ -10,8 +10,8 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 
-#ifndef WIN32
-#include <sys/mman.h>
+#ifndef _WIN32
+# include <sys/mman.h>
 #endif
 
 #include <Evas.h>
@@ -52,15 +52,25 @@
 # endif /* HAVE_ECORE_X_XCB */
 #endif
 #ifdef BUILD_ECORE_EVAS_FB
-#include <Evas_Engine_FB.h>
+# include <Evas_Engine_FB.h>
 #endif
 #ifdef BUILD_ECORE_EVAS_DIRECTFB
-#include <Evas_Engine_DirectFB.h>
-#include "Ecore_DirectFB.h"
+# include <Evas_Engine_DirectFB.h>
+# include "Ecore_DirectFB.h"
 #endif
 #ifdef BUILD_ECORE_EVAS_BUFFER
-#include <Evas_Engine_Buffer.h>
+# include <Evas_Engine_Buffer.h>
 #endif
+#ifdef BUILD_ECORE_WIN32
+# include "Ecore_Win32.h"
+# ifdef HAVE_DIRECTDRAW
+#  include <Evas_Engine_Software_DDraw.h>
+# endif
+# ifdef HAVE_DIRECT3D
+#  include <Evas_Engine_Direct3D.h>
+# endif
+#endif
+
 
 #define IDLE_FLUSH_TIME 0.5
 
@@ -70,7 +80,7 @@
 
 struct _Ecore_Evas_Engine_Func
 {
-   void        (*fn_free) (Ecore_Evas *ee);      
+   void        (*fn_free) (Ecore_Evas *ee);
    void        (*fn_callback_resize_set) (Ecore_Evas *ee, void (*func) 
(Ecore_Evas *ee));
    void        (*fn_callback_move_set) (Ecore_Evas *ee, void (*func) 
(Ecore_Evas *ee));
    void        (*fn_callback_show_set) (Ecore_Evas *ee, void (*func) 
(Ecore_Evas *ee));
@@ -82,7 +92,7 @@
    void        (*fn_callback_mouse_in_set) (Ecore_Evas *ee, void (*func) 
(Ecore_Evas *ee));
    void        (*fn_callback_mouse_out_set) (Ecore_Evas *ee, void (*func) 
(Ecore_Evas *ee));
    void        (*fn_callback_sticky_set) (Ecore_Evas *ee, void (*func) 
(Ecore_Evas *ee));
-   void        (*fn_callback_unsticky_set) (Ecore_Evas *ee, void (*func) 
(Ecore_Evas *ee));   
+   void        (*fn_callback_unsticky_set) (Ecore_Evas *ee, void (*func) 
(Ecore_Evas *ee));
    void        (*fn_callback_pre_render_set) (Ecore_Evas *ee, void (*func) 
(Ecore_Evas *ee));
    void        (*fn_callback_post_render_set) (Ecore_Evas *ee, void (*func) 
(Ecore_Evas *ee));
    void        (*fn_move) (Ecore_Evas *ee, int x, int y);
@@ -119,7 +129,7 @@
 struct _Ecore_Evas_Engine
 {
    Ecore_Evas_Engine_Func *func;
-   
+
 #ifdef BUILD_ECORE_X
    struct {
       Ecore_X_Window win_root;
@@ -150,7 +160,7 @@
           unsigned char below : 1;
       } state;
    } x;
-#endif   
+#endif
 #ifdef BUILD_ECORE_EVAS_FB
    struct {
       int real_w;
@@ -168,9 +178,16 @@
       Ecore_DirectFB_Window *window;
    } directfb;
 #endif
+#ifdef BUILD_ECORE_WIN32
+   struct {
+      Ecore_Win32_Window *parent;
+      Ecore_Win32_Window *window;
+   } win32;
+#endif
+
    Ecore_Timer *idle_flush_timer;
 };
-  
+
 struct _Ecore_Evas
 {
    Ecore_List  __list_data;
@@ -194,7 +211,7 @@
    struct {
       int      w, h;
    } expecting_resize;
-   
+
    struct {
       char           *title;
       char           *name;
@@ -202,8 +219,8 @@
       struct {
         int          w, h;
       } min,
-       max, 
-       base, 
+       max,
+       base,
        step;
       struct {
         Evas_Object *object;
@@ -225,7 +242,7 @@
       char            sticky       : 1;
       char            request_pos  : 1;
    } prop;
-   
+
    struct {
       void          (*fn_resize) (Ecore_Evas *ee);
       void          (*fn_move) (Ecore_Evas *ee);
@@ -236,13 +253,13 @@
       void          (*fn_focus_in) (Ecore_Evas *ee);
       void          (*fn_focus_out) (Ecore_Evas *ee);
       void          (*fn_sticky) (Ecore_Evas *ee);
-      void          (*fn_unsticky) (Ecore_Evas *ee);      
+      void          (*fn_unsticky) (Ecore_Evas *ee);
       void          (*fn_mouse_in) (Ecore_Evas *ee);
       void          (*fn_mouse_out) (Ecore_Evas *ee);
       void          (*fn_pre_render) (Ecore_Evas *ee);
       void          (*fn_post_render) (Ecore_Evas *ee);
    } func;
-   
+
    Ecore_Evas_Engine engine;
    Evas_List *sub_ecore_evas;
 
@@ -268,5 +285,5 @@
 void _ecore_evas_fps_debug_rendertime_add(double t);
 void _ecore_evas_free(Ecore_Evas *ee);
 void _ecore_evas_idle_timeout_update(Ecore_Evas *ee);
-    
+
 #endif
===================================================================
RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore_evas/ecore_evas_sdl.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- ecore_evas_sdl.c    16 Jul 2007 07:23:11 -0000      1.1
+++ ecore_evas_sdl.c    26 Aug 2007 11:17:21 -0000      1.2
@@ -14,7 +14,9 @@
 /* static Ecore_List *ecore_evas_input_devices = NULL; */
 
 static int                      _ecore_evas_init_count = 0;
+#ifndef _WIN32
 static int                      _ecore_evas_fps_debug = 0;
+#endif /* _WIN32 */
 static Ecore_Evas               *ecore_evases = NULL;
 static Ecore_Event_Handler      *ecore_evas_event_handlers[10] = {
    NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
@@ -216,10 +218,12 @@
    double       t1 = 0.;
    double       t2 = 0.;
 
+#ifndef _WIN32
    if (_ecore_evas_fps_debug)
      {
        t1 = ecore_time_get();
      }
+#endif /* _WIN32 */
    for (l = (Ecore_List2 *)ecore_evases; l; l = l->next)
      {
        Ecore_Evas *ee;
@@ -236,11 +240,13 @@
        else
          evas_norender(ee->evas);
      }
+#ifndef _WIN32
    if (_ecore_evas_fps_debug)
      {
        t2 = ecore_time_get();
        _ecore_evas_fps_debug_rendertime_add(t2 - t1);
      }
+#endif /* _WIN32 */
    return 1;
 }
 
@@ -258,10 +264,14 @@
    _ecore_evas_init_count++;
    if (_ecore_evas_init_count > 1) return _ecore_evas_init_count;
 
+#ifndef _WIN32
    if (getenv("ECORE_EVAS_FPS_DEBUG")) _ecore_evas_fps_debug = 1;
+#endif /* _WIN32 */
    ecore_evas_idle_enterer = ecore_idle_enterer_add(_ecore_evas_idle_enter, 
NULL);
    ecore_evas_event = ecore_timer_add(0.008, _ecore_evas_sdl_event, NULL);
+#ifndef _WIN32
    if (_ecore_evas_fps_debug) _ecore_evas_fps_debug_init();
+#endif /* _WIN32 */
 
    ecore_evas_event_handlers[0] = 
ecore_event_handler_add(ECORE_SDL_EVENT_KEY_DOWN, 
_ecore_evas_sdl_event_key_down, NULL);
    ecore_evas_event_handlers[1] = 
ecore_event_handler_add(ECORE_SDL_EVENT_KEY_UP, _ecore_evas_sdl_event_key_up, 
NULL);
@@ -292,7 +302,9 @@
        ecore_evas_idle_enterer = NULL;
         ecore_timer_del(ecore_evas_event);
         ecore_evas_event = NULL;
+#ifndef _WIN32
        if (_ecore_evas_fps_debug) _ecore_evas_fps_debug_shutdown();
+#endif /* _WIN32 */
      }
    if (_ecore_evas_init_count < 0) _ecore_evas_init_count = 0;
    return _ecore_evas_init_count;



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to