summaryrefslogtreecommitdiff
path: root/src/nsgui.h
Commit message (Collapse)AuthorAgeFilesLines
* Merge from origin/emacs-28Eli Zaretskii2022-01-011-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 836be7a112 ; * etc/refcards/ru-refcard.tex: Update Copyright year. 86cbc6ee4a * lisp/net/tramp-sh.el: Adapt copyright year ebe8772f65 ; Minor fixes related to copyright years 23c1ee6989 ; * test/manual/etags/ETAGS.good_N: Adjust to copyright ye... 8d3fc7ec89 * src/xfaces.c (face_for_font): Make 'hash' be uintptr_t. 19dcb237b5 ; Add 2022 to copyright years. # Conflicts: # etc/NEWS # etc/refcards/ru-refcard.tex # lib/cdefs.h # lisp/erc/erc-dcc.el # lisp/erc/erc-imenu.el # lisp/erc/erc-replace.el # lisp/image-dired.el # lisp/progmodes/xref.el # m4/alloca.m4 # m4/byteswap.m4 # m4/errno_h.m4 # m4/getopt.m4 # m4/gnulib-common.m4 # m4/inttypes.m4 # m4/stddef_h.m4 # m4/stdint.m4 # m4/sys_socket_h.m4
| * ; Add 2022 to copyright years.Eli Zaretskii2022-01-011-1/+1
| |
* | Further cleanup of NS color codeAlan Third2021-12-221-3/+0
|/ | | | | | | | | | | | | | | | | | | | * src/dispextern.h (FACE_COLOR_TO_PIXEL): Remove define and fix all callers. * src/nsterm.h (struct nsfont_info): Remove color_table. * src/nsterm.m ([NSColor colorWithUnsignedLong:]): Always assume the input contains the correct alpha value. (ns_lookup_indexed_color): (ns_index_color): (ns_color_index_to_rgba): Remove functions and fix all callers. (ns_query_color): No longer set pixel to the lookup table index, always just set it to the ARGB integer value. (ns_defined_color): Ignore makeindex as we no longer set pixel to the lookup table index. (ns_initialize_display_info): (ns_redisplay_interface): Remove lookup table. (ns_term_init): Fix the alpha setting. thing
* Update copyright year to 2021Paul Eggert2021-01-011-1/+1
| | | | Run "TZ=UTC0 admin/update-copyright".
* Update copyright year to 2020Paul Eggert2020-01-011-1/+1
| | | | Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
* Replace XChar2b with unsigned in all font backendsAlexander Gramiak2019-05-191-15/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The xfont backend using XChar2b in its API doesn't mean that we should use it everywhere else. * src/dispextern.h (glyph_string): * src/ftcrfont.c (ftcrfont_draw): * src/ftxfont.c (ftxfont_draw): * src/w32term.c (w32_draw_glyphless_glyph_string_foreground): * src/xdisp.c (init_glyph_string, get_char_face_and_encoding) (get_glyph_face_and_encoding, get_char_glyph_code) (fill_gstring_glyph_string, fill_stretch_glyph_string) (normal_char_ascent_descent, gui_get_glyph_overhangs) (compute_overhangs_and_x, gui_produce_glyphs): * src/xfont.c (xfont_get_pcm, xfont_chars_supported, xfont_open) (xfont_encode_char, xfont_text_extents, xfont_draw) * src/xftfont.c (xftfont_draw): * src/xterm.c (x_compute_glyph_string_overhangs) (x_draw_glyphless_glyph_string_foreground): Use unsigned over XChar2b. * src/nsgui.h: * src/w32gui.h: * src/xterm.h: Remove XChar2b, STORE_XCHAR2B, XCHAR2B_BYTE1, and XCHAR2B_BYTE2 typedefs and macros. * src/font.h (font_driver): (ftfont_text_extents) * src/ftcrfont.c (ftcrfont_text_extents): * src/ftfont.c (ftfont_text_extents): * src/macfont.m (macfont_text_extents): * src/nsfont.m (nsfont_text_extents): * src/w32font.h (w32_font_text_extents): * src/font.c (xfont_text_extents): * src/xftfont.c (xftfont_text_extents): Make code parameter const.
* Introduce Emacs_GC struct and typedefAlexander Gramiak2019-05-191-19/+0
| | | | | | | | | | | | | | | | * src/dispextern.h [HAVE_X_WINDOWS]: Alias Emacs_GC to XGCValues. [!HAVE_X_WINDOWS]: Define Emacs_GC, GCForeground, and GCBackground. * src/nsgui.h: * src/w32gui.h:Remove obsolete XGCValues, GC, GCForeground, GCBackground, and GCFont definitions. * src/w32fns.c (w32_make_gc): Do not set unused font field. * src/w32term.c: Use Emacs_GC over XGCValues. Do not set unused font field. * src/xfaces.c: Use Emacs_GC over XGCValues and GC.
* Introduce Emacs_Rectangle struct and typedefAlexander Gramiak2019-05-191-10/+2
| | | | | | | | | | | | | | | | | | | | * src/dispextern.h [HAVE_X_WINDOWS]: Alias Emacs_Rectangle to XRectangle. [!HAVE_X_WINDOWS]: Define Emacs_Rectangle struct. Use Emacs_Rectangle over XRectangle. * src/frame.h (MonitorInfo): * src/msdos.h: * src/w32term.c: * src/xdisp.c: Use Emacs_Rectangle over XRectangle. * src/nsgui.h: * src/w32gui.h: Remove old XRectangle structs. * src/xdisp.c: * src/nsgui.h: * src/w32gui.h: Rename CONVERT_FROM_XRECT and CONVERT_TO_XRECT to CONVERT_FROM_EMACS_RECT and CONVERT_TO_EMACS_RECT respectively.
* Introduce Emacs_Pixmap typedefAlexander Gramiak2019-05-191-2/+2
| | | | | | | | | | | | | | | | | * src/dispextern.h [HAVE_X_WINDOWS]: Alias Emacs_Pixmap to Pixmap. (image, x_kill_gs_process): Use Emacs_Pixmap over Pixmap. * src/image.c: * src/nsgui.h: * src/nsterm.m: * src/termhooks.h: * src/w32gui.h: * src/w32term.c: * src/w32term.h: * src/xterm.c (x_free_pixmap): Use Emacs_Pixmap over Pixmap. * src/w32gui.h: Remove unused typedef Bitmap.
* Introduce Emacs_Cursor typedefAlexander Gramiak2019-05-191-4/+2
| | | | | | | | | | | | | | * src/dispextern.h [HAVE_X_WINDOWS]: Define Emacs_Cursor alias. Move the No_Cursor definition from xterm.h. (redisplay_interface): Use Emacs_Cursor over Cursor. * src/nsgui.h: * src/nsterm.h: * src/nsterm.m: * src/w32gui.h: * src/w32term.c: * src/xdisp.c: * src/xterm.c (x_define_frame_cursor): Use Emacs_Cursor over Cursor.
* Introduce Emacs_Color struct and typedefAlexander Gramiak2019-05-191-5/+0
| | | | | | | | | | | | | | | | | | | | | | This avoids clashing with the XColor struct from X. * src/dispextern [HAVE_X_WINDOWS]: Define Emacs_Color alias. [!HAVE_X_WINDOWS]: Rename XColor compatibility struct to Emacs_Color. Remove unused fields. * src/gtkutil.c: * src/gtkutil.h: * src/image.c: * src/nsterm.h: * src/nsterm.m: * src/termhooks.h: * src/w32fns.c: * src/w32term.c: * src/w32term.h: * src/xfaces.c: * src/xfns.c: * src/xterm.h: Use Emacs_Color over XColor outside of X-specific sections.
* Convert Free_Pixmap macro into terminal hookAlexander Gramiak2019-05-101-1/+0
| | | | | | | | | | | | | | | | | | * src/termhooks.h (terminal) [HAVE_WINDOW_SYSTEM]: New terminal hook free_pixmap. * src/image.c: Replace Free_Pixmap with free_pixmap. * src/msdos.h (FRAME_X_DISPLAY): * src/nsgui.h (Display): * src/nsterm.h (FRAME_NS_DISPLAY, FRAME_X_DISPLAY, FRAME_X_SCREEN) (FRAME_X_VISUAL): * src/w32term.h (FRAME_X_DISPLAY): Remove unused X-compatibility macros and typedefs. * src/nsterm.m: * src/w32term.c: * src/xterm.c: Implement and set free_pixmap hook.
* Rename generic x_* identifiersAlexander Gramiak2019-04-261-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/image.c: Rename x_* procedures to image_*. * src/frame.c: Rename x_* procedures to gui_*. Rename xrdb_get_resource to gui_display_get_resource. Rename x_get_arg to gui_display_get arg. * src/frame.h: Rename can_x_set_window_size to can_set_window_size. * src/xfaces.c: Rename realize_x_face to realize_gui_face. Rename x_supports_face_attributes_p to gui_supports_face_attributes_p. * src/keyboard.c: * src/lisp.h: * src/nsterm.m: * src/w32term.c: * src/xterm.c: Rename x_get_keysym_name to get_keysym_name. * src/nsfns.c: * src/nsterm.m: Rename x_* procedures to ns_*. * src/w32fns.c: * src/w32term.c: Rename x_* procedures to w32_*. * src/termhooks.h (query_colors, get_focus_frame, focus_frame_hook) (frame_visible_invisible_hook, iconify_frame_hook) (set_window_size_hook, set_frame_offset_hook, set_frame_alpha_hook) (set_new_font_hook, set_bitmap_icon_hook, implicit_set_name_hook) (activate_menubar_hook, change_tool_bar_height_hook) (set_scroll_bar_default_width_hook) (set_scroll_bar_default_height_hook, get_string_resource_hook): New terminal hooks to replace backend-specific x_* procedures. * src/dispextern.h (clear_under_internal_border): New RIF procedure. * src/alloc.c: * src/frame.c: * src/xdisp.c: Use FRAME_OUTPUT_DATA instead of FRAME_X_OUTPUT. * src/frame.c: * src/w32term.c: * src/w32fns.c: Use FRAME_NATIVE_WINDOW instead of FRAME_X_WINDOW.
* Merge from origin/emacs-26Paul Eggert2018-12-311-1/+1
|\ | | | | | | | | | | 2fcf2df Fix copyright years by hand 26bed8b Update copyright year to 2019 2814292 Fix value of default frame height. (Bug#33921)
| * Update copyright year to 2019Paul Eggert2019-01-011-1/+1
| | | | | | | | Run 'TZ=UTC0 admin/update-copyright $(git ls-files)'.
* | Convert NS face colors to RGBA when comparing with frame valuesRobert Pluim2018-11-301-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The NS port uses indexes into a color table to specify the colors of faces, whereas frames use RGBA pixel values. In extend_face_to_end_of_line the two needed to be compared to ensure that the backgrounds of certain faces are not extended to the edge of the window, which was failing because of this difference, thus causing a visual difference with other platforms. Convert from index to RGBA when doing such comparisons. * src/dispextern.h (FACE_COLOR_TO_PIXEL) [HAVE_NS]: New macro. Call ns_color_index_to_rgba under NS only. * src/nsgui.h: Add prototype for ns_color_index_to_rgba. * src/nsterm.m (ns_color_index_to_rgba): New function. Converts a color_table entry to corresponding RGBA pixel value. * src/xdisp.c (extend_face_to_end_of_line): Call FACE_COLOR_TO_PIXEL on face background color when comparing with frame color.
* | Normalize and fix some mistakes in NS-related commentaryCharles A. Roelli2018-03-191-5/+5
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/term/ns-win.el (ns-insert-working-text): Normalize commentary. (x-file-dialog): Fix indentation. * src/nsfns.m (ns_get_window, interpret_services_menu) (x_set_background_color, x_set_icon_name, x_set_tool_bar_lines) (x_set_icon_type, x_set_mouse_color, Fx_create_frame) (ns_window_is_ancestor, Fns_popup_font_panel) (Fx_display_visual_class, Fns_font_name, Fns_do_applescript) (ns_screen_name, compute_tip_xy, Fns_mouse_absolute_pixel_position) (handlePanelKeys): Normalize commentary (also in top-level declarations) and remove two outdated comments (one in Fx_create_frame, the other in compute_tip_xy). * src/nsterm.h (NSApplication, NSWindow, ns_bitmap_record): * src/nsselect.m: * src/nsmenu.m (ns_update_menubar, addItemWithWidgetValue:) (runMenuAt:forFrame:keymaps:, ns_menu_show, free_frame_tool_bar) (update_frame_tool_bar, init) (initWithContentRect:styleMask:backing:defer:) (initFromContents:isQuestion:, timeout_handler:) (Fmenu_or_popup_active_p): * src/nsimage.m (initFromXBM, initFromXBMWithDepth): * src/nsgui.h: * src/nsfont.m (ns_spec_to_descriptor, ns_descriptor_to_entity) (ns_charset_covers, ns_get_req_script, ns_findfonts) (nsfont_list_family, nsfont_open, nsfont_encode_char) (nsfont_draw, ns_uni_to_glyphs, ns_glyph_metrics) (syms_of_nsfont): Normalize commentary (also in top-level declarations). * src/nsterm.m (ns_init_locale, ns_retain_object) (ns_screen_margins_ignoring_hidden_dock, ns_unfocus, NSImageView) (x_make_frame_visible, x_iconify_frame, x_destroy_window) (x_set_undecorated, x_set_no_focus_on_map, x_set_z_group) (ns_index_color, ns_get_color, ns_lisp_to_color) (note_mouse_movement, scrollbar, ns_scroll_run) (ns_draw_fringe_bitmap, ns_draw_window_cursor) (ns_draw_text_decoration, ns_draw_relief) (ns_dumpglyphs_box_or_relief, ns_dumpglyphs_image) (ns_dumpglyphs_stretch, ns_draw_glyph_string, ns_send_appdefined) (ns_check_menu_open, ns_read_socket, ns_select, ns_run_loop_break) (ns_set_vertical_scroll_bar, ns_set_horizontal_scroll_bar) (ns_string_to_lispmod, ns_default, ns_initialize_display_info) (ns_delete_display, ns_term_init, sendEvent:) (applicationDidFinishLaunching:, applicationDidBecomeActive:) (fd_handler:, setWindowClosing:, keyDown:, insertText:) (mouseDown:, mouseMoved:, updateFrameSize:) (windowWillResize:toSize:, windowDidResize:, windowDidResignKey:) (initFrameFromEmacs:, toggleFullScreen:, toolbarClicked:) (writeSelectionToPasteboard:types:, setMiniwindowImage:) (scrollerWidth, initFrame:window:, setFrame:, repeatScroll:) (ns_xlfd_to_fontname, syms_of_nsterm): Normalize commentary (also in top-level declarations), and in ns_get_color, replace a Gmane link with one from lists.gnu.org, which does not require JS to view the message.
* Update copyright year to 2018Paul Eggert2018-01-011-1/+1
| | | | Run admin/update-copyright.
* Prefer HTTPS to FTP and HTTP in documentationPaul Eggert2017-09-131-1/+1
| | | | | | | | | | | | | Most of this change is to boilerplate commentary such as license URLs. This change was prompted by ftp://ftp.gnu.org's going-away party, planned for November. Change these FTP URLs to https://ftp.gnu.org instead. Make similar changes for URLs to other organizations moving away from FTP. Also, change HTTP to HTTPS for URLs to gnu.org and fsf.org when this works, as this will further help defend against man-in-the-middle attacks (for this part I omitted the MS-DOS and MS-Windows sources and the test tarballs to keep the workload down). HTTPS is not fully working to lists.gnu.org so I left those URLs alone for now.
* Update copyright year to 2017Paul Eggert2016-12-311-1/+1
| | | | Run admin/update-copyright.
* Rework C source files to avoid ^(Paul Eggert2016-03-101-2/+2
| | | | | | | | 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.
* Update copyright year to 2016Paul Eggert2016-01-011-1/+1
| | | | Run admin/update-copyright.
* Update copyright year to 2015Paul Eggert2015-01-011-1/+1
| | | | Run admin/update-copyright.
* Revert 2014-07-16T04:11:08Z!ueno@gnu.org and fix XCHAR2B_BYTE[12] in nsgui.h ↵Daiki Ueno2014-07-161-0/+9
| | | | | | | | only * nsgui.h (XCHAR2B_BYTE1): Add missing parentheses around pointer argument, before dereferencing. (XCHAR2B_BYTE2): Likewise.
* Remove unnecessary ifdef from nsgui.h, introduced by my last commitDaiki Ueno2014-07-161-2/+0
|
* Move back the XChar2b definition to w32gui.h and nsgui.hDaiki Ueno2014-07-161-0/+8
| | | | | Fix the last change. XChar2b still needs to be defined platform dependently, to match with the argument types of drawing functions.
* Consolidate XChar2b macros for the X, W32, and NSDaiki Ueno2014-07-161-15/+0
| | | | | | | | | | | | Suggested by Jan Djärv in: https://lists.gnu.org/archive/html/emacs-devel/2014-07/msg00203.html * w32gui.h (XChar2b, STORE_XCHAR2B, XCHAR2B_BYTE1, XCHAR2B_BYTE2): Move the fallback definitions to dispextern.h. * nsgui.h (XChar2b, STORE_XCHAR2B, XCHAR2B_BYTE1, XCHAR2B_BYTE2): Likewise. Share the same definition with W32. * xterm.h (STORE_XCHAR2B, XCHAR2B_BYTE1, XCHAR2B_BYTE2): Move to ... * dispextern.h (STORE_XCHAR2B, XCHAR2B_BYTE1, XCHAR2B_BYTE2): ... here for the consistency with W32 and NS.
* Use common memory management functions for lwlib and refactor users.Dmitry Antipov2014-06-021-5/+0
| | | | | | | | | | | | | | | | | | | | | | * lwlib/lwlib.h (widget_value): Do not maintain a free list any more. (malloc_widget_value, free_widget_value): Remove prototypes. * lwlib/lwlib.c (malloc_widget_value, free_widget_value): (widget_value_free_list, malloc_cpt): Remove. (free_widget_value_tree, copy_widget_value_tree): Adjust users. * src/menu.h (xmalloc_widget_value): Replaced by ... (make_widget_value): ... new prototype. * src/menu.c (xmalloc_widget_value): Replaced by ... (make_widget_value): ... new function. (free_menubar_widget_value_tree, digest_single_submenu): Adjust users. * src/gtkutil.c (malloc_widget_value, free_widget_value): (widget_value_free_list, malloc_cpt): Remove old lwlib-compatible code. * src/keyboard.h (enum button_type, struct _widget_value): * src/gtkutil.h, src/nsgui.h, src/w32gui.h (malloc_widget_value): (free_widget_value): Likewise. * src/nsmenu.m (ns_update_menubar, ns_menu_show): * src/w32menu.c (set_frame_menubar, w32_menu_show, w32_dialog_show): * src/xmenu.c (set_frame_menubar, xmenu_show, x_dialog_show): Adjust users. * src/xterm.h (XtParent) [USE_GTK]: Remove unused macro.
* Update copyright year to 2014 by running admin/update-copyright.Paul Eggert2014-01-011-1/+1
|
* Update copyright notices for 2013.Paul Eggert2013-01-011-1/+1
|
* Rename init_process rather than working around it on DarwinGlenn Morris2012-07-121-2/+0
| | | | | | | | | | | The old name is also the name of a Mach system call. * src/process.c (init_process_emacs): Rename from init_process. * src/lisp.h, src/emacs.c: Update for this name change. * src/nsgui.h, src/sysselect.h, src/s/darwin.h: Remove workaround that is no longer needed.
* Add 2012 to FSF copyright years for Emacs filesGlenn Morris2012-01-051-1/+1
|
* Spelling fixes.Paul Eggert2011-11-221-2/+1
|
* Whitespace changes.Juanma Barranquero2011-09-091-1/+1
|
* * nsgui.h: Fix compiler warning about gnulib redefining verify.Jan Djärv2011-07-081-0/+5
|
* Convert consecutive FSF copyright years to ranges.Glenn Morris2011-01-241-1/+1
|
* Nuke arch-tags.Glenn Morris2011-01-151-2/+0
|
* Add 2011 to FSF/AIST copyright years.Glenn Morris2011-01-021-1/+1
|
* Add 2010 to copyright years.Glenn Morris2010-01-131-1/+1
|
* (NSPoint, NSSize) [!__OBJC__]: Define and use CGFloat.Adrian Robert2009-10-121-4/+9
|
* Remove '23' comments that indicated code added during update from emacs-20 ↵Adrian Robert2009-01-221-3/+3
| | | | -> emacs-23.
* Add 2009 to copyright years.Glenn Morris2009-01-081-1/+1
|
* clear warnings and clean up NS portAdrian Robert2008-08-011-6/+2
|
* NS cleanup: change 'PENDING' to 'FIXME'/'TODO'/'XXX'Adrian Robert2008-07-221-2/+2
|
* by renaming, get rid of need for hash_remove() redefinitions for NS ↵Adrian Robert2008-07-191-8/+0
| | | | platform; also, adjust nsgui dependencies in Makefile
* Switch to recommended form of GPLv3 permissions notice.Glenn Morris2008-07-161-6/+4
|
* Add arch taglineMiles Bader2008-07-151-0/+3
|
* merging Emacs.app (NeXTstep port)Adrian Robert2008-07-151-0/+208