summaryrefslogtreecommitdiff
path: root/src/emacsgtkfixed.c
Commit message (Collapse)AuthorAge
* Update copyright year to 2021Paul Eggert2021-01-01
| | | | Run "TZ=UTC0 admin/update-copyright".
* Update copyright year to 2020Paul Eggert2020-01-01
| | | | Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
* Update copyright year to 2019Paul Eggert2019-01-01
| | | | Run 'TZ=UTC0 admin/update-copyright $(git ls-files)'.
* Update copyright year to 2018Paul Eggert2018-01-01
| | | | Run admin/update-copyright.
* ; Typo fixes, mostly repeated wordsPaul Eggert2017-10-09
|
* Prefer HTTPS to FTP and HTTP in documentationPaul Eggert2017-09-13
| | | | | | | | | | | | | 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.
* Use 'char *FOO' instead of 'char* FOO'Paul Eggert2017-02-18
|
* Merge from origin/emacs-25Paul Eggert2017-01-01
|\ | | | | | | | | 2e2a806 Fix copyright years by hand 5badc81 Update copyright year to 2017
| * Update copyright year to 2017Paul Eggert2016-12-31
| | | | | | | | Run admin/update-copyright.
* | New macro GNUC_PREREQ for GCC versionPaul Eggert2016-06-12
|/ | | | | | | | | | * src/conf_post.h (GNUC_PREREQ): New macro. Change uses of __GNUC_MINOR__ and __GNUC_PATCHLEVEL__ to use this macro instead, for clarity and consistency. (PRINTF_ARCHETYPE): New macro. Define it to __gnu_printf__ only if glibc, since non-GNU platforms don’t necessarily support GNU printf formats. (ATTRIBUTE_FORMAT_PRINTF): Use it.
* Port to GTK with strict C99 compilerPaul Eggert2016-03-17
| | | | | | | | * src/emacsgtkfixed.c: Use workaround for GNOME bug 683906 only in glib 2.35.6 and earlier, since the bug is fixed in 2.35.7. * src/emacsgtkfixed.c (EmacsFixedPrivate): * src/emacsgtkfixed.h (EmacsFixedClass): Remove duplicate typedef, which strict C99 does not allow (Bug#23003).
* Rework C source files to avoid ^(Paul Eggert2016-03-10
| | | | | | | | 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.
* xwidgets style cleanupPaul Eggert2016-01-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adjust the newly-added Xwidgets code so that it uses a more-typical Emacs style. This should not affect behavior, except that in a few places it adds runtime checks that Lisp arguments are of the proper type, and in one place it uses more-precise arithmetic. * src/buffer.c, src/dispnew.c, src/emacs.c, src/emacsgtkfixed.c: * src/emacs.c, src/print.c, src/window.c, src/xdisp.c, src/xterm.c: Include xwidget.h unconditionally. * src/buffer.c (Fkill_buffer): * src/dispnew.c (update_window): * src/emacs.c (main): * src/print.c (print_object): * src/window.c (Fdelete_window_internal): * src/xdisp.c (handle_single_display_spec, push_it, pop_it) (get_next_element, set_iterator_to_next, next_element_from_xwidget) (dump_glyph, calc_pixel_width_or_height, BUILD_GLYPH_STRINGS_XW) (BUILD_GLYPH_STRINGS, x_produce_glyphs, get_window_cursor_type): * src/xterm.c (x_draw_glyph_string, x_draw_bar_cursor): Call xwidget functions and macros without worrying about HAVE_XWIDGETS when the code is a no-op on non-xwidget platforms. * src/dispextern.h (XWIDGET_GLYPH, struct glyph_string.xwidget) (IT_XWIDGET, GET_FROM_XWIDGET, struct it.u.xwidget) (struct it.xwidget): * src/lisp.h (PVEC_XWIDGET, PVEC_XWIDGET_VIEW): Always define. * src/emacsgtkfixed.h: Omit unnecessary comment. * src/keyboard.c: Fix spacing. * src/xdisp.c (BUILD_XWIDGET_GLYPH_STRING, produce_xwidget_glyph): Define to be a no-op if not HAVE_XWIDGETS. * src/xwidget.c: Include xwidget.h first (after config.h) to make sure that it can stand by itself. (Fmake_xwidget, Fxwidget_webkit_execute_script): Fix typo in doc string. (Fmake_xwidget): Check type of args. (Fmake_xwidget, offscreen_damage_event) (webkit_document_load_finished_cb, webkit_download_cb) (webkit_new_window_policy_decision_requested_cb) (webkit_navigation_policy_decision_requested_cb) (xwidget_osr_draw_cb, xwidget_osr_event_forward) (xwidget_osr_event_set_embedder, xwidget_init_view): Omit unnecessary casts. * src/xwidget.c (Fmake_xwidget, xwidget_hidden) (xwidget_show_view, xwidget_hide_view) (x_draw_xwidget_glyph_string, xwidget_start_redisplay, xwidget_touch) (xwidget_touched): * src/xwidget.h (struct xwidget.kill_without_query) (struct xwidget_view.redisplayed, struct xwidget_view.hidden): Use bool for boolean. * src/xwidget.c (store_xwidget_event_string, Fxwidget_size_request): Simplify by using list functions. (WEBKIT_FN_INIT): Omit unnecessary test for nil. (Fxwidget_resize): Check type of integer args before doing any work. Check that they are nonnegative. (Fxwidget_set_adjustment): Check type of integer arg. Avoid redundant call to gtk_scrolled_window_get_vadjustment. Simplify. Use double, not float. (Fxwidget_info, Fxwidget_view_info): Simplify by using CALLN. (valid_xwidget_spec_p): Simplify. (xwidget_spec_value): Omit unused arg FOUND. All callers changed. * src/xwidget.h: Include lisp.h first, so that includers do not need to worry about doing that before including this file. Make this .h file safe to include even on non-HAVE_XWIDGETS configurations, to simplify the includers. (x_draw_xwidget_glyph_string, syms_of_xwidget, valid_xwidget_spec_p) (xwidget_end_redisplay, lookup_xwidget) (xwidget_view_delete_all_in_window, kill_buffer_xwidgets): Now a no-op if !HAVE_XWIDGETS, to simplify callers. (struct glyph_matrix, struct glyph_string, struct xwidget) (struct xwidget_view, struct window): New forward or incomplete decls, so that includers need not assume the corresponding .h files are already included, or that HAVE_XWIDGETS is defined. (struct xwidget_type, xwidget_from_id): Remove; unused.
* Don’t export C symbols not used elsewherePaul Eggert2016-01-20
| | | | | | | | | | | | | | | | | | | | | | | These were recently added, mostly as part of xwidget code. * src/emacsgtkfixed.c (emacs_fixed_get_type): Now static. (EMACS_FIXED, EMACS_FIXED_GET_CLASS): Now static functions here, not macros in emacsgtkfixed.h. * src/emacsgtkfixed.h (EMACS_TYPE_FIXED): Remove. All uses replaced by definiens. (EMACS_FIXED, EMACS_FIXED_GET_CLASS): Remove; these are now static functions in emacsgtkfixed.c. (EMACS_FIXED_CLASS, EMACS_IS_FIXED, EMACS_IS_FIXED_CLASS): Remove; unused. (emacs_fixed_get_type): Remove decl; no longer extern. * src/xwidget.c (offscreen_damage_event) (webkit_mime_type_policy_typedecision_requested_cb) (webkit_new_window_policy_decision_requested_cb) (webkit_navigation_policy_decision_requested_cb) (xwidget_spec_value, xwidget_view_lookup) (xwidget_start_redisplay, xwidget_touch): Now static. * src/xwidget.h (xwidget_start_redisplay, xwidget_touch): Remove decls.
* Support for the new Xwidget feature.Joakim Verona2016-01-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.ac: (HAVE_XWIDGETS, WIDGET_OBJ, EMACS_CONFIG_FEATURES): * xterm.c (x_draw_glyph_string, x_draw_bar_cursor): * xdisp.c: (handle_display_spec, handle_single_display_spec, push_it) (pop_it, set_iterator_to_next, dump_glyph) (calc_pixel_width_or_height, fill_xwidget_glyph_string) (BUILD_XWIDGET_GLYPH_STRING, BUILD_GLYPH_STRINGS) (produce_xwidget_glyph, x_produce_glyphs) (get_window_cursor_type): * window.c (Fdelete_window_internal): * termhooks.h (e): * print.c (print_object): * lisp.h (ptrdiff_t): * keyboard.c (kbd_buffer_get_event, make_lispy_event) (syms_of_keyboard): * emacs.c (main): * dispnew.c (update_window, scrolling_window): * dispextern.h (g, i): * Makefile.in (XWIDGETS_OBJ, WEBKIT_CFLAGS, WEBKIT_LIBS) (GIR_LIBS, ALL_CFLAGS, base_obj, LIBES): * keyboard.c (kbd_buffer_get_event): * emacsgtkfixed.c (emacs_fixed_gtk_widget_size_allocate) (emacs_fixed_class_init): Add case for an xwidget view. * xwidget.c, xwidget.h, xwidget.el: New files for xwidgets Co-authored-by: Grégoire Jadi <daimrod@gmail.com> Various improvements to the Xwidget feature. * xwidgets.c: * emacsgtkfixed.c: * xwidget.el:
* Update copyright year to 2016Paul Eggert2016-01-01
| | | | Run admin/update-copyright.
* Revert changes installed by xwidgets mergePaul Eggert2015-02-01
|
* cleanupJoakim Verona2015-01-21
|
* merge masterjave2015-01-02
|\
| * Update copyright year to 2015Paul Eggert2015-01-01
| | | | | | | | Run admin/update-copyright.
* | upstreamJoakim Verona2014-06-04
|\|
| * Update copyright year to 2014 by running admin/update-copyright.Paul Eggert2014-01-01
| |
* | fix conflictsJoakim Verona2013-09-11
| |
* | fix conflictsJoakim Verona2013-09-11
|\|
| * Minor cleanup to avoid forward declarations.Dmitry Antipov2013-08-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* | merge upstreamJoakim Verona2013-09-10
| |
* | merge from trunkroot2013-08-12
|\| | | | | | | | | Conflicts: src/Makefile.in
| * * emacsgtkfixed.c: Port to GCC 4.6.Paul Eggert2013-07-23
| | | | | | | | GCC 4.6 complains about -Wunused-local-typedefs, introduced in 4.7.
* | * src/emacsgtkfixed.c (emacs_fixed_gtk_widget_size_allocate): Mark the endGrégoire Jadi2013-06-12
| | | | | | | | of HAVE_XWIDGETS protection.
* | auto upstreamJoakim Verona2013-03-26
|\|
| * Reorder conditions that are written backwardsAndreas Schwab2013-03-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * alloc.c (xpalloc, Fgarbage_collect): Reorder conditions that are written backwards. * blockinput.h (input_blocked_p): Likewise. * bytecode.c (exec_byte_code): Likewise. * callproc.c (call_process_kill, call_process_cleanup) (Fcall_process): Likewise. * ccl.c (ccl_driver, resolve_symbol_ccl_program) (Fccl_execute_on_string): Likewise. * character.c (string_escape_byte8): Likewise. * charset.c (read_hex): Likewise. * cm.c (calccost): Likewise. * data.c (cons_to_unsigned): Likewise. * dired.c (directory_files_internal, file_name_completion): Likewise. * dispnew.c (scrolling_window, update_frame_1, Fsleep_for) (sit_for): Likewise. * doc.c (Fsubstitute_command_keys): Likewise. * doprnt.c (doprnt): Likewise. * editfns.c (hi_time, decode_time_components, Fformat): Likewise. * emacsgtkfixed.c: Likewise. * fileio.c (file_offset, Fwrite_region): Likewise. * floatfns.c (Fexpt, fmod_float): Likewise. * fns.c (larger_vector, make_hash_table, Fmake_hash_table): Likewise. * font.c (font_intern_prop): Likewise. * frame.c (x_set_alpha): Likewise. * gtkutil.c (get_utf8_string): Likewise. * indent.c (check_display_width): Likewise. * intervals.c (create_root_interval, rotate_right, rotate_left) (split_interval_right, split_interval_left) (adjust_intervals_for_insertion, delete_node) (interval_deletion_adjustment, adjust_intervals_for_deletion) (merge_interval_right, merge_interval_left, copy_intervals) (set_intervals_multibyte_1): Likewise. * keyboard.c (gobble_input, append_tool_bar_item): Likewise. * keymap.c (Fkey_description): Likewise. * lisp.h (FIXNUM_OVERFLOW_P, vcopy): Likewise. * lread.c (openp, read_integer, read1, string_to_number): Likewise. * menu.c (ensure_menu_items): Likewise. * minibuf.c (read_minibuf_noninteractive): Likewise. * print.c (printchar, strout): Likewise. * process.c (create_process, Faccept_process_output) (wait_reading_process_output, read_process_output, send_process) (wait_reading_process_output): Likewise. * profiler.c (make_log, handle_profiler_signal): Likewise. * regex.c (re_exec): Likewise. * regex.h: Likewise. * search.c (looking_at_1, Freplace_match): Likewise. * sysdep.c (get_child_status, procfs_ttyname) (procfs_get_total_memory): Likewise. * systime.h (EMACS_TIME_VALID_P): Likewise. * term.c (dissociate_if_controlling_tty): Likewise. * window.c (get_phys_cursor_glyph): Likewise. * xdisp.c (init_iterator, redisplay_internal, redisplay_window) (try_window_reusing_current_matrix, try_window_id, pint2hrstr): Likewise. * xfns.c (Fx_window_property): Likewise. * xmenu.c (set_frame_menubar): Likewise. * xselect.c (x_get_window_property, x_handle_dnd_message): Likewise. * xsmfns.c (smc_save_yourself_CB): Likewise. * xterm.c (x_scroll_bar_set_handle): Likewise.
* | auto upstreamJoakim Verona2013-01-03
|\|
| * Update copyright notices for 2013.Paul Eggert2013-01-01
| |
* | not compiling yetJoakim Verona2012-09-19
|\|
* | not compiling yetJoakim Verona2012-09-19
|\|
| * Port better to POSIX hosts lacking _setjmp.Paul Eggert2012-09-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.ac (HAVE__SETJMP, HAVE_SIGSETJMP): New symbols. (_setjmp, _longjmp): Remove. * src/lisp.h: Include <setjmp.h> here, since we use its symbols here. All instances of '#include <setjmp.h>' removed, if the only reason for the instance was because "lisp.h" was included. (sys_jmp_buf, sys_setjmp, sys_longjmp): New symbols. Unless otherwise specified, replace all uses of jmp_buf, _setjmp, and _longjmp with the new symbols. Emacs already uses _setjmp if available, so this change affects only POSIXish hosts that have sigsetjmp but not _setjmp, such as some versions of Solaris and Unixware. (Also, POSIX-2008 marks _setjmp as obsolescent.) * src/image.c (_setjmp, _longjmp) [HAVE_PNG && !HAVE__SETJMP]: New macros. (png_load_body) [HAVE_PNG]: (PNG_LONGJMP) [HAVE_PNG && PNG_LIBPNG_VER < 10500]: (PNG_JMPBUF) [HAVE_PNG && PNG_LIBPNG_VER >= 10500]: Use _setjmp and _longjmp rather than sys_setjmp and sys_longjmp, since PNG requires jmp_buf. This is the only exception to the general rule that we now use sys_setjmp and sys_longjmp. This exception is OK since this code does not change the signal mask or longjmp out of a signal handler. Fixes: debbugs:12446
| * Better workaround for GNOME bug when --enable-gcc-warnings.Paul Eggert2012-09-12
| | | | | | | | | | | | * emacsgtkfixed.c (G_STATIC_ASSERT): Remove, undoing last change. Instead, disable -Wunused-local-typedefs. See Dmitry Antipov in <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00335.html>.
| * Work around GCC and GNOME bugs when --enable-gcc-warnings.Paul Eggert2012-09-12
| | | | | | | | | | | | | | | | * emacsgtkfixed.c (G_STATIC_ASSERT): Redefine to use 'verify', to work around GNOME bug 683906. * image.c (jpeg_load_body) [HAVE_JPEG && lint]: Pacify gcc -Wclobber. (struct my_jpeg_error_mgr) [HAVE_JPEG && lint]: New member fp. This works around GCC bug 54561.
* | upstreamJoakim Verona2012-09-10
|\|
| * Signal-handler cleanup.Paul Eggert2012-09-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Emacs's signal handlers were written in the old 4.2BSD style with sigblock and sigmask and so forth, and this led to some inefficiencies and confusion. Rewrite these to use pthread_sigmask etc. without copying signal sets around. Also, get rid of the confusing macros 'SIGNAL_THREAD_CHECK' and 'signal', and instead use functions that do not attempt to take over the system name space. This patch causes Emacs's text segment to shrink by 0.7% on my platform, Fedora 17 x86-64. * configure.ac (PTY_OPEN, PTY_TTY_NAME_SPRINTF): Adjust to syssignal.h changes. (SIGNAL_H_AB): Remove; no longer needed. * src/alloc.c, src/emacsgtkfixed.c, src/nsfns.m, src/widget.c, src/xmenu.c: Do not include <signal.h> or "syssignal.h", as these modules do not use signals. * src/atimer.c, src/callproc.c, src/data.c, src/dispnew.c, src/emacs.c: * src/floatfns.c, src/gtkutil.c, src/keyboard.c, src/process.c, src/sound.c: * src/sysdep.c, src/term.c, src/xterm.c: Do not include <signal.h>, as "syssignal.h" does that for us now. * src/atimer.c (sigmask_atimers): New function. (block_atimers, unblock_atimers): New functions, replacing the old macros BLOCK_ATIMERS and UNBLOCK_ATIMERS. All uses replaced. * src/conf_post.h [SIGNAL_H_AHB]: Do not include <signal.h>; no longer needed here. * src/emacs.c (main): Inspect existing signal handler with sigaction, so that there's no need to block and unblock SIGHUP. * src/sysdep.c (struct save_signal): New member 'action', replacing old member 'handler'. (save_signal_handlers, restore_signal_handlers): Use sigaction instead of 'signal' to save and restore. (get_set_sighandler, set_sighandler) [!WINDOWSNT]: New function. All users of 'signal' modified to use set_sighandler if they're writeonly, and to use sys_signal if they're read+write. (emacs_sigaction_init, forwarded_signal): New functions. (sys_signal): Remove. All uses replaced by calls to sigaction and emacs_sigaction_init, or by direct calls to 'signal'. (sys_sigmask) [!__GNUC__]: Remove; no longer needed. (sys_sigblock, sys_sigunblock, sys_sigsetmask): Remove; all uses replaced by pthread_sigmask etc. calls. * src/syssignal.h: Include <signal.h>. (emacs_sigaction_init, forwarded_signal): New decls. (SIGMASKTYPE): Remove. All uses replaced by its definiens, sigset_t. (SIGEMPTYMASK): Remove; all uses replaced by its definiens, empty_mask. (sigmask, sys_sigmask): Remove; no longer needed. (sigpause): Remove. All uses replaced by its definiens, sigsuspend. (sigblock, sigunblock, sigfree): (sigsetmask) [!defined sigsetmask]: Remove. All uses replaced by pthread_sigmask. (signal): Remove. Its remaining uses (with SIG_DFL and SIG_IGN) no longer need to be replaced, and its typical old uses are now done via emacs_sigaction_init and sigaction. (sys_sigblock, sys_sigunblock, sys_sigsetmask): Remove decls. (sys_sigdel): Remove; unused. (NSIG): Remove a FIXME; the code's fine. Remove an unnecessary ifdef. Fixes: debbugs:12327
* | reinstal emocsfiked changesJoakim Verona2012-05-21
| |
* | upstream, fix conflictsJoakim Verona2012-05-21
|\|
| * Fix minor GTK3 problems found by static checking.Paul Eggert2012-04-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * emacsgtkfixed.c (EMACS_TYPE_FIXED, EMACS_FIXED, EmacsFixed) (EmacsFixedPrivate, EmacsFixedClass, struct _EmacsFixed) (struct _EmacsFixedClass, emacs_fixed_get_type): Move decls here from emacsgtkfixed.h, since they needn't be public. (emacs_fixed_get_type): Now static. (emacs_fixed_class_init): Omit unused local. (emacs_fixed_child_type): Remove; unused. * emacsgtkfixed.h (EMACS_TYPE_FIXED, EMACS_FIXED, EmacsFixed) (EmacsFixedPrivate, EmacsFixedClass, struct _EmacsFixed) (struct _EmacsFixedClass): Move to emacsgtkfixed.c. (EMACS_FIXED_CLASS, EMACS_IS_FIXED, EMACS_IS_FIXED_CLASS) (EMACS_FIXED_GET_CLASS): Remove; unused. * gtkutil.c (xg_create_frame_widgets) [!HAVE_GTK3]: Omit unused local.
* | upstreamJoakim Verona2012-01-09
|\|
| * Add 2012 to FSF copyright years for Emacs filesGlenn Morris2012-01-05
| |
* | upstreamJoakim Verona2011-12-28
|\|
| * Spelling fixes.Paul Eggert2011-12-04
| |
* | upstreamJoakim Verona2011-09-14
|\|
| * Whitespace changes.Juanma Barranquero2011-09-09
| |
* | warningsJoakim Verona2011-09-07
| |