aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog14
-rw-r--r--src/gtkutil.c14
-rw-r--r--src/xfns.c10
-rw-r--r--src/xterm.c91
4 files changed, 47 insertions, 82 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 5df51b487bd..76ca07d2dda 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,9 +1,23 @@
12015-02-16 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> 12015-02-16 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
2 2
3 * gtkutil.c (xg_page_setup_dialog, xg_get_page_setup, draw_page)
4 (xg_print_frames_dialog): Modernize k&r declarations.
5
6 * xfns.c (Fx_export_frames, Fx_page_setup_dialog, Fx_get_page_setup)
7 (Fx_print_frames_dialog): Modernize k&r declarations.
8
3 * xterm.c (x_draw_window_divider): Use x_fill_rectangle instead of 9 * xterm.c (x_draw_window_divider): Use x_fill_rectangle instead of
4 XFillRectangle. 10 XFillRectangle.
5 (x_draw_horizontal_wave) [USE_CAIRO]: New function. 11 (x_draw_horizontal_wave) [USE_CAIRO]: New function.
6 (x_draw_underwave) [USE_CAIRO]: Use it. 12 (x_draw_underwave) [USE_CAIRO]: Use it.
13 (x_gc_get_ext_data, x_extension_initialize, x_begin_cr_clip)
14 (x_end_cr_clip, x_set_cr_source_with_gc_foreground)
15 (x_set_cr_source_with_gc_background, x_cr_define_fringe_bitmap)
16 (x_cr_destroy_fringe_bitmap, x_cr_draw_frame, x_cr_accumulate_data)
17 (x_cr_destroy, x_cr_export_frames, x_prepare_for_xlibdraw)
18 (x_set_clip_rectangles, x_reset_clip_rectangles, x_fill_rectangle)
19 (x_draw_rectangle, x_clear_window, x_fill_trapezoid_for_relief)
20 (x_clear_area): Modernize k&r declarations.
7 21
82015-02-14 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> 222015-02-14 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
9 23
diff --git a/src/gtkutil.c b/src/gtkutil.c
index f111ea80cef..e357eb85730 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -4051,7 +4051,7 @@ static GtkPrintSettings *print_settings = NULL;
4051static GtkPageSetup *page_setup = NULL; 4051static GtkPageSetup *page_setup = NULL;
4052 4052
4053void 4053void
4054xg_page_setup_dialog () 4054xg_page_setup_dialog (void)
4055{ 4055{
4056 GtkPageSetup *new_page_setup = NULL; 4056 GtkPageSetup *new_page_setup = NULL;
4057 4057
@@ -4065,7 +4065,7 @@ xg_page_setup_dialog ()
4065} 4065}
4066 4066
4067Lisp_Object 4067Lisp_Object
4068xg_get_page_setup () 4068xg_get_page_setup (void)
4069{ 4069{
4070 Lisp_Object result, orientation_symbol; 4070 Lisp_Object result, orientation_symbol;
4071 GtkPageOrientation orientation; 4071 GtkPageOrientation orientation;
@@ -4107,11 +4107,8 @@ xg_get_page_setup ()
4107} 4107}
4108 4108
4109static void 4109static void
4110draw_page (operation, context, page_nr, user_data) 4110draw_page (GtkPrintOperation *operation, GtkPrintContext *context,
4111 GtkPrintOperation *operation; 4111 gint page_nr, gpointer user_data)
4112 GtkPrintContext *context;
4113 gint page_nr;
4114 gpointer user_data;
4115{ 4112{
4116 Lisp_Object frames = *((Lisp_Object *) user_data); 4113 Lisp_Object frames = *((Lisp_Object *) user_data);
4117 struct frame *f = XFRAME (Fnth (make_number (page_nr), frames)); 4114 struct frame *f = XFRAME (Fnth (make_number (page_nr), frames));
@@ -4121,8 +4118,7 @@ draw_page (operation, context, page_nr, user_data)
4121} 4118}
4122 4119
4123void 4120void
4124xg_print_frames_dialog (frames) 4121xg_print_frames_dialog (Lisp_Object frames)
4125 Lisp_Object frames;
4126{ 4122{
4127 GtkPrintOperation *print; 4123 GtkPrintOperation *print;
4128 GtkPrintOperationResult res; 4124 GtkPrintOperationResult res;
diff --git a/src/xfns.c b/src/xfns.c
index 23af4388e5f..5b591d31769 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -6158,8 +6158,7 @@ FRAMES should be nil (the selected frame), a frame, or a list of
6158frames (each of which corresponds to one page). Optional arg TYPE 6158frames (each of which corresponds to one page). Optional arg TYPE
6159should be either `pdf' (default), `png', `ps', or `svg'. Supported 6159should be either `pdf' (default), `png', `ps', or `svg'. Supported
6160types are determined by the compile-time configuration of cairo. */) 6160types are determined by the compile-time configuration of cairo. */)
6161 (frames, type) 6161 (Lisp_Object frames, Lisp_Object type)
6162 Lisp_Object frames, type;
6163{ 6162{
6164 Lisp_Object result, rest, tmp; 6163 Lisp_Object result, rest, tmp;
6165 cairo_surface_type_t surface_type; 6164 cairo_surface_type_t surface_type;
@@ -6224,7 +6223,7 @@ types are determined by the compile-time configuration of cairo. */)
6224DEFUN ("x-page-setup-dialog", Fx_page_setup_dialog, Sx_page_setup_dialog, 0, 0, 0, 6223DEFUN ("x-page-setup-dialog", Fx_page_setup_dialog, Sx_page_setup_dialog, 0, 0, 0,
6225 doc: /* Pop up a page setup dialog. 6224 doc: /* Pop up a page setup dialog.
6226The current page setup can be obtained using `x-get-page-setup'. */) 6225The current page setup can be obtained using `x-get-page-setup'. */)
6227 () 6226 (void)
6228{ 6227{
6229 block_input (); 6228 block_input ();
6230 xg_page_setup_dialog (); 6229 xg_page_setup_dialog ();
@@ -6247,7 +6246,7 @@ The return value is an alist containing the following keys:
6247The paper width can be obtained as the sum of width, left-margin, and 6246The paper width can be obtained as the sum of width, left-margin, and
6248right-margin values. Likewise, the paper height is the sum of height, 6247right-margin values. Likewise, the paper height is the sum of height,
6249top-margin, and bottom-margin values. */) 6248top-margin, and bottom-margin values. */)
6250 () 6249 (void)
6251{ 6250{
6252 Lisp_Object result; 6251 Lisp_Object result;
6253 6252
@@ -6263,8 +6262,7 @@ DEFUN ("x-print-frames-dialog", Fx_print_frames_dialog, Sx_print_frames_dialog,
6263FRAMES should be nil (the selected frame), a frame, or a list of 6262FRAMES should be nil (the selected frame), a frame, or a list of
6264frames (each of which corresponds to one page). Each frame should be 6263frames (each of which corresponds to one page). Each frame should be
6265visible. */) 6264visible. */)
6266 (frames) 6265 (Lisp_Object frames)
6267 Lisp_Object frames;
6268{ 6266{
6269 Lisp_Object rest, tmp; 6267 Lisp_Object rest, tmp;
6270 6268
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;