Exemplo n.º 1
0
Arquivo: E-Areas.c Projeto: 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;
}
Exemplo n.º 2
0
Arquivo: E-Magic.c Projeto: 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;
}
Exemplo n.º 3
0
int
main(int argc, char **argv)
{
   int                 prio;

   prio = getpriority(PRIO_PROCESS, getpid());
   setpriority(PRIO_PROCESS, getpid(), prio + 10);

   atexit(clean_exit);

   /* Initialise random numbers */
   srand(time(0));

   Epplet_Init("E-ScreenShoot", "0.7", "Enlightenment Screen Shootin' Epplet",
	       3, 3, argc, argv, 0);
   Epplet_load_config();

   load_config();
   create_epplet_layout();

   if (opt.do_ftp)
      ftp_init(opt.ftp_passive);

   Epplet_show();
   Epplet_Loop();

   return 0;
}
Exemplo 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;
}
Exemplo n.º 5
0
Arquivo: E-Time.c Projeto: 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;
}
Exemplo n.º 6
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;
}
Exemplo n.º 7
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;
}
Exemplo n.º 8
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;
}
Exemplo n.º 9
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;
}
Exemplo n.º 10
0
int
main(int argc, char **argv)
{
   int                 j = 0, c = 0;

   prog_name = argv[0];
   atexit(Epplet_cleanup);

   for (j = 1; j < argc; j++)
     {
	if ((!strcmp("-w", argv[j])) && (argc - j > 1))
	  {
	     w = atoi(argv[++j]);
	  }
	else if ((!strcmp("-h", argv[j])) && (argc - j > 1))
	  {
	     h = atoi(argv[++j]);
	  }
	else if (!strcmp("-c", argv[j]))
	  {
	     c = 1;
	  }
     }

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

   for (j = 0; j < (int)button_cnt; j++)
     {
	create_gadget(j);
     }

   Epplet_register_delete_event_handler(delete_cb, NULL);
   create_shade_window();
   Epplet_show();

   if (c)
     {
	config_cb(NULL);
     }
   Epplet_Loop();

   return 0;
}
Exemplo n.º 11
0
Arquivo: Emix.c Projeto: 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;
}
Exemplo n.º 12
0
Arquivo: E-Xss.c Projeto: 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;
}
Exemplo n.º 13
0
int
main(int argc, char **argv)
{
   int                 prio;

   /* Lower priority to save cpu cycles */
   prio = getpriority(PRIO_PROCESS, getpid());
   setpriority(PRIO_PROCESS, getpid(), prio + 10);
   atexit(clean_exit);
   Epplet_Init("E-UrlWatch", "0.1",
	       "Enlightenment Url Watcher Epplet", 6, 3, argc, argv, 0);
   Epplet_load_config();
   load_config();
   create_epplet_layout();
   Epplet_register_focus_in_handler(in_cb, NULL);
   Epplet_register_focus_out_handler(out_cb, NULL);
   Epplet_show();
   Epplet_Loop();
   return 0;
}
Exemplo n.º 14
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;
}