[E-devel] Evas_Object MOUSE_DOWN blocks MOUSE_IN/OUT ?

2004-09-22 Thread Milosz Derezynski
I've got a question regarding Evas. I am coding a Winamp3/5 WAL skin 
loader, or at least the UI part of it since it will also require of 
having a MAKI bytecode interpreter, but that's another topic of course.

Basically i'm implementing widgets using custom pixmaps, and the problem 
that i have is:

I'm connecting handlers for all events MOUSE_IN, MOUSE_OUT, MOUSE_DOWN 
and MOUSE_UP for an Evas_Object.

What i need to implement for this particular widget (button) is of 
course that when the mouse button is kept pressed but the pointer moves 
outside of the widget's area, the image is restored to the unpressed one 
(as it's the case with basically every GUI toolkit there is).

Now the situation is that after MOUSE_DOWN was called and the mouse 
button is kept pressed by the user, the MOUSE_IN and MOUSE_OUT events 
are never being called, and i have no idea how to make the widget 
receive the appropriate information so it can do the redraw.

Any hints on how to accomplish that, or is this a bug in Evas?
Attached: Source code of the particular widget. Full source of current 
state is available at http://linux-media.net/walengine-snapshot-1.tar.gz 
(It requires GLib, Ecore, Evas, libxml2)
#ifndef _EVAS_BUTTON_H_
#define _EVAS_BUTTON_H_

#include X11/Xlib.h
#include Evas.h
#include evas_wa3button.h
#include loadxml.h

enum {
WA3BUTTON_STATE_IDLE,
WA3BUTTON_STATE_ACTIVE
};

enum {
WA3BUTTON_TYPE_PUSH,
WA3BUTTON_TYPE_TOGGLE
};

typedef struct _wa3button wa3button;
struct _wa3button {

  char *id_container; 
  char *id_layout;
  char *id_normal;
  char *id_pressed;
  char *id_active;
  char *id;

  Evas_Object*  button;

  int btype;
  int astate;
  int state;

  int x;
  int y;
  int w;
  int h;
};

wa3button*  wa3button_new(Evas *evas, const char* id, const char* id_container, 
const char *id_layout, const char* id_normal, const char* id_pressed, const char 
*id_active, int x, int y);
voidwa3button_show(wa3button*);

#endif
#include stdlib.h
#include string.h
#include stdio.h
#include glib.h
#include gtk/gtk.h
#include X11/Xlib.h
#include Imlib2.h
#include Evas.h
#include evas_wa3button.h
#include loadxml.h


static void _wa3button_pressed(void* datas, Evas* e, Evas_Object* ob, void* 
event_info);
static void _wa3button_release(void* datas, Evas* e, Evas_Object* ob, void* 
event_info);
static void _wa3button_mousein(void* data, Evas* e, Evas_Object* ob, void* udata);
static void _wa3button_mouseout(void* data, Evas* e, Evas_Object* ob, void* udata);
static void _wa3button_mousemove(void* data, Evas* e, Evas_Object* ob, void* udata);

wa3button*  wa3button_new(Evas* evas, 
const char *id, 
const char *id_container,
const char *id_layout,
const char *id_normal, 
const char *id_pressed,
const char *id_active,
int x,
int y)
{
  wa3button *button;
  walBitmap *wbmap;
  int w, h;

  button = g_new0(wa3button,1); 

  button-button = evas_object_image_add(evas);

  wbmap = _walXML_get_bitmap( id_normal); 

  if (!wbmap) {
#ifdef __DEBUG__
g_message((EE) UNABLE TO GET bitmap id[%s] for button 
id[%s], id_normal, id);
#endif
return NULL;
   
  }

  imlib_context_push(wbmap-ctx);
  w = imlib_image_get_width(); 
  h = imlib_image_get_height();

  button-w = w;
  button-h = h;

#ifdef __DEBUG__
g_message((II) NEW button id[%s] image[%s] w[%d] h[%d], id, 
id_normal, w, h);
#endif

  button-x = x;
  button-y = y;

  evas_object_image_size_set(button-button, w, h);
  evas_object_image_fill_set(button-button, 0, 0, w, h);
  evas_object_image_data_copy_set(button-button, 
imlib_image_get_data_for_reading_only() );
  imlib_context_pop();

  button-id_active = g_strdup( id_active);

  if ( id_active != NULL) {
button-btype = WA3BUTTON_TYPE_TOGGLE;
button-astate = 0;
  } else {
button-btype = WA3BUTTON_TYPE_PUSH;
  }  

  button-id_normal = g_strdup( id_normal);
  button-id_pressed = g_strdup( id_pressed);
  button-id_container = g_strdup( id_container);
  button-id_layout = g_strdup( id_layout);
  button-id = g_strdup( id);

  return button;

}

voidwa3button_show(wa3button* button)
{

evas_object_move(button-button, button-x, button-y);
evas_object_resize(button-button, button-w, button-h);
evas_object_show(button-button);

evas_object_event_callback_add(button-button,EVAS_CALLBACK_MOUSE_DOWN,
   _wa3button_pressed, button);
evas_object_event_callback_add(button-button,EVAS_CALLBACK_MOUSE_UP,
   _wa3button_release, button);
#if 0
evas_object_event_callback_add(button-button,EVAS_CALLBACK_MOUSE_OUT,
   

Re: [E-devel] trying to build e17 but I can't find ebits

2004-09-22 Thread Dale Anderson
DR17 doesnt currently build against cvs libs .
Dale.
Jon Kroll wrote:
I'm sorry if this is a noob question.
I have checked all of the e17 code out of cvs and have managed to build most of it. 
But when I attempt to ./configure apps/e is says  it can not find ebits-config. But I 
can not find ebits anywhere in the cvs repository.
Please advise.
Thanx. Jon
Ann Arbor Michigan USA



Sent via the WebMail system at interneticon.com

  

---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
___
enlightenment-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
 


---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
___
enlightenment-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Evas_Object MOUSE_DOWN blocks MOUSE_IN/OUT ?

2004-09-22 Thread Milosz Derezynski
Carsten Haitzler (The Rasterman) wrote:

On Wed, 22 Sep 2004 15:49:39 -0700 Milosz Derezynski [EMAIL PROTECTED]
babbled:

  

I've got a question regarding Evas. I am coding a Winamp3/5 WAL skin 
loader, or at least the UI part of it since it will also require of 
having a MAKI bytecode interpreter, but that's another topic of course.

Basically i'm implementing widgets using custom pixmaps, and the problem 
that i have is:

I'm connecting handlers for all events MOUSE_IN, MOUSE_OUT, MOUSE_DOWN 
and MOUSE_UP for an Evas_Object.

What i need to implement for this particular widget (button) is of 
course that when the mouse button is kept pressed but the pointer moves 
outside of the widget's area, the image is restored to the unpressed one 
(as it's the case with basically every GUI toolkit there is).

Now the situation is that after MOUSE_DOWN was called and the mouse 
button is kept pressed by the user, the MOUSE_IN and MOUSE_OUT events 
are never being called, and i have no idea how to make the widget 
receive the appropriate information so it can do the redraw.

Any hints on how to accomplish that, or is this a bug in Evas?

Attached: Source code of the particular widget. Full source of current 
state is available at http://linux-media.net/walengine-snapshot-1.tar.gz 
(It requires GLib, Ecore, Evas, libxml2)



actually... what u have is not a bug.. its an explicit FEATURE. as long as mouse
buttons are down  the mouse is GRABBED to the object(s) it went down on and
keeps reporting mouse moves to those grabbed objects until the mouse buttons are
raised. THEN it gets a mouse out just after the mouse up. basically i've left it
up to the programmer to deal with this in the mouse motion events. you can check
each motion event if the mouse is within, or outside the bounds o the object and
then know if its in our out yourself. basically the mouse is still VIRTUALLY in
the object (not physically) - so until it is both virtually and physically
outside.. u wont get an out. :)

:)

  

yes that makes much more sense actually :)

but it is not obvious to me how i can retrieve the particular event
structure inside the callback... i checked the docs and include files,
also the evas source but i can't find it. how do i need to do that?


---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
___
enlightenment-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Re: [E-devel] Evas_Object MOUSE_DOWN blocks MOUSE_IN/OUT ?

2004-09-22 Thread Milosz Derezynski
Milosz Derezynski wrote:

Carsten Haitzler (The Rasterman) wrote:

  

On Wed, 22 Sep 2004 15:49:39 -0700 Milosz Derezynski [EMAIL PROTECTED]
babbled:

 



I've got a question regarding Evas. I am coding a Winamp3/5 WAL skin 
loader, or at least the UI part of it since it will also require of 
having a MAKI bytecode interpreter, but that's another topic of course.

Basically i'm implementing widgets using custom pixmaps, and the problem 
that i have is:

I'm connecting handlers for all events MOUSE_IN, MOUSE_OUT, MOUSE_DOWN 
and MOUSE_UP for an Evas_Object.

What i need to implement for this particular widget (button) is of 
course that when the mouse button is kept pressed but the pointer moves 
outside of the widget's area, the image is restored to the unpressed one 
(as it's the case with basically every GUI toolkit there is).

Now the situation is that after MOUSE_DOWN was called and the mouse 
button is kept pressed by the user, the MOUSE_IN and MOUSE_OUT events 
are never being called, and i have no idea how to make the widget 
receive the appropriate information so it can do the redraw.

Any hints on how to accomplish that, or is this a bug in Evas?

Attached: Source code of the particular widget. Full source of current 
state is available at http://linux-media.net/walengine-snapshot-1.tar.gz 
(It requires GLib, Ecore, Evas, libxml2)
   

  

actually... what u have is not a bug.. its an explicit FEATURE. as long as mouse
buttons are down  the mouse is GRABBED to the object(s) it went down on and
keeps reporting mouse moves to those grabbed objects until the mouse buttons are
raised. THEN it gets a mouse out just after the mouse up. basically i've left it
up to the programmer to deal with this in the mouse motion events. you can check
each motion event if the mouse is within, or outside the bounds o the object and
then know if its in our out yourself. basically the mouse is still VIRTUALLY in
the object (not physically) - so until it is both virtually and physically
outside.. u wont get an out. :)

:)

 



yes that makes much more sense actually :)

but it is not obvious to me how i can retrieve the particular event
structure inside the callback... i checked the docs and include files,
also the evas source but i can't find it. how do i need to do that?


---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
___
enlightenment-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


  

ok i have figured it out, sorry (i wasn't aware the last arg is the ev
data)...


---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
___
enlightenment-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel