1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-26 10:49:33 +00:00

Change identifiers of the form win32* to w32*.

This commit is contained in:
Geoff Voelker 1996-11-19 04:59:23 +00:00
parent 0f7d64d245
commit fbd6baedb5
24 changed files with 1085 additions and 1085 deletions

View File

@ -81,7 +81,7 @@
;; with the standard X scroll-bars, we don't try to use the normal
;; scroll bar routines.
(defun win32-handle-scroll-bar-event (event)
(defun w32-handle-scroll-bar-event (event)
"Handle Win32 scroll bar events to do normal Window style scrolling."
(interactive "e")
(let ((old-window (selected-window)))
@ -107,9 +107,9 @@
(select-window old-window))))
;; The following definition is used for debugging.
;(defun win32-handle-scroll-bar-event (event) (interactive "e") (princ event))
;(defun w32-handle-scroll-bar-event (event) (interactive "e") (princ event))
(global-set-key [vertical-scroll-bar mouse-1] 'win32-handle-scroll-bar-event)
(global-set-key [vertical-scroll-bar mouse-1] 'w32-handle-scroll-bar-event)
;; (scroll-bar-mode nil)
@ -521,7 +521,7 @@ This is in addition to the primary selection.")
(defun x-select-text (text &optional push)
(if x-select-enable-clipboard
(win32-set-clipboard-data text))
(w32-set-clipboard-data text))
(setq x-last-selected-text text))
;;; Return the value of the current selection.
@ -532,8 +532,8 @@ This is in addition to the primary selection.")
(let (text)
;; Don't die if x-get-selection signals an error.
(condition-case c
(setq text (win32-get-clipboard-data))
(error (message "win32-get-clipboard-data:%s" c)))
(setq text (w32-get-clipboard-data))
(error (message "w32-get-clipboard-data:%s" c)))
(if (string= text "") (setq text nil))
(cond
((not text) nil)
@ -576,7 +576,7 @@ This is in addition to the primary selection.")
(setq x-cut-buffer-max (min (- (/ (x-server-max-request-size) 2) 100)
x-cut-buffer-max))
;; Win32 expects the menu bar cut and paste commands to use the clipboard.
;; W32 expects the menu bar cut and paste commands to use the clipboard.
;; This has ,? to match both on Sunos and on Solaris.
(menu-bar-enable-clipboard)
@ -628,7 +628,7 @@ This is in addition to the primary selection.")
(setq interprogram-cut-function 'x-select-text)
(setq interprogram-paste-function 'x-get-selection-value)
;;; Turn off window-splitting optimization; win32 is usually fast enough
;;; Turn off window-splitting optimization; w32 is usually fast enough
;;; that this is only annoying.
(setq split-window-keep-point t)
@ -638,7 +638,7 @@ This is in addition to the primary selection.")
;;; Set to a system sound if you want a fancy bell.
(set-message-beep 'ok)
;; Remap some functions to call win32 common dialogs
;; Remap some functions to call w32 common dialogs
(defun internal-face-interactive (what &optional bool)
(let* ((fn (intern (concat "face-" what)))
@ -658,10 +658,10 @@ This is in addition to the primary selection.")
default)))))
(list face (if (equal value "") nil value))))
;; Redefine the font selection to use the Win32 dialog
;; Redefine the font selection to use the standard Win32 dialog
(defun mouse-set-font (&rest fonts)
(interactive)
(set-default-font (win32-select-font)))
(set-default-font (w32-select-font)))
;;; win32-win.el ends here

View File

@ -979,11 +979,11 @@ the Bugs section of the Emacs manual or the file BUGS.", argv[0]);
#endif
#ifdef HAVE_NTGUI
syms_of_win32term ();
syms_of_win32fns ();
syms_of_win32faces ();
syms_of_win32select ();
syms_of_win32menu ();
syms_of_w32term ();
syms_of_w32fns ();
syms_of_w32faces ();
syms_of_w32select ();
syms_of_w32menu ();
#endif /* HAVE_NTGUI */
#ifdef SYMS_SYSTEM

View File

@ -75,7 +75,7 @@ Lisp_Object Qunsplittable;
Lisp_Object Qmenu_bar_lines;
Lisp_Object Qwidth;
Lisp_Object Qx;
Lisp_Object Qwin32;
Lisp_Object Qw32;
Lisp_Object Qpc;
Lisp_Object Qvisible;
Lisp_Object Qbuffer_predicate;
@ -112,8 +112,8 @@ syms_of_frame_1 ()
staticpro (&Qwidth);
Qx = intern ("x");
staticpro (&Qx);
Qwin32 = intern ("win32");
staticpro (&Qwin32);
Qw32 = intern ("w32");
staticpro (&Qw32);
Qpc = intern ("pc");
staticpro (&Qpc);
Qvisible = intern ("visible");
@ -221,8 +221,8 @@ See also `frame-live-p'.")
return Qt;
case output_x_window:
return Qx;
case output_win32:
return Qwin32;
case output_w32:
return Qw32;
case output_msdos_raw:
return Qpc;
default:

View File

@ -33,7 +33,7 @@ extern int message_buf_print;
/* The structure representing a frame. */
enum output_method
{ output_termcap, output_x_window, output_msdos_raw, output_win32 };
{ output_termcap, output_x_window, output_msdos_raw, output_w32 };
enum vertical_scroll_bar_type
{ vertical_scroll_bar_none, vertical_scroll_bar_left, vertical_scroll_bar_right };
@ -181,9 +181,9 @@ struct frame
/* A structure of auxiliary data used for displaying the contents.
struct x_output is used for X window frames;
it is defined in xterm.h.
struct win32_output is used for Win32 window frames;
struct w32_output is used for W32 window frames;
it is defined in w32term.h. */
union output_data { struct x_output *x; struct win32_output *win32; int nothing; } output_data;
union output_data { struct x_output *x; struct w32_output *w32; int nothing; } output_data;
#ifdef MULTI_KBOARD
/* A pointer to the kboard structure associated with this frame.
@ -309,7 +309,7 @@ typedef struct frame *FRAME_PTR;
#define WINDOW_FRAME(w) (w)->frame
#define FRAME_X_P(f) ((f)->output_method == output_x_window)
#define FRAME_WIN32_P(f) ((f)->output_method == output_win32)
#define FRAME_W32_P(f) ((f)->output_method == output_w32)
#define FRAME_MSDOS_P(f) ((f)->output_method == output_msdos_raw)
/* FRAME_WINDOW_P tests whether the frame is a window, and is
@ -318,7 +318,7 @@ typedef struct frame *FRAME_PTR;
#define FRAME_WINDOW_P(f) FRAME_X_P (f)
#endif
#ifdef HAVE_NTGUI
#define FRAME_WINDOW_P(f) FRAME_WIN32_P (f)
#define FRAME_WINDOW_P(f) FRAME_W32_P (f)
#endif
#ifndef FRAME_WINDOW_P
#define FRAME_WINDOW_P(f) (0)

View File

@ -3920,7 +3920,7 @@ make_lispy_event (event)
}
#ifdef WINDOWSNT
case win32_scroll_bar_click:
case w32_scroll_bar_click:
{
int button = event->code;
int is_double;
@ -3948,7 +3948,7 @@ make_lispy_event (event)
Fcons (part, Qnil)))));
}
/* Always treat Win32 scroll bar events as clicks. */
/* Always treat W32 scroll bar events as clicks. */
event->modifiers |= click_modifier;
{

View File

@ -319,7 +319,7 @@ Boston, MA 02111-1307, USA. */
#define rindex strrchr
#ifdef HAVE_NTGUI
#define abort win32_abort
#define abort w32_abort
#endif
/* Defines that we need that aren't in the standard signal.h */

View File

@ -248,7 +248,7 @@ enum event_kind
.timestamp gives a timestamp (in
milliseconds) for the click. */
#ifdef WINDOWSNT
win32_scroll_bar_click, /* as for scroll_bar_click, but only generated
w32_scroll_bar_click, /* as for scroll_bar_click, but only generated
by MS-Windows scroll bar controls. */
#endif
selection_request_event, /* Another X client wants a selection from us.

View File

@ -314,7 +314,7 @@ static unsigned long
get_section_size (PIMAGE_SECTION_HEADER p_section)
{
/* The section size is in different locations in the different versions. */
switch (get_nt_minor_version ())
switch (get_w32_minor_version ())
{
case 10:
return p_section->SizeOfRawData;

View File

@ -122,7 +122,7 @@ static HANDLE dir_find_handle = INVALID_HANDLE_VALUE;
static int dir_is_fat;
static char dir_pathname[MAXPATHLEN+1];
extern Lisp_Object Vwin32_downcase_file_names;
extern Lisp_Object Vw32_downcase_file_names;
DIR *
opendir (char *filename)
@ -199,7 +199,7 @@ readdir (DIR *dirp)
strcpy (dir_static.d_name, find_data.cFileName);
if (dir_is_fat)
_strlwr (dir_static.d_name);
else if (!NILP (Vwin32_downcase_file_names))
else if (!NILP (Vw32_downcase_file_names))
{
register char *p;
for (p = dir_static.d_name; *p; p++)
@ -412,7 +412,7 @@ normalize_filename (fp, path_sep)
fp += 2;
}
if (NILP (Vwin32_downcase_file_names))
if (NILP (Vw32_downcase_file_names))
{
while (*fp)
{
@ -536,7 +536,7 @@ request_sigio (void)
#define REG_ROOT "SOFTWARE\\GNU\\Emacs"
LPBYTE
nt_get_resource (key, lpdwtype)
w32_get_resource (key, lpdwtype)
char *key;
LPDWORD lpdwtype;
{
@ -610,7 +610,7 @@ init_environment ()
for (i = 0; i < (sizeof (env_vars) / sizeof (env_vars[0])); i++)
{
if (!getenv (env_vars[i]) &&
(lpval = nt_get_resource (env_vars[i], &dwType)) != NULL)
(lpval = w32_get_resource (env_vars[i], &dwType)) != NULL)
{
if (dwType == REG_EXPAND_SZ)
{
@ -691,7 +691,7 @@ get_emacs_configuration (void)
os = (GetVersion () & 0x80000000) ? "win95" : "nt";
sprintf (configuration_buffer, "%s-%s-%s%d.%d", arch, oem, os,
get_nt_major_version (), get_nt_minor_version ());
get_w32_major_version (), get_w32_minor_version ());
return configuration_buffer;
}
@ -714,7 +714,7 @@ gettimeofday (struct timeval *tv, struct timezone *tz)
}
/* ------------------------------------------------------------------------- */
/* IO support and wrapper functions for Win32 API. */
/* IO support and wrapper functions for W32 API. */
/* ------------------------------------------------------------------------- */
/* Place a wrapper around the MSVC version of ctime. It returns NULL
@ -818,7 +818,7 @@ is_fat_volume (const char * name, const char ** pPath)
/* Map filename to a legal 8.3 name if necessary. */
const char *
map_win32_filename (const char * name, const char ** pPath)
map_w32_filename (const char * name, const char ** pPath)
{
static char shortname[MAX_PATH];
char * str = shortname;
@ -922,25 +922,25 @@ map_win32_filename (const char * name, const char ** pPath)
int
sys_access (const char * path, int mode)
{
return _access (map_win32_filename (path, NULL), mode);
return _access (map_w32_filename (path, NULL), mode);
}
int
sys_chdir (const char * path)
{
return _chdir (map_win32_filename (path, NULL));
return _chdir (map_w32_filename (path, NULL));
}
int
sys_chmod (const char * path, int mode)
{
return _chmod (map_win32_filename (path, NULL), mode);
return _chmod (map_w32_filename (path, NULL), mode);
}
int
sys_creat (const char * path, int mode)
{
return _creat (map_win32_filename (path, NULL), mode);
return _creat (map_w32_filename (path, NULL), mode);
}
FILE *
@ -980,7 +980,7 @@ sys_fopen(const char * path, const char * mode)
}
else break;
fd = _open (map_win32_filename (path, NULL), oflag | _O_NOINHERIT, 0644);
fd = _open (map_w32_filename (path, NULL), oflag | _O_NOINHERIT, 0644);
if (fd < 0)
return NULL;
@ -997,7 +997,7 @@ sys_link (const char * path1, const char * path2)
int
sys_mkdir (const char * path)
{
return _mkdir (map_win32_filename (path, NULL));
return _mkdir (map_w32_filename (path, NULL));
}
/* Because of long name mapping issues, we need to implement this
@ -1054,7 +1054,7 @@ int
sys_open (const char * path, int oflag, int mode)
{
/* Force all file handles to be non-inheritable. */
return _open (map_win32_filename (path, NULL), oflag | _O_NOINHERIT, mode);
return _open (map_w32_filename (path, NULL), oflag | _O_NOINHERIT, mode);
}
int
@ -1076,7 +1076,7 @@ sys_rename (const char * oldname, const char * newname)
So, on Win95 we always rename through a temp name, and we make sure
the temp name has a long extension to ensure correct renaming. */
strcpy (temp, map_win32_filename (oldname, NULL));
strcpy (temp, map_w32_filename (oldname, NULL));
if (GetVersion () & 0x80000000)
{
@ -1091,7 +1091,7 @@ sys_rename (const char * oldname, const char * newname)
/* Force temp name to require a manufactured 8.3 alias - this
seems to make the second rename work properly. */
strcat (temp, ".long");
if (rename (map_win32_filename (oldname, NULL), temp) < 0)
if (rename (map_w32_filename (oldname, NULL), temp) < 0)
return -1;
}
@ -1099,7 +1099,7 @@ sys_rename (const char * oldname, const char * newname)
(at least if it is a file; don't do this for directories).
However, don't do this if we are just changing the case of the file
name - we will end up deleting the file we are trying to rename! */
newname = map_win32_filename (newname, NULL);
newname = map_w32_filename (newname, NULL);
if (stricmp (newname, temp) != 0
&& (attr = GetFileAttributes (newname)) != -1
&& (attr & FILE_ATTRIBUTE_DIRECTORY) == 0)
@ -1114,13 +1114,13 @@ sys_rename (const char * oldname, const char * newname)
int
sys_rmdir (const char * path)
{
return _rmdir (map_win32_filename (path, NULL));
return _rmdir (map_w32_filename (path, NULL));
}
int
sys_unlink (const char * path)
{
return _unlink (map_win32_filename (path, NULL));
return _unlink (map_w32_filename (path, NULL));
}
static FILETIME utc_base_ft;
@ -1218,7 +1218,7 @@ generate_inode_val (const char * name)
GetFullPathName (name, sizeof (fullname), fullname, &p);
get_volume_info (fullname, &p);
/* Normal Win32 filesystems are still case insensitive. */
/* Normal W32 filesystems are still case insensitive. */
_strlwr (p);
hash = hashval (p);
return (_ino_t) (hash ^ (hash >> 16));
@ -1243,7 +1243,7 @@ stat (const char * path, struct stat * buf)
return -1;
}
name = (char *) map_win32_filename (path, &path);
name = (char *) map_w32_filename (path, &path);
/* must be valid filename, no wild cards */
if (strchr (name, '*') || strchr (name, '?'))
{
@ -1340,7 +1340,7 @@ stat (const char * path, struct stat * buf)
buf->st_uid = the_passwd.pw_uid;
buf->st_gid = the_passwd.pw_gid;
/* volume_info is set indirectly by map_win32_filename */
/* volume_info is set indirectly by map_w32_filename */
buf->st_dev = volume_info.serialnum;
buf->st_rdev = volume_info.serialnum;
@ -1932,7 +1932,7 @@ sys_pipe (int * phandles)
}
/* From ntproc.c */
extern Lisp_Object Vwin32_pipe_read_delay;
extern Lisp_Object Vw32_pipe_read_delay;
/* Function to do blocking read of one byte, needed to implement
select. It is only allowed on sockets and pipes. */
@ -1969,11 +1969,11 @@ _sys_read_ahead (int fd)
connects DOS programs to pipes by making the pipe appear to be
the normal console stdout - as a result most DOS programs will
write to stdout without buffering, ie. one character at a
time. Even some Win32 programs do this - "dir" in a command
time. Even some W32 programs do this - "dir" in a command
shell on NT is very slow if we don't do this. */
if (rc > 0)
{
int wait = XINT (Vwin32_pipe_read_delay);
int wait = XINT (Vw32_pipe_read_delay);
if (wait > 0)
Sleep (wait);
@ -2165,7 +2165,7 @@ init_ntproc ()
#ifdef HAVE_SOCKETS
/* Initialise the socket interface now if available and requested by
the user by defining PRELOAD_WINSOCK; otherwise loading will be
delayed until open-network-stream is called (win32-has-winsock can
delayed until open-network-stream is called (w32-has-winsock can
also be used to dynamically load or reload winsock).
Conveniently, init_environment is called before us, so
@ -2238,7 +2238,7 @@ init_ntproc ()
}
/* Restrict Emacs to running only one DOS program at a time (with any
number of Win32 programs). This is to prevent the user from
number of W32 programs). This is to prevent the user from
running into problems with DOS programs being run in the same VDM
under both Windows 95 and Windows NT.

View File

@ -119,7 +119,7 @@ extern void reset_standard_handles (int in, int out,
int err, HANDLE handles[4]);
/* Return the string resource associated with KEY of type TYPE. */
extern LPBYTE nt_get_resource (char * key, LPDWORD type);
extern LPBYTE w32_get_resource (char * key, LPDWORD type);
extern void init_ntproc ();
extern void term_ntproc ();

View File

@ -58,7 +58,7 @@ static void reassert_line_highlight (int, int);
static void insert_glyphs (GLYPH *start, int len);
static void write_glyphs (GLYPH *string, int len);
static void delete_glyphs (int n);
void nt_ring_bell (void);
void w32_sys_ring_bell (void);
static void reset_terminal_modes (void);
static void set_terminal_modes (void);
static void set_terminal_window (int size);
@ -193,7 +193,7 @@ ins_del_lines (int vpos, int n)
ScrollConsoleScreenBuffer (cur_screen, &scroll, NULL, dest, &fill);
/* Here we have to deal with a win32 console flake: If the scroll
/* Here we have to deal with a w32 console flake: If the scroll
region looks like abc and we scroll c to a and fill with d we get
cbd... if we scroll block c one line at a time to a, we get cdd...
Emacs expects cdd consistently... So we have to deal with that
@ -418,7 +418,7 @@ delete_glyphs (int n)
static unsigned int sound_type = 0xFFFFFFFF;
void
nt_ring_bell (void)
w32_sys_ring_bell (void)
{
if (sound_type == 0xFFFFFFFF)
Beep (666, 100);
@ -554,15 +554,15 @@ initialize_win_nt_display (void)
insert_glyphs_hook = (term_hook) insert_glyphs;
write_glyphs_hook = (term_hook) write_glyphs;
delete_glyphs_hook = (term_hook) delete_glyphs;
ring_bell_hook = (term_hook) nt_ring_bell;
ring_bell_hook = (term_hook) w32_sys_ring_bell;
reset_terminal_modes_hook = (term_hook) reset_terminal_modes;
set_terminal_modes_hook = (term_hook) set_terminal_modes;
set_terminal_window_hook = (term_hook) set_terminal_window;
update_begin_hook = (term_hook) update_begin;
update_end_hook = (term_hook) update_end;
read_socket_hook = win32_read_socket;
mouse_position_hook = win32_mouse_position;
read_socket_hook = w32_console_read_socket;
mouse_position_hook = w32_mouse_position;
prev_screen = GetStdHandle (STD_OUTPUT_HANDLE);

View File

@ -1,4 +1,4 @@
/* "Face" primitives.
/* "Face" primitives under the Win32 API.
Copyright (C) 1993, 1994, 1995 Free Software Foundation.
This file is part of GNU Emacs.
@ -18,7 +18,7 @@ along with GNU Emacs; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* Ported xfaces.c for win32 - Kevin Gallo */
/* Ported xfaces.c for w32 - Kevin Gallo */
#include <sys/types.h>
#include <sys/stat.h>
@ -227,7 +227,7 @@ load_font (f, name)
CHECK_STRING (name, 0);
BLOCK_INPUT;
font = win32_load_font (FRAME_WIN32_DISPLAY_INFO (f), (char *) XSTRING (name)->data);
font = w32_load_font (FRAME_W32_DISPLAY_INFO (f), (char *) XSTRING (name)->data);
UNBLOCK_INPUT;
if (! font)
@ -245,7 +245,7 @@ unload_font (f, font)
return;
BLOCK_INPUT;
win32_unload_font (FRAME_WIN32_DISPLAY_INFO (f), font);
w32_unload_font (FRAME_W32_DISPLAY_INFO (f), font);
UNBLOCK_INPUT;
}
@ -379,7 +379,7 @@ init_frame_faces (f)
result = Qnil;
FOR_EACH_FRAME (tail, frame)
if (FRAME_WIN32_P (XFRAME (frame))
if (FRAME_W32_P (XFRAME (frame))
&& XFRAME (frame) != f)
{
result = frame;
@ -546,21 +546,21 @@ frame_update_line_height (f)
FRAME_PTR f;
{
int i;
int biggest = FONT_HEIGHT (f->output_data.win32->font);
int biggest = FONT_HEIGHT (f->output_data.w32->font);
for (i = 0; i < f->output_data.win32->n_param_faces; i++)
if (f->output_data.win32->param_faces[i] != 0
&& f->output_data.win32->param_faces[i]->font != (XFontStruct *) FACE_DEFAULT)
for (i = 0; i < f->output_data.w32->n_param_faces; i++)
if (f->output_data.w32->param_faces[i] != 0
&& f->output_data.w32->param_faces[i]->font != (XFontStruct *) FACE_DEFAULT)
{
int height = FONT_HEIGHT (f->output_data.win32->param_faces[i]->font);
int height = FONT_HEIGHT (f->output_data.w32->param_faces[i]->font);
if (height > biggest)
biggest = height;
}
if (biggest == f->output_data.win32->line_height)
if (biggest == f->output_data.w32->line_height)
return 0;
f->output_data.win32->line_height = biggest;
f->output_data.w32->line_height = biggest;
return 1;
}
@ -902,7 +902,7 @@ DEFUN ("make-face-internal", Fmake_face_internal, Smake_face_internal, 1, 1, 0,
FOR_EACH_FRAME (rest, frame)
{
if (FRAME_WIN32_P (XFRAME (frame)))
if (FRAME_W32_P (XFRAME (frame)))
ensure_face_ready (XFRAME (frame), id);
}
return Qnil;
@ -929,7 +929,7 @@ DEFUN ("set-face-attribute-internal", Fset_face_attribute_internal,
if (id < 0 || id >= next_face_id)
error ("Face id out of range");
if (! FRAME_WIN32_P (f))
if (! FRAME_W32_P (f))
return Qnil;
ensure_face_ready (f, id);
@ -938,7 +938,7 @@ DEFUN ("set-face-attribute-internal", Fset_face_attribute_internal,
if (EQ (attr_name, intern ("font")))
{
XFontStruct *font = load_font (f, attr_value);
if (face->font != f->output_data.win32->font)
if (face->font != f->output_data.w32->font)
unload_font (f, face->font);
face->font = font;
if (frame_update_line_height (f))
@ -1024,7 +1024,7 @@ face_name_id_number (f, name)
/* Emacs initialization. */
void
syms_of_win32faces ()
syms_of_w32faces ()
{
Qface = intern ("face");
staticpro (&Qface);

File diff suppressed because it is too large Load Diff

View File

@ -38,8 +38,8 @@ int edata;
int etext;
/* The major and minor versions of NT. */
int nt_major_version;
int nt_minor_version;
int w32_major_version;
int w32_minor_version;
/* Cache information describing the NT system for later use. */
void
@ -58,8 +58,8 @@ cache_system_info (void)
/* Cache the version of the operating system. */
version.data = GetVersion ();
nt_major_version = version.info.major;
nt_minor_version = version.info.minor;
w32_major_version = version.info.major;
w32_minor_version = version.info.minor;
/* Cache page size, allocation unit, processor type, etc. */
GetSystemInfo (&sysinfo_cache);

View File

@ -36,8 +36,8 @@ Boston, MA 02111-1307, USA.
#define get_page_size() sysinfo_cache.dwPageSize
#define get_allocation_unit() sysinfo_cache.dwAllocationGranularity
#define get_processor_type() sysinfo_cache.dwProcessorType
#define get_nt_major_version() nt_major_version
#define get_nt_minor_version() nt_minor_version
#define get_w32_major_version() w32_major_version
#define get_w32_minor_version() w32_minor_version
extern unsigned char *get_data_start();
extern unsigned char *get_data_end();
@ -45,8 +45,8 @@ extern unsigned long data_region_size;
extern unsigned long reserved_heap_size;
extern SYSTEM_INFO sysinfo_cache;
extern BOOL need_to_recreate_heap;
extern int nt_major_version;
extern int nt_minor_version;
extern int w32_major_version;
extern int w32_minor_version;
/* Emulation of Unix sbrk(). */
extern void *sbrk (unsigned long size);

View File

@ -1,4 +1,4 @@
/* Input event support for Windows NT port of GNU Emacs.
/* Input event support for Emacs under Win32 API.
Copyright (C) 1992, 1993, 1995 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@ -48,7 +48,7 @@ extern void reinvoke_input_signal (void);
extern int change_frame_size (FRAME_PTR, int, int, int, int);
/* from w32fns.c */
extern Lisp_Object Vwin32_alt_is_meta;
extern Lisp_Object Vw32_alt_is_meta;
/* Event queue */
#define EVENT_QUEUE_SIZE 50
@ -96,7 +96,7 @@ get_frame (void)
/* Translate console modifiers to emacs modifiers.
German keyboard support (Kai Morgan Zeise 2/18/95). */
int
win32_kbd_mods_to_emacs (DWORD mods)
w32_kbd_mods_to_emacs (DWORD mods)
{
int retval = 0;
@ -106,7 +106,7 @@ win32_kbd_mods_to_emacs (DWORD mods)
mods &= ~ (RIGHT_ALT_PRESSED | LEFT_CTRL_PRESSED);
if (mods & (RIGHT_ALT_PRESSED | LEFT_ALT_PRESSED))
retval = ((NILP (Vwin32_alt_is_meta)) ? alt_modifier : meta_modifier);
retval = ((NILP (Vw32_alt_is_meta)) ? alt_modifier : meta_modifier);
if (mods & (RIGHT_CTRL_PRESSED | LEFT_CTRL_PRESSED))
{
@ -125,7 +125,7 @@ win32_kbd_mods_to_emacs (DWORD mods)
/* The return code indicates key code size. */
int
win32_kbd_patch_key (KEY_EVENT_RECORD *event)
w32_kbd_patch_key (KEY_EVENT_RECORD *event)
{
unsigned int key_code = event->wVirtualKeyCode;
unsigned int mods = event->dwControlKeyState;
@ -331,7 +331,7 @@ key_event (KEY_EVENT_RECORD *event, struct input_event *emacs_ev)
{
/* ASCII */
emacs_ev->kind = ascii_keystroke;
key_flag = win32_kbd_patch_key (event); /* 95.7.25 by himi */
key_flag = w32_kbd_patch_key (event); /* 95.7.25 by himi */
if (key_flag == 0)
return 0;
XSETINT (emacs_ev->code, event->uChar.AsciiChar);
@ -375,7 +375,7 @@ key_event (KEY_EVENT_RECORD *event, struct input_event *emacs_ev)
#else
XSETFRAME (emacs_ev->frame_or_window, get_frame ());
#endif
emacs_ev->modifiers = win32_kbd_mods_to_emacs (event->dwControlKeyState);
emacs_ev->modifiers = w32_kbd_mods_to_emacs (event->dwControlKeyState);
emacs_ev->timestamp = GetTickCount ();
if (key_flag == 2) return -1; /* 95.7.25 by himi */
return 1;
@ -383,7 +383,7 @@ key_event (KEY_EVENT_RECORD *event, struct input_event *emacs_ev)
/* Mouse position hook. */
void
win32_mouse_position (FRAME_PTR *f,
w32_mouse_position (FRAME_PTR *f,
#ifndef MULE
int insist,
#endif
@ -482,7 +482,7 @@ do_mouse_event (MOUSE_EVENT_RECORD *event,
button_state = event->dwButtonState;
emacs_ev->timestamp = GetTickCount ();
emacs_ev->modifiers = win32_kbd_mods_to_emacs (event->dwControlKeyState) |
emacs_ev->modifiers = w32_kbd_mods_to_emacs (event->dwControlKeyState) |
((event->dwButtonState & mask) ? down_modifier : up_modifier);
XSETFASTINT (emacs_ev->x, event->dwMousePosition.X);
@ -507,8 +507,8 @@ resize_event (WINDOW_BUFFER_SIZE_RECORD *event)
}
int
win32_read_socket (int sd, struct input_event *bufp, int numchars,
int waitp, int expected)
w32_console_read_socket (int sd, struct input_event *bufp, int numchars,
int waitp, int expected)
{
BOOL no_events = TRUE;
int nev, ret = 0, add;

View File

@ -1,4 +1,4 @@
/* Win32 input routines.
/* Input routines for Emacs on Win32 API.
Copyright (C) 1995 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@ -21,9 +21,9 @@ Boston, MA 02111-1307, USA. */
#ifndef __NTINEVT_H__
#define __NTINEVT_H__
int win32_read_socket (/* int sd, struct input_event *bufp, int numchars,
int waitp, int expected */);
void win32_mouse_position (/* FRAME_PTR *f,
int w32_console_read_socket (/* int sd, struct input_event *bufp, int numchars,
int waitp, int expected */);
void w32_mouse_position (/* FRAME_PTR *f,
Lisp_Object *bar_window,
enum scroll_bar_part *part,
Lisp_Object *x,

View File

@ -66,8 +66,8 @@ extern Lisp_Object Qoverriding_local_map, Qoverriding_terminal_local_map;
extern Lisp_Object Qmenu_bar_update_hook;
static Lisp_Object win32_dialog_show ();
static Lisp_Object win32menu_show ();
static Lisp_Object w32_dialog_show ();
static Lisp_Object w32menu_show ();
static HMENU keymap_panes ();
static HMENU single_keymap_panes ();
@ -576,7 +576,7 @@ single_keymap_panes (lpmm, keymap, pane_name, prefix, notreal)
eltcdr = XCONS (elt)->cdr;
string = XCONS (eltcdr)->car;
/* We no longer discard the @ from the beginning of the string here.
Instead, we do this in win32menu_show. */
Instead, we do this in w32menu_show. */
{
HMENU new_hmenu = single_keymap_panes (lpmm,
Fcar (elt),
@ -946,7 +946,7 @@ get_single_keymap_event (keymap, lpnum)
eltcdr = XCONS (elt)->cdr;
string = XCONS (eltcdr)->car;
/* We no longer discard the @ from the beginning of the string here.
Instead, we do this in win32menu_show. */
Instead, we do this in w32menu_show. */
{
Lisp_Object event = get_single_keymap_event (Fcar (elt), lpnum);
@ -1212,8 +1212,8 @@ cached information about equivalent key sequences.")
CHECK_LIVE_WINDOW (window, 0);
f = XFRAME (WINDOW_FRAME (XWINDOW (window)));
xpos = (FONT_WIDTH (f->output_data.win32->font) * XWINDOW (window)->left);
ypos = (f->output_data.win32->line_height * XWINDOW (window)->top);
xpos = (FONT_WIDTH (f->output_data.w32->font) * XWINDOW (window)->left);
ypos = (f->output_data.w32->line_height * XWINDOW (window)->top);
}
else
/* ??? Not really clean; should be CHECK_WINDOW_OR_FRAME,
@ -1240,7 +1240,7 @@ cached information about equivalent key sequences.")
/* Display them in a menu. */
BLOCK_INPUT;
selection = win32menu_show (f, xpos, ypos, menu, &hmenu, &error_name);
selection = w32menu_show (f, xpos, ypos, menu, &hmenu, &error_name);
UNBLOCK_INPUT;
@ -1337,7 +1337,7 @@ on the left of the dialog box and all following items on the right.\n\
/* Display them in a dialog box. */
BLOCK_INPUT;
selection = win32_dialog_show (f, 0, 0, title, &error_name);
selection = w32_dialog_show (f, 0, 0, title, &error_name);
UNBLOCK_INPUT;
discard_menu_items ();
@ -1465,8 +1465,8 @@ set_frame_menubar (f, first_time)
BLOCK_INPUT;
{
HMENU old = GetMenu (FRAME_WIN32_WINDOW (f));
SetMenu (FRAME_WIN32_WINDOW (f), hmenu);
HMENU old = GetMenu (FRAME_W32_WINDOW (f));
SetMenu (FRAME_W32_WINDOW (f), hmenu);
DestroyMenu (old);
}
@ -1484,14 +1484,14 @@ free_frame_menubar (f)
BLOCK_INPUT;
{
HMENU old = GetMenu (FRAME_WIN32_WINDOW (f));
SetMenu (FRAME_WIN32_WINDOW (f), NULL);
HMENU old = GetMenu (FRAME_W32_WINDOW (f));
SetMenu (FRAME_W32_WINDOW (f), NULL);
DestroyMenu (old);
}
UNBLOCK_INPUT;
}
/* Called from Fwin32_create_frame to create the initial menubar of a frame
/* Called from Fw32_create_frame to create the initial menubar of a frame
before it is mapped, so that the window is mapped with the menubar already
there instead of us tacking it on later and thrashing the window after it
is visible. */
@ -1647,9 +1647,9 @@ else
#endif
/* win32menu_show actually displays a menu using the panes and items in
/* w32menu_show actually displays a menu using the panes and items in
menu_items and returns the value selected from it.
There are two versions of win32menu_show, one for Xt and one for Xlib.
There are two versions of w32menu_show, one for Xt and one for Xlib.
Both assume input is blocked by the caller. */
/* F is the frame the menu is for.
@ -1665,7 +1665,7 @@ else
static Lisp_Object
win32menu_show (f, x, y, menu, hmenu, error)
w32menu_show (f, x, y, menu, hmenu, error)
FRAME_PTR f;
int x;
int y;
@ -1688,7 +1688,7 @@ win32menu_show (f, x, y, menu, hmenu, error)
pos.y = y;
/* Offset the coordinates to root-relative. */
ClientToScreen (FRAME_WIN32_WINDOW (f), &pos);
ClientToScreen (FRAME_W32_WINDOW (f), &pos);
#if 0
/* If the mouse moves out of the menu before we show the menu,
@ -1705,7 +1705,7 @@ win32menu_show (f, x, y, menu, hmenu, error)
0x10,
pos.x, pos.y,
0,
FRAME_WIN32_WINDOW (f),
FRAME_W32_WINDOW (f),
NULL);
if (menu_selection == -1)
{
@ -1739,7 +1739,7 @@ static char * button_names [] =
};
static Lisp_Object
win32_dialog_show (f, menubarp, keymaps, title, error)
w32_dialog_show (f, menubarp, keymaps, title, error)
FRAME_PTR f;
int menubarp;
int keymaps;
@ -1856,7 +1856,7 @@ win32_dialog_show (f, menubarp, keymaps, title, error)
/* Actually create the dialog. */
dialog_id = ++popup_id_tick;
menu = lw_create_widget (first_wv->name, "dialog", dialog_id, first_wv,
f->output_data.win32->widget, 1, 0,
f->output_data.w32->widget, 1, 0,
dialog_selection_callback, 0);
#if 0 /* This causes crashes, and seems to be redundant -- rms. */
lw_modify_all_widgets (dialog_id, first_wv, True);
@ -1903,7 +1903,7 @@ win32_dialog_show (f, menubarp, keymaps, title, error)
That is not necessarily true, but the fiction leads to reasonable
results, and it is a pain to ask which are actually held now
or track this in the loop above. */
win32_mouse_grabbed = 0;
w32_mouse_grabbed = 0;
/* Unread any events that we got but did not handle. */
while (queue != NULL)
@ -1957,7 +1957,7 @@ win32_dialog_show (f, menubarp, keymaps, title, error)
}
#endif
syms_of_win32menu ()
syms_of_w32menu ()
{
Qdebug_on_next_call = intern ("debug-on-next-call");
staticpro (&Qdebug_on_next_call);

View File

@ -49,21 +49,21 @@ Boston, MA 02111-1307, USA.
correct parsing by child process. Because not all uses of spawnve
are careful about constructing argv arrays, we make this behaviour
conditional (off by default). */
Lisp_Object Vwin32_quote_process_args;
Lisp_Object Vw32_quote_process_args;
/* Control whether create_child causes the process' window to be
hidden. The default is nil. */
Lisp_Object Vwin32_start_process_show_window;
Lisp_Object Vw32_start_process_show_window;
/* Time to sleep before reading from a subprocess output pipe - this
avoids the inefficiency of frequently reading small amounts of data.
This is primarily necessary for handling DOS processes on Windows 95,
but is useful for Win32 processes on both Win95 and NT as well. */
Lisp_Object Vwin32_pipe_read_delay;
but is useful for W32 processes on both Win95 and NT as well. */
Lisp_Object Vw32_pipe_read_delay;
/* Control conversion of upper case file names to lower case.
nil means no, t means yes. */
Lisp_Object Vwin32_downcase_file_names;
Lisp_Object Vw32_downcase_file_names;
/* Keep track of whether we have already started a DOS program. */
BOOL dos_process_running;
@ -288,7 +288,7 @@ create_child (char *exe, char *cmdline, char *env,
start.cb = sizeof (start);
#ifdef HAVE_NTGUI
if (NILP (Vwin32_start_process_show_window))
if (NILP (Vw32_start_process_show_window))
start.dwFlags = STARTF_USESTDHANDLES | STARTF_USESHOWWINDOW;
else
start.dwFlags = STARTF_USESTDHANDLES;
@ -530,7 +530,7 @@ sys_wait (int *status)
}
int
win32_is_dos_binary (char * filename)
w32_is_dos_binary (char * filename)
{
IMAGE_DOS_HEADER dos_header;
DWORD signature;
@ -553,7 +553,7 @@ win32_is_dos_binary (char * filename)
Therefore, we have to do the same here as well. */
p = getenv ("COMSPEC");
if (p)
is_dos_binary = win32_is_dos_binary (p);
is_dos_binary = w32_is_dos_binary (p);
}
else
{
@ -626,7 +626,7 @@ sys_spawnve (int mode, char *cmdname, char **argv, char **envp)
/* Check if program is a DOS executable, and if so whether we are
allowed to start it. */
is_dos_binary = win32_is_dos_binary (cmdname);
is_dos_binary = w32_is_dos_binary (cmdname);
if (is_dos_binary && dos_process_running)
{
errno = EAGAIN;
@ -641,10 +641,10 @@ sys_spawnve (int mode, char *cmdname, char **argv, char **envp)
Additionally, zero-length args and args containing whitespace need
to be wrapped in double quotes. Args containing embedded double
quotes (as opposed to enclosing quotes, which we leave alone) are
usually illegal (most Win32 programs do not implement escaping of
usually illegal (most W32 programs do not implement escaping of
double quotes - sad but true, at least for programs compiled with
MSVC), but we will escape quotes anyway for those programs that can
handle it. The Win32 gcc library from Cygnus doubles quotes to
handle it. The W32 gcc library from Cygnus doubles quotes to
escape them, so we will use that convention.
Since I have no idea how large argv and envp are likely to be
@ -685,7 +685,7 @@ sys_spawnve (int mode, char *cmdname, char **argv, char **envp)
if (*p == 0)
add_quotes = 1;
if (!NILP (Vwin32_quote_process_args))
if (!NILP (Vw32_quote_process_args))
{
/* This is conditional because it sometimes causes more
problems than it solves, since argv arrays are not always
@ -1059,7 +1059,7 @@ sys_kill (int pid, int sig)
}
else
{
/* Kill the process. On Win32 this doesn't kill child processes
/* Kill the process. On W32 this doesn't kill child processes
so it doesn't work very well for shells which is why it's not
used in every case. Also, don't try to terminate DOS processes
(on Win95), because this will hang Emacs. */
@ -1183,7 +1183,7 @@ extern BOOL init_winsock (int load_now);
extern Lisp_Object Vsystem_name;
DEFUN ("win32-has-winsock", Fwin32_has_winsock, Swin32_has_winsock, 0, 1, 0,
DEFUN ("w32-has-winsock", Fw32_has_winsock, Sw32_has_winsock, 0, 1, 0,
"Test for presence of the Windows socket library `winsock'.\n\
Returns non-nil if winsock support is present, nil otherwise.\n\
\n\
@ -1218,7 +1218,7 @@ returned to indicate winsock support is present.")
return Qnil;
}
DEFUN ("win32-unload-winsock", Fwin32_unload_winsock, Swin32_unload_winsock,
DEFUN ("w32-unload-winsock", Fw32_unload_winsock, Sw32_unload_winsock,
0, 0, 0,
"Unload the Windows socket library `winsock' if loaded.\n\
This is provided to allow dial-up socket connections to be disconnected\n\
@ -1235,11 +1235,11 @@ socket connections still exist.")
syms_of_ntproc ()
{
#ifdef HAVE_SOCKETS
defsubr (&Swin32_has_winsock);
defsubr (&Swin32_unload_winsock);
defsubr (&Sw32_has_winsock);
defsubr (&Sw32_unload_winsock);
#endif
DEFVAR_LISP ("win32-quote-process-args", &Vwin32_quote_process_args,
DEFVAR_LISP ("w32-quote-process-args", &Vw32_quote_process_args,
"Non-nil enables quoting of process arguments to ensure correct parsing.\n\
Because Windows does not directly pass argv arrays to child processes,\n\
programs have to reconstruct the argv array by parsing the command\n\
@ -1249,15 +1249,15 @@ in double quotes or it will be parsed as multiple arguments.\n\
However, the argument list to call-process is not always correctly\n\
constructed (or arguments have already been quoted), so enabling this\n\
option may cause unexpected behavior.");
Vwin32_quote_process_args = Qnil;
Vw32_quote_process_args = Qnil;
DEFVAR_LISP ("win32-start-process-show-window",
&Vwin32_start_process_show_window,
DEFVAR_LISP ("w32-start-process-show-window",
&Vw32_start_process_show_window,
"When nil, processes started via start-process hide their windows.\n\
When non-nil, they show their window in the method of their choice.");
Vwin32_start_process_show_window = Qnil;
Vw32_start_process_show_window = Qnil;
DEFVAR_INT ("win32-pipe-read-delay", &Vwin32_pipe_read_delay,
DEFVAR_INT ("w32-pipe-read-delay", &Vw32_pipe_read_delay,
"Forced delay before reading subprocess output.\n\
This is done to improve the buffering of subprocess output, by\n\
avoiding the inefficiency of frequently reading small amounts of data.\n\
@ -1266,11 +1266,11 @@ If positive, the value is the number of milliseconds to sleep before\n\
reading the subprocess output. If negative, the magnitude is the number\n\
of time slices to wait (effectively boosting the priority of the child\n\
process temporarily). A value of zero disables waiting entirely.");
Vwin32_pipe_read_delay = 50;
Vw32_pipe_read_delay = 50;
DEFVAR_LISP ("win32-downcase-file-names", &Vwin32_downcase_file_names,
DEFVAR_LISP ("w32-downcase-file-names", &Vw32_downcase_file_names,
"Non-nil means convert all-upper case file names to lower case.\n\
This applies when performing completions and file name expansion.");
Vwin32_downcase_file_names = Qnil;
Vw32_downcase_file_names = Qnil;
}
/* end of ntproc.c */

View File

@ -31,7 +31,7 @@ Boston, MA 02111-1307, USA. */
#define REG_ROOT "SOFTWARE\\GNU\\Emacs"
LPBYTE
win32_get_string_resource (name, class, dwexptype)
w32_get_string_resource (name, class, dwexptype)
char *name, *class;
DWORD dwexptype;
{
@ -93,5 +93,5 @@ x_get_string_resource (rdb, name, class)
int rdb;
char *name, *class;
{
return (win32_get_string_resource (name, class, REG_SZ));
return (w32_get_string_resource (name, class, REG_SZ));
}

View File

@ -1,4 +1,4 @@
/* Win32 Selection processing for emacs
/* Selection processing for Emacs using the Win32 API.
Copyright (C) 1993, 1994 Free Software Foundation.
This file is part of GNU Emacs.
@ -22,7 +22,7 @@ Boston, MA 02111-1307, USA. */
#include <config.h>
#include "lisp.h"
#include "w32term.h" /* for all of the win32 includes */
#include "w32term.h" /* for all of the w32 includes */
#include "dispextern.h" /* frame.h seems to want this */
#include "frame.h" /* Need this to get the X window of selected_frame */
#include "blockinput.h"
@ -30,7 +30,7 @@ Boston, MA 02111-1307, USA. */
Lisp_Object QCLIPBOARD;
#if 0
DEFUN ("win32-open-clipboard", Fwin32_open_clipboard, Swin32_open_clipboard, 0, 1, 0,
DEFUN ("w32-open-clipboard", Fw32_open_clipboard, Sw32_open_clipboard, 0, 1, 0,
"This opens the clipboard with the given frame pointer.")
(frame)
Lisp_Object frame;
@ -42,14 +42,14 @@ DEFUN ("win32-open-clipboard", Fwin32_open_clipboard, Swin32_open_clipboard, 0,
BLOCK_INPUT;
ok = OpenClipboard ((!NILP (frame) && FRAME_WIN32_P (XFRAME (frame))) ? FRAME_WIN32_WINDOW (XFRAME (frame)) : NULL);
ok = OpenClipboard ((!NILP (frame) && FRAME_W32_P (XFRAME (frame))) ? FRAME_W32_WINDOW (XFRAME (frame)) : NULL);
UNBLOCK_INPUT;
return (ok ? frame : Qnil);
}
DEFUN ("win32-empty-clipboard", Fwin32_empty_clipboard, Swin32_empty_clipboard, 0, 0, 0,
DEFUN ("w32-empty-clipboard", Fw32_empty_clipboard, Sw32_empty_clipboard, 0, 0, 0,
"This empties the clipboard and assigns ownership to the window which opened the clipboard.")
()
{
@ -64,7 +64,7 @@ DEFUN ("win32-empty-clipboard", Fwin32_empty_clipboard, Swin32_empty_clipboard,
return (ok ? Qt : Qnil);
}
DEFUN ("win32-close-clipboard", Fwin32_close_clipboard, Swin32_close_clipboard, 0, 0, 0,
DEFUN ("w32-close-clipboard", Fw32_close_clipboard, Sw32_close_clipboard, 0, 0, 0,
"This closes the clipboard.")
()
{
@ -81,7 +81,7 @@ DEFUN ("win32-close-clipboard", Fwin32_close_clipboard, Swin32_close_clipboard,
#endif
DEFUN ("win32-set-clipboard-data", Fwin32_set_clipboard_data, Swin32_set_clipboard_data, 1, 2, 0,
DEFUN ("w32-set-clipboard-data", Fw32_set_clipboard_data, Sw32_set_clipboard_data, 1, 2, 0,
"This sets the clipboard data to the given text.")
(string, frame)
Lisp_Object string, frame;
@ -146,7 +146,7 @@ DEFUN ("win32-set-clipboard-data", Fwin32_set_clipboard_data, Swin32_set_clipboa
GlobalUnlock (htext);
if (!OpenClipboard ((!NILP (frame) && FRAME_WIN32_P (XFRAME (frame))) ? FRAME_WIN32_WINDOW (XFRAME (frame)) : NULL))
if (!OpenClipboard ((!NILP (frame) && FRAME_W32_P (XFRAME (frame))) ? FRAME_W32_WINDOW (XFRAME (frame)) : NULL))
goto error;
ok = EmptyClipboard () && SetClipboardData (CF_TEXT, htext);
@ -166,7 +166,7 @@ DEFUN ("win32-set-clipboard-data", Fwin32_set_clipboard_data, Swin32_set_clipboa
return (ok ? string : Qnil);
}
DEFUN ("win32-get-clipboard-data", Fwin32_get_clipboard_data, Swin32_get_clipboard_data, 0, 1, 0,
DEFUN ("w32-get-clipboard-data", Fw32_get_clipboard_data, Sw32_get_clipboard_data, 0, 1, 0,
"This gets the clipboard data in text format.")
(frame)
Lisp_Object frame;
@ -179,7 +179,7 @@ DEFUN ("win32-get-clipboard-data", Fwin32_get_clipboard_data, Swin32_get_clipboa
BLOCK_INPUT;
if (!OpenClipboard ((!NILP (frame) && FRAME_WIN32_P (XFRAME (frame))) ? FRAME_WIN32_WINDOW (XFRAME (frame)) : NULL))
if (!OpenClipboard ((!NILP (frame) && FRAME_W32_P (XFRAME (frame))) ? FRAME_W32_WINDOW (XFRAME (frame)) : NULL))
goto done;
if ((htext = GetClipboardData (CF_TEXT)) == NULL)
@ -284,15 +284,15 @@ and t is the same as `SECONDARY'.")
}
void
syms_of_win32select ()
syms_of_w32select ()
{
#if 0
defsubr (&Swin32_open_clipboard);
defsubr (&Swin32_empty_clipboard);
defsubr (&Swin32_close_clipboard);
defsubr (&Sw32_open_clipboard);
defsubr (&Sw32_empty_clipboard);
defsubr (&Sw32_close_clipboard);
#endif
defsubr (&Swin32_set_clipboard_data);
defsubr (&Swin32_get_clipboard_data);
defsubr (&Sw32_set_clipboard_data);
defsubr (&Sw32_get_clipboard_data);
defsubr (&Sx_selection_exists_p);
QCLIPBOARD = intern ("CLIPBOARD"); staticpro (&QCLIPBOARD);

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
/* Definitions and headers for communication with Win32 GUI.
/* Definitions and headers for communication under the Win32 API.
Copyright (C) 1995 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@ -32,7 +32,7 @@ Boston, MA 02111-1307, USA. */
#define FONT_HEIGHT(f) ((f)->tm.tmHeight)
#define FONT_BASE(f) ((f)->tm.tmAscent)
#define CHECK_WIN32_FRAME(f, frame) \
#define CHECK_W32_FRAME(f, frame) \
if (NILP (frame)) \
f = selected_frame; \
else \
@ -40,7 +40,7 @@ Boston, MA 02111-1307, USA. */
CHECK_LIVE_FRAME (frame, 0); \
f = XFRAME (frame); \
} \
if (! FRAME_WIN32_P (f))
if (! FRAME_W32_P (f))
/* Indicates whether we are in the readsocket call and the message we
are processing in the current loop */
@ -55,7 +55,7 @@ enum text_cursor_kinds {
};
/* This data type is used for the font_table field
of struct win32_display_info. */
of struct w32_display_info. */
struct font_info
{
@ -66,7 +66,7 @@ struct font_info
/* Structure recording bitmaps and reference count.
If REFCOUNT is 0 then this record is free to be reused. */
struct win32_bitmap_record
struct w32_bitmap_record
{
Pixmap pixmap;
char *file;
@ -80,26 +80,26 @@ struct win32_bitmap_record
system palette. Keep a ref-counted list of requested colors and
regenerate the app palette whenever the requested list changes. */
extern Lisp_Object Vwin32_enable_palette;
extern Lisp_Object Vw32_enable_palette;
struct win32_palette_entry {
struct win32_palette_entry * next;
struct w32_palette_entry {
struct w32_palette_entry * next;
PALETTEENTRY entry;
#if 0
unsigned refcount;
#endif
};
extern void win32_regenerate_palette(struct frame *f);
extern void w32_regenerate_palette(struct frame *f);
/* For each display (currently only one on win32), we have a structure that
/* For each display (currently only one on w32), we have a structure that
records information about it. */
struct win32_display_info
struct w32_display_info
{
/* Chain of all win32_display_info structures. */
struct win32_display_info *next;
/* Chain of all w32_display_info structures. */
struct w32_display_info *next;
/* This is a cons cell of the form (NAME . FONT-LIST-CACHE).
The same cons cell also appears in x_display_name_list. */
Lisp_Object name_list_element;
@ -121,7 +121,7 @@ struct win32_display_info
/* color palette information */
int has_palette;
struct win32_palette_entry * color_list;
struct w32_palette_entry * color_list;
unsigned num_colors;
HPALETTE palette;
@ -156,15 +156,15 @@ struct win32_display_info
/* Nonzero means defer mouse-motion highlighting. */
int mouse_face_defer;
char *win32_id_name;
char *w32_id_name;
/* The number of fonts actually stored in win32_font_table.
/* The number of fonts actually stored in w32_font_table.
font_table[n] is used and valid iff 0 <= n < n_fonts.
0 <= n_fonts <= font_table_size. */
int n_fonts;
/* Pointer to bitmap records. */
struct win32_bitmap_record *bitmaps;
struct w32_bitmap_record *bitmaps;
/* Allocated size of bitmaps field. */
int bitmaps_size;
@ -176,54 +176,54 @@ struct win32_display_info
Zero if none. This is examined by Ffocus_frame in w32fns.c. Note
that a mere EnterNotify event can set this; if you need to know the
last frame specified in a FocusIn or FocusOut event, use
win32_focus_event_frame. */
struct frame *win32_focus_frame;
w32_focus_event_frame. */
struct frame *w32_focus_frame;
/* The last frame mentioned in a FocusIn or FocusOut event. This is
separate from win32_focus_frame, because whether or not LeaveNotify
separate from w32_focus_frame, because whether or not LeaveNotify
events cause us to lose focus depends on whether or not we have
received a FocusIn event for it. */
struct frame *win32_focus_event_frame;
struct frame *w32_focus_event_frame;
/* The frame which currently has the visual highlight, and should get
keyboard input (other sorts of input have the frame encoded in the
event). It points to the focus frame's selected window's
frame. It differs from win32_focus_frame when we're using a global
frame. It differs from w32_focus_frame when we're using a global
minibuffer. */
struct frame *win32_highlight_frame;
struct frame *w32_highlight_frame;
};
/* This is a chain of structures for all the displays currently in use. */
extern struct win32_display_info one_win32_display_info;
extern struct w32_display_info one_w32_display_info;
/* This is a list of cons cells, each of the form (NAME . FONT-LIST-CACHE),
one for each element of win32_display_list and in the same order.
one for each element of w32_display_list and in the same order.
NAME is the name of the frame.
FONT-LIST-CACHE records previous values returned by x-list-fonts. */
extern Lisp_Object win32_display_name_list;
extern Lisp_Object w32_display_name_list;
extern struct win32_display_info *x_display_info_for_display ();
extern struct win32_display_info *x_display_info_for_name ();
extern struct w32_display_info *x_display_info_for_display ();
extern struct w32_display_info *x_display_info_for_name ();
extern struct win32_display_info *win32_term_init ();
extern struct w32_display_info *w32_term_init ();
/* Each Win32 frame object points to its own struct win32_display object
in the output_data.win32 field. The win32_display structure contains all
the information that is specific to Win32 windows. */
/* Each W32 frame object points to its own struct w32_display object
in the output_data.w32 field. The w32_display structure contains all
the information that is specific to W32 windows. */
struct win32_output
struct w32_output
{
/* Original palette (used to deselect real palette after drawing) */
HPALETTE old_palette;
/* Position of the Win32 window (x and y offsets in root window). */
/* Position of the W32 window (x and y offsets in root window). */
int left_pos;
int top_pos;
/* Border width of the Win32 window as known by the window system. */
/* Border width of the W32 window as known by the window system. */
int border_width;
/* Size of the Win32 window in pixels. */
/* Size of the W32 window in pixels. */
int pixel_height, pixel_width;
/* Height of a line, in pixels. */
@ -304,7 +304,7 @@ struct win32_output
int size_hint_flags;
/* This is the Emacs structure for the display this frame is on. */
/* struct win32_display_info *display_info; */
/* struct w32_display_info *display_info; */
/* Nonzero means our parent is another application's window
and was explicitly specified. */
@ -315,37 +315,37 @@ struct win32_output
};
/* Get at the computed faces of an X window frame. */
#define FRAME_PARAM_FACES(f) ((f)->output_data.win32->param_faces)
#define FRAME_N_PARAM_FACES(f) ((f)->output_data.win32->n_param_faces)
#define FRAME_PARAM_FACES(f) ((f)->output_data.w32->param_faces)
#define FRAME_N_PARAM_FACES(f) ((f)->output_data.w32->n_param_faces)
#define FRAME_DEFAULT_PARAM_FACE(f) (FRAME_PARAM_FACES (f)[0])
#define FRAME_MODE_LINE_PARAM_FACE(f) (FRAME_PARAM_FACES (f)[1])
#define FRAME_COMPUTED_FACES(f) ((f)->output_data.win32->computed_faces)
#define FRAME_N_COMPUTED_FACES(f) ((f)->output_data.win32->n_computed_faces)
#define FRAME_SIZE_COMPUTED_FACES(f) ((f)->output_data.win32->size_computed_faces)
#define FRAME_DEFAULT_FACE(f) ((f)->output_data.win32->computed_faces[0])
#define FRAME_MODE_LINE_FACE(f) ((f)->output_data.win32->computed_faces[1])
#define FRAME_COMPUTED_FACES(f) ((f)->output_data.w32->computed_faces)
#define FRAME_N_COMPUTED_FACES(f) ((f)->output_data.w32->n_computed_faces)
#define FRAME_SIZE_COMPUTED_FACES(f) ((f)->output_data.w32->size_computed_faces)
#define FRAME_DEFAULT_FACE(f) ((f)->output_data.w32->computed_faces[0])
#define FRAME_MODE_LINE_FACE(f) ((f)->output_data.w32->computed_faces[1])
/* Return the window associated with the frame F. */
#define FRAME_WIN32_WINDOW(f) ((f)->output_data.win32->window_desc)
#define FRAME_W32_WINDOW(f) ((f)->output_data.w32->window_desc)
#define FRAME_FOREGROUND_PIXEL(f) ((f)->output_data.win32->foreground_pixel)
#define FRAME_BACKGROUND_PIXEL(f) ((f)->output_data.win32->background_pixel)
#define FRAME_FONT(f) ((f)->output_data.win32->font)
#define FRAME_INTERNAL_BORDER_WIDTH(f) ((f)->output_data.win32->internal_border_width)
#define FRAME_FOREGROUND_PIXEL(f) ((f)->output_data.w32->foreground_pixel)
#define FRAME_BACKGROUND_PIXEL(f) ((f)->output_data.w32->background_pixel)
#define FRAME_FONT(f) ((f)->output_data.w32->font)
#define FRAME_INTERNAL_BORDER_WIDTH(f) ((f)->output_data.w32->internal_border_width)
/* This gives the win32_display_info structure for the display F is on. */
#define FRAME_WIN32_DISPLAY_INFO(f) (&one_win32_display_info)
/* This gives the w32_display_info structure for the display F is on. */
#define FRAME_W32_DISPLAY_INFO(f) (&one_w32_display_info)
/* These two really ought to be called FRAME_PIXEL_{WIDTH,HEIGHT}. */
#define PIXEL_WIDTH(f) ((f)->output_data.win32->pixel_width)
#define PIXEL_HEIGHT(f) ((f)->output_data.win32->pixel_height)
#define FRAME_LINE_HEIGHT(f) ((f)->output_data.win32->line_height)
#define PIXEL_WIDTH(f) ((f)->output_data.w32->pixel_width)
#define PIXEL_HEIGHT(f) ((f)->output_data.w32->pixel_height)
#define FRAME_LINE_HEIGHT(f) ((f)->output_data.w32->line_height)
#define FRAME_DESIRED_CURSOR(f) ((f)->output_data.win32->desired_cursor)
#define FRAME_DESIRED_CURSOR(f) ((f)->output_data.w32->desired_cursor)
/* Win32-specific scroll bar stuff. */
/* W32-specific scroll bar stuff. */
/* We represent scroll bars as lisp vectors. This allows us to place
references to them in windows without worrying about whether we'll
@ -369,7 +369,7 @@ struct scroll_bar {
/* The window representing this scroll bar. Since this is a full
32-bit quantity, we store it split into two 32-bit values. */
Lisp_Object win32_window_low, win32_window_high;
Lisp_Object w32_window_low, w32_window_high;
/* The position and size of the scroll bar in pixels, relative to the
frame. */
@ -415,18 +415,18 @@ struct scroll_bar {
/* Extract the window id of the scroll bar from a struct scroll_bar. */
#define SCROLL_BAR_WIN32_WINDOW(ptr) \
((Window) SCROLL_BAR_PACK ((ptr)->win32_window_low, (ptr)->win32_window_high))
#define SCROLL_BAR_W32_WINDOW(ptr) \
((Window) SCROLL_BAR_PACK ((ptr)->w32_window_low, (ptr)->w32_window_high))
/* Store a window id in a struct scroll_bar. */
#define SET_SCROLL_BAR_WIN32_WINDOW(ptr, id) \
(SCROLL_BAR_UNPACK ((ptr)->win32_window_low, (ptr)->win32_window_high, (int) id))
#define SET_SCROLL_BAR_W32_WINDOW(ptr, id) \
(SCROLL_BAR_UNPACK ((ptr)->w32_window_low, (ptr)->w32_window_high, (int) id))
/* Return the outside pixel height for a vertical scroll bar HEIGHT
rows high on frame F. */
#define VERTICAL_SCROLL_BAR_PIXEL_HEIGHT(f, height) \
((height) * (f)->output_data.win32->line_height)
((height) * (f)->output_data.w32->line_height)
/* Return the inside width of a vertical scroll bar, given the outside
width. */
@ -476,41 +476,41 @@ struct scroll_bar {
Return the upper/left pixel position of the character cell on frame F
at ROW/COL. */
#define CHAR_TO_PIXEL_ROW(f, row) \
((f)->output_data.win32->internal_border_width \
+ (row) * (f)->output_data.win32->line_height)
((f)->output_data.w32->internal_border_width \
+ (row) * (f)->output_data.w32->line_height)
#define CHAR_TO_PIXEL_COL(f, col) \
((f)->output_data.win32->internal_border_width \
+ (col) * FONT_WIDTH ((f)->output_data.win32->font))
((f)->output_data.w32->internal_border_width \
+ (col) * FONT_WIDTH ((f)->output_data.w32->font))
/* Return the pixel width/height of frame F if it has
WIDTH columns/HEIGHT rows. */
#define CHAR_TO_PIXEL_WIDTH(f, width) \
(CHAR_TO_PIXEL_COL (f, width) \
+ (f)->output_data.win32->vertical_scroll_bar_extra \
+ (f)->output_data.win32->internal_border_width)
+ (f)->output_data.w32->vertical_scroll_bar_extra \
+ (f)->output_data.w32->internal_border_width)
#define CHAR_TO_PIXEL_HEIGHT(f, height) \
(CHAR_TO_PIXEL_ROW (f, height) \
+ (f)->output_data.win32->internal_border_width)
+ (f)->output_data.w32->internal_border_width)
/* Return the row/column (zero-based) of the character cell containing
the pixel on FRAME at ROW/COL. */
#define PIXEL_TO_CHAR_ROW(f, row) \
(((row) - (f)->output_data.win32->internal_border_width) \
/ (f)->output_data.win32->line_height)
(((row) - (f)->output_data.w32->internal_border_width) \
/ (f)->output_data.w32->line_height)
#define PIXEL_TO_CHAR_COL(f, col) \
(((col) - (f)->output_data.win32->internal_border_width) \
/ FONT_WIDTH ((f)->output_data.win32->font))
(((col) - (f)->output_data.w32->internal_border_width) \
/ FONT_WIDTH ((f)->output_data.w32->font))
/* How many columns/rows of text can we fit in WIDTH/HEIGHT pixels on
frame F? */
#define PIXEL_TO_CHAR_WIDTH(f, width) \
(PIXEL_TO_CHAR_COL (f, ((width) \
- (f)->output_data.win32->internal_border_width \
- (f)->output_data.win32->vertical_scroll_bar_extra)))
- (f)->output_data.w32->internal_border_width \
- (f)->output_data.w32->vertical_scroll_bar_extra)))
#define PIXEL_TO_CHAR_HEIGHT(f, height) \
(PIXEL_TO_CHAR_ROW (f, ((height) \
- (f)->output_data.win32->internal_border_width)))
- (f)->output_data.w32->internal_border_width)))
/* Interface to the face code functions. */
@ -555,27 +555,27 @@ extern int compute_char_face (/* FRAME_PTR frame,
be BASIC_FACE. F is the frame. */
extern int compute_glyph_face (/* FRAME_PTR, int */);
extern void win32_fill_rect ();
extern void win32_clear_window ();
extern void w32_fill_rect ();
extern void w32_clear_window ();
#define win32_fill_area(f,hdc,pix,x,y,nx,ny) \
#define w32_fill_area(f,hdc,pix,x,y,nx,ny) \
{ \
RECT rect; \
rect.left = x; \
rect.top = y; \
rect.right = x + nx; \
rect.bottom = y + ny; \
win32_fill_rect (f,hdc,pix,&rect); \
w32_fill_rect (f,hdc,pix,&rect); \
}
#define win32_clear_rect(f,hdc,lprect) \
win32_fill_rect (f,hdc,f->output_data.win32->background_pixel,lprect)
#define w32_clear_rect(f,hdc,lprect) \
w32_fill_rect (f,hdc,f->output_data.w32->background_pixel,lprect)
#define win32_clear_area(f,hdc,x,y,nx,ny) \
win32_fill_area (f,hdc,f->output_data.win32->background_pixel,x,y,nx,ny)
#define w32_clear_area(f,hdc,x,y,nx,ny) \
w32_fill_area (f,hdc,f->output_data.w32->background_pixel,x,y,nx,ny)
extern XFontStruct *win32_load_font ();
extern void win32_unload_font ();
extern XFontStruct *w32_load_font ();
extern void w32_unload_font ();
#define WM_EMACS_START (WM_USER + 1)
#define WM_EMACS_KILL (WM_EMACS_START + 0x00)
@ -594,7 +594,7 @@ typedef struct {
int cx;
int cy;
int flags;
} Win32WindowPos;
} W32WindowPos;
#define WND_X_UNITS_INDEX (0)
#define WND_Y_UNITS_INDEX (4)
@ -608,11 +608,11 @@ extern HANDLE hWinThread;
extern DWORD dwMainThreadId;
extern HANDLE hMainThread;
typedef struct Win32Msg {
typedef struct W32Msg {
MSG msg;
DWORD dwModifiers;
RECT rect;
} Win32Msg;
} W32Msg;
extern CRITICAL_SECTION critsect;
@ -633,7 +633,7 @@ extern void wait_for_sync ();
extern BOOL parse_button ();
/* Keypad command key support. Win32 doesn't have virtual keys defined
/* Keypad command key support. W32 doesn't have virtual keys defined
for the function keys on the keypad (they are mapped to the standard
fuction keys), so we define our own. */
#define VK_NUMPAD_BEGIN 0x92

View File

@ -1,4 +1,4 @@
/* Functions taken directly from X sources
/* Functions taken directly from X sources for use with the Win32 API.
Copyright (C) 1989, 1992, 1993, 1994, 1995 Free Software Foundation.
This file is part of GNU Emacs.
@ -59,11 +59,11 @@ delete_crit ()
void
select_palette (FRAME_PTR f, HDC hdc)
{
if (!NILP (Vwin32_enable_palette))
f->output_data.win32->old_palette =
SelectPalette (hdc, one_win32_display_info.palette, FALSE);
if (!NILP (Vw32_enable_palette))
f->output_data.w32->old_palette =
SelectPalette (hdc, one_w32_display_info.palette, FALSE);
else
f->output_data.win32->old_palette = NULL;
f->output_data.w32->old_palette = NULL;
if (RealizePalette (hdc))
{
@ -78,8 +78,8 @@ select_palette (FRAME_PTR f, HDC hdc)
void
deselect_palette (FRAME_PTR f, HDC hdc)
{
if (f->output_data.win32->old_palette)
SelectPalette (hdc, f->output_data.win32->old_palette, FALSE);
if (f->output_data.w32->old_palette)
SelectPalette (hdc, f->output_data.w32->old_palette, FALSE);
}
/* Get a DC for frame and select palette for drawing; force an update of
@ -91,7 +91,7 @@ get_frame_dc (FRAME_PTR f)
enter_crit ();
hdc = GetDC (f->output_data.win32->window_desc);
hdc = GetDC (f->output_data.w32->window_desc);
select_palette (f, hdc);
return hdc;
@ -103,7 +103,7 @@ release_frame_dc (FRAME_PTR f, HDC hdc)
int ret;
deselect_palette (f, hdc);
ret = ReleaseDC (f->output_data.win32->window_desc, hdc);
ret = ReleaseDC (f->output_data.w32->window_desc, hdc);
leave_crit ();
@ -112,7 +112,7 @@ release_frame_dc (FRAME_PTR f, HDC hdc)
typedef struct int_msg
{
Win32Msg w32msg;
W32Msg w32msg;
struct int_msg *lpNext;
} int_msg;
@ -122,7 +122,7 @@ int nQueue = 0;
BOOL
get_next_msg (lpmsg, bWait)
Win32Msg * lpmsg;
W32Msg * lpmsg;
BOOL bWait;
{
BOOL bRet = FALSE;
@ -140,7 +140,7 @@ get_next_msg (lpmsg, bWait)
if (nQueue)
{
bcopy (&(lpHead->w32msg), lpmsg, sizeof (Win32Msg));
bcopy (&(lpHead->w32msg), lpmsg, sizeof (W32Msg));
{
int_msg * lpCur = lpHead;
@ -165,14 +165,14 @@ get_next_msg (lpmsg, bWait)
BOOL
post_msg (lpmsg)
Win32Msg * lpmsg;
W32Msg * lpmsg;
{
int_msg * lpNew = (int_msg *) myalloc (sizeof (int_msg));
if (!lpNew)
return (FALSE);
bcopy (lpmsg, &(lpNew->w32msg), sizeof (Win32Msg));
bcopy (lpmsg, &(lpNew->w32msg), sizeof (W32Msg));
lpNew->lpNext = NULL;
enter_crit ();
@ -195,14 +195,14 @@ post_msg (lpmsg)
}
BOOL
prepend_msg (Win32Msg *lpmsg)
prepend_msg (W32Msg *lpmsg)
{
int_msg * lpNew = (int_msg *) myalloc (sizeof (int_msg));
if (!lpNew)
return (FALSE);
bcopy (lpmsg, &(lpNew->w32msg), sizeof (Win32Msg));
bcopy (lpmsg, &(lpNew->w32msg), sizeof (W32Msg));
enter_crit ();
@ -357,7 +357,7 @@ have_menus_p (void)
return 1;
}
/* x_sync is a no-op on Win32. */
/* x_sync is a no-op on W32. */
void
x_sync (f)
void *f;