(define-boxed Color
  (in-module "Pango")
  (c-name "PangoColor")
  (gtype-id "PANGO_TYPE_COLOR")
  (copy-func "pango_color_copy")
  (release-func "pango_color_free")
  (fields
    '("guint16" "red")
    '("guint16" "green")
    '("guint16" "blue")
  )
)

(define-method copy
  (of-object "PangoColor")
  (c-name "pango_color_copy")
  (return-type "PangoColor*")
)

(define-method free
  (of-object "PangoColor")
  (c-name "pango_color_free")
  (return-type "none")
)

(define-method color_parse
  (of-object "PangoColor")
  (c-name "pango_color_parse")
  (return-type "gboolean")
  (parameters
    '("const-char*" "spec")
  )
)

(define-method to_string
  (of-object "PangoColor")
  (c-name "pango_color_to_string")
  (caller-owns-return #t)
  (return-type "gchar*")
)

