GFile.def 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. DEFINITION MODULE FOR "C" GFile ;
  2. (*
  3. m2-GTK4 - GFile: an abstract file handle (local path or URI).
  4. Mapped onto <gio/gfile.h>.
  5. GFile is an interface; the functions here are the static
  6. constructors and accessors. g_file_get_basename(), g_file_get_path()
  7. and g_file_get_uri() return newly allocated strings that must be
  8. released with GLib.g_free(). A GFile is a GObject: release it with
  9. GObject.g_object_unref().
  10. *)
  11. FROM SYSTEM IMPORT ADDRESS;
  12. EXPORT UNQUALIFIED
  13. GFile,
  14. g_file_new_for_path, g_file_new_for_uri,
  15. g_file_get_basename, g_file_get_path, g_file_get_uri,
  16. g_file_query_exists, g_file_delete;
  17. TYPE
  18. GFile = ADDRESS;
  19. (* GFile *g_file_new_for_path(const char *path) *)
  20. PROCEDURE g_file_new_for_path (path: ARRAY OF CHAR) : GFile;
  21. (* GFile *g_file_new_for_uri(const char *uri) *)
  22. PROCEDURE g_file_new_for_uri (uri: ARRAY OF CHAR) : GFile;
  23. (* char *g_file_get_basename(GFile *file) *)
  24. PROCEDURE g_file_get_basename (file: GFile) : ADDRESS;
  25. (* char *g_file_get_path(GFile *file) *)
  26. PROCEDURE g_file_get_path (file: GFile) : ADDRESS;
  27. (* char *g_file_get_uri(GFile *file) *)
  28. PROCEDURE g_file_get_uri (file: GFile) : ADDRESS;
  29. (* gboolean g_file_query_exists(GFile *file, GCancellable *cancellable) *)
  30. PROCEDURE g_file_query_exists (file: GFile; cancellable: ADDRESS) : [ INTEGER ];
  31. (* gboolean g_file_delete(GFile *file, GCancellable *cancellable, GError **error) *)
  32. PROCEDURE g_file_delete (file: GFile; cancellable: ADDRESS;
  33. error: ADDRESS) : [ INTEGER ];
  34. END GFile.