From: Lucas W. <lu...@pi...> - 2005-04-28 04:22:45
|
Hi all, I was trying to figure out how to get the mouse pointer to change shape at appropriate places in the window manager (like on resizable borders), and it seemed to me that the most appropriate way to do this would be to add a new action, POINTER_SET, to the edje syntax. Then the mouse pointers could be themed just like everything else. I worked out how to do it all, except (and this is probably a stupid question) I need an Ecore_Evas struct in order to use the ecore_evas_cursor_set function, and I don't know how to get that from either the Edje struct or the Edje_Program struct passed to _edje_program_run. How do I get at that? This may be an exceptionally stupid way to implement this, but I would love it if you could set me on the right track. Thanks, Lucas Watkins |
From: Carsten H. (T. R. <ra...@ra...> - 2005-04-29 04:15:53
|
On Wed, 27 Apr 2005 21:22:25 -0700 Lucas Watkins <lu...@pi...> babbled: > Hi all, > > I was trying to figure out how to get the mouse pointer to change shape > at appropriate places in the window manager (like on resizable borders), > and it seemed to me that the most appropriate way to do this would be to > add a new action, POINTER_SET, to the edje syntax. Then the mouse > pointers could be themed just like everything else. > > I worked out how to do it all, except (and this is probably a stupid > question) I need an Ecore_Evas struct in order to use the > ecore_evas_cursor_set function, and I don't know how to get that from > either the Edje struct or the Edje_Program struct passed to > _edje_program_run. How do I get at that? you don't. basically it's out of edje's control. in all reality the best thing you could do is have the edje programs in the theme emit signals saying "set_pointer" "move_resize", "set_pointer" "busy" etc. - then e has to go do it. the thing is that evas knows nothing of cursors and edje only knows things as far as evas goes :) > This may be an exceptionally stupid way to implement this, but I would > love it if you could set me on the right track. i'd say you're on the wrong track. :) you can just emit signals and have the controlling app listen for them and "do the right thing" as it sees fit :) which is 0 patches to edje and really only a few callback added to edje objects in e17 - and those callbacks set the cursor appropriately :) u will want to expand the pointer subsystem to allow a stack of states so u wouldn't SET the cursor - i'd suggest more of a push and pop - push a new cursor, pop it to get back the old one that was there before :) you should be able to remove states from the cursor stack though at any time. (as a previous cursor state may now no longer exist). so when u push a state - u get back a handle you can keep. you can literally rip this state right out of the stack using the handle. you should also be able to change the cursor type attached to that handle to change the current state without a push or pop. > Thanks, > Lucas Watkins > > > ------------------------------------------------------- > SF.Net email is sponsored by: Tell us your software development plans! > Take this survey and enter to win a one-year sub to SourceForge.net > Plus IDC's 2005 look-ahead and a copy of this survey > Click here to start! http://www.idcswdc.com/cgi-bin/survey?id=105hix > _______________________________________________ > enlightenment-devel mailing list > enl...@li... > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel > -- ------------- Codito, ergo sum - "I code, therefore I am" -------------- The Rasterman (Carsten Haitzler) ra...@ra... 裸好多 ra...@de... Tokyo, Japan (東京 日本) |