GListStore.def 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. DEFINITION MODULE FOR "C" GListStore ;
  2. (*
  3. m2-GTK4 - GListStore: a simple in-memory GListModel backed by an
  4. array. Mapped onto <gio/gliststore.h>.
  5. Create it with the GType of the items it will hold, e.g.
  6. gtk_string_object_get_type() for strings or g_object_get_type() for
  7. plain objects. The store takes a reference on each item; the caller
  8. may release its own reference after appending.
  9. Signal: "items-changed" (the GListModel contract). Read the contents
  10. through the GListModel functions (GListModel.def).
  11. *)
  12. FROM SYSTEM IMPORT ADDRESS;
  13. EXPORT UNQUALIFIED
  14. GListStore,
  15. g_list_store_new, g_list_store_append, g_list_store_insert,
  16. g_list_store_remove, g_list_store_remove_all, g_list_store_find;
  17. TYPE
  18. GListStore = ADDRESS;
  19. (* GListStore *g_list_store_new(GType item_type) *)
  20. PROCEDURE g_list_store_new (item_type: LONGCARD) : GListStore;
  21. (* void g_list_store_append(GListStore *store, gpointer item) *)
  22. PROCEDURE g_list_store_append (store: GListStore; item: ADDRESS);
  23. (* void g_list_store_insert(GListStore *store, guint position, gpointer item) *)
  24. PROCEDURE g_list_store_insert (store: GListStore; position: CARDINAL;
  25. item: ADDRESS);
  26. (* void g_list_store_remove(GListStore *store, guint position) *)
  27. PROCEDURE g_list_store_remove (store: GListStore; position: CARDINAL);
  28. (* void g_list_store_remove_all(GListStore *store) *)
  29. PROCEDURE g_list_store_remove_all (store: GListStore);
  30. (* gboolean g_list_store_find(GListStore *store, gpointer item, guint *position) *)
  31. PROCEDURE g_list_store_find (store: GListStore; item: ADDRESS;
  32. VAR position: CARDINAL) : [ INTEGER ];
  33. END GListStore.