aboutsummaryrefslogtreecommitdiffstats
path: root/src/nsterm.h
Commit message (Collapse)AuthorAgeFilesLines
* * lisp/cus-start.el (all): Add ns-use-native-fullscreen.Jan Djärv2013-02-051-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/nsmenu.m (update_frame_tool_bar): Check for negative tool bar height. * src/nsterm.h (HAVE_NATIVE_FS): Define if OSX => 10.7. (EmacsView): Add fs_is_native, fsIsNative, isFullscreen and updateCollectionBehaviour. * src/nsterm.m (NEW_STYLE_FS): Remove. (ns_last_use_native_fullscreen): New variable. (x_make_frame_visible): Replace NEW_STYLE_FS with isFullscreen. (x_set_window_size): Do not take title bar and tool bar into account if isFullscreen returns YES. (ns_fullscreen_hook): Replace NEW_STYLE_FS with isFullscreen. (check_native_fs): New function. (ns_select, ns_read_socket): Call check_native_fs if HAVE_NATIVE_FS. (ns_term_init): Remove NEW_STYLE_FS. (updateFrameSize:, windowWillResize:toSize:): Only adjust for title bar and tool bar if isFullscreen returns NO. (windowDidResize:): Replace NEW_STYLE_FS with fsIsNative. (initFrameFromEmacs:): Initialize fs_is_native. Replace NEW_STYLE_FS with HAVE_NATIVE_FS. (window:willUseFullScreenPresentationOptions:): New method. (windowDidEnterFullScreen:): Replace NEW_STYLE_FS with fsIsNative. Hide toolbar if not enabled. (windowDidExitFullScreen:): Call updateCollectionBehaviour. Restore tool bar if enabled, hide it otherwise (Bug#13444). (fsIsNative, isFullscreen, updateCollectionBehaviour): New methods. (toggleFullScreen:): If fs_is_native, call toggleFullScreen on window. Do no set FRAME_EXTERNAL_TOOL_BAR (f) to 0. Check FRAME_EXTERNAL_TOOL_BAR (f) before restoring FRAME_TOOLBAR_HEIGHT (f). Call updateFrameSize when going non-fs. (syms_of_nsterm): Add ns-use-native-fullscreen.
* * src/lisp.h (XSAVE_POINTER, XSAVE_INTEGER): Change to allow extractionDmitry Antipov2013-01-151-2/+2
| | | | | | | | | from any Lisp_Save_Value slot. Add type checking. * src/alloc.c, src/dired.c, src/editfns.c, src/fileio.c, src/ftfont.c: * src/gtkutil.c, src/keymap.c, src/lread.c, src/nsterm.h, src/nsmenu.c: * src/xfns.c, src/xmenu.c, src/xselect.c: All users changed. * admin/coccinelle/xsave.cocci: Semantic patch to adjust users of XSAVE_POINTER and XSAVE_INTEGER macros.
* Make Lisp_Save_Value more versatile storage for up to four objects.Dmitry Antipov2013-01-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | * lisp.h (toplevel): Enumeration to describe types of saved objects. (struct Lisp_Save_Value): New layout. Adjust comments. (XSAVE_POINTER): New macro. (XSAVE_INTEGER): Likewise. (allocate_misc): Add prototype. (free_misc): Likewise. * alloc.c (allocate_misc): Now global. (free_misc): Likewise. Adjust comment. (make_save_value): Use new Lisp_Save_Value layout. Adjust comment. (free_save_value): Likewise. (mark_object): Likewise. * editfns.c (save_excursion_save): Pack everything within Lisp_Save_Value and so avoid xmalloc. (save_excursion_restore): Adjust to match new layout. Use free_misc because we do not allocate extra memory any more. Add eassert. * print.c (print_object): New code to print Lisp_Save_Value. Do not rely on valid_lisp_object_p if !GC_MARK_STACK. Adjust comments. * dired.c, fileio.c, font.c, ftfont.c, gtkutil.c, keymap.c, * lread.c, nsmenu.m, nsterm.h, xfns.c, xmenu.c, xselect.c: Use XSAVE_POINTER and XSAVE_INTEGER where appropriate.
* Merge from emacs-24; up to 2012-12-06T01:39:[email protected]Paul Eggert2013-01-021-1/+2
|\
| * Update copyright notices for 2013.Paul Eggert2013-01-011-1/+2
| |
* | * frame.h (struct frame): Remove display_preempted memberDmitry Antipov2012-11-231-2/+1
|/ | | | | | | | | | | | | | | since all users are dead long ago. * nsterm.h (struct x_output): Use the only dummy member. * w32menu.c (pending_menu_activation): Remove since not really used. (set_frame_menubar): Adjust user. * w32term.h (struct x_output): Drop outdated #if 0 code. (struct w32_output): Use bitfields for explicit_parent, asked_for_visible and menubar_active members. Drop unused pending_menu_activation member. * xterm.h (struct x_output): Drop outdated #if 0 code. Use bitfields for explicit_parent, asked_for_visible, has_been_visible and net_wm_state_hidden_seen members.
* lread.c, macros.c, marker.c, menu.c, minibuf.c: Use bool for booleans.Paul Eggert2012-10-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | * lread.c (load_each_byte, new_backquote_flag, readchar) (read_filtered_event, lisp_file_lexically_bound_p) (safe_to_load_version, Fload, complete_filename_p, openp) (build_load_history, readevalloop, read_escape, read1) (string_to_number, read_vector, read_list): * macros.c (Fstart_kbd_macro): * marker.c (CONSIDER): * menu.c (parse_single_submenu, digest_single_submenu) (find_and_return_menu_selection, Fx_popup_menu): * minibuf.c (read_minibuf_noninteractive, read_minibuf) (Ftry_completion): * nsmenu.m (ns_update_menubar, runMenuAt:forFrame:keymaps:): (ns_menu_show): * xmenu.c (set_frame_menubar, create_and_show_popup_menu) (xmenu_show, xdialog_show): Use bool for booleans. * lread.c (safe_to_load_version): Rename from safe_to_load_p, as it's not a predicate. All uses changed. Omit unnecessary buffer termination.
* Check for OSX >= 10.4 to match what the maunal says and what we actually ↵Jan Djärv2012-10-071-9/+4
| | | | | | | | | | | | | | | | | | | | | | support. * configure.ac: Check that OSX is 10.4 or newer. * etc/NEWS (NextStep/OSX port changes): OSX 10.4 or newer is required. * src/nsfns.m (Fns_list_services): Remove comment and check for OSX < 10.4. (ns_do_applescript): Remove check for >= MAC_OS_X_VERSION_10_4. * src/nsimage.m (setPixmapData, getPixelAtX, setAlphaAtX): Remove onTiger. * src/nsmenu.m (fillWithWidgetValue:): Remove code for < MAC_OS_X_VERSION_10_2. * src/nsselect.m (ns_string_from_pasteboard): Remove check for >= MAC_OS_X_VERSION_10_4. * src/nsterm.h (MAC_OS_X_VERSION_10_3, onTiger): Remove. (EmacsApp): Remove check for >= MAC_OS_X_VERSION_10_4. (struct nsfont_info): Remove check for >= MAC_OS_X_VERSION_10_3.
* Handle fullscreen parameter in initial/defult-frame-alist for NS.Jan Djärv2012-10-061-1/+2
| | | | | | | | | | | | | | | | | | | | | * nsfns.m (Fx_create_frame): Call x_default_parameter with fullscreen/Fullscreen. * nsterm.h (EmacsView): Rename tbar_height to tibar_height. tobar_height is new. * nsterm.m (x_make_frame_visible): Check for fullscreen. (ns_fullscreen_hook): Activate old style fullscreen with a timer. (ns_term_init): Set activateIgnoringOtherApps if old style fullscreen. (windowDidResize:): Check for correct window if old style fullscreen. Capitalize word in comment. Remove incorrect comment. (initFrameFromEmacs:): tbar_height renamed tibar_height. (windowDidEnterFullScreen:): Toggle toolbar for fullscreen to fix error in drawing background. (toggleFullScreen:): Remove comment. Rearrange calls. Set toolbar values to zero, save old height in tobar_height. Restore tool bar height when leaving fullscreen. (canBecomeMainWindow): New function.
* Add support for fullscreen in the NS port.Jan Djärv2012-09-301-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * etc/NEWS: The NS port supports fullscreen. * src/nsfns.m (ns_frame_parm_handlers): Add x_set_fullscreen. * src/nsterm.h (MAC_OS_X_VERSION_10_7, MAC_OS_X_VERSION_10_8): New. (EmacsView): Add variables for fullscreen. (handleFS, setFSValue, toggleFullScreen): New in EmacsView. (EmacsFSWindow): New interface for fullscreen. * src/nsterm.m (NEW_STYLE_FS): New define. (ns_fullscreen_hook, windowWillEnterFullScreen) (windowDidEnterFullScreen, windowWillExitFullScreen) (windowDidExitFullScreen, toggleFullScreen, handleFS) (setFSValue): New functions. (EmacsFSWindow): New implementation. (canBecomeKeyWindow): New function for EmacsFSWindow. (ns_create_terminal): Set fullscreen_hook to ns_fullscreen_hook. (dealloc): Release nonfs_window if in fullscreen. (updateFrameSize:): Call windowDidMove to update top/left. (windowWillResize:toSize:): Check if frame is still maximized. (initFrameFromEmacs:): Initialize fs_state, fs_before_fs, next_maximized, maximized_width, maximized_height and nonfs_window. Call setCollectionBehavior if NEW_STYLE_FS. Initialize bwidth and tbar_height. (windowWillUseStandardFrame:defaultFrame:): Update frame parameter fullscreen. Set maximized_width/height. Act on next_maximized.
* image.c, indent.c: Use bool for booleans.Paul Eggert2012-09-241-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * dispextern.h (struct image_type): Members valid_p, load, init now return bool, not int. All uses changed. * image.c: Omit unnecessary static decls. (x_create_bitmap_mask, x_build_heuristic_mask): Return void, not int, since callers don't care about the return value. (x_create_bitmap_mask, define_image_type, valid_image_p) (struct image_keyword, parse_image_spec, image_spec_value) (check_image_size, image_background) (image_background_transparent, x_clear_image_1) (postprocess_image, lookup_image, x_check_image_size) (x_create_x_image_and_pixmap, xbm_image_p) (Create_Pixmap_From_Bitmap_Data, xbm_read_bitmap_data) (xbm_load_image, xbm_file_p, xbm_load, xpm_lookup_color) (init_xpm_functions, xpm_valid_color_symbols_p, xpm_image_p) (xpm_load, xpm_load_image, lookup_rgb_color, lookup_pixel_color) (x_to_xcolors, x_build_heuristic_mask, pbm_image_p, pbm_load) (png_image_p, init_png_functions, png_load_body, png_load) (jpeg_image_p, init_jpeg_functions, jpeg_load_body, jpeg_load) (tiff_image_p, init_tiff_functions, tiff_load, gif_image_p) (init_gif_functions, gif_load, imagemagick_image_p) (imagemagick_load_image, imagemagick_load, svg_image_p) (init_svg_functions, svg_load, svg_load_image, gs_image_p) (gs_load): * nsimage.m (ns_load_image): * nsterm.m (ns_defined_color): * xfaces.c (tty_lookup_color, tty_defined_color, defined_color): * xfns.c (x_defined_color): * xterm.c (x_alloc_lighter_color_for_widget) (x_alloc_nearest_color_1, x_alloc_nearest_color) (x_alloc_lighter_color): * indent.c (disptab_matches_widthtab, current_column) (scan_for_column, string_display_width, indented_beyond_p) (compute_motion, vmotion, Fvertical_motion): Use bool for booleans.
* * nsterm.h: Add delay parameter to updateFrameSize.Jan Djärv2012-09-111-1/+1
| | | | | | | | | * nsterm.m (ns_judge_scroll_bars): Pass NO to updateFrameSize. (updateFrameSize:): Add delay parameter to updateFrameSize, send it to change_frame_size. (windowDidResize:): Pass YES to updateFrameSize. Fixes: debbugs:12388
* * nsterm.h (EmacsView): Add updateFrameSize.Jan Djärv2012-09-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | * nsterm.m (ns_clip_to_row): Remove code that deals with drawing fringe in the internal border. (x_set_window_size): Remove static variables and their usage. (ns_redraw_scroll_bars): Fix NSTRACE arg. (ns_after_update_window_line, ns_draw_fringe_bitmap): Remove fringe/internal border adjustment. (ns_draw_fringe_bitmap): Make code more like other terms (xterm.c). (ns_draw_window_cursor): Remove fringe/internal border adjustment. (ns_fix_rect_ibw): Remove. (ns_get_glyph_string_clip_rect): Remove call to ns_fix_rect_ibw. (ns_dumpglyphs_box_or_relief): Ditto. (ns_maybe_dumpglyphs_background): Remove fringe/internal border adjustment. (ns_dumpglyphs_image): Ditto. (ns_dumpglyphs_stretch): Fix coding style. Remove fringe/internal border adjustment. (ns_set_vertical_scroll_bar): Remove variables barOnVeryLeft/Right and their usage. Add fringe_extended_p and its use as in other terms. (ns_judge_scroll_bars): Code style fix. Call updateFrameSize if scroll bar was removed. (updateFrameSize): New function. (windowDidResize): Move code to updateFrameSize and call it. Fixes: debbugs:11052
* Refactor window-system configurationDaniel Colascione2012-08-311-25/+2
| | | | | | | | | | This change streamlines the window system selection code in configure.in and moves many common function declarations from window-specific headers to frame.h. It introduces a new TERM_HEADER macro in config.h: we set this macro to the right header to use for the window system for which we're compiling Emacs and have source files include it indirectly. This way, we don't have to teach every file about every window system.
* Improve NS dialogs. Add close button, remove ugly casts.Jan Djärv2012-08-281-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | * nsmenu.m (initWithContentRect:styleMask:backing:defer:): Initialize button_values to NULL. Call setStykeMask so dialogs get a close button. (windowShouldClose:): Set window_closed. (dealloc): New member, free button_values. (process_dialog:): Make member function. Remove window argument, replace window with self. Count buttons and allocate and store values in button_values. (addButton:value:row:): value is int with the name tag. Call setTag with tag. Remove return self, declare return value as void. (addString:row:): Remove return self, declare return value as void. (addSplit): Remove return self, declare return value as void. (clicked:): Remove return self, declare return value as void. Set dialog_return to button_values[seltag]. Code formatting change. (initFromContents:isQuestion:): Adjust call to process_dialog. Code formatting change. (timeout_handler:): Set timer_fired to YES. (runDialogAt:): Set timer_fired to NO. Handle click on close button as quit. * nsterm.h (EmacsDialogPanel): Make timer_fired BOOL. Add window_closed and button_values. Add void as return value for add(Button|String|Split). addButton takes int instead of Lisp_Object. Add process_dialog as new member.
* * nsmenu.m (initWithContentRect:styleMask:backing:defer:): InitializeJan Djärv2012-08-271-0/+1
| | | | | | | | | | | | | | dialog_return. (windowShouldClose:): Use stop instead of stopModalWithCode. (clicked:): Ditto, and also set dialog_return. (timeout_handler:): Use stop instead of abortModal. Send a dummy event. (runDialogAt:): Make ret Lisp_Object. Set it from dialog_return when modal loop returns. * nsterm.h (NSPanel): New class variable dialog_return. Fixes: debbugs:12258
* Fix average font width calculation on NS.Chong Yidong2012-08-161-1/+4
| | | | | | | | * src/nsfont.m (nsfont_open): Similar to the Xft backend, set min_width to space_width and average_width to the average over printable ASCII characters. (ns_char_width): Code cleanup. (ns_ascii_average_width): New utility function.
* Improve event loop on NS so that no polling is used.Jan Djärv2012-08-151-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * nsmenu.m (popupSession): Remove. (pop_down_menu): Remove endModalSession. (timeout_handler:): New method. (runDialogAt:): Get next timeout. Start a NSTimer with that timeout. Call runModalForWindow. Check timer_fired when it returns. If not set, cancel timer and break out of loop. Otherwise loop again, with a new timeout. * nsterm.h (EmacsApp): fd_handler takes id argument. (EmacsDialogPanel): Add timer_fired and timeout_handler. * nsterm.m: Include fcntl.h if present. (fd_entry, t_readfds, inNsSelect): Remove. (select_writefds, select_valid, select_timeout, selfds) (select_mutex, apploopnr): Add. (EV_TRAILER): Call kbd_buffer_store_event_hold only if q_event_ptr. Otherwise call kbd_buffer_store_event. (ns_send_appdefined): Remove release of fd_entry. (ns_read_socket): Always send appdefined. Remove inNsSelect check. Increment and decrement apploopnr. (ns_select): If no file descriptors, just do a NSTimer. Otherwise copy read/write masks and start select thread (fd_handler). Start main loop and wait for application defined event. Inform select thread to stop selecting after main loop is exited. (ns_term_init): Create selfds pipe and set non-blocking. Initialize select_mutex. Start the select thread (fd_handler). (fd_handler:): Loop forever, wait for info from the main thread to either start or stop selecting. When select returns, send and appdefined event. (sendScrollEventAtLoc:fromEvent:): Check if q_event_ptr is set. If not call kbd_buffer_store_event.
* Define Qnone once for all platforms.Dmitry Antipov2012-08-101-1/+0
| | | | | | | | * frame.c (Qnone): Define here. (syms_of_frame): DEFSYM it. * lisp.h (Qnone): New declaration. * nsfns.m, nsterm.h, nsterm.m, w32fns.c, w32font.c: * xfns.c: Remove duplication. Adjust users.
* Remove compiler warnings in objective-C files.Jan Djärv2012-07-131-11/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * nsfns.m (x_set_icon_name, ns_set_name_internal) (ns_set_name_as_filename, ns_implicitly_set_icon_type) (x_set_icon_type, ns_lisp_to_cursor_type, Fns_read_file_name) (Fns_get_resource, Fns_set_resource, Fx_open_connection) (Fns_font_name, Fns_perform_service) (Fns_convert_utf8_nfd_to_nfc, ns_do_applescript) (Fns_do_applescript, Fx_show_tip): Use SSDATA where appropriate. (ns_set_name): Remove unused variable view. (x_set_menu_bar_lines): Remove unused variable olines. (x_set_tool_bar_lines): Remove unused variable root_window. (Fns_list_colors): Put () around assignment in while statement. (Fns_perform_service): Remove unused variable len. (Fns_display_usable_bounds): Remove unused variable top. (syms_of_nsfns): Remove unused variable i. * nsfont.m (ns_get_family, ns_lang_to_script, ns_otf_to_script) (ns_registry_to_script, ns_get_req_script, nsfont_open): Use SSDATA where appropriate. (ns_get_covering_families, ns_findfonts, nsfont_list_family): Put () around assignment in loop statement. (nsfont_open): Remove unused variable i. (nsfont_open): Remove unused variable len. (nsfont_draw): Remove unused variable cs. * nsimage.m (ns_load_image, allocInitFromFile): Use SSDATA where appropriate. (setXBMColor): Remove unused variable len. (setPixmapData): Put () around assignment in loop statement. * nsmenu.m (ns_update_menubar, ns_menu_show, process_dialog) (initFromContents): Use SSDATA where appropriate. (ns_update_menubar): Add braces to ambigous if-else. (initWithTitle): Put () around assignment in if statement. (ns_menu_show): Remove unused variables window and keymap. (update_frame_tool_bar): Remove unused variable selected_p. (initWithContentRect): Remove unused variable this_cmd_name. * nsterm.h (menuDown): Add id as type to argument sender. (ns_display_info_for_name): Add Lisp_Object argument. (ns_term_init): Add Lisp_Object argument. (ns_map_event_to_object): Add void argument. (ns_string_from_pasteboard, ns_string_to_pasteboard): Add correct prototype with arguments and only declare if __OBJC__. (nxatoms_of_nsselect): Add void argument. (ns_lisp_to_cursor_type): Add Lisp_Object argument. (ns_alloc_autorelease_pool): Add void argument. (ns_release_autorelease_pool): Add void* argument. (ns_get_defaults_value): Add const char* argument. * nsterm.m (uRect): Only define if NS_IMPL_GNUSTEP. (x_free_frame_resources): Pass x_free_frame_resources to NSTRACE. (ns_lisp_to_color, ns_string_to_lispmod, ns_term_init) (ns_term_shutdown, requestService, initFrameFromEmacs): Use SSDATA where appropriate. (ns_exec_path, ns_load_path, changeFont): Put () around assignment used as boolean expression. (x_set_window_size): Remove unused variable toolbar. (ns_get_color_default, ns_mod_to_lisp): Remove. (ns_mouse_position): Remove unused variables xchar and ychar. (ns_compute_glyph_string_overhangs): Remove unused variable face. (ns_set_vertical_scroll_bar): Remove unused variable count. (ns_delete_terminal): Remove unused variable i. (ns_term_init): Remove unused variables r, g and b. (mouseDown): Remove unused variable window. (windowDidResize): Move definition of theWindow inside NS_IMPL_GNUSTEP. (initFrameFromEmacs): Remove unused variable vbextra. (mouseEntered): Remove unused variables p and dpyinfo. (mouseExited): Remove unused variables p and r. (ns_define_frame_cursor, ns_clear_frame_area) (ns_draw_window_cursor, ns_initialize_display_info): Make static. (menuDown): Assign [sender tag] to variable and cast the variable.
* Stop ns builds setting the EMACSLOADPATH environment variableGlenn Morris2012-07-091-1/+1
| | | | | | | | | | | | | | Ref bugs 4309, 6401, etc. This is the last environment variable (ab)used by the ns port in this way. * src/nsterm.m (ns_load_path): Rename from ns_init_paths. Now it does not set EMACSLOADPATH, just returns the load-path string. * src/nsterm.h: Update accordingly. * src/lread.c [HAVE_NS]: Include nsterm.h. (init_lread) [HAVE_NS]: Use ns_load_path. * src/emacs.c (main) [HAVE_NS]: No longer call ns_init_paths.
* Stop ns builds setting the EMACSPATH environment variableGlenn Morris2012-07-091-0/+1
| | | | | | | | | | | Ref bugs 4309, 6401, etc * src/nsterm.m (ns_exec_path): New function, split from ns_init_paths. (ns_init_paths): Do not set EMACSPATH. * src/nsterm.h (ns_exec_path): Add it. * src/callproc.c (init_callproc_1, init_callproc) [HAVE_NS]: Use ns_exec_path.
* * src/nsterm.m, src/nsterm.h (ns_etc_directory): Fix type, empty return.Glenn Morris2012-07-091-1/+1
|
* Stop ns builds polluting the environment with EMACSDATA, EMACSDOCGlenn Morris2012-07-091-0/+1
| | | | | | | | | | | | | It's bad form for one part of a program to communicate with another part by making persistent changes to the environment of all subsequent child processes. For example, it can cause odd bugs when building Emacs from within Emacs (eg bug#6401, maybe). * nsterm.m (ns_etc_directory): New function, split from ns_init_paths. (ns_init_paths): Do not set EMACSDATA, EMACSDOC. * nsterm.h (ns_etc_directory): Add it. * callproc.c [HAVE_NS]: Include nsterm.h. (init_callproc_1, init_callproc) [HAVE_NS]: Use ns_etc_directory.
* Auto-generate EXFUN using make-docfileTom Tromey2012-07-031-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | src * window.c (Fset_window_margins, Fset_window_fringes) (Fset_window_scroll_bars, Fset_window_vscroll): No longer static. * textprop.c (Fprevious_property_change): No longer static. * syntax.c (Fsyntax_table_p): No longer static. * process.c (Fget_process, Fprocess_datagram_address): No longer static. * keymap.c (Flookup_key, Fcopy_keymap): No longer static. * keyboard.c (Fcommand_execute): No longer static. Remove EXFUN. * insdel.c (Fcombine_after_change_execute): No longer static. * image.c (Finit_image_library): No longer static. * fileio.c (Fmake_symbolic_link): No longer static. * eval.c (Ffetch_bytecode): No longer static. * editfns.c (Fuser_full_name): No longer static. * doc.c: (Fdocumentation_property, Fsnarf_documentation): No longer static. * buffer.c (Fset_buffer_major_mode, Fdelete_overlay): No longer static. * dired.c (Ffile_attributes): No longer static. * composite.c (Fcomposition_get_gstring): No longer static. * callproc.c (Fgetenv_internal): No longer static. * ccl.h: Remove EXFUNs. * buffer.h: Remove EXFUNs. * dispextern.h: Remove EXFUNs. * intervals.h: Remove EXFUNs. * fontset.h: Remove EXFUN. * font.h: Remove EXFUNs. * dosfns.c (system_process_attributes): Remove EXFUN. * keymap.h: Remove EXFUNs. * lisp.h: Remove EXFUNs. * w32term.h: Remove EXFUNs. * window.h: Remove EXFUNs. * xsettings.h: Remove EXFUN. * xterm.h: Remove EXFUN. lib-src * make-docfile.c (enum global_type) <FUNCTION>: New constant. (struct global) <value>: New field. (add_global): Add 'value' argument. (compare_globals): Sort functions at the end. (close_emacs_globals): New function. (write_globals): Handle functions. (scan_c_file): Call add_global for DEFUN.
* Support higher-resolution time stamps.Paul Eggert2012-06-221-1/+2
| | | | Fixes: debbugs:9000
* Add 2012 to FSF copyright years for Emacs filesGlenn Morris2012-01-051-1/+1
|
* * nsterm.h (x_free_frame_resources): Declare.Jan Djärv2011-12-101-0/+1
|
* Don't crash on bad user input.Jan Djärv2011-12-101-0/+1
| | | | | | | | | | | * nsfns.m (ns_get_defaults_value): New function. (Fns_get_resource, x_get_string_resource): Call ns_get_defaults_value. * nsterm.h (ns_get_defaults_value): Declare. * nsterm.m (ns_default): Call ns_get_defaults_value. Fixes: debbugs:10103
* Fix typos.Juanma Barranquero2011-11-201-1/+1
|
* Fix typos.Juanma Barranquero2011-11-161-1/+1
|
* Whitespace changes.Juanma Barranquero2011-09-091-1/+1
|
* Merge from trunk.Paul Eggert2011-08-141-0/+3
|\
| * Fix that executing applescript may hang emacs uninterruptedly.Jan Djärv2011-08-141-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * nsfns.m (as_script, as_result, as_status): New static variables. (ns_run_ascript): New function. (Fns_do_applescript): Set variables as_*. Make an NSApplicationDefined event with data2 set to NSAPP_DATA2_RUNASSCRIPT, post it and then start the event loop. Get status from as_status. * nsterm.h (ns_run_ascript): Declare. (NSAPP_DATA2_RUNASSCRIPT): Define. * nsterm.m (sendEvent): If event is NSApplicationDefined and data2 is NSAPP_DATA2_RUNASSCRIPT, call ns_run_ascript and then exit the event loop (Bug#7276).
* | Merge from trunk.Paul Eggert2011-07-281-1/+7
|\|
| * Fix for raise display property on NS (Bug#8913).Alp Aker2011-07-281-1/+0
| | | | | | | | | | | | | | | | * src/nsfont.m (nsfont_open): Remove assignment to voffset and unnecessary vars hshink, expand, hd, full_height, min_height. (nsfont_draw): Use s->ybase as baseline for glyph drawing. * src/nsterm.h (nsfont_info): Remove voffset field.
| * Implement strike-through and overline on NextStep (Bug#8863).Alp Aker2011-07-281-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/nsfont.m (nsfont_open): Use underline position provided by font, instead of hard-coded value of 2. (nsfont_draw): Call ns_draw_text_decoration instead. * src/nsterm.h: Add declaration for ns_draw_text_decoration. * src/nsterm.m (ns_draw_text_decoration): New function for drawing underline, overline, and strike-through. (ns_dumpglyphs_image, ns_dumpglyphs_stretch): Add call to ns_draw_text_decoration. Change treatment of cursor drawing to accomodate underlining, etc.
* | * nsterm.h (struct ns_color_table.size, struct ns_color_table.avail):Paul Eggert2011-07-281-2/+2
|/ | | | | | Now ptrdiff_t, not int. * nsterm.m (ns_index_color): Use ptrdiff_t, not int, for table indexes. (ns_draw_fringe_bitmap): Rewrite to avoid overflow.
* Fix warnings in ns*m files: Replace deprecated methods, declare new interfaces. Jan Djärv2011-07-081-5/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | * emacs.c: Declare unexec_init_emacs_zone. * nsfns.m (check_ns_display_info): Cast to long and use %ld in error to avoid warning. * nsimage.m (allocInitFromFile): Don't use deprecated method bestRepresentationForDevice on OSX >= 10.6. * nsmenu.m (fillWithWidgetValue): Don't use depercated method sizeToFit on OSX >= 10.2. * nsselect.m (ns_string_from_pasteboard): Don't use deprecated methods cString and lossyCString on OSX >= 10.4 * nsterm.h (MAC_OS_X_VERSION_10_3, MAC_OS_X_VERSION_10_4) (MAC_OS_X_VERSION_10_5): Define if not defined. (EmacsView, EmacsTooltip): Implements NSWindowDelegate on OSX >= 10.6. (EmacsMenu): Implements NSMenuDelegate on OSX >= 10.6. (EmacsToolbar): Implements NSToolbarDelegate on OSX >= 10.6. * nsterm.m (keyDown): Call to wantsToDelayTextChangeNotifications and variable firstTime not needed on OSX >= 10.6. (setPosition): setFloatValue:knobProportion: is deprecated on OSX >= 10.5. Use setKnobProportion, setDoubleValue.
* Fix services menu empty on OSX 1.6+.Jan Djärv2011-07-081-0/+8
| | | | | | | | | | | | | | | | | | | | | | | * nsfns.m (Fx_open_connection): Remove NSStringPboardType from ns_return_types. (Fns_list_services): Just return Qnil on 10.6, code not working there. * nsmenu.m (ns_update_menubar): Remove useless setDelegate call on svcsMenu. * nsselect.m (ns_get_local_selection): Change to extern (Bug#8842). * nsterm.h (MAC_OS_X_VERSION_10_6): Define here instead of nsterm.m. (ns_get_local_selection): Declare. * nsterm.m (QUTF8_STRING): Declare. (initFrameFromEmacs): Call registerServicesMenuSendTypes. (validRequestorForSendType): Return type is (id). Change indexOfObjectIdenticalTo to indexOfObject. Check if we have local selection before returning self (Bug#8842). (writeSelectionToPasteboard): Put local selection into paste board if we have a local selection (Bug#8842). (syms_of_nsterm): DEFSYM QUTF8_STRING.
* * dispextern.h (struct face.stipple):Paul Eggert2011-06-211-3/+2
| | | | | | | | | | | | | | | | | | * image.c (x_bitmap_height, x_bitmap_width, x_bitmap_pixmap) (x_bitmap_mask, x_allocate_bitmap_record) (x_create_bitmap_from_data, x_create_bitmap_from_file) (x_destroy_bitmap, x_destroy_all_bitmaps, x_create_bitmap_mask) (x_create_bitmap_from_xpm_data): * nsterm.h (struct ns_display_info.bitmaps_size, .bitmaps_last): * w32term.h (struct w32_display_info.icon_bitmap_id, .bitmaps_size) (.bitmaps_last): * xfaces.c (load_pixmap): * xterm.c (x_bitmap_icon, x_wm_set_icon_pixmap): * xterm.h (struct x_display_info.icon_bitmap_id, .bitmaps_size) (.bitmaps_last, struct x_output.icon_bitmap): Use ptrdiff_t, not int, for bitmap indexes. (x_allocate_bitmap_record): Check for size overflow. * dispextern.h, lisp.h: Adjust to API changes elsewhere.
* Convert consecutive FSF copyright years to ranges.Glenn Morris2011-01-241-1/+1
|
* Make Nextstep port handle multiple screens for resize and move.Jan Djärv2011-01-211-0/+7
| | | | | | | | | | | | | | | | | | | | | | | * nsterm.h (ns_output): Add dont_constrain and zooming. (EmacsView): Add ns_userRect. * nsterm.m (keyDown): If ns_right_alternate_modifier is Qleft, check if ns_alternate_modifier is none. * nsterm.m (x_set_offset, windowDidMove): When calculating y, use first screen, not the window screen. (x_set_window_size): Remove constraints. Calculate origin.y only if zooming is 0 and without referring to a screen. (windowWillResize): Don't modify frameSize. (windowDidBecomeKey, mouseDown): Set dont_constrain to 1. (initFrameFromEmacs): Initialize ns_userRect. (windowShouldZoom): Set zooming to one. Remove all other code. (windowWillUseStandardFrame): Move static ns_userRect to EmacsView. Zero it after restore. (constrainFrameRect): New method for EmacsWindow. (mouseDragged): Always post NSWindowDidResizeNotification after call to windowWillResize.
* Nuke arch-tags.Glenn Morris2011-01-151-2/+0
|
* Merge from emacs-23Stefan Monnier2011-01-141-1/+1
|\
| * Add 2011 to FSF/AIST copyright years.Glenn Morris2011-01-021-1/+1
| |
| * Handle negative top/left in frame parameters (Bug#7510).Jan Djärv2010-12-021-1/+1
| | | | | | | | | | | | | | | | | | * src/nsterm.h (FRAME_NS_TOOLBAR_HEIGHT): Rename to FRAME_TOOLBAR_HEIGHT. * src/nsterm.m (x_set_window_size, windowWillResize, initFrameFromEmacs): Use FRAME_TOOLBAR_HEIGHT. (x_set_offset): Handle XNegative and YNegative in f->size_hint_flags.
* | Start redesigning portable mouse highlight. Not compiled.Eli Zaretskii2010-10-311-15/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | xdisp.c (get_tool_bar_item, handle_tool_bar_click) (note_tool_bar_highlight, draw_glyphs, erase_phys_cursor) (show_mouse_face, clear_mouse_face, coords_in_mouse_face_p) (note_mode_line_or_margin_highlight, note_mouse_highlight) (x_clear_window_mouse_face, cancel_mouse_face, expose_frame): Replace Display_Info with Mouse_HLInfo everywhere where mouse_face_* members were accessed for mouse highlight purposes. frame.h (MOUSE_HL_INFO): New macro. lisp.h (Mouse_HLInfo): New data type. xterm.h (struct x_display_info): w32term.h (struct w32_display_info): nsterm.h (struct ns_display_info): termchar.h (struct tty_display_info): Use it instead of mouse_face_* members. dispextern.h (DPYINFO_DEFINED): Remove definition. (FRAME_X_DISPLAY_INFO): Remove definition. (show_mouse_face, clear_mouse_face): Update type of 1st argument.
* | Use const char* for -Wwrite_strings.Jan D2010-08-111-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | * keyboard.h (_widget_value): name, value and key are const char*. * nsfont.m (ns_descriptor_to_entity): Use const char*. * nsmenu.m (parseKeyEquiv, addSubmenuWithTitle) (addDisplayItemWithImage, update_frame_tool_bar): Use const char*. * nsterm.h (parseKeyEquiv, addSubmenuWithTitle) (addDisplayItemWithImage): Use const char*.
* | Can't include menu.h in window.c for X targets.Jan D2010-08-061-0/+1
| | | | | | | | | | | | * nsterm.h (x_set_menu_bar_lines): Declare. * window.c: Don't include menu.h, it depends on lots of other .h-files.