1 2000-10-03 William M. Perry <wmperry@aventail.com>
3 * objects-gtk.c (gtk_font_instance_truename): Make sure we get the
4 fully expanded version of the font.
6 * device-gtk.c (convert_font): Ditto.
8 * gtk-xemacs.c (convert_font): Tell __get_gtk_font_truename to not
11 * objects-gtk.c (__get_gtk_font_truename): Use the internal
12 name-list in a GdkFont structure to find the truename of the
13 font. This protects us from crashing if we get a FontSet
16 (__get_gtk_font_truename): Accept new argument 'expandp' for
17 whether to return the FULL font name or the wildcarded version.
19 2000-09-21 William M. Perry <wmperry@aventail.com>
21 * device-gtk.c (Fgtk_init): Moved calls to gtk_init or gnome_init
22 to separate function, and expose it to lisp. It is now possible
23 to create GTK applications from batch mode.
24 (gtk_init_device): Use the new function.
26 2000-09-12 William M. Perry <wmperry@aventail.com>
28 * gtk-glue.c (gdk_event_to_emacs_event): Special case double
29 and triple clicks when converting events to lisp objects.
30 This allows something like GtkCList to treat double-clicks
31 differently in the 'select_row' signal.
33 2000-09-11 William M. Perry <wmperry@aventail.com>
35 * menubar-gtk.c (menu_create_menubar): Set a special name for
36 GtkMenuItems directly in the menubar.
38 2000-09-10 William M. Perry <wmperry@aventail.com>
40 * gtk-xemacs.c (gtk_xemacs_size_request): Deal with frame
43 * gtk-xemacs.c (gtk_xemacs_size_allocate): Ditto.
45 2000-09-09 William M. Perry <wmperry@aventail.com>
47 * sound.c (init_native_sound): Enable sound for GTK devices.
49 * device-gtk.c (gtk_init_device): Attempt to load a default
50 gtkrc file from the data directory. This way we can enable
51 the default face font handling in gtk-faces.el but not screw
52 the majority of users with a proportional font by default.
54 * device-gtk.c (gtk_init_device): Attempt to load
55 ~/.xemacs/gtk-options.el when GTK devices are created. This
56 allows for setting a persistent geometry without requiring GNOME.
58 * gtk-xemacs.c (gtk_xemacs_style_set): Deal with NULL frame.
60 * device-gtk.c (gtk_init_device): Make app_shell a GtkXEmacs
61 widget so that style information is retrieved correctly.
63 * menubar-gtk.c (gtk_xemacs_menubar_get_type): New subclass of
64 GtkMenuBar that always requests the same width as the text
65 widget. This fixes the spurious frame resizes when there were too
66 many menu items to display in the desired width.
67 (create_menubar_widget): Use the new subclass.
69 2000-09-08 William M. Perry <wmperry@aventail.com>
71 * device-gtk.c (Fgtk_keysym_on_keyboard_p): Ported function from
74 * device-gtk.c (gtk_mark_device): Make sure that we mark the
75 keysym hashtable or things go boom.
77 2000-09-07 William M. Perry <wmperry@aventail.com>
79 * menubar-gtk.c (gtk_update_frame_menubars): Don't actually
80 update the menubars if the menu is up. This fixes the weird
81 problem where if you had a menu up and 'message' was called
82 (this happens a lot with the 'customize' menu), the menu would
83 disappear. This is because XEmacs is fairly lame about when
84 it updates the menus - the message logging code eventually
85 does a (save-excursion (set-buffer " *Message Log*") ...).
86 The set-buffer caused magic variable current-menubar to be
87 evaluated, which calls gtk_update_frame_menubars, which would
90 2000-09-06 William M. Perry <wmperry@aventail.com>
92 * event-gtk.c (gtk_event_to_emacs_event): Reworked how we handle
93 removing the shift modifier of normal keys (a & A, etc) to be more
94 like MS-windows. This makes everything work pretty happily with
95 query-replace and apropos now.
97 2000-09-05 William M. Perry <wmperry@aventail.com>
99 * select-gtk.c (emacs_gtk_selection_received): Signal a fake
100 event here so that the event loop will wake up. Should fix
101 the strange pause seen when pasting.
103 * select-gtk.c (Fgtk_get_clipboard): Signal an error if no
104 selections are available. This is more meaningful than 'insert'
105 throwing an error when it gets 'nil'.
107 * select-gtk.c (emacs_gtk_selection_received): Don't bother
108 checking whether the data returned as the selection is a string.
109 If it is not, we convert it to binary data anyway. This fixes the
110 bug where you could not paste between two separate XEmacs
111 instances w/mule enabled (it sends selections as COMPOUND_TEXT).
113 * device-gtk.c (Fgtk_style_info): Return the default font name as
114 part of the style info.
116 * menubar-gtk.c (__generic_button_callback): make sure that we
117 provide a channel for our menu events. This fixes things like
118 get-dialog-box-response that rely on event-channel !nilp
120 2000-09-05 William M. Perry <wmperry@aventail.com>
122 * glyphs-gtk.c (__downcase): Actually return the downcased string!
123 Thanks to Michael Altenhofen <Michael.Altenhofen@sap.com> for
126 2000-09-05 William M. Perry <wmperry@aventail.com>
128 * menubar-gtk.c (gtk_popup_menu): Make sure we call
129 __activate_menu correctly if the menu is dynamic. This fixes
130 popup menus with :filter effects.
132 2000-09-01 William M. Perry <wmperry@aventail.com>
134 * gpmevent.c, gpmevent.h: Updated to the latest XEmacs 21.2
135 version of gpmevent.c. This means that GPM support works
138 * console-tty.c, console-tty.h: Removed old GPM support.
140 * device-tty.c, emacs.c, event-Xt.c: Ditto.
142 * event-unixoid.c, frame-tty.c: Ditto.
144 2000-08-30 William M. Perry <wmperry@aventail.com>
146 * gtk-xemacs.c (smash_scrollbar_specifiers): Don't bother looking
147 for nextstep themed scrollbars - didn't work anyway.
149 * glade.c (Fglade_xml_textdomain): deal with old versions of Glade
150 that use 'textdomain' instead of 'txtdomain' in the structure.
152 * menubar-gtk.c (gtk_popup_menu): use gtk_widget_show instead of
153 gtk_widget_show_all so that the magic `space-saver' menu item does
154 not get shown on popups.
156 2000-08-27 William M. Perry <wmperry@aventail.com>
158 * scrollbar-gtk.c (gtk_update_scrollbar_instance_status): Fiddle
159 with scrollbar_values -> GtkAdjustment conversion and scrolling up
160 with the arrows works correctly now.
162 * event-gtk.c (gtk_event_to_emacs_event): Fixed the shifted key
163 lossage (pc-select works now).
165 2000-08-11 William M. Perry <wmperry@aventail.com>
167 * scrollbar-gtk.c (scrollbar_cb): Need to make sure we look at the
168 appropriate scrollbar instances from the mirror. Was looking only
169 at the vertical scrollbar instance. Don't know if this has
170 anything to do with the weird scrolling behaviour, but it is worth
173 2000-07-26 William M. Perry <wmperry@aventail.com>
175 * menubar-gtk.c (run_menubar_hook): New function that runs
176 activate-menubar-hook if the menu shell it was invoked by is
178 (create_menubar_widget): Hook up the button-press-event to
179 run_menubar_hook to cater to broken packages.
181 2000-07-22 William M. Perry <wmperry@aventail.com>
183 * frame-gtk.c (gtk_popup_frame): When the window is supposed to be
184 initially unmapped, we need to make sure we realize the text
185 widget (to avoid lossage in redisplay assuming there is a valid
186 window), but NOT show it.
188 2000-07-12 William M. Perry <wmperry@aventail.com>
190 * menubar-gtk.c (__kill_stupid_gtk_timer): New function to kill
191 the timer on a GtkMenuItem widget. This timer and its callback
192 appear to be what was causing heavily filtered menus (like
193 customize and other things under 'options') to crash. The GTK
194 code installs a timer when the user is moving the mouse around to
195 scan menus. Submenus are only popped up when this timer expires.
196 But if the filters are constantly running and creating/destroying
197 submenus, then you can blow up when they unconditionally check
198 GTK_WIDGET_FLAGS(menu_item->submenu), when submenu is NULL.
200 2000-07-11 William M. Perry <wmperry@aventail.com>
202 * device-gtk.c (gtk_init_device): Can now pass the entire argv
203 array that is in gtk-initial-argv-list, since gtk-init filters out
204 unknown options that may cause GTK to puke for us. This means
205 that GNOME session management works now.
207 * frame-gtk.c (gnome_parse_geometry): Ripped this out of the GNOME
208 libraries to parse geometry settings, in case the user did not
210 (gtk_initialize_frame_size): If gtk_initial_geometry is !NILP,
211 then try to parse it and use that. If the geometry cannot be
212 parsed, fall back to using 80x30.
214 * device-gtk.c (Vgtk_initial_geometry): New variable exposed to
215 lisp holding the desired geometry of initial frames.
217 2000-07-09 William M. Perry <wmperry@aventail.com>
219 * ui-gtk.c (Fgtk_call_function): Outlined possible `enhancement'
220 if someone calls gtk-call-function with too few arguments. After
221 I implemented it I realized it was probably a bad idea, so I
222 commented it out. Maybe for the future...
224 * menubar-gtk.c (menu_convert): Can now pass in a GtkWidget to
225 reuse. It detaches submenus, cleans up any GCPROs on it, and
226 attaches a new submenu. All done in an effort to stop the menubar
228 (menu_create_menubar): No longer willy-nilly deletes all of the
229 items in the top-level menubar. We now check to see if the widget
230 already existing at the desired position has the same label as
231 this menu. If it does, we pass it in to menu_convert. This
232 drastically reduces the flickering menu problem that most people
233 have been seeing (try speedbar now).
235 2000-07-04 William M. Perry <wmperry@aventail.com>
237 * event-gtk.c (gtk_event_to_emacs_event): If FRAME is NULL, then
238 default to the selected frame on Vdefault_gtk_device. This will
239 only happen when being called from gtk-glue.c
241 * ui-gtk.c (gtk_type_to_lisp): Properly convert GTK_TYPE_GDK_EVENT
242 objects to lisp events.
244 * event-gtk.c (gtk_event_to_emacs_event): Made this non-static so
245 that gtk-glue.c can use it.
247 * gtk-glue.c (gdk_event_to_emacs_event): New function to convert a
248 GDK event into something sensible for lisp. Just uses
249 gtk_event_to_emacs_event() from event-gtk.c to avoid code
250 duplication. Not perfect (the channel is set to the selected
251 frame, not the GtkObject it actually happened on).
253 * event-gtk.c (gtk_event_to_emacs_event): Finally fixed the weird
254 selection problem where if you released the mouse button over the
255 root window, XEmacs would get confused and still think the
256 selection was going on.
258 * ui-gtk.c (Fgtk_describe_type): New function to return the
259 signals and magic properties of an object given its name or type
262 2000-07-03 William M. Perry <wmperry@aventail.com>
264 * ui-byhand.c (Fgtk_ctree_recurse): New function gtk-ctree-recurse
265 that encompasses gtk_ctree_post_recursive,
266 gtk_ctree_pre_recursive, gtk_ctree_post_recursive_to_depth, and
267 gtk_ctree_pre_recursive_to_depth. All hail lisp bindings with
268 variable number of arguments.
269 (Fgtk_ctree_recurse): Allow nil for the node.
271 * ui-gtk.c (emacs_gtk_boxed_equality): New function for comparing
272 two GtkBoxed objects. This is needed because there is no way to
273 store a `user_data' or equivalent on them, so we cannot resurrect
274 it like a GtkObject so we always get the same Lisp_Object. This
275 allows callbacks to use `equal' on two GtkBoxed types and get sane
277 (emacs_gtk_boxed_hash): New function for hashing GtkBoxed
280 2000-07-01 William M. Perry <wmperry@aventail.com>
282 * glade.c: New file to implement glue code for libglade.
284 2000-06-30 William M. Perry <wmperry@aventail.com>
286 * ui-gtk.c (lisp_to_gtk_type): Know how to deal with
289 * gtk-glue.c: Need to defien a GTK type for GdkGC so that we can
290 import all the GDK drawing primitives.
291 (face_to_gc): New function to convert a face object to a GC.
293 2000-06-27 William M. Perry <wmperry@aventail.com>
295 * ui-gtk.c (Fgtk_import_variable_internal): Renamed to -internal.
297 2000-06-25 Vladimir Vukicevic <vladimir@helixcode.com>
299 * frame-gtk.c (gtk_set_initial_frame_size): Added in a call to
300 gtk_window_set_policy so that you can resize the window down below
301 the minimum size of the menubar.
303 2000-06-23 William M. Perry <wmperry@aventail.com>
305 * emacs.c (Fkill_emacs): Make sure we clean up the .saves* files
308 2000-06-13 William M. Perry <wmperry@aventail.com>
310 * menubar-gtk.c (__activate_filtermenu): Put in some of the same
311 protections for filter menus that the normal menus have for widget
312 deletion and selected menu items, etc.
314 2000-06-12 William M. Perry <wmperry@aventail.com>
316 * scrollbar-gtk.c (gtk_create_scrollbar_instance): hide a
317 scrollbar widget until we are absolutely sure we need to see it.
318 Fixes the problem we were seeing with mouse-avoidance-mode causing
319 severe scrollbar breakage.
320 (update_one_widget_scrollbar_pointer): Move the call to
321 gtk_widget_realize() here instead of in the upper code. Isolates
322 the dependency-on-having-a-window logic.
324 * gtk-xemacs.c (smash_scrollbar_specifiers): When setting the
325 scrollbar specifiers, need to take the x/y thickness of the border
326 into account. Horizontal scrollbar placement is much much nicer
327 now. Some themes would cause them to get positioned partially on
330 2000-06-08 William M. Perry <wmperry@aventail.com>
332 * console.c (select_console_1): Duh, forgot to put in an 'else'
333 statement, so Vwindow_system was getting set to Qnil all the
336 2000-06-02 William M. Perry <wmperry@aventail.com>
338 * glyphs-gtk.c (gtk_xpm_instantiate): Do not allow pixmaps to be
339 instantiated as pointers under GTK. The pixmap and cursor
340 routines under GDK do not expose enough information to let use do
341 the same magic that glyphs-x.c does. *sigh*
343 * ui-byhand.c (Fgtk_toolbar_insert_item): Hand-rolled function.
344 (Fgtk_toolbar_prepend_item): Ditto.
345 (generic_toolbar_insert_item): Utility function to take care of
346 all the common code for the Fgtk_toolbar_*_item functions.
348 2000-06-01 William M. Perry <wmperry@aventail.com>
350 * gtk-glue.c (face_to_style): DOH! You should only load it if
351 IMAGE_INSTANCEP, not !IMAGE_INSTANCEP you doofus.
353 * ui-byhand.c (Fgtk_toolbar_append_item): Hand-rolled function.
355 * ui-gtk.c (Fgtk_import_function_internal): No longer need to use
356 dll_function() to get the marshallers. They are now stored in a
357 hashtable. Lookups should be a bit quicker, and it will work on
358 platforms where you cannot do a dll_open (NULL) to look at your
361 2000-05-31 William M. Perry <wmperry@aventail.com>
363 * select-gtk.c (emacs_gtk_selection_handle): Better MULE string
366 * gtk-xemacs.c (gtk_xemacs_realize): Make sure we set the style on
367 the widget from the realize function. Otherwise for some themes
368 the color slots are not allocated yet, and we end up with icky
369 looking colors for things like the modeline/toolbar.
371 * select-gtk.c (Fgtk_get_clipboard): If we cannot get the
372 selection from anyone, return the last selection we received.
373 This make us work more like the X selection behaviour with
376 2000-05-30 William M. Perry <wmperry@aventail.com>
378 * ui-byhand.c: Removed definitions of gtk-clist-prepend,
379 gtk-clist-append, and gtk-clist-insert.
381 * ui-gtk.c (lisp_to_gtk_type): Use it.
383 * gtk-glue.c (face_to_style): Routine to convert from faces to
386 * menubar-gtk.c (gtk_popup_menu): Honor popup_up_p here.
387 (popdown_menu_cb): and here.
389 2000-05-29 William M. Perry <wmperry@aventail.com>
391 * frame-gtk.c (gtk_popup_frame): Do not show the widgets if we
392 were told to be initially unmapped.
393 (gtk_init_frame_1): Remember whether we were told to be initially
394 unmapped. Balloon help looks a little better now.
396 2000-05-28 William M. Perry <wmperry@aventail.com>
398 * redisplay-gtk.c (gtk_output_string): Fixed multi-dimensional
399 text run drawing. gdk_draw_text does too much, by dividing the
400 length by 2. So we fake them out my multiplying the length by the
401 dimension of the text. This will do the right thing for
402 single-dimension runs as well of course.
404 2000-05-26 William M. Perry <wmperry@aventail.com>
406 * ui-gtk.c (get_enumeration): Utility function that does its best
407 to import unknown enumeration types.
409 * glyphs-gtk.c (resource_symbol_to_type): Fixed pointer
412 * gtk-xemacs.c (FROB_FACE): Make sure to pass the device to
413 Fmake_image_instance or the initial background pixmaps would not
416 2000-05-25 William M. Perry <wmperry@aventail.com>
418 * device-gtk.c (gtk_init_device): Call gnome_init if available.
420 * menubar-gtk.c (create_menubar_widget): Use gnome_app_set_menus
421 instead of dealing with all the handlebox/menu crap ourselves.
423 * frame-gtk.c (gtk_create_widgets): Use GnomeApp if it is
424 available. Looks much sexier. :)
426 * glyphs-gtk.c (gtk_resource_instantiate): New image instantiator
427 gtk-resource, similar to the mswindows-resource stuff. This
428 allows you to get to the stock cursors defined in GDK. May
429 eventually allow you access to things like stock gnome pixmaps,
432 * frame-gtk.c (gtk_set_frame_pointer): Actually handle setting the
435 * redisplay-gtk.c (gdk_draw_bitmap): New function to output a
436 bitmap using XCopyPlane instead of XCopyArea.
437 (gtk_output_gdk_pixmap): Use it when PIXMAP_DEPTH == 0. This
438 means bitmaps look correct now.
440 2000-05-24 William M. Perry <wmperry@aventail.com>
442 * ui-gtk.c (flags_to_list): New function to convert a GtkFlags
443 argument to a list of symbols.
444 (gtk_type_to_lisp): Use it for converting from a flag.
446 2000-05-23 William M. Perry <wmperry@aventail.com>
448 * frame-gtk.c (gtk_set_frame_position): Do not use
449 gtk_window_reposition - this apparently does not exist in some
452 * gtk-glue.c (xemacs_gtklist_to_list): Don't call g_list_foreach
453 on a NULL list, just in case.
455 * redisplay-gtk.c (gtk_text_width_single_run): Use gdk_text_width
456 instead of gdk_text_measure. Proportional fonts appear to work
459 * objects-gtk.c (gtk_initialize_font_instance): Use X specific
460 crap lifted from objects-x.c to figure out proportionality of a
461 font, and better location of the default character.
463 2000-05-22 William M. Perry <wmperry@aventail.com>
465 * ui-gtk.c (enum_to_symbol): Routine to convert an enum to a lisp
466 symbol. We now return this instead of an integer for GtkFlags or
468 (lisp_to_flag): Routine to convert from a symbol or list of
469 symbols to a GtkEnum or GtkFlags type.
470 (lisp_to_gtk_type): Use it exclusively. No more sending integers
472 (import_gtk_enumeration_internal): Do not import the GTK_FOO_BAR
473 flags/enums into the lisp namespace. We now store mappings from
474 symbol names (both the 'real' and nickname fields) to the actual
475 internal values. Much more lispy way of doing things.
477 * menubar-gtk.c (__maybe_destroy): If we delete the menu item that
478 was 'active' when the menu was cancelled, GTK gets upset because
479 it tries to remove the focus rectangle from a (now) dead widget.
480 This widget will eventually get killed because it will not be
481 `precious' the next time the window is shown, because it is
484 * frame-gtk.c (delete_event_cb): Signal a fake event to make the
485 event loop wake up and notice we've been destroyed.
487 2000-05-20 William M. Perry <wmperry@aventail.com>
489 * ui-gtk.c (object_putprop): Allow `put'ing of arbitrary slots on
490 gtk objects. This will be useful for tacking lisp shit onto
491 composite widgets, etc.
492 (object_getprop): Ditto for `get'ing.
494 * frame-gtk.c (gtk_set_initial_frame_size): Don't delay when
495 changing the frame size, or creating initially unmapped frames is
496 screwed up. This showed up when trying to use the cheesy XEmacs
497 file selector dialog implemented using frames.
499 * ui-byhand.c: Removed a lot of functions that can now be imported
500 directly by gtk-import-function using the
501 Gtk(Array|List)Of(String|Object) types.
503 * ui-gtk.c (type_to_marshaller_type): Deal with new array/list
505 (Fgtk_call_function): Need to free array and list storage after
507 (lisp_to_gtk_type): Deal with the new list and array types when
508 converting to GTK types.
510 * gtk-glue.c: New file to deal with lists of strings or
511 GtkObjects. Defines new types GtkArrayOf, GtkListOf,
512 GtkArrayOfString, GtkListOfString, and GtkListOfObject.
513 (xemacs_list_to_array): Convert from a lisp list to a GtkArrayOf
515 (xemacs_list_to_list): Convert from a lisp list to a GtkListOf of
518 * dialog.c (Fpopup_dialog_box): Don't crap out if the car of
519 dbox_desc is not a string... this allows us to follow ben's
520 system/native dialog box specification.
522 2000-05-19 William M. Perry <wmperry@aventail.com>
524 * ui-gtk.c (lisp_to_gtk_type): Can now convert to GDK colors. Can
525 deal with color specifiers or instances.
526 (lisp_to_gtk_type): Can now convert to GDK fonts. Can deal with
527 face names, actual faces, font specifiers, or font instances.
529 2000-05-18 William M. Perry <wmperry@aventail.com>
531 * gtk-xemacs.c (smash_scrollbar_specifiers): Function that
532 attempts to set the scrollbar width/height correctly, but does not
533 do a very good job. Commented out for now.
535 * redisplay-gtk.c (gtk_output_vertical_divider): Got rid of lots
536 of useless code, since we ended up just calling gtk_output_shadows
538 (gtk_output_vertical_divider): Make sure we fill the rectangle
539 completely, otherwise the transparent background shows thru.
541 * menubar-gtk.c: Don't nuke menus all the time... should speed up
542 submenu traversal a bit, and save on the GtkMenuItem creation.
544 * device-gtk.c (Fgtk_style_info): Return a list of all the
545 pixmaps, not just GTK_STATE_NORMAL.
547 * menubar-gtk.c (menu_descriptor_to_widget_1): Better menu labels
550 * frame-gtk.c (gtk_set_frame_size): This function actually works
552 (gtk_set_initial_frame_size): Better default sizing method.
554 * event-gtk.c (init_event_gtk_late): Push an error trap handler so
555 that XEmacs won't abort at the drop of a hat on X errors. We
556 could get X specific here and override the default GDK XError and
557 XIOError handlers to be more like those in device-x.c. Not sure
558 if that is worth it or not - you would at least get information
559 that an error occurred.
561 * scrollbar-gtk.c (gtk_update_scrollbar_instance_status): Don't
562 always call gtk_widget_set_usize because that causes the widget to
563 redraw itself, which can cause some annoying flicker.
564 (gtk_update_scrollbar_instance_status): Don't always move it
565 either, because that can cause the GtkFixed container to get a
567 (update_one_widget_scrollbar_pointer): Try to set the cursor
569 2000-05-17 William M. Perry <wmperry@aventail.com>
571 * device-gtk.c (Fgtk_style_info): Back to taking only 1 argument -
573 (Fgtk_style_info): Now returns ALL of the information about
574 colors. Returns a list of colors instead of just the one
575 associated with GTK_STATE_NORMAL.
577 2000-05-16 William M. Perry <wmperry@aventail.com>
579 * gtk-xemacs.c (smash_face_fallbacks): New function to reset the
580 gtk-specific fallbacks on various face specifiers. This means
581 that if the user has not changed the face, when a theme or style
582 is changed, the faces will automatically change as well.
583 (gtk_xemacs_style_set): Call it.
585 * toolbar-gtk.c (get_toolbar_gc): Swap the fg/bg of the toolbar
586 face when getting the GC. It looks better this way.
588 * gtk-xemacs.c (gtk_xemacs_style_set): Override the style-set
589 method so that we can nuke the pixmaps again.
590 (__nuke_background_items): Moved the voodoo out into its own
591 function so that it can be called from both style_set and
594 * console-gtk.h (struct gtk_frame): Removed hardcoded GCs ala X.
596 * toolbar-gtk.c (get_toolbar_gc): New function that dynamically
597 creates a GC from the `toolbar' face.
598 (gtk_draw_blank_toolbar_button): Use it instead of the hardcoded
600 (gtk_output_toolbar_button): Ditto.
601 (gtk_output_toolbar): Ditto.
603 * event-gtk.c (gtk_check_for_quit_char): Quit handling actually
606 * device-gtk.c (gtk_device_init_x_specific_cruft): New function
607 that gets the socket we are listening to the X server on so that
608 the SIGIO lossage works correctly for GTK devices.
609 (gtk_init_device): Call it at device creation time.
611 2000-05-15 William M. Perry <wmperry@aventail.com>
613 * ui-gtk.c (__internal_callback_marshal): We now correctly handle
614 the 'data' argument. This is an arbitrary lisp object passed to
615 the callback routine as its last argument.
617 2000-05-14 William M. Perry <wmperry@aventail.com>
619 * event-gtk.c (gtk_event_to_emacs_event): Needed to reinstate the
620 magic to NOT differentiate betwen ! and shift-!. *sigh*
622 * ui-gtk.c (lisp_to_gtk_type): Allow 'nil' for string types so
623 that we can pass NULL to gtk-frame-new.
625 2000-05-13 William M. Perry <wmperry@aventail.com>
627 * gtk-xemacs.c (gtk_xemacs_size_request): Needed to override the
628 size_request method to get frame sizing correct. Whoo hoo!
629 (gtk_xemacs_realize): Don't set the background on the GtkXEmacs
630 window - this reduces the flicker even more.
632 * device-gtk.c (gtk_init_device): Don't use shared memory under
633 FreeBSD - it is apparently flaky as hell and causes lots of themes
634 to crash and burn quite prettily.
636 * gtk-xemacs.c (gtk_xemacs_realize): Added new widget method that
637 makes sure to nuke the background pixmap of the XEmacs text area
638 and its parent (the GtkWindow it is contained in). This fixes the
639 flashing you would see with themes/styles that define a background
642 2000-05-12 William M. Perry <wmperry@aventail.com>
644 * menubar-gtk.c (gtk_update_frame_menubar_internal): Duh, should
645 actually pay attention to menubar_will_be_visible instead of just
646 calling gtk_widget_show_all in both branches. :)
648 2000-05-11 William M. Perry <wmperry@aventail.com>
650 * menubar-gtk.c (vars_of_menubar_gtk): New variable
651 menubar-dockable-p that controls whether to use the GtkHandleBox
654 * select-gtk.c: Implemented all of the selection callbacks for GTK
656 * frame-gtk.c (resize_event_cb): Force a redisplay when the frame
659 * event-gtk.c (gtk_event_to_emacs_event): When we are doing our
660 hackery to make sure we don't see button events inside the
661 scrollbar, make sure we correctly forward events that did not
662 happen over ANY widget, otherwise selection gets royally screwed
663 and thinks you still have the mouse button down.
665 * redisplay-gtk.c (gtk_output_string): Don't bother calling
666 gdk_draw_text_wc - I misunderstood what XDrawString16 did -
667 gdk_draw_text encapsulates this nicely for us.
669 2000-05-10 William M. Perry <wmperry@aventail.com>
671 * menubar-gtk.c: Changed how the menubar is created and managed.
672 We no longer create and destroy it at will. Only one GtkMenuBar
673 is ever created, and the children are just added/removed from it.
674 Much less flickering when switching buffers - cleaner in general.
675 (create_menubar_widget): Wheee - menubars are now detachable.
677 * ui-gtk.c (Fgtk_import_function_internal): Don't drop everything
678 down to its fundamental type just yet - we need to know specifics
680 (object_putprop): Duh, actually SET the property.
681 (Fgtk_fundamental_type): New function that does the obvious.
682 (Fgtk_object_type): New function that does the obvious.
683 (lisp_to_gtk_type): Implement glyph handling! GtkPixmap works!
685 * ui-byhand.c (Fgtk_pixmap_get): Implemented by hand. *sigh*
687 * dialog-gtk.c: Call into lisp to do dialog boxes.
689 2000-05-08 William M. Perry <wmperry@aventail.com>
691 * make-src-depend (PrintPatternDeps): Make sure we generate the
692 xx-gtk.* dependencies.
694 * depend: Regenerated
696 * make-src-depend: Handle inclusion of .c files.
698 * Makefile.in.in (extra_doc_files): Need to include ui-byhand.c
701 * ui-gtk.c (type_to_marshaller_type): Don't abort if we don't know
702 about the marshaller. Just return Qnil and let the caller figure
704 (Fgtk_import_function_internal): Deal with new return value of
705 Qnil for error signalling from type_to_marshaller_type().
706 (lisp_to_gtk_type): Half-assed implementation of dealing with
708 (gtk_type_to_lisp): Ditto.
710 * ui-byhand.c: New file that hand-codes some annoying functions in
713 * emacs-widget-accessors.c (Fgtk_adjustment_lower): New
714 auto-generated file that spits out all the widget slot accessor
717 * ui-gtk.c (Fgtk_signal_connect_internal): Holy shit, signals work!
718 (lisp_to_gtk_type): Allow ints to be passed in as arguments to
719 functions that expect floats, otherwise you have to write stupid
720 code like 9.0 instead of just passing in '9'.
722 2000-05-07 William M. Perry <wmperry@aventail.com>
724 * ui-gtk.c (gtk_type_to_lisp): Return Qnil if we get a NULL
725 pointer/object/boxed.
726 (lisp_to_gtk_type): Allow Qnil to be passed in to mean a NULL
727 pointer/object/boxed.
729 * event-gtk.c (gtk_event_to_emacs_event): Make sure a button press
730 focuses on the text widget, otherwise if someone packs a widget
731 into the container from lisp, we end up not getting keyboard focus
734 * frame-gtk.c (gtk_create_widgets): Set the name of the xemacs
735 shell so we can control sylte issues from .gtkrc
736 (gtk_set_initial_frame_size): Set the default size of the frame
738 (gtk_create_widgets): Expose the frame shell and container widgets
741 * emacs-marshals.c: Added a whole shitload of marshallers - don't
742 edit this file by hand if you need to add one. Check out
743 ../lisp/ui/gtk-marshal.el for a script that auto-generates them
746 2000-05-05 William M. Perry <wmperry@aventail.com>
748 * ui-gtk.c (describe_gtk_arg): Debugging function to spit out
749 human-readable version a GtkArg.
750 (lisp_to_gtk_type): Made this function much more sane.
751 (Fgtk_call_function): New function to allow calling generic
752 functions from DLLs in lisp.
753 (CONVERT_RETVAL): New macro (ugh) to convert a pointer that the
754 return value filled in back into a valid GtkArg.
755 (Fgtk_call_function): This actually works now! Scary stuff.
757 2000-05-04 William M. Perry <wmperry@aventail.com>
759 * ui-gtk.c (Fgtk_import_type): New function to import a GtkType
760 into the XEmacs namespace. For starters this only fully imports
761 enumerations and flags. Importing a GtkObject or subclass results
762 in getting a list back of possible signals and argument lists.
764 * scrollbar-gtk.c (gtk_create_scrollbar_instance): Fixed some
766 (scrollbar_cb): Aha! Thanks to the magic of reading the
767 gtkrange.c source code, we now have better behaving scrollbars.
768 Clicking in the trough/end arrows now works correctly instead of
769 the semi-hackish way it did earlier today.
771 * ui-gtk.c (Fgtk_define_enumeration): New function that can
773 * scrollbar-gtk.c (scrollbar_cb): Combined the horizontal and
774 vertical scrolling callbacks. Differentiate between them by
776 (scrollbar_cb): Don't bother trying to figure out whether this is
777 a line-by-line or page-wide scrolling operation. Just go by what
778 is in the value of the adjustment and issue a scrollbar_*_drag
779 event. This is not 100% correct, but it at least gets it
780 working. Doing it 'right' might not be possible with standard Gtk
782 (scrollbar_drag_hack_cb): New function to set
783 vertical_drag_in_progress and inhibit_slider_change when we might
784 be starting a drag in the scrollbar.
785 (gtk_update_scrollbar_instance_status): Better setting of the
786 adjustment variables. Scrolling by pages (clicking in the trough)
787 works now. Line-by-line seems to work too.
789 2000-05-03 William M. Perry <wmperry@aventail.com>
791 * scrollbar-gtk.c (gtk_update_scrollbar_instance_status): Got the
792 thumb sizing correct finally. Thanks to scrollbar-msw.c for
793 showing how to do it sanely - scrollbar-x.c is a mess.
795 * window.c (specifier_vars_of_window): Added GTK specific fallback
796 for Vvertical_divider_line_width.
798 * toolbar.c (specifier_vars_of_toolbar): Handle specifier
799 fallbacks for GTK toolbars.
801 * gui-gtk.c (button_item_to_widget): Compiles under Gtk at least -
802 more than likely completely broken.
804 * glyphs-gtk.c (write_lisp_string_to_temp_file): Resurrected this
805 blasphemous function to deal with XPMs.
806 (gtk_xpm_instantiate): Now writes the XPM to a temp file, since
807 GTK cannot deal with XPMs from memory. Lame, but not fixable for
808 gtk 1.2 - maybe for 1.4.
809 (gtk_xpm_instantiate): Transparency works now.
811 * gccache-gtk.c (gc_cache_lookup): Made non-hash based code
812 compile. It is not used, but what the hell.
814 * faces.c (complex_vars_of_faces): Do GTK specific mucking about
815 with face property fallbacks (fonts and colors)
817 * events.c (event_equal): Added special case for GTK.
818 (event_hash): Added special case for GTK.
819 (format_event_object): Added special case for GTK events.
821 * event-gtk.c (event_name): Use gtk_event_name helper function
823 (handle_focus_event_1): Got rid of gtk-redisplay-hack variable and
826 * device.c (delete_device_internal): Delete 'popup' frames under
827 Gtk as well as X. Should this happen for HAVE_MSWINDOWS as well?
829 * console.c (select_console_1): Make sure we set Vwindow_system
832 * frame-gtk.c (gtk_update_frame_external_traits): Added comments
833 about why I didn't implement some portions of this function.
835 * redisplay-gtk.c (gtk_output_string): Fixed the bizarre redisplay
836 problem where all the default text would be drawn twice - once
837 with the normal background colour, and once with the text-cursor
838 background. This was caused by a stupid typo and using the wrong
839 GdkGC in the second call to gdk_draw_text_image... basically no
840 clipping was being done on the image, so the whole thing was
842 (gtk_output_string): Call gdk_draw_text if we have a background
843 pixmap, otherwise things look REALLY weird.
844 (gtk_clear_region): Had a misplaced brace that caused the non-text
845 area of a frame not to get the correct background.
847 2000-05-02 William M. Perry <wmperry@aventail.com>
849 * glyphs-gtk.c (gtk_xpm_instantiate): Need to write pixmaps to a
850 temp file and then read with gdk_pixmap_create_from_xpm () - there
851 is no way to read from a memory buffer (yet - I might write one
854 * glyphs.c: Don't include xpm.h when building with Gtk.
855 (pixmap_to_lisp_data): Alternate implementation for Gtk.
857 * device-gtk.c (gtk_init_device): Call gdk_imlib_init if
858 available, otherwise the 'Pixmap' theme engine doesn't work.
861 * glyphs-gtk.c (gtk_xpm_instantiate): Now at least tries to
862 instantiate XPM images.
863 (init_image_instance_from_gdk_pixmap): Utility function to create
864 a glyph from an existing GdkPixmap.
866 * device-gtk.c (Fgtk_style_info): Attempt to expose the background
867 pixmaps from a Gtk style.