;; -*- scheme -*-
; object definitions ...
(define-object Preview
  (in-module "Meta")
  (parent "GtkBin")
  (c-name "MetaPreview")
  (gtype-id "META_TYPE_PREVIEW")
)

(define-pointer Theme
  (in-module "Meta")
  (c-name "MetaTheme")
  (gtype-id "META_TYPE_THEME")
)

;; Enumerations and flags ...

(define-flags FrameFlags
  (in-module "Meta")
  (c-name "MetaFrameFlags")
;   (gtype-id "META_TYPE_FRAME_FLAGS")
  (values
    '("allows-delete" "META_FRAME_ALLOWS_DELETE")
    '("allows-menu" "META_FRAME_ALLOWS_MENU")
    '("allows-minimize" "META_FRAME_ALLOWS_MINIMIZE")
    '("allows-maximize" "META_FRAME_ALLOWS_MAXIMIZE")
    '("allows-vertical-resize" "META_FRAME_ALLOWS_VERTICAL_RESIZE")
    '("allows-horizontal-resize" "META_FRAME_ALLOWS_HORIZONTAL_RESIZE")
    '("has-focus" "META_FRAME_HAS_FOCUS")
    '("shaded" "META_FRAME_SHADED")
    '("stuck" "META_FRAME_STUCK")
    '("maximized" "META_FRAME_MAXIMIZED")
    '("allows-shade" "META_FRAME_ALLOWS_SHADE")
    '("allows-move" "META_FRAME_ALLOWS_MOVE")
    '("fullscreen" "META_FRAME_FULLSCREEN")
    '("is-flashing" "META_FRAME_IS_FLASHING")
  )
)

(define-flags MenuOp
  (in-module "Meta")
  (c-name "MetaMenuOp")
;   (gtype-id "META_TYPE_MENU_OP")
  (values
    '("delete" "META_MENU_OP_DELETE")
    '("minimize" "META_MENU_OP_MINIMIZE")
    '("unmaximize" "META_MENU_OP_UNMAXIMIZE")
    '("maximize" "META_MENU_OP_MAXIMIZE")
    '("unshade" "META_MENU_OP_UNSHADE")
    '("shade" "META_MENU_OP_SHADE")
    '("unstick" "META_MENU_OP_UNSTICK")
    '("stick" "META_MENU_OP_STICK")
    '("workspaces" "META_MENU_OP_WORKSPACES")
    '("move" "META_MENU_OP_MOVE")
    '("resize" "META_MENU_OP_RESIZE")
    '("above" "META_MENU_OP_ABOVE")
;    '("unabove" "META_MENU_OP_UNABOVE")
    '("move-left" "META_MENU_OP_MOVE_LEFT")
    '("move-right" "META_MENU_OP_MOVE_RIGHT")
    '("move-up" "META_MENU_OP_MOVE_UP")
    '("move-down" "META_MENU_OP_MOVE_DOWN")
    '("recover" "META_MENU_OP_RECOVER")
  )
)

(define-enum GrabOp
  (in-module "Meta")
  (c-name "MetaGrabOp")
;   (gtype-id "META_TYPE_GRAB_OP")
  (values
    '("none" "META_GRAB_OP_NONE")
    '("moving" "META_GRAB_OP_MOVING")
    '("resizing-se" "META_GRAB_OP_RESIZING_SE")
    '("resizing-s" "META_GRAB_OP_RESIZING_S")
    '("resizing-sw" "META_GRAB_OP_RESIZING_SW")
    '("resizing-n" "META_GRAB_OP_RESIZING_N")
    '("resizing-ne" "META_GRAB_OP_RESIZING_NE")
    '("resizing-nw" "META_GRAB_OP_RESIZING_NW")
    '("resizing-w" "META_GRAB_OP_RESIZING_W")
    '("resizing-e" "META_GRAB_OP_RESIZING_E")
    '("keyboard-moving" "META_GRAB_OP_KEYBOARD_MOVING")
    '("keyboard-resizing-unknown" "META_GRAB_OP_KEYBOARD_RESIZING_UNKNOWN")
    '("keyboard-resizing-s" "META_GRAB_OP_KEYBOARD_RESIZING_S")
    '("keyboard-resizing-n" "META_GRAB_OP_KEYBOARD_RESIZING_N")
    '("keyboard-resizing-w" "META_GRAB_OP_KEYBOARD_RESIZING_W")
    '("keyboard-resizing-e" "META_GRAB_OP_KEYBOARD_RESIZING_E")
    '("keyboard-resizing-se" "META_GRAB_OP_KEYBOARD_RESIZING_SE")
    '("keyboard-resizing-ne" "META_GRAB_OP_KEYBOARD_RESIZING_NE")
    '("keyboard-resizing-sw" "META_GRAB_OP_KEYBOARD_RESIZING_SW")
    '("keyboard-resizing-nw" "META_GRAB_OP_KEYBOARD_RESIZING_NW")
    '("keyboard-tabbing-normal" "META_GRAB_OP_KEYBOARD_TABBING_NORMAL")
    '("keyboard-tabbing-dock" "META_GRAB_OP_KEYBOARD_TABBING_DOCK")
    '("keyboard-escaping-normal" "META_GRAB_OP_KEYBOARD_ESCAPING_NORMAL")
    '("keyboard-escaping-dock" "META_GRAB_OP_KEYBOARD_ESCAPING_DOCK")
    '("keyboard-workspace-switching" "META_GRAB_OP_KEYBOARD_WORKSPACE_SWITCHING")
    '("clicking-minimize" "META_GRAB_OP_CLICKING_MINIMIZE")
    '("clicking-maximize" "META_GRAB_OP_CLICKING_MAXIMIZE")
    '("clicking-unmaximize" "META_GRAB_OP_CLICKING_UNMAXIMIZE")
    '("clicking-delete" "META_GRAB_OP_CLICKING_DELETE")
    '("clicking-menu" "META_GRAB_OP_CLICKING_MENU")
  )
)

(define-enum Cursor
  (in-module "Meta")
  (c-name "MetaCursor")
;   (gtype-id "META_TYPE_CURSOR")
  (values
    '("default" "META_CURSOR_DEFAULT")
    '("north-resize" "META_CURSOR_NORTH_RESIZE")
    '("south-resize" "META_CURSOR_SOUTH_RESIZE")
    '("west-resize" "META_CURSOR_WEST_RESIZE")
    '("east-resize" "META_CURSOR_EAST_RESIZE")
    '("se-resize" "META_CURSOR_SE_RESIZE")
    '("sw-resize" "META_CURSOR_SW_RESIZE")
    '("ne-resize" "META_CURSOR_NE_RESIZE")
    '("nw-resize" "META_CURSOR_NW_RESIZE")
    '("move-resize-window" "META_CURSOR_MOVE_OR_RESIZE_WINDOW")
    '("busy" "META_CURSOR_BUSY")
  )
)

(define-enum FocusMode
  (in-module "Meta")
  (c-name "MetaFocusMode")
;   (gtype-id "META_TYPE_FOCUS_MODE")
  (values
    '("click" "META_FOCUS_MODE_CLICK")
    '("sloppy" "META_FOCUS_MODE_SLOPPY")
    '("mouse" "META_FOCUS_MODE_MOUSE")
  )
)

(define-enum ActionTitlebar
  (in-module "Meta")
  (c-name "MetaActionTitlebar")
;   (gtype-id "META_TYPE_ACTION_TITLEBAR")
  (values
    '("toggle-shade" "META_ACTION_TITLEBAR_TOGGLE_SHADE")
    '("toggle-maximize" "META_ACTION_TITLEBAR_TOGGLE_MAXIMIZE")
    '("minimize" "META_ACTION_TITLEBAR_MINIMIZE")
    '("none" "META_ACTION_TITLEBAR_NONE")
    '("lower" "META_ACTION_TITLEBAR_LOWER")
    '("menu" "META_ACTION_TITLEBAR_MENU")
    '("last" "META_ACTION_TITLEBAR_LAST")
  )
)

(define-enum FrameType
  (in-module "Meta")
  (c-name "MetaFrameType")
;   (gtype-id "META_TYPE_FRAME_TYPE")
  (values
    '("normal" "META_FRAME_TYPE_NORMAL")
    '("dialog" "META_FRAME_TYPE_DIALOG")
    '("modal-dialog" "META_FRAME_TYPE_MODAL_DIALOG")
    '("utility" "META_FRAME_TYPE_UTILITY")
    '("menu" "META_FRAME_TYPE_MENU")
    '("border" "META_FRAME_TYPE_BORDER")
    '("last" "META_FRAME_TYPE_LAST")
  )
)

(define-flags VirtualModifier
  (in-module "Meta")
  (c-name "MetaVirtualModifier")
;   (gtype-id "META_TYPE_VIRTUAL_MODIFIER")
  (values
    '("shift-mask" "META_VIRTUAL_SHIFT_MASK")
    '("control-mask" "META_VIRTUAL_CONTROL_MASK")
    '("alt-mask" "META_VIRTUAL_ALT_MASK")
    '("meta-mask" "META_VIRTUAL_META_MASK")
    '("super-mask" "META_VIRTUAL_SUPER_MASK")
    '("hyper-mask" "META_VIRTUAL_HYPER_MASK")
    '("mod2-mask" "META_VIRTUAL_MOD2_MASK")
    '("mod3-mask" "META_VIRTUAL_MOD3_MASK")
    '("mod4-mask" "META_VIRTUAL_MOD4_MASK")
    '("mod5-mask" "META_VIRTUAL_MOD5_MASK")
  )
)

(define-flags Direction
  (in-module "Meta")
  (c-name "MetaDirection")
;   (gtype-id "META_TYPE_DIRECTION")
  (values
    '("left" "META_DIRECTION_LEFT")
    '("right" "META_DIRECTION_RIGHT")
    '("top" "META_DIRECTION_TOP")
    '("bottom" "META_DIRECTION_BOTTOM")
    '("up" "META_DIRECTION_UP")
    '("down" "META_DIRECTION_DOWN")
  )
)

(define-enum ButtonFunction
  (in-module "Meta")
  (c-name "MetaButtonFunction")
;   (gtype-id "META_TYPE_BUTTON_FUNCTION")
  (values
    '("menu" "META_BUTTON_FUNCTION_MENU")
    '("minimize" "META_BUTTON_FUNCTION_MINIMIZE")
    '("maximize" "META_BUTTON_FUNCTION_MAXIMIZE")
    '("close" "META_BUTTON_FUNCTION_CLOSE")
    '("last" "META_BUTTON_FUNCTION_LAST")
  )
)

(define-enum GradientType
  (in-module "Meta")
  (c-name "MetaGradientType")
;   (gtype-id "META_TYPE_GRADIENT_TYPE")
  (values
    '("vertical" "META_GRADIENT_VERTICAL")
    '("horizontal" "META_GRADIENT_HORIZONTAL")
    '("diagonal" "META_GRADIENT_DIAGONAL")
    '("last" "META_GRADIENT_LAST")
  )
)

(define-enum ThemeError
  (in-module "Meta")
  (c-name "MetaThemeError")
;   (gtype-id "META_TYPE_THEME_ERROR")
  (values
    '("frame-geometry" "META_THEME_ERROR_FRAME_GEOMETRY")
    '("bad-character" "META_THEME_ERROR_BAD_CHARACTER")
    '("bad-parens" "META_THEME_ERROR_BAD_PARENS")
    '("unknown-variable" "META_THEME_ERROR_UNKNOWN_VARIABLE")
    '("divide-by-zero" "META_THEME_ERROR_DIVIDE_BY_ZERO")
    '("mod-on-float" "META_THEME_ERROR_MOD_ON_FLOAT")
    '("failed" "META_THEME_ERROR_FAILED")
  )
)

(define-enum ButtonSizing
  (in-module "Meta")
  (c-name "MetaButtonSizing")
;   (gtype-id "META_TYPE_BUTTON_SIZING")
  (values
    '("aspect" "META_BUTTON_SIZING_ASPECT")
    '("fixed" "META_BUTTON_SIZING_FIXED")
    '("last" "META_BUTTON_SIZING_LAST")
  )
)

(define-enum ImageFillType
  (in-module "Meta")
  (c-name "MetaImageFillType")
;   (gtype-id "META_TYPE_IMAGE_FILL_TYPE")
  (values
    '("scale" "META_IMAGE_FILL_SCALE")
    '("tile" "META_IMAGE_FILL_TILE")
  )
)

(define-enum ColorSpecType
  (in-module "Meta")
  (c-name "MetaColorSpecType")
;   (gtype-id "META_TYPE_COLOR_SPEC_TYPE")
  (values
    '("basic" "META_COLOR_SPEC_BASIC")
    '("gtk" "META_COLOR_SPEC_GTK")
    '("blend" "META_COLOR_SPEC_BLEND")
    '("shade" "META_COLOR_SPEC_SHADE")
  )
)

(define-enum GtkColorComponent
  (in-module "Meta")
  (c-name "MetaGtkColorComponent")
;   (gtype-id "META_TYPE_GTK_COLOR_COMPONENT")
  (values
    '("fg" "META_GTK_COLOR_FG")
    '("bg" "META_GTK_COLOR_BG")
    '("light" "META_GTK_COLOR_LIGHT")
    '("dark" "META_GTK_COLOR_DARK")
    '("mid" "META_GTK_COLOR_MID")
    '("text" "META_GTK_COLOR_TEXT")
    '("base" "META_GTK_COLOR_BASE")
    '("text-aa" "META_GTK_COLOR_TEXT_AA")
    '("last" "META_GTK_COLOR_LAST")
  )
)

(define-enum DrawType
  (in-module "Meta")
  (c-name "MetaDrawType")
;   (gtype-id "META_TYPE_DRAW_TYPE")
  (values
    '("line" "META_DRAW_LINE")
    '("rectangle" "META_DRAW_RECTANGLE")
    '("arc" "META_DRAW_ARC")
    '("clip" "META_DRAW_CLIP")
    '("tint" "META_DRAW_TINT")
    '("gradient" "META_DRAW_GRADIENT")
    '("image" "META_DRAW_IMAGE")
    '("gtk-arrow" "META_DRAW_GTK_ARROW")
    '("gtk-box" "META_DRAW_GTK_BOX")
    '("gtk-vline" "META_DRAW_GTK_VLINE")
    '("icon" "META_DRAW_ICON")
    '("title" "META_DRAW_TITLE")
    '("op-list" "META_DRAW_OP_LIST")
    '("tile" "META_DRAW_TILE")
  )
)

(define-enum ButtonState
  (in-module "Meta")
  (c-name "MetaButtonState")
;   (gtype-id "META_TYPE_BUTTON_STATE")
  (values
    '("normal" "META_BUTTON_STATE_NORMAL")
    '("pressed" "META_BUTTON_STATE_PRESSED")
    '("prelight" "META_BUTTON_STATE_PRELIGHT")
    '("last" "META_BUTTON_STATE_LAST")
  )
)

(define-enum ButtonType
  (in-module "Meta")
  (c-name "MetaButtonType")
;   (gtype-id "META_TYPE_BUTTON_TYPE")
  (values
    '("left-left-background" "META_BUTTON_TYPE_LEFT_LEFT_BACKGROUND")
    '("left-middle-background" "META_BUTTON_TYPE_LEFT_MIDDLE_BACKGROUND")
    '("left-right-background" "META_BUTTON_TYPE_LEFT_RIGHT_BACKGROUND")
    '("right-left-background" "META_BUTTON_TYPE_RIGHT_LEFT_BACKGROUND")
    '("right-middle-background" "META_BUTTON_TYPE_RIGHT_MIDDLE_BACKGROUND")
    '("right-right-background" "META_BUTTON_TYPE_RIGHT_RIGHT_BACKGROUND")
    '("close" "META_BUTTON_TYPE_CLOSE")
    '("maximize" "META_BUTTON_TYPE_MAXIMIZE")
    '("minimize" "META_BUTTON_TYPE_MINIMIZE")
    '("menu" "META_BUTTON_TYPE_MENU")
    '("last" "META_BUTTON_TYPE_LAST")
  )
)

(define-enum MenuIconType
  (in-module "Meta")
  (c-name "MetaMenuIconType")
;   (gtype-id "META_TYPE_MENU_ICON_TYPE")
  (values
    '("close" "META_MENU_ICON_TYPE_CLOSE")
    '("maximize" "META_MENU_ICON_TYPE_MAXIMIZE")
    '("unmaximize" "META_MENU_ICON_TYPE_UNMAXIMIZE")
    '("minimize" "META_MENU_ICON_TYPE_MINIMIZE")
    '("last" "META_MENU_ICON_TYPE_LAST")
  )
)

(define-enum FramePiece
  (in-module "Meta")
  (c-name "MetaFramePiece")
;   (gtype-id "META_TYPE_FRAME_PIECE")
  (values
    '("entire-background" "META_FRAME_PIECE_ENTIRE_BACKGROUND")
    '("titlebar" "META_FRAME_PIECE_TITLEBAR")
    '("titlebar-middle" "META_FRAME_PIECE_TITLEBAR_MIDDLE")
    '("left-titlebar-edge" "META_FRAME_PIECE_LEFT_TITLEBAR_EDGE")
    '("right-titlebar-edge" "META_FRAME_PIECE_RIGHT_TITLEBAR_EDGE")
    '("top-titlebar-edge" "META_FRAME_PIECE_TOP_TITLEBAR_EDGE")
    '("bottom-titlebar-edge" "META_FRAME_PIECE_BOTTOM_TITLEBAR_EDGE")
    '("title" "META_FRAME_PIECE_TITLE")
    '("left-edge" "META_FRAME_PIECE_LEFT_EDGE")
    '("right-edge" "META_FRAME_PIECE_RIGHT_EDGE")
    '("bottom-edge" "META_FRAME_PIECE_BOTTOM_EDGE")
    '("overlay" "META_FRAME_PIECE_OVERLAY")
    '("last" "META_FRAME_PIECE_LAST")
  )
)

(define-enum FrameState
  (in-module "Meta")
  (c-name "MetaFrameState")
;   (gtype-id "META_TYPE_FRAME_STATE")
  (values
    '("normal" "META_FRAME_STATE_NORMAL")
    '("maximized" "META_FRAME_STATE_MAXIMIZED")
    '("shaded" "META_FRAME_STATE_SHADED")
    '("maximized-and-shaded" "META_FRAME_STATE_MAXIMIZED_AND_SHADED")
    '("last" "META_FRAME_STATE_LAST")
  )
)

(define-enum FrameResize
  (in-module "Meta")
  (c-name "MetaFrameResize")
;   (gtype-id "META_TYPE_FRAME_RESIZE")
  (values
    '("none" "META_FRAME_RESIZE_NONE")
    '("vertical" "META_FRAME_RESIZE_VERTICAL")
    '("horizontal" "META_FRAME_RESIZE_HORIZONTAL")
    '("both" "META_FRAME_RESIZE_BOTH")
    '("last" "META_FRAME_RESIZE_LAST")
  )
)

(define-enum FrameFocus
  (in-module "Meta")
  (c-name "MetaFrameFocus")
;   (gtype-id "META_TYPE_FRAME_FOCUS")
  (values
    '("no" "META_FRAME_FOCUS_NO")
    '("yes" "META_FRAME_FOCUS_YES")
    '("last" "META_FRAME_FOCUS_LAST")
  )
)

; (define-flags DebugTopic
;   (in-module "Meta")
;   (c-name "MetaDebugTopic")
;    (gtype-id "META_TYPE_DEBUG_TOPIC")
;   (values
;     '("focus" "META_DEBUG_FOCUS")
;     '("workarea" "META_DEBUG_WORKAREA")
;     '("stack" "META_DEBUG_STACK")
;     '("themes" "META_DEBUG_THEMES")
;     '("sm" "META_DEBUG_SM")
;     '("events" "META_DEBUG_EVENTS")
;     '("window-state" "META_DEBUG_WINDOW_STATE")
;     '("window-ops" "META_DEBUG_WINDOW_OPS")
;     '("geometry" "META_DEBUG_GEOMETRY")
;     '("placement" "META_DEBUG_PLACEMENT")
;     '("ping" "META_DEBUG_PING")
;     '("xinerama" "META_DEBUG_XINERAMA")
;     '("keybindings" "META_DEBUG_KEYBINDINGS")
;     '("sync" "META_DEBUG_SYNC")
;     '("errors" "META_DEBUG_ERRORS")
;     '("startup" "META_DEBUG_STARTUP")
;     '("prefs" "META_DEBUG_PREFS")
;     '("groups" "META_DEBUG_GROUPS")
;     '("resizing" "META_DEBUG_RESIZING")
;     '("shapes" "META_DEBUG_SHAPES")
;     '("compositor" "META_DEBUG_COMPOSITOR")
;   )
; )


;; From /opt/metacity/include/metacity-1/metacity-private/common.h



;; From /opt/metacity/include/metacity-1/metacity-private/enum-types.h

(define-function frame_flags_get_type
  (c-name "meta_frame_flags_get_type")
  (return-type "GType")
)

(define-function menu_op_get_type
  (c-name "meta_menu_op_get_type")
  (return-type "GType")
)

(define-function grab_op_get_type
  (c-name "meta_grab_op_get_type")
  (return-type "GType")
)

(define-function cursor_get_type
  (c-name "meta_cursor_get_type")
  (return-type "GType")
)

(define-function focus_mode_get_type
  (c-name "meta_focus_mode_get_type")
  (return-type "GType")
)

(define-function action_double_click_titlebar_get_type
  (c-name "meta_action_double_click_titlebar_get_type")
  (return-type "GType")
)

(define-function frame_type_get_type
  (c-name "meta_frame_type_get_type")
  (return-type "GType")
)

(define-function virtual_modifier_get_type
  (c-name "meta_virtual_modifier_get_type")
  (return-type "GType")
)

(define-function direction_get_type
  (c-name "meta_direction_get_type")
  (return-type "GType")
)

(define-function button_function_get_type
  (c-name "meta_button_function_get_type")
  (return-type "GType")
)

(define-function gradient_type_get_type
  (c-name "meta_gradient_type_get_type")
  (return-type "GType")
)

(define-function theme_error_get_type
  (c-name "meta_theme_error_get_type")
  (return-type "GType")
)

(define-function button_sizing_get_type
  (c-name "meta_button_sizing_get_type")
  (return-type "GType")
)

(define-function image_fill_type_get_type
  (c-name "meta_image_fill_type_get_type")
  (return-type "GType")
)

(define-function color_spec_type_get_type
  (c-name "meta_color_spec_type_get_type")
  (return-type "GType")
)

(define-function gtk_color_component_get_type
  (c-name "meta_gtk_color_component_get_type")
  (return-type "GType")
)

(define-function draw_type_get_type
  (c-name "meta_draw_type_get_type")
  (return-type "GType")
)

(define-function button_state_get_type
  (c-name "meta_button_state_get_type")
  (return-type "GType")
)

(define-function button_type_get_type
  (c-name "meta_button_type_get_type")
  (return-type "GType")
)

(define-function menu_icon_type_get_type
  (c-name "meta_menu_icon_type_get_type")
  (return-type "GType")
)

(define-function frame_piece_get_type
  (c-name "meta_frame_piece_get_type")
  (return-type "GType")
)

(define-function frame_state_get_type
  (c-name "meta_frame_state_get_type")
  (return-type "GType")
)

(define-function frame_resize_get_type
  (c-name "meta_frame_resize_get_type")
  (return-type "GType")
)

(define-function frame_focus_get_type
  (c-name "meta_frame_focus_get_type")
  (return-type "GType")
)

(define-function debug_topic_get_type
  (c-name "meta_debug_topic_get_type")
  (return-type "GType")
)



;; From /opt/metacity/include/metacity-1/metacity-private/gradient.h

(define-function gradient_create_simple
  (c-name "meta_gradient_create_simple")
  (return-type "GdkPixbuf*")
  (parameters
    '("int" "width")
    '("int" "height")
    '("const-GdkColor*" "from")
    '("const-GdkColor*" "to")
    '("MetaGradientType" "style")
  )
)

(define-function gradient_create_multi
  (c-name "meta_gradient_create_multi")
  (return-type "GdkPixbuf*")
  (parameters
    '("int" "width")
    '("int" "height")
    '("const-GdkColor*" "colors")
    '("int" "n_colors")
    '("MetaGradientType" "style")
  )
)

(define-function gradient_create_interwoven
  (c-name "meta_gradient_create_interwoven")
  (return-type "GdkPixbuf*")
  (parameters
    '("int" "width")
    '("int" "height")
    '("const-GdkColor" "colors1[2]")
    '("int" "thickness1")
    '("const-GdkColor" "colors2[2]")
    '("int" "thickness2")
  )
)

(define-function gradient_add_alpha
  (c-name "meta_gradient_add_alpha")
  (return-type "none")
  (parameters
    '("GdkPixbuf*" "pixbuf")
    '("const-guchar*" "alphas")
    '("int" "n_alphas")
    '("MetaGradientType" "type")
  )
)



;; From /opt/metacity/include/metacity-1/metacity-private/preview-widget.h

(define-function preview_get_type
  (c-name "meta_preview_get_type")
  (return-type "GtkType")
)

(define-function preview_new
  (c-name "meta_preview_new")
  (is-constructor-of "MetaPreview")
  (return-type "GtkWidget*")
)

(define-method set_theme
  (of-object "MetaPreview")
  (c-name "meta_preview_set_theme")
  (return-type "none")
  (parameters
    '("MetaTheme*" "theme")
  )
)

(define-method set_title
  (of-object "MetaPreview")
  (c-name "meta_preview_set_title")
  (return-type "none")
  (parameters
    '("const-char*" "title")
  )
)

(define-method set_frame_type
  (of-object "MetaPreview")
  (c-name "meta_preview_set_frame_type")
  (return-type "none")
  (parameters
    '("MetaFrameType" "type")
  )
)

(define-method set_frame_flags
  (of-object "MetaPreview")
  (c-name "meta_preview_set_frame_flags")
  (return-type "none")
  (parameters
    '("MetaFrameFlags" "flags")
  )
)

(define-method set_button_layout
  (of-object "MetaPreview")
  (c-name "meta_preview_set_button_layout")
  (return-type "none")
  (parameters
    '("const-MetaButtonLayout*" "button_layout")
  )
)

(define-function preview_get_icon
  (c-name "meta_preview_get_icon")
  (return-type "GdkPixbuf*")
)

(define-function preview_get_mini_icon
  (c-name "meta_preview_get_mini_icon")
  (return-type "GdkPixbuf*")
)



;; From /opt/metacity/include/metacity-1/metacity-private/theme.h

(define-function frame_layout_new
  (c-name "meta_frame_layout_new")
  (is-constructor-of "MetaFrameLayout")
  (return-type "MetaFrameLayout*")
)

(define-method copy
  (of-object "MetaFrameLayout")
  (c-name "meta_frame_layout_copy")
  (return-type "MetaFrameLayout*")
)

(define-method ref
  (of-object "MetaFrameLayout")
  (c-name "meta_frame_layout_ref")
  (return-type "none")
)

(define-method unref
  (of-object "MetaFrameLayout")
  (c-name "meta_frame_layout_unref")
  (return-type "none")
)

(define-method get_borders
  (of-object "MetaFrameLayout")
  (c-name "meta_frame_layout_get_borders")
  (return-type "none")
  (parameters
    '("int" "text_height")
    '("MetaFrameFlags" "flags")
    '("int*" "top_height")
    '("int*" "bottom_height")
    '("int*" "left_width")
    '("int*" "right_width")
  )
)

(define-method calc_geometry
  (of-object "MetaFrameLayout")
  (c-name "meta_frame_layout_calc_geometry")
  (return-type "none")
  (parameters
    '("int" "text_height")
    '("MetaFrameFlags" "flags")
    '("int" "client_width")
    '("int" "client_height")
    '("const-MetaButtonLayout*" "button_layout")
    '("MetaFrameGeometry*" "fgeom")
  )
)

(define-method validate
  (of-object "MetaFrameLayout")
  (c-name "meta_frame_layout_validate")
  (return-type "gboolean")
  (parameters
    '("GError**" "error")
  )
)

(define-function parse_position_expression
  (c-name "meta_parse_position_expression")
  (return-type "gboolean")
  (parameters
    '("const-char*" "expr")
    '("const-MetaPositionExprEnv*" "env")
    '("int*" "x_return")
    '("int*" "y_return")
    '("GError**" "err")
  )
)

(define-function parse_size_expression
  (c-name "meta_parse_size_expression")
  (return-type "gboolean")
  (parameters
    '("const-char*" "expr")
    '("const-MetaPositionExprEnv*" "env")
    '("int*" "val_return")
    '("GError**" "err")
  )
)

(define-function color_spec_new
  (c-name "meta_color_spec_new")
  (is-constructor-of "MetaColorSpec")
  (return-type "MetaColorSpec*")
  (parameters
    '("MetaColorSpecType" "type")
  )
)

(define-function color_spec_new_from_string
  (c-name "meta_color_spec_new_from_string")
  (return-type "MetaColorSpec*")
  (parameters
    '("const-char*" "str")
    '("GError**" "err")
  )
)

(define-function color_spec_new_gtk
  (c-name "meta_color_spec_new_gtk")
  (return-type "MetaColorSpec*")
  (parameters
    '("MetaGtkColorComponent" "component")
    '("GtkStateType" "state")
  )
)

(define-method free
  (of-object "MetaColorSpec")
  (c-name "meta_color_spec_free")
  (return-type "none")
)

(define-method render
  (of-object "MetaColorSpec")
  (c-name "meta_color_spec_render")
  (return-type "none")
  (parameters
    '("GtkWidget*" "widget")
    '("GdkColor*" "color")
  )
)

(define-function draw_op_new
  (c-name "meta_draw_op_new")
  (is-constructor-of "MetaDrawOp")
  (return-type "MetaDrawOp*")
  (parameters
    '("MetaDrawType" "type")
  )
)

(define-method free
  (of-object "MetaDrawOp")
  (c-name "meta_draw_op_free")
  (return-type "none")
)

(define-method draw
  (of-object "MetaDrawOp")
  (c-name "meta_draw_op_draw")
  (return-type "none")
  (parameters
    '("GtkWidget*" "widget")
    '("GdkDrawable*" "drawable")
    '("const-GdkRectangle*" "clip")
    '("const-MetaDrawInfo*" "info")
    '("int" "x")
    '("int" "y")
    '("int" "width")
    '("int" "height")
  )
)

(define-function draw_op_list_new
  (c-name "meta_draw_op_list_new")
  (is-constructor-of "MetaDrawOpList")
  (return-type "MetaDrawOpList*")
  (parameters
    '("int" "n_preallocs")
  )
)

(define-method ref
  (of-object "MetaDrawOpList")
  (c-name "meta_draw_op_list_ref")
  (return-type "none")
)

(define-method unref
  (of-object "MetaDrawOpList")
  (c-name "meta_draw_op_list_unref")
  (return-type "none")
)

(define-method draw
  (of-object "MetaDrawOpList")
  (c-name "meta_draw_op_list_draw")
  (return-type "none")
  (parameters
    '("GtkWidget*" "widget")
    '("GdkDrawable*" "drawable")
    '("const-GdkRectangle*" "clip")
    '("const-MetaDrawInfo*" "info")
    '("int" "x")
    '("int" "y")
    '("int" "width")
    '("int" "height")
  )
)

(define-method append
  (of-object "MetaDrawOpList")
  (c-name "meta_draw_op_list_append")
  (return-type "none")
  (parameters
    '("MetaDrawOp*" "op")
  )
)

(define-method validate
  (of-object "MetaDrawOpList")
  (c-name "meta_draw_op_list_validate")
  (return-type "gboolean")
  (parameters
    '("GError**" "error")
  )
)

(define-method contains
  (of-object "MetaDrawOpList")
  (c-name "meta_draw_op_list_contains")
  (return-type "gboolean")
  (parameters
    '("MetaDrawOpList*" "child")
  )
)

(define-function gradient_spec_new
  (c-name "meta_gradient_spec_new")
  (is-constructor-of "MetaGradientSpec")
  (return-type "MetaGradientSpec*")
  (parameters
    '("MetaGradientType" "type")
  )
)

(define-method free
  (of-object "MetaGradientSpec")
  (c-name "meta_gradient_spec_free")
  (return-type "none")
)

(define-method render
  (of-object "MetaGradientSpec")
  (c-name "meta_gradient_spec_render")
  (return-type "GdkPixbuf*")
  (parameters
    '("GtkWidget*" "widget")
    '("int" "width")
    '("int" "height")
  )
)

(define-method validate
  (of-object "MetaGradientSpec")
  (c-name "meta_gradient_spec_validate")
  (return-type "gboolean")
  (parameters
    '("GError**" "error")
  )
)

(define-function alpha_gradient_spec_new
  (c-name "meta_alpha_gradient_spec_new")
  (is-constructor-of "MetaAlphaGradientSpec")
  (return-type "MetaAlphaGradientSpec*")
  (parameters
    '("MetaGradientType" "type")
    '("int" "n_alphas")
  )
)

(define-method free
  (of-object "MetaAlphaGradientSpec")
  (c-name "meta_alpha_gradient_spec_free")
  (return-type "none")
)

(define-method new
  (of-object "MetaFrameStyle")
  (c-name "meta_frame_style_new")
  (return-type "MetaFrameStyle*")
)

(define-method ref
  (of-object "MetaFrameStyle")
  (c-name "meta_frame_style_ref")
  (return-type "none")
)

(define-method unref
  (of-object "MetaFrameStyle")
  (c-name "meta_frame_style_unref")
  (return-type "none")
)

(define-method draw
  (of-object "MetaFrameStyle")
  (c-name "meta_frame_style_draw")
  (return-type "none")
  (parameters
    '("GtkWidget*" "widget")
    '("GdkDrawable*" "drawable")
    '("int" "x_offset")
    '("int" "y_offset")
    '("const-GdkRectangle*" "clip")
    '("const-MetaFrameGeometry*" "fgeom")
    '("int" "client_width")
    '("int" "client_height")
    '("PangoLayout*" "title_layout")
    '("int" "text_height")
    '("MetaButtonState" "button_states[META_BUTTON_TYPE_LAST]")
    '("GdkPixbuf*" "mini_icon")
    '("GdkPixbuf*" "icon")
  )
)

(define-method validate
  (of-object "MetaFrameStyle")
  (c-name "meta_frame_style_validate")
  (return-type "gboolean")
  (parameters
    '("GError**" "error")
  )
)

(define-method new
  (of-object "MetaFrameStyleSet")
  (c-name "meta_frame_style_set_new")
  (return-type "MetaFrameStyleSet*")
)

(define-method ref
  (of-object "MetaFrameStyleSet")
  (c-name "meta_frame_style_set_ref")
  (return-type "none")
)

(define-method unref
  (of-object "MetaFrameStyleSet")
  (c-name "meta_frame_style_set_unref")
  (return-type "none")
)

(define-method validate
  (of-object "MetaFrameStyleSet")
  (c-name "meta_frame_style_set_validate")
  (return-type "gboolean")
  (parameters
    '("GError**" "error")
  )
)

(define-function theme_get_current
  (c-name "meta_theme_get_current")
  (return-type "MetaTheme*")
)

(define-function theme_set_current
  (c-name "meta_theme_set_current")
  (return-type "none")
  (parameters
    '("const-char*" "name")
    '("gboolean" "force_reload")
  )
)

(define-function theme_new
  (c-name "meta_theme_new")
  (is-constructor-of "MetaTheme")
  (return-type "MetaTheme*")
)

(define-method free
  (of-object "MetaTheme")
  (c-name "meta_theme_free")
  (return-type "none")
)

(define-method validate
  (of-object "MetaTheme")
  (c-name "meta_theme_validate")
  (return-type "gboolean")
  (parameters
    '("GError**" "error")
  )
)

(define-method load_image
  (of-object "MetaTheme")
  (c-name "meta_theme_load_image")
  (return-type "GdkPixbuf*")
  (parameters
    '("const-char*" "filename")
    '("guint" "size_of_theme_icons")
    '("GError**" "error")
  )
)

(define-method get_frame_style
  (of-object "MetaTheme")
  (c-name "meta_theme_get_frame_style")
  (return-type "MetaFrameStyle*")
  (parameters
    '("MetaFrameType" "type")
    '("MetaFrameFlags" "flags")
  )
)

(define-method get_title_scale
  (of-object "MetaTheme")
  (c-name "meta_theme_get_title_scale")
  (return-type "double")
  (parameters
    '("MetaFrameType" "type")
    '("MetaFrameFlags" "flags")
  )
)

(define-method draw_frame
  (of-object "MetaTheme")
  (c-name "meta_theme_draw_frame")
  (return-type "none")
  (parameters
    '("GtkWidget*" "widget")
    '("GdkDrawable*" "drawable")
    '("const-GdkRectangle*" "clip")
    '("int" "x_offset")
    '("int" "y_offset")
    '("MetaFrameType" "type")
    '("MetaFrameFlags" "flags")
    '("int" "client_width")
    '("int" "client_height")
    '("PangoLayout*" "title_layout")
    '("int" "text_height")
    '("const-MetaButtonLayout*" "button_layout")
    '("MetaButtonState" "button_states[META_BUTTON_TYPE_LAST]")
    '("GdkPixbuf*" "mini_icon")
    '("GdkPixbuf*" "icon")
  )
)

(define-method draw_menu_icon
  (of-object "MetaTheme")
  (c-name "meta_theme_draw_menu_icon")
  (return-type "none")
  (parameters
    '("GtkWidget*" "widget")
    '("GdkDrawable*" "drawable")
    '("const-GdkRectangle*" "clip")
    '("int" "x_offset")
    '("int" "y_offset")
    '("int" "width")
    '("int" "height")
    '("MetaMenuIconType" "type")
  )
)

(define-method get_frame_borders
  (of-object "MetaTheme")
  (c-name "meta_theme_get_frame_borders")
  (return-type "none")
  (parameters
    '("MetaFrameType" "type")
    '("int" "text_height")
    '("MetaFrameFlags" "flags")
    '("int*" "top_height")
    '("int*" "bottom_height")
    '("int*" "left_width")
    '("int*" "right_width")
  )
)

(define-method calc_geometry
  (of-object "MetaTheme")
  (c-name "meta_theme_calc_geometry")
  (return-type "none")
  (parameters
    '("MetaFrameType" "type")
    '("int" "text_height")
    '("MetaFrameFlags" "flags")
    '("int" "client_width")
    '("int" "client_height")
    '("const-MetaButtonLayout*" "button_layout")
    '("MetaFrameGeometry*" "fgeom")
  )
)

(define-method lookup_layout
  (of-object "MetaTheme")
  (c-name "meta_theme_lookup_layout")
  (return-type "MetaFrameLayout*")
  (parameters
    '("const-char*" "name")
  )
)

(define-method insert_layout
  (of-object "MetaTheme")
  (c-name "meta_theme_insert_layout")
  (return-type "none")
  (parameters
    '("const-char*" "name")
    '("MetaFrameLayout*" "layout")
  )
)

(define-method lookup_draw_op_list
  (of-object "MetaTheme")
  (c-name "meta_theme_lookup_draw_op_list")
  (return-type "MetaDrawOpList*")
  (parameters
    '("const-char*" "name")
  )
)

(define-method insert_draw_op_list
  (of-object "MetaTheme")
  (c-name "meta_theme_insert_draw_op_list")
  (return-type "none")
  (parameters
    '("const-char*" "name")
    '("MetaDrawOpList*" "op_list")
  )
)

(define-method lookup_style
  (of-object "MetaTheme")
  (c-name "meta_theme_lookup_style")
  (return-type "MetaFrameStyle*")
  (parameters
    '("const-char*" "name")
  )
)

(define-method insert_style
  (of-object "MetaTheme")
  (c-name "meta_theme_insert_style")
  (return-type "none")
  (parameters
    '("const-char*" "name")
    '("MetaFrameStyle*" "style")
  )
)

(define-method lookup_style_set
  (of-object "MetaTheme")
  (c-name "meta_theme_lookup_style_set")
  (return-type "MetaFrameStyleSet*")
  (parameters
    '("const-char*" "name")
  )
)

(define-method insert_style_set
  (of-object "MetaTheme")
  (c-name "meta_theme_insert_style_set")
  (return-type "none")
  (parameters
    '("const-char*" "name")
    '("MetaFrameStyleSet*" "style_set")
  )
)

(define-method define_int_constant
  (of-object "MetaTheme")
  (c-name "meta_theme_define_int_constant")
  (return-type "gboolean")
  (parameters
    '("const-char*" "name")
    '("int" "value")
    '("GError**" "error")
  )
)

(define-method lookup_int_constant
  (of-object "MetaTheme")
  (c-name "meta_theme_lookup_int_constant")
  (return-type "gboolean")
  (parameters
    '("const-char*" "name")
    '("int*" "value")
  )
)

(define-method define_float_constant
  (of-object "MetaTheme")
  (c-name "meta_theme_define_float_constant")
  (return-type "gboolean")
  (parameters
    '("const-char*" "name")
    '("double" "value")
    '("GError**" "error")
  )
)

(define-method lookup_float_constant
  (of-object "MetaTheme")
  (c-name "meta_theme_lookup_float_constant")
  (return-type "gboolean")
  (parameters
    '("const-char*" "name")
    '("double*" "value")
  )
)

(define-method replace_constants
  (of-object "MetaTheme")
  (c-name "meta_theme_replace_constants")
  (return-type "char*")
  (parameters
    '("MetaTheme*" "theme")
    '("PosToken*" "tokens")
    '("int" "n_tokens")
    '("GError**" "err")
  )
)

(define-function gtk_widget_get_font_desc
  (c-name "meta_gtk_widget_get_font_desc")
  (return-type "PangoFontDescription*")
  (parameters
    '("GtkWidget*" "widget")
    '("double" "scale")
    '("const-PangoFontDescription*" "override")
  )
)

(define-function pango_font_desc_get_text_height
  (c-name "meta_pango_font_desc_get_text_height")
  (return-type "int")
  (parameters
    '("const-PangoFontDescription*" "font_desc")
    '("PangoContext*" "context")
  )
)

(define-function color_component_from_string
  (c-name "meta_color_component_from_string")
  (return-type "MetaGtkColorComponent")
  (parameters
    '("const-char*" "str")
  )
)

(define-function color_component_to_string
  (c-name "meta_color_component_to_string")
  (return-type "const-char*")
  (parameters
    '("MetaGtkColorComponent" "component")
  )
)

(define-function button_state_from_string
  (c-name "meta_button_state_from_string")
  (return-type "MetaButtonState")
  (parameters
    '("const-char*" "str")
  )
)

(define-method to_string
  (of-object "MetaButtonState")
  (c-name "meta_button_state_to_string")
  (return-type "const-char*")
)

(define-function button_type_from_string
  (c-name "meta_button_type_from_string")
  (return-type "MetaButtonType")
  (parameters
    '("const-char*" "str")
    '("MetaTheme*" "theme")
  )
)

(define-method to_string
  (of-object "MetaButtonType")
  (c-name "meta_button_type_to_string")
  (return-type "const-char*")
)

(define-method to_string
  (of-object "MetaMenuIconType")
  (c-name "meta_menu_icon_type_to_string")
  (return-type "const-char*")
)

(define-function frame_piece_from_string
  (c-name "meta_frame_piece_from_string")
  (return-type "MetaFramePiece")
  (parameters
    '("const-char*" "str")
  )
)

(define-method to_string
  (of-object "MetaFramePiece")
  (c-name "meta_frame_piece_to_string")
  (return-type "const-char*")
)

(define-function frame_state_from_string
  (c-name "meta_frame_state_from_string")
  (return-type "MetaFrameState")
  (parameters
    '("const-char*" "str")
  )
)

(define-method to_string
  (of-object "MetaFrameState")
  (c-name "meta_frame_state_to_string")
  (return-type "const-char*")
)

(define-function frame_resize_from_string
  (c-name "meta_frame_resize_from_string")
  (return-type "MetaFrameResize")
  (parameters
    '("const-char*" "str")
  )
)

(define-method to_string
  (of-object "MetaFrameResize")
  (c-name "meta_frame_resize_to_string")
  (return-type "const-char*")
)

(define-function frame_focus_from_string
  (c-name "meta_frame_focus_from_string")
  (return-type "MetaFrameFocus")
  (parameters
    '("const-char*" "str")
  )
)

(define-method to_string
  (of-object "MetaFrameFocus")
  (c-name "meta_frame_focus_to_string")
  (return-type "const-char*")
)

(define-function frame_type_from_string
  (c-name "meta_frame_type_from_string")
  (return-type "MetaFrameType")
  (parameters
    '("const-char*" "str")
  )
)

(define-method to_string
  (of-object "MetaFrameType")
  (c-name "meta_frame_type_to_string")
  (return-type "const-char*")
)

(define-function gradient_type_from_string
  (c-name "meta_gradient_type_from_string")
  (return-type "MetaGradientType")
  (parameters
    '("const-char*" "str")
  )
)

(define-method to_string
  (of-object "MetaGradientType")
  (c-name "meta_gradient_type_to_string")
  (return-type "const-char*")
)

(define-function gtk_state_from_string
  (c-name "meta_gtk_state_from_string")
  (return-type "GtkStateType")
  (parameters
    '("const-char*" "str")
  )
)

(define-function gtk_state_to_string
  (c-name "meta_gtk_state_to_string")
  (return-type "const-char*")
  (parameters
    '("GtkStateType" "state")
  )
)

(define-function gtk_shadow_from_string
  (c-name "meta_gtk_shadow_from_string")
  (return-type "GtkShadowType")
  (parameters
    '("const-char*" "str")
  )
)

(define-function gtk_shadow_to_string
  (c-name "meta_gtk_shadow_to_string")
  (return-type "const-char*")
  (parameters
    '("GtkShadowType" "shadow")
  )
)

(define-function gtk_arrow_from_string
  (c-name "meta_gtk_arrow_from_string")
  (return-type "GtkArrowType")
  (parameters
    '("const-char*" "str")
  )
)

(define-function gtk_arrow_to_string
  (c-name "meta_gtk_arrow_to_string")
  (return-type "const-char*")
  (parameters
    '("GtkArrowType" "arrow")
  )
)

(define-function image_fill_type_from_string
  (c-name "meta_image_fill_type_from_string")
  (return-type "MetaImageFillType")
  (parameters
    '("const-char*" "str")
  )
)

(define-method to_string
  (of-object "MetaImageFillType")
  (c-name "meta_image_fill_type_to_string")
  (return-type "const-char*")
)


(define-function theme_load
  (c-name "meta_theme_load")
  (return-type "MetaTheme*")
  (parameters
    '("const-char*" "theme_name")
    '("GError**" "err")
  )
)
