;; gobject.ffi				-*- Scheme -*-

;; Copyright (C) 2018 Matthew R. Wette
;;
;; This library is free software; you can redistribute it and/or
;; modify it under the terms of the GNU Lesser General Public
;; License as published by the Free Software Foundation; either
;; version 3 of the License, or (at your option) any later version.
;;
;; This library is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
;; Lesser General Public License for more details.
;;
;; You should have received a copy of the GNU Lesser General Public License
;; along with this library; if not, see <http://www.gnu.org/licenses/>

(define-ffi-module (ffi gobject)
  #:pkg-config "gobject-2.0"
  #:include '("glib-object.h")
  #:inc-filter (lambda (f p) (string-contains p "gobject/" 0))
  #:use-ffi-module (ffi glib)
  ;;#:use-module ((system foreign) #:prefix ffi: #:select(%null-pointer))
  )

(define-public (g_signal_connect instance detailed_signal c_handler data)
  (g_signal_connect_data instance detailed_signal c_handler data NULL 0))

(define-public (g_signal_connect_after instance detailed_signal c_handler data)
  (g_signal_connect_data instance detailed_signal c_handler data NULL
			 'G_CONNECT_AFTER))

(define-public (g_signal_connect_swapped instance detailed_signal c_handler
					 data)
  (g_signal_connect_data instance detailed_signal c_handler data NULL
			 'G_CONNECT_SWAPPED))

;; --- last line ---
