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/w32term.c | |
| parent | 7af07b967171736a35e0af8b6ecf6feb072184dc (diff) | |
| download | emacs-b56ceb92bf4d470af2e9172d1fcd4d85232c40a6.tar.gz emacs-b56ceb92bf4d470af2e9172d1fcd4d85232c40a6.zip | |
src/w32*.c: Convert function definitions to standard C.
Diffstat (limited to 'src/w32term.c')
| -rw-r--r-- | src/w32term.c | 484 |
1 files changed, 153 insertions, 331 deletions
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; |