summaryrefslogtreecommitdiff
path: root/src/xterm.h
Commit message (Collapse)AuthorAgeFilesLines
* If available, use Xfixes extension to do pointer blanking.Dmitry Antipov2014-05-131-1/+5
| | | | | | | | | | | | | | * configure.ac (HAVE_XFIXES): Define if available. (XFIXES_CFLAGS, XFIXES_LIBS): New AC_SUBSTs. * src/Makefile.in (XFIXES_CFLAGS, XFIXES_LIBS): New var. * src/xfns.c (x_set_mouse_color): Do not call make_invisible_cursor here. (make_invisible_cursor): Move to... * src/xterm.c (make_invisible_cursor): ...here. (x_probe_xfixes_extension, xfixes_toggle_visible_pointer) (x_toggle_visible_pointer, x_setup_pointer_blanking): New functions. (x_term_init): Call to x_setup_pointer_blanking. (XTtoggle_invisible_pointer): Use blanking specific to this display. * src/xterm.h (struct x_display_info): New member toggle_visible_pointer.
* Prefer 'ARRAYELTS (x)' to 'sizeof x / sizeof *x'.Paul Eggert2014-04-051-1/+1
| | | | | | | | | | | | | | | | * alloc.c (memory_full): * charset.c (syms_of_charset): * doc.c (Fsnarf_documentation): * emacs.c (main): * font.c (BUILD_STYLE_TABLE): * keyboard.c (make_lispy_event): * profiler.c (setup_cpu_timer): * xgselect.c (xg_select): * xterm.c (record_event, STORE_KEYSYM_FOR_DEBUG): Use ARRAYELTS. * font.c (FONT_PROPERTY_TABLE_SIZE): Remove. Replace the only use with ARRAYELTS (font_property_table). * xfaces.c (DIM): Remove. All uses replaced by ARRAYELTS.
* Avoid crashes when X fonts are erroneously freed on reused XDmitry Antipov2014-03-031-0/+4
| | | | | | | | | | | | | | | 'Display *' connection data (Bug#16069). Note that X font resources still may be leaked, but currently there is no way to completely avoid it. * xterm.h (struct x_display_info): New member x_id. Add comments. * xterm.c (x_display_id): New variable. (x_term_init): Assign identifier to each opened X connection. * xfont.c (struct xfont): New member x_display_id. (xfont_open): Initialize it with frame's display id. (xfont_close): Check whether font's display id matches the one recorded for the given display. Adjust comment. * xftfont.c (struct xftfont_info): (xftfont_open, xftfont_close): Exactly as above with xfont stuff.
* Fix handling of internal borders (Bug#16348).Martin Rudalics2014-01-111-0/+4
| | | | | | | | | | | | | | | | | | | | | | * dispnew.c (adjust_frame_glyphs_for_window_redisplay): Remove internal border width from pixel width of windows. (change_frame_size_1): Don't return early when frame's pixel size changes - we still have to record the new sizes in the frame structure. * w32fns.c (x_set_tool_bar_lines): Clear internal border width also when toolbar gets larger. * window.c (check_frame_size): Include internal_border_width in check. * xdisp.c (Ftool_bar_height): Fix doc-string typo. * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines): In non-toolkit/non-GTK version clear internal border. * xterm.c (x_clear_under_internal_border): New function for non-toolkit/non-GTK version. (x_after_update_window_line): In non-toolkit/non-GTK version don't do that. (handle_one_xevent, x_set_window_size): Call x_clear_under_internal_border in non-toolkit/non-GTK version. * xterm.h (x_clear_under_internal_border): Extern it.
* Update copyright year to 2014 by running admin/update-copyright.Paul Eggert2014-01-011-1/+1
|
* Use bool for boolean, focusing on headers.Paul Eggert2013-12-141-27/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.ac (PTY_OPEN, GC_MARK_SECONDARY_STACK): Use bool for boolean. * lib-src/emacsclient.c, lib-src/etags.c, lib-src/hexl.c (FALSE, TRUE): Remove. All uses replaced with uncapitalized version. * lib-src/emacsclient.c (message): * lib-src/etags.c (make_tag, pfnote, consider_token, make_C_tag, lang_names): * lib-src/hexl.c (un_flag, iso_flag, endian): * lib-src/pop.c (pop_debug, pop_open, pop_multi_first, pop_multi_next) (pop_trash): Use bool for boolean. * lib-src/etags.c (bool): Remove. * lib-src/etags.c (globals, members, declarations, no_line_directive) (no_duplicates): Use 'int' for boolean values that getopt requires to be 'int'. Formerly, these were 'bool' and 'bool' was 'int', but we can no longer rely on this implementation. * lib-src/pop.h (struct _popserver): Use bool_bf for boolean bit-fields. * lwlib/xlwmenuP.h (XlwMenu_part): Use bool_bf for boolean bit-fields. * src/atimer.h, src/lisp.h, src/syssignal.h, src/syswait.h, src/unexelf.c: No need to include <stdbool.h>, since conf_post.h does it now. * src/buffer.h (BUF_COMPUTE_UNCHANGED, DECODE_POSITION) (BUFFER_CHECK_INDIRECTION, GET_OVERLAYS_AT, PER_BUFFER_VALUE_P) (SET_PER_BUFFER_VALUE_P): * src/ccl.c, src/ccl.h (setup_ccl_program): * src/ccl.h (CHECK_CCL_PROGRAM): * src/character.h (MAKE_CHAR_UNIBYTE, CHECK_CHARACTER_CAR) (CHECK_CHARACTER_CDR, CHAR_STRING_ADVANCE, NEXT_CHAR_BOUNDARY) (PREV_CHAR_BOUNDARY, FETCH_STRING_CHAR_ADVANCE) (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE) (FETCH_STRING_CHAR_ADVANCE_NO_CHECK, FETCH_CHAR_ADVANCE) (FETCH_CHAR_ADVANCE_NO_CHECK, INC_POS, DEC_POS, INC_BOTH) (DEC_BOTH, BUF_INC_POS, BUF_DEC_POS): * src/charset.h (CHECK_CHARSET, CHECK_CHARSET_GET_ID) (CHECK_CHARSET_GET_ATTR, CHECK_CHARSET_GET_CHARSET) (CHARSET_FAST_MAP_SET): * src/coding.c (decode_coding_ccl, encode_coding_ccl): * src/coding.h (CHECK_CODING_SYSTEM, CHECK_CODING_SYSTEM_GET_SPEC) (CHECK_CODING_SYSTEM_GET_ID, SJIS_TO_JIS, SJIS_TO_JIS2) (JIS_TO_SJIS, JIS_TO_SJIS2, ENCODE_FILE, DECODE_FILE) (ENCODE_SYSTEM, DECODE_SYSTEM, ENCODE_UTF_8) (decode_coding_c_string): * src/composite.h (COMPOSITION_DECODE_REFS, COMPOSITION_DECODE_RULE): * src/conf_post.h (has_attribute): * src/dispextern.h (trace_redisplay_p): (INC_TEXT_POS, DEC_TEXT_POS, SET_GLYPH_FROM_GLYPH_CODE) (SET_CHAR_GLYPH, SET_CHAR_GLYPH_FROM_GLYPH) (SET_GLYPH_FROM_CHAR_GLYPH): (WINDOW_WANTS_MODELINE_P, WINDOW_WANTS_HEADER_LINE_P) (FACE_SUITABLE_FOR_ASCII_CHAR_P, FACE_SUITABLE_FOR_CHAR_P) (PRODUCE_GLYPHS, reset_mouse_highlight, in_display_vector_p) (cursor_in_mouse_face_p): * src/dispnew.c (adjust_glyph_matrix, clear_glyph_matrix_rows) (blank_row, prepare_desired_row) (build_frame_matrix_from_leaf_window, make_current) (mirror_make_current, mirrored_line_dance, mirror_line_dance) (update_window, scrolling_window, update_frame_line): * src/disptab.h (GLYPH_FOLLOW_ALIASES): * src/editfns.c (Fformat): * src/font.h (FONT_WEIGHT_SYMBOLIC, FONT_SLANT_SYMBOLIC) (FONT_WIDTH_SYMBOLIC, FONT_WEIGHT_FOR_FACE, FONT_SLANT_FOR_FACE) (FONT_WIDTH_FOR_FACE, FONT_WEIGHT_NAME_NUMERIC) (FONT_SLANT_NAME_NUMERIC, FONT_WIDTH_NAME_NUMERIC) (FONT_SET_STYLE, CHECK_FONT, CHECK_FONT_SPEC, CHECK_FONT_ENTITY) (CHECK_FONT_OBJECT, CHECK_FONT_GET_OBJECT, FONT_ADD_LOG) (FONT_DEFERRED_LOG): * src/frame.h (FRAME_W32_P, FRAME_MSDOS_P, FRAME_WINDOW_P): (FRAME_EXTERNAL_TOOL_BAR, FRAME_EXTERNAL_MENU_BAR, FOR_EACH_FRAME) (FRAME_MOUSE_UPDATE): * src/fringe.c (Fdefine_fringe_bitmap): * src/image.c (x_create_bitmap_from_data, x_create_bitmap_mask) (x_create_bitmap_from_xpm_data, xpm_load_image): * src/intervals.h (INTERVAL_HAS_PARENT, INTERVAL_PARENT) (set_interval_parent, RESET_INTERVAL, COPY_INTERVAL_CACHE) (MERGE_INTERVAL_CACHE): * src/keymap.h (KEYMAPP): * src/lisp.h (eassert, USE_LSB_TAG, CHECK_LISP_OBJECT_TYPE) (STRING_SET_UNIBYTE, STRING_SET_MULTIBYTE, DEFSYM, PSEUDOVECTORP) (CHECK_RANGED_INTEGER, CHECK_TYPE_RANGED_INTEGER) (CHECK_NUMBER_COERCE_MARKER, CHECK_NUMBER_OR_FLOAT_COERCE_MARKER) (DEFVAR_LISP, DEFVAR_LISP_NOPRO, DEFVAR_BOOL, DEFVAR_INT) (DEFVAR_BUFFER_DEFAULTS, DEFVAR_KBOARD, QUIT) (RETURN_UNGCPRO, USE_SAFE_ALLOCA, SAFE_NALLOCA, SAFE_FREE) (SAFE_ALLOCA_LISP, FOR_EACH_ALIST_VALUE, functionp): * src/syntax.h (SYNTAX_ENTRY, SYNTAX_WITH_FLAGS, SYNTAX) (UPDATE_SYNTAX_TABLE_FORWARD, UPDATE_SYNTAX_TABLE_BACKWARD) (SETUP_BUFFER_SYNTAX_TABLE): * src/systime.h (timespec_valid_p): * src/term.c (save_and_enable_current_matrix): * src/window.h (WINDOW_MENU_BAR_P, WINDOW_TOOL_BAR_P): * src/xdisp.c (in_display_vector_p, display_tool_bar_line) (redisplay_internal, try_window_reusing_current_matrix) (sync_frame_with_window_matrix_rows, try_window_id) (display_menu_bar, display_tty_menu_item, display_mode_line) (coords_in_mouse_face_p, cursor_in_mouse_face_p): * src/xmenu.c (xmenu_show): * src/xterm.c (use_xim, x_term_init): * src/xterm.h (XSync, GTK_CHECK_VERSION, use_xim, SET_SCROLL_BAR_X_WIDGET) (struct x_bitmap_record): Use bool for booleans. * src/ccl.c (struct buffer_text): * src/ccl.h (struct ccl_program): * src/charset.h (struct charset): * src/cm.h (struct cm): * src/coding.h (struct iso_2022_spec, struct coding_system): * src/dispextern.h (struct glyph, struct glyph_matrix, struct glyph_row) (struct glyph_string, struct face, struct face_cache) (struct bidi_string_data, struct bidi_it) (struct draw_fringe_bitmap_params, struct it, Mouse_HLInfo) (struct image): * src/editfns.c (Fformat): * src/frame.h (struct frame): * src/fringe.c (struct fringe_bitmap): * src/intervals.h (struct interval): * src/keyboard.h (struct kboard): * src/lisp.h (struct Lisp_Symbol, struct Lisp_Misc_Any, struct Lisp_Marker) (struct Lisp_Overlay, struct Lisp_Save_Value, struct Lisp_Free) (struct Lisp_Buffer_Local_Value, union specbinding): * src/macfont.m (struct macfont_info): * src/process.h (struct Lisp_Process): * src/termchar.h (struct tty_display_info): * src/window.h (struct window): * src/xterm.h (struct x_output): Use bool_bf for boolean bit-fields. * src/ccl.c (setup_ccl_program): Now returns bool instead of -1 or 0. All callers changed. * src/ccl.h (struct ccl_program): Remove unused members private_state, src_multibyte, dst_multibyte, cr_consumed, suppress_error, eight_bit_control. (struct ccl_spec): Remove unused members cr_carryover, eight_bit_carryover. * src/conf_post.h: Include <stdbool.h>. (bool_bf): New type. * src/dispextern.h (TRACE, PREPARE_FACE_FOR_DISPLAY): * src/interval.h (RESET_INTERVAL, COPY_INTERVAL_CACHE, MERGE_INTERVAL_CACHE) Surround statement macro with proper 'do { ... } while (false)' brackets. (SET_MATRIX_ROW_ENABLED_P): Assume 2nd arg is bool. (PRODUCE_GLYPHS): Simplify use of boolean. * src/fileio.c (Fcopy_file): If I is an integer, prefer 'if (I != 0)' to 'if (I)'. * src/lisp.h (UNGCPRO): Return void, not int. (FOR_EACH_TAIL): Use void expression, not int expression. * src/region-cache.c: Reindent. * src/region-cache.h: Copy comments from region-cache.c, to fix incorrect remarks about booleans.
* Fix minor problems found by static checking.Paul Eggert2013-12-071-0/+2
| | | | | | | | | * keyboard.c (poll_for_input_1, input_polling_used): Define only if HAVE_NTGUI. * xmenu.c (popup_activate_callback): Omit unnecessary check against USE_X_TOOLKIT, which must be defined here anyway. * xterm.c, xterm.h (x_dispatch_event) [! (USE_X_TOOLKIT || USE_MOTIF)]: Now static.
* * xterm.c (input_signal_count): Remove.Dmitry Antipov2013-12-061-2/+0
| | | | | | | (x_dispatch_event): Define unconditionally. (x_make_frame_visible): Process X events until the frame is really visible (Bug#16027). * xterm.h (x_dispatch_event): Declare unconditionally.
* * 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.
* Remove fringe background extension code on X11.YAMAMOTO Mitsuharu2013-12-021-4/+0
| | | | | | | | | | | * xterm.h (struct scroll_bar): Remove member `fringe_extended_p'. * xterm.c (x_draw_fringe_bitmap, x_scroll_run): Remove code for fringe background extension. (x_scroll_bar_create): Remove variables `sb_left' and `sb_width', because they are now always the same as `left' and `width', respectively. Remove code for the case that `width' and `sb_width' are different.
* Support resizing frames and windows pixelwise.Martin Rudalics2013-11-301-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* * configure.ac (HAVE_MENUS): Remove.Stefan Monnier2013-11-281-2/+2
| | | | | | | | | | | | * src/xmenu.c (Fmenu_or_popup_active_p): * src/window.c (Fset_window_configuration): * src/menu.c (Fx_popup_menu, Fx_popup_dialog): * src/keyboard.c (record_menu_key, read_char_x_menu_prompt): * src/fns.c (Fyes_or_no_p): * src/editfns.c (Fmessage_box, Fmessage_or_box): * src/alloc.c (make_save_ptr_ptr): * src/xdisp.c, src/w32menu.c, src/term.c, src/xterm.h, src/xterm.c: Remove HAVE_MENUS.
* * xterm.h (struct x_output): For 'black_relief' and 'white_relief'Dmitry Antipov2013-10-291-1/+0
| | | | | | | | | | | | | | fields, drop 'allocated_p' member and use -1 for uninitialized value. * w32term.h (struct w32_output): Similarly but do not use -1 because... * xfaces.c (unload_color) [HAVE_X_WINDOWS]: ...this function is a no-op on MS-Windows anyway. (free_face_colors): Define only if HAVE_X_WINDOWS and... (free_realized_face): ...adjust user. * xfns.c (Fx_create_frame, x_create_tip_frame): Initialize black and white relief pixels to -1. * xterm.c (x_setup_relief_color, x_free_frame_resources): Adjust users. * w32term.c (w32_setup_relief_color, x_free_frame_resources): Likewise. * dispextern.h (unload_color): Move prototype under HAVE_X_WINDOWS.
* Remove port-specific display name lists to avoid extraDmitry Antipov2013-10-181-8/+1
| | | | | | | | | | | | | | | | | | | | | | | complexity and data duplication with display info lists. * xterm.h (x_display_name_list): Remove declaration. * xterm.c (x_display_name_list): Remove. (x_term_init, x_delete_display, syms_of_xterm): Adjust users. * xfns.c (x_display_info_for_name, Fx_display_list): Likewise. Use x_display_list where appropriate. * w32term.h (w32_display_name_list): Remove declaration. * w32term.c (w32_display_name_list): Remove. (w32_initialize_display_info, x_delete_display, syms_of_w32term): Adjust users. * w32fns.c (x_display_info_for_name, Fx_display_list): Likewise. Use x_display_list where appropriate. * nsterm.h (ns_display_name_list): Remove declaration. * nsterm.m (ns_display_name_list): Remove. (ns_term_init, syms_of_nsterm): Adjust users. * nsfns.m (ns_display_info_for_name, Fx_display_list): Likewise. Use x_display_list where appropriate. * termhooks.h (TERMINAL_FONT_CACHE): New macro. * alloc.c (toplevel) [HAVE_WINDOW_SYSTEM]: Include TERM_HEADER. (mark_terminals): Mark per-terminal font cache.
* x-popup-dialog fixed, almost.Eli Zaretskii2013-09-291-0/+4
|
* * xterm.h (struct x_display_info): New members last_mouse_glyph_frame,Dmitry Antipov2013-09-191-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | last_mouse_scroll_bar, last_mouse_glyph and last_mouse_movement_time, going to replace static variables below. Adjust comments. * xterm.c (last_mouse_glyph, last_mouse_glyph_frame) (last_mouse_scroll_bar, last_mouse_movement_time): Remove. (note_mouse_movement, XTmouse_position, x_scroll_bar_note_movement) (x_scroll_bar_report_motion, handle_one_xevent, syms_of_xterm): Related users changed. * w32term.h (struct w32_display_info): New members last_mouse_glyph_frame, last_mouse_scroll_bar, last_mouse_scroll_bar_pos, last_mouse_glyph and last_mouse_movement_time, going to replace static variables below. Adjust comments. * w32term.c (last_mouse_glyph_frame, last_mouse_scroll_bar) (last_mouse_scroll_bar_pos, last_mouse_glyph, last_mouse_movement_time): Remove. (note_mouse_movement, w32_mouse_position, w32_scroll_bar_handle_click) (x_scroll_bar_report_motion, syms_of_w32term): Related users changed. * nsterm.h (struct ns_display_info): New members last_mouse_glyph, last_mouse_movement_time and last_mouse_scroll_bar, going to replace static variables below. * nsterm.m (last_mouse_glyph, last_mouse_movement_time) (last_mouse_scroll_bar): Remove. (note_mouse_movement, ns_mouse_position, mouseMoved, mouseEntered) (mouseExited): Related users changed.
* * frame.c (x_redo_mouse_highlight): New functionDmitry Antipov2013-09-181-0/+8
| | | | | | | | | | | | | | | | | | | | | | to factor out common code used in W32 and X ports. * dispextern.h (x_redo_mouse_highlight): Add prototype. * xterm.h (struct x_display_info): * w32term.h (struct w32_display_info): * nsterm.h (struct ns_display_info): New members last_mouse_motion_frame, last_mouse_motion_x and last_mouse_motion_y, going to replace static variables below. * xterm.c (last_mouse_motion_event, last_mouse_motion_frame) (redo_mouse_highlight): Remove. (note_mouse_movement, syms_of_xterm): Adjust user. (handle_one_xevent): Likewise. Use x_redo_mouse_highlight. * w32term.c (last_mouse_motion_event, last_mouse_motion_frame) (redo_mouse_highlight): Remove. (note_mouse_movement, syms_of_w32term): Adjust user. (w32_read_socket): Likewise. Use x_redo_mouse_highlight. * nsterm.m (last_mouse_motion_position, last_mouse_motion_frame): Remove. (note_mouse_movement, mouseMoved, syms_of_nsterm): * nsfns.m (compute_tip_xy): Adjust user.
* * frame.c (x_mouse_grabbed): New function.Dmitry Antipov2013-09-181-0/+3
| | | | | | | | | | | | | | | * dispextern.h (x_mouse_grabbed): Add prototype. (last_mouse_frame): Remove declaration. * xterm.h (struct x_display_info): * w32term.h (struct w32_display_info): * nsterm.h (struct ns_display_info): New member last_mouse_frame, going to replace... * xdisp.c (last_mouse_frame): ...global variable. (note_tool_bar_highlight): * w32term.c (w32_mouse_position, w32_read_socket): * xterm.c (XTmouse_position, handle_one_xevent): Use x_mouse_grabbed. * nsterm.m (ns_mouse_position, mouseDown): Adjust user.
* * dispextern.h (check_x_display_info, x_get_string_resource):Dmitry Antipov2013-09-171-1/+0
| | | | | | | | | | | Declare here just once and unify the latter. * frame.c (check_x_display_info, x_get_string_resource): * nsterm.h (check_x_display_info): * xrdb.c (x_get_string_resource): * xterm.h (check_x_display_info): Remove prototypes. * nsfns.m (x_get_string_resource): Likewise. Adjust definition. * w32reg.c (x_get_string_resource): Likewise. (w32_get_rdb_resource): Adjust user.
* * xterm.h (struct x_display_info): New memberDmitry Antipov2013-09-171-0/+3
| | | | | | | | | | x_pending_autoraise_frame, going to replace... * xterm.c (pending_autoraise_frame): ...static variable. (x_new_focus_frame, XTread_socket): Adjust users. * w32term.h (struct w32_display_info): New member w32_pending_autoraise_frame, going to replace... * w32term.c (pending_autoraise_frame): ...global variable. (x_new_focus_frame, w32_read_socket): Adjust users.
* Don't overuse 'const' in types of locals.Paul Eggert2013-09-171-3/+3
| | | | | | | | | | | | | | | | | | | | * bidi.c (bidi_count_bytes): * gtkutil.c, gtkutil.h (xg_event_is_for_menubar) (xg_event_is_for_scrollbar): * xselect.c (x_handle_property_notify) (x_handle_selection_notify, x_handle_dnd_message): * xsettings.c, xsettings.h (xft_settings_event): * xterm.c (x_handle_net_wm_state, handle_one_event) (x_menubar_window_to_frame, x_detect_focus_change) (construct_mouse_click, note_mouse_movement) (x_scroll_bar_to_input_event, x_scroll_bar_expose) (x_scroll_bar_handle_click, x_scroll_bar_note_movement) (handle_one_xevent, x_handle_net_wm_state): * xterm.h (x_handle_property_notify, x_handle_selection_notify) (x_handle_dnd_message): Avoid unnecessary 'const', typically the second 'const' in 'const foo * const arg', a 'const' that does not affect the API and doesn't significantly help the human reader.
* Do not copy X event in handle_one_xevent except KeyPress case.Dmitry Antipov2013-09-161-9/+4
| | | | | | | | | | | | | | | | | | | | Wnen XEvent is processed, it is unlikely to be changed except KeyPress case, so we can avoid copying and use const pointer to const data to make sure that an event is not changed elsewhere. * xterm.c (handle_one_xevent): Change 2nd arg to 'const XEvent * const' and do not create local copy except for the KeyPress event. Use casts to avoid a few glitches. Adjust formatting. Add comments. (SET_SAVED_BUTTON_EVENT): Remove and move the code to the only user. (x_handle_net_wm_state, x_menubar_window_to_frame) (x_detect_focus_change, construct_mouse_click, note_mouse_movement) (x_scroll_bar_to_input_event, x_scroll_bar_expose) (x_scroll_bar_handle_click, x_scroll_bar_note_movement): * gtkutil.c (xg_event_is_for_menubar, xg_event_is_for_scrollbar): * xselect.c (x_handle_property_notify, x_handle_selection_notify) (x_handle_dnd_message): * xsettings.c (xft_settings_event): Use 'const XEvent * const' where appropriate. * xterm.h, gtkutil.h, xsettngs.h: Adjust related prototypes.
* Drop VERTICAL_SCROLL_BAR_WIDTH_TRIM. For X, it is zero since 1999,Dmitry Antipov2013-09-151-7/+1
| | | | | | | | | | | | | and it is always zero for others, so I assume that this is an ancient leftover which nobody will want to change any more. * xterm.h, w32term.h, nsterm.h (VERTICAL_SCROLL_BAR_WIDTH_TRIM): Remove. (VERTICAL_SCROLL_BAR_INSIDE_WIDTH): * frame.c (x_set_scroll_bar_width): * w32fns.c (w32_createscrollbar): * w32term.c (w32_set_vertical_scroll_bar): * xfns.c (x_set_scroll_bar_default_width): * xterm.c (XTflash, x_scroll_bar_create, XTset_vertical_scroll_bar) (x_scroll_bar_expose): Related users changed.
* * xterm.h (SCROLL_BAR_X_WIDGET, SET_SCROLL_BAR_X_WIDGET) [USE_X_TOOLKIT]:Dmitry Antipov2013-09-151-0/+2
| | | | | | Define as such. * w32term.h (SCROLL_BAR_X_WIDGET, SET_SCROLL_BAR_X_WIDGET): Remove unused Xisms.
* * frame.h (FRAME_SMALLEST_CHAR_WIDTH, FRAME_SMALLEST_FONT_HEIGHT):Dmitry Antipov2013-09-151-10/+0
| | | | | Define once here... * nsterm.h, w32term.h, xterm.h: ...and not here.
* * xterm.h (FRAME_X_SCREEN_NUMBER): Add comment.Dmitry Antipov2013-09-151-4/+7
| | | | (BLACK_PIX_DEFAULT, WHITE_PIX_DEFAULT): Use FRAME_X_SCREEN_NUMBER.
* Unify FRAME_window_system_DISPLAY_INFO macros between all ports.Dmitry Antipov2013-09-131-9/+9
| | | | | | | | | | | | | | | | All of them are replaced with FRAME_DISPLAY_INFO, defined in each port to reference the port-specific window system data. * msdos.h (FRAME_X_DISPLAY_INFO): Remove. (FRAME_DISPLAY_INFO): Define. * w32term.h (FRAME_W32_DISPLAY_INFO, FRAME_X_DISPLAY_INFO): Remove. (FRAME_DISPLAY_INFO): Define. Adjust users. * xterm.h (FRAME_X_DISPLAY_INFO): Remove. (FRAME_DISPLAY_INFO): Define. Adjust users. * frame.h (FRAME_RES_X, FRAME_RES_Y): Unify. * font.c, frame.c, gtkutil.c, image.c, menu.c, msdos.c, nsfns.m: * nsfont.m, nsterm.m, w32fns.c, w32font.c, w32menu.c, w32term.c: * w32xfns.c, widget.c, xdisp.c, xfaces.c, xfns.c, xfont.c, xmenu.c: * xselect.c, xterm.c: All related users changed.
* * xterm.h (x_window_to_frame, x_any_window_to_frame)Dmitry Antipov2013-09-131-15/+1
| | | | | | | | | | (x_menubar_window_to_frame): Remove prototypes. * xfns.c (x_window_to_frame, x_any_window_to_frame) (x_menubar_window_to_frame, x_top_window_to_frame): Move from here... * xterm.c (x_window_to_frame, x_any_window_to_frame) (x_menubar_window_to_frame, x_top_window_to_frame): ...to here and convert all but the last to static.
* * xterm.h (x_display_info): New field last_user_time...Dmitry Antipov2013-09-121-0/+3
| | | | | * xterm.c (toplevel): ...to replace static last_user_time. (handle_one_xevent, x_ewmh_activate_frame): Adjust users.
* Cleaning up a few X scroll bar bits.Dmitry Antipov2013-09-111-0/+5
| | | | | | | | | | | | | | | * termhooks.h (enum scroll_bar_part): Add scroll_bar_nowhere member. * xterm.h (struct scroll_bar) [USE_TOOLKIT_SCROLL_BARS && USE_LUCID]: New member last_seen_part, going to replace... * xterm.c [USE_TOOLKIT_SCROLL_BARS]: ...global last_scroll_bar_part. (xt_action_hook) [USE_LUCID]: Adjust user. (xm_scroll_callback, xg_scroll_callback): Do not bloat with Lucid-specific scroll bar support. (xaw_jump_callback, xaw_scroll_callback): Prefer enum scroll_par_part to int and adjust to use last_seen_part member. (x_set_toolkit_scroll_bar_thumb) [USE_LUCID]: Adjust user. (x_scroll_bar_create) [USE_TOOLKIT_SCROLL_BARS && USE_LUCID]: Initialize last_seen_part.
* * xterm.h (struct x_display_info): Do not track X connectionDmitry Antipov2013-09-041-3/+0
| | | | | | fd separately because it is always available from Display. * xterm.c (x_term_init, x_delete_terminal, x_delete_display): Adjust users.
* * xterm.h (struct x_output): Remove set-but-unusedDmitry Antipov2013-09-031-5/+0
| | | | | leftovers 'left_before_move' and 'top_before_move'. * xterm.c (x_set_offset): User changed.
* * xterm.h (struct scroll_bar): Prefer int to Lisp_ObjectDmitry Antipov2013-09-031-2/+2
| | | | | | | | | | | for 'dragging' member. * gtkutil.c (xg_set_toolkit_scroll_bar_thumb): * xterm.c (xt_action_hook, xm_scroll_callback, xg_scroll_callback) (xg_end_scroll_callback, xaw_jump_callback, xaw_scroll_callback) (x_set_toolkit_scroll_bar_thumb, x_scroll_bar_create) (x_scroll_bar_set_handle, XTset_vertical_scroll_bar) (x_scroll_bar_handle_click, x_scroll_bar_note_movement) (x_scroll_bar_report_motion): Related users changed.
* Minor cleanup to avoid forward declarations.Dmitry Antipov2013-08-301-18/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | * coding.h (struct ccl_spec): Remove forward declaration. * composite.h (toplevel): Include font.h. (struct composition_it, struct face, struct font_metrics): Remove forward declaration. * dispextern.h (struct image, struct atimer): Likewise. * emacsgtkfixed.h (struct frame): Likewise. * emacsgtkfixed.c (toplevel): Reorder headers and drop stdio.h. * font.h (struct font_driver, struct font, struct glyph_string) (struct face): Remove forward declaration. * fontset.h (struct face, struct font): Likewise. * frame.h (toplevel): Style cleanup. (enum output_method): Move to... * termhooks.h (enum output_method): ...here. (struct glyph, struct frame, struct ns_display_info) (struct x_display_info, struct w32_display_info): Remove forward declaration. * xterm.h (toplevel): Include termhooks.h. (struct font, struct window, struct glyph_matrix, struct frame) (struct input_event, struct face, struct image): Remove forward declaration. * gtkutil.h (struct _widget_value): Likewise. * keyboard.h (toplevel): Include termhooks.h. (struct input_event): Remove forward declaration.
* * xterm.c (x_clear_area): Lost 7th arg because it is always False.Dmitry Antipov2013-08-291-1/+1
| | | | | | | | | (x_after_update_window_line, x_scroll_bar_create): (x_scroll_bar_set_handle, XTset_vertical_scroll_bar): (handle_one_xevent, x_clear_frame_area): * gtkutil.c (xg_clear_under_internal_border, xg_update_scrollbar_pos): * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines): Adjust users. * xterm.h (x_clear_area): Adjust prototype.
* * xterm.h (FONT_TYPE_FOR_UNIBYTE, FONT_TYPE_FOR_MULTIBYTE:)Dmitry Antipov2013-08-271-5/+0
| | | | | | | | | * nsterm.h (FONT_TYPE_FOR_UNIBYTE, FONT_TYPE_FOR_MULTIBYTE): Remove the leftovers. * gtkutil.c (toplevel): Do not declare Qxft but include font.h to do so. * image.c (toplevel): Do not declare Vlibrary_cache because it's already done in lisp.h.
* * lisp.h (Mouse_HLInfo): Move from here...Dmitry Antipov2013-08-271-0/+2
| | | | | | | | | | | | | | | | | * dispextern.h (Mouse_HLInfo): ...to here and offload lisp.h. (reset_mouse_highlight): New function. * msdos.c (dos_set_window_size, IT_update_begin) (internal_terminal_init): * nsterm.m (ns_update_window_end, x_free_frame_resources) (ns_initialize_display_info): * w32console.c (initialize_w32_display): * w32term.c (x_update_window_end, x_free_frame_resources) (w32_initialize_display_info): * xterm.c (x_update_window_end, x_free_frame_resources, x_term_init): * window.c (Fdelete_other_windows_internal): * xdisp.c (clear_mouse_face, cancel_mouse_face): Use it. * termchar.h (toplevel): * xterm.h (toplevel): Include dispextern.h.
* * window.h (WINDOW_FRINGE_EXTENDED_P): New macro.Dmitry Antipov2013-08-131-1/+1
| | | | | | | | | | | | | * nsterm.m (ns_set_vertical_scroll_bar): Use it. Use convenient bool instead of BOOL. * w32term.h (struct scroll_bar): Convert fringe_extended_p from Lisp_Object to bitfield. Adjust comment. * w32term.c (x_scroll_bar_create): Adjust user. Use WINDOW_FRINGE_EXTENDED_P and bool for boolean. * xterm.c (XTset_vertical_scroll_bar): Likewise. Use bool for boolean. * xterm.h (struct scroll_bar): Prefer commonly used `unsigned' to `unsigned int' when defining a bitfield.
* * xterm.h (struct x_output) [HAVE_X_I18N]: Remove xic_base_fontnameDmitry Antipov2013-08-021-2/+0
| | | | | | | | | | member which is not really used any more. (FRAME_XIC_BASE_FONTNAME): Remove. * xfns.c (xic_free_fontset): Adjust user. * xmenu.c (mouse_position_for_popup, x_activate_menubar) (update_frame_menubar, set_frame_menubar, free_frame_menubar) (create_and_show_popup_menu, xmenu_show, create_and_show_dialog) (xdialog_show): Use eassert for debugging check.
* * xterm.c (any_help_event_p, x_draw_glyph_string_background):Dmitry Antipov2013-08-011-1/+1
| | | | | | | (x_display_ok): Use bool for booleans. (x_draw_glyph_string_background, cvt_string_to_pixel): (cvt_pixel_dtor): Drop unnecessary prototypes. * xterm.h (x_display_ok): Adjust prototype.
* Drop unnecessary functions that deals with frame pixel size.Dmitry Antipov2013-07-311-2/+0
| | | | | | | | | | | | * frame.h, msdos.h, w32term.h, xterm.h (x_pixel_width) (x_pixel_height): Drop prototypes. * msdos.c, nsfns.m, w32fns.c, xfns.c (x_pixel_width) (x_pixel_height): Drop implementations. * frame.c (Fframe_pixel_height): Use FRAME_PIXEL_HEIGHT which should be always valid for window frame. (Frame_pixel_width): Likewise with FRAME_PIXEL_WIDTH. * w32menu.c (Fx_popup_dialog): * xmenu.c (Fx_popup_dialog): Likewise for both.
* * fringe.c (draw_window_fringes, update_window_fringes)Dmitry Antipov2013-07-301-1/+1
| | | | | | | | | | | | | | | | | | | (compute_fringe_widths): * w32term.c (x_draw_glyph_string): * window.c (candidate_window_p, Frecenter): * xfaces.c (realize_basic_faces, realize_default_face) (Fbitmap_space_p, Finternal_set_lisp_face_attribute) (x_update_menu_appearance, face_attr_equal_p, lface_equal_p): * xfns.c (x_set_cursor_color, xic_free_xfontset): * xmenu.c (Fx_menu_bar_open_internal): * xselect.c (x_reply_selection_request, Fx_get_atom_name): * xsettings.c (xft_settings_event): * xterm.c (x_draw_glyph_string, x_had_errors_p): Use bool for booleans. Adjust style and comments where appropriate. * dispextern.h (draw_window_fringes, update_window_fringes) (compute_fringe_widths): * xterm.h (x_had_errors_p): Adjust prototype.
* Remove duplicate #include directives.Paul Eggert2013-07-051-2/+0
| | | | | | | | | | | | | | | | * alloc.c [GC_MARK_STACK == GC_USE_GCPROS_CHECK_ZOMBIES]: * xfaces.c: Don't include stdio.h twice. * buffer.c [USE_MMAP_FOR_BUFFERS]: Don't include sys/types.h or stdio.h twice. * fileio.c [WINDOWSNT | MSDOS]: Don't include fcntl.h twice. * lread.c: Don't include coding.h twice. * nsfont.m: Don't include frame.h twice. * process.c [HAVE_RES_INIT]: Don't include <netinet/in.h> twice. * ralloc.c: Don't include <unistd.h> twice. * xdisp.c: Don't include font.h twice. * xterm.c: Don't include fontset.h twice. * xterm.h [USE_X_TOOLKIT]: Don't include X11/StringDefs.h twice.
* * xterm.h (GTK_PREREQ): Remove, replacing with GTK_CHECK_VERSION.Paul Eggert2013-05-091-7/+15
| | | | | | (GTK_CHECK_VERSION): New macro, if not already defined. All uses of GTK_PREREQ, GTK_MAJOR_VERSION, etc. replaced by GTK_CHECK_VERSION.
* * xterm.h (GTK_PREREQ): New macro.Paul Eggert2013-05-081-1/+5
| | | | | All simple uses of GTK_MAJOR_VERSION and GTK_MINOR_VERSION changed to use this macro instead, for consistency and clarity.
* Add multi-monitor support on X11.YAMAMOTO Mitsuharu2013-05-071-1/+2
|
* Get rid of some platform-specific functions examining windowDmitry Antipov2013-04-071-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | system and its capabilities. This is a partial rework of the 2013-04-05 change. * lisp.h (have_menus_p): Remove prototype. This function is replaced with platform-independent window_system_available. (check_window_system): Move to... * frame.h (decode_window_system_frame, window_system_available): ...here, add new prototypes. * frame.c (window_system_available, decode_window_system_frame): New functions. (check_window_system): Platform-independent now. * xterm.h (x_in_use): Remove declaration. (check_x_frame): * w32term.h (check_x_frame): * nsterm.h (check_x_frame): Remove prototypes. This function is replaced with platform-independent decode_window_system_frame. * msdos.c (have_menus_p): Remove. * nsfns.m (check_window_system, have_menus_p, check_ns_frame): Remove platform-specific functions. Use check_window_system, decode_window_system_frame and check_ns_display_info where appropriate. Minor style and comment tweaks. * w32fns.c (w32_in_use, check_window_system, have_menus_p) (check_x_frame): Likewise. * xfns.c (x_in_use, check_window_system, have_menus_p, check_x_frame): Likewise. * fileio.c, fns.c, font.c, fontset.c, image.c, menu.c, nsmenu.m: * nsselect.m, nsterm.m, w32font.c, w32menu.c, xfaces.c, xgselect.c: * xmenu.c, xselect.c: All related users changed.
* Consistently use platform-specific function to detect window system.Dmitry Antipov2013-04-051-4/+0
| | | | | | | | | | | | | | | | | | * lisp.h (check_window_system): New prototype. This function is going to replace check_x, check_w32 and check_ns. (have_menus_p): Mention msdos.c in comment. * fontset.c (check_window_system_func): Remove. Adjust all users. * fontset.h (check_window_system_func): Remove prototype. * nsterm.h (check_ns): * xterm.h (check_x): * w32term.h (check_w32): Likewise. * menu.c (Fx_popup_menu): Use check_window_system. * msdos.c (check_window_system): Define for MS-DOS. * nsfns.m (check_window_system): Define for NS. Adjust all users. * w32fns.c (check_window_system): Likewise for MS-Windows. * xfns.c (check_window_system): Likewise for X. * font.c, frame.c, nsmenu.m, nsselect.m, nsterm.m, w32menu.c: * xfaces.c, xmenu.c: Use check_window_system where appropriate.
* Merge from emacs-24; up to 2012-12-06T01:39:03Z!monnier@iro.umontreal.caPaul Eggert2013-01-021-1/+2
|\
| * Update copyright notices for 2013.Paul Eggert2013-01-011-1/+2
| |