On 9/6/07, Youness Alaoui <[EMAIL PROTECTED]> wrote:
> List-reply...
>
> ----- Forwarded message from Youness Alaoui <[EMAIL PROTECTED]> -----
>
> From: Youness Alaoui <[EMAIL PROTECTED]>
> To: Gustavo Sverzut Barbieri <[EMAIL PROTECTED]>
> Subject: Re: [E-devel] python-ecore and etk patches
>
> On Thu, Sep 06, 2007 at 01:41:21AM -0300, Gustavo Sverzut Barbieri wrote:
> > On 9/6/07, Youness Alaoui <[EMAIL PROTECTED]> wrote:
> > > Hi,
> > > Attached are two files, the ecore.evas.c_ecore_evas_x_cursor.pxi which 
> > > should be 'cvs add'ed to
> > > e17/proto/python-efl/python-ecore/ecore/evas/
> > > and the efl.patch which is a patch containing the following changes :
> > > python-ecore.evas :
> > > - Adds a method for setting the cursor of the window (using an 
> > > Ecore_X_Cursor, or a shape)
> > > - Adds X_Cursor class containing the values of each cursor shape available
> >
> > Ok, check CVS. I've changed most of things, but the functionality is
> > there, keep reporting (and sending patches!) required features.
> >
> > Changes:
> >  - created ecore.x module and constants are in its __init__.py, we
> > really should write its implementation ;-).
> >  - created ecore.evas.BaseX11 to be the parent of all X11 related
> > classes (SoftwareX11, SoftwareX11_16, XRenderX11, GLX11) and just
> > expose x_window_cursor_shape_set() (your cursor_set_shape()), since
> > the other takes an integer, but it's actually an opaque data referring
> > to X internals, not an enum or random integer. It could be exposed in
> > our ecore.x implementation.
> >
>
> Ok, cool! I started by writing a X_Window module for all the functions that 
> use an X_Window, then the
> same for X_Cursor, but I got lost with the huge list of functions in 
> Ecore_X.h (+I barely started
> learning python, so I didn't want to go too deep in there).
>
> About removing the x_window_cursor_set, I know it's an ID for a cursor, but I 
> still need it, the reason
> is because when we get an ETK_POINTER_NONE, we should remove our custom 
> cursor, and the only way
> (afaik) is to do a ecore_x_window_cursor_set(win, 0); if I send 0 to the 
> shape_set method, then it will
> use the cursor with the shape 0, which is the ECORE_X_CURSOR_X (an 'x' shaped 
> cursor).. and if I use
> the 'ECORE_X_CURSOR_ARROW' pointer from the ECORE_X_CURSOR_* defines, I'll 
> get a  cursor different
> from the one set by my theme. Also, this method will be useful later when we 
> implement the
> ecore_x_cursor_new method which return an Ecore_X_Cursor (and not a shape 
> number).

So, both things makes sense, but I'll write basic x_cursor functions
before I add that one back.

Just one thing still pending: Will we create an XCursor class that
wraps the opaque pointer Ecore_X_Cursor and provide utility methods or
will we keep using integers and pass them around?
   IMO the former is better, avoiding errors and typing less
(self.something()), but do someone have some objection?


> > etk_widget.c:
> > +/* Evas Callback: Called when the widget gets focused */
> > +static void _etk_widget_focus_in_cb(void *data, Evas *evas,
> > Evas_Object *object, void *event_info)
> > +{
> > +   Etk_Widget *widget;
> > +
> > +   if (!(widget = ETK_WIDGET(data)))
> > +      return;
> > +}
> >
> > Am I missing something or is this totally useless?
> >
>
> no, it is totally useless, I just kept it to keep the symetry of having a 
> callback for the FOCUS_IN and
> FOCUS_OUT

it adds unnecessary bloat: bigger binaries, more function calls, ...
For this specific widget it probably won't matter that much, but let's
try to keep it as good as possible :-)


-- 
Gustavo Sverzut Barbieri
--------------------------------------
Jabber: [EMAIL PROTECTED]
   MSN: [EMAIL PROTECTED]
  ICQ#: 17249123
 Skype: gsbarbieri
Mobile: +55 (81) 9927 0010

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to