tvg.def 950 B

1234567891011121314151617181920212223242526
  1. DEFINITION MODULE tvg;
  2. (* tigr graphics backend for the tv toolkit.
  3. It drives the same view tree into an off-screen tigr bitmap instead of an
  4. ANSI terminal: tv keeps building the cell buffer, tvg renders those cells
  5. with tigr's font and turns tigr input into tv events. Only programs that
  6. call InitGfx need to link tigr/OpenGL; the terminal apps stay tigr-free.
  7. Build (from the tvision-m2 directory):
  8. gm2 -fiso -I. -I../modula2 -c tvg.mod
  9. Link an application with:
  10. ... tv.o tvg.o ../modula2/tigr.o ../modula2/helper.o -lGL -lX11
  11. *)
  12. FROM tv IMPORT Event;
  13. PROCEDURE InitGfx (title : ARRAY OF CHAR; cols, rows : INTEGER) : BOOLEAN;
  14. PROCEDURE Done;
  15. PROCEDURE Finish; (* tv.DrawTree + blit to the window *)
  16. PROCEDURE ReadEvent (VAR e : Event) : BOOLEAN;
  17. PROCEDURE Closed () : BOOLEAN; (* window close / Esc requested *)
  18. PROCEDURE CellW () : INTEGER;
  19. PROCEDURE CellH () : INTEGER;
  20. END tvg.