Esempio n. 1
0
/*
 * XTerm escape sequences: ESC ] Ps;Pt BEL
 *       0 = change iconName/title
 *       1 = change iconName
 *       2 = change title
 *      46 = change logfile (not implemented)
 *      50 = change font
 *
 * rxvt extensions:
 *      10 = menu
 *      20 = bg pixmap
 *      39 = change default fg color
 *      49 = change default bg color
 */
void
xterm_seq (int op, char *str)
{
  int changed = 0;

  assert (str != NULL);
  switch (op)
    {
    case XTerm_name:
      set_title (str);		/* drop */
    case XTerm_iconName:
      set_iconName (str);
      break;
    case XTerm_title:
      set_title (str);
      break;
    case XTerm_Menu:
      menubar_dispatch (str);
      break;
    case XTerm_Pixmap:
#ifdef XPM_BACKGROUND
      if (*str != ';')
	set_bgPixmap (str);

      while ((str = strchr (str, ';')) != NULL)
	{
	  str++;
	  changed += scale_pixmap (str);
	}
      if (changed)
	{
	  resize_pixmap ();
	  scr_touch ();
	}
#endif /* XPM_BACKGROUND */
      break;

    case XTerm_restoreFG:
      set_window_color (fgColor, str);
      break;
    case XTerm_restoreBG:
      set_window_color (bgColor, str);
      break;
    case XTerm_logfile:
      break;
    case XTerm_font:
      change_font (0, str);
      break;
    }
}
Esempio n. 2
0
void display_options_menu()
{
	if(options_win <= 0){
		options_win= create_window("Options", 0, 0, options_menu_x, options_menu_y, options_menu_x_len, options_menu_y_len, ELW_WIN_DEFAULT);

		set_window_color(options_win, ELW_COLOR_BORDER, 0.0f, 1.0f, 0.0f, 0.0f);
		set_window_handler(options_win, ELW_HANDLER_DISPLAY, &display_options_handler );
		set_window_handler(options_win, ELW_HANDLER_CLICK, &click_options_handler );
		set_window_handler(options_win, ELW_HANDLER_MOUSEOVER, &mouseover_options_handler );
		init_display_options_menu();
	} else {
		show_window(options_win);
		select_window(options_win);
	}
	display_window(options_win);
}