예제 #1
0
파일: glw.c 프로젝트: bielorkut/showtime
int
glw_init(glw_root_t *gr, const char *theme, const char *skin,
	 ui_t *ui, int primary, 
	 const char *instance, const char *instance_title)
{
  char buf[256];

  skin = skin ?: "grey"; // Read from theme

  snprintf(buf, sizeof(buf), "%s/skins/%s", theme, skin);
  hts_mutex_init(&gr->gr_mutex);
  gr->gr_courier = prop_courier_create_passive();

  gr->gr_vpaths[0] = "theme";
  gr->gr_vpaths[1] = theme;
  gr->gr_vpaths[2] = "skin";
  gr->gr_vpaths[3] = strdup(buf);
  gr->gr_vpaths[4] = NULL;

  gr->gr_uii.uii_ui = ui;

  glw_text_bitmap_init(gr);
  glw_init_settings(gr, instance, instance_title);

  TAILQ_INIT(&gr->gr_destroyer_queue);
  glw_tex_init(gr);

  gr->gr_frameduration = 1000000 / 60;
  uii_register(&gr->gr_uii, primary);

  return 0;
}
예제 #2
0
파일: glw.c 프로젝트: Daisho/showtime
int
glw_init(glw_root_t *gr, const char *theme,
	 ui_t *ui, int primary, 
	 const char *instance, const char *instance_title)
{
  hts_mutex_init(&gr->gr_mutex);
  gr->gr_courier = prop_courier_create_passive();
  gr->gr_token_pool = pool_create("glwtokens", sizeof(token_t), POOL_ZERO_MEM);
  gr->gr_clone_pool = pool_create("glwclone", sizeof(glw_clone_t),
				  POOL_ZERO_MEM);

  gr->gr_vpaths[0] = "theme";
  gr->gr_vpaths[1] = theme;
  gr->gr_vpaths[2] = NULL;

  gr->gr_uii.uii_ui = ui;

  glw_text_bitmap_init(gr);
  glw_init_settings(gr, instance, instance_title);

  TAILQ_INIT(&gr->gr_destroyer_queue);
  glw_tex_init(gr);

  gr->gr_frameduration = 1000000 / 60;
  uii_register(&gr->gr_uii, primary);

  return 0;
}
예제 #3
0
파일: glw.c 프로젝트: Allba/showtime
int
glw_init(glw_root_t *gr, const char *instance)
{
  char skinbuf[PATH_MAX];
  const char *skin = gconf.skin;
  if(skin == NULL) {
    snprintf(skinbuf, sizeof(skinbuf),
	     "%s/glwskins/"SHOWTIME_GLW_DEFAULT_SKIN, showtime_dataroot());
    skin = skinbuf;
  }
  hts_mutex_init(&gr->gr_mutex);
  gr->gr_courier = prop_courier_create_passive();
  gr->gr_token_pool = pool_create("glwtokens", sizeof(token_t), POOL_ZERO_MEM);
  gr->gr_clone_pool = pool_create("glwclone", sizeof(glw_clone_t),
				  POOL_ZERO_MEM);

  gr->gr_skin = strdup(skin);

  gr->gr_vpaths[0] = "skin";
  gr->gr_vpaths[1] = gr->gr_skin;
  gr->gr_vpaths[2] = NULL;

  gr->gr_font_domain = freetype_get_context();

  glw_text_bitmap_init(gr);
  glw_init_settings(gr, instance);

  TAILQ_INIT(&gr->gr_destroyer_queue);
  glw_tex_init(gr);

  gr->gr_framerate = 60;
  gr->gr_frameduration = 1000000 / gr->gr_framerate;
  gr->gr_ui_start = showtime_get_ts();

  return 0;
}