aboutsummaryrefslogtreecommitdiffstats
path: root/src/xterm.c
diff options
context:
space:
mode:
authorYAMAMOTO Mitsuharu2015-02-16 10:53:40 +0900
committerYAMAMOTO Mitsuharu2015-02-16 10:53:40 +0900
commita7930e125e27d3591bcf20aa3cd954dc5993ad1b (patch)
tree5adc62d977eb033bd94fd0f874713530b97b3e28 /src/xterm.c
parent426af0ef9f2008d78633a2f3c1daf1ddbe9d8e6e (diff)
downloademacs-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.c91
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
350static struct x_gc_ext_data * 350static struct x_gc_ext_data *
351x_gc_get_ext_data (f, gc, create_if_not_found_p) 351x_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
378static void 375static void
379x_extension_initialize (dpyinfo) 376x_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
400cairo_t * 396cairo_t *
401x_begin_cr_clip (f, gc) 397x_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
447void 441void
448x_end_cr_clip (f) 442x_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
454void 447void
455x_set_cr_source_with_gc_foreground (f, gc) 448x_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
469void 460void
470x_set_cr_source_with_gc_background (f, gc) 461x_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;
487static cairo_pattern_t **fringe_bmp = 0; 476static cairo_pattern_t **fringe_bmp = 0;
488 477
489static void 478static void
490x_cr_define_fringe_bitmap (which, bits, h, wd) 479x_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
530static void 516static void
531x_cr_destroy_fringe_bitmap (which) 517x_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
590void 575void
591x_cr_draw_frame (cr, f) 576x_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
607static cairo_status_t 590static cairo_status_t
608x_cr_accumulate_data (closure, data, length) 591x_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
620static void 601static void
621x_cr_destroy (arg) 602x_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
631Lisp_Object 611Lisp_Object
632x_cr_export_frames (frames, surface_type) 612x_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
732static void 710static void
733x_prepare_for_xlibdraw (f) 711x_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
762static void 739static void
763x_set_clip_rectangles (f, gc, rectangles, n) 740x_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
782static void 755static void
783x_reset_clip_rectangles (f, gc) 756x_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
798static void 769static void
799x_fill_rectangle (f, gc, x, y, width, height) 770x_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
819static void 787static void
820x_draw_rectangle (f, gc, x, y, width, height) 788x_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
841static void 806static void
842x_clear_window (f) 807x_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
858static void 822static void
859x_fill_trapezoid_for_relief (f, gc, x, y, width, height, top_p) 823x_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
3669void 3629void
3670x_clear_area (f, x, y, width, height) 3630x_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;