annotate src/fontcolor-gtk-impl.h @ 5785:7343a186a475

Correct some partial character accounting, buffered_bytecount_to_charcount(). src/ChangeLog addition: 2014-01-23 Aidan Kehoe <kehoea@parhasard.net> * lstream.c (Lstream_read_1): Don't include the unread partial character in unget_character_count, since our consumers will never be aware of it. * text.c: * text.c (buffered_bytecount_to_charcount): A buffer consisting entirely of a partial character needs to be treated as a partial last character, not a partial first character, to avoid double-counting.
author Aidan Kehoe <kehoea@parhasard.net>
date Thu, 23 Jan 2014 13:49:40 +0000
parents 308d34e9f07d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
872
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents:
diff changeset
1 /* Gtk-specific Lisp objects.
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents:
diff changeset
2 Copyright (C) 1993, 1994 Free Software Foundation, Inc.
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents:
diff changeset
3 Copyright (C) 1995 Board of Trustees, University of Illinois.
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents:
diff changeset
4 Copyright (C) 1995, 1996 Ben Wing.
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents:
diff changeset
5
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents:
diff changeset
6 This file is part of XEmacs.
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents:
diff changeset
7
5402
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 5176
diff changeset
8 XEmacs is free software: you can redistribute it and/or modify it
872
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents:
diff changeset
9 under the terms of the GNU General Public License as published by the
5402
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 5176
diff changeset
10 Free Software Foundation, either version 3 of the License, or (at your
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 5176
diff changeset
11 option) any later version.
872
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents:
diff changeset
12
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents:
diff changeset
13 XEmacs is distributed in the hope that it will be useful, but WITHOUT
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents:
diff changeset
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents:
diff changeset
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents:
diff changeset
16 for more details.
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents:
diff changeset
17
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents:
diff changeset
18 You should have received a copy of the GNU General Public License
5402
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 5176
diff changeset
19 along with XEmacs. If not, see <http://www.gnu.org/licenses/>. */
872
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents:
diff changeset
20
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents:
diff changeset
21 /* Synched up with: Not in FSF. */
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents:
diff changeset
22 /* Gtk version by William Perry */
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents:
diff changeset
23
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents:
diff changeset
24 #ifndef _XEMACS_OBJECTS_GTK_IMPL_H_
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents:
diff changeset
25 #define _XEMACS_OBJECTS_GTK_IMPL_H_
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents:
diff changeset
26
5176
8b2f75cecb89 rename objects* (.c, .h and .el files) to fontcolor*
Ben Wing <ben@xemacs.org>
parents: 4909
diff changeset
27 #include "fontcolor-impl.h"
8b2f75cecb89 rename objects* (.c, .h and .el files) to fontcolor*
Ben Wing <ben@xemacs.org>
parents: 4909
diff changeset
28 #include "fontcolor-gtk.h"
872
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents:
diff changeset
29
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents:
diff changeset
30 #ifdef HAVE_GTK
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents:
diff changeset
31
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents:
diff changeset
32 /*****************************************************************************
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents:
diff changeset
33 Color-Instance
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents:
diff changeset
34 ****************************************************************************/
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents:
diff changeset
35
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents:
diff changeset
36 struct gtk_color_instance_data
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents:
diff changeset
37 {
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents:
diff changeset
38 GdkColor *color;
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents:
diff changeset
39 char dealloc_on_gc;
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents:
diff changeset
40 };
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents:
diff changeset
41
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents:
diff changeset
42 #define GTK_COLOR_INSTANCE_DATA(c) ((struct gtk_color_instance_data *) (c)->data)
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents:
diff changeset
43 #define COLOR_INSTANCE_GTK_COLOR(c) (GTK_COLOR_INSTANCE_DATA (c)->color)
4909
87175eb65ff4 fix xft compile error
Ben Wing <ben@xemacs.org>
parents: 872
diff changeset
44 #define XCOLOR_INSTANCE_GTK_COLOR(c) COLOR_INSTANCE_GTK_COLOR (XCOLOR_INSTANCE (c))
872
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents:
diff changeset
45 #define COLOR_INSTANCE_GTK_DEALLOC(c) (GTK_COLOR_INSTANCE_DATA (c)->dealloc_on_gc)
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents:
diff changeset
46
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents:
diff changeset
47 /*****************************************************************************
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents:
diff changeset
48 Font-Instance
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents:
diff changeset
49 ****************************************************************************/
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents:
diff changeset
50
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents:
diff changeset
51 struct gtk_font_instance_data
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents:
diff changeset
52 {
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents:
diff changeset
53 /* Gtk-specific information */
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents:
diff changeset
54 GdkFont *font;
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents:
diff changeset
55 };
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents:
diff changeset
56
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents:
diff changeset
57 #define GTK_FONT_INSTANCE_DATA(f) ((struct gtk_font_instance_data *) (f)->data)
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents:
diff changeset
58 #define FONT_INSTANCE_GTK_FONT(f) (GTK_FONT_INSTANCE_DATA (f)->font)
4909
87175eb65ff4 fix xft compile error
Ben Wing <ben@xemacs.org>
parents: 872
diff changeset
59 #define XFONT_INSTANCE_GTK_FONT(c) FONT_INSTANCE_GTK_FONT (XFONT_INSTANCE (c))
872
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents:
diff changeset
60
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents:
diff changeset
61 #endif /* HAVE_GTK */
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents:
diff changeset
62 #endif /* _XEMACS_OBJECTS_GTK_IMPL_H_ */