Example #1
0
File: E-Magic.c Project: Limsik/e17
static void
button_click_cb(void *data)
{
   unsigned long       last_idx = idx;

   do
     {
	idx = (unsigned long)(cnt * ((float)rand()) / (RAND_MAX + 1.0));
	if (idx >= cnt)
	  {
      /********** FIXME ***********/
	     fprintf(stderr, "Eek!\n");
	     fflush(stderr);
	     idx = last_idx;
	  }
     }
   while (idx == last_idx);

   Epplet_gadget_hide(picture);
   Epplet_gadget_hide(close_button);
   Epplet_gadget_hide(cfg_button);
   Epplet_change_label(label, answers[idx]);
   Epplet_gadget_show(label);

   Epplet_timer(button_show_cb, NULL, delay, "SHOW_BUTTON");
   return;
   data = NULL;
}
Example #2
0
/* Set scrolly string to default */
static void
reset_string(void *data)
{
   display_string("E-UrlWatch");
   Epplet_gadget_hide(btn_file_url);
   Epplet_register_focus_out_handler(out_cb, NULL);
   Epplet_gadget_hide(lbl_url);
   return;
   data = NULL;
}
Example #3
0
File: E-Time.c Project: Limsik/e17
static void
out_cb(void *data, Window w)
{
   if (w == Epplet_get_main_window())
     {
	Epplet_gadget_hide(close_button);
	Epplet_gadget_hide(cfg_button);
     }
   return;
   data = NULL;
}
Example #4
0
static void
cb_out(void *data, Window w)
{
   Epplet_gadget_hide(b_close);
   Epplet_gadget_hide(b_suspend);
   Epplet_gadget_hide(b_sleep);
   Epplet_gadget_hide(b_help);
   return;
   data = NULL;
   w = (Window) 0;
}
Example #5
0
static void
work_out_cb(void *data, Window w)
{
   if (w == Epplet_get_main_window())
     {
	Epplet_gadget_hide(btn_close);
	Epplet_gadget_hide(btn_help);
	Epplet_gadget_hide(btn_conf);
	Epplet_gadget_hide(btn_urllist);
     }
   return;
   data = NULL;
}
Example #6
0
static void
apply_config(void)
{
   char                buff[1024];

   if (show_title)
     {
	Epplet_gadget_move(in_label, 3, 13);
	Epplet_gadget_move(out_label, 3, 30);
	Epplet_gadget_move(in_bar, 3, 22);
	Epplet_gadget_move(out_bar, 3, 39);
	Epplet_gadget_show(title);
     }
   else
     {
	Epplet_gadget_move(in_label, 4, 4);
	Epplet_gadget_move(out_label, 4, 24);
	Epplet_gadget_move(in_bar, 4, 14);
	Epplet_gadget_move(out_bar, 4, 36);
	Epplet_gadget_hide(title);
     }
   Epplet_modify_config("title", (show_title ? "1" : "0"));

   strcpy(buff, NONULL(Epplet_textbox_contents(cfg_tb_dev)));
   if (strcmp(buff, device_string))
     {
	Epplet_modify_config("dev", buff);
	device_string = Epplet_query_config("dev");
	last_in = last_out = 0;
     }

   timer_cb(NULL);
}
static void
title_cb(void *data)
{

   show_title = !show_title;
   if (show_title)
     {
	Epplet_gadget_move(in_label, 3, 13);
	Epplet_gadget_move(out_label, 3, 30);
	Epplet_gadget_move(in_bar, 3, 22);
	Epplet_gadget_move(out_bar, 3, 39);
	Epplet_gadget_show(title);
     }
   else
     {
	Epplet_gadget_move(in_label, 4, 4);
	Epplet_gadget_move(out_label, 4, 24);
	Epplet_gadget_move(in_bar, 4, 14);
	Epplet_gadget_move(out_bar, 4, 36);
	Epplet_gadget_hide(title);
     }
   Epplet_modify_config("title", (show_title ? "1" : "0"));
   Epplet_redraw();
   return;
   data = NULL;
}
Example #8
0
static void fueraFoco(void *data, Window w){
  if (w == Epplet_get_main_window())
     {
	Epplet_gadget_hide(botonCerrar);
     }
  return;
  //data = NULL;
}
Example #9
0
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);
}
Example #10
0
File: E-Areas.c Project: Limsik/e17
static void
out_cb(void *data, Window w)
{
   if (w == Epplet_get_main_window())
     {
	Epplet_gadget_hide(b_close);
     }
   return;
   data = NULL;
}
Example #11
0
File: E-Magic.c Project: Limsik/e17
static void
button_show_cb(void *data)
{
   Epplet_gadget_hide(label);
   Epplet_gadget_show(picture);
   if (focus)
     {
	Epplet_gadget_show(close_button);
	Epplet_gadget_show(cfg_button);
     }
   return;
   data = NULL;
}
Example #12
0
static void
cb_dont_cloak(void *data)
{
   opt.do_cloak = 0;
   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_shoot);
	Epplet_gadget_show(sldr_qual);
	Epplet_gadget_show(tog_win);
     }
   Epplet_remove_timer("CLOAK_TIMER");
   return;
   data = NULL;
}
Example #13
0
static void
cb_in(void *data, Window w)
{
   if (w == Epplet_get_main_window())
     {
	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_shoot);
	     Epplet_gadget_show(sldr_qual);
	     Epplet_gadget_show(tog_win);
	  }
	Epplet_remove_timer("CLOAK_TIMER");
	Epplet_remove_timer("DRAW_TIMER");
     }
   return;
   data = NULL;
}
Example #14
0
File: E-Xss.c Project: Limsik/e17
static void
out_cb(void *data, Window w)
{

   if (w == Epplet_get_main_window())
     {
	/*Epplet_gadget_show(draw_area); */
	Epplet_gadget_hide(close_button);
	Epplet_gadget_hide(zoom_button);
	Epplet_gadget_hide(prev_button);
	Epplet_gadget_hide(next_button);
	Epplet_gadget_hide(cfg_button);
	Epplet_gadget_hide(lock_button);
     }
   return;
   data = NULL;
}
Example #15
0
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_shoot);
	Epplet_gadget_hide(sldr_qual);
	Epplet_gadget_hide(tog_win);
	Epplet_gadget_show(da);
	cloak_draw(NULL);
	cloaked = 1;
     }
   return;
   data = NULL;
}