testgtk.pp 503 B

123456789101112131415161718192021
  1. {$mode objfpc}
  2. program TestGTK;
  3. uses SysUtils, classes, FPgtk, FPgtkExt, lister;
  4. begin
  5. try
  6. writeln ('Creating application');
  7. application := TFPgtkApplication.Create;
  8. writeln ('Setting mainwindow');
  9. application.MainWindow := TlistWindow.Create;
  10. writeln ('Running GTK');
  11. application.Run;
  12. writeln ('Everything Closed');
  13. application.Free;
  14. writeln ('Cleaned up everything');
  15. except
  16. on e : Exception do
  17. writeln ('UNEXPECTED ERORR: ',e.message);
  18. end;
  19. end.