1999-11-13 16:02:31 -08:00
|
|
|
/* E-ScreenSave.c
|
|
|
|
*
|
|
|
|
* Copyright (C) 1999 Tom Gilbert
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License as
|
|
|
|
* published by the Free Software Foundation; either version 2 of the
|
|
|
|
* License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
|
|
|
* USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <sys/resource.h>
|
|
|
|
|
|
|
|
|
1999-11-19 15:01:40 -08:00
|
|
|
#include "epplet.h"
|
1999-11-13 16:02:31 -08:00
|
|
|
#include "utils.h"
|
|
|
|
#include "cloak.h"
|
|
|
|
#include "E-ScreenSave.h"
|
|
|
|
|
1999-12-03 05:07:03 -08:00
|
|
|
|
1999-11-13 16:02:31 -08:00
|
|
|
static void
|
1999-11-30 06:45:32 -08:00
|
|
|
choose_random_cloak (void *data)
|
1999-11-13 16:02:31 -08:00
|
|
|
{
|
|
|
|
static int last_anim = 0;
|
|
|
|
|
|
|
|
do
|
|
|
|
{
|
1999-11-30 06:45:32 -08:00
|
|
|
opt.cloak_anim = (int) (15 * ((float) rand ()) / (RAND_MAX + 1.0)) + 1;
|
1999-11-13 16:02:31 -08:00
|
|
|
}
|
1999-11-30 06:45:32 -08:00
|
|
|
while (opt.cloak_anim == last_anim); /* Don't pick the same one twice in a row. */
|
1999-11-13 16:02:31 -08:00
|
|
|
last_anim = opt.cloak_anim;
|
1999-11-30 06:45:32 -08:00
|
|
|
Epplet_timer (choose_random_cloak, NULL, opt.rand_delay, "RAND_TIMER");
|
1999-11-13 16:02:31 -08:00
|
|
|
return;
|
|
|
|
data = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
save_config (void)
|
|
|
|
{
|
|
|
|
char buf[10];
|
1999-11-30 06:45:32 -08:00
|
|
|
Esnprintf (buf, sizeof (buf), "%.2f", opt.delay);
|
1999-11-13 16:02:31 -08:00
|
|
|
Epplet_modify_config ("SAVE_DELAY", buf);
|
1999-11-30 06:45:32 -08:00
|
|
|
Esnprintf (buf, sizeof (buf), "%.2f", opt.cloak_delay);
|
1999-11-13 16:02:31 -08:00
|
|
|
Epplet_modify_config ("CLOAK_DELAY", buf);
|
1999-11-30 06:45:32 -08:00
|
|
|
Esnprintf (buf, sizeof (buf), "%.2f", opt.draw_interval);
|
1999-11-13 16:02:31 -08:00
|
|
|
Epplet_modify_config ("DRAW_INTERVAL", buf);
|
1999-11-30 06:45:32 -08:00
|
|
|
Esnprintf (buf, sizeof (buf), "%.2f", opt.rand_delay);
|
1999-11-13 16:02:31 -08:00
|
|
|
Epplet_modify_config ("RAND_DELAY", buf);
|
1999-11-30 06:45:32 -08:00
|
|
|
Esnprintf (buf, sizeof (buf), "%d", opt.do_cloak);
|
1999-11-13 16:02:31 -08:00
|
|
|
Epplet_modify_config ("DO_CLOAK", buf);
|
|
|
|
if (opt.rand_cloak)
|
|
|
|
{
|
|
|
|
strcpy (buf, "16");
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
1999-11-30 06:45:32 -08:00
|
|
|
Esnprintf (buf, sizeof (buf), "%d", opt.cloak_anim);
|
1999-11-13 16:02:31 -08:00
|
|
|
}
|
|
|
|
Epplet_modify_config ("CLOAK_ANIM", buf);
|
1999-11-28 10:17:18 -08:00
|
|
|
Epplet_modify_config ("LOCK_COMMAND", opt.lock_cmd);
|
1999-11-13 16:02:31 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
load_config (void)
|
|
|
|
{
|
|
|
|
opt.do_cloak = atoi (Epplet_query_config_def ("DO_CLOAK", "1"));
|
|
|
|
opt.cloak_anim = atoi (Epplet_query_config_def ("CLOAK_ANIM", "8"));
|
|
|
|
if (opt.cloak_anim == 16)
|
|
|
|
{
|
|
|
|
opt.rand_cloak = 1;
|
1999-11-30 06:45:32 -08:00
|
|
|
choose_random_cloak (NULL);
|
1999-11-13 16:02:31 -08:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
opt.rand_cloak = 0;
|
|
|
|
}
|
|
|
|
opt.delay = atof (Epplet_query_config_def ("SAVE_DELAY", "0"));
|
|
|
|
opt.cloak_delay = atof (Epplet_query_config_def ("CLOAK_DELAY", "4"));
|
|
|
|
opt.rand_delay = atof (Epplet_query_config_def ("RAND_DELAY", "60"));
|
|
|
|
opt.draw_interval = atof (Epplet_query_config_def ("DRAW_INTERVAL", "0.1"));
|
1999-11-30 06:45:32 -08:00
|
|
|
if (opt.lock_cmd)
|
|
|
|
free (opt.lock_cmd);
|
|
|
|
opt.lock_cmd =
|
|
|
|
_Strdup (Epplet_query_config_def
|
|
|
|
("LOCK_COMMAND", "xscreensaver-command -lock &"));
|
1999-11-13 16:02:31 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
cb_close (void *data)
|
|
|
|
{
|
|
|
|
save_config ();
|
|
|
|
Esync ();
|
|
|
|
Epplet_unremember ();
|
|
|
|
exit (0);
|
|
|
|
data = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
cb_help (void *data)
|
|
|
|
{
|
|
|
|
Epplet_show_about ("E-ScreenSave");
|
|
|
|
return;
|
|
|
|
data = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
cloak_draw (void *data)
|
|
|
|
{
|
|
|
|
switch (opt.cloak_anim)
|
|
|
|
{
|
|
|
|
case 0:
|
|
|
|
{
|
|
|
|
blank_buf ();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case 1:
|
|
|
|
{
|
|
|
|
load_val = (opt.quality / 2);
|
|
|
|
draw_flame ();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case 2:
|
|
|
|
{
|
|
|
|
draw_radar ();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case 3:
|
|
|
|
{
|
|
|
|
draw_aa_radar ();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case 4:
|
|
|
|
{
|
|
|
|
draw_aa_triangle ();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case 5:
|
|
|
|
{
|
|
|
|
draw_aa_star ();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case 6:
|
|
|
|
{
|
|
|
|
draw_starfield ();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case 7:
|
|
|
|
{
|
|
|
|
draw_aa_starfield ();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case 8:
|
|
|
|
{
|
|
|
|
draw_rotator ();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case 9:
|
|
|
|
{
|
|
|
|
draw_scanner ();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case 10:
|
|
|
|
{
|
|
|
|
draw_colorwarp ();
|
|
|
|
break;
|
|
|
|
}
|
1999-11-30 06:45:32 -08:00
|
|
|
case 11:
|
1999-11-13 16:02:31 -08:00
|
|
|
{
|
1999-11-30 06:45:32 -08:00
|
|
|
draw_ball ();
|
|
|
|
break;
|
1999-11-13 16:02:31 -08:00
|
|
|
}
|
1999-11-30 06:45:32 -08:00
|
|
|
case 12:
|
1999-11-13 16:02:31 -08:00
|
|
|
{
|
1999-11-30 06:45:32 -08:00
|
|
|
draw_atoms ();
|
|
|
|
break;
|
1999-11-13 16:02:31 -08:00
|
|
|
}
|
1999-11-30 06:45:32 -08:00
|
|
|
case 13:
|
1999-11-13 16:02:31 -08:00
|
|
|
{
|
1999-11-30 06:45:32 -08:00
|
|
|
draw_text ();
|
|
|
|
break;
|
1999-11-13 16:02:31 -08:00
|
|
|
}
|
1999-11-30 06:45:32 -08:00
|
|
|
case 14:
|
1999-11-13 16:02:31 -08:00
|
|
|
{
|
1999-11-30 06:45:32 -08:00
|
|
|
draw_sine ();
|
|
|
|
break;
|
1999-11-13 16:02:31 -08:00
|
|
|
}
|
1999-11-30 06:45:32 -08:00
|
|
|
case 15:
|
1999-11-13 16:02:31 -08:00
|
|
|
{
|
1999-11-30 06:45:32 -08:00
|
|
|
draw_funky_rotator ();
|
|
|
|
break;
|
1999-11-13 16:02:31 -08:00
|
|
|
}
|
|
|
|
default:
|
|
|
|
{
|
|
|
|
blank_buf ();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Epplet_paste_buf (buf, win, 0, 0);
|
1999-11-30 06:45:32 -08:00
|
|
|
Epplet_timer (cloak_draw, NULL, opt.draw_interval, "DRAW_TIMER");
|
1999-11-13 16:02:31 -08:00
|
|
|
return;
|
|
|
|
data = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
cloak_epplet (void *data)
|
|
|
|
{
|
|
|
|
if (!cloaked)
|
|
|
|
{
|
|
|
|
Epplet_gadget_hide (btn_close);
|
|
|
|
Epplet_gadget_hide (btn_conf);
|
|
|
|
Epplet_gadget_hide (btn_help);
|
|
|
|
Epplet_gadget_hide (btn_save);
|
1999-11-13 16:45:48 -08:00
|
|
|
Epplet_gadget_hide (btn_ctimer);
|
|
|
|
Epplet_gadget_hide (btn_stimer);
|
1999-11-13 16:02:31 -08:00
|
|
|
Epplet_gadget_show (da);
|
|
|
|
cloak_draw (NULL);
|
|
|
|
cloaked = 1;
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
data = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
cb_cloak_anim (void *data)
|
|
|
|
{
|
|
|
|
cb_in (NULL, 0);
|
|
|
|
opt.do_cloak = 1;
|
|
|
|
opt.cloak_anim = *((int *) data);
|
|
|
|
if (opt.cloak_anim == 16)
|
|
|
|
{
|
|
|
|
opt.rand_cloak = 1;
|
1999-11-30 06:45:32 -08:00
|
|
|
choose_random_cloak (NULL);
|
1999-11-13 16:02:31 -08:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if (opt.rand_cloak)
|
1999-11-30 06:45:32 -08:00
|
|
|
{
|
|
|
|
Epplet_remove_timer ("RAND_TIMER");
|
|
|
|
}
|
1999-11-13 16:02:31 -08:00
|
|
|
opt.rand_cloak = 0;
|
|
|
|
}
|
|
|
|
Epplet_timer (cloak_epplet, NULL, opt.cloak_delay, "CLOAK_TIMER");
|
|
|
|
return;
|
|
|
|
data = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
cb_cloak_delay (void *data)
|
|
|
|
{
|
|
|
|
Epplet_remove_timer ("CLOAK_TIMER");
|
|
|
|
opt.cloak_delay = *(int *) data;
|
|
|
|
Epplet_timer (cloak_epplet, NULL, opt.cloak_delay, "CLOAK_TIMER");
|
|
|
|
return;
|
|
|
|
data = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
cb_save_delay (void *data)
|
|
|
|
{
|
|
|
|
opt.delay = *(int *) data;
|
|
|
|
return;
|
|
|
|
data = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
cb_dont_cloak (void *data)
|
|
|
|
{
|
|
|
|
opt.do_cloak = 0;
|
|
|
|
Epplet_remove_timer ("CLOAK_TIMER");
|
|
|
|
return;
|
|
|
|
data = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
cb_in (void *data, Window w)
|
|
|
|
{
|
Fri Dec 03 23:47:45 GMT 1999
(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
1999-12-03 11:34:55 -08:00
|
|
|
if (w == Epplet_get_main_window ())
|
1999-11-13 16:02:31 -08:00
|
|
|
{
|
Fri Dec 03 23:47:45 GMT 1999
(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
1999-12-03 11:34:55 -08:00
|
|
|
if (cloaked)
|
|
|
|
{
|
|
|
|
Epplet_gadget_hide (da);
|
|
|
|
cloaked = 0;
|
|
|
|
Epplet_gadget_show (btn_close);
|
|
|
|
Epplet_gadget_show (btn_conf);
|
|
|
|
Epplet_gadget_show (btn_help);
|
|
|
|
Epplet_gadget_show (btn_save);
|
|
|
|
Epplet_gadget_show (btn_ctimer);
|
|
|
|
Epplet_gadget_show (btn_stimer);
|
|
|
|
}
|
|
|
|
Epplet_remove_timer ("CLOAK_TIMER");
|
|
|
|
Epplet_remove_timer ("DRAW_TIMER");
|
1999-11-13 16:02:31 -08:00
|
|
|
}
|
|
|
|
return;
|
|
|
|
data = NULL;
|
|
|
|
w = (Window) 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
cb_out (void *data, Window w)
|
|
|
|
{
|
Fri Dec 03 23:47:45 GMT 1999
(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
1999-12-03 11:34:55 -08:00
|
|
|
if (w == Epplet_get_main_window ())
|
|
|
|
{
|
|
|
|
Epplet_remove_timer ("CLOAK_TIMER");
|
|
|
|
if ((!cloaked) && (opt.do_cloak))
|
|
|
|
Epplet_timer (cloak_epplet, NULL, opt.cloak_delay, "CLOAK_TIMER");
|
|
|
|
}
|
1999-11-13 16:02:31 -08:00
|
|
|
return;
|
|
|
|
data = NULL;
|
|
|
|
w = (Window) 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Amongst all the fluff, this is the bit that does the actual work. */
|
|
|
|
static void
|
|
|
|
cb_shoot (void *data)
|
|
|
|
{
|
Wed Dec 01 23:05:13 GMT 1999
(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
1999-12-01 11:12:33 -08:00
|
|
|
#if 0
|
1999-12-01 11:28:34 -08:00
|
|
|
if (opt.lock_cmd)
|
1999-11-30 06:45:32 -08:00
|
|
|
system (opt.lock_cmd);
|
Wed Dec 01 23:05:13 GMT 1999
(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
1999-12-01 11:12:33 -08:00
|
|
|
#endif
|
|
|
|
|
1999-11-30 06:45:32 -08:00
|
|
|
|
1999-12-03 05:07:03 -08:00
|
|
|
static int temp = 20;
|
|
|
|
static int temp2 = 50;
|
|
|
|
static int temp3 = 80;
|
Fri Dec 03 23:47:45 GMT 1999
(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
1999-12-03 11:34:55 -08:00
|
|
|
Window mywin, mywin2, mywin3;
|
|
|
|
Epplet_gadget sld, sld2, sld3, lbl;
|
1999-12-03 05:07:03 -08:00
|
|
|
mywin =
|
1999-12-03 08:05:33 -08:00
|
|
|
Epplet_create_window (400, 300,
|
Fri Dec 03 23:47:45 GMT 1999
(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
1999-12-03 11:34:55 -08:00
|
|
|
"See! I told you this stuff was easy ;)", 1);
|
1999-12-03 05:07:03 -08:00
|
|
|
Epplet_window_show (mywin);
|
|
|
|
Epplet_gadget_show (lbl =
|
|
|
|
Epplet_create_label (20, 10,
|
Fri Dec 03 20:11:23 GMT 1999
(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
1999-12-03 07:59:17 -08:00
|
|
|
"This window was created on its own, and is vertical.",
|
1999-12-03 05:07:03 -08:00
|
|
|
2));
|
|
|
|
Epplet_gadget_show (sld =
|
|
|
|
Epplet_create_hslider (20, 50, 100, 0, 100, 1, 5, &temp,
|
|
|
|
NULL, NULL));
|
|
|
|
Epplet_gadget_show (sld2 =
|
|
|
|
Epplet_create_hslider (20, 100, 200, 0, 100, 1, 5,
|
|
|
|
&temp2, NULL, NULL));
|
|
|
|
Epplet_gadget_show (sld3 =
|
|
|
|
Epplet_create_hslider (20, 150, 300, 0, 100, 1, 5,
|
|
|
|
&temp3, NULL, NULL));
|
1999-12-01 11:28:34 -08:00
|
|
|
|
Thu Dec 02 23:07:45 GMT 1999
(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
1999-12-02 11:08:48 -08:00
|
|
|
Epplet_window_pop_context ();
|
1999-12-03 06:17:56 -08:00
|
|
|
|
|
|
|
mywin2 =
|
1999-12-03 08:05:33 -08:00
|
|
|
Epplet_create_window (400, 300,
|
Fri Dec 03 23:47:45 GMT 1999
(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
1999-12-03 11:34:55 -08:00
|
|
|
"See! I told you this stuff was easy ;)", 0);
|
1999-12-03 06:17:56 -08:00
|
|
|
Epplet_window_show (mywin2);
|
|
|
|
Epplet_gadget_show (lbl =
|
|
|
|
Epplet_create_label (20, 10,
|
|
|
|
"This window was created first of two on the context stack.",
|
|
|
|
2));
|
|
|
|
Epplet_gadget_show (sld =
|
|
|
|
Epplet_create_hslider (20, 50, 100, 0, 100, 1, 5, &temp,
|
|
|
|
NULL, NULL));
|
|
|
|
Epplet_gadget_show (sld2 =
|
|
|
|
Epplet_create_hslider (20, 100, 200, 0, 100, 1, 5,
|
|
|
|
&temp2, NULL, NULL));
|
|
|
|
Epplet_gadget_show (sld3 =
|
|
|
|
Epplet_create_hslider (20, 150, 300, 0, 100, 1, 5,
|
|
|
|
&temp3, NULL, NULL));
|
|
|
|
|
|
|
|
mywin3 =
|
1999-12-03 08:05:33 -08:00
|
|
|
Epplet_create_window (400, 300,
|
Fri Dec 03 23:47:45 GMT 1999
(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
1999-12-03 11:34:55 -08:00
|
|
|
"See! I told you this stuff was easy ;)", 0);
|
1999-12-03 06:17:56 -08:00
|
|
|
Epplet_window_show (mywin3);
|
|
|
|
Epplet_gadget_show (lbl =
|
|
|
|
Epplet_create_label (20, 10,
|
|
|
|
"This window was created second of two on the context stack.",
|
|
|
|
2));
|
|
|
|
Epplet_gadget_show (sld =
|
|
|
|
Epplet_create_hslider (20, 50, 100, 0, 100, 1, 5, &temp,
|
|
|
|
NULL, NULL));
|
|
|
|
Epplet_gadget_show (sld2 =
|
|
|
|
Epplet_create_hslider (20, 100, 200, 0, 100, 1, 5,
|
|
|
|
&temp2, NULL, NULL));
|
|
|
|
Epplet_gadget_show (sld3 =
|
|
|
|
Epplet_create_hslider (20, 150, 300, 0, 100, 1, 5,
|
|
|
|
&temp3, NULL, NULL));
|
|
|
|
Epplet_window_pop_context ();
|
|
|
|
Epplet_window_pop_context ();
|
|
|
|
|
1999-11-13 16:02:31 -08:00
|
|
|
return;
|
|
|
|
data = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
cb_color (void *data)
|
|
|
|
{
|
|
|
|
int *d;
|
|
|
|
d = (int *) data;
|
|
|
|
flame_col (d[0], d[1], d[2], d[3], d[4], d[5], d[6], d[7], d[8]);
|
|
|
|
Epplet_gadget_hide (col_p);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
create_epplet_layout (void)
|
|
|
|
{
|
1999-12-01 11:28:34 -08:00
|
|
|
Epplet_gadget_show (btn_close =
|
|
|
|
Epplet_create_button (NULL, NULL, 2,
|
|
|
|
2, 0, 0,
|
|
|
|
"CLOSE", 0,
|
|
|
|
NULL, cb_close, NULL));
|
1999-11-13 16:02:31 -08:00
|
|
|
Epplet_gadget_show (btn_help =
|
1999-12-01 11:28:34 -08:00
|
|
|
Epplet_create_button (NULL, NULL,
|
|
|
|
18, 2, 0, 0,
|
|
|
|
"HELP", 0, NULL, cb_help, NULL));
|
1999-11-13 16:02:31 -08:00
|
|
|
Epplet_gadget_show (btn_save =
|
1999-12-01 11:28:34 -08:00
|
|
|
Epplet_create_button ("Lock", NULL,
|
|
|
|
2, 31, 44, 13,
|
|
|
|
0, 0, NULL, cb_shoot, NULL));
|
1999-11-13 16:02:31 -08:00
|
|
|
p = Epplet_create_popup ();
|
|
|
|
Epplet_add_popup_entry (p, "Don't Cloak", NULL, cb_dont_cloak, NULL);
|
1999-12-01 11:28:34 -08:00
|
|
|
Epplet_add_popup_entry (p, "Blank Epplet", NULL,
|
|
|
|
cb_cloak_anim, (void *) (&(cloak_anims[0])));
|
|
|
|
Epplet_add_popup_entry (p, "RasterFire", NULL,
|
|
|
|
cb_cloak_anim, (void *) (&(cloak_anims[1])));
|
1999-11-13 16:02:31 -08:00
|
|
|
Epplet_add_popup_entry (p, "Radar", NULL, cb_cloak_anim,
|
|
|
|
(void *) (&(cloak_anims[2])));
|
1999-12-01 11:28:34 -08:00
|
|
|
Epplet_add_popup_entry (p, "AA Radar", NULL,
|
|
|
|
cb_cloak_anim, (void *) (&(cloak_anims[3])));
|
|
|
|
Epplet_add_popup_entry (p, "AA Triangle", NULL,
|
|
|
|
cb_cloak_anim, (void *) (&(cloak_anims[4])));
|
|
|
|
Epplet_add_popup_entry (p, "AA Star", NULL,
|
|
|
|
cb_cloak_anim, (void *) (&(cloak_anims[5])));
|
|
|
|
Epplet_add_popup_entry (p, "Starfield", NULL,
|
|
|
|
cb_cloak_anim, (void *) (&(cloak_anims[6])));
|
|
|
|
Epplet_add_popup_entry (p, "AA Starfield", NULL,
|
|
|
|
cb_cloak_anim, (void *) (&(cloak_anims[7])));
|
1999-11-13 16:02:31 -08:00
|
|
|
Epplet_add_popup_entry (p, "Mesh", NULL, cb_cloak_anim,
|
|
|
|
(void *) (&(cloak_anims[8])));
|
1999-12-01 11:28:34 -08:00
|
|
|
Epplet_add_popup_entry (p, "Funky Mesh", NULL,
|
|
|
|
cb_cloak_anim, (void *) (&(cloak_anims[15])));
|
|
|
|
Epplet_add_popup_entry (p, "Scanner", NULL,
|
|
|
|
cb_cloak_anim, (void *) (&(cloak_anims[9])));
|
|
|
|
Epplet_add_popup_entry (p, "ColorShift", NULL,
|
|
|
|
cb_cloak_anim, (void *) (&(cloak_anims[10])));
|
|
|
|
Epplet_add_popup_entry (p, "Bouncy Ball", NULL,
|
|
|
|
cb_cloak_anim, (void *) (&(cloak_anims[11])));
|
1999-11-13 16:02:31 -08:00
|
|
|
Epplet_add_popup_entry (p, "Atoms", NULL, cb_cloak_anim,
|
|
|
|
(void *) (&(cloak_anims[12])));
|
1999-12-01 11:28:34 -08:00
|
|
|
Epplet_add_popup_entry (p, "Banner", NULL,
|
|
|
|
cb_cloak_anim, (void *) (&(cloak_anims[13])));
|
|
|
|
Epplet_add_popup_entry (p, "SineWave", NULL,
|
|
|
|
cb_cloak_anim, (void *) (&(cloak_anims[14])));
|
|
|
|
Epplet_add_popup_entry (p, "Random", NULL,
|
|
|
|
cb_cloak_anim, (void *) (&(cloak_anims[16])));
|
1999-11-13 16:02:31 -08:00
|
|
|
col_p = Epplet_create_popup ();
|
|
|
|
Epplet_add_popup_entry (col_p, "Flame Colors", NULL, NULL, NULL);
|
|
|
|
Epplet_add_popup_entry (col_p, "Funky", NULL, cb_color,
|
|
|
|
(void *) (&(colors[0 * 9])));
|
1999-12-01 11:28:34 -08:00
|
|
|
Epplet_add_popup_entry (col_p, "Turquoise", NULL,
|
|
|
|
cb_color, (void *) (&(colors[1 * 9])));
|
1999-11-13 16:02:31 -08:00
|
|
|
Epplet_add_popup_entry (col_p, "Fire", NULL, cb_color,
|
|
|
|
(void *) (&(colors[2 * 9])));
|
|
|
|
Epplet_add_popup_entry (col_p, "Copper", NULL, cb_color,
|
|
|
|
(void *) (&(colors[3 * 9])));
|
|
|
|
Epplet_add_popup_entry (col_p, "Violet", NULL, cb_color,
|
|
|
|
(void *) (&(colors[4 * 9])));
|
|
|
|
Epplet_add_popup_entry (col_p, "Night", NULL, cb_color,
|
|
|
|
(void *) (&(colors[5 * 9])));
|
1999-12-01 11:28:34 -08:00
|
|
|
Epplet_add_popup_entry (col_p, "Sunrise", NULL,
|
|
|
|
cb_color, (void *) (&(colors[6 * 9])));
|
1999-11-13 16:02:31 -08:00
|
|
|
Epplet_add_popup_entry (col_p, "Sunset", NULL, cb_color,
|
|
|
|
(void *) (&(colors[7 * 9])));
|
|
|
|
ctimer_p = Epplet_create_popup ();
|
|
|
|
Epplet_add_popup_entry (ctimer_p, "Cloak Delay", NULL, NULL, NULL);
|
1999-12-01 11:28:34 -08:00
|
|
|
Epplet_add_popup_entry (ctimer_p, "1 Sec", NULL,
|
|
|
|
cb_cloak_delay, (void *) (&(cloak_delays[0])));
|
|
|
|
Epplet_add_popup_entry (ctimer_p, "2 Sec", NULL,
|
|
|
|
cb_cloak_delay, (void *) (&(cloak_delays[1])));
|
|
|
|
Epplet_add_popup_entry (ctimer_p, "3 Sec", NULL,
|
|
|
|
cb_cloak_delay, (void *) (&(cloak_delays[2])));
|
|
|
|
Epplet_add_popup_entry (ctimer_p, "4 Sec", NULL,
|
|
|
|
cb_cloak_delay, (void *) (&(cloak_delays[3])));
|
|
|
|
Epplet_add_popup_entry (ctimer_p, "5 Sec", NULL,
|
|
|
|
cb_cloak_delay, (void *) (&(cloak_delays[4])));
|
|
|
|
Epplet_add_popup_entry (ctimer_p, "10 Sec", NULL,
|
|
|
|
cb_cloak_delay, (void *) (&(cloak_delays[5])));
|
|
|
|
Epplet_add_popup_entry (ctimer_p, "15 Sec", NULL,
|
|
|
|
cb_cloak_delay, (void *) (&(cloak_delays[6])));
|
|
|
|
Epplet_add_popup_entry (ctimer_p, "20 Sec", NULL,
|
|
|
|
cb_cloak_delay, (void *) (&(cloak_delays[7])));
|
|
|
|
Epplet_add_popup_entry (ctimer_p, "30 Sec", NULL,
|
|
|
|
cb_cloak_delay, (void *) (&(cloak_delays[8])));
|
|
|
|
Epplet_add_popup_entry (ctimer_p, "1 min", NULL,
|
|
|
|
cb_cloak_delay, (void *) (&(cloak_delays[9])));
|
|
|
|
Epplet_add_popup_entry (ctimer_p, "2 mins", NULL,
|
|
|
|
cb_cloak_delay, (void *) (&(cloak_delays[10])));
|
1999-11-13 16:02:31 -08:00
|
|
|
stimer_p = Epplet_create_popup ();
|
|
|
|
Epplet_add_popup_entry (stimer_p, "Save Delay", NULL, NULL, NULL);
|
1999-12-01 11:28:34 -08:00
|
|
|
Epplet_add_popup_entry (stimer_p, "No Delay", NULL,
|
|
|
|
cb_save_delay, (void *) (&(save_delays[0])));
|
|
|
|
Epplet_add_popup_entry (stimer_p, "5 Sec", NULL,
|
|
|
|
cb_save_delay, (void *) (&(save_delays[5])));
|
|
|
|
Epplet_add_popup_entry (stimer_p, "10 Sec", NULL,
|
|
|
|
cb_save_delay, (void *) (&(save_delays[6])));
|
|
|
|
Epplet_add_popup_entry (stimer_p, "15 Sec", NULL,
|
|
|
|
cb_save_delay, (void *) (&(save_delays[7])));
|
|
|
|
Epplet_add_popup_entry (stimer_p, "20 Sec", NULL,
|
|
|
|
cb_save_delay, (void *) (&(save_delays[8])));
|
|
|
|
Epplet_add_popup_entry (stimer_p, "30 Sec", NULL,
|
|
|
|
cb_save_delay, (void *) (&(save_delays[9])));
|
|
|
|
Epplet_add_popup_entry (stimer_p, "1 min", NULL,
|
|
|
|
cb_save_delay, (void *) (&(save_delays[10])));
|
|
|
|
Epplet_add_popup_entry (stimer_p, "2 mins", NULL,
|
|
|
|
cb_save_delay, (void *) (&(save_delays[11])));
|
|
|
|
Epplet_add_popup_entry (stimer_p, "5 mins", NULL,
|
|
|
|
cb_save_delay, (void *) (&(save_delays[12])));
|
|
|
|
Epplet_add_popup_entry (stimer_p, "10 mins", NULL,
|
|
|
|
cb_save_delay, (void *) (&(save_delays[13])));
|
|
|
|
Epplet_gadget_show (btn_conf =
|
|
|
|
Epplet_create_popupbutton (NULL,
|
|
|
|
NULL, 34,
|
|
|
|
2, 12, 12, "CONFIGURE", p));
|
1999-11-13 16:02:31 -08:00
|
|
|
Epplet_gadget_show (btn_col =
|
|
|
|
Epplet_create_popupbutton (NULL,
|
|
|
|
EROOT
|
1999-11-24 15:36:51 -08:00
|
|
|
"/epplet_data/E-ScreenShoot/E-ScreenShoot_col.png",
|
1999-11-30 06:45:32 -08:00
|
|
|
2, 17, 13, 13, NULL, col_p));
|
1999-11-13 16:02:31 -08:00
|
|
|
Epplet_gadget_show (btn_ctimer =
|
|
|
|
Epplet_create_popupbutton (NULL,
|
|
|
|
EROOT
|
1999-11-24 15:36:51 -08:00
|
|
|
"/epplet_data/E-ScreenShoot/E-ScreenShoot_minitime.png",
|
1999-12-01 11:28:34 -08:00
|
|
|
17, 17,
|
|
|
|
13, 13, NULL, ctimer_p));
|
1999-11-13 16:02:31 -08:00
|
|
|
Epplet_gadget_show (btn_stimer =
|
|
|
|
Epplet_create_popupbutton (NULL,
|
|
|
|
EROOT
|
1999-11-24 15:36:51 -08:00
|
|
|
"/epplet_data/E-ScreenShoot/E-ScreenShoot_minitime2.png",
|
1999-12-01 11:28:34 -08:00
|
|
|
33, 17,
|
|
|
|
13, 13, NULL, stimer_p));
|
1999-11-13 16:02:31 -08:00
|
|
|
da = Epplet_create_drawingarea (2, 2, 44, 44);
|
|
|
|
win = Epplet_get_drawingarea_window (da);
|
|
|
|
buf = Epplet_make_rgb_buf (40, 40);
|
|
|
|
cloaked = 0;
|
|
|
|
set_flame_col (0);
|
|
|
|
if (opt.do_cloak)
|
|
|
|
Epplet_timer (cloak_epplet, NULL, opt.cloak_delay, "CLOAK_TIMER");
|
|
|
|
Epplet_register_mouse_enter_handler (cb_in, (void *) win);
|
|
|
|
Epplet_register_mouse_leave_handler (cb_out, NULL);
|
|
|
|
}
|
|
|
|
|
1999-11-23 10:51:27 -08:00
|
|
|
static void
|
|
|
|
clean_exit (void)
|
|
|
|
{
|
1999-11-30 06:45:32 -08:00
|
|
|
save_config ();
|
|
|
|
Epplet_cleanup ();
|
1999-11-23 10:51:27 -08:00
|
|
|
}
|
|
|
|
|
1999-11-13 16:02:31 -08:00
|
|
|
int
|
|
|
|
main (int argc, char **argv)
|
|
|
|
{
|
|
|
|
int prio;
|
|
|
|
prio = getpriority (PRIO_PROCESS, getpid ());
|
|
|
|
setpriority (PRIO_PROCESS, getpid (), prio + 10);
|
1999-11-23 10:51:27 -08:00
|
|
|
atexit (clean_exit);
|
1999-11-13 16:02:31 -08:00
|
|
|
/* Initialise random numbers */
|
|
|
|
srand (time (0));
|
1999-12-01 11:28:34 -08:00
|
|
|
Epplet_Init ("E-ScreenSave", "0.7",
|
|
|
|
"Enlightenment Screen Savin' Epplet", 3, 3, argc, argv, 0);
|
1999-11-13 16:02:31 -08:00
|
|
|
Epplet_load_config ();
|
|
|
|
load_config ();
|
|
|
|
create_epplet_layout ();
|
|
|
|
Epplet_show ();
|
|
|
|
Epplet_Loop ();
|
|
|
|
return 0;
|
|
|
|
}
|