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 = \ EXTRA_DIST = \
index.html \ 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); void *evas_remove_data(Evas e, Evas_Object o, char *key);
/* events */ /* events */
void evas_ungrab_button(Evas e);
void evas_event_button_down(Evas e, int x, int y, int b); 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_button_up(Evas e, int x, int y, int b);
void evas_event_move(Evas e, int x, int y); void evas_event_move(Evas e, int x, int y);

View File

@ -72,6 +72,14 @@ _evas_objects_at_point(Evas e, int x, int y)
return objs; return objs;
} }
void
evas_ungrab_button(Evas e)
{
if (e->mouse.button_object)
e->mouse.button_object = NULL;
e->mouse.buttons = 0;
}
/* events */ /* events */
void void
evas_event_button_down(Evas e, int x, int y, int b) 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) if (e->mouse.button_object)
_evas_callback_call(e, e->mouse.button_object, CALLBACK_MOUSE_UP, _evas_callback_call(e, e->mouse.button_object, CALLBACK_MOUSE_UP,
b, x, y); 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.buttons)
{ {
if ((e->mouse.button_object) && if ((e->mouse.button_object) &&

View File

@ -333,6 +333,7 @@ fn_text(double v, double val, int no)
}; };
static char *fonts[] = static char *fonts[] =
{ {
/*
"notepad", "notepad",
"grunge", "grunge",
"morpheus", "morpheus",
@ -341,9 +342,19 @@ fn_text(double v, double val, int no)
"grunge", "grunge",
"morpheus", "morpheus",
"notepad" "notepad"
*/
"andover",
"andover",
"andover",
"andover",
"andover",
"andover",
"andover",
"andover"
}; };
static int sizes[] = static int sizes[] =
{ {
/*
16, 16,
28, 28,
34, 34,
@ -352,6 +363,15 @@ fn_text(double v, double val, int no)
8, 8,
20, 20,
34 34
*/
64,
64,
64,
64,
64,
64,
64,
64
}; };
static double coords[] = 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}, { 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}, { 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}, { 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}, { 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}, { 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); if (evas_view) evas_free(evas_view);
evas_view = e; evas_view = e;
e = evas_view;
o = evas_add_text(e, "andover", 20, "FPS: ???"); o = evas_add_text(e, "andover", 20, "FPS: ???");
evas_set_color(e, o, 255, 255, 255, 100); evas_set_color(e, o, 255, 255, 255, 100);
evas_move(e, o, 0, 0); evas_move(e, o, 0, 0);