Graphene.def 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. DEFINITION MODULE FOR "C" Graphene ;
  2. (*
  3. m2-GTK4 - Graphene geometry value types. Mapped onto <graphene.h>.
  4. These are plain by-value structs, used by GtkSnapshot and
  5. GtkConstraintGuide. The init helpers return a pointer to the struct
  6. (ignored here); pass the VAR record directly.
  7. *)
  8. FROM SYSTEM IMPORT ADDRESS;
  9. EXPORT UNQUALIFIED
  10. GraphenePoint, GraphenePoint3D, GrapheneSize, GrapheneRect,
  11. GrapheneMatrix,
  12. graphene_point_init, graphene_size_init, graphene_rect_init;
  13. TYPE
  14. GraphenePoint = RECORD
  15. x, y: SHORTREAL;
  16. END;
  17. GraphenePoint3D = RECORD
  18. x, y, z: SHORTREAL;
  19. END;
  20. GrapheneSize = RECORD
  21. width, height: SHORTREAL;
  22. END;
  23. GrapheneRect = RECORD
  24. origin: GraphenePoint;
  25. size: GrapheneSize;
  26. END;
  27. GrapheneMatrix = RECORD
  28. xx, yx, xy, yy, x0, y0: SHORTREAL;
  29. END;
  30. (* graphene_point_t *graphene_point_init(graphene_point_t *p,
  31. float x, float y) *)
  32. PROCEDURE graphene_point_init (VAR p: GraphenePoint; x, y: SHORTREAL) : [ ADDRESS ];
  33. (* graphene_size_t *graphene_size_init(graphene_size_t *s,
  34. float width, float height) *)
  35. PROCEDURE graphene_size_init (VAR s: GrapheneSize;
  36. width, height: SHORTREAL) : [ ADDRESS ];
  37. (* graphene_rect_t *graphene_rect_init(graphene_rect_t *r, float x, float y,
  38. float width, float height) *)
  39. PROCEDURE graphene_rect_init (VAR r: GrapheneRect; x, y, width, height: SHORTREAL) : [ ADDRESS ];
  40. END Graphene.