aboutsummaryrefslogtreecommitdiffstats
path: root/src/ChangeLog
diff options
context:
space:
mode:
authorJan D2015-02-11 16:14:35 +0100
committerJan D2015-02-11 16:14:35 +0100
commitdddcc0e78452f2186c132823a33a174d2596ba33 (patch)
tree8369d54925d9ea4b60ecf6a53c6a321dffd194f9 /src/ChangeLog
parent061c7e2b5a5a5854b2b85f2ace5b1d9222dd7f11 (diff)
downloademacs-dddcc0e78452f2186c132823a33a174d2596ba33.tar.gz
emacs-dddcc0e78452f2186c132823a33a174d2596ba33.zip
Add cairo drawing.
* configure.ac (with-cairo): New option. (USE_CAIRO): Default to yes for Gtk+ 3. Add code to test for cairo, set CAIRO_CFLAGS, CAIRO_LIBS. Add ftcrfonto to FONT_OBJ if cairo. Output "Does Emacs use cairo?". * lisp/version.el (emacs-version): Add cairo version. * src/Makefile.in (CAIRO_CFLAGS, CAIRO_LIBS): New variables. (FONT_OBJ): Add comment about ftcrfont. (ALL_CFLAGS): Add CAIRO_CFLAGS. (LIBES): Add CAIRO_LIBS. * src/dispextern.h (struct image): Add cr_data for cairo. (x_cr_init_fringe): Declare. * src/font.c (syms_of_font): Call syms_of_ftcrfont for cairo. * src/font.h (ftcrfont_driver, syms_of_ftcrfont): Declare * src/fringe.c (x_cr_init_fringe): New function name that shares code with w32_init_fringe. * src/ftcrfont.c: New font driver for cairo, based on the ftfont driver. * src/ftfont.c (ftfont_info_size); New global variable. (ftfont_open2): New extern function almost the same as old ftfont_open, but takes the font_object as argument. (ftfont_open): Build font object and call ftfont_open2. * src/ftfont.h (ftfont_open2, ftfont_info_size): Declare. * src/gtkutil.c (xg_clear_under_internal_border) (xg_update_scrollbar_pos, xg_update_horizontal_scrollbar_pos): Only queue_draw if not cairo. Change args to x_clear_area. (xg_get_font): Use Qftcr when using cairo, Qxft otherwise. (xg_page_setup_dialog, xg_get_page_setup, draw_page) (xg_print_frames_dialog): New functions for printing. * src/gtkutil.h (xg_page_setup_dialog, xg_get_page_setup) (xg_print_frames_dialog): Declare. * src/image.c: Add defined (USE_CAIRO) for PNG. Add !defined USE_CAIRO for W32 PNG code. (x_clear_image): If cairo, destroy the surface in cr_data. (png_load): Add new cairo compatible implementation. (lookup_image_type): Add defined (USE_CAIRO) for define png_type. * src/xfns.c: New section Printing. (x-export-frames, x-page-setup-dialog, x-get-page-setup) (x-print-frames-dialog): New printing functions. (Fx_create_frame, x_create_tip_frame): Register ftcrfont if cairo. (syms_of_xfns): Defsym Qorientation, Qtop_margin, Qbottom_margin, Qportrait, Qlandscape, Qreverse_portrait, Qreverse_landscape). (syms_of_xfns): Provide cairo and defvar cairo-version-string. defsubr Sx_page_setup_dialog, Sx_get_page_setup, Sx_print_frames_dialog. * src/xterm.c (x_clear_area1, x_prepare_for_xlibdraw) (x_set_clip_rectangles, x_reset_clip_rectangles, x_fill_rectangle) (x_draw_rectangle, x_fill_trapezoid_for_relief, x_clear_window) (x_gc_get_ext_data, x_extension_initialize, x_cr_accumulate_data): Declare. (FRAME_CR_CONTEXT, FRAME_CR_SURFACE): New macros. (max_fringe_bmp, fringe_bmp): New variables. (x_gc_get_ext_data, x_extension_initialize) (x_cr_destroy_surface, 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_image, 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): New functions. (x_update_begin): Create cairo surface if needed. (x_draw_vertical_window_border): Call x_fill_rectangle for cairo. (x_update_end): Paint cairo drawing surface to xlib surface. (x_clear_under_internal_border, x_after_update_window_line): Adjust arguments to x_clear_area. (x_draw_fringe_bitmap): Call x_fill_rectangle. Get GC values and call x_cr_draw_image for cairo. Call x_reset_clip_rectangles instead of XSetClipMask. (x_set_glyph_string_clipping) (x_set_glyph_string_clipping_exactly): Use x_set_clip_rectangles instead of XSetClipRectangles. (x_clear_glyph_string_rect, x_draw_glyph_string_background): Use x_fill_rectangle instead of XFillRectangle. (x_draw_glyph_string_foreground) (x_draw_composite_glyph_string_foreground) (x_draw_glyphless_glyph_string_foreground): Use x_draw_rectangle instead of XDrawRectangle. (x_draw_relief_rect): Add code for USE_CAIRO. Call x_reset_clip_rectangles instead of XSetClipMask. (x_draw_box_rect): x_set_clip_rectangles instead of XSetClipRectangles, x_fill_rectangle instead of XFillRectangle, x_reset_clip_rectangles instead of XSetClipMask. (x_draw_image_foreground, x_draw_image_foreground_1): x_draw_rectangle instead of XDrawRectangle. (x_draw_glyph_string_bg_rect): x_fill_rectangle instead of XFillRectangle. (x_draw_image_glyph_string): If img has cr_data, use it as a cairo surface. (x_draw_stretch_glyph_string): x_set_clip_rectangles instead of XSetClipRectangles, x_fill_rectangle instead of XFillRectangle. (x_draw_glyph_string): x_fill_rectangle instead of XFillRectangle., x_reset_clip_rectangles instead of XSetClipMask. (x_shift_glyphs_for_insert): Call x_prepare_for_xlibdraw. (x_clear_area1): New function that calls XClearArea. (x_clear_area): Takes frame as parameter, calls x_clear_area1 for non-cairo. (x_clear_frame): x_clear_window instead of XClearWindow. (x_scroll_run): Set frame garbaged if cairo. (XTmouse_position): Initialize *part to 0. (x_scroll_bar_create): Adjust arguments to x_clear_area. (x_scroll_bar_set_handle): x_clear_area1 instead of x_clear_area, x_fill_rectangle instead of XFillRectangle. (XTset_vertical_scroll_bar, XTset_horizontal_scroll_bar): Adjust arguments to x_clear_area. (x_scroll_bar_expose): x_draw_rectangle instead of XDrawRectangle. (handle_one_xevent): Adjust arguments to x_clear_area. Destroy cairo surface for frame if ConfigureNotify. (x_clip_to_row): x_set_clip_rectangles instead of XSetClipRectangles. (x_draw_hollow_cursor): x_draw_rectangle instead of XDrawRectangle, x_reset_clip_rectangles instead of XSetClipMask. (x_draw_bar_cursor): x_fill_rectangle instead of XFillRectangle, x_reset_clip_rectangles instead of XSetClipMask. (x_clear_frame_area): Adjust arguments to x_clear_area. (x_free_frame_resources): Call x_prepare_for_xlibdraw. (x_term_init): Call x_extension_initialize if cairo. (x_redisplay_interface): Add x_cr_define_fringe_bitmap, x_cr_destroy_fringe_bitmap for cairo. (x_initialize): Call x_cr_init_fringe for cairo. * src/xterm.h: Add include of cairo header files. (x_bitmap_record): Add img if cairo. (x_gc_ext_data): New struct for cairo. (x_display_info): Add ext_codes for cairo. (x_output): Add cr_context and cr_surface for cairo. (x_clear_area): Change arguments from Display*/Window to frame pointer. (x_query_color, x_begin_cr_clip, x_end_cr_clip) (x_set_cr_source_with_gc_foreground, x_set_cr_source_with_gc_background) (x_cr_draw_frame, x_cr_export_frames): Declare.
Diffstat (limited to 'src/ChangeLog')
-rw-r--r--src/ChangeLog138
1 files changed, 138 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index f8e65d5d91d..e361fe286e4 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,141 @@
12015-02-11 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
2 Jan Djärv <jan.h.d@swipnet.se>
3
4 * xterm.h: Add include of cairo header files.
5 (x_bitmap_record): Add img if cairo.
6 (x_gc_ext_data): New struct for cairo.
7 (x_display_info): Add ext_codes for cairo.
8 (x_output): Add cr_context and cr_surface for cairo.
9 (x_clear_area): Change arguments from Display*/Window to frame pointer.
10 (x_query_color, x_begin_cr_clip, x_end_cr_clip)
11 (x_set_cr_source_with_gc_foreground, x_set_cr_source_with_gc_background)
12 (x_cr_draw_frame, x_cr_export_frames): Declare.
13
14 * xterm.c (x_clear_area1, x_prepare_for_xlibdraw)
15 (x_set_clip_rectangles, x_reset_clip_rectangles, x_fill_rectangle)
16 (x_draw_rectangle, x_fill_trapezoid_for_relief, x_clear_window)
17 (x_gc_get_ext_data, x_extension_initialize, x_cr_accumulate_data):
18 Declare.
19 (FRAME_CR_CONTEXT, FRAME_CR_SURFACE): New macros.
20 (max_fringe_bmp, fringe_bmp): New variables.
21 (x_gc_get_ext_data, x_extension_initialize)
22 (x_cr_destroy_surface, x_begin_cr_clip, x_end_cr_clip)
23 (x_set_cr_source_with_gc_foreground)
24 (x_set_cr_source_with_gc_background, x_cr_define_fringe_bitmap)
25 (x_cr_destroy_fringe_bitmap, x_cr_draw_image, x_cr_draw_frame)
26 (x_cr_accumulate_data, x_cr_destroy, x_cr_export_frames)
27 (x_prepare_for_xlibdraw, x_set_clip_rectangles)
28 (x_reset_clip_rectangles, x_fill_rectangle, x_draw_rectangle)
29 (x_clear_window, x_fill_trapezoid_for_relief): New functions.
30 (x_update_begin): Create cairo surface if needed.
31 (x_draw_vertical_window_border): Call x_fill_rectangle for cairo.
32 (x_update_end): Paint cairo drawing surface to xlib surface.
33 (x_clear_under_internal_border, x_after_update_window_line): Adjust
34 arguments to x_clear_area.
35 (x_draw_fringe_bitmap): Call x_fill_rectangle. Get GC values and
36 call x_cr_draw_image for cairo. Call x_reset_clip_rectangles instead
37 of XSetClipMask.
38 (x_set_glyph_string_clipping)
39 (x_set_glyph_string_clipping_exactly): Use x_set_clip_rectangles
40 instead of XSetClipRectangles.
41 (x_clear_glyph_string_rect, x_draw_glyph_string_background): Use
42 x_fill_rectangle instead of XFillRectangle.
43 (x_draw_glyph_string_foreground)
44 (x_draw_composite_glyph_string_foreground)
45 (x_draw_glyphless_glyph_string_foreground): Use x_draw_rectangle instead
46 of XDrawRectangle.
47 (x_draw_relief_rect): Add code for USE_CAIRO.
48 Call x_reset_clip_rectangles instead of XSetClipMask.
49 (x_draw_box_rect): x_set_clip_rectangles instead of XSetClipRectangles,
50 x_fill_rectangle instead of XFillRectangle, x_reset_clip_rectangles
51 instead of XSetClipMask.
52 (x_draw_image_foreground, x_draw_image_foreground_1):
53 x_draw_rectangle instead of XDrawRectangle.
54 (x_draw_glyph_string_bg_rect): x_fill_rectangle instead of
55 XFillRectangle.
56 (x_draw_image_glyph_string): If img has cr_data, use it as
57 a cairo surface.
58 (x_draw_stretch_glyph_string): x_set_clip_rectangles instead of
59 XSetClipRectangles, x_fill_rectangle instead of XFillRectangle.
60 (x_draw_glyph_string): x_fill_rectangle instead of XFillRectangle.,
61 x_reset_clip_rectangles instead of XSetClipMask.
62 (x_shift_glyphs_for_insert): Call x_prepare_for_xlibdraw.
63 (x_clear_area1): New function that calls XClearArea.
64 (x_clear_area): Takes frame as parameter, calls x_clear_area1 for
65 non-cairo.
66 (x_clear_frame): x_clear_window instead of XClearWindow.
67 (x_scroll_run): Set frame garbaged if cairo.
68 (XTmouse_position): Initialize *part to 0.
69 (x_scroll_bar_create): Adjust arguments to x_clear_area.
70 (x_scroll_bar_set_handle): x_clear_area1 instead of x_clear_area,
71 x_fill_rectangle instead of XFillRectangle.
72 (XTset_vertical_scroll_bar, XTset_horizontal_scroll_bar): Adjust
73 arguments to x_clear_area.
74 (x_scroll_bar_expose): x_draw_rectangle instead of XDrawRectangle.
75 (handle_one_xevent): Adjust arguments to x_clear_area.
76 Destroy cairo surface for frame if ConfigureNotify.
77 (x_clip_to_row): x_set_clip_rectangles instead of XSetClipRectangles.
78 (x_draw_hollow_cursor): x_draw_rectangle instead of XDrawRectangle,
79 x_reset_clip_rectangles instead of XSetClipMask.
80 (x_draw_bar_cursor): x_fill_rectangle instead of XFillRectangle,
81 x_reset_clip_rectangles instead of XSetClipMask.
82 (x_clear_frame_area): Adjust arguments to x_clear_area.
83 (x_free_frame_resources): Call x_prepare_for_xlibdraw.
84 (x_term_init): Call x_extension_initialize if cairo.
85 (x_redisplay_interface): Add x_cr_define_fringe_bitmap,
86 x_cr_destroy_fringe_bitmap for cairo.
87 (x_initialize): Call x_cr_init_fringe for cairo.
88
89 * xfns.c: New section Printing.
90 (x-export-frames, x-page-setup-dialog, x-get-page-setup)
91 (x-print-frames-dialog): New printing functions.
92 (Fx_create_frame, x_create_tip_frame): Register ftcrfont if
93 cairo.
94 (syms_of_xfns): Defsym Qorientation, Qtop_margin, Qbottom_margin,
95 Qportrait, Qlandscape, Qreverse_portrait, Qreverse_landscape).
96 (syms_of_xfns): Provide cairo and defvar cairo-version-string.
97 defsubr Sx_page_setup_dialog, Sx_get_page_setup, Sx_print_frames_dialog.
98
99 * image.c: Add defined (USE_CAIRO) for PNG.
100 Add !defined USE_CAIRO for W32 PNG code.
101 (x_clear_image): If cairo, destroy the surface in cr_data.
102 (png_load): Add new cairo compatible implementation.
103 (lookup_image_type): Add defined (USE_CAIRO) for define png_type.
104
105 * gtkutil.h (xg_page_setup_dialog, xg_get_page_setup)
106 (xg_print_frames_dialog): Declare.
107
108 * gtkutil.c (xg_clear_under_internal_border)
109 (xg_update_scrollbar_pos, xg_update_horizontal_scrollbar_pos): Only
110 queue_draw if not cairo. Change args to x_clear_area.
111 (xg_get_font): Use Qftcr when using cairo, Qxft otherwise.
112 (xg_page_setup_dialog, xg_get_page_setup, draw_page)
113 (xg_print_frames_dialog): New functions for printing.
114
115 * ftfont.h (ftfont_open2, ftfont_info_size): Declare.
116
117 * ftfont.c (ftfont_info_size); New global variable.
118 (ftfont_open2): New extern function almost the same as old ftfont_open,
119 but takes the font_object as argument.
120 (ftfont_open): Build font object and call ftfont_open2.
121
122 * ftcrfont.c: New font driver for cairo, based on the ftfont driver.
123
124 * fringe.c (x_cr_init_fringe): New function name that shares code
125 with w32_init_fringe.
126
127 * font.h (ftcrfont_driver, syms_of_ftcrfont): Declare
128
129 * font.c (syms_of_font): Call syms_of_ftcrfont for cairo.
130
131 * dispextern.h (struct image): Add cr_data for cairo.
132 (x_cr_init_fringe): Declare.
133
134 * Makefile.in (CAIRO_CFLAGS, CAIRO_LIBS): New variables.
135 (FONT_OBJ): Add comment about ftcrfont.
136 (ALL_CFLAGS): Add CAIRO_CFLAGS.
137 (LIBES): Add CAIRO_LIBS.
138
12015-02-11 Martin Rudalics <rudalics@gmx.at> 1392015-02-11 Martin Rudalics <rudalics@gmx.at>
2 140
3 * w32term.c (w32_read_socket): In SIZE_MAXIMIZED and 141 * w32term.c (w32_read_socket): In SIZE_MAXIMIZED and