diff options
| author | YAMAMOTO Mitsuharu | 2015-02-16 10:53:40 +0900 |
|---|---|---|
| committer | YAMAMOTO Mitsuharu | 2015-02-16 10:53:40 +0900 |
| commit | a7930e125e27d3591bcf20aa3cd954dc5993ad1b (patch) | |
| tree | 5adc62d977eb033bd94fd0f874713530b97b3e28 /src/xterm.c | |
| parent | 426af0ef9f2008d78633a2f3c1daf1ddbe9d8e6e (diff) | |
| download | emacs-a7930e125e27d3591bcf20aa3cd954dc5993ad1b.tar.gz emacs-a7930e125e27d3591bcf20aa3cd954dc5993ad1b.zip | |
Modernize k&r cairo-related function declarations.
* gtkutil.c (xg_page_setup_dialog, xg_get_page_setup, draw_page)
(xg_print_frames_dialog): Modernize k&r declarations.
* xfns.c (Fx_export_frames, Fx_page_setup_dialog, Fx_get_page_setup)
(Fx_print_frames_dialog): Modernize k&r declarations.
* xterm.c (x_gc_get_ext_data, x_extension_initialize, x_begin_cr_clip)
(x_end_cr_clip, x_set_cr_source_with_gc_foreground)
(x_set_cr_source_with_gc_background, x_cr_define_fringe_bitmap)
(x_cr_destroy_fringe_bitmap, x_cr_draw_frame, x_cr_accumulate_data)
(x_cr_destroy, x_cr_export_frames, x_prepare_for_xlibdraw)
(x_set_clip_rectangles, x_reset_clip_rectangles, x_fill_rectangle)
(x_draw_rectangle, x_clear_window, x_fill_trapezoid_for_relief)
(x_clear_area): Modernize k&r declarations.
Diffstat (limited to 'src/xterm.c')
| -rw-r--r-- | src/xterm.c | 91 |
1 files changed, 24 insertions, 67 deletions
diff --git a/src/xterm.c b/src/xterm.c index ae421a8d795..6cc96587ab7 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -348,10 +348,7 @@ static cairo_status_t x_cr_accumulate_data (void *, | |||
| 348 | #define FRAME_CR_SURFACE(f) ((f)->output_data.x->cr_surface) | 348 | #define FRAME_CR_SURFACE(f) ((f)->output_data.x->cr_surface) |
| 349 | 349 | ||
| 350 | static struct x_gc_ext_data * | 350 | static struct x_gc_ext_data * |
| 351 | x_gc_get_ext_data (f, gc, create_if_not_found_p) | 351 | x_gc_get_ext_data (struct frame *f, GC gc, int create_if_not_found_p) |
| 352 | struct frame *f; | ||
| 353 | GC gc; | ||
| 354 | int create_if_not_found_p; | ||
| 355 | { | 352 | { |
| 356 | struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f); | 353 | struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f); |
| 357 | XEDataObject object; | 354 | XEDataObject object; |
| @@ -376,8 +373,7 @@ x_gc_get_ext_data (f, gc, create_if_not_found_p) | |||
| 376 | } | 373 | } |
| 377 | 374 | ||
| 378 | static void | 375 | static void |
| 379 | x_extension_initialize (dpyinfo) | 376 | x_extension_initialize (struct x_display_info *dpyinfo) |
| 380 | struct x_display_info *dpyinfo; | ||
| 381 | { | 377 | { |
| 382 | XExtCodes *ext_codes = XAddExtension (dpyinfo->display); | 378 | XExtCodes *ext_codes = XAddExtension (dpyinfo->display); |
| 383 | 379 | ||
| @@ -398,9 +394,7 @@ x_cr_destroy_surface (struct frame *f) | |||
| 398 | } | 394 | } |
| 399 | 395 | ||
| 400 | cairo_t * | 396 | cairo_t * |
| 401 | x_begin_cr_clip (f, gc) | 397 | x_begin_cr_clip (struct frame *f, GC gc) |
| 402 | struct frame *f; | ||
| 403 | GC gc; | ||
| 404 | { | 398 | { |
| 405 | cairo_t *cr = FRAME_CR_CONTEXT (f); | 399 | cairo_t *cr = FRAME_CR_CONTEXT (f); |
| 406 | 400 | ||
| @@ -445,16 +439,13 @@ x_begin_cr_clip (f, gc) | |||
| 445 | } | 439 | } |
| 446 | 440 | ||
| 447 | void | 441 | void |
| 448 | x_end_cr_clip (f) | 442 | x_end_cr_clip (struct frame *f) |
| 449 | struct frame *f; | ||
| 450 | { | 443 | { |
| 451 | cairo_restore (FRAME_CR_CONTEXT (f)); | 444 | cairo_restore (FRAME_CR_CONTEXT (f)); |
| 452 | } | 445 | } |
| 453 | 446 | ||
| 454 | void | 447 | void |
| 455 | x_set_cr_source_with_gc_foreground (f, gc) | 448 | x_set_cr_source_with_gc_foreground (struct frame *f, GC gc) |
| 456 | struct frame *f; | ||
| 457 | GC gc; | ||
| 458 | { | 449 | { |
| 459 | XGCValues xgcv; | 450 | XGCValues xgcv; |
| 460 | XColor color; | 451 | XColor color; |
| @@ -467,9 +458,7 @@ x_set_cr_source_with_gc_foreground (f, gc) | |||
| 467 | } | 458 | } |
| 468 | 459 | ||
| 469 | void | 460 | void |
| 470 | x_set_cr_source_with_gc_background (f, gc) | 461 | x_set_cr_source_with_gc_background (struct frame *f, GC gc) |
| 471 | struct frame *f; | ||
| 472 | GC gc; | ||
| 473 | { | 462 | { |
| 474 | XGCValues xgcv; | 463 | XGCValues xgcv; |
| 475 | XColor color; | 464 | XColor color; |
| @@ -487,10 +476,7 @@ static int max_fringe_bmp = 0; | |||
| 487 | static cairo_pattern_t **fringe_bmp = 0; | 476 | static cairo_pattern_t **fringe_bmp = 0; |
| 488 | 477 | ||
| 489 | static void | 478 | static void |
| 490 | x_cr_define_fringe_bitmap (which, bits, h, wd) | 479 | x_cr_define_fringe_bitmap (int which, unsigned short *bits, int h, int wd) |
| 491 | int which; | ||
| 492 | unsigned short *bits; | ||
| 493 | int h, wd; | ||
| 494 | { | 480 | { |
| 495 | int i, stride; | 481 | int i, stride; |
| 496 | cairo_surface_t *surface; | 482 | cairo_surface_t *surface; |
| @@ -528,8 +514,7 @@ x_cr_define_fringe_bitmap (which, bits, h, wd) | |||
| 528 | } | 514 | } |
| 529 | 515 | ||
| 530 | static void | 516 | static void |
| 531 | x_cr_destroy_fringe_bitmap (which) | 517 | x_cr_destroy_fringe_bitmap (int which) |
| 532 | int which; | ||
| 533 | { | 518 | { |
| 534 | if (which >= max_fringe_bmp) | 519 | if (which >= max_fringe_bmp) |
| 535 | return; | 520 | return; |
| @@ -588,9 +573,7 @@ x_cr_draw_image (struct frame *f, | |||
| 588 | } | 573 | } |
| 589 | 574 | ||
| 590 | void | 575 | void |
| 591 | x_cr_draw_frame (cr, f) | 576 | x_cr_draw_frame (cairo_t *cr, struct frame *f) |
| 592 | cairo_t *cr; | ||
| 593 | struct frame *f; | ||
| 594 | { | 577 | { |
| 595 | int width, height; | 578 | int width, height; |
| 596 | 579 | ||
| @@ -605,10 +588,8 @@ x_cr_draw_frame (cr, f) | |||
| 605 | } | 588 | } |
| 606 | 589 | ||
| 607 | static cairo_status_t | 590 | static cairo_status_t |
| 608 | x_cr_accumulate_data (closure, data, length) | 591 | x_cr_accumulate_data (void *closure, const unsigned char *data, |
| 609 | void *closure; | 592 | unsigned int length) |
| 610 | const unsigned char *data; | ||
| 611 | unsigned int length; | ||
| 612 | { | 593 | { |
| 613 | Lisp_Object *acc = (Lisp_Object *) closure; | 594 | Lisp_Object *acc = (Lisp_Object *) closure; |
| 614 | 595 | ||
| @@ -618,8 +599,7 @@ x_cr_accumulate_data (closure, data, length) | |||
| 618 | } | 599 | } |
| 619 | 600 | ||
| 620 | static void | 601 | static void |
| 621 | x_cr_destroy (arg) | 602 | x_cr_destroy (Lisp_Object arg) |
| 622 | Lisp_Object arg; | ||
| 623 | { | 603 | { |
| 624 | cairo_t *cr = (cairo_t *) XSAVE_POINTER (arg, 0); | 604 | cairo_t *cr = (cairo_t *) XSAVE_POINTER (arg, 0); |
| 625 | 605 | ||
| @@ -629,9 +609,7 @@ x_cr_destroy (arg) | |||
| 629 | } | 609 | } |
| 630 | 610 | ||
| 631 | Lisp_Object | 611 | Lisp_Object |
| 632 | x_cr_export_frames (frames, surface_type) | 612 | x_cr_export_frames (Lisp_Object frames, cairo_surface_type_t surface_type) |
| 633 | Lisp_Object frames; | ||
| 634 | cairo_surface_type_t surface_type; | ||
| 635 | { | 613 | { |
| 636 | struct frame *f; | 614 | struct frame *f; |
| 637 | cairo_surface_t *surface; | 615 | cairo_surface_t *surface; |
| @@ -730,8 +708,7 @@ x_cr_export_frames (frames, surface_type) | |||
| 730 | #endif /* USE_CAIRO */ | 708 | #endif /* USE_CAIRO */ |
| 731 | 709 | ||
| 732 | static void | 710 | static void |
| 733 | x_prepare_for_xlibdraw (f) | 711 | x_prepare_for_xlibdraw (struct frame *f) |
| 734 | struct frame *f; | ||
| 735 | { | 712 | { |
| 736 | #ifdef USE_CAIRO | 713 | #ifdef USE_CAIRO |
| 737 | if (f == NULL) | 714 | if (f == NULL) |
| @@ -760,11 +737,7 @@ x_prepare_for_xlibdraw (f) | |||
| 760 | } | 737 | } |
| 761 | 738 | ||
| 762 | static void | 739 | static void |
| 763 | x_set_clip_rectangles (f, gc, rectangles, n) | 740 | x_set_clip_rectangles (struct frame *f, GC gc, XRectangle *rectangles, int n) |
| 764 | struct frame *f; | ||
| 765 | GC gc; | ||
| 766 | XRectangle *rectangles; | ||
| 767 | int n; | ||
| 768 | { | 741 | { |
| 769 | XSetClipRectangles (FRAME_X_DISPLAY (f), gc, 0, 0, rectangles, n, Unsorted); | 742 | XSetClipRectangles (FRAME_X_DISPLAY (f), gc, 0, 0, rectangles, n, Unsorted); |
| 770 | #ifdef USE_CAIRO | 743 | #ifdef USE_CAIRO |
| @@ -780,9 +753,7 @@ x_set_clip_rectangles (f, gc, rectangles, n) | |||
| 780 | } | 753 | } |
| 781 | 754 | ||
| 782 | static void | 755 | static void |
| 783 | x_reset_clip_rectangles (f, gc) | 756 | x_reset_clip_rectangles (struct frame *f, GC gc) |
| 784 | struct frame *f; | ||
| 785 | GC gc; | ||
| 786 | { | 757 | { |
| 787 | XSetClipMask (FRAME_X_DISPLAY (f), gc, None); | 758 | XSetClipMask (FRAME_X_DISPLAY (f), gc, None); |
| 788 | #ifdef USE_CAIRO | 759 | #ifdef USE_CAIRO |
| @@ -796,11 +767,8 @@ x_reset_clip_rectangles (f, gc) | |||
| 796 | } | 767 | } |
| 797 | 768 | ||
| 798 | static void | 769 | static void |
| 799 | x_fill_rectangle (f, gc, x, y, width, height) | 770 | x_fill_rectangle (struct frame *f, GC gc, int x, int y, |
| 800 | struct frame *f; | 771 | unsigned int width, unsigned int height) |
| 801 | GC gc; | ||
| 802 | int x, y; | ||
| 803 | unsigned int width, height; | ||
| 804 | { | 772 | { |
| 805 | #ifdef USE_CAIRO | 773 | #ifdef USE_CAIRO |
| 806 | cairo_t *cr; | 774 | cairo_t *cr; |
| @@ -817,11 +785,8 @@ x_fill_rectangle (f, gc, x, y, width, height) | |||
| 817 | } | 785 | } |
| 818 | 786 | ||
| 819 | static void | 787 | static void |
| 820 | x_draw_rectangle (f, gc, x, y, width, height) | 788 | x_draw_rectangle (struct frame *f, GC gc, int x, int y, |
| 821 | struct frame *f; | 789 | unsigned int width, unsigned int height) |
| 822 | GC gc; | ||
| 823 | int x, y; | ||
| 824 | unsigned int width, height; | ||
| 825 | { | 790 | { |
| 826 | #ifdef USE_CAIRO | 791 | #ifdef USE_CAIRO |
| 827 | cairo_t *cr; | 792 | cairo_t *cr; |
| @@ -839,8 +804,7 @@ x_draw_rectangle (f, gc, x, y, width, height) | |||
| 839 | } | 804 | } |
| 840 | 805 | ||
| 841 | static void | 806 | static void |
| 842 | x_clear_window (f) | 807 | x_clear_window (struct frame *f) |
| 843 | struct frame *f; | ||
| 844 | { | 808 | { |
| 845 | #ifdef USE_CAIRO | 809 | #ifdef USE_CAIRO |
| 846 | cairo_t *cr; | 810 | cairo_t *cr; |
| @@ -856,12 +820,8 @@ x_clear_window (f) | |||
| 856 | 820 | ||
| 857 | #ifdef USE_CAIRO | 821 | #ifdef USE_CAIRO |
| 858 | static void | 822 | static void |
| 859 | x_fill_trapezoid_for_relief (f, gc, x, y, width, height, top_p) | 823 | x_fill_trapezoid_for_relief (struct frame *f, GC gc, int x, int y, |
| 860 | struct frame *f; | 824 | unsigned int width, unsigned int height, int top_p) |
| 861 | GC gc; | ||
| 862 | int x, y; | ||
| 863 | unsigned int width, height; | ||
| 864 | int top_p; | ||
| 865 | { | 825 | { |
| 866 | cairo_t *cr; | 826 | cairo_t *cr; |
| 867 | 827 | ||
| @@ -3667,10 +3627,7 @@ x_clear_area1 (Display *dpy, Window window, | |||
| 3667 | 3627 | ||
| 3668 | 3628 | ||
| 3669 | void | 3629 | void |
| 3670 | x_clear_area (f, x, y, width, height) | 3630 | x_clear_area (struct frame *f, int x, int y, int width, int height) |
| 3671 | struct frame *f; | ||
| 3672 | int x, y; | ||
| 3673 | int width, height; | ||
| 3674 | { | 3631 | { |
| 3675 | #ifdef USE_CAIRO | 3632 | #ifdef USE_CAIRO |
| 3676 | cairo_t *cr; | 3633 | cairo_t *cr; |