コード例 #1
0
static void
noseguy_free (Display *dpy, Window window, void *closure)
{
  struct state *st = (struct state *) closure;
  textclient_close (st->tc);
  free (st);
}
コード例 #2
0
ファイル: splitflap.c プロジェクト: Zygo/xscreensaver
ENTRYPOINT void
free_splitflap (ModeInfo *mi)
{
  splitflap_configuration *bp = &bps[MI_SCREEN(mi)];
  int i;

  if (!bp->glx_context) return;
  glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *bp->glx_context);

  if (bp->flappers) free (bp->flappers);
  if (bp->tc) textclient_close (bp->tc);
  if (bp->trackball) gltrackball_free (bp->trackball);
  if (bp->rot) free_rotator (bp->rot);
  if (bp->rot2) free_rotator (bp->rot2);
  if (bp->font_data) free_texture_font (bp->font_data);
  if (bp->dlists) {
    for (i = 0; i < countof(all_objs); i++)
      if (glIsList(bp->dlists[i])) glDeleteLists(bp->dlists[i], 1);
    free (bp->dlists);
  }
  if (bp->texinfo) {
    for (i = 0; i < bp->texinfo_size; i++)
      if (bp->texinfo[i].texid) glDeleteTextures (1, &bp->texinfo[i].texid);
    free (bp->texinfo);
  }
}
コード例 #3
0
ファイル: fliptext.c プロジェクト: MaddTheSane/xscreensaver
ENTRYPOINT void
free_fliptext (ModeInfo *mi)
{
  fliptext_configuration *sc = &scs[MI_SCREEN(mi)];
  if (sc->tc)
    textclient_close (sc->tc);
  free(sc->lines);

  /* #### there's more to free here */
}
コード例 #4
0
ファイル: starwars.c プロジェクト: davehorner/XScreenSaverWin
ENTRYPOINT void
release_sws (ModeInfo *mi)
{
  if (scs) {
    int screen;
    for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) {
      sws_configuration *sc = &scs[screen];
      if (sc->tc)
        textclient_close (sc->tc);

      /* #### there's more to free here */
    }
    free (scs);
    scs = 0;
  }
  FreeAllGL(mi);
}