(gilbertt)
Fixed Epplet_register_event_handler, prompted by email from Alexandre David
<adavid@DoCS.UU.SE>. His patch was incorrect though, and the proper fix is
to change the line where the event handler is called. (His patch changed
only one definition of it, in the wrong place, and broke epplets ;)
SVN revision: 2146
(gilbertt)
Okay. E has the new ipc call. However, because epplets can't demand that
people have e > 0.16.4, the old behaviour is the default. Please ./configure
--enable-new-remember to test the new behaviour. (You'll need cvs e as of 2
seconds ago) It should be much streamlined. Especially for you guys on
interesting hardware =)
SVN revision: 2139
(gilbertt)
Epplet-side fix for the "millions of remember requests" bug.
I'll implement a better fix when I add a new ipc call to e :)
SVN revision: 2137
to use if the new Epplet_bind_double_GL confuses the hell out of em and they
dont need Epplet_bind_double_GL various buffer settings.
SVN revision: 1975
square. The square doesnt have and back face normals and i really dont want
to set any up, since its just supposed to show how to draw a simple non
lighted polygon with colors. Next task is to solidify the glx epplet epi.
SVN revision: 1971
(gilbertt)
Okay. I'm trying to make epplets gnome-session friendly (dunno why =P).
People complain about the automatic respawning, so I have added a configure
option --disable-auto-respawn to prevent epplets remembering to restart
(they still remember location, sticky etc).
*I have not tested this* because I refuse to run gnome-session on this box,
but I see no reason why it shouldn't be ok.
SVN revision: 1861
/* free an RGB buffer */
void Epplet_free_rgb_buf(RGB_buf buf);
I think the user shouldn't have to think about the internals of an RGB_buf
in order to free it.
SVN revision: 1695
(KainX)
API changes here, all in order to make E-Disk and E-MemWatch be able to toggle
between the old arrangement and the new. So basically, you can now move
gadgets to new locations.
SVN revision: 1647
settings that you want to refer to under the same key (e.g. the apps that
a launcher starts up etc), use
void Epplet_modify_multi_config(char *key, char **values, int num);
And if you want to query for a group of settings, use this:
char **Epplet_query_multi_config(char *key, int *num);
Note that you have to free() the returned array here. The key is internally
encoded into __key__1 for the first string, __key__2 for the second etc.
I put some testing code for this into ConfigTestEpplet.c The epplet will
remember all the command line parameters you give on startup and dump
them.
Also extended E-Mountbox so that the users can now define the patterns
in the device or mountpoint and corresponding icons themselves. Currently
still via the config file, but the dialog is there. Not functional yet,
though.
SVN revision: 1612
(gilbertt)
Hrm. If nobody minds... I've added:
Window Epplet_create_window_borderless(int w,int h,char *title, char vertical);
In case anyone fancies a borderless window. Or two. For displaying things. In
windows. Without borders. For whatever reason. Erm. I'll stop now.
SVN revision: 1564
(KainX)
Applied a patch from Michael Roberts <m.t.roberts@student.murdoch.edu.au> so
that invisible gadgets won't try to redraw themselves.
SVN revision: 1558
(gilbertt)
By popular demand:
/* A cut down version for image-only buttons */
Epplet_gadget Epplet_create_image_button(char *image, int x, int y,
int w, int h,
void (*func) (void *data), void *data);
That's the last of them! No more =P
SVN revision: 1499
(gilbertt)
Oops. Make that:
/* A cut down version for text-only buttons */
Epplet_gadget Epplet_create_text_button(char *label, int x, int y,
int w, int h,
void (*func) (void *data), void *data);
/* A cut down version for stdimage-only buttons */
Epplet_gadget Epplet_create_std_button(char *std, int x, int y,
void (*func) (void *data), void *data);
STD images do not need w or h parameters.
=P
SVN revision: 1498
(gilbertt)
Added some less complex button functions, left the old one in place, so as
not to break anyone's lovely epplets :)
Here's what you got:
/* A cut down version for text-only buttons */
Epplet_gadget Epplet_create_text_button(char *label, int x, int y,
int w, int h,
void (*func) (void *data), void *data);
/* A cut down version for stdimage-only buttons */
Epplet_gadget Epplet_create_std_button(char *std, int x, int y,
int w, int h,
void (*func) (void *data), void *data);
Those window things in the original one should really be buried in the api,
and not public, but I won't break anyone's code. There ya go :)
SVN revision: 1497
(gilbertt)
So, say hello to Epplet_create_window_config.
It rules ;)
Here's the definition:
Window Epplet_create_window_config(int w,int h,char *title,
void (*ok_func) (void *data),void *ok_data,
void (*apply_func) (void *data),void *apply_data,
void (*cancel_func) (void *data),void *cancel_data);
You can picture what it does, and check it out in E-ScreenSave. (Press the
"Lock" button).
The cool thing is that if you supply NULL for any of the callbacks, that
button won't be added to the dialog. So, for an Ok, Cancel dialog, just
supply NULL for apply_func.
I have added explanation to the epplet.h file, and would like people to bang
at this now? I will set my epplets up to use the new functions fully over
the weekend. This will help me find any problems, as I haven't tested adding
every type of gadget to config windows yet, there may still be redraw issues
I missed.
Its pretty nice now though, and I have checked for memory leaks and bad
handling, please point out anything dubious you see. The api will become
more rich over the next few days, then it should stabilise.
Any feature suggestions, send 'em now :)
SVN revision: 1493
(gilbertt)
Okay. Lots has changed. It was pretty inconsistant to have loads of
functions returning or requiring a "Window win" paramater, and mine dealing
with "Epplet_window" parameters. I had to lose one, so I lost the one which
caused no breakage. Mine :)
I still use Epplet_window internally to encapsulate data on a per-window
basis. However, all public functions deal with "Window win" again. Now
things are consistant. The Epplet_window type is now private and hidden.
To do this, I have implemented a little lookup function to relate
Epplet_windows to Windows, which should be more than adequate for our needs.
You can now declare a delete event handler for your whole epplet, although I
may change to per-window delete event handlers if people request it.
If you return 1 from the delete event handler, or don't supply one, or
supply NULL, the window will be destroyed for you, if you return 0, the
delete event will be ignored. Use this to do things like saying "hrm, those
two settings cannot coexist" or "that file does not exist" etc.
I'm nearly finished with the window functions now, and will next add
convenience wrappers such as Epplet_create_window_config(...) to add ok,
apply and save buttons and setup callbacks for you, and some other stuff
too.
I'd appreciate it if people would poke around and see what they think, I'm
new at this Xlib stuf...
SVN revision: 1490
(gilbertt)
Removed the int x, and int y properties for Epplet_create_window, as they
were pretty pointless, and I hate it when windows decide where they should
go ;)
SVN revision: 1487
(gilbertt)
Right. You can now specify a "vertical" property for your new window. Works
the same as the vertical parameter in Epplet_init. Uses the same
imageclasses too.
I had a big headache debugging this, it just didn't seem to work, I knew
BrushedMetal (the theme I use) had a different (green) vertical pixmap, but
the windows always came up grey. Just when I was about to go mental, I found
this in epplet.cfg:
__ICLASS __BGN
__NAME EPPLET_BACKGROUND_HORIZONTAL
__NORMAL "epplets/images/bg.png"
__EDGE_SCALING 2 2 2 2
__END
__ICLASS __BGN
__NAME EPPLET_BACKGROUND_VERTICAL
__NORMAL "epplets/images/bg.png"
__EDGE_SCALING 2 2 2 2
__END
Gah. No wonder the images weren't changing!
Is there a reason for this? If not, could it be changed to:
__ICLASS __BGN
__NAME EPPLET_BACKGROUND_HORIZONTAL
__NORMAL "epplets/images/bg.png"
__EDGE_SCALING 2 2 2 2
__END
__ICLASS __BGN
__NAME EPPLET_BACKGROUND_VERTICAL
__NORMAL "epplets/images/bg_v.png"
__EDGE_SCALING 2 2 2 2
__END
Please?
Anyway, the vertical stuff works now, and probably did an hour ago, before I
went off chasing nonexistant bugs :)
I also tidied up some other stuff, and killed another global :)
See E-ScreenSave in cvs for an example, press the "lock" button to see it in
action :)
SVN revision: 1486
(gilbertt)
*cough*
Should prolly free the background pixmaps when I destroy a window, right?
Thought so.
I was wondering where all my memory was going...
;)
SVN revision: 1485
(gilbertt)
More config window stuff. Fixed a memleak, and now destroying an
Epplet_window also destroys any child gadgets attached to the window. I
think this works better, let me know otherwise.
I also cleaned up a couple of things, fixed adding buttons to new windows,
and improved the test epplet to be a better demo (E-ScreenSave right now).
I removed the Epplet_draw_window* functions, 'cos I don't need them :) What
I actually needed to do was fix Epplet_draw_image - so I have :)
Lots more to do tonight :)
SVN revision: 1483