Esempio n. 1
0
static void
config_cb(void *data)
{
   if (config_win)
     {
	return;
     }

   config_win =
      Epplet_create_window_config(200, 100, "E-Bandwidth Configuration", ok_cb,
				  NULL, apply_cb, NULL, cancel_cb, NULL);

   Epplet_gadget_show(Epplet_create_label(4, 4, "Device:", 2));
   Epplet_gadget_show(cfg_tb_dev =
		      Epplet_create_textbox(NULL, device_string, 4, 18, 192, 20,
					    2, NULL, NULL));

   Epplet_gadget_show(Epplet_create_togglebutton
		      (NULL, NULL, 4, 50, 12, 12, &show_title, NULL, NULL));
   Epplet_gadget_show(Epplet_create_label(20, 50, "Show title?", 2));

   Epplet_window_show(config_win);
   Epplet_window_pop_context();

   return;
   data = NULL;
}
Esempio n. 2
0
File: E-Areas.c Progetto: Limsik/e17
int
main(int argc, char **argv)
{
   Epplet_gadget       b_up, b_down, b_left, b_right;

   atexit(Epplet_cleanup);
   Epplet_Init("E-Areas", "0.1",
	       "A desktop areas navigator; John Slee <*****@*****.**>",
	       3, 3, argc, argv, 0);
   b_close = epp_create_std_button(18, 18, "CLOSE", close_cb, NULL);

   b_up = epp_create_std_button(18, 6, "ARROW_UP", arrow_cb, AREA_UP);
   b_down = epp_create_std_button(18, 30, "ARROW_DOWN", arrow_cb, AREA_DOWN);
   b_left = epp_create_std_button(6, 18, "ARROW_LEFT", arrow_cb, AREA_LEFT);
   b_right = epp_create_std_button(30, 18, "ARROW_RIGHT", arrow_cb, AREA_RIGHT);
   Epplet_gadget_show(b_up);
   Epplet_gadget_show(b_down);
   Epplet_gadget_show(b_left);
   Epplet_gadget_show(b_right);

   Epplet_register_focus_in_handler(in_cb, NULL);
   Epplet_register_focus_out_handler(out_cb, NULL);

   Epplet_show();
   Epplet_Loop();
   return 0;
}
Esempio n. 3
0
File: E-Time.c Progetto: Limsik/e17
int
main(int argc, char **argv)
{
   atexit(Epplet_cleanup);

   Epplet_Init("E-Time", "0.1", "Enlightenment Digital Clock Epplet", 3, 3,
	       argc, argv, 0);
   Epplet_load_config();
   parse_config();

   close_button = Epplet_create_std_button("CLOSE", 2, 2, close_cb, NULL);
   cfg_button = Epplet_create_std_button("CONFIGURE", 33, 2, config_cb, NULL);
   Epplet_gadget_show(label1 = Epplet_create_label(4 * just, 4, "", 1));
   Epplet_gadget_show(label2 = Epplet_create_label(4 * just, 15, "", 1));
   Epplet_gadget_show(label3 = Epplet_create_label(4 * just, 26, "", 1));
   Epplet_gadget_show(label4 = Epplet_create_label(4 * just, 36, "", 1));
   Epplet_register_focus_in_handler(in_cb, NULL);
   Epplet_register_focus_out_handler(out_cb, NULL);
   Epplet_register_delete_event_handler(delete_cb, NULL);

   Epplet_show();
   timer_cb(NULL);
   Epplet_Loop();
   return 0;
}
Esempio n. 4
0
int
main(int argc, char **argv)
{

   int                 prio;

   atexit(Epplet_cleanup);
   prio = getpriority(PRIO_PROCESS, getpid());
   setpriority(PRIO_PROCESS, getpid(), prio + 10);
   Epplet_Init("E-Sys", "0.1", "Enlightenment Uptime Epplet", 3, 3, argc, argv,
	       0);

   close_button =
      Epplet_create_button(NULL, NULL, 34, 2, 0, 0, "CLOSE", 0, NULL, close_cb,
			   NULL);
   label1 = Epplet_create_label(4, 4, "Uptime", 1);
   label2 = Epplet_create_label(4, 16, "", 1);
   label3 = Epplet_create_label(4, 26, "", 1);
   label4 = Epplet_create_label(4, 36, "", 1);
   Epplet_gadget_show(label1);
   Epplet_gadget_show(label2);
   Epplet_gadget_show(label3);
   Epplet_gadget_show(label4);
   Epplet_show();

   Epplet_register_focus_in_handler(in_cb, NULL);
   Epplet_register_focus_out_handler(out_cb, NULL);
   timer_cb(NULL);		/* Set everything up */
   Epplet_Loop();

   return 0;
}
Esempio n. 5
0
int
main(int argc, char **argv)
{
   Epplet_Init("E-Power", "0.1", "Enlightenment Laptop Power Epplet",
	       3, 3, argc, argv, 0);
   atexit(Epplet_cleanup);
   Epplet_timer(cb_timer, NULL, 30.0, "TIMER");
   b_close = Epplet_create_button(NULL, NULL,
				  2, 2, 0, 0, "CLOSE", 0, NULL, cb_close, NULL);
   b_help = Epplet_create_button(NULL, NULL,
				 34, 2, 0, 0, "HELP", 0, NULL, cb_help, NULL);
   b_suspend = Epplet_create_button(NULL, NULL,
				    2, 34, 0, 0, "PAUSE", 0, NULL,
				    cb_suspend, NULL);
   b_sleep = Epplet_create_button(NULL, NULL,
				  34, 34, 0, 0, "STOP", 0, NULL,
				  cb_sleep, NULL);
   Epplet_gadget_show(image = Epplet_create_image(2, 2, 44, 24,
						  "E-Power-Bat-100.png"));
   Epplet_gadget_show(label =
		      Epplet_create_label(2, 28, "APM, ACPI\nmissing", 1));
   Epplet_register_focus_in_handler(cb_in, NULL);
   Epplet_register_focus_out_handler(cb_out, NULL);
   cb_timer(NULL);
   Epplet_show();
   Epplet_Loop();
   return 0;
}
static void
create_gadget(int n)
{
   char               *std = NULL, *pbuff;

   if (*(buttons[n].image) == '<')
     {
	std = strdup(buttons[n].image + 1);
	for (pbuff = std; *pbuff; pbuff++)
	  {
	     if (*pbuff == '>')
	       {
		  *pbuff = 0;
	       }
	     else
	       {
		  *pbuff = toupper(*pbuff);
	       }
	  }
     }

   if (!strcasecmp(buttons[n].prog, "<popup>"))
     {
	buttons[n].gad = Epplet_create_popup();
	Epplet_gadget_show(Epplet_create_popupbutton
			   (buttons[n].label, buttons[n].image,
			    (buttons[n].x * 16) + 2, (buttons[n].y * 16) + 2,
			    (buttons[n].w - 1) * 16 + 12,
			    (buttons[n].h - 1) * 16 + 12, std, buttons[n].gad));
     }
   else if (buttons[n].popup != -1)
     {
	if ((unsigned long)buttons[n].popup < button_cnt)
	  {
	     Epplet_add_popup_entry(buttons[buttons[n].popup].gad,
				    buttons[n].label, buttons[n].image,
				    button_cb, &buttons[n]);
	  }
     }
   else
     {
	buttons[n].gad =
	   Epplet_create_button(buttons[n].label, buttons[n].image,
				(buttons[n].x * 16) + 2,
				(buttons[n].y * 16) + 2,
				(buttons[n].w - 1) * 16 + 12,
				(buttons[n].h - 1) * 16 + 12, std, None, NULL,
				button_cb, &buttons[n]);
	Epplet_gadget_show(buttons[n].gad);
     }
   if (std)
     {
	free(std);
     }
}
Esempio n. 7
0
int
main(int argc, char **argv)
{
   char                s[1024];
   char               *result = NULL;
   int                 use_count = 1;
   char              **results = NULL;
   int                 i, num_results;

   Epplet_Init("E-Config", "0.1", "Enlightenment Config Test Epplet",
	       5, 2, argc, argv, 0);
   Epplet_load_config();
   result = Epplet_query_config_def("USE_COUNT", "0");
   use_count = atoi(result);
   use_count++;
   Esnprintf(s, sizeof(s), "%i", use_count);
   Epplet_modify_config("USE_COUNT", s);

   printf("Dump before modification:\n");
   results = Epplet_query_multi_config("PARAMS", &num_results);
   for (i = 0; i < num_results; i++)
     {
	printf("%s\n", results[i]);
     }
   if (results)
     {
	free(results);
	results = NULL;
     }

   Epplet_modify_multi_config("PARAMS", argv, argc);

   printf("Dump after modification:\n");
   results = Epplet_query_multi_config("PARAMS", &num_results);
   for (i = 0; i < num_results; i++)
     {
	printf("%s\n", results[i]);
     }
   if (results)
      free(results);

   Esnprintf(s, sizeof(s), "Instance %i", Epplet_get_instance());
   Epplet_gadget_show(Epplet_create_label(10, 2, s, 0));

   Esnprintf(s, sizeof(s), "Used %i times.", use_count);
   Epplet_gadget_show(Epplet_create_label(10, 14, s, 0));

   Epplet_gadget_show(Epplet_create_button(NULL, NULL,
					   65, 2, 0, 0, "CLOSE", 0, NULL,
					   cb_close, NULL));
   Epplet_show();
   Epplet_Loop();
   return 0;
}
Esempio n. 8
0
File: E-Time.c Progetto: Limsik/e17
static void
in_cb(void *data, Window w)
{
   if (w == Epplet_get_main_window())
     {
	Epplet_gadget_show(close_button);
	Epplet_gadget_show(cfg_button);
     }
   return;
   data = NULL;
}
Esempio n. 9
0
static void
cb_in(void *data, Window w)
{
   Epplet_gadget_show(b_close);
   Epplet_gadget_show(b_suspend);
   Epplet_gadget_show(b_sleep);
   Epplet_gadget_show(b_help);
   return;
   data = NULL;
   w = (Window) 0;
}
Esempio n. 10
0
File: E-Magic.c Progetto: 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;
}
Esempio n. 11
0
int
main(int argc, char **argv)
{

   int                 prio;

   prio = getpriority(PRIO_PROCESS, getpid());
   setpriority(PRIO_PROCESS, getpid(), prio + 10);
   atexit(Epplet_cleanup);
   Epplet_Init("E-Bandwidth", "0.2", "Enlightenment Network I/O Monitor Epplet",
	       3, 3, argc, argv, 0);
   Epplet_load_config();
   parse_conf();

   title = Epplet_create_label(3, 3, "Net I/O", 1);
   if (show_title)
     {
	/* New arrangement */
	in_label = Epplet_create_label(3, 13, "I: 0 b/s", 1);
	out_label = Epplet_create_label(3, 30, "O: 0 b/s", 1);
	in_bar = Epplet_create_hbar(3, 22, 42, 7, 0, &in_val);
	out_bar = Epplet_create_hbar(3, 39, 42, 7, 0, &out_val);
	Epplet_gadget_show(title);
     }
   else
     {
	/* Old arrangement */
	in_label = Epplet_create_label(4, 4, "I: 0 b/s", 1);
	out_label = Epplet_create_label(4, 24, "O: 0 b/s", 1);
	in_bar = Epplet_create_hbar(4, 14, 40, 8, 0, &in_val);
	out_bar = Epplet_create_hbar(4, 36, 40, 8, 0, &out_val);
     }
   close_button =
      Epplet_create_button(NULL, NULL, 2, 2, 0, 0, "CLOSE", 0, NULL, close_cb,
			   NULL);
   cfg_button =
      Epplet_create_button(NULL, NULL, 33, 2, 0, 0, "CONFIGURE", 0, NULL,
			   config_cb, NULL);
   Epplet_gadget_show(in_label);
   Epplet_gadget_show(in_bar);
   Epplet_gadget_show(out_label);
   Epplet_gadget_show(out_bar);
   Epplet_show();

   Epplet_register_focus_in_handler(in_cb, NULL);
   Epplet_register_focus_out_handler(out_cb, NULL);
   timer_cb(NULL);		/* Set everything up */
   Epplet_Loop();

   return 0;
}
Esempio n. 12
0
static void
in_cb(void *data, Window w)
{
   if (w == Epplet_get_main_window())
     {
	Epplet_gadget_show(btn_urllist);
	Epplet_gadget_show(btn_conf);
	Epplet_gadget_show(btn_help);
	Epplet_gadget_show(btn_close);
	Epplet_gadget_show(lbl_url);
     }
   return;
   data = NULL;
}
Esempio n. 13
0
File: E-Xss.c Progetto: Limsik/e17
static void
config_cb(void *data)
{
   char                buff[128];
   unsigned int        h, y, i;

   if (config_win)
     {
	return;
     }

   hacks = (char **)realloc(hacks, sizeof(char *) * (++hack_cnt));

   cfg_tb_hacks = (Epplet_gadget *) malloc(sizeof(Epplet_gadget) * hack_cnt);
   memset(cfg_tb_hacks, 0, sizeof(Epplet_gadget) * hack_cnt);

   h = 70 + (hack_cnt * 41);
   config_win =
      Epplet_create_window_config(300, h, "E-Xss Configuration", ok_cb, NULL,
				  apply_cb, NULL, cancel_cb, NULL);

   sprintf(buff, "%3.2f", delay);
   Epplet_gadget_show(Epplet_create_label
		      (4, 4, "Delay between images (seconds):", 2));
   Epplet_gadget_show(cfg_tb_delay =
		      Epplet_create_textbox(NULL, buff, 4, 18, 292, 20, 2, NULL,
					    NULL));

   for (i = 0, y = 50; i < hack_cnt; i++)
     {
	Esnprintf(buff, sizeof(buff), "Hack #%d:", i);
	Epplet_gadget_show(Epplet_create_label(4, y, buff, 2));
	y += 14;
	Epplet_gadget_show(cfg_tb_hacks[i] =
			   Epplet_create_textbox(NULL,
						 ((i ==
						   hack_cnt -
						   1) ? NULL : hacks[i]), 4, y,
						 292, 20, 2, NULL, NULL));
	y += 27;
     }

   Epplet_window_show(config_win);
   Epplet_window_pop_context();

   return;
   data = NULL;
}
Esempio n. 14
0
File: E-Magic.c Progetto: 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;
}
Esempio n. 15
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);
}
Esempio n. 16
0
File: E-Magic.c Progetto: Limsik/e17
int
main(int argc, char **argv)
{
   srand(getpid() ^ time(NULL));
   atexit(Epplet_cleanup);

   Epplet_Init("E-Magic", "0.1", "Enlightenment Magic Eight Ball Epplet", w, h,
	       argc, argv, 0);
   Epplet_load_config();
   parse_config();

   label = Epplet_create_label(6, 6, "", 2);
   Epplet_gadget_show(picture =
		      Epplet_create_image_button(image, 3, 3, ((w * 16) - 6),
						 ((h * 16) - 6),
						 button_click_cb, NULL));
   close_button = Epplet_create_std_button("CLOSE", 3, 3, close_cb, NULL);
   cfg_button =
      Epplet_create_std_button("CONFIGURE", ((w * 16) - 15), 3, config_cb,
			       NULL);

   Epplet_register_focus_in_handler(in_cb, NULL);
   Epplet_register_focus_out_handler(out_cb, NULL);
   Epplet_register_delete_event_handler(delete_cb, NULL);
   Epplet_show();

   Epplet_Loop();

   return 0;
}
Esempio n. 17
0
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;
}
Esempio n. 18
0
static void enFoco(void *data, Window w){
  if (w == Epplet_get_main_window())
     {
	Epplet_gadget_show(botonCerrar);
     }
  return;
  //data = NULL;
}
Esempio n. 19
0
int
main(int argc, char **argv)
{
   atexit(Epplet_cleanup);

   Epplet_Init("E-LoadMeter", "0.1", "Enlightenment CPU Load Epplet", 3, 3,
	       argc, argv, 0);

   close_button = Epplet_create_std_button("CLOSE", 2, 2, close_cb, NULL);
   Epplet_gadget_show(Epplet_create_label(4, 4, "CPU Load", 1));
   Epplet_gadget_show(label1 = Epplet_create_label(3, 15, "", 1));
   Epplet_gadget_show(label2 = Epplet_create_label(3, 26, "", 1));
   Epplet_gadget_show(label3 = Epplet_create_label(3, 36, "", 1));

   Epplet_gadget_show(vbar1 = Epplet_create_vbar(31, 15, 5, 30, 1, &one));
   Epplet_gadget_show(vbar2 = Epplet_create_vbar(36, 15, 5, 30, 1, &five));
   Epplet_gadget_show(vbar3 = Epplet_create_vbar(41, 15, 5, 30, 1, &fifteen));

   Epplet_register_focus_in_handler(in_cb, NULL);
   Epplet_register_focus_out_handler(out_cb, NULL);
   Epplet_register_delete_event_handler(delete_cb, NULL);

   Epplet_show();
   timer_cb(NULL);
   Epplet_Loop();
   return 0;
}
Esempio n. 20
0
File: E-Areas.c Progetto: Limsik/e17
static void
in_cb(void *data, Window w)
{
   if (w == Epplet_get_main_window())
     {
	Epplet_gadget_show(b_close);
     }
   return;
   data = NULL;
}
static void
create_shade_window(void)
{
   shade_win =
      Epplet_create_window_borderless(16, 16, "E-Toolbox -- Shaded", 0);
   Epplet_gadget_show(Epplet_create_std_button
		      ("EJECT", 2, 2, unshade_cb, NULL));
   Epplet_window_pop_context();

   main_win = Epplet_get_main_window();
}
Esempio n. 22
0
int main (int argc, char **argv)
{
  texto=malloc(8);
  textoTemperatura=malloc(8);
  atexit(Epplet_cleanup);
  Epplet_Init("E-cpuStat", "0.1", "Enlightenment cpu temp/freq",
	       3, 3, argc, argv, 0);
  Epplet_timer(temporizador, NULL, 0, "TIMER");
  botonCerrar=Epplet_create_button(NULL, NULL,
					   2, 2, 0, 0, "CLOSE", 0, NULL,
					   cerrar, NULL);
  Epplet_register_focus_in_handler(enFoco,NULL);
  Epplet_register_focus_out_handler(fueraFoco,NULL);
  barra = Epplet_create_vbar(32, 3, 12, 41,
				     1, &temperatura);
  Epplet_gadget_show(barra);
  visorNumerico=Epplet_create_label(3,35,texto,0);
  visorTemperatura=Epplet_create_label(6,18,textoTemperatura,0);
  Epplet_gadget_show(visorTemperatura);
  Epplet_gadget_show(visorNumerico);
  Epplet_show();
  Epplet_Loop();
  return 0;
}
Esempio n. 23
0
File: E-Xss.c Progetto: Limsik/e17
int
main(int argc, char **argv)
{

   int                 prio;

   prio = getpriority(PRIO_PROCESS, getpid());
   setpriority(PRIO_PROCESS, getpid(), prio + 10);
   atexit(Epplet_cleanup);
   Epplet_Init("E-Xss", "0.2", "Enlightenment Xscreensaver Epplet", 3, 3, argc,
	       argv, 0);
   Epplet_load_config();
   parse_config();

   draw_area = Epplet_create_drawingarea(3, 3, 43, 43);
   Epplet_gadget_show(draw_area);
   close_button =
      Epplet_create_button(NULL, NULL, 3, 3, 0, 0, "CLOSE", 0, NULL, close_cb,
			   NULL);
   cfg_button = Epplet_create_std_button("CONFIGURE", 33, 3, config_cb, NULL);

   lock_button =
      Epplet_create_button("Lock", NULL, 2, 17, 44, 13, 0, 0, NULL, lock_cb,
			   NULL);

   prev_button =
      Epplet_create_button(NULL, NULL, 3, 33, 0, 0, "PREVIOUS", 0, NULL,
			   play_cb, (void *)(-1));
   zoom_button =
      Epplet_create_button(NULL, NULL, 18, 33, 0, 0, "EJECT", 0, NULL, zoom_cb,
			   NULL);
   next_button =
      Epplet_create_button(NULL, NULL, 33, 33, 0, 0, "NEXT", 0, NULL, play_cb,
			   (void *)(1));

   Epplet_show();

   Epplet_register_focus_in_handler(in_cb, NULL);
   Epplet_register_focus_out_handler(out_cb, NULL);
   Epplet_register_delete_event_handler(delete_cb, NULL);
   change_hack(NULL);
   Epplet_Loop();

   return 0;
}
Esempio n. 24
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;
}
Esempio n. 25
0
File: Emix.c Progetto: Limsik/e17
int
main(int argc, char *argv[])
{

   if (!open_mixer())
      return 1;
   initialize_channels();

   atexit(Epplet_cleanup);
   Epplet_Init("Emix", "0.9", "Audio mixer Epplet", 3, 3, argc, argv, 0);
   vs_master = Epplet_create_vslider(2, 2, 44, 0, 20, 1, 5,
				     &channels[0].value, set_volume,
				     &channels[0]);
   vs_pcm =
      Epplet_create_vslider(10, 2, 44, 0, 20, 1, 5, &channels[1].value,
			    set_volume, &channels[1]);
   vs_lin =
      Epplet_create_vslider(18, 2, 44, 0, 20, 1, 5, &channels[2].value,
			    set_volume, &channels[2]);
   vs_cda =
      Epplet_create_vslider(26, 2, 44, 0, 20, 1, 5, &channels[3].value,
			    set_volume, &channels[3]);
   b_close =
      Epplet_create_button(NULL, NULL, 34, 3, 0, 0, "CLOSE", 0, NULL, cb_close,
			   NULL);
   b_mute =
      Epplet_create_togglebutton("M", NULL, 34, 18, 12, 12, &mute_status,
				 toggle_mute, &channels[0]);
   b_help =
      Epplet_create_button(NULL, NULL, 34, 33, 0, 0, "HELP", 0, NULL, cb_help,
			   NULL);

   Epplet_gadget_show(vs_master);
   Epplet_gadget_show(vs_pcm);
   Epplet_gadget_show(vs_lin);
   Epplet_gadget_show(vs_cda);
   Epplet_gadget_show(b_close);
   Epplet_gadget_show(b_mute);
   Epplet_gadget_show(b_help);

   Epplet_show();
   Epplet_timer(update_volumes_callback, NULL, 0.5, "TIMER");
   Epplet_Loop();
   return 0;
}
Esempio n. 26
0
static void
create_epplet_layout(void)
{
   Epplet_gadget_show(lbl_url = Epplet_create_label(2, 34, " ", 0));

   Epplet_gadget_show(btn_close =
		      Epplet_create_std_button("CLOSE", 2, 2, cb_close, NULL));
   Epplet_gadget_show(btn_help =
		      Epplet_create_std_button("HELP", 16, 2, cb_help, NULL));
   Epplet_gadget_show(btn_www =
		      Epplet_create_text_button("WWW",
						4, 17, 28, 13,
						cb_shoot, "www"));
   Epplet_gadget_show(btn_ftp =
		      Epplet_create_text_button("FTP",
						34, 17, 28, 13,
						cb_shoot, "ftp"));
   Epplet_gadget_show(btn_wget =
		      Epplet_create_text_button("GET",
						64, 17, 28, 13,
						cb_shoot, "get"));
   btn_file_url = Epplet_create_text_button("New!",
					    30, 2, 34, 12,
					    cb_btn_file_url, NULL);
   Epplet_gadget_show(btn_conf =
		      Epplet_create_std_button("CONFIGURE",
					       82, 2, cb_config, NULL));
   url_p = Epplet_create_popup();
   Epplet_add_popup_entry(url_p, "Url List is currently empty", NULL, NULL,
			  NULL);
   Epplet_gadget_show(btn_urllist =
		      Epplet_create_popupbutton(NULL, NULL, 68, 2, 12, 12,
						"ARROW_DOWN", url_p));
   if (opt.check_url_file)
      Epplet_timer(check_url_file, NULL, 1, "URLCHECK_TIMER");
   display_string("Welcome to E-UrlWatch ;-)");
}
Esempio n. 27
0
File: E-Xss.c Progetto: Limsik/e17
static void
in_cb(void *data, Window w)
{

   if (w == Epplet_get_main_window())
     {
	/*Epplet_gadget_hide(draw_area); */
	Epplet_gadget_show(close_button);
	Epplet_gadget_show(zoom_button);
	Epplet_gadget_show(prev_button);
	Epplet_gadget_show(next_button);
	Epplet_gadget_show(cfg_button);
	Epplet_gadget_show(lock_button);
     }
   return;
   data = NULL;
}
Esempio n. 28
0
/* New file in url file. Show the "New!" button */
static void
display_url_from_file(char *url)
{
   char               *validurl;

   if (!(validurl = validate_url(url)))
      return;

   /* Perform new url command (eg play a sound) */
   if (opt.do_new_url_command && opt.new_url_command)
      system(opt.new_url_command);

   if (opt.always_show_file_urls)
      handle_url(validurl, "www");
   else
     {
	display_string(validurl);
	Epplet_gadget_show(btn_file_url);
     }

   if (!url_in_popup(validurl))
      add_url_to_popup(validurl);
}
Esempio n. 29
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;
}
Esempio n. 30
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;
}