DisplayNull.Mod 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. (* Aos, Copyright 2001, Pieter Muller, ETH Zurich *)
  2. MODULE DisplayNull; (** AUTHOR "pjm"; PURPOSE "Null display driver"; *)
  3. IMPORT Displays, KernelLog;
  4. CONST
  5. Trace = TRUE;
  6. TYPE
  7. Display* = OBJECT (Displays.Display)
  8. PROCEDURE &Init*;
  9. BEGIN
  10. width := 1024; height := 768; offscreen := 0;
  11. format := Displays.color565; unit := 10000
  12. END Init;
  13. PROCEDURE Transfer*(VAR buf: ARRAY OF CHAR; ofs, stride, x, y, w, h, op: LONGINT);
  14. END Transfer;
  15. PROCEDURE Fill*(col, x, y, w, h: LONGINT);
  16. END Fill;
  17. PROCEDURE Dot*(col, x, y: LONGINT);
  18. END Dot;
  19. PROCEDURE Mask*(VAR buf: ARRAY OF CHAR; bitofs, stride, fg, bg, x, y, w, h: LONGINT);
  20. END Mask;
  21. PROCEDURE Copy*(sx, sy, w, h, dx, dy: LONGINT);
  22. END Copy;
  23. END Display;
  24. PROCEDURE Install*;
  25. VAR d: Display; res: WORD;
  26. BEGIN
  27. NEW(d); d.desc := "Null display driver";
  28. Displays.registry.Add(d, res);
  29. ASSERT(res = 0);
  30. IF Trace THEN
  31. KernelLog.Enter; KernelLog.String("Null display driver"); KernelLog.Exit
  32. END
  33. END Install;
  34. BEGIN
  35. Install
  36. END DisplayNull.