(gilbertt)
Ok. More config window stuff.
Fun fun. I had to create a new type, Epplet_window to hold some window info,
and a stack to push and pop contexts for adding gadgets to different new
windows. This stuff works real well, and I am chuffed with it :)
The extra windows now redraw themselves on exposes, and new gadgets can be
added to them successfully. W00p.
I had to implement some new stuff, so please check nothing is broke (I am
not finished, but I don't want to commit code that breaks stuff).
Here are some details on the new stuff :)
---------------
PUBLIC STUFF
typedef struct epplet_window
{
Window win;
int w;
int h;
Pixmap bg_pmap;
Pixmap bg_mask;
Pixmap bg_bg;
}EppWindow;
typedef EppWindow *Epplet_window;
Epplet_window Epplet_create_window(int w,int h,int x,int y,char *title);
void Epplet_window_show(Epplet_window win);
void Epplet_window_hide(Epplet_window win);
void Epplet_window_destroy(Epplet_window win);
void Epplet_window_push_context(Epplet_window newwin);
Epplet_window Epplet_window_pop_context(void);
---------------
PRIVATE STUFF
static Epplet_window context_win; /* Current context win */
static int window_stack_pos; /* For context changes */
static Epplet_window window_stack[20]; /* For context changes */
static Epplet_window mainwin; /* Always the main epplet window */
static int window_num = 0; /* For window list */
static Epplet_window *windows = NULL; /* List of windows to loop though */
/* For Keeping a list of windows owned by the epplet, to loop through and
* do stuff with. */
static void Epplet_register_window(Epplet_window win);
static void Epplet_unregister_window(Epplet_window win);
/* Redraw all epplet windows (excluding the main epplet window) */
static void Epplet_draw_windows(void);
/* Redraw window win */
static void Epplet_draw_window(Epplet_window win);
/* Refresh window backgrounds on theme change */
static void Epplet_refresh_backgrounds(void);
-------------
I also added an item to GadGeneral so that I can find what window a gadget
was created on:
typedef struct gad_general
{
GadType type;
char visible;
Epplet_window parent;
}
GadGeneral;
-------------
Not to mention the reworking of code which draws or handles windows.
I have more tinkering to do in the event handling, to catch delete_events,
and to filter out mouseovers etc for separate windows. Tomorrow :)
SVN revision: 1478
(KainX)
For one thing, I think I've fixed the seg fault in E-MoonClock. Here's
hoping.
I also added the background setting functionality to E-Slides, but this time
it was done *right*. :-) Take a look and see for yourself. If you look at
the code, it also demonstrates how to use E IPC to set backgrounds.
SVN revision: 1476
(gilbertt)
api changes.
Ok. I have added some functions to the api, they are not yet perfect, but
they compile cleanly and don't create any problems. Don't use them yet
though, the api may change.
Window Epplet_create_window(int w,int h,int x,int y,char *title);
void Epplet_window_show(Window win);
void Epplet_window_hide(Window win);
void Epplet_window_destroy(Window win);
void Epplet_window_switch_context(Window newwin);
void Epplet_window_reset_context(void);
All of these functions are in place and work. I have yet to add code to
handle delete_events. At the moment, if you close the dialog window, the
epplet exits. This is clearly not intended ;) I'll fix it tomorrow, its late
here now.
You can even switch context and add widgets to your new window with no
problems ;)
Other things to fix tomorrow is the event handling stuff which assumes only
one window will be around...
I am currently using E-ScreenSave as my test epplet for this code, as I know
only about 2 people use it ;) Try it to see the code working.
SVN revision: 1472
(gilbertt)
E-ScreenShoot.c E-SD.c E-ScreenSave.c
Urm. Should've done this before. Removed some duplication, and one omission
in my cloaking code. Silly really, most people won't notice any difference,
but I will :)
SVN revision: 1462
(KainX)
All the network stats stuff has been moved to a centralized location, and all
the network stats epplets have been converted to use the new functions. Thus,
all network epplets can now have a portable interface to the data without
having to worry about portability; the backend takes care of it.
I also added copyright statements and a license to all my epplets. And I
removed my name from the E-Mountbox copyright since my contributions were
negligible. :-)
SVN revision: 1460
(KainX)
Applied and modified significantly a patch to support E-NetFlame on Solaris.
Thanks to Tomas Calvo Gomez <tcalvo@tid.es> and Mark Bowyer
<Moredhel@earthling.net> for supplying the Solaris-isms. :-)
SVN revision: 1458
(KainX)
Added support for specifying the width and height (in epplet units, 16 pixels)
of the E-Slides window. -w <width> and -h <height> are the options. The
default is the traditional 3x3, of course. Note that this cannot be done via
config file options since the size is set before the config loader can be
called.
SVN revision: 1455
(gilbertt)
E-UrlWatch
Added support for URL grabbers such as that found in TE/Epic. In the example
of TE, urls are stripped from irc convo, and dumped into ~/.te/.urls
If told to via the config (as it will by default), E-UrlWatch will watch
that file, and will strip out new urls and allow you to view them at the
touch of a button. (Or automatically if you specify). It'll also perform a
configurable command (I use it to play a sound) when a new URL appears.
Other misc cleanups have taken place, and I have very carefully hidden a
couple of juicy bugs. Find them for me, and you win a prize ;)
SVN revision: 1409
(KainX)
Major restructuring and cleanup. I think the new standard should be pretty
self-explanatory, but let me know if you have any questions. CVS developers,
PLEASE read epplets/Makefile.am carefully to see how it all works now.
Icons are stored in epplets/icons/ and are installed into
$EROOT/epplet_icons/. All miscellaneous data files (including images) are
stored in epplets/<epplet name>-data/ and are installed into
$EROOT/epplet_data/<epplet name>/. Also note that, if you're going to use the
same old aircut3.ttf and bg.png in your help section, add your epplet's name
to NEED_BG and NEED_FONT in epplets/Makefile.am. Do NOT commit duplicates of
those two files.
SVN revision: 1394
(gilbertt)
Whee! Say hello to E-UrlWatch.epplet.
This is a url-launcher, which will do a few cool things. Currently, it
launches urls using the X paste buffer. The idea is that you are on irc, or
reading an email, and see a url, you select the text, press the "Paste"
button on the epplet, and the url is launched. The command to launch the
url is defined in the config.
The epplet will parse the text, so you can grab a load of text, and it'll
find and launch the embedded url.
It'll also clean up naughty chars, but I have more to do here.
The next step is the "watching" part. The epplet will watch a text file (or
several) containing a list of urls, and will flash when a new one is added.
Clicking the (not yet existing) launch button will launch this url. The idea
is for apps like TE which use a url list ~/.te/.urls. So you're in irc,
someone gives you a url, and the epplet flashes and lets you launch it, no
typing.
Also, (once I code it), the epplet will record all urls you launch through
it in a text file. In a later version, this list will be emailed to your mom
on a weekly basis
;)
Obviously, this thing has the cloaking stuff, as I just copy and paste it
these days :)
Its an early beta, so bear with me while I rapidly add features :)
SVN revision: 1382
(gilbertt)
I am such a dufus.
Changed my epplets to actually save their config when you finish your X
session, instead of only when you click the close button.
How did I let this go unfixed???
SVN revision: 1381
(gilbertt)
Changed the Makefile.am to put epplet images in $EROOT/epplet_data.
I wanted to have epplet subdirs under this directory, but it really
complicated the Makefile, so I left it for now. It was easy for me the make
the changes with sed this way too ;)
Any stuff your app needs to install should go in epplet_data, preferably
with the filename prefixed with the name of your epplet.
Flame me if this bugs you...
SVN revision: 1345
(KainX)
Okay, all the conditional build stuff should be fixed up now. I'll need some
SGI people to test this as well as Solaris people, since it's entirely
possible I borked them both. :-)
SVN revision: 1336
(gilbertt)
Changes to E-ScreenShoot
Added a couple of new config options. They're in the dox, but I'll yip about
them too.
VIEW_SHOT & VIEWER - View shot after taking it using VIEWER (ee default)
RUN_SCRIPT & SCRIPT_TO_RUN - Run script/program after taking shot, sending
filename as parameter.
Also cleaned up some of that code, it was hairy.
SVN revision: 1329
(gilbertt)
Changes to cloak.[ch]
If those functions are not going to be static any more, declare them in
cloak.h, so other epplets can use them
SVN revision: 1328
(http://www2.ucsc.edu/~erat/). I had no idea this existed, it rocks. It takes
hella command-line options, but I modified it to use a config file too. It may
not run at first if your net device is not ppp0 and you don't specify. This
will be changed.
SVN revision: 1326