summaryrefslogtreecommitdiff
path: root/src/xsettings.h
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Make src headers idempotent and standalonePaul Eggert2015-10-161-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Redo src/*.h so that each include file is idempotent (that is, can be included multiple times with the latter inclusions having no effect) and standalone (that is, can be included by itself, with no include file other than config.h needed as a prerequisite). This is standard practice in GNU programs nowadays. * lwlib/lwlib-widget.h, src/buffer.h, src/category.h, src/character.h: * src/charset.h, src/coding.h, src/commands.h, src/disptab.h: * src/fontset.h, src/gnutls.h, src/indent.h, src/keymap.h, src/macros.h: * src/regex.h [emacs]: * src/syntax.h, src/systty.h, src/termhooks.h: Include lisp.h, for Lisp_Object. * src/buffer.h, src/category.h, src/cm.h, src/commands.h, src/disptab.h: * src/indent.h, src/intervals.h, src/keyboard.h, src/macros.h: * src/process.h, src/puresize.h, src/region-cache.h, src/syntax.h: * src/syssignal.h, src/sysstdio.h, src/systty.h, src/termchar.h: * src/termopts.h, src/tparam.h, src/unexec.h: Protect against multiple inclusion. * src/buffer.h: Include character.h, for STRING_CHAR. * src/emacsgtkfixed.h (struct frame): * src/fontset.h (struct face): * src/region-cache.h (struct buffer): * src/termhooks.h (struct glyph): * src/xsettings.h (struct x_display_info): Add possibly-forward decl. * src/syntax.h: Include buffer.h, for BVAR. * src/sysselect.h: Include lisp.h, for eassume. * src/termchar.h: Include <stdio.h>, for FILE. * src/widget.h: Include <X11/IntrinsicP.h>, for Widget. * src/xsettings.h: Include <X11/Xlib.h>, for XEvent.
* Update copyright year to 2015Paul Eggert2015-01-011-1/+1
| | | | Run admin/update-copyright.
* Update copyright year to 2014 by running admin/update-copyright.Paul Eggert2014-01-011-1/+1
|
* Don't overuse 'const' in types of locals.Paul Eggert2013-09-171-1/+1
| | | | | | | | | | | | | | | | | | | | * 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-3/+2
| | | | | | | | | | | | | | | | | | | | 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.
* Update copyright notices for 2013.Paul Eggert2013-01-011-1/+1
|
* 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.
* Add 2012 to FSF copyright years for Emacs filesGlenn Morris2012-01-051-1/+1
|
* * xsettings.c, xsettings.h (xsettings_get_system_normal_font):Paul Eggert2011-04-131-1/+2
| | | | Define only if USE_LUCID.
* Refill some long/short copyright headers.Glenn Morris2011-01-261-2/+2
|
* Convert consecutive FSF copyright years to ranges.Glenn Morris2011-01-241-1/+1
|
* 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
| |
* | Remove unused declarationsAndreas Schwab2010-12-271-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/buffer.c: Remove unused declarations. * src/buffer.h: Likewise. * src/charset.h: Likewise. * src/composite.h: Likewise. * src/dispextern.h: Likewise. * src/dispnew.c: Likewise. * src/font.h: Likewise. * src/fontset.c: Likewise. * src/fontset.h: Likewise. * src/intervals.h: Likewise. * src/keymap.h: Likewise. * src/lisp.h: Likewise. * src/syntax.c: Likewise. * src/syntax.h: Likewise. * src/termhooks.h: Likewise. * src/window.h: Likewise. * src/xsettings.h: Likewise. * src/xterm.c: Likewise. * src/xterm.h: Likewise. * src/chartab.c (sub_char_table_ref): Make static. * src/dispnew.c (line_hash_code, required_matrix_height) (required_matrix_width): Likewise. * src/eval.c (interactive_p, apply_lambda): Likewise. * src/fns.c (string_make_multibyte, copy_hash_table, hash_clear): Likewise. * src/font.c (QCadstyle, QCregistry, font_make_spec) (font_parse_fcname, font_encode_char, font_at): Likewise. * src/frame.c (x_frame_get_arg): Likewise. * src/keymap.c (get_keyelt): Likewise. * src/lread.c (read_filtered_event): Likewise. * src/print.c (write_string_1): Likewise. * src/window.c (delete_window, window_height, window_width) (foreach_window): Likewise. * src/xrdb.c (x_get_customization_string, x_get_resource): Likewise. * src/xterm.c (x_scroll_bar_clear, xembed_set_info) (xembed_send_message): Likewise. * src/eval.c (run_hook_list_with_args): Delete. * src/font.c (font_unparse_gtkname, font_update_lface): Likewise. * src/terminal.c (get_terminal_param): Likewise. * src/xterm.c (x_alloc_lighter_color_for_widget): Likewise.
* | Remove P_ and __P macros.Jan D2010-07-021-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lwlib/lwlib-Xaw.h: Remove P_ and __P macros. * lwlib/lwlib-Xlw.h: * lwlib/lwlib-Xm.h: * lwlib/lwlib-int.h: * lwlib/lwlib-utils.h: * lwlib/lwlib.h: Likewise. * src/buffer.h: Remove P_ and __P macros. * src/category.h: * src/ccl.h: * src/character.h: * src/charset.h: * src/cm.h: * src/coding.h: * src/composite.h: * src/dispextern.h: * src/disptab.h: * src/font.h: * src/fontset.h: * src/frame.h: * src/gtkutil.h: * src/indent.h: * src/intervals.h: * src/keyboard.h: * src/keymap.h: * src/lisp.h: * src/macros.h: * src/md5.h: * src/menu.h: * src/msdos.h: * src/nsterm.h: * src/puresize.h: * src/region-cache.h: * src/syntax.h: * src/syssignal.h: * src/systime.h: * src/termhooks.h: * src/w32term.h: * src/widget.h: * src/window.h: * src/xgselect.h: * src/xsettings.h: * src/xterm.h: Likewise.
* | Gtk tool bars can be text, icons with text or just icons.Jan Djärv2010-04-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * xsettings.c: Qmonospace_font_name, Qtool_bar_style and current_tool_bar_style are new. (store_config_changed_event): Rename from store_font_changed_event. (XSETTINGS_TOOL_BAR_STYLE): New define. (SEEN_FONT, SEEN_TB_STYLE): New enum values. (struct xsettings): Add font and tb_style, set xft stuff inside #ifdef HAVE_XFT. (something_changedCB): store_font_changed_event is now store_config_changed_event (parse_settings): Rename from parse_xft_settings. Read non-xft xsettings outside #ifdef HAVE_XFT. (read_settings): Renamed from read_xft_settings. (apply_xft_settings): Take current settings as parameter. Do not call read_(xft)_settings. (read_and_apply_settings): New function. (xft_settings_event): Do non-xft stuff out of HAVE_XFT. Call read_and_apply_settings if there are settings to be read. (init_xsettings): Renamed from init_xfd_settings. Call read_and_apply_settings unconditionally. (xsettings_initialize): Call init_xsettings. (Ftool_bar_get_system_style): New function. (syms_of_xsettings): Define Qmonospace_font_name and Qtool_bar_style. Initialize current_tool_bar_style to nil. defsubr Stool_bar_get_system_style. Fprovide on dynamic-setting. * xsettings.h (Ftool_bar_get_system_style): Declare. * xdisp.c: Vtool_bar_style, tool_bar_max_label_size, Qtext, Qboth, Qboth_horiz are new. (syms_of_xdisp): Intern Qtext, Qboth, Qboth_horiz, DEFVAR Vtool_bar_style, tool_bar_max_label_size. * lisp.h: Extern declare Qtext, Qboth, Qboth_horiz. * keyboard.c: QClabel is new. (parse_tool_bar_item): Take out QClabel from tool bar items. Try to construct a label if ther is no QClabel. (syms_of_keyboard): Intern :label as QClabel. * dispextern.h (tool_bar_item_idx): TOOL_BAR_ITEM_LABEL is new. (Vtool_bar_style, tool_bar_max_label_size, DEFAULT_TOOL_BAR_LABEL_SIZE): New. * Makefile.in (SOME_MACHINE_LISP): font-setting.el renamed to dynamic-setting.el. * gtkutil.c (xg_tool_bar_menu_proxy): Handle label in tool bar item. (xg_make_tool_item, xg_show_toolbar_item): New function. (update_frame_tool_bar): Take label from TOOL_BAR_ITEM_LABEL. Call xg_make_tool_item to make a tool bar item. Call xg_show_toolbar_item. Use wtoolbar instead of x->toolbar_widget. * xterm.c (x_draw_image_relief): Take Vtool_bar_button_margin into account for toolbars. * vc-dir.el (vc-dir-tool-bar-map): Add :label on some tool bar items. * tool-bar.el (tool-bar-setup): Add :label on some tool bar items. * loadup.el: Load dynamic-setting.el if feature dynamic-setting is present. * info.el (info-tool-bar-map): Add labels. * cus-start.el (all): Add tool-bar-style and tool-bar-max-label-size. * cus-edit.el (custom-commands): Add labels for tool bar. (custom-buffer-create-internal, Custom-mode): Adjust for labels in custom-commands. * dynamic-setting.el: Renamed from font-setting.el.
* | Lucid menus can now use Xft for fonts.Jan Djärv2010-04-081-0/+3
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * xsettings.c (current_font, SYSTEM_FONT, XSETTINGS_FONT_NAME): New. (parse_xft_settings): Also check for XSETTINGS_FONT_NAME and save that in current_font. (init_gconf): Read value of SYSTEM_FONT and save it in current_font. (Ffont_get_system_normal_font, xsettings_get_system_normal_font): New functions. (syms_of_xsettings): Initialize current_font. defsubr Sfont_get_system_normal_font. * xsettings.h (Ffont_get_system_normal_font, xsettings_get_system_normal_font): Declare. * xfns.c (extern xlwmenu_default_font): Remove. (Fx_create_frame): Remove setting of xlwmenu_default_font, moved to xlwmenu.c. * menu.c (digest_single_submenu): If USE_LUCID and HAVE_XFT, encode menu items in UTF-8. * xmenu.c: include xsettings.h and xlwmenu.h if USE_LUCID. (apply_systemfont_to_menu): New function. (set_frame_menubar, create_and_show_popup_menu): Call apply_systemfont_to_menu. * xlwmenu.c (xlwmenu_default_font): Make static. (xlwMenuResources): Add XtNfaceName and XtNdefaultFace. (string_width): Use XftTextExtentsUtf8 if HAVE_XFT. (MENU_FONT_HEIGHT, MENU_FONT_ASCENT): Add versions for HAVE_XFT. (size_menu): Set max_rest_width in window_state structure. (display_menu_item): If HAVE_XFT and xft_draw is set, use XftDrawRect and XftDrawStringUtf8 to draw text. (make_windows_if_needed): Set max_rest_width and xft_draw in windows[i]. (openXftFont): New. (XlwMenuInitialize): Call openXftFont if HAVE_XFT. If mw->menu.font is not set, load font fixed and save it in xlwmenu_default_font. (XlwMenuInitialize): Set max_rest_width and xft_draw in windows[0]. (XlwMenuClassInitialize): Initialize xlwmenu_default_font. (XlwMenuRealize): Set xft_fg, xft_bg, xft_disabled_fg and windows[0].xft_draw if xft_font is set. (XlwMenuDestroy): Destroy all xft_draw and close xft_font. (facename_changed): New. (XlwMenuSetValues): Call facename_changed. If face name did change, close old fonts and destroy xft_draw:s. Then create new ones. * xlwmenu.h (XtNfaceName, XtCFaceName, XtNdefaultFace, XtCDefaultFace): New. * xlwmenuP.h (_window_state): Add max_rest_width and xft_draw. (_XlwMenu_part): Add faceName,xft_fg, xft_bg, xft_disabled_fg and xft_font. * xresources.texi (Lucid Resources): Mention faceName to set Xft fonts.
* Add 2010 to copyright years.Glenn Morris2010-01-131-1/+1
|
* Add arch taglineMiles Bader2009-12-011-0/+3
|
* Always suggest system font because .emacs may not have been read yet.Jan Djärv2009-11-201-0/+1
| | | | | | | | | | | * xfns.c (x_default_font_parameter): Call xsettings_get_system_font. * xsettings.h: Declare xsettings_get_system_font. * xsettings.c (xsettings_get_system_font): New function. (init_gconf): No use initiating gconf unless we have Xft also. (syms_of_xsettings): Only provide system-font-setting if HAVE_XFT and HAVE_GCONF.
* * lisp.h: Remove declaration of Ffont_get_system_font.Andreas Schwab2009-11-171-1/+1
| | | | | * xfns.c: Move include of "xsettings.h". * xsettings.h: Use EXFUN to declare Ffont_get_system_font.
* Handle system default font and changing font parameters.Jan Djärv2009-11-171-0/+29
* xterm.h (struct x_display_info): Add atoms and Window for xsettings. * xterm.c (handle_one_xevent): Call xft_settings_event for ClientMessage, PropertyNotify and DestroyNotify. (x_term_init): If we have XFT, get DPI from Xft.dpi. Call xsettings_initialize. * xftfont.c (xftfont_fix_match): New function. (xftfont_open): Call XftDefaultSubstitute before XftFontMatch. Call xftfont_fix_match after XftFontMatch. * xfont.c (xfont_driver): Initialize all members. * xfns.c (x_default_font_parameter): Try font from Ffont_get_system_font. Do not get font from x_default_parameter if we got one from Ffont_get_system_font. (Fx_select_font): Get the defaut font name from :name of FRAME_FONT (f). * w32font.c (w32font_driver): Initialize all members. * termhooks.h (enum event_kind): CONFIG_CHANGED_EVENT is new. * lisp.h: Declare syms_of_xsettings. * keyboard.c (kbd_buffer_get_event, make_lispy_event): Handle CONFIG_CHANGED_EVENT. * ftfont.c (ftfont_filter_properties): New function. * frame.c (x_set_font): Remove unused variable lval. * font.h (struct font_driver): filter_properties is new. * font.c (font_put_extra): Don't return if val is nil, it means boolean option is off. (font_parse_fcname): Collect all extra properties in extra_props and call filter_properties for all drivers with extra_props and font as parameter. (font_open_entity): Do not use cache, it does not pick up new fontconfig settings like hinting. (font_load_for_lface): If spec had a name in it, store it in entity. * emacs.c (main): Call syms_of_xsettings * config.in: HAVE_GCONF is new. * Makefile.in (GCONF_CFLAGS, GCONF_LIBS): New variables for HAVE_GCONF. xsettings.o is new. * menu-bar.el: Put "Use system font" in Option-menu. * loadup.el: If feature system-font-setting or font-render-setting is there, load font-setting. * Makefile.in (ELCFILES): font-settings.el is new. * font-setting.el: New file. * NEWS: Mention dynamic font changes (font-use-system-font). * configure.in: New option: --with(out)-gconf. Set HAVE_GCONF if we find gconf.