Copyright (C) 1995 Tinker Systems
Copyright (C) 1995, 1996 Ben Wing
Copyright (C) 1995 Sun Microsystems
- Copyright (C) 1999, 2000 Andy Piper
+ Copyright (C) 1999, 2000, 2002 Andy Piper
This file is part of XEmacs.
#endif
void
emacs_Xt_handle_widget_losing_focus (struct frame* f, Widget losing_widget);
+void
+enqueue_focus_event (Widget wants_it, Lisp_Object frame, int in_p);
#include "bitmaps.h"
if (vis->class == PseudoColor)
{
unsigned long pixarray[256];
- int pixcount, n;
+ int pixcount;
+ unsigned int n;
/* use our quantize table to allocate the colors */
pixcount = 32;
*pixtbl = xnew_array (unsigned long, pixcount);
}
else
{
- int i;
+ unsigned int i;
if (IMAGE_INSTANCE_PIXMAP_TIMEOUT (p))
disable_glyph_animated_timeout (IMAGE_INSTANCE_PIXMAP_TIMEOUT (p));
/* Get the data while doing the conversion */
while (1)
{
- ssize_t size_in_bytes = Lstream_read (istr, tempbuf, sizeof (tempbuf));
+ Lstream_data_count size_in_bytes = Lstream_read (istr, tempbuf, sizeof (tempbuf));
if (!size_in_bytes)
break;
/* It does seem the flushes are necessary... */
else
{
xbg->pixel = 0;
- xbg->red = xbg->green = xbg->blue = ~0;
+ xbg->red = xbg->green = xbg->blue = USHRT_MAX;
}
}
break;
default:
- abort ();
+ ABORT ();
}
}
/* Duplicate the pixel value so that we still have a lock on it if
the pixel we were passed is later freed. */
if (! XAllocColor (dpy, cmap, &color))
- abort (); /* it must be allocable since we're just duplicating it */
+ ABORT (); /* it must be allocable since we're just duplicating it */
symbols [i].name = (char *) XSTRING_DATA (XCAR (cons));
symbols [i].pixel = color.pixel;
break;
default:
- abort ();
+ ABORT ();
}
xpm_free (&xpmattrs); /* after we've read pixels and hotspot */
-dga->xoffset, -dga->yoffset);
if (!IMAGE_INSTANCE_SUBWINDOW_DISPLAYEDP (p))
XtMapWidget (IMAGE_INSTANCE_X_CLIPWIDGET (p));
+ /* See comments in glyphs-msw.c about keyboard focus. */
+ if (IMAGE_INSTANCE_WANTS_INITIAL_FOCUS (p)) {
+ /* #### FIXME to pop-up the find dialog we map the text-field
+ seven times! This doesn't show on a fast linux box but does
+ under X on windows. */
+ enqueue_focus_event (IMAGE_INSTANCE_X_WIDGET_ID (p),
+ IMAGE_INSTANCE_FRAME (p), 1);
+ }
}
}
IMAGE_INSTANCE_SUBWINDOW_ID (ii) = (void*)win;
}
+/* Account for some of the limitations with widget images. */
+static int
+x_widget_border_width (void)
+{
+ return DEFAULT_WIDGET_BORDER_WIDTH * 2;
+}
+
+
#if 0
/* #### Should this function exist? If there's any doubt I'm not implementing it --andyp */
DEFUN ("change-subwindow-property", Fchange_subwindow_property, 3, 3, 0, /*
free_widget_value_tree (clip_wv);
+ /* create a sensible name. */
+ if (wv->name == 0 || strcmp(wv->name, "") == 0)
+ wv->name = xstrdup (type);
+
/* copy any args we were given */
ac = 0;
lw_add_value_args_to_args (wv, al, &ac);
but I couldn't find it. */
Lisp_Object old_selected =gui_item_list_find_selected
(XCDR (IMAGE_INSTANCE_WIDGET_ITEMS (ii)));
- Arg al [1];
+ Arg al [2];
char* name;
unsigned int num_children, i;
Widget* children;
if (!strcmp (XtName (children [i]), name))
{
XtSetArg (al [0], XtNtopWidget, children [i]);
- XtSetValues (IMAGE_INSTANCE_X_WIDGET_ID (ii), al, 1);
+ XtSetArg (al [1], XtNhighlightWidget,
+ children [i]);
+ XtSetValues (IMAGE_INSTANCE_X_WIDGET_ID (ii), al, 2);
break;
}
}
CONSOLE_HAS_METHOD (x, map_subwindow);
CONSOLE_HAS_METHOD (x, redisplay_widget);
CONSOLE_HAS_METHOD (x, redisplay_subwindow);
+ CONSOLE_HAS_METHOD (x, widget_border_width);
}
void