;; -*- scheme -*-
;; Boxed types
(define-boxed DesktopItem
  (in-module "GnomeDesktopItem")
  (c-name "GnomeDesktopItem")
  (gtype-id "GNOME_TYPE_DESKTOP_ITEM")
  (copy-func "gnome_desktop_item_copy")
  (release-func "gnome_desktop_item_unref")
)

;; Enumerations and flags ...

(define-enum DesktopItemType
  (in-module "Gnome")
  (c-name "GnomeDesktopItemType")
  (values
    '("null" "GNOME_DESKTOP_ITEM_TYPE_NULL")
    '("other" "GNOME_DESKTOP_ITEM_TYPE_OTHER")
    '("application" "GNOME_DESKTOP_ITEM_TYPE_APPLICATION")
    '("link" "GNOME_DESKTOP_ITEM_TYPE_LINK")
    '("fsdevice" "GNOME_DESKTOP_ITEM_TYPE_FSDEVICE")
    '("mime-type" "GNOME_DESKTOP_ITEM_TYPE_MIME_TYPE")
    '("directory" "GNOME_DESKTOP_ITEM_TYPE_DIRECTORY")
    '("service" "GNOME_DESKTOP_ITEM_TYPE_SERVICE")
    '("service-type" "GNOME_DESKTOP_ITEM_TYPE_SERVICE_TYPE")
  )
)

(define-enum DesktopItemStatus
  (in-module "Gnome")
  (c-name "GnomeDesktopItemStatus")
  (values
    '("unchanged" "GNOME_DESKTOP_ITEM_UNCHANGED")
    '("changed" "GNOME_DESKTOP_ITEM_CHANGED")
    '("disappeared" "GNOME_DESKTOP_ITEM_DISAPPEARED")
  )
)

(define-flags DesktopItemLoadFlags
  (in-module "Gnome")
  (c-name "GnomeDesktopItemLoadFlags")
;  (gtype-id "GNOME_DESKTOP_ITEM_TYPE_LOAD_FLAGS")
  (values
    '("only-if-exists" "GNOME_DESKTOP_ITEM_LOAD_ONLY_IF_EXISTS")
    '("no-translations" "GNOME_DESKTOP_ITEM_LOAD_NO_TRANSLATIONS")
  )
)

(define-flags DesktopItemLaunchFlags
  (in-module "Gnome")
  (c-name "GnomeDesktopItemLaunchFlags")
  (values
    '("only-one" "GNOME_DESKTOP_ITEM_LAUNCH_ONLY_ONE")
    '("use-current-dir" "GNOME_DESKTOP_ITEM_LAUNCH_USE_CURRENT_DIR")
    '("append-uris" "GNOME_DESKTOP_ITEM_LAUNCH_APPEND_URIS")
    '("append-paths" "GNOME_DESKTOP_ITEM_LAUNCH_APPEND_PATHS")
  )
)

(define-flags DesktopItemIconFlags
  (in-module "Gnome")
  (c-name "GnomeDesktopItemIconFlags")
  (values
    '("e" "GNOME_DESKTOP_ITEM_ICON_NO_KDE")
  )
)

(define-enum DesktopItemError
  (in-module "Gnome")
  (c-name "GnomeDesktopItemError")
  (values
    '("no-filename" "GNOME_DESKTOP_ITEM_ERROR_NO_FILENAME")
    '("unknown-encoding" "GNOME_DESKTOP_ITEM_ERROR_UNKNOWN_ENCODING")
    '("cannot-open" "GNOME_DESKTOP_ITEM_ERROR_CANNOT_OPEN")
    '("no-exec-string" "GNOME_DESKTOP_ITEM_ERROR_NO_EXEC_STRING")
    '("bad-exec-string" "GNOME_DESKTOP_ITEM_ERROR_BAD_EXEC_STRING")
    '("no-url" "GNOME_DESKTOP_ITEM_ERROR_NO_URL")
    '("not-launchable" "GNOME_DESKTOP_ITEM_ERROR_NOT_LAUNCHABLE")
    '("invalid-type" "GNOME_DESKTOP_ITEM_ERROR_INVALID_TYPE")
  )
)


;; From /home/kikidonk/cvs/gnome/gnome-desktop/libgnome-desktop/libgnome/gnome-desktop-item.h

(define-function gnome_desktop_item_get_type
  (c-name "gnome_desktop_item_get_type")
  (return-type "GType")
)

(define-function gnome_desktop_item_error_quark
  (c-name "gnome_desktop_item_error_quark")
  (return-type "GQuark")
)

(define-function gnome_desktop_item_new
  (c-name "gnome_desktop_item_new")
  (is-constructor-of "GnomeDesktopItem")
  (return-type "GnomeDesktopItem*")
)

(define-function item_new_from_file
  (c-name "gnome_desktop_item_new_from_file")
  (caller-owns-return #t)
  (return-type "GnomeDesktopItem*")
  (parameters
    '("const-char*" "file")
    '("int" "flags")
    '("GError**" "error")
  )
)

(define-function item_new_from_uri
  (c-name "gnome_desktop_item_new_from_uri")
  (return-type "GnomeDesktopItem*")
  (caller-owns-return #t)
  (parameters
    '("const-char*" "uri")
    '("int" "flags")
    '("GError**" "error")
  )
)

(define-function item_new_from_string
  (c-name "gnome_desktop_item_new_from_string")
  (return-type "GnomeDesktopItem*")
  (caller-owns-return #t)
  (parameters
    '("const-char*" "uri")
    '("const-char*" "string")
    '("gssize" "length")
    '("int" "flags")
    '("GError**" "error")
  )
)

(define-function item_new_from_basename
  (c-name "gnome_desktop_item_new_from_basename")
  (return-type "GnomeDesktopItem*")
  (caller-owns-return #t)
  (parameters
    '("const-char*" "basename")
    '("int" "flags")
    '("GError**" "error")
  )
)

(define-method copy
  (of-object "GnomeDesktopItem")
  (c-name "gnome_desktop_item_copy")
  (return-type "GnomeDesktopItem*")
)

(define-method save
  (of-object "GnomeDesktopItem")
  (c-name "gnome_desktop_item_save")
  (return-type "gboolean")
  (parameters
    '("const-char*" "under")
    '("gboolean" "force")
    '("GError**" "error")
  )
)

(define-method ref
  (of-object "GnomeDesktopItem")
  (c-name "gnome_desktop_item_ref")
  (return-type "GnomeDesktopItem*")
)

(define-method unref
  (of-object "GnomeDesktopItem")
  (c-name "gnome_desktop_item_unref")
  (return-type "none")
)

(define-method launch
  (of-object "GnomeDesktopItem")
  (c-name "gnome_desktop_item_launch")
  (return-type "int")
  (parameters
    '("GList*" "file_list")
    '("int" "flags")
    '("GError**" "error")
  )
)

(define-method launch_with_env
  (of-object "GnomeDesktopItem")
  (c-name "gnome_desktop_item_launch_with_env")
  (return-type "int")
  (parameters
    '("GList*" "file_list")
    '("int" "flags")
    '("char**" "envp")
    '("GError**" "error")
  )
)

(define-method launch_on_screen
  (of-object "GnomeDesktopItem")
  (c-name "gnome_desktop_item_launch_on_screen")
  (return-type "int")
  (parameters
    '("GList*" "file_list")
    '("int" "flags")
    '("GdkScreen*" "screen")
    '("int" "workspace")
    '("GError**" "error")
  )
)

(define-method drop_uri_list
  (of-object "GnomeDesktopItem")
  (c-name "gnome_desktop_item_drop_uri_list")
  (return-type "int")
  (parameters
    '("const-char*" "uri_list")
    '("int" "flags")
    '("GError**" "error")
  )
)

(define-method drop_uri_list_with_env
  (of-object "GnomeDesktopItem")
  (c-name "gnome_desktop_item_drop_uri_list_with_env")
  (return-type "int")
  (parameters
    '("const-char*" "uri_list")
    '("int" "flags")
    '("char**" "envp")
    '("GError**" "error")
  )
)

(define-method exists
  (of-object "GnomeDesktopItem")
  (c-name "gnome_desktop_item_exists")
  (return-type "gboolean")
)

(define-method get_entry_type
  (of-object "GnomeDesktopItem")
  (c-name "gnome_desktop_item_get_entry_type")
  (return-type "int")
)

(define-method set_entry_type
  (of-object "GnomeDesktopItem")
  (c-name "gnome_desktop_item_set_entry_type")
  (return-type "none")
  (parameters
    '("GnomeDesktopItemType" "type")
  )
)

(define-method get_location
  (of-object "GnomeDesktopItem")
  (c-name "gnome_desktop_item_get_location")
  (return-type "const-char*")
)

(define-method set_location
  (of-object "GnomeDesktopItem")
  (c-name "gnome_desktop_item_set_location")
  (return-type "none")
  (parameters
    '("const-char*" "location")
  )
)

(define-method set_location_file
  (of-object "GnomeDesktopItem")
  (c-name "gnome_desktop_item_set_location_file")
  (return-type "none")
  (parameters
    '("const-char*" "file")
  )
)

(define-method get_file_status
  (of-object "GnomeDesktopItem")
  (c-name "gnome_desktop_item_get_file_status")
  (return-type "int")
)

(define-method get_icon
  (of-object "GnomeDesktopItem")
  (c-name "gnome_desktop_item_get_icon")
  (return-type "char*")
  (parameters
    '("GtkIconTheme*" "icon_theme")
  )
)

(define-function find_icon
  (c-name "gnome_desktop_item_find_icon")
  (return-type "char*")
  (parameters
    '("GtkIconTheme*" "icon_theme")
    '("const-char*" "icon")
    '("int" "desired_size")
    '("int" "flags")
  )
)

(define-method attr_exists
  (of-object "GnomeDesktopItem")
  (c-name "gnome_desktop_item_attr_exists")
  (return-type "gboolean")
  (parameters
    '("const-char*" "attr")
  )
)

(define-method get_string
  (of-object "GnomeDesktopItem")
  (c-name "gnome_desktop_item_get_string")
  (return-type "const-char*")
  (parameters
    '("const-char*" "attr")
  )
)

(define-method set_string
  (of-object "GnomeDesktopItem")
  (c-name "gnome_desktop_item_set_string")
  (return-type "none")
  (parameters
    '("const-char*" "attr")
    '("const-char*" "value")
  )
)

(define-method get_attr_locale
  (of-object "GnomeDesktopItem")
  (c-name "gnome_desktop_item_get_attr_locale")
  (return-type "const-char*")
  (parameters
    '("const-char*" "attr")
  )
)

(define-method get_localestring
  (of-object "GnomeDesktopItem")
  (c-name "gnome_desktop_item_get_localestring")
  (return-type "const-char*")
  (parameters
    '("const-char*" "attr")
  )
)

(define-method get_localestring_lang
  (of-object "GnomeDesktopItem")
  (c-name "gnome_desktop_item_get_localestring_lang")
  (return-type "const-char*")
  (parameters
    '("const-char*" "attr")
    '("const-char*" "language")
  )
)

(define-method get_languages
  (of-object "GnomeDesktopItem")
  (c-name "gnome_desktop_item_get_languages")
  (return-type "GList*")
  (parameters
    '("const-char*" "attr")
  )
)

(define-method set_localestring
  (of-object "GnomeDesktopItem")
  (c-name "gnome_desktop_item_set_localestring")
  (return-type "none")
  (parameters
    '("const-char*" "attr")
    '("const-char*" "value")
  )
)

(define-method set_localestring_lang
  (of-object "GnomeDesktopItem")
  (c-name "gnome_desktop_item_set_localestring_lang")
  (return-type "none")
  (parameters
    '("const-char*" "attr")
    '("const-char*" "language")
    '("const-char*" "value")
  )
)

(define-method clear_localestring
  (of-object "GnomeDesktopItem")
  (c-name "gnome_desktop_item_clear_localestring")
  (return-type "none")
  (parameters
    '("const-char*" "attr")
  )
)

(define-method get_strings
  (of-object "GnomeDesktopItem")
  (c-name "gnome_desktop_item_get_strings")
  (return-type "char**")
  (parameters
    '("const-char*" "attr")
  )
)

(define-method set_strings
  (of-object "GnomeDesktopItem")
  (c-name "gnome_desktop_item_set_strings")
  (return-type "none")
  (parameters
    '("const-char*" "attr")
    '("char**" "strings")
  )
)

(define-method get_boolean
  (of-object "GnomeDesktopItem")
  (c-name "gnome_desktop_item_get_boolean")
  (return-type "gboolean")
  (parameters
    '("const-char*" "attr")
  )
)

(define-method set_boolean
  (of-object "GnomeDesktopItem")
  (c-name "gnome_desktop_item_set_boolean")
  (return-type "none")
  (parameters
    '("const-char*" "attr")
    '("gboolean" "value")
  )
)

(define-method set_launch_time
  (of-object "GnomeDesktopItem")
  (c-name "gnome_desktop_item_set_launch_time")
  (return-type "none")
  (parameters
    '("guint32" "timestamp")
  )
)

(define-method clear_section
  (of-object "GnomeDesktopItem")
  (c-name "gnome_desktop_item_clear_section")
  (return-type "none")
  (parameters
    '("const-char*" "section")
  )
)


