;; -*- scheme -*-
; vim:syntax=scheme:sw=2

(define-object CanvasView
  (in-module "Dia")
  (parent "GnomeCanvas")
  (c-name "DiaCanvasView")
  (gtype-id "DIA_TYPE_CANVAS_VIEW")
  (fields
    '("DiaCanvas*" "canvas")
    '("DiaCanvasViewItem*" "root_item")
    '("DiaCanvasViewItem*" "focus_item")
    '("GList*" "selected_items")
    '("DiaHandleLayer*" "handle_layer")
  )
)

(define-object CanvasViewItem
  (in-module "Dia")
  (parent "GnomeCanvasGroup")
  (c-name "DiaCanvasViewItem")
  (gtype-id "DIA_TYPE_CANVAS_VIEW_ITEM")
  (fields
    '("DiaCanvasItem*" "item")
  )
)

(define-object HandleLayer
  (in-module "Dia")
  (parent "GnomeCanvasItem")
  (c-name "DiaHandleLayer")
  (gtype-id "DIA_TYPE_HANDLE_LAYER")
)

(define-object Selector
  (in-module "Dia")
  (parent "GnomeCanvasItem")
  (c-name "DiaSelector")
  (gtype-id "DIA_TYPE_SELECTOR")
)

(define-object Tool
  (in-module "Dia")
  (parent "GObject")
  (c-name "DiaTool")
  (gtype-id "DIA_TYPE_TOOL")
)

(define-object DefaultTool
  (in-module "Dia")
  (parent "DiaTool")
  (c-name "DiaDefaultTool")
  (gtype-id "DIA_TYPE_DEFAULT_TOOL")
)

(define-object HandleTool
  (in-module "Dia")
  (parent "DiaTool")
  (c-name "DiaHandleTool")
  (gtype-id "DIA_TYPE_HANDLE_TOOL")
  (fields
    '("gint" "glue_distance")
  )
)

(define-object ItemTool
  (in-module "Dia")
  (parent "DiaTool")
  (c-name "DiaItemTool")
  (gtype-id "DIA_TYPE_ITEM_TOOL")
  (fields
    '("DiaCanvasViewItem*" "grabbed_item")
  )
)

(define-object SelectionTool
  (in-module "Dia")
  (parent "DiaTool")
  (c-name "DiaSelectionTool")
  (gtype-id "DIA_TYPE_SELECTION_TOOL")
)

(define-object StackTool
  (in-module "Dia")
  (parent "DiaTool")
  (c-name "DiaStackTool")
  (gtype-id "DIA_TYPE_STACK_TOOL")
)

;; From dia-canvas-view.h

(define-function dia_canvas_view_get_type
  (in-module "Dia")
  (c-name "dia_canvas_view_get_type")
  (return-type "GtkType")
)

(define-function dia_canvas_view_new
  (is-constructor-of "DiaCanvasView")
  (c-name "dia_canvas_view_new")
  (return-type "GtkWidget*")
  (parameters
    '("DiaCanvas*" "canvas" (null-ok) (default "NULL"))
    '("gboolean" "aa" (default "1"))
  )
)

;(define-function dia_canvas_view_aa_new
;  (is-constructor-of "DiaCanvasView")
;  (c-name "dia_canvas_view_aa_new")
;  (return-type "GtkWidget*")
;)

(define-method set_canvas
  (of-object "DiaCanvasView")
  (c-name "dia_canvas_view_set_canvas")
  (return-type "none")
  (parameters
    '("DiaCanvas*" "canvas")
  )
)

(define-method unset_canvas
  (of-object "DiaCanvasView")
  (c-name "dia_canvas_view_unset_canvas")
  (return-type "none")
)

(define-method get_canvas
  (of-object "DiaCanvasView")
  (c-name "dia_canvas_view_get_canvas")
  (return-type "DiaCanvas*")
)

(define-method get_zoom
  (of-object "DiaCanvasView")
  (c-name "dia_canvas_view_get_zoom")
  (return-type "gdouble")
)

(define-method set_zoom
  (of-object "DiaCanvasView")
  (c-name "dia_canvas_view_set_zoom")
  (return-type "none")
  (parameters
    '("gdouble" "zoom")
  )
)

(define-method get_tool
  (of-object "DiaCanvasView")
  (c-name "dia_canvas_view_get_tool")
  (return-type "DiaTool*")
)

(define-method set_tool
  (of-object "DiaCanvasView")
  (c-name "dia_canvas_view_set_tool")
  (return-type "none")
  (parameters
    '("DiaTool*" "tool" (null-ok))
  )
)

(define-method get_default_tool
  (of-object "DiaCanvasView")
  (c-name "dia_canvas_view_get_default_tool")
  (return-type "DiaTool*")
)

(define-method set_default_tool
  (of-object "DiaCanvasView")
  (c-name "dia_canvas_view_set_default_tool")
  (return-type "none")
  (parameters
    '("DiaTool*" "tool" (null-ok))
  )
)

(define-method select
  (of-object "DiaCanvasView")
  (c-name "dia_canvas_view_select")
  (return-type "none")
  (parameters
    '("DiaCanvasViewItem*" "item")
  )
)

(define-method select_rectangle
  (of-object "DiaCanvasView")
  (c-name "dia_canvas_view_select_rectangle")
  (return-type "none")
  (parameters
    '("DiaRectangle*" "rect")
  )
)

(define-method select_all
  (of-object "DiaCanvasView")
  (c-name "dia_canvas_view_select_all")
  (return-type "none")
)

(define-method unselect
  (of-object "DiaCanvasView")
  (c-name "dia_canvas_view_unselect")
  (return-type "none")
  (parameters
    '("DiaCanvasViewItem*" "item")
  )
)

(define-method unselect_all
  (of-object "DiaCanvasView")
  (c-name "dia_canvas_view_unselect_all")
  (return-type "none")
)

(define-method focus
  (of-object "DiaCanvasView")
  (c-name "dia_canvas_view_focus")
  (return-type "none")
  (parameters
    '("DiaCanvasViewItem*" "item")
  )
)

(define-method move
  (of-object "DiaCanvasView")
  (c-name "dia_canvas_view_move")
  (return-type "none")
  (parameters
    '("gdouble" "dx")
    '("gdouble" "dy")
    '("DiaCanvasViewItem*" "originator" (null-ok) (default "NULL"))
  )
)

(define-method request_update
  (of-object "DiaCanvasView")
  (c-name "dia_canvas_view_request_update")
  (return-type "none")
)

(define-method find_view_item
  (of-object "DiaCanvasView")
  (c-name "dia_canvas_view_find_view_item")
  (return-type "DiaCanvasViewItem*")
  (parameters
    '("DiaCanvasItem*" "item")
  )
)

(define-method gdk_event_to_dia_event
  (of-object "DiaCanvasView")
  (c-name "dia_canvas_view_gdk_event_to_dia_event")
  (return-type "none")
  (parameters
    '("DiaCanvasViewItem*" "item")
    '("GdkEvent*" "gdk_event")
    '("DiaEvent*" "dia_event")
  )
)

(define-function get_active_view
  (in-module "Dia")
  (c-name "dia_canvas_view_get_active_view")
  (return-type "DiaCanvasView*")
)

; DiaCanvasViewItem

(define-function dia_canvas_view_item_get_type
  (in-module "Dia")
  (c-name "dia_canvas_view_item_get_type")
  (return-type "GtkType")
)

(define-method emit_event
  (of-object "DiaCanvasViewItem")
  (c-name "dia_canvas_view_item_emit_event")
  (return-type "gboolean")
  (parameters
    '("DiaEvent*" "event")
  )
)

(define-method request_update_uta
  (of-object "DiaCanvasViewItem")
  (c-name "dia_canvas_view_item_request_update_uta")
  (return-type "none")
  (parameters
    '("ArtUta*" "uta")
  )
)

(define-method foreach
  (of-object "DiaCanvasViewItem")
  (c-name "dia_canvas_view_item_foreach")
  (return-type "gint")
  (parameters
    '("DiaCanvasViewItemForeachFunc" "func")
    '("gpointer" "data")
  )
)

(define-method add_items
  (of-object "DiaCanvasViewItem")
  (c-name "dia_canvas_view_item_add_items")
  (return-type "none")
  (parameters
    '("DiaCanvasItem*" "item")
  )
)

(define-method is_focused
  (of-object "DiaCanvasViewItem")
  (c-name "dia_canvas_view_item_is_focused")
  (return-type "gboolean")
)

(define-method is_selected
  (of-object "DiaCanvasViewItem")
  (c-name "dia_canvas_view_item_is_selected")
  (return-type "gboolean")
)

;; From dia-handle-layer.h

(define-function dia_handle_layer_get_type
  (in-module "Dia")
  (c-name "dia_handle_layer_get_type")
  (return-type "GtkType")
)

(define-method update_handles
  (of-object "DiaHandleLayer")
  (c-name "dia_handle_layer_update_handles")
  (return-type "none")
  (parameters
    '("DiaCanvasViewItem*" "item")
  )
)

(define-method get_pos_c
  (of-object "DiaHandleLayer")
  (c-name "dia_handle_layer_get_pos_c")
  (return-type "none")
  (parameters
    '("DiaHandle*" "handle")
    '("gint*" "x")
    '("gint*" "y")
  )
)

(define-method request_redraw
  (of-object "DiaHandleLayer")
  (c-name "dia_handle_layer_request_redraw")
  (return-type "none")
  (parameters
    '("gint" "x")
    '("gint" "y")
  )
)

(define-method request_redraw_handle
  (of-object "DiaHandleLayer")
  (c-name "dia_handle_layer_request_redraw_handle")
  (return-type "none")
  (parameters
    '("DiaHandle*" "handle")
  )
)

(define-method grab_handle
  (of-object "DiaHandleLayer")
  (c-name "dia_handle_layer_grab_handle")
  (return-type "none")
  (parameters
    '("DiaHandle*" "handle")
  )
)


;; From dia-selector.h

(define-function dia_selector_get_type
  (in-module "Dia")
  (c-name "dia_selector_get_type")
  (return-type "GtkType")
)


;; From dia-tool.h

(define-function dia_tool_get_type
  (in-module "Dia")
  (c-name "dia_tool_get_type")
  (return-type "GtkType")
)

(define-method button_press
  (of-object "DiaTool")
  (c-name "dia_tool_button_press")
  (return-type "gboolean")
  (parameters
    '("DiaCanvasView*" "view")
    '("GdkEvent*" "event")
  )
)

(define-method button_release
  (of-object "DiaTool")
  (c-name "dia_tool_button_release")
  (return-type "gboolean")
  (parameters
    '("DiaCanvasView*" "view")
    '("GdkEvent*" "event")
  )
)

(define-method motion_notify
  (of-object "DiaTool")
  (c-name "dia_tool_motion_notify")
  (return-type "gboolean")
  (parameters
    '("DiaCanvasView*" "view")
    '("GdkEvent*" "event")
  )
)

(define-method key_press
  (of-object "DiaTool")
  (c-name "dia_tool_key_press")
  (return-type "gboolean")
  (parameters
    '("DiaCanvasView*" "view")
    '("GdkEvent*" "event")
  )
)

(define-method key_release
  (of-object "DiaTool")
  (c-name "dia_tool_key_release")
  (return-type "gboolean")
  (parameters
    '("DiaCanvasView*" "view")
    '("GdkEvent*" "event")
  )
)

;; From dia-default-tool.h

(define-function dia_default_tool_get_type
  (c-name "dia_default_tool_get_type")
  (return-type "GtkType")
)

(define-function dia_default_tool_new
  (c-name "dia_default_tool_new")
  (is-constructor-of "DiaDefaultTool")
  (return-type "DiaTool*")
)

(define-method set_handle_tool
  (of-object "DiaDefaultTool")
  (c-name "dia_default_tool_set_handle_tool")
  (return-type "none")
  (parameters
    '("DiaTool*" "handle_tool")
  )
)

(define-method get_handle_tool
  (of-object "DiaDefaultTool")
  (c-name "dia_default_tool_get_handle_tool")
  (return-type "DiaTool*")
)

(define-method set_item_tool
  (of-object "DiaDefaultTool")
  (c-name "dia_default_tool_set_item_tool")
  (return-type "none")
  (parameters
    '("DiaTool*" "item_tool")
  )
)

(define-method get_item_tool
  (of-object "DiaDefaultTool")
  (c-name "dia_default_tool_get_item_tool")
  (return-type "DiaTool*")
)

(define-method set_selection_tool
  (of-object "DiaDefaultTool")
  (c-name "dia_default_tool_set_selection_tool")
  (return-type "none")
  (parameters
    '("DiaTool*" "selection_tool")
  )
)

(define-method get_selection_tool
  (of-object "DiaDefaultTool")
  (c-name "dia_default_tool_get_selection_tool")
  (return-type "DiaTool*")
)


;; From dia-handle-tool.h

(define-function dia_handle_tool_get_type
  (in-module "Dia")
  (c-name "dia_handle_tool_get_type")
  (return-type "GtkType")
)

(define-function dia_handle_tool_new
  (is-constructor-of "DiaHandleTool")
  (c-name "dia_handle_tool_new")
  (return-type "DiaTool*")
)

(define-method set_grabbed_handle
  (of-object "DiaHandleTool")
  (c-name "dia_handle_tool_set_grabbed_handle")
  (return-type "none")
  (parameters
    '("DiaHandle*" "handle")
  )
)


;; From dia-item-tool.h

(define-function dia_item_tool_get_type
  (in-module "Dia")
  (c-name "dia_item_tool_get_type")
  (return-type "GtkType")
)

(define-function dia_item_tool_new
  (is-constructor-of "DiaItemTool")
  (c-name "dia_item_tool_new")
  (return-type "DiaTool*")
)


;; From dia-selection-tool.h

(define-function dia_selection_tool_get_type
  (in-module "Dia")
  (c-name "dia_selection_tool_get_type")
  (return-type "GtkType")
)

(define-function dia_selection_tool_new
  (is-constructor-of "DiaSelectionTool")
  (c-name "dia_selection_tool_new")
  (return-type "DiaTool*")
)


;; From dia-stack-tool.h

(define-function dia_stack_tool_get_type
  (in-module "Dia")
  (c-name "dia_stack_tool_get_type")
  (return-type "GtkType")
)

(define-function dia_stack_tool_new
  (is-constructor-of "DiaStackTool")
  (c-name "dia_stack_tool_new")
  (return-type "DiaTool*")
)


;; From dia-stack-tool.h

(define-function dia_stack_tool_get_type
  (in-module "Dia")
  (c-name "dia_stack_tool_get_type")
  (return-type "GtkType")
)

(define-function dia_stack_tool_new
  (is-constructor-of "DiaStackTool")
  (c-name "dia_stack_tool_new")
  (return-type "DiaTool*")
)

(define-method push
  (of-object "DiaStackTool")
  (c-name "dia_stack_tool_push")
  (return-type "none")
  (parameters
    '("DiaTool*" "tool")
  )
)

(define-method pop
  (of-object "DiaStackTool")
  (c-name "dia_stack_tool_pop")
  (return-type "none")
)


