summaryrefslogtreecommitdiff
path: root/src/nsterm.h
Commit message (Collapse)AuthorAgeFilesLines
* Fix problems found by static checking --with-nsPaul Eggert2016-09-291-18/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is for Fedora 24 when configured with --enable-gcc-warnings. Although it does not fix all the problems, it fixes many of them. * src/frame.c (XParseGeometry): * src/nsterm.m (mouseDown:): Mark locals with UNINIT to pacify --enable-gcc-warnings. * src/image.c (PIX_MASK_DRAW, DefaultDepthOfScreen): Remove unused macros. (slurp_file xbm_scan, xbm_read_bitmap_data, xbm_load_image) (xbm_file_p, xbm_load, xpm_scan, xpm_make_color_table_v) (xpm_put_color_table_v, xpm_get_color_table_v) (xpm_make_color_table_h, xpm_put_color_table_h) (xpm_get_color_table_h, xpm_load_image, xpm_load) (pbm_next_char, pbm_scan_number, pbm_load, svg_load) (svg_load_image): * src/nsfns.m (x_get_string_resource): * src/nsimage.m (ns_image_from_XBM): Fix pointer signedness problems. * src/image.c (xpm_load_image, x_build_heuristic_mask, pbm_load) (imagemagick_load_image): Omit unused locals. * src/nsfns.m (ns_send_types, ns_return_types, ns_drag_types) (Fx_open_connection): * src/nsfont.m (ns_antialias_threshold): Move extern decl to nsterm.h so it can be checked. * src/nsmenu.m (svcsMenu, dockMenu): Move to the only file that uses them, so they can be static. * src/nsterm.h (find_and_call_menu_selection): * src/nsterm.m (x_set_frame_alpha): Omit duplicate decls. * src/nsterm.h (ns_dump_glyphstring): Mark as EXTERNALLY_VISIBLE. * src/nsfns.m (ns_tooltip, ns_display_info_for_name) (ns_set_name_as_filename, x_set_menu_bar_lines) (x_set_tool_bar_lines, x_set_internal_border_width): * src/nsterm.m (ns_drag_types, ns_draw_text_decoration): Now static. * src/nsfns.m (ns_lisp_to_cursor_type, ns_cursor_type_to_lisp): * src/nsterm.m (ns_free_indexed_color, ns_color_to_lisp): Remove; unused. * src/nsfont.m (ns_dump_glyphstring): * src/nsterm.m (hide_bell, ns_get_color, ns_color_to_lisp) (ns_clear_frame, keyDown:): Fix signedness problem with printf arg. * src/nsterm.h (ns_input_events, ns_finish_events): * src/nsterm.m (ns_finish_events, hide_bell): Prototype the decls. * src/nsterm.m (NSMenuDidBeginTrackingNotification): Omit unnecessary decl. (dockMenu): (mainMenu) [NS_IMPL_COCOA]: Now static, and in this file. (ns_dumpglyphs_box_or_relief, changeFont:, initFrameFromEmacs:) (toggleFullScreen:): Use FACE_FROM_ID instead of FACE_FROM_ID_OR_NULL in contexts where the caller expects the result to be non-null. (applicationShouldTerminate:): Fix misleading indentation.
* Fix macOS 12 deprecation noticesAlan Third2016-08-241-0/+41
| | | | | | | | | | | * src/nsterm.h: Add #defines to allow older versions of macOS to use the new constant names. * src/nsmenu.m: Replace old constant names with new. (fillWithWidgetValue): Remove calls to deprecated setMenuChangedMessagesEnabled. * src/nsterm.m: Replace old constant names with new. * src/nsfns.m: Replace old constant names with new.
* Merge from origin/emacs-25Paul Eggert2016-08-051-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | d841a03 ; Spelling fix a6ae479 Post AppDefined events from the main thread ONLY (bug#23934) d35d398 Update to the AUTHORS file for Bob Weiner 4d2f4df Revert "Fix local printer set to left aligned string formatter." cd1b4d6 Revert "Fix ses-delete-blanks to delete only blanks + documen... f7ceb8e Revert "Fix English." baa7abd Improve doc strings of 'gud-gdb' and 'gdb' aa4271a Fix doc string of 'minibuffer-message-timeout' b275cc7 Fix English. 3c97b0f Fix ses-delete-blanks to delete only blanks + documentation. 272391f profiler: document prefix arg for tree expansion 442cc39 Clarify usage of eshell-visual-options b443c3c Fix comment in files-in-below-directory 8a38e94 Fix local printer set to left aligned string formatter. 0f0b191 ; Fix typos in NEWS 6bdf687 ; * etc/NEWS: Remove temporary marks
| * Post AppDefined events from the main thread ONLY (bug#23934)Alan Third2016-08-031-1/+1
| | | | | | | | | | * src/nsterm.h: Make nextappdefined var not just GNUStep. * src/nsterm.c (ns_send_appdefined, sendFromMainThread): Remove GNUStep
* | Rename FACE_OPT_FROM_ID to FACE_FROM_ID_OR_NULLEli Zaretskii2016-07-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/dispextern.h (FACE_FROM_ID_OR_NULL): Renamed from FACE_OPT_FROM_ID; all callers changed. * src/xdisp.c (extend_face_to_end_of_line): Call FACE_FROM_ID, not FACE_FROM_ID_OR_NULL, as the resulting face is immediately dereferenced. (fill_gstring_glyph_string): Call FACE_FROM_ID, not FACE_FROM_ID_OR_NULL, as the resulting face will be dereferenced when the glyph string is drawn. (BUILD_COMPOSITE_GLYPH_STRING): Call FACE_FROM_ID, not FACE_FROM_ID_OR_NULL, as the resulting face will be dereferenced in fill_composite_glyph_string. (calc_line_height_property): Call FACE_FROM_ID_OR_NULL rather that FACE_FROM_ID, since the function and its caller can cope with that situation. Conflate 3 tests of missing face or font into just one. * src/xfaces.c (Fx_list_fonts, Fface_font, lookup_face): Call FACE_FROM_ID_OR_NULL rather that FACE_FROM_ID, since these functions can cope with that situation. (lookup_derived_face): Don't call FACE_FROM_ID if the result will not be used. * src/w32console.c (w32_face_attributes): Remove redundant 'eassert'.
* | Port --enable-gcc-warnings to GCC 6.1Paul Eggert2016-05-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.ac (WERROR_CFLAGS): Omit -Wunused-const-variable=2. * lib-src/etags.c (LOOKING_AT, LOOKING_AT_NOCASE): Omit test whether pointer plus a constant equals a null pointer. * src/alloc.c (compact_small_strings): Avoid pointer arithmetic on null pointers. * src/alloc.c (mark_face_cache): * src/fontset.c (free_realized_fontsets, Fset_fontset_font): * src/fringe.c (draw_fringe_bitmap_1) (Fset_fringe_bitmap_face): * src/macfont.m (macfont_draw): * src/msdos.c (IT_set_face, IT_clear_screen): * src/nsfont.m (nsfont_draw): * src/nsterm.h (FRAME_DEFAULT_FACE): * src/nsterm.m (ns_draw_window_cursor) (ns_draw_vertical_window_border, ns_draw_window_divider) (ns_dumpglyphs_box_or_relief) (ns_maybe_dumpglyphs_background, ns_dumpglyphs_image) (ns_dumpglyphs_stretch): * src/w32term.c (w32_draw_vertical_window_border) (w32_draw_window_divider, x_set_mouse_face_gc): * src/xdisp.c (estimate_mode_line_height, init_iterator) (handle_face_prop, handle_single_display_spec, pop_it) (CHAR_COMPOSED_P, get_next_display_element) (next_element_from_display_vector, extend_face_to_end_of_line) (fill_gstring_glyph_string,BUILD_COMPOSITE_GLYPH_STRING): * src/xfaces.c (Finternal_merge_in_global_face, Fface_font) (lookup_named_face): * src/xterm.c (x_draw_vertical_window_border) (x_draw_window_divider, x_set_mouse_face_gc): Prefer FACE_OPT_FROM_ID to FACE_FROM_ID when the result might be null. * src/xterm.c (try_window_id): Redo loop to convince GCC 6.1 that it is null pointer safe. (x_color_cells): Use eassume as necessary to pacify GCC 6.1. * src/dispextern.h (FACE_FROM_ID, IMAGE_FROM_ID): Now returns non-null. (FACE_OPT_FROM_ID, IMAGE_OPT_FROM_ID): New macro, with the old behavior of the non-_OPT macro, to be used when the result might be a null pointer. * src/dispnew.c (buffer_posn_from_coords, marginal_area_string) [HAVE_WINDOW_SYSTEM]: * src/intervals.h (INTERVAL_WRITABLE_P): * src/term.c (turn_off_face): * src/xdisp.c (get_glyph_face_and_encoding, fill_image_glyph_string) (produce_image_glyph, produce_xwidget_glyph): * src/xfaces.c (lookup_named_face): Remove unnecessary test for null pointer. * src/keyboard.c (read_char): Suppress bogus -Wclobbered warning. * src/process.c (would_block): New function. (server_accept_connection, wait_reading_process_output, send_process): Use it. * src/xdisp.c (get_window_cursor_type, note_mouse_highlight): Prefer IMAGE_OPT_FROM_ID to IMAGE_FROM_ID when the result might be null.
* | Implement horizontal scroll bars on NSAlan Third2016-05-011-1/+3
|/ | | | | | | | | | | | | | | | | | | | | | | | * lisp/scroll-bar.el (horizontal-scroll-bars-available-p): Remove NS check. * lisp/term/ns-win.el: Remove custom NS scroll-bar handlers and bind scroll-bar mouse clicks to standard handlers. * src/nsterm.h (EmacsScroller): Add 'horizontal' property and rename pixel_height to pixel_length. * src/nsterm.m (x_set_window_size): Remove left-hand scroll-bar code. It caused scroll-bars to be over-drawn and the best working solution appears to be complete removal. (ns_set_horizontal_scroll_bar): Rewrite to handle horizontal scrollers correctly. (ns_set_vertical_scroll_bar): Set width to actual scroller width. (setFrame): Handle horizontal case. (dealloc): Handle horizontal case. (judge): Handle horizontal case. (setPosition): Rename pixel_height to pixel_length. (sendScrollEventAtLoc): Handle horizontal case. (mouseDown): Handle horizontal case and general tidy up of code. (mouseDragged): Handle horizontal case. Call sendScrollEventAtLoc with absolute pixel size instead of ratio. * src/window.h: Remove NS check.
* Rework C source files to avoid ^(Paul Eggert2016-03-101-6/+6
| | | | | | | | Work around Bug#22884 by rewording comments and strings to avoid ‘(’ at the start of a line unless it starts a function. This change is a short-term hack; in the longer run we plan to fix cc-mode’s performance for C files that have ‘(’ at the start of a line in a comment or string.
* Set locale when run from OS X GUIAlan Third2016-02-101-0/+2
| | | | | | * src/emacs.c (main): Call ns_init_locale. * src/nsterm.m (ns_init_locale): Get locale from OS and set LANG. * src/nsterm.h: Include ns_init_locale.
* Update copyright year to 2016Paul Eggert2016-01-011-1/+1
| | | | Run admin/update-copyright.
* Spelling and grammar fixesPaul Eggert2015-11-291-1/+1
|
* Enhance NSTRACE (trace output for NextStep).Anders Lindgren2015-11-151-56/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Trace can be disabled for groups of functions. By default, event functions and functions that generate lots of output are disabled. Trace output of Objective-C functions now use the "[ClassName parameter:]" form. * src/nsterm.h (NSTRACE_ALL_GROUPS, NSTRACE_GROUP_EVENTS) (NSTRACE_GROUP_UPDATES, NSTRACE_GROUP_FRINGE, NSTRACE_GROUP_COLOR) (NSTRACE_GROUP_GLYPHS, NSTRACE_GROUP_FOCUS): New macros, controlling in which function groups trace should be active. (NSTRACE_WHEN): Support for silencing a function, this also silencing all called functions. (NSTRACE_UNSILENCE): New macro, used to re-enable trace. (NSTRACE_FMT_FSTYPE, NSTRACE_ARG_FSTYPE): New macros, used to print the full screen state in NSTRACE functions. * src/nsterm.m (nstrace_depth, nstrace_num): Made volatile as they can be accessed from multiple threads. (nstrace_enabled_global): New variable, when FALSE, trace is silenced. (nstrace_restore_global_trace_state): New function, used to restore `nstrace_enabled_global' at end of block. ([EmacsView setFrame:], [EmacsWindow setFrame:display:]) ([EmacsWindow setFrame:display:animation:]) ([EmacsWindow setFrameTopLeftPoint:]): New functions, print trace and call corresponding super function. (Many functions): Add or enhance trace output. * src/nsimage.m (ns_image_from_file): Enhanced trace output. * src/nsfns.m (x_set_tool_bar_lines): Add trace output. * src/nsmenu.m ([EmacsToolbar setVisible:]): New function, print trace and call corresponding super function.
* Fixed OS X 10.6.8 build issue (bug#21862).Anders Lindgren2015-11-151-0/+7
| | | | | | | | | | | | * src/nsterm.h (EmacsView): Add missing declarations. * src/nsterm.m ([EmacsView windowDidBecomeKey]): New method, like the standard method but without the notification parameter. Intended to be used for direct calls. ([EmacsView windowDidEnterFullScreen]): Call the non-notification version of `windowDidBecomeKey'. Made the notification method call the non-notification method instead of the vice versa. (NSWindowDidEnterFullScreenNotification): Deleted, no longer needed.
* Spelling fixesPaul Eggert2015-11-101-2/+2
| | | | | * lisp/net/soap-inspect.el (soap-inspect-xs-simple-type): Fix misspelling in output.
* Fix incorrect NextStep tool-bar-mode -- wrong number of rows in frame.Anders Lindgren2015-10-281-2/+8
| | | | | | | | | | | | | | | | | | | | * nsterm.h (struct ns_output): New flag, in_animation. * nsfns.m (Fx_create_frame): Initialize in_animation flag. * nsmenu.m (free_frame_tool_bar, update_frame_tool_bar): Set in_animation flag around call to "setVisible". Set new tool bar height before call to setVisible. * nsterm.m (x_set_window_size): Don't call [view setRow: andColumns:] as this fools the subsequent call to updateFrameSize from performing the real resize. (windowDidResize): Don't update anything when in_animation is non-zero. Trace output. * nsmenu.m (free_frame_tool_bar, update_frame_tool_bar) (EmacsToolbar): * nsterm.m (x_set_window_size, updateFrameSize) ([EmacsView setRows: andColumns:])
* NextSten maximization and NSTRACE rewrite.Anders Lindgren2015-10-231-0/+235
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Full-height, full-width, and maximized windows now cover the entire screen (except the menu bar), including the part where the system dock is placed. The system zoom animation is no longer used. Made NonMaximized->FullWidth->FullHeight->NonMaximized restore the original size. * nsterm.m (ns_menu_bar_height): New function, return height of the menu bar, or 0 when it's hidden. * nsterm.m (constrain_frame_rect): New function for constraining a frame. * nsterm.m (ns_constrain_all_frames): Set frame size explicitly rather than relying on the system doing it for us by writing back the current frame size. * nsterm.m (windowWillUseStandardFrame): Register non-maximized width or height as new user size. When entering full width or height, the other size component is taken from the user size. * nsterm.m (fullscreenState): New method for accessing the fullscreen state. * nsterm.m (constrainFrameRect): Restrict frame to be placed under the menu bar, if present. The old version, sometimes, restricted the height of a frame to the screen, this version never does this. * nsterm.m (zoom): Perform zoom by setting the frame to the full size of the screen (minus the menu bar). The default system function, with the zoom animation, is no longer used, as the final frame size doesn't cover the entire screen. Rework how to constrain resizing to the character grid. The old system used "resizeIncrements" in NSWindows. However, once a frame was resized so that it was not aligned to the text grid, it remained unaligned even after a resize. In addition, it conflicted when resizing a fullheight window. * nsterm.m (windowWillResize): Restrict frame size to text grid, unless when pixelwise frame resizing is enabled. * nsterm.m (updateFrameSize, initFrameFromEmacs) (toggleFullScreen, handleFS): Don't set resizeIncrements. Redesign the NS trace system. The call structure is represented using indentations and vertical lines. The NSTRACE macro accepts printf-style arguments. New macros for printing various information. * nsterm.h (NSTRACE_ENABLED): Macro to enable trace system. * nsterm.h (NSTRACE, NSTRACE_WHEN, NSTRACE_UNLESS): Macros to start a new block (typically a function), accept printf-style arguments. * nsterm.h (NSTRACE_MSG): Macro for extra information, accepts printf-style arguments. * nsterm.h (NSTRACE_what): Macros for printing various types. * nsterm.h (NSTRACE_FMT_what): Macro with printf format string snippets. * nsterm.h (NSTRACE_ARG_what): Macros for passing printf-style arguments, corresponds to NSTRACE_FMT_what. * nsterm.h (NSTRACE_RETURN): Macro to print return value, accept printf-style arguments. * nsterm.h (NSTRACE_RETURN_what): Macros to print return value for various types. * nsterm.m: Remove old NSTRACE macro. * nsterm.m (nstrace_num): Trace counter. * nsterm.m (nstrace_depth): Current call depth. * nsterm.m (nstrace_leave): NSTRACE support function, called when the local variable "nstrace_enabled" goes out of scope using the "cleanup" extension. * nsterm.m (ns_print_fullscreen_type_name): NSTRACE_FSTYPE support function. * nsterm.m (constrain_frame_rect, ns_constrain_all_frames) (ns_update_auto_hide_menu_bar, ns_update_begin) (ns_update_window_begin, update_window_end, ns_update_end) (ns_focus, ns_unfocus, ns_ring_bell, ns_frame_raise_lower) (ns_frame_rehighlight, x_make_frame_visible) (x_make_frame_invisible, x_iconify_frame, x_free_frame_resources) (x_destroy_window, x_set_offset, x_set_window_size) (ns_fullscreen_hook, ns_lisp_to_color, ns_color_to_lisp) (ns_defined_color, frame_set_mouse_pixel_position) (note_mouse_movement, ns_mouse_position, ns_frame_up_to_date) (ns_define_frame_cursor, x_get_keysym_name, ns_redraw_scroll_bars) (ns_clear_frame, ns_clear_frame_area, ns_scroll_run) (ns_after_update_window_line, ns_shift_glyphs_for_insert) (dumpcursor, ns_draw_vertical_window_border) (ns_draw_window_divider, ns_draw_relief) (ns_dumpglyphs_box_or_relief, ns_maybe_dumpglyphs_background) (ns_dumpglyphs_image, ns_draw_glyph_string, ns_send_appdefined) (ns_read_socket, ns_select, ns_set_vertical_scroll_bar) (ns_set_horizontal_scroll_bar, ns_condemn_scroll_bars) (ns_redeem_scroll_bar, ns_judge_scroll_bars, ns_delete_terminal) (ns_create_terminal, ns_term_init, sendEvent) (applicationDidFinishLaunching, applicationDidBecomeActive) (timeout_handler, fd_handler, EmacsView_dealloc, changeFont) (acceptsFirstResponder, resetCursorRects, keyDown, mouseDown) (deltaIsZero, rightMouseDown, otherMouseDown, mouseUp) (rightMouseUp, otherMouseUp, scrollWheel, mouseMoved) (mouse_autoselect_window, in_window, mouseDragged) (rightMouseDragged, otherMouseDragged, windowShouldClose) (updateFrameSize, windowWillResize, windowDidResize) (windowDidBecomeKey, windowDidResignKey, windowWillMiniaturize) (initFrameFromEmacs, windowDidMove, windowDidDeminiaturize) (windowDidExpose, windowDidMiniaturize, windowWillEnterFullScreen) (windowDidEnterFullScreen, windowWillExitFullScreen) (windowDidExitFullScreen, toggleFullScreen, handleFS, setFSValue) (mouseEntered, mouseExited, menuDown, toolbarClicked, drawRect) (draggingEntered, performDragOperation, validRequestorForSendType) (setMiniwindowImage, constrainFrameRect, performZoom, zoom) (EmacsScroller_initFrame, EmacsScroller_setFrame) (EmacsScroller_dealloc, condemn, reprieve, judge) (resetCursorRects, setPosition, EmacsScroller_mouseDown) (EmacsScroller_mouseDragged, syms_of_nsterm): Use new trace system. * nsfns.m: Remove old NSTRACE macro. * nsfns.m (x_set_icon_name, ns_set_name, x_explicitly_set_name) (x_implicitly_set_name, x_set_title, ns_set_name_as_filename) (ns_implicitly_set_icon_type, x_set_icon_type): Use new trace system. * nsimage.m: Remove old NSTRACE macro. * nsimage.m (ns_image_from_XBM, ns_image_for_XPM) (ns_image_from_bitmap_file, ns_load_image): Use new trace system. * nsmenu.m: Remove old NSTRACE macro. * nsmenu.m (ns_update_menubar, ns_menu_show, ns_popup_dialog): Use new trace system.
* Fix warnings on OSX 10.10.Jan Djärv2015-05-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | * nsfns.m (MODAL_OK_RESPONSE): New define for different OSX versions. (Fns_read_file_name): Check against MODAL_OK_RESPONSE. (compute_tip_xy): Use convertRectToScreen for OSX >= 10.7 * nsmenu.m (initWithContentRect:styleMask:backing:defer:) * nsimage.m (allocInitFromFile, setPixmapData): Only call setScalesWhenResized for OSX < 10.6. * nsterm.h (EmacsScroller): Declare scrollerWidth. * nsterm.m (ns_copy_bits): New function that does not use deprecated NSCopyBits. (ns_scroll_run, ns_shift_glyphs_for_insert): Call ns_copy_bits. (runAlertPanel): New function. (applicationShouldTerminate:): Call runAlertPanel. (initFrameFromEmacs, toggleFullScreen:): Only call useOptimizedDrawing for OSX < 10.10. (initFrameFromEmacs:): Only call allocateGState for OSX < 10.10. (windowWillUseStandardFrame:defaultFrame:): Cast arg to abs to int. (draggingEntered:): Returns NSDragOperation. (scrollerWidth): Use scrollerWidthForControlSize for OSX >= 10.7.
* Honor :fore/background for XBM on NS (Bug#14969).Jan Djärv2015-05-151-4/+4
| | | | | | | | | | | | | | | | | | | | | * nsterm.h (EmacsImage): Add xbm_fg, remove initFromSkipXBM, initFromXBM takes bg, fg args, remove flip arg. (ns_image_from_XBM): Add bg, fg args. * image.c (x_create_bitmap_from_data) (Create_Pixmap_From_Bitmap_Data): ns_image_from_XBM takes bg, fg args. * nsimage.m (ns_image_from_XBM): Add fg, bg args, pass to initFromXBM. Remove flip arg. (initFromSkipXBM): Move code to initFromXBM. (initFromXBM): Actually set fg and bg, instead of playing alpha games. Use fg, bg from args (Bug#14969). Remove if (length) section, was always false. Remove bit flipping (bitPat, swt), generated incorrect images when width/height wasn't a multiple of 8. (setXBMColor:): Modify planes by comparing to saved xbm_fg. * nsterm.m (ns_draw_fringe_bitmap): initFromXBM takes fg, bg args, remove flip arg.
* Compute C decls for DEFSYMs automaticallyPaul Eggert2015-01-051-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes Bug#15880. This patch also makes Q constants (e.g., Qnil) constant addresses from the C point of view. * make-docfile.c: Revamp to generate table of symbols, too. Include <stdbool.h>. (xstrdup): New function. (main): Don't process the same file twice. (SYMBOL): New constant in enum global_type. (struct symbol): Turn 'value' member into a union, either v.value for int or v.svalue for string. All uses changed. (add_global): New arg svalue, which overrides value, so that globals can have a string value. (close_emacs_global): New arg num_symbols; all uses changed. Output lispsym decl. (write_globals): Output symbol globals too. Output more ATTRIBUTE_CONST, now that Qnil etc. are C constants. Output defsym_name table. (scan_c_file): Move most of guts into ... (scan_c_stream): ... new function. Scan for DEFSYMs and record symbols found. Don't read past EOF if file doesn't end in newline. * alloc.c, bidi.c, buffer.c, bytecode.c, callint.c, casefiddle: * casetab.c, category.c, ccl.c, charset.c, chartab.c, cmds.c, coding.c: * composite.c, data.c, dbusbind.c, decompress.c, dired.c, dispnew.c: * doc.c, editfns.c, emacs.c, eval.c, fileio.c, fns.c, font.c, fontset.c: * frame.c, fringe.c, ftfont.c, ftxfont.c, gfilenotify.c, gnutls.c: * image.c, inotify.c, insdel.c, keyboard.c, keymap.c, lread.c: * macfont.m, macros.c, minibuf.c, nsfns.m, nsfont.m, nsimage.m: * nsmenu.m, nsselect.m, nsterm.m, print.c, process.c, profiler.c: * search.c, sound.c, syntax.c, term.c, terminal.c, textprop.c, undo.c: * window.c, xdisp.c, xfaces.c, xfns.c, xftfont.c, xmenu.c, xml.c: * xselect.c, xsettings.c, xterm.c: Remove Q vars that represent symbols (e.g., Qnil, Qt, Qemacs). These names are now defined automatically by make-docfile. * alloc.c (init_symbol): New function. (Fmake_symbol): Use it. (c_symbol_p): New function. (valid_lisp_object_p, purecopy): Use it. * alloc.c (marked_pinned_symbols): Use make_lisp_symbol instead of make_lisp_ptr. (garbage_collect_1): Mark lispsym symbols. (CHECK_ALLOCATED_AND_LIVE_SYMBOL): New macro. (mark_object): Use it. (sweep_symbols): Sweep lispsym symbols. (symbol_uses_obj): New function. (which_symbols): Use it. Work for lispsym symbols, too. (init_alloc_once): Initialize Vpurify_flag here; no need to wait, since Qt's address is already known now. (syms_of_alloc): Add lispsym count to symbols_consed. * buffer.c (init_buffer_once): Compare to Qnil, not to make_number (0), when testing whether storage is all bits zero. * dispextern (struct image_type): * font.c (font_property_table): * frame.c (struct frame_parm_table, frame_parms): * keyboard.c (scroll_bar_parts, struct event_head): * xdisp.c (struct props): Use XSYMBOL_INIT (Qfoo) and struct Lisp_Symbol * rather than &Qfoo and Lisp_Object *, since Qfoo is no longer an object whose address can be taken. All uses changed. * eval.c (run_hook): New function. Most uses of Frun_hooks changed to use it, so that they no longer need to take the address of a Lisp sym. (syms_of_eval): Don't use DEFSYM on Vrun_hooks, as it's a variable. * frame.c (syms_of_frame): Add defsyms for the frame_parms table. * keyboard.c (syms_of_keyboard): Don't DEFSYM Qmenu_bar here. DEFSYM Qdeactivate_mark before the corresponding var. * keymap.c (syms_of_keymap): Use DEFSYM for Qmenu_bar and Qmode_line instead of interning their symbols; this avoids duplicates. (LISP_INITIALLY, TAG_PTR) (DEFINE_LISP_SYMBOL_BEGIN, DEFINE_LISP_SYMBOL_END, XSYMBOL_INIT): New macros. (LISP_INITIALLY_ZERO): Use it. (enum symbol_interned, enum symbol_redirect, struct Lisp_Symbol) (EXFUN, DEFUN_ARGS_MANY, DEFUN_ARGS_UNEVALLED, DEFUN_ARGS_*): Move decls up, to avoid forward uses. Include globals.h earlier, too. (make_lisp_symbol): New function. (XSETSYMBOL): Use it. (DEFSYM): Now just a placeholder for make-docfile. * lread.c (DEFINE_SYMBOLS): Define, for globals.h. (intern_sym): New function, with body taken from old intern_driver. (intern_driver): Use it. Last arg is now Lisp integer, not ptrdiff_t. All uses changed. (define_symbol): New function. (init_obarray): Define the C symbols taken from lispsym. Use plain DEFSYM for Qt and Qnil. * syntax.c (init_syntax_once): No need to worry about Qchar_table_extra_slots.
* Update copyright year to 2015Paul Eggert2015-01-011-1/+1
| | | | Run admin/update-copyright.
* Merge from emacs-24Stefan Monnier2014-12-051-1/+5
|\
| * More flicker fixes for OSX, related to bug 18757.Jan Djärv2014-12-021-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | * nsfns.m (ns_set_name_as_filename): Don't set represented filename at once, call ns_set_represented_filename instead. * nsterm.h: Declare ns_set_represented_filename. * nsterm.m (represented_filename, represented_frame): New variables. (ns_set_represented_filename): New function. (sendEvent:): Set represented filename here to avoid flicker, related to Bug#18757.
* | Merge from emacs-24; up to 117698Glenn Morris2014-11-091-1/+1
|\ \ | |/
| * * nsterm.h (EmacsScroller): judge returns bool.Jan Djärv2014-11-091-1/+1
| | | | | | | | | | | | | | | | | | * nsterm.m (ns_set_vertical_scroll_bar): Release bar. (ns_judge_scroll_bars): Only set removed if judge returns true. (judge): Returns bool == condemned. Remove self from window. (setPosition:portion:whole:): Remove raise SIGIO. Fixes: debbugs:18757
| * Attempt to fix NS hang. Will probably cause merge conflicts.Jan Djärv2014-11-081-1/+1
| | | | | | | | | | | | | | | | * nsterm.m (init): Replace OSX 10.9 check with IMPL_COCOA. (run): Ditto. Only use non-system event loop if OSX version is exactly 10.9. Fixes: debbugs:18993
* | * nsimage.m (ImageList, imageListNext, imageListSetNext:)Jan Djärv2014-11-021-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | (reference): Remove. (allocInitFromFile:): Remove searching ImageList and calling reference. (dealloc): Remove handling if ImageList. * nsterm.h (EmacsImage): Remove imageListNext, refCount, reference, imageListSetNext, imageListNext. Fixes: debbugs:18918
* | Merge from emacs-24; up to 117656Glenn Morris2014-11-011-6/+4
|\ \ | |/
| * * nsfns.m (ns_set_doc_edited): Do all logic (check frames) hereJan Djärv2014-10-301-1/+1
| | | | | | | | | | | | | | | | | | instead of in xdisp.c, function now takes void. * nsterm.h (ns_set_doc_edited): Declare taking no args. * xdisp.c (prepare_menu_bars): Remove HAVE_NS code. (redisplay_internal): Call ns_set_doc_edited if HAVE_NS (Bug#18884).
| * * nsfns.m (x_icon): icon_top/left is int.Jan Djärv2014-10-301-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * nsterm.h (EmacsScroller): Replace Lisp_Object win with struct window*. Remove getMouseMotionPart. (ns_output): Make icon_top/left int. * nsterm.m (ns_mouse_position): Remove unused code. (initFrame:window:, dealloc): Use window instead of win. (getMouseMotionPart:window:x:y:): Remove, unused. (sendScrollEventAtLoc:fromEvent:): Make Lisp_Object win from window. Fixes: debbugs:18889
* | Require OSX >= 10.6. Remove PowerPC unexec code.Jan Djärv2014-10-121-24/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.ac: Require OSX 10.6. Remove NSInteger test, use nsfont for Gnustep, macfont for OSX. * etc/NEWS: OSX required is 10.6 or newer. * src/Makefile.in: Replace nsfont.o macfont.o with ns_fontfile in comment. * src/macfont.h (MAC_FONT_FORMAT_ATTRIBUTE, MAC_FONT_FORMAT_BITMAP) (mac_font_copy_non_synthetic_table): Remove versions for OSX < 10.6 * src/nsfns.m: Always include src/macfont.h on COCOA. (ns_filename_from_panel, ns_directory_from_panel) (Fx_create_frame, Fns_popup_font_panel, ns_run_file_dialog) (Fns_read_file_name, Fns_list_services): Remove code for OSX < 10.6 * src/nsterm.m: Always include src/macfont.h on COCOA. (ns_update_auto_hide_menu_bar, ns_draw_fringe_bitmap) (ns_dumpglyphs_image, ns_check_menu_open) (applicationDidFinishLaunching) (antialiasThresholdDidChange:) (keyDown:, toggleFullScreen:, setPosition:portion:whole:): Remove checks for OSX <= 10.5/10.6. (changeFont:): Use macfont on COCOA, nsfont on GNUSTEP. (syms_of_nsterm): Call syms_of_macfont on COCOA, syms_of_nsfont on GNUSTEP. * src/macfont.m: Remove >= 1050 check. (macfont_create_family_with_symbol) (macfont_get_glyph_for_character) (mac_font_get_glyphs_for_variants) (mac_ctfont_create_available_families, syms_of_macfont): Remove code for OSX < 10.6. (mac_font_family_group, mac_font_family_compare): Remove, only used for OSX < 10.6. * src/nsimage.m (allocInitFromFile:): Remove code for OSX < 10.6. * src/nsmenu.m (NSMenuDidBeginTrackingNotification): Remove. (x_activate_menubar, trackingNotification:): Remove check for OSX >= 10.5. (menuNeedsUpdate:): Remove check for OSX < 10.5. * src/nsterm.h (MAC_OS_X_VERSION_10_4, MAC_OS_X_VERSION_10_5): Remove. (NS_HAVE_NSINTEGER): Remove block. Remove >= OSX 10.6 tests. * src/unexmacosx.c: Remove include ppc/reloc.h. (unrelocate, copy_dysymtab): Remove PPC code. (rebase_reloc_address): Remove, only used for PPC:
* | * termhooks.h (enum scroll_bar_part): Begin from 0 to allow...Dmitry Antipov2014-09-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (struct input_event): ...unsigned bitfields. Likewise for `event_kind' member. Prefer unsigned for `code' and 'modifiers'. Use `timestamp' for HELP_EVENT position. Add compile-time assert. * keyboard.c (gen_help_event, kbd_buffer_store_help_event) (kbd_buffer_get_event): Adjust users. (scroll_bar_parts): Add Qnil to match scroll_bar_nowhere. (make_scroll_bar_position): New function, refactored out of... (make_lispy_event): ...adjusted user. * nsterm.h (EmacsScroller): Use enum for `last_hit_part' member. * nsterm.m (ns_mouse_position, mouseUp): * term.c (term_mouse_position): * w32inevt.c (w32_console_mouse_position): * w32term.c (w32_mouse_position): * xterm.c (XTmouse_position): Use scroll_bar_above_handle. (x_send_scroll_bar_event, xm_scroll_callback, xg_scroll_callback): Prefer enum and explicit enum members to integers and numeric values.
* | Complete pixelwise frame/window resizing, add horizontal scrollbar support.Martin Rudalics2014-07-271-8/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * frame.el (frame-notice-user-settings): Rewrite using frame-initial-frame-tool-bar-height. * menu-bar.el (menu-bar-horizontal-scroll-bar) (menu-bar-no-horizontal-scroll-bar): New functions. (menu-bar-showhide-scroll-bar-menu): Add bindings for horizontal scroll bars. * scroll-bar.el (scroll-bar-lines) (set-horizontal-scroll-bar-mode) (get-horizontal-scroll-bar-mode, horizontal-scroll-bar-mode) (scroll-bar-horizontal-drag-1, scroll-bar-horizontal-drag) (scroll-bar-toolkit-horizontal-scroll): New functions. (horizontal-scroll-bar-mode) (previous-horizontal-scroll-bar-mode) (horizontal-scroll-bar-mode-explicit): New variables. (horizontal-scroll-bar-mode): New option. (toggle-horizontal-scroll-bar): Do something. (top-level): Bind horizontal-scroll-bar mouse-1. * startup.el (tool-bar-originally-present): Remove variable. (command-line): Don't set tool-bar-originally-present. * window.el (window-min-height): Update doc-string. (window--dump-frame): Dump horizontal scroll bar values. (window--min-size-1): Handle minibuffer window separately. Count in margins and horizontal scroll bar. Return safe value iff IGNORE equals 'safe. (frame-windows-min-size): New function (used by frame resizing routines). (fit-frame-to-buffer, fit-window-to-buffer): Count in horizontal scroll bars. (window--sanitize-window-sizes): New function. (window-split-min-size): Remove. (split-window): Count divider-width. Don't use `window-split-min-size' any more. Reword error messages. Sanitize windows sizes after splitting. * buffer.h (struct buffer): New fields scroll_bar_height and horizontal_scroll_bar_type. * buffer.c (bset_scroll_bar_height) (bset_horizontal_scroll_bar_type): New functions. (Fbuffer_swap_text): Handle old_pointm field. (init_buffer_once): Set defaults for scroll_bar_height and horizontal_scroll_bar_type. (syms_of_buffer): New variables scroll_bar_height and horizontal_scroll_bar_type. * dispextern.h (window_part): Rename ON_SCROLL_BAR to ON_VERTICAL_SCROLL_BAR. Add ON_HORIZONTAL_SCROLL_BAR. (set_vertical_scroll_bar): Remove prototype. (x_change_tool_bar_height): Add prototype. * dispnew.c (adjust_frame_glyphs_for_frame_redisplay) (window_to_frame_vpos, update_frame_1, scrolling, init_display): Use FRAME_TOTAL_COLS and FRAME_TOTAL_LINES instead of FRAME_COLS and FRAME_LINES. (adjust_frame_glyphs_for_window_redisplay): Rearrange lines. (update_window): Start mode_line_row->y after horizontal scroll bar. (change_frame_size_1): Call adjust_frame_size. (init_display): When changing the size of a tty frame do not pass height of menu bar. (Qframe_windows_min_size): New symbol. * frame.h (struct frame): List tool bar fields after menu bar fields. Add official, total_lines, horizontal_scroll_bars, config_scroll_bar_height and config_scroll_bar_lines fields. (FRAME_HAS_HORIZONTAL_SCROLL_BARS) (FRAME_CONFIG_SCROLL_BAR_HEIGHT, FRAME_CONFIG_SCROLL_BAR_LINES) (FRAME_SCROLL_BAR_AREA_HEIGHT, FRAME_SCROLL_BAR_COLS) (FRAME_SCROLL_BAR_LINES, FRAME_TOTAL_LINES, SET_FRAME_LINES) (FRAME_WINDOWS_HEIGHT): New macros. (SET_FRAME_HEIGHT, FRAME_TEXT_LINES_TO_PIXEL_HEIGHT) (FRAME_PIXEL_Y_TO_LINE, FRAME_PIXEL_HEIGHT_TO_TEXT_LINES) (FRAME_TEXT_TO_PIXEL_HEIGHT): Separately count top margin and horizontal scroll bar. (frame_inhibit_resize, adjust_frame_size) (frame_windows_min_size): Add declarations. (Qscroll_bar_height, Qhorizontal_scroll_bars) (x_set_scroll_bar_default_height, x_set_left_fringe) (x_set_right_fringe, x_set_vertical_scroll_bars) (x_set_horizontal_scroll_bars, x_set_scroll_bar_width) (x_set_scroll_bar_height): Add external declarations. * frame.c: (frame_inhibit_resize, frame_windows_min_size) (adjust_frame_size): New functions. (make_frame): Initial horizontal_scroll_bars field. Use SET_FRAME_LINES. Don't allow horizontal scroll bar in minibuffer window. (make_initial_frame, make_terminal_frame): No horizontal scroll bar in initial and terminal frames. Use adjust_frame_size. (Fframe_total_cols): Fix doc-string. (Fframe_total_lines, Fscroll_bar_height): New Lisp functions. (Fset_frame_height, Fset_frame_width, Fset_frame_size): Rewrite using adjust_frame_size. (Qscroll_bar_height, Qhorizontal_scroll_bars) (Qframe_windows_min_size): New symbols. (x_set_frame_parameters): Remove call of check_frame_size. (x_report_frame_params): Return scroll_bar_height value. (x_set_left_fringe, x_set_right_fringe): New functions. (adjust_frame_height, x_set_internal_border_width) (x_set_fringe_width): Remove. (x_set_internal_border_width, x_set_vertical_scroll_bars) (x_set_scroll_bar_width, x_set_right_divider_width) (x_set_bottom_divider_width): Rewrite using adjust_frame_size. (x_set_horizontal_scroll_bars, x_set_scroll_bar_height): New functions. (x_figure_window_size): Rewrite to make frame display the expected number of lines. (Vdefault_frame_scroll_bars): Rewrite doc-string. (Vdefault_frame_horizontal_scroll_bars) (Vframe_initial_frame_tool_bar_height) (frame_inhibit_implied_resize): New variables. * fringe.c (compute_fringe_widths): Remove. * gtkutil.h (YG_SB_MIN, YG_SB_MAX, YG_SB_RANGE): Define. (xg_create_horizontal_scroll_bar) (xg_update_horizontal_scrollbar_pos) (xg_set_toolkit_horizontal_scroll_bar_thumb) (xg_get_default_scrollbar_height) (xg_clear_under_internal_border): Extern. * gtkutil.c (xg_frame_resized): Don't call do_pending_window_change. (xg_frame_set_char_size): Use adjust_frame_size. (style_changed_cb): Call update_theme_scrollbar_height and x_set_scroll_bar_default_height. (x_wm_set_size_hint): Don't call check_frame_size. (update_theme_scrollbar_height) (xg_get_default_scrollbar_height) (xg_create_horizontal_scroll_bar) (xg_update_horizontal_scrollbar_pos) (xg_set_toolkit_horizontal_scroll_bar_thumb): New functions. (xg_create_scroll_bar): Set horizontal slot of bar. (xg_initialize): Call update_theme_scrollbar_height. (xg_clear_under_internal_border): No more static. * insdel.c (adjust_suspend_auto_hscroll): New function. (adjust_markers_for_delete, adjust_markers_for_insert) (adjust_markers_for_replace): Call adjust_suspend_auto_hscroll. * keyboard.c (readable_events, discard_mouse_events) (make_lispy_event): Handle horizontal scroll bar click events. (Fsuspend_emacs): When changing the size of a tty frame do not pass height of menu bar. (Qbefore_handle, Qhorizontal_handle, Qafter_handle, Qleft) (Qright, Qleftmost, Qrightmost): New symbols. * menu.c (Fx_popup_dialog): Use FRAME_TOTAL_LINES instead of FRAME_LINES. * minibuf.c (read_minibuf): Initialize suspend_auto_hscroll. * nsfns.m (x_set_internal_border_width): New function. * nsterm.m (ns_draw_fringe_bitmap, ns_set_vertical_scroll_bar): Remove extended fringe code. (x_set_window_size, x_new_font): Don't call compute_fringe_widths. * term.c (Fresume_tty): When changing the size of a tty frame do not pass height of menu bar. (clear_tty_hooks, set_tty_hooks): Clear horizontal_scroll_bar_hook. (init_tty): Frame has no horizontal scroll bars. * termhooks.h (enum scroll_bar_part): Add scroll_bar_move_ratio, scroll_bar_before_handle, scroll_bar_horizontal_handle, scroll_bar_after_handle, scroll_bar_left_arrow, scroll_bar_right_arrow, scroll_bar_to_leftmost and scroll_bar_to_rightmost entries. (enum event_kind): Add HORIZONTAL_SCROLL_BAR_CLICK_EVENT (struct terminal): Add set_horizontal_scroll_bar_hook. * w32console.c (initialize_w32_display): Clear horizontal_scroll_bar_hook. * w32fns.c (x_set_mouse_color): Use FRAME_W32_DISPLAY instead of FRAME_X_DISPLAY. (x_clear_under_internal_border, x_set_internal_border_width): New functions. (x_set_menu_bar_lines): Rewrite using frame_inhibit_resize. Set windows_or_buffers_changed when adding the menu bar. (x_set_tool_bar_lines): Rewrite using adjust_frame_size. (x_change_tool_bar_height, x_set_scroll_bar_default_height) (w32_createhscrollbar): New functions. (w32_createscrollbar): Rename to w32_createvscrollbar. (w32_createwindow): Init WND_HSCROLLBAR_INDEX. (w32_name_of_message): Replace WM_EMACS_CREATESCROLLBAR by WM_EMACS_CREATEVSCROLLBAR and WM_EMACS_CREATEHSCROLLBAR. Add WM_EMACS_SHOWCURSOR. (w32_wnd_proc): Handle WM_HSCROLL case. In WM_WINDOWPOSCHANGING case do not artificially impose WM size hints. Handle WM_EMACS_SHOWCURSOR case. Replace WM_EMACS_CREATESCROLLBAR case by WM_EMACS_CREATEVSCROLLBAR and WM_EMACS_CREATEHSCROLLBAR cases. (my_create_tip_window): Replace WND_SCROLLBAR_INDEX by WND_VSCROLLBAR_INDEX and WND_HSCROLLBAR_INDEX. (unwind_create_frame_1): Remove. (Fx_create_frame): Make both scrollbars the system standard width and height. Use official field of frame structure to inhibit running window-configuration-change-hook. (x_create_tip_frame): Call SET_FRAME_LINES and change_frame_size pixelwise. Handle frame's official field. (w32_frame_parm_handlers): Remove x_set_fringe_width entries. Add x_set_scroll_bar_height, x_set_horizontal_scroll_bars, x_set_left_fringe and x_set_right_fringe. * w32inevt.c (resize_event, maybe_generate_resize_event): Do not pass height of menu bar to change_frame_size. * w32menu.c (set_frame_menubar): Rewrite using frame_inhibit_resize. * w32term.h (struct w32_display_info): Add horizontal_scroll_bar_cursor and cursor_display_counter. (struct scroll_bar): Add horizontal. (HORIZONTAL_SCROLL_BAR_INSIDE_HEIGHT) (HORIZONTAL_SCROLL_BAR_LEFT_RANGE) (HORIZONTAL_SCROLL_BAR_INSIDE_WIDTH) (HORIZONTAL_SCROLL_BAR_LEFT_BORDER) (HORIZONTAL_SCROLL_BAR_RIGHT_BORDER) (HORIZONTAL_SCROLL_BAR_TOP_BORDER) (HORIZONTAL_SCROLL_BAR_BOTTOM_BORDER) (HORIZONTAL_SCROLL_BAR_MIN_HANDLE): New macros. (WM_EMACS_CREATEVSCROLLBAR, WM_EMACS_CREATEHSCROLLBAR): Define instead of WM_EMACS_CREATESCROLLBAR. (WND_VSCROLLBAR_INDEX, WND_HSCROLLBAR_INDEX): Define instead of WND_SCROLLBAR_INDEX. * w32term.c (horizontal_scroll_bar_min_handle) (horizontal_scroll_bar_left_border) (horizontal_scroll_bar_right_border): New integers. (x_set_frame_alpha): Replace x_highlight_frame by w32_focus_frame. (x_window_to_scroll_bar): New argument "type". Update callers accordingly. (w32_set_horizontal_scroll_bar_thumb) (x_horizontal_scroll_bar_report_motion) (w32_set_horizontal_scroll_bar) (w32_horizontal_scroll_bar_handle_click) (x_horizontal_scroll_bar_report_motion): New functions. (w32_mouse_position): Discriminate horizontal and vertical scrollbar cases. (my_create_scrollbar): Replace with two new functions my_create_vscrollbar and my_create_hscrollbar. (x_scroll_bar_create): New argument "horizontal". Update callers accordingly. (x_scroll_bar_remove, w32_condemn_scroll_bars) (w32_redeem_scroll_bar, x_scroll_bar_clear): Handle horizontal scroll bar case. (w32_read_socket): Handle WM_HSCROLL cae. (x_new_font): Don't recompute fringe widths. Use frame_inhibit_resize. Calculate new menu bar height iff we build without toolkit. Always clear under internal border. (x_set_window_size): Don't check frame size or recompute fringes. Reset fullscreen status before applying sizes. Always resize as requested by pixelwise argument. Don't call do_pending_window_change. (x_wm_set_size_hint): Add call for FRAME_SCROLL_BAR_AREA_HEIGHT. (w32_initialize_display_info): Initialize dpyinfo's horizontal_scroll_bar_cursor entry. (w32_create_terminal): Add set_horizontal_scroll_bar_hook. (w32_initialize): Init horizontal_scroll_bar_min_handle and horizontal_scroll_bar_left_border. (w32fullscreen_hook): Intermittently resize window to normal when switching from fullscreen to maximized state. (run_window_configuration_change_hook): Don't run it if frame is not official yet. (unwind_change_frame): Remove. (Fset_window_configuration): Rewrite using frame's official field. * widget.c (set_frame_size): Don't call compute_fringe_widths. (EmacsFrameSetCharSize): Obey frame_inhibit_resize. * window.h (struct window): New fields old_pointm, horizontal_scroll_bar, horizontal_scroll_bar_type, hscroll_whole, scroll_bar_height and suspend_auto_hscroll. (wset_horizontal_scroll_bar, wset_horizontal_scroll_bar_type): New functions. (sanitize_window_sizes): Extern. (MINI_NON_ONLY_WINDOW_P, MINI_ONLY_WINDOW_P, WINDOW_PSEUDO_P) (WINDOW_TOPMOST_P, WINDOW_HAS_HORIZONTAL_SCROLL_BAR) (WINDOW_CONFIG_SCROLL_BAR_HEIGHT) (WINDOW_CONFIG_SCROLL_BAR_LINES) (WINDOW_SCROLL_BAR_LINES, WINDOW_SCROLL_BAR_AREA_HEIGHT): New macros. (WINDOW_LEFT_FRINGE_COLS, WINDOW_RIGHT_FRINGE_COLS) (WINDOW_FRINGE_COLS, WINDOW_FRINGE_EXTENDED_P): Remove macros. (WINDOW_VERTICAL_SCROLL_BAR_TYPE) (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT) (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT) (WINDOW_HAS_VERTICAL_SCROLL_BAR): Minor rewrite. (WINDOW_BOX_HEIGHT_NO_MODE_LINE, WINDOW_BOX_TEXT_HEIGHT) (WINDOW_SCROLL_BAR_AREA_Y): Count in scroll bar height. * window.c (wset_old_pointm, Fwindow_scroll_bar_height) (Fwindow_old_point, sanitize_window_sizes): New functions. (Qwindow_sanitize_window_sizes): New symbol. (window_body_height): Count in horizontal scroll bar. (set_window_hscroll, Fscroll_left, Fscroll_right): Set suspend_auto_hscroll slot. (Fwindow_inside_edges): Count fringes pixelwise. (coordinates_in_window, Fcoordinates_in_window_p): Consider horizontal scroll bar. (check_frame_size, adjust_window_margins): Remove functions and corresponding calls. (set_window_buffer): Initialize old_pointm and horizontal scroll bars. (temp_output_buffer_show): Reset hscroll related fields. Initialize old_pointm. (make_parent_window): Initialize old_pointm. (make_window): Initialize old_pointm, horizontal scroll bar type, and scroll bar height. (resize_frame_windows): Don't count top margin in new sizes. Don't use safe sizes when shrinking a frame; let the window manager do the clipping. (Fsplit_window_internal): Inherit horizontal scroll bar type and height. (Fdelete_window_internal): Unchain old_pointm marker. (window_scroll_pixel_based, Fscroll_other_window): Adjust old_pointm. (Fwindow_text_width, Fwindow_text_height): New argument "pixelwise". (struct saved_window): New fields, old_pointm, hscroll_whole, suspend_auto_hscroll, scroll_bar_height and horizontal_scroll_bar_type. (Fset_window_configuration, save_window_save): Set new fields of saved_window. (apply_window_adjustment): Don't call adjust_window_margins. (set_window_margins): Don't change margins if new sizes don't fit into window. (set_window_scroll_bars): New argument "horizontal_type". Handle horizontal scroll bars. Don't change scroll bars if they don't fit into window. (Fset_window_scroll_bars): New argument "horizontal_type". (Fwindow_scroll_bars): Return values for horizontal scroll bars. (compare_window_configurations): Compare horizontal scroll bar settings. * xdisp.c (window_text_bottom_y, window_box_height): Count in horizontal scroll bar height. (pixel_to_glyph_coords, init_xdisp): Use FRAME_TOTAL_LINES instead of FRAME_LINES. (remember_mouse_glyph): Case ON_SCROLL_BAR changed to ON_VERTICAL_SCROLL_BAR. (with_echo_area_buffer): Initialize old_pointm. (with_echo_area_buffer_unwind_data): Store old_pointm values in vector. (unwind_with_echo_area_buffer): Handle old_pointm. (update_tool_bar): Set do_update when the tool bar window has at least one line (since this is what the user sets). (MAX_FRAME_TOOL_BAR_HEIGHT): Remove macro. (redisplay_tool_bar): Return early when toolbar has zero lines. Call x_change_tool_bar_height. Don't use max_tool_bar_height. (hscroll_window_tree): Handle suspension of auto_hscroll and old_pointm. (set_horizontal_scroll_bar): New function. (redisplay_window): Set ignore_mouse_drag_p when tool bar has more than one line. Handle horizontal scroll bars. (note_mouse_highlight): Handle horizontal scrol bars. (expose_frame): Set dimensions of XRectangle from frame's text sizes. (Vvoid_text_area_pointer): Update doc-string. * xfns.c (x_set_menu_bar_lines): Use adjust_frame_size. (x_change_tool_bar_height, x_set_scroll_bar_default_height) (x_set_internal_border_width): New functions. (x_set_tool_bar_lines): Call x_change_tool_bar_height. (unwind_create_frame_1): Remove. (Fx_create_frame): Handle horizontal scroll bars. Use official field of frame structure to inhibit running window-configuration-change-hook. (x_create_tip_frame): Call SET_FRAME_LINES and change_frame_size pixelwise. Handle frame's official field. (x_frame_parm_handlers): Add x_set_scroll_bar_height, x_set_horizontal_scroll_bars, x_set_left_fringe, x_set_right_fringe. * xmenu.c (update_frame_menubar, free_frame_menubar): Use adjust_frame_size. * xterm.h (struct x_display_info): Add horizontal_scroll_bar_cursor and Xatom_Horizontal_Scrollbar slots. (struct scroll_bar): Add horizontal slot. (HORIZONTAL_SCROLL_BAR_INSIDE_HEIGHT) (HORIZONTAL_SCROLL_BAR_LEFT_RANGE) (HORIZONTAL_SCROLL_BAR_INSIDE_WIDTH): New macros. (HORIZONTAL_SCROLL_BAR_LEFT_BORDER) (HORIZONTAL_SCROLL_BAR_RIGHT_BORDER) (HORIZONTAL_SCROLL_BAR_TOP_BORDER) (HORIZONTAL_SCROLL_BAR_BOTTOM_BORDER) (HORIZONTAL_SCROLL_BAR_MIN_HANDLE): Define. (x_clear_under_internal_border): Remove. * xterm.c (XTmouse_position): Handle horizontal scroll bars. (x_window_to_scroll_bar): New argument TYPE. Update callers. (x_send_scroll_bar_event, x_scroll_bar_create): New arguments HORIZONTAL. Update callers. (horizontal_action_hook_id): New action hook id. (x_horizontal_scroll_bar_to_input_event) (x_create_horizontal_toolkit_scroll_bar) (xt_horizontal_action_hook) (x_set_toolkit_horizontal_scroll_bar_thumb) (XTset_horizontal_scroll_bar, x_net_wm_state) (x_horizontal_scroll_bar_report_motion): New functions. (xg_scroll_callback, x_scroll_bar_handle_click): Handle horizontal scroll bars. (SCROLL_BAR_HORIZONTAL_NAME): Define. (XTset_vertical_scroll_bar): Attempt to clear areas not covered by scroll bar. (XTcondemn_scroll_bars, XTredeem_scroll_bar): Rewrite. Handle horizontal scroll bars. (handle_one_xevent): Handle horizontal scroll bar events. Call x_net_wm_state. (x_set_window_size_1, x_wm_set_size_hint): Don't call check_frame_size. (x_set_window_size): Don't call check_frame_size and do_pending_window_change. (x_term_init): Init horizontal_scroll_bar_cursor display info. (x_create_terminal): Add set_horizontal_scroll_bar_hook. (x_scroll_bar_set_handle): Add some checks when calling x_clear_area.
* | Merge from emacs-24; up to 2014-06-25T10:17:41Z!rgm@gnu.orgGlenn Morris2014-07-211-0/+1
|\ \ | |/
| * * macfont.h (macfont_update_antialias_threshold): Declare.Jan Djärv2014-07-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | * macfont.m (macfont_update_antialias_threshold): Remove static. * nsterm.h (EmacsApp): Add antialiasThresholdDidChange. * nsterm.m (applicationDidFinishLaunching:): Call antialiasThresholdDidChange, register for antialias changes. (antialiasThresholdDidChange:): New method for EmacsApp. Fixes: debbugs:17534
| * Backport from trunk.Jan Djärv2014-04-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | * nsmenu.m (update_frame_tool_bar): Return early if view or toolbar is nil. If waiting for toolbar to complete, force a redraw. (free_frame_tool_bar): Set wait_for_tool_bar = NO * nsterm.h (EmacsView): Add wait_for_tool_bar. * nsterm.m (updateFrameSize:): If waiting for the tool bar and tool bar is zero height, just return (Bug#16976). (initFrameFromEmacs:): Initialize wait_for_tool_bar.
* | Fix use of deallocated memory.Jan Djärv2014-06-301-1/+0
| | | | | | | | | | | | | | * nsterm.h (EmacsScroller): Remove dealloc. * nsterm.m (judge): EmacsScroller: Move dealloc code here. (dealloc): Remove for EmacsScroller.
* | Fix memory leaksJan Djärv2014-06-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | * macfont.m (macfont_draw): positions where not freed. * nsterm.h (EmacsApp): Always compile in shouldKeepRunning, isFirst on Cocoa. * nsterm.m (run): Always compile for Cocoa. Use runtime check to determine 10.9. Fixes: debbugs:17751
* | Use terminal-specific hooks to display popup dialogs.Dmitry Antipov2014-06-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | * termhooks.h (struct terminal): New field popup_dialog_hook. * menu.c (emulate_dialog_with_menu): New function, refactored from ... (Fx_popup_dialog): ... adjusted user. Also remove old #if 0 code and use popup_dialog_hook. * nsmenu.m (ns_popup_dialog): Make hook-compatible. * nsterm.h (ns_popup_dialog): Adjust prototype. * nsterm.m (ns_create_terminal): * w32term.c (w32_create_terminal): * xterm.c (x_create_terminal) [USE_X_TOOLKIT || USE_GTK]: Setup popup_dialog_hook.
* | * nsfns.m (ns_do_applescript): Surround executeAndReturnErrorJan Djärv2014-05-261-0/+3
| | | | | | | | | | | | | | | | | | | | | | with calls to ns_init_events, ns_finish_events. * nsterm.h (ns_init_events, ns_finish_events): Declare. * nsterm.m (ns_init_events, ns_finish_events): New functions. (ns_read_socket, ns_select): Call ns_init_events, ns_finish_events. Fixes: debbugs:17424
* | Avoid flickering on frame creation with tool bar on OSX.Jan Djärv2014-03-301-0/+1
|/ | | | | | | | | | | | | * nsmenu.m (update_frame_tool_bar): Return early if view or toolbar is nil. If waiting for toolbar to complete, force a redraw. * nsterm.h (EmacsView): Add wait_for_tool_bar. * nsterm.m (updateFrameSize:): If waiting for the tool bar and tool bar is zero height, just return. (initFrameFromEmacs:): Initialize wait_for_tool_bar. Fixes: debbugs:16976
* * nsterm.h (MAC_OS_X_VERSION_10_9): Add.Jan Djärv2014-03-081-0/+3
| | | | | | | * nsterm.m (constrainFrameRect:toScreen:): Constrain normally when frame is only on one screen. Fixes: debbugs:14713
* Fix spelling of "GNUstep"Glenn Morris2014-01-201-1/+1
|
* Spelling fixes.Paul Eggert2014-01-041-1/+1
| | | | | | | | * lib-src/Makefile.in (regex.o): Remove reference to no-longer-used macros CONFIG_BROKETS and INHIBIT_STRING_HEADER. "BROKETS" was a misspelling anyway.... * src/nsterm.h (updateCollectionBehavior): Rename from updateCollectionBehaviour. All uses changed.
* Update copyright year to 2014 by running admin/update-copyright.Paul Eggert2014-01-011-1/+1
|
* Customize ns-use-srgb-colorspace on OSX >= 10.7 to use sRGB.Jan Djärv2013-12-211-0/+12
| | | | | | | | | | | | | | * etc/NEWS: Mention ns-use-srgb-colorspace. * lisp/cus-start.el (all): Add ns-use-srgb-colorspace. * src/nsfns.m (Fxw_color_values): Use colorUsingDefaultColorSpace. * src/nsterm.h: Declare EmacsColor category. * src/nsterm.m (NSColor): Implement EmacsColor category. (ns_get_color): Use colorUsingDefaultColorSpace. (ns_get_color, ns_term_init): Use colorForEmacsRed.
* Make NS port use the normal dnd functions.Jan Djärv2013-12-191-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/term/ns-win.el: Require dnd. (global-map): Remove drag items. (ns-insert-text, ns-set-foreground-at-mouse) (ns-set-background-at-mouse): Remove (ns-drag-n-drop, ns-drag-n-drop-other-frame) (ns-drag-n-drop-as-text, ns-drag-n-drop-as-text-other-frame): New functions. * src/nsterm.h (KEY_NS_DRAG_FILE, KEY_NS_DRAG_COLOR, KEY_NS_DRAG_TEXT): Remove. * src/nsterm.m (Qfile, Qurl): New. (EV_MODIFIERS2): New macro. (EV_MODIFIERS): Use EV_MODIFIERS2. (ns_term_init): Remove font and color from DND, does not work on newer OSX, and other ports don't have them. (performDragOperation:): Handle modifiers used during drag. Use DRAG_N_DROP_EVENT instead of NS specific events. Remove global Lisp variables used to communicate with ns-win.el. Remove font and color handling. (syms_of_nsterm): Defsym Qfile and Qurl. Fixes: debbugs:8051
* Redo size constraint for NS so frames can span screens.Jan Djärv2013-12-191-3/+0
| | | | | | | | | | | * nsterm.h (ns_output): Remove dont_constrain. * nsterm.m (NSTRACE_SIZE, NSTRACE_RECT): New macros. (ns_constrain_all_frames, x_set_offset): Remove assignment to dont_constrain. (updateFrameSize:, windowWillResize:toSize:): Add trace. (constrainFrameRect): Remove special case nr_screens == 1. Don't constrain size to size of view.
* Fix GNUStep issues with startup.Jan Djärv2013-12-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | * nsterm.h (EmacsApp): Add applicationDidFinishLaunchingCalled. Pixel resize changes for NS. * nsterm.m (x_set_window_size): Change parameters rows/cols to height/width. row/cols are locals. Pass pixelwise to check_frame_size. Don't set FRAME_PIXEL_WIDTH/HEIGHT. (updateFrameSize:): Remove gsextra. Adjust for pixelwise resize. (windowWillResize): Remove gsextra. Calculate extra as in updateFrameSize. (x_new_font): Don't change frame size if fullscreen. Change size pixelwise. * nsterm.m (x_set_window_size): Remove fprintf. (init): Define always. Set applicationDidFinishLaunchingCalled for GNUStep. (applicationDidFinishLaunching:): Set applicationDidFinishLaunchingCalled, (applicationDidBecomeActive:): Call applicationDidFinishLaunching if not called.
* * font.h (FONT_WIDTH, FONT_HEIGHT, FONT_BASE, FONT_DESCENT):Dmitry Antipov2013-12-021-5/+0
| | | | | | Define here to unify between... * nsterm.h, w32term.h, xterm.h: ...port-specific headers. * w32term.h (CHECK_W32_FRAME): Remove unused macro.
* Support resizing frames and windows pixelwise.Martin Rudalics2013-11-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * dispextern.h (enum window_part): Add ON_SCROLL_BAR, ON_RIGHT_DIVIDER and ON_BOTTOM_DIVIDER. (struct glyph_matrix): Replace window_left_col and window_top_line by window_pixel_left and window_pixel_top. (WINDOW_WANTS_MODELINE_P, WINDOW_WANTS_HEADER_LINE_P): Minor rewrite. (enum face_id): Add WINDOW_DIVIDER_FACE_ID. (draw_window_divider, move_it_to, x_draw_right_divider) (x_draw_bottom_divider, change_frame_size): Add or fix declarations. * dispnew.c (change_frame_size_1): Change prototype. (adjust_glyph_matrix, required_matrix_width) (adjust_frame_glyphs_for_window_redisplay): Use pixel values instead of lines and columns. (marginal_area_string): Use WINDOW_FRINGES_WIDTH instead of WINDOW_TOTAL_FRINGE_WIDTH. (handle_window_change_signal, do_pending_window_change) (init_display): Adjusts calls of change_frame_size. (change_frame_size, change_frame_size_1): Handle pixelwise changes. * frame.c (Qright_divider_width, Qbottom_divider_width): New Lisp objects. (set_menu_bar_lines_1, set_menu_bar_lines, make_frame) (make_terminal_frame, Fmake_terminal_frame, Fframe_parameters) (x_set_internal_border_width, x_set_vertical_scroll_bars) (x_set_scroll_bar_width, x_figure_window_size): Handle pixel values. (set_frame_param): New function. (Fframe_text_cols, Fframe_text_lines, Fframe_total_cols) (Fframe_text_width, Fframe_text_height, Fscroll_bar_width) (Ffringe_width, Fborder_width, Fright_divider_width) (Fbottom_divider_width): New functions, defsubr them. (Fset_frame_height, Fset_frame_width, Fset_frame_size): New argument pixelwise. (struct frame_parm_table): New members Qright_divider_width and Qbottom_divider_width. (x_set_frame_parameters): Handle parameters for pixelwise sizes. (x_report_frame_params): Handle Qright_divider_width and Qbottom_divider_width. (x_set_right_divider_width, x_set_bottom_divider_width): New functions. (frame_resize_pixelwise): New option. * frame.h (struct frame): Add tool_bar_height, menu_bar_height, new_pixelwise, right_divider_width and bottom_divider_width; remove total_lines; rename text_lines, text_cols, new_text_lines and new_text_cols to text_height, text_width, new_height and new_width respectively. (FRAME_LINES, FRAME_COLS): Rename to FRAME_TEXT_HEIGHT and FRAME_TEXT_WIDTH respectively. (FRAME_MENU_BAR_HEIGHT, FRAME_TOOL_BAR_HEIGHT) (FRAME_RIGHT_DIVIDER_WIDTH, FRAME_BOTTOM_DIVIDER_WIDTH) (FRAME_TEXT_TO_PIXEL_WIDTH, FRAME_PIXEL_TO_TEXT_WIDTH): New macros. (FRAME_TOP_MARGIN_HEIGHT, FRAME_LEFT_SCROLL_BAR_AREA_WIDTH) (FRAME_RIGHT_SCROLL_BAR_AREA_WIDTH, FRAME_SCROLL_BAR_AREA_WIDTH) (SET_FRAME_COLS, SET_FRAME_WIDTH, SET_FRAME_HEIGHT) (FRAME_TEXT_COLS_TO_PIXEL_WIDTH, FRAME_PIXEL_WIDTH_TO_TEXT_COLS) (FRAME_TEXT_COLS_TO_PIXEL_WIDTH): Rewrite macros. (FRAME_TOTAL_COLS_ARG): Remove macro. * fringe.c (draw_fringe_bitmap_1): Handle right divder. * gtkutil.c (xg_frame_resized, xg_frame_set_char_size) (x_wm_set_size_hint): Handle frame pixel sizes. * indent.c (compute_motion, Fcompute_motion): Call window_body_width instead of window_body_cols. * keyboard.c (Qright_divider, Qbottom_divider): New symbols. (make_lispy_position): Handle right and bottom dividers. (Fsuspend_emacs): Pixelize call of change_frame_size. * keyboard.h: Extern Qright_divider, Qbottom_divider. * lisp.h: Extern set_frame_param. * nsfns.m (x_set_tool_bar_lines): Pixelize call of x_set_window_size. (Fx_create_frame): Add entry for vertical_drag_cursor. Pixelize call of change_frame_size. * nsterm.h (struct ns_output): Add vertical_drag_cursor. * nsterm.m (ns_update_window_end): Optionally draw right divider. (x_set_window_size): Add argument pixelwise. Call check_frame_size and change_frame_size with pixelwise zero. (ns_draw_window_divider): New function. (ns_redisplay_interface): Add ns_draw_window_divider. (updateFrameSize:): Call change_frame_size with pixelwise zero. (x_new_font): Call x_set_window_size with pixelwise zero. * print.c (print_object): For a window print its sequence number again. * term.c (Fresume_tty): Pixelize call of change_frame_size. * w32fns.c (x_set_mouse_color): Handle vertical drag cursor. (x_set_menu_bar_lines, x_set_tool_bar_lines): Calculate pixelwise. (w32_createwindow): Use scroll bar area width. (w32_wnd_proc): Handle bottom divider width. For WM_WINDOWPOSCHANGING return zero if we resize pixelwise. (Fx_create_frame): Default divider width parameters. Caclulate sizes pixelwise. Add vertical drag cursor support. (x_create_tip_frame): Default divider widths to zero. Pixelize call to change_frame_size. (Fx_show_tip): Add handling of divider widths. Pixelize window position and sizes. (Fw32_frame_rect): New function. (frame_parm_handler w32_frame_parm_handlers): Add divider widths. (Vx_window_vertical_drag_shape): Add variable. * w32inevt.c (resize_event, maybe_generate_resize_event): Pixelize change_frame_size calls. * w32menu.c (set_frame_menubar): Pixelize x_set_window_size call. * w32term.c (w32_draw_window_divider): New function. (x_update_window_end): Handle right divider. (w32_draw_fringe_bitmap, x_scroll_run) (w32_set_vertical_scroll_bar): Pixelize scrollbar widths. (w32_read_socket): Handle SIZE_MAXIMIZED separately. Calculate new frame sizes pixelwise. (x_new_font): Pixelize call to x_set_window_size. (x_check_fullscreen): Pixelize call to change_frame_size. (x_set_window_size_1, x_set_window_size): New argument pixelwise. Calculate pixelwise. (x_wm_set_size_hint): Use scroll bar area width. (w32_redisplay_interface): Add w32_draw_window_divider. * w32term.h (struct w32_output): Add vertical drag cursor. * widget.c (set_frame_size, update_wm_hints) (EmacsFrameResize, EmacsFrameSetValues): Pixelize calls of change_frame_size. (EmacsFrameSetCharSize): Pixelize call of x_set_window_size. * window.c (sequence_number): Restore. (Fwindow_pixel_width, Fwindow_pixel_height) (Fwindow_mode_line_height, Fwindow_header_line_height) (window_pixel_to_total, Frun_window_scroll_functions) (Fset_window_new_pixel, window_resize_apply_total) (Fwindow_resize_apply_total): New functions. (window_body_height, window_body_width): Rename from window_body_lines. New argument PIXELWISE. Calculate pixelwise. (Fwindow_body_height, Fwindow_body_width): New argument PIXELWISE. (coordinates_in_window, window_relative_x_coord): Use window's pixel width instead of total width. (replace_window, recombine_windows): Initialize pixel values. (resize_root_window, resize_frame_windows, grow_mini_window) (shrink_mini_window): New argument PIXELWISE. Calculate pixelwise. (Fdelete_other_windows_internal, adjust_window_margins) (window_resize_check, window_resize_apply) (Fdelete_window_internal, Fresize_mini_window_internal) (Fwindow_text_width, Fwindow_text_height): Calculate pixelwise. (check_frame_size): Rename arguments. New argument PIXELWISE. Calculate pixelwise. (set_window_buffer): Make samebuf bool. Run configuration change hook only if buffer changed. (Fset_window_buffer): Rewrite doc-string. (make_window): Initialize new_pixel slot. (Fwindow_resize_apply): Check pixel size of root window. (Fsplit_window_internal): Call 2nd argument pixel_size. Calculate pixelwise. (Fscroll_left, Fscroll_right): Call window_body_width instead of window_body_cols. (save_window_data): New slots frame_text_width, frame_text_height, frame_menu_bar_height, frame_tool_bar_height. (saved_window): New slots pixel_left, pixel_top, pixel_height, pixel_width. (Fcurrent_window_configuration, Fset_window_configuration) (save_window_save, compare_window_configurations): Handle new slots in save_window_data and saved_window. (Fset_window_scroll_bars): Fix doc-string. (window_resize_pixelwise): New variable. (coordinates_in_window, Fcoordinates_in_window_p): Handle dividers. (make_parent_window): Adjust sequence_number. (Fwindow_right_divider_width, Fwindow_bottom_divider_width): New functions. * window.h (struct window): New members new_pixel, pixel_left, pixel_top, pixel_width, pixel_height. Restore sequence_number. (wset_new_pixel): New function. (WINDOW_PIXEL_WIDTH, WINDOW_PIXEL_HEIGHT) (MIN_SAFE_WINDOW_PIXEL_WIDTH, MIN_SAFE_WINDOW_PIXEL_HEIGHT) (WINDOW_LEFT_PIXEL_EDGE, WINDOW_RIGHT_PIXEL_EDGE) (WINDOW_TOP_PIXEL_EDGE, WINDOW_BOTTOM_PIXEL_EDGE) (WINDOW_BOTTOMMOST_P, WINDOW_BOX_LEFT_PIXEL_EDGE) (WINDOW_BOX_RIGHT_PIXEL_EDGE, WINDOW_MARGINS_COLS) (WINDOW_MARGINS_WIDTH, WINDOW_RIGHT_DIVIDER_WIDTH) (WINDOW_BOTTOM_DIVIDER_WIDTH): New macros. (WINDOW_TOTAL_FRINGE_WIDTH): Rename to WINDOW_FRINGES_WIDTH. (WINDOW_TOTAL_WIDTH, WINDOW_TOTAL_HEIGHT): Remove macros. (WINDOW_RIGHT_EDGE_X, WINDOW_LEFT_EDGE_X, WINDOW_TOP_EDGE_Y) (WINDOW_BOTTOM_EDGE_Y, WINDOW_FULL_WIDTH_P, WINDOW_LEFTMOST_P) (WINDOW_RIGHTMOST_P, WINDOW_BOX_LEFT_EDGE_X) (WINDOW_BOX_RIGHT_EDGE_X, WINDOW_FRINGE_COLS) (WINDOW_BOX_HEIGHT_NO_MODE_LINE, WINDOW_BOX_TEXT_HEIGHT): Rewrite. (resize_frame_windows, grow_mini_window, shrink_mini_window) (window_body_width, check_frame_size): Adapt external declarations. * xdisp.c (last_max_ascent): New integer. (window_text_bottom_y): Handle bottom divider. (window_box_width, window_box_height): Calculate pixelwise. (get_glyph_string_clip_rects): Handle right divider. (remember_mouse_glyph): When windows are resized pixelwise proceed with width and height set to 1. (init_iterator): Use WINDOW_PIXEL_WIDTH instead of WINDOW_TOTAL_WIDTH. (move_it_to): Calculate and return maximum x position encountered. (Fwindow_text_pixel_size): New function. (resize_mini_window, update_tool_bar): Calculate pixelwise. (tool_bar_lines_needed): Rename to tool_bar_height. Calculate pixelwise. (Ftool_bar_lines_needed): Rename to Ftool_bar_height. Calculate pixelwise. (redisplay_tool_bar): Calculate pixelwise. (redisplay_window): Calculate pixelwise. Handle dividers. (draw_glyphs, x_clear_end_of_line, note_mouse_highlight) (x_draw_vertical_border): Handle dividers. (define_frame_cursor1): Handle vertical drag cursor. (x_draw_right_divider, x_draw_bottom_divider): New functions. (expose_window): Calculate pixelwise. Handle dividers. (init_xdisp): Initialize pixel values. * xfaces.c (Qwindow_divider): New face. (realize_basic_faces): Realize it. * xfns.c (x_set_mouse_color): Handle vertical_drag_cursor. (x_set_menu_bar_lines, x_set_tool_bar_lines): Calculate pixelwise. (x_set_scroll_bar_default_width): Default actual width to 16. (Fx_create_frame): Set sizes pixelwise. (x_create_tip_frame): Default divider widths to zero. Pixelize call of change_frame_size. (Fx_show_tip): Handle divider widths. Initial pixel position and sizes. (frame_parm_handler x_frame_parm_handlers): Add divider widths. (Vx_window_vertical_drag_shape): New option. * xmenu.c (free_frame_menubar): Pixelize call of x_set_window_size. * xterm.c (x_draw_window_divider): New function. (x_update_window_end): Optionally draw right divider. (x_draw_fringe_bitmap, x_scroll_run, x_scroll_bar_create) (XTset_vertical_scroll_bar): Use scroll bar pixel width. (handle_one_xevent, x_new_font): Calculate pixelwise. (x_set_window_size_1, x_set_window_size): New argument pixelwise. Calculate pixelwise. (x_wm_set_size_hint): Pixelize call of check_frame_size. (struct x_redisplay_interface): Add x_draw_window_divider. * xterm.h (struct x_output): Add vertical_drag_cursor. * cus-start.el (frame-resize-pixelwise) (window-resize-pixelwise): New entries. * emacs-lisp/debug.el (debug): Use window-total-height instead of window-total-size. * frame.el (tool-bar-lines-needed): Defalias to tool-bar-height. * help.el (describe-bindings-internal): Call help-buffer (temp-buffer-max-width): New option. (resize-temp-buffer-window, help-window-setup) (with-help-window): Rewrite. * mouse.el (mouse-drag-line): Rewrite. Add key bindings for dragging dividers. * window.el (frame-char-size, window-min-pixel-height) (window-safe-min-pixel-height, window-safe-min-pixel-width) (window-min-pixel-width, window-safe-min-pixel-size) (window-combination-p, window-safe-min-size) (window-resizable-p, window--size-to-pixel) (window--pixel-to-size, window--resize-apply-p): New functions. (window-safe-min-height): Fix doc-string. (window-size, window-min-size, window--min-size-1) (window-sizable, window-sizable-p, window--min-delta-1) (window-min-delta, window--max-delta-1, window-max-delta) (window--resizable, window--resizable-p, window-resizable) (window-full-height-p, window-full-width-p, window-at-side-p) (window--in-direction-2, window-in-direction) (window--resize-reset-1, window--resize-mini-window) (window-resize, window-resize-no-error) (window--resize-child-windows-normal) (window--resize-child-windows, window--resize-siblings) (window--resize-this-window, window--resize-root-window) (window--resize-root-window-vertically) (adjust-window-trailing-edge, enlarge-window, shrink-window) (maximize-window, minimize-window, delete-window) (quit-restore-window, window-split-min-size, split-window) (balance-windows-2, balance-windows) (balance-windows-area-adjust, balance-windows-area) (window--state-get-1, window-state-get, window--state-put-1) (window--state-put-2, window-state-put) (display-buffer-record-window, window--display-buffer): Make functions handle pixelwise sizing of windows. (display-buffer--action-function-custom-type) (display-buffer-fallback-action): Add display-buffer-in-previous-window. (display-buffer-use-some-window): Resize window to height it had before. (fit-window-to-buffer-horizontally): New option. (fit-frame-to-buffer): Describe new values. (fit-frame-to-buffer-bottom-margin): Replace with fit-frame-to-buffer-margins. (window--sanitize-margin): New function. (fit-frame-to-buffer, fit-window-to-buffer): Rewrite completely using window-text-pixel-size.