;; -*- scheme -*- ;; Copyright (C) 2003, 2004, 2006, 2007 Free Software Foundation, Inc. ;; ;; This program is free software; you can redistribute it and/or ;; modify it under the terms of the GNU General Public License as ;; published by the Free Software Foundation; either version 3 of ;; the License, or (at your option) any later version. ;; ;; This program is distributed in the hope that it will be useful, but ;; WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ;; General Public License for more details. ;; ;; You should have received a copy of the GNU General Public License ;; along with this program. If not, see . ;;; Gtk enums (import "gdk-2.0.defs") (define-func gtk_check_version static_string ((uint major) (uint minor) (uint micro))) (define-enum GtkWindowType (toplevel GTK_WINDOW_TOPLEVEL) ;; Gone in Gtk 2.0 ;; (dialog GTK_WINDOW_DIALOG) (popup GTK_WINDOW_POPUP)) (define-enum GtkStateType (normal GTK_STATE_NORMAL) (active GTK_STATE_ACTIVE) (prelight GTK_STATE_PRELIGHT) (selected GTK_STATE_SELECTED) (insensitive GTK_STATE_INSENSITIVE)) (define-enum GtkDirectionType (tab-forward GTK_DIR_TAB_FORWARD) (tab-backward GTK_DIR_TAB_BACKWARD) (up GTK_DIR_UP) (down GTK_DIR_DOWN) (left GTK_DIR_LEFT) (right GTK_DIR_RIGHT)) (define-enum GtkShadowType (none GTK_SHADOW_NONE) (in GTK_SHADOW_IN) (out GTK_SHADOW_OUT) (etched-in GTK_SHADOW_ETCHED_IN) (etched-out GTK_SHADOW_ETCHED_OUT)) (define-enum GtkArrowType (up GTK_ARROW_UP) (down GTK_ARROW_DOWN) (left GTK_ARROW_LEFT) (right GTK_ARROW_RIGHT)) (define-enum GtkPackType (start GTK_PACK_START) (end GTK_PACK_END)) (define-enum GtkPolicyType (always GTK_POLICY_ALWAYS) (automatic GTK_POLICY_AUTOMATIC) (never GTK_POLICY_NEVER)) (define-enum GtkUpdateType (continuous GTK_UPDATE_CONTINUOUS) (discontinuous GTK_UPDATE_DISCONTINUOUS) (delayed GTK_UPDATE_DELAYED)) (define-enum GtkVisibility (none GTK_VISIBILITY_NONE) (partial GTK_VISIBILITY_PARTIAL) (full GTK_VISIBILITY_FULL)) (define-flags GtkAttachOptions (expand GTK_EXPAND) (shrink GTK_SHRINK) (fill GTK_FILL)) (define-flags GtkSignalRunType (first GTK_RUN_FIRST) (last GTK_RUN_LAST) (both GTK_RUN_BOTH) (no-recurse GTK_RUN_NO_RECURSE) (action GTK_RUN_ACTION) (no-hooks GTK_RUN_NO_HOOKS)) (define-enum GtkWindowPosition (none GTK_WIN_POS_NONE) (center GTK_WIN_POS_CENTER) (mouse GTK_WIN_POS_MOUSE)) (define-enum GtkSubmenuDirection (left GTK_DIRECTION_LEFT) (right GTK_DIRECTION_RIGHT)) (define-enum GtkSubmenuPlacement (top-bottom GTK_TOP_BOTTOM) (left-right GTK_LEFT_RIGHT)) ;; Gone in Gtk 2.0. ;; ;; (define-enum GtkMenuFactoryType ;; (menu GTK_MENU_FACTORY_MENU) ;; (menu-bar GTK_MENU_FACTORY_MENU_BAR) ;; (option-menu GTK_MENU_FACTORY_OPTION_MENU)) (define-enum GtkMetricType (pixels GTK_PIXELS) (inches GTK_INCHES) (centimeters GTK_CENTIMETERS)) (define-enum GtkReliefStyle (normal GTK_RELIEF_NORMAL) (half GTK_RELIEF_HALF) (none GTK_RELIEF_NONE)) (define-enum GtkScrollType (none GTK_SCROLL_NONE) (step-backward GTK_SCROLL_STEP_BACKWARD) (step-forward GTK_SCROLL_STEP_FORWARD) (page-backward GTK_SCROLL_PAGE_BACKWARD) (page-forward GTK_SCROLL_PAGE_FORWARD)) ;; Gone in Gtk 2.0. ;; ;; (define-enum GtkTroughType ;; (none GTK_TROUGH_NONE) ;; (start GTK_TROUGH_START) ;; (end GTK_TROUGH_END)) (define-enum GtkPositionType (left GTK_POS_LEFT) (right GTK_POS_RIGHT) (top GTK_POS_TOP) (bottom GTK_POS_BOTTOM)) (define-enum GtkPreviewType (color GTK_PREVIEW_COLOR) (grayscale GTK_PREVIEW_GRAYSCALE)) ;; (define-flags GtkWidgetFlags ;; (destroyed GTK_DESTROYED) ;; (visible GTK_VISIBLE) ;; (mapped GTK_MAPPED) ;; ;(unmapped GTK_UNMAPPED) ;; (realized GTK_REALIZED) ;; (sensitive GTK_SENSITIVE) ;; (parent-sensitive GTK_PARENT_SENSITIVE) ;; (no-window GTK_NO_WINDOW) ;; (has-focus GTK_HAS_FOCUS) ;; (can-focus GTK_CAN_FOCUS) ;; (has-default GTK_HAS_DEFAULT) ;; (can-default GTK_CAN_DEFAULT) ;; ;(propagate-state GTK_PROPAGATE_STATE) ;; ;(anchored GTK_ANCHORED) ;; (basic GTK_BASIC) ;; ;(user-style GTK_USER_STYLE ;; (has-grab GTK_HAS_GRAB) ;; (toplevel GTK_TOPLEVEL)) (define-flags GtkWidgetFlags (toplevel GTK_TOPLEVEL) (no-window GTK_NO_WINDOW) (realized GTK_REALIZED) (mapped GTK_MAPPED) (visible GTK_VISIBLE) (sensitive GTK_SENSITIVE) (parent-sensitive GTK_PARENT_SENSITIVE) (can-focus GTK_CAN_FOCUS) (has-focus GTK_HAS_FOCUS) (can-default GTK_CAN_DEFAULT) (has-default GTK_HAS_DEFAULT) (has-grab GTK_HAS_GRAB) (rc-style GTK_RC_STYLE) (composite-child GTK_COMPOSITE_CHILD)) (define-enum GtkSelectionMode (single GTK_SELECTION_SINGLE) (browse GTK_SELECTION_BROWSE) (multiple GTK_SELECTION_MULTIPLE) (extended GTK_SELECTION_EXTENDED)) (define-enum GtkOrientation (horizontal GTK_ORIENTATION_HORIZONTAL) (vertical GTK_ORIENTATION_VERTICAL)) (define-enum GtkToolbarStyle (icons GTK_TOOLBAR_ICONS) (text GTK_TOOLBAR_TEXT) (both GTK_TOOLBAR_BOTH)) (define-enum GtkToolbarChildType (space GTK_TOOLBAR_CHILD_SPACE) (button GTK_TOOLBAR_CHILD_BUTTON) (toggle-button GTK_TOOLBAR_CHILD_TOGGLEBUTTON) (radio-button GTK_TOOLBAR_CHILD_RADIOBUTTON) (widget GTK_TOOLBAR_CHILD_WIDGET)) (define-enum GtkButtonBoxStyle (default-style GTK_BUTTONBOX_DEFAULT_STYLE) (spread GTK_BUTTONBOX_SPREAD) (edge GTK_BUTTONBOX_EDGE) (start GTK_BUTTONBOX_START) (end GTK_BUTTONBOX_END)) (define-enum GtkTreeViewMode (line GTK_TREE_VIEW_LINE) (item GTK_TREE_VIEW_ITEM)) (define-enum GtkCurveType (linear GTK_CURVE_TYPE_LINEAR) (spline GTK_CURVE_TYPE_SPLINE) (free GTK_CURVE_TYPE_FREE)) (define-enum GtkFundamentalType ;; no GType for this, probably doesn't make sense to have one either ((gettypefuncname "NULL")) (invalid GTK_TYPE_INVALID) (none GTK_TYPE_NONE) (char GTK_TYPE_CHAR) (bool GTK_TYPE_BOOL) (int GTK_TYPE_INT) (uint GTK_TYPE_UINT) (long GTK_TYPE_LONG) (ulong GTK_TYPE_ULONG) (float GTK_TYPE_FLOAT) (string GTK_TYPE_STRING) (enum GTK_TYPE_ENUM) (flags GTK_TYPE_FLAGS) (boxed GTK_TYPE_BOXED) ;; (foreign GTK_TYPE_FOREIGN) ;; (callback GTK_TYPE_CALLBACK) ;; (args GTK_TYPE_ARGS) (pointer GTK_TYPE_POINTER) ;; (signal GTK_TYPE_SIGNAL) ;; (c-callback GTK_TYPE_C_CALLBACK) ;; FIXME: Not a constant in Gtk 2.0. ;; (object GTK_TYPE_OBJECT) ) (define-enum GtkJustification (left GTK_JUSTIFY_LEFT) (right GTK_JUSTIFY_RIGHT) (center GTK_JUSTIFY_CENTER) (fill GTK_JUSTIFY_FILL)) (define-enum GtkSpinButtonUpdatePolicy (always GTK_UPDATE_ALWAYS) (if-valid GTK_UPDATE_IF_VALID)) (define-enum GtkSpinType (step-forward GTK_SPIN_STEP_FORWARD) (step-backward GTK_SPIN_STEP_BACKWARD) (page-forward GTK_SPIN_PAGE_FORWARD) (page-backward GTK_SPIN_PAGE_BACKWARD) (home GTK_SPIN_HOME) (end GTK_SPIN_END) (user-defined GTK_SPIN_USER_DEFINED)) (define-enum GtkCellType (empty GTK_CELL_EMPTY) (text GTK_CELL_TEXT) (pixmap GTK_CELL_PIXMAP) (pixtext GTK_CELL_PIXTEXT) (widget GTK_CELL_WIDGET)) (define-enum GtkSortType (ascending GTK_SORT_ASCENDING) (descending GTK_SORT_DESCENDING)) (define-flags GtkArgFlags (readable GTK_ARG_READABLE) (writeable GTK_ARG_WRITABLE) (construct GTK_ARG_CONSTRUCT) (construct-only GTK_ARG_CONSTRUCT_ONLY) (child-arg GTK_ARG_CHILD_ARG) (readwrite GTK_ARG_READWRITE)) (define-flags GtkAccelFlags (visible GTK_ACCEL_VISIBLE) ;; Gone in Gtk 2.0. ;; (signal-visible GTK_ACCEL_SIGNAL_VISIBLE) (locked GTK_ACCEL_LOCKED)) (define-enum GtkAnchorType (center GTK_ANCHOR_CENTER) (north GTK_ANCHOR_NORTH) (north-west GTK_ANCHOR_NORTH_WEST) (north-east GTK_ANCHOR_NORTH_EAST) (south GTK_ANCHOR_SOUTH) (south-west GTK_ANCHOR_SOUTH_WEST) (south-east GTK_ANCHOR_SOUTH_EAST) (west GTK_ANCHOR_WEST) (east GTK_ANCHOR_EAST)) (define-flags GtkDestDefaults (motion GTK_DEST_DEFAULT_MOTION) (highlight GTK_DEST_DEFAULT_HIGHLIGHT) (drop GTK_DEST_DEFAULT_DROP) (all GTK_DEST_DEFAULT_ALL)) (define-enum GtkTextDirection (none GTK_TEXT_DIR_NONE) (ltr GTK_TEXT_DIR_LTR) (rtl GTK_TEXT_DIR_RTL)) ;;; Gtk boxed types (define-object GtkAccelGroup (GObject)) (define-object GtkStyle (GObject) (fields (GdkGC white_gc) (GdkGC black_gc) ;; Gone in Gtk 2.0 (now pango). ;; (GdkFont font) )) ;; GtkObject, GtkWidget, needed early (define-object GtkObject ()) (define-object GtkWidget (GtkObject) (fields (uint requisition-width (cname requisition.width)) (uint requisition-height (cname requisition.height)) (int allocation-x (cname allocation.x)) (int allocation-y (cname allocation.y)) (uint allocation-width (cname allocation.width)) (uint allocation-height (cname allocation.height)) (GtkStyle style) (GdkWindow window))) ;;; GtkStyle funcs (define-func gtk_style_get_white_interp GdkColor ((GtkStyle style))) (define-func gtk_style_white GdkColor ((GtkStyle style))) (define-func gtk_style_black GdkColor ((GtkStyle style))) (define-func gtk_style_fg GdkColor ((GtkStyle style) (GtkStateType state))) (define-func gtk_style_bg GdkColor ((GtkStyle style) (GtkStateType state))) (define-func gtk_style_light GdkColor ((GtkStyle style) (GtkStateType state))) (define-func gtk_style_dark GdkColor ((GtkStyle style) (GtkStateType state))) (define-func gtk_style_mid GdkColor ((GtkStyle style) (GtkStateType state))) (define-func gtk_style_text GdkColor ((GtkStyle style) (GtkStateType state))) (define-func gtk_style_base GdkColor ((GtkStyle style) (GtkStateType state))) (define-func gtk_style_fg_gc GdkGC ((GtkStyle style) (GtkStateType state))) (define-func gtk_style_bg_gc GdkGC ((GtkStyle style) (GtkStateType state))) (define-func gtk_style_light_gc GdkGC ((GtkStyle style) (GtkStateType state))) (define-func gtk_style_dark_gc GdkGC ((GtkStyle style) (GtkStateType state))) (define-func gtk_style_mid_gc GdkGC ((GtkStyle style) (GtkStateType state))) (define-func gtk_style_text_gc GdkGC ((GtkStyle style) (GtkStateType state))) (define-func gtk_style_base_gc GdkGC ((GtkStyle style) (GtkStateType state))) (define-func gtk_style_set_background none ((GtkStyle style) (GdkWindow window) (GtkStateType state))) (define-func gtk_style_apply_default_background none ((GtkStyle style) (GdkWindow window) (bool set_bg) (GtkStateType state_type) (rect area) (int x) (int y) (int width) (int height))) (define-func gtk_draw_hline none ((GtkStyle style) (GdkWindow window) (GtkStateType state_type) (int x1) (int x2) (int y))) (define-func gtk_draw_vline none ((GtkStyle style) (GdkWindow window) (GtkStateType state_type) (int y1) (int y2) (int x))) (define-func gtk_draw_shadow none ((GtkStyle style) (GdkWindow window) (GtkStateType state_type) (GtkShadowType shadow_type) (int x) (int y) (int width) (int height))) (define-func gtk_draw_polygon none ((GtkStyle style) (GdkWindow window) (GtkStateType state_type) (GtkShadowType shadow_type) ((cvecr point) points) (bool fill))) (define-func gtk_draw_arrow none ((GtkStyle style) (GdkWindow window) (GtkStateType state_type) (GtkShadowType shadow_type) (GtkArrowType arrow_type) (bool fill) (int x) (int y) (int width) (int height))) (define-func gtk_draw_diamond none ((GtkStyle style) (GdkWindow window) (GtkStateType state_type) (GtkShadowType shadow_type) (int x) (int y) (int width) (int height))) ;; Gone in Gtk 2.0. ;; ;; (define-func gtk_draw_oval ;; none ;; ((GtkStyle style) ;; (GdkWindow window) ;; (GtkStateType state_type) ;; (GtkShadowType shadow_type) ;; (int x) ;; (int y) ;; (int width) ;; (int height))) (define-func gtk_draw_string none ((GtkStyle style) (GdkWindow window) (GtkStateType state_type) (int x) (int y) (string string))) (define-func gtk_draw_box none ((GtkStyle style) (GdkWindow window) (GtkStateType state_type) (GtkShadowType shadow_type) (int x) (int y) (int width) (int height))) (define-func gtk_draw_flat_box none ((GtkStyle style) (GdkWindow window) (GtkStateType state_type) (GtkShadowType shadow_type) (int x) (int y) (int width) (int height))) (define-func gtk_draw_check none ((GtkStyle style) (GdkWindow window) (GtkStateType state_type) (GtkShadowType shadow_type) (int x) (int y) (int width) (int height))) (define-func gtk_draw_option none ((GtkStyle style) (GdkWindow window) (GtkStateType state_type) (GtkShadowType shadow_type) (int x) (int y) (int width) (int height))) ;; Gone in Gtk 2.0. ;; ;; (define-func gtk_draw_cross ;; none ;; ((GtkStyle style) ;; (GdkWindow window) ;; (GtkStateType state_type) ;; (GtkShadowType shadow_type) ;; (int x) ;; (int y) ;; (int width) ;; (int height))) ;; Gone in Gtk 2.0. ;; ;; (define-func gtk_draw_ramp ;; none ;; ((GtkStyle style) ;; (GdkWindow window) ;; (GtkStateType state_type) ;; (GtkShadowType shadow_type) ;; (GtkArrowType arrow_type) ;; (int x) ;; (int y) ;; (int width) ;; (int height))) (define-func gtk_draw_tab none ((GtkStyle style) (GdkWindow window) (GtkStateType state_type) (GtkShadowType shadow_type) (int x) (int y) (int width) (int height))) (define-func gtk_draw_shadow_gap none ((GtkStyle style) (GdkWindow window) (GtkStateType state_type) (GtkShadowType shadow_type) (int x) (int y) (int width) (int height) (GtkPositionType gap_side) (int gap_x) (int gap_width))) (define-func gtk_draw_box_gap none ((GtkStyle style) (GdkWindow window) (GtkStateType state_type) (GtkShadowType shadow_type) (int x) (int y) (int width) (int height) (GtkPositionType gap_side) (int gap_x) (int gap_width))) (define-func gtk_draw_extension none ((GtkStyle style) (GdkWindow window) (GtkStateType state_type) (GtkShadowType shadow_type) (int x) (int y) (int width) (int height) (GtkPositionType gap_side))) (define-func gtk_draw_focus none ((GtkStyle style) (GdkWindow window) (int x) (int y) (int width) (int height))) (define-func gtk_draw_slider none ((GtkStyle style) (GdkWindow window) (GtkStateType state_type) (GtkShadowType shadow_type) (int x) (int y) (int width) (int height) (GtkOrientation orientation))) (define-func gtk_draw_handle none ((GtkStyle style) (GdkWindow window) (GtkStateType state_type) (GtkShadowType shadow_type) (int x) (int y) (int width) (int height) (GtkOrientation orientation))) (define-func gtk_paint_hline none ((GtkStyle style) (GdkWindow window) (GtkStateType state_type) (rect-null-ok area) (GtkWidget widget) (string detail (null-ok)) (int x1) (int x2) (int y))) (define-func gtk_paint_vline none ((GtkStyle style) (GdkWindow window) (GtkStateType state_type) (rect-null-ok area) (GtkWidget widget) (string detail (null-ok)) (int y1) (int y2) (int x))) (define-func gtk_paint_shadow none ((GtkStyle style) (GdkWindow window) (GtkStateType state_type) (GtkShadowType shadow_type) (rect-null-ok area) (GtkWidget widget) (string detail (null-ok)) (int x) (int y) (int width) (int height))) (define-func gtk_paint_polygon none ((GtkStyle style) (GdkWindow window) (GtkStateType state_type) (GtkShadowType shadow_type) (rect-null-ok area) (GtkWidget widget) (string detail (null-ok)) ((cvecr point) points) (bool fill))) (define-func gtk_paint_arrow none ((GtkStyle style) (GdkWindow window) (GtkStateType state_type) (GtkShadowType shadow_type) (rect-null-ok area) (GtkWidget widget) (string detail (null-ok)) (GtkArrowType arrow_type) (bool fill) (int x) (int y) (int width) (int height))) (define-func gtk_paint_diamond none ((GtkStyle style) (GdkWindow window) (GtkStateType state_type) (GtkShadowType shadow_type) (rect-null-ok area) (GtkWidget widget) (string detail (null-ok)) (int x) (int y) (int width) (int height))) ;; Gone in Gtk 2.0. ;; ;; (define-func gtk_paint_oval ;; none ;; ((GtkStyle style) ;; (GdkWindow window) ;; (GtkStateType state_type) ;; (GtkShadowType shadow_type) ;; (rect-null-ok area) ;; (GtkWidget widget) ;; (string detail (null-ok)) ;; (int x) ;; (int y) ;; (int width) ;; (int height))) (define-func gtk_paint_string none ((GtkStyle style) (GdkWindow window) (GtkStateType state_type) (rect-null-ok area) (GtkWidget widget) (string detail (null-ok)) (int x) (int y) (string string))) (define-func gtk_paint_box none ((GtkStyle style) (GdkWindow window) (GtkStateType state_type) (GtkShadowType shadow_type) (rect-null-ok area) (GtkWidget widget) (string detail (null-ok)) (int x) (int y) (int width) (int height))) (define-func gtk_paint_flat_box none ((GtkStyle style) (GdkWindow window) (GtkStateType state_type) (GtkShadowType shadow_type) (rect-null-ok area) (GtkWidget widget) (string detail (null-ok)) (int x) (int y) (int width) (int height))) (define-func gtk_paint_check none ((GtkStyle style) (GdkWindow window) (GtkStateType state_type) (GtkShadowType shadow_type) (rect-null-ok area) (GtkWidget widget) (string detail (null-ok)) (int x) (int y) (int width) (int height))) (define-func gtk_paint_option none ((GtkStyle style) (GdkWindow window) (GtkStateType state_type) (GtkShadowType shadow_type) (rect-null-ok area) (GtkWidget widget) (string detail (null-ok)) (int x) (int y) (int width) (int height))) ;; Gone in Gtk 2.0. ;; ;; (define-func gtk_paint_cross ;; none ;; ((GtkStyle style) ;; (GdkWindow window) ;; (GtkStateType state_type) ;; (GtkShadowType shadow_type) ;; (rect-null-ok area) ;; (GtkWidget widget) ;; (string detail (null-ok)) ;; (int x) ;; (int y) ;; (int width) ;; (int height))) ;; Gone in Gtk 2.0. ;; ;; (define-func gtk_paint_ramp ;; none ;; ((GtkStyle style) ;; (GdkWindow window) ;; (GtkStateType state_type) ;; (GtkShadowType shadow_type) ;; (rect-null-ok area) ;; (GtkWidget widget) ;; (string detail (null-ok)) ;; (GtkArrowType arrow_type) ;; (int x) ;; (int y) ;; (int width) ;; (int height))) (define-func gtk_paint_tab none ((GtkStyle style) (GdkWindow window) (GtkStateType state_type) (GtkShadowType shadow_type) (rect-null-ok area) (GtkWidget widget) (string detail (null-ok)) (int x) (int y) (int width) (int height))) (define-func gtk_paint_shadow_gap none ((GtkStyle style) (GdkWindow window) (GtkStateType state_type) (GtkShadowType shadow_type) (rect-null-ok area) (GtkWidget widget) (string detail (null-ok)) (int x) (int y) (int width) (int height) (GtkPositionType gap_side) (int gap_x) (int gap_width))) (define-func gtk_paint_box_gap none ((GtkStyle style) (GdkWindow window) (GtkStateType state_type) (GtkShadowType shadow_type) (rect-null-ok area) (GtkWidget widget) (string detail (null-ok)) (int x) (int y) (int width) (int height) (GtkPositionType gap_side) (int gap_x) (int gap_width))) (define-func gtk_paint_extension none ((GtkStyle style) (GdkWindow window) (GtkStateType state_type) (GtkShadowType shadow_type) (rect-null-ok area) (GtkWidget widget) (string detail (null-ok)) (int x) (int y) (int width) (int height) (GtkPositionType gap_side))) (define-func gtk_paint_focus none ((GtkStyle style) (GdkWindow window) (GtkStateType state_type) (rect-null-ok area) (GtkWidget widget) (string detail (null-ok)) (int x) (int y) (int width) (int height))) (define-func gtk_paint_slider none ((GtkStyle style) (GdkWindow window) (GtkStateType state_type) (GtkShadowType shadow_type) (rect-null-ok area) (GtkWidget widget) (string detail (null-ok)) (int x) (int y) (int width) (int height) (GtkOrientation orientation))) (define-func gtk_paint_handle none ((GtkStyle style) (GdkWindow window) (GtkStateType state_type) (GtkShadowType shadow_type) (rect-null-ok area) (GtkWidget widget) (string detail (null-ok)) (int x) (int y) (int width) (int height) (GtkOrientation orientation))) ;;; GtkSelectionData (define-boxed GtkSelectionData (copy gtk_fake_copy) (free gtk_no_free) (cleanup sgtk_boxed_invalidate) (size "sizeof(GtkSelectionData)") (fields (atom selection) (atom target) (atom type) (int format))) (define-func gtk_selection_data_data SCM ((GtkSelectionData data))) ;;; Functions ;; main (define-func gtk_exit none ((int code (= "0")))) (define-func gtk_set_locale static_string ()) (define-func gtk_main none () (undeferred #t)) (define-func gtk_main_level int ()) (define-func gtk_main_quit none ()) (define-func gtk_main_iteration bool ()) (define-func gtk_main_iteration_do bool ((bool val))) (define-func gtk_true bool ()) (define-func gtk_false bool ()) (define-func gtk_events_pending bool ()) (define-func gtk_timeout_add_full int ((int interval) (full-callback function)) (scm-name "gtk-timeout-add") (protection #t)) (define-func gtk_timeout_remove none ((int tag))) ;;(define-func gtk_idle_add ;; int ;; ((full-callback function))) ;; As it stands this is more like gtk-idle-add-priority (see gtk.scm). ;; Clearly there's no point in having the marshalling at the scheme level, ;; but maybe the destroy callback could be made available. ;; (define-func gtk_idle_add_full int ((int priority) (full-callback function)) (protection #t)) (define-func gtk_idle_remove none ((int tag))) (define-func gtk_input_add_full int ((file-descriptor source) (GdkInputCondition condition) (full-callback callback)) (protection #t) (scm-name "gtk-input-add")) (define-func gtk_input_remove none ((int tag))) (define-func gtk_get_current_event (GdkEvent (copy #f)) ;; return to be freed with gdk_event_free ()) ;; GtkRc (define-func gtk_rc_add_default_file none ((string filename))) (define-func gtk_rc_get_default_files_interp SCM ;; list of strings ()) (define-func gtk_rc_parse none ((string file))) (define-func gtk_rc_parse_string none ((string string))) (define-func gtk_rc_reparse_all bool ()) (define-func g_mem_chunk_info none ()) ;; GtkObject (define-func gtk_object_destroy none ((GtkObject object))) ;; Gone in Gtk 2.0. ;; ;; (define-func GTK_OBJECT_DESTROYED ;; bool ;; ((GtkObject object))) (define-func GTK_OBJECT_TYPE type ((GtkObject object))) ;; Gone in Gtk 2.0. ;; ;; (define-func gtk_object_query_args_interp ;; SCM ;; ((type type))) ;; Signals ;; This was the old way in gtk 1.2: ;; ;; (define-func gtk_signal_connect_full ;; int ;; ((GtkObject object) ;; (string name) ;; (full-callback func) ;; (bool object_signal (= "0")) ;; (bool after (= "0"))) ;; (scm-name "gtk-signal-connect") ;; (protection object)) (define-func gtk_signal_connect_interp ulong ((SCM object) (string name) (SCM func) (bool object_signal (= "0")) (bool after (= "0"))) (scm-name "gtk-signal-connect") ;; (protection object) ) (define-func gtk_signal_disconnect none ((GtkObject object) (int id))) ;; GtkWidget (define-func gtk_grab_add none ((GtkWidget widget))) (define-func gtk_grab_get_current GtkWidget ()) (define-func gtk_grab_remove none ((GtkWidget widget))) (define-func GTK_WIDGET_STATE GtkStateType ((GtkWidget widget))) (define-func GTK_WIDGET_FLAGS GtkWidgetFlags ((GtkWidget widget))) (define-func GTK_WIDGET_SET_FLAGS none ((GtkWidget widget) (GtkWidgetFlags flags))) (define-func GTK_WIDGET_UNSET_FLAGS none ((GtkWidget widget) (GtkWidgetFlags flags))) ;; XXX - gtk_widget_new or gtk_widget_newv would be really useful ;; (maybe also gtk_widget_set(v), gtk_widget_get(v)) (define-func gtk_widget_destroy none ((GtkWidget widget))) (define-func gtk_widget_unparent none ((GtkWidget widget))) (define-func gtk_widget_show none ((GtkWidget widget))) (define-func gtk_widget_hide none ((GtkWidget widget))) (define-func gtk_widget_show_all none ((GtkWidget widget))) (define-func gtk_widget_hide_all none ((GtkWidget widget))) (define-func gtk_widget_map none ((GtkWidget widget))) (define-func gtk_widget_unmap none ((GtkWidget widget))) (define-func gtk_widget_realize none ((GtkWidget widget))) (define-func gtk_widget_unrealize none ((GtkWidget widget))) (define-func gtk_widget_queue_draw none ((GtkWidget widget))) (define-func gtk_widget_queue_draw_area none ((GtkWidget widget) (int x) (int y) (int width) (int height))) (define-func gtk_widget_queue_clear none ((GtkWidget widget))) (define-func gtk_widget_queue_clear_area none ((GtkWidget widget) (int x) (int y) (int width) (int height))) (define-func gtk_widget_size_request_interp SCM ;; pair (WIDTH . HEIGHT) ((GtkWidget widget))) (define-func gtk_widget_add_accelerator none ((GtkWidget widget) (string accel_signal) (GtkAccelGroup accel_group) (uint accel_key) (GdkModifierType accel_mods) (GtkAccelFlags accel_flags))) ;;(define-func gtk_widget_install_accelerator ;; none ;; ((GtkWidget widget) ;; (GtkAcceleratorTable table) ;; (string signal_name) ;; (char key) ;; (uint modifiers))) ;;(define-func gtk_widget_remove_accelerator ;; none ;; ((GtkWidget widget) ;; (GtkAcceleratorTable table) ;; (string signal_name))) (define-func gtk_widget_event bool ((GtkWidget widget) (GdkEvent event))) (define-func gtk_widget_activate none ((GtkWidget widget))) (define-func gtk_widget_reparent none ((GtkWidget widget) (GtkWidget new_parent))) ;; Gone in Gtk 2.0. ;; ;; (define-func gtk_widget_popup ;; none ;; ((GtkWidget widget) ;; (int x) ;; (int y))) ;; (define-func gtk_widget_basic ;; bool ;; ((GtkWidget widget))) (define-func gtk_widget_grab_focus none ((GtkWidget widget))) (define-func gtk_widget_grab_default none ((GtkWidget widget))) (define-func gtk_widget_set_name none ((GtkWidget widget) (string name))) (define-func gtk_widget_get_name static_string ((GtkWidget widget))) (define-func gtk_widget_set_state none ((GtkWidget widget) (GtkStateType state))) (define-func gtk_widget_set_sensitive none ((GtkWidget widget) (bool sensitive))) (define-func gtk_widget_set_parent none ((GtkWidget widget) (GtkWidget parent))) (define-func gtk_widget_set_style none ((GtkWidget widget) (GtkStyle style (null-ok)))) (define-func gtk_widget_set_rc_style none ((GtkWidget widget))) (define-func gtk_widget_ensure_style none ((GtkWidget widget))) (define-func gtk_widget_set_uposition none ((GtkWidget widget) (int x) (int y))) (define-func gtk_widget_set_usize none ((GtkWidget widget) (int height) (int width))) (define-func gtk_widget_set_events none ((GtkWidget widget) (GdkEventMask events))) (define-func gtk_widget_add_events none ((GtkWidget widget) (GdkEventMask events))) (define-func gtk_widget_set_extension_events none ((GtkWidget widget) (GdkEventMask events))) (define-func gtk_widget_get_toplevel GtkWidget ((GtkWidget widget))) ;;(define-func gtk_widget_get_ancestor ;; GtkWidget ;; ((GtkWidget widget) ;; (GtkType type))) (define-func gtk_widget_get_colormap GdkColormap ((GtkWidget widget))) (define-func gtk_widget_get_visual GdkVisual ((GtkWidget widget))) (define-func gtk_widget_get_style GtkStyle ((GtkWidget widget))) (define-func gtk_widget_get_events GdkEventMask ((GtkWidget widget))) (define-func gtk_widget_get_extension_events GdkEventMask ((GtkWidget widget))) (define-func gtk_widget_get_pointer (none (values (x y))) ((GtkWidget widget) (int x) (int y))) (define-func gtk_widget_is_ancestor bool ((GtkWidget widget) (GtkWidget ancestor))) (define-func gtk_widget_push_colormap none ((GdkColormap cmap))) (define-func gtk_widget_push_visual none ((GdkVisual visual))) ;; Gone in Gtk 2.0. ;; ;; (define-func gtk_widget_push_style ;; none ;; ((GtkStyle style))) (define-func gtk_widget_pop_colormap none ()) (define-func gtk_widget_pop_visual none ()) ;; Gone in Gtk 2.0. ;; ;; (define-func gtk_widget_pop_style ;; none ;; ()) (define-func gtk_widget_set_default_colormap none ((GdkColormap cmap))) (define-func gtk_widget_set_default_visual none ((GdkVisual visual))) ;; (define-func gtk_widget_set_default_style ;; none ;; ((GtkStyle style))) (define-func gtk_widget_get_default_colormap GdkColormap ()) (define-func gtk_widget_get_default_visual GdkVisual ()) (define-func gtk_widget_get_default_style GtkStyle ()) ;; XXX - need GdkBitmap for the shape mask ;; (define-func gtk_widget_shape_combine_mask) (define-func gtk_widget_get_parent GtkWidget ((GtkWidget widget))) (define-func gtk_widget_get_display GdkDisplay ((GtkWidget widget))) (define-func gtk_widget_create_pango_layout (PangoLayout (copy #f)) ((GtkWidget widget) (string text (= NULL) (null-ok)))) (define-func gtk_widget_create_pango_context PangoContext ((GtkWidget widget))) (define-func gtk_widget_get_pango_context PangoContext ((GtkWidget widget))) (define-func gtk_widget_get_direction GtkTextDirection ((GtkWidget widget))) (define-func gtk_widget_set_direction none ((GtkWidget widget) (GtkTextDirection dir))) (define-func gtk_widget_get_default_direction GtkTextDirection ()) (define-func gtk_widget_set_default_direction none ((GtkTextDirection dir))) ;;; DnD stuff ... (define-func gtk_drag_get_data none ((GtkWidget widget) (GdkDragContext context) (atom target) (uint time))) (define-func gtk_drag_finish none ((GdkDragContext context) (bool success) (bool del) (uint time))) (define-func gtk_drag_get_source_widget GtkWidget ((GdkDragContext context))) (define-func gtk_drag_highlight none ((GtkWidget widget))) (define-func gtk_drag_unhighlight none ((GtkWidget widget))) (define-func gtk_drag_dest_set none ((GtkWidget widget) (GtkDestDefaults flags) ((cvecr GtkTargetEntry) targets) (GdkDragAction actions))) (define-func gtk_drag_dest_set_proxy none ((GtkWidget widget) (GdkWindow proxy_window) (GdkDragProtocol protocol) (bool use_coordinates))) (define-func gtk_drag_dest_unset none ((GtkWidget widget))) (define-func gtk_drag_source_set none ((GtkWidget widget) (GdkModifierType start_button_mask) ((cvecr GtkTargetEntry) targets) (GdkDragAction actions))) (define-func gtk_drag_source_unset none ((GtkWidget widget))) (define-func gtk_drag_source_set_icon none ((GtkWidget widget) (GdkColormap colormap) (GdkPixmap pixmap) (GdkBitmap mask))) ; todo gtk_drag_begin (define-func gtk_drag_set_icon_widget none ((GdkDragContext context) (GtkWidget widget) (int hot_x) (int hot_y))) (define-func gtk_drag_set_icon_pixmap none ((GdkDragContext context) (GdkColormap colormap) (GdkPixmap pixmap) (GdkBitmap mask) (int hot_x) (int hot_y))) (define-func gtk_drag_set_icon_default none ((GdkDragContext context))) (define-func gtk_drag_set_default_icon none ((GdkColormap colormap) (GdkPixmap pixmap) (GdkBitmap mask) (int hot_x) (int hot_y))) ;;; Container (define-object GtkContainer (GtkWidget)) (define-func gtk_container_border_width none ((GtkContainer container) (int border_width))) (define-func gtk_container_add none ((GtkContainer container) (GtkWidget widget))) (define-func gtk_container_remove none ((GtkContainer container) (GtkWidget widget))) (define-func gtk_container_foreach_full none ((GtkContainer container) (full-callback function)) (scm-name "gtk-container-foreach-full") (protection #t)) (define-func gtk_container_children_interp SCM ;; list of GtkWidget ((GtkContainer container))) ;; Gone in Gtk 2.0. ;; ;; (define-func gtk_container_focus ;; GtkDirectionType ;; ((GtkContainer container) ;; (GtkDirectionType direction))) ;; ;; (define-func gtk_container_register_toplevel ;; none ;; ((GtkContainer container))) ;; ;; (define-func gtk_container_unregister_toplevel ;; none ;; ((GtkContainer container))) ;; ;; (define-func gtk_container_query_child_args_interp ;; SCM ;; ((type type))) ;;; Fixed (define-object GtkFixed (GtkContainer)) (define-func gtk_fixed_new GtkWidget ()) (define-func gtk_fixed_put none ((GtkFixed fixed) (GtkWidget widget) (int x) (int y))) (define-func gtk_fixed_move none ((GtkFixed fixed) (GtkWidget widget) (int x) (int y))) ;; TreeItem (define-object GtkTreeItem (GtkItem) (fields (bool expanded) (GtkWidget subtree))) (define-func gtk_tree_item_new GtkWidget ()) (define-func gtk_tree_item_new_with_label GtkWidget ((string label))) (define-func gtk_tree_item_set_subtree none ((GtkTreeItem tree_item) (GtkWidget subtree))) (define-func gtk_tree_item_remove_subtree none ((GtkTreeItem tree_item))) (define-func gtk_tree_item_select none ((GtkTreeItem tree_item))) (define-func gtk_tree_item_deselect none ((GtkTreeItem tree_item))) (define-func gtk_tree_item_expand none ((GtkTreeItem tree_item))) (define-func gtk_tree_item_collapse none ((GtkTreeItem tree_item))) ;;; Tree (define-object GtkTree (GtkContainer)) (define-func gtk_tree_new GtkWidget ()) (define-func gtk_tree_append none ((GtkTree tree) (GtkWidget child))) (define-func gtk_tree_prepend none ((GtkTree tree) (GtkWidget child))) (define-func gtk_tree_insert none ((GtkTree tree) (GtkWidget child) (int position))) (define-func gtk_tree_remove_item none ((GtkTree tree) (GtkWidget child))) ;; XXX - need GList support ;; (define-func gtk_tree_remove_items) (define-func gtk_tree_clear_items none ((GtkTree tree) (int start) (int end))) (define-func gtk_tree_select_item none ((GtkTree tree) (int item))) (define-func gtk_tree_unselect_item none ((GtkTree tree) (int item))) (define-func gtk_tree_select_child none ((GtkTree tree) (GtkWidget child))) (define-func gtk_tree_unselect_child none ((GtkTree tree) (GtkWidget child))) (define-func gtk_tree_child_position int ((GtkTree tree) (GtkWidget child))) (define-func gtk_tree_set_selection_mode none ((GtkTree tree) (GtkSelectionMode mode))) (define-func gtk_tree_set_view_mode none ((GtkTree tree) (GtkTreeViewMode mode))) (define-func gtk_tree_set_view_lines none ((GtkTree tree) (bool flag))) ;; Gone in Gtk 2.0. ;; ;; Data ;; ;; (define-object GtkData (GtkObject)) ;; Adjustment (define-object GtkAdjustment (GtkObject) (fields (float value) (float lower (setter #t)) (float upper (setter #t)) (float step_increment (setter #t)) (float page_increment (setter #t)) (float page_size (setter #t)))) (define-func gtk_adjustment_new GtkObject ((float value) (float lower) (float upper) (float step_increment) (float page_increment) (float page_size))) (define-func gtk_adjustment_changed none ((GtkAdjustment adjustment))) (define-func gtk_adjustment_value_changed none ((GtkAdjustment adjustment))) (define-func gtk_adjustment_clamp_page none ((GtkAdjustment adjustment) (float lower) (float upper))) (define-func gtk_adjustment_set_value none ((GtkAdjustment adjustment) (float value))) ;;; GtkCList (define-object GtkCList (GtkContainer) (fields ((list int) selection))) (define-func gtk_clist_new GtkWidget ((int columns))) (define-func gtk_clist_new_with_titles GtkWidget (((cvec string) titles))) (define-func gtk_clist_set_hadjustment none ((GtkCList clist) (GtkAdjustment adjustment))) (define-func gtk_clist_set_vadjustment none ((GtkCList clist) (GtkAdjustment adjustment))) (define-func gtk_clist_get_hadjustment GtkAdjustment ((GtkCList clist))) (define-func gtk_clist_get_vadjustment GtkAdjustment ((GtkCList clist))) (define-func gtk_clist_set_shadow_type none ((GtkCList clist) (GtkShadowType type))) (define-func gtk_clist_set_selection_mode none ((GtkCList clist) (GtkSelectionMode mode))) (define-func gtk_clist_set_reorderable none ((GtkCList clist) (bool reorderable))) (define-func gtk_clist_set_use_drag_icons none ((GtkCList list) (bool use_icons))) (define-func gtk_clist_set_button_actions none ((GtkCList list) (uint button) (uint button_actions))) (define-func gtk_clist_freeze none ((GtkCList clist))) (define-func gtk_clist_thaw none ((GtkCList clist))) (define-func gtk_clist_column_titles_show none ((GtkCList clist))) (define-func gtk_clist_column_titles_hide none ((GtkCList clist))) (define-func gtk_clist_column_title_active none ((GtkCList clist) (int column))) (define-func gtk_clist_column_title_passive none ((GtkCList clist) (int column))) (define-func gtk_clist_column_titles_active none ((GtkCList clist))) (define-func gtk_clist_column_titles_passive none ((GtkCList clist))) (define-func gtk_clist_set_column_title none ((GtkCList clist) (int column) (string title))) (define-func gtk_clist_get_column_title static_string ((GtkCList clist) (int column))) (define-func gtk_clist_set_column_widget none ((GtkCList clist) (int column) (GtkWidget widget))) (define-func gtk_clist_get_column_widget GtkWidget ((GtkCList clist) (int column))) (define-func gtk_clist_set_column_justification none ((GtkCList clist) (int column) (GtkJustification justification))) (define-func gtk_clist_set_column_visibility none ((GtkCList clist) (int column) (bool visible))) (define-func gtk_clist_set_column_resizeable none ((GtkCList clist) (int column) (bool resizeable))) (define-func gtk_clist_set_column_auto_resize none ((GtkCList clist) (int column) (bool auto_resize))) (define-func gtk_clist_columns_autosize int ((GtkCList clist))) (define-func gtk_clist_optimal_column_width int ((GtkCList clist) (int column))) (define-func gtk_clist_set_column_width none ((GtkCList clist) (int column) (int width))) (define-func gtk_clist_set_column_min_width none ((GtkCList clist) (int column) (int min_width))) (define-func gtk_clist_set_column_max_width none ((GtkCList clist) (int column) (int max_width))) (define-func gtk_clist_set_row_height none ((GtkCList clist) (int height))) (define-func gtk_clist_moveto none ((GtkCList clist) (int row) (int column) (float row_align) (float column_align))) (define-func gtk_clist_row_is_visible GtkVisibility ((GtkCList clist) (int row))) (define-func gtk_clist_get_cell_type GtkCellType ((GtkCList clist) (int row) (int column))) (define-func gtk_clist_set_text none ((GtkCList clist) (int row) (int column) (string text))) (define-func gtk_clist_get_text int ((GtkCList clist) (int row) (int column) ((ret static_string) text))) ;; XXX - the following all use GdkPixmaps and GdkBitmaps rather than ;; a GtkPixmap, this sucks. ;; (define-func gtk_clist_set_pixmap) ;; (define-func gtk_clist_get_pixmap) ;; (define-func gtk_clist_set_pixtext) ;; (define-func gtk_clist_get_pixtext) (define-func gtk_clist_set_foreground none ((GtkCList clist) (int row) (GdkColor color))) (define-func gtk_clist_set_background none ((GtkCList clist) (int row) (GdkColor color))) (define-func gtk_clist_set_cell_style none ((GtkCList clist) (int row) (int column) (GtkStyle style (null-ok)))) (define-func gtk_clist_get_cell_style GtkStyle ((GtkCList clist) (int row) (int column))) (define-func gtk_clist_set_row_style none ((GtkCList clist) (int row) (GtkStyle style (null-ok)))) (define-func gtk_clist_get_row_style GtkStyle ((GtkCList clist) (int row))) (define-func gtk_clist_set_shift none ((GtkCList clist) (int row) (int column) (int vertical) (int horizontal))) (define-func gtk_clist_set_selectable none ((GtkCList clist) (int row) (bool selectable))) (define-func gtk_clist_get_selectable bool ((GtkCList clist) (int row))) (define-func gtk_clist_prepend int ((GtkCList clist) ;; uhhh, this is hacky ((fvec string "((GtkCList*)sgtk_get_gtkobj (p_clist))->columns") text))) (define-func gtk_clist_append int ((GtkCList clist) ;; uhhh, this is hacky ((fvec string "((GtkCList*)sgtk_get_gtkobj (p_clist))->columns") text))) (define-func gtk_clist_insert int ((GtkCList clist) (int row) ;; uhhh, this is hacky ((fvec string "((GtkCList*)sgtk_get_gtkobj (p_clist))->columns") text))) (define-func gtk_clist_remove none ((GtkCList clist) (int row))) (define-func gtk_clist_select_row none ((GtkCList clist) (int row) (int column))) (define-func gtk_clist_unselect_row none ((GtkCList clist) (int row) (int column))) (define-func gtk_clist_undo_selection none ((GtkCList clist))) (define-func gtk_clist_clear none ((GtkCList clist))) (define-func gtk_clist_get_selection_info int ((GtkCList clist) (int x) (int y) ((ret int) row) ((ret int) column))) (define-func gtk_clist_unselect_all none ((GtkCList clist))) (define-func gtk_clist_swap_rows none ((GtkCList clist) (int row1) (int row2))) ;; (define-func gtk_clist_set_compare_func_full ;; none ;; ((GtkCList clist) ;; (full-callback cmp_func))) (define-func gtk_clist_set_sort_column none ((GtkCList clist) (int column))) (define-func gtk_clist_set_sort_type none ((GtkCList clist) (GtkSortType sort_type))) (define-func gtk_clist_sort none ((GtkCList clist))) (define-func gtk_clist_set_auto_sort none ((GtkCList clist) (bool auto_sort))) ;; GtkCtree (define-enum GtkCTreePos (before GTK_CTREE_POS_BEFORE) (child GTK_CTREE_POS_AS_CHILD) (after GTK_CTREE_POS_AFTER)) (define-enum GtkCTreeLineStyle (none GTK_CTREE_EXPANDER_NONE) (square GTK_CTREE_LINES_SOLID) (dotted GTK_CTREE_LINES_DOTTED) (tabbed GTK_CTREE_LINES_TABBED)) ;;; Bin (define-object GtkBin (GtkContainer) (fields (GtkWidget child))) (define-func gtk_bin_get_child GtkWidget ((GtkBin bin))) ;;; Event Box (define-object GtkEventBox (GtkBin)) (define-func gtk_event_box_new GtkWidget ()) ;;; Window (define-object GtkWindow (GtkBin)) (define-func gtk_window_new GtkWidget ((GtkWindowType type))) (define-func gtk_window_set_title none ((GtkWindow window) (string title))) (define-func gtk_window_set_wmclass none ((GtkWindow window) (string wmclass_class) (string wmclass_name))) (define-func gtk_window_set_focus none ((GtkWindow window) (GtkWidget focus))) (define-func gtk_window_set_default none ((GtkWindow window) (GtkWidget default))) (define-func gtk_window_set_policy none ((GtkWindow window) (bool allow_shrink) (bool allow_grow) (bool auto_shrink))) ;;(define-func gtk_window_add_accelerator_table ;; none ;; ((GtkWindow window) ;; (GtkAcceleratorTable table))) ;;(define-func gtk_window_remove_accelerator_table ;; none ;; ((GtkWindow window) ;; (GtkAcceleratorTable table))) (define-func gtk_window_add_accel_group none ((GtkWindow window) (GtkAccelGroup accel_group))) (define-func gtk_window_remove_accel_group none ((GtkWindow window) (GtkAccelGroup accel_group))) (define-func gtk_window_position none ((GtkWindow window) (GtkWindowPosition position))) (define-func gtk_window_activate_focus int ((GtkWindow window))) (define-func gtk_window_activate_default int ((GtkWindow window))) (define-func gtk_window_set_modal none ((GtkWindow window) (bool modal))) (define-func gtk_window_add_embedded_xid none ((GtkWindow window) (uint xid))) (define-func gtk_window_remove_embedded_xid none ((GtkWindow window) (uint xid))) (define-func gtk_window_set_default_size none ((GtkWindow window) (int width) (int height))) (define-func gtk_window_set_position none ((GtkWindow window) (GtkWindowPosition position))) (define-func gtk_window_set_transient_for none ((GtkWindow window) (GtkWindow parent))) (define-func gtk_window_move none ((GtkWindow window) (int x) (int y))) ;;; HandleBox (define-object GtkHandleBox (GtkBin)) (define-func gtk_handle_box_new GtkWidget ()) (define-func gtk_handle_box_set_shadow_type none ((GtkHandleBox handlebox) (GtkShadowType type))) (define-func gtk_handle_box_set_handle_position none ((GtkHandleBox handlebox) (GtkPositionType position))) (define-func gtk_handle_box_set_snap_edge none ((GtkHandleBox handlebox) (GtkPositionType edge))) ;;; Box (define-object GtkBox (GtkContainer)) (define-func gtk_box_pack_start none ((GtkBox box) (GtkWidget child) (bool expand (= "TRUE")) (bool fill (= "TRUE")) (int padding (= "0")))) (define-func gtk_box_pack_end none ((GtkBox box) (GtkWidget child) (bool expand (= "TRUE")) (bool fill (= "TRUE")) (int padding (= "0")))) (define-func gtk_box_pack_start_defaults none ((GtkBox box) (GtkWidget child))) (define-func gtk_box_pack_end_defaults none ((GtkBox box) (GtkWidget child))) (define-func gtk_box_set_homogeneous none ((GtkBox box) (bool homogenous))) (define-func gtk_box_set_spacing none ((GtkBox box) (int spacing))) (define-func gtk_box_reorder_child none ((GtkBox box) (GtkWidget child) (int pos))) (define-func gtk_box_query_child_packing (none (values (expand fill padding pack_type))) ((GtkBox box) (GtkWidget child) (bool expand) (bool fill) (uint padding) (GtkPackType pack_type))) (define-func gtk_box_set_child_packing none ((GtkBox box) (GtkWidget child) (bool expand) (bool fill) (int padding) (GtkPackType pack_type))) ;;; ButtonBox (define-object GtkButtonBox (GtkBox)) ;; Gone in Gtk 2.0. ;; ;; (define-func gtk_button_box_set_child_size_default ;; none ;; ((int min_width) ;; (int min_height))) ;; ;; (define-func gtk_button_box_set_child_ipadding_default ;; none ;; ((int ipad_x) ;; (int ipad_y))) (define-func gtk_button_box_get_spacing int ((GtkButtonBox widget))) (define-func gtk_button_box_get_layout GtkButtonBoxStyle ((GtkButtonBox widget))) ;; XXX - needs multiple return values ;; (define-func gtk_button_box_get_child_size) ;; XXX - needs multiple return values ;; (define-func gtk_button_box_get_child_ipadding) (define-func gtk_button_box_set_spacing none ((GtkButtonBox widget) (int spacing))) (define-func gtk_button_box_set_layout none ((GtkButtonBox widget) (GtkButtonBoxStyle layout_style))) (define-func gtk_button_box_set_child_size none ((GtkButtonBox widget) (int min_width) (int min_height))) (define-func gtk_button_box_set_child_ipadding none ((GtkButtonBox widget) (int ipad_x) (int ipad_y))) ;;; HButtonBox (define-object GtkHButtonBox (GtkButtonBox)) (define-func gtk_hbutton_box_new GtkWidget ()) (define-func gtk_hbutton_box_get_spacing_default int ()) (define-func gtk_hbutton_box_get_layout_default GtkButtonBoxStyle ()) (define-func gtk_hbutton_box_set_spacing_default none ((int spacing))) (define-func gtk_hbutton_box_set_layout_default none ((GtkButtonBoxStyle layout))) ;;; HVuttonBox (define-object GtkVButtonBox (GtkButtonBox)) (define-func gtk_vbutton_box_new GtkWidget ()) (define-func gtk_vbutton_box_get_spacing_default int ()) (define-func gtk_vbutton_box_get_layout_default GtkButtonBoxStyle ()) (define-func gtk_vbutton_box_set_spacing_default none ((int spacing))) (define-func gtk_vbutton_box_set_layout_default none ((GtkButtonBoxStyle layout))) ;;;; Toolbar (define-object GtkToolbar (GtkContainer)) (define-enum GtkToolbarSpaceStyle (empty GTK_TOOLBAR_SPACE_EMPTY) (line GTK_TOOLBAR_SPACE_LINE)) (define-func gtk_toolbar_new GtkWidget ()) ;; XXX - blech, need interp versions of these ;; (define-func gtk_toolbar_append_item) ;; (define-func gtk_toolbar_prepend_item) ;; (define-func gtk_toolbar_insert_item) (define-func gtk_toolbar_append_space none ((GtkToolbar toolbar))) (define-func gtk_toolbar_prepend_space none ((GtkToolbar toolbar))) (define-func gtk_toolbar_insert_space none ((GtkToolbar toolbar) (int position))) ;; XXX - need interp version to handle the callback properly, probably ;; some null-ok stuff to handle missing fields. ;; (define-func gtk_toolbar_append_element) ;; (define-func gtk_toolbar_prepend_element) ;; (define-func gtk_toolbar_insert_element) (define-func gtk_toolbar_append_widget none ((GtkToolbar Toolbar) (GtkWidget Widget) (string tooltip_text) (string tooltip_private_text))) (define-func gtk_toolbar_prepend_widget none ((GtkToolbar Toolbar) (GtkWidget Widget) (string tooltip_text) (string tooltip_private_text))) (define-func gtk_toolbar_insert_widget none ((GtkToolbar toolbar) (GtkWidget widget) (string tooltip_text) (string tooltip_private_text) (int position))) (define-func gtk_toolbar_set_orientation none ((GtkToolbar toolbar) (GtkOrientation orientation))) (define-func gtk_toolbar_get_orientation GtkOrientation ((GtkToolbar toolbar))) (define-func gtk_toolbar_set_style none ((GtkToolbar toolbar) (GtkToolbarStyle style))) (define-func gtk_toolbar_get_style GtkToolbarStyle ((GtkToolbar toolbar))) ;; Gone in Gtk 2.0. ;; ;; (define-func gtk_toolbar_set_space_size ;; none ;; ((GtkToolbar toolbar) ;; (int space_size))) ;; ;; (define-func gtk_toolbar_set_space_style ;; none ;; ((GtkToolbar toolbar) ;; (GtkToolbarSpaceStyle style))) ;; ;; (define-func gtk_toolbar_set_button_relief ;; none ;; ((GtkToolbar toolbar) ;; (GtkReliefStyle relief))) ;; ;; (define-func gtk_toolbar_get_button_relief ;; GtkReliefStyle ;; ((GtkToolbar toolbar))) (define-func gtk_toolbar_set_tooltips none ((GtkToolbar toolbar) (bool enable))) ;;; Table (define-object GtkTable (GtkContainer)) (define-func gtk_table_new GtkWidget ((int rows) (int columns) (bool homogenous))) (define-func gtk_table_attach none ((GtkTable table) (GtkWidget child) (int left_attach) (int right_attach) (int top_attach) (int bottom_attach) (GtkAttachOptions xoptions (= "GTK_EXPAND|GTK_FILL")) (GtkAttachOptions yoptions (= "GTK_EXPAND|GTK_FILL")) (int xpadding (= "0")) (int ypadding (= "0")))) (define-func gtk_table_attach_defaults none ((GtkTable table) (GtkWidget child) (int left_attach) (int right_attach) (int top_attach) (int bottom_attach))) (define-func gtk_table_set_row_spacing none ((GtkTable table) (int row) (int spacing))) (define-func gtk_table_set_col_spacing none ((GtkTable table) (int column) (int spacing))) (define-func gtk_table_set_row_spacings none ((GtkTable table) (int spacing))) (define-func gtk_table_set_col_spacings none ((GtkTable table) (int spacing))) ;;; Button (define-object GtkButton (GtkContainer) (fields ;; Gone in Gtk 2.0. ;;(GtkWidget child) (bool in_button) (bool button_down))) (define-func gtk_button_new GtkWidget ()) (define-func gtk_button_new_with_label GtkWidget ((string label))) (define-func gtk_button_new_from_stock GtkWidget ((string stock_id))) (define-func gtk_button_pressed none ((GtkButton button))) (define-func gtk_button_released none ((GtkButton button))) (define-func gtk_button_clicked none ((GtkButton button))) (define-func gtk_button_enter none ((GtkButton button))) (define-func gtk_button_leave none ((GtkButton button))) (define-func gtk_button_set_relief none ((GtkButton button) (GtkReliefStyle newstyle))) (define-func gtk_button_get_relief GtkReliefStyle ((GtkButton button))) (define-func gtk_button_set_label none ((GtkButton button) (string label))) (define-func gtk_button_get_label static_string ((GtkButton button))) ;;; ToggleButton (define-object GtkToggleButton (GtkButton) (fields (bool active) (bool draw_indicator))) (define-func gtk_toggle_button_new GtkWidget ()) (define-func gtk_toggle_button_new_with_label GtkWidget ((string label))) (define-func gtk_toggle_button_set_mode none ((GtkToggleButton toggle_button) (bool draw_indicator))) (define-func gtk_toggle_button_get_active bool ((GtkToggleButton toggle_button))) (define-func gtk_toggle_button_set_active none ((GtkToggleButton toggle_button) (bool active))) (define-func gtk_toggle_button_set_state none ((GtkToggleButton toggle_button) (bool state)) (deprecated "`gtk-toggle-button-set-state' is deprecated.\ Use gtk-toggle-button-set-active instead")) (define-func gtk_toggle_button_toggled none ((GtkToggleButton toggle_button))) ;;; CheckButton (define-object GtkCheckButton (GtkToggleButton)) (define-func gtk_check_button_new GtkWidget ()) (define-func gtk_check_button_new_with_label GtkWidget ((string label))) ;;; RadioButton (define-object GtkRadioButton (GtkCheckButton)) (define-func gtk_radio_button_new_from_widget GtkWidget ((GtkRadioButton group (null-ok)))) (define-func gtk_radio_button_new_with_label_from_widget GtkWidget ((GtkRadioButton group (null-ok)) (string label))) (define-func gtk_radio_button_group ((slist GtkWidget)) ((GtkRadioButton button))) ;; XXX - only for testing ;(define-func gtk_radio_button_new ; GtkWidget ; (((slist GtkWidget) group))) ;;; Misc (define-object GtkMisc (GtkWidget)) (define-func gtk_misc_set_alignment none ((GtkMisc misc) (float xalign) (float yalign))) (define-func gtk_misc_set_padding none ((GtkMisc misc) (int xpad) (int ypad))) ;;; Arrow (define-object GtkArrow (GtkWidget)) (define-func gtk_arrow_new GtkWidget ((GtkArrowType arrow_type) (GtkShadowType shadow_type))) (define-func gtk_arrow_set none ((GtkArrow arrow) (GtkArrowType arrow_type) (GtkShadowType shadow_type))) ;;; Label (define-object GtkLabel (GtkMisc)) (define-func gtk_label_new GtkWidget ((string str (null-ok)))) (define-func gtk_label_set_text none ((GtkLabel label) (string str))) (define-func gtk_label_get_interp static_string ((GtkLabel label))) (define-func gtk_label_set_text_with_mnemonic none ((GtkLabel label) (string str))) (define-func gtk_label_get_mnemonic_keyval uint ((GtkLabel label))) (define-func gtk_label_new_with_mnemonic GtkWidget ((string str))) (define-func gtk_label_set_justify none ((GtkLabel label) (GtkJustification jtype))) (define-func gtk_label_set_line_wrap none ((GtkLabel label) (bool wrap))) (define-func gtk_label_set_pattern none ((GtkLabel label) (string str))) ;;;;GtkLayout (define-object GtkLayout (GtkContainer)) (define-func gtk_layout_new GtkWidget ((GtkAdjustment hadjustment) (GtkAdjustment vadjustment))) (define-func gtk_layout_put none ((GtkLayout layout) (GtkWidget widget) (int x) (int y))) (define-func gtk_layout_move none ((GtkLayout layout) (GtkWidget widget) (int x) (int y))) (define-func gtk_layout_set_size none ((GtkLayout layout) (int width) (int height))) (define-func gtk_layout_get_hadjustment GtkAdjustment ((GtkLayout layout))) (define-func gtk_layout_get_vadjustment GtkAdjustment ((GtkLayout layout))) (define-func gtk_layout_set_hadjustment none ((GtkLayout layout) (GtkAdjustment adjustment))) (define-func gtk_layout_set_vadjustment none ((GtkLayout layout) (GtkAdjustment adjustment))) (define-func gtk_layout_freeze none ((GtkLayout layout))) (define-func gtk_layout_thaw none ((GtkLayout layout))) ;;;;GtkTipsQuery (define-object GtkTipsQuery (GtkLabel)) (define-func gtk_tips_query_new GtkWidget ()) (define-func gtk_tips_query_start_query none ((GtkTipsQuery tips_query))) (define-func gtk_tips_query_stop_query none ((GtkTipsQuery tips_query))) (define-func gtk_tips_query_set_caller none ((GtkTipsQuery tips_query) (GtkWidget caller))) (define-func gtk_tips_query_set_labels none ((GtkTipsQuery tips_query) (string label_inactive) (string label_no_tip))) ;; VBox (define-object GtkVBox (GtkBox)) (define-func gtk_vbox_new GtkWidget ((bool homogenous) (int spacing))) ;; HBox (define-object GtkHBox (GtkBox)) (define-func gtk_hbox_new GtkWidget ((bool homogenous) (int spacing))) ;; Item (define-object GtkItem (GtkBin)) (define-func gtk_item_select none ((GtkItem item))) (define-func gtk_item_deselect none ((GtkItem item))) (define-func gtk_item_toggle none ((GtkItem item))) ;; GtkItemFactory (define-object GtkItemFactory (GtkObject)) ;(define-func gtk_item_factory_new ; GtkItemFactory ; ((GtkType container_type) ; (string path) ; (GtkAccelGroup accel_group))) ;(define-func gtk_item_factory_construct ; GtkItemFactory ; ((GtkItemFactory ifactory) ; (GtkType container_type) ; (string char) ; (GtkAccelGroup accel_group))) ;(define-func gtk_item_factory_parse_rc ; none ; ((string file_name))) ;(define-func gtk_item_factory_parse_rc_string ; none ; ((string rc_string))) ;(define-func gtk_item_factory_parse_rc_scanner ; none ; ((GScanner scanner))) ;(define-func gtk_item_factory_add_foreign ; none ; ((GtkWidget accel_widget) ; (string full_path) ; (GtkAccelGroup accel_group) ; (uint keyval) ; (GdkModifierType modifiers))) (define-func gtk_item_factory_from_widget GtkItemFactory ((GtkWidget widget))) (define-func gtk_item_factory_path_from_widget static_string ((GtkWidget widget))) ;(define-func gtk_item_factory_get_item ; GtkWidget ; ((GtkItemFactory ifactory) ; (string path))) ;;;; GtkCombo ;; gtkcombo.h says you should only access the "entry" and "list" fields ;; directly. We've had the other fields here for a while, so don't want to ;; remove them and gratuitiously break code that might have been using them, ;; but if you're writing something new then entry and list are all you ;; should look at. ;; (define-object GtkCombo (GtkHBox) (fields (GtkWidget entry) (GtkWidget button) (GtkWidget popup) (GtkWidget popwin) (GtkWidget list))) (define-func gtk_combo_new GtkWidget ()) (define-func gtk_combo_set_value_in_list none ((GtkCombo combo) (bool val) (bool ok_if_empty))) (define-func gtk_combo_set_use_arrows none ((GtkCombo combo) (bool val))) (define-func gtk_combo_set_use_arrows_always none ((GtkCombo combo) (bool val))) (define-func gtk_combo_set_case_sensitive none ((GtkCombo combo) (bool val))) (define-func gtk_combo_set_item_string none ((GtkCombo combo) (GtkItem item) (string item_value))) (define-func gtk_combo_disable_activate none ((GtkCombo combo))) (define-func gtk_combo_set_popdown_strings none ((GtkCombo combo) ((list string) strings))) ;;;; StatusBar (define-object GtkStatusbar (GtkHBox)) (define-func gtk_statusbar_new GtkWidget ()) (define-func gtk_statusbar_push uint ((GtkStatusbar statusbar) (uint context_id) (string text))) (define-func gtk_statusbar_pop none ((GtkStatusbar statusbar) (uint context_id))) (define-func gtk_statusbar_get_context_id uint ((GtkStatusbar statusbar) (string context_description))) (define-func gtk_statusbar_remove none ((GtkStatusbar statusbar) (uint context_id) (uint message_id))) ;;;; GammaCurve (define-object GtkGammaCurve (GtkVBox) (fields (GtkWidget table) (GtkWidget curve) (float gamma) (GtkWidget gamma_dialog) (GtkWidget gamma_text))) (define-func gtk_gamma_curve_new GtkWidget ()) ;; Separator (define-object GtkSeparator (GtkWidget)) ;; HSeparator (define-object GtkHSeparator (GtkSeparator)) (define-func gtk_hseparator_new GtkWidget ()) ;; VSeparator (define-object GtkVSeparator (GtkSeparator)) (define-func gtk_vseparator_new GtkWidget ()) ;; Frame (define-object GtkFrame (GtkBin)) (define-func gtk_frame_new GtkWidget ((string label (null-ok)))) (define-func gtk_frame_set_label none ((GtkFrame frame) (string label (null-ok)))) (define-func gtk_frame_set_label_align none ((GtkFrame frame) (float xalign) (float yalign))) (define-func gtk_frame_set_shadow_type none ((GtkFrame frame) (GtkShadowType type))) ;; Aspect Frame (define-object GtkAspectFrame (GtkFrame)) (define-func gtk_aspect_frame_new GtkWidget ((string label) (float xalign) (float yalign) (float ratio) (bool obey_child))) (define-func gtk_aspect_frame_set none ((GtkAspectFrame aspect_frame) (float xalign) (float yalign) (float ratio) (bool obey_child))) ;; Progress Bar (define-object GtkProgressBar (GtkWidget) (fields)) (define-enum GtkProgressBarOrientation (left-to-right GTK_PROGRESS_LEFT_TO_RIGHT) (right-to-left GTK_PROGRESS_RIGHT_TO_LEFT) (bottom-to-top GTK_PROGRESS_BOTTOM_TO_TOP) (top-to-bottom GTK_PROGRESS_TOP_TO_BOTTOM)) (define-enum GtkProgressBarStyle (continuous GTK_PROGRESS_CONTINUOUS) (discrete GTK_PROGRESS_DISCRETE)) (define-func gtk_progress_bar_new GtkWidget ()) (define-func gtk_progress_bar_new_with_adjustment GtkWidget ((GtkAdjustment adjustment))) (define-func gtk_progress_bar_set_bar_style none ((GtkProgressBar progressbar) (GtkProgressBarStyle style))) (define-func gtk_progress_bar_set_discrete_blocks none ((GtkProgressBar progressbar) (uint blocks))) (define-func gtk_progress_bar_set_activity_step none ((GtkProgressBar progressbar) (uint step))) (define-func gtk_progress_bar_set_activity_blocks none ((GtkProgressBar progressbar) (uint blocks))) (define-func gtk_progress_bar_set_orientation none ((GtkProgressBar progressbar) (GtkProgressBarOrientation orientation))) (define-func gtk_progress_bar_update none ((GtkProgressBar progress_bar) (float percentage))) ;;(define-func gtk_progress_bar_percentage ;; float ;; ((GtkProgressBar progress_bar))) ;;GtkProgress (define-object GtkProgress (GtkWidget) (fields)) (define-func gtk_progress_set_show_text none ((GtkProgress progress) (bool show_text))) (define-func gtk_progress_set_text_alignment none ((GtkProgress progress) (float x_align) (float y_align))) (define-func gtk_progress_set_format_string none ((GtkProgress progress) (string format))) (define-func gtk_progress_set_adjustment none ((GtkProgress progress) (GtkAdjustment adjustment))) (define-func gtk_progress_configure none ((GtkProgress progress) (float value) (float min) (float max))) (define-func gtk_progress_set_percentage none ((GtkProgress progress) (float percentage))) (define-func gtk_progress_set_value none ((GtkProgress progress) (float value))) (define-func gtk_progress_get_value float ((GtkProgress progress))) (define-func gtk_progress_set_activity_mode none ((GtkProgress progress) (bool activity_mode))) (define-func gtk_progress_get_current_text string ((GtkProgress progress))) (define-func gtk_progress_get_text_from_value string ((GtkProgress progress) (float value))) ;; Tooltips (define-object GtkTooltips (GtkObject)) (define-func gtk_tooltips_new GtkTooltips ()) (define-func gtk_tooltips_enable none ((GtkTooltips tooltips))) (define-func gtk_tooltips_disable none ((GtkTooltips tooltips))) (define-func gtk_tooltips_set_delay none ((GtkTooltips tooltips) (int delay))) (define-func gtk_tooltips_set_tip none ((GtkTooltips tooltips) (GtkWidget widget) (string tip_text (null-ok)) (string tip_private))) ;; Gone in Gtk 2.0. ;; ;; (define-func gtk_tooltips_set_colors ;; none ;; ((GtkTooltips tooltips) ;; (GdkColor background) ;; (GdkColor foreground))) ;(define-func gtk_tooltips_data_get ; GtkTooltipsData ; ((GtkWidget widget))) (define-func gtk_tooltips_force_window none ((GtkTooltips tooltips))) ;; MenuShell (define-object GtkMenuShell (GtkContainer)) (define-func gtk_menu_shell_append none ((GtkMenuShell menu_shell) (GtkWidget child))) (define-func gtk_menu_shell_prepend none ((GtkMenuShell menu_shell) (GtkWidget child))) (define-func gtk_menu_shell_insert none ((GtkMenuShell menu_shell) (GtkWidget child) (int position))) (define-func gtk_menu_shell_deactivate none ((GtkMenuShell menu_shell))) (define-func gtk_menu_shell_select_item none ((GtkMenuShell menu_shell) (GtkWidget menu_item))) (define-func gtk_menu_shell_deselect none ((GtkMenuShell menu_shell))) (define-func gtk_menu_shell_activate_item none ((GtkMenuShell menu_shell) (GtkWidget menu_item) (bool force_deactivate))) ;; MenuBar (define-object GtkMenuBar (GtkMenuShell)) (define-func gtk_menu_bar_new GtkWidget ()) (define-func gtk_menu_bar_append none ((GtkMenuBar menu_bar) (GtkWidget child))) (define-func gtk_menu_bar_prepend none ((GtkMenuBar menu_bar) (GtkWidget child))) (define-func gtk_menu_bar_insert none ((GtkMenuBar menu_bar) (GtkWidget child) (int position))) ;; Menu (define-object GtkMenu (GtkMenuShell)) (define-func gtk_menu_new GtkWidget ()) (define-func gtk_menu_append none ((GtkMenu menu) (GtkWidget child))) (define-func gtk_menu_prepend none ((GtkMenu menu) (GtkWidget child))) (define-func gtk_menu_insert none ((GtkMenu menu) (GtkWidget child) (int position))) (define-func gtk_menu_popup_interp none ((GtkMenu menu) (GtkWidget parent_menu_shell (null-ok)) (GtkWidget parent_menu_item (null-ok)) (int button) (uint activate_time))) (define-func gtk_menu_popdown none ((GtkMenu menu))) (define-func gtk_menu_get_active GtkWidget ((GtkMenu menu))) (define-func gtk_menu_set_active none ((GtkMenu menu) (int index))) (define-func gtk_menu_get_accel_group GtkAccelGroup ((GtkMenu menu))) (define-func gtk_menu_set_accel_group none ((GtkMenu menu) (GtkAccelGroup accel_group))) ;;(define-func gtk_menu_set_accelerator_table ;; none ;; ((GtkMenu menu) ;; (GtkAcceleratorTable table))) ;; XXX - probably needs _interp version ;; gtk_menu_attach_to_widget (define-func gtk_menu_get_attach_widget GtkWidget ((GtkMenu menu))) (define-func gtk_menu_detach none ((GtkMenu menu))) ;; MenuItem (define-object GtkMenuItem (GtkItem) (fields (GtkWidget submenu))) (define-func gtk_menu_item_new GtkWidget ()) (define-func gtk_menu_item_new_with_label GtkWidget ((string label))) (define-func gtk_menu_item_new_with_mnemonic GtkWidget ((string label))) (define-func gtk_menu_item_set_submenu none ((GtkMenuItem menu_item) (GtkWidget submenu))) (define-func gtk_menu_item_remove_submenu none ((GtkMenuItem menu_item))) ;; Gone in Gtk 2.0. ;; ;; (define-func gtk_menu_item_set_placement ;; none ;; ((GtkMenuItem menu_item) ;; (GtkSubmenuPlacement placement))) ;; ;;(define-func gtk_menu_item_accelerator_size ;; none ;; ((GtkMenuItem menu_item))) ;;(define-func gtk_menu_item_accelerator_text ;; none ;; ((GtkMenuItem menu_item) ;; ;; is this right or is it a return value? ;; (string accelerator_text))) ;; (define-func gtk_menu_item_configure ;; none ;; ((GtkMenuItem menu_item) ;; (bool show_toggle_indicator) ;; (bool show_submenu_indicator))) (define-func gtk_menu_item_select none ((GtkMenuItem menu_item))) (define-func gtk_menu_item_deselect none ((GtkMenuItem menu_item))) (define-func gtk_menu_item_activate none ((GtkMenuItem menu_item))) (define-func gtk_menu_item_right_justify none ((GtkMenuItem menu_item))) ;; Gone in Gtk 2.0. ;; ;; (define-func gtk_menu_get_uline_accel_group ;; GtkAccelGroup ;; ((GtkMenu menu))) ;; ;; (define-func gtk_menu_ensure_uline_accel_group ;; GtkAccelGroup ;; ((GtkMenu menu))) ;; GtkImage (define-object GtkImage (GtkMisc)) (define-enum GtkIconSize (invalid GTK_ICON_SIZE_INVALID) (menu GTK_ICON_SIZE_MENU) (small-toolbar GTK_ICON_SIZE_SMALL_TOOLBAR) (large-toolbar GTK_ICON_SIZE_LARGE_TOOLBAR) (button GTK_ICON_SIZE_BUTTON) (dnd GTK_ICON_SIZE_DND) (dialog GTK_ICON_SIZE_DIALOG)) (define-func gtk_image_new_from_stock GtkWidget ((string stock_id) (GtkIconSize size))) ;; GtkImageMenuItem (define-object GtkImageMenuItem (GtkMenuItem)) (define-func gtk_image_menu_item_new_from_stock GtkWidget ((string stock_id) (GtkAccelGroup accel_group (null-ok)))) (define-func gtk_image_menu_item_set_image none ((GtkImageMenuItem image_menu_item) (GtkWidget image))) ;; TearoffMenuItem (define-object GtkTearoffMenuItem (GtkMenuItem)) (define-func gtk_tearoff_menu_item_new GtkWidget ()) ;; label with underlines (define-object GtkAccelLabel (GtkLabel)) (define-func gtk_accel_label_new GtkWidget ((string label))) (define-func gtk_accel_label_set_accel_widget none ((GtkAccelLabel accel_label) (GtkWidget accel_widget))) (define-func gtk_label_parse_uline uint ((GtkLabel label) (string name))) ;; CheckMenuItem (define-object GtkCheckMenuItem (GtkMenuItem) (fields (bool active))) (define-func gtk_check_menu_item_new GtkWidget ()) (define-func gtk_check_menu_item_new_with_label GtkWidget ((string label))) (define-func gtk_check_menu_item_new_with_mnemonic GtkWidget ((string label))) (define-func gtk_check_menu_item_set_state none ((GtkCheckMenuItem check_menu_item) (bool state))) (define-func gtk_check_menu_item_set_show_toggle none ((GtkCheckMenuItem menu_item) (bool always))) (define-func gtk_check_menu_item_toggled none ((GtkCheckMenuItem check_menu_item))) ;; RadioMenuItem (define-object GtkRadioMenuItem (GtkCheckMenuItem)) (define-func gtk_radio_menu_item_new_from_widget GtkWidget ((GtkRadioMenuItem group))) (define-func gtk_radio_menu_item_new_with_label_from_widget GtkWidget ((GtkRadioMenuItem group) (string label))) ;; GtkSeparatorMenuItem (define-object GtkSeparatorMenuItem (GtkMenuItem)) (define-func gtk_separator_menu_item_new GtkWidget ()) ;; OptionMenu (define-object GtkOptionMenu (GtkButton)) (define-func gtk_option_menu_new GtkWidget ()) (define-func gtk_option_menu_get_menu GtkWidget ((GtkOptionMenu option_menu))) (define-func gtk_option_menu_set_menu none ((GtkOptionMenu option_menu) (GtkWidget menu))) (define-func gtk_option_menu_remove_menu none ((GtkOptionMenu option_menu))) (define-func gtk_option_menu_get_history int ((GtkOptionMenu option_menu))) (define-func gtk_option_menu_set_history none ((GtkOptionMenu option_menu) (int index))) ;; Pixmaps (define-object GtkPixmap (GtkMisc)) (define-func gtk_pixmap_new GtkWidget ((GdkPixmap pixmap) (GdkBitmap bitmap (null-ok) (= "NULL")))) (define-func gtk_pixmap_set none ((GtkPixmap pixmap) (GdkPixmap gdkpixmap) (GdkBitmap gdkbitmap (null-ok) (= "NULL")))) (define-func gtk_pixmap_get (none (values (gdkpixmap gdkmask))) ((GtkPixmap pixmap) (GdkPixmap gdkpixmap) (GdkBitmap gdkmask))) ;;; Viewport (define-object GtkViewport (GtkBin)) (define-func gtk_viewport_new GtkWidget ((GtkAdjustment hadjustment) (GtkAdjustment vadjustment))) (define-func gtk_viewport_get_hadjustment GtkAdjustment ((GtkViewport viewport))) (define-func gtk_viewport_get_vadjustment GtkAdjustment ((GtkViewport viewport))) (define-func gtk_viewport_set_hadjustment none ((GtkViewport viewport) (GtkAdjustment adjustment))) (define-func gtk_viewport_set_vadjustment none ((GtkViewport viewport) (GtkAdjustment adjustment))) (define-func gtk_viewport_set_shadow_type none ((GtkViewport viewport) (GtkShadowType type))) ;; ScrolledWindow (define-object GtkScrolledWindow (GtkContainer)) (define-func gtk_scrolled_window_new GtkWidget ((GtkAdjustment hadjustment (null-ok) (= "NULL")) (GtkAdjustment vadjustment (null-ok) (= "NULL")))) (define-func gtk_scrolled_window_add_with_viewport none ((GtkScrolledWindow scrolled_window) (GtkWidget child))) (define-func gtk_scrolled_window_get_hadjustment GtkAdjustment ((GtkScrolledWindow scrolled_window))) (define-func gtk_scrolled_window_get_vadjustment GtkAdjustment ((GtkScrolledWindow scrolled_window))) (define-func gtk_scrolled_window_set_policy none ((GtkScrolledWindow scrolled_window) (GtkPolicyType hscrollbar_policy) (GtkPolicyType vscrollbar_policy))) ;; ListItem (define-object GtkListItem (GtkItem)) (define-func gtk_list_item_new GtkWidget ()) (define-func gtk_list_item_new_with_label GtkWidget ((string label))) (define-func gtk_list_item_select none ((GtkListItem list_item))) (define-func gtk_list_item_deselect none ((GtkListItem list_item))) ;; List (define-object GtkList (GtkContainer)) (define-func gtk_list_new GtkWidget ()) (define-func gtk_list_append_item none ((GtkList list) (GtkListItem item))) (define-func gtk_list_prepend_item none ((GtkList list) (GtkListItem item))) ;; XXX many missing (define-func gtk_list_clear_items none ((GtkList list) (int start) (int end))) (define-func gtk_list_select_item none ((GtkList list) (int item))) (define-func gtk_list_unselect_item none ((GtkList list) (int item))) (define-func gtk_list_select_child none ((GtkList list) (GtkWidget child))) (define-func gtk_list_unselect_child none ((GtkList list) (GtkWidget child))) (define-func gtk_list_child_position int ((GtkList list) (GtkWidget child))) (define-func gtk_list_set_selection_mode none ((GtkList list) (GtkSelectionMode mode))) ;; Notebook (define-object GtkNotebook (GtkContainer) (fields (GtkPositionType tab_pos))) ;; XXX - need ref counting for this in Gtk, and Gtk seems to ;; misdeclare the "switch_page" signal. (define-boxed GtkNotebookPage (copy gtk_no_copy) (free gtk_no_free) (gettypefuncname "NULL")) ;; no GType for this (define-func gtk_notebook_new GtkWidget ()) (define-func gtk_notebook_append_page none ((GtkNotebook notebook) (GtkWidget child) (GtkWidget tab_label))) (define-func gtk_notebook_append_page_menu none ((GtkNotebook notebook) (GtkWidget child) (GtkWidget tab_label) (GtkWidget menu_label))) (define-func gtk_notebook_prepend_page none ((GtkNotebook notebook) (GtkWidget child) (GtkWidget tab_label))) (define-func gtk_notebook_prepend_page_menu none ((GtkNotebook notebook) (GtkWidget child) (GtkWidget tab_label) (GtkWidget menu_label))) (define-func gtk_notebook_insert_page none ((GtkNotebook notebook) (GtkWidget child) (GtkWidget tab_label) (int position))) (define-func gtk_notebook_insert_page_menu none ((GtkNotebook notebook) (GtkWidget child) (GtkWidget tab_label) (GtkWidget menu_label) (int position))) (define-func gtk_notebook_remove_page none ((GtkNotebook notebook) (int page_num))) (define-func gtk_notebook_get_current_page int ((GtkNotebook notebook))) (define-func gtk_notebook_get_nth_page GtkWidget ((GtkNotebook notebook) (int page_num))) (define-func gtk_notebook_page_num int ((GtkNotebook notebook) (GtkWidget child))) (define-func gtk_notebook_set_page none ((GtkNotebook notebook) (int page_num))) (define-func gtk_notebook_next_page none ((GtkNotebook notebook))) (define-func gtk_notebook_prev_page none ((GtkNotebook notebook))) (define-func gtk_notebook_set_tab_pos none ((GtkNotebook notebook) (GtkPositionType pos))) (define-func gtk_notebook_set_show_tabs none ((GtkNotebook notebook) (bool show_tabs))) (define-func gtk_notebook_set_show_border none ((GtkNotebook notebook) (bool show_border))) (define-func gtk_notebook_set_scrollable none ((GtkNotebook notebook) (bool scrollable))) (define-func gtk_notebook_set_tab_border none ((GtkNotebook notebook) (int border_width))) (define-func gtk_notebook_set_homogeneous_tabs none ((GtkNotebook notebook) (bool homogenous))) (define-func gtk_notebook_set_tab_hborder none ((GtkNotebook notebook) (int tab_hborder))) (define-func gtk_notebook_set_tab_vborder none ((GtkNotebook notebook) (int tab_vborder))) (define-func gtk_notebook_popup_enable none ((GtkNotebook notebook))) (define-func gtk_notebook_popup_disable none ((GtkNotebook notebook))) (define-func gtk_notebook_get_tab_label GtkWidget ((GtkNotebook notebook) (GtkWidget child))) (define-func gtk_notebook_set_tab_label none ((GtkNotebook notebook) (GtkWidget child) (GtkWidget tab_label))) ;(define-func gtk_notebook_set_tab_label_text ; none ; ((GtkNotebook notebook) ; (GtkWidget child) ; (string tab_text))) (define-func gtk_notebook_get_menu_label GtkWidget ((GtkNotebook notebook) (GtkWidget child))) (define-func gtk_notebook_set_menu_label none ((GtkNotebook notebook) (GtkWidget child) (GtkWidget menu_label))) ;(define-func gtk_notebook_set_menu_label_text ; none ; ((GtkNotebook notebook) ; (GtkWidget widget) ; (string menu_text))) ;(define-func gtk_notebook_query_tab_label_packing ; none ; ((GtkNotebook notebook) ; (GtkWidget child) ; (bool expand) ; (bool fill) ; (GtkPackType pack_type))) ;(define-func gtk_notebook_set_tab_label_packing ; none ; ((GtkNotebook notebook) ; (GtkWidget child) ; (bool expand) ; (bool fill) ; (GtkPackType pack_type))) (define-func gtk_notebook_reorder_child none ((GtkNotebook notebook) (GtkWidget child) (int position))) ;; Editable (define-object GtkEditable (GtkWidget)) (define-func gtk_editable_select_region none ((GtkEditable editable) (int start) (int end))) (define-func gtk_editable_insert_text_scm int ((GtkEditable editable) (string text) (int index)) (scm-name "gtk-editable-insert-text")) (define-func gtk_editable_delete_text none ((GtkEditable editable) (int start) (int end))) (define-func gtk_editable_get_chars string ((GtkEditable editable) (int start) (int end))) (define-func gtk_editable_cut_clipboard none ((GtkEditable editable))) (define-func gtk_editable_copy_clipboard none ((GtkEditable editable))) (define-func gtk_editable_paste_clipboard none ((GtkEditable editable))) (define-func gtk_editable_delete_selection none ((GtkEditable editable))) (define-func gtk_editable_set_position none ((GtkEditable editable) (int index))) (define-func gtk_editable_get_position int ((GtkEditable editable))) (define-func gtk_editable_set_editable none ((GtkEditable editable) (bool is_editable))) ;; Entry (define-object GtkEntry (GtkEditable) (fields (GdkWindow text_area))) (define-func gtk_entry_new GtkWidget ()) (define-func gtk_entry_new_with_max_length GtkWidget ;; should actually be int16 - does it matter? ;; nope, C is expected to have a proper prototype for all functions. -mvo ((int max))) (define-func gtk_entry_set_text none ((GtkEntry entry) (string text))) (define-func gtk_entry_append_text none ((GtkEntry entry) (string text))) (define-func gtk_entry_prepend_text none ((GtkEntry entry) (string text))) (define-func gtk_entry_set_position none ((GtkEntry entry) (int position))) (define-func gtk_entry_get_text static_string ((GtkEntry entry))) (define-func gtk_entry_select_region none ((GtkEntry entry) (int start) (int end))) (define-func gtk_entry_set_visibility none ((GtkEntry entry) (bool visible))) (define-func gtk_entry_set_editable none ((GtkEntry entry) (bool editable))) ;; SpinButton (define-object GtkSpinButton (GtkEntry)) (define-func gtk_spin_button_configure none ((GtkSpinButton spin_button) (GtkAdjustment adjustment) (double climb_rate) (int digits))) (define-func gtk_spin_button_new GtkWidget ((GtkAdjustment adjustment) (double climb_rate) (int digits))) (define-func gtk_spin_button_new_with_range GtkWidget ((double min) (double max) (double step))) (define-func gtk_spin_button_set_adjustment none ((GtkSpinButton spin_button) (GtkAdjustment adjustment))) (define-func gtk_spin_button_get_adjustment GtkAdjustment ((GtkSpinButton spin_button))) (define-func gtk_spin_button_set_digits none ((GtkSpinButton spin_button) (int digits))) (define-func gtk_spin_button_get_value_as_float double ((GtkSpinButton spin_button))) (define-func gtk_spin_button_get_value_as_int int ((GtkSpinButton spin_button))) (define-func gtk_spin_button_set_value none ((GtkSpinButton spin_button) (double value))) (define-func gtk_spin_button_set_update_policy none ((GtkSpinButton spin_button) (GtkSpinButtonUpdatePolicy policy))) (define-func gtk_spin_button_set_numeric none ((GtkSpinButton spin_button) (bool numeric))) (define-func gtk_spin_button_spin none ((GtkSpinButton spin_button) (GtkSpinType direction) (double increment))) (define-func gtk_spin_button_set_wrap none ((GtkSpinButton spin_button) (bool wrap))) ;; Gone in Gtk 2.0. ;; ;; (define-func gtk_spin_button_set_shadow_type ;; none ;; ((GtkSpinButton spin_button) ;; (GtkShadowType shadow_type))) (define-func gtk_spin_button_set_snap_to_ticks none ((GtkSpinButton spin_button) (bool snap_to_ticks))) (define-func gtk_spin_button_update none ((GtkSpinButton spin_button))) ;; Text (define-object GtkText (GtkEditable) (fields (GdkWindow text_area) (GtkAdjustment hadj) (GtkAdjustment vadj))) (define-func gtk_text_new GtkWidget ((GtkAdjustment hadj (null-ok)) (GtkAdjustment vadj (null-ok)))) (define-func gtk_text_set_editable none ((GtkText text) (bool editable))) (define-func gtk_text_set_word_wrap none ((GtkText text) (int word_wrap))) (define-func gtk_text_set_line_wrap none ((GtkText text) (int line_wrap))) (define-func gtk_text_set_adjustments none ((GtkText text) (GtkAdjustment hadj) (GtkAdjustment vadj))) (define-func gtk_text_set_point none ((GtkText text) (uint index))) (define-func gtk_text_get_point uint ((GtkText text))) (define-func gtk_text_get_length uint ((GtkText text))) (define-func gtk_text_freeze none ((GtkText text))) (define-func gtk_text_thaw none ((GtkText text))) (define-func gtk_text_insert none ((GtkText text) (GdkFont font (null-ok)) (GdkColor fore (null-ok)) (GdkColor back (null-ok)) (string chars) (int length (= -1)))) (define-func gtk_text_backward_delete none ((GtkText text) (uint nchars))) (define-func gtk_text_forward_delete none ((GtkText text) (uint nchars))) ;; Alignment (define-object GtkAlignment (GtkBin)) (define-func gtk_alignment_new GtkWidget ((float xalign) (float yalign) (float xscale) (float yscale))) (define-func gtk_alignment_set none ((GtkAlignment alignment) (float xalign) (float yalign) (float xscale) (float yscale))) ;; DrawingArea (define-object GtkDrawingArea (GtkWidget)) (define-func gtk_drawing_area_new GtkWidget ()) (define-func gtk_drawing_area_size none ((GtkDrawingArea darea) (int width) (int height))) ;; Curve (define-object GtkCurve (GtkDrawingArea)) (define-func gtk_curve_new GtkWidget ()) (define-func gtk_curve_reset none ((GtkCurve curve))) (define-func gtk_curve_set_gamma none ((GtkCurve curve) (float gamma))) (define-func gtk_curve_set_range none ((GtkCurve curve) (float min_x) (float max_x) (float min_y) (float max_y))) (define-func gtk_curve_set_vector none ((GtkCurve curve) ((cvec float) vector))) (define-func gtk_curve_get_vector none ((GtkCurve curve) ((cvec float inout) vector))) (define-func gtk_curve_set_curve_type none ((GtkCurve curve) (GtkCurveType type))) ;; Preview ;; XXX lots missing (define-object GtkPreview (GtkWidget)) (define-func gtk_preview_new GtkWidget ((GtkPreviewType type))) (define-func gtk_preview_size none ((GtkPreview preview) (int width) (int height))) ;; XXX - needs GdkGC ;; (define-func gtk_preview_put) ;; (define-funct gtk_preview_put_row) ;; XXX - not sure what to do for the data ;; (define-func gtk_preview_draw_row) (define-func gtk_preview_set_expand none ((GtkPreview preview) (bool expand))) ;; XXX - can't handle the double - would substituting float work? ;;(define-func gtk_preview_set_gamma ;; none ;; ((double gamma))) (define-func gtk_preview_set_color_cube none ((uint nred_shades) (uint ngreen_shades) (uint nblue_shades) (uint ngray_shades))) (define-func gtk_preview_set_install_cmap none ((bool install_cmap))) (define-func gtk_preview_set_reserved none ((int nreserved))) (define-func gtk_preview_get_visual GdkVisual ()) (define-func gtk_preview_get_cmap GdkColormap ()) ;; FileSelection (define-object GtkFileSelection (GtkWindow) (fields (GtkWidget dir_list) (GtkWidget file_list) (GtkWidget selection_entry) (GtkWidget selection_text) (GtkWidget main_vbox) (GtkWidget ok_button) (GtkWidget cancel_button) (GtkWidget help_button) (GtkWidget action_area))) (define-func gtk_file_selection_new GtkWidget ((string title))) (define-func gtk_file_selection_set_filename none ((GtkFileSelection filesel) (string filename))) (define-func gtk_file_selection_get_filename static_string ((GtkFileSelection filesel))) (define-func gtk_file_selection_show_fileop_buttons none ((GtkFileSelection filesel))) (define-func gtk_file_selection_hide_fileop_buttons none ((GtkFileSelection filesel))) ;; FontSelectionDialog (define-object GtkFontSelectionDialog (GtkDialog) (fields (GtkWidget main_vbox) (GtkWidget action_area) (GtkWidget ok_button) (GtkWidget apply_button) (GtkWidget cancel_button))) (define-func gtk_font_selection_dialog_new GtkWidget ((string title))) (define-func gtk_font_selection_dialog_get_font_name string ((GtkFontSelectionDialog fontsel))) (define-func gtk_font_selection_dialog_get_font GdkFont ((GtkFontSelectionDialog fontsel))) (define-func gtk_font_selection_dialog_set_font_name bool ((GtkFontSelectionDialog fontsel) (string fontname))) ;(define-func gtk_font_selection_dialog_set_filter) (define-func gtk_font_selection_dialog_get_preview_text static_string ((GtkFontSelectionDialog fontsel))) (define-func gtk_font_selection_dialog_set_preview_text none ((GtkFontSelectionDialog fontsel) (string text))) ;; ColorSelectionDialog (define-object GtkColorSelectionDialog (GtkDialog) (fields (GtkWidget colorsel) ;; Gone in Gtk 2.0. ;; (GtkWidget main_vbox) (GtkWidget ok_button) ;; Gone in Gtk 2.0. ;; (GtkWidget reset_button) (GtkWidget cancel_button) (GtkWidget help_button))) (define-func gtk_color_selection_dialog_new GtkWidget ((string title))) ;; ColorSelection (define-object GtkColorSelection (GtkVBox)) (define-func gtk_color_selection_new GtkWidget ()) (define-func gtk_color_selection_set_update_policy none ((GtkColorSelection colorsel) (GtkUpdateType policy))) ;; (define-func gtk_color_selection_set_opacity ;; none ;; ((GtkColorSelection colorsel) ;; (bool use_opacity))) (define-func gtk_color_selection_set_color_interp none ((GtkColorSelection colorsel) (GdkColor color))) ;; This returns a color which is not allocated in any colormap. (define-func gtk_color_selection_get_color_interp GdkColor ((GtkColorSelection colorsel))) ;; Range (define-object GtkRange (GtkWidget)) (define-func gtk_range_get_adjustment GtkAdjustment ((GtkRange range))) (define-func gtk_range_set_update_policy none ((GtkRange range) (GtkUpdateType policy))) (define-func gtk_range_set_adjustment none ((GtkRange range) (GtkAdjustment adjustment))) ;; Scale (define-object GtkScale (GtkRange)) (define-func gtk_scale_set_digits none ((GtkScale scale) (uint digits))) (define-func gtk_scale_set_draw_value none ((GtkScale scale) (bool draw_value))) (define-func gtk_scale_set_value_pos none ((GtkScale scale) (GtkPositionType pos))) ;; Gone in Gtk 2.0. ;; ;; (define-func gtk_scale_value_width ;; int ;; ((GtkScale scale))) ;; ;; (define-func gtk_scale_draw_value ;; none ;; ((GtkScale scale))) ;; HScale (define-object GtkHScale (GtkScale)) (define-func gtk_hscale_new GtkWidget ((GtkAdjustment adjustment))) ;; VScale (define-object GtkVScale (GtkScale)) (define-func gtk_vscale_new GtkWidget ((GtkAdjustment adjustment))) ;; Scrollbar (define-object GtkScrollbar (GtkRange)) ;; HScrollbar (define-object GtkHScrollbar (GtkScrollbar)) (define-func gtk_hscrollbar_new GtkWidget ((GtkAdjustment adjustment))) ;; VScrollbar (define-object GtkVScrollbar (GtkScrollbar)) (define-func gtk_vscrollbar_new GtkWidget ((GtkAdjustment adjustment))) ;; Ruler (define-object GtkRuler (GtkWidget)) (define-func gtk_ruler_set_metric none ((GtkRuler ruler) (GtkMetricType metric))) (define-func gtk_ruler_set_range none ((GtkRuler ruler) (double lower) (double upper) (double position) (double max_size))) (define-func gtk_ruler_draw_ticks none ((GtkRuler ruler))) (define-func gtk_ruler_draw_pos none ((GtkRuler ruler))) ;; HRuler (define-object GtkHRuler (GtkRuler)) (define-func gtk_hruler_new GtkWidget ()) ;; VRuler (define-object GtkVRuler (GtkRuler)) (define-func gtk_vruler_new GtkWidget ()) ;; Dialog (define-flags GtkDialogFlags (modal GTK_DIALOG_MODAL) (destroy-with-parent GTK_DIALOG_DESTROY_WITH_PARENT) (no-separator GTK_DIALOG_NO_SEPARATOR)) (define-object GtkDialog (GtkWindow) (fields (GtkWidget vbox) (GtkWidget action_area))) (define-func gtk_dialog_new GtkWidget ()) (define-func gtk_dialog_response none ((GtkDialog dialog) (int response_id))) (define-func gtk_dialog_add_action_widget none ((GtkDialog dialog) (GtkWidget child) (int response_id))) (define-func gtk_dialog_set_default_response none ((GtkDialog dialog) (int response_id))) (define-func gtk_dialog_set_response_sensitive none ((GtkDialog dialog) (int response_id) (bool setting))) (define-func gtk_dialog_get_response_for_widget ;; Gtk 2.8 and up int ((GtkDialog dialog) (GtkWidget widget))) (define-func gtk_dialog_new_with_buttons GtkWidget ((string title (null-ok)) (GtkWindow parent (null-ok)) (GtkDialogFlags flags) (string end_marker (= "NULL"))) ;; dummy to get NULL (scm-name "%gtk-dialog-new-with-buttons")) (define-func gtk_dialog_add_button GtkWidget ((GtkDialog dialog) (string button_text) (int response_id))) ;; InputDialog (define-object GtkInputDialog (GtkDialog) (fields (GtkWidget close_button) (GtkWidget save_button))) (define-func gtk_input_dialog_new GtkWidget ()) ;; GtkMessageDialog (define-object GtkMessageDialog (GtkDialog)) (define-enum GtkMessageType (info GTK_MESSAGE_INFO) (warning GTK_MESSAGE_WARNING) (question GTK_MESSAGE_QUESTION) (error GTK_MESSAGE_ERROR)) (define-enum GtkButtonsType (none GTK_BUTTONS_NONE) (ok GTK_BUTTONS_OK) (close GTK_BUTTONS_CLOSE) (cancel GTK_BUTTONS_CANCEL) (yes-no GTK_BUTTONS_YES_NO) (ok-cancel GTK_BUTTONS_OK_CANCEL)) (define-func gtk_message_dialog_new_interp GtkWidget ((GtkWindow window (null-ok)) (GtkDialogFlags flags) (GtkMessageType type) (GtkButtonsType buttons) (string message (null-ok)))) ;; GtkInvisible ;(define-object GtkInvisible (GtkBin)) ;(define-func gtk_invisible_new ; GtkWidget ; ()) ;; GtkCalendar (define-object GtkCalendar (GtkWidget) (fields)) (define-enum GtkCalendarDisplayOptions; (show-heading GTK_CALENDAR_SHOW_HEADING) (show-day-names GTK_CALENDAR_SHOW_DAY_NAMES) (no-month-change GTK_CALENDAR_NO_MONTH_CHANGE) (show-week-numbers GTK_CALENDAR_SHOW_WEEK_NUMBERS) (week-start-monday GTK_CALENDAR_WEEK_START_MONDAY)) (define-func gtk_calendar_new GtkWidget ()) (define-func gtk_calendar_select_month int ((GtkCalendar calendar) (uint month) (uint year))) (define-func gtk_calendar_select_day none ((GtkCalendar calendar) (uint day))) (define-func gtk_calendar_mark_day int ((GtkCalendar calendar) (uint day))) (define-func gtk_calendar_unmark_day int ((GtkCalendar calendar) (uint day))) (define-func gtk_calendar_clear_marks none ((GtkCalendar calendar))) (define-func gtk_calendar_display_options none ((GtkCalendar calendar) (GtkCalendarDisplayOptions flags))) (define-func gtk_calendar_get_date (none (values (year month day))) ((GtkCalendar calendar) (uint year) (uint month) (uint day))) (define-func gtk_calendar_freeze none ((GtkCalendar calendar))) (define-func gtk_calendar_thaw none ((GtkCalendar Calendar))) ;; GtkPlug (define-object GtkPlug (GtkWindow) (fields (GdkWindow socket_window) (bool same_app))) (define-func gtk_plug_new GtkWidget ((uint32 socket_id))) ;; GtkSocket (define-object GtkSocket (GtkContainer)) (define-func gtk_socket_new GtkWidget ()) ;; The "wid" parameter is actually GdkNativeWindow, which is guint32 on X11 ;; or gpointer on Windows. For now just use uint32 here and worry about DOS ;; if anyone actually uses that. ;; (define-func gtk_socket_steal none ((GtkSocket socket) (uint32 wid))) ;; Paned (define-object GtkPaned (GtkContainer)) (define-func gtk_paned_add1 none ((GtkPaned paned) (GtkWidget child))) (define-func gtk_paned_add2 none ((GtkPaned paned) (GtkWidget child))) (define-func gtk_paned_pack1 none ((GtkPaned paned) (GtkWidget child) (bool resize) (bool shrink))) (define-func gtk_paned_pack2 none ((GtkPaned paned) (GtkWidget child) (bool resize) (bool shrink))) (define-func gtk_paned_set_position none ((GtkPaned paned) (int position))) ;; Gone in Gtk 2.0. ;; ;; (define-func gtk_paned_handle_size ;; none ;; ((GtkPaned paned) ;; (int size))) (define-func gtk_paned_gutter_size none ((GtkPaned paned) (int size))) (define-func gtk_paned_compute_position none ((GtkPaned paned) (int allocation) (int child1_req) (int child2_req))) ;; HPaned (define-object GtkHPaned (GtkPaned)) (define-func gtk_hpaned_new GtkWidget ()) ;; VPaned (define-object GtkVPaned (GtkPaned)) (define-func gtk_vpaned_new GtkWidget ()) ;; Types (define-func gtk_type_name static_string ((type type))) (define-func gtk_type_from_name type ((string name))) (define-func gtk_type_is_a bool ((type type) (type is_a_type))) (define-func GTK_CHECK_TYPE bool ((GtkObject object) (type type))) (define-func gtk_class_new type ((type parent) (string name))) (define-func gtk_signal_new_generic int ((string name) (GtkSignalRunType signal_flags) (type class_type) (type return_type) ((cvec type) params))) (define-func sgtk_signal_emit SCM ((GObject object) (string signal) (SCM args)) (scm-name "gtk-signal-emit") (rest-arg #t)) (define-func gtk_signal_emit_stop none ((GtkObject object) (int id))) (define-func gtk_signal_emit_stop_by_name none ((GtkObject object) (string name))) (define-func gtk_signal_set_class_function_full none ((type class) (string signal) (full-callback function)) (protection #t)) ;;; Accelerators... (define-func gtk_accel_group_new GtkAccelGroup ()) ;; Gone in Gtk 2.0. ;; ;; (define-func gtk_accel_group_attach ;; none ;; ((GtkAccelGroup accel_group) ;; (GtkObject object))) ;; ;; (define-func gtk_accel_group_detach ;; none ;; ((GtkAccelGroup accel_group) ;; (GtkObject object))) (define-func gtk_accel_group_lock none ((GtkAccelGroup accel_group))) (define-func gtk_accel_group_unlock none ((GtkAccelGroup accel_group))) (define-func gtk_accel_groups_activate bool ((GObject accel_group) (uint accel_key) (GdkModifierType accel_mods))) ;; Gone from Gtk 2.0. ;; ;; (define-func gtk_accel_group_add ;; none ;; ((GtkAccelGroup accel_group) ;; (uint accel_key) ;; (GdkModifierType accel_mods) ;; (GtkAccelFlags accel_flags) ;; (GtkObject object) ;; (string accel_signal))) ;; ;; (define-func gtk_accel_group_remove ;; none ;; ((GtkAccelGroup accel_group) ;; (uint accel_key) ;; (GdkModifierType accel_mods) ;; (GtkObject object))) (define-func gtk_accelerator_parse (none (values (accelerator_key accelerator_mods))) ((string accelerator) (uint accelerator_key) (GdkModifierType accelerator_mods))) (define-func gtk_accelerator_name string ((uint accelerator_key) (GdkModifierType accelerator_mods))) (define-func gtk_accelerator_set_default_mod_mask none ((GdkModifierType default_mod_mask))) (define-func gtk_accelerator_get_default_mod_mask GdkModifierType ()) ;; Selection (define-func gtk_selection_owner_set int ((GtkWidget widget) (atom selection) (uint time))) (define-func gtk_selection_add_target none ((GtkWidget widget) (atom selection) (atom target) (uint info))) (define-func gtk_selection_add_targets none ((GtkWidget widget) (atom selection) ((cvecr GtkTargetEntry) targets))) (define-func gtk_selection_convert int ((GtkWidget widget) (atom selection) (atom target) (uint time))) (define-func gtk_selection_data_set none ((GtkSelectionData selection_data) (atom type) (int format) (raw-data-r data))) ;; GtkTextIter (define-boxed GtkTextIter (copy gtk_text_iter_copy) (free gtk_text_iter_free)) (define-func gtk_text_iter_new_interp (GtkTextIter (copy #f)) ()) (define-func gtk_text_iter_set_offset none ((GtkTextIter iter) (int char_offset))) ;; GtkTextTagTable (define-object GtkTextTagTable (GObject)) (define-func gtk_text_tag_table_new GtkTextTagTable ()) ;; GtkTextBuffer (define-object GtkTextBuffer (GObject)) (define-func gtk_text_buffer_new GtkTextBuffer ((GtkTextTagTable table (null-ok)))) (define-func gtk_text_buffer_get_text string ((GtkTextBuffer buffer) (GtkTextIter start) (GtkTextIter end) (bool include_hidden_chars))) (define-func gtk_text_buffer_get_end_iter none ((GtkTextBuffer buffer) (GtkTextIter iter))) (define-func gtk_text_buffer_set_text none ((GtkTextBuffer buffer) (string text) (int len (= -1)))) ;; default whole of `text' (define-func gtk_text_buffer_insert none ((GtkTextBuffer buffer) (GtkTextIter iter) (string text) (int len (= -1)))) ;; default whole of `text' ;; GtkTextView (define-object GtkTextView (GtkContainer)) (define-enum GtkWrapMode (none GTK_WRAP_NONE) (char GTK_WRAP_CHAR) (word GTK_WRAP_WORD) (word-char GTK_WRAP_WORD_CHAR)) (define-func gtk_text_view_new GtkWidget ()) (define-func gtk_text_view_new_with_buffer GtkWidget ((GtkTextBuffer buffer))) (define-func gtk_text_view_get_buffer GtkTextBuffer ((GtkTextView buffer))) (define-func gtk_text_view_scroll_to_iter bool ((GtkTextView text_view) (GtkTextIter iter) (double within_margin) (bool use_align) (double xalign) (double yalign))) (define-func gtk_text_view_set_editable none ((GtkTextView text_view) (bool setting))) (define-func gtk_text_view_set_wrap_mode none ((GtkTextView text_view) (GtkWrapMode wrap_mode))) ;; GtkAboutDialog ;; ;; As usual with recent gtk there's a flurry of get/set funcs, some of which ;; are only in latest versions. For now they're omitted and the suggestion ;; is to use `gtk-object-set' with whichever properties are/aren't available. (define-object GtkAboutDialog (GtkDialog)) (define-func gtk_about_dialog_new GtkWidget ()) (define-func gtk_about_dialog_set_email_hook_interp none ((SCM func))) (define-func gtk_about_dialog_set_url_hook_interp none ((SCM func))) ;; GtkLinkButton is new in Gtk 2.10, but the aim would be to keep working on ;; past versions too, so have to conditionalize somehow. ;; ;; The "conditionalize" option shown here was an idea to do that on a ;; per-object / per-function basis with an autoconf feature symbol, but ;; believe now that that's far too tedious. Better to have blocks of ;; defs/funcs/etc in some sort of start/end form, or perhaps in separate ;; files like "gtk-2.10.defs". Since we distribute the glue.c files the ;; conditions have to end up as C preprocessor conditionals in that output. ;; Gtk advertises "since version X" in the docs/sources, and that could be ;; checked mechanically against whatever tags are in the defs here. ;; ;; GtkLinkButton ;; ;; (define-object GtkLinkButton (GtkButton) ;; (conditionalize "HAVE_GTK_LINK_BUTTON_NEW")) ;; ;; (define-func gtk_link_button_new ;; GtkWidget ;; ((string uri)) ;; (conditionalize "HAVE_GTK_LINK_BUTTON_NEW")) ;; ;; (define-func gtk_link_button_new_with_label ;; GtkWidget ;; ((string uri) ;; (string label)) ;; (conditionalize "HAVE_GTK_LINK_BUTTON_NEW")) ;; ;; (define-func gtk_link_button_set_uri_hook_interp ;; none ;; ((SCM func)) ;; (conditionalize "HAVE_GTK_LINK_BUTTON_NEW")) ;; Options (options (includes "#include ") (init-func "sgtk_init_gtk_gtk_glue") (extra-init-code "sgtk_init_gtk_support ();"))