diff options
| author | Juanma Barranquero | 2010-07-06 16:22:29 +0200 |
|---|---|---|
| committer | Juanma Barranquero | 2010-07-06 16:22:29 +0200 |
| commit | b56ceb92bf4d470af2e9172d1fcd4d85232c40a6 (patch) | |
| tree | 50ab60b4715be45ed671c386c5b9336b45443539 /src | |
| parent | 7af07b967171736a35e0af8b6ecf6feb072184dc (diff) | |
| download | emacs-b56ceb92bf4d470af2e9172d1fcd4d85232c40a6.tar.gz emacs-b56ceb92bf4d470af2e9172d1fcd4d85232c40a6.zip | |
src/w32*.c: Convert function definitions to standard C.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 6 | ||||
| -rw-r--r-- | src/w32.c | 77 | ||||
| -rw-r--r-- | src/w32console.c | 47 | ||||
| -rw-r--r-- | src/w32fns.c | 265 | ||||
| -rw-r--r-- | src/w32font.c | 181 | ||||
| -rw-r--r-- | src/w32heap.c | 2 | ||||
| -rw-r--r-- | src/w32inevt.c | 2 | ||||
| -rw-r--r-- | src/w32menu.c | 53 | ||||
| -rw-r--r-- | src/w32proc.c | 23 | ||||
| -rw-r--r-- | src/w32reg.c | 12 | ||||
| -rw-r--r-- | src/w32select.c | 34 | ||||
| -rw-r--r-- | src/w32term.c | 484 | ||||
| -rw-r--r-- | src/w32uniscribe.c | 49 | ||||
| -rw-r--r-- | src/w32xfns.c | 29 |
14 files changed, 442 insertions, 822 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index bd2aba266cc..c0c94ebea89 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2010-07-06 Juanma Barranquero <lekktu@gmail.com> | ||
| 2 | |||
| 3 | * w32.c, w32console.c, w32fns.c, w32font.c, w32heap.c, w32inevt.c | ||
| 4 | * w32menu.c, w32proc.c, w32reg.c, w32select.c, w32term.c | ||
| 5 | * w32uniscribe.c, w32xfns.c: Convert function definitions to standard C. | ||
| 6 | |||
| 1 | 2010-07-06 Andreas Schwab <schwab@linux-m68k.org> | 7 | 2010-07-06 Andreas Schwab <schwab@linux-m68k.org> |
| 2 | 8 | ||
| 3 | * xterm.c (x_get_keysym_name): Change type of parameter to int. | 9 | * xterm.c (x_get_keysym_name): Change type of parameter to int. |
| @@ -148,7 +148,7 @@ extern Lisp_Object QCflowcontrol, Qhw, Qsw, QCsummary; | |||
| 148 | typedef HRESULT (WINAPI * ShGetFolderPath_fn) | 148 | typedef HRESULT (WINAPI * ShGetFolderPath_fn) |
| 149 | (IN HWND, IN int, IN HANDLE, IN DWORD, OUT char *); | 149 | (IN HWND, IN int, IN HANDLE, IN DWORD, OUT char *); |
| 150 | 150 | ||
| 151 | void globals_of_w32 (); | 151 | void globals_of_w32 (void); |
| 152 | static DWORD get_rid (PSID); | 152 | static DWORD get_rid (PSID); |
| 153 | 153 | ||
| 154 | extern Lisp_Object Vw32_downcase_file_names; | 154 | extern Lisp_Object Vw32_downcase_file_names; |
| @@ -308,7 +308,7 @@ typedef BOOL (WINAPI * GetSystemTimes_Proc) ( | |||
| 308 | 308 | ||
| 309 | /* ** A utility function ** */ | 309 | /* ** A utility function ** */ |
| 310 | static BOOL | 310 | static BOOL |
| 311 | is_windows_9x () | 311 | is_windows_9x (void) |
| 312 | { | 312 | { |
| 313 | static BOOL s_b_ret=0; | 313 | static BOOL s_b_ret=0; |
| 314 | OSVERSIONINFO os_ver; | 314 | OSVERSIONINFO os_ver; |
| @@ -329,7 +329,7 @@ is_windows_9x () | |||
| 329 | Returns a list of three integers if the times are provided by the OS | 329 | Returns a list of three integers if the times are provided by the OS |
| 330 | (NT derivatives), otherwise it returns the result of current-time. */ | 330 | (NT derivatives), otherwise it returns the result of current-time. */ |
| 331 | Lisp_Object | 331 | Lisp_Object |
| 332 | w32_get_internal_run_time () | 332 | w32_get_internal_run_time (void) |
| 333 | { | 333 | { |
| 334 | if (get_process_times_fn) | 334 | if (get_process_times_fn) |
| 335 | { | 335 | { |
| @@ -1035,13 +1035,13 @@ static struct group dflt_group = | |||
| 1035 | }; | 1035 | }; |
| 1036 | 1036 | ||
| 1037 | unsigned | 1037 | unsigned |
| 1038 | getuid () | 1038 | getuid (void) |
| 1039 | { | 1039 | { |
| 1040 | return dflt_passwd.pw_uid; | 1040 | return dflt_passwd.pw_uid; |
| 1041 | } | 1041 | } |
| 1042 | 1042 | ||
| 1043 | unsigned | 1043 | unsigned |
| 1044 | geteuid () | 1044 | geteuid (void) |
| 1045 | { | 1045 | { |
| 1046 | /* I could imagine arguing for checking to see whether the user is | 1046 | /* I could imagine arguing for checking to see whether the user is |
| 1047 | in the Administrators group and returning a UID of 0 for that | 1047 | in the Administrators group and returning a UID of 0 for that |
| @@ -1050,13 +1050,13 @@ geteuid () | |||
| 1050 | } | 1050 | } |
| 1051 | 1051 | ||
| 1052 | unsigned | 1052 | unsigned |
| 1053 | getgid () | 1053 | getgid (void) |
| 1054 | { | 1054 | { |
| 1055 | return dflt_passwd.pw_gid; | 1055 | return dflt_passwd.pw_gid; |
| 1056 | } | 1056 | } |
| 1057 | 1057 | ||
| 1058 | unsigned | 1058 | unsigned |
| 1059 | getegid () | 1059 | getegid (void) |
| 1060 | { | 1060 | { |
| 1061 | return getgid (); | 1061 | return getgid (); |
| 1062 | } | 1062 | } |
| @@ -1091,7 +1091,7 @@ getpwnam (char *name) | |||
| 1091 | } | 1091 | } |
| 1092 | 1092 | ||
| 1093 | void | 1093 | void |
| 1094 | init_user_info () | 1094 | init_user_info (void) |
| 1095 | { | 1095 | { |
| 1096 | /* Find the user's real name by opening the process token and | 1096 | /* Find the user's real name by opening the process token and |
| 1097 | looking up the name associated with the user-sid in that token. | 1097 | looking up the name associated with the user-sid in that token. |
| @@ -1207,7 +1207,7 @@ init_user_info () | |||
| 1207 | } | 1207 | } |
| 1208 | 1208 | ||
| 1209 | int | 1209 | int |
| 1210 | random () | 1210 | random (void) |
| 1211 | { | 1211 | { |
| 1212 | /* rand () on NT gives us 15 random bits...hack together 30 bits. */ | 1212 | /* rand () on NT gives us 15 random bits...hack together 30 bits. */ |
| 1213 | return ((rand () << 15) | rand ()); | 1213 | return ((rand () << 15) | rand ()); |
| @@ -1225,9 +1225,7 @@ srandom (int seed) | |||
| 1225 | case path name components to lower case. */ | 1225 | case path name components to lower case. */ |
| 1226 | 1226 | ||
| 1227 | static void | 1227 | static void |
| 1228 | normalize_filename (fp, path_sep) | 1228 | normalize_filename (register char *fp, char path_sep) |
| 1229 | register char *fp; | ||
| 1230 | char path_sep; | ||
| 1231 | { | 1229 | { |
| 1232 | char sep; | 1230 | char sep; |
| 1233 | char *elem; | 1231 | char *elem; |
| @@ -1283,16 +1281,14 @@ normalize_filename (fp, path_sep) | |||
| 1283 | 1281 | ||
| 1284 | /* Destructively turn backslashes into slashes. */ | 1282 | /* Destructively turn backslashes into slashes. */ |
| 1285 | void | 1283 | void |
| 1286 | dostounix_filename (p) | 1284 | dostounix_filename (register char *p) |
| 1287 | register char *p; | ||
| 1288 | { | 1285 | { |
| 1289 | normalize_filename (p, '/'); | 1286 | normalize_filename (p, '/'); |
| 1290 | } | 1287 | } |
| 1291 | 1288 | ||
| 1292 | /* Destructively turn slashes into backslashes. */ | 1289 | /* Destructively turn slashes into backslashes. */ |
| 1293 | void | 1290 | void |
| 1294 | unixtodos_filename (p) | 1291 | unixtodos_filename (register char *p) |
| 1295 | register char *p; | ||
| 1296 | { | 1292 | { |
| 1297 | normalize_filename (p, '\\'); | 1293 | normalize_filename (p, '\\'); |
| 1298 | } | 1294 | } |
| @@ -1301,9 +1297,7 @@ unixtodos_filename (p) | |||
| 1301 | (From msdos.c...probably should figure out a way to share it, | 1297 | (From msdos.c...probably should figure out a way to share it, |
| 1302 | although this code isn't going to ever change.) */ | 1298 | although this code isn't going to ever change.) */ |
| 1303 | int | 1299 | int |
| 1304 | crlf_to_lf (n, buf) | 1300 | crlf_to_lf (register int n, register unsigned char *buf) |
| 1305 | register int n; | ||
| 1306 | register unsigned char *buf; | ||
| 1307 | { | 1301 | { |
| 1308 | unsigned char *np = buf; | 1302 | unsigned char *np = buf; |
| 1309 | unsigned char *startp = buf; | 1303 | unsigned char *startp = buf; |
| @@ -1520,9 +1514,7 @@ alarm (int seconds) | |||
| 1520 | #define REG_ROOT "SOFTWARE\\GNU\\Emacs" | 1514 | #define REG_ROOT "SOFTWARE\\GNU\\Emacs" |
| 1521 | 1515 | ||
| 1522 | LPBYTE | 1516 | LPBYTE |
| 1523 | w32_get_resource (key, lpdwtype) | 1517 | w32_get_resource (char *key, LPDWORD lpdwtype) |
| 1524 | char *key; | ||
| 1525 | LPDWORD lpdwtype; | ||
| 1526 | { | 1518 | { |
| 1527 | LPBYTE lpvalue; | 1519 | LPBYTE lpvalue; |
| 1528 | HKEY hrootkey = NULL; | 1520 | HKEY hrootkey = NULL; |
| @@ -2691,7 +2683,7 @@ sys_creat (const char * path, int mode) | |||
| 2691 | } | 2683 | } |
| 2692 | 2684 | ||
| 2693 | FILE * | 2685 | FILE * |
| 2694 | sys_fopen(const char * path, const char * mode) | 2686 | sys_fopen (const char * path, const char * mode) |
| 2695 | { | 2687 | { |
| 2696 | int fd; | 2688 | int fd; |
| 2697 | int oflag; | 2689 | int oflag; |
| @@ -2980,7 +2972,7 @@ static int init = 0; | |||
| 2980 | } while (0) | 2972 | } while (0) |
| 2981 | 2973 | ||
| 2982 | static void | 2974 | static void |
| 2983 | initialize_utc_base () | 2975 | initialize_utc_base (void) |
| 2984 | { | 2976 | { |
| 2985 | /* Determine the delta between 1-Jan-1601 and 1-Jan-1970. */ | 2977 | /* Determine the delta between 1-Jan-1601 and 1-Jan-1970. */ |
| 2986 | SYSTEMTIME st; | 2978 | SYSTEMTIME st; |
| @@ -3904,7 +3896,7 @@ BOOL WINAPI global_memory_status_ex ( | |||
| 3904 | } | 3896 | } |
| 3905 | 3897 | ||
| 3906 | Lisp_Object | 3898 | Lisp_Object |
| 3907 | list_system_processes () | 3899 | list_system_processes (void) |
| 3908 | { | 3900 | { |
| 3909 | struct gcpro gcpro1; | 3901 | struct gcpro gcpro1; |
| 3910 | Lisp_Object proclist = Qnil; | 3902 | Lisp_Object proclist = Qnil; |
| @@ -3995,8 +3987,7 @@ restore_privilege (TOKEN_PRIVILEGES *priv) | |||
| 3995 | } | 3987 | } |
| 3996 | 3988 | ||
| 3997 | static Lisp_Object | 3989 | static Lisp_Object |
| 3998 | ltime (time_sec, time_usec) | 3990 | ltime (long time_sec, long time_usec) |
| 3999 | long time_sec, time_usec; | ||
| 4000 | { | 3991 | { |
| 4001 | return list3 (make_number ((time_sec >> 16) & 0xffff), | 3992 | return list3 (make_number ((time_sec >> 16) & 0xffff), |
| 4002 | make_number (time_sec & 0xffff), | 3993 | make_number (time_sec & 0xffff), |
| @@ -4006,10 +3997,9 @@ ltime (time_sec, time_usec) | |||
| 4006 | #define U64_TO_LISP_TIME(time) ltime ((time) / 1000000L, (time) % 1000000L) | 3997 | #define U64_TO_LISP_TIME(time) ltime ((time) / 1000000L, (time) % 1000000L) |
| 4007 | 3998 | ||
| 4008 | static int | 3999 | static int |
| 4009 | process_times (h_proc, ctime, etime, stime, utime, ttime, pcpu) | 4000 | process_times (HANDLE h_proc, Lisp_Object *ctime, Lisp_Object *etime, |
| 4010 | HANDLE h_proc; | 4001 | Lisp_Object *stime, Lisp_Object *utime, Lisp_Object *ttime, |
| 4011 | Lisp_Object *ctime, *etime, *stime, *utime, *ttime; | 4002 | double *pcpu) |
| 4012 | double *pcpu; | ||
| 4013 | { | 4003 | { |
| 4014 | FILETIME ft_creation, ft_exit, ft_kernel, ft_user, ft_current; | 4004 | FILETIME ft_creation, ft_exit, ft_kernel, ft_user, ft_current; |
| 4015 | ULONGLONG tem1, tem2, tem3, tem; | 4005 | ULONGLONG tem1, tem2, tem3, tem; |
| @@ -4059,8 +4049,7 @@ process_times (h_proc, ctime, etime, stime, utime, ttime, pcpu) | |||
| 4059 | } | 4049 | } |
| 4060 | 4050 | ||
| 4061 | Lisp_Object | 4051 | Lisp_Object |
| 4062 | system_process_attributes (pid) | 4052 | system_process_attributes (Lisp_Object pid) |
| 4063 | Lisp_Object pid; | ||
| 4064 | { | 4053 | { |
| 4065 | struct gcpro gcpro1, gcpro2, gcpro3; | 4054 | struct gcpro gcpro1, gcpro2, gcpro3; |
| 4066 | Lisp_Object attrs = Qnil; | 4055 | Lisp_Object attrs = Qnil; |
| @@ -4526,7 +4515,7 @@ int h_errno = 0; | |||
| 4526 | normal system codes where they overlap (non-overlapping definitions | 4515 | normal system codes where they overlap (non-overlapping definitions |
| 4527 | are already in <sys/socket.h> */ | 4516 | are already in <sys/socket.h> */ |
| 4528 | static void | 4517 | static void |
| 4529 | set_errno () | 4518 | set_errno (void) |
| 4530 | { | 4519 | { |
| 4531 | if (winsock_lib == NULL) | 4520 | if (winsock_lib == NULL) |
| 4532 | h_errno = EINVAL; | 4521 | h_errno = EINVAL; |
| @@ -4548,7 +4537,7 @@ set_errno () | |||
| 4548 | } | 4537 | } |
| 4549 | 4538 | ||
| 4550 | static void | 4539 | static void |
| 4551 | check_errno () | 4540 | check_errno (void) |
| 4552 | { | 4541 | { |
| 4553 | if (h_errno == 0 && winsock_lib != NULL) | 4542 | if (h_errno == 0 && winsock_lib != NULL) |
| 4554 | pfn_WSASetLastError (0); | 4543 | pfn_WSASetLastError (0); |
| @@ -5038,7 +5027,7 @@ sys_accept (int s, struct sockaddr * addr, int * addrlen) | |||
| 5038 | 5027 | ||
| 5039 | int | 5028 | int |
| 5040 | sys_recvfrom (int s, char * buf, int len, int flags, | 5029 | sys_recvfrom (int s, char * buf, int len, int flags, |
| 5041 | struct sockaddr * from, int * fromlen) | 5030 | struct sockaddr * from, int * fromlen) |
| 5042 | { | 5031 | { |
| 5043 | if (winsock_lib == NULL) | 5032 | if (winsock_lib == NULL) |
| 5044 | { | 5033 | { |
| @@ -5733,7 +5722,7 @@ sys_write (int fd, const void * buffer, unsigned int count) | |||
| 5733 | } | 5722 | } |
| 5734 | 5723 | ||
| 5735 | static void | 5724 | static void |
| 5736 | check_windows_init_file () | 5725 | check_windows_init_file (void) |
| 5737 | { | 5726 | { |
| 5738 | extern int noninteractive, inhibit_window_system; | 5727 | extern int noninteractive, inhibit_window_system; |
| 5739 | 5728 | ||
| @@ -5789,7 +5778,7 @@ check_windows_init_file () | |||
| 5789 | } | 5778 | } |
| 5790 | 5779 | ||
| 5791 | void | 5780 | void |
| 5792 | term_ntproc () | 5781 | term_ntproc (void) |
| 5793 | { | 5782 | { |
| 5794 | #ifdef HAVE_SOCKETS | 5783 | #ifdef HAVE_SOCKETS |
| 5795 | /* shutdown the socket interface if necessary */ | 5784 | /* shutdown the socket interface if necessary */ |
| @@ -5800,7 +5789,7 @@ term_ntproc () | |||
| 5800 | } | 5789 | } |
| 5801 | 5790 | ||
| 5802 | void | 5791 | void |
| 5803 | init_ntproc () | 5792 | init_ntproc (void) |
| 5804 | { | 5793 | { |
| 5805 | #ifdef HAVE_SOCKETS | 5794 | #ifdef HAVE_SOCKETS |
| 5806 | /* Initialise the socket interface now if available and requested by | 5795 | /* Initialise the socket interface now if available and requested by |
| @@ -5908,7 +5897,8 @@ init_ntproc () | |||
| 5908 | shutdown_handler ensures that buffers' autosave files are | 5897 | shutdown_handler ensures that buffers' autosave files are |
| 5909 | up to date when the user logs off, or the system shuts down. | 5898 | up to date when the user logs off, or the system shuts down. |
| 5910 | */ | 5899 | */ |
| 5911 | BOOL WINAPI shutdown_handler(DWORD type) | 5900 | BOOL WINAPI |
| 5901 | shutdown_handler(DWORD type) | ||
| 5912 | { | 5902 | { |
| 5913 | /* Ctrl-C and Ctrl-Break are already suppressed, so don't handle them. */ | 5903 | /* Ctrl-C and Ctrl-Break are already suppressed, so don't handle them. */ |
| 5914 | if (type == CTRL_CLOSE_EVENT /* User closes console window. */ | 5904 | if (type == CTRL_CLOSE_EVENT /* User closes console window. */ |
| @@ -5929,7 +5919,7 @@ BOOL WINAPI shutdown_handler(DWORD type) | |||
| 5929 | initialized is non zero (see the function main in emacs.c). | 5919 | initialized is non zero (see the function main in emacs.c). |
| 5930 | */ | 5920 | */ |
| 5931 | void | 5921 | void |
| 5932 | globals_of_w32 () | 5922 | globals_of_w32 (void) |
| 5933 | { | 5923 | { |
| 5934 | HMODULE kernel32 = GetModuleHandle ("kernel32.dll"); | 5924 | HMODULE kernel32 = GetModuleHandle ("kernel32.dll"); |
| 5935 | 5925 | ||
| @@ -5974,7 +5964,8 @@ globals_of_w32 () | |||
| 5974 | } | 5964 | } |
| 5975 | 5965 | ||
| 5976 | /* For make-serial-process */ | 5966 | /* For make-serial-process */ |
| 5977 | int serial_open (char *port) | 5967 | int |
| 5968 | serial_open (char *port) | ||
| 5978 | { | 5969 | { |
| 5979 | HANDLE hnd; | 5970 | HANDLE hnd; |
| 5980 | child_process *cp; | 5971 | child_process *cp; |
| @@ -6014,7 +6005,7 @@ int serial_open (char *port) | |||
| 6014 | /* For serial-process-configure */ | 6005 | /* For serial-process-configure */ |
| 6015 | void | 6006 | void |
| 6016 | serial_configure (struct Lisp_Process *p, | 6007 | serial_configure (struct Lisp_Process *p, |
| 6017 | Lisp_Object contact) | 6008 | Lisp_Object contact) |
| 6018 | { | 6009 | { |
| 6019 | Lisp_Object childp2 = Qnil; | 6010 | Lisp_Object childp2 = Qnil; |
| 6020 | Lisp_Object tem = Qnil; | 6011 | Lisp_Object tem = Qnil; |
diff --git a/src/w32console.c b/src/w32console.c index 83c7430f6dc..c2fe6e7db5c 100644 --- a/src/w32console.c +++ b/src/w32console.c | |||
| @@ -42,13 +42,13 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 42 | #include "w32inevt.h" | 42 | #include "w32inevt.h" |
| 43 | 43 | ||
| 44 | /* from window.c */ | 44 | /* from window.c */ |
| 45 | extern Lisp_Object Frecenter (); | 45 | extern Lisp_Object Frecenter (Lisp_Object); |
| 46 | 46 | ||
| 47 | /* from keyboard.c */ | 47 | /* from keyboard.c */ |
| 48 | extern int detect_input_pending (); | 48 | extern int detect_input_pending (void); |
| 49 | 49 | ||
| 50 | /* from sysdep.c */ | 50 | /* from sysdep.c */ |
| 51 | extern int read_input_pending (); | 51 | extern int read_input_pending (void); |
| 52 | 52 | ||
| 53 | static void w32con_move_cursor (struct frame *f, int row, int col); | 53 | static void w32con_move_cursor (struct frame *f, int row, int col); |
| 54 | static void w32con_clear_to_end (struct frame *f); | 54 | static void w32con_clear_to_end (struct frame *f); |
| @@ -68,7 +68,7 @@ static WORD w32_face_attributes (struct frame *f, int face_id); | |||
| 68 | static COORD cursor_coords; | 68 | static COORD cursor_coords; |
| 69 | static HANDLE prev_screen, cur_screen; | 69 | static HANDLE prev_screen, cur_screen; |
| 70 | static WORD char_attr_normal; | 70 | static WORD char_attr_normal; |
| 71 | static DWORD prev_console_mode; | 71 | static DWORD prev_console_mode; |
| 72 | 72 | ||
| 73 | #ifndef USE_SEPARATE_SCREEN | 73 | #ifndef USE_SEPARATE_SCREEN |
| 74 | static CONSOLE_CURSOR_INFO prev_console_cursor; | 74 | static CONSOLE_CURSOR_INFO prev_console_cursor; |
| @@ -268,7 +268,8 @@ scroll_line (struct frame *f, int dist, int direction) | |||
| 268 | 268 | ||
| 269 | /* If start is zero insert blanks instead of a string at start ?. */ | 269 | /* If start is zero insert blanks instead of a string at start ?. */ |
| 270 | static void | 270 | static void |
| 271 | w32con_insert_glyphs (struct frame *f, register struct glyph *start, register int len) | 271 | w32con_insert_glyphs (struct frame *f, register struct glyph *start, |
| 272 | register int len) | ||
| 272 | { | 273 | { |
| 273 | scroll_line (f, len, RIGHT); | 274 | scroll_line (f, len, RIGHT); |
| 274 | 275 | ||
| @@ -286,7 +287,7 @@ w32con_insert_glyphs (struct frame *f, register struct glyph *start, register in | |||
| 286 | } | 287 | } |
| 287 | } | 288 | } |
| 288 | 289 | ||
| 289 | extern unsigned char *encode_terminal_code (struct glyph *, int, | 290 | extern unsigned char *encode_terminal_code (struct glyph *, int, |
| 290 | struct coding_system *); | 291 | struct coding_system *); |
| 291 | 292 | ||
| 292 | static void | 293 | static void |
| @@ -438,7 +439,7 @@ w32con_reset_terminal_modes (struct terminal *t) | |||
| 438 | FillConsoleOutputCharacter (cur_screen, ' ', n, dest, &r); | 439 | FillConsoleOutputCharacter (cur_screen, ' ', n, dest, &r); |
| 439 | /* Now that the screen is clear, put the cursor at the top. */ | 440 | /* Now that the screen is clear, put the cursor at the top. */ |
| 440 | SetConsoleCursorPosition (cur_screen, dest); | 441 | SetConsoleCursorPosition (cur_screen, dest); |
| 441 | 442 | ||
| 442 | #ifdef USE_SEPARATE_SCREEN | 443 | #ifdef USE_SEPARATE_SCREEN |
| 443 | SetConsoleActiveScreenBuffer (prev_screen); | 444 | SetConsoleActiveScreenBuffer (prev_screen); |
| 444 | #else | 445 | #else |
| @@ -511,13 +512,13 @@ struct tty_display_info *current_tty = NULL; | |||
| 511 | int cost = 0; | 512 | int cost = 0; |
| 512 | 513 | ||
| 513 | int | 514 | int |
| 514 | evalcost (char c) | 515 | evalcost (int c) |
| 515 | { | 516 | { |
| 516 | return c; | 517 | return c; |
| 517 | } | 518 | } |
| 518 | 519 | ||
| 519 | int | 520 | int |
| 520 | cmputc (char c) | 521 | cmputc (int c) |
| 521 | { | 522 | { |
| 522 | return c; | 523 | return c; |
| 523 | } | 524 | } |
| @@ -551,9 +552,7 @@ Wcm_clear (struct tty_display_info *tty) | |||
| 551 | /* Turn appearances of face FACE_ID on tty frame F on. */ | 552 | /* Turn appearances of face FACE_ID on tty frame F on. */ |
| 552 | 553 | ||
| 553 | static WORD | 554 | static WORD |
| 554 | w32_face_attributes (f, face_id) | 555 | w32_face_attributes (struct frame *f, int face_id) |
| 555 | struct frame *f; | ||
| 556 | int face_id; | ||
| 557 | { | 556 | { |
| 558 | WORD char_attr; | 557 | WORD char_attr; |
| 559 | struct face *face = FACE_FROM_ID (f, face_id); | 558 | struct face *face = FACE_FROM_ID (f, face_id); |
| @@ -609,8 +608,6 @@ vga_stdcolor_name (int idx) | |||
| 609 | return Qunspecified; /* meaning the default */ | 608 | return Qunspecified; /* meaning the default */ |
| 610 | } | 609 | } |
| 611 | 610 | ||
| 612 | typedef int (*term_hook) (); | ||
| 613 | |||
| 614 | void | 611 | void |
| 615 | initialize_w32_display (struct terminal *term) | 612 | initialize_w32_display (struct terminal *term) |
| 616 | { | 613 | { |
| @@ -618,19 +615,19 @@ initialize_w32_display (struct terminal *term) | |||
| 618 | 615 | ||
| 619 | term->rif = 0; /* No window based redisplay on the console. */ | 616 | term->rif = 0; /* No window based redisplay on the console. */ |
| 620 | term->cursor_to_hook = w32con_move_cursor; | 617 | term->cursor_to_hook = w32con_move_cursor; |
| 621 | term->raw_cursor_to_hook = w32con_move_cursor; | 618 | term->raw_cursor_to_hook = w32con_move_cursor; |
| 622 | term->clear_to_end_hook = w32con_clear_to_end; | 619 | term->clear_to_end_hook = w32con_clear_to_end; |
| 623 | term->clear_frame_hook = w32con_clear_frame; | 620 | term->clear_frame_hook = w32con_clear_frame; |
| 624 | term->clear_end_of_line_hook = w32con_clear_end_of_line; | 621 | term->clear_end_of_line_hook = w32con_clear_end_of_line; |
| 625 | term->ins_del_lines_hook = w32con_ins_del_lines; | 622 | term->ins_del_lines_hook = w32con_ins_del_lines; |
| 626 | term->insert_glyphs_hook = w32con_insert_glyphs; | 623 | term->insert_glyphs_hook = w32con_insert_glyphs; |
| 627 | term->write_glyphs_hook = w32con_write_glyphs; | 624 | term->write_glyphs_hook = w32con_write_glyphs; |
| 628 | term->delete_glyphs_hook = w32con_delete_glyphs; | 625 | term->delete_glyphs_hook = w32con_delete_glyphs; |
| 629 | term->ring_bell_hook = w32_sys_ring_bell; | 626 | term->ring_bell_hook = w32_sys_ring_bell; |
| 630 | term->reset_terminal_modes_hook = w32con_reset_terminal_modes; | 627 | term->reset_terminal_modes_hook = w32con_reset_terminal_modes; |
| 631 | term->set_terminal_modes_hook = w32con_set_terminal_modes; | 628 | term->set_terminal_modes_hook = w32con_set_terminal_modes; |
| 632 | term->set_terminal_window_hook = w32con_set_terminal_window; | 629 | term->set_terminal_window_hook = w32con_set_terminal_window; |
| 633 | term->update_begin_hook = w32con_update_begin; | 630 | term->update_begin_hook = w32con_update_begin; |
| 634 | term->update_end_hook = w32con_update_end; | 631 | term->update_end_hook = w32con_update_end; |
| 635 | 632 | ||
| 636 | term->read_socket_hook = w32_console_read_socket; | 633 | term->read_socket_hook = w32_console_read_socket; |
| @@ -775,7 +772,7 @@ DEFUN ("set-cursor-size", Fset_cursor_size, Sset_cursor_size, 1, 1, 0, | |||
| 775 | } | 772 | } |
| 776 | 773 | ||
| 777 | void | 774 | void |
| 778 | syms_of_ntterm () | 775 | syms_of_ntterm (void) |
| 779 | { | 776 | { |
| 780 | DEFVAR_BOOL ("w32-use-full-screen-buffer", | 777 | DEFVAR_BOOL ("w32-use-full-screen-buffer", |
| 781 | &w32_use_full_screen_buffer, | 778 | &w32_use_full_screen_buffer, |
diff --git a/src/w32fns.c b/src/w32fns.c index f371bd36fa5..ddb8e76d7fc 100644 --- a/src/w32fns.c +++ b/src/w32fns.c | |||
| @@ -69,11 +69,11 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 69 | #define FOF_NO_CONNECTED_ELEMENTS 0x2000 | 69 | #define FOF_NO_CONNECTED_ELEMENTS 0x2000 |
| 70 | #endif | 70 | #endif |
| 71 | 71 | ||
| 72 | void syms_of_w32fns (); | 72 | void syms_of_w32fns (void); |
| 73 | void globals_of_w32fns (); | 73 | void globals_of_w32fns (void); |
| 74 | 74 | ||
| 75 | extern void free_frame_menubar (); | 75 | extern void free_frame_menubar (struct frame *); |
| 76 | extern double atof (); | 76 | extern double atof (const char *); |
| 77 | extern int w32_console_toggle_lock_key (int, Lisp_Object); | 77 | extern int w32_console_toggle_lock_key (int, Lisp_Object); |
| 78 | extern void w32_menu_display_help (HWND, HMENU, UINT, UINT); | 78 | extern void w32_menu_display_help (HWND, HMENU, UINT, UINT); |
| 79 | extern void w32_free_menu_strings (HWND); | 79 | extern void w32_free_menu_strings (HWND); |
| @@ -316,7 +316,7 @@ extern HMENU current_popup_menu; | |||
| 316 | static int menubar_in_use = 0; | 316 | static int menubar_in_use = 0; |
| 317 | 317 | ||
| 318 | /* From w32uniscribe.c */ | 318 | /* From w32uniscribe.c */ |
| 319 | extern void syms_of_w32uniscribe (); | 319 | extern void syms_of_w32uniscribe (void); |
| 320 | extern int uniscribe_available; | 320 | extern int uniscribe_available; |
| 321 | 321 | ||
| 322 | /* Function prototypes for hourglass support. */ | 322 | /* Function prototypes for hourglass support. */ |
| @@ -327,7 +327,7 @@ static void w32_hide_hourglass (void); | |||
| 327 | 327 | ||
| 328 | /* Error if we are not connected to MS-Windows. */ | 328 | /* Error if we are not connected to MS-Windows. */ |
| 329 | void | 329 | void |
| 330 | check_w32 () | 330 | check_w32 (void) |
| 331 | { | 331 | { |
| 332 | if (! w32_in_use) | 332 | if (! w32_in_use) |
| 333 | error ("MS-Windows not in use or not initialized"); | 333 | error ("MS-Windows not in use or not initialized"); |
| @@ -337,7 +337,7 @@ check_w32 () | |||
| 337 | You should not call this unless HAVE_MENUS is defined. */ | 337 | You should not call this unless HAVE_MENUS is defined. */ |
| 338 | 338 | ||
| 339 | int | 339 | int |
| 340 | have_menus_p () | 340 | have_menus_p (void) |
| 341 | { | 341 | { |
| 342 | return w32_in_use; | 342 | return w32_in_use; |
| 343 | } | 343 | } |
| @@ -346,8 +346,7 @@ have_menus_p () | |||
| 346 | and checking validity for W32. */ | 346 | and checking validity for W32. */ |
| 347 | 347 | ||
| 348 | FRAME_PTR | 348 | FRAME_PTR |
| 349 | check_x_frame (frame) | 349 | check_x_frame (Lisp_Object frame) |
| 350 | Lisp_Object frame; | ||
| 351 | { | 350 | { |
| 352 | FRAME_PTR f; | 351 | FRAME_PTR f; |
| 353 | 352 | ||
| @@ -365,8 +364,7 @@ check_x_frame (frame) | |||
| 365 | the first display on the list. */ | 364 | the first display on the list. */ |
| 366 | 365 | ||
| 367 | struct w32_display_info * | 366 | struct w32_display_info * |
| 368 | check_x_display_info (frame) | 367 | check_x_display_info (Lisp_Object frame) |
| 369 | Lisp_Object frame; | ||
| 370 | { | 368 | { |
| 371 | if (NILP (frame)) | 369 | if (NILP (frame)) |
| 372 | { | 370 | { |
| @@ -397,9 +395,7 @@ check_x_display_info (frame) | |||
| 397 | /* This function can be called during GC, so use GC_xxx type test macros. */ | 395 | /* This function can be called during GC, so use GC_xxx type test macros. */ |
| 398 | 396 | ||
| 399 | struct frame * | 397 | struct frame * |
| 400 | x_window_to_frame (dpyinfo, wdesc) | 398 | x_window_to_frame (struct w32_display_info *dpyinfo, HWND wdesc) |
| 401 | struct w32_display_info *dpyinfo; | ||
| 402 | HWND wdesc; | ||
| 403 | { | 399 | { |
| 404 | Lisp_Object tail, frame; | 400 | Lisp_Object tail, frame; |
| 405 | struct frame *f; | 401 | struct frame *f; |
| @@ -449,9 +445,7 @@ static void x_edge_detection (struct frame *, struct image *, Lisp_Object, | |||
| 449 | not Emacs's own window. */ | 445 | not Emacs's own window. */ |
| 450 | 446 | ||
| 451 | void | 447 | void |
| 452 | x_real_positions (f, xptr, yptr) | 448 | x_real_positions (FRAME_PTR f, int *xptr, int *yptr) |
| 453 | FRAME_PTR f; | ||
| 454 | int *xptr, *yptr; | ||
| 455 | { | 449 | { |
| 456 | POINT pt; | 450 | POINT pt; |
| 457 | RECT rect; | 451 | RECT rect; |
| @@ -790,8 +784,7 @@ DEFUN ("w32-default-color-map", Fw32_default_color_map, Sw32_default_color_map, | |||
| 790 | } | 784 | } |
| 791 | 785 | ||
| 792 | static Lisp_Object | 786 | static Lisp_Object |
| 793 | w32_to_x_color (rgb) | 787 | w32_to_x_color (Lisp_Object rgb) |
| 794 | Lisp_Object rgb; | ||
| 795 | { | 788 | { |
| 796 | Lisp_Object color; | 789 | Lisp_Object color; |
| 797 | 790 | ||
| @@ -810,8 +803,7 @@ w32_to_x_color (rgb) | |||
| 810 | } | 803 | } |
| 811 | 804 | ||
| 812 | static Lisp_Object | 805 | static Lisp_Object |
| 813 | w32_color_map_lookup (colorname) | 806 | w32_color_map_lookup (char *colorname) |
| 814 | char *colorname; | ||
| 815 | { | 807 | { |
| 816 | Lisp_Object tail, ret = Qnil; | 808 | Lisp_Object tail, ret = Qnil; |
| 817 | 809 | ||
| @@ -843,8 +835,7 @@ w32_color_map_lookup (colorname) | |||
| 843 | 835 | ||
| 844 | 836 | ||
| 845 | static void | 837 | static void |
| 846 | add_system_logical_colors_to_map (system_colors) | 838 | add_system_logical_colors_to_map (Lisp_Object *system_colors) |
| 847 | Lisp_Object *system_colors; | ||
| 848 | { | 839 | { |
| 849 | HKEY colors_key; | 840 | HKEY colors_key; |
| 850 | 841 | ||
| @@ -892,8 +883,7 @@ add_system_logical_colors_to_map (system_colors) | |||
| 892 | 883 | ||
| 893 | 884 | ||
| 894 | static Lisp_Object | 885 | static Lisp_Object |
| 895 | x_to_w32_color (colorname) | 886 | x_to_w32_color (char * colorname) |
| 896 | char * colorname; | ||
| 897 | { | 887 | { |
| 898 | register Lisp_Object ret = Qnil; | 888 | register Lisp_Object ret = Qnil; |
| 899 | 889 | ||
| @@ -1204,9 +1194,7 @@ w32_unmap_color (FRAME_PTR f, COLORREF color) | |||
| 1204 | /* Gamma-correct COLOR on frame F. */ | 1194 | /* Gamma-correct COLOR on frame F. */ |
| 1205 | 1195 | ||
| 1206 | void | 1196 | void |
| 1207 | gamma_correct (f, color) | 1197 | gamma_correct (struct frame *f, COLORREF *color) |
| 1208 | struct frame *f; | ||
| 1209 | COLORREF *color; | ||
| 1210 | { | 1198 | { |
| 1211 | if (f->gamma) | 1199 | if (f->gamma) |
| 1212 | { | 1200 | { |
| @@ -1223,11 +1211,7 @@ gamma_correct (f, color) | |||
| 1223 | If ALLOC is nonzero, allocate a new colormap cell. */ | 1211 | If ALLOC is nonzero, allocate a new colormap cell. */ |
| 1224 | 1212 | ||
| 1225 | int | 1213 | int |
| 1226 | w32_defined_color (f, color, color_def, alloc) | 1214 | w32_defined_color (FRAME_PTR f, char *color, XColor *color_def, int alloc) |
| 1227 | FRAME_PTR f; | ||
| 1228 | char *color; | ||
| 1229 | XColor *color_def; | ||
| 1230 | int alloc; | ||
| 1231 | { | 1215 | { |
| 1232 | register Lisp_Object tem; | 1216 | register Lisp_Object tem; |
| 1233 | COLORREF w32_color_ref; | 1217 | COLORREF w32_color_ref; |
| @@ -1299,10 +1283,7 @@ w32_defined_color (f, color, color_def, alloc) | |||
| 1299 | ARG says. */ | 1283 | ARG says. */ |
| 1300 | 1284 | ||
| 1301 | int | 1285 | int |
| 1302 | x_decode_color (f, arg, def) | 1286 | x_decode_color (FRAME_PTR f, Lisp_Object arg, int def) |
| 1303 | FRAME_PTR f; | ||
| 1304 | Lisp_Object arg; | ||
| 1305 | int def; | ||
| 1306 | { | 1287 | { |
| 1307 | XColor cdef; | 1288 | XColor cdef; |
| 1308 | 1289 | ||
| @@ -1336,9 +1317,7 @@ x_decode_color (f, arg, def) | |||
| 1336 | in the standard place; do not attempt to change the window. */ | 1317 | in the standard place; do not attempt to change the window. */ |
| 1337 | 1318 | ||
| 1338 | void | 1319 | void |
| 1339 | x_set_foreground_color (f, arg, oldval) | 1320 | x_set_foreground_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval) |
| 1340 | struct frame *f; | ||
| 1341 | Lisp_Object arg, oldval; | ||
| 1342 | { | 1321 | { |
| 1343 | struct w32_output *x = f->output_data.w32; | 1322 | struct w32_output *x = f->output_data.w32; |
| 1344 | PIX_TYPE fg, old_fg; | 1323 | PIX_TYPE fg, old_fg; |
| @@ -1359,9 +1338,7 @@ x_set_foreground_color (f, arg, oldval) | |||
| 1359 | } | 1338 | } |
| 1360 | 1339 | ||
| 1361 | void | 1340 | void |
| 1362 | x_set_background_color (f, arg, oldval) | 1341 | x_set_background_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval) |
| 1363 | struct frame *f; | ||
| 1364 | Lisp_Object arg, oldval; | ||
| 1365 | { | 1342 | { |
| 1366 | FRAME_BACKGROUND_PIXEL (f) | 1343 | FRAME_BACKGROUND_PIXEL (f) |
| 1367 | = x_decode_color (f, arg, WHITE_PIX_DEFAULT (f)); | 1344 | = x_decode_color (f, arg, WHITE_PIX_DEFAULT (f)); |
| @@ -1379,9 +1356,7 @@ x_set_background_color (f, arg, oldval) | |||
| 1379 | } | 1356 | } |
| 1380 | 1357 | ||
| 1381 | void | 1358 | void |
| 1382 | x_set_mouse_color (f, arg, oldval) | 1359 | x_set_mouse_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval) |
| 1383 | struct frame *f; | ||
| 1384 | Lisp_Object arg, oldval; | ||
| 1385 | { | 1360 | { |
| 1386 | Cursor cursor, nontext_cursor, mode_cursor, hand_cursor; | 1361 | Cursor cursor, nontext_cursor, mode_cursor, hand_cursor; |
| 1387 | int count; | 1362 | int count; |
| @@ -1528,9 +1503,7 @@ x_set_mouse_color (f, arg, oldval) | |||
| 1528 | } | 1503 | } |
| 1529 | 1504 | ||
| 1530 | void | 1505 | void |
| 1531 | x_set_cursor_color (f, arg, oldval) | 1506 | x_set_cursor_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval) |
| 1532 | struct frame *f; | ||
| 1533 | Lisp_Object arg, oldval; | ||
| 1534 | { | 1507 | { |
| 1535 | unsigned long fore_pixel, pixel; | 1508 | unsigned long fore_pixel, pixel; |
| 1536 | 1509 | ||
| @@ -1577,9 +1550,7 @@ x_set_cursor_color (f, arg, oldval) | |||
| 1577 | F has a window. */ | 1550 | F has a window. */ |
| 1578 | 1551 | ||
| 1579 | void | 1552 | void |
| 1580 | x_set_border_pixel (f, pix) | 1553 | x_set_border_pixel (struct frame *f, int pix) |
| 1581 | struct frame *f; | ||
| 1582 | int pix; | ||
| 1583 | { | 1554 | { |
| 1584 | 1555 | ||
| 1585 | f->output_data.w32->border_pixel = pix; | 1556 | f->output_data.w32->border_pixel = pix; |
| @@ -1598,9 +1569,7 @@ x_set_border_pixel (f, pix) | |||
| 1598 | F has a window; it must be redone when the window is created. */ | 1569 | F has a window; it must be redone when the window is created. */ |
| 1599 | 1570 | ||
| 1600 | void | 1571 | void |
| 1601 | x_set_border_color (f, arg, oldval) | 1572 | x_set_border_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval) |
| 1602 | struct frame *f; | ||
| 1603 | Lisp_Object arg, oldval; | ||
| 1604 | { | 1573 | { |
| 1605 | int pix; | 1574 | int pix; |
| 1606 | 1575 | ||
| @@ -1612,9 +1581,7 @@ x_set_border_color (f, arg, oldval) | |||
| 1612 | 1581 | ||
| 1613 | 1582 | ||
| 1614 | void | 1583 | void |
| 1615 | x_set_cursor_type (f, arg, oldval) | 1584 | x_set_cursor_type (FRAME_PTR f, Lisp_Object arg, Lisp_Object oldval) |
| 1616 | FRAME_PTR f; | ||
| 1617 | Lisp_Object arg, oldval; | ||
| 1618 | { | 1585 | { |
| 1619 | set_frame_cursor_types (f, arg); | 1586 | set_frame_cursor_types (f, arg); |
| 1620 | 1587 | ||
| @@ -1623,9 +1590,7 @@ x_set_cursor_type (f, arg, oldval) | |||
| 1623 | } | 1590 | } |
| 1624 | 1591 | ||
| 1625 | void | 1592 | void |
| 1626 | x_set_icon_type (f, arg, oldval) | 1593 | x_set_icon_type (struct frame *f, Lisp_Object arg, Lisp_Object oldval) |
| 1627 | struct frame *f; | ||
| 1628 | Lisp_Object arg, oldval; | ||
| 1629 | { | 1594 | { |
| 1630 | int result; | 1595 | int result; |
| 1631 | 1596 | ||
| @@ -1652,9 +1617,7 @@ x_set_icon_type (f, arg, oldval) | |||
| 1652 | } | 1617 | } |
| 1653 | 1618 | ||
| 1654 | void | 1619 | void |
| 1655 | x_set_icon_name (f, arg, oldval) | 1620 | x_set_icon_name (struct frame *f, Lisp_Object arg, Lisp_Object oldval) |
| 1656 | struct frame *f; | ||
| 1657 | Lisp_Object arg, oldval; | ||
| 1658 | { | 1621 | { |
| 1659 | if (STRINGP (arg)) | 1622 | if (STRINGP (arg)) |
| 1660 | { | 1623 | { |
| @@ -1702,9 +1665,7 @@ x_set_icon_name (f, arg, oldval) | |||
| 1702 | 1665 | ||
| 1703 | 1666 | ||
| 1704 | void | 1667 | void |
| 1705 | x_set_menu_bar_lines (f, value, oldval) | 1668 | x_set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval) |
| 1706 | struct frame *f; | ||
| 1707 | Lisp_Object value, oldval; | ||
| 1708 | { | 1669 | { |
| 1709 | int nlines; | 1670 | int nlines; |
| 1710 | int olines = FRAME_MENU_BAR_LINES (f); | 1671 | int olines = FRAME_MENU_BAR_LINES (f); |
| @@ -1747,9 +1708,7 @@ x_set_menu_bar_lines (f, value, oldval) | |||
| 1747 | The frame's height doesn't change. */ | 1708 | The frame's height doesn't change. */ |
| 1748 | 1709 | ||
| 1749 | void | 1710 | void |
| 1750 | x_set_tool_bar_lines (f, value, oldval) | 1711 | x_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval) |
| 1751 | struct frame *f; | ||
| 1752 | Lisp_Object value, oldval; | ||
| 1753 | { | 1712 | { |
| 1754 | int delta, nlines, root_height; | 1713 | int delta, nlines, root_height; |
| 1755 | Lisp_Object root_window; | 1714 | Lisp_Object root_window; |
| @@ -1829,10 +1788,7 @@ x_set_tool_bar_lines (f, value, oldval) | |||
| 1829 | F->explicit_name is set, ignore the new name; otherwise, set it. */ | 1788 | F->explicit_name is set, ignore the new name; otherwise, set it. */ |
| 1830 | 1789 | ||
| 1831 | void | 1790 | void |
| 1832 | x_set_name (f, name, explicit) | 1791 | x_set_name (struct frame *f, Lisp_Object name, int explicit) |
| 1833 | struct frame *f; | ||
| 1834 | Lisp_Object name; | ||
| 1835 | int explicit; | ||
| 1836 | { | 1792 | { |
| 1837 | /* Make sure that requests from lisp code override requests from | 1793 | /* Make sure that requests from lisp code override requests from |
| 1838 | Emacs redisplay code. */ | 1794 | Emacs redisplay code. */ |
| @@ -1887,9 +1843,7 @@ x_set_name (f, name, explicit) | |||
| 1887 | specified a name for the frame; the name will override any set by the | 1843 | specified a name for the frame; the name will override any set by the |
| 1888 | redisplay code. */ | 1844 | redisplay code. */ |
| 1889 | void | 1845 | void |
| 1890 | x_explicitly_set_name (f, arg, oldval) | 1846 | x_explicitly_set_name (FRAME_PTR f, Lisp_Object arg, Lisp_Object oldval) |
| 1891 | FRAME_PTR f; | ||
| 1892 | Lisp_Object arg, oldval; | ||
| 1893 | { | 1847 | { |
| 1894 | x_set_name (f, arg, 1); | 1848 | x_set_name (f, arg, 1); |
| 1895 | } | 1849 | } |
| @@ -1898,9 +1852,7 @@ x_explicitly_set_name (f, arg, oldval) | |||
| 1898 | name; names set this way will never override names set by the user's | 1852 | name; names set this way will never override names set by the user's |
| 1899 | lisp code. */ | 1853 | lisp code. */ |
| 1900 | void | 1854 | void |
| 1901 | x_implicitly_set_name (f, arg, oldval) | 1855 | x_implicitly_set_name (FRAME_PTR f, Lisp_Object arg, Lisp_Object oldval) |
| 1902 | FRAME_PTR f; | ||
| 1903 | Lisp_Object arg, oldval; | ||
| 1904 | { | 1856 | { |
| 1905 | x_set_name (f, arg, 0); | 1857 | x_set_name (f, arg, 0); |
| 1906 | } | 1858 | } |
| @@ -1909,9 +1861,7 @@ x_implicitly_set_name (f, arg, oldval) | |||
| 1909 | If NAME is nil, use the frame name as the title. */ | 1861 | If NAME is nil, use the frame name as the title. */ |
| 1910 | 1862 | ||
| 1911 | void | 1863 | void |
| 1912 | x_set_title (f, name, old_name) | 1864 | x_set_title (struct frame *f, Lisp_Object name, Lisp_Object old_name) |
| 1913 | struct frame *f; | ||
| 1914 | Lisp_Object name, old_name; | ||
| 1915 | { | 1865 | { |
| 1916 | /* Don't change the title if it's already NAME. */ | 1866 | /* Don't change the title if it's already NAME. */ |
| 1917 | if (EQ (name, f->title)) | 1867 | if (EQ (name, f->title)) |
| @@ -1936,8 +1886,8 @@ x_set_title (f, name, old_name) | |||
| 1936 | } | 1886 | } |
| 1937 | 1887 | ||
| 1938 | 1888 | ||
| 1939 | void x_set_scroll_bar_default_width (f) | 1889 | void |
| 1940 | struct frame *f; | 1890 | x_set_scroll_bar_default_width (struct frame *f) |
| 1941 | { | 1891 | { |
| 1942 | int wid = FRAME_COLUMN_WIDTH (f); | 1892 | int wid = FRAME_COLUMN_WIDTH (f); |
| 1943 | 1893 | ||
| @@ -1965,11 +1915,10 @@ w32_load_cursor (LPCTSTR name) | |||
| 1965 | return cursor; | 1915 | return cursor; |
| 1966 | } | 1916 | } |
| 1967 | 1917 | ||
| 1968 | extern LRESULT CALLBACK w32_wnd_proc (); | 1918 | extern LRESULT CALLBACK w32_wnd_proc (HWND, UINT, WPARAM, LPARAM); |
| 1969 | 1919 | ||
| 1970 | static BOOL | 1920 | static BOOL |
| 1971 | w32_init_class (hinst) | 1921 | w32_init_class (HINSTANCE hinst) |
| 1972 | HINSTANCE hinst; | ||
| 1973 | { | 1922 | { |
| 1974 | WNDCLASS wc; | 1923 | WNDCLASS wc; |
| 1975 | 1924 | ||
| @@ -1988,9 +1937,7 @@ w32_init_class (hinst) | |||
| 1988 | } | 1937 | } |
| 1989 | 1938 | ||
| 1990 | static HWND | 1939 | static HWND |
| 1991 | w32_createscrollbar (f, bar) | 1940 | w32_createscrollbar (struct frame *f, struct scroll_bar * bar) |
| 1992 | struct frame *f; | ||
| 1993 | struct scroll_bar * bar; | ||
| 1994 | { | 1941 | { |
| 1995 | return (CreateWindow ("SCROLLBAR", "", SBS_VERT | WS_CHILD | WS_VISIBLE, | 1942 | return (CreateWindow ("SCROLLBAR", "", SBS_VERT | WS_CHILD | WS_VISIBLE, |
| 1996 | /* Position and size of scroll bar. */ | 1943 | /* Position and size of scroll bar. */ |
| @@ -2005,8 +1952,7 @@ w32_createscrollbar (f, bar) | |||
| 2005 | } | 1952 | } |
| 2006 | 1953 | ||
| 2007 | static void | 1954 | static void |
| 2008 | w32_createwindow (f) | 1955 | w32_createwindow (struct frame *f) |
| 2009 | struct frame *f; | ||
| 2010 | { | 1956 | { |
| 2011 | HWND hwnd; | 1957 | HWND hwnd; |
| 2012 | RECT rect; | 1958 | RECT rect; |
| @@ -2076,12 +2022,7 @@ w32_createwindow (f) | |||
| 2076 | } | 2022 | } |
| 2077 | 2023 | ||
| 2078 | static void | 2024 | static void |
| 2079 | my_post_msg (wmsg, hwnd, msg, wParam, lParam) | 2025 | my_post_msg (W32Msg * wmsg, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) |
| 2080 | W32Msg * wmsg; | ||
| 2081 | HWND hwnd; | ||
| 2082 | UINT msg; | ||
| 2083 | WPARAM wParam; | ||
| 2084 | LPARAM lParam; | ||
| 2085 | { | 2026 | { |
| 2086 | wmsg->msg.hwnd = hwnd; | 2027 | wmsg->msg.hwnd = hwnd; |
| 2087 | wmsg->msg.message = msg; | 2028 | wmsg->msg.message = msg; |
| @@ -2175,7 +2116,7 @@ record_keyup (unsigned int wparam, unsigned int lparam) | |||
| 2175 | it regains focus, be conservative and clear all modifiers since | 2116 | it regains focus, be conservative and clear all modifiers since |
| 2176 | we cannot reconstruct the left and right modifier state. */ | 2117 | we cannot reconstruct the left and right modifier state. */ |
| 2177 | static void | 2118 | static void |
| 2178 | reset_modifiers () | 2119 | reset_modifiers (void) |
| 2179 | { | 2120 | { |
| 2180 | SHORT ctrl, alt; | 2121 | SHORT ctrl, alt; |
| 2181 | 2122 | ||
| @@ -2222,7 +2163,7 @@ reset_modifiers () | |||
| 2222 | modifier keys, we know that, if no modifiers are set, then neither | 2163 | modifier keys, we know that, if no modifiers are set, then neither |
| 2223 | the left or right modifier should be set. */ | 2164 | the left or right modifier should be set. */ |
| 2224 | static void | 2165 | static void |
| 2225 | sync_modifiers () | 2166 | sync_modifiers (void) |
| 2226 | { | 2167 | { |
| 2227 | if (!modifiers_recorded) | 2168 | if (!modifiers_recorded) |
| 2228 | return; | 2169 | return; |
| @@ -2308,7 +2249,7 @@ w32_key_to_modifier (int key) | |||
| 2308 | } | 2249 | } |
| 2309 | 2250 | ||
| 2310 | static unsigned int | 2251 | static unsigned int |
| 2311 | w32_get_modifiers () | 2252 | w32_get_modifiers (void) |
| 2312 | { | 2253 | { |
| 2313 | return ((modifier_set (VK_SHIFT) ? shift_modifier : 0) | | 2254 | return ((modifier_set (VK_SHIFT) ? shift_modifier : 0) | |
| 2314 | (modifier_set (VK_CONTROL) ? ctrl_modifier : 0) | | 2255 | (modifier_set (VK_CONTROL) ? ctrl_modifier : 0) | |
| @@ -2325,7 +2266,7 @@ w32_get_modifiers () | |||
| 2325 | and window input. */ | 2266 | and window input. */ |
| 2326 | 2267 | ||
| 2327 | static int | 2268 | static int |
| 2328 | construct_console_modifiers () | 2269 | construct_console_modifiers (void) |
| 2329 | { | 2270 | { |
| 2330 | int mods; | 2271 | int mods; |
| 2331 | 2272 | ||
| @@ -2397,8 +2338,7 @@ static Lisp_Object w32_grabbed_keys; | |||
| 2397 | combinations like Alt-Tab which are used by the system. */ | 2338 | combinations like Alt-Tab which are used by the system. */ |
| 2398 | 2339 | ||
| 2399 | static void | 2340 | static void |
| 2400 | register_hot_keys (hwnd) | 2341 | register_hot_keys (HWND hwnd) |
| 2401 | HWND hwnd; | ||
| 2402 | { | 2342 | { |
| 2403 | Lisp_Object keylist; | 2343 | Lisp_Object keylist; |
| 2404 | 2344 | ||
| @@ -2417,8 +2357,7 @@ register_hot_keys (hwnd) | |||
| 2417 | } | 2357 | } |
| 2418 | 2358 | ||
| 2419 | static void | 2359 | static void |
| 2420 | unregister_hot_keys (hwnd) | 2360 | unregister_hot_keys (HWND hwnd) |
| 2421 | HWND hwnd; | ||
| 2422 | { | 2361 | { |
| 2423 | Lisp_Object keylist; | 2362 | Lisp_Object keylist; |
| 2424 | 2363 | ||
| @@ -2624,7 +2563,7 @@ complete_deferred_msg (HWND hwnd, UINT msg, LRESULT result) | |||
| 2624 | } | 2563 | } |
| 2625 | 2564 | ||
| 2626 | static void | 2565 | static void |
| 2627 | cancel_all_deferred_msgs () | 2566 | cancel_all_deferred_msgs (void) |
| 2628 | { | 2567 | { |
| 2629 | deferred_msg * item; | 2568 | deferred_msg * item; |
| 2630 | 2569 | ||
| @@ -2669,7 +2608,7 @@ w32_msg_worker (void *arg) | |||
| 2669 | } | 2608 | } |
| 2670 | 2609 | ||
| 2671 | static void | 2610 | static void |
| 2672 | signal_user_input () | 2611 | signal_user_input (void) |
| 2673 | { | 2612 | { |
| 2674 | /* Interrupt any lisp that wants to be interrupted by input. */ | 2613 | /* Interrupt any lisp that wants to be interrupted by input. */ |
| 2675 | if (!NILP (Vthrow_on_input)) | 2614 | if (!NILP (Vthrow_on_input)) |
| @@ -2687,13 +2626,9 @@ signal_user_input () | |||
| 2687 | 2626 | ||
| 2688 | 2627 | ||
| 2689 | static void | 2628 | static void |
| 2690 | post_character_message (hwnd, msg, wParam, lParam, modifiers) | 2629 | post_character_message (HWND hwnd, UINT msg, |
| 2691 | HWND hwnd; | 2630 | WPARAM wParam, LPARAM lParam, |
| 2692 | UINT msg; | 2631 | DWORD modifiers) |
| 2693 | WPARAM wParam; | ||
| 2694 | LPARAM lParam; | ||
| 2695 | DWORD modifiers; | ||
| 2696 | |||
| 2697 | { | 2632 | { |
| 2698 | W32Msg wmsg; | 2633 | W32Msg wmsg; |
| 2699 | 2634 | ||
| @@ -2753,11 +2688,7 @@ post_character_message (hwnd, msg, wParam, lParam, modifiers) | |||
| 2753 | /* Main window procedure */ | 2688 | /* Main window procedure */ |
| 2754 | 2689 | ||
| 2755 | LRESULT CALLBACK | 2690 | LRESULT CALLBACK |
| 2756 | w32_wnd_proc (hwnd, msg, wParam, lParam) | 2691 | w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) |
| 2757 | HWND hwnd; | ||
| 2758 | UINT msg; | ||
| 2759 | WPARAM wParam; | ||
| 2760 | LPARAM lParam; | ||
| 2761 | { | 2692 | { |
| 2762 | struct frame *f; | 2693 | struct frame *f; |
| 2763 | struct w32_display_info *dpyinfo = &one_w32_display_info; | 2694 | struct w32_display_info *dpyinfo = &one_w32_display_info; |
| @@ -4007,8 +3938,7 @@ w32_wnd_proc (hwnd, msg, wParam, lParam) | |||
| 4007 | } | 3938 | } |
| 4008 | 3939 | ||
| 4009 | static void | 3940 | static void |
| 4010 | my_create_window (f) | 3941 | my_create_window (struct frame * f) |
| 4011 | struct frame * f; | ||
| 4012 | { | 3942 | { |
| 4013 | MSG msg; | 3943 | MSG msg; |
| 4014 | 3944 | ||
| @@ -4023,8 +3953,7 @@ my_create_window (f) | |||
| 4023 | messages for the tooltip. Creating tooltips indirectly also creates | 3953 | messages for the tooltip. Creating tooltips indirectly also creates |
| 4024 | deadlocks when tooltips are created for menu items. */ | 3954 | deadlocks when tooltips are created for menu items. */ |
| 4025 | static void | 3955 | static void |
| 4026 | my_create_tip_window (f) | 3956 | my_create_tip_window (struct frame *f) |
| 4027 | struct frame *f; | ||
| 4028 | { | 3957 | { |
| 4029 | RECT rect; | 3958 | RECT rect; |
| 4030 | 3959 | ||
| @@ -4067,10 +3996,7 @@ my_create_tip_window (f) | |||
| 4067 | /* Create and set up the w32 window for frame F. */ | 3996 | /* Create and set up the w32 window for frame F. */ |
| 4068 | 3997 | ||
| 4069 | static void | 3998 | static void |
| 4070 | w32_window (f, window_prompting, minibuffer_only) | 3999 | w32_window (struct frame *f, long window_prompting, int minibuffer_only) |
| 4071 | struct frame *f; | ||
| 4072 | long window_prompting; | ||
| 4073 | int minibuffer_only; | ||
| 4074 | { | 4000 | { |
| 4075 | BLOCK_INPUT; | 4001 | BLOCK_INPUT; |
| 4076 | 4002 | ||
| @@ -4118,9 +4044,7 @@ w32_window (f, window_prompting, minibuffer_only) | |||
| 4118 | well. */ | 4044 | well. */ |
| 4119 | 4045 | ||
| 4120 | static void | 4046 | static void |
| 4121 | x_icon (f, parms) | 4047 | x_icon (struct frame *f, Lisp_Object parms) |
| 4122 | struct frame *f; | ||
| 4123 | Lisp_Object parms; | ||
| 4124 | { | 4048 | { |
| 4125 | Lisp_Object icon_x, icon_y; | 4049 | Lisp_Object icon_x, icon_y; |
| 4126 | struct w32_display_info *dpyinfo = &one_w32_display_info; | 4050 | struct w32_display_info *dpyinfo = &one_w32_display_info; |
| @@ -4159,8 +4083,7 @@ x_icon (f, parms) | |||
| 4159 | 4083 | ||
| 4160 | 4084 | ||
| 4161 | static void | 4085 | static void |
| 4162 | x_make_gc (f) | 4086 | x_make_gc (struct frame *f) |
| 4163 | struct frame *f; | ||
| 4164 | { | 4087 | { |
| 4165 | XGCValues gc_values; | 4088 | XGCValues gc_values; |
| 4166 | 4089 | ||
| @@ -4193,8 +4116,7 @@ x_make_gc (f) | |||
| 4193 | constructed. */ | 4116 | constructed. */ |
| 4194 | 4117 | ||
| 4195 | static Lisp_Object | 4118 | static Lisp_Object |
| 4196 | unwind_create_frame (frame) | 4119 | unwind_create_frame (Lisp_Object frame) |
| 4197 | Lisp_Object frame; | ||
| 4198 | { | 4120 | { |
| 4199 | struct frame *f = XFRAME (frame); | 4121 | struct frame *f = XFRAME (frame); |
| 4200 | 4122 | ||
| @@ -4219,9 +4141,7 @@ unwind_create_frame (frame) | |||
| 4219 | } | 4141 | } |
| 4220 | 4142 | ||
| 4221 | static void | 4143 | static void |
| 4222 | x_default_font_parameter (f, parms) | 4144 | x_default_font_parameter (struct frame *f, Lisp_Object parms) |
| 4223 | struct frame *f; | ||
| 4224 | Lisp_Object parms; | ||
| 4225 | { | 4145 | { |
| 4226 | struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (f); | 4146 | struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (f); |
| 4227 | Lisp_Object font_param = x_get_arg (dpyinfo, parms, Qfont, NULL, NULL, | 4147 | Lisp_Object font_param = x_get_arg (dpyinfo, parms, Qfont, NULL, NULL, |
| @@ -4587,8 +4507,7 @@ This function is an internal primitive--use `make-frame' instead. */) | |||
| 4587 | display info directly because we're called from frame.c, which doesn't | 4507 | display info directly because we're called from frame.c, which doesn't |
| 4588 | know about that structure. */ | 4508 | know about that structure. */ |
| 4589 | Lisp_Object | 4509 | Lisp_Object |
| 4590 | x_get_focus_frame (frame) | 4510 | x_get_focus_frame (struct frame *frame) |
| 4591 | struct frame *frame; | ||
| 4592 | { | 4511 | { |
| 4593 | struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (frame); | 4512 | struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (frame); |
| 4594 | Lisp_Object xfocus; | 4513 | Lisp_Object xfocus; |
| @@ -4899,36 +4818,31 @@ If omitted or nil, that stands for the selected frame's display. */) | |||
| 4899 | } | 4818 | } |
| 4900 | 4819 | ||
| 4901 | int | 4820 | int |
| 4902 | x_pixel_width (f) | 4821 | x_pixel_width (register struct frame *f) |
| 4903 | register struct frame *f; | ||
| 4904 | { | 4822 | { |
| 4905 | return FRAME_PIXEL_WIDTH (f); | 4823 | return FRAME_PIXEL_WIDTH (f); |
| 4906 | } | 4824 | } |
| 4907 | 4825 | ||
| 4908 | int | 4826 | int |
| 4909 | x_pixel_height (f) | 4827 | x_pixel_height (register struct frame *f) |
| 4910 | register struct frame *f; | ||
| 4911 | { | 4828 | { |
| 4912 | return FRAME_PIXEL_HEIGHT (f); | 4829 | return FRAME_PIXEL_HEIGHT (f); |
| 4913 | } | 4830 | } |
| 4914 | 4831 | ||
| 4915 | int | 4832 | int |
| 4916 | x_char_width (f) | 4833 | x_char_width (register struct frame *f) |
| 4917 | register struct frame *f; | ||
| 4918 | { | 4834 | { |
| 4919 | return FRAME_COLUMN_WIDTH (f); | 4835 | return FRAME_COLUMN_WIDTH (f); |
| 4920 | } | 4836 | } |
| 4921 | 4837 | ||
| 4922 | int | 4838 | int |
| 4923 | x_char_height (f) | 4839 | x_char_height (register struct frame *f) |
| 4924 | register struct frame *f; | ||
| 4925 | { | 4840 | { |
| 4926 | return FRAME_LINE_HEIGHT (f); | 4841 | return FRAME_LINE_HEIGHT (f); |
| 4927 | } | 4842 | } |
| 4928 | 4843 | ||
| 4929 | int | 4844 | int |
| 4930 | x_screen_planes (f) | 4845 | x_screen_planes (register struct frame *f) |
| 4931 | register struct frame *f; | ||
| 4932 | { | 4846 | { |
| 4933 | return FRAME_W32_DISPLAY_INFO (f)->n_planes; | 4847 | return FRAME_W32_DISPLAY_INFO (f)->n_planes; |
| 4934 | } | 4848 | } |
| @@ -4937,8 +4851,7 @@ x_screen_planes (f) | |||
| 4937 | Open a new connection if necessary. */ | 4851 | Open a new connection if necessary. */ |
| 4938 | 4852 | ||
| 4939 | struct w32_display_info * | 4853 | struct w32_display_info * |
| 4940 | x_display_info_for_name (name) | 4854 | x_display_info_for_name (Lisp_Object name) |
| 4941 | Lisp_Object name; | ||
| 4942 | { | 4855 | { |
| 4943 | Lisp_Object names; | 4856 | Lisp_Object names; |
| 4944 | struct w32_display_info *dpyinfo; | 4857 | struct w32_display_info *dpyinfo; |
| @@ -5253,7 +5166,7 @@ extern Lisp_Object Vhourglass_delay; | |||
| 5253 | xdisp.c could be used. */ | 5166 | xdisp.c could be used. */ |
| 5254 | 5167 | ||
| 5255 | int | 5168 | int |
| 5256 | hourglass_started () | 5169 | hourglass_started (void) |
| 5257 | { | 5170 | { |
| 5258 | return hourglass_shown_p || hourglass_timer; | 5171 | return hourglass_shown_p || hourglass_timer; |
| 5259 | } | 5172 | } |
| @@ -5261,7 +5174,7 @@ hourglass_started () | |||
| 5261 | /* Cancel a currently active hourglass timer, and start a new one. */ | 5174 | /* Cancel a currently active hourglass timer, and start a new one. */ |
| 5262 | 5175 | ||
| 5263 | void | 5176 | void |
| 5264 | start_hourglass () | 5177 | start_hourglass (void) |
| 5265 | { | 5178 | { |
| 5266 | DWORD delay; | 5179 | DWORD delay; |
| 5267 | int secs, msecs = 0; | 5180 | int secs, msecs = 0; |
| @@ -5297,7 +5210,7 @@ start_hourglass () | |||
| 5297 | cursor if shown. */ | 5210 | cursor if shown. */ |
| 5298 | 5211 | ||
| 5299 | void | 5212 | void |
| 5300 | cancel_hourglass () | 5213 | cancel_hourglass (void) |
| 5301 | { | 5214 | { |
| 5302 | if (hourglass_timer) | 5215 | if (hourglass_timer) |
| 5303 | { | 5216 | { |
| @@ -5316,8 +5229,7 @@ cancel_hourglass () | |||
| 5316 | to indicate that an hourglass cursor is shown. */ | 5229 | to indicate that an hourglass cursor is shown. */ |
| 5317 | 5230 | ||
| 5318 | static void | 5231 | static void |
| 5319 | w32_show_hourglass (f) | 5232 | w32_show_hourglass (struct frame *f) |
| 5320 | struct frame *f; | ||
| 5321 | { | 5233 | { |
| 5322 | if (!hourglass_shown_p) | 5234 | if (!hourglass_shown_p) |
| 5323 | { | 5235 | { |
| @@ -5332,7 +5244,7 @@ w32_show_hourglass (f) | |||
| 5332 | /* Hide the hourglass cursor on all frames, if it is currently shown. */ | 5244 | /* Hide the hourglass cursor on all frames, if it is currently shown. */ |
| 5333 | 5245 | ||
| 5334 | static void | 5246 | static void |
| 5335 | w32_hide_hourglass () | 5247 | w32_hide_hourglass (void) |
| 5336 | { | 5248 | { |
| 5337 | if (hourglass_shown_p) | 5249 | if (hourglass_shown_p) |
| 5338 | { | 5250 | { |
| @@ -5386,8 +5298,7 @@ Lisp_Object Vx_max_tooltip_size; | |||
| 5386 | 5298 | ||
| 5387 | 5299 | ||
| 5388 | static Lisp_Object | 5300 | static Lisp_Object |
| 5389 | unwind_create_tip_frame (frame) | 5301 | unwind_create_tip_frame (Lisp_Object frame) |
| 5390 | Lisp_Object frame; | ||
| 5391 | { | 5302 | { |
| 5392 | Lisp_Object deleted; | 5303 | Lisp_Object deleted; |
| 5393 | 5304 | ||
| @@ -5412,9 +5323,8 @@ unwind_create_tip_frame (frame) | |||
| 5412 | when this happens. */ | 5323 | when this happens. */ |
| 5413 | 5324 | ||
| 5414 | static Lisp_Object | 5325 | static Lisp_Object |
| 5415 | x_create_tip_frame (dpyinfo, parms, text) | 5326 | x_create_tip_frame (struct w32_display_info *dpyinfo, |
| 5416 | struct w32_display_info *dpyinfo; | 5327 | Lisp_Object parms, Lisp_Object text) |
| 5417 | Lisp_Object parms, text; | ||
| 5418 | { | 5328 | { |
| 5419 | struct frame *f; | 5329 | struct frame *f; |
| 5420 | Lisp_Object frame, tem; | 5330 | Lisp_Object frame, tem; |
| @@ -5654,11 +5564,9 @@ x_create_tip_frame (dpyinfo, parms, text) | |||
| 5654 | the display in *ROOT_X, and *ROOT_Y. */ | 5564 | the display in *ROOT_X, and *ROOT_Y. */ |
| 5655 | 5565 | ||
| 5656 | static void | 5566 | static void |
| 5657 | compute_tip_xy (f, parms, dx, dy, width, height, root_x, root_y) | 5567 | compute_tip_xy (struct frame *f, |
| 5658 | struct frame *f; | 5568 | Lisp_Object parms, Lisp_Object dx, Lisp_Object dy, |
| 5659 | Lisp_Object parms, dx, dy; | 5569 | int width, int height, int *root_x, int *root_y) |
| 5660 | int width, height; | ||
| 5661 | int *root_x, *root_y; | ||
| 5662 | { | 5570 | { |
| 5663 | Lisp_Object left, top; | 5571 | Lisp_Object left, top; |
| 5664 | int min_x, min_y, max_x, max_y; | 5572 | int min_x, min_y, max_x, max_y; |
| @@ -6037,11 +5945,7 @@ extern Lisp_Object Qfile_name_history; | |||
| 6037 | allows us to work around the fact that the standard Open File | 5945 | allows us to work around the fact that the standard Open File |
| 6038 | dialog does not support directories. */ | 5946 | dialog does not support directories. */ |
| 6039 | UINT CALLBACK | 5947 | UINT CALLBACK |
| 6040 | file_dialog_callback (hwnd, msg, wParam, lParam) | 5948 | file_dialog_callback (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) |
| 6041 | HWND hwnd; | ||
| 6042 | UINT msg; | ||
| 6043 | WPARAM wParam; | ||
| 6044 | LPARAM lParam; | ||
| 6045 | { | 5949 | { |
| 6046 | if (msg == WM_NOTIFY) | 5950 | if (msg == WM_NOTIFY) |
| 6047 | { | 5951 | { |
| @@ -6395,8 +6299,7 @@ lookup_vk_code (char *key) | |||
| 6395 | /* Convert a one-element vector style key sequence to a hot key | 6299 | /* Convert a one-element vector style key sequence to a hot key |
| 6396 | definition. */ | 6300 | definition. */ |
| 6397 | static Lisp_Object | 6301 | static Lisp_Object |
| 6398 | w32_parse_hot_key (key) | 6302 | w32_parse_hot_key (Lisp_Object key) |
| 6399 | Lisp_Object key; | ||
| 6400 | { | 6303 | { |
| 6401 | /* Copied from Fdefine_key and store_in_keymap. */ | 6304 | /* Copied from Fdefine_key and store_in_keymap. */ |
| 6402 | register Lisp_Object c; | 6305 | register Lisp_Object c; |
| @@ -6625,7 +6528,7 @@ DEFUN ("w32-window-exists-p", Fw32_window_exists_p, Sw32_window_exists_p, | |||
| 6625 | 6528 | ||
| 6626 | This is a direct interface to the Windows API FindWindow function. */) | 6529 | This is a direct interface to the Windows API FindWindow function. */) |
| 6627 | (class, name) | 6530 | (class, name) |
| 6628 | Lisp_Object class, name; | 6531 | Lisp_Object class, name; |
| 6629 | { | 6532 | { |
| 6630 | HWND hnd; | 6533 | HWND hnd; |
| 6631 | 6534 | ||
| @@ -6963,7 +6866,7 @@ frame_parm_handler w32_frame_parm_handlers[] = | |||
| 6963 | }; | 6866 | }; |
| 6964 | 6867 | ||
| 6965 | void | 6868 | void |
| 6966 | syms_of_w32fns () | 6869 | syms_of_w32fns (void) |
| 6967 | { | 6870 | { |
| 6968 | globals_of_w32fns (); | 6871 | globals_of_w32fns (); |
| 6969 | /* This is zero if not using MS-Windows. */ | 6872 | /* This is zero if not using MS-Windows. */ |
| @@ -7320,7 +7223,7 @@ only be necessary if the default setting causes problems. */); | |||
| 7320 | is non zero. | 7223 | is non zero. |
| 7321 | */ | 7224 | */ |
| 7322 | void | 7225 | void |
| 7323 | globals_of_w32fns () | 7226 | globals_of_w32fns (void) |
| 7324 | { | 7227 | { |
| 7325 | HMODULE user32_lib = GetModuleHandle ("user32.dll"); | 7228 | HMODULE user32_lib = GetModuleHandle ("user32.dll"); |
| 7326 | /* | 7229 | /* |
| @@ -7363,7 +7266,7 @@ globals_of_w32fns () | |||
| 7363 | #undef abort | 7266 | #undef abort |
| 7364 | 7267 | ||
| 7365 | void | 7268 | void |
| 7366 | w32_abort () | 7269 | w32_abort (void) |
| 7367 | { | 7270 | { |
| 7368 | int button; | 7271 | int button; |
| 7369 | button = MessageBox (NULL, | 7272 | button = MessageBox (NULL, |
| @@ -7391,7 +7294,7 @@ w32_abort () | |||
| 7391 | 7294 | ||
| 7392 | /* For convenience when debugging. */ | 7295 | /* For convenience when debugging. */ |
| 7393 | int | 7296 | int |
| 7394 | w32_last_error () | 7297 | w32_last_error (void) |
| 7395 | { | 7298 | { |
| 7396 | return GetLastError (); | 7299 | return GetLastError (); |
| 7397 | } | 7300 | } |
diff --git a/src/w32font.c b/src/w32font.c index ab56eb9e4d2..d86fb3b792c 100644 --- a/src/w32font.c +++ b/src/w32font.c | |||
| @@ -153,8 +153,7 @@ static void list_all_matching_fonts (struct font_callback_data *); | |||
| 153 | 153 | ||
| 154 | 154 | ||
| 155 | static int | 155 | static int |
| 156 | memq_no_quit (elt, list) | 156 | memq_no_quit (Lisp_Object elt, Lisp_Object list) |
| 157 | Lisp_Object elt, list; | ||
| 158 | { | 157 | { |
| 159 | while (CONSP (list) && ! EQ (XCAR (list), elt)) | 158 | while (CONSP (list) && ! EQ (XCAR (list), elt)) |
| 160 | list = XCDR (list); | 159 | list = XCDR (list); |
| @@ -162,8 +161,7 @@ memq_no_quit (elt, list) | |||
| 162 | } | 161 | } |
| 163 | 162 | ||
| 164 | Lisp_Object | 163 | Lisp_Object |
| 165 | intern_font_name (string) | 164 | intern_font_name (char * string) |
| 166 | char * string; | ||
| 167 | { | 165 | { |
| 168 | Lisp_Object obarray, tem, str; | 166 | Lisp_Object obarray, tem, str; |
| 169 | int len; | 167 | int len; |
| @@ -185,8 +183,7 @@ intern_font_name (string) | |||
| 185 | Return a cache of font-entities on FRAME. The cache must be a | 183 | Return a cache of font-entities on FRAME. The cache must be a |
| 186 | cons whose cdr part is the actual cache area. */ | 184 | cons whose cdr part is the actual cache area. */ |
| 187 | Lisp_Object | 185 | Lisp_Object |
| 188 | w32font_get_cache (f) | 186 | w32font_get_cache (FRAME_PTR f) |
| 189 | FRAME_PTR f; | ||
| 190 | { | 187 | { |
| 191 | struct w32_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); | 188 | struct w32_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); |
| 192 | 189 | ||
| @@ -198,8 +195,7 @@ w32font_get_cache (f) | |||
| 198 | is a vector of font-entities. This is the sole API that | 195 | is a vector of font-entities. This is the sole API that |
| 199 | allocates font-entities. */ | 196 | allocates font-entities. */ |
| 200 | static Lisp_Object | 197 | static Lisp_Object |
| 201 | w32font_list (frame, font_spec) | 198 | w32font_list (Lisp_Object frame, Lisp_Object font_spec) |
| 202 | Lisp_Object frame, font_spec; | ||
| 203 | { | 199 | { |
| 204 | Lisp_Object fonts = w32font_list_internal (frame, font_spec, 0); | 200 | Lisp_Object fonts = w32font_list_internal (frame, font_spec, 0); |
| 205 | FONT_ADD_LOG ("w32font-list", font_spec, fonts); | 201 | FONT_ADD_LOG ("w32font-list", font_spec, fonts); |
| @@ -211,8 +207,7 @@ w32font_list (frame, font_spec) | |||
| 211 | FRAME. The closeness is detemined by the font backend, thus | 207 | FRAME. The closeness is detemined by the font backend, thus |
| 212 | `face-font-selection-order' is ignored here. */ | 208 | `face-font-selection-order' is ignored here. */ |
| 213 | static Lisp_Object | 209 | static Lisp_Object |
| 214 | w32font_match (frame, font_spec) | 210 | w32font_match (Lisp_Object frame, Lisp_Object font_spec) |
| 215 | Lisp_Object frame, font_spec; | ||
| 216 | { | 211 | { |
| 217 | Lisp_Object entity = w32font_match_internal (frame, font_spec, 0); | 212 | Lisp_Object entity = w32font_match_internal (frame, font_spec, 0); |
| 218 | FONT_ADD_LOG ("w32font-match", font_spec, entity); | 213 | FONT_ADD_LOG ("w32font-match", font_spec, entity); |
| @@ -223,8 +218,7 @@ w32font_match (frame, font_spec) | |||
| 223 | List available families. The value is a list of family names | 218 | List available families. The value is a list of family names |
| 224 | (symbols). */ | 219 | (symbols). */ |
| 225 | static Lisp_Object | 220 | static Lisp_Object |
| 226 | w32font_list_family (frame) | 221 | w32font_list_family (Lisp_Object frame) |
| 227 | Lisp_Object frame; | ||
| 228 | { | 222 | { |
| 229 | Lisp_Object list = Qnil; | 223 | Lisp_Object list = Qnil; |
| 230 | LOGFONT font_match_pattern; | 224 | LOGFONT font_match_pattern; |
| @@ -248,10 +242,7 @@ w32font_list_family (frame) | |||
| 248 | Open a font specified by FONT_ENTITY on frame F. | 242 | Open a font specified by FONT_ENTITY on frame F. |
| 249 | If the font is scalable, open it with PIXEL_SIZE. */ | 243 | If the font is scalable, open it with PIXEL_SIZE. */ |
| 250 | static Lisp_Object | 244 | static Lisp_Object |
| 251 | w32font_open (f, font_entity, pixel_size) | 245 | w32font_open (FRAME_PTR f, Lisp_Object font_entity, int pixel_size) |
| 252 | FRAME_PTR f; | ||
| 253 | Lisp_Object font_entity; | ||
| 254 | int pixel_size; | ||
| 255 | { | 246 | { |
| 256 | Lisp_Object font_object | 247 | Lisp_Object font_object |
| 257 | = font_make_object (VECSIZE (struct w32font_info), | 248 | = font_make_object (VECSIZE (struct w32font_info), |
| @@ -275,9 +266,7 @@ w32font_open (f, font_entity, pixel_size) | |||
| 275 | /* w32 implementation of close for font_backend. | 266 | /* w32 implementation of close for font_backend. |
| 276 | Close FONT on frame F. */ | 267 | Close FONT on frame F. */ |
| 277 | void | 268 | void |
| 278 | w32font_close (f, font) | 269 | w32font_close (FRAME_PTR f, struct font *font) |
| 279 | FRAME_PTR f; | ||
| 280 | struct font *font; | ||
| 281 | { | 270 | { |
| 282 | int i; | 271 | int i; |
| 283 | struct w32font_info *w32_font = (struct w32font_info *) font; | 272 | struct w32font_info *w32_font = (struct w32font_info *) font; |
| @@ -303,9 +292,7 @@ w32font_close (f, font) | |||
| 303 | return 1. If not, return 0. If a font must be opened to check | 292 | return 1. If not, return 0. If a font must be opened to check |
| 304 | it, return -1. */ | 293 | it, return -1. */ |
| 305 | int | 294 | int |
| 306 | w32font_has_char (entity, c) | 295 | w32font_has_char (Lisp_Object entity, int c) |
| 307 | Lisp_Object entity; | ||
| 308 | int c; | ||
| 309 | { | 296 | { |
| 310 | /* We can't be certain about which characters a font will support until | 297 | /* We can't be certain about which characters a font will support until |
| 311 | we open it. Checking the scripts that the font supports turns out | 298 | we open it. Checking the scripts that the font supports turns out |
| @@ -354,9 +341,7 @@ w32font_has_char (entity, c) | |||
| 354 | which characters are not supported by the font. | 341 | which characters are not supported by the font. |
| 355 | */ | 342 | */ |
| 356 | static unsigned | 343 | static unsigned |
| 357 | w32font_encode_char (font, c) | 344 | w32font_encode_char (struct font *font, int c) |
| 358 | struct font *font; | ||
| 359 | int c; | ||
| 360 | { | 345 | { |
| 361 | struct w32font_info * w32_font = (struct w32font_info *)font; | 346 | struct w32font_info * w32_font = (struct w32font_info *)font; |
| 362 | 347 | ||
| @@ -373,11 +358,8 @@ w32font_encode_char (font, c) | |||
| 373 | CODE (length NGLYPHS). Apparently metrics can be NULL, in this | 358 | CODE (length NGLYPHS). Apparently metrics can be NULL, in this |
| 374 | case just return the overall width. */ | 359 | case just return the overall width. */ |
| 375 | int | 360 | int |
| 376 | w32font_text_extents (font, code, nglyphs, metrics) | 361 | w32font_text_extents (struct font *font, unsigned *code, |
| 377 | struct font *font; | 362 | int nglyphs, struct font_metrics *metrics) |
| 378 | unsigned *code; | ||
| 379 | int nglyphs; | ||
| 380 | struct font_metrics *metrics; | ||
| 381 | { | 363 | { |
| 382 | int i; | 364 | int i; |
| 383 | HFONT old_font = NULL; | 365 | HFONT old_font = NULL; |
| @@ -552,9 +534,8 @@ w32font_text_extents (font, code, nglyphs, metrics) | |||
| 552 | */ | 534 | */ |
| 553 | 535 | ||
| 554 | int | 536 | int |
| 555 | w32font_draw (s, from, to, x, y, with_background) | 537 | w32font_draw (struct glyph_string *s, int from, int to, |
| 556 | struct glyph_string *s; | 538 | int x, int y, int with_background) |
| 557 | int from, to, x, y, with_background; | ||
| 558 | { | 539 | { |
| 559 | UINT options; | 540 | UINT options; |
| 560 | HRGN orig_clip = NULL; | 541 | HRGN orig_clip = NULL; |
| @@ -715,9 +696,7 @@ w32font_otf_drive (struct font *font, Lisp_Object features, | |||
| 715 | Additional parameter opentype_only restricts the returned fonts to | 696 | Additional parameter opentype_only restricts the returned fonts to |
| 716 | opentype fonts, which can be used with the Uniscribe backend. */ | 697 | opentype fonts, which can be used with the Uniscribe backend. */ |
| 717 | Lisp_Object | 698 | Lisp_Object |
| 718 | w32font_list_internal (frame, font_spec, opentype_only) | 699 | w32font_list_internal (Lisp_Object frame, Lisp_Object font_spec, int opentype_only) |
| 719 | Lisp_Object frame, font_spec; | ||
| 720 | int opentype_only; | ||
| 721 | { | 700 | { |
| 722 | struct font_callback_data match_data; | 701 | struct font_callback_data match_data; |
| 723 | HDC dc; | 702 | HDC dc; |
| @@ -770,9 +749,7 @@ w32font_list_internal (frame, font_spec, opentype_only) | |||
| 770 | Additional parameter opentype_only restricts the returned fonts to | 749 | Additional parameter opentype_only restricts the returned fonts to |
| 771 | opentype fonts, which can be used with the Uniscribe backend. */ | 750 | opentype fonts, which can be used with the Uniscribe backend. */ |
| 772 | Lisp_Object | 751 | Lisp_Object |
| 773 | w32font_match_internal (frame, font_spec, opentype_only) | 752 | w32font_match_internal (Lisp_Object frame, Lisp_Object font_spec, int opentype_only) |
| 774 | Lisp_Object frame, font_spec; | ||
| 775 | int opentype_only; | ||
| 776 | { | 753 | { |
| 777 | struct font_callback_data match_data; | 754 | struct font_callback_data match_data; |
| 778 | HDC dc; | 755 | HDC dc; |
| @@ -800,11 +777,8 @@ w32font_match_internal (frame, font_spec, opentype_only) | |||
| 800 | } | 777 | } |
| 801 | 778 | ||
| 802 | int | 779 | int |
| 803 | w32font_open_internal (f, font_entity, pixel_size, font_object) | 780 | w32font_open_internal (FRAME_PTR f, Lisp_Object font_entity, |
| 804 | FRAME_PTR f; | 781 | int pixel_size, Lisp_Object font_object) |
| 805 | Lisp_Object font_entity; | ||
| 806 | int pixel_size; | ||
| 807 | Lisp_Object font_object; | ||
| 808 | { | 782 | { |
| 809 | int len, size, i; | 783 | int len, size, i; |
| 810 | LOGFONT logfont; | 784 | LOGFONT logfont; |
| @@ -951,11 +925,9 @@ w32font_open_internal (f, font_entity, pixel_size, font_object) | |||
| 951 | /* Callback function for EnumFontFamiliesEx. | 925 | /* Callback function for EnumFontFamiliesEx. |
| 952 | * Adds the name of a font to a Lisp list (passed in as the lParam arg). */ | 926 | * Adds the name of a font to a Lisp list (passed in as the lParam arg). */ |
| 953 | static int CALLBACK | 927 | static int CALLBACK |
| 954 | add_font_name_to_list (logical_font, physical_font, font_type, list_object) | 928 | add_font_name_to_list (ENUMLOGFONTEX *logical_font, |
| 955 | ENUMLOGFONTEX *logical_font; | 929 | NEWTEXTMETRICEX *physical_font, |
| 956 | NEWTEXTMETRICEX *physical_font; | 930 | DWORD font_type, LPARAM list_object) |
| 957 | DWORD font_type; | ||
| 958 | LPARAM list_object; | ||
| 959 | { | 931 | { |
| 960 | Lisp_Object* list = (Lisp_Object *) list_object; | 932 | Lisp_Object* list = (Lisp_Object *) list_object; |
| 961 | Lisp_Object family; | 933 | Lisp_Object family; |
| @@ -976,14 +948,12 @@ static int w32_encode_weight (int); | |||
| 976 | 948 | ||
| 977 | /* Convert an enumerated Windows font to an Emacs font entity. */ | 949 | /* Convert an enumerated Windows font to an Emacs font entity. */ |
| 978 | static Lisp_Object | 950 | static Lisp_Object |
| 979 | w32_enumfont_pattern_entity (frame, logical_font, physical_font, | 951 | w32_enumfont_pattern_entity (Lisp_Object frame, |
| 980 | font_type, requested_font, backend) | 952 | ENUMLOGFONTEX *logical_font, |
| 981 | Lisp_Object frame; | 953 | NEWTEXTMETRICEX *physical_font, |
| 982 | ENUMLOGFONTEX *logical_font; | 954 | DWORD font_type, |
| 983 | NEWTEXTMETRICEX *physical_font; | 955 | LOGFONT *requested_font, |
| 984 | DWORD font_type; | 956 | Lisp_Object backend) |
| 985 | LOGFONT *requested_font; | ||
| 986 | Lisp_Object backend; | ||
| 987 | { | 957 | { |
| 988 | Lisp_Object entity, tem; | 958 | Lisp_Object entity, tem; |
| 989 | LOGFONT *lf = (LOGFONT*) logical_font; | 959 | LOGFONT *lf = (LOGFONT*) logical_font; |
| @@ -1107,8 +1077,7 @@ w32_generic_family (Lisp_Object name) | |||
| 1107 | } | 1077 | } |
| 1108 | 1078 | ||
| 1109 | static int | 1079 | static int |
| 1110 | logfonts_match (font, pattern) | 1080 | logfonts_match (LOGFONT *font, LOGFONT *pattern) |
| 1111 | LOGFONT *font, *pattern; | ||
| 1112 | { | 1081 | { |
| 1113 | /* Only check height for raster fonts. */ | 1082 | /* Only check height for raster fonts. */ |
| 1114 | if (pattern->lfHeight && font->lfOutPrecision == OUT_STRING_PRECIS | 1083 | if (pattern->lfHeight && font->lfOutPrecision == OUT_STRING_PRECIS |
| @@ -1132,12 +1101,9 @@ logfonts_match (font, pattern) | |||
| 1132 | #define CSB_CHINESE ((1 << 18) | (1 << 20)) | 1101 | #define CSB_CHINESE ((1 << 18) | (1 << 20)) |
| 1133 | 1102 | ||
| 1134 | static int | 1103 | static int |
| 1135 | font_matches_spec (type, font, spec, backend, logfont) | 1104 | font_matches_spec (DWORD type, NEWTEXTMETRICEX *font, |
| 1136 | DWORD type; | 1105 | Lisp_Object spec, Lisp_Object backend, |
| 1137 | NEWTEXTMETRICEX *font; | 1106 | LOGFONT *logfont) |
| 1138 | Lisp_Object spec; | ||
| 1139 | Lisp_Object backend; | ||
| 1140 | LOGFONT *logfont; | ||
| 1141 | { | 1107 | { |
| 1142 | Lisp_Object extra, val; | 1108 | Lisp_Object extra, val; |
| 1143 | 1109 | ||
| @@ -1322,9 +1288,7 @@ font_matches_spec (type, font, spec, backend, logfont) | |||
| 1322 | } | 1288 | } |
| 1323 | 1289 | ||
| 1324 | static int | 1290 | static int |
| 1325 | w32font_coverage_ok (coverage, charset) | 1291 | w32font_coverage_ok (FONTSIGNATURE * coverage, BYTE charset) |
| 1326 | FONTSIGNATURE * coverage; | ||
| 1327 | BYTE charset; | ||
| 1328 | { | 1292 | { |
| 1329 | DWORD subrange1 = coverage->fsUsb[1]; | 1293 | DWORD subrange1 = coverage->fsUsb[1]; |
| 1330 | 1294 | ||
| @@ -1350,9 +1314,7 @@ w32font_coverage_ok (coverage, charset) | |||
| 1350 | 1314 | ||
| 1351 | 1315 | ||
| 1352 | static int | 1316 | static int |
| 1353 | check_face_name (font, full_name) | 1317 | check_face_name (LOGFONT *font, char *full_name) |
| 1354 | LOGFONT *font; | ||
| 1355 | char *full_name; | ||
| 1356 | { | 1318 | { |
| 1357 | char full_iname[LF_FULLFACESIZE+1]; | 1319 | char full_iname[LF_FULLFACESIZE+1]; |
| 1358 | 1320 | ||
| @@ -1397,11 +1359,9 @@ check_face_name (font, full_name) | |||
| 1397 | * and the list to which the fonts are added are passed in via the | 1359 | * and the list to which the fonts are added are passed in via the |
| 1398 | * lparam argument, in the form of a font_callback_data struct. */ | 1360 | * lparam argument, in the form of a font_callback_data struct. */ |
| 1399 | static int CALLBACK | 1361 | static int CALLBACK |
| 1400 | add_font_entity_to_list (logical_font, physical_font, font_type, lParam) | 1362 | add_font_entity_to_list (ENUMLOGFONTEX *logical_font, |
| 1401 | ENUMLOGFONTEX *logical_font; | 1363 | NEWTEXTMETRICEX *physical_font, |
| 1402 | NEWTEXTMETRICEX *physical_font; | 1364 | DWORD font_type, LPARAM lParam) |
| 1403 | DWORD font_type; | ||
| 1404 | LPARAM lParam; | ||
| 1405 | { | 1365 | { |
| 1406 | struct font_callback_data *match_data | 1366 | struct font_callback_data *match_data |
| 1407 | = (struct font_callback_data *) lParam; | 1367 | = (struct font_callback_data *) lParam; |
| @@ -1510,11 +1470,9 @@ add_font_entity_to_list (logical_font, physical_font, font_type, lParam) | |||
| 1510 | /* Callback function for EnumFontFamiliesEx. | 1470 | /* Callback function for EnumFontFamiliesEx. |
| 1511 | * Terminates the search once we have a match. */ | 1471 | * Terminates the search once we have a match. */ |
| 1512 | static int CALLBACK | 1472 | static int CALLBACK |
| 1513 | add_one_font_entity_to_list (logical_font, physical_font, font_type, lParam) | 1473 | add_one_font_entity_to_list (ENUMLOGFONTEX *logical_font, |
| 1514 | ENUMLOGFONTEX *logical_font; | 1474 | NEWTEXTMETRICEX *physical_font, |
| 1515 | NEWTEXTMETRICEX *physical_font; | 1475 | DWORD font_type, LPARAM lParam) |
| 1516 | DWORD font_type; | ||
| 1517 | LPARAM lParam; | ||
| 1518 | { | 1476 | { |
| 1519 | struct font_callback_data *match_data | 1477 | struct font_callback_data *match_data |
| 1520 | = (struct font_callback_data *) lParam; | 1478 | = (struct font_callback_data *) lParam; |
| @@ -1526,8 +1484,7 @@ add_one_font_entity_to_list (logical_font, physical_font, font_type, lParam) | |||
| 1526 | 1484 | ||
| 1527 | /* Old function to convert from x to w32 charset, from w32fns.c. */ | 1485 | /* Old function to convert from x to w32 charset, from w32fns.c. */ |
| 1528 | static LONG | 1486 | static LONG |
| 1529 | x_to_w32_charset (lpcs) | 1487 | x_to_w32_charset (char * lpcs) |
| 1530 | char * lpcs; | ||
| 1531 | { | 1488 | { |
| 1532 | Lisp_Object this_entry, w32_charset; | 1489 | Lisp_Object this_entry, w32_charset; |
| 1533 | char *charset; | 1490 | char *charset; |
| @@ -1609,8 +1566,7 @@ x_to_w32_charset (lpcs) | |||
| 1609 | 1566 | ||
| 1610 | /* Convert a Lisp font registry (symbol) to a windows charset. */ | 1567 | /* Convert a Lisp font registry (symbol) to a windows charset. */ |
| 1611 | static LONG | 1568 | static LONG |
| 1612 | registry_to_w32_charset (charset) | 1569 | registry_to_w32_charset (Lisp_Object charset) |
| 1613 | Lisp_Object charset; | ||
| 1614 | { | 1570 | { |
| 1615 | if (EQ (charset, Qiso10646_1) || EQ (charset, Qunicode_bmp) | 1571 | if (EQ (charset, Qiso10646_1) || EQ (charset, Qunicode_bmp) |
| 1616 | || EQ (charset, Qunicode_sip)) | 1572 | || EQ (charset, Qunicode_sip)) |
| @@ -1625,9 +1581,7 @@ registry_to_w32_charset (charset) | |||
| 1625 | 1581 | ||
| 1626 | /* Old function to convert from w32 to x charset, from w32fns.c. */ | 1582 | /* Old function to convert from w32 to x charset, from w32fns.c. */ |
| 1627 | static char * | 1583 | static char * |
| 1628 | w32_to_x_charset (fncharset, matching) | 1584 | w32_to_x_charset (int fncharset, char *matching) |
| 1629 | int fncharset; | ||
| 1630 | char *matching; | ||
| 1631 | { | 1585 | { |
| 1632 | static char buf[32]; | 1586 | static char buf[32]; |
| 1633 | Lisp_Object charset_type; | 1587 | Lisp_Object charset_type; |
| @@ -1821,9 +1775,7 @@ w32_to_x_charset (fncharset, matching) | |||
| 1821 | } | 1775 | } |
| 1822 | 1776 | ||
| 1823 | static Lisp_Object | 1777 | static Lisp_Object |
| 1824 | w32_registry (w32_charset, font_type) | 1778 | w32_registry (LONG w32_charset, DWORD font_type) |
| 1825 | LONG w32_charset; | ||
| 1826 | DWORD font_type; | ||
| 1827 | { | 1779 | { |
| 1828 | char *charset; | 1780 | char *charset; |
| 1829 | 1781 | ||
| @@ -1837,8 +1789,7 @@ w32_registry (w32_charset, font_type) | |||
| 1837 | } | 1789 | } |
| 1838 | 1790 | ||
| 1839 | static int | 1791 | static int |
| 1840 | w32_decode_weight (fnweight) | 1792 | w32_decode_weight (int fnweight) |
| 1841 | int fnweight; | ||
| 1842 | { | 1793 | { |
| 1843 | if (fnweight >= FW_HEAVY) return 210; | 1794 | if (fnweight >= FW_HEAVY) return 210; |
| 1844 | if (fnweight >= FW_EXTRABOLD) return 205; | 1795 | if (fnweight >= FW_EXTRABOLD) return 205; |
| @@ -1852,8 +1803,7 @@ w32_decode_weight (fnweight) | |||
| 1852 | } | 1803 | } |
| 1853 | 1804 | ||
| 1854 | static int | 1805 | static int |
| 1855 | w32_encode_weight (n) | 1806 | w32_encode_weight (int n) |
| 1856 | int n; | ||
| 1857 | { | 1807 | { |
| 1858 | if (n >= 210) return FW_HEAVY; | 1808 | if (n >= 210) return FW_HEAVY; |
| 1859 | if (n >= 205) return FW_EXTRABOLD; | 1809 | if (n >= 205) return FW_EXTRABOLD; |
| @@ -1869,8 +1819,7 @@ w32_encode_weight (n) | |||
| 1869 | /* Convert a Windows font weight into one of the weights supported | 1819 | /* Convert a Windows font weight into one of the weights supported |
| 1870 | by fontconfig (see font.c:font_parse_fcname). */ | 1820 | by fontconfig (see font.c:font_parse_fcname). */ |
| 1871 | static Lisp_Object | 1821 | static Lisp_Object |
| 1872 | w32_to_fc_weight (n) | 1822 | w32_to_fc_weight (int n) |
| 1873 | int n; | ||
| 1874 | { | 1823 | { |
| 1875 | if (n >= FW_EXTRABOLD) return intern ("black"); | 1824 | if (n >= FW_EXTRABOLD) return intern ("black"); |
| 1876 | if (n >= FW_BOLD) return intern ("bold"); | 1825 | if (n >= FW_BOLD) return intern ("bold"); |
| @@ -1881,10 +1830,7 @@ w32_to_fc_weight (n) | |||
| 1881 | 1830 | ||
| 1882 | /* Fill in all the available details of LOGFONT from FONT_SPEC. */ | 1831 | /* Fill in all the available details of LOGFONT from FONT_SPEC. */ |
| 1883 | static void | 1832 | static void |
| 1884 | fill_in_logfont (f, logfont, font_spec) | 1833 | fill_in_logfont (FRAME_PTR f, LOGFONT *logfont, Lisp_Object font_spec) |
| 1885 | FRAME_PTR f; | ||
| 1886 | LOGFONT *logfont; | ||
| 1887 | Lisp_Object font_spec; | ||
| 1888 | { | 1834 | { |
| 1889 | Lisp_Object tmp, extra; | 1835 | Lisp_Object tmp, extra; |
| 1890 | int dpi = FRAME_W32_DISPLAY_INFO (f)->resy; | 1836 | int dpi = FRAME_W32_DISPLAY_INFO (f)->resy; |
| @@ -2029,8 +1975,7 @@ fill_in_logfont (f, logfont, font_spec) | |||
| 2029 | } | 1975 | } |
| 2030 | 1976 | ||
| 2031 | static void | 1977 | static void |
| 2032 | list_all_matching_fonts (match_data) | 1978 | list_all_matching_fonts (struct font_callback_data *match_data) |
| 2033 | struct font_callback_data *match_data; | ||
| 2034 | { | 1979 | { |
| 2035 | HDC dc; | 1980 | HDC dc; |
| 2036 | Lisp_Object families = w32font_list_family (match_data->frame); | 1981 | Lisp_Object families = w32font_list_family (match_data->frame); |
| @@ -2066,8 +2011,7 @@ list_all_matching_fonts (match_data) | |||
| 2066 | } | 2011 | } |
| 2067 | 2012 | ||
| 2068 | static Lisp_Object | 2013 | static Lisp_Object |
| 2069 | lispy_antialias_type (type) | 2014 | lispy_antialias_type (BYTE type) |
| 2070 | BYTE type; | ||
| 2071 | { | 2015 | { |
| 2072 | Lisp_Object lispy; | 2016 | Lisp_Object lispy; |
| 2073 | 2017 | ||
| @@ -2094,8 +2038,7 @@ lispy_antialias_type (type) | |||
| 2094 | 2038 | ||
| 2095 | /* Convert antialiasing symbols to lfQuality */ | 2039 | /* Convert antialiasing symbols to lfQuality */ |
| 2096 | static BYTE | 2040 | static BYTE |
| 2097 | w32_antialias_type (type) | 2041 | w32_antialias_type (Lisp_Object type) |
| 2098 | Lisp_Object type; | ||
| 2099 | { | 2042 | { |
| 2100 | if (EQ (type, Qnone)) | 2043 | if (EQ (type, Qnone)) |
| 2101 | return NONANTIALIASED_QUALITY; | 2044 | return NONANTIALIASED_QUALITY; |
| @@ -2241,12 +2184,8 @@ font_supported_scripts (FONTSIGNATURE * sig) | |||
| 2241 | The full name is in fcname format, with weight, slant and antialiasing | 2184 | The full name is in fcname format, with weight, slant and antialiasing |
| 2242 | specified if they are not "normal". */ | 2185 | specified if they are not "normal". */ |
| 2243 | static int | 2186 | static int |
| 2244 | w32font_full_name (font, font_obj, pixel_size, name, nbytes) | 2187 | w32font_full_name (LOGFONT * font, Lisp_Object font_obj, |
| 2245 | LOGFONT * font; | 2188 | int pixel_size, char *name, int nbytes) |
| 2246 | Lisp_Object font_obj; | ||
| 2247 | int pixel_size; | ||
| 2248 | char *name; | ||
| 2249 | int nbytes; | ||
| 2250 | { | 2189 | { |
| 2251 | int len, height, outline; | 2190 | int len, height, outline; |
| 2252 | char *p; | 2191 | char *p; |
| @@ -2317,11 +2256,8 @@ w32font_full_name (font, font_obj, pixel_size, name, nbytes) | |||
| 2317 | is written. If the buffer is not large enough to contain the name, | 2256 | is written. If the buffer is not large enough to contain the name, |
| 2318 | the function returns -1, otherwise it returns the number of bytes | 2257 | the function returns -1, otherwise it returns the number of bytes |
| 2319 | written to FCNAME. */ | 2258 | written to FCNAME. */ |
| 2320 | static int logfont_to_fcname(font, pointsize, fcname, size) | 2259 | static int |
| 2321 | LOGFONT* font; | 2260 | logfont_to_fcname (LOGFONT* font, int pointsize, char *fcname, int size) |
| 2322 | int pointsize; | ||
| 2323 | char *fcname; | ||
| 2324 | int size; | ||
| 2325 | { | 2261 | { |
| 2326 | int len, height; | 2262 | int len, height; |
| 2327 | char *p = fcname; | 2263 | char *p = fcname; |
| @@ -2360,11 +2296,8 @@ static int logfont_to_fcname(font, pointsize, fcname, size) | |||
| 2360 | } | 2296 | } |
| 2361 | 2297 | ||
| 2362 | static void | 2298 | static void |
| 2363 | compute_metrics (dc, w32_font, code, metrics) | 2299 | compute_metrics (HDC dc, struct w32font_info *w32_font, unsigned int code, |
| 2364 | HDC dc; | 2300 | struct w32_metric_cache *metrics) |
| 2365 | struct w32font_info *w32_font; | ||
| 2366 | unsigned int code; | ||
| 2367 | struct w32_metric_cache *metrics; | ||
| 2368 | { | 2301 | { |
| 2369 | GLYPHMETRICS gm; | 2302 | GLYPHMETRICS gm; |
| 2370 | MAT2 transform; | 2303 | MAT2 transform; |
| @@ -2482,7 +2415,7 @@ struct font_driver w32font_driver = | |||
| 2482 | /* Initialize state that does not change between invocations. This is only | 2415 | /* Initialize state that does not change between invocations. This is only |
| 2483 | called when Emacs is dumped. */ | 2416 | called when Emacs is dumped. */ |
| 2484 | void | 2417 | void |
| 2485 | syms_of_w32font () | 2418 | syms_of_w32font (void) |
| 2486 | { | 2419 | { |
| 2487 | DEFSYM (Qgdi, "gdi"); | 2420 | DEFSYM (Qgdi, "gdi"); |
| 2488 | DEFSYM (Quniscribe, "uniscribe"); | 2421 | DEFSYM (Quniscribe, "uniscribe"); |
diff --git a/src/w32heap.c b/src/w32heap.c index 440388c6eab..e307694a563 100644 --- a/src/w32heap.c +++ b/src/w32heap.c | |||
| @@ -222,7 +222,7 @@ sbrk (unsigned long increment) | |||
| 222 | was allocated by something else; GNU malloc detects when there is a | 222 | was allocated by something else; GNU malloc detects when there is a |
| 223 | jump in the sbrk values, and starts a new heap block. */ | 223 | jump in the sbrk values, and starts a new heap block. */ |
| 224 | void | 224 | void |
| 225 | init_heap () | 225 | init_heap (void) |
| 226 | { | 226 | { |
| 227 | PIMAGE_DOS_HEADER dos_header; | 227 | PIMAGE_DOS_HEADER dos_header; |
| 228 | PIMAGE_NT_HEADERS nt_header; | 228 | PIMAGE_NT_HEADERS nt_header; |
diff --git a/src/w32inevt.c b/src/w32inevt.c index 864b3b3f0bb..aa9fe09d857 100644 --- a/src/w32inevt.c +++ b/src/w32inevt.c | |||
| @@ -684,7 +684,7 @@ resize_event (WINDOW_BUFFER_SIZE_RECORD *event) | |||
| 684 | } | 684 | } |
| 685 | 685 | ||
| 686 | static void | 686 | static void |
| 687 | maybe_generate_resize_event () | 687 | maybe_generate_resize_event (void) |
| 688 | { | 688 | { |
| 689 | CONSOLE_SCREEN_BUFFER_INFO info; | 689 | CONSOLE_SCREEN_BUFFER_INFO info; |
| 690 | FRAME_PTR f = get_frame (); | 690 | FRAME_PTR f = get_frame (); |
diff --git a/src/w32menu.c b/src/w32menu.c index 2c8a5308d3b..37be0bd028d 100644 --- a/src/w32menu.c +++ b/src/w32menu.c | |||
| @@ -59,8 +59,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 59 | 59 | ||
| 60 | HMENU current_popup_menu; | 60 | HMENU current_popup_menu; |
| 61 | 61 | ||
| 62 | void syms_of_w32menu (); | 62 | void syms_of_w32menu (void); |
| 63 | void globals_of_w32menu (); | 63 | void globals_of_w32menu (void); |
| 64 | 64 | ||
| 65 | typedef BOOL (WINAPI * GetMenuItemInfoA_Proc) ( | 65 | typedef BOOL (WINAPI * GetMenuItemInfoA_Proc) ( |
| 66 | IN HMENU, | 66 | IN HMENU, |
| @@ -116,8 +116,7 @@ int pending_menu_activation; | |||
| 116 | ID, or 0 if none. */ | 116 | ID, or 0 if none. */ |
| 117 | 117 | ||
| 118 | static struct frame * | 118 | static struct frame * |
| 119 | menubar_id_to_frame (id) | 119 | menubar_id_to_frame (HMENU id) |
| 120 | HMENU id; | ||
| 121 | { | 120 | { |
| 122 | Lisp_Object tail, frame; | 121 | Lisp_Object tail, frame; |
| 123 | FRAME_PTR f; | 122 | FRAME_PTR f; |
| @@ -276,8 +275,7 @@ otherwise it is "Question". */) | |||
| 276 | This way we can safely execute Lisp code. */ | 275 | This way we can safely execute Lisp code. */ |
| 277 | 276 | ||
| 278 | void | 277 | void |
| 279 | x_activate_menubar (f) | 278 | x_activate_menubar (FRAME_PTR f) |
| 280 | FRAME_PTR f; | ||
| 281 | { | 279 | { |
| 282 | set_frame_menubar (f, 0, 1); | 280 | set_frame_menubar (f, 0, 1); |
| 283 | 281 | ||
| @@ -386,10 +384,7 @@ menubar_selection_callback (FRAME_PTR f, void * client_data) | |||
| 386 | it is set the first time this is called, from initialize_frame_menubar. */ | 384 | it is set the first time this is called, from initialize_frame_menubar. */ |
| 387 | 385 | ||
| 388 | void | 386 | void |
| 389 | set_frame_menubar (f, first_time, deep_p) | 387 | set_frame_menubar (FRAME_PTR f, int first_time, int deep_p) |
| 390 | FRAME_PTR f; | ||
| 391 | int first_time; | ||
| 392 | int deep_p; | ||
| 393 | { | 388 | { |
| 394 | HMENU menubar_widget = f->output_data.w32->menubar_widget; | 389 | HMENU menubar_widget = f->output_data.w32->menubar_widget; |
| 395 | Lisp_Object items; | 390 | Lisp_Object items; |
| @@ -648,8 +643,7 @@ set_frame_menubar (f, first_time, deep_p) | |||
| 648 | is visible. */ | 643 | is visible. */ |
| 649 | 644 | ||
| 650 | void | 645 | void |
| 651 | initialize_frame_menubar (f) | 646 | initialize_frame_menubar (FRAME_PTR f) |
| 652 | FRAME_PTR f; | ||
| 653 | { | 647 | { |
| 654 | /* This function is called before the first chance to redisplay | 648 | /* This function is called before the first chance to redisplay |
| 655 | the frame. It has to be, so the frame will have the right size. */ | 649 | the frame. It has to be, so the frame will have the right size. */ |
| @@ -661,8 +655,7 @@ initialize_frame_menubar (f) | |||
| 661 | This is used when deleting a frame, and when turning off the menu bar. */ | 655 | This is used when deleting a frame, and when turning off the menu bar. */ |
| 662 | 656 | ||
| 663 | void | 657 | void |
| 664 | free_frame_menubar (f) | 658 | free_frame_menubar (FRAME_PTR f) |
| 665 | FRAME_PTR f; | ||
| 666 | { | 659 | { |
| 667 | BLOCK_INPUT; | 660 | BLOCK_INPUT; |
| 668 | 661 | ||
| @@ -1020,11 +1013,9 @@ static char * button_names [] = { | |||
| 1020 | "button6", "button7", "button8", "button9", "button10" }; | 1013 | "button6", "button7", "button8", "button9", "button10" }; |
| 1021 | 1014 | ||
| 1022 | static Lisp_Object | 1015 | static Lisp_Object |
| 1023 | w32_dialog_show (f, keymaps, title, header, error) | 1016 | w32_dialog_show (FRAME_PTR f, int keymaps, |
| 1024 | FRAME_PTR f; | 1017 | Lisp_Object title, Lisp_Object header, |
| 1025 | int keymaps; | 1018 | char **error) |
| 1026 | Lisp_Object title, header; | ||
| 1027 | char **error; | ||
| 1028 | { | 1019 | { |
| 1029 | int i, nb_buttons=0; | 1020 | int i, nb_buttons=0; |
| 1030 | char dialog_name[6]; | 1021 | char dialog_name[6]; |
| @@ -1213,8 +1204,8 @@ w32_dialog_show (f, keymaps, title, header, error) | |||
| 1213 | anywhere in Emacs that uses the other specific dialog choices that | 1204 | anywhere in Emacs that uses the other specific dialog choices that |
| 1214 | MessageBox provides. */ | 1205 | MessageBox provides. */ |
| 1215 | 1206 | ||
| 1216 | static int is_simple_dialog (contents) | 1207 | static int |
| 1217 | Lisp_Object contents; | 1208 | is_simple_dialog (Lisp_Object contents) |
| 1218 | { | 1209 | { |
| 1219 | Lisp_Object options = XCDR (contents); | 1210 | Lisp_Object options = XCDR (contents); |
| 1220 | Lisp_Object name, yes, no, other; | 1211 | Lisp_Object name, yes, no, other; |
| @@ -1249,9 +1240,8 @@ static int is_simple_dialog (contents) | |||
| 1249 | return !(CONSP (options)); | 1240 | return !(CONSP (options)); |
| 1250 | } | 1241 | } |
| 1251 | 1242 | ||
| 1252 | static Lisp_Object simple_dialog_show (f, contents, header) | 1243 | static Lisp_Object |
| 1253 | FRAME_PTR f; | 1244 | simple_dialog_show (FRAME_PTR f, Lisp_Object contents, Lisp_Object header) |
| 1254 | Lisp_Object contents, header; | ||
| 1255 | { | 1245 | { |
| 1256 | int answer; | 1246 | int answer; |
| 1257 | UINT type; | 1247 | UINT type; |
| @@ -1315,8 +1305,7 @@ static Lisp_Object simple_dialog_show (f, contents, header) | |||
| 1315 | 1305 | ||
| 1316 | /* Is this item a separator? */ | 1306 | /* Is this item a separator? */ |
| 1317 | static int | 1307 | static int |
| 1318 | name_is_separator (name) | 1308 | name_is_separator (char *name) |
| 1319 | char *name; | ||
| 1320 | { | 1309 | { |
| 1321 | char *start = name; | 1310 | char *start = name; |
| 1322 | 1311 | ||
| @@ -1647,8 +1636,7 @@ w32_menu_display_help (HWND owner, HMENU menu, UINT item, UINT flags) | |||
| 1647 | 1636 | ||
| 1648 | /* Free memory used by owner-drawn strings. */ | 1637 | /* Free memory used by owner-drawn strings. */ |
| 1649 | static void | 1638 | static void |
| 1650 | w32_free_submenu_strings (menu) | 1639 | w32_free_submenu_strings (HMENU menu) |
| 1651 | HMENU menu; | ||
| 1652 | { | 1640 | { |
| 1653 | int i, num = GetMenuItemCount (menu); | 1641 | int i, num = GetMenuItemCount (menu); |
| 1654 | for (i = 0; i < num; i++) | 1642 | for (i = 0; i < num; i++) |
| @@ -1676,8 +1664,7 @@ w32_free_submenu_strings (menu) | |||
| 1676 | } | 1664 | } |
| 1677 | 1665 | ||
| 1678 | void | 1666 | void |
| 1679 | w32_free_menu_strings (hwnd) | 1667 | w32_free_menu_strings (HWND hwnd) |
| 1680 | HWND hwnd; | ||
| 1681 | { | 1668 | { |
| 1682 | HMENU menu = current_popup_menu; | 1669 | HMENU menu = current_popup_menu; |
| 1683 | 1670 | ||
| @@ -1712,7 +1699,8 @@ DEFUN ("menu-or-popup-active-p", Fmenu_or_popup_active_p, Smenu_or_popup_active_ | |||
| 1712 | #endif /* HAVE_MENUS */ | 1699 | #endif /* HAVE_MENUS */ |
| 1713 | } | 1700 | } |
| 1714 | 1701 | ||
| 1715 | void syms_of_w32menu () | 1702 | void |
| 1703 | syms_of_w32menu (void) | ||
| 1716 | { | 1704 | { |
| 1717 | globals_of_w32menu (); | 1705 | globals_of_w32menu (); |
| 1718 | 1706 | ||
| @@ -1734,7 +1722,8 @@ void syms_of_w32menu () | |||
| 1734 | variable initialized is 0 and directly from main when initialized | 1722 | variable initialized is 0 and directly from main when initialized |
| 1735 | is non zero. | 1723 | is non zero. |
| 1736 | */ | 1724 | */ |
| 1737 | void globals_of_w32menu () | 1725 | void |
| 1726 | globals_of_w32menu (void) | ||
| 1738 | { | 1727 | { |
| 1739 | /* See if Get/SetMenuItemInfo functions are available. */ | 1728 | /* See if Get/SetMenuItemInfo functions are available. */ |
| 1740 | HMODULE user32 = GetModuleHandle ("user32.dll"); | 1729 | HMODULE user32 = GetModuleHandle ("user32.dll"); |
diff --git a/src/w32proc.c b/src/w32proc.c index b8443e5a75b..9eef228292f 100644 --- a/src/w32proc.c +++ b/src/w32proc.c | |||
| @@ -117,7 +117,8 @@ extern Lisp_Object Qlocal; | |||
| 117 | Lisp_Object Qhigh, Qlow; | 117 | Lisp_Object Qhigh, Qlow; |
| 118 | 118 | ||
| 119 | #ifdef EMACSDEBUG | 119 | #ifdef EMACSDEBUG |
| 120 | void _DebPrint (const char *fmt, ...) | 120 | void |
| 121 | _DebPrint (const char *fmt, ...) | ||
| 121 | { | 122 | { |
| 122 | char buf[1024]; | 123 | char buf[1024]; |
| 123 | va_list args; | 124 | va_list args; |
| @@ -608,7 +609,10 @@ get_result: | |||
| 608 | #endif | 609 | #endif |
| 609 | 610 | ||
| 610 | void | 611 | void |
| 611 | w32_executable_type (char * filename, int * is_dos_app, int * is_cygnus_app, int * is_gui_app) | 612 | w32_executable_type (char * filename, |
| 613 | int * is_dos_app, | ||
| 614 | int * is_cygnus_app, | ||
| 615 | int * is_gui_app) | ||
| 612 | { | 616 | { |
| 613 | file_data executable; | 617 | file_data executable; |
| 614 | char * p; | 618 | char * p; |
| @@ -1875,7 +1879,8 @@ If successful, the return value is t, otherwise nil. */) | |||
| 1875 | 1879 | ||
| 1876 | #ifdef HAVE_LANGINFO_CODESET | 1880 | #ifdef HAVE_LANGINFO_CODESET |
| 1877 | /* Emulation of nl_langinfo. Used in fns.c:Flocale_info. */ | 1881 | /* Emulation of nl_langinfo. Used in fns.c:Flocale_info. */ |
| 1878 | char *nl_langinfo (nl_item item) | 1882 | char * |
| 1883 | nl_langinfo (nl_item item) | ||
| 1879 | { | 1884 | { |
| 1880 | /* Conversion of Posix item numbers to their Windows equivalents. */ | 1885 | /* Conversion of Posix item numbers to their Windows equivalents. */ |
| 1881 | static const LCTYPE w32item[] = { | 1886 | static const LCTYPE w32item[] = { |
| @@ -2003,7 +2008,8 @@ human-readable form. */) | |||
| 2003 | return make_number (GetThreadLocale ()); | 2008 | return make_number (GetThreadLocale ()); |
| 2004 | } | 2009 | } |
| 2005 | 2010 | ||
| 2006 | DWORD int_from_hex (char * s) | 2011 | DWORD |
| 2012 | int_from_hex (char * s) | ||
| 2007 | { | 2013 | { |
| 2008 | DWORD val = 0; | 2014 | DWORD val = 0; |
| 2009 | static char hex[] = "0123456789abcdefABCDEF"; | 2015 | static char hex[] = "0123456789abcdefABCDEF"; |
| @@ -2024,7 +2030,8 @@ DWORD int_from_hex (char * s) | |||
| 2024 | function isn't given a context pointer. */ | 2030 | function isn't given a context pointer. */ |
| 2025 | Lisp_Object Vw32_valid_locale_ids; | 2031 | Lisp_Object Vw32_valid_locale_ids; |
| 2026 | 2032 | ||
| 2027 | BOOL CALLBACK enum_locale_fn (LPTSTR localeNum) | 2033 | BOOL CALLBACK |
| 2034 | enum_locale_fn (LPTSTR localeNum) | ||
| 2028 | { | 2035 | { |
| 2029 | DWORD id = int_from_hex (localeNum); | 2036 | DWORD id = int_from_hex (localeNum); |
| 2030 | Vw32_valid_locale_ids = Fcons (make_number (id), Vw32_valid_locale_ids); | 2037 | Vw32_valid_locale_ids = Fcons (make_number (id), Vw32_valid_locale_ids); |
| @@ -2089,7 +2096,8 @@ If successful, the new locale id is returned, otherwise nil. */) | |||
| 2089 | function isn't given a context pointer. */ | 2096 | function isn't given a context pointer. */ |
| 2090 | Lisp_Object Vw32_valid_codepages; | 2097 | Lisp_Object Vw32_valid_codepages; |
| 2091 | 2098 | ||
| 2092 | BOOL CALLBACK enum_codepage_fn (LPTSTR codepageNum) | 2099 | BOOL CALLBACK |
| 2100 | enum_codepage_fn (LPTSTR codepageNum) | ||
| 2093 | { | 2101 | { |
| 2094 | DWORD id = atoi (codepageNum); | 2102 | DWORD id = atoi (codepageNum); |
| 2095 | Vw32_valid_codepages = Fcons (make_number (id), Vw32_valid_codepages); | 2103 | Vw32_valid_codepages = Fcons (make_number (id), Vw32_valid_codepages); |
| @@ -2265,7 +2273,8 @@ If successful, the new layout id is returned, otherwise nil. */) | |||
| 2265 | } | 2273 | } |
| 2266 | 2274 | ||
| 2267 | 2275 | ||
| 2268 | syms_of_ntproc () | 2276 | void |
| 2277 | syms_of_ntproc (void) | ||
| 2269 | { | 2278 | { |
| 2270 | DEFSYM (Qhigh, "high"); | 2279 | DEFSYM (Qhigh, "high"); |
| 2271 | DEFSYM (Qlow, "low"); | 2280 | DEFSYM (Qlow, "low"); |
diff --git a/src/w32reg.c b/src/w32reg.c index f9687d1effe..77667eb7dc9 100644 --- a/src/w32reg.c +++ b/src/w32reg.c | |||
| @@ -58,9 +58,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 58 | */ | 58 | */ |
| 59 | 59 | ||
| 60 | static char * | 60 | static char * |
| 61 | w32_get_rdb_resource (rdb, resource) | 61 | w32_get_rdb_resource (char *rdb, char *resource) |
| 62 | char *rdb; | ||
| 63 | char *resource; | ||
| 64 | { | 62 | { |
| 65 | char *value = rdb; | 63 | char *value = rdb; |
| 66 | int len = strlen (resource); | 64 | int len = strlen (resource); |
| @@ -78,9 +76,7 @@ w32_get_rdb_resource (rdb, resource) | |||
| 78 | } | 76 | } |
| 79 | 77 | ||
| 80 | static LPBYTE | 78 | static LPBYTE |
| 81 | w32_get_string_resource (name, class, dwexptype) | 79 | w32_get_string_resource (char *name, char *class, DWORD dwexptype) |
| 82 | char *name, *class; | ||
| 83 | DWORD dwexptype; | ||
| 84 | { | 80 | { |
| 85 | LPBYTE lpvalue = NULL; | 81 | LPBYTE lpvalue = NULL; |
| 86 | HKEY hrootkey = NULL; | 82 | HKEY hrootkey = NULL; |
| @@ -147,9 +143,7 @@ w32_get_string_resource (name, class, dwexptype) | |||
| 147 | database RDB. */ | 143 | database RDB. */ |
| 148 | 144 | ||
| 149 | char * | 145 | char * |
| 150 | x_get_string_resource (rdb, name, class) | 146 | x_get_string_resource (XrmDatabase rdb, char *name, char *class) |
| 151 | XrmDatabase rdb; | ||
| 152 | char *name, *class; | ||
| 153 | { | 147 | { |
| 154 | if (rdb) | 148 | if (rdb) |
| 155 | { | 149 | { |
diff --git a/src/w32select.c b/src/w32select.c index 2da4b333c2a..4ecd926ed79 100644 --- a/src/w32select.c +++ b/src/w32select.c | |||
| @@ -30,7 +30,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 30 | * (CF_UNICODETEXT), when a well-known console codepage is given, they | 30 | * (CF_UNICODETEXT), when a well-known console codepage is given, they |
| 31 | * apply to the console version of the clipboard data (CF_OEMTEXT), | 31 | * apply to the console version of the clipboard data (CF_OEMTEXT), |
| 32 | * else they apply to the normal 8-bit text clipboard (CF_TEXT). | 32 | * else they apply to the normal 8-bit text clipboard (CF_TEXT). |
| 33 | * | 33 | * |
| 34 | * When pasting (getting data from the OS), the clipboard format that | 34 | * When pasting (getting data from the OS), the clipboard format that |
| 35 | * matches the {next-}selection-coding-system is retrieved. If | 35 | * matches the {next-}selection-coding-system is retrieved. If |
| 36 | * Unicode is requested, but not available, 8-bit text (CF_TEXT) is | 36 | * Unicode is requested, but not available, 8-bit text (CF_TEXT) is |
| @@ -45,13 +45,13 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 45 | * | 45 | * |
| 46 | * Scenarios to use the facilities for customizing the selection | 46 | * Scenarios to use the facilities for customizing the selection |
| 47 | * coding system are: | 47 | * coding system are: |
| 48 | * | 48 | * |
| 49 | * ;; Generally use KOI8-R instead of the russian MS codepage for | 49 | * ;; Generally use KOI8-R instead of the russian MS codepage for |
| 50 | * ;; the 8-bit clipboard. | 50 | * ;; the 8-bit clipboard. |
| 51 | * (set-selection-coding-system 'koi8-r-dos) | 51 | * (set-selection-coding-system 'koi8-r-dos) |
| 52 | * | 52 | * |
| 53 | * Or | 53 | * Or |
| 54 | * | 54 | * |
| 55 | * ;; Create a special clipboard copy function that uses codepage | 55 | * ;; Create a special clipboard copy function that uses codepage |
| 56 | * ;; 1253 (Greek) to copy Greek text to a specific non-Unicode | 56 | * ;; 1253 (Greek) to copy Greek text to a specific non-Unicode |
| 57 | * ;; application. | 57 | * ;; application. |
| @@ -71,7 +71,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 71 | * types should be supported is also moved to Lisp, functionality | 71 | * types should be supported is also moved to Lisp, functionality |
| 72 | * could be expanded to CF_HTML, CF_RTF and maybe other types. | 72 | * could be expanded to CF_HTML, CF_RTF and maybe other types. |
| 73 | */ | 73 | */ |
| 74 | 74 | ||
| 75 | #include <config.h> | 75 | #include <config.h> |
| 76 | #include <setjmp.h> | 76 | #include <setjmp.h> |
| 77 | #include "lisp.h" | 77 | #include "lisp.h" |
| @@ -89,8 +89,8 @@ static HGLOBAL convert_to_handle_as_ascii (void); | |||
| 89 | static HGLOBAL convert_to_handle_as_coded (Lisp_Object coding_system); | 89 | static HGLOBAL convert_to_handle_as_coded (Lisp_Object coding_system); |
| 90 | static Lisp_Object render (Lisp_Object oformat); | 90 | static Lisp_Object render (Lisp_Object oformat); |
| 91 | static Lisp_Object render_locale (void); | 91 | static Lisp_Object render_locale (void); |
| 92 | static Lisp_Object render_all (void); | 92 | static Lisp_Object render_all (Lisp_Object ignore); |
| 93 | static void run_protected (Lisp_Object (*code) (), Lisp_Object arg); | 93 | static void run_protected (Lisp_Object (*code) (Lisp_Object), Lisp_Object arg); |
| 94 | static Lisp_Object lisp_error_handler (Lisp_Object error); | 94 | static Lisp_Object lisp_error_handler (Lisp_Object error); |
| 95 | static LRESULT CALLBACK owner_callback (HWND win, UINT msg, | 95 | static LRESULT CALLBACK owner_callback (HWND win, UINT msg, |
| 96 | WPARAM wp, LPARAM lp); | 96 | WPARAM wp, LPARAM lp); |
| @@ -220,7 +220,7 @@ convert_to_handle_as_coded (Lisp_Object coding_system) | |||
| 220 | unsigned char *dst = NULL; | 220 | unsigned char *dst = NULL; |
| 221 | struct coding_system coding; | 221 | struct coding_system coding; |
| 222 | 222 | ||
| 223 | ONTRACE (fprintf (stderr, "convert_to_handle_as_coded: %s\n", | 223 | ONTRACE (fprintf (stderr, "convert_to_handle_as_coded: %s\n", |
| 224 | SDATA (SYMBOL_NAME (coding_system)))); | 224 | SDATA (SYMBOL_NAME (coding_system)))); |
| 225 | 225 | ||
| 226 | setup_windows_coding_system (coding_system, &coding); | 226 | setup_windows_coding_system (coding_system, &coding); |
| @@ -334,7 +334,7 @@ render_locale (void) | |||
| 334 | data survives us. This code will do that. */ | 334 | data survives us. This code will do that. */ |
| 335 | 335 | ||
| 336 | static Lisp_Object | 336 | static Lisp_Object |
| 337 | render_all (void) | 337 | render_all (Lisp_Object ignore) |
| 338 | { | 338 | { |
| 339 | ONTRACE (fprintf (stderr, "render_all\n")); | 339 | ONTRACE (fprintf (stderr, "render_all\n")); |
| 340 | 340 | ||
| @@ -392,7 +392,7 @@ render_all (void) | |||
| 392 | } | 392 | } |
| 393 | 393 | ||
| 394 | static void | 394 | static void |
| 395 | run_protected (Lisp_Object (*code) (), Lisp_Object arg) | 395 | run_protected (Lisp_Object (*code) (Lisp_Object), Lisp_Object arg) |
| 396 | { | 396 | { |
| 397 | /* FIXME: This works but it doesn't feel right. Too much fiddling | 397 | /* FIXME: This works but it doesn't feel right. Too much fiddling |
| 398 | with global variables and calling strange looking functions. Is | 398 | with global variables and calling strange looking functions. Is |
| @@ -514,7 +514,7 @@ setup_config (void) | |||
| 514 | && EQ (cfg_coding_system, dos_coding_system)) | 514 | && EQ (cfg_coding_system, dos_coding_system)) |
| 515 | return; | 515 | return; |
| 516 | cfg_coding_system = dos_coding_system; | 516 | cfg_coding_system = dos_coding_system; |
| 517 | 517 | ||
| 518 | /* Set some sensible fallbacks */ | 518 | /* Set some sensible fallbacks */ |
| 519 | cfg_codepage = ANSICP; | 519 | cfg_codepage = ANSICP; |
| 520 | cfg_lcid = LOCALE_NEUTRAL; | 520 | cfg_lcid = LOCALE_NEUTRAL; |
| @@ -583,7 +583,7 @@ enum_locale_callback (/*const*/ char* loc_string) | |||
| 583 | cfg_clipboard_type = CF_TEXT; | 583 | cfg_clipboard_type = CF_TEXT; |
| 584 | return FALSE; /* Stop enumeration */ | 584 | return FALSE; /* Stop enumeration */ |
| 585 | } | 585 | } |
| 586 | 586 | ||
| 587 | /* Is the wanted codepage the OEM codepage for this locale? */ | 587 | /* Is the wanted codepage the OEM codepage for this locale? */ |
| 588 | codepage = cp_from_locale (lcid, CF_OEMTEXT); | 588 | codepage = cp_from_locale (lcid, CF_OEMTEXT); |
| 589 | if (codepage == cfg_codepage) | 589 | if (codepage == cfg_codepage) |
| @@ -704,7 +704,7 @@ DEFUN ("w32-set-clipboard-data", Fw32_set_clipboard_data, | |||
| 704 | current_lcid = cfg_lcid; | 704 | current_lcid = cfg_lcid; |
| 705 | current_num_nls = 0; | 705 | current_num_nls = 0; |
| 706 | current_requires_encoding = 0; | 706 | current_requires_encoding = 0; |
| 707 | 707 | ||
| 708 | BLOCK_INPUT; | 708 | BLOCK_INPUT; |
| 709 | 709 | ||
| 710 | /* Check for non-ASCII characters. While we are at it, count the | 710 | /* Check for non-ASCII characters. While we are at it, count the |
| @@ -884,7 +884,7 @@ DEFUN ("w32-get-clipboard-data", Fw32_get_clipboard_data, | |||
| 884 | struct coding_system coding; | 884 | struct coding_system coding; |
| 885 | Lisp_Object coding_system = Qnil; | 885 | Lisp_Object coding_system = Qnil; |
| 886 | Lisp_Object dos_coding_system; | 886 | Lisp_Object dos_coding_system; |
| 887 | 887 | ||
| 888 | /* `next-selection-coding-system' should override everything, | 888 | /* `next-selection-coding-system' should override everything, |
| 889 | even when the locale passed by the system disagrees. The | 889 | even when the locale passed by the system disagrees. The |
| 890 | only exception is when `next-selection-coding-system' | 890 | only exception is when `next-selection-coding-system' |
| @@ -1065,7 +1065,7 @@ and t is the same as `SECONDARY'. */) | |||
| 1065 | dumped version. */ | 1065 | dumped version. */ |
| 1066 | 1066 | ||
| 1067 | void | 1067 | void |
| 1068 | syms_of_w32select () | 1068 | syms_of_w32select (void) |
| 1069 | { | 1069 | { |
| 1070 | defsubr (&Sw32_set_clipboard_data); | 1070 | defsubr (&Sw32_set_clipboard_data); |
| 1071 | defsubr (&Sw32_get_clipboard_data); | 1071 | defsubr (&Sw32_get_clipboard_data); |
| @@ -1076,7 +1076,7 @@ syms_of_w32select () | |||
| 1076 | When sending or receiving text via cut_buffer, selection, and | 1076 | When sending or receiving text via cut_buffer, selection, and |
| 1077 | clipboard, the text is encoded or decoded by this coding system. | 1077 | clipboard, the text is encoded or decoded by this coding system. |
| 1078 | The default value is the current system default encoding on 9x/Me and | 1078 | The default value is the current system default encoding on 9x/Me and |
| 1079 | `utf-16le-dos' (Unicode) on NT/W2K/XP. */); | 1079 | `utf-16le-dos' (Unicode) on NT/W2K/XP. */); |
| 1080 | /* The actual value is set dynamically in the dumped Emacs, see | 1080 | /* The actual value is set dynamically in the dumped Emacs, see |
| 1081 | below. */ | 1081 | below. */ |
| 1082 | Vselection_coding_system = Qnil; | 1082 | Vselection_coding_system = Qnil; |
| @@ -1104,7 +1104,7 @@ set to nil. */); | |||
| 1104 | un-dumped version. */ | 1104 | un-dumped version. */ |
| 1105 | 1105 | ||
| 1106 | void | 1106 | void |
| 1107 | globals_of_w32select () | 1107 | globals_of_w32select (void) |
| 1108 | { | 1108 | { |
| 1109 | DEFAULT_LCID = GetUserDefaultLCID (); | 1109 | DEFAULT_LCID = GetUserDefaultLCID (); |
| 1110 | /* Drop the sort order from the LCID, so we can compare this with | 1110 | /* Drop the sort order from the LCID, so we can compare this with |
diff --git a/src/w32term.c b/src/w32term.c index 1acb77e7b16..5dfe6a363d3 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -96,7 +96,7 @@ int x_underline_at_descent_line; | |||
| 96 | 96 | ||
| 97 | extern unsigned int msh_mousewheel; | 97 | extern unsigned int msh_mousewheel; |
| 98 | 98 | ||
| 99 | extern void free_frame_menubar (); | 99 | extern void free_frame_menubar (struct frame *); |
| 100 | 100 | ||
| 101 | extern int w32_codepage_for_font (char *fontname); | 101 | extern int w32_codepage_for_font (char *fontname); |
| 102 | extern Cursor w32_load_cursor (LPCTSTR name); | 102 | extern Cursor w32_load_cursor (LPCTSTR name); |
| @@ -294,9 +294,7 @@ struct record event_record[100]; | |||
| 294 | 294 | ||
| 295 | int event_record_index; | 295 | int event_record_index; |
| 296 | 296 | ||
| 297 | record_event (locus, type) | 297 | record_event (char *locus, int type) |
| 298 | char *locus; | ||
| 299 | int type; | ||
| 300 | { | 298 | { |
| 301 | if (event_record_index == sizeof (event_record) / sizeof (struct record)) | 299 | if (event_record_index == sizeof (event_record) / sizeof (struct record)) |
| 302 | event_record_index = 0; | 300 | event_record_index = 0; |
| @@ -310,7 +308,7 @@ record_event (locus, type) | |||
| 310 | 308 | ||
| 311 | 309 | ||
| 312 | void | 310 | void |
| 313 | XChangeGC (void * ignore, XGCValues* gc, unsigned long mask, | 311 | XChangeGC (void *ignore, XGCValues *gc, unsigned long mask, |
| 314 | XGCValues *xgcv) | 312 | XGCValues *xgcv) |
| 315 | { | 313 | { |
| 316 | if (mask & GCForeground) | 314 | if (mask & GCForeground) |
| @@ -321,8 +319,8 @@ XChangeGC (void * ignore, XGCValues* gc, unsigned long mask, | |||
| 321 | gc->font = xgcv->font; | 319 | gc->font = xgcv->font; |
| 322 | } | 320 | } |
| 323 | 321 | ||
| 324 | XGCValues *XCreateGC (void * ignore, Window window, unsigned long mask, | 322 | XGCValues * |
| 325 | XGCValues *xgcv) | 323 | XCreateGC (void *ignore, Window window, unsigned long mask, XGCValues *xgcv) |
| 326 | { | 324 | { |
| 327 | XGCValues *gc = (XGCValues *) xmalloc (sizeof (XGCValues)); | 325 | XGCValues *gc = (XGCValues *) xmalloc (sizeof (XGCValues)); |
| 328 | bzero (gc, sizeof (XGCValues)); | 326 | bzero (gc, sizeof (XGCValues)); |
| @@ -333,8 +331,8 @@ XGCValues *XCreateGC (void * ignore, Window window, unsigned long mask, | |||
| 333 | } | 331 | } |
| 334 | 332 | ||
| 335 | void | 333 | void |
| 336 | XGetGCValues (void* ignore, XGCValues *gc, | 334 | XGetGCValues (void *ignore, XGCValues *gc, |
| 337 | unsigned long mask, XGCValues *xgcv) | 335 | unsigned long mask, XGCValues *xgcv) |
| 338 | { | 336 | { |
| 339 | XChangeGC (ignore, xgcv, mask, gc); | 337 | XChangeGC (ignore, xgcv, mask, gc); |
| 340 | } | 338 | } |
| @@ -376,11 +374,7 @@ w32_draw_rectangle (HDC hdc, XGCValues *gc, int x, int y, | |||
| 376 | 374 | ||
| 377 | /* Draw a filled rectangle at the specified position. */ | 375 | /* Draw a filled rectangle at the specified position. */ |
| 378 | void | 376 | void |
| 379 | w32_fill_rect (f, hdc, pix, lprect) | 377 | w32_fill_rect (FRAME_PTR f, HDC hdc, COLORREF pix, RECT *lprect) |
| 380 | FRAME_PTR f; | ||
| 381 | HDC hdc; | ||
| 382 | COLORREF pix; | ||
| 383 | RECT * lprect; | ||
| 384 | { | 378 | { |
| 385 | HBRUSH hb; | 379 | HBRUSH hb; |
| 386 | 380 | ||
| @@ -390,8 +384,7 @@ w32_fill_rect (f, hdc, pix, lprect) | |||
| 390 | } | 384 | } |
| 391 | 385 | ||
| 392 | void | 386 | void |
| 393 | w32_clear_window (f) | 387 | w32_clear_window (FRAME_PTR f) |
| 394 | FRAME_PTR f; | ||
| 395 | { | 388 | { |
| 396 | RECT rect; | 389 | RECT rect; |
| 397 | HDC hdc = get_frame_dc (f); | 390 | HDC hdc = get_frame_dc (f); |
| @@ -411,8 +404,7 @@ w32_clear_window (f) | |||
| 411 | #define OPAQUE_FRAME 255 | 404 | #define OPAQUE_FRAME 255 |
| 412 | 405 | ||
| 413 | void | 406 | void |
| 414 | x_set_frame_alpha (f) | 407 | x_set_frame_alpha (struct frame *f) |
| 415 | struct frame *f; | ||
| 416 | { | 408 | { |
| 417 | struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (f); | 409 | struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (f); |
| 418 | double alpha = 1.0; | 410 | double alpha = 1.0; |
| @@ -458,8 +450,7 @@ x_set_frame_alpha (f) | |||
| 458 | } | 450 | } |
| 459 | 451 | ||
| 460 | int | 452 | int |
| 461 | x_display_pixel_height (dpyinfo) | 453 | x_display_pixel_height (struct w32_display_info *dpyinfo) |
| 462 | struct w32_display_info *dpyinfo; | ||
| 463 | { | 454 | { |
| 464 | HDC dc = GetDC (NULL); | 455 | HDC dc = GetDC (NULL); |
| 465 | int pixels = GetDeviceCaps (dc, VERTRES); | 456 | int pixels = GetDeviceCaps (dc, VERTRES); |
| @@ -468,8 +459,7 @@ x_display_pixel_height (dpyinfo) | |||
| 468 | } | 459 | } |
| 469 | 460 | ||
| 470 | int | 461 | int |
| 471 | x_display_pixel_width (dpyinfo) | 462 | x_display_pixel_width (struct w32_display_info *dpyinfo) |
| 472 | struct w32_display_info *dpyinfo; | ||
| 473 | { | 463 | { |
| 474 | HDC dc = GetDC (NULL); | 464 | HDC dc = GetDC (NULL); |
| 475 | int pixels = GetDeviceCaps (dc, HORZRES); | 465 | int pixels = GetDeviceCaps (dc, HORZRES); |
| @@ -488,8 +478,7 @@ x_display_pixel_width (dpyinfo) | |||
| 488 | each window being updated. */ | 478 | each window being updated. */ |
| 489 | 479 | ||
| 490 | static void | 480 | static void |
| 491 | x_update_begin (f) | 481 | x_update_begin (struct frame *f) |
| 492 | struct frame *f; | ||
| 493 | { | 482 | { |
| 494 | struct w32_display_info *display_info = FRAME_W32_DISPLAY_INFO (f); | 483 | struct w32_display_info *display_info = FRAME_W32_DISPLAY_INFO (f); |
| 495 | 484 | ||
| @@ -511,8 +500,7 @@ x_update_begin (f) | |||
| 511 | position of W. */ | 500 | position of W. */ |
| 512 | 501 | ||
| 513 | static void | 502 | static void |
| 514 | x_update_window_begin (w) | 503 | x_update_window_begin (struct window *w) |
| 515 | struct window *w; | ||
| 516 | { | 504 | { |
| 517 | struct frame *f = XFRAME (WINDOW_FRAME (w)); | 505 | struct frame *f = XFRAME (WINDOW_FRAME (w)); |
| 518 | struct w32_display_info *display_info = FRAME_W32_DISPLAY_INFO (f); | 506 | struct w32_display_info *display_info = FRAME_W32_DISPLAY_INFO (f); |
| @@ -571,9 +559,7 @@ x_update_window_begin (w) | |||
| 571 | /* Draw a vertical window border from (x,y0) to (x,y1) */ | 559 | /* Draw a vertical window border from (x,y0) to (x,y1) */ |
| 572 | 560 | ||
| 573 | static void | 561 | static void |
| 574 | w32_draw_vertical_window_border (w, x, y0, y1) | 562 | w32_draw_vertical_window_border (struct window *w, int x, int y0, int y1) |
| 575 | struct window *w; | ||
| 576 | int x, y0, y1; | ||
| 577 | { | 563 | { |
| 578 | struct frame *f = XFRAME (WINDOW_FRAME (w)); | 564 | struct frame *f = XFRAME (WINDOW_FRAME (w)); |
| 579 | RECT r; | 565 | RECT r; |
| @@ -610,9 +596,8 @@ w32_draw_vertical_window_border (w, x, y0, y1) | |||
| 610 | here. */ | 596 | here. */ |
| 611 | 597 | ||
| 612 | static void | 598 | static void |
| 613 | x_update_window_end (w, cursor_on_p, mouse_face_overwritten_p) | 599 | x_update_window_end (struct window *w, int cursor_on_p, |
| 614 | struct window *w; | 600 | int mouse_face_overwritten_p) |
| 615 | int cursor_on_p, mouse_face_overwritten_p; | ||
| 616 | { | 601 | { |
| 617 | struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (XFRAME (w->frame)); | 602 | struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (XFRAME (w->frame)); |
| 618 | 603 | ||
| @@ -656,8 +641,7 @@ x_update_window_end (w, cursor_on_p, mouse_face_overwritten_p) | |||
| 656 | update_end. */ | 641 | update_end. */ |
| 657 | 642 | ||
| 658 | static void | 643 | static void |
| 659 | x_update_end (f) | 644 | x_update_end (struct frame *f) |
| 660 | struct frame *f; | ||
| 661 | { | 645 | { |
| 662 | if (! FRAME_W32_P (f)) | 646 | if (! FRAME_W32_P (f)) |
| 663 | return; | 647 | return; |
| @@ -672,8 +656,7 @@ x_update_end (f) | |||
| 672 | updated_window is not available here. */ | 656 | updated_window is not available here. */ |
| 673 | 657 | ||
| 674 | static void | 658 | static void |
| 675 | w32_frame_up_to_date (f) | 659 | w32_frame_up_to_date (struct frame *f) |
| 676 | struct frame *f; | ||
| 677 | { | 660 | { |
| 678 | if (FRAME_W32_P (f)) | 661 | if (FRAME_W32_P (f)) |
| 679 | { | 662 | { |
| @@ -702,8 +685,7 @@ w32_frame_up_to_date (f) | |||
| 702 | between bitmaps to be drawn between current row and DESIRED_ROW. */ | 685 | between bitmaps to be drawn between current row and DESIRED_ROW. */ |
| 703 | 686 | ||
| 704 | static void | 687 | static void |
| 705 | x_after_update_window_line (desired_row) | 688 | x_after_update_window_line (struct glyph_row *desired_row) |
| 706 | struct glyph_row *desired_row; | ||
| 707 | { | 689 | { |
| 708 | struct window *w = updated_window; | 690 | struct window *w = updated_window; |
| 709 | struct frame *f; | 691 | struct frame *f; |
| @@ -749,10 +731,8 @@ x_after_update_window_line (desired_row) | |||
| 749 | drawn. */ | 731 | drawn. */ |
| 750 | 732 | ||
| 751 | static void | 733 | static void |
| 752 | w32_draw_fringe_bitmap (w, row, p) | 734 | w32_draw_fringe_bitmap (struct window *w, struct glyph_row *row, |
| 753 | struct window *w; | 735 | struct draw_fringe_bitmap_params *p) |
| 754 | struct glyph_row *row; | ||
| 755 | struct draw_fringe_bitmap_params *p; | ||
| 756 | { | 736 | { |
| 757 | struct frame *f = XFRAME (WINDOW_FRAME (w)); | 737 | struct frame *f = XFRAME (WINDOW_FRAME (w)); |
| 758 | HDC hdc; | 738 | HDC hdc; |
| @@ -890,10 +870,7 @@ w32_draw_fringe_bitmap (w, row, p) | |||
| 890 | } | 870 | } |
| 891 | 871 | ||
| 892 | static void | 872 | static void |
| 893 | w32_define_fringe_bitmap (which, bits, h, wd) | 873 | w32_define_fringe_bitmap (int which, unsigned short *bits, int h, int wd) |
| 894 | int which; | ||
| 895 | unsigned short *bits; | ||
| 896 | int h, wd; | ||
| 897 | { | 874 | { |
| 898 | if (which >= max_fringe_bmp) | 875 | if (which >= max_fringe_bmp) |
| 899 | { | 876 | { |
| @@ -908,8 +885,7 @@ w32_define_fringe_bitmap (which, bits, h, wd) | |||
| 908 | } | 885 | } |
| 909 | 886 | ||
| 910 | static void | 887 | static void |
| 911 | w32_destroy_fringe_bitmap (which) | 888 | w32_destroy_fringe_bitmap (int which) |
| 912 | int which; | ||
| 913 | { | 889 | { |
| 914 | if (which >= max_fringe_bmp) | 890 | if (which >= max_fringe_bmp) |
| 915 | return; | 891 | return; |
| @@ -979,8 +955,7 @@ static void w32_draw_box_rect (struct glyph_string *, int, int, int, int, | |||
| 979 | face. */ | 955 | face. */ |
| 980 | 956 | ||
| 981 | static void | 957 | static void |
| 982 | x_set_cursor_gc (s) | 958 | x_set_cursor_gc (struct glyph_string *s) |
| 983 | struct glyph_string *s; | ||
| 984 | { | 959 | { |
| 985 | if (s->font == FRAME_FONT (s->f) | 960 | if (s->font == FRAME_FONT (s->f) |
| 986 | && s->face->background == FRAME_BACKGROUND_PIXEL (s->f) | 961 | && s->face->background == FRAME_BACKGROUND_PIXEL (s->f) |
| @@ -1031,8 +1006,7 @@ x_set_cursor_gc (s) | |||
| 1031 | /* Set up S->gc of glyph string S for drawing text in mouse face. */ | 1006 | /* Set up S->gc of glyph string S for drawing text in mouse face. */ |
| 1032 | 1007 | ||
| 1033 | static void | 1008 | static void |
| 1034 | x_set_mouse_face_gc (s) | 1009 | x_set_mouse_face_gc (struct glyph_string *s) |
| 1035 | struct glyph_string *s; | ||
| 1036 | { | 1010 | { |
| 1037 | int face_id; | 1011 | int face_id; |
| 1038 | struct face *face; | 1012 | struct face *face; |
| @@ -1085,8 +1059,7 @@ x_set_mouse_face_gc (s) | |||
| 1085 | matrix was built, so there isn't much to do, here. */ | 1059 | matrix was built, so there isn't much to do, here. */ |
| 1086 | 1060 | ||
| 1087 | static INLINE void | 1061 | static INLINE void |
| 1088 | x_set_mode_line_face_gc (s) | 1062 | x_set_mode_line_face_gc (struct glyph_string *s) |
| 1089 | struct glyph_string *s; | ||
| 1090 | { | 1063 | { |
| 1091 | s->gc = s->face->gc; | 1064 | s->gc = s->face->gc; |
| 1092 | } | 1065 | } |
| @@ -1097,8 +1070,7 @@ x_set_mode_line_face_gc (s) | |||
| 1097 | pattern. */ | 1070 | pattern. */ |
| 1098 | 1071 | ||
| 1099 | static INLINE void | 1072 | static INLINE void |
| 1100 | x_set_glyph_string_gc (s) | 1073 | x_set_glyph_string_gc (struct glyph_string *s) |
| 1101 | struct glyph_string *s; | ||
| 1102 | { | 1074 | { |
| 1103 | PREPARE_FACE_FOR_DISPLAY (s->f, s->face); | 1075 | PREPARE_FACE_FOR_DISPLAY (s->f, s->face); |
| 1104 | 1076 | ||
| @@ -1143,8 +1115,7 @@ x_set_glyph_string_gc (s) | |||
| 1143 | line or menu if we don't have X toolkit support. */ | 1115 | line or menu if we don't have X toolkit support. */ |
| 1144 | 1116 | ||
| 1145 | static INLINE void | 1117 | static INLINE void |
| 1146 | x_set_glyph_string_clipping (s) | 1118 | x_set_glyph_string_clipping (struct glyph_string *s) |
| 1147 | struct glyph_string *s; | ||
| 1148 | { | 1119 | { |
| 1149 | RECT *r = s->clip; | 1120 | RECT *r = s->clip; |
| 1150 | int n = get_glyph_string_clip_rects (s, r, 2); | 1121 | int n = get_glyph_string_clip_rects (s, r, 2); |
| @@ -1172,8 +1143,8 @@ x_set_glyph_string_clipping (s) | |||
| 1172 | the area of SRC. */ | 1143 | the area of SRC. */ |
| 1173 | 1144 | ||
| 1174 | static void | 1145 | static void |
| 1175 | x_set_glyph_string_clipping_exactly (src, dst) | 1146 | x_set_glyph_string_clipping_exactly (struct glyph_string *src, |
| 1176 | struct glyph_string *src, *dst; | 1147 | struct glyph_string *dst) |
| 1177 | { | 1148 | { |
| 1178 | RECT r; | 1149 | RECT r; |
| 1179 | 1150 | ||
| @@ -1190,8 +1161,7 @@ x_set_glyph_string_clipping_exactly (src, dst) | |||
| 1190 | Compute left and right overhang of glyph string S. */ | 1161 | Compute left and right overhang of glyph string S. */ |
| 1191 | 1162 | ||
| 1192 | static void | 1163 | static void |
| 1193 | w32_compute_glyph_string_overhangs (s) | 1164 | w32_compute_glyph_string_overhangs (struct glyph_string *s) |
| 1194 | struct glyph_string *s; | ||
| 1195 | { | 1165 | { |
| 1196 | if (s->cmp == NULL | 1166 | if (s->cmp == NULL |
| 1197 | && s->first_glyph->type == CHAR_GLYPH | 1167 | && s->first_glyph->type == CHAR_GLYPH |
| @@ -1219,9 +1189,8 @@ w32_compute_glyph_string_overhangs (s) | |||
| 1219 | /* Fill rectangle X, Y, W, H with background color of glyph string S. */ | 1189 | /* Fill rectangle X, Y, W, H with background color of glyph string S. */ |
| 1220 | 1190 | ||
| 1221 | static INLINE void | 1191 | static INLINE void |
| 1222 | x_clear_glyph_string_rect (s, x, y, w, h) | 1192 | x_clear_glyph_string_rect (struct glyph_string *s, |
| 1223 | struct glyph_string *s; | 1193 | int x, int y, int w, int h) |
| 1224 | int x, y, w, h; | ||
| 1225 | { | 1194 | { |
| 1226 | int real_x = x; | 1195 | int real_x = x; |
| 1227 | int real_y = y; | 1196 | int real_y = y; |
| @@ -1251,9 +1220,7 @@ x_clear_glyph_string_rect (s, x, y, w, h) | |||
| 1251 | contains the first component of a composition. */ | 1220 | contains the first component of a composition. */ |
| 1252 | 1221 | ||
| 1253 | static void | 1222 | static void |
| 1254 | x_draw_glyph_string_background (s, force_p) | 1223 | x_draw_glyph_string_background (struct glyph_string *s, int force_p) |
| 1255 | struct glyph_string *s; | ||
| 1256 | int force_p; | ||
| 1257 | { | 1224 | { |
| 1258 | /* Nothing to do if background has already been drawn or if it | 1225 | /* Nothing to do if background has already been drawn or if it |
| 1259 | shouldn't be drawn in the first place. */ | 1226 | shouldn't be drawn in the first place. */ |
| @@ -1292,8 +1259,7 @@ x_draw_glyph_string_background (s, force_p) | |||
| 1292 | /* Draw the foreground of glyph string S. */ | 1259 | /* Draw the foreground of glyph string S. */ |
| 1293 | 1260 | ||
| 1294 | static void | 1261 | static void |
| 1295 | x_draw_glyph_string_foreground (s) | 1262 | x_draw_glyph_string_foreground (struct glyph_string *s) |
| 1296 | struct glyph_string *s; | ||
| 1297 | { | 1263 | { |
| 1298 | int i, x; | 1264 | int i, x; |
| 1299 | 1265 | ||
| @@ -1350,8 +1316,7 @@ x_draw_glyph_string_foreground (s) | |||
| 1350 | /* Draw the foreground of composite glyph string S. */ | 1316 | /* Draw the foreground of composite glyph string S. */ |
| 1351 | 1317 | ||
| 1352 | static void | 1318 | static void |
| 1353 | x_draw_composite_glyph_string_foreground (s) | 1319 | x_draw_composite_glyph_string_foreground (struct glyph_string *s) |
| 1354 | struct glyph_string *s; | ||
| 1355 | { | 1320 | { |
| 1356 | int i, j, x; | 1321 | int i, j, x; |
| 1357 | struct font *font = s->font; | 1322 | struct font *font = s->font; |
| @@ -1464,11 +1429,8 @@ x_draw_composite_glyph_string_foreground (s) | |||
| 1464 | Value is non-zero if successful. */ | 1429 | Value is non-zero if successful. */ |
| 1465 | 1430 | ||
| 1466 | static int | 1431 | static int |
| 1467 | w32_alloc_lighter_color (f, color, factor, delta) | 1432 | w32_alloc_lighter_color (struct frame *f, COLORREF *color, |
| 1468 | struct frame *f; | 1433 | double factor, int delta) |
| 1469 | COLORREF *color; | ||
| 1470 | double factor; | ||
| 1471 | int delta; | ||
| 1472 | { | 1434 | { |
| 1473 | COLORREF new; | 1435 | COLORREF new; |
| 1474 | long bright; | 1436 | long bright; |
| @@ -1527,10 +1489,7 @@ w32_alloc_lighter_color (f, color, factor, delta) | |||
| 1527 | colors in COLORS. On W32, we no longer try to map colors to | 1489 | colors in COLORS. On W32, we no longer try to map colors to |
| 1528 | a palette. */ | 1490 | a palette. */ |
| 1529 | void | 1491 | void |
| 1530 | x_query_colors (f, colors, ncolors) | 1492 | x_query_colors (struct frame *f, XColor *colors, int ncolors) |
| 1531 | struct frame *f; | ||
| 1532 | XColor *colors; | ||
| 1533 | int ncolors; | ||
| 1534 | { | 1493 | { |
| 1535 | int i; | 1494 | int i; |
| 1536 | 1495 | ||
| @@ -1545,9 +1504,7 @@ x_query_colors (f, colors, ncolors) | |||
| 1545 | } | 1504 | } |
| 1546 | 1505 | ||
| 1547 | void | 1506 | void |
| 1548 | x_query_color (f, color) | 1507 | x_query_color (struct frame *f, XColor *color) |
| 1549 | struct frame *f; | ||
| 1550 | XColor *color; | ||
| 1551 | { | 1508 | { |
| 1552 | x_query_colors (f, color, 1); | 1509 | x_query_colors (f, color, 1); |
| 1553 | } | 1510 | } |
| @@ -1561,12 +1518,8 @@ x_query_color (f, color) | |||
| 1561 | be allocated, use DEFAULT_PIXEL, instead. */ | 1518 | be allocated, use DEFAULT_PIXEL, instead. */ |
| 1562 | 1519 | ||
| 1563 | static void | 1520 | static void |
| 1564 | w32_setup_relief_color (f, relief, factor, delta, default_pixel) | 1521 | w32_setup_relief_color (struct frame *f, struct relief *relief, double factor, |
| 1565 | struct frame *f; | 1522 | int delta, COLORREF default_pixel) |
| 1566 | struct relief *relief; | ||
| 1567 | double factor; | ||
| 1568 | int delta; | ||
| 1569 | COLORREF default_pixel; | ||
| 1570 | { | 1523 | { |
| 1571 | XGCValues xgcv; | 1524 | XGCValues xgcv; |
| 1572 | struct w32_output *di = f->output_data.w32; | 1525 | struct w32_output *di = f->output_data.w32; |
| @@ -1602,8 +1555,7 @@ w32_setup_relief_color (f, relief, factor, delta, default_pixel) | |||
| 1602 | /* Set up colors for the relief lines around glyph string S. */ | 1555 | /* Set up colors for the relief lines around glyph string S. */ |
| 1603 | 1556 | ||
| 1604 | static void | 1557 | static void |
| 1605 | x_setup_relief_colors (s) | 1558 | x_setup_relief_colors (struct glyph_string *s) |
| 1606 | struct glyph_string *s; | ||
| 1607 | { | 1559 | { |
| 1608 | struct w32_output *di = s->f->output_data.w32; | 1560 | struct w32_output *di = s->f->output_data.w32; |
| 1609 | COLORREF color; | 1561 | COLORREF color; |
| @@ -1638,12 +1590,10 @@ x_setup_relief_colors (s) | |||
| 1638 | when drawing. */ | 1590 | when drawing. */ |
| 1639 | 1591 | ||
| 1640 | static void | 1592 | static void |
| 1641 | w32_draw_relief_rect (f, left_x, top_y, right_x, bottom_y, width, | 1593 | w32_draw_relief_rect (struct frame *f, |
| 1642 | raised_p, top_p, bot_p, left_p, right_p, clip_rect) | 1594 | int left_x, int top_y, int right_x, int bottom_y, int width, |
| 1643 | struct frame *f; | 1595 | int raised_p, int top_p, int bot_p, int left_p, int right_p, |
| 1644 | int left_x, top_y, right_x, bottom_y, width; | 1596 | RECT *clip_rect) |
| 1645 | int top_p, bot_p, left_p, right_p, raised_p; | ||
| 1646 | RECT *clip_rect; | ||
| 1647 | { | 1597 | { |
| 1648 | int i; | 1598 | int i; |
| 1649 | XGCValues gc; | 1599 | XGCValues gc; |
| @@ -1703,11 +1653,9 @@ w32_draw_relief_rect (f, left_x, top_y, right_x, bottom_y, width, | |||
| 1703 | rectangle to use when drawing. */ | 1653 | rectangle to use when drawing. */ |
| 1704 | 1654 | ||
| 1705 | static void | 1655 | static void |
| 1706 | w32_draw_box_rect (s, left_x, top_y, right_x, bottom_y, width, | 1656 | w32_draw_box_rect (struct glyph_string *s, |
| 1707 | left_p, right_p, clip_rect) | 1657 | int left_x, int top_y, int right_x, int bottom_y, int width, |
| 1708 | struct glyph_string *s; | 1658 | int left_p, int right_p, RECT *clip_rect) |
| 1709 | int left_x, top_y, right_x, bottom_y, width, left_p, right_p; | ||
| 1710 | RECT *clip_rect; | ||
| 1711 | { | 1659 | { |
| 1712 | w32_set_clip_rectangle (s->hdc, clip_rect); | 1660 | w32_set_clip_rectangle (s->hdc, clip_rect); |
| 1713 | 1661 | ||
| @@ -1740,8 +1688,7 @@ w32_draw_box_rect (s, left_x, top_y, right_x, bottom_y, width, | |||
| 1740 | /* Draw a box around glyph string S. */ | 1688 | /* Draw a box around glyph string S. */ |
| 1741 | 1689 | ||
| 1742 | static void | 1690 | static void |
| 1743 | x_draw_glyph_string_box (s) | 1691 | x_draw_glyph_string_box (struct glyph_string *s) |
| 1744 | struct glyph_string *s; | ||
| 1745 | { | 1692 | { |
| 1746 | int width, left_x, right_x, top_y, bottom_y, last_x, raised_p; | 1693 | int width, left_x, right_x, top_y, bottom_y, last_x, raised_p; |
| 1747 | int left_p, right_p; | 1694 | int left_p, right_p; |
| @@ -1792,8 +1739,7 @@ x_draw_glyph_string_box (s) | |||
| 1792 | /* Draw foreground of image glyph string S. */ | 1739 | /* Draw foreground of image glyph string S. */ |
| 1793 | 1740 | ||
| 1794 | static void | 1741 | static void |
| 1795 | x_draw_image_foreground (s) | 1742 | x_draw_image_foreground (struct glyph_string *s) |
| 1796 | struct glyph_string *s; | ||
| 1797 | { | 1743 | { |
| 1798 | int x = s->x; | 1744 | int x = s->x; |
| 1799 | int y = s->ybase - image_ascent (s->img, s->face, &s->slice); | 1745 | int y = s->ybase - image_ascent (s->img, s->face, &s->slice); |
| @@ -1883,8 +1829,7 @@ x_draw_image_foreground (s) | |||
| 1883 | /* Draw a relief around the image glyph string S. */ | 1829 | /* Draw a relief around the image glyph string S. */ |
| 1884 | 1830 | ||
| 1885 | static void | 1831 | static void |
| 1886 | x_draw_image_relief (s) | 1832 | x_draw_image_relief (struct glyph_string *s) |
| 1887 | struct glyph_string *s; | ||
| 1888 | { | 1833 | { |
| 1889 | int x0, y0, x1, y1, thick, raised_p; | 1834 | int x0, y0, x1, y1, thick, raised_p; |
| 1890 | RECT r; | 1835 | RECT r; |
| @@ -1936,9 +1881,7 @@ x_draw_image_relief (s) | |||
| 1936 | /* Draw the foreground of image glyph string S to PIXMAP. */ | 1881 | /* Draw the foreground of image glyph string S to PIXMAP. */ |
| 1937 | 1882 | ||
| 1938 | static void | 1883 | static void |
| 1939 | w32_draw_image_foreground_1 (s, pixmap) | 1884 | w32_draw_image_foreground_1 (struct glyph_string *s, HBITMAP pixmap) |
| 1940 | struct glyph_string *s; | ||
| 1941 | HBITMAP pixmap; | ||
| 1942 | { | 1885 | { |
| 1943 | HDC hdc = CreateCompatibleDC (s->hdc); | 1886 | HDC hdc = CreateCompatibleDC (s->hdc); |
| 1944 | HGDIOBJ orig_hdc_obj = SelectObject (hdc, pixmap); | 1887 | HGDIOBJ orig_hdc_obj = SelectObject (hdc, pixmap); |
| @@ -2025,9 +1968,7 @@ w32_draw_image_foreground_1 (s, pixmap) | |||
| 2025 | give the rectangle to draw. */ | 1968 | give the rectangle to draw. */ |
| 2026 | 1969 | ||
| 2027 | static void | 1970 | static void |
| 2028 | x_draw_glyph_string_bg_rect (s, x, y, w, h) | 1971 | x_draw_glyph_string_bg_rect (struct glyph_string *s, int x, int y, int w, int h) |
| 2029 | struct glyph_string *s; | ||
| 2030 | int x, y, w, h; | ||
| 2031 | { | 1972 | { |
| 2032 | #if 0 /* TODO: stipple */ | 1973 | #if 0 /* TODO: stipple */ |
| 2033 | if (s->stippled_p) | 1974 | if (s->stippled_p) |
| @@ -2058,8 +1999,7 @@ x_draw_glyph_string_bg_rect (s, x, y, w, h) | |||
| 2058 | */ | 1999 | */ |
| 2059 | 2000 | ||
| 2060 | static void | 2001 | static void |
| 2061 | x_draw_image_glyph_string (s) | 2002 | x_draw_image_glyph_string (struct glyph_string *s) |
| 2062 | struct glyph_string *s; | ||
| 2063 | { | 2003 | { |
| 2064 | int x, y; | 2004 | int x, y; |
| 2065 | int box_line_hwidth = eabs (s->face->box_line_width); | 2005 | int box_line_hwidth = eabs (s->face->box_line_width); |
| @@ -2172,8 +2112,7 @@ x_draw_image_glyph_string (s) | |||
| 2172 | /* Draw stretch glyph string S. */ | 2112 | /* Draw stretch glyph string S. */ |
| 2173 | 2113 | ||
| 2174 | static void | 2114 | static void |
| 2175 | x_draw_stretch_glyph_string (s) | 2115 | x_draw_stretch_glyph_string (struct glyph_string *s) |
| 2176 | struct glyph_string *s; | ||
| 2177 | { | 2116 | { |
| 2178 | xassert (s->first_glyph->type == STRETCH_GLYPH); | 2117 | xassert (s->first_glyph->type == STRETCH_GLYPH); |
| 2179 | 2118 | ||
| @@ -2255,8 +2194,7 @@ x_draw_stretch_glyph_string (s) | |||
| 2255 | /* Draw glyph string S. */ | 2194 | /* Draw glyph string S. */ |
| 2256 | 2195 | ||
| 2257 | static void | 2196 | static void |
| 2258 | x_draw_glyph_string (s) | 2197 | x_draw_glyph_string (struct glyph_string *s) |
| 2259 | struct glyph_string *s; | ||
| 2260 | { | 2198 | { |
| 2261 | int relief_drawn_p = 0; | 2199 | int relief_drawn_p = 0; |
| 2262 | 2200 | ||
| @@ -2502,9 +2440,8 @@ x_draw_glyph_string (s) | |||
| 2502 | /* Shift display to make room for inserted glyphs. */ | 2440 | /* Shift display to make room for inserted glyphs. */ |
| 2503 | 2441 | ||
| 2504 | void | 2442 | void |
| 2505 | w32_shift_glyphs_for_insert (f, x, y, width, height, shift_by) | 2443 | w32_shift_glyphs_for_insert (struct frame *f, int x, int y, |
| 2506 | struct frame *f; | 2444 | int width, int height, int shift_by) |
| 2507 | int x, y, width, height, shift_by; | ||
| 2508 | { | 2445 | { |
| 2509 | HDC hdc; | 2446 | HDC hdc; |
| 2510 | 2447 | ||
| @@ -2520,9 +2457,7 @@ w32_shift_glyphs_for_insert (f, x, y, width, height, shift_by) | |||
| 2520 | for X frames. */ | 2457 | for X frames. */ |
| 2521 | 2458 | ||
| 2522 | static void | 2459 | static void |
| 2523 | x_delete_glyphs (f, n) | 2460 | x_delete_glyphs (struct frame *f, register int n) |
| 2524 | struct frame *f; | ||
| 2525 | register int n; | ||
| 2526 | { | 2461 | { |
| 2527 | if (! FRAME_W32_P (f)) | 2462 | if (! FRAME_W32_P (f)) |
| 2528 | return; | 2463 | return; |
| @@ -2592,8 +2527,7 @@ w32_ring_bell (struct frame *f) | |||
| 2592 | that is bounded by calls to x_update_begin and x_update_end. */ | 2527 | that is bounded by calls to x_update_begin and x_update_end. */ |
| 2593 | 2528 | ||
| 2594 | static void | 2529 | static void |
| 2595 | w32_set_terminal_window (n) | 2530 | w32_set_terminal_window (struct frame *f, int n) |
| 2596 | register int n; | ||
| 2597 | { | 2531 | { |
| 2598 | /* This function intentionally left blank. */ | 2532 | /* This function intentionally left blank. */ |
| 2599 | } | 2533 | } |
| @@ -2607,9 +2541,7 @@ w32_set_terminal_window (n) | |||
| 2607 | lines or deleting -N lines at vertical position VPOS. */ | 2541 | lines or deleting -N lines at vertical position VPOS. */ |
| 2608 | 2542 | ||
| 2609 | static void | 2543 | static void |
| 2610 | x_ins_del_lines (f, vpos, n) | 2544 | x_ins_del_lines (struct frame *f, int vpos, int n) |
| 2611 | struct frame *f; | ||
| 2612 | int vpos, n; | ||
| 2613 | { | 2545 | { |
| 2614 | if (! FRAME_W32_P (f)) | 2546 | if (! FRAME_W32_P (f)) |
| 2615 | return; | 2547 | return; |
| @@ -2621,9 +2553,7 @@ x_ins_del_lines (f, vpos, n) | |||
| 2621 | /* Scroll part of the display as described by RUN. */ | 2553 | /* Scroll part of the display as described by RUN. */ |
| 2622 | 2554 | ||
| 2623 | static void | 2555 | static void |
| 2624 | x_scroll_run (w, run) | 2556 | x_scroll_run (struct window *w, struct run *run) |
| 2625 | struct window *w; | ||
| 2626 | struct run *run; | ||
| 2627 | { | 2557 | { |
| 2628 | struct frame *f = XFRAME (w->frame); | 2558 | struct frame *f = XFRAME (w->frame); |
| 2629 | int x, y, width, height, from_y, to_y, bottom_y; | 2559 | int x, y, width, height, from_y, to_y, bottom_y; |
| @@ -2705,16 +2635,14 @@ x_scroll_run (w, run) | |||
| 2705 | ***********************************************************************/ | 2635 | ***********************************************************************/ |
| 2706 | 2636 | ||
| 2707 | static void | 2637 | static void |
| 2708 | frame_highlight (f) | 2638 | frame_highlight (struct frame *f) |
| 2709 | struct frame *f; | ||
| 2710 | { | 2639 | { |
| 2711 | x_update_cursor (f, 1); | 2640 | x_update_cursor (f, 1); |
| 2712 | x_set_frame_alpha (f); | 2641 | x_set_frame_alpha (f); |
| 2713 | } | 2642 | } |
| 2714 | 2643 | ||
| 2715 | static void | 2644 | static void |
| 2716 | frame_unhighlight (f) | 2645 | frame_unhighlight (struct frame *f) |
| 2717 | struct frame *f; | ||
| 2718 | { | 2646 | { |
| 2719 | x_update_cursor (f, 1); | 2647 | x_update_cursor (f, 1); |
| 2720 | x_set_frame_alpha (f); | 2648 | x_set_frame_alpha (f); |
| @@ -2727,9 +2655,7 @@ frame_unhighlight (f) | |||
| 2727 | Lisp code can tell when the switch took place by examining the events. */ | 2655 | Lisp code can tell when the switch took place by examining the events. */ |
| 2728 | 2656 | ||
| 2729 | static void | 2657 | static void |
| 2730 | x_new_focus_frame (dpyinfo, frame) | 2658 | x_new_focus_frame (struct w32_display_info *dpyinfo, struct frame *frame) |
| 2731 | struct w32_display_info *dpyinfo; | ||
| 2732 | struct frame *frame; | ||
| 2733 | { | 2659 | { |
| 2734 | struct frame *old_focus = dpyinfo->w32_focus_frame; | 2660 | struct frame *old_focus = dpyinfo->w32_focus_frame; |
| 2735 | 2661 | ||
| @@ -2757,12 +2683,8 @@ x_new_focus_frame (dpyinfo, frame) | |||
| 2757 | a FOCUS_IN_EVENT into *BUFP. */ | 2683 | a FOCUS_IN_EVENT into *BUFP. */ |
| 2758 | 2684 | ||
| 2759 | static void | 2685 | static void |
| 2760 | x_focus_changed (type, state, dpyinfo, frame, bufp) | 2686 | x_focus_changed (int type, int state, struct w32_display_info *dpyinfo, |
| 2761 | int type; | 2687 | struct frame *frame, struct input_event *bufp) |
| 2762 | int state; | ||
| 2763 | struct w32_display_info *dpyinfo; | ||
| 2764 | struct frame *frame; | ||
| 2765 | struct input_event *bufp; | ||
| 2766 | { | 2688 | { |
| 2767 | if (type == WM_SETFOCUS) | 2689 | if (type == WM_SETFOCUS) |
| 2768 | { | 2690 | { |
| @@ -2807,10 +2729,8 @@ x_focus_changed (type, state, dpyinfo, frame, bufp) | |||
| 2807 | Returns FOCUS_IN_EVENT event in *BUFP. */ | 2729 | Returns FOCUS_IN_EVENT event in *BUFP. */ |
| 2808 | 2730 | ||
| 2809 | static void | 2731 | static void |
| 2810 | w32_detect_focus_change (dpyinfo, event, bufp) | 2732 | w32_detect_focus_change (struct w32_display_info *dpyinfo, W32Msg *event, |
| 2811 | struct w32_display_info *dpyinfo; | 2733 | struct input_event *bufp) |
| 2812 | W32Msg *event; | ||
| 2813 | struct input_event *bufp; | ||
| 2814 | { | 2734 | { |
| 2815 | struct frame *frame; | 2735 | struct frame *frame; |
| 2816 | 2736 | ||
| @@ -2829,8 +2749,7 @@ w32_detect_focus_change (dpyinfo, event, bufp) | |||
| 2829 | /* Handle an event saying the mouse has moved out of an Emacs frame. */ | 2749 | /* Handle an event saying the mouse has moved out of an Emacs frame. */ |
| 2830 | 2750 | ||
| 2831 | void | 2751 | void |
| 2832 | x_mouse_leave (dpyinfo) | 2752 | x_mouse_leave (struct w32_display_info *dpyinfo) |
| 2833 | struct w32_display_info *dpyinfo; | ||
| 2834 | { | 2753 | { |
| 2835 | x_new_focus_frame (dpyinfo, dpyinfo->w32_focus_event_frame); | 2754 | x_new_focus_frame (dpyinfo, dpyinfo->w32_focus_event_frame); |
| 2836 | } | 2755 | } |
| @@ -2844,8 +2763,7 @@ x_mouse_leave (dpyinfo) | |||
| 2844 | the appropriate X display info. */ | 2763 | the appropriate X display info. */ |
| 2845 | 2764 | ||
| 2846 | static void | 2765 | static void |
| 2847 | w32_frame_rehighlight (frame) | 2766 | w32_frame_rehighlight (struct frame *frame) |
| 2848 | struct frame *frame; | ||
| 2849 | { | 2767 | { |
| 2850 | if (! FRAME_W32_P (frame)) | 2768 | if (! FRAME_W32_P (frame)) |
| 2851 | return; | 2769 | return; |
| @@ -2853,8 +2771,7 @@ w32_frame_rehighlight (frame) | |||
| 2853 | } | 2771 | } |
| 2854 | 2772 | ||
| 2855 | static void | 2773 | static void |
| 2856 | x_frame_rehighlight (dpyinfo) | 2774 | x_frame_rehighlight (struct w32_display_info *dpyinfo) |
| 2857 | struct w32_display_info *dpyinfo; | ||
| 2858 | { | 2775 | { |
| 2859 | struct frame *old_highlight = dpyinfo->x_highlight_frame; | 2776 | struct frame *old_highlight = dpyinfo->x_highlight_frame; |
| 2860 | 2777 | ||
| @@ -2887,8 +2804,7 @@ x_frame_rehighlight (dpyinfo) | |||
| 2887 | /* Convert a keysym to its name. */ | 2804 | /* Convert a keysym to its name. */ |
| 2888 | 2805 | ||
| 2889 | char * | 2806 | char * |
| 2890 | x_get_keysym_name (keysym) | 2807 | x_get_keysym_name (int keysym) |
| 2891 | int keysym; | ||
| 2892 | { | 2808 | { |
| 2893 | /* Make static so we can always return it */ | 2809 | /* Make static so we can always return it */ |
| 2894 | static char value[100]; | 2810 | static char value[100]; |
| @@ -2900,7 +2816,8 @@ x_get_keysym_name (keysym) | |||
| 2900 | return value; | 2816 | return value; |
| 2901 | } | 2817 | } |
| 2902 | 2818 | ||
| 2903 | static int codepage_for_locale(LCID locale) | 2819 | static int |
| 2820 | codepage_for_locale (LCID locale) | ||
| 2904 | { | 2821 | { |
| 2905 | char cp[20]; | 2822 | char cp[20]; |
| 2906 | 2823 | ||
| @@ -2917,11 +2834,7 @@ static int codepage_for_locale(LCID locale) | |||
| 2917 | the state in PUP. XBUTTON provides extra information for extended mouse | 2834 | the state in PUP. XBUTTON provides extra information for extended mouse |
| 2918 | button messages. Returns FALSE if unable to parse the message. */ | 2835 | button messages. Returns FALSE if unable to parse the message. */ |
| 2919 | BOOL | 2836 | BOOL |
| 2920 | parse_button (message, xbutton, pbutton, pup) | 2837 | parse_button (int message, int xbutton, int * pbutton, int * pup) |
| 2921 | int message; | ||
| 2922 | int xbutton; | ||
| 2923 | int * pbutton; | ||
| 2924 | int * pup; | ||
| 2925 | { | 2838 | { |
| 2926 | int button = 0; | 2839 | int button = 0; |
| 2927 | int up = 0; | 2840 | int up = 0; |
| @@ -2989,10 +2902,7 @@ parse_button (message, xbutton, pbutton, pup) | |||
| 2989 | the mouse. */ | 2902 | the mouse. */ |
| 2990 | 2903 | ||
| 2991 | static Lisp_Object | 2904 | static Lisp_Object |
| 2992 | construct_mouse_click (result, msg, f) | 2905 | construct_mouse_click (struct input_event *result, W32Msg *msg, struct frame *f) |
| 2993 | struct input_event *result; | ||
| 2994 | W32Msg *msg; | ||
| 2995 | struct frame *f; | ||
| 2996 | { | 2906 | { |
| 2997 | int button; | 2907 | int button; |
| 2998 | int up; | 2908 | int up; |
| @@ -3018,10 +2928,7 @@ construct_mouse_click (result, msg, f) | |||
| 3018 | } | 2928 | } |
| 3019 | 2929 | ||
| 3020 | static Lisp_Object | 2930 | static Lisp_Object |
| 3021 | construct_mouse_wheel (result, msg, f) | 2931 | construct_mouse_wheel (struct input_event *result, W32Msg *msg, struct frame *f) |
| 3022 | struct input_event *result; | ||
| 3023 | W32Msg *msg; | ||
| 3024 | struct frame *f; | ||
| 3025 | { | 2932 | { |
| 3026 | POINT p; | 2933 | POINT p; |
| 3027 | int delta; | 2934 | int delta; |
| @@ -3054,10 +2961,7 @@ construct_mouse_wheel (result, msg, f) | |||
| 3054 | } | 2961 | } |
| 3055 | 2962 | ||
| 3056 | static Lisp_Object | 2963 | static Lisp_Object |
| 3057 | construct_drag_n_drop (result, msg, f) | 2964 | construct_drag_n_drop (struct input_event *result, W32Msg *msg, struct frame *f) |
| 3058 | struct input_event *result; | ||
| 3059 | W32Msg *msg; | ||
| 3060 | struct frame *f; | ||
| 3061 | { | 2965 | { |
| 3062 | Lisp_Object files; | 2966 | Lisp_Object files; |
| 3063 | Lisp_Object frame; | 2967 | Lisp_Object frame; |
| @@ -3118,9 +3022,7 @@ static MSG last_mouse_motion_event; | |||
| 3118 | static Lisp_Object last_mouse_motion_frame; | 3022 | static Lisp_Object last_mouse_motion_frame; |
| 3119 | 3023 | ||
| 3120 | static int | 3024 | static int |
| 3121 | note_mouse_movement (frame, msg) | 3025 | note_mouse_movement (FRAME_PTR frame, MSG *msg) |
| 3122 | FRAME_PTR frame; | ||
| 3123 | MSG *msg; | ||
| 3124 | { | 3026 | { |
| 3125 | int mouse_x = LOWORD (msg->lParam); | 3027 | int mouse_x = LOWORD (msg->lParam); |
| 3126 | int mouse_y = HIWORD (msg->lParam); | 3028 | int mouse_y = HIWORD (msg->lParam); |
| @@ -3168,12 +3070,15 @@ note_mouse_movement (frame, msg) | |||
| 3168 | Mouse Face | 3070 | Mouse Face |
| 3169 | ************************************************************************/ | 3071 | ************************************************************************/ |
| 3170 | 3072 | ||
| 3171 | static struct scroll_bar *x_window_to_scroll_bar (); | 3073 | static struct scroll_bar *x_window_to_scroll_bar (Window); |
| 3172 | static void x_scroll_bar_report_motion (); | 3074 | static void x_scroll_bar_report_motion (FRAME_PTR *, Lisp_Object *, |
| 3075 | enum scroll_bar_part *, | ||
| 3076 | Lisp_Object *, Lisp_Object *, | ||
| 3077 | unsigned long *); | ||
| 3173 | static void x_check_fullscreen (struct frame *); | 3078 | static void x_check_fullscreen (struct frame *); |
| 3174 | 3079 | ||
| 3175 | static void | 3080 | static void |
| 3176 | redo_mouse_highlight () | 3081 | redo_mouse_highlight (void) |
| 3177 | { | 3082 | { |
| 3178 | if (!NILP (last_mouse_motion_frame) | 3083 | if (!NILP (last_mouse_motion_frame) |
| 3179 | && FRAME_LIVE_P (XFRAME (last_mouse_motion_frame))) | 3084 | && FRAME_LIVE_P (XFRAME (last_mouse_motion_frame))) |
| @@ -3183,9 +3088,7 @@ redo_mouse_highlight () | |||
| 3183 | } | 3088 | } |
| 3184 | 3089 | ||
| 3185 | static void | 3090 | static void |
| 3186 | w32_define_cursor (window, cursor) | 3091 | w32_define_cursor (Window window, Cursor cursor) |
| 3187 | Window window; | ||
| 3188 | Cursor cursor; | ||
| 3189 | { | 3092 | { |
| 3190 | PostMessage (window, WM_EMACS_SETCURSOR, (WPARAM) cursor, 0); | 3093 | PostMessage (window, WM_EMACS_SETCURSOR, (WPARAM) cursor, 0); |
| 3191 | } | 3094 | } |
| @@ -3210,13 +3113,9 @@ w32_define_cursor (window, cursor) | |||
| 3210 | movement. */ | 3113 | movement. */ |
| 3211 | 3114 | ||
| 3212 | static void | 3115 | static void |
| 3213 | w32_mouse_position (fp, insist, bar_window, part, x, y, time) | 3116 | w32_mouse_position (FRAME_PTR *fp, int insist, Lisp_Object *bar_window, |
| 3214 | FRAME_PTR *fp; | 3117 | enum scroll_bar_part *part, Lisp_Object *x, Lisp_Object *y, |
| 3215 | int insist; | 3118 | unsigned long *time) |
| 3216 | Lisp_Object *bar_window; | ||
| 3217 | enum scroll_bar_part *part; | ||
| 3218 | Lisp_Object *x, *y; | ||
| 3219 | unsigned long *time; | ||
| 3220 | { | 3119 | { |
| 3221 | FRAME_PTR f1; | 3120 | FRAME_PTR f1; |
| 3222 | 3121 | ||
| @@ -3307,9 +3206,7 @@ w32_mouse_position (fp, insist, bar_window, part, x, y, time) | |||
| 3307 | or ButtonRelase. */ | 3206 | or ButtonRelase. */ |
| 3308 | 3207 | ||
| 3309 | static void | 3208 | static void |
| 3310 | w32_handle_tool_bar_click (f, button_event) | 3209 | w32_handle_tool_bar_click (struct frame *f, struct input_event *button_event) |
| 3311 | struct frame *f; | ||
| 3312 | struct input_event *button_event; | ||
| 3313 | { | 3210 | { |
| 3314 | int x = XFASTINT (button_event->x); | 3211 | int x = XFASTINT (button_event->x); |
| 3315 | int y = XFASTINT (button_event->y); | 3212 | int y = XFASTINT (button_event->y); |
| @@ -3334,8 +3231,7 @@ w32_handle_tool_bar_click (f, button_event) | |||
| 3334 | bits. */ | 3231 | bits. */ |
| 3335 | 3232 | ||
| 3336 | static struct scroll_bar * | 3233 | static struct scroll_bar * |
| 3337 | x_window_to_scroll_bar (window_id) | 3234 | x_window_to_scroll_bar (Window window_id) |
| 3338 | Window window_id; | ||
| 3339 | { | 3235 | { |
| 3340 | Lisp_Object tail; | 3236 | Lisp_Object tail; |
| 3341 | 3237 | ||
| @@ -3371,9 +3267,8 @@ x_window_to_scroll_bar (window_id) | |||
| 3371 | displaying PORTION out of a whole WHOLE, and our position POSITION. */ | 3267 | displaying PORTION out of a whole WHOLE, and our position POSITION. */ |
| 3372 | 3268 | ||
| 3373 | static void | 3269 | static void |
| 3374 | w32_set_scroll_bar_thumb (bar, portion, position, whole) | 3270 | w32_set_scroll_bar_thumb (struct scroll_bar *bar, |
| 3375 | struct scroll_bar *bar; | 3271 | int portion, int position, int whole) |
| 3376 | int portion, position, whole; | ||
| 3377 | { | 3272 | { |
| 3378 | Window w = SCROLL_BAR_W32_WINDOW (bar); | 3273 | Window w = SCROLL_BAR_W32_WINDOW (bar); |
| 3379 | /* We use the whole scroll-bar height in the calculations below, to | 3274 | /* We use the whole scroll-bar height in the calculations below, to |
| @@ -3448,9 +3343,7 @@ w32_set_scroll_bar_thumb (bar, portion, position, whole) | |||
| 3448 | ************************************************************************/ | 3343 | ************************************************************************/ |
| 3449 | 3344 | ||
| 3450 | static HWND | 3345 | static HWND |
| 3451 | my_create_scrollbar (f, bar) | 3346 | my_create_scrollbar (struct frame * f, struct scroll_bar * bar) |
| 3452 | struct frame * f; | ||
| 3453 | struct scroll_bar * bar; | ||
| 3454 | { | 3347 | { |
| 3455 | return (HWND) SendMessage (FRAME_W32_WINDOW (f), | 3348 | return (HWND) SendMessage (FRAME_W32_WINDOW (f), |
| 3456 | WM_EMACS_CREATESCROLLBAR, (WPARAM) f, | 3349 | WM_EMACS_CREATESCROLLBAR, (WPARAM) f, |
| @@ -3489,26 +3382,21 @@ my_set_window_pos (HWND hwnd, HWND hwndAfter, | |||
| 3489 | } | 3382 | } |
| 3490 | 3383 | ||
| 3491 | static void | 3384 | static void |
| 3492 | my_set_focus (f, hwnd) | 3385 | my_set_focus (struct frame * f, HWND hwnd) |
| 3493 | struct frame * f; | ||
| 3494 | HWND hwnd; | ||
| 3495 | { | 3386 | { |
| 3496 | SendMessage (FRAME_W32_WINDOW (f), WM_EMACS_SETFOCUS, | 3387 | SendMessage (FRAME_W32_WINDOW (f), WM_EMACS_SETFOCUS, |
| 3497 | (WPARAM) hwnd, 0); | 3388 | (WPARAM) hwnd, 0); |
| 3498 | } | 3389 | } |
| 3499 | 3390 | ||
| 3500 | static void | 3391 | static void |
| 3501 | my_set_foreground_window (hwnd) | 3392 | my_set_foreground_window (HWND hwnd) |
| 3502 | HWND hwnd; | ||
| 3503 | { | 3393 | { |
| 3504 | SendMessage (hwnd, WM_EMACS_SETFOREGROUND, (WPARAM) hwnd, 0); | 3394 | SendMessage (hwnd, WM_EMACS_SETFOREGROUND, (WPARAM) hwnd, 0); |
| 3505 | } | 3395 | } |
| 3506 | 3396 | ||
| 3507 | 3397 | ||
| 3508 | static void | 3398 | static void |
| 3509 | my_destroy_window (f, hwnd) | 3399 | my_destroy_window (struct frame * f, HWND hwnd) |
| 3510 | struct frame * f; | ||
| 3511 | HWND hwnd; | ||
| 3512 | { | 3400 | { |
| 3513 | SendMessage (FRAME_W32_WINDOW (f), WM_EMACS_DESTROYWINDOW, | 3401 | SendMessage (FRAME_W32_WINDOW (f), WM_EMACS_DESTROYWINDOW, |
| 3514 | (WPARAM) hwnd, 0); | 3402 | (WPARAM) hwnd, 0); |
| @@ -3520,9 +3408,7 @@ my_destroy_window (f, hwnd) | |||
| 3520 | scroll bar. */ | 3408 | scroll bar. */ |
| 3521 | 3409 | ||
| 3522 | static struct scroll_bar * | 3410 | static struct scroll_bar * |
| 3523 | x_scroll_bar_create (w, top, left, width, height) | 3411 | x_scroll_bar_create (struct window *w, int top, int left, int width, int height) |
| 3524 | struct window *w; | ||
| 3525 | int top, left, width, height; | ||
| 3526 | { | 3412 | { |
| 3527 | struct frame *f = XFRAME (WINDOW_FRAME (w)); | 3413 | struct frame *f = XFRAME (WINDOW_FRAME (w)); |
| 3528 | HWND hwnd; | 3414 | HWND hwnd; |
| @@ -3575,8 +3461,7 @@ x_scroll_bar_create (w, top, left, width, height) | |||
| 3575 | nil. */ | 3461 | nil. */ |
| 3576 | 3462 | ||
| 3577 | static void | 3463 | static void |
| 3578 | x_scroll_bar_remove (bar) | 3464 | x_scroll_bar_remove (struct scroll_bar *bar) |
| 3579 | struct scroll_bar *bar; | ||
| 3580 | { | 3465 | { |
| 3581 | FRAME_PTR f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window))); | 3466 | FRAME_PTR f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window))); |
| 3582 | 3467 | ||
| @@ -3596,9 +3481,8 @@ x_scroll_bar_remove (bar) | |||
| 3596 | characters, starting at POSITION. If WINDOW has no scroll bar, | 3481 | characters, starting at POSITION. If WINDOW has no scroll bar, |
| 3597 | create one. */ | 3482 | create one. */ |
| 3598 | static void | 3483 | static void |
| 3599 | w32_set_vertical_scroll_bar (w, portion, whole, position) | 3484 | w32_set_vertical_scroll_bar (struct window *w, |
| 3600 | struct window *w; | 3485 | int portion, int whole, int position) |
| 3601 | int portion, whole, position; | ||
| 3602 | { | 3486 | { |
| 3603 | struct frame *f = XFRAME (w->frame); | 3487 | struct frame *f = XFRAME (w->frame); |
| 3604 | struct scroll_bar *bar; | 3488 | struct scroll_bar *bar; |
| @@ -3741,8 +3625,7 @@ w32_set_vertical_scroll_bar (w, portion, whole, position) | |||
| 3741 | `*redeem_scroll_bar_hook' is applied to its window before the judgment. */ | 3625 | `*redeem_scroll_bar_hook' is applied to its window before the judgment. */ |
| 3742 | 3626 | ||
| 3743 | static void | 3627 | static void |
| 3744 | w32_condemn_scroll_bars (frame) | 3628 | w32_condemn_scroll_bars (FRAME_PTR frame) |
| 3745 | FRAME_PTR frame; | ||
| 3746 | { | 3629 | { |
| 3747 | /* Transfer all the scroll bars to FRAME_CONDEMNED_SCROLL_BARS. */ | 3630 | /* Transfer all the scroll bars to FRAME_CONDEMNED_SCROLL_BARS. */ |
| 3748 | while (! NILP (FRAME_SCROLL_BARS (frame))) | 3631 | while (! NILP (FRAME_SCROLL_BARS (frame))) |
| @@ -3763,8 +3646,7 @@ w32_condemn_scroll_bars (frame) | |||
| 3763 | Note that WINDOW isn't necessarily condemned at all. */ | 3646 | Note that WINDOW isn't necessarily condemned at all. */ |
| 3764 | 3647 | ||
| 3765 | static void | 3648 | static void |
| 3766 | w32_redeem_scroll_bar (window) | 3649 | w32_redeem_scroll_bar (struct window *window) |
| 3767 | struct window *window; | ||
| 3768 | { | 3650 | { |
| 3769 | struct scroll_bar *bar; | 3651 | struct scroll_bar *bar; |
| 3770 | struct frame *f; | 3652 | struct frame *f; |
| @@ -3809,8 +3691,7 @@ w32_redeem_scroll_bar (window) | |||
| 3809 | last call to `*condemn_scroll_bars_hook'. */ | 3691 | last call to `*condemn_scroll_bars_hook'. */ |
| 3810 | 3692 | ||
| 3811 | static void | 3693 | static void |
| 3812 | w32_judge_scroll_bars (f) | 3694 | w32_judge_scroll_bars (FRAME_PTR f) |
| 3813 | FRAME_PTR f; | ||
| 3814 | { | 3695 | { |
| 3815 | Lisp_Object bar, next; | 3696 | Lisp_Object bar, next; |
| 3816 | 3697 | ||
| @@ -3841,10 +3722,8 @@ w32_judge_scroll_bars (f) | |||
| 3841 | mark bits. */ | 3722 | mark bits. */ |
| 3842 | 3723 | ||
| 3843 | static int | 3724 | static int |
| 3844 | w32_scroll_bar_handle_click (bar, msg, emacs_event) | 3725 | w32_scroll_bar_handle_click (struct scroll_bar *bar, W32Msg *msg, |
| 3845 | struct scroll_bar *bar; | 3726 | struct input_event *emacs_event) |
| 3846 | W32Msg *msg; | ||
| 3847 | struct input_event *emacs_event; | ||
| 3848 | { | 3727 | { |
| 3849 | if (! WINDOWP (bar->window)) | 3728 | if (! WINDOWP (bar->window)) |
| 3850 | abort (); | 3729 | abort (); |
| @@ -3950,12 +3829,10 @@ w32_scroll_bar_handle_click (bar, msg, emacs_event) | |||
| 3950 | on the scroll bar. */ | 3829 | on the scroll bar. */ |
| 3951 | 3830 | ||
| 3952 | static void | 3831 | static void |
| 3953 | x_scroll_bar_report_motion (fp, bar_window, part, x, y, time) | 3832 | x_scroll_bar_report_motion (FRAME_PTR *fp, Lisp_Object *bar_window, |
| 3954 | FRAME_PTR *fp; | 3833 | enum scroll_bar_part *part, |
| 3955 | Lisp_Object *bar_window; | 3834 | Lisp_Object *x, Lisp_Object *y, |
| 3956 | enum scroll_bar_part *part; | 3835 | unsigned long *time) |
| 3957 | Lisp_Object *x, *y; | ||
| 3958 | unsigned long *time; | ||
| 3959 | { | 3836 | { |
| 3960 | struct scroll_bar *bar = XSCROLL_BAR (last_mouse_scroll_bar); | 3837 | struct scroll_bar *bar = XSCROLL_BAR (last_mouse_scroll_bar); |
| 3961 | Window w = SCROLL_BAR_W32_WINDOW (bar); | 3838 | Window w = SCROLL_BAR_W32_WINDOW (bar); |
| @@ -4011,8 +3888,7 @@ x_scroll_bar_report_motion (fp, bar_window, part, x, y, time) | |||
| 4011 | redraw them. */ | 3888 | redraw them. */ |
| 4012 | 3889 | ||
| 4013 | void | 3890 | void |
| 4014 | x_scroll_bar_clear (f) | 3891 | x_scroll_bar_clear (FRAME_PTR f) |
| 4015 | FRAME_PTR f; | ||
| 4016 | { | 3892 | { |
| 4017 | Lisp_Object bar; | 3893 | Lisp_Object bar; |
| 4018 | 3894 | ||
| @@ -4071,10 +3947,8 @@ static char dbcs_lead = 0; | |||
| 4071 | */ | 3947 | */ |
| 4072 | 3948 | ||
| 4073 | int | 3949 | int |
| 4074 | w32_read_socket (sd, expected, hold_quit) | 3950 | w32_read_socket (struct terminal *terminal, int expected, |
| 4075 | register int sd; | 3951 | struct input_event *hold_quit) |
| 4076 | int expected; | ||
| 4077 | struct input_event *hold_quit; | ||
| 4078 | { | 3952 | { |
| 4079 | int count = 0; | 3953 | int count = 0; |
| 4080 | int check_visibility = 0; | 3954 | int check_visibility = 0; |
| @@ -4903,11 +4777,7 @@ w32_read_socket (sd, expected, hold_quit) | |||
| 4903 | mode lines must be clipped to the whole window. */ | 4777 | mode lines must be clipped to the whole window. */ |
| 4904 | 4778 | ||
| 4905 | static void | 4779 | static void |
| 4906 | w32_clip_to_row (w, row, area, hdc) | 4780 | w32_clip_to_row (struct window *w, struct glyph_row *row, int area, HDC hdc) |
| 4907 | struct window *w; | ||
| 4908 | struct glyph_row *row; | ||
| 4909 | int area; | ||
| 4910 | HDC hdc; | ||
| 4911 | { | 4781 | { |
| 4912 | struct frame *f = XFRAME (WINDOW_FRAME (w)); | 4782 | struct frame *f = XFRAME (WINDOW_FRAME (w)); |
| 4913 | RECT clip_rect; | 4783 | RECT clip_rect; |
| @@ -4928,9 +4798,7 @@ w32_clip_to_row (w, row, area, hdc) | |||
| 4928 | /* Draw a hollow box cursor on window W in glyph row ROW. */ | 4798 | /* Draw a hollow box cursor on window W in glyph row ROW. */ |
| 4929 | 4799 | ||
| 4930 | static void | 4800 | static void |
| 4931 | x_draw_hollow_cursor (w, row) | 4801 | x_draw_hollow_cursor (struct window *w, struct glyph_row *row) |
| 4932 | struct window *w; | ||
| 4933 | struct glyph_row *row; | ||
| 4934 | { | 4802 | { |
| 4935 | struct frame *f = XFRAME (WINDOW_FRAME (w)); | 4803 | struct frame *f = XFRAME (WINDOW_FRAME (w)); |
| 4936 | HDC hdc; | 4804 | HDC hdc; |
| @@ -4970,11 +4838,8 @@ x_draw_hollow_cursor (w, row) | |||
| 4970 | --gerd. */ | 4838 | --gerd. */ |
| 4971 | 4839 | ||
| 4972 | static void | 4840 | static void |
| 4973 | x_draw_bar_cursor (w, row, width, kind) | 4841 | x_draw_bar_cursor (struct window *w, struct glyph_row *row, |
| 4974 | struct window *w; | 4842 | int width, enum text_cursor_kinds kind) |
| 4975 | struct glyph_row *row; | ||
| 4976 | int width; | ||
| 4977 | enum text_cursor_kinds kind; | ||
| 4978 | { | 4843 | { |
| 4979 | struct frame *f = XFRAME (w->frame); | 4844 | struct frame *f = XFRAME (w->frame); |
| 4980 | struct glyph *cursor_glyph; | 4845 | struct glyph *cursor_glyph; |
| @@ -5053,9 +4918,7 @@ x_draw_bar_cursor (w, row, width, kind) | |||
| 5053 | /* RIF: Define cursor CURSOR on frame F. */ | 4918 | /* RIF: Define cursor CURSOR on frame F. */ |
| 5054 | 4919 | ||
| 5055 | static void | 4920 | static void |
| 5056 | w32_define_frame_cursor (f, cursor) | 4921 | w32_define_frame_cursor (struct frame *f, Cursor cursor) |
| 5057 | struct frame *f; | ||
| 5058 | Cursor cursor; | ||
| 5059 | { | 4922 | { |
| 5060 | w32_define_cursor (FRAME_W32_WINDOW (f), cursor); | 4923 | w32_define_cursor (FRAME_W32_WINDOW (f), cursor); |
| 5061 | } | 4924 | } |
| @@ -5064,9 +4927,7 @@ w32_define_frame_cursor (f, cursor) | |||
| 5064 | /* RIF: Clear area on frame F. */ | 4927 | /* RIF: Clear area on frame F. */ |
| 5065 | 4928 | ||
| 5066 | static void | 4929 | static void |
| 5067 | w32_clear_frame_area (f, x, y, width, height) | 4930 | w32_clear_frame_area (struct frame *f, int x, int y, int width, int height) |
| 5068 | struct frame *f; | ||
| 5069 | int x, y, width, height; | ||
| 5070 | { | 4931 | { |
| 5071 | HDC hdc; | 4932 | HDC hdc; |
| 5072 | 4933 | ||
| @@ -5078,12 +4939,9 @@ w32_clear_frame_area (f, x, y, width, height) | |||
| 5078 | /* RIF: Draw or clear cursor on window W. */ | 4939 | /* RIF: Draw or clear cursor on window W. */ |
| 5079 | 4940 | ||
| 5080 | static void | 4941 | static void |
| 5081 | w32_draw_window_cursor (w, glyph_row, x, y, cursor_type, cursor_width, on_p, active_p) | 4942 | w32_draw_window_cursor (struct window *w, struct glyph_row *glyph_row, |
| 5082 | struct window *w; | 4943 | int x, int y, int cursor_type, int cursor_width, |
| 5083 | struct glyph_row *glyph_row; | 4944 | int on_p, int active_p) |
| 5084 | int x, y; | ||
| 5085 | int cursor_type, cursor_width; | ||
| 5086 | int on_p, active_p; | ||
| 5087 | { | 4945 | { |
| 5088 | if (on_p) | 4946 | if (on_p) |
| 5089 | { | 4947 | { |
| @@ -5178,9 +5036,7 @@ w32_draw_window_cursor (w, glyph_row, x, y, cursor_type, cursor_width, on_p, act | |||
| 5178 | /* Icons. */ | 5036 | /* Icons. */ |
| 5179 | 5037 | ||
| 5180 | int | 5038 | int |
| 5181 | x_bitmap_icon (f, icon) | 5039 | x_bitmap_icon (struct frame *f, Lisp_Object icon) |
| 5182 | struct frame *f; | ||
| 5183 | Lisp_Object icon; | ||
| 5184 | { | 5040 | { |
| 5185 | HANDLE main_icon; | 5041 | HANDLE main_icon; |
| 5186 | HANDLE small_icon = NULL; | 5042 | HANDLE small_icon = NULL; |
| @@ -5269,10 +5125,7 @@ x_io_error_quitter (display) | |||
| 5269 | /* Changing the font of the frame. */ | 5125 | /* Changing the font of the frame. */ |
| 5270 | 5126 | ||
| 5271 | Lisp_Object | 5127 | Lisp_Object |
| 5272 | x_new_font (f, font_object, fontset) | 5128 | x_new_font (struct frame *f, Lisp_Object font_object, int fontset) |
| 5273 | struct frame *f; | ||
| 5274 | Lisp_Object font_object; | ||
| 5275 | int fontset; | ||
| 5276 | { | 5129 | { |
| 5277 | struct font *font = XFONT_OBJECT (font_object); | 5130 | struct font *font = XFONT_OBJECT (font_object); |
| 5278 | 5131 | ||
| @@ -5340,8 +5193,7 @@ xim_close_dpy (dpyinfo) | |||
| 5340 | from its current recorded position values and gravity. */ | 5193 | from its current recorded position values and gravity. */ |
| 5341 | 5194 | ||
| 5342 | void | 5195 | void |
| 5343 | x_calc_absolute_position (f) | 5196 | x_calc_absolute_position (struct frame *f) |
| 5344 | struct frame *f; | ||
| 5345 | { | 5197 | { |
| 5346 | int flags = f->size_hint_flags; | 5198 | int flags = f->size_hint_flags; |
| 5347 | 5199 | ||
| @@ -5401,10 +5253,8 @@ x_calc_absolute_position (f) | |||
| 5401 | which means, do adjust for borders but don't change the gravity. */ | 5253 | which means, do adjust for borders but don't change the gravity. */ |
| 5402 | 5254 | ||
| 5403 | void | 5255 | void |
| 5404 | x_set_offset (f, xoff, yoff, change_gravity) | 5256 | x_set_offset (struct frame *f, register int xoff, register int yoff, |
| 5405 | struct frame *f; | 5257 | int change_gravity) |
| 5406 | register int xoff, yoff; | ||
| 5407 | int change_gravity; | ||
| 5408 | { | 5258 | { |
| 5409 | int modified_top, modified_left; | 5259 | int modified_top, modified_left; |
| 5410 | 5260 | ||
| @@ -5439,8 +5289,7 @@ x_set_offset (f, xoff, yoff, change_gravity) | |||
| 5439 | /* Check if we need to resize the frame due to a fullscreen request. | 5289 | /* Check if we need to resize the frame due to a fullscreen request. |
| 5440 | If so needed, resize the frame. */ | 5290 | If so needed, resize the frame. */ |
| 5441 | static void | 5291 | static void |
| 5442 | x_check_fullscreen (f) | 5292 | x_check_fullscreen (struct frame *f) |
| 5443 | struct frame *f; | ||
| 5444 | { | 5293 | { |
| 5445 | if (f->want_fullscreen & FULLSCREEN_BOTH) | 5294 | if (f->want_fullscreen & FULLSCREEN_BOTH) |
| 5446 | { | 5295 | { |
| @@ -5470,10 +5319,7 @@ x_check_fullscreen (f) | |||
| 5470 | Otherwise we leave the window gravity unchanged. */ | 5319 | Otherwise we leave the window gravity unchanged. */ |
| 5471 | 5320 | ||
| 5472 | void | 5321 | void |
| 5473 | x_set_window_size (f, change_gravity, cols, rows) | 5322 | x_set_window_size (struct frame *f, int change_gravity, int cols, int rows) |
| 5474 | struct frame *f; | ||
| 5475 | int change_gravity; | ||
| 5476 | int cols, rows; | ||
| 5477 | { | 5323 | { |
| 5478 | int pixelwidth, pixelheight; | 5324 | int pixelwidth, pixelheight; |
| 5479 | 5325 | ||
| @@ -5565,9 +5411,7 @@ x_set_window_size (f, change_gravity, cols, rows) | |||
| 5565 | void x_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y); | 5411 | void x_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y); |
| 5566 | 5412 | ||
| 5567 | void | 5413 | void |
| 5568 | x_set_mouse_position (f, x, y) | 5414 | x_set_mouse_position (struct frame *f, int x, int y) |
| 5569 | struct frame *f; | ||
| 5570 | int x, y; | ||
| 5571 | { | 5415 | { |
| 5572 | int pix_x, pix_y; | 5416 | int pix_x, pix_y; |
| 5573 | 5417 | ||
| @@ -5584,9 +5428,7 @@ x_set_mouse_position (f, x, y) | |||
| 5584 | } | 5428 | } |
| 5585 | 5429 | ||
| 5586 | void | 5430 | void |
| 5587 | x_set_mouse_pixel_position (f, pix_x, pix_y) | 5431 | x_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y) |
| 5588 | struct frame *f; | ||
| 5589 | int pix_x, pix_y; | ||
| 5590 | { | 5432 | { |
| 5591 | RECT rect; | 5433 | RECT rect; |
| 5592 | POINT pt; | 5434 | POINT pt; |
| @@ -5607,8 +5449,7 @@ x_set_mouse_pixel_position (f, pix_x, pix_y) | |||
| 5607 | /* focus shifting, raising and lowering. */ | 5449 | /* focus shifting, raising and lowering. */ |
| 5608 | 5450 | ||
| 5609 | void | 5451 | void |
| 5610 | x_focus_on_frame (f) | 5452 | x_focus_on_frame (struct frame *f) |
| 5611 | struct frame *f; | ||
| 5612 | { | 5453 | { |
| 5613 | struct w32_display_info *dpyinfo = &one_w32_display_info; | 5454 | struct w32_display_info *dpyinfo = &one_w32_display_info; |
| 5614 | 5455 | ||
| @@ -5625,15 +5466,13 @@ x_focus_on_frame (f) | |||
| 5625 | } | 5466 | } |
| 5626 | 5467 | ||
| 5627 | void | 5468 | void |
| 5628 | x_unfocus_frame (f) | 5469 | x_unfocus_frame (struct frame *f) |
| 5629 | struct frame *f; | ||
| 5630 | { | 5470 | { |
| 5631 | } | 5471 | } |
| 5632 | 5472 | ||
| 5633 | /* Raise frame F. */ | 5473 | /* Raise frame F. */ |
| 5634 | void | 5474 | void |
| 5635 | x_raise_frame (f) | 5475 | x_raise_frame (struct frame *f) |
| 5636 | struct frame *f; | ||
| 5637 | { | 5476 | { |
| 5638 | BLOCK_INPUT; | 5477 | BLOCK_INPUT; |
| 5639 | 5478 | ||
| @@ -5692,8 +5531,7 @@ x_raise_frame (f) | |||
| 5692 | 5531 | ||
| 5693 | /* Lower frame F. */ | 5532 | /* Lower frame F. */ |
| 5694 | void | 5533 | void |
| 5695 | x_lower_frame (f) | 5534 | x_lower_frame (struct frame *f) |
| 5696 | struct frame *f; | ||
| 5697 | { | 5535 | { |
| 5698 | BLOCK_INPUT; | 5536 | BLOCK_INPUT; |
| 5699 | my_set_window_pos (FRAME_W32_WINDOW (f), | 5537 | my_set_window_pos (FRAME_W32_WINDOW (f), |
| @@ -5704,9 +5542,7 @@ x_lower_frame (f) | |||
| 5704 | } | 5542 | } |
| 5705 | 5543 | ||
| 5706 | static void | 5544 | static void |
| 5707 | w32_frame_raise_lower (f, raise_flag) | 5545 | w32_frame_raise_lower (FRAME_PTR f, int raise_flag) |
| 5708 | FRAME_PTR f; | ||
| 5709 | int raise_flag; | ||
| 5710 | { | 5546 | { |
| 5711 | if (! FRAME_W32_P (f)) | 5547 | if (! FRAME_W32_P (f)) |
| 5712 | return; | 5548 | return; |
| @@ -5727,8 +5563,7 @@ w32_frame_raise_lower (f, raise_flag) | |||
| 5727 | finishes with it. */ | 5563 | finishes with it. */ |
| 5728 | 5564 | ||
| 5729 | void | 5565 | void |
| 5730 | x_make_frame_visible (f) | 5566 | x_make_frame_visible (struct frame *f) |
| 5731 | struct frame *f; | ||
| 5732 | { | 5567 | { |
| 5733 | Lisp_Object type; | 5568 | Lisp_Object type; |
| 5734 | 5569 | ||
| @@ -5820,8 +5655,8 @@ x_make_frame_visible (f) | |||
| 5820 | 5655 | ||
| 5821 | /* Make the frame visible (mapped and not iconified). */ | 5656 | /* Make the frame visible (mapped and not iconified). */ |
| 5822 | 5657 | ||
| 5823 | x_make_frame_invisible (f) | 5658 | void |
| 5824 | struct frame *f; | 5659 | x_make_frame_invisible (struct frame *f) |
| 5825 | { | 5660 | { |
| 5826 | /* Don't keep the highlight on an invisible frame. */ | 5661 | /* Don't keep the highlight on an invisible frame. */ |
| 5827 | if (FRAME_W32_DISPLAY_INFO (f)->x_highlight_frame == f) | 5662 | if (FRAME_W32_DISPLAY_INFO (f)->x_highlight_frame == f) |
| @@ -5847,8 +5682,7 @@ x_make_frame_invisible (f) | |||
| 5847 | /* Change window state from mapped to iconified. */ | 5682 | /* Change window state from mapped to iconified. */ |
| 5848 | 5683 | ||
| 5849 | void | 5684 | void |
| 5850 | x_iconify_frame (f) | 5685 | x_iconify_frame (struct frame *f) |
| 5851 | struct frame *f; | ||
| 5852 | { | 5686 | { |
| 5853 | Lisp_Object type; | 5687 | Lisp_Object type; |
| 5854 | 5688 | ||
| @@ -5934,8 +5768,7 @@ x_free_frame_resources (f) | |||
| 5934 | 5768 | ||
| 5935 | /* Destroy the window of frame F. */ | 5769 | /* Destroy the window of frame F. */ |
| 5936 | void | 5770 | void |
| 5937 | x_destroy_window (f) | 5771 | x_destroy_window (struct frame *f) |
| 5938 | struct frame *f; | ||
| 5939 | { | 5772 | { |
| 5940 | struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (f); | 5773 | struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (f); |
| 5941 | 5774 | ||
| @@ -5952,10 +5785,7 @@ x_destroy_window (f) | |||
| 5952 | If USER_POSITION is nonzero, we set the USPosition | 5785 | If USER_POSITION is nonzero, we set the USPosition |
| 5953 | flag (this is useful when FLAGS is 0). */ | 5786 | flag (this is useful when FLAGS is 0). */ |
| 5954 | void | 5787 | void |
| 5955 | x_wm_set_size_hint (f, flags, user_position) | 5788 | x_wm_set_size_hint (struct frame *f, long flags, int user_position) |
| 5956 | struct frame *f; | ||
| 5957 | long flags; | ||
| 5958 | int user_position; | ||
| 5959 | { | 5789 | { |
| 5960 | Window window = FRAME_W32_WINDOW (f); | 5790 | Window window = FRAME_W32_WINDOW (f); |
| 5961 | 5791 | ||
| @@ -5971,9 +5801,7 @@ x_wm_set_size_hint (f, flags, user_position) | |||
| 5971 | 5801 | ||
| 5972 | /* Window manager things */ | 5802 | /* Window manager things */ |
| 5973 | void | 5803 | void |
| 5974 | x_wm_set_icon_position (f, icon_x, icon_y) | 5804 | x_wm_set_icon_position (struct frame *f, int icon_x, int icon_y) |
| 5975 | struct frame *f; | ||
| 5976 | int icon_x, icon_y; | ||
| 5977 | { | 5805 | { |
| 5978 | #if 0 | 5806 | #if 0 |
| 5979 | Window window = FRAME_W32_WINDOW (f); | 5807 | Window window = FRAME_W32_WINDOW (f); |
| @@ -5994,8 +5822,7 @@ x_wm_set_icon_position (f, icon_x, icon_y) | |||
| 5994 | static int w32_initialized = 0; | 5822 | static int w32_initialized = 0; |
| 5995 | 5823 | ||
| 5996 | void | 5824 | void |
| 5997 | w32_initialize_display_info (display_name) | 5825 | w32_initialize_display_info (Lisp_Object display_name) |
| 5998 | Lisp_Object display_name; | ||
| 5999 | { | 5826 | { |
| 6000 | struct w32_display_info *dpyinfo = &one_w32_display_info; | 5827 | struct w32_display_info *dpyinfo = &one_w32_display_info; |
| 6001 | 5828 | ||
| @@ -6048,8 +5875,7 @@ w32_initialize_display_info (display_name) | |||
| 6048 | but any whitespace following value is not removed. */ | 5875 | but any whitespace following value is not removed. */ |
| 6049 | 5876 | ||
| 6050 | static char * | 5877 | static char * |
| 6051 | w32_make_rdb (xrm_option) | 5878 | w32_make_rdb (char *xrm_option) |
| 6052 | char *xrm_option; | ||
| 6053 | { | 5879 | { |
| 6054 | char *buffer = xmalloc (strlen (xrm_option) + 2); | 5880 | char *buffer = xmalloc (strlen (xrm_option) + 2); |
| 6055 | char *current = buffer; | 5881 | char *current = buffer; |
| @@ -6208,10 +6034,7 @@ x_delete_terminal (struct terminal *terminal) | |||
| 6208 | } | 6034 | } |
| 6209 | 6035 | ||
| 6210 | struct w32_display_info * | 6036 | struct w32_display_info * |
| 6211 | w32_term_init (display_name, xrm_option, resource_name) | 6037 | w32_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name) |
| 6212 | Lisp_Object display_name; | ||
| 6213 | char *xrm_option; | ||
| 6214 | char *resource_name; | ||
| 6215 | { | 6038 | { |
| 6216 | struct w32_display_info *dpyinfo; | 6039 | struct w32_display_info *dpyinfo; |
| 6217 | struct terminal *terminal; | 6040 | struct terminal *terminal; |
| @@ -6286,8 +6109,7 @@ w32_term_init (display_name, xrm_option, resource_name) | |||
| 6286 | 6109 | ||
| 6287 | /* Get rid of display DPYINFO, assuming all frames are already gone. */ | 6110 | /* Get rid of display DPYINFO, assuming all frames are already gone. */ |
| 6288 | void | 6111 | void |
| 6289 | x_delete_display (dpyinfo) | 6112 | x_delete_display (struct w32_display_info *dpyinfo) |
| 6290 | struct w32_display_info *dpyinfo; | ||
| 6291 | { | 6113 | { |
| 6292 | /* Discard this display from w32_display_name_list and w32_display_list. | 6114 | /* Discard this display from w32_display_name_list and w32_display_list. |
| 6293 | We can't use Fdelq because that can quit. */ | 6115 | We can't use Fdelq because that can quit. */ |
| @@ -6335,7 +6157,7 @@ x_delete_display (dpyinfo) | |||
| 6335 | DWORD WINAPI w32_msg_worker (void * arg); | 6157 | DWORD WINAPI w32_msg_worker (void * arg); |
| 6336 | 6158 | ||
| 6337 | static void | 6159 | static void |
| 6338 | w32_initialize () | 6160 | w32_initialize (void) |
| 6339 | { | 6161 | { |
| 6340 | HANDLE shell; | 6162 | HANDLE shell; |
| 6341 | HRESULT (WINAPI * set_user_model) (wchar_t * id); | 6163 | HRESULT (WINAPI * set_user_model) (wchar_t * id); |
| @@ -6438,7 +6260,7 @@ w32_initialize () | |||
| 6438 | } | 6260 | } |
| 6439 | 6261 | ||
| 6440 | void | 6262 | void |
| 6441 | syms_of_w32term () | 6263 | syms_of_w32term (void) |
| 6442 | { | 6264 | { |
| 6443 | staticpro (&w32_display_name_list); | 6265 | staticpro (&w32_display_name_list); |
| 6444 | w32_display_name_list = Qnil; | 6266 | w32_display_name_list = Qnil; |
diff --git a/src/w32uniscribe.c b/src/w32uniscribe.c index 9b5bd141d77..d7aeb7046c8 100644 --- a/src/w32uniscribe.c +++ b/src/w32uniscribe.c | |||
| @@ -64,8 +64,7 @@ static int CALLBACK add_opentype_font_name_to_list (ENUMLOGFONTEX *, | |||
| 64 | static Lisp_Object otf_features (HDC context, char *table); | 64 | static Lisp_Object otf_features (HDC context, char *table); |
| 65 | 65 | ||
| 66 | static int | 66 | static int |
| 67 | memq_no_quit (elt, list) | 67 | memq_no_quit (Lisp_Object elt, Lisp_Object list) |
| 68 | Lisp_Object elt, list; | ||
| 69 | { | 68 | { |
| 70 | while (CONSP (list) && ! EQ (XCAR (list), elt)) | 69 | while (CONSP (list) && ! EQ (XCAR (list), elt)) |
| 71 | list = XCDR (list); | 70 | list = XCDR (list); |
| @@ -75,8 +74,7 @@ memq_no_quit (elt, list) | |||
| 75 | 74 | ||
| 76 | /* Font backend interface implementation. */ | 75 | /* Font backend interface implementation. */ |
| 77 | static Lisp_Object | 76 | static Lisp_Object |
| 78 | uniscribe_list (frame, font_spec) | 77 | uniscribe_list (Lisp_Object frame, Lisp_Object font_spec) |
| 79 | Lisp_Object frame, font_spec; | ||
| 80 | { | 78 | { |
| 81 | Lisp_Object fonts = w32font_list_internal (frame, font_spec, 1); | 79 | Lisp_Object fonts = w32font_list_internal (frame, font_spec, 1); |
| 82 | FONT_ADD_LOG ("uniscribe-list", font_spec, fonts); | 80 | FONT_ADD_LOG ("uniscribe-list", font_spec, fonts); |
| @@ -84,8 +82,7 @@ uniscribe_list (frame, font_spec) | |||
| 84 | } | 82 | } |
| 85 | 83 | ||
| 86 | static Lisp_Object | 84 | static Lisp_Object |
| 87 | uniscribe_match (frame, font_spec) | 85 | uniscribe_match (Lisp_Object frame, Lisp_Object font_spec) |
| 88 | Lisp_Object frame, font_spec; | ||
| 89 | { | 86 | { |
| 90 | Lisp_Object entity = w32font_match_internal (frame, font_spec, 1); | 87 | Lisp_Object entity = w32font_match_internal (frame, font_spec, 1); |
| 91 | FONT_ADD_LOG ("uniscribe-match", font_spec, entity); | 88 | FONT_ADD_LOG ("uniscribe-match", font_spec, entity); |
| @@ -93,8 +90,7 @@ uniscribe_match (frame, font_spec) | |||
| 93 | } | 90 | } |
| 94 | 91 | ||
| 95 | static Lisp_Object | 92 | static Lisp_Object |
| 96 | uniscribe_list_family (frame) | 93 | uniscribe_list_family (Lisp_Object frame) |
| 97 | Lisp_Object frame; | ||
| 98 | { | 94 | { |
| 99 | Lisp_Object list = Qnil; | 95 | Lisp_Object list = Qnil; |
| 100 | LOGFONT font_match_pattern; | 96 | LOGFONT font_match_pattern; |
| @@ -116,10 +112,7 @@ uniscribe_list_family (frame) | |||
| 116 | } | 112 | } |
| 117 | 113 | ||
| 118 | static Lisp_Object | 114 | static Lisp_Object |
| 119 | uniscribe_open (f, font_entity, pixel_size) | 115 | uniscribe_open (FRAME_PTR f, Lisp_Object font_entity, int pixel_size) |
| 120 | FRAME_PTR f; | ||
| 121 | Lisp_Object font_entity; | ||
| 122 | int pixel_size; | ||
| 123 | { | 116 | { |
| 124 | Lisp_Object font_object | 117 | Lisp_Object font_object |
| 125 | = font_make_object (VECSIZE (struct uniscribe_font_info), | 118 | = font_make_object (VECSIZE (struct uniscribe_font_info), |
| @@ -148,9 +141,7 @@ uniscribe_open (f, font_entity, pixel_size) | |||
| 148 | } | 141 | } |
| 149 | 142 | ||
| 150 | static void | 143 | static void |
| 151 | uniscribe_close (f, font) | 144 | uniscribe_close (FRAME_PTR f, struct font *font) |
| 152 | FRAME_PTR f; | ||
| 153 | struct font *font; | ||
| 154 | { | 145 | { |
| 155 | struct uniscribe_font_info *uniscribe_font | 146 | struct uniscribe_font_info *uniscribe_font |
| 156 | = (struct uniscribe_font_info *) font; | 147 | = (struct uniscribe_font_info *) font; |
| @@ -164,8 +155,7 @@ uniscribe_close (f, font) | |||
| 164 | /* Return a list describing which scripts/languages FONT supports by | 155 | /* Return a list describing which scripts/languages FONT supports by |
| 165 | which GSUB/GPOS features of OpenType tables. */ | 156 | which GSUB/GPOS features of OpenType tables. */ |
| 166 | static Lisp_Object | 157 | static Lisp_Object |
| 167 | uniscribe_otf_capability (font) | 158 | uniscribe_otf_capability (struct font *font) |
| 168 | struct font *font; | ||
| 169 | { | 159 | { |
| 170 | HDC context; | 160 | HDC context; |
| 171 | HFONT old_font; | 161 | HFONT old_font; |
| @@ -202,8 +192,7 @@ uniscribe_otf_capability (font) | |||
| 202 | than the length of LGSTRING, nil should be return. In that case, | 192 | than the length of LGSTRING, nil should be return. In that case, |
| 203 | this function is called again with the larger LGSTRING. */ | 193 | this function is called again with the larger LGSTRING. */ |
| 204 | static Lisp_Object | 194 | static Lisp_Object |
| 205 | uniscribe_shape (lgstring) | 195 | uniscribe_shape (Lisp_Object lgstring) |
| 206 | Lisp_Object lgstring; | ||
| 207 | { | 196 | { |
| 208 | struct font * font; | 197 | struct font * font; |
| 209 | struct uniscribe_font_info * uniscribe_font; | 198 | struct uniscribe_font_info * uniscribe_font; |
| @@ -451,9 +440,7 @@ uniscribe_shape (lgstring) | |||
| 451 | Return a glyph code of FONT for characer C (Unicode code point). | 440 | Return a glyph code of FONT for characer C (Unicode code point). |
| 452 | If FONT doesn't have such a glyph, return FONT_INVALID_CODE. */ | 441 | If FONT doesn't have such a glyph, return FONT_INVALID_CODE. */ |
| 453 | static unsigned | 442 | static unsigned |
| 454 | uniscribe_encode_char (font, c) | 443 | uniscribe_encode_char (struct font *font, int c) |
| 455 | struct font *font; | ||
| 456 | int c; | ||
| 457 | { | 444 | { |
| 458 | HDC context = NULL; | 445 | HDC context = NULL; |
| 459 | struct frame *f = NULL; | 446 | struct frame *f = NULL; |
| @@ -574,12 +561,9 @@ uniscribe_encode_char (font, c) | |||
| 574 | Adds the name of opentype fonts to a Lisp list (passed in as the | 561 | Adds the name of opentype fonts to a Lisp list (passed in as the |
| 575 | lParam arg). */ | 562 | lParam arg). */ |
| 576 | static int CALLBACK | 563 | static int CALLBACK |
| 577 | add_opentype_font_name_to_list (logical_font, physical_font, font_type, | 564 | add_opentype_font_name_to_list (ENUMLOGFONTEX *logical_font, |
| 578 | list_object) | 565 | NEWTEXTMETRICEX *physical_font, |
| 579 | ENUMLOGFONTEX *logical_font; | 566 | DWORD font_type, LPARAM list_object) |
| 580 | NEWTEXTMETRICEX *physical_font; | ||
| 581 | DWORD font_type; | ||
| 582 | LPARAM list_object; | ||
| 583 | { | 567 | { |
| 584 | Lisp_Object* list = (Lisp_Object *) list_object; | 568 | Lisp_Object* list = (Lisp_Object *) list_object; |
| 585 | Lisp_Object family; | 569 | Lisp_Object family; |
| @@ -650,9 +634,8 @@ static char* NOTHING = " "; | |||
| 650 | /* Check if font supports the otf script/language/features specified. | 634 | /* Check if font supports the otf script/language/features specified. |
| 651 | OTF_SPEC is in the format | 635 | OTF_SPEC is in the format |
| 652 | (script lang [(gsub_feature ...)|nil] [(gpos_feature ...)]?) */ | 636 | (script lang [(gsub_feature ...)|nil] [(gpos_feature ...)]?) */ |
| 653 | int uniscribe_check_otf (font, otf_spec) | 637 | int |
| 654 | LOGFONT *font; | 638 | uniscribe_check_otf (LOGFONT *font, Lisp_Object otf_spec) |
| 655 | Lisp_Object otf_spec; | ||
| 656 | { | 639 | { |
| 657 | Lisp_Object script, lang, rest; | 640 | Lisp_Object script, lang, rest; |
| 658 | Lisp_Object features[2]; | 641 | Lisp_Object features[2]; |
| @@ -947,7 +930,7 @@ struct font_driver uniscribe_font_driver = | |||
| 947 | NULL, /* get_outline */ | 930 | NULL, /* get_outline */ |
| 948 | NULL, /* free_outline */ | 931 | NULL, /* free_outline */ |
| 949 | NULL, /* anchor_point */ | 932 | NULL, /* anchor_point */ |
| 950 | uniscribe_otf_capability, /* Defined so (font-get FONTOBJ :otf) works. */ | 933 | uniscribe_otf_capability, /* Defined so (font-get FONTOBJ :otf) works. */ |
| 951 | NULL, /* otf_drive - use shape instead. */ | 934 | NULL, /* otf_drive - use shape instead. */ |
| 952 | NULL, /* start_for_frame */ | 935 | NULL, /* start_for_frame */ |
| 953 | NULL, /* end_for_frame */ | 936 | NULL, /* end_for_frame */ |
| @@ -957,7 +940,7 @@ struct font_driver uniscribe_font_driver = | |||
| 957 | /* Note that this should be called at every startup, not just when dumping, | 940 | /* Note that this should be called at every startup, not just when dumping, |
| 958 | as it needs to test for the existence of the Uniscribe library. */ | 941 | as it needs to test for the existence of the Uniscribe library. */ |
| 959 | void | 942 | void |
| 960 | syms_of_w32uniscribe () | 943 | syms_of_w32uniscribe (void) |
| 961 | { | 944 | { |
| 962 | HMODULE uniscribe; | 945 | HMODULE uniscribe; |
| 963 | 946 | ||
diff --git a/src/w32xfns.c b/src/w32xfns.c index d77eb6b68ea..a929e45cf6d 100644 --- a/src/w32xfns.c +++ b/src/w32xfns.c | |||
| @@ -39,7 +39,7 @@ HANDLE input_available = NULL; | |||
| 39 | HANDLE interrupt_handle = NULL; | 39 | HANDLE interrupt_handle = NULL; |
| 40 | 40 | ||
| 41 | void | 41 | void |
| 42 | init_crit () | 42 | init_crit (void) |
| 43 | { | 43 | { |
| 44 | InitializeCriticalSection (&critsect); | 44 | InitializeCriticalSection (&critsect); |
| 45 | 45 | ||
| @@ -57,7 +57,7 @@ init_crit () | |||
| 57 | } | 57 | } |
| 58 | 58 | ||
| 59 | void | 59 | void |
| 60 | delete_crit () | 60 | delete_crit (void) |
| 61 | { | 61 | { |
| 62 | DeleteCriticalSection (&critsect); | 62 | DeleteCriticalSection (&critsect); |
| 63 | 63 | ||
| @@ -74,7 +74,7 @@ delete_crit () | |||
| 74 | } | 74 | } |
| 75 | 75 | ||
| 76 | void | 76 | void |
| 77 | signal_quit () | 77 | signal_quit (void) |
| 78 | { | 78 | { |
| 79 | /* Make sure this event never remains signaled; if the main thread | 79 | /* Make sure this event never remains signaled; if the main thread |
| 80 | isn't in a blocking call, then this should do nothing. */ | 80 | isn't in a blocking call, then this should do nothing. */ |
| @@ -161,9 +161,7 @@ int_msg *lpTail = NULL; | |||
| 161 | int nQueue = 0; | 161 | int nQueue = 0; |
| 162 | 162 | ||
| 163 | BOOL | 163 | BOOL |
| 164 | get_next_msg (lpmsg, bWait) | 164 | get_next_msg (W32Msg * lpmsg, BOOL bWait) |
| 165 | W32Msg * lpmsg; | ||
| 166 | BOOL bWait; | ||
| 167 | { | 165 | { |
| 168 | BOOL bRet = FALSE; | 166 | BOOL bRet = FALSE; |
| 169 | 167 | ||
| @@ -245,8 +243,7 @@ get_next_msg (lpmsg, bWait) | |||
| 245 | } | 243 | } |
| 246 | 244 | ||
| 247 | BOOL | 245 | BOOL |
| 248 | post_msg (lpmsg) | 246 | post_msg (W32Msg * lpmsg) |
| 249 | W32Msg * lpmsg; | ||
| 250 | { | 247 | { |
| 251 | int_msg * lpNew = (int_msg *) myalloc (sizeof (int_msg)); | 248 | int_msg * lpNew = (int_msg *) myalloc (sizeof (int_msg)); |
| 252 | 249 | ||
| @@ -298,7 +295,7 @@ prepend_msg (W32Msg *lpmsg) | |||
| 298 | 295 | ||
| 299 | /* Process all messages in the current thread's queue. */ | 296 | /* Process all messages in the current thread's queue. */ |
| 300 | void | 297 | void |
| 301 | drain_message_queue () | 298 | drain_message_queue (void) |
| 302 | { | 299 | { |
| 303 | MSG msg; | 300 | MSG msg; |
| 304 | while (PeekMessage (&msg, NULL, 0, 0, PM_REMOVE)) | 301 | while (PeekMessage (&msg, NULL, 0, 0, PM_REMOVE)) |
| @@ -322,9 +319,7 @@ drain_message_queue () | |||
| 322 | */ | 319 | */ |
| 323 | 320 | ||
| 324 | static int | 321 | static int |
| 325 | read_integer (string, NextString) | 322 | read_integer (register char *string, char **NextString) |
| 326 | register char *string; | ||
| 327 | char **NextString; | ||
| 328 | { | 323 | { |
| 329 | register int Result = 0; | 324 | register int Result = 0; |
| 330 | int Sign = 1; | 325 | int Sign = 1; |
| @@ -348,10 +343,9 @@ read_integer (string, NextString) | |||
| 348 | } | 343 | } |
| 349 | 344 | ||
| 350 | int | 345 | int |
| 351 | XParseGeometry (string, x, y, width, height) | 346 | XParseGeometry (char *string, |
| 352 | char *string; | 347 | int *x, int *y, |
| 353 | int *x, *y; | 348 | unsigned int *width, unsigned int *height) |
| 354 | unsigned int *width, *height; /* RETURN */ | ||
| 355 | { | 349 | { |
| 356 | int mask = NoValue; | 350 | int mask = NoValue; |
| 357 | register char *strind; | 351 | register char *strind; |
| @@ -446,8 +440,7 @@ XParseGeometry (string, x, y, width, height) | |||
| 446 | 440 | ||
| 447 | /* x_sync is a no-op on W32. */ | 441 | /* x_sync is a no-op on W32. */ |
| 448 | void | 442 | void |
| 449 | x_sync (f) | 443 | x_sync (void *f) |
| 450 | void *f; | ||
| 451 | { | 444 | { |
| 452 | } | 445 | } |
| 453 | 446 | ||