IPS_graphics.h 643 B

1234567891011121314151617181920212223242526
  1. # pragma once
  2. #include <gtk/gtk.h>
  3. #include "CP_core_IPS.h"
  4. // define default color scheme macros
  5. #define VACANT {255,255,255}
  6. #define OCCUPIED {0,0,0}
  7. // structure to hold the color scheme
  8. struct Color
  9. {
  10. // machine state view
  11. int vacant[3];
  12. int occupied[3];
  13. };
  14. typedef struct Color ColorMap;
  15. // Declare PUT PIXEL function to access individual pixel data on a Pixel Buffer. Implemented at the end of document.
  16. void put_pixel(GdkPixbuf *pixbuf, int x, int y, guchar red, guchar green, guchar blue, guchar alpha);
  17. void paint_a_background (gpointer data);
  18. void paint_lattice (gpointer data, IPSmodel *s);