forked from enlightenment/efl
better gl lib/header checkign in configure
SVN revision: 3121
This commit is contained in:
parent
8cef1bc011
commit
da571e5aac
|
@ -106,37 +106,39 @@ fi
|
|||
|
||||
gl_includes=""
|
||||
#### Find out about OpenGL
|
||||
AC_CHECK_HEADER(GL/gl.h,
|
||||
gl_includes="-I/usr/include -I/usr/local/include"
|
||||
AC_CHECK_LIB(GL, glBindTexture, AC_DEFINE(HAVE_GL) ,[
|
||||
AC_CHECK_HEADER($x_includes"/GL/gl.h",
|
||||
gl_includes="-I/usr/include -I/usr/local/include -I/usr/X11R6/include/"
|
||||
AC_CHECK_LIB(GL, glBindTexture, AC_DEFINE(HAVE_GL) ,[
|
||||
echo "WARNING:......."
|
||||
echo "no OpenGL libraries / headers found. This means no GL support will be"
|
||||
echo "built into Evas. This means much slower rendering perfromance."
|
||||
echo "Please read the config.log file for more information as to why this library"
|
||||
echo "was not found."
|
||||
PREV_CPPFLAGS=$CPPFLAGS
|
||||
CPPFLAGS=$CPPFLAGS" -I/usr/include -I/usr/local/include "$x_cflags
|
||||
AC_TRY_CPP(GL/gl.h,
|
||||
echo "checking for GL/gl.h... yes"
|
||||
gl_includes="-I/usr/include -I/usr/local/include "$x_cflags
|
||||
AC_CHECK_LIB(GL, glBindTexture, have_gl=yes,[
|
||||
], -L/usr/local/lib -lGL $X_LDFLAGS $X_EXTRA_LIBS $X_LIBS)
|
||||
)
|
||||
], -L/usr/local/lib -lGL $X_LDFLAGS $X_EXTRA_LIBS $X_LIBS)
|
||||
)
|
||||
#### Find out about OpenGL's GLU
|
||||
AC_CHECK_HEADER(GL/glu.h,
|
||||
gl_includes=$gl_includes" -I/usr/include -I/usr/local/include"
|
||||
AC_CHECK_LIB(GLU, gluBuild2DMipmaps, AC_DEFINE(HAVE_GLU) ,[
|
||||
AC_CHECK_HEADER($x_includes"/GL/glu.h",
|
||||
gl_includes=$gl_includes" -I/usr/include -I/usr/local/include -I/usr/X11R6/include/"
|
||||
AC_CHECK_LIB(GLU, gluBuild2DMipmaps, AC_DEFINE(HAVE_GLU) ,[
|
||||
echo "WARNING:......."
|
||||
echo "no libGLU was found. This means filtered (anti-aliased) scaling down"
|
||||
echo "of images will be disabled."
|
||||
echo "Please read the config.log file for more information as to why this library"
|
||||
echo "was not found."
|
||||
], -L/usr/local/lib -lGL -lGLU $X_LDFLAGS $X_EXTRA_LIBS $X_LIBS)
|
||||
)
|
||||
], -L/usr/local/lib -lGL -lGLU $X_LDFLAGS $X_EXTRA_LIBS $X_LIBS)
|
||||
)
|
||||
if test "x$have_gl" = "xyes"; then
|
||||
AC_DEFINE(HAVE_GL)
|
||||
AC_TRY_CPP(GL/glu.h,
|
||||
echo "checking for GL/glu.h... yes"
|
||||
gl_includes="-I/usr/include -I/usr/local/include "$x_cflags
|
||||
AC_CHECK_LIB(GLU, gluBuild2DMipmaps, have_glu=yes,[
|
||||
], -L/usr/local/lib -lGL -lGLU $X_LDFLAGS $X_EXTRA_LIBS $X_LIBS)
|
||||
)
|
||||
if test "x$have_glu" = "xyes"; then
|
||||
AC_DEFINE(HAVE_GLU)
|
||||
else
|
||||
echo "WARNING:......."
|
||||
echo "no libGLU was found. This means filtered (anti-aliased) scaling down"
|
||||
echo "of images will be disabled."
|
||||
echo "Please read the config.log file for more information as to why this library"
|
||||
echo "was not found."
|
||||
fi
|
||||
else
|
||||
echo "WARNING:......."
|
||||
echo "no OpenGL libraries / headers found. This means no GL support will be"
|
||||
echo "built into Evas. This means much slower rendering perfromance."
|
||||
echo "Please read the config.log file for more information as to why this library"
|
||||
echo "was not found."
|
||||
fi
|
||||
CPPFLAGS=$PREV_CPPFLAGS
|
||||
|
||||
AC_SUBST(gl_includes)
|
||||
|
||||
|
|
|
@ -71,6 +71,12 @@ struct _Evas
|
|||
|
||||
} current, previous;
|
||||
|
||||
struct {
|
||||
int in;
|
||||
int x, y;
|
||||
int buttons;
|
||||
} mouse;
|
||||
|
||||
void (*evas_renderer_data_free) (Evas _e);
|
||||
|
||||
int changed;
|
||||
|
|
|
@ -4,28 +4,87 @@
|
|||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
|
||||
int
|
||||
_evas_point_in_object(Evas e, Evas_Object o, int x, int y)
|
||||
{
|
||||
int ox, oy, ow, oh;
|
||||
|
||||
_evas_object_get_current_translated_coords(e, o, &ox, &oy, &ow, &oh);
|
||||
if ((x >= ox) && (x < (ox + ow)) && (y >= oy) && (y < (oy + oh)))
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
Evas_Object
|
||||
_evas_highest_object_at_point(Evas e, int x, int y)
|
||||
{
|
||||
Evas_List l, ll;
|
||||
Evas_Layer layer;
|
||||
Evas_Object o;
|
||||
|
||||
o = NULL;
|
||||
for (l = e->layers; l ; l = l->next)
|
||||
{
|
||||
layer = l->data;
|
||||
|
||||
for (ll = layer->objects; ll; ll = ll->next)
|
||||
{
|
||||
if (_evas_point_in_object(e, ll->data, x, y)) o = ll->data;
|
||||
}
|
||||
}
|
||||
return o;
|
||||
}
|
||||
|
||||
Evas_List
|
||||
_evas_objects_at_point(Evas e, int x, int y)
|
||||
{
|
||||
Evas_List l, ll, objs;
|
||||
Evas_Layer layer;
|
||||
|
||||
objs = NULL;
|
||||
for (l = e->layers; l ; l = l->next)
|
||||
{
|
||||
layer = l->data;
|
||||
|
||||
for (ll = layer->objects; ll; ll = ll->next)
|
||||
{
|
||||
if (_evas_point_in_object(e, ll->data, x, y))
|
||||
objs = evas_list_prepend(objs, ll->data);
|
||||
}
|
||||
}
|
||||
return objs;
|
||||
}
|
||||
|
||||
/* events */
|
||||
void
|
||||
evas_event_button_down(Evas e, int x, int y, int b)
|
||||
{
|
||||
if ((b > 1) || (b < 32)) return;
|
||||
e->mouse.buttons |= (1 << (b - 1));
|
||||
}
|
||||
|
||||
void
|
||||
evas_event_button_up(Evas e, int x, int y, int b)
|
||||
{
|
||||
if ((b > 1) || (b < 32)) return;
|
||||
e->mouse.buttons &= ~(1 << (b - 1));
|
||||
}
|
||||
|
||||
void
|
||||
evas_event_move(Evas e, int x, int y)
|
||||
{
|
||||
e->mouse.x = x;
|
||||
e->mouse.y = y;
|
||||
}
|
||||
|
||||
void
|
||||
evas_event_enter(Evas e)
|
||||
{
|
||||
e->mouse.in = 1;
|
||||
}
|
||||
|
||||
void
|
||||
evas_event_leave(Evas e)
|
||||
{
|
||||
e->mouse.in = 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue