aboutsummaryrefslogtreecommitdiffstats
path: root/src/w32fns.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Changes for automatic remapping of X colors on terminal frames:Eli Zaretskii1999-12-061-15/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * xfaces.c (XColor) [!HAVE_X_WINDOWS]: Provide a typedef for non-X frames. (Vface_tty_color_alist): Remove. (tty_defined_color): New function. (defined_color): Rewrite to support any type of frame. (tty_color_name): New function. (face_color_supported_p, Fface_color_gray_p, Fface_color_supported_p): Support non-X frames. (load_color): Enclose the color name in quotes, in the log messages. Remove DOS-specific version of load_color. (realize_tty_face): Take the supported colors from tty-color-alist. Support translation of X colors to the closest tty color, for both MSDOS and tty frames. [MSDOS]: Don't invert face colors if they were taken from the frame colors. (Fface_register_tty_color, Fface_clear_tty_colors): Remove. * frame.h (struct x_output) [!MSDOS, !WINDOWSNT, !HAVE_X_WINDOWS]: Define a mostly empty surrogate. (tty_display): Declare. * frame.c (make_terminal_frame) [!macintosh]: Don't use tty_display. (Fframe_parameters): Don't invert colors of non-FRAME_WINDOW_P frames when the frame's param_alist includes 'reverse. (tty_display): Define. (make_terminal_frame) [!MSDOS]: Assign &tty_display to the output_data.x member. (Fframe_parameters): Return foreground and background color names on tty frames as well, in addition to MSDOS frames. * msdos.h (DisplayWidth, DisplayHeight): Changes for Lisp_Object selected_frame. (struct x_output): Remove unused members; document who uses each member. (FRAME_PARAM_FACES, FRAME_N_PARAM_FACES, FRAME_DEFAULT_PARAM_FACE, FRAME_MODE_LINE_PARAM_FACE, FRAME_COMPUTED_FACES, FRAME_N_COMPUTED_FACES, FRAME_SIZE_COMPUTED_FACES, FRAME_DEFAULT_FACE, FRAME_MODE_LINE_FACE, unload_color): Remove unused macro definintions. * msdos.c (IT_set_frame_parameters): Don't call recompute_basic_faces, the next redisplay will, anyway. (x_current_display): Remove unused variable. Many functions: changes for Lisp_object selected_frame. (IT_set_face): If the tty_reverse_p flag is set for the face, reverse the foreground and background colors. (Fmsdos_remember_default_colors): New function. (syms_of_msdos): Defsubr it. (IT_set_frame_parameters): Use initial_screen_colors[] when creating a new frame. If the frame parameters include 'reverse, swap the foreground and background colors. (internal_terminal_init): Initialize initial_screen_colors to -1. (syms_of_msdos): Add DEFVAR_BOOL for x-stretch-cursor, to shut up cus-start.el. * Makefile.in (lisp, shortlisp): Add lisp/term/tty-colors.elc. * xfns.c (x_defined_color): Rename from defined_color. All callers changed. (Fxw_color_defined_p): Renamed from Fx_color_defined_p; all callers changed. (Fxw_color_values): Renamed from Fx_color_values; all callers changed. (Fxw_display_color_p): Renamed from Fx_display_color_p; all callers changed. (x_window_to_frame, x_any_window_to_frame, x_non_menubar_window_to_frame, x_menubar_window_to_frame, x_top_window_to_frame): Use !FRAME_X_P instead of f->output_data.nothing. * xterm.h (x_defined_color): Rename from defined_color. * w32fns.c (x_window_to_frame): Use FRAME_W32_P instead of f->output_data.nothing. (Fxw_color_defined_p): Renamed from Fx_color_defined_p; all callers changed. (Fxw_color_values): Renamed from Fx_color_values; all callers changed. (Fxw_display_color_p): Renamed from Fx_display_color_p; all callers changed. * dispextern.h (tty_color_name): Add prototype. * xmenu.c (menubar_id_to_frame): Use FRAME_WINDOW_P instead of f->output_data.nothing. * w32menu.c (menubar_id_to_frame): Likewise. * w32term.h (w32_output): Declare. * dosfns.c (Qmsdos_color_translate): Remove. (msdos_stdcolor_name): Now returns a Lisp_Object. * dosfns.h (Qmsdos_color_translate): Remove. * s/msdos.h (INTERNAL_TERMINAL): Add entries for color support.
* Use XCAR and XCDR instead of explicit member references.Ken Raeburn1999-09-121-96/+96
|
* (x_set_frame_parameters): Set foreground andGeoff Voelker1999-08-161-1/+27
| | | | | background first, and then set other parameters that might depend upon their new values.
* (x_set_icon_type): Support setting frame icons.Geoff Voelker1999-08-101-27/+9
|
* (w32_find_ccl_program): Add casting.Kenichi Handa1999-07-271-1/+2
|
* (w32_find_ccl_program): Get compiled CCL code by justKenichi Handa1999-07-261-24/+12
| | | | calling setup_coding_system.
* (w32_to_x_weight): Return "demibold" instead of "semibold".Andrew Innes1999-06-161-1/+1
|
* (w32_wnd_proc): Ensure mouse capture is released ifAndrew Innes1999-05-201-0/+4
| | | | | frame loses focus, and that mouse button state is reset. Ditto when the menu bar is activated.
* (x_to_w32_charset): Reinstall VIETNAMESE_CHARSETAndrew Innes1999-05-111-11/+50
| | | | | | | | | | | | | | definition. (w32_wnd_proc): Reinstall debugging output. (w32_wnd_proc): Reinstall SetForegroundWindow change. (syms_of_w32fns): Reinstall new initializer for Vw32_phantom_key_code. (x_to_w32_charset): Do partial matching of charset names for most non-European charsets, to cope with wildcards or missing spec dates. (Fw32_send_sys_command): Post WM_SYSCOMMAND rather than sending it to avoid deadlock when activating the menu bar.
* (w32_strict_painting): New variable.Andrew Innes1999-05-051-6/+25
| | | | | (w32_wnd_proc): Use it to select repaint rules. (syms_of_w32fns): Defvar it.
* (x_to_w32_charset): Fix typo: want to map all JapaneseAndrew Innes1999-05-041-3/+4
| | | | charsets to the standard Windows charset for Japanese.
* (unibyte_display_via_language_environment):Andrew Innes1999-05-021-12/+0
| | | | | Variable moved to xdisp.c. (syms_of_w32fns): Don't set up Lisp var here.
* [andrewi]Andrew Innes1999-05-021-16/+95
| | | | | | | | | | | | | | | | | | | | | | (w32_list_bdf_fonts): Initialize n_fonts. (Fw32_shell_execute): New function; used to support browse-url. (syms_of_w32fns): Register it. (w32_load_system_font): Force max width to be average char width for fixed-pitch fonts, to avoid unnecessary redisplay slowdown. (x_to_w32_charset): Define VIETNAMESE_CHARSET if not already defined. (syms_of_w32fns): Set Vw32_phantom_key_code to 255. [jasonr] (w32_wnd_proc) [WM_PAINT]: Use rectangle from GetUpdateRect rather than BeginPaint. (w32_wnd_proc): Attach to current foreground thread when grabbing focus; necessary on NT 5.0. (w32_wnd_proc) [W32_DEBUG_DISPLAY]: Add output for debugging display messages. (w32_to_x_charset): Put wildcard last in unknown charsets to avoid false matching.
* (x_to_w32_font): Provide sufficient buffer to encode_coding to avoid carryover.Richard M. Stallman1999-04-071-3/+10
|
* (enum_font_cb2): Set the font height to be theGeoff Voelker1999-03-171-7/+57
| | | | | | | | | | | character height, not the cell height. (Fw32_select_font): Initialize font dialog with current default font. (Vw32_system_coding_system): New variable. (w32_strict_filenames): Add comment. (w32_to_x_font): Decode font name using Vw32_system_coding_system. (x_to_w32_font): Encode font name using Vw32_system_coding_system. (syms_of_w32fns): Add w32-system-coding-system.
* (w32_strict_fontnames): New variable.Geoff Voelker1999-03-141-3/+15
| | | | | | | (Fx_create_frame): Formatting fix. (w32_load_system_font): Keep trying to load non-existant font if w32_strict_fontnames is nil. Formatting fix. (syms_of_w32fns): Add w32-strict-fontnames.
* (w32_wnd_proc): Handle WM_GETMINMAXINFO message.Geoff Voelker1999-03-141-0/+6
|
* Use epaths.h istead of paths.h.Richard M. Stallman1999-02-261-1/+1
|
* (Vw32_quit_key): New variable.Andrew Innes1999-02-171-1/+10
| | | | | (post_character_message): Use it. (syms_of_w32fns): DEFVAR it.
* (syms_of_w32fns): Change default value of w32-mouse-move-interval toAndrew Innes1999-02-021-1/+1
| | | | 0, so that the mouse wheel/rocker on some mice works properly.
* (w32_load_system_font): Do not load unlisted fonts ifGeoff Voelker1999-01-281-18/+167
| | | | | | | | | | list was reliable. (enum_fontex_cb1, enum_fontex_cb2): New functions. (w32_list_bdf_fonts): New parameter; max_names. Callers updated. (w32_list_synthesized_fonts): New function. (w32_list_fonts): Use maxnames. Use EnumFontFamiliesEx when available instead of EnumFontFamilies. List synthesized fonts if Vw32_enable_italics is non-nil.
* (x_set_frame_parameters): gcpro as needed.Richard M. Stallman1999-01-281-0/+13
|
* (w32_wnd_proc): Fix bug introduced by previous change;Andrew Innes1999-01-271-15/+20
| | | | | | the lwindow, rwindow and apps keys could not be used as function keys, because they were being passed to TranslateMessage which ignores them. Also, key was being changed to SPC.
* (Vw32_bdf_filename_alist): New variable.Geoff Voelker1999-01-221-100/+254
| | | | | | | | | | | | | | | | | | | | | | | | | | | (x_destroy_bitmap): Returns void not int. (x_set_border_pixel): Returns void. (w32_load_bdf_font): New function. (w32_load_system_font): New function, was w32_load_font. List fonts before loading. Explicitly set encoding for SJIS fonts. Set default_ascent to 0 as comment indicates. (w32_load_font): Call w32_load_system_font and w32_load_bdf_font. (w32_unload_font): Support BDF fonts. (w32_to_x_charset): Fix mappings to avoid wildcard mismatches. Autodetect whether to use koi8-r instead of iso8859-5. Associate "ksc5601.1987" with HANGUEL_CHARSET. Associate "ksc5601.1992" with JOHAB_CHARSET. (x_to_w32_charset): Make consistent with w32_to_x_charset. (w32_to_x_font): Add resolution. (x_to_w32_font): Use font resolution to calculate height if supplied. (w32_font_match): Handle wildcards anywhere within field. (enumfont_t): Remove unused head pointer. (enum_font_cb2): Dereference elfLogFont. (w32_list_bdf_fonts): New function. (w32_list_fonts): Use one_w32_dispay_info instead of insisting on valid frame. Remove MessageBox. Support BDF fonts. (Fw32_find_bdf_fonts): New function. (syms_of_w32fns): Add Vw32_bdf_filename_alist and Sw32_find_bdf_fonts.
* (x_to_w32_charset): Add iso8859-9.Geoff Voelker1999-01-191-4/+7
| | | | (w32_to_x_charset): Fix charset mappings.
* (w32_msg_pump): Ignore WM_NULL message posted to threadAndrew Innes1998-12-281-45/+90
| | | | | | | | | | | | | | by complete_deferred_msg. (post_character_message): Cancel all deferred messages when quit_char is typed, in order to break out of potential deadlocks. (cancel_all_deferred_msgs): New function. (complete_deferred_msg): Don't abort if msg not found; may have been cancelled. (Fw32_reconstruct_hot_key): Use pre-interned symbols. (Fw32_send_sys_command): Wait for system command to complete before returning.
* (Vw32_phantom_key_code): New variable.Geoff Voelker1998-12-021-48/+217
| | | | | | | | | | | | | | | | | | | | | | | | (Qhyper, Qsuper, Qmeta, Qalt, Qctrl, Qcontrol, Qshift): New variables. (syms_of_w32fns): Init and register them. (reset_modifiers): Use a more precise test for whether Emacs has keyboard focus. Synchronize state of all keys that can be used as modifiers, to overcome problems arising from hot-keys. (w32_key_to_modifier): Be careful not to call intern() to avoid requiring thread synchronization. (w32_msg_pump): Handle new WM_EMACS_TOGGLE_LOCK_KEY message. (w32_wnd_proc): Ensure lock key indicator lights are updated promptly on Windows 9x, by passing key events on to the system. (w32_wnd_proc): Use Vw32_phantom_key_code to stop system responding to Windows key events when not wanted. (w32_wnd_proc): Undo the mapping of Ctrl-Pause into cancel and Ctrl-NumLock into pause by the system. (w32_wnd_proc): Don't translate key combinations containing any modifiers other than shift (and capslock). (w32_wnd_proc): Reset modifier key states when receiving focus (we can't determine the key states until we have keyboard focus). (Fw32_toggle_lock_key): New function. (syms_of_w32fns): Defsubr it.
* (w32_last_error): Fix cut+paste error.Geoff Voelker1998-12-021-6/+6
|
* (Vw32_pass_optional_keys_to_system): Variable removed.Geoff Voelker1998-11-101-103/+680
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (Vw32_pass_lwindow_to_system): (Vw32_pass_rwindow_to_system): (Vw32_lwindow_modifier): (Vw32_rwindow_modifier): (Vw32_apps_modifier): (Vw32_enable_num_lock): (Vw32_enable_caps_lock): (Vw32_scroll_lock_modifier): New variables. (modifier_set): Return toggle state for Scroll Lock. (w32_key_to_modifier): New function. Returns chosen modifier bit for given key. (w32_get_modifiers): Returns modifier flags for non-keyboard input events. (construct_console_modifiers): Renamed from construct_modifiers; recognize Windows and Apps keys as modifiers. (w32_get_key_modifiers): New function. Returns modifier flags for keyboard input events. (map_keypad_keys): Make non-static. Use second arg as extended flag. (w32_grabbed_keys): New variable. (HOTKEY, HOTKEY_ID, HOTKEY_VK_CODE, HOTKEY_MODIFIERS): New macros. (register_hot_keys): (unregister_hot_keys): (lookup_vk_code): (w32_parse_hot_key): (Fw32_register_hot_key): (Fw32_unregister_hot_key): (Fw32_registered_hot_keys): (Fw32_reconstruct_hot_key): New functions to support hotkeys. (post_character_message): New function. (w32_msg_pump): Handle new messages for using hotkeys and changing keyboard layout/language. (w32_wnd_proc): Major rework of keyboard input handling: optionally recognize Windows keys and Apps key as modifiers; optionally treat NumLock, CapsLock and ScrollLock as function keys; let system translate keystrokes to characters to avoid system bugs relating to dead-key handling; preserve shift distinction for control characters; forward keyboard layout/language changes to lisp; detect and convert hot-key events to normal keystrokes. (syms_of_w32fns): Register new functions and variables. (w32_last_error): New function for use in debugging.
* (w32_list_fonts): Report an error if a frame has notGeoff Voelker1998-11-041-0/+18
| | | | been created yet.
* (x_to_w32_font): Specify DEFAULT_CHARSET in the w32 LOGFONT struct ifAndrew Innes1998-11-031-27/+32
| | | | | | x font doesn't specify the charset. (x_to_w32_charset): Change >= to == when testing results of stricmp.
* (w32_color_map_lookup): Remove duplicate definition.Geoff Voelker1998-10-271-32/+0
|
* (Vx_pixel_size_width): New global variable.Geoff Voelker1998-10-201-42/+517
| | | | | | | | | | | | | | | | | | | | | | (unibyte_display_via_language_environment): New global variable. (x_set_font): Add support for setting fontsets. (Fx_create_frame): Add check_w32(). Initialize fontsets. Fix font names to match xlfd-tight-regexp. (w32_load_font): Rewrite based on x_load_font. (x_to_w32_charset, w32_to_x_charset): Add character sets. Use `iso8859-1' rather than `ansi'. (w32_to_x_font): Remove `-' from font name. Remove the `-' off the end. Move charset into `charset registry' field. (enum_font_cb2): Check charsets match. Include width in font list. (w32_list_fonts): Rewrite based on x_list_fonts. Moved from w32term.c to have access to enumfont_t struct. (Fx_list_fonts): w32 specific version eliminated. Include `x-list-fonts.c'. (w32_get_font_info, w32_query_font, w32_find_ccl_program): New functions for fontset support - adapted from x_ equivalents. (syms_of_w32fns): New lisp variables initialised. Function pointers for fontset.c set up.
* (x_create_bitmap_from_file): Skip special files.Geoff Voelker1998-10-091-0/+35
|
* (w32_color_map_lookup): New function.Geoff Voelker1998-09-241-13/+48
| | | | (x_to_w32_color): Approximate colors ending in numbers if necessary.
* (w32_wnd_proc): Always zero button_state when releasingGeoff Voelker1998-09-011-1/+1
| | | | mouse capture.
* (Fx_list_fonts): Bring arglist into sync with xfns.c.Richard M. Stallman1998-06-271-4/+16
| | | | | | (x_set_font): Call face-set-after-frame-default. (Qface_set_after_frame_default): New variable. (syms_of_w32fns): Initialize it.
* (w32_wnd_proc): Call signal_quit when C-g is received.Richard M. Stallman1998-05-151-1/+4
|
* (enum_font_cb2): Only ignore raster fonts whenGeoff Voelker1998-05-021-1/+1
| | | | determining height and width.
* Include shellapi.h.Richard M. Stallman1998-05-011-0/+10
| | | | | | (w32_createwindow): Enable drag-n-drop on new windows. (w32_wnd_proc): Handle WM_DROPFILES messages. Disable drag-n-drop on closing windows.
* (msh_mousewheel): New variable.Geoff Voelker1998-04-301-0/+13
| | | | | (w32_msg_pump): Register that Emacs accepts mousewheel events. (w32_wnd_proc): Check for mousewheel events.
* (x_set_vertical_scroll_bars): Put scroll bars on theGeoff Voelker1998-04-231-9/+78
| | | | | | right, as is conventional on MS-Windows. (w32_wnd_proc): Add code to draw popup menu titles. Ensure mouse capture is released before running popup menu.
* (w32_msg_pump): Handle WM_EMACS_SETLOCALE.Geoff Voelker1998-04-171-0/+7
| | | | (w32_wnd_proc): Handle WM_EMACS_SETFOREGROUND.
* Include limits.h and errno.h.Geoff Voelker1997-09-031-102/+641
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Declare externs from other files. (w32_in_use): New variable. (check_w32, have_menus_p, x_set_title, w32_msg_worker, find_deferred_msg, send_deferred_msg, complete_deferred_msg, Fw32_focus_frame, W32-send-sys-command): New functions. (last_mouse_movement_time): Delete variable. (x_frame_parms): Alphabetize. Add title parm. (x_set_icon_name): Use title if set. (x_set_menu_bar_lines): Ensure client area remains the same. (x_set_name): Don't update if the name is the same. Use title for name if available. (x_icon): Initial support for creating window iconified. (x_display_info_for_name): Set w32_in_use. (Fx_open_connection): Validate Vwindow_system. Set w32_in_use. (w32_create_window): Set window size to frame dimensions. Set font width, line height, border, scrollbar indexes. Don't set X and Y units indexes. (w32_msg_pump): Renamed from windows_msg_worker. Make static. Don't post done message. No longer handle create scrollbar message. Don't abort on anomalous messages. Return when completion detected. (w32_wnd_proc): Keep track of button state. For WINDOWPOSCHANGING, force window dimensions to be multiples of character dimensions. Handle CREATESCROLLBAR. Use correct arguments for SHOWWINDOW. For SETWINDOWPOS, use WINDOWPOS structure. (my_create_window): Abort if message post fails. (Fx_create_frame): Use title instead of name. GC protect frame before make_frame_without_minibuffer. Set icon name. Use courier new as default font (has bold and italic). Set BufferPredicate and Title default parameters. (x_to_w32_weight): Support semibold weight. (x_to_w32_charset): Map # to numeric charset identifier. (w32_to_x_charset): Encode unknown charsets as a number. (enum_font_cb2): Don't restrict to ANSI and OEM charsets. (Fx_color_values): Set high and low words of color values. (syms_of_w32fns): Zero w32_in_use. defsubr new functions. (w32_wnd_proc): Pass on WM_DISPLAYCHANGE messages. (win32_wnd_proc): Capture and handle WM_MOUSEWHEEL events. Capture and handle WM_EMACS_TRACKPOPUPMENU events. Allow a dragged selection from a popup menu started up by a mouse down event. (x_to_win32_color): Support for X Windows RGB string specifications.
* Delete defsubrs of Sfocus_frame andGeoff Voelker1997-07-011-2/+0
| | | | Sunfocus_frame.
* (x_set_mouse_color): Fix previous change.Richard M. Stallman1997-05-051-1/+1
|
* (x_set_mouse_color): Update calls to x_catch_errorsRichard M. Stallman1997-05-031-2/+3
| | | | and x_uncatch_errors.
* Change all uses of win95, winnt, and win32Geoff Voelker1997-01-201-9/+9
| | | | | | | into Windows 95, Windows NT, and W32, respectively. Expand "win" substring in variables referring to Microsoft Windows constructs into "windows". Canonicalize header comments to use same terminology.
* (w32_wnd_proc): Use dummy message to wake up thread on quit_char.Geoff Voelker1996-11-211-8/+15
|
* Use new names for w32 filesGeoff Voelker1996-11-191-1/+1
|