SDLUtils.def 666 B

1234567891011121314151617181920
  1. DEFINITION MODULE SDLUtils ;
  2. (*
  3. m2SDL - small pure-Modula-2 helpers over the FOR "C" bindings.
  4. Copies NUL-terminated C strings (ADDRESS) into Modula-2 CHAR
  5. arrays (NUL-terminated, truncated to the destination length).
  6. DrainEvents pumps the queue and reports whether a quit event
  7. was seen; event type is the leading Uint32 of SDL_Event, read
  8. little-endian (matches x86/x86-64/ARM hosts).
  9. *)
  10. FROM SYSTEM IMPORT ADDRESS;
  11. EXPORT UNQUALIFIED CStrToM2, GetErrorString, DrainEvents;
  12. PROCEDURE CStrToM2 (src: ADDRESS; VAR dst: ARRAY OF CHAR);
  13. PROCEDURE GetErrorString (VAR buf: ARRAY OF CHAR);
  14. PROCEDURE DrainEvents (VAR quit: BOOLEAN);
  15. END SDLUtils.