;; -*- scheme -*-
; vim:syntax=scheme:sw=2

(define-function dia_point_get_type
  (in-module "DiaGeometry")
  (c-name "dia_point_get_type")
  (return-type "GType")
)

(define-function dia_rectangle_get_type
  (in-module "DiaGeometry")
  (c-name "dia_rectangle_get_type")
  (return-type "GType")
)

(define-function rectangle_add_point
  (in-module "DiaGeometry")
  (c-name "dia_rectangle_add_point")
  (return-type "DiaRectangle*")
  (parameters
    '("DiaRectangle*" "rect")
    '("DiaPoint*" "p")
  )
)

(define-function distance_point_point
  (in-module "DiaGeometry")
  (c-name "dia_distance_point_point")
  (return-type "gdouble")
  (parameters
    '("DiaPoint*" "p1")
    '("DiaPoint*" "p2")
  )
)

(define-function distance_point_point_manhattan
  (in-module "DiaGeometry")
  (c-name "dia_distance_point_point_manhattan")
  (return-type "gdouble")
  (parameters
    '("DiaPoint*" "p1")
    '("DiaPoint*" "p2")
  )
)

(define-function distance_rectangle_point
  (in-module "DiaGeometry")
  (c-name "dia_distance_rectangle_point")
  (return-type "gdouble")
  (parameters
    '("DiaRectangle*" "rect")
    '("DiaPoint*" "point")
  )
)

(define-function distance_line_point
  (in-module "DiaGeometry")
  (c-name "dia_distance_line_point")
  (return-type ("gdouble" "DiaPoint*"))
  (parameters
    '("DiaPoint*" "line_start")
    '("DiaPoint*" "line_end")
    '("DiaPoint*" "point")
    '("gdouble" "line_width")
    '("DiaCapStyle" "style")
  )
)

(define-function intersection_line_line
  (in-module "DiaGeometry")
  (c-name "dia_intersection_line_line")
  (return-type "DiaPoint*")
  (parameters
    '("DiaPoint*" "start1")
    '("DiaPoint*" "end1")
    '("DiaPoint*" "start2")
    '("DiaPoint*" "end2")
  )
)

(define-function intersection_line_rectangle
  (in-module "DiaGeometry")
  (c-name "dia_intersection_line_rectangle")
  (return-type ("DiaPoint*" "DiaPoint*"))
  (parameters
    '("DiaPoint*" "start")
    '("DiaPoint*" "end")
    '("DiaRectangle*" "rect")
  )
)

(define-function intersection_rectangle_rectangle
  (in-module "DiaGeometry")
  (c-name "dia_intersection_rectangle_rectangle")
  (return-type "gboolean")
  (parameters
    '("DiaRectangle*" "r1")
    '("DiaRectangle*" "r2")
  )
)
