1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-26 07:11:34 -08:00
Commit graph

147 commits

Author SHA1 Message Date
Jan D
dddcc0e784 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.
2015-02-11 16:14:35 +01:00
Ulrich Müller
fd5c0bcc3b Update docstring of emacs-repository-get-version.
* version.el (emacs-repository-get-version): Update docstring.
2015-01-17 23:19:15 +01:00
Ulrich Müller
6a6bb820d0 Discard the Bazaar case in repository version detection
* version.el (emacs-bzr-version-dirstate, emacs-bzr-version-bzr):
Remove.
(emacs-repository-get-version): Discard the Bazaar case.

* vc/vc-bzr.el (vc-bzr-version-dirstate): Rename from
emacs-bzr-version-dirstate and move from version.el to here.
(vc-bzr-working-revision): Use it.
2015-01-17 10:56:45 +01:00
Paul Eggert
7e09ef09a4 Update copyright year to 2015
Run admin/update-copyright.
2015-01-01 14:26:41 -08:00
Andreas Schwab
1033147831 Use git rev-parse to get repository version
* version.el (emacs-repository-get-version): Use git rev-parse
instead of git log.
2014-11-16 00:27:58 +01:00
Ulrich Müller
df33e85a80 (emacs-repository-get-version): Call `git log' with proper format argument
Fixes: debbugs:19049

* version.el (emacs-repository-get-version): Call `git log'
command with proper format argument (bug#19049).
2014-11-14 15:21:31 +01:00
Glenn Morris
15d0d8d11b Yet another change for git migration backported from trunk.
lisp/version.el (emacs-bzr-version, emacs-bzr-get-version):
 Revert 2014-10-31 change.
2014-10-31 11:09:24 +02:00
Eric S. Raymond
1ad9ad3bfe Backport from trunk more changes in preparation for git migration.
admin/notes/bzr: Renamed to notes/repo, reorganixed to separate
 VCS-dependent from VCS-independent stuff.  Added guidance about
 commit-comment format under DVCSes.
 admin/notes/BRANCH: Merged into notes/repo.

 lisp/version.el: Fix some fallback values to conform to the actual
 release number.
2014-10-31 11:06:47 +02:00
Glenn Morris
34dc21db6e Replace "Maintainer: FSF" with the emacs-devel mailing address 2014-02-09 17:34:22 -08:00
Glenn Morris
a5f2a870bc Tweak earlier version.el change 2014-01-22 16:14:34 -05:00
Glenn Morris
edace89f26 * lisp/version.el (emacs-bzr-version-bzr): Fix typo. 2014-01-22 13:29:40 -05:00
Glenn Morris
983664c0b4 * version.el (emacs-repository-get-version): Avoid error if .git exists but
the git executable is not found.
2014-01-22 09:34:27 -08:00
Glenn Morris
2a5bce4f0c Fixes for emacs-repository-get-version
* lisp/version.el (emacs-repository-get-version):
Check either .bzr or .git, but not both.
Make the git case actually use the DIR argument, and return nil
rather than the empty string.

* etc/NEWS: Don't mention that emacs-repository-version works for git,
because it only returns nil (since it uses %N and there seem to be no
notes in the git version of the Emacs repo.)
No idea why this change is in trunk during a feature freeze anyway.
2014-01-22 09:26:14 -08:00
Eric S. Raymond
0abf413468 Make the function emacs-repository-get-version polyvalent.
* version.el (emacs-repository-get-version): Enhance so the
function works correctly in either a Bazaar or Git repo. The
Bazaar case can be discarded  after the repo transition.
2014-01-11 18:59:49 -05:00
Eric S. Raymond
7e03bb327b Restore compatibilty with 23.1 (Tested) 2014-01-10 12:13:10 -05:00
Eric S. Raymond
ceb885a181 Create a needed obsolete-variable alias. Fix up some docstrings. 2014-01-08 20:32:45 -05:00
Eric S. Raymond
9475054f3c In preparation for the move to git, sanitize out some Bazaar-specific names.
* version.el (emacs-bzr-version): Name changed to
emacs-repository-version.
* loadup.el: Follow through on this name change.
* lisp/mail/emacsbug.el (report-emacs-bug): Factor out any
assumption about the version control system in use.
2014-01-08 17:57:47 -05:00
Paul Eggert
ba3189039a Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
Juanma Barranquero
9d3aa82cf9 lisp/*.el: Silence lexical-binding warnings. 2013-08-09 01:59:14 +02:00
Paul Eggert
ab422c4d68 Update copyright notices for 2013. 2013-01-01 09:11:05 +00:00
Glenn Morris
72aa16e19b Add option to ask bzr itself for the emacs bzr revision
* lisp/version.el (emacs-bzr-version-bzr): New function.
(emacs-bzr-get-version): Add optional EXTERNAL argument.
2012-09-15 13:00:45 -07:00
Glenn Morris
fea895b1d2 Tweak previous emacs-bzr-get-version change 2012-09-14 20:45:00 -04:00
Glenn Morris
f40a97091f Improve emacs-bzr-version for lightweight checkouts (bug#12441)
* lisp/version.el (emacs-bzr-version): Doc fix.
(emacs-bzr-version-dirstate): New function.
(emacs-bzr-get-version): For lightweight checkouts, if the parent
is local try and check that it matches the branch.  If not, just
use dirstate information.
2012-09-14 20:33:40 -04:00
Juanma Barranquero
694ea8e3b0 lips/version.el (*-version-string): Declare. 2012-05-27 19:31:31 +02:00
Glenn Morris
758c81e87d There's no reason not to compile version.el
AFAICS, this is ancient code dating from when there was an "inc-vers.el",
that was used to bump the build number on version.el. Nowadays that
happens in loadup.el.

* lisp/version.el: Remove no-byte-compile and associated formatting.

* lisp/loadup.el: No need to load lisp/version.el uncompiled.
2012-05-25 14:57:51 -04:00
Glenn Morris
1d94303ab3 Do not set a local value for version-control in version.el
There's no reason to; this file isn't auto-generated or anything like
that.
2012-05-23 23:38:41 -07:00
Eli Zaretskii
6cf2a23e29 Put the '$Id:' tag into MS-Windows executable of Emacs.
lisp/version.el (top level): Put into the executable the ident-style
 '$Id:' tag on windows-nt as well.
2012-04-20 08:57:38 +03:00
Eli Zaretskii
539aa51394 Doc fixes for emacs-bzr-* facilities.
lisp/version.el (emacs-bzr-version, emacs-bzr-get-version): Doc fixes.
2012-04-20 08:47:55 +03:00
Glenn Morris
263f20cd0a emacs-bzr-get-version tweak
* lisp/version.el (emacs-bzr-get-version):
Handle lightweight checkouts of local branches.
2012-04-09 19:03:33 -04:00
Glenn Morris
a1ed8b05ee Add emacs-bzr-version
* lisp/version.el (emacs-bzr-get-version): New function.
* lisp/loadup.el (emacs-bzr-version): Set it. 
* lisp/mail/emacsbug.el (report-emacs-bug): Include bzr version.

* etc/NEWS: Mention this, though it is not really relevant to releases.
Insert template for 24.2 release.

Fixes: debbugs:8054
2012-04-07 12:51:51 -07:00
Glenn Morris
acaf905b11 Add 2012 to FSF copyright years for Emacs files 2012-01-05 01:46:05 -08:00
Glenn Morris
cb825e5d7b * lisp/version.el (emacs-build-system): Give it a doc-string.
Consolidate local variables at the end of the file.
2011-11-23 23:24:31 -08:00
Glenn Morris
73b0cd5003 Convert consecutive FSF copyright years to ranges. 2011-01-24 20:08:28 -08:00
Chong Yidong
7c420169ba Merge changes from emacs-23 branch 2011-01-02 15:31:19 -05:00
Glenn Morris
d7bfa7a1d9 Set short copyright year to 2011.
* lib-src/ebrowse.c (version) <emacs_copyright>:
* lib-src/etags.c (print_version) <emacs_copyright>:
* lib-src/rcs2log (Copyright):
* lisp/version.el (emacs-copyright):
* nextstep/Cocoa/Emacs.base/Contents/Info.plist:
* nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings:
* nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist:
Set short copyright year to 2011.
2011-01-01 18:46:30 -08:00
Chong Yidong
1f10e75066 Bump version to 23.2.91.
Regenerate configure and ldefs-boot.el.
2010-12-10 12:46:40 -05:00
Chong Yidong
0f161c71c9 Bump version to 23.2.90.
Regenerate AUTHORS, configure, and ldefs-boot.el.
2010-11-08 21:53:18 -05:00
Chong Yidong
bd78fa1d54 Add "Package:" file headers to denote built-in packages. 2010-08-29 12:17:13 -04:00
Ken Raeburn
8c5ff6dd24 Handle --version reasonably in CANNOT_DUMP configuration.
* src/emacs.c (emacs_version, emacs_copyright): New string
variables.
(Vemacs_version, Vemacs_copyright): New Lisp_Object variables.
(syms_of_emacs): Defvar them, and initialize them from the C
string variables.
(main): If initialization hasn't been done, print initial version
info from the C strings, instead of starting an interactive session.
* lisp/version.el (emacs-copyright, emacs-version): Don't define
here.
* configure.in: Look for version string in its new place.
2010-05-15 17:11:37 -04:00
Chong Yidong
19ae0deb1c Bump version to 23.2.50. 2010-05-08 00:46:44 -04:00
Chong Yidong
61a808e819 Bump version to 23.2. 2010-05-07 23:28:26 -04:00
Chong Yidong
8838172bf0 Bump version to 23.1.97. 2010-05-03 21:31:59 -04:00
Chong Yidong
958631c4cc Bump version to 23.1.96. 2010-04-19 21:29:37 -04:00
Chong Yidong
d86d8ea85a Bump version to 23.1.95. 2010-04-02 20:42:10 -04:00
Chong Yidong
66da5719da Bump version to 23.1.94 and regenerate ldefs-boot.el. 2010-03-10 23:03:11 -05:00
Chong Yidong
288f9fc069 Bump version to 24.0.50. 2010-03-10 10:17:13 -05:00
Chong Yidong
5d752593a5 Bump version to 23.1.93; regenerate AUTHORS. 2010-02-26 22:09:45 -05:00
Chong Yidong
e1c6f91c71 Bump version to 23.1.92. 2010-01-29 21:09:50 -05:00
Glenn Morris
6589a2f98d Set copyright year to 2010.
* Cocoa/Emacs.base/Contents/Info.plist:
* Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings:
* GNUstep/Emacs.base/Resources/Info-gnustep.plist:
Set copyright year to 2010.

* version.el (emacs-copyright): Set copyright year to 2010.

* ebrowse.c (version):
* etags.c (print_version):
* rcs2log (Copyright): Set copyright year to 2010.
2010-01-10 23:51:51 -08:00
Chong Yidong
829f35a5bb Bump version to 23.1.91. Regenerate AUTHORS and ldefs-boot.el. 2009-12-30 21:14:46 -05:00