/platform/unix/platform/vars/view.d

http://github.com/wilkie/djehuty · D · 58 lines · 30 code · 17 blank · 11 comment · 0 complexity · 93cc6b263e1f01e1d52b9002700ac215 MD5 · raw file

  1. /*
  2. * view.d
  3. *
  4. * This module implements the platform specifics for the View class.
  5. *
  6. * Author: Dave Wilkinson
  7. * Originated: July 25th, 2009
  8. *
  9. */
  10. module platform.vars.view;
  11. import platform.vars.brush;
  12. import platform.vars.pen;
  13. import Cairo = binding.cairo.cairo;
  14. import Pango = binding.pango.pango;
  15. import X = binding.x.Xlib;
  16. struct ViewPlatformVars {
  17. // antialias
  18. bool aa;
  19. X.Window cur_window;
  20. X.Pixmap pixmap;
  21. bool pixmap_loaded;
  22. X.GC gc;
  23. uint curpen;
  24. uint curbrush;
  25. PenPlatformVars curPen;
  26. BrushPlatformVars curBrush;
  27. //text
  28. Cairo.cairo_t* cr;
  29. Cairo.cairo_surface_t* surface;
  30. Pango.PangoLayout* layout;
  31. Pango.PangoAttrList* attr_list_opaque;
  32. Pango.PangoAttrList* attr_list_transparent;
  33. Pango.PangoAttribute* attr_bg;
  34. char* data;
  35. double textclr_red;
  36. double textclr_green;
  37. double textclr_blue;
  38. double textclr_alpha;
  39. int isOpaqueRendering;
  40. ulong bits_length;
  41. }