1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-21 03:52:16 -08:00
Commit graph

320 commits

Author SHA1 Message Date
Kim F. Storm
16a5378b45 (resolve_face_name): Use Fget instead of Fsafe_get. 2005-04-21 23:45:40 +00:00
Kim F. Storm
f374520488 (resolve_face_name): Use Fsafe_get to avoid redisplay
loops in case of bad face property lists.  Limit number of face
alias lookups to 10 (in case of face alias loops).
2005-04-19 08:34:50 +00:00
Thien-Thi Nguyen
7d603e3f8e (realize_x_face) [!HAVE_WINDOW_SYSTEM]: Return NULL. 2005-04-18 11:34:46 +00:00
Kim F. Storm
d196a54737 (lookup_derived_face): Add arg SIGNAL_P. 2005-03-22 23:02:03 +00:00
Stefan Monnier
211f2210f2 (x_update_menu_appearance) [HAVE_X_I18N]:
Use xic_create_fontsetname even for non-Motif menus.
Don't forget to free the fontsetname.
2005-03-18 04:21:17 +00:00
Stefan Monnier
2defe37faf (x_update_menu_appearance) [USE_MOTIF]:
Use xic_create_fontsetname to create a fontset so utf-8 locales work.
(dump_realized_face): Fix warning.
2005-03-17 18:43:47 +00:00
Kim F. Storm
91c212f159 (Finternal_set_lisp_face_attribute): Allow :color property
to be nil in a :box attribute value list; customize prints that
as lisp value when no box color is specified.
2005-02-18 22:55:53 +00:00
Eli Zaretskii
6a46b96b70 (face_color_supported_p): Use HAVE_WINDOW_SYSTEM
instead of HAVE_X_WINDOWS, for non-X windowed sessions.
2005-02-05 12:14:45 +00:00
Stefan Monnier
97f4312dfd Copyright update. 2005-02-03 16:04:50 +00:00
Kim F. Storm
a6d8ba25ae (x_free_gc) [!GLYPH_DEBUG]: Fix xassert. 2005-02-03 14:08:47 +00:00
Kim F. Storm
dc91a0ed80 (merge_faces): Rename from merge_into_realized_face.
Callers changed.
Add support to merge with lisp face id too (if face_name is t).
2005-01-10 13:35:11 +00:00
Kim F. Storm
fd998c7f54 (merge_into_realized_face): New function. Used to
merge escape-glyph face or face from display table into current	face.
2005-01-09 02:05:20 +00:00
Steven Tamm
b15325b22a * dispextern.h: Change HAVE_CARBON to MAC_OS.
(struct glyph_string): Likewise.
* emacs.c (main) [MAC_OS8]: Call mac_term_init instead of
	mac_initialize.
* fileio.c (Fnext_read_file_uses_dialog_p, Fread_file_name):
	Change TARGET_API_MAC_CARBON to HAVE_CARBON.
* fns.c (vector): Change MAC_OSX to MAC_OS.
* frame.c (x_set_frame_parameters, x_report_frame_params)
	(x_set_fullscreen): Remove #ifndef HAVE_CARBON.
	(x_set_border_width, Vdefault_frame_scroll_bars): Change
	HAVE_CARBON to MAC_OS.
* image.c [MAC_OS]: Include sys/stat.h.
	[MAC_OS && !MAC_OSX]: Include sys/param.h, ImageCompression.h, and
	QuickTimeComponents.h.
* mac.c [!MAC_OSX] (mac_wait_next_event): Add extern.
	[!MAC_OSX] (select): Use mac_wait_next_event.
	[!MAC_OSX] (run_mac_command): Change EXEC_SUFFIXES to
	Vexec_suffixes.
	[!MAC_OSX] (select, run_mac_command): Change `#ifdef
	TARGET_API_MAC_CARBON' to `#if TARGET_API_MAC_CARBON'.
	(mac_clear_font_name_table): Add extern.
	(Fmac_clear_font_name_table): New defun.
	(syms_of_mac): Defsubr it.
	[MAC_OSX] (SELECT_POLLING_PERIOD_USEC): New define.
	[MAC_OSX] (select_and_poll_event): New function.
	[MAC_OSX] (sys_select): Use it.
	[MAC_OSX && SELECT_USE_CFSOCKET] (socket_callback): New function.
	[MAC_OSX && SELECT_USE_CFSOCKET]
	(SELECT_TIMEOUT_THRESHOLD_RUNLOOP, EVENT_CLASS_SOCK): New defines.
	[MAC_OSX] (sys_select) [SELECT_USE_CFSOCKET]: Use CFSocket and
	RunLoop for simultaneously monitoring two kinds of inputs, window
	events and process outputs, without periodically polling.
* macfns.c (mac_initialized): Remove extern.
	(stricmp): Put in #if 0.  All callers changed to use xstricmp in
	xfaces.c.
	(strnicmp): Decrement `n' at the end of each loop, not the
	beginning.
	(check_mac): Use the term "Mac native windows" instead of "Mac
	OS".
	(check_x_display_info, x_display_info_for_name): Sync with xfns.c.
	(mac_get_rdb_resource): New function (from w32reg.c).
	(x_get_string_resource): Use it.
	(install_window_handler): Add extern.
	(mac_window): New function.
	(Fx_create_frame): Use it instead of make_mac_frame.  Set
	parameter for Qfullscreen.  Call x_wm_set_size_hint.
	(Fx_open_connection, Fx_close_connection): New defuns.
	(syms_of_macfns): Defsubr them.
	(x_create_tip_frame) [TARGET_API_MAC_CARBON]: Add
	kWindowNoUpdatesAttribute to the window attribute.
	(x_create_tip_frame) [!TARGET_API_MAC_CARBON]: Use NewCWindow.
	(x_create_tip_frame): Don't call ShowWindow.
	(Fx_show_tip): Call ShowWindow.
	(Fx_file_dialog): Change `#ifdef TARGET_API_MAC_CARBON' to `#if
	TARGET_API_MAC_CARBON'.
	(mac_frame_parm_handlers): Set handlers for Qfullscreen.
	(syms_of_macfns) [MAC_OSX]: Initialize mac_in_use to 0.
* macgui.h [!MAC_OSX]: Don't include Controls.h.  Include
	Windows.h.
	(Window): Typedef to WindowPtr and move outside `#if
	TARGET_API_MAC_CARBON'.
	(XSizeHints): New struct.
* macterm.c (x_update_begin, x_update_end)
	[TARGET_API_MAC_CARBON]: Disable screen updates during update of a
	frame.
	(x_draw_glyph_string_background, x_draw_glyph_string_foreground)
	[MAC_OS8]: Use XDrawImageString/XDrawImageString16.
	(construct_mouse_click): Put in #if 0.
	(x_check_fullscreen, x_check_fullscreen_move): Remove decls.
	(x_scroll_bar_create, x_scroll_bar_handle_click): Change `#ifdef
	TARGET_API_MAC_CARBON' to `#if TARGET_API_MAC_CARBON'.
	(activate_scroll_bars, deactivate_scroll_bars)
	[!TARGET_API_MAC_CARBON]: Use ActivateControl/DeactivateControl.
	(x_make_frame_visible) [TARGET_API_MAC_CARBON]: Reposition window
	if the position is neither user-specified nor program-specified.
	(x_free_frame_resources): Free size_hints.
	(x_wm_set_size_hint): Allocate size_hints if needed.  Set
	size_hints.
	(mac_clear_font_name_table): New function.
	(mac_do_list_fonts): Initialize font_name_table if needed.
	(x_list_fonts): Don't initialize font_name_table.  Add BLOCK_INPUT
	around mac_do_list_fonts.
	(mac_unload_font): New function.
	(x_load_font): Add BLOCK_INPUT around XLoadQueryFont.
	(init_mac_drag_n_drop, mac_do_receive_drag): Enclose declarations
	and definitions with #if TARGET_API_MAC_CARBON.
	[USE_CARBON_EVENTS] (mac_handle_window_event): Add decl.
	(install_window_handler): Add decl.
	(do_window_update): Add BeginUpdate/EndUpdate for the tooltip
	window.  Use UpdateControls.  Get the rectangle that should be
	updated and restrict the target of expose_frame to it.
	(do_grow_window): Set minimum height/width according to
	size_hints.
	(do_grow_window) [TARGET_API_MAC_CARBON]: Use ResizeWindow.
	(do_zoom_window): Don't use x_set_window_size.
	[USE_CARBON_EVENTS] (mac_handle_window_event): New function.
	(install_window_handler): New function.
	[!USE_CARBON_EVENTS] (mouse_region): New variable.
	[!USE_CARBON_EVENTS] (mac_wait_next_event): New function.
	(XTread_socket) [USE_CARBON_EVENTS]: Move call to
	GetEventDispatcherTarget inside BLOCK_INPUT.
	(XTread_socket) [!USE_CARBON_EVENTS]: Use mac_wait_next_event.
	Update mouse_region when mouse is moved.
	(make_mac_frame): Remove.
	(make_mac_terminal_frame): Put in #ifdef MAC_OS8.  Initialize
	mouse pointer shapes.  Change values of f->left_pos and
	f->top_pos.  Don't use make_mac_frame.  Use NewCWindow.  Don't
	call ShowWindow.
	(mac_initialize_display_info) [MAC_OSX]: Create mac_id_name from
	Vinvocation_name and Vsystem_name.
	(mac_make_rdb): New function (from w32term.c).
	(mac_term_init): Use it.  Add BLOCK_INPUT.  Error if display has
	already been opened.  Don't pass argument to
	mac_initialize_display_info.  Don't set dpyinfo->height/width.
	Add entries to x_display_list and x_display_name_list.
	(x_delete_display): New function.
	(mac_initialize): Don't call mac_initialize_display_info.
	(syms_of_macterm) [!MAC_OSX]: Don't call Fprovide.
* macterm.h (check_mac): Add extern.
	(struct mac_output): New member size_hints.
	(FRAME_SIZE_HINTS): New macro.
	(mac_unload_font): Add extern.
* xdisp.c (expose_window, expose_frame): Remove kludges for Mac.
* xfaces.c (clear_font_table) [MAC_OS]: call mac_unload_font.
2004-12-27 17:27:30 +00:00
Kim F. Storm
2272e96769 (lookup_named_face): Add signal_p arg. Return -1 if
signal_p is zero and face name is unknown.
(Fx_list_fonts): Don't signal error in lookup_named_face.
(Fface_font): Signal error in lookup_named_face.
(ascii_face_of_lisp_face): Likewise.
2004-11-22 23:25:49 +00:00
Richard M. Stallman
e1e419ecc6 (merge_named_face): GCPRO the face_name in the
named_merge_point struct that we make.
(merge_face_heights): Eliminate GCPRO arg.  All callers changed.
2004-11-07 03:47:09 +00:00
Kim F. Storm
46b00436e7 (Qface_no_inherit): New var.
(syms_of_xfaces): Intern and staticpro it.
(Finternal_make_lisp_face, Finternal_set_lisp_face_attribute)
(Finternal_copy_lisp_face, update_face_from_frame_parameter):
Don't increment face_change_count when face has non-nil
face-no-inherit property.
2004-09-14 20:04:09 +00:00
Richard M. Stallman
d9639b25df (merge_face_ref): Specifying `unspecified' is a no-op. 2004-08-16 22:53:28 +00:00
Luc Teirlinck
fc820cc540 (Fcolor_supported_p): Doc fix. 2004-07-24 20:56:59 +00:00
Stefan Monnier
734e951420 (x_supports_face_attributes_p)
(Fdisplay_supports_face_attributes_p): YAILOM.
(tty_supports_face_attributes_p): Remove unused var `i'.
2004-06-30 19:35:18 +00:00
Richard M. Stallman
5e9bab6ff1 (Finternal_copy_lisp_face): Small cleanup; doc fix. 2004-06-21 03:26:32 +00:00
Andreas Schwab
3ebc09397f (face_attr_equal_p): Declare parameters. 2004-06-13 14:50:07 +00:00
Miles Bader
6e87ac8f55 Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-385
src/xfaces.c (push_named_merge_point): Return 0 if a cycle is detected
2004-06-08 07:06:19 +00:00
Miles Bader
a0a2334679 Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-381
Face merging cleanups

The only user-visible changes should be:

  * The priority order of faces in a face :inherit attribute is now
    reversed (for consistency with face lists in `face' text
    properties)

  * An :inherit loop is halted immediately, instead of being applied
    several times first; this should only matters when a relative
    attribute such as a :height scale is used.
2004-06-07 07:02:20 +00:00
Miles Bader
0722292b20 Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-377
(Fdisplay_supports_face_attributes_p): Work around bootstrapping problem
2004-06-06 09:49:12 +00:00
Miles Bader
8e330b2257 Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-374
(tty_supports_face_attributes_p): Ensure attributes differ from default

This implements the property of `display-supports-face-attributes-p'
which says that the specified attributes must be distinguishable from
those of the default face.
2004-06-04 23:30:03 +00:00
Eli Zaretskii
ccda4e3cef (x_supports_face_attributes_p): Make this function
conditional on HAVE_WINDOW_SYSTEM.
(Fdisplay_supports_face_attributes_p) [HAVE_WINDOW_SYSTEM]: Don't
call x_supports_face_attributes_p if it was not compiled in.
2004-06-04 15:56:53 +00:00
Miles Bader
9717e36cff Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-370
Move `display-supports-face-attributes-p' entirely into C code

Previously only the tty-related portion of display-supports-face-attributes-p
was done in C.  This just moves the graphical-display related bits into C
too, which allows us to implement them properly (the previous attempt to do a
halfway-proper job in lisp didn't work because of funny conditions during
emacs startup).
2004-06-04 06:00:59 +00:00
Kim F. Storm
0bc90bbad4 (face_at_buffer_position): Use GET_OVERLAYS_AT. 2004-05-17 22:50:41 +00:00
Juanma Barranquero
7fc9263541 (Ftty_supports_face_attributes_p, Finternal_copy_lisp_face): Fix typo in
docstring.
(Finternal_get_lisp_face_attribute): Fix docstring.
2004-05-13 00:22:16 +00:00
Miles Bader
e32d987200 Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-248
src/lisp.h (CYCLE_CHECK): Macro moved from xfaces.c
2004-04-26 00:21:41 +00:00
Stefan Monnier
066a4c6b91 (face_color_supported_p): Fix compilation without X11. 2004-04-09 16:15:08 +00:00
Jan Djärv
5890e9f7ac Move include stdio.h to same place as in other files. 2004-02-09 15:39:49 +00:00
Kenichi Handa
b64c9a0407 (face_font_available_p): New function. 2003-12-29 06:54:55 +00:00
Kim F. Storm
d7078aefa0 (cache_face): Abort if c->size exceeds MAX_FACE_ID. 2003-12-28 00:12:45 +00:00
Jan Djärv
5202d23dfe * xfaces.c (lface_fully_specified_p): Take into account that
MAC OS always have unspecified stipple.
2003-12-24 10:29:59 +00:00
Thien-Thi Nguyen
2d176448ab (Fcolor_gray_p): Fix omission bug:
In case `frame' is nil, consult the selected frame.
(Fcolor_supported_p): Likewise.
2003-12-24 06:39:58 +00:00
Miles Bader
ab5796a9f9 Add arch taglines 2003-09-01 15:45:59 +00:00
Kenichi Handa
6aa1813f26 (try_font_list): Call try_alternative_families to try any family
with the given registry.
2003-08-15 12:19:29 +00:00
Kenichi Handa
10b7e56f14 * xfaces.c (better_font_p): Prefer a real scalable font; i.e. not
what autoscaled.
(best_matching_font): Once we find a better scalable font, set
non_scalable_has_exact_height_p to 1.
2003-08-15 12:08:51 +00:00
Jan Djärv
a5f696acd2 Fix some of the font/face problems. 2003-06-26 21:18:45 +00:00
Jason Rumney
0c8ea7afde (Finternal_face_x_get_resource): Do it on Windows and Mac too. 2003-06-05 22:52:43 +00:00
Dave Love
f0d6207551 (font_rescale_ratio): Fix for K&R. 2003-06-02 18:43:11 +00:00
Glenn Morris
074468698d (realize_default_face): Do not abort if lface is non-existent -
reverts change from v1.275.
2003-05-29 17:08:16 +00:00
Stefan Monnier
a72551529b (build_scalable_font_name): Remove `unused var pixel_size' warning. 2003-05-25 17:47:13 +00:00
Kim F. Storm
c623bbd3a6 [WINDOWSNT]: Move redefinition of FONT_WIDTH macro to
where it's used in x_list_fonts (for clarity).
(frame_update_line_height): Remove unused function; functionality
is now done directly when setting the default font in x_set_font.
2003-05-24 22:09:13 +00:00
Richard M. Stallman
e67f5ccc06 (Finternal_set_lisp_face_attribute): Handle Qunspecified
as value for QCfont attribute.
(realize_default_face): lface should already exist; crash if not.
Specify 0 for FORCE_P when calling set_lface_from_font_name.
2003-05-19 14:41:09 +00:00
Kenichi Handa
f70400f256 (Vface_font_rescale_alist): New variable.
(struct font_name): New member rescale_ratio.
(font_rescale_ratio): New function.
(split_font_name): If NUMERIC_P is nonzero, set
font->rescale_ratio.
(better_font_p): On comparing point sized, pay attention to
recale_ratio member of fonts.
(build_scalable_font_name): Reflect font->rescale_ratio in the
font name.
(syms_of_xfaces): Declare Vface_font_rescale_alist as a Lisp
variable.
2003-04-09 07:26:59 +00:00
Miles Bader
774666fb43 (choose_face_font): Make sure *NEEDS_OVERSTRIKE is always set. 2003-04-03 01:40:58 +00:00
Kim F. Storm
b5bcda6db2 Remove extern decl for frame parameter vars. 2003-03-31 20:36:05 +00:00
Stefan Monnier
2b47daccff (x_face_list_fonts): Fix int/Lisp_Object mixup. 2003-02-22 22:20:00 +00:00