2011-11-02 12:20:09 -07:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
# include <config.h>
|
|
|
|
#endif
|
|
|
|
|
2013-03-11 13:11:44 -07:00
|
|
|
#include <Ecore.h>
|
2011-11-02 12:20:09 -07:00
|
|
|
#include "ecore_private.h"
|
2013-03-11 13:11:44 -07:00
|
|
|
#include <Ecore_Input.h>
|
|
|
|
#include <Ecore_Input_Evas.h>
|
2011-11-02 12:20:09 -07:00
|
|
|
|
|
|
|
#include <Ecore_Cocoa.h>
|
2012-02-10 05:27:46 -08:00
|
|
|
#include <Evas_Engine_GL_Cocoa.h>
|
2011-11-02 12:20:09 -07:00
|
|
|
|
2013-03-11 13:11:44 -07:00
|
|
|
#include "Ecore_Evas.h"
|
|
|
|
#include "ecore_evas_private.h"
|
2015-10-08 02:58:46 -07:00
|
|
|
#include "ecore_evas_cocoa.h"
|
2013-03-11 13:11:44 -07:00
|
|
|
|
2015-04-28 05:24:48 -07:00
|
|
|
#ifdef EAPI
|
|
|
|
# undef EAPI
|
|
|
|
#endif
|
|
|
|
|
2015-10-13 07:07:38 -07:00
|
|
|
#ifdef __GNUC__
|
|
|
|
# if __GNUC__ >= 4
|
|
|
|
# define EAPI __attribute__ ((visibility("default")))
|
2015-04-28 05:24:48 -07:00
|
|
|
# else
|
|
|
|
# define EAPI
|
|
|
|
# endif
|
2015-10-13 07:07:38 -07:00
|
|
|
#else
|
|
|
|
# define EAPI
|
|
|
|
#endif
|
2011-11-02 12:20:09 -07:00
|
|
|
|
|
|
|
static int _ecore_evas_init_count = 0;
|
2015-01-15 07:55:40 -08:00
|
|
|
// FIXME: In case we have a lot of windows per app, we should probably use another container
|
|
|
|
// like a rbtree or a dictionnary-based container
|
2014-07-10 11:04:24 -07:00
|
|
|
static Eina_List *ecore_evases = NULL;
|
2015-08-06 10:06:34 -07:00
|
|
|
static Ecore_Event_Handler *ecore_evas_event_handlers[5] = { 0 };
|
2011-11-02 12:20:09 -07:00
|
|
|
|
2015-10-08 02:58:46 -07:00
|
|
|
static const char *_iface_name = "opengl_cocoa";
|
|
|
|
static const int _iface_version = 1;
|
|
|
|
|
2015-08-06 10:05:14 -07:00
|
|
|
static int
|
|
|
|
_render_updates_process(Ecore_Evas *ee, Eina_List *updates)
|
|
|
|
{
|
|
|
|
int rend = 0;
|
|
|
|
|
|
|
|
if (ee->prop.avoid_damage)
|
|
|
|
{
|
2015-08-06 10:06:34 -07:00
|
|
|
if (updates)
|
|
|
|
{
|
|
|
|
_ecore_evas_idle_timeout_update(ee);
|
|
|
|
rend = 1;
|
|
|
|
}
|
2015-08-06 10:05:14 -07:00
|
|
|
|
|
|
|
}
|
|
|
|
else if (((ee->visible) && (ee->draw_ok)) ||
|
|
|
|
((ee->should_be_visible) && (ee->prop.fullscreen)) ||
|
|
|
|
((ee->should_be_visible) && (ee->prop.override)))
|
|
|
|
{
|
|
|
|
if (updates)
|
|
|
|
{
|
|
|
|
if (ee->shaped)
|
|
|
|
{
|
2015-08-06 10:06:34 -07:00
|
|
|
//TODO
|
2015-08-06 10:05:14 -07:00
|
|
|
}
|
|
|
|
if (ee->alpha)
|
|
|
|
{
|
2015-08-06 10:06:34 -07:00
|
|
|
//TODO
|
2015-08-06 10:05:14 -07:00
|
|
|
}
|
|
|
|
_ecore_evas_idle_timeout_update(ee);
|
|
|
|
rend = 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
evas_norender(ee->evas);
|
|
|
|
|
|
|
|
if (ee->func.fn_post_render) ee->func.fn_post_render(ee);
|
|
|
|
|
|
|
|
|
|
|
|
if (rend)
|
|
|
|
{
|
|
|
|
static int frames = 0;
|
|
|
|
static double t0 = 0.0;
|
|
|
|
double t, td;
|
|
|
|
|
|
|
|
t = ecore_time_get();
|
|
|
|
frames++;
|
|
|
|
if ((t - t0) > 1.0)
|
|
|
|
{
|
|
|
|
td = t - t0;
|
2015-08-06 10:06:34 -07:00
|
|
|
DBG("FPS: %3.3f", (double)frames / td);
|
2015-08-06 10:05:14 -07:00
|
|
|
frames = 0;
|
|
|
|
t0 = t;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return rend;
|
|
|
|
}
|
|
|
|
|
2011-11-02 12:20:09 -07:00
|
|
|
static int
|
|
|
|
_ecore_evas_cocoa_render(Ecore_Evas *ee)
|
|
|
|
{
|
|
|
|
int rend = 0;
|
|
|
|
Eina_List *ll;
|
|
|
|
Ecore_Evas *ee2;
|
2015-08-06 10:05:14 -07:00
|
|
|
static int render2 = -1;
|
2011-11-02 12:20:09 -07:00
|
|
|
|
2015-08-06 10:05:14 -07:00
|
|
|
if ((!ee->no_comp_sync) && (_ecore_evas_app_comp_sync))
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
if (ee->in_async_render)
|
|
|
|
{
|
2015-08-06 10:06:34 -07:00
|
|
|
DBG("ee=%p is rendering asynchronously, skip.", ee);
|
2015-08-06 10:05:14 -07:00
|
|
|
return 0;
|
|
|
|
}
|
2011-11-02 12:20:09 -07:00
|
|
|
|
|
|
|
EINA_LIST_FOREACH(ee->sub_ecore_evas, ll, ee2)
|
|
|
|
{
|
|
|
|
if (ee2->func.fn_pre_render) ee2->func.fn_pre_render(ee2);
|
|
|
|
if (ee2->engine.func->fn_render)
|
|
|
|
rend |= ee2->engine.func->fn_render(ee2);
|
|
|
|
if (ee2->func.fn_post_render) ee2->func.fn_post_render(ee2);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (ee->func.fn_pre_render) ee->func.fn_pre_render(ee);
|
2015-08-06 10:05:14 -07:00
|
|
|
if (render2 == -1)
|
2011-11-02 12:20:09 -07:00
|
|
|
{
|
2015-08-06 10:05:14 -07:00
|
|
|
if (getenv("RENDER2")) render2 = 1;
|
|
|
|
else render2 = 0;
|
2011-11-02 12:20:09 -07:00
|
|
|
}
|
2015-08-06 10:05:14 -07:00
|
|
|
if (render2)
|
2011-11-02 12:20:09 -07:00
|
|
|
{
|
2015-08-06 10:05:14 -07:00
|
|
|
if (!ee->can_async_render)
|
|
|
|
{
|
|
|
|
Eina_List *updates = evas_render2_updates(ee->evas);
|
|
|
|
rend = _render_updates_process(ee, updates);
|
|
|
|
evas_render_updates_free(updates);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
ee->in_async_render = EINA_TRUE;
|
|
|
|
if (evas_render2(ee->evas)) rend = 1;
|
|
|
|
else ee->in_async_render = EINA_FALSE;
|
|
|
|
}
|
2011-11-02 12:20:09 -07:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-08-06 10:05:14 -07:00
|
|
|
if (!ee->can_async_render)
|
2011-11-02 12:20:09 -07:00
|
|
|
{
|
2015-08-06 10:05:14 -07:00
|
|
|
Eina_List *updates = evas_render_updates(ee->evas);
|
|
|
|
rend = _render_updates_process(ee, updates);
|
|
|
|
evas_render_updates_free(updates);
|
|
|
|
}
|
|
|
|
else if (evas_render_async(ee->evas))
|
|
|
|
{
|
2015-08-06 10:06:34 -07:00
|
|
|
DBG("ee=%p started asynchronous render.", ee);
|
2015-08-06 10:05:14 -07:00
|
|
|
ee->in_async_render = EINA_TRUE;
|
|
|
|
rend = 1;
|
2011-11-02 12:20:09 -07:00
|
|
|
}
|
2015-08-06 10:05:14 -07:00
|
|
|
else if (ee->func.fn_post_render) ee->func.fn_post_render(ee);
|
2011-11-02 12:20:09 -07:00
|
|
|
}
|
|
|
|
return rend;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static Ecore_Evas *
|
2015-01-15 07:55:40 -08:00
|
|
|
_ecore_evas_cocoa_match(Ecore_Cocoa_Window_Id wid)
|
2011-11-02 12:20:09 -07:00
|
|
|
{
|
2015-08-06 10:06:34 -07:00
|
|
|
Eina_List *it;
|
|
|
|
Ecore_Evas *ee;
|
2015-01-15 07:55:40 -08:00
|
|
|
|
2015-08-06 10:06:34 -07:00
|
|
|
DBG("");
|
|
|
|
EINA_LIST_FOREACH(ecore_evases, it, ee)
|
|
|
|
{
|
|
|
|
if (ecore_cocoa_window_get_window_id((Ecore_Cocoa_Window *)ee->prop.window) == wid)
|
|
|
|
return ee;
|
|
|
|
}
|
|
|
|
return NULL;
|
2011-11-02 12:20:09 -07:00
|
|
|
}
|
|
|
|
|
2015-01-15 07:55:40 -08:00
|
|
|
|
2014-07-10 11:04:24 -07:00
|
|
|
static Eina_Bool
|
2015-01-15 07:55:40 -08:00
|
|
|
_ecore_evas_cocoa_event_got_focus(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
|
2011-11-02 12:20:09 -07:00
|
|
|
{
|
2015-08-06 10:06:34 -07:00
|
|
|
Ecore_Cocoa_Event_Window *e = event;
|
|
|
|
Ecore_Evas *ee;
|
2011-11-02 12:20:09 -07:00
|
|
|
|
2015-08-06 10:06:34 -07:00
|
|
|
ee = _ecore_evas_cocoa_match(e->wid);
|
2015-10-13 08:12:53 -07:00
|
|
|
if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON;
|
2015-08-06 10:06:34 -07:00
|
|
|
|
|
|
|
ee->prop.focused = EINA_TRUE;
|
|
|
|
evas_focus_in(ee->evas);
|
|
|
|
if (ee->func.fn_focus_in) ee->func.fn_focus_in(ee);
|
2014-07-10 11:04:24 -07:00
|
|
|
|
2015-08-06 10:06:34 -07:00
|
|
|
return ECORE_CALLBACK_PASS_ON;
|
2011-11-02 12:20:09 -07:00
|
|
|
}
|
|
|
|
|
2014-07-10 11:04:24 -07:00
|
|
|
static Eina_Bool
|
2015-01-15 07:55:40 -08:00
|
|
|
_ecore_evas_cocoa_event_lost_focus(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
|
2011-11-02 12:20:09 -07:00
|
|
|
{
|
2015-08-06 10:06:34 -07:00
|
|
|
Ecore_Cocoa_Event_Window *e = event;
|
|
|
|
Ecore_Evas *ee;
|
2011-11-02 12:20:09 -07:00
|
|
|
|
2015-08-06 10:06:34 -07:00
|
|
|
ee = _ecore_evas_cocoa_match(e->wid);
|
2015-10-13 08:12:53 -07:00
|
|
|
if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON;
|
2015-08-06 10:06:34 -07:00
|
|
|
|
|
|
|
evas_focus_out(ee->evas);
|
|
|
|
ee->prop.focused = EINA_FALSE;
|
|
|
|
if (ee->func.fn_focus_out) ee->func.fn_focus_out(ee);
|
2011-11-02 12:20:09 -07:00
|
|
|
|
2015-08-06 10:06:34 -07:00
|
|
|
return ECORE_CALLBACK_PASS_ON;
|
2011-11-02 12:20:09 -07:00
|
|
|
}
|
|
|
|
|
2014-07-10 11:04:24 -07:00
|
|
|
static Eina_Bool
|
2012-11-25 01:55:32 -08:00
|
|
|
_ecore_evas_cocoa_event_video_resize(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
|
2011-11-02 12:20:09 -07:00
|
|
|
{
|
2014-07-10 11:04:24 -07:00
|
|
|
Ecore_Cocoa_Event_Video_Resize *e = event;
|
2014-06-09 01:31:34 -07:00
|
|
|
Ecore_Evas *ee;
|
2011-11-02 12:20:09 -07:00
|
|
|
|
2015-08-06 10:06:34 -07:00
|
|
|
DBG("");
|
|
|
|
|
|
|
|
if (!e->wid)
|
|
|
|
return ECORE_CALLBACK_PASS_ON;
|
|
|
|
|
2015-01-15 07:55:40 -08:00
|
|
|
ee = _ecore_evas_cocoa_match(e->wid);
|
2014-07-10 11:04:24 -07:00
|
|
|
if (!ee)
|
|
|
|
{
|
2015-08-06 10:06:34 -07:00
|
|
|
ERR("Unregistered Ecore_Evas for window Id %p", e->wid);
|
2014-07-10 11:04:24 -07:00
|
|
|
return ECORE_CALLBACK_PASS_ON;
|
|
|
|
}
|
|
|
|
|
|
|
|
ee->req.w = ee->w = e->w;
|
|
|
|
ee->req.h = ee->h = e->h;
|
2011-11-02 12:20:09 -07:00
|
|
|
|
2014-06-09 01:31:34 -07:00
|
|
|
evas_output_size_set(ee->evas, e->w, e->h);
|
2014-07-10 11:04:24 -07:00
|
|
|
evas_output_viewport_set(ee->evas, 0, 0, e->w, e->h);
|
|
|
|
evas_damage_rectangle_add(ee->evas, 0, 0, e->w, e->h);
|
2011-11-02 12:20:09 -07:00
|
|
|
|
2015-08-06 10:06:34 -07:00
|
|
|
if (ee->func.fn_resize) ee->func.fn_resize(ee);
|
2014-06-09 01:31:34 -07:00
|
|
|
|
2014-07-10 11:04:24 -07:00
|
|
|
return ECORE_CALLBACK_PASS_ON;
|
2011-11-02 12:20:09 -07:00
|
|
|
}
|
|
|
|
|
2014-07-10 11:04:24 -07:00
|
|
|
static Eina_Bool
|
2015-01-15 07:55:40 -08:00
|
|
|
_ecore_evas_cocoa_event_video_expose(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
|
2011-11-02 12:20:09 -07:00
|
|
|
{
|
2015-08-06 10:06:34 -07:00
|
|
|
Ecore_Cocoa_Event_Window *e = event;
|
|
|
|
Ecore_Evas *ee;
|
|
|
|
int w;
|
|
|
|
int h;
|
2011-11-02 12:20:09 -07:00
|
|
|
|
2015-08-06 10:06:34 -07:00
|
|
|
DBG("");
|
2011-11-02 12:20:09 -07:00
|
|
|
|
2015-08-06 10:06:34 -07:00
|
|
|
if (!e->wid)
|
|
|
|
return ECORE_CALLBACK_PASS_ON;
|
2011-11-02 12:20:09 -07:00
|
|
|
|
2015-08-06 10:06:34 -07:00
|
|
|
ee = _ecore_evas_cocoa_match(e->wid);
|
2011-11-02 12:20:09 -07:00
|
|
|
|
2015-08-06 10:06:34 -07:00
|
|
|
if (!ee)
|
|
|
|
{
|
|
|
|
ERR("Unregistered Ecore_Evas for window Id %p", e->wid);
|
|
|
|
return ECORE_CALLBACK_PASS_ON;
|
|
|
|
}
|
|
|
|
evas_output_size_get(ee->evas, &w, &h);
|
|
|
|
evas_damage_rectangle_add(ee->evas, 0, 0, w, h);
|
|
|
|
|
|
|
|
return ECORE_CALLBACK_PASS_ON;
|
2011-11-02 12:20:09 -07:00
|
|
|
}
|
|
|
|
|
2015-01-30 08:15:55 -08:00
|
|
|
static Eina_Bool
|
|
|
|
_ecore_evas_cocoa_event_window_destroy(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
|
|
|
|
{
|
|
|
|
Ecore_Cocoa_Event_Window *e = event;
|
|
|
|
Ecore_Evas *ee;
|
|
|
|
|
2015-08-06 10:06:34 -07:00
|
|
|
DBG("");
|
|
|
|
|
|
|
|
if (!e->wid)
|
|
|
|
return ECORE_CALLBACK_PASS_ON;
|
2015-01-30 08:15:55 -08:00
|
|
|
|
|
|
|
ee = _ecore_evas_cocoa_match(e->wid);
|
|
|
|
if (!ee)
|
|
|
|
{
|
2015-08-06 10:06:34 -07:00
|
|
|
ERR("Unregistered Ecore_Evas for window Id %p", e->wid);
|
2015-01-30 08:15:55 -08:00
|
|
|
return ECORE_CALLBACK_PASS_ON;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (ee->func.fn_delete_request) ee->func.fn_delete_request(ee);
|
|
|
|
|
|
|
|
return ECORE_CALLBACK_PASS_ON;
|
|
|
|
}
|
|
|
|
|
2011-11-02 12:20:09 -07:00
|
|
|
static int
|
|
|
|
_ecore_evas_cocoa_init(void)
|
|
|
|
{
|
2015-08-06 10:06:34 -07:00
|
|
|
DBG("");
|
|
|
|
_ecore_evas_init_count++;
|
|
|
|
if (_ecore_evas_init_count > 1)
|
|
|
|
return _ecore_evas_init_count;
|
2014-07-10 11:04:24 -07:00
|
|
|
|
2015-08-06 10:06:34 -07:00
|
|
|
ecore_event_evas_init();
|
2011-11-02 12:20:09 -07:00
|
|
|
|
2015-08-06 10:06:34 -07:00
|
|
|
ecore_evas_event_handlers[0] = ecore_event_handler_add(ECORE_COCOA_EVENT_GOT_FOCUS, _ecore_evas_cocoa_event_got_focus, NULL);
|
|
|
|
ecore_evas_event_handlers[1] = ecore_event_handler_add(ECORE_COCOA_EVENT_LOST_FOCUS, _ecore_evas_cocoa_event_lost_focus, NULL);
|
|
|
|
ecore_evas_event_handlers[2] = ecore_event_handler_add(ECORE_COCOA_EVENT_RESIZE, _ecore_evas_cocoa_event_video_resize, NULL);
|
|
|
|
ecore_evas_event_handlers[3] = ecore_event_handler_add(ECORE_COCOA_EVENT_EXPOSE, _ecore_evas_cocoa_event_video_expose, NULL);
|
|
|
|
ecore_evas_event_handlers[4] = ecore_event_handler_add(ECORE_COCOA_EVENT_WINDOW_DESTROY, _ecore_evas_cocoa_event_window_destroy, NULL);
|
2011-11-02 12:20:09 -07:00
|
|
|
|
2015-08-06 10:06:34 -07:00
|
|
|
return _ecore_evas_init_count;
|
2011-11-02 12:20:09 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
static int
|
|
|
|
_ecore_evas_cocoa_shutdown(void)
|
|
|
|
{
|
2015-08-06 10:06:34 -07:00
|
|
|
Ecore_Evas *ee;
|
|
|
|
DBG("");
|
|
|
|
_ecore_evas_init_count--;
|
|
|
|
if (_ecore_evas_init_count == 0)
|
|
|
|
{
|
|
|
|
unsigned int i;
|
2011-11-02 12:20:09 -07:00
|
|
|
|
2015-08-06 10:06:34 -07:00
|
|
|
EINA_LIST_FREE(ecore_evases, ee)
|
|
|
|
_ecore_evas_free(ee);
|
2011-11-02 12:20:09 -07:00
|
|
|
|
2015-10-13 07:10:00 -07:00
|
|
|
for (i = 0; i < EINA_C_ARRAY_LENGTH(ecore_evas_event_handlers); i++)
|
2015-08-06 10:06:34 -07:00
|
|
|
ecore_event_handler_del(ecore_evas_event_handlers[i]);
|
2011-11-02 12:20:09 -07:00
|
|
|
|
2015-08-06 10:06:34 -07:00
|
|
|
ecore_event_evas_shutdown();
|
|
|
|
}
|
|
|
|
return _ecore_evas_init_count;
|
2011-11-02 12:20:09 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_ecore_evas_cocoa_free(Ecore_Evas *ee)
|
|
|
|
{
|
2015-08-06 10:06:34 -07:00
|
|
|
DBG("");
|
|
|
|
ecore_evases = eina_list_remove(ecore_evases, ee);
|
|
|
|
ecore_event_window_unregister(0);
|
|
|
|
_ecore_evas_cocoa_shutdown();
|
|
|
|
ecore_cocoa_shutdown();
|
2011-11-02 12:20:09 -07:00
|
|
|
}
|
|
|
|
|
2015-03-11 07:31:36 -07:00
|
|
|
static void
|
|
|
|
_ecore_evas_size_min_set(Ecore_Evas *ee, int w, int h)
|
|
|
|
{
|
|
|
|
ecore_cocoa_window_size_min_set((Ecore_Cocoa_Window *)ee->prop.window, w, h);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_ecore_evas_size_max_set(Ecore_Evas *ee, int w, int h)
|
|
|
|
{
|
|
|
|
ecore_cocoa_window_size_max_set((Ecore_Cocoa_Window *)ee->prop.window, w, h);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_ecore_evas_size_step_set(Ecore_Evas *ee, int w, int h)
|
|
|
|
{
|
|
|
|
ecore_cocoa_window_size_step_set((Ecore_Cocoa_Window *)ee->prop.window, w, h);
|
|
|
|
}
|
2015-03-12 04:13:08 -07:00
|
|
|
|
|
|
|
static void
|
|
|
|
_ecore_evas_move(Ecore_Evas *ee, int x, int y)
|
|
|
|
{
|
2015-08-06 10:06:34 -07:00
|
|
|
DBG("");
|
2015-03-12 04:13:08 -07:00
|
|
|
ecore_cocoa_window_move((Ecore_Cocoa_Window *)ee->prop.window, x, y);
|
|
|
|
}
|
|
|
|
|
2011-11-02 12:20:09 -07:00
|
|
|
static void
|
|
|
|
_ecore_evas_resize(Ecore_Evas *ee, int w, int h)
|
|
|
|
{
|
2015-08-06 10:06:34 -07:00
|
|
|
DBG("");
|
|
|
|
if ((w == ee->w) && (h == ee->h)) return;
|
|
|
|
ee->req.w = w;
|
|
|
|
ee->req.h = h;
|
|
|
|
ee->w = w;
|
|
|
|
ee->h = h;
|
2011-11-02 12:20:09 -07:00
|
|
|
|
2015-08-06 10:06:34 -07:00
|
|
|
DBG("Ecore_Evas Resize %d %d", w, h);
|
2011-11-02 12:20:09 -07:00
|
|
|
|
2015-08-06 10:06:34 -07:00
|
|
|
ecore_cocoa_window_resize((Ecore_Cocoa_Window *)ee->prop.window, w, h);
|
2011-11-02 12:20:09 -07:00
|
|
|
|
2015-08-06 10:06:34 -07:00
|
|
|
evas_output_size_set(ee->evas, ee->w, ee->h);
|
|
|
|
evas_output_viewport_set(ee->evas, 0, 0, ee->w, ee->h);
|
|
|
|
evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h);
|
2011-11-02 12:20:09 -07:00
|
|
|
|
2015-08-06 10:06:34 -07:00
|
|
|
if (ee->func.fn_resize) ee->func.fn_resize(ee);
|
2011-11-02 12:20:09 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_ecore_evas_move_resize(Ecore_Evas *ee, int x, int y, int w, int h)
|
|
|
|
{
|
2015-08-06 10:06:34 -07:00
|
|
|
DBG("");
|
|
|
|
if ((ee->w == w) && (ee->h == h) && (x == ee->x) && (y == ee->y))
|
|
|
|
return;
|
2014-06-09 01:31:34 -07:00
|
|
|
|
2015-08-06 10:06:34 -07:00
|
|
|
ee->req.x = x;
|
|
|
|
ee->req.y = y;
|
|
|
|
ee->req.w = w;
|
|
|
|
ee->req.h = h;
|
|
|
|
ee->w = w;
|
|
|
|
ee->h = h;
|
|
|
|
ee->x = x;
|
|
|
|
ee->y = y;
|
2011-11-02 12:20:09 -07:00
|
|
|
|
2015-08-06 10:06:34 -07:00
|
|
|
ecore_cocoa_window_move_resize((Ecore_Cocoa_Window *)ee->prop.window, x, y, w, h);
|
2011-11-02 12:20:09 -07:00
|
|
|
|
2015-08-06 10:06:34 -07:00
|
|
|
evas_output_size_set(ee->evas, ee->w, ee->h);
|
|
|
|
evas_output_viewport_set(ee->evas, 0, 0, ee->w, ee->h);
|
|
|
|
evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h);
|
2011-11-02 12:20:09 -07:00
|
|
|
|
2015-08-06 10:06:34 -07:00
|
|
|
if (ee->func.fn_resize) ee->func.fn_resize(ee);
|
2011-11-02 12:20:09 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void
|
2014-07-10 11:04:24 -07:00
|
|
|
_ecore_evas_show(Ecore_Evas *ee)
|
2011-11-02 12:20:09 -07:00
|
|
|
{
|
2015-08-06 10:06:34 -07:00
|
|
|
DBG("");
|
2011-11-02 12:20:09 -07:00
|
|
|
ee->should_be_visible = 1;
|
|
|
|
if (ee->prop.avoid_damage)
|
|
|
|
_ecore_evas_cocoa_render(ee);
|
|
|
|
|
2014-07-10 11:04:24 -07:00
|
|
|
ecore_cocoa_window_show((Ecore_Cocoa_Window *)ee->prop.window);
|
2011-11-02 12:20:09 -07:00
|
|
|
evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void
|
2014-07-10 11:04:24 -07:00
|
|
|
_ecore_evas_hide(Ecore_Evas *ee)
|
2011-11-02 12:20:09 -07:00
|
|
|
{
|
2015-08-06 10:06:34 -07:00
|
|
|
DBG("");
|
2011-11-02 12:20:09 -07:00
|
|
|
|
2014-07-10 11:04:24 -07:00
|
|
|
ecore_cocoa_window_hide((Ecore_Cocoa_Window *)ee->prop.window);
|
2011-11-02 12:20:09 -07:00
|
|
|
ee->should_be_visible = 0;
|
|
|
|
}
|
|
|
|
|
2015-03-12 04:13:08 -07:00
|
|
|
static void
|
|
|
|
_ecore_evas_raise(Ecore_Evas *ee)
|
|
|
|
{
|
2015-08-06 10:06:34 -07:00
|
|
|
DBG("");
|
|
|
|
|
2015-03-12 04:13:08 -07:00
|
|
|
ecore_cocoa_window_raise((Ecore_Cocoa_Window *)ee->prop.window);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_ecore_evas_lower(Ecore_Evas *ee)
|
|
|
|
{
|
2015-08-06 10:06:34 -07:00
|
|
|
DBG("");
|
2015-03-12 04:13:08 -07:00
|
|
|
|
|
|
|
ecore_cocoa_window_lower((Ecore_Cocoa_Window *)ee->prop.window);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_ecore_evas_activate(Ecore_Evas *ee)
|
|
|
|
{
|
2015-08-06 10:06:34 -07:00
|
|
|
DBG("");
|
2015-03-12 04:13:08 -07:00
|
|
|
|
|
|
|
ecore_cocoa_window_activate((Ecore_Cocoa_Window *)ee->prop.window);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_ecore_evas_iconified_set(Ecore_Evas *ee, Eina_Bool on)
|
|
|
|
{
|
2015-08-06 10:06:34 -07:00
|
|
|
DBG("");
|
2015-03-12 04:13:08 -07:00
|
|
|
|
|
|
|
ecore_cocoa_window_iconified_set((Ecore_Cocoa_Window *)ee->prop.window, on);
|
|
|
|
}
|
|
|
|
|
2011-11-02 12:20:09 -07:00
|
|
|
static void
|
|
|
|
_ecore_evas_title_set(Ecore_Evas *ee, const char *title)
|
|
|
|
{
|
|
|
|
INF("ecore evas title set");
|
|
|
|
|
2015-01-22 11:37:56 -08:00
|
|
|
if (eina_streq(ee->prop.title, title)) return;
|
2011-11-02 12:20:09 -07:00
|
|
|
if (ee->prop.title) free(ee->prop.title);
|
|
|
|
ee->prop.title = NULL;
|
|
|
|
if (title) ee->prop.title = strdup(title);
|
2014-07-10 11:04:24 -07:00
|
|
|
ecore_cocoa_window_title_set((Ecore_Cocoa_Window *)ee->prop.window,
|
2011-11-02 12:20:09 -07:00
|
|
|
ee->prop.title);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2014-07-10 11:04:24 -07:00
|
|
|
_ecore_evas_object_cursor_del(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
2011-11-02 12:20:09 -07:00
|
|
|
{
|
2015-08-06 10:06:34 -07:00
|
|
|
Ecore_Evas *ee;
|
2011-11-02 12:20:09 -07:00
|
|
|
|
2015-08-06 10:06:34 -07:00
|
|
|
DBG("");
|
2011-11-02 12:20:09 -07:00
|
|
|
|
2015-08-06 10:06:34 -07:00
|
|
|
ee = data;
|
|
|
|
if (ee)
|
|
|
|
ee->prop.cursor.object = NULL;
|
2011-11-02 12:20:09 -07:00
|
|
|
}
|
|
|
|
|
2015-02-06 14:54:08 -08:00
|
|
|
static void
|
|
|
|
_ecore_evas_object_cursor_unset(Ecore_Evas *ee)
|
|
|
|
{
|
|
|
|
evas_object_event_callback_del_full(ee->prop.cursor.object, EVAS_CALLBACK_DEL, _ecore_evas_object_cursor_del, ee);
|
|
|
|
}
|
|
|
|
|
2011-11-02 12:20:09 -07:00
|
|
|
static void
|
|
|
|
_ecore_evas_object_cursor_set(Ecore_Evas *ee, Evas_Object *obj, int layer, int hot_x, int hot_y)
|
|
|
|
{
|
2015-08-06 10:06:34 -07:00
|
|
|
int x, y;
|
2015-10-08 02:58:46 -07:00
|
|
|
Evas_Object *old;
|
|
|
|
Ecore_Cocoa_Window *win = (Ecore_Cocoa_Window *)(ee->prop.window);
|
2015-08-06 10:06:34 -07:00
|
|
|
DBG("");
|
2011-11-02 12:20:09 -07:00
|
|
|
|
2015-10-08 02:58:46 -07:00
|
|
|
old = ee->prop.cursor.object;
|
2015-08-06 10:06:34 -07:00
|
|
|
if (obj == NULL)
|
|
|
|
{
|
|
|
|
ee->prop.cursor.object = NULL;
|
|
|
|
ee->prop.cursor.layer = 0;
|
|
|
|
ee->prop.cursor.hot.x = 0;
|
|
|
|
ee->prop.cursor.hot.y = 0;
|
2015-10-08 02:58:46 -07:00
|
|
|
ecore_cocoa_window_cursor_show(win, EINA_TRUE);
|
|
|
|
goto end;
|
2015-08-06 10:06:34 -07:00
|
|
|
}
|
2014-06-09 01:31:34 -07:00
|
|
|
|
2015-08-06 10:06:34 -07:00
|
|
|
ee->prop.cursor.object = obj;
|
|
|
|
ee->prop.cursor.layer = layer;
|
|
|
|
ee->prop.cursor.hot.x = hot_x;
|
|
|
|
ee->prop.cursor.hot.y = hot_y;
|
2014-06-09 01:31:34 -07:00
|
|
|
|
2015-08-06 10:06:34 -07:00
|
|
|
evas_pointer_output_xy_get(ee->evas, &x, &y);
|
2015-10-08 02:58:46 -07:00
|
|
|
if (obj != old)
|
|
|
|
{
|
|
|
|
ecore_cocoa_window_cursor_show(win, EINA_FALSE);
|
|
|
|
evas_object_layer_set(ee->prop.cursor.object, ee->prop.cursor.layer);
|
|
|
|
evas_object_pass_events_set(ee->prop.cursor.object, 1);
|
|
|
|
if (evas_pointer_inside_get(ee->evas))
|
|
|
|
evas_object_show(ee->prop.cursor.object);
|
|
|
|
evas_object_event_callback_add(obj, EVAS_CALLBACK_DEL,
|
|
|
|
_ecore_evas_object_cursor_del, ee);
|
|
|
|
}
|
2015-08-06 10:06:34 -07:00
|
|
|
evas_object_move(ee->prop.cursor.object,
|
|
|
|
x - ee->prop.cursor.hot.x,
|
|
|
|
y - ee->prop.cursor.hot.y);
|
2014-06-09 01:31:34 -07:00
|
|
|
|
2015-10-08 02:58:46 -07:00
|
|
|
end:
|
|
|
|
if ((old) && (obj != old))
|
|
|
|
{
|
|
|
|
evas_object_event_callback_del_full(old, EVAS_CALLBACK_DEL,
|
|
|
|
_ecore_evas_object_cursor_del, ee);
|
|
|
|
evas_object_del(old);
|
|
|
|
}
|
2011-11-02 12:20:09 -07:00
|
|
|
}
|
|
|
|
|
2015-03-12 04:13:08 -07:00
|
|
|
static void
|
|
|
|
_ecore_evas_withdrawn_set(Ecore_Evas *ee, Eina_Bool on)
|
|
|
|
{
|
2015-08-06 10:06:34 -07:00
|
|
|
if (on)
|
|
|
|
_ecore_evas_hide(ee);
|
|
|
|
else
|
|
|
|
_ecore_evas_show(ee);
|
2015-03-12 04:13:08 -07:00
|
|
|
}
|
|
|
|
|
2011-11-02 12:20:09 -07:00
|
|
|
static int
|
|
|
|
_ecore_evas_engine_cocoa_init(Ecore_Evas *ee)
|
|
|
|
{
|
|
|
|
Evas_Engine_Info_GL_Cocoa *einfo;
|
|
|
|
const char *driver;
|
|
|
|
int rmethod;
|
|
|
|
|
2015-08-06 10:06:34 -07:00
|
|
|
DBG("");
|
2011-11-02 12:20:09 -07:00
|
|
|
|
|
|
|
driver = "gl_cocoa";
|
|
|
|
|
|
|
|
rmethod = evas_render_method_lookup(driver);
|
|
|
|
if (!rmethod)
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
ee->driver = driver;
|
|
|
|
evas_output_method_set(ee->evas, rmethod);
|
|
|
|
|
|
|
|
einfo = (Evas_Engine_Info_GL_Cocoa *)evas_engine_info_get(ee->evas);
|
|
|
|
if (einfo)
|
|
|
|
{
|
2014-07-10 11:04:24 -07:00
|
|
|
einfo->window = (void *)ee->prop.window;
|
2011-11-02 12:20:09 -07:00
|
|
|
if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo))
|
|
|
|
{
|
|
|
|
ERR("evas_engine_info_set() for engine '%s' failed.", ee->driver);
|
|
|
|
return 0;
|
|
|
|
}
|
2015-01-30 09:21:14 -08:00
|
|
|
ecore_cocoa_window_view_set(einfo->window, einfo->view);
|
2011-11-02 12:20:09 -07:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
ERR("evas_engine_info_set() init engine '%s' failed.", ee->driver);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
2014-06-09 01:31:34 -07:00
|
|
|
static void
|
|
|
|
_ecore_evas_screen_geometry_get(const Ecore_Evas *ee EINA_UNUSED, int *x, int *y, int *w, int *h)
|
|
|
|
{
|
|
|
|
if (x) *x = 0;
|
|
|
|
if (y) *y = 0;
|
|
|
|
ecore_cocoa_screen_size_get(NULL, w, h);
|
2015-08-06 10:06:34 -07:00
|
|
|
DBG("screen geometry_get %dx%d", *w, *h);
|
2014-06-09 01:31:34 -07:00
|
|
|
}
|
|
|
|
|
2015-01-30 08:15:55 -08:00
|
|
|
|
|
|
|
static void
|
|
|
|
_ecore_evas_callback_delete_request_set(Ecore_Evas *ee, Ecore_Evas_Event_Cb func)
|
|
|
|
{
|
|
|
|
ee->func.fn_delete_request = func;
|
|
|
|
}
|
|
|
|
|
2011-11-02 12:20:09 -07:00
|
|
|
static Ecore_Evas_Engine_Func _ecore_cocoa_engine_func =
|
|
|
|
{
|
|
|
|
_ecore_evas_cocoa_free,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
2015-03-12 04:13:08 -07:00
|
|
|
_ecore_evas_callback_delete_request_set,
|
2011-11-02 12:20:09 -07:00
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
2015-03-12 04:13:08 -07:00
|
|
|
_ecore_evas_move, //move
|
2011-11-02 12:20:09 -07:00
|
|
|
NULL,
|
|
|
|
_ecore_evas_resize,
|
|
|
|
_ecore_evas_move_resize,
|
|
|
|
NULL, //rotation
|
|
|
|
NULL, //shaped
|
|
|
|
_ecore_evas_show,
|
|
|
|
_ecore_evas_hide,
|
2015-03-12 04:13:08 -07:00
|
|
|
_ecore_evas_raise,
|
|
|
|
_ecore_evas_lower,
|
|
|
|
_ecore_evas_activate,
|
2011-11-02 12:20:09 -07:00
|
|
|
_ecore_evas_title_set,
|
|
|
|
NULL,
|
2015-03-11 07:31:36 -07:00
|
|
|
_ecore_evas_size_min_set,
|
|
|
|
_ecore_evas_size_max_set,
|
2011-11-02 12:20:09 -07:00
|
|
|
NULL,
|
2015-03-11 07:31:36 -07:00
|
|
|
_ecore_evas_size_step_set,
|
2011-11-02 12:20:09 -07:00
|
|
|
_ecore_evas_object_cursor_set,
|
2015-02-06 14:54:08 -08:00
|
|
|
_ecore_evas_object_cursor_unset,
|
2011-11-02 12:20:09 -07:00
|
|
|
NULL,
|
|
|
|
NULL,
|
2015-03-12 04:13:08 -07:00
|
|
|
_ecore_evas_iconified_set,
|
2011-11-02 12:20:09 -07:00
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
2015-03-12 04:13:08 -07:00
|
|
|
_ecore_evas_withdrawn_set,
|
2011-11-02 12:20:09 -07:00
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
2014-07-10 11:04:24 -07:00
|
|
|
NULL, //transparent
|
2012-07-03 00:44:17 -07:00
|
|
|
NULL, // profiles_set
|
2012-12-04 22:48:46 -08:00
|
|
|
NULL, // profile_set
|
2014-07-10 11:04:24 -07:00
|
|
|
|
2015-08-06 10:06:34 -07:00
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
|
|
|
|
NULL, // render
|
|
|
|
_ecore_evas_screen_geometry_get,
|
|
|
|
NULL, // screen_dpi_get
|
|
|
|
NULL,
|
|
|
|
NULL // msg_send
|
2011-11-02 12:20:09 -07:00
|
|
|
};
|
|
|
|
|
2015-10-08 02:58:46 -07:00
|
|
|
static Ecore_Cocoa_Window *
|
|
|
|
_ecore_evas_cocoa_window_get(const Ecore_Evas *ee)
|
|
|
|
{
|
|
|
|
/* See affectation of ee->prop.window in ecore_evas_cocoa_new_internal */
|
|
|
|
return (Ecore_Cocoa_Window *)(ee->prop.window);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2011-11-02 12:20:09 -07:00
|
|
|
EAPI Ecore_Evas *
|
2014-07-10 11:04:24 -07:00
|
|
|
ecore_evas_cocoa_new_internal(Ecore_Cocoa_Window *parent EINA_UNUSED, int x, int y, int w, int h)
|
2011-11-02 12:20:09 -07:00
|
|
|
{
|
2015-08-06 10:06:34 -07:00
|
|
|
Ecore_Evas *ee;
|
2015-10-08 02:58:46 -07:00
|
|
|
Ecore_Evas_Interface_Cocoa *iface;
|
2015-08-06 10:06:34 -07:00
|
|
|
|
|
|
|
if (!ecore_cocoa_init())
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
DBG("");
|
|
|
|
|
|
|
|
ee = calloc(1, sizeof(Ecore_Evas));
|
|
|
|
if (!ee)
|
|
|
|
goto shutdown_ecore_cocoa;
|
|
|
|
|
|
|
|
ECORE_MAGIC_SET(ee, ECORE_MAGIC_EVAS);
|
|
|
|
|
|
|
|
_ecore_evas_cocoa_init();
|
|
|
|
|
|
|
|
ee->engine.func = (Ecore_Evas_Engine_Func *)&_ecore_cocoa_engine_func;
|
|
|
|
|
|
|
|
if (w < 1) w = 1;
|
|
|
|
if (h < 1) h = 1;
|
|
|
|
ee->visible = 1;
|
|
|
|
ee->x = x;
|
|
|
|
ee->y = y;
|
|
|
|
ee->w = w;
|
|
|
|
ee->h = h;
|
|
|
|
ee->req.x = ee->x;
|
|
|
|
ee->req.y = ee->y;
|
|
|
|
ee->req.w = ee->w - ee->y;
|
|
|
|
ee->req.h = ee->h;
|
|
|
|
|
|
|
|
ee->semi_sync = 1;
|
|
|
|
|
|
|
|
ee->prop.max.w = 32767;
|
|
|
|
ee->prop.max.h = 32767;
|
|
|
|
ee->prop.layer = 4;
|
|
|
|
ee->prop.request_pos = EINA_FALSE;
|
|
|
|
ee->prop.sticky = EINA_FALSE;
|
|
|
|
ee->prop.window = 0;
|
|
|
|
ee->prop.withdrawn = EINA_TRUE;
|
|
|
|
|
|
|
|
ee->evas = evas_new();
|
|
|
|
|
|
|
|
if (!ee->evas)
|
|
|
|
goto free_name;
|
|
|
|
|
|
|
|
evas_data_attach_set(ee->evas, ee);
|
|
|
|
evas_output_size_set(ee->evas, w, h);
|
|
|
|
evas_output_viewport_set(ee->evas, 0, 0, w, h);
|
|
|
|
|
|
|
|
ee->prop.window = (Ecore_Window)ecore_cocoa_window_new(x, y, w, h);
|
|
|
|
|
|
|
|
if (!ee->prop.window)
|
|
|
|
{
|
|
|
|
_ecore_evas_cocoa_shutdown();
|
|
|
|
free(ee);
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!_ecore_evas_engine_cocoa_init(ee))
|
|
|
|
{
|
|
|
|
_ecore_evas_cocoa_shutdown();
|
|
|
|
free(ee);
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2015-10-08 02:58:46 -07:00
|
|
|
/* Interface setup */
|
|
|
|
iface = calloc(1, sizeof(*iface));
|
|
|
|
if (EINA_UNLIKELY(!iface))
|
|
|
|
{
|
|
|
|
_ecore_evas_cocoa_shutdown();
|
|
|
|
free(ee);
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
iface->base.name = _iface_name;
|
|
|
|
iface->base.version = _iface_version;
|
|
|
|
iface->window_get = _ecore_evas_cocoa_window_get;
|
|
|
|
ee->engine.ifaces = eina_list_append(ee->engine.ifaces, iface);
|
2015-08-06 10:06:34 -07:00
|
|
|
|
|
|
|
ee->engine.func->fn_render = _ecore_evas_cocoa_render;
|
|
|
|
_ecore_evas_register(ee);
|
|
|
|
ecore_event_window_register(ee->prop.window, ee, ee->evas,
|
|
|
|
(Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process,
|
|
|
|
(Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process,
|
|
|
|
(Ecore_Event_Multi_Down_Cb)_ecore_evas_mouse_multi_down_process,
|
|
|
|
(Ecore_Event_Multi_Up_Cb)_ecore_evas_mouse_multi_up_process);
|
|
|
|
|
|
|
|
evas_event_feed_mouse_in(ee->evas, (unsigned int)((unsigned long long)(ecore_time_get() * 1000.0) & 0xffffffff), NULL);
|
|
|
|
ecore_evases = eina_list_append(ecore_evases, ee);
|
|
|
|
|
|
|
|
return ee;
|
|
|
|
|
|
|
|
//free_window:
|
|
|
|
/* FIXME: free window here */
|
|
|
|
//free_evas:
|
|
|
|
// free(ee->evas);
|
|
|
|
free_name:
|
|
|
|
free(ee->name);
|
|
|
|
//free_ee:
|
|
|
|
_ecore_evas_cocoa_shutdown();
|
|
|
|
free(ee);
|
2011-11-02 12:20:09 -07:00
|
|
|
shutdown_ecore_cocoa:
|
2015-08-06 10:06:34 -07:00
|
|
|
ecore_cocoa_shutdown();
|
2014-07-10 11:04:24 -07:00
|
|
|
|
2015-08-06 10:06:34 -07:00
|
|
|
return NULL;
|
2011-11-02 12:20:09 -07:00
|
|
|
}
|