1. 24 Apr, 2019 1 commit
    • YAMAMOTO Mitsuharu's avatar
      Don't link libXft when using cairo · 5f4e8e2e
      YAMAMOTO Mitsuharu authored
      * configure.ac: Check cairo early.  Don't try Xft if cairo is used.
      * lwlib/lwlib-utils.h [USE_CAIRO]: Include cairo.h and fontconfig.h.
      (XftFont, XftDraw, XftColor, XGlyphInfo) [USE_CAIRO]: New typedefs.
      (XftFontOpenName, XftFontClose, XftDrawCreate, XftDrawDestroy)
      (XftDrawRect, XftDrawStringUtf8, XftTextExtentsUtf8) [USE_CAIRO]: New macros.
      (crxft_font_open_name, crxft_font_close, crxft_draw_create)
      (crxft_draw_rect, crxft_draw_string, crxft_text_extents) [USE_CAIRO]: New
      externs.
      * lwlib/lwlib-utils.c [USE_CAIRO]: Include math.h, cairo-ft.h, and
      cairo-xlib.h.
      (crxft_font_open_name, crxft_font_close, crxft_draw_create)
      (crxft_set_source_color, crxft_draw_rect, crxft_draw_string)
      (crxft_text_extents) [USE_CAIRO]: New Xft compatibility functions.
      * lwlib/xlwmenuP.h [USE_CAIRO]: Include lwlib-utils.h.
      * lwlib/xlwmenu.c (display_menu_item) [USE_CAIRO]: Call
      cairo_surface_mark_dirty and cairo_surface_flush.
      * lwlib/lwlib-Xaw.c [USE_CAIRO]: Include stdlib.h and lwlib-utils.h.
      (draw_text) [USE_CAIRO]: Call cairo_surface_flush.
      * src/xsettings.c [USE_CAIRO]: Include fontconfig.h
      (apply_xft_settings) [!HAVE_XFT]: Don't call XftDefaultSubstitute or
      XftDefaultSet.
      * lwlib/lwlib-Xaw.c:
      * lwlib/lwlib-int.h:
      * lwlib/xlwmenu.c:
      * lwlib/xlwmenuP.h:
      * src/xrdb.c:
      * src/xsettings.c:
      * src/xterm.c: Replace all #ifdef HAVE_XFT with #if defined USE_CAIRO ||
      defined HAVE_XFT.
      * src/xfns.c (x_default_font_parameter): Replace #ifdef HAVE_XFT with #if
      defined	USE_CAIRO || defined HAVE_XFT.
      5f4e8e2e
  2. 23 Apr, 2019 1 commit
    • YAMAMOTO Mitsuharu's avatar
      Release xft_data in widget destroy callback to avoid visual distraction · 085929ca
      YAMAMOTO Mitsuharu authored
      * lwlib/lwlib-int.h (struct _widget_instance) [HAVE_XFT]: Remove nr_xft_data.
      * lwlib/lwlib-Xaw.c (find_xft_data, xaw_update_one_widget) [HAVE_XFT]: Loop
      while widget member is not NULL instead of using nr_xft_data.
      (xaw_destroy_instance) [HAVE_XFT]: Move xft_data release code from here ...
      (destroy_xft_data) [HAVE_XFT]: ... to here.
      (make_dialog) [HAVE_XFT]: Add destroy_xft_data as destroy callback for dialog.
      085929ca
  3. 21 Apr, 2019 2 commits
  4. 01 Jan, 2019 1 commit
  5. 01 Jan, 2018 1 commit
  6. 13 Sep, 2017 1 commit
    • Paul Eggert's avatar
      Prefer HTTPS to FTP and HTTP in documentation · bc511a64
      Paul Eggert authored
      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.
      bc511a64
  7. 10 Mar, 2017 1 commit
    • Paul Eggert's avatar
      Tweak X toolkit code to pacify modern GCC · ec168376
      Paul Eggert authored
      * lwlib/lwlib-Xaw.c, lwlib/lwlib-Xm.c, lwlib/lwlib.c:
      Don’t include <stdlib.h>, since this code now calls emacs_abort
      rather than abort.
      * lwlib/lwlib-Xaw.c (make_dialog, xaw_generic_callback)
      (wm_delete_window):
      * lwlib/lwlib-Xm.c (make_menu_in_widget, do_call):
      * lwlib/lwlib.c (instantiate_widget_instance, lw_make_widget):
      * lwlib/xlwmenu.c (abort_gracefully, draw_separator)
      (separator_height, XlwMenuInitialize):
      Use emacs_abort, not abort.  Without this change, some calls
      to ‘abort’ were invalid, as stdlib.h was not always included.
      * src/widget.c (resources, emacsFrameClassRec):
      * src/xfns.c (x_window) [USE_X_TOOLKIT]:
      * src/xmenu.c (create_and_show_popup_menu) [USE_X_TOOLKIT]:
      * src/xterm.c (emacs_options) [USE_X_TOOLKIT}:
      (x_term_init) [USE_X_TOOLKIT]:
      Cast string constants to char * to pacify --enable-gcc-warnings.
      ec168376
  8. 01 Jan, 2017 1 commit
  9. 29 Nov, 2016 1 commit
  10. 01 Jan, 2016 1 commit
  11. 01 Jan, 2015 2 commits
  12. 01 Jan, 2014 1 commit
  13. 01 Jan, 2013 1 commit
  14. 31 Dec, 2012 1 commit
  15. 16 Aug, 2012 1 commit
    • Paul Eggert's avatar
      Use ASCII tests for character types. · 620f13b0
      Paul Eggert authored
      * admin/merge-gnulib (GNULIB_MODULES): Add c-ctype.
      * lwlib/lwlib-Xaw.c, lwlib/lwlib.c, lwlib/xlwmenu.c:
      Don't include <ctype.h>; no longer needed.
      * lwlib/lwlib-Xaw.c (openFont):
      * lwlib/xlwmenu.c (openXftFont): Test just for ASCII digits.
      * src/category.c, src/dispnew.c, src/doprnt.c, src/editfns.c, src/syntax.c
      * src/term.c, src/xfns.c, src/xterm.c:
      Don't include <ctype.h>; was not needed.
      * src/charset.c, src/doc.c, src/fileio.c, src/font.c, src/frame.c:
      * src/gtkutil.c, src/image.c, src/sysdep.c, src/xfaces.c:
      Include <c-ctype.h> instead of <ctype.h>.
      * src/nsterm.m: Include <c-ctype.h>.
      * src/charset.c (read_hex):
      * src/doc.c (Fsnarf_documentation):
      * src/fileio.c (IS_DRIVE) [WINDOWSNT]:
      (DRIVE_LETTER) [DOS_NT]:
      (Ffile_name_directory, Fexpand_file_name)
      (Fsubstitute_in_file_name):
      * src/font.c (font_parse_xlfd, font_parse_fcname):
      * src/frame.c (x_set_font_backend):
      * src/gtkutil.c (xg_get_font):
      * src/image.c (xbm_scan, xpm_scan, pbm_scan_number):
      * src/nsimage.m (hexchar):
      * src/nsterm.m (ns_xlfd_to_fontname):
      * src/sysdep.c (system_process_attributes):
      * src/xfaces.c (hash_string_case_insensitive):
      Use C-locale tests instead of locale-specific tests for character
      types, since we want the ASCII interpretation here, not the
      interpretation suitable for whatever happens to be the current locale.
      620f13b0
  16. 26 Jun, 2012 1 commit
  17. 11 Jan, 2012 1 commit
  18. 05 Jan, 2012 1 commit
  19. 13 Oct, 2011 1 commit
  20. 14 Feb, 2011 1 commit
    • Jan Djärv's avatar
      Use *font for Xft font names for Lucid menus and dialogs. · 3928f2b6
      Jan Djärv authored
      * doc/emacs/xresources.texi (X Resources): Remove *faceName and replace it with
      *font for Lucid.
      
      * lwlib/lwlib-Xaw.c (make_dialog): Use *font even for Xft fonts.  Try
      XLoadQueryFont first and then Xft fonts.
      
      * lwlib/xlwmenu.c (xlwmenu_default_font): Remove, does not work for
      multi-display.
      (xlwMenuResources): Remove XtNfaceName and XtNdefaultFace.
      Make XtNFont a String resource.
      (make_windows_if_needed): Call XFlush so later changes are seen by the
      X server.
      (remap_menubar): Use XtMoveWidget and then
      XtResizeWidget/XtResizeWindow after XtPopup.  Works better with
      Compiz.
      (make_drawing_gcs): Check if mw->menu.font is set.
      (getDefaultXftFont): New function.
      (openXftFont): faceName is now fontName.  Try XLoadQueryFont first
      and then XftFontOpenName.
      (XlwMenuInitialize): Initialize mw->menu.font with XLoadQueryFont.
      (XlwMenuClassInitialize): Remove initialization of
      xlwmenu_default_font.
      (fontname_changed): Renamed from facename_changed.
      (XlwMenuSetValues): Use facename_changed.
      
      * lwlib/xlwmenu.h: Remove Xt[CN]faceName and Xt[NC]defaultFace.
      
      * lwlib/xlwmenuP.h (_XlwMenu_part): Remove faceName.  Add fontName.
      
      * src/xmenu.c (apply_systemfont_to_dialog): Apply to *dialog.font.
      (apply_systemfont_to_menu): Set resources *menubar*font and
      *popup*font.  Remove defflt.
      (set_frame_menubar, create_and_show_popup_menu): Call
      apply_systemfont_to_menu before lw_create_widget.
      
      * src/xrdb.c (x_load_resources): For LUCID and XFT, don't put a
      resource that specifies helvetica for menus and dialogs.
      3928f2b6
  21. 10 Feb, 2011 1 commit
    • Glenn Morris's avatar
      lwlib/ trivia. · 67f02b82
      Glenn Morris authored
      * lwlib-Xaw.c, lwlib-Xlw.c, lwlib-Xm.c, lwlib-utils.c, lwlib.c, xlwmenu.c:
      Standardize on <> for includes from the ../src directory.
      67f02b82
  22. 25 Jan, 2011 1 commit
  23. 15 Jan, 2011 1 commit
  24. 02 Jan, 2011 1 commit
  25. 08 Jul, 2010 2 commits
    • Jan D's avatar
      Change function definition from K&R to prototype. Fix prototype warnings. · c825c0b6
      Jan D authored
      * lwlib-Xaw.c (xaw_generic_callback, command_reset)
      (xaw_update_one_value): Reformat.
      (xaw_update_one_widget): Reformat and remove dead code.
      (xaw_scrollbar_scroll, xaw_scrollbar_jump, xaw_create_scrollbar)
      (xaw_update_scrollbar): Remove (not used).
      (make_dialog): Change from K&R to prototype. Remove dead code.
      (xaw_creation_table): Remove scrollbar entry.
      
      * lwlib-Xlw.c (x_print_complete_resource_name): Change from K&R to
      prototype.
      (xlw_update_one_value): Reformat.
      
      * lwlib-Xm.c (x_print_complete_resource_name)
      (make_destroyed_instance, free_destroyed_instance, first_child)
      (lw_motif_widget_p, resource_motif_string, destroy_all_children)
      (xm_arm_callback, xm_update_label, xm_update_list)
      (xm_update_pushbutton, xm_update_cascadebutton)
      (xm_update_toggle, xm_update_radiobox, make_menu_in_widget)
      (update_one_menu_entry, xm_update_menu, xm_update_text)
      (xm_update_text_field, xm_update_one_widget)
      (xm_update_one_value, activate_button, dialog_key_cb)
      (make_dialog, mark_dead_instance_destroyed)
      (find_matching_instance, recenter_widget, recycle_instance)
      (xm_create_dialog, make_menubar, remove_grabs, make_popup_menu)
      (make_main, xm_destroy_instance, xm_popup_menu)
      (set_min_dialog_size, xm_pop_instance, do_call)
      (xm_internal_update_other_instances, xm_generic_callback)
      (xm_nosel_callback, xm_pull_down_callback, xm_pop_down_callback)
      (xm_set_keyboard_focus, xm_set_main_areas, xm_manage_resizing): Change
      from K&R to prototype.
      
      * lwlib-int.h (widget_creation_function): Fix prototype.
      
      * lwlib.c (allocate_widget_info, lw_register_widget): Change from K&R
      to prototype.
      (lw_internal_update_other_instances, merge_widget_value): Reformat.
      
      * xlwmenu.c (size_menu_item): Change from K&R to prototype.
      Change label_width and height to int.
      (draw_arrow, draw_shadow_rectangle, draw_shadow_rhombus)
      (draw_separator, display_menu, fit_to_screen, motion_event_is_in_menu)
      (map_event_to_widget_value): Reformat.
      (display_menu_item): Change from K&R to prototype.
      c825c0b6
    • Dan Nicolaescu's avatar
      Remove alternative K&R declarations. · d8825aa3
      Dan Nicolaescu authored
      * lwlib/lwlib.c (allocate_widget_instance, get_widget_info)
      (get_widget_instance, find_instance, set_one_value)
      (update_one_widget_instance, update_all_widget_values)
      (lw_modify_all_widgets, lw_get_widget, lw_make_widget)
      (lw_create_widget, lw_pop_all_widgets, lw_show_busy)
      (lw_refigure_widget, lw_allow_resizing): Remove alternative K&R
      declarations.
      * lwlib/lwlib-Xlw.c (xlw_update_one_widget):
      (xlw_pop_instance): Likewise.
      * lwlib/lwlib-Xaw.c (xaw_update_one_widget, xaw_pop_instance):
      Likewise.
      * lwlib/lwlib-Xm.c (P_): Remove.
      
      * src/xdisp.c (store_mode_line_noprop_char): Remove K&R alternative declaration.
      d8825aa3
  26. 05 Jul, 2010 1 commit
    • Jan D's avatar
      Fix some bad prototypes and formatting after conversion from K&R declaration. · e4c8d29a
      Jan D authored
      * lwlib/lwlib-Xaw.c: Include <ctype.h> for isdigit.
      (fill_xft_data, set_text): Remove unused variable screen.
      (draw_text): Cast bp to FcChar8*.
      (find_xft_data): Return 0 if inst or xft_data is not set.
      (wm_delete_window): Correct prototype.  Initialize widget to 0
      and return if widget is still 0 after loop.
      
      * lwlib/xlwmenu.c (XlwMenuSetValues, XlwMenuInitialize): Correct prototype.
      (display_menu_item): Remove unused variable gi.
      (make_windows_if_needed): Remove unused variable screen.
      (XlwMenuRedisplay): Remove unused variable i.
      
      * src/gtkutil.c (xg_get_pixbuf_from_pix_and_mask)
      (xg_get_image_for_pixmap, create_dialog)
      (xg_get_file_with_selection, xg_get_file_name, update_cl_data)
      (menuitem_highlight_callback, make_menu_item)
      (xg_create_one_menuitem, create_menus, xg_update_menu_item)
      (xg_create_scroll_bar, xg_update_scrollbar_pos)
      (xg_set_toolkit_scroll_bar_thumb, xg_tool_bar_button_cb)
      (xg_tool_bar_proxy_help_callback, xg_tool_bar_detach_callback)
      (xg_tool_bar_attach_callback, xg_tool_bar_help_callback)
      (xg_tool_bar_item_expose_callback): Reformat prototype.
      (xg_update_menubar): GList *group => GSList *group.
      (xg_modify_menubar_widgets): Initialize witem to 0, check witem != 0
      before use.
      (update_frame_tool_bar): 4:th param to xg_get_image_for_pixmap changed
      to GTK_IMAGE (wimage).
      
      * src/xsettings.c (something_changedCB, parse_settings)
      (apply_xft_settings): Reformat prototype.
      (something_changedCB, init_gconf): Remove unused variable i.
      (read_settings): Remove unused variable long_len.
      
      * src/xsmfns.c (SSDATA): New macro.
      (smc_save_yourself_CB, x_session_initialize): Use SSDATA for strings
      passed to strlen/strcpy/strcat.
      (create_client_leader_window): Surround with #ifndef USE_GTK.  Cast
      7:th arg to XChangeProperty to (unsigned char *)
      e4c8d29a
  27. 04 Jul, 2010 1 commit
  28. 13 May, 2010 1 commit
  29. 21 Apr, 2010 1 commit
    • Jan Djärv's avatar
      Declarations before code (Bug#5993). · c632dfda
      Jan Djärv authored
      * data.c (make_blv): Declarations before code (Bug#5993).
      
      * xlwmenu.c (expose_cb):
      * lwlib-Xaw.c (fill_xft_data): Declarations before code (Bug#5993).
      c632dfda
  30. 11 Apr, 2010 1 commit
    • Jan Djärv's avatar
      Use XFT in Lucid dialogs if available. · 1ecb2d3f
      Jan Djärv authored
      	* xmenu.c (apply_systemfont_to_dialog): New.
      	(create_and_show_dialog): Call apply_systemfont_to_dialog if HAVE_XFT.
      
      	* lwlib-Xaw.c (widget_xft_data): New for Xft data.
      	(fill_xft_data, openFont, get_text_width_and_height)
      	(draw_text, set_text, find_xft_data, command_press)
      	(command_reset): New functions.
      	(xaw_update_one_widget): Call set_text for dialog and buttons
      	if HAVE_XFT.  Also set internalHeight for buttons.
      	(xaw_destroy_instance): Free all Xft related data.
      	(button_actions, buttonTrans): New structures.
      	(make_dialog): Call XtAppAddActions for button_actions.
      	Find xft font to use and call fill_xft_data for widgets.
      	(xaw_create_dialog): Pass instance parameter to make_dialog.
      
      	* lwlib-int.h (_widget_instance): Add Xft data if HAVE_XFT.
      	Override translations for buttons.  If depth is 16 or more, tell
      	Xaw3d to not be nice to colormap.
      	Remove separator widget, use XtNhorizDistance on first right button
      	instead.
      
      	* xresources.texi (Lucid Resources): Mention faceName for dialogs.
      1ecb2d3f
  31. 13 Jan, 2010 1 commit
  32. 19 Oct, 2009 1 commit
    • Dan Nicolaescu's avatar
      * alloc.c: Do not define struct catchtag. · d7306fe6
      Dan Nicolaescu authored
      * eval.c: Move struct catchtag definition ...
      * lisp.h: ... here.
      
      * image.c: Move png.h #include earlier to avoid warnings.
      
      * xterm.c:
      * xsmfns.c:
      * xselect.c:
      * xrdb.c:
      * xmenu.c:
      * xftfont.c:
      * xfont.c:
      * xfns.c:
      * xfaces.c:
      * xdisp.c:
      * window.c:
      * widget.c:
      * w32xfns.c:
      * w32uniscribe.c:
      * w32term.c:
      * w32select.c:
      * w32reg.c:
      * w32proc.c:
      * w32menu.c:
      * w32inevt.c:
      * w32heap.c:
      * w32font.c:
      * w32fns.c:
      * w32console.c:
      * w32.c:
      * w16select.c:
      * vm-limit.c:
      * unexsol.c:
      * unexec.c:
      * unexcw.c:
      * unexaix.c:
      * undo.c:
      * tparam.c:
      * textprop.c:
      * terminfo.c:
      * terminal.c:
      * termcap.c:
      * term.c:
      * syntax.c:
      * sound.c:
      * sheap.c:
      * search.c:
      * scroll.c:
      * region-cache.c:
      * regex.c:
      * ralloc.c:
      * process.c:
      * print.c:
      * msdos.c:
      * minibuf.c:
      * menu.c:
      * marker.c:
      * macros.c:
      * keymap.c:
      * keyboard.c:
      * intervals.c:
      * insdel.c:
      * indent.c:
      * gtkutil.c:
      * ftxfont.c:
      * ftfont.c:
      * fringe.c:
      * frame.c:
      * fontset.c:
      * font.c:
      * fns.c:
      * floatfns.c:
      * filelock.c:
      * fileio.c:
      * emacs.c:
      * editfns.c:
      * dosfns.c:
      * doprnt.c:
      * doc.c:
      * dispnew.c:
      * dired.c:
      * dbusbind.c:
      * data.c:
      * composite.c:
      * coding.c:
      * cmds.c:
      * cm.c:
      * chartab.c:
      * charset.c:
      * character.c:
      * ccl.c:
      * category.c:
      * casetab.c:
      * casefiddle.c:
      * callproc.c:
      * callint.c:
      * bytecode.c:
      * buffer.c:
      * atimer.c: Include setjmp.h.  (Bug#4643)
      
      * xlwmenu.c:
      * lwlib.c:
      * lwlib-utils.c:
      * lwlib-Xm.c:
      * lwlib-Xlw.c:
      * lwlib-Xaw.c: Include setjmp.h.
      d7306fe6
  33. 08 Jan, 2009 1 commit
  34. 07 Jan, 2008 1 commit
  35. 13 Jun, 2007 1 commit
  36. 27 Feb, 2007 1 commit
  37. 04 Jul, 2005 1 commit