Index: etc/NEWS =================================================================== RCS file: /usr/CVSroot/XEmacs/xemacs/etc/NEWS,v retrieving revision 1.58.2.33 diff -u -r1.58.2.33 NEWS --- NEWS 2000/01/21 11:03:30 1.58.2.33 +++ NEWS 2000/01/28 12:34:07 @@ -72,8 +72,9 @@ (set-specifier default-gutter-visible-p nil) -in your `.emacs'. Under MS Windows, you can change the location of -the gutter with `set-default-gutter-position'. +in your `.emacs'. You can change the location of the gutter with +`set-default-gutter-position', however currently only MS-Windows +supports tab widgets with orientations other than vertical.. ** When you press RET at a minibuffer prompt that provides a default value, the value is stored in history instead of an empty line. Also, @@ -180,15 +181,20 @@ If you set this variable to nil then pressing the Alt key under MS-Windows will no longer activate the menubar. The default is t. +** Pixel-based scrolling has been implemented. +By default this will attempt to scroll in increments equal to the +height of the default face. Set `window-pixel-scroll-increment' to +modify this behaviour. + ** Etags changes. *** In DOS, etags looks for file.cgz if it cannot find file.c. *** New option --ignore-case-regex is an alternative to --regex. It is now possible to bind a regexp to a language, by prepending the regexp with -{lang}, where lang is one of the languages that `etags --help' prints out. -This feature is useful especially for regex files, where each line contains -a regular expression. The manual contains details. +{lang}, where lang is one of the languages that `etags --help' prints +out. This feature is useful especially for regex files, where each +line contains a regular expression. The manual contains details. *** In C and derived languages, etags creates tags for function declarations when given the --declarations option. @@ -287,9 +293,15 @@ are implemented as native window-system widgets. Thus you can embed buttons, scrollbars, combo boxes, edit fields and progress gauges in a buffer. As a side effect subwindow support now works once again. + +All of this is still fairly experimental and there is no +documentation. The current APIs might change in a future version of +XEmacs. Some widgets are only available under MS-Windows. See the +file glyphs-test.el in the XEmacs src distribution for examples of +usage. -All of this is still very experimental. This feature is currently -more complete under MS-Windows. #### Is this still the case? +The buffers-tab functionality and progress gauge have been implemented +using this feature. ** `user-init-file' and `user-init-directory' are now absolute file/directory names. Previously, both variables used to be relative Index: lwlib/xlwtabs.c =================================================================== RCS file: /usr/CVSroot/XEmacs/xemacs/lwlib/Attic/xlwtabs.c,v retrieving revision 1.1.2.24 diff -u -r1.1.2.24 xlwtabs.c --- xlwtabs.c 2000/01/24 20:30:03 1.1.2.24 +++ xlwtabs.c 2000/01/28 12:34:35 @@ -980,6 +980,12 @@ tw->tabs.topWidget->core.being_destroyed ) ) tw->tabs.topWidget = NULL ; + /* Check whether the highlight tab is still valid. */ + if( tw->tabs.hilight != NULL && + ( !XtIsManaged(tw->tabs.hilight) || + tw->tabs.hilight->core.being_destroyed ) ) + tw->tabs.hilight = NULL ; + GetPreferredSizes(tw) ; MakeSizeRequest(tw) ; Index: src/console-msw.c =================================================================== RCS file: /usr/CVSroot/XEmacs/xemacs/src/console-msw.c,v retrieving revision 1.4.2.4 diff -u -r1.4.2.4 console-msw.c --- console-msw.c 2000/01/21 07:53:59 1.4.2.4 +++ console-msw.c 2000/01/28 12:34:39 @@ -52,12 +52,14 @@ requiring that CONNECTION is nil, the only allowed connection in Windows. */ if (!NILP (connection)) - if (ERRB_EQ (errb, ERROR_ME)) - signal_simple_error - ("Invalid (non-nil) connection for mswindows device/console", - connection); - else - return Qunbound; + { + if (ERRB_EQ (errb, ERROR_ME)) + signal_simple_error + ("Invalid (non-nil) connection for mswindows device/console", + connection); + else + return Qunbound; + } return Qnil; } Index: src/console-msw.h =================================================================== RCS file: /usr/CVSroot/XEmacs/xemacs/src/console-msw.h,v retrieving revision 1.22.2.9 diff -u -r1.22.2.9 console-msw.h --- console-msw.h 2000/01/22 12:04:02 1.22.2.9 +++ console-msw.h 2000/01/28 12:34:39 @@ -258,7 +258,7 @@ void mswindows_redraw_exposed_area (struct frame *f, int x, int y, int width, int height); void mswindows_size_frame_internal (struct frame* f, XEMACS_RECT_WH* dest); -void mswindows_enqueue_magic_event (HWND hwnd, UINT message); +void mswindows_enqueue_magic_event (HWND hwnd, UINT msg); /* win32 DDE management library */ #define MSWINDOWS_DDE_ITEM_OPEN "Open" @@ -278,6 +278,22 @@ Lisp_Object mswindows_protect_modal_loop (Lisp_Object (*bfun) (Lisp_Object barg), Lisp_Object barg); void mswindows_unmodalize_signal_maybe (void); + +#ifdef HAVE_TOOLBARS +Lisp_Object +mswindows_get_toolbar_button_text ( struct frame* f, int command_id ); +Lisp_Object +mswindows_handle_toolbar_wm_command (struct frame* f, HWND ctrl, WORD id); +#endif +Lisp_Object +mswindows_handle_gui_wm_command (struct frame* f, HWND ctrl, WORD id); +COLORREF mswindows_string_to_color (CONST char *name); +USID emacs_mswindows_create_stream_pair (void* inhandle, void* outhandle, + Lisp_Object* instream, + Lisp_Object* outstream, + int flags); +USID emacs_mswindows_delete_stream_pair (Lisp_Object instream, + Lisp_Object outstream); #ifdef HAVE_WIN32_PROCESSES HANDLE get_nt_process_handle (struct Lisp_Process *p); Index: src/device-msw.c =================================================================== RCS file: /usr/CVSroot/XEmacs/xemacs/src/device-msw.c,v retrieving revision 1.20.2.8 diff -u -r1.20.2.8 device-msw.c --- device-msw.c 2000/01/27 07:10:07 1.20.2.8 +++ device-msw.c 2000/01/28 12:34:39 @@ -66,15 +66,15 @@ /************************************************************************/ static Lisp_Object -build_syscolor_string (int index) +build_syscolor_string (int idx) { DWORD clr; char buf[16]; - if (index < 0) + if (idx < 0) return Qnil; - clr = GetSysColor (index); + clr = GetSysColor (idx); sprintf (buf, "#%02X%02X%02X", GetRValue (clr), GetGValue (clr), Index: src/event-msw.c =================================================================== RCS file: /usr/CVSroot/XEmacs/xemacs/src/event-msw.c,v retrieving revision 1.38.2.28 diff -u -r1.38.2.28 event-msw.c --- event-msw.c 2000/01/28 05:26:40 1.38.2.28 +++ event-msw.c 2000/01/28 12:34:52 @@ -901,7 +901,7 @@ } void -mswindows_enqueue_magic_event (HWND hwnd, UINT message) +mswindows_enqueue_magic_event (HWND hwnd, UINT msg) { Lisp_Object emacs_event = Fmake_event (Qnil, Qnil); struct Lisp_Event* event = XEVENT (emacs_event); @@ -909,7 +909,7 @@ event->channel = hwnd ? mswindows_find_frame (hwnd) : Qnil; event->timestamp = GetMessageTime(); event->event_type = magic_event; - EVENT_MSWINDOWS_MAGIC_TYPE (event) = message; + EVENT_MSWINDOWS_MAGIC_TYPE (event) = msg; mswindows_enqueue_dispatch_event (emacs_event); } @@ -930,7 +930,7 @@ } static void -mswindows_enqueue_mouse_button_event (HWND hwnd, UINT message, POINTS where, DWORD when) +mswindows_enqueue_mouse_button_event (HWND hwnd, UINT msg, POINTS where, DWORD when) { /* We always use last message time, because mouse button @@ -943,14 +943,14 @@ event->channel = mswindows_find_frame(hwnd); event->timestamp = when; event->event.button.button = - (message==WM_LBUTTONDOWN || message==WM_LBUTTONUP) ? 1 : - ((message==WM_RBUTTONDOWN || message==WM_RBUTTONUP) ? 3 : 2); + (msg==WM_LBUTTONDOWN || msg==WM_LBUTTONUP) ? 1 : + ((msg==WM_RBUTTONDOWN || msg==WM_RBUTTONUP) ? 3 : 2); event->event.button.x = where.x; event->event.button.y = where.y; event->event.button.modifiers = mswindows_modifier_state (NULL, 0); - if (message==WM_LBUTTONDOWN || message==WM_MBUTTONDOWN || - message==WM_RBUTTONDOWN) + if (msg==WM_LBUTTONDOWN || msg==WM_MBUTTONDOWN || + msg==WM_RBUTTONDOWN) { event->event_type = button_press_event; SetCapture (hwnd); @@ -1991,11 +1991,11 @@ else if (nmhdr->code == TCN_SELCHANGE) { TC_ITEM item; - int index = SendMessage (nmhdr->hwndFrom, TCM_GETCURSEL, 0, 0); + int idx = SendMessage (nmhdr->hwndFrom, TCM_GETCURSEL, 0, 0); frame = XFRAME (mswindows_find_frame (hwnd)); item.mask = TCIF_PARAM; - SendMessage (nmhdr->hwndFrom, TCM_GETITEM, (WPARAM)index, + SendMessage (nmhdr->hwndFrom, TCM_GETITEM, (WPARAM)idx, (LPARAM)&item); mswindows_handle_gui_wm_command (frame, 0, item.lParam); Index: src/frame-msw.c =================================================================== RCS file: /usr/CVSroot/XEmacs/xemacs/src/frame-msw.c,v retrieving revision 1.29.2.10 diff -u -r1.29.2.10 frame-msw.c --- frame-msw.c 2000/01/21 07:54:01 1.29.2.10 +++ frame-msw.c 2000/01/28 12:34:55 @@ -748,7 +748,7 @@ di.cbSize = sizeof (di); di.lpszDocName = (STRINGP(f->name) - ? XSTRING_DATA(f->name) + ? (char*) XSTRING_DATA(f->name) : "XEmacs print document"); di.lpszOutput = NULL; di.lpszDatatype = NULL; Index: src/glyphs-msw.c =================================================================== RCS file: /usr/CVSroot/XEmacs/xemacs/src/glyphs-msw.c,v retrieving revision 1.21.2.39 diff -u -r1.21.2.39 glyphs-msw.c --- glyphs-msw.c 2000/01/27 07:31:21 1.21.2.39 +++ glyphs-msw.c 2000/01/28 12:35:03 @@ -105,8 +105,6 @@ mswindows_initialize_image_instance_mask (struct Lisp_Image_Instance* image, struct frame* f); -COLORREF mswindows_string_to_color (CONST char *name); - #define BPLINE(width) ((int)(~3UL & (unsigned long)((width) +3))) /************************************************************************/ @@ -259,7 +257,7 @@ (IS_DIRECTORY_SEP(XSTRING_BYTE (name, 2))))))) { if (!NILP (Ffile_readable_p (name))) - return name; + return Fexpand_file_name (name, Qnil); else return Qnil; } @@ -2478,7 +2476,9 @@ else SendMessage (wnd, BM_SETCHECK, (WPARAM)BST_UNCHECKED, 0); /* add the image if one was given */ - if (!NILP (glyph) && IMAGE_INSTANCEP (glyph)) + if (!NILP (glyph) && IMAGE_INSTANCEP (glyph) + && + IMAGE_INSTANCE_PIXMAP_TYPE_P (XIMAGE_INSTANCE (glyph))) { SendMessage (wnd, BM_SETIMAGE, (WPARAM) (XIMAGE_INSTANCE_MSWINDOWS_BITMAP (glyph) ? Index: src/glyphs-widget.c =================================================================== RCS file: /usr/CVSroot/XEmacs/xemacs/src/Attic/glyphs-widget.c,v retrieving revision 1.1.2.23 diff -u -r1.1.2.23 glyphs-widget.c --- glyphs-widget.c 2000/01/25 06:04:43 1.1.2.23 +++ glyphs-widget.c 2000/01/28 12:35:06 @@ -522,9 +522,8 @@ /* We are going to be sneaky here and add the border text as just another child, the layout and output routines don't know this and will just display at the offsets we prescribe. */ - Lisp_Object glyph = - glyph_image_instance (border, domain, ERROR_ME, 1); - children = Fcons (glyph, children); + children = Fcons (glyph_image_instance (border, domain, ERROR_ME, 1), + children); IMAGE_INSTANCE_LAYOUT_BORDER (ii) = make_int (0); } else @@ -536,9 +535,11 @@ LIST_LOOP (rest, items) { /* make sure the image is instantiated */ - Lisp_Object glyph = XCAR (rest); - Lisp_Object gii = glyph_image_instance (glyph, domain, ERROR_ME, 1); + Lisp_Object gii = glyph_image_instance (XCAR (rest), domain, ERROR_ME, 1); children = Fcons (gii, children); + /* Make sure elements in the layout are in the order the + user expected. */ + children = Fnreverse (children); } IMAGE_INSTANCE_LAYOUT_CHILDREN (ii) = children; } Index: src/glyphs.c =================================================================== RCS file: /usr/CVSroot/XEmacs/xemacs/src/glyphs.c,v retrieving revision 1.23.2.42 diff -u -r1.23.2.42 glyphs.c --- glyphs.c 2000/01/27 04:40:03 1.23.2.42 +++ glyphs.c 2000/01/28 12:35:19 @@ -1352,7 +1352,10 @@ } } - /* Make sure the image instance gets redisplayed. */ + /* Make sure the image instance gets redisplayed. + + ### This currently does not change the dirty state of an + enclosing layout which may be bad. */ MARK_IMAGE_INSTANCE_CHANGED (ii); MARK_SUBWINDOWS_STATE_CHANGED; MARK_GLYPHS_CHANGED; Index: src/redisplay-msw.c =================================================================== RCS file: /usr/CVSroot/XEmacs/xemacs/src/redisplay-msw.c,v retrieving revision 1.28.2.13 diff -u -r1.28.2.13 redisplay-msw.c --- redisplay-msw.c 2000/01/24 07:36:20 1.28.2.13 +++ redisplay-msw.c 2000/01/28 12:35:25 @@ -334,7 +334,7 @@ Lisp_Object font = Qnil; int focus = EQ (w->frame, DEVICE_FRAME_WITH_FOCUS_REAL (d)); HDC hdc = get_frame_dc (f); - unsigned int face_index=0; + unsigned int local_face_index=0; char *p_char = NULL; int n_char = 0; RECT rect = { xpos, @@ -373,9 +373,9 @@ /* Use cursor fg/bg for block cursor, or character fg/bg for the bar or when we need to erase the cursor. Output nothing at eol if bar cursor */ - face_index = get_builtin_face_cache_index (w, Vtext_cursor_face); + local_face_index = get_builtin_face_cache_index (w, Vtext_cursor_face); color_cachel = WINDOW_FACE_CACHEL (w, ((!cursor_p || bar_p) ? - findex : face_index)); + findex : local_face_index)); mswindows_update_dc (hdc, color_cachel->foreground, color_cachel->background, Qnil); if (real_char_p) @@ -391,8 +391,8 @@ if (focus && bar_p) { rect.right = rect.left + (EQ (bar, Qt) ? 1 : min (2, width)); - face_index = get_builtin_face_cache_index (w, Vtext_cursor_face); - cachel = WINDOW_FACE_CACHEL (w, face_index); + local_face_index = get_builtin_face_cache_index (w, Vtext_cursor_face); + cachel = WINDOW_FACE_CACHEL (w, local_face_index); mswindows_update_dc (hdc, Qnil, cachel->background, Qnil); ExtTextOut (hdc, xpos, dl->ypos, ETO_OPAQUE, &rect, NULL, 0, NULL); } @@ -409,8 +409,8 @@ n_char = 1; } - face_index = get_builtin_face_cache_index (w, Vdefault_face); - cachel = WINDOW_FACE_CACHEL (w, (real_char_p ? findex : face_index)); + local_face_index = get_builtin_face_cache_index (w, Vdefault_face); + cachel = WINDOW_FACE_CACHEL (w, (real_char_p ? findex : local_face_index)); mswindows_update_dc (hdc, cachel->foreground, cachel->background, Qnil); ExtTextOut (hdc, xpos, dl->ypos, ETO_OPAQUE | ETO_CLIPPED, @@ -443,7 +443,7 @@ FINDEX Index for the face cache element describing how to display the text. ****************************************************************************/ -void +static void mswindows_output_string (struct window *w, struct display_line *dl, Emchar_dynarr *buf, int xpos, int xoffset, int clip_start, int width, face_index findex, @@ -1114,11 +1114,11 @@ else if (rb->type == RUNE_DGLYPH) { Lisp_Object instance; - struct display_box db; + struct display_box dbox; struct display_glyph_area dga; redisplay_calculate_display_boxes (dl, rb->xpos, rb->object.dglyph.xoffset, start_pixpos, rb->width, - &db, &dga); + &dbox, &dga); XSETWINDOW (window, w); instance = glyph_image_instance (rb->object.dglyph.glyph, @@ -1151,7 +1151,7 @@ case IMAGE_MONO_PIXMAP: case IMAGE_COLOR_PIXMAP: - redisplay_output_pixmap (w, instance, &db, &dga, findex, + redisplay_output_pixmap (w, instance, &dbox, &dga, findex, cursor_start, cursor_width, cursor_height, 0); if (rb->cursor_type == CURSOR_ON) @@ -1164,7 +1164,7 @@ case IMAGE_SUBWINDOW: case IMAGE_WIDGET: - redisplay_output_subwindow (w, instance, &db, &dga, findex, + redisplay_output_subwindow (w, instance, &dbox, &dga, findex, cursor_start, cursor_width, cursor_height); if (rb->cursor_type == CURSOR_ON) @@ -1173,7 +1173,7 @@ break; case IMAGE_LAYOUT: - redisplay_output_layout (w, instance, &db, &dga, findex, + redisplay_output_layout (w, instance, &dbox, &dga, findex, cursor_start, cursor_width, cursor_height); if (rb->cursor_type == CURSOR_ON) Index: src/redisplay-output.c =================================================================== RCS file: /usr/CVSroot/XEmacs/xemacs/src/redisplay-output.c,v retrieving revision 1.11.2.23 diff -u -r1.11.2.23 redisplay-output.c --- redisplay-output.c 2000/01/09 09:53:16 1.11.2.23 +++ redisplay-output.c 2000/01/28 12:35:31 @@ -1222,7 +1222,7 @@ int layout_height, layout_width; /* We bogusly don't take f->extents_changed and f->glyphs_changed into account. This is because if we do we always redisplay the - entire layout. So far I have seen no ill effects to we'll see. */ + entire layout. So far I have seen no ill effects so we'll see. */ int frame_really_changed = (f->buffers_changed || f->clip_changed || f->faces_changed || Index: src/select.c =================================================================== RCS file: /usr/CVSroot/XEmacs/xemacs/src/Attic/select.c,v retrieving revision 1.1.2.1 diff -u -r1.1.2.1 select.c --- select.c 1999/05/22 23:03:08 1.1.2.1 +++ select.c 2000/01/28 12:35:35 @@ -203,6 +203,7 @@ (selection_name, selection_value, device)) { Lisp_Object selection_time, selection_data, prev_value; + struct gcpro gcpro1; CHECK_SYMBOL (selection_name); if (NILP (selection_value)) error ("selection-value may not be nil."); @@ -214,6 +215,8 @@ selection_data = list3 (selection_name, selection_value, Qnil); + GCPRO1 (selection_data); + prev_value = assq_no_quit (selection_name, Vselection_alist); Vselection_alist = Fcons (selection_data, Vselection_alist); @@ -241,6 +244,8 @@ selection_time = Qnil; Fsetcar (XCDR (XCDR (selection_data)), selection_time); + + UNGCPRO; return selection_value; } Index: src/toolbar-msw.c =================================================================== RCS file: /usr/CVSroot/XEmacs/xemacs/src/toolbar-msw.c,v retrieving revision 1.13.2.4 diff -u -r1.13.2.4 toolbar-msw.c --- toolbar-msw.c 1999/08/08 13:50:13 1.13.2.4 +++ toolbar-msw.c 2000/01/28 12:35:37 @@ -586,7 +586,7 @@ } /* map toolbar hwnd to pos*/ -int mswindows_find_toolbar_pos(struct frame* f, HWND ctrl) +static int mswindows_find_toolbar_pos(struct frame* f, HWND ctrl) { int id = GetDlgCtrlID(ctrl); return id ? id - TOOLBAR_ID_BIAS : -1; Index: src/s/cygwin32.h =================================================================== RCS file: /usr/CVSroot/XEmacs/xemacs/src/s/cygwin32.h,v retrieving revision 1.14.2.11 diff -u -r1.14.2.11 cygwin32.h --- cygwin32.h 2000/01/26 12:34:11 1.14.2.11 +++ cygwin32.h 2000/01/28 12:35:39 @@ -127,6 +127,19 @@ #ifndef TCS_VERTICAL #define TCS_VERTICAL 0x0080 #endif +#ifndef PHYSICALWIDTH +#define PHYSICALWIDTH 110 +#endif +#ifndef PHYSICALHEIGHT +#define PHYSICALHEIGHT 111 +#endif +#ifndef PHYSICALOFFSETX +#define PHYSICALOFFSETX 112 +#endif +#ifndef PHYSICALOFFSETY +#define PHYSICALOFFSETY 113 +#endif + #define PBS_SMOOTH 0x01