add ungrab call for ungrabbing the implicit grab when buttons go down....

SVN revision: 3796
This commit is contained in:
Carsten Haitzler 2000-10-31 18:15:11 +00:00
parent 0fbc800d38
commit db9b37768c
4 changed files with 36 additions and 5 deletions

View File

@ -1,3 +1,4 @@
EXTRA_DIST = \
index.html \
logo.gif
logo.gif \
eg1.gif eg2.gif eg3.gif eg4.gif eg5.gif eg6.gif eg7.gif eg8.gif eg9.gif

View File

@ -203,6 +203,7 @@ void *evas_get_data(Evas e, Evas_Object o, char *key);
void *evas_remove_data(Evas e, Evas_Object o, char *key);
/* events */
void evas_ungrab_button(Evas e);
void evas_event_button_down(Evas e, int x, int y, int b);
void evas_event_button_up(Evas e, int x, int y, int b);
void evas_event_move(Evas e, int x, int y);

View File

@ -71,7 +71,15 @@ _evas_objects_at_point(Evas e, int x, int y)
}
return objs;
}
void
evas_ungrab_button(Evas e)
{
if (e->mouse.button_object)
e->mouse.button_object = NULL;
e->mouse.buttons = 0;
}
/* events */
void
evas_event_button_down(Evas e, int x, int y, int b)
@ -106,6 +114,9 @@ evas_event_button_up(Evas e, int x, int y, int b)
if (e->mouse.button_object)
_evas_callback_call(e, e->mouse.button_object, CALLBACK_MOUSE_UP,
b, x, y);
else if (e->mouse.object)
_evas_callback_call(e, e->mouse.object, CALLBACK_MOUSE_UP,
b, x, y);
if (!e->mouse.buttons)
{
if ((e->mouse.button_object) &&

View File

@ -333,6 +333,7 @@ fn_text(double v, double val, int no)
};
static char *fonts[] =
{
/*
"notepad",
"grunge",
"morpheus",
@ -341,9 +342,19 @@ fn_text(double v, double val, int no)
"grunge",
"morpheus",
"notepad"
*/
"andover",
"andover",
"andover",
"andover",
"andover",
"andover",
"andover",
"andover"
};
static int sizes[] =
{
/*
16,
28,
34,
@ -352,6 +363,15 @@ fn_text(double v, double val, int no)
8,
20,
34
*/
64,
64,
64,
64,
64,
64,
64,
64
};
static double coords[] =
{
@ -584,7 +604,7 @@ static TextBlock texts[] =
{ 22.0, 2.0, 4.0, 6.0, "The Hanging Gardens of Babylon ...", NULL, NULL},
{ 26.0, 4.0, 4.0, 6.0, "The Mausoleum at Halicarnassus ...", NULL, NULL},
{ 30.0, 2.0, 4.0, 6.0, "The Lighthouse at Alexandria ...", NULL, NULL},
{ 34.0, 2.0, 4.0, 6.0, "The Great Pyriamids at Giza ...", NULL, NULL},
{ 34.0, 2.0, 4.0, 6.0, "The Great Pyramids at Giza ...", NULL, NULL},
{ 38.0, 2.0, 4.0, 6.0, "The Statue of Zeus at Olympia ...", NULL, NULL},
{ 46.0, 2.0, 4.0, 6.0, "Is there an 8th wonder?", NULL, NULL},
@ -912,8 +932,6 @@ setup_view(Evas_Render_Method method)
if (evas_view) evas_free(evas_view);
evas_view = e;
e = evas_view;
o = evas_add_text(e, "andover", 20, "FPS: ???");
evas_set_color(e, o, 255, 255, 255, 100);
evas_move(e, o, 0, 0);