;; -*- scheme -*-

(include "unix-types.defs")

;; From gdesktopappinfo.h

(define-function desktop_app_info_get_type
  (c-name "g_desktop_app_info_get_type")
  (return-type "GType")
)

(define-function desktop_app_info_new_from_filename
  (c-name "g_desktop_app_info_new_from_filename")
  (return-type "GDesktopAppInfo*")
  (parameters
    '("const-char*" "filename")
  )
)

(define-function g_desktop_app_info_new_from_keyfile
  (c-name "g_desktop_app_info_new_from_keyfile")
  (return-type "GDesktopAppInfo*")
  (parameters
    '("GKeyFile*" "key_file")
  )
)

(define-function desktop_app_info_new
  (c-name "g_desktop_app_info_new")
  (is-constructor-of "GDesktopAppInfo")
  (return-type "GDesktopAppInfo*")
  (parameters
    '("const-char*" "desktop_id")
  )
)

(define-method get_is_hidden
  (of-object "GDesktopAppInfo")
  (c-name "g_desktop_app_info_get_is_hidden")
  (return-type "gboolean")
)

(define-function desktop_app_info_set_desktop_env
  (c-name "g_desktop_app_info_set_desktop_env")
  (return-type "none")
  (parameters
    '("const-char*" "desktop_env")
  )
)

;; From gunixmount.h



;; From gunixmounts.h

(define-function unix_mount_free
  (c-name "g_unix_mount_free")
  (return-type "none")
  (parameters
    '("GUnixMountEntry*" "mount_entry")
  )
)

(define-method free
  (of-object "GUnixMountPoint")
  (c-name "g_unix_mount_point_free")
  (return-type "none")
)

(define-function unix_mount_compare
  (c-name "g_unix_mount_compare")
  (return-type "gint")
  (parameters
    '("GUnixMountEntry*" "mount1")
    '("GUnixMountEntry*" "mount2")
  )
)

(define-function unix_mount_get_mount_path
  (c-name "g_unix_mount_get_mount_path")
  (return-type "const-char*")
  (parameters
    '("GUnixMountEntry*" "mount_entry")
  )
)

(define-function unix_mount_get_device_path
  (c-name "g_unix_mount_get_device_path")
  (return-type "const-char*")
  (parameters
    '("GUnixMountEntry*" "mount_entry")
  )
)

(define-function unix_mount_get_fs_type
  (c-name "g_unix_mount_get_fs_type")
  (return-type "const-char*")
  (parameters
    '("GUnixMountEntry*" "mount_entry")
  )
)

(define-function unix_mount_is_readonly
  (c-name "g_unix_mount_is_readonly")
  (return-type "gboolean")
  (parameters
    '("GUnixMountEntry*" "mount_entry")
  )
)

(define-function unix_mount_is_system_internal
  (c-name "g_unix_mount_is_system_internal")
  (return-type "gboolean")
  (parameters
    '("GUnixMountEntry*" "mount_entry")
  )
)

(define-function unix_mount_guess_can_eject
  (c-name "g_unix_mount_guess_can_eject")
  (return-type "gboolean")
  (parameters
    '("GUnixMountEntry*" "mount_entry")
  )
)

(define-function unix_mount_guess_should_display
  (c-name "g_unix_mount_guess_should_display")
  (return-type "gboolean")
  (parameters
    '("GUnixMountEntry*" "mount_entry")
  )
)

(define-function unix_mount_guess_name
  (c-name "g_unix_mount_guess_name")
  (return-type "char*")
  (parameters
    '("GUnixMountEntry*" "mount_entry")
  )
)

(define-function unix_mount_guess_icon
  (c-name "g_unix_mount_guess_icon")
  (return-type "GIcon*")
  (parameters
    '("GUnixMountEntry*" "mount_entry")
  )
)

(define-method compare
  (of-object "GUnixMountPoint")
  (c-name "g_unix_mount_point_compare")
  (return-type "gint")
  (parameters
    '("GUnixMountPoint*" "mount2")
  )
)

(define-method get_mount_path
  (of-object "GUnixMountPoint")
  (c-name "g_unix_mount_point_get_mount_path")
  (return-type "const-char*")
)

(define-method get_device_path
  (of-object "GUnixMountPoint")
  (c-name "g_unix_mount_point_get_device_path")
  (return-type "const-char*")
)

(define-method get_fs_type
  (of-object "GUnixMountPoint")
  (c-name "g_unix_mount_point_get_fs_type")
  (return-type "const-char*")
)

(define-method is_readonly
  (of-object "GUnixMountPoint")
  (c-name "g_unix_mount_point_is_readonly")
  (return-type "gboolean")
)

(define-method is_user_mountable
  (of-object "GUnixMountPoint")
  (c-name "g_unix_mount_point_is_user_mountable")
  (return-type "gboolean")
)

(define-method is_loopback
  (of-object "GUnixMountPoint")
  (c-name "g_unix_mount_point_is_loopback")
  (return-type "gboolean")
)

(define-method guess_can_eject
  (of-object "GUnixMountPoint")
  (c-name "g_unix_mount_point_guess_can_eject")
  (return-type "gboolean")
)

(define-method guess_name
  (of-object "GUnixMountPoint")
  (c-name "g_unix_mount_point_guess_name")
  (return-type "char*")
)

(define-method guess_icon
  (of-object "GUnixMountPoint")
  (c-name "g_unix_mount_point_guess_icon")
  (return-type "GIcon*")
)

(define-function unix_mount_points_get
  (c-name "g_unix_mount_points_get")
  (return-type "GList*")
  (parameters
    '("guint64*" "time_read")
  )
)

(define-function unix_mounts_get
  (c-name "g_unix_mounts_get")
  (return-type "GList*")
  (parameters
    '("guint64*" "time_read")
  )
)

(define-function unix_mount_at
  (c-name "g_unix_mount_at")
  (return-type "GUnixMountEntry*")
  (parameters
    '("const-char*" "mount_path")
    '("guint64*" "time_read")
  )
)

(define-function unix_mounts_changed_since
  (c-name "g_unix_mounts_changed_since")
  (return-type "gboolean")
  (parameters
    '("guint64" "time")
  )
)

(define-function unix_mount_points_changed_since
  (c-name "g_unix_mount_points_changed_since")
  (return-type "gboolean")
  (parameters
    '("guint64" "time")
  )
)

(define-function unix_mount_monitor_get_type
  (c-name "g_unix_mount_monitor_get_type")
  (return-type "GType")
)

(define-function unix_mount_monitor_new
  (c-name "g_unix_mount_monitor_new")
  (is-constructor-of "GUnixMountMonitor")
  (return-type "GUnixMountMonitor*")
)

(define-method set_rate_limit
  (of-object "GUnixMountMonitor")
  (c-name "g_unix_mount_monitor_set_rate_limit")
  (return-type "none")
  (parameters
    '("int" "limit_msec")
  )
)

(define-function unix_is_mount_path_system_internal
  (c-name "g_unix_is_mount_path_system_internal")
  (return-type "gboolean")
  (parameters
    '("const-char*" "mount_path")
  )
)



;; From gunixinputstream.h

(define-function unix_input_stream_get_type
  (c-name "g_unix_input_stream_get_type")
  (return-type "GType")
)

(define-function unix_input_stream_new
  (c-name "g_unix_input_stream_new")
  (is-constructor-of "GUnixInputStream")
  (return-type "GInputStream*")
  (parameters
    '("int" "fd")
    '("gboolean" "close_fd_at_close")
  )
)

(define-method set_close_fd
  (of-object "GUnixInputStream")
  (c-name "g_unix_input_stream_set_close_fd")
  (return-type "none")
  (parameters
    '("gboolean" "close_fd")
  )
)

(define-method get_close_fd
  (of-object "GUnixInputStream")
  (c-name "g_unix_input_stream_get_close_fd")
  (return-type "gboolean")
)

(define-method get_fd
  (of-object "GUnixInputStream")
  (c-name "g_unix_input_stream_get_fd")
  (return-type "gint")
)



;; From gunixoutputstream.h

(define-function unix_output_stream_get_type
  (c-name "g_unix_output_stream_get_type")
  (return-type "GType")
)

(define-function unix_output_stream_new
  (c-name "g_unix_output_stream_new")
  (is-constructor-of "GUnixOutputStream")
  (return-type "GOutputStream*")
  (parameters
    '("int" "fd")
    '("gboolean" "close_fd_at_close")
  )
)

(define-method set_close_fd
  (of-object "GUnixOutputStream")
  (c-name "g_unix_output_stream_set_close_fd")
  (return-type "none")
  (parameters
    '("gboolean" "close_fd")
  )
)

(define-method get_close_fd
  (of-object "GUnixOutputStream")
  (c-name "g_unix_output_stream_get_close_fd")
  (return-type "gboolean")
)

(define-method get_fd
  (of-object "GUnixOutputStream")
  (c-name "g_unix_output_stream_get_fd")
  (return-type "gint")
)
