;; -*- scheme -*-

; interface definitions ...

(define-interface AppInfo
  (in-module "gio")
  (c-name "GAppInfo")
  (gtype-id "G_TYPE_APP_INFO")
)

(define-interface AsyncResult
  (in-module "gio")
  (c-name "GAsyncResult")
  (gtype-id "G_TYPE_ASYNC_RESULT")
)

(define-interface Drive
  (in-module "gio")
  (c-name "GDrive")
  (gtype-id "G_TYPE_DRIVE")
)

(define-interface File
  (docstring
"File(arg, path=None, uri=None) -> gio.File subclass\n"
"\n"
"If arg is specified; creates a GFile with the given argument from the\n"
"command line.  The value of arg can be either a URI, an absolute path\n"
"or a relative path resolved relative to the current working directory.\n"
"If path is specified, create a file from an absolute or relative path.\n"
"If uri is specified, create a file from a URI.\n\n"
"This operation never fails, but the returned object might not \n"
"support any I/O operation if arg points to a malformed path.")
  (in-module "gio")
  (c-name "GFile")
  (gtype-id "G_TYPE_FILE")
)

(define-interface Icon
  (in-module "gio")
  (c-name "GIcon")
  (gtype-id "G_TYPE_ICON")
)

(define-interface LoadableIcon
  (in-module "gio")
  (c-name "GLoadableIcon")
  (gtype-id "G_TYPE_LOADABLE_ICON")
)

(define-interface Mount
  (in-module "gio")
  (c-name "GMount")
  (gtype-id "G_TYPE_MOUNT")
)

(define-interface Seekable
  (in-module "gio")
  (c-name "GSeekable")
  (gtype-id "G_TYPE_SEEKABLE")
)

(define-interface Volume
  (in-module "gio")
  (c-name "GVolume")
  (gtype-id "G_TYPE_VOLUME")
)


; object definitions ...

(define-object AppLaunchContext
  (in-module "gio")
  (parent "GObject")
  (c-name "GAppLaunchContext")
  (gtype-id "G_TYPE_APP_LAUNCH_CONTEXT")
)

(define-object Cancellable
  (in-module "gio")
  (parent "GObject")
  (c-name "GCancellable")
  (gtype-id "G_TYPE_CANCELLABLE")
)

(define-object FileEnumerator
  (in-module "gio")
  (parent "GObject")
  (c-name "GFileEnumerator")
  (gtype-id "G_TYPE_FILE_ENUMERATOR")
)

(define-object FileInfo
  (in-module "gio")
  (parent "GObject")
  (c-name "GFileInfo")
  (gtype-id "G_TYPE_FILE_INFO")
)

(define-object FileMonitor
  (in-module "gio")
  (parent "GObject")
  (c-name "GFileMonitor")
  (gtype-id "G_TYPE_FILE_MONITOR")
)

(define-object InputStream
  (in-module "gio")
  (parent "GObject")
  (c-name "GInputStream")
  (gtype-id "G_TYPE_INPUT_STREAM")
)

(define-object FileInputStream
  (in-module "gio")
  (parent "GInputStream")
  (c-name "GFileInputStream")
  (gtype-id "G_TYPE_FILE_INPUT_STREAM")
)

(define-object FilterInputStream
  (in-module "gio")
  (parent "GInputStream")
  (c-name "GFilterInputStream")
  (gtype-id "G_TYPE_FILTER_INPUT_STREAM")
)

(define-object BufferedInputStream
  (in-module "gio")
  (parent "GFilterInputStream")
  (c-name "GBufferedInputStream")
  (gtype-id "G_TYPE_BUFFERED_INPUT_STREAM")
)

(define-object DataInputStream
  (in-module "gio")
  (parent "GFilterInputStream")
  (c-name "GDataInputStream")
  (gtype-id "G_TYPE_DATA_INPUT_STREAM")
)

(define-object MemoryInputStream
  (in-module "gio")
  (parent "GInputStream")
  (c-name "GMemoryInputStream")
  (gtype-id "G_TYPE_MEMORY_INPUT_STREAM")
)

(define-object MountOperation
  (in-module "gio")
  (parent "GObject")
  (c-name "GMountOperation")
  (gtype-id "G_TYPE_MOUNT_OPERATION")
)

(define-object OutputStream
  (in-module "gio")
  (parent "GObject")
  (c-name "GOutputStream")
  (gtype-id "G_TYPE_OUTPUT_STREAM")
)

(define-object MemoryOutputStream
  (in-module "gio")
  (parent "GOutputStream")
  (c-name "GMemoryOutputStream")
  (gtype-id "G_TYPE_MEMORY_OUTPUT_STREAM")
)

(define-object FilterOutputStream
  (in-module "gio")
  (parent "GOutputStream")
  (c-name "GFilterOutputStream")
  (gtype-id "G_TYPE_FILTER_OUTPUT_STREAM")
)

(define-object DataOutputStream
  (in-module "gio")
  (parent "GFilterOutputStream")
  (c-name "GDataOutputStream")
  (gtype-id "G_TYPE_DATA_OUTPUT_STREAM")
)

(define-object FileOutputStream
  (in-module "gio")
  (parent "GOutputStream")
  (c-name "GFileOutputStream")
  (gtype-id "G_TYPE_FILE_OUTPUT_STREAM")
)

(define-object SimpleAsyncResult
  (in-module "gio")
  (parent "GObject")
  (c-name "GSimpleAsyncResult")
  (gtype-id "G_TYPE_SIMPLE_ASYNC_RESULT")
)

(define-object Vfs
  (in-module "gio")
  (parent "GObject")
  (c-name "GVfs")
  (gtype-id "G_TYPE_VFS")
)

(define-object VolumeMonitor
  (in-module "gio")
  (parent "GObject")
  (c-name "GVolumeMonitor")
  (gtype-id "G_TYPE_VOLUME_MONITOR")
)

(define-object NativeVolumeMonitor
  (in-module "gio")
  (parent "GVolumeMonitor")
  (c-name "GNativeVolumeMonitor")
  (gtype-id "G_TYPE_NATIVE_VOLUME_MONITOR")
)

(define-object FileIcon
  (in-module "gio")
  (parent "GObject")
  (c-name "GFileIcon")
  (gtype-id "G_TYPE_FILE_ICON")
  (implements "GIcon")
  (implements "GLoadableIcon")
)

(define-object ThemedIcon
  (in-module "gio")
  (parent "GObject")
  (c-name "GThemedIcon")
  (gtype-id "G_TYPE_THEMED_ICON")
  (implements "GIcon")
)

;; Enumerations and flags ...

(define-flags AppInfoCreateFlags
  (in-module "gio")
  (c-name "GAppInfoCreateFlags")
  (gtype-id "G_TYPE_APP_INFO_CREATE_FLAGS")
  (values
    '("one" "G_APP_INFO_CREATE_NONE")
    '("eeds-terminal" "G_APP_INFO_CREATE_NEEDS_TERMINAL")
  )
)

(define-enum DataStreamByteOrder
  (in-module "gio")
  (c-name "GDataStreamByteOrder")
  (gtype-id "G_TYPE_DATA_STREAM_BYTE_ORDER")
  (values
    '("big-endian" "G_DATA_STREAM_BYTE_ORDER_BIG_ENDIAN")
    '("little-endian" "G_DATA_STREAM_BYTE_ORDER_LITTLE_ENDIAN")
    '("host-endian" "G_DATA_STREAM_BYTE_ORDER_HOST_ENDIAN")
  )
)

(define-enum DataStreamNewlineType
  (in-module "gio")
  (c-name "GDataStreamNewlineType")
  (gtype-id "G_TYPE_DATA_STREAM_NEWLINE_TYPE")
  (values
    '("lf" "G_DATA_STREAM_NEWLINE_TYPE_LF")
    '("cr" "G_DATA_STREAM_NEWLINE_TYPE_CR")
    '("cr-lf" "G_DATA_STREAM_NEWLINE_TYPE_CR_LF")
    '("any" "G_DATA_STREAM_NEWLINE_TYPE_ANY")
  )
)

(define-enum FileAttributeType
  (in-module "gio")
  (c-name "GFileAttributeType")
  (gtype-id "G_TYPE_FILE_ATTRIBUTE_TYPE")
  (values
    '("invalid" "G_FILE_ATTRIBUTE_TYPE_INVALID")
    '("string" "G_FILE_ATTRIBUTE_TYPE_STRING")
    '("byte-string" "G_FILE_ATTRIBUTE_TYPE_BYTE_STRING")
    '("boolean" "G_FILE_ATTRIBUTE_TYPE_BOOLEAN")
    '("uint32" "G_FILE_ATTRIBUTE_TYPE_UINT32")
    '("int32" "G_FILE_ATTRIBUTE_TYPE_INT32")
    '("uint64" "G_FILE_ATTRIBUTE_TYPE_UINT64")
    '("int64" "G_FILE_ATTRIBUTE_TYPE_INT64")
    '("object" "G_FILE_ATTRIBUTE_TYPE_OBJECT")
  )
)

(define-flags FileAttributeInfoFlags
  (in-module "gio")
  (c-name "GFileAttributeInfoFlags")
  (gtype-id "G_TYPE_FILE_ATTRIBUTE_INFO_FLAGS")
  (values
    '("none" "G_FILE_ATTRIBUTE_INFO_NONE")
    '("copy-with-file" "G_FILE_ATTRIBUTE_INFO_COPY_WITH_FILE")
    '("copy-when-moved" "G_FILE_ATTRIBUTE_INFO_COPY_WHEN_MOVED")
  )
)

(define-enum FileAttributeStatus
  (in-module "gio")
  (c-name "GFileAttributeStatus")
  (gtype-id "G_TYPE_FILE_ATTRIBUTE_STATUS")
  (values
    '("unset" "G_FILE_ATTRIBUTE_STATUS_UNSET")
    '("set" "G_FILE_ATTRIBUTE_STATUS_SET")
    '("error-setting" "G_FILE_ATTRIBUTE_STATUS_ERROR_SETTING")
  )
)

(define-flags FileQueryInfoFlags
  (in-module "gio")
  (c-name "GFileQueryInfoFlags")
  (gtype-id "G_TYPE_FILE_QUERY_INFO_FLAGS")
  (values
    '("ne" "G_FILE_QUERY_INFO_NONE")
    '("follow-symlinks" "G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS")
  )
)

(define-flags FileCreateFlags
  (in-module "gio")
  (c-name "GFileCreateFlags")
  (gtype-id "G_TYPE_FILE_CREATE_FLAGS")
  (values
    '("none" "G_FILE_CREATE_NONE")
    '("private" "G_FILE_CREATE_PRIVATE")
  )
)

(define-flags MountUnmountFlags
  (in-module "gio")
  (c-name "GMountUnmountFlags")
  (gtype-id "G_TYPE_MOUNT_UNMOUNT_FLAGS")
  (values
    '("none" "G_MOUNT_UNMOUNT_NONE")
    '("force" "G_MOUNT_UNMOUNT_FORCE")
  )
)

(define-flags FileCopyFlags
  (in-module "gio")
  (c-name "GFileCopyFlags")
  (gtype-id "G_TYPE_FILE_COPY_FLAGS")
  (values
    '("none" "G_FILE_COPY_NONE")
    '("overwrite" "G_FILE_COPY_OVERWRITE")
    '("backup" "G_FILE_COPY_BACKUP")
    '("nofollow-symlinks" "G_FILE_COPY_NOFOLLOW_SYMLINKS")
    '("all-metadata" "G_FILE_COPY_ALL_METADATA")
    '("no-fallback-for-move" "G_FILE_COPY_NO_FALLBACK_FOR_MOVE")
  )
)

(define-flags FileMonitorFlags
  (in-module "gio")
  (c-name "GFileMonitorFlags")
  (gtype-id "G_TYPE_FILE_MONITOR_FLAGS")
  (values
    '("none" "G_FILE_MONITOR_NONE")
    '("watch-mounts" "G_FILE_MONITOR_WATCH_MOUNTS")
  )
)

(define-enum FileType
  (in-module "gio")
  (c-name "GFileType")
  (gtype-id "G_TYPE_FILE_TYPE")
  (values
    '("unknown" "G_FILE_TYPE_UNKNOWN")
    '("regular" "G_FILE_TYPE_REGULAR")
    '("directory" "G_FILE_TYPE_DIRECTORY")
    '("symbolic-link" "G_FILE_TYPE_SYMBOLIC_LINK")
    '("special" "G_FILE_TYPE_SPECIAL")
    '("shortcut" "G_FILE_TYPE_SHORTCUT")
    '("mountable" "G_FILE_TYPE_MOUNTABLE")
  )
)

(define-enum FileMonitorEvent
  (in-module "gio")
  (c-name "GFileMonitorEvent")
  (gtype-id "G_TYPE_FILE_MONITOR_EVENT")
  (values
    '("changed" "G_FILE_MONITOR_EVENT_CHANGED")
    '("changes-done-hint" "G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT")
    '("deleted" "G_FILE_MONITOR_EVENT_DELETED")
    '("created" "G_FILE_MONITOR_EVENT_CREATED")
    '("attribute-changed" "G_FILE_MONITOR_EVENT_ATTRIBUTE_CHANGED")
    '("pre-unmount" "G_FILE_MONITOR_EVENT_PRE_UNMOUNT")
    '("unmounted" "G_FILE_MONITOR_EVENT_UNMOUNTED")
  )
)

(define-enum ErrorEnum
  (in-module "gio")
  (c-name "GIOErrorEnum")
  (gtype-id "G_TYPE_IO_ERROR_ENUM")
  (values
    '("failed" "G_IO_ERROR_FAILED")
    '("not-found" "G_IO_ERROR_NOT_FOUND")
    '("exists" "G_IO_ERROR_EXISTS")
    '("is-directory" "G_IO_ERROR_IS_DIRECTORY")
    '("not-directory" "G_IO_ERROR_NOT_DIRECTORY")
    '("not-empty" "G_IO_ERROR_NOT_EMPTY")
    '("not-regular-file" "G_IO_ERROR_NOT_REGULAR_FILE")
    '("not-symbolic-link" "G_IO_ERROR_NOT_SYMBOLIC_LINK")
    '("not-mountable-file" "G_IO_ERROR_NOT_MOUNTABLE_FILE")
    '("filename-too-long" "G_IO_ERROR_FILENAME_TOO_LONG")
    '("invalid-filename" "G_IO_ERROR_INVALID_FILENAME")
    '("too-many-links" "G_IO_ERROR_TOO_MANY_LINKS")
    '("no-space" "G_IO_ERROR_NO_SPACE")
    '("invalid-argument" "G_IO_ERROR_INVALID_ARGUMENT")
    '("permission-denied" "G_IO_ERROR_PERMISSION_DENIED")
    '("not-supported" "G_IO_ERROR_NOT_SUPPORTED")
    '("not-mounted" "G_IO_ERROR_NOT_MOUNTED")
    '("already-mounted" "G_IO_ERROR_ALREADY_MOUNTED")
    '("closed" "G_IO_ERROR_CLOSED")
    '("cancelled" "G_IO_ERROR_CANCELLED")
    '("pending" "G_IO_ERROR_PENDING")
    '("read-only" "G_IO_ERROR_READ_ONLY")
    '("cant-create-backup" "G_IO_ERROR_CANT_CREATE_BACKUP")
    '("wrong-etag" "G_IO_ERROR_WRONG_ETAG")
    '("timed-out" "G_IO_ERROR_TIMED_OUT")
    '("would-recurse" "G_IO_ERROR_WOULD_RECURSE")
    '("busy" "G_IO_ERROR_BUSY")
    '("would-block" "G_IO_ERROR_WOULD_BLOCK")
    '("host-not-found" "G_IO_ERROR_HOST_NOT_FOUND")
    '("would-merge" "G_IO_ERROR_WOULD_MERGE")
    '("failed-handled" "G_IO_ERROR_FAILED_HANDLED")
  )
)

(define-flags AskPasswordFlags
  (in-module "gio")
  (c-name "GAskPasswordFlags")
  (gtype-id "G_TYPE_ASK_PASSWORD_FLAGS")
  (values
    '("need-password" "G_ASK_PASSWORD_NEED_PASSWORD")
    '("need-username" "G_ASK_PASSWORD_NEED_USERNAME")
    '("need-domain" "G_ASK_PASSWORD_NEED_DOMAIN")
    '("saving-supported" "G_ASK_PASSWORD_SAVING_SUPPORTED")
    '("anonymous-supported" "G_ASK_PASSWORD_ANONYMOUS_SUPPORTED")
  )
)

(define-enum PasswordSave
  (in-module "gio")
  (c-name "GPasswordSave")
  (gtype-id "G_TYPE_PASSWORD_SAVE")
  (values
    '("never" "G_PASSWORD_SAVE_NEVER")
    '("for-session" "G_PASSWORD_SAVE_FOR_SESSION")
    '("permanently" "G_PASSWORD_SAVE_PERMANENTLY")
  )
)

(define-enum MountOperationResult
  (in-module "gio")
  (c-name "GMountOperationResult")
  (gtype-id "G_TYPE_MOUNT_OPERATION_RESULT")
  (values
    '("handled" "G_MOUNT_OPERATION_HANDLED")
    '("aborted" "G_MOUNT_OPERATION_ABORTED")
    '("unhandled" "G_MOUNT_OPERATION_UNHANDLED")
  )
)

(define-flags OutputStreamSpliceFlags
  (in-module "gio")
  (c-name "GOutputStreamSpliceFlags")
  (gtype-id "G_TYPE_OUTPUT_STREAM_SPLICE_FLAGS")
  (values
    '("none" "G_OUTPUT_STREAM_SPLICE_NONE")
    '("close-source" "G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE")
    '("close-target" "G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET")
  )
)
