2017-02-16  Jeff Sparkes  <jsparkes@gmail.com>

	* device-gtk.c (gtk_init_device): Set widget name for CSS access.
	* fontcolor-gtk.c (Fgtk_select_font): Ditto.
	* glyphs-gtk.c (gtk_button_instantiate): Ditto.
	(gtk_progress_gauge_instantiate): Ditto.
	(gtk_add_tab_item): Ditto.
	(gtk_tab_control_instantiate): Ditto.
	(gtk_label_instantiate): Ditto.
	(gtk_edit_field_instantiate): Ditto.
	* gtk-xemacs.c (gtk_xemacs_new): Ditto.
	* menubar-gtk.c (gtk_xemacs_menubar_new): Ditto.
	(menu_convert): Ditto.
	(menu_descriptor_to_widget_1): Ditto.
	(menu_create_menubar): Ditto.
	(create_menubar_widget): Ditto.
	(gtk_popup_menu): Ditto.
	* scrollbar-gtk.c (gtk_create_scrollbar_instance): Ditto.
	* toolbar-gtk.c (gtk_output_toolbar): Ditto.

	* toolbar-gtk.c (gtk_output_toolbar): Name all buttons "button"
	for CSS purposes instead of individual names.
	(gtk_output_toolbar): Remove old test code.

2017-02-13  Jeff Sparkes  <jsparkes@gmail.com>

	* toolbar.h (GTK_DEFAULT_TOOLBAR_HEIGHT): New define.
	* toolbar.c (specifier_vars_of_toolbar): Use it.

	* toolbar-gtk.c (gtk_output_toolbar): Add toolbar height and width
	to checksum so it's redrawn when size changes.

2017-01-13  Jeff Sparkes  <jsparkes@gmail.com>

	* redisplay-gtk.c (XLIKE_clear_region): GDK drawing context
	regquires a region.
	(XLIKE_clear_frame): Ditto.
	(XLIKE_bevel_area): Ditto.
	(XLIKE_output_vertical_divider): Ditto.
	(XLIKE_output_horizontal_line): Ditto.
	(XLIKE_flash): Ditto.
	(XLIKE_output_eol_cursor): Ditto.
	(XLIKE_output_blank): Ditto.
	(XLIKE_output_string): Ditto.
	(XLIKE_output_xlike_pixmap): Ditto.

2017-01-12  Jeff Sparkes  <jsparkes@gmail.com>

	* redisplay-gtk.c (XLIKE_clear_region): use new 3.22 drawing
	context here.
	(XLIKE_clear_frame): Ditto.
	(XLIKE_bevel_area): Ditto.
	(XLIKE_output_vertical_divider): Ditto.
	(XLIKE_output_horizontal_line): Ditto.
	(XLIKE_flash): Ditto.
	(XLIKE_output_eol_cursor): Ditto.
	(XLIKE_output_blank): Ditto.
	(XLIKE_output_string): Ditto.
	(XLIKE_output_xlike_pixmap): Ditto.

	* redisplay-xlike-inc.c (XLIKE_output_pixmap): Use drawing context
	post GTK 3.22.  Fix a memory leak in older GTK.

	* device-gtk.c (gtk_init_device): The macro to use is GTK_CHECK_VERSION.

	* scrollbar-gtk.c (gtk_update_scrollbar_instance_status): No need
	to manually signal change since Gtk 3.18.
	(scrollbar_cb): Ditto.

2017-01-09  Jeff Sparkes  <jsparkes@gmail.com>

	* device-gtk.c (gtk_init_device): Get RGBA visual for newer GTK.

2017-01-06  Jeff Sparkes  <jsparkes@gmail.com>

	* ui-gtk.c (Fg_type_children): Intialize GType * array with NULL
	instead of G_TYPE_INVALID.
	(Fg_type_interfaces): Ditto.

	* fontcolor-gtk.c (Fgtk_select_font)  Add cast for stricter gcc.
	(monospace_only): Cast away const.

2016-01-04  Jeff Sparkes  <jsparkes@gmail.com>

	* menubar-gtk.c (run_menubar_hook): Separate into GTK2 and GTK3
	versions.

	* fontcolor-gtk.c (gtk_widget_add_css_style): Renamed for
	consistency.

2016-01-03  Jeff Sparkes  <jsparkes@gmail.com>

	* fontcolor-gtk.c (gtk_widget_add_css_style): Remove extraneous
	semi-colon.
	(monospace_only): Define for font load filtering.
	(Fgtk_select_font): Define.  Select a font using GTK dialog.
	(syms_of_fontcolor_gtk): Add gtk-select-font.

	* device-gtk.c (Fgtk_load_css): This function can do nothing in
	GTK 2.X.

2015-12-29  Jeff Sparkes  <jsparkes@gmail.com>

	* fontcolor-gtk.c (gtk_font_describe_face): Define.  Describe font details like Bold, Italic, etc. along with sizes of bitmapped fonts.
	(gtk_font_list): Call it to better describe fonts in font-list.

2015-12-28  Jeff Sparkes  <jsparkes@gmail.com>

	* glyphs-eimage.c (png_instantiate): Handle non-GTK case.

2015-12-26  Jeff Sparkes  <jsparkes@gmail.com>

	* glyphs-gtk.c (gtk_unmap_subwindow): Only unmap mapped widgets.
	(gtk_map_subwindow): Only map unmapped widgets.
	(gtk_widget_instantiate_1): No widgets are instantiated in lisp
	anymore, so no point in warning about it.

2015-12-25  Jeff Sparkes  <jsparkes@gmail.com>

	* glyphs-gtk.c (convert_EImage_to_GDKPixbuf): Avoid infinite loops
	when shifting by zero.
	(gtk_button_instantiate): A button descriptor can be just a label
	string as well.

2015-12-22  Jeff Sparkes  <jsparkes@gmail.com>

	* glyphs-gtk.c (syms_of_glyphs_gtk): Remove two unused symbols,
	gtk_widget_property_internal, gtk_widget_redisplay_internal.

	* redisplay-gtk.c (XLIKE_clear_region): Use gtk_render_background
	to avoid using obsolete gtk_style_context_get_background_color.
	(XLIKE_clear_region): Fix logic around background pixmap.

2015-12-21  Jeff Sparkes  <jsparkes@gmail.com>

	* glyphs-gtk.c (gtk_button_instantiate): Define, ported from lisp.
	Callback code is incomplete.
	(gtk_button_instantiate): Handle non-vector descriptor.

	* general-slots.h: Add new symbols for widget button actions.

	* glyphs-gtk.c (gtk_redisplay_widget): Remove call to
	gtk_widget_map, it can cause crashes.

2015-12-18  Jeff Sparkes  <jsparkes@gmail.com>

	* glyphs-gtk.c (gtk_edit_field_instantiate): Ported to here from
	widgets-gtk.el

	* lisp.h (do): Declare EXFUN(Fmapconcat).

	* glyphs-gtk.c (gtk_button_redisplay): Avoid crash with null widget.
	(gtk_label_instantiate): Fix comment.

2015-12-13  Jeff Sparkes  <jsparkes@gmail.com>

	* glyphs-gtk.c (gtk_map_subwindow): Remove extra calls, only map
	widget is required.
	(gtk_redisplay_widget): Map widget during redisplay as well.

2015-12-11  Jeff Sparkes  <jsparkes@gmail.com>

	* glyphs-gtk.c (gtk_progress_gauge_instantiate): Move here from
	lisp.
	(gtk_progress_gauge_instantiate): Scale fraction by percent if
	it's larger than 1.0.

2015-12-11  Jeff Sparkes  <jsparkes@gmail.com>

	* glyphs-gtk.c (gtk_label_instantiate): Define to create label
	widget instead of lisp.

2015-11-28  Jeff Sparkes  <jsparkes@gmail.com>

	* glyphs-gtk.c (gtk_tab_control_instantiate): Create notebook
	control here instead of in lisp when we compiled without GObject
	Introspection.

2015-11-27  Jeff Sparkes  <jsparkes@gmail.com>

	* frame-gtk.c (gtk_update_frame_external_traits): Use state flag
	instead of normal flag.  Add node about gtk 3.16 deprecation (not
	handled yet).

2015-01-25  Jeff Sparkes  <jsparkes@gmail.com>

	* redisplay-gtk.c (XLIKE_output_vertical_divider): Pass args to
	gtk_render_line in correct order.
	(XLIKE_output_horizontal_line): Ditto.

	* device-gtk.c (Fgtk_load_css): Define.
	(syms_of_device_gtk): DEFSUBR gtk-load-css.

2015-01-11  Jeff Sparkes  <jsparkes@gmail.com>

	* redisplay-gtk.c (XLIKE_output_xlike_pixmap): Scale the pixmap if
	requested.

2014-12-23  Jeff Sparkes  <jsparkes@gmail.com>

	* menubar-gtk.c (menu_convert): Set first time tag on parent item
	as well.

2014-12-22  Jeff Sparkes  <jsparkes@gmail.com>

	* gtk-xemacs.c (gtk_xemacs_size_request): Don't add the scrollbar
	width here, it was a mistake.
	(gtk_xemacs_size_allocate): Call the parent class function to do
	the allocation.  This is okay now since all children are widgets.

2014-12-20  Jeff Sparkes  <jsparkes@gmail.com>

	* device-gtk.c (gtk_init_device): Remove call to obsolete
	gdk_imlib_init.

2014-12-19  Jeff Sparkes  <jsparkes@gmail.com>

	* toolbar-gtk.c (gtk_clear_toolbar): Make static.
	(gtk_clear_frame_toolbars): Ditto.
	(gtk_output_frame_toolbars): Ditto.
	(init_gtk_toolbar_stock_icons): Make static. Change to use default
	icon theme names for 3.10+.
	(gtk_output_toolbar): Free previous toolbar. Set icon name for
	3.10+ icon themes.  Move variables to shorten code layout.

2014-12-08  Jeff Sparkes  <jsparkes@gmail.com>

	* fontcolor-gtk.c (gtk_widget_add_css_style): Define.
	* fontcolor-gtk.h: Define.

2014-12-07  Jeff Sparkes  <jsparkes@gmail.com>

	* redisplay-gtk.c (XLIKE_bevel_area): Use gtk_render_frame instead
	of gtk_paint_shadow for Gtk.3.0

2014-12-06  Jeff Sparkes  <jsparkes@gmail.com>

	* toolbar-gtk.c (gtk_output_toolbar): Use new 3.10+ API to make
	toolbar buttons.
	(init_gtk_toolbar_stock_icons): Stock icons are now obsolete.  Use
	the standard icon set names instead.

	* glyphs-gtk.c (xbm_instantiate_1): Meant HAVE_GTK2.

2014-11-27  Jeff Sparkes  <jsparkes@gmail.com>

	* menubar-gtk.c (run_menubar_hook): Use run_hook_trapping_problems.

2014-11-24  Jeff Sparkes  <jsparkes@gmail.com>

	* console-xlike-inc.h: Use GdkRGBA instead of GdkColor for Gtk 3
	* fontcolor-gtk-impl.h (g): Ditto.
	* fontcolor-gtk.c (gtk_parse_nearest_color): Ditto.
	(gtk_initialize_color_instance): Ditto.
	(gtk_print_color_instance): Ditto.
	(gtk_color_instance_equal): Ditto.
	(gtk_color_instance_hash): Ditto.
	(gtk_color_instance_rbg_components): Ditto.
	(gtk_valid_color_name_p): Ditto.
	* fontcolor-gtk.h: Ditto.
	* frame-gtk.c (gtk_update_frame_external_traits): Ditto.
	* glyphs-gtk.c (generate_cursor_fg_bg): Ditto.
	(maybe_recolor_cursor): Ditto.
	(pixbuf_from_xbm_inline): Ditto.
	(init_image_instance_from_xbm_inline): Ditto.
	(gtk_xpm_instantiate): Ditto.
	* redisplay-gtk.c (XLIKE_clear_frame): Ditto.
	(gtk_text_attributes): Ditto.

	* device-gtk.c (Fgtk_init): Disable Ubuntu Unity titlebar menu.
	Our menus don't work with it.

2014-11-23  Jeff Sparkes  <jsparkes@gmail.com>

	* frame-gtk.c (gtk_update_frame_external_traits): Avoid deprecated
	function in 3.X.

2014-11-16  Jeff Sparkes  <jsparkes@gmail.com>

	* gtk-xemacs.c (gtk_xemacs_new): Missing a cast.

2013-12-16  Jeff Sparkes  <jsparkes@gmail.com>

	* gtk-xemacs.c (gtk_xemacs_new): Request button release events,
	although it doesn't seem to work.

	* frame-gtk.c (gtk_create_widgets): Request all events from the
	shell as a workaround for missing button release events.

2013-12-04  Jeff Sparkes  <jsparkes@gmail.com>

	* gtk-xemacs.c (gtk_xemacs_size_request): Get preferred height and
	width using current widget class, not parent.

2013-12-02  Jeff Sparkes  <jsparkes@gmail.com>

	* toolbar-gtk.c (gtk_output_toolbar): Remove unused variable.

	* glyphs-gtk.c (convert_EImage_to_GDKPixbuf): Initialize variable.

	* frame-gtk.c (gtk_cant_notify_wm_error): Remove unused function.

	* device-gtk.c (Fgtk_grab_pointer): Initialize result variable to
	invalid value.  Add asserts for several calls.

2013-11-25  Jeff Sparkes  <jsparkes@gmail.com>

	* frame-gtk.c (gtk_set_mouse_position): Accidentally moved screen
	variable inside HAVE_GTK2.  It is use by both flavours of GTK.

2013-11-24  Jeff Sparkes  <jsparkes@gmail.com>

	* event-xlike-inc.c (emacs_gtk_event_pending_p): Process only GDK
	events here.

	* frame-gtk.c (gtk_widget_get_device): Move function to here, make
	it global.
	(gtk_set_frame_size): Use preferred size for GTK 3.
	(gtk_set_mouse_position): Use gdk_device_warp in GTK 3.
	(gtk_get_mouse_position): Use GdkDevice based code in GTK 3.

	* device-gtk.c: Remove gtk_widget_get_device()..
	* console-gtk.h: Declare here.

	* ui-byhand.c (Fgtk_label_get): Don't discard const here; some
	version of gcc thinks it's an error.

2013-11-21  Jeff Sparkes  <jsparkes@gmail.com>

	* glyphs-gtk.c (gtk_map_subwindow): Unconditionally map widget.
	It's harmless to make redundant calls.

	* menubar-gtk.c (menu_convert): Set the label for the menu in GTK
	3.

2013-11-20  Jeff Sparkes  <jsparkes@gmail.com>

	* frame-gtk.c (gtk_set_frame_properties): Change default height to
	24 lines.
	(gtk_initialize_frame_size): Ditto.

	* gtk-xemacs.h: gtk_xemacs_get_type now returns GType.
	* gtk-xemacs.c (gtk_xemacs_get_type): Use GType instead of guint,
	patch from Stephen Turnbull.
	* ui-gtk.c (Fg_type_from_name): Use GType.

	* event-gtk.c (emacs_gtk_drain_queue): Use gdk_events_pending.  I
	did not read the comment that told me not to change it.

2013-11-19  Jeff Sparkes  <jsparkes@gmail.com>

	* glyphs-gtk.c (gtk_widget_query_geometry): Get preferred size for
	Gtk 3.  Make sure width and height are greater than 0.

	* event-gtk.c (gtk_what_callback): Cast gpointer when assigning.
	(select_filedesc): Cast flag combination to GIOCondition.
	(init_event_gtk_late): Ditto.

2013-11-17  Jeff Sparkes  <jsparkes@gmail.com>

	* frame-gtk.c (gtk_toolbar_plist): Handle without HAVE_TOOLBARS.
	(gtk_frame_property): Ditto.
	(gtk_frame_properties): Ditto.

2013-11-15  Jeff Sparkes  <jsparkes@gmail.com>

	* device-gtk.c (Fgtk_display_visual_class):
	gdk_visual_get_visual_type was added in 2.22.
	(gtk_init_device_class): Ditto.
	(gtk_device_system_metrics): Function to determine colormap size
	was added in 2.22.

	* glyphs-gtk.c (convert_EImage_to_GDKPixbuf): Ditto.

	* ui-gtk.c (g_type_to_lisp): g_value_get_schar only exists in more
	recent glib.

	* redisplay-gtk.c (XLIKE_clear_frame): Use GdkRectangle to support
	older GTK 2.

2013-11-14  Jeff Sparkes  <jsparkes@gmail.com>

	* event-gtk.c (IS_MODIFIER_KEY): Use old key definitions for Gtk 2.
	(keysym_obeys_caps_lock_p): Ditto.

2013-11-13  Jeff Sparkes  <jsparkes@gmail.com>

	* event-gtk.c (gtk_event_to_emacs_event): Ifdef window lookup for
	versions previous to 2.24.

	* device-gtk.c (Fgtk_init): Turn ubuntu unity overlay scrollbars
	off.  They were accidentally re-enabled.

2013-11-12  Jeff Sparkes  <jsparkes@gmail.com>

	* redisplay-gtk.c (gdk_draw_text_image): Advance past the last
	item drawn.

2013-11-11  Jeff Sparkes  <jsparkes@gmail.com>

	* gtk-xemacs.c (gtk_xemacs_draw): Convert cairo_rectangle_t to
	cairo_rectangle_int_t to indicate area to be redrawn.

2013-11-09  Jeff Sparkes  <jsparkes@gmail.com>

	* event-gtk.c (emacs_gtk_drain_queue): Use non-blocking gtk
	iteration, just in case.

2013-11-03  Jeff Sparkes  <jsparkes@gmail.com>

	* frame-gtk.c (gtk_set_frame_icon): Update to include Gtk 3.

	* gtk-xemacs.c (gtk_xemacs_class_init): Call gtk_xemacs_draw.
	(gtk_xemacs_draw): Implement for Gtk 3.

2013-11-02  Jeff Sparkes  <jsparkes@gmail.com>

	* frame-gtk.c (gtk_set_initial_frame_size): Remove debugging code.
	(gtk_create_widgets): Use Gtk 3 method to create boxes.

	* ui-byhand.c (Fgtk_color_selection_get_color): Gtk 2 only.
	(Fgtk_label_get): Use correct accessor function.
	(Fgtk_notebook_query_tab_label_packing): Gtk 2 only.
	(Fgtk_widget_size_request): Add Gtk 3 implementation.
	(syms_of_ui_byhand): ifdef Gtk 2 only symbols.

	* gtk-xemacs.c (gtk_xemacs_class_init): Some class functions are
	different for Gtk 3.
	(gtk_xemacs_new): Use GObject allocator.
	(__nuke_background_items): This workaround is for Gtk 2 only.
	(smash_scrollbar_specifiers): Scrollbar style info is apparently
	no longer available in Gtk 3.
	(gtk_xemacs_size_request): Use preferred height/width for Gtk 3.
	(gtk_xemacs_get_preferred_height): Define for Gtk 3 only.
	(gtk_xemacs_get_preferred_width): Ditto.
	(gtk_xemacs_size_allocate): Implement for Gtk 3.
	(gtk_xemacs_paint): Implement for Gtk 3.
	(gtk_xemacs_draw): Use function to access children.  Now returns a
	boolean.
	(gtk_xemacs_expose): ifdef for Gtk 2 only.

	* device-gtk.c (gtk_init_device): Only explicitly read rc files on
	Gtk 2.
	(gtk_event_name): No expose event is only in Gtk 2.
	(gtk_widget_get_device): Define for Gtk 3.
	(Fgtk_grab_pointer): Implement for Gtk 3.
	(Fgtk_ungrab_pointer): Ditto.
	(Fgtk_grab_keyboard): Ditto.
	(Fgtk_ungrab_keyboard): Ditto.
	(Fgtk_style_info): Only for Gtk 2 at the moment.
	(vars_of_device_gtk): Use unsigned integers for GTK version numbers.

	* frame-gtk.c (gtk_set_initial_frame_size): Move window instead of
	setting geometry hints.
	(gtk_create_widgets): Make shell resizable.  No client events in
	Gtk 3.
	(Fgtk_window_id): X11 specific windows are different in Gtk 3.
	(gtk_iconify_frame): Use Gtk function instead of Xlib.

2013-11-01  Jeff Sparkes  <jsparkes@gmail.com>

	* device-gtk.c (vars_of_device_gtk): Define Gtk version variables.
	They are implemented differently between Gtk 2 and 3.  We can no
	longer directly import than, we need wrappers.

2013-10-30  Jeff Sparkes  <jsparkes@gmail.com>

	* frame-gtk.c (gtk_set_frame_position): Replace deprecated function.
	(gtk_set_frame_size): Ditto.

2013-10-27  Jeff Sparkes  <jsparkes@gmail.com>

	* menubar-gtk.c (get_accelerator): Define for Gtk 3.
	(menu_convert): Use it to implement menu accelerators for Gtk 3.

	* event-gtk.c (gtk_what_callback): Remove obsolete comment and
	check for NULL channel.

2013-10-26  Jeff Sparkes  <jsparkes@gmail.com>

	* event-gtk.c (gtk_to_emacs_keysym): Use "modern" name
	GDK_KEY_Mode_switch.
	(emacs_shell_event_handler): No more client event in Gdk 3 event
	structure.  Use ABORT placeholder for Gtk 3 for now.
	(init_event_gtk_late): Use GIO for input.  (This fixes the menubar
	display.)
	(register_event_name): Use internal functions xstrdup and xfree.
	GDK_NO_EXPOSE event gone in Gtk 3.

2013-10-24  Jeff Sparkes  <jsparkes@gmail.com>

	* redisplay-gtk.c (XLIKE_clear_frame): Attempt to implement for
	Gtk 3.X; it's probably wrong.

	* event-gtk.c (gtk_what_callback): Try to remove watch with
	invalid channel by returning FALSE.
	(mark_what_as_being_ready): Update comment to indicate current
	state.
	(select_filedesc): Add HUP notification to watch.  This turns out
	to be necessary for shell-mode for unknown reasons.

2013-10-22  Jeff Sparkes  <jsparkes@gmail.com>

	* ui-gtk.c (g_type_to_lisp): Use schar, char is deprecated.
	(lisp_to_g_value): Ditto.

	* redisplay-gtk.c (XLIKE_bevel_area): Restore accidentally deleted
	variable for Gtk 2.

	* event-gtk.c (handle_client_message): GdkEventClient was removed
	in Gtk 3.
	(gtk_event_to_emacs_event): Add Gtk 3 code to get current window
	and pointer coordinates.
	(handle_client_message): Fix Gtk 2 compile error.

2013-10-20  Jeff Sparkes  <jsparkes@gmail.com>

	* redisplay-gtk.c (XLIKE_clear_frame): Port to Gtk 3.
	(XLIKE_bevel_area): Ditto.
	(XLIKE_output_vertical_divider): Ditto.
	(XLIKE_output_horizontal_line): Ditto.

2013-10-18  Jeff Sparkes  <jsparkes@gmail.com>

	* device-gtk.c (gtk_event_name): Add missing event GDK_NO_EXPOSE.
	(gtk_device_system_metrics): Use non-deprecated function to get
	colormap size.

2013-10-17  Jeff Sparkes  <jsparkes@gmail.com>

	* event-gtk.c (w): Add GIOChannel to closure struct.
	(gtk_what_callback): Change to a GIO callback function.  Ignore
	callbacks with empty channels.
	(select_filedesc): Use GIO for input callback. Initialize channel.
	(unselect_filedesc): Cancel GIO callback, delete channel.

2013-10-15  Jeff Sparkes  <jsparkes@gmail.com>

	* menubar-gtk.c (gtk_update_frame_menubars): Fix unused warning.

2013-10-12  Jeff Sparkes  <jsparkes@gmail.com>

	* menubar-gtk.c (menu_convert): Gtk 3 removed accelerator code.
	It should be replaced.
	(menu_descriptor_to_widget_1): Use Gtk 3 box constructor.
	(menu_create_menubar): Menu entries can't be right justified in
	Gtk 3.
	(run_menubar_hook): Can not tell if menubar is active in Gtk 3.
	(gtk_update_frame_menubars): Ditto.

	* config.h.in: Add HAVE_GTK3

	* scrollbar-gtk.c (gtk_create_scrollbar_instance): Use Gtk 3
	constructors.

2013-10-10  Jeff Sparkes  <jsparkes@gmail.com>

	* config.h.in: Add HAVE_GTK3.

	* glyphs-gtk.c: We don't have support for making cursors from
	individual font glyphs in Gtk, so ifdef related code out.

2013-10-09  Jeff Sparkes  <jsparkes@gmail.com>

	* glyphs-gtk.c (gtk_finalize_image_instance): Fix Gtk 2 function.
	(font_instantiate): ifdef out.  Not used, and obsolete in Gtk 3.

2013-10-08  Jeff Sparkes  <jsparkes@gmail.com>

	* glyphs-gtk.c (gtk_add_tab_item): Use gtk_box_new instead of
	deprecated gtk_hbox_new for Gtk 3.
	(gtk_widget_query_geometry): Use Gtk 3 methods here when required.
	(gtk_redisplay_widget): Ditto.
	(init_image_instance_from_xbm_inline): Ditto.

2013-10-06  Jeff Sparkes  <jsparkes@gmail.com>

	* console-gtk-impl.h (g): Remove gray_pixmap from gtk_device.
	* device-gtk.c (gtk_init_device): No more gray_pixmap.
	* redisplay-gtk.c (XLIKE_output_string): Ditto.

2013-10-01  Jeff Sparkes  <jsparkes@gmail.com>

	* menubar-gtk.c (__kill_stupid_gtk_timer): GtkMenuItem timers are
	obsolete; remove this function.
	(menu_convert): Don't call deleted function.
	* Makefile.in.in (gtk_objs): Remove gccache-gtk from list.

	* device-gtk.c: Remove include GC cache header.
	(gtk_init_device): No longer have GC cache.
	(gtk_delete_device): Ditto.

	* console-xlike-inc.h: Remove include of GC cache header.

	* console-gtk.h: Remove declaration of gtk_get_gc.

	* console-gtk-impl.h (gtk_device): Remove gc-cache from gtk_device
	structure.

	* frame-gtk.c (gtk_popup_frame): Replace gtk_widget_hide_all with
	gtk_widget_hide.
	* menubar-gtk.c (__maybe_destroy): Ditto.
	(gtk_update_frame_menubar_internal): Ditto.
	(__kill_stupid_gtk_timer): Remove; timer is obsolete.
	(menu_convert): Remove reference to above.

	* scrollbar-gtk.c (gtk_free_scrollbar_instance): Replace
	gtk_widget_hide_all.
	(gtk_release_scrollbar_instance): Ditto.

2013-09-20  Jeff Sparkes  <jsparkes@gmail.com>

	* event-xlike-inc.c (emacs_gtk_event_pending_p): Gtk 2.0 can check
	for pending events.

2013-09-19  Jeff Sparkes  <jsparkes@gmail.com>

	* frame-gtk.c (gtk_update_frame_external_traits): Set the
	background on widget, not on its window.

2013-09-18  Jeff Sparkes  <jsparkes@gmail.com>

	* fontcolor-gtk.c (gtk_parse_nearest_color): Unused parameter.
	* glyphs-gtk.c (init_image_instance_from_xbm_inline): Ditto.

	* glyphs-gtk.c (gtk_tab_control_redisplay): Cleaner method to
	remove all notebook pages.

	* select-gtk.c (emacs_gtk_selection_handle): Use access function
	for GtkSelectionData.
	(emacs_gtk_selection_received): Ditto.

	* glyphs-gtk.c (gtk_map_subwindow): Get size allocation via access
	function and use it.
	(gtk_redisplay_widget): Ditto.
	(convert_EImage_to_GDKPixbuf): Get visual type via access function
	and use it.

	* gccache-gtk.c (make_gc_cache): Use gtk_widget_get_window.

	* menubar-gtk.c (menu_convert): Use menu types access functions
	instead of widget fields.
	(menu_can_reuse_widget): Ditto.
	(menu_create_menubar): Ditto.
	(gtk_popup_menu): Ditto.

	* scrollbar-gtk.c (gtk_create_scrollbar_instance): Use
	GtkAdjustment access functions instead of using the fields
	directly.
	(gtk_update_scrollbar_instance_status): Ditto.
	(scrollbar_cb): Ditto.

	* redisplay-gtk.c (XLIKE_bevel_area): Use gtk_widget_get_style
	instead of directly accessing the field.
	(XLIKE_output_vertical_divider): Ditto.
	(XLIKE_output_horizontal_line): Ditto.

	* frame-gtk.c (gtk_set_icon_name_from_ibyte): Use
	gtk_widget_get_window() instead of directly accessing the field.
	(gtk_update_frame_external_traits): Ditto.
	(gtk_frame_property): Ditto.

	* device-gtk.c (gtk_init_device_class): Use access functions
	instead of directly accessing GdkVisual fields.
 	(gtk_init_device): Ditto.
	(Fgtk_display_visual_class): Ditto.

	* console-gtk-impl.h: Delete GET_GTK_WIDGET_WINDOW.
	* console-xlike-inc.h (GET_XLIKE_WINDOW): Use
	gtk_widget_get_window() instead of GET_GTK_WIDGET_WINDOW.
	* device-gtk.c (Fgtk_grab_pointer): Ditto.
	(Fgtk_grab_keyboard): Ditto.
	(Fgtk_style_info): Ditto.
	* event-gtk.c (emacs_gtk_handle_magic_event): Ditto.
	* frame-gtk.c (gtk_window_to_frame): Ditto.
	(gtk_any_window_to_frame): Ditto.
	(gtk_any_widget_or_parent_to_frame): Ditto.
	(gtk_frame_property): Ditto.
	(gtk_frame_properties): Ditto.
	(gtk_set_initial_frame_size): Ditto.
	(gtk_set_frame_properties): Ditto.
	(gtk_set_frame_icon): Ditto.
	(gtk_set_frame_pointer): Ditto.
	(Fgtk_window_id): Ditto.
	(gtk_get_mouse_position): Ditto.
	(gtk_raise_frame_1): Ditto.
	(gtk_lower_frame): Ditto.
	(gtk_iconify_frame): Ditto.
	(gtk_focus_on_frame): Ditto.
	* glyphs-gtk.c (init_image_instance_from_gdk_pixbuf): Ditto.
	(init_image_instance_from_xbm_inline): Ditto.
	* redisplay-gtk.c (XLIKE_bevel_area): Ditto.
	* scrollbar-gtk.c (update_one_widget_scrollbar_pointer): Ditto.
	(gtk_scrollbar_loop): Ditto.

	* frame-gtk.c (gtk_widget_to_frame): Use gtk_widget_get_parent
	instead of accessing the parent field directly.
	* menubar-gtk.c (__activate_menu): Ditto.
	(menu_create_menubar): Ditto.

2013-09-17  Jeff Sparkes  <jsparkes@gmail.com>

	* emacs.c (main_1): Call syms and complex_vars for event-gtk.c

	* event-gtk.c (complex_vars_of_event_gtk): New function.
	(register_event_names): New function.
	(register_event_name): New function.
	(vars_of_event_gtk): Add gdk-event-names.

	* symsinit.h: Add complex_vars_of_event_gtk.

2013-09-15  Jeff Sparkes  <jsparkes@gmail.com>

	* scrollbar-gtk.c (scrollbar_cb): Remove unused variable.

	* gtk-glue.c (xemacs_init_gtk_classes): g_type_init() no longer
	needs to be called as of glib 2.35.

	* frame-gtk.c (gtk_create_widgets): Remove GNOME_IS_APP macro,
	which dates from Gnome 1.

	* menubar-gtk.c (menu_convert): Comment out unused variable.
	(menu_create_menubar): Remove unused variable.

	* event-gtk.c (emacs_gtk_unselect_console): Remove unused
	variable.
	(gtk_reset_modifier_mapping): Comment out unused warning variable.

2013-09-13  Jeff Sparkes  <jsparkes@gmail.com>

	* menubar-gtk.c (menu_create_menubar): Cast current child pointer
	as GTK_WIDGET at declaration. Remove unused variable.

2013-09-09  Jeff Sparkes  <jsparkes@gmail.com>

	* glyphs-gtk.c (init_image_instance_from_xbm_inline): Use GdkPixbuf
	for cursor.

2013-03-10  Jeff Sparkes  <jsparkes@gmail.com>

	* console-gtk-impl.h (g): Remove colormap from gtk_device. Remove
	access macro. No longer required since cairo handles colors.

	* device-gtk.c (gtk_init_device): Avoid use of GdkColormap.

	* glyphs-gtk.c (init_image_instance_from_xbm_inline): Avoid
	deprecated gdk_color_black, gdk_color_white.
	(xbm_instantiate_1): Ditto.

	* fontcolor-gtk-impl.h (g): Remove dealloc flag from
	gtk_color_instance_data; colors are never allocated now.

	* fontcolor-gtk.h: Remove declaration for allocate_nearest_color.

	* fontcolor-gtk.c (gtk_parse_nearest_color): No longer call
	allocate_nearest_color, which has been deleted.  No need to
	allocate colors, cairo handles it.
	(gtk_initialize_color_instance): No dealloc flag to set.
	(gtk_finalize_color_instance): No color to deallocate.

	* glyphs-gtk.c (gtk_colorize_image_instance): Update to work on
	GdkPixbufs.
	(console_type_create_glyphs_gtk): Register colorize_image_instance
	device method.
	(gtk_colorize_image_instance): Fix loop error.
	(convert_EImage_to_GDKPixbuf): Don't quantize the colors on pseudo
	color displays.  Rely on cairo to handle it for us.
	(gtk_init_image_instance_from_eimage): No need to keep track of
	allocated colors because none are.

2013-03-01  Jeff Sparkes  <jsparkes@gmail.com>

	* frame-gtk.c (gtk_set_frame_properties): Set default frame height
	to 40 to match Xt version.
	(gtk_initialize_frame_size): Ditto.

2013-02-24  Jeff Sparkes  <jsparkes@gmail.com>

	* frame-gtk.c (gtk_set_frame_properties): Make left and top
	aliases for x and y.

2013-02-23  Jeff Sparkes  <jsparkes@gmail.com>

	* toolbar-gtk.c (gtk_output_toolbar): Remove unused variable
	tooltip.

	* scrollbar-gtk.c (scrollbar_drag_hack_cb): ifdefed out.

	* toolbar-gtk.c (gtk_output_toolbar): Cast args to GTK_WIDGET.
	Remove extraneous whitespace.

	* scrollbar-gtk.c (scrollbar_cb): Remove unused variable.

	* glyphs-gtk.c (gtk_image_instance_equal): Mark parameters as
	unused.
	(init_image_instance_from_gdk_pixbuf): Remove unused parameters.
	(gtk_init_image_instance_from_eimage): Remove params from call.
	Remove unused variable.
	(pixbuf_from_xbm_inline): Remove unused variable.  Wrap parameter
	list.
	(gtk_xpm_instantiate): Remove unused variables.

	* event-gtk.c (emacs_gtk_unselect_console): Remove unused variable.

	* fontcolor-gtk.c (font_description_from_string): Use size_t to
	avoid compiler warning.

	* redisplay-xlike-inc.c (XLIKE_output_pixmap): Move a line of X
	code inside the right ifdef.

	* console-xlike-inc.h (XLIKE_DRAW_LINE): Remove XLIKE_GC and
	related macros.

	* redisplay-xlike-inc.c (XLIKE_output_pixmap): Avoid XLIKE_GC when
	THIS_IS_GTK.
	(XLIKE_get_gc): Ifdef for THIS_IS_X only.
	Add prototypes for several GTK functions.

2013-02-20  Jeff Sparkes  <jsparkes@gmail.com>

	* redisplay-gtk.c (XLIKE_output_xlike_pixmap): Remove unused
	variable.  Mark unused parameters.
	(XLIKE_output_string): Wrong parameter for XLIKE_text_width.

	* glyphs-gtk.h (g): Remove Gtk colormap and associated fields from
	struct gtk_image_instance_data.  Also remove access macros.

	* glyphs-gtk.c (gtk_finalize_image_instance): Remove references
	Gtk colormap.
	(gtk_image_instance_hash): Ditto.
	(gtk_init_image_instance_from_eimage): Ditto.
	(gtk_xpm_instantiate): Ditto.

2013-02-18  Jeff Sparkes  <jsparkes@gmail.com>

	* redisplay-gtk.c (XLIKE_output_xlike_pixmap): Draw without using
	only cairo calls.  Avoid GdkGC.
	(XLIKE_output_xlike_pixmap): Add x and y offsets to pixmap.
	(XLIKE_output_blank): Paint the background pattern.  Currently
	does not repeat the pattern.
	(XLIKE_output_string): Ditto.

2013-02-16  Jeff Sparkes  <jsparkes@gmail.com>

	* redisplay-gtk.c (XLIKE_output_blank): Set background pixmap.
	(XLIKE_output_string): Set background pixmap.

	* frame-gtk.c (gtk_create_widgets): Get events from the shell
	widget as well.

2013-02-10  Jeff Sparkes  <jsparkes@gmail.com>

	* toolbar-gtk.c (gtk_output_toolbar): Add test code to show that
	toolbar is built correctly.

2013-02-09  Jeff Sparkes  <jsparkes@gmail.com>

	* glyphs-gtk.c (gtk_finalize_image_instance): Set image to 0 after
	freeing it.

2013-02-03  Jeff Sparkes  <jsparkes@gmail.com>

	* menubar-gtk.c (menu_create_menubar): Be careful when deleting
	menubar children to avoid runtime warnings.

	* fontcolor-gtk.c: Define debug_gtk_fonts; use it to separate font
	debugging between Gtk and X.
	(gtk_initialize_font_instance): Use it.
	(Fgtk_make_font_bold): Ditto.
	(Fgtk_make_font_unbold): Ditto.
	(Fgtk_make_font_italic): Ditto.
	(Fgtk_make_font_bold_italic): Ditto.
	(vars_of_fontcolor_gtk): Defvar debug-gtk-fonts.  It defaults to
	false.

2013-02-02  Jeff Sparkes  <jsparkes@gmail.com>

	* toolbar-gtk.c (gtk_output_toolbar): Replace casts with Gtk type
	conversion macros.

	* glyphs-gtk.c (gtk_finalize_image_instance): Unref/free image
	pixbuf.

2013-01-27  Jeff Sparkes  <jsparkes@gmail.com>

	* glyphs-gtk.c (pixbuf_from_xbm_inline): Add foreground and
	background color parameters.
	(init_image_instance_from_xbm_inline): Use black and white as
	foreground and background.
	(xbm_instantiate_1): Ditto.

	* device-gtk.c (Fgtk_init): Turn ubuntu overlay scrollbars off.

	* scrollbar-gtk.c (update_one_widget_scrollbar_pointer): Don't
	access widget field directly.

	* event-gtk.c (gtk_keysym_to_emacs_keysym): Map page-up, page-down
	to prior and next.

2013-01-26  Jeff Sparkes  <jsparkes@gmail.com>

	* toolbar-gtk.c (gtk_output_toolbar): Switch to GdkPixbuf for
	toolbar image.

	* redisplay-gtk.c (XLIKE_output_xlike_pixmap): Both output cases
	have the same code.

2013-01-24  Jeff Sparkes  <jsparkes@gmail.com>

	* glyphs-gtk.c (get_bit): Extracted from below.
	(pixbuf_from_xbm_inline): Use it.

2013-01-20  Jeff Sparkes  <jsparkes@gmail.com>

	* redisplay-gtk.c (XLIKE_output_xlike_pixmap): Last argument was
	always NULL, so it was removed.

	* redisplay-xlike-inc.c (XLIKE_output_pixmap): Ditto.

	* redisplay-x.c (XLIKE_output_xlike_pixmap): Ditto.

	* redisplay-gtk.c (XLIKE_text_width): Text width functions take
	frame arguments

	* redisplay-x.c (XLIKE_text_width): Text width functions take
	frame arguments.

	* redisplay-xlike-inc.c: Text width functions take frame arguments.
	(XLIKE_output_string): Ditto.

	* console-gtk.h: Remove unneeded function prototype.

	* redisplay-xlike-inc.c: Add forward declaration for
	XLIKE_output_xlike_pixmap.
	(XLIKE_output_pixmap): Adjust indentation.

	* redisplay-x.c (XLIKE_output_xlike_pixmap): Move here from
	redisplay-xlike-inc.c.  Remove Gtk code.

	* redisplay-gtk.c: Delete XLIKE_output_pixmap; use common version
	in redisplay-xlike-inc.c with no Gtk changes required.

2013-01-19  Jeff Sparkes  <jsparkes@gmail.com>

	* console-gtk.h: Declare gtk_draw_pixbuf.

	* frame-gtk.c (gtk_set_frame_icon): Use GdkPixbuf.
	(gtk_update_frame_external_traits): Comment out unused code.

	* glyphs-gtk.h (g): Use GdkPixbuf in image instance.

	* glyphs-gtk.c (convert_EImage_to_GDKPixbuf): Return GdkPixbuf, not GdkPixmap
	(gtk_finalize_image_instance): Unref GdkPixbuf correctly.
	(gtk_initialize_pixmap_image_instance): Allocate GdkPixbuf* now.
	(image_instance_convert_to_pointer): Use GdkPixbuf.
	(init_image_instance_from_gdk_pixbuf): Use GdkPixbuf.
	(image_instance_add_gdk_pixbuf): Use GdkPixbuf.
	(gtk_init_image_instance_from_eimage): Use GdkPixbuf.
	(pixbuf_from_xbm_inline): Define.
	(init_image_instance_from_xbm_inline): Use GdkPixbuf. (Needs more work.)
	(gtk_xpm_instantiate): Use GdkPixbuf.

	* redisplay-gtk.c (XLIKE_clear_region): bcolor parameter is used.
	(XLIKE_clear_frame): Use just gdk_clear_window.
	(gtk_draw_pixbuf): Renamed from our_draw_bitmap. Use gdk_draw_pixbuf.
	(XLIKE_text_width): Only call pango for proportional fonts.
	(XLIKE_output_string): Call XLIKE_text_width the proper args.
	(XLIKE_output_xlike_pixmap): Define.
	(XLIKE_output_pixmap): Define.

	* redisplay-xlike-inc.c: Fix declaration of XLIKE_text_width.  Add
	declaration for XLIKE_output_pixmap.
	(XLIKE_get_gc): GdkGC can't use GdkPixbuf for background.
	(XLIKE_output_xlike_pixmap): This version is for X only.
	(XLIKE_output_pixmap): This version is for X only.

2012-12-01  Aidan Kehoe  <kehoea@parhasard.net>

	* event-Xt.c:
	* event-Xt.c (x_keysym_to_character):
	Move this here, from events-xlike-inc.c.
	* event-gtk.c (gtk_keysym_to_emacs_keysym):
	Mule-ize this. Use gdk_keyval_to_unicode(), it's always available
	on GTK 2.
	* event-xlike-inc.c:
	Remove xlike_keysym_to_character.
	* events.h (KEYSYM_MASSAGING_NAME):
	New. Keysym equivalent of intern_massaging_name.

2012-05-18  Jeff Sparkes  <jsparkes@gmail.com>

	* event-gtk.c (handle_scroll_event): Define.
	(emacs_gtk_handle_magic_event): Add scroll event.
	(set_last_server_timestamp): Handle scroll event.
	(emacs_shell_event_handler): Add scroll event.

	* frame-gtk.c (gtk_create_widgets): Add scroll-events to requested
	events.

2012-05-17  Jeff Sparkes  <jsparkes@gmail.com>

	* device-gtk.c (gtk_event_name): Get event names by
	stringification of constants.

2012-05-16  Jeff Sparkes  <jsparkes@gmail.com>

	* redisplay-xlike-inc.c (XLIKE_clear_frame_windows): Accidentally
	moved to redisplay-x.c, move it back.

2012-05-11  Jeff Sparkes  <jsparkes@gmail.com>

	* redisplay-gtk.c (XLIKE_clear_frame): Copy to here and convert to
	cairo.

	* redisplay-x.c (XLIKE_clear_frame): Move here.

2012-05-10  Jeff Sparkes  <jsparkes@gmail.com>

	* redisplay-gtk.c (XLIKE_output_string): Remove unused Xlib
	related code.

	* redisplay-x.c (XLIKE_text_width): Move here.

	* redisplay-gtk.c (XLIKE_output_blank): Copy here, convert to
	cairo.
	(XLIKE_output_blank): Fill bar cursor rectangle.  Use
	cairo_destroy.
	(XLIKE_output_vertical_divider): Restore XLIKE prefix for
	consistency.

	* redisplay-x.c (XLIKE_output_blank): Move here from
	redisplay-xlike-inc.c.

	* redisplay-gtk.c (XLIKE_clear_region): Use cairo clear operator.
	Fix unused parameters.

2012-05-08  Jeff Sparkes  <jsparkes@gmail.com>

	* redisplay.c (vars_of_redisplay): Document that Gtk supports
	special values for visible-bell as well.

	* redisplay-gtk.c (XLIKE_flash): Copy from redisplay-xlike-inc.c,
	convert to cairo.

	* redisplay-x.c (XLIKE_flash): Copy from redisplay-xlike-inc.c

2012-04-24  Jeff Sparkes  <jsparkes@gmail.com>

	* redisplay-gtk.c (XLIKE_output_horizontal_line): Use a Gtk style
	to draw the line.
	(XLIKE_output_horizontal_line): Add cairo_destroy().

	* redisplay-xlike-inc.c (XLIKE_output_horizontal_line): Remove.

2012-04-23  Jeff Sparkes  <jsparkes@gmail.com>

	* redisplay-gtk.c (XLIKE_output_horizontal_line): Copied to here,
	fixed and updated for cairo.

	* redisplay-x.c (XLIKE_output_horizontal_line): Copied to here and
	fixed.

	* redisplay-xlike-inc.c (XLIKE_output_horizontal_line): Copied for
	X and gtk redisplay.

	* ui-gtk.c (__notice_object_destruction): GtkWidget has the
	destroy signal for Gtk 3.X.

	* menubar-gtk.c (__kill_stupid_gtk_timer): Use GObject instead of
	GtkObject.

	* ui-gtk.c: Use GObject instead of GtkObject.

2012-04-20  Jeff Sparkes  <jsparkes@gmail.com>

	* redisplay-x.c (XLIKE_clear_region): Copied here.

	* redisplay-gtk.c (XLIKE_clear_region): Copied here, converted to
	cairo.

	* redisplay-x.c (XLIKE_clear_region): Copied to X and Gtk.

	* fontcolor-gtk.c (valid_font_name_p): Unused, so ifdef it out.

	* redisplay-xlike-inc.c (XLIKE_clear_frame_windows): Wrap a couple
	more XLIKE functions.

	* redisplay-gtk.c (XLIKE_output_eol_cursor): Copy here.  Convert
	to use cairo methods.
	(XLIKE_output_string): Remove unused variables.

	* redisplay-x.c (XLIKE_output_eol_cursor): Copy here.

	* redisplay-xlike-inc.c (XLIKE_output_eol_cursor): Copied to x and
	gtk versions.

2012-04-19  Jeff Sparkes  <jsparkes@gmail.com>

	* redisplay-gtk.c (cr_set_foreground): Define.
	(gtk_output_vertical_divider): Use new function.
	(XLIKE_output_string): Use it.
	(gtk_output_vertical_divider): Add cairo_destroy.

2012-03-03  Jeff Sparkes  <jsparkes@gmail.com>

	* config.h.in: Add HAVE_GTK2

2012-03-02  Jeff Sparkes  <jsparkes@gmail.com>

	* ui-gtk.c (import_gtk_object_internal): Ifdef out unreachable
	code with compile errors.
	(emacs_gtk_object_getprop): Cast allocated value.
	(flag_to_symbol): Cast to correct class.  Remove trailing whitespace.

	* glyphs-gtk.c (gtk_button_property): Add cast to GTK_WIDGET.

2012-03-01  Jeff Sparkes  <jsparkes@gmail.com>

	* menubar-gtk.c (menu_convert): Cast function pointer to gpointer to
	avoid gcc 4.7 error.  Use G_OBJECT.

2012-02-02  Jeff Sparkes  <jsparkes@gmail.com>

	* ui-gtk.c (import_gtk_enumeration_internal): Protect against
	invalid enumerations.

2012-01-01  Jeff Sparkes  <jsparkes@gmail.com>

	* scrollbar-gtk.c (gtk_create_scrollbar_instance): Return FALSE so
	that scrollbar updates correctly.  Disable button handling
	callbacks; let the scrollbar deal with events itself.

2011-12-28  Jeff Sparkes  <jsparkes@gmail.com>

	* redisplay-x.c (XLIKE_output_vertical_divider): Move function
	here.  Remove Gtk code.

	* redisplay-xlike-inc.c (XLIKE_output_vertical_divider): Move this
	function.

2011-12-22  Jeff Sparkes  <jsparkes@gmail.com>

	* redisplay-xlike-inc.c: Add declaration.
	(XLIKE_output_vertical_divider): #ifndef THIS_IS_GTK.

	* redisplay-gtk.c: Declare function prototypes.
	(gtk_output_vertical_divider): New function that uses cairo to
	draw the divider.
	(gtk_fill_rectangle): Enable.
	(XLIKE_output_string): Fix compile error from previous changeset.

	* gccache-gtk.c (free_gc_cache): Replace obsolete
	gdk_gc_destroy().
	(gc_cache_lookup): Ditto.

	* glyphs-gtk.c (init_image_instance_from_gdk_image): Replace
	obsolete gdk_gc_destroy().
	(image_instance_add_gdk_image): Ditto.
	(gtk_colorize_image_instance): Ditto.

	* redisplay-gtk.c (XLIKE_output_string): Remove unused X11
	variables.  Remove XLIKE code.

2011-12-15  Jeff Sparkes  <jsparkes@gmail.com>

	* ui-gtk.c (type_already_imported_p): Replace deprecated
	GTK_FUNDAMENTAL_TYPE.
	(CONVERT_RETVAL): Ditto.
	(build_gtk_boxed): Ditto.
	(Fgtk_fundamental_type): Ditto, rename lisp function to match.
	(describe_gtk_arg): Ditto.

	* ui-byhand.c (Fgtk_pixmap_get): Comment out unused code.
	(syms_of_ui_byhand): Ditto.

2011-12-14  Jeff Sparkes  <jsparkes@gmail.com>

	* frame-gtk.c (gtk_frame_properties): Remove unused variable.
	(delete_event_cb): Unused argument.
	(gtk_create_widgets): Set the frame widget name.

	* menubar-gtk.c (menu_convert): Cast to GTK_MENU_SHELL.
	(__activate_menu): Ditto.

	* ui-gtk.c (Fg_object_properties): Move declaration before code.
	(__allocate_object_storage): Remove.

	* ui-byhand.c: Remove GtkCurve related functions.

	* ui-gtk.c: Remove Fgtk_object_type.
	(emacs_gtk_object_printer): Use G_OBJECT_TYPE.
	(Fg_object_type): Ditto.
	(describe_gtk_arg): Ditto.

	* glyphs-gtk.c (gtk_button_redisplay): Use G_OBJECT_TYPE.
	(gtk_tab_control_instantiate): Use gtk_notebook_set_current_page.
	(gtk_progress_gauge_redisplay): Use GTK_PROGRESS_BAR cast and
	gtk_progress_bar_set_fraction.

	* gtk-xemacs.c (gtk_xemacs_size_allocate): Use G_OBJECT_TYPE.
	Use gtk_widget_is_drawable.
	(gtk_xemacs_draw): Ditto.
	(gtk_xemacs_paint): Ditto.
	(gtk_xemacs_expose): Ditto.

	* menubar-gtk.c (menu_can_reuse_widget): Use non-deprecated
	function gtk_container_get_children.
	(__activate_menu): Ditto.
	(menu_convert): Use gtk_menu_shell_append.
	(__activate_menu): Ditto.
	(menu_convert): Replace deprecated signal function.
	(menu_create_menubar): Gtk 3.0 no longer supports right
	justification.
	(menu_descriptor_to_widget_1): Use gtk_radio_menu_item_get_group.

2011-12-13  Jeff Sparkes  <jsparkes@gmail.com>

	* device-gtk.c (gtk_init_device): Use G_CALLBACK instead of
	obsolete GTK_SIGNAL_FUNC.

	* frame-gtk.c (gtk_create_widgets): Ditto.

	* glyphs-gtk.c (gtk_tab_control_instantiate): Ditto.
	* menubar-gtk.c (menu_convert): Ditto.
	(menu_descriptor_to_widget_1): Ditto.
	(create_menubar_widget): Ditto.
	(gtk_popup_menu): Ditto

	* scrollbar-gtk.c (gtk_create_scrollbar_instance): Ditto.

	* ui-gtk.c (build_gtk_object): Ditto.

2011-12-06  Jeff Sparkes  <jsparkes@gmail.com>

	* scrollbar-gtk.c (gtk_update_scrollbar_instance_status):
	GTK_WIDGET_MAPPED is obsolete.
	(gtk_scrollbar_loop): Ditto.

	* glyphs-gtk.c (gtk_tab_control_callback): Remove reference to
	obsolete class GtkNotebookPage.

	* event-gtk.c (handle_focus_event_1): Remove obsolete widget focus
	flags.

	* ui-byhand.c: Remove deprecated GtkCList related functions.

	* toolbar-xlike.c (__INTERNAL_MAPPED_P): Replace GTK_WIDGET_REALIZED.

	* gtk-xemacs.c (gtk_xemacs_init): Replace GTK_WIDGET_SET_FLAGS.
	(gtk_xemacs_size_allocate): Replace GTK_WIDGET_REALIZED.

	* menubar-gtk.c (gtk_update_frame_menubar_internal): Fix undefined
	function call.

	* ui-gtk.c (flag_to_symbol): Added missing }.

2011-12-05  Jeff Sparkes  <jsparkes@gmail.com>

	* menubar-gtk.c (__maybe_destroy): Replace obsolete
	GTK_WIDGET_VISIBLE. 
	(gtk_update_frame_menubar_internal): Ditto.

	* gtk-xemacs.c (gtk_xemacs_size_allocate): Replace obsolete
	GTK_WIDGET_VISIBLE. 

	* ui-gtk.c (import_gtk_enumeration_internal): Replace obsolete
	GtkEnumValue code.
	(import_gtk_flags_internal): Replace obsolete GtkFlagValue.
	(Fg_flag): Unref type class.
	(Fg_enumeration): Ditto.
	(Fg_object_class_list_properties): Don't just peek, reference the
	type class to ensure it is instantiated.  Unref when done.
	(flag_to_symbol): Ditto.

2011-12-02  Jeff Sparkes  <jsparkes@gmail.com>

	* ui-gtk.c (Fg_flags): Define.
	(syms_of_ui_gtk): Add g-flags.
	(flag_to_symbol): Return list of symbols for flags that are set.

	* event-gtk.c (emacs_gtk_drain_queue): Replace obsolete function
	GDK_DISPLAY. 
	(gtk_reset_key_mapping): Ditto.
	(gtk_reset_modifier_mapping): Ditto.

	* device-gtk.c (gtk_device_init_x_specific_cruft): Replace
	obsolete function.

	* gtk-glue.c (xemacs_type_register): Ifdef out unused function.
	(xemacs_list_to_gtklist): Ditto.
	(__make_gtk_object_mapper): Ditto.
	(__make_string_mapper): Ditto.
	(xemacs_gtklist_to_list): Ditto.
	(xemacs_list_to_array): Ditto.
	(face_to_gc): Ditto.
	(face_to_style): Ditto.
	(gdk_event_to_emacs_event): Ditto.

2011-11-30  Jeff Sparkes  <jsparkes@gmail.com>

	* event-gtk.c (emacs_gtk_drain_queue): Replace deprecated
	GDK_DISPLAY with gdk_display_get_default.

2011-11-28  Jeff Sparkes  <jsparkes@gmail.com>

	* ui-gtk.c (Fg_enumeration): Throw an invalid argument if given
	type is not an enumeration.  Use invalid_argument instead of
	invalid_state for other type errors as well.
	(enum_to_symbol): Don't prepend the enum type to the enum name.
	(import_gtk_object_internal): Implement importing types of any
	parameters as well.  Move declarations into blocks, closer to use.
	(list_flags): Define.  Return an alist of flag names and values.
	(Fg_flag): Define.  Return integer value of flag name.

2011-11-25  Jeff Sparkes  <jsparkes@gmail.com>

	* ui-gtk.c (Fgtk_fundamental_type): Return type as symbol.
	(Fgtk_object_type): Ditto.
	(Fg_object_type): Ditto.
	(Fg_object_class_list_properties): Return property names as symbols.
	(Fg_object_properties): Define.
	(syms_of_ui_gtk): Defsubr g-object-properties.
	(flag_to_symbol): Return symbol name of flag for now.
	(enum_to_symbol): Return symbol based on enumeration name in C.

	* gui-gtk.c (vars_of_gui_gtk): Add var g-object-registry for
	debugging.  It probably needs a better name.

2011-11-24  Jeff Sparkes  <jsparkes@gmail.com>

	* ui-gtk.c (emacs_gtk_object_getprop): Convert return value to
	lisp properly.  Remove obsolete code.
	(Fg_object_class_list_properties): Update documentation.

2011-11-23  Jeff Sparkes  <jsparkes@gmail.com>

	* redisplay-xlike-inc.c (XLIKE_output_string): Remove Gtk code.
	Separating textual runs is not done by for Gtk, so ifdef those
	functions out.

2011-11-18  Jeff Sparkes  <jsparkes@gmail.com>

	* redisplay-gtk.c (XLIKE_output_string): Hoist cairo_t up in
	cursor drawing code.  Use cairo to draw bar cursor as well.
	(XLIKE_output_string): Move bar cursor width calculation closer to
	use.

	* redisplay-xlike-inc.c: Remove unused prototype declaration of
	gtk_output_string.

	* redisplay-gtk.c (gdk_draw_text_image): Take a cairo_t argument
	instead of GdkGC.
	(XLIKE_output_string): Use a cairo_t to store graphics information
	instead of a GdkGC.

2011-11-16  Jeff Sparkes  <jsparkes@gmail.com>

	* redisplay-gtk.c (XLIKE_output_string): Hoist widget variable up
	to function scope.

2011-11-15  Jeff Sparkes  <jsparkes@gmail.com>

	* redisplay-gtk.c (XLIKE_output_string): Fix logic so that block
	cursor displays.
	(gdk_draw_text_image): Use pango_itemize to break text into LTR
	and RTL segments, and display RTL better.
	(gtk_text_attributes): Extract from gdk_draw_text_image.
	(gdk_draw_text_image): Use pango cairo backend instead of Gdk.
	(gtk_set_source_rgb): Define, to handle GdkColor to cairo.
	(gtk_fill_rectangle): Update to smaller code.
	(gtk_draw_rectangle): Define, use cairo to draw.
	(XLIKE_output_string): Use cairo code to draw non-focus cursor.

2011-11-14  Jeff Sparkes  <jsparkes@gmail.com>

	* redisplay-gtk.c (XLIKE_output_string): Comment out rectangle
	clearing code that I think is unneeded for Gtk.

	* gtk-xemacs.c (gtk_xemacs_get_type): Cast a 0 to GTypeFlags to make
	g++ happy.

2011-11-13  Jeff Sparkes  <jsparkes@gmail.com>

	* redisplay-gtk.c (XLIKE_output_string): Remove THIS_IS_X code. 
	(XLIKE_output_string): Add a block to localize declaration.
	(XLIKE_output_string): Replace cursor_cachel checks with assert to
	simplify logic.

	* gtk-xemacs.c (gtk_xemacs_init): Gtk 2.0 instance init also has
	class argument.
	(gtk_xemacs_new): Use GTK_TYPE_XEMACS.
	(gtk_xemacs_new): Use type check cast for GtkXEmacs.
	(gtk_xemacs_get_type): Use g_type_register_static_simple instead
	of obsolete gtk_type_unique.

	* gtk-xemacs.h (GTK_XEMACS_CLASS): Define standard set of macros
	for Gtk 2.0 classes.

2011-11-10  Jeff Sparkes  <jsparkes@gmail.com>

	* redisplay-gtk.c (XLIKE_output_string): Copied from
	redisplay-xlike-inc.c to allow better adaptation to Gtk.
	(XLIKE_output_string): Remove USE_XFT code.
	(XLIKE_output_string): Remove underline and strikethrough font code.

	* redisplay-xlike-inc.c (XLIKE_output_string): Only use if not Gtk.

2011-11-09  Jeff Sparkes  <jsparkes@gmail.com>

	* ui-gtk.c (Fg_enumeration): Define new function.
	(syms_of_ui_gtk): DEFSUBR for it.
	(list_enumeration): Define.
	(Fg_enumeration): Single type argument means return an alist of
	enumerations for that type.
	(list_enumeration): Return value nicknames as well.

	* sysgtk.h: Include glib-object.h for enum functions.

	* ui-gtk.c (Fg_type_from_name): Return type name as symbol.
	(Fg_type_name): Ditto.

2011-11-08  Jeff Sparkes  <jsparkes@gmail.com>

	* ui-gtk.c (Fg_type_from_name): Allow symbol as argument.
	(Fg_type_name): Ditto.

2011-11-04  Jeff Sparkes  <jsparkes@gmail.com>

	* glyphs-gtk.c (gtk_map_subwindow): Use gtk_widget_hide/show
	instead of using obsolete GTK_WIDGET_FLAGS.
	(gtk_map_subwindow): Accidental hide instead of show.
	(register_cursor_name): Take a const char * arg to avoid warnings.
	(gtk_map_subwindow): Remove unused variable old_flags.
	(gtk_image_instance_hash): ifdef out unused function.
	(__downcase): Remove unused function.

	* frame-gtk.c (gtk_frame_visible_p): Use FRAME_VISIBLE_P instead
	of f->visible.
	(gtk_popup_frame): Ditto.
	(gtk_frame_visible_p): Ditto.
	(gtk_frame_visible_p): Use gtk_widget_get_visible() instead of
	obsolete GTK_OBJECT_FLAGS.

	* console-gtk-impl.h (struct gtk_frame): Remove unused field
	visible_p and accessor macro for it.

2011-10-31  Jeff Sparkes  <jsparkes@gmail.com>

	* fontcolor-gtk.c (gtk_font_list): Check font pattern for
	"monospace" using utf-8 encoding.

	* device-x.c (x_delete_device): Remove DEVICE_X_XFTDRAW, remnants
	of an experimental change that had nothing to do with Gtk.

	* redisplay-xlike-inc.c (XLIKE_output_string): Use FRAME_X_XFTDRAW
	instead of incorrect DEVICE_X_XFTDRAW.

2011-09-21  Aidan Kehoe  <kehoea@parhasard.net>

	* menubar-gtk.c (remove_underscores):
        Oops, got a variable name wrong here; correct it, fix the compile.

2011-09-20  Aidan Kehoe  <kehoea@parhasard.net>

	* console-gtk.c (gtk_perhaps_init_unseen_key_defaults):
	* fontcolor-gtk.c (gtk_parse_nearest_color):
	* fontcolor-gtk.c (gtk_valid_color_name_p):
	* fontcolor-gtk.c (gtk_font_list):
	* frame-gtk.c (gtk_set_frame_text_value):
	* frame-gtk.c (gtk_initialize_frame_size):
	* frame-gtk.c (dragndrop_get_drag):
	* frame-gtk.c (Fgtk_start_drag_internal):
	* gtk-glue.c (xemacs_list_to_gtklist):
	* menubar-gtk.c:
	* menubar-gtk.c (convert_underscores):
	* menubar-gtk.c (remove_underscores):
	* menubar-gtk.c (menu_convert):
	* menubar-gtk.c (menu_descriptor_to_widget_1):
	* menubar-gtk.c (menu_can_reuse_widget):
	* select-gtk.c (symbol_to_gtk_atom):
	* select-gtk.c (atom_to_symbol):
	* ui-gtk.c (emacs_gtk_object_getprop):
	* ui-gtk.c (Fg_type_from_name):
	* ui-gtk.c (Fg_type_name):
	* ui-gtk.c (Fg_object_class_list_properties):
	* ui-gtk.c (lisp_to_g_value):
        And it's everything, not just the widget functions that takes UTF-8
        in GTK-2; e.g. they've gone and implemented a separate namespace for
        server atoms, and that encoding is UTF-8, not CTEXT.
        Implement this, in passing removing the code that worked around the
        absence of gdk_keyval_from_name on GTK1, not assuming that
        g_object_get_property has useful behaviour when a property doesn't
        exist, and making the code that converts XEmacs menu item
        specification to GTK menu item specifications less dependent on our
        internal encoding.

2011-09-07  Aidan Kehoe  <kehoea@parhasard.net>

	* frame-gtk.c (gtk_set_frame_text_value):
	* frame-gtk.c (gtk_create_widgets):
	* glyphs-gtk.c (gtk_add_tab_item):
	* menubar-gtk.c (menu_descriptor_to_widget_1):
	* toolbar-gtk.c (gtk_output_toolbar):
	* ui-gtk.c (Fgtk_import_function_internal):
        The various GTK widget functions now take their text encoded in
        UTF-8, not CTEXT. Change our code to pass UTF-8, avoiding some
        errors from Pango, especially with buffer names in the gutter.

2011-08-28  Aidan Kehoe  <kehoea@parhasard.net>

	* select-gtk.c:
	* select-gtk.c (emacs_gtk_selection_handle):
	* select-gtk.c (syms_of_select_gtk):
        va_run_hook_with_args needs to be called with the symbol name of the
        hook, not its value. Make it so.

2011-08-27  Aidan Kehoe  <kehoea@parhasard.net>

	* device-gtk.c:
	* device-gtk.c (Fgtk_init):
	Call setlocale (LC_NUMERIC, "C") after gtk_init(); the latter
	stomps on LC_NUMERIC, taking the value from the environment, which
	we explicitly don't want, because we use the C library functions
	to parse Lisp floats and so on.

2011-08-26  Aidan Kehoe	 <kehoea@parhasard.net>

	* frame-gtk.c:
	* frame-gtk.c (gtk_mark_frame):
	For the sake of KKCC, add information on the various weak hash
	tables in gtk_frame to the data description. Otherwise they get
	garbage collected, which is less than optimal.
	Reorder the mark_object calls in gtk_mark_frame() to reflect the
	order of the Lisp_Objects in the structure, to make omitting things
	a little harder to forget.

2011-08-26  Aidan Kehoe  <kehoea@parhasard.net>

	* device-gtk.c:
	* device-gtk.c (gtk_init_device):
	* device-gtk.c (vars_of_device_gtk):
	At startup, tell GTK that we're capable of and interested in
	passing selections for all those selection types in
	selection-converter-out-alist. This means that we now support
	non-Latin-1 data when copying and pasting, which previously wasn't
	the case on GTK.
	Call va_run_hook_with_args, don't reimplement it ourselves.
	Remove Qgtk_seen_characters in passing, nothing was using it.
	* select-gtk.c (emacs_gtk_selection_handle):
	Fix a bug in this function; because of X11, the fifth argument to
	lisp_data_to_selection_data is not the number of octets at the
	address DATA, rather the number of elements, each of size FORMAT
	bits, in the array at that address. 
	* select.h:
	device-gtk.c now needs to see selection-converter-out-alist.

2011-07-12  Jeff Sparkes  <jsparkes@gmail.com>

	* event-gtk.c (emacs_gtk_add_timeout): Use glib timeout instead of
	deprecated gtk timeout.
	(emacs_gtk_remove_timeout): Use glib method as well.

	* menubar-gtk.c (__kill_stupid_gtk_timer): Use glib timeout cancel.

2011-06-29  Aidan Kehoe  <kehoea@parhasard.net>

	* event-gtk.c (gtk_to_emacs_keysym):
        Don't attempt to synthesise events appropriate for input methods,
        that's wrong for GTK2 and leads to duplicated characters when AltGr
        is used.

2011-05-15  Jeff Sparkes  <jsparkes@gmail.com>

	* fontcolor-gtk.c (Fgtk_set_font_weight): Define.
	(syms_of_fontcolor_gtk): Register.

	* glyphs-gtk.c (register_cursor_name): Define.
	(register_cursor_names): Renamed from check_cursor_names.
	(cursor_name_to_index): Updated to use alist.
	(vars_of_glyphs_gtk): Update gtk-cursor-names doc.
	(complex_vars_of_glyphs_gtk): Register cursor names here.

2011-05-14  Jeff Sparkes  <jsparkes@gmail.com>

	* ui-byhand.c (syms_of_ui_byhand): Remove toolbar item insertion
	functions.

	* ui-gtk.c (syms_of_ui_gtk): Register g-object-type.

2011-05-09  Jeff Sparkes  <jsparkes@gmail.com>

	* ui-gtk.c (Fg_type_parent): Accept type as symbol, return type as
	symbol.
	(Fg_type_children): Ditto.
	(Fg_object_class_list_properties): Ditto.
	(Fg_type_interfaces): Define.
	(syms_of_ui_gtk): Add g-type-interfaces.

	* ui-byhand.c (Fgtk_widget_size_request): Define.
	(syms_of_ui_byhand): Add above function.

	* frame-gtk.c (gtk_toolbar_plist): Rename, return a plist, not
	an alist. 
	(gtk_frame_property): Call gtk_toolbar_plist.
	(gtk_frame_properties): Ditto.

2011-05-03  Jeff Sparkes  <jsparkes@gmail.com>

	* frame-gtk.c (gtk_toolbar_alist): Define.
	(gtk_frame_property): Define menubar and toolbar properties.
	(gtk_internal_frame_property_p): Ditto.
	(gtk_frame_properties): Ditto.

	* ui-gtk.c (build_gtk_object): Handle NULL argument.
	
2011-05-02  Jeff Sparkes  <jsparkes@gmail.com>

	* frame-gtk.c (cleanup_deleted_frame): Match GWeakNotify.
	(gtk_create_widgets): Use g_object_weak_ref.
	(gtk_create_widgets): Use G_OBJECT.
	(gtk_popup_frame): Remove GTK_OBJECT cast.
	(gtk_get_frame_parent): Ditto.
	(gtk_set_initial_frame_size): Replace/delete several deprecated
	functions.

2011-05-01  Jeff Sparkes  <jsparkes@gmail.com>

	* menubar-gtk.c (menu_convert): Use gtk_menu_item_get_submenu.
	(__activate_menu): Ditto.
	(gtk_xemacs_menubar_new): Make static to avoid prototype warning.
	(__remove_gcpro_by_id): Match GWeakNotify signature.
	(__destroy_notify): Define.
	(menu_convert): Use gtk_menu_item_get_submenu.
	(menu_create_menubar): Use 2.0 gtk_menu_shell_insert.
	(create_menubar_widget): Use preferred g_object_weak_ref.
	(__maybe_destroy): Match GtkCallback signature.
	(__activate_menu): Avoid cast.

	* frame-gtk.c (gtk_create_widgets): Use g_object_weak_ref.

	* menubar-gtk.c (menu_descriptor_to_widget_1): Ditto.
	(create_menubar_widget): Ditto.

	* frame-gtk.c (gtk_init_frame_1): Use GPOINTER_TO_GUINT
	consistently for GUI_ID.

	* scrollbar-gtk.c (scrollbar_drag_hack_cb): Ditto.
	(gtk_create_scrollbar_instance): Ditto.

	* menubar-gtk.c (__activate_menu): Ditto.
	(__remove_gcpro_by_id): Ditto.
	(menu_convert): Ditto.
	(create_menubar_widget): Ditto.

2011-04-26  Jeff Sparkes  <jsparkes@gmail.com>

	* menubar-gtk.c: Remove custom menubar class.

2011-04-24  Jeff Sparkes  <jsparkes@gmail.com>

	* ui-gtk.c (Fgtk_describe_type): Use G_TYPE_IS_OBJECT.

2011-04-23  Jeff Sparkes  <jsparkes@gmail.com>

	* ui-gtk.c (type_already_imported_p): Return car of assq result.
	(get_enumeration): Type symbol is car of result.
	(lisp_to_gtk_enum): Int value is cdr of result.
	(lisp_to_gtk_flag): Ditto.
	(flag_to_symbol): Symbol is car.
	(enum_to_symbol): Ditto.

	* scrollbar-gtk.c (gtk_create_scrollbar_instance): Use type
	conversion macros for data.
	(scrollbar_cb): Mark unused args. Fix several warnings.

	* ui-byhand.c (generic_toolbar_insert_item): Use type conversion.

	* ui-gtk.c (build_gtk_object): Use regular data, not qdata.
	(flag_to_symbol): Fix undeclared variable.
	(enum_to_symbol): Fix undeclared variable.
	(build_gtk_object): Use glib type conversion macros.
	(lisp_to_g_value): Fix ifdef.
	(flag_to_symbol): Get flags value correctly.

	* scrollbar-gtk.c (gtk_create_scrollbar_instance): Use regular
	data, not qdata to save id.

	* glyphs-gtk.c (resource_name_to_resource): Update for renamed
	lisp_to_gtk_enum.

	* ui-gtk.c: Enumerations and flags are now stored in an alist.
	GType is represented as a symbol in lisp because an unsigned int
	might be too large.
	(type_as_symbol): Define.
	(type_already_imported_p): Return imported type as symbol. Look up
	type in alist. Enumeration and flags need to be imported.
	(mark_type_as_imported): Add to Vgtk_types alist.  Return symbol.
	(mark_type_as_imported): Handle type as symbol. Return symbol
	(import_gtk_flags_internal): Use Vgtk_flags alist.
	(import_gtk_enumeration_internal): Use Vgtk_enumerations alist.
	(import_gtk_type): Handle type as symbol.
	(Fgtk_import_function_internal): Invalid argument, not sf error.
	(vars_of_ui_gtk): Add Vgtk_flags, rename to Vgtk_enumerations,
	update doc of Vgtk_type for alist.
	(g_type_to_lisp): Handle flags correctly.
	(lisp_to_g_value): Handle enums and flags correctly.
	(get_enumeration): Update for alist.
	(lisp_to_gtk_flag): Update called function args.
	(lisp_to_gtk_enum): Rename from symbol_to_gtk_enum. Update for
	alist. Error if unknown enum.
	(lisp_to_gtk_flag): Update for alist. Error if unknown flag.

	* ui-byhand.c (__remove_gcpro_by_id): Mark argument unused.

	* emacs-marshals.c: Regenerate for INT__INT.

2011-04-22  Jeff Sparkes  <jsparkes@gmail.com>

	* gtk-glue.c (face_to_style): Comment out unused variable.

2011-04-21  Jeff Sparkes  <jsparkes@gmail.com>

	* ui-gtk.c (Fg_type_from_name): Update doc string.
	(Fg_type_parent): Define.
	(Fg_type_children): Define.

2011-04-18  Jeff Sparkes  <jsparkes@gmail.com>

	* faces.c (complex_vars_of_faces): Use 10 pt fonts for Gtk.
	* fontcolor-gtk.c (vars_of_fontcolor_gtk): Set default font size
	to 10 pt.  Xft 12 pt is much larger than Xft 12.

2011-04-17  Jeff Sparkes  <jsparkes@gmail.com>

	* ui-gtk.c (Fg_type_name): Return type name for an int or string
	type name.
	(Fg_object_class_list_properties): Use it here.  Return class
	properties as a alist of propname and typename.
	(lisp_to_g_value): Group declarations C style.

2011-04-14  Jeff Sparkes  <jsparkes@gmail.com>

	* fontcolor-gtk.c (gtk_font_list): Add a "Monospace" filter
	pattern.
	(font_description_from_string): Build a font description from a
	fontconfig name.

2011-04-13  Jeff Sparkes  <jsparkes@gmail.com>

	* faces.c (complex_vars_of_faces): Set default fonts for Gtk.
	Avoid XLFD specifications.

	* menubar-gtk.c (menu_descriptor_to_widget_1): Use GTK_LABEL.

	* gtk-glue.c (face_to_style): Can't use a PangoFont to set a
	style.  NB, this code will be obsolete in Gtk 3.0 anyway.

	* redisplay-gtk.c (our_draw_bitmap): ifdef out.

	* redisplay-xlike-inc.c (XLIKE_output_string): Remove obsolete
	  comments about Gtk 8/16 bit text display.
	(XLIKE_output_string): Move ifdef outside of if statements for
	underline and strikthru handling.  Gtk does it differently.
	(): Remove prototype for unimplemented XLIKE_output_cursor().

	* fontcolor-gtk.c: Define gtk-fallback-font-name and
	gtk-fallback-font-size as "Monospace Normal 10" and 10.0
	respectively.
	(font_description_from_string): Use fallback font if given an XLFD
	name or fontconfig (temporarily).
	(gtk_initialize_font_instance): Use fallback size if size was
	unspecified.
	(vars_of_fontcolor_gtk): DEFVAR fallback variables.
	(gtk_font_list): Implement font list for pango fonts.
	(vars_of_fontcolor_gtk): Make fallback font size same as
	defaults: 12.

2011-04-11  Jeff Sparkes  <jsparkes@gmail.com>

	* redisplay-gtk.c (gdk_draw_text_image): Assert the text input is
	single byte.  UTF-8, not UTF-16.
	(XLIKE_text_width_single_run): We always have to layout the text
	to account for combining marks, etc.

	* redisplay-xlike-inc.c (separate_textual_runs_utf8): Define for
	Gtk.
	(separate_textual_runs): Use it here.

2011-04-08  Jeff Sparkes  <jsparkes@gmail.com>

	* fontcolor-gtk.c (gtk_find_charset_font): Define empty function
	here. Enough to get display running.

	* fontcolor-xlike-inc.c (XFUN): find_charset_font uses XLFD, so
	it's not appropriate for Gtk.

2011-04-06  Jeff Sparkes  <jsparkes@gmail.com>

	* fontcolor-gtk.c (font_description_from_string): Define function
	to Convert font name to pango font name.  Just substitute
	"Monospace" for now; intended to handle fontconfig fonts.
	(gtk_initialize_font_instance): Use.
	(Fgtk_make_font_bold): Use.
	(Fgtk_make_font_unbold): Use.
	(Fgtk_make_font_italic): Use.
	(Fgtk_make_font_unitalic): Use.
	(Fgtk_make_font_bold_italic): Use.

2011-04-05  Jeff Sparkes  <jsparkes@gmail.com>

	* device-gtk.c (gtk_init_device): Use recommend pango
	initialization sequence.

2011-04-03  Jeff Sparkes  <jsparkes@gmail.com>

	* fontcolor-gtk.c (Fgtk_make_font_bold): Define.
	(Fgtk_make_font_unbold): Define.
	(Fgtk_make_font_italic): Define.
	(Fgtk_make_font_unitalic): Define.
	(Fgtk_make_font_bold_italic): Define.
	(syms_of_fontcolor_gtk): Add new functions.

2011-04-01  Jeff Sparkes  <jsparkes@gmail.com>

	* redisplay-xlike-inc.c (XLIKE_output_string): Remove Gtk
	implementation of strikethru and underline.  Now done with pango.

	* redisplay-gtk.c (gdk_draw_text_image): Take a face_cachel as an
	argument which eliminates the fg, bg and bgc arguments.  Also take
	a textual_run to get access to charset information for the text.
	Set text foreground and background at pango attributes.  No need
	to fill background rectangle now.
	(gdk_draw_text_image): Implement strikethrough and underline as
	pango text attributes.

	* redisplay-xlike-inc.c (XLIKE_output_string): Update callers.

2011-03-28  Jeff Sparkes  <jsparkes@gmail.com>

	* console-gtk-impl.h (struct gtk_device): Add PangoFontMap.
	(DEVICE_GTK_FONT_MAP): Add accessor macro.

	* device-gtk.c (gtk_init_device): Remove ifdef around pango setup.

	* faces.c (complex_vars_of_faces): Define default faces for
	Gtk/Pango. Monospace, unifont and a CJK one, based on Ubuntu
        ttf fonts.

	* fontcolor-gtk-impl.h (struct gtk_font_instance_data): No longer
	ifdefed.

	* fontcolor-gtk.c (gtk_initialize_font_instance): Initialize a
	pango font, also looking up the font description and font metrics.
	(gtk_print_font_instance): gdk_font_id isn't valid for a PangoFont.
	(gtk_finalize_font_instance): free pango font resources.
	(__get_gtk_font_truename): Return name from pango font
	description. This may be insufficient.

	* redisplay-gtk.c (gdk_draw_text_image): Draw the text using pango
	layout. Take foreground and background color arguments for cairo
	instead of a GdkGc.
	(XLIKE_text_width_single_run): Implement pango based version.

	* redisplay-xlike-inc.c (XLIKE_output_string): Use pango font
	metrics for underline and strikethrough positions.
	(XLIKE_output_string): Pass foreground and background colors to
	gdk instead of a background Gc.
	(XLIKE_get_gc): No longer need to copy the font; now a PangoFont
	is used instead.
	(XLIKE_text_width_single_run): Don't use this one for Gtk, use the
	one in redisplay-gtk.c.

	* sysgtk.h (include): Always include pango.h and pangoxft.h

2011-03-26  Jeff Sparkes  <jsparkes@gmail.com>

	* redisplay-xlike-inc.c (XLIKE_output_string): Cursor offset must
	include descent for Gtk.

2011-03-18  Jeff Sparkes  <jsparkes@gmail.com>

        * redisplay-gtk.c (gdk_draw_text_image): Now takes a GtkWidget
        instead of a GdkDrawable.
	* redisplay-xlike-inc.c (XLIKE_output_string): Update callers.

2011-03-10  Jeff Sparkes  <jsparkes@gmail.com>

	* redisplay-gtk.c (gdk_draw_text_image): GDK draws text relative to
	the baseline, so offset by the descent.

2011-03-09  Jeff Sparkes  <jsparkes@gmail.com>

	* config.h.in: Add HAVE_PANGOXFT flag.

	* event-gtk.c (IS_MODIFIER_KEY): Use GDK_KEY_XX instead of obsolete
	GDK_XX style constants.
	(keysym_obeys_caps_lock_p): ditto
	(gtk_keysym_to_emacs_keysym): ditto

	* sysgtk.h: gtkfixed.h no longer needed in Gtk 2.0; will be removed
	in Gtk 3.0

2010-11-22  Jeff Sparkes  <jsparkes@gmail.com>

	* redisplay-gtk.c (gtk_fill_rectangle): New function to fill a
	rectangle using cairo.
	(gdk_draw_text_image): Use it here.

2010-11-08  Jeff Sparkes  <jsparkes@gmail.com>

	* scrollbar-gtk.c (gtk_update_scrollbar_instance_status): Remove
	old code to avoid flickering.  It actually causes flickering in
	gtk 2.28.

2010-11-03  Jeff Sparkes  <jsparkes@gmail.com>

	* frame-impl.h (FRAME_REAL_TOP_TOOLBAR_BOUNDS): Remove HAVE_GNOME
	code, which only worked for the top toolbar using GnomeApp.

2010-11-02  Jeff Sparkes  <jsparkes@gmail.com>

	* config.h.in: libgnome and libgnomeui will be deprecated in GNOME
	3.0; remove HAVE_GNOME.

	* toolbar-gtk.c (gtk_output_toolbar): Remove HAVE_GNOME code.

	* sysgtk.h: Remove HAVE_GNOME code.

	* menubar-gtk.c (create_menubar_widget): Remove HAVE_GNOME code.

	* frame-gtk.c (gtk_create_widgets): Remove HAVE_GNOME code.

	* device-gtk.c (Fgtk_init): Remove gnome_init().

2010-10-27  Jeff Sparkes  <jsparkes@gmail.com>

	* ui-byhand.c (Fgtk_notebook_query_tab_label_packing): Wrong type
	in error message.

2010-10-19  Jeff Sparkes  <jsparkes@gmail.com>

	* menubar-gtk.c (menu_descriptor_to_widget_1): Initialize
	gtk_accel variable.
	(menu_descriptor_to_widget_1): Fix GTK type warnings.
	(create_menubar_widget): Remove unused variable.

	* ui-gtk.h: Marshalling functions now use GValue, not GtkArg.

	* gui.c (gui_item_value): Disable error check to avoid errors.
	There is still a problem here to be fixed.

	* gtk-glue.c (xemacs_list_to_gtklist): memset local GValue
	variable to zero to reset the type.
	(xemacs_list_to_array): Ditto.

	* ui-gtk.c: Ditto.  (Two DEFUNs)

2010-10-05  Jeff Sparkes  <jsparkes@gmail.com>

	* symsinit.h: Add vars_of_toolbar_gtk () prototype.

	* toolbar-gtk.c (gtk_clear_toolbar): Set cleared toolbar widget to
	NULL.

2010-10-04  Jeff Sparkes  <jsparkes@gmail.com>

	* menubar-gtk.c (menu_descriptor_to_widget_1): Don't try to use an
	invalid accelerator key.

	* menubar-gtk.c: Remove GtkXEmacsAccelLabel now that an easier
	method to set the menu item accelerator labels is used.
	(menu_convert): Use GtkLabel instead.

2010-10-03  Jeff Sparkes  <jsparkes@gmail.com>

	* ui-gtk.c (emacs_gtk_object_printer): Use %0x instead of %p to
	print pointers.
	(emacs_gtk_boxed_printer): Ditto.
	(describe_gtk_arg): Ditto.

	* menubar-gtk.c (menu_descriptor_to_widget_1): Add second label
	containing the accelerator to the menu item.

2010-09-24  Jeff Sparkes  <jsparkes@gmail.com>

	* frame-gtk.c (gtk_create_widgets): Use GTK_SIGNAL_CONNECT instead
	of obsolete G_SIGNAL_CONNECT.

2010-08-20  Jeff Sparkes  <jsparkes@gmail.com>

	* menubar-gtk.c (gtk_xemacs_menubar_size_request): Remove comment
	about detached menus since we longer do that.

2010-08-18  Jeff Sparkes  <jsparkes@gmail.com>

	* toolbar.c (update_frame_toolbars_geometry):  Use
	FRAME_CURRENT_TOOLBAR_SIZE accessor macro.
	(init_frame_toolbars): Ditto.

2010-08-16  Jeff Sparkes  <jsparkes@gmail.com>

	* ui-gtk.c (Fgtk_call_function): Initialize arg array to NULLs
	before proceeding.

2010-08-08  Jeff Sparkes  <jsparkes@gmail.com>

	* ui-gtk.c (Fg_object_class_list_properties): Initialize GValue
	with memset.  Using only g_value_init causes an error.

2010-08-06  Jeff Sparkes  <jsparkes@gmail.com>

	* ui-byhand.c: remove deprecated gtk-button-box functions that
	returned more than one value.  Use properties instead.
	
2010-08-04  Jeff Sparkes  <jsparkes@gmail.com>

	* ui-gtk.c (type_already_imported_p): Remove unused temp debug
	variable "key".
	(Fg_type_from_name): Return nil for invalid types.

2010-08-02  Jeff Sparkes  <jsparkes@gmail.com>

	* emacs-marshals.c (emacs_gtk_marshal_BOOL__OBJECT_INT):
	Regenerate with return type initialization.

	* ui-gtk.c (ffi_object_printer): Add 0x prefix to FFI pointer print.
	(Fgtk_import_variable_internal): Remove extraneous call to g_type_init().
	(Fgtk_import_function_internal): Ditto.

	* emacs-marshals.c: Generate with new GType variable instead of
	using deprecated GtkArg.

2010-08-02  Jeff Sparkes  <jsparkes@gmail.com>

	* toolbar-gtk.c (gtk_output_toolbar): Use small toolbar icons.

2010-07-29  Jeff Sparkes  <jsparkes@gmail.com>

	* menubar-gtk.c: Remove dockable_menubar and tear_off_menus
	variables. Remove TEAR_OFF_MENUS ifdefed code.
	(__maybe_destroy): Remove tear off menus check.
	(__activate_menu): Remove tear off menu initialization.  Remove
	dockable menu initialization.
	(reinit_vars_of_menubar_gtk): No variables to initialize.
	(vars_of_menubar_gtk):  Remove DEFVAR of
	menubar-dockable-p and menubar-tearable-p.

2010-07-28  Jeff Sparkes  <jsparkes@gmail.com>

	* scrollbar-gtk.c (gtk_create_scrollbar_instance): Remove
	workaround for setting scrollbar size. Gtk 2.21.2 actively warns
	when resizing to current size.

2010-07-27  Jeff Sparkes  <jsparkes@gmail.com>

	* ui-gtk.h (FFI_RETURN_TYPE): Define accessor macros for FFI types.

	* ui-gtk.c (Fgtk_signal_connect): Use new accesor macros.

	* gtk-glue.c (xemacs_list_to_gtklist): Initialize variable to
	fix warning.

2010-07-21  Jeff Sparkes  <jsparkes@gmail.com>

	* menubar-gtk.c (menu_descriptor_to_widget_1): Use activate signal
	instead of activate-item when add an accelerator or else Gtk gives
	a warning.

2010-07-08  Jeff Sparkes  <jsparkes@gmail.com>

	* toolbar-gtk.c (init_gtk_toolbar_stock_icons): Build a hash table
	of toolbar function to gtk stock icon name.
	(gtk_output_toolbar): Look in the hash table for the stock icon
	name, and try to load it. If loading fails, fall back to default
	toolbar icon.
	(vars_of_toolbar_gtk): Declare and initialize stock icon hash map
	variable. 
	(gtk_initialize_frame_toolbars): Remove trace message.
	(gtk_free_frame_toolbars): Remove trace message.

	* emacs.c (main_1): Call vars_of_toolbar_gtk when appropriate.

	* toolbar-gtk.c (gtk_output_toolbar): Add gtk stock icons for
	those toolbar buttons that match clearly.

2010-07-07  Jeff Sparkes  <jsparkes@gmail.com>

	* frame-impl.h: If HAVE_GNOME, the top toolbar is outside the text
	widget.  All measurements of the top toolbar size are returned as
	zero.   (Now there is an extra line at the bottom of the modeline
	instead of the top of the text pane.)

2010-07-02  Jeff Sparkes  <jsparkes@gmail.com>

	* config.h.in: Add HAVE_PANGO.
	
	* toolbar-gtk.c (gtk_output_toolbar): Hardwire first four toolbar
	icons to be the correct gtk stock icons.  This is for demo
	purposes; this should be done in lisp.

	* menubar-gtk.c (__activate_menu): Use NULL accelerator until I
	figure out Gtk 2.0 accelerators.  Refactor loop code to avoid continue.
	(menu_descriptor_to_widget_1): Actually set the label on
	individual menu items.
	(menu_descriptor_to_widget_1): Use an explicit separator where required.

2010-07-01  Jeff Sparkes  <jsparkes@gmail.com>

	* menubar-gtk.c (menu_convert): Check g_signal_connect with assert.
	(menu_convert):  Ditto.  Use GINT_TO_POINTER for callback data.
	(menu_descriptor_to_widget_1): Ditto.
	(create_menubar_widget): Ditto.
	(gtk_popup_menu): Ditto.  Fix indentation.

2010-06-30  Jeff Sparkes  <jsparkes@gmail.com>

	* menubar-gtk.c (gtk_xemacs_menubar_size_request):
	Remove debug message.

	* frame-gtk.c (gtk_create_widgets):
	Ensure that the container is a box before trying to pack it.
	This may not be true when using GnomeApp.

	* emacs-marshals.c (emacs_gtk_marshal_POINTER__BOOL_INT): New
	marshaller.	
	(emacs_gtk_marshal_POINTER__POINTER_POINTER): New marshaller.

	* ui-gtk.c (import_gtk_flags_internal): Added debug output for gtk
	flag import.
	(import_gtk_enumeration_internal): Added debug output for gtk enum
	import.
	(Fgtk_import_function_internal): Added debug message on function
	import success.
	(Fgtk_import_function_internal): Added debug message about
	marshaller being used.
	(Fgtk_call_function): Convert internal arguments to gtk types correctly.
	(lisp_to_g_value): Convert lisp value to the base fundamental type
	of requested arguments.  Rename arg to val for better looking code.

	* gtk-xemacs.c (gtk_xemacs_new): Make the xemacs widget require a
	GdkWindow.  This fixes the shrinking window problem for both menus
	and toolbars.

2010-06-11  Jeff Sparkes  <jsparkes@gmail.com>

	* frame-gtk.c (size_allocate_cb): Rename from resize_event_cb.
	(gtk_create_widgets): Pass new name to signal callback.  Validate
	g_signal_connect().
	(size_allocate_cb): Use FRAME_PIXWIDTH and FRAME_PIXHEIGHT.

	* glyphs-gtk.c (gtk_tab_control_instantiate): Validate
	g_signal_connect(). 
	(gtk_tab_control_redisplay): Use gtk_notebook_set_current_page()
	instead of deprecated gtk_notebook_set_page().
	(gtk_tab_control_redisplay): Remove notebook pages from end.

	* frame-gtk.c (gtk_create_widgets): Assert return value of
	g_signal_connect to validate.

	* scrollbar-gtk.c (gtk_free_scrollbar_instance): Set the widget to
	zero.  Set the scrollbar_data to zero.

	* lisp.h (XFREE): A macro that frees a pointer and then sets it to
	zero.

2010-06-10  Jeff Sparkes  <jsparkes@gmail.com>

	* fontcolor-impl.h (FONT_INSTANCE_PROPORTIONAL): Define accessor.
	(XFONT_INSTANCE_PROPORTIONAL): Define accessor.

2010-06-09  Jeff Sparkes  <jsparkes@gmail.com>

	* toolbar-gtk.c (gtk_clear_toolbar): Uncomment.
	(gtk_output_toolbar): Name toolbar.  Clean up formatting.
	(console_type_create_toolbar_gtk): Re-enable gtk_clear_toolbar.
	(gtk_output_toolbar): Set toolbar name based on pattern used in
	frame-gtk.c.

	* toolbar-gtk.c (gtk_output_toolbar): If HAVE_GNOME, put the
	TOP_EDGE toolbar into the GnomeApp toolbar slot.  Create captioned
	buttons if specified.  Create the button using the toolbar
	glyphs in the specifier and set the tooltip.  Connect the click
	callback action.

2010-06-08  Jeff Sparkes  <jsparkes@gmail.com>

	* menubar-gtk.c (XEMACS_MENU_DESCR_TAG): Convert GQuark defintions
	back into #define constants.
	(create_menubar_widget): Use cleaner logic when setting the
	gnome app menubar.

	* sysgtk.h: Include libgnomeui if we HAVE_GNOME.

	* menubar-gtk.c: Remove include libgnomeui.

	* frame-gtk.c: Remove include libgnomeui.

	* device-gtk.c: Remove include libgnomeui.

2010-06-05  Jeff Sparkes  <jsparkes@gmail.com>

	* ui-gtk.c (type_already_imported_p): Mark G_TYPE_NONE as
	imported.  Was mistakenly using G_VALUE_TYPE where just the type
	was required.
	(lisp_to_g_value): Ignore G_TYPE_INVALID.

	* emacs-marshals.c (emacs_gtk_marshal_NONE__POINTER_BOOL): Newly
	added marshaller.

2010-06-04  Jeff Sparkes  <jsparkes@gmail.com>

	* frame-gtk.c (gtk_any_window_to_device): Fix indentation.
	(gtk_set_frame_properties): Replace deprecated
	gdk_window_get_deskrelative_origin with gdk_window_get_origin.
	(gtk_frame_property): Ditto.
	(gtk_frame_properties): Ditto
	(gtk_set_mouse_position): Gdk now has a function to warp the
	cursor position.

2010-06-03  Jeff Sparkes  <jsparkes@gmail.com>

	* emacs-marshals.c (emacs_gtk_marshal_POINTER__STRING): Added new
	marshaller, needed by gtk-label-new.

	* ui-gtk.c (type_to_marshaller_type): Had omitted G_OBJECT_TYPE.

2010-06-02  Jeff Sparkes  <jsparkes@gmail.com>

	* redisplay-gtk.c (XLIKE_bevel_area): style and stype variable
	names are hard to distinguish.

2010-06-01  Jeff Sparkes  <jsparkes@gmail.com>

	* ui-gtk.c (type_already_imported_p): Uncomment special treatment
	of fundamental types.  Treat them as already imported.
	(import_gtk_type): Use G_TYPE_IS_OBJECT, not G_IS_OBJECT on a type.
	(Fgtk_call_function): Don't set the type of a GValue before using
	it to hold a converted Lisp_Object, the type cannot be changed.
	(Fgtk_fundamental_type): Fix documentation string.

	* frame.h (EDGE_HORIZONTAL_P): It is already being using in
	toolbar-gtk.c due to out of order commits.

2010-05-31  Jeff Sparkes  <jsparkes@gmail.com>

	* frame-impl.h (struct frame): Add gtk_toolbars here.  This is the
	wrong place, but it's used for now.  Add a checksum slot.
	(FRAME_GTK_TOOLBAR_WIDGET): Define accessor.
	(FRAME_GTK_TOOLBAR_CHECKSUM): Define accessor.

	* toolbar-gtk.c (gtk_toolbar_callback): Link to lisp callback.
	(gtk_clear_toolbar): Delete toolbar widgets.  Disabled.
	(gtk_clear_frame_toolbars): Clear all toolbars on frame.
	(gtk_output_toolbar): Create Gtk toolbar and buttons.
	(gtk_output_frame_toolbars): Loop and create visible toolbars.
	(console_type_create_toolbar_gtk): Define output, initialize and
	free methods.
	(vars_of_toolbar_gtk): Provide 'toolbar-gtk.

2010-05-30  Jeff Sparkes  <jsparkes@gmail.com>

	* glyphs-gtk.c (gtk_map_subwindow): Replace deprecated code with
	gtk_widget_queue_draw().

2010-05-24  Jeff Sparkes  <jsparkes@gmail.com>

	* ui-gtk.c (type_to_marshaller_type): Always check fundamental
	types first.  Next check for GObjects and then enums or flags.

2010-05-21  Jeff Sparkes  <jsparkes@gmail.com>

	* gtk-glue.c (xemacs_list_to_gtklist): Move all declarations
	before code. (Bad C++ habits)
	(xemacs_list_to_gtklist): Ditto.
	(xemacs_list_to_array): Ditto.
	redisplay-gtk.c (our_draw_bitmap): Ditto.
	ui-gtk.c (mark_type_as_imported): Ditto.

	* glyphs-gtk.c (gtk_tab_control_callback): Use GLib type
	conversion macros for attached data.
	(gtk_tab_control_callback): Ditto.  GNoteBookPage no longer has a
	child, so attach the data to the widget itself.

	* console-gtk-impl.h (GTK_DATA_TAB_HASHCODE_IDENTIFIER): Correctly
	define as a GQuark.

	* glyphs-gtk.c (check_cursor_names): Use (void) instead of () as
	argument list.

	* ui-gtk.c (check_enumeration_hashtable): Ditto

2010-05-20  Jeff Sparkes  <jsparkes@gmail.com>

	* ui-gtk.c (import_gtk_flags_internal): Use acons to build alist.
	(import_gtk_enumeration_internal): Ditto.
	(import_gtk_type): Check for enum and flag derived types.

2010-05-19  Jeff Sparkes  <jsparkes@gmail.com>

	* redisplay-gtk.c (XLIKE_bevel_area): Commented out use of shadow
	enums until they're updated to 2.X values.

	* ui-gtk.c: Use g_type* functions instead of deprecated gtk_type*
	ones. Rename lisp_to_gtk_type to lisp_to_g_value.
	Remove lisp_to_gtk_ret_type, lisp_to_gvalue now does that job.
	(type_already_imported_p): Make internal type hash table visible
	as gtk-types so it's viewable in lisp.
	(mark_type_as_imported): Use Vgtk_types.
	(vars_of_ui_gtk): DEFVAR Vgtk_types.

	* gtk-glue.c: use renamed function.

	* menubar-gtk.c: Use GQuarks instead of text keys for attaching
	data to widgets.

2010-05-18  Jeff Sparkes  <jsparkes@gmail.com>

	* scrollbar-gtk.c (gtk_create_scrollbar_instance):
	Set continuous update flag to try to fix scrollbar drag.

	* glyphs.c (image_instance_hash):
	Remove duplicate hash functions.

	* fontcolor-gtk.c (gtk_initialize_font_instance):
	Add USE_PANGO code.

	* device-gtk.c (Fgtk_style_info): Can only determine font
	name using pango.

	* console-gtk-impl.h (struct gtk_device):
	Add pango context slot to device and accessor macro.

	* device-gtk.c (gtk_init_device):
	Set up pango context for device ifdef HAVE_PANGO.  Using a pango
	xft context.

2010-05-17  Jeff Sparkes  <jsparkes@gmail.com>

	* redisplay-xlike-inc.c (XLIKE_output_xlike_pixmap):
	Enable gdk_draw_pixmap, it tests okay.  Drawing a bitmap
	still needs work.

2010-05-16  Jeff Sparkes  <jsparkes@gmail.com>

	* redisplay-xlike-inc.c (XLIKE_output_string):
	Force outline cursor to be used for block mode cursor display,
	since I can't make the regular one work correctly. Remove
	gdk_draw_text_char.

	* redisplay-gtk.c (gdk_draw_text_image):
	Shrink the cursor rectangle to avoid left over lines.  Remove
	gdk_draw_text_char.

2010-05-14  Jeff Sparkes  <jsparkes@gmail.com>

	* redisplay-xlike-inc.c (XLIKE_output_cursor):
	New function that displays the cursor, but unfortunately not the
	character underneath.  Still, it's a display improvement.
	(XLIKE_output_blank):
	Use same args for XLIKE_DRAW_RECTANGLE in Gtk and non-Gtk cases.

	* redisplay-gtk.c (gdk_draw_text_image):
	gdk_draw_rectangle starts from top left corner.
	(gdk_draw_text_char): Ditto.

2010-05-13  Jeff Sparkes  <jsparkes@gmail.com>

	* menubar-gtk.c (gtk_xemacs_menubar_get_type):
	Update to 2.0 so that it compiles.
	(gtk_xemacs_accel_label_get_type, menu_convert): Add parsing of
	label accelerator back so that it gets added to the menu correctly.

2010-05-12  Jeff Sparkes  <jsparkes@gmail.com>

	* redisplay-xlike-inc.c (XLIKE_output_string):
	Use min() to clarify some math.

	* redisplay-gtk.c (gdk_draw_text_char): 
	Rename gdk_draw_text_char to gdk_draw_text_char and take
	a character argument.
	
	* redisplay-xlike-inc.c (XLIKE_output_blank):
	Rename gdk_draw_text_char to gdk_draw_text_char and pass
	a space as the character argument.

2010-05-11  Jeff Sparkes  <jsparkes@gmail.com>

	* redisplay-xlike-inc.c (XLIKE_output_blank):
	Use new gdk draw blank function.

	* redisplay-gtk.c (gdk_draw_text_blank):
	Extract a new function.

	* redisplay-xlike-inc.c (XLIKE_output_blank):
	Display a text space instead of a rectangle for an
	onscreen blank.
	
2010-05-10  Jeff Sparkes  <jsparkes@gmail.com>

	* redisplay-gtk.c (gdk_draw_text_image):
	Take a struct textual run* argument and handle the wide char
	case ourselves.

	* redisplay-xlike-inc.c (XLIKE_output_string):
	Call gdk_draw_text_image directly with a struct textual_run *.

	* redisplay-gtk.c (gdk_draw_text_image):
	Put back plain Gdk text rendering, pango not complete.
	(gdk_draw_text_image_wc):
	Wide char version of text display.

	* redisplay-xlike-inc.c (XLIKE_output_string):
	Call wide char version of text image draw where required.

	* ui-gtk.c (IS_XEMACS_GTK_FUNDAMENTAL_TYPE):
	Use GType, not GtkType.

	* ui-gtk.h: build_gtk_boxed now takes a GType arg, not GtkType

	* console-gtk-impl.h (struct gtk_device):
	Add pango context inside ifdef USE_PANGO.  (We don't want to
	use HAVE_PANGO because the pango code isn't ready.)

	* console-xlike-inc.h (XLIKE_TEXT_WIDTH_WIDE):
	Use USE_PANGO instead of HAVE_PANGO.

	* device-gtk.c:
	Add pango font name lookup functions.
	(gtk_init_device):
	Initialize PangoContext for device.

	* fontcolor-gtk.c (gtk_initialize_font_instance):
	Add ifdef'd code for initializing pango fonts.

	* fontcolor-gtk-impl.h (struct gtk_font_instance_data):
	Add pango information to font instance data.

	* sysgtk.h:
	Include pango headers.

	* faces.c (complex_vars_of_faces):
	Set the fallback font to a monospaced lucidatypewriter.  Without
	the -m-, gdk loads a proportiional font.

	* scrollbar-gtk.c (gtk_update_scrollbar_instance_status):
	Replace deprecated code. Notify the scrollbar when the slider
	value changes.  Update the scrollbar when the buffer changes.

2010-05-08  Jeff Sparkes  <jsparkes@gmail.com>

	* redisplay-gtk.c (gdk_draw_text_image):
	Use pango_layout_get_pixel_size to get the true size of the text
	rectangle.  Fill that rectangle with the given background GC.

	* redisplay-xlike-inc.c (XLIKE_output_string):
	Don't erase the background here because the true text width can't
	be calculated without pango.  Create a background GC if it doesn't
	exist.

2010-05-07  Jeff Sparkes  <jsparkes@gmail.com>

	* redisplay-xlike-inc.c (XLIKE_output_string):
	Remove obsolete workarounds for clearing rectangle mismatches.

	* redisplay-gtk.c (gdk_draw_text_image):
	Calculate size with pango_layout_get_pixel_size.  This also needs
	to be changed in XLIKE_TEXT_WIDTH somehow. Works best with a
	monospaced font.

	* scrollbar-gtk.c (scrollbar_cb):
	Callback now gets GtkRange* and GtkScrollType arguments.

	* scrollbar-gtk.c (gtk_create_scrollbar_instance):
	Connect to signal from scrollbar to get 1.X like behaviour
	from the scrollbar.  Assert check the signal connect calls.
	(scrollbar_cb): Handle all GtkScrollType enum values.
	
	* scrollbar-gtk.c (scrollbar_cb):
	Callback now gets GtkRange* and GtkScrollType arguments.

	* ui-gtk.c (build_gtk_object): 
	Use g_object_get_qdata now that key is a GQuark.

	* menubar-gtk.c (XEMACS_MENU_DESCR_TAG, XEMACS_MENU_FILTER_TAG,
	XEMACS_MENU_GUIID_TAG, XEMACS_MENU_FIRSTTIME_TAG):
	Use GQuark instead of string for GObject data key.
	(__activate_menu):
	Use g_object_get_qdata now that key is a GQuark.
	(menu_convert): Ditto.
	(menu_create_menubar): Ditto.
	(gtk_popup_menu): Ditto.

	* glyphs-gtk.c (gtk_tab_control_callback):
	Use g_object_get_qdata now that key is a GQuark.

	* frame-gtk.c (gtk_widget_to_frame):
	Use g_object_get_qdata now that key is a GQuark.
	(gtk_popup_frame): Ditto.
	(gtk_get_frame_parent):
	get_data is now a g_object method, not gtk_object.

	* console-gtk-impl.h (GTK_DATA_FRAME_IDENTIFIER,
	GTK_DATA_TAB_HASHCODE_IDENTIFIER, GTK_DATA_GUI_IDENTIFIER):
	Use GQuark instead of string for GObject data key.


2010-05-06  Jeff Sparkes  <jsparkes@gmail.com>
        * redisplay-xlike-inc.c (XLIKE_output_string):
          Draw the filled rectangle with the background before drawing the text.

        * redisplay-gtk.c (gdk_draw_text_image):
          Remove unused X specific text drawing now that we use pango.

        * redisplay-xlike-inc.c (XLIKE_output_string):
          For pango, y is top to bottom.
          (XLIKE_output_string): 

        * redisplay-gtk.c (gdk_draw_text_image):
          Use a simple pango layout to draw text.  It does not erase the
          background.

        * fontcolor-gtk-impl.h (struct gtk_font_instance_data):
        Add pango font data.
        (FONT_INSTANCE_GTK_FONT_DESC):
        Add macros for pango font data access.

        * fontcolor-gtk.c (gtk_initialize_font_instance):
        Add pango font size initialization.
        (gtk_finalize_font_instance):
        Add pango font finalization.
        (__get_gtk_font_truename): 
	Add pango font truename function.

	* device-gtk.c:
	Add pango font truename function.
	(gtk_init_device):
	Add pango initialization.

	* console-xlike-inc.h:
	Add pango text width.

2010-05-04  Jeff Sparkes  <jsparkes@gmail.com>

	* console-gtk-impl.h (struct gtk_device):
	* device-gtk.c (gtk_init_device):
	Add a PangoContext to gtk device.

XXXXXX - too many changes in one big commit to document.

2010-04-26  Jeff Sparkes  <jsparkes@gmail.com>

	* ui-gtk.c (emacs_gtk_object_getprop):
	Started conversion to 2.X.
	(Fgtk_describe_type):
	Converted to 2.X.

	* config.h.in:
	We don't need WORDS_BIGENDIAN.

	* glyphs-gtk.c (convert_EImage_to_GDKImage):
	Use G_BIG_ENDIAN instead of WORDS_BIGENDIAN
	(convert_EImage_to_GDKImage):
	Ditto.

2010-04-23  Jeff Sparkes  <jsparkes@gmail.com>

	* gtk-xemacs.c (gtk_xemacs_class_init):
	Don't use gtk_xemacs_draw.
	(smash_scrollbar_specifiers):
	Use fixed slider width for now.

2010-04-22  Jeff Sparkes  <jsparkes@gmail.com>

	* redisplay-gtk.c (XLIKE_bevel_area):
	Cast GtkShadowStyle to edge_style for C++ compile.
	(our_draw_bitmap):
	Implement using GDK, not XLib.

	* fontcolor-gtk.c (gtk_color_instance_hash):
	Update hash function to match usage in fontcolor-x.c.

	* event-gtk.c (handle_focus_event_1):
	Extend X focus timestamp klduge to Gtk.

	* console-xlike-inc.h:
	Fix GET_XLIKE_DISPLAY for gtk.

	* frame-gtk.c (gtk_create_widgets):
	Declare array const to avoid C++ warning.
	(get_number, gnome_parse_geometry):
	Re-enable local geometry parsing temporarily.

	* config.h.in:
	Add WORDS_BIGENDIAN check back.  It's used in src/glyphs-gtk.h.

	* gtk-xemacs.c (smash_scrollbar_specifiers, smash_toolbar_specifiers):
	Slider width is now in GtkStyle instance, not class.

	* device-gtk.c (gtk_delete_device):
	NEW_GC doesn't allow/require freeing device directly.

2010-04-21  Jeff Sparkes  <jsparkes@gmail
  .com>

	* fontcolor-gtk.c (gtk_color_instance_hash):
	Remove gtk_color_instance_hash equalp argument.

	* gtk-glue.c (xemacs_type_register):
	Change arg to const to avoid C++ warning.

	* gtk-xemacs.c (gtk_xemacs_get_type):
	Cast to avoid C++ const warning.

	* frame-gtk.c (gtk_initialize_frame_size):
	Remove ifndef HAVE_GNOME around gnome-parse-geometry and get_number.
	Use gtk geometry functions.
	Include gutter.h for frame size calculations.

2000-10-03  William M. Perry  <wmperry@aventail.com>

	* objects-gtk.c (gtk_font_instance_truename): Make sure we get the
	fully expanded version of the font.

	* device-gtk.c (convert_font): Ditto.

	* gtk-xemacs.c (convert_font): Tell __get_gtk_font_truename to not
	expand wildcards.

	* objects-gtk.c (__get_gtk_font_truename): Use the internal
	name-list in a GdkFont structure to find the truename of the
	font.  This protects us from crashing if we get a FontSet
	instead of a Font.

	(__get_gtk_font_truename): Accept new argument 'expandp' for
	whether to return the FULL font name or the wildcarded version.

2000-09-21  William M. Perry  <wmperry@aventail.com>

	* device-gtk.c (Fgtk_init): Moved calls to gtk_init or gnome_init
	to separate function, and expose it to lisp.  It is now possible
	to create GTK applications from batch mode.
	(gtk_init_device): Use the new function.

2000-09-12  William M. Perry  <wmperry@aventail.com>

	* gtk-glue.c (gdk_event_to_emacs_event): Special case double
	and triple clicks when converting events to lisp objects.
	This allows something like GtkCList to treat double-clicks
	differently in the 'select_row' signal.

2000-09-11  William M. Perry  <wmperry@aventail.com>

	* menubar-gtk.c (menu_create_menubar): Set a special name for
	GtkMenuItems directly in the menubar.

2000-09-10  William M. Perry  <wmperry@aventail.com>

	* gtk-xemacs.c (gtk_xemacs_size_request): Deal with frame
	being NULL.

	* gtk-xemacs.c (gtk_xemacs_size_allocate): Ditto.

2000-09-09  William M. Perry  <wmperry@aventail.com>

	* sound.c (init_native_sound): Enable sound for GTK devices.

	* device-gtk.c (gtk_init_device): Attempt to load a default
	gtkrc file from the data directory.  This way we can enable
	the default face font handling in gtk-faces.el but not screw
	the majority of users with a proportional font by default.

	* device-gtk.c (gtk_init_device): Attempt to load
	~/.xemacs/gtk-options.el when GTK devices are created.  This
	allows for setting a persistent geometry without requiring GNOME.

	* gtk-xemacs.c (gtk_xemacs_style_set): Deal with NULL frame.

	* device-gtk.c (gtk_init_device): Make app_shell a GtkXEmacs
	widget so that style information is retrieved correctly.

	* menubar-gtk.c (gtk_xemacs_menubar_get_type): New subclass of
	GtkMenuBar that always requests the same width as the text
	widget.  This fixes the spurious frame resizes when there were too
	many menu items to display in the desired width.
	(create_menubar_widget): Use the new subclass.

2000-09-08  William M. Perry  <wmperry@aventail.com>

	* device-gtk.c (Fgtk_keysym_on_keyboard_p): Ported function from
	the X side of things.

	* device-gtk.c (gtk_mark_device): Make sure that we mark the
	keysym hashtable or things go boom.

2000-09-07  William M. Perry  <wmperry@aventail.com>

	* menubar-gtk.c (gtk_update_frame_menubars): Don't actually
	update the menubars if the menu is up.  This fixes the weird
	problem where if you had a menu up and 'message' was called
	(this happens a lot with the 'customize' menu), the menu would
	disappear.  This is because XEmacs is fairly lame about when
	it updates the menus - the message logging code eventually
	does a (save-excursion (set-buffer " *Message Log*") ...).
	The set-buffer caused magic variable current-menubar to be
	evaluated, which calls gtk_update_frame_menubars, which would
	nuke the menus.  Gack.

2000-09-06  William M. Perry  <wmperry@aventail.com>

	* event-gtk.c (gtk_event_to_emacs_event): Reworked how we handle
	removing the shift modifier of normal keys (a & A, etc) to be more
	like MS-windows.  This makes everything work pretty happily with
	query-replace and apropos now.

2000-09-05  William M. Perry  <wmperry@aventail.com>

	* select-gtk.c (emacs_gtk_selection_received): Signal a fake
	event here so that the event loop will wake up.  Should fix
	the strange pause seen when pasting.

	* select-gtk.c (Fgtk_get_clipboard): Signal an error if no
	selections are available.  This is more meaningful than 'insert'
	throwing an error when it gets 'nil'.

	* select-gtk.c (emacs_gtk_selection_received): Don't bother
	checking whether the data returned as the selection is a string.
	If it is not, we convert it to binary data anyway.  This fixes the
	bug where you could not paste between two separate XEmacs
	instances w/mule enabled (it sends selections as COMPOUND_TEXT).

	* device-gtk.c (Fgtk_style_info): Return the default font name as
	part of the style info.

	* menubar-gtk.c (__generic_button_callback): make sure that we
	provide a channel for our menu events.  This fixes things like
	get-dialog-box-response that rely on event-channel !nilp

2000-09-05  William M. Perry  <wmperry@aventail.com>

	* glyphs-gtk.c (__downcase): Actually return the downcased string!
	 Thanks to Michael Altenhofen <Michael.Altenhofen@sap.com> for
	spotting this.

2000-09-05  William M. Perry  <wmperry@aventail.com>

	* menubar-gtk.c (gtk_popup_menu): Make sure we call
	__activate_menu correctly if the menu is dynamic.  This fixes
	popup menus with :filter effects.

2000-09-01  William M. Perry  <wmperry@aventail.com>

	* gpmevent.c, gpmevent.h: Updated to the latest XEmacs 21.2
	version of gpmevent.c.  This means that GPM support works
	with GTK now.

	* console-tty.c, console-tty.h: Removed old GPM support.

	* device-tty.c, emacs.c, event-Xt.c: Ditto.

	* event-unixoid.c, frame-tty.c: Ditto.

2000-08-30  William M. Perry  <wmperry@aventail.com>

	* gtk-xemacs.c (smash_scrollbar_specifiers): Don't bother looking
	for nextstep themed scrollbars - didn't work anyway.

	* glade.c (Fglade_xml_textdomain): deal with old versions of Glade
	that use 'textdomain' instead of 'txtdomain' in the structure.

	* menubar-gtk.c (gtk_popup_menu): use gtk_widget_show instead of
	gtk_widget_show_all so that the magic `space-saver' menu item does
	not get shown on popups.

2000-08-27  William M. Perry  <wmperry@aventail.com>

	* scrollbar-gtk.c (gtk_update_scrollbar_instance_status): Fiddle
	with scrollbar_values -> GtkAdjustment conversion and scrolling up
	with the arrows works correctly now.

	* event-gtk.c (gtk_event_to_emacs_event): Fixed the shifted key
	lossage (pc-select works now).

2000-08-11  William M. Perry  <wmperry@aventail.com>

	* scrollbar-gtk.c (scrollbar_cb): Need to make sure we look at the
	appropriate scrollbar instances from the mirror.  Was looking only
	at the vertical scrollbar instance.  Don't know if this has
	anything to do with the weird scrolling behaviour, but it is worth
	a shot.

2000-07-26  William M. Perry  <wmperry@aventail.com>

	* menubar-gtk.c (run_menubar_hook): New function that runs
	activate-menubar-hook if the menu shell it was invoked by is
	currently inactive.
	(create_menubar_widget): Hook up the button-press-event to
	run_menubar_hook to cater to broken packages.

2000-07-22  William M. Perry  <wmperry@aventail.com>

	* frame-gtk.c (gtk_popup_frame): When the window is supposed to be
	initially unmapped, we need to make sure we realize the text
	widget (to avoid lossage in redisplay assuming there is a valid
	window), but NOT show it.

2000-07-12  William M. Perry  <wmperry@aventail.com>

	* menubar-gtk.c (__kill_stupid_gtk_timer): New function to kill
	the timer on a GtkMenuItem widget.  This timer and its callback
	appear to be what was causing heavily filtered menus (like
	customize and other things under 'options') to crash.  The GTK
	code installs a timer when the user is moving the mouse around to
	scan menus.  Submenus are only popped up when this timer expires.
	But if the filters are constantly running and creating/destroying
	submenus, then you can blow up when they unconditionally check
	GTK_WIDGET_FLAGS(menu_item->submenu), when submenu is NULL.

2000-07-11  William M. Perry  <wmperry@aventail.com>

	* device-gtk.c (gtk_init_device): Can now pass the entire argv
	array that is in gtk-initial-argv-list, since gtk-init filters out
	unknown options that may cause GTK to puke for us.  This means
	that GNOME session management works now.

	* frame-gtk.c (gnome_parse_geometry): Ripped this out of the GNOME
	libraries to parse geometry settings, in case the user did not
	compile with GNOME.
	(gtk_initialize_frame_size): If gtk_initial_geometry is !NILP,
	then try to parse it and use that.  If the geometry cannot be
	parsed, fall back to using 80x30.

	* device-gtk.c (Vgtk_initial_geometry): New variable exposed to
	lisp holding the desired geometry of initial frames.

2000-07-09  William M. Perry  <wmperry@aventail.com>

	* ui-gtk.c (Fgtk_call_function): Outlined possible `enhancement'
	if someone calls gtk-call-function with too few arguments.  After
	I implemented it I realized it was probably a bad idea, so I
	commented it out.  Maybe for the future...

	* menubar-gtk.c (menu_convert): Can now pass in a GtkWidget to
	reuse.  It detaches submenus, cleans up any GCPROs on it, and
	attaches a new submenu.  All done in an effort to stop the menubar
	flickering.
	(menu_create_menubar): No longer willy-nilly deletes all of the
	items in the top-level menubar.  We now check to see if the widget
	already existing at the desired position has the same label as
	this menu.  If it does, we pass it in to menu_convert.  This
	drastically reduces the flickering menu problem that most people
	have been seeing (try speedbar now).

2000-07-04  William M. Perry  <wmperry@aventail.com>

	* event-gtk.c (gtk_event_to_emacs_event): If FRAME is NULL, then
	default to the selected frame on Vdefault_gtk_device.  This will
	only happen when being called from gtk-glue.c

	* ui-gtk.c (gtk_type_to_lisp): Properly convert GTK_TYPE_GDK_EVENT
	objects to lisp events.

	* event-gtk.c (gtk_event_to_emacs_event): Made this non-static so
	that gtk-glue.c can use it.

	* gtk-glue.c (gdk_event_to_emacs_event): New function to convert a
	GDK event into something sensible for lisp.  Just uses
	gtk_event_to_emacs_event() from event-gtk.c to avoid code
	duplication.  Not perfect (the channel is set to the selected
	frame, not the GtkObject it actually happened on).

	* event-gtk.c (gtk_event_to_emacs_event): Finally fixed the weird
	selection problem where if you released the mouse button over the
	root window, XEmacs would get confused and still think the
	selection was going on.

	* ui-gtk.c (Fgtk_describe_type): New function to return the
	signals and magic properties of an object given its name or type
	identifier.

2000-07-03  William M. Perry  <wmperry@aventail.com>

	* ui-byhand.c (Fgtk_ctree_recurse): New function gtk-ctree-recurse
	that encompasses gtk_ctree_post_recursive,
	gtk_ctree_pre_recursive, gtk_ctree_post_recursive_to_depth, and
	gtk_ctree_pre_recursive_to_depth.  All hail lisp bindings with
	variable number of arguments.
	(Fgtk_ctree_recurse): Allow nil for the node.

	* ui-gtk.c (emacs_gtk_boxed_equality): New function for comparing
	two GtkBoxed objects.  This is needed because there is no way to
	store a `user_data' or equivalent on them, so we cannot resurrect
	it like a GtkObject so we always get the same Lisp_Object.  This
	allows callbacks to use `equal' on two GtkBoxed types and get sane
	results.
	(emacs_gtk_boxed_hash): New function for hashing GtkBoxed
	objects.

2000-07-01  William M. Perry  <wmperry@aventail.com>

	* glade.c: New file to implement glue code for libglade. 

2000-06-30  William M. Perry  <wmperry@aventail.com>

	* ui-gtk.c (lisp_to_gtk_type): Know how to deal with
	GTK_TYPE_GDK_GC.

	* gtk-glue.c: Need to define a GTK type for 
	GdkGC so that we can
	import all the GDK drawing primitives.
	(face_to_gc): New function to convert a face object to a GC.

2000-06-27  William M. Perry  <wmperry@aventail.com>

	* ui-gtk.c (Fgtk_import_variable_internal): Renamed to -internal.

2000-06-25  Vladimir Vukicevic <vladimir@helixcode.com>

	* frame-gtk.c (gtk_set_initial_frame_size): Added in a call to
	gtk_window_set_policy so that you can resize the window down below
	the minimum size of the menubar.

2000-06-23  William M. Perry  <wmperry@aventail.com>

	* emacs.c (Fkill_emacs): Make sure we clean up the .saves* files
	on normal exit.

2000-06-13  William M. Perry  <wmperry@aventail.com>

	* menubar-gtk.c (__activate_filtermenu): Put in some of the same
	protections for filter menus that the normal menus have for widget
	deletion and selected menu items, etc.

2000-06-12  William M. Perry  <wmperry@aventail.com>

	* scrollbar-gtk.c (gtk_create_scrollbar_instance): hide a
	scrollbar widget until we are absolutely sure we need to see it.
	Fixes the problem we were seeing with mouse-avoidance-mode causing
	severe scrollbar breakage.
	(update_one_widget_scrollbar_pointer): Move the call to
	gtk_widget_realize() here instead of in the upper code.  Isolates
	the dependency-on-having-a-window logic.

	* gtk-xemacs.c (smash_scrollbar_specifiers): When setting the
	scrollbar specifiers, need to take the x/y thickness of the border
	into account.  Horizontal scrollbar placement is much much nicer
	now.  Some themes would cause them to get positioned partially on
	top of the modeline.

2000-06-08  William M. Perry  <wmperry@aventail.com>

	* console.c (select_console_1): Duh, forgot to put in an 'else'
	statement, so Vwindow_system was getting set to Qnil all the
	time.  *sigh*.

2000-06-02  William M. Perry  <wmperry@aventail.com>

	* glyphs-gtk.c (gtk_xpm_instantiate): Do not allow pixmaps to be
	instantiated as pointers under GTK.  The pixmap and cursor
	routines under GDK do not expose enough information to let use do
	the same magic that glyphs-x.c does.  *sigh*

	* ui-byhand.c (Fgtk_toolbar_insert_item): Hand-rolled function.
	(Fgtk_toolbar_prepend_item): Ditto.
	(generic_toolbar_insert_item): Utility function to take care of
	all the common code for the Fgtk_toolbar_*_item functions.

2000-06-01  William M. Perry  <wmperry@aventail.com>

	* gtk-glue.c (face_to_style): DOH!  You should only load it if
	IMAGE_INSTANCEP, not !IMAGE_INSTANCEP you doofus.

	* ui-byhand.c (Fgtk_toolbar_append_item): Hand-rolled function.

	* ui-gtk.c (Fgtk_import_function_internal): No longer need to use
	dll_function() to get the marshallers.  They are now stored in a
	hashtable.  Lookups should be a bit quicker, and it will work on
	platforms where you cannot do a dll_open (NULL) to look at your
	own symbol table.

2000-05-31  William M. Perry  <wmperry@aventail.com>

	* select-gtk.c (emacs_gtk_selection_handle): Better MULE string
	handling.

	* gtk-xemacs.c (gtk_xemacs_realize): Make sure we set the style on
	the widget from the realize function.  Otherwise for some themes
	the color slots are not allocated yet, and we end up with icky
	looking colors for things like the modeline/toolbar.

	* select-gtk.c (Fgtk_get_clipboard): If we cannot get the
	selection from anyone, return the last selection we received.
	This make us work more like the X selection behaviour with
	cutbuffers enabled.

2000-05-30  William M. Perry  <wmperry@aventail.com>

	* ui-byhand.c: Removed definitions of gtk-clist-prepend,
	gtk-clist-append, and gtk-clist-insert.

	* ui-gtk.c (lisp_to_gtk_type): Use it.

	* gtk-glue.c (face_to_style): Routine to convert from faces to
	GtkStyle

	* menubar-gtk.c (gtk_popup_menu): Honor popup_up_p here.
	(popdown_menu_cb): and here.

2000-05-29  William M. Perry  <wmperry@aventail.com>

	* frame-gtk.c (gtk_popup_frame): Do not show the widgets if we
	were told to be initially unmapped.
	(gtk_init_frame_1): Remember whether we were told to be initially
	unmapped.  Balloon help looks a little better now.

2000-05-28  William M. Perry  <wmperry@aventail.com>

	* redisplay-gtk.c (gtk_output_string): Fixed multi-dimensional
	text run drawing.  gdk_draw_text does too much, by dividing the
	length by 2.  So we fake them out my multiplying the length by the
	dimension of the text.  This will do the right thing for
	single-dimension runs as well of course.

2000-05-26  William M. Perry  <wmperry@aventail.com>

	* ui-gtk.c (get_enumeration): Utility function that does its best
	to import unknown enumeration types.

	* glyphs-gtk.c (resource_symbol_to_type): Fixed pointer
	instantiation.

	* gtk-xemacs.c (FROB_FACE): Make sure to pass the device to
	Fmake_image_instance or the initial background pixmaps would not
	show up.

2000-05-25  William M. Perry  <wmperry@aventail.com>

	* device-gtk.c (gtk_init_device): Call gnome_init if available.

	* menubar-gtk.c (create_menubar_widget): Use gnome_app_set_menus
	instead of dealing with all the handlebox/menu crap ourselves.

	* frame-gtk.c (gtk_create_widgets): Use GnomeApp if it is
	available.  Looks much sexier. :)

	* glyphs-gtk.c (gtk_resource_instantiate): New image instantiator
	gtk-resource, similar to the mswindows-resource stuff.  This
	allows you to get to the stock cursors defined in GDK.  May
	eventually allow you access to things like stock gnome pixmaps,
	not sure.

	* frame-gtk.c (gtk_set_frame_pointer): Actually handle setting the
	frame cursor.

	* redisplay-gtk.c (gdk_draw_bitmap): New function to output a
	bitmap using XCopyPlane instead of XCopyArea.
	(gtk_output_gdk_pixmap): Use it when PIXMAP_DEPTH == 0.  This
	means bitmaps look correct now.

2000-05-24  William M. Perry  <wmperry@aventail.com>

	* ui-gtk.c (flags_to_list): New function to convert a GtkFlags
	argument to a list of symbols.
	(gtk_type_to_lisp): Use it for converting from a flag.

2000-05-23  William M. Perry  <wmperry@aventail.com>

	* frame-gtk.c (gtk_set_frame_position): Do not use
	gtk_window_reposition - this apparently does not exist in some
	versions of GTK 1.2

	* gtk-glue.c (xemacs_gtklist_to_list): Don't call g_list_foreach
	on a NULL list, just in case.

	* redisplay-gtk.c (gtk_text_width_single_run): Use gdk_text_width
	instead of gdk_text_measure.  Proportional fonts appear to work
	now.

	* objects-gtk.c (gtk_initialize_font_instance): Use X specific
	crap lifted from objects-x.c to figure out proportionality of a
	font, and better location of the default character.

2000-05-22  William M. Perry  <wmperry@aventail.com>

	* ui-gtk.c (enum_to_symbol): Routine to convert an enum to a lisp
	symbol.  We now return this instead of an integer for GtkFlags or
	GtkEnum types.
	(lisp_to_flag): Routine to convert from a symbol or list of
	symbols to a GtkEnum or GtkFlags type.
	(lisp_to_gtk_type): Use it exclusively.  No more sending integers
	to functions.
	(import_gtk_enumeration_internal): Do not import the GTK_FOO_BAR
	flags/enums into the lisp namespace.  We now store mappings from
	symbol names (both the 'real' and nickname fields) to the actual
	internal values.  Much more lispy way of doing things.

	* menubar-gtk.c (__maybe_destroy): If we delete the menu item that
	was 'active' when the menu was cancelled, GTK gets upset because
	it tries to remove the focus rectangle from a (now) dead widget.
	This widget will eventually get killed because it will not be
	`precious' the next time the window is shown, because it is
	unselectable.

	* frame-gtk.c (delete_event_cb): Signal a fake event to make the
	event loop wake up and notice we've been destroyed.

2000-05-20  William M. Perry  <wmperry@aventail.com>

	* ui-gtk.c (object_putprop): Allow `put'ing of arbitrary slots on
	gtk objects.  This will be useful for tacking lisp shit onto
	composite widgets, etc.
	(object_getprop): Ditto for `get'ing.

	* frame-gtk.c (gtk_set_initial_frame_size): Don't delay when
	changing the frame size, or creating initially unmapped frames is
	screwed up.  This showed up when trying to use the cheesy XEmacs
	file selector dialog implemented using frames.

	* ui-byhand.c: Removed a lot of functions that can now be imported
	directly by gtk-import-function using the
	Gtk(Array|List)Of(String|Object) types.

	* ui-gtk.c (type_to_marshaller_type): Deal with new array/list
	types.
	(Fgtk_call_function): Need to free array and list storage after
	calling functions.
	(lisp_to_gtk_type): Deal with the new list and array types when
	converting to GTK types.

	* gtk-glue.c: New file to deal with lists of strings or
	GtkObjects.  Defines new types GtkArrayOf, GtkListOf,
	GtkArrayOfString, GtkListOfString, and GtkListOfObject.
	(xemacs_list_to_array): Convert from a lisp list to a GtkArrayOf
	of items.
	(xemacs_list_to_list): Convert from a lisp list to a GtkListOf of
	items.

	* dialog.c (Fpopup_dialog_box): Don't crap out if the car of
	dbox_desc is not a string... this allows us to follow ben's
	system/native dialog box specification.

2000-05-19  William M. Perry  <wmperry@aventail.com>

	* ui-gtk.c (lisp_to_gtk_type): Can now convert to GDK colors.  Can
	deal with color specifiers or instances.
	(lisp_to_gtk_type): Can now convert to GDK fonts.  Can deal with
	face names, actual faces, font specifiers, or font instances.

2000-05-18  William M. Perry  <wmperry@aventail.com>

	* gtk-xemacs.c (smash_scrollbar_specifiers): Function that
	attempts to set the scrollbar width/height correctly, but does not
	do a very good job.  Commented out for now.

	* redisplay-gtk.c (gtk_output_vertical_divider): Got rid of lots
	of useless code, since we ended up just calling gtk_output_shadows
	anyway.
	(gtk_output_vertical_divider): Make sure we fill the rectangle
	completely, otherwise the transparent background shows thru.

	* menubar-gtk.c: Don't nuke menus all the time... should speed up
	submenu traversal a bit, and save on the GtkMenuItem creation.

	* device-gtk.c (Fgtk_style_info): Return a list of all the
	pixmaps, not just GTK_STATE_NORMAL.

	* menubar-gtk.c (menu_descriptor_to_widget_1): Better menu labels
	with keybindings.

	* frame-gtk.c (gtk_set_frame_size): This function actually works
	now.
	(gtk_set_initial_frame_size): Better default sizing method.

	* event-gtk.c (init_event_gtk_late): Push an error trap handler so
	that XEmacs won't abort at the drop of a hat on X errors.  We
	could get X specific here and override the default GDK XError and
	XIOError handlers to be more like those in device-x.c.  Not sure
	if that is worth it or not - you would at least get information
	that an error occurred.

	* scrollbar-gtk.c (gtk_update_scrollbar_instance_status): Don't
	always call gtk_widget_set_usize because that causes the widget to
	redraw itself, which can cause some annoying flicker.
	(gtk_update_scrollbar_instance_status): Don't always move it
	either, because that can cause the GtkFixed container to get a
	resize event.
	(update_one_widget_scrollbar_pointer): Try to set the cursor 

2000-05-17  William M. Perry  <wmperry@aventail.com>

	* device-gtk.c (Fgtk_style_info): Back to taking only 1 argument -
	the device.
	(Fgtk_style_info): Now returns ALL of the information about
	colors.  Returns a list of colors instead of just the one
	associated with GTK_STATE_NORMAL.

2000-05-16  William M. Perry  <wmperry@aventail.com>

	* gtk-xemacs.c (smash_face_fallbacks): New function to reset the
	gtk-specific fallbacks on various face specifiers.  This means
	that if the user has not changed the face, when a theme or style
	is changed, the faces will automatically change as well.
	(gtk_xemacs_style_set): Call it.

	* toolbar-gtk.c (get_toolbar_gc): Swap the fg/bg of the toolbar
	face when getting the GC.  It looks better this way.

	* gtk-xemacs.c (gtk_xemacs_style_set): Override the style-set
	method so that we can nuke the pixmaps again.
	(__nuke_background_items): Moved the voodoo out into its own
	function so that it can be called from both style_set and
	realize.

	* console-gtk.h (struct gtk_frame): Removed hardcoded GCs ala X.

	* toolbar-gtk.c (get_toolbar_gc): New function that dynamically
	creates a GC from the `toolbar' face.
	(gtk_draw_blank_toolbar_button): Use it instead of the hardcoded
	GC.
	(gtk_output_toolbar_button): Ditto.
	(gtk_output_toolbar): Ditto.

	* event-gtk.c (gtk_check_for_quit_char): Quit handling actually
	works now.  Feh!

	* device-gtk.c (gtk_device_init_x_specific_cruft): New function
	that gets the socket we are listening to the X server on so that
	the SIGIO lossage works correctly for GTK devices.
	(gtk_init_device): Call it at device creation time.

2000-05-15  William M. Perry  <wmperry@aventail.com>

	* ui-gtk.c (__internal_callback_marshal): We now correctly handle
	the 'data' argument.  This is an arbitrary lisp object passed to
	the callback routine as its last argument.

2000-05-14  William M. Perry  <wmperry@aventail.com>

	* event-gtk.c (gtk_event_to_emacs_event): Needed to reinstate the
	magic to NOT differentiate betwen ! and shift-!.  *sigh*

	* ui-gtk.c (lisp_to_gtk_type): Allow 'nil' for string types so
	that we can pass NULL to gtk-frame-new.

2000-05-13  William M. Perry  <wmperry@aventail.com>

	* gtk-xemacs.c (gtk_xemacs_size_request): Needed to override the
	size_request method to get frame sizing correct.  Whoo hoo!
	(gtk_xemacs_realize): Don't set the background on the GtkXEmacs
	window - this reduces the flicker even more.

	* device-gtk.c (gtk_init_device): Don't use shared memory under
	FreeBSD - it is apparently flaky as hell and causes lots of themes
	to crash and burn quite prettily.

	* gtk-xemacs.c (gtk_xemacs_realize): Added new widget method that
	makes sure to nuke the background pixmap of the XEmacs text area
	and its parent (the GtkWindow it is contained in).  This fixes the
	flashing you would see with themes/styles that define a background
	pixmap.

2000-05-12  William M. Perry  <wmperry@aventail.com>

	* menubar-gtk.c (gtk_update_frame_menubar_internal): Duh, should
	actually pay attention to menubar_will_be_visible instead of just
	calling gtk_widget_show_all in both branches. :)

2000-05-11  William M. Perry  <wmperry@aventail.com>

	* menubar-gtk.c (vars_of_menubar_gtk): New variable
	menubar-dockable-p that controls whether to use the GtkHandleBox
	or not.

	* select-gtk.c: Implemented all of the selection callbacks for GTK

	* frame-gtk.c (resize_event_cb): Force a redisplay when the frame
	is resized.

	* event-gtk.c (gtk_event_to_emacs_event): When we are doing our
	hackery to make sure we don't see button events inside the
	scrollbar, make sure we correctly forward events that did not
	happen over ANY widget, otherwise selection gets royally screwed
	and thinks you still have the mouse button down.

	* redisplay-gtk.c (gtk_output_string): Don't bother calling
	gdk_draw_text_wc - I misunderstood what XDrawString16 did -
	gdk_draw_text encapsulates this nicely for us.

2000-05-10  William M. Perry  <wmperry@aventail.com>

	* menubar-gtk.c: Changed how the menubar is created and managed.
	We no longer create and destroy it at will.  Only one GtkMenuBar
	is ever created, and the children are just added/removed from it.
	Much less flickering when switching buffers - cleaner in general.
	(create_menubar_widget): Wheee - menubars are now detachable.

	* ui-gtk.c (Fgtk_import_function_internal): Don't drop everything
	down to its fundamental type just yet - we need to know specifics
	about boxed types.
	(object_putprop): Duh, actually SET the property.
	(Fgtk_fundamental_type): New function that does the obvious.
	(Fgtk_object_type): New function that does the obvious.
	(lisp_to_gtk_type): Implement glyph handling!  GtkPixmap works!

	* ui-byhand.c (Fgtk_pixmap_get): Implemented by hand.  *sigh*

	* dialog-gtk.c: Call into lisp to do dialog boxes.

2000-05-08  William M. Perry  <wmperry@aventail.com>

	* make-src-depend (PrintPatternDeps): Make sure we generate the
	xx-gtk.* dependencies.

	* depend: Regenerated 

	* make-src-depend: Handle inclusion of .c files.

	* Makefile.in.in (extra_doc_files): Need to include ui-byhand.c
	here as well.

	* ui-gtk.c (type_to_marshaller_type): Don't abort if we don't know
	about the marshaller.  Just return Qnil and let the caller figure
	it out.
	(Fgtk_import_function_internal): Deal with new return value of
	Qnil for error signalling from type_to_marshaller_type().
	(lisp_to_gtk_type): Half-assed implementation of dealing with
	callbacks.
	(gtk_type_to_lisp): Ditto.

	* ui-byhand.c: New file that hand-codes some annoying functions in
	Gtk.  *sigh*

	* emacs-widget-accessors.c (Fgtk_adjustment_lower): New
	auto-generated file that spits out all the widget slot accessor
	functions.

	* ui-gtk.c (Fgtk_signal_connect_internal): Holy shit, signals work!
	(lisp_to_gtk_type): Allow ints to be passed in as arguments to
	functions that expect floats, otherwise you have to write stupid
	code like 9.0 instead of just passing in '9'.

2000-05-07  William M. Perry  <wmperry@aventail.com>

	* ui-gtk.c (gtk_type_to_lisp): Return Qnil if we get a NULL
	pointer/object/boxed.
	(lisp_to_gtk_type): Allow Qnil to be passed in to mean a NULL
	pointer/object/boxed.

	* event-gtk.c (gtk_event_to_emacs_event): Make sure a button press
	focuses on the text widget, otherwise if someone packs a widget
	into the container from lisp, we end up not getting keyboard focus
	quite a bit.  Eek.

	* frame-gtk.c (gtk_create_widgets): Set the name of the xemacs
	shell so we can control sylte issues from .gtkrc
	(gtk_set_initial_frame_size): Set the default size of the frame
	correctly.
	(gtk_create_widgets): Expose the frame shell and container widgets
	to lisp.

	* emacs-marshals.c: Added a whole shitload of marshallers - don't
	edit this file by hand if you need to add one.  Check out
	../lisp/ui/gtk-marshal.el for a script that auto-generates them
	for you.

2000-05-05  William M. Perry  <wmperry@aventail.com>

	* ui-gtk.c (describe_gtk_arg): Debugging function to spit out
	human-readable version a GtkArg.
	(lisp_to_gtk_type): Made this function much more sane.
	(Fgtk_call_function): New function to allow calling generic
	functions from DLLs in lisp.
	(CONVERT_RETVAL): New macro (ugh) to convert a pointer that the
	return value filled in back into a valid GtkArg.
	(Fgtk_call_function): This actually works now!  Scary stuff.

2000-05-04  William M. Perry  <wmperry@aventail.com>

	* ui-gtk.c (Fgtk_import_type): New function to import a GtkType
	into the XEmacs namespace.  For starters this only fully imports
	enumerations and flags.  Importing a GtkObject or subclass results
	in getting a list back of possible signals and argument lists.

	* scrollbar-gtk.c (gtk_create_scrollbar_instance): Fixed some
	compiler warnings.
	(scrollbar_cb): Aha!  Thanks to the magic of reading the
	gtkrange.c source code, we now have better behaving scrollbars.
	Clicking in the trough/end arrows now works correctly instead of
	the semi-hackish way it did earlier today.

	* ui-gtk.c (Fgtk_define_enumeration): New function that can 

	* scrollbar-gtk.c (scrollbar_cb): Combined the horizontal and
	vertical scrolling callbacks.  Differentiate between them by
	user_data. 
	(scrollbar_cb): Don't bother trying to figure out whether this is
	a line-by-line or page-wide scrolling operation.  Just go by what
	is in the value of the adjustment and issue a scrollbar_*_drag
	event.  This is not 100% correct, but it at least gets it
	working.  Doing it 'right' might not be possible with standard Gtk
	scrollbars.
	(scrollbar_drag_hack_cb): New function to set
	vertical_drag_in_progress and inhibit_slider_change when we might
	be starting a drag in the scrollbar.
	(gtk_update_scrollbar_instance_status): Better setting of the
	adjustment variables.  Scrolling by pages (clicking in the trough)
	works now.  Line-by-line seems to work too.

2000-05-03  William M. Perry  <wmperry@aventail.com>

	* scrollbar-gtk.c (gtk_update_scrollbar_instance_status): Got the
	thumb sizing correct finally.  Thanks to scrollbar-msw.c for
	showing how to do it sanely - scrollbar-x.c is a mess.

	* window.c (specifier_vars_of_window): Added GTK specific fallback
	for Vvertical_divider_line_width.

	* toolbar.c (specifier_vars_of_toolbar): Handle specifier
	fallbacks for GTK toolbars.

	* gui-gtk.c (button_item_to_widget): Compiles under Gtk at least -
	more than likely completely broken.

	* glyphs-gtk.c (write_lisp_string_to_temp_file): Resurrected this
	blasphemous function to deal with XPMs.
	(gtk_xpm_instantiate): Now writes the XPM to a temp file, since
	GTK cannot deal with XPMs from memory.  Lame, but not fixable for
	gtk 1.2 - maybe for 1.4.
	(gtk_xpm_instantiate): Transparency works now.

	* gccache-gtk.c (gc_cache_lookup): Made non-hash based code
	compile.  It is not used, but what the hell.

	* faces.c (complex_vars_of_faces): Do GTK specific mucking about
	with face property fallbacks (fonts and colors)

	* events.c (event_equal): Added special case for GTK.
	(event_hash): Added special case for GTK.
	(format_event_object): Added special case for GTK events.

	* event-gtk.c (event_name): Use gtk_event_name helper function
	here.
	(handle_focus_event_1): Got rid of gtk-redisplay-hack variable and
	usage.

	* device.c (delete_device_internal): Delete 'popup' frames under
	Gtk as well as X.  Should this happen for HAVE_MSWINDOWS as well?

	* console.c (select_console_1): Make sure we set Vwindow_system
	like all the others.

	* frame-gtk.c (gtk_update_frame_external_traits): Added comments
	about why I didn't implement some portions of this function.

	* redisplay-gtk.c (gtk_output_string): Fixed the bizarre redisplay
	problem where all the default text would be drawn twice - once
	with the normal background colour, and once with the text-cursor
	background.  This was caused by a stupid typo and using the wrong
	GdkGC in the second call to gdk_draw_text_image... basically no
	clipping was being done on the image, so the whole thing was
	redrawn.
	(gtk_output_string): Call gdk_draw_text if we have a background
	pixmap, otherwise things look REALLY weird.
	(gtk_clear_region): Had a misplaced brace that caused the non-text
	area of a frame not to get the correct background.

2000-05-02  William M. Perry  <wmperry@aventail.com>

	* glyphs-gtk.c (gtk_xpm_instantiate): Need to write pixmaps to a
	temp file and then read with gdk_pixmap_create_from_xpm () - there
	is no way to read from a memory buffer (yet - I might write one
	for Gtk 1.4)

	* glyphs.c: Don't include xpm.h when building with Gtk.
	(pixmap_to_lisp_data): Alternate implementation for Gtk.

	* device-gtk.c (gtk_init_device): Call gdk_imlib_init if
	available, otherwise the 'Pixmap' theme engine doesn't work.
	Losers.

	* glyphs-gtk.c (gtk_xpm_instantiate): Now at least tries to
	instantiate XPM images.
	(init_image_instance_from_gdk_pixmap): Utility function to create
	a glyph from an existing GdkPixmap.

	* device-gtk.c (Fgtk_style_info): Attempt to expose the background
	pixmaps from a Gtk style.


Copyright (C) 2000  William M. Perry

This file is part of XEmacs.

XEmacs 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.

XEmacs 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 XEmacs.  If not, see <http://www.gnu.org/licenses/>.
