X-Git-Url: https://git.distorted.org.uk/~mdw/clg/blobdiff_plain/560af5c515eb5b6206040a9334de4254d2650147..5cae32e1183e91a8a248c1ea76e5152105ddc595:/gtk/gtkglue.c diff --git a/gtk/gtkglue.c b/gtk/gtkglue.c index dcd199c..9ca23c9 100644 --- a/gtk/gtkglue.c +++ b/gtk/gtkglue.c @@ -1,5 +1,5 @@ /* Common Lisp bindings for GTK+ v2.0 - * Copyright (C) 1999-2000 Espen S. Johnsen + * Copyright (C) 1999-2000 Espen S. Johnsen * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,69 +16,11 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: gtkglue.c,v 1.1 2000-08-14 16:45:01 espen Exp $ */ +/* $Id: gtkglue.c,v 1.4 2000-11-09 20:30:16 espen Exp $ */ #include -#ifdef CMUCL -#include "lisp.h" - -extern lispobj funcall1(lispobj function, lispobj arg0); -extern lispobj funcall3(lispobj function, lispobj arg0, - lispobj arg1, lispobj arg2); - -lispobj callback_trampoline; -lispobj destroy_user_data; -#endif - - -void callback_marshal (GtkObject *object, - gpointer data, - guint n_args, - GtkArg *args) -{ -#ifdef CMUCL - funcall3 (callback_trampoline, alloc_number ((unsigned long)data), - alloc_number (n_args), alloc_sap (args)); - - /* lispobj lisp_args[4]; - - lisp_args[0] = alloc_sap (object); - lisp_args[1] = alloc_number ((unsigned long)data); - lisp_args[2] = alloc_number (n_args); - lisp_args[3] = alloc_sap (args); - - call_into_lisp (callback_trampoline, lisp_args, 4);*/ -#elif defined(CLISP) - callback_trampoline ((unsigned long)data, n_args, (unsigned int) args); -#endif -} - - -void destroy_marshal (gpointer data) -{ -#ifdef CMUCL - funcall1 (destroy_user_data, alloc_number ((unsigned long)data)); -#elif defined(CLISP) - destroy_user_data ((unsigned long)data); -#endif -} - -#ifndef CMUCL -void* -callback_marshal_address () -{ - return (void*)callback_marshal; -} - -void* -destroy_marshal_address () -{ - return (void*)destroy_marshal; -} -#endif - /* * @@ -151,6 +93,12 @@ gtk_menu_item_get_submenu (GtkMenuItem* menu_item) return menu_item->submenu; } +GtkSubmenuPlacement +gtk_menu_item_get_placement (GtkMenuItem* menu_item) +{ + return menu_item->submenu_placement; +} + gint gtk_menu_item_get_show_toggle (GtkMenuItem* menu_item) { @@ -199,61 +147,6 @@ gtk_window_wmclass (GtkWindow* window, gchar* name, gchar* class) } -/* Color selection dialog */ - -GtkWidget* -gtk_color_selection_dialog_get_colorsel (GtkColorSelectionDialog* dialog) -{ - return dialog->colorsel; -} - -/* GtkWidget* */ -/* gtk_color_selection_dialog_get_main_vbox (GtkColorSelectionDialog* dialog) */ -/* { */ -/* return dialog->main_vbox; */ -/* } */ - -GtkWidget* -gtk_color_selection_dialog_get_ok_button (GtkColorSelectionDialog* dialog) -{ - return dialog->ok_button; -} - -/* GtkWidget* */ -/* gtk_color_selection_dialog_get_reset_button (GtkColorSelectionDialog* dialog) */ -/* { */ -/* return dialog->reset_button; */ -/* } */ - -GtkWidget* -gtk_color_selection_dialog_get_cancel_button (GtkColorSelectionDialog* dialog) -{ - return dialog->cancel_button; -} - -GtkWidget* -gtk_color_selection_dialog_get_help_button (GtkColorSelectionDialog* dialog) -{ - return dialog->help_button; -} - - -/* Dialog */ - -GtkWidget* -gtk_dialog_get_action_area (GtkDialog *dialog) -{ - return dialog->action_area; -} - - -GtkWidget* -gtk_dialog_get_vbox (GtkDialog *dialog) -{ - return dialog->vbox; -} - - /* File selection */ GtkWidget* @@ -277,7 +170,6 @@ gtk_file_selection_get_cancel_button (GtkFileSelection *filesel) /* Color selection */ -void gtk_color_selection_set_color_by_values (GtkColorSelection *colorsel, gdouble red, gdouble green, @@ -482,21 +374,13 @@ gtk_paned_get_position (GtkPaned *paned) /* Layout */ gint -gtk_layout_size (GtkLayout *layout, gint *width, gint *height) +gtk_layout_get_size (GtkLayout *layout, gint *width, gint *height) { *width = layout->width; *height = layout->height; } -void -gtk_layout_offset (GtkLayout *layout, gint *x, gint *y) -{ - *x = layout->xoffset; - *y = layout->yoffset; -} - - GdkWindow* gtk_layout_get_bin_window (GtkLayout *layout) { @@ -513,6 +397,21 @@ gtk_list_selection (GtkList *list) } +/* Menu */ + +gboolean +gtk_menu_get_tearoff_state (GtkMenu *menu) +{ + return menu->torn_off; +} + +gchar* +gtk_menu_get_title (GtkMenu *menu) +{ + return g_strdup (gtk_object_get_data (GTK_OBJECT (menu), "gtk-menu-title")); +} + + /* Table */ guint @@ -538,6 +437,12 @@ gtk_toolbar_num_children (GtkToolbar *toolbar) return toolbar->num_children; } +gint +gtk_toolbar_get_tooltips (GtkToolbar *toolbar) +{ + return toolbar->tooltips->enabled; +} + /* Tree */ @@ -624,8 +529,11 @@ gtk_tooltips_get_delay (GtkTooltips *tooltips) return tooltips->delay; } - - +gboolean +gtk_tooltips_get_enabled (GtkTooltips *tooltips) +{ + return tooltips->enabled; +} /* GtkStyle accessor functions */