VgaGames 3 - Window man-pages

[.. upper level ..]

Window functions

Functions for the game-window.


Example

  struct vg3_window *wstruct;
  struct vg3_image_attributes wattr;
  int winw, winh;

  /* open window */
  wstruct = VG3_window_new(argv[0], VGAG3_VGAVERSION_LOW, VGAG3_WINSCALE_BESTSCALE);
  if (wstruct == NULL) { fprintf(stderr, "%s\n", VG3_error()); exit(1); }

  /* print window-size */
  VG3_window_getsize(wstruct, &winw, &winh);
  printf("Window-Size: %dx%d\n", winw, winh),

  /* retrieve actual window-attributes */
  VG3_window_attributes(wstruct, NULL, &wattr, -1, NULL);  
  printf("Brightness=%d, transparency=%d, zoom=%d, rotating=%d, flipping=%d, fullfill=%d\n",
         (int)wattr.bright, (int)wattr.alpha, wattr.zoom, wattr.rotate, wattr.flip, wattr.fullfill);

  /* show window-contents */
  VG3_window_update(wstruct, 0, 0);

  /* close window */
  VG3_window_free(wstruct);