annotate src/ExternalClient.h @ 5552:85210c453a97

Fix performance regression in refactored syntax cache setup. More doc improvements. * syntax.h (enum syntax_source): New. Specify whether syntax is from property or buffer. (struct syntax_cache): Use enum syntax_source source, instead of no_syntax_table_prop and use_code. Improve comments. (SOURCE_IS_TABLE): New predicate. (SYNTAX_CODE_FROM_CACHE): Use it instead of use_code, and adjust logic. * syntax.c (syntax_cache_table_was_changed): Check cache->source (cache->no_syntax_table_prop is gone). (reset_syntax_cache_range): All information about OBJECT and BUFFER is in CACHE already. Also reset markers in OBJECT if it is a buffer. Rename INFINITE to VALID_EVERYWHERE. (init_syntax_cache): Initialize source (cache->no_syntax_table_prop is gone). Maybe initialize start and end to null markers. Initialize cache range with reset_syntax_cache_range. (update_syntax_cache): Use source instead of no_syntax_table_prop and use_code. (setup_syntax_cache): Add header comment. Improve other comments. Make calls to reset_syntax_cache_range and init_syntax_cache match their prototypes. (init_buffer_syntax_cache): Use init_syntax_cache to do the work. (signal_syntax_cache_extent_changed): Make call to reset_syntax_cache_range match its prototype. Improve local variable naming.
author Stephen J. Turnbull <stephen@xemacs.org>
date Tue, 23 Aug 2011 04:41:45 +0900
parents 2aa9cd456ae7
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1 /* External client widget external header file.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2 Copyright (C) 1993, 1994 Sun Microsystems, Inc.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3
5405
2aa9cd456ae7 Move src/ to GPLv3.
Mike Sperber <sperber@deinprogramm.de>
parents: 398
diff changeset
4 This library is free software: you can redistribute it and/or modify it
2aa9cd456ae7 Move src/ to GPLv3.
Mike Sperber <sperber@deinprogramm.de>
parents: 398
diff changeset
5 under the terms of the GNU General Public License as published by the
2aa9cd456ae7 Move src/ to GPLv3.
Mike Sperber <sperber@deinprogramm.de>
parents: 398
diff changeset
6 Free Software Foundation, either version 3 of the License, or (at your
2aa9cd456ae7 Move src/ to GPLv3.
Mike Sperber <sperber@deinprogramm.de>
parents: 398
diff changeset
7 option) any later version.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
8
5405
2aa9cd456ae7 Move src/ to GPLv3.
Mike Sperber <sperber@deinprogramm.de>
parents: 398
diff changeset
9 This library is distributed in the hope that it will be useful, but WITHOUT
2aa9cd456ae7 Move src/ to GPLv3.
Mike Sperber <sperber@deinprogramm.de>
parents: 398
diff changeset
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2aa9cd456ae7 Move src/ to GPLv3.
Mike Sperber <sperber@deinprogramm.de>
parents: 398
diff changeset
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
2aa9cd456ae7 Move src/ to GPLv3.
Mike Sperber <sperber@deinprogramm.de>
parents: 398
diff changeset
12 for more details.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
13
5405
2aa9cd456ae7 Move src/ to GPLv3.
Mike Sperber <sperber@deinprogramm.de>
parents: 398
diff changeset
14 You should have received a copy of the GNU General Public License
2aa9cd456ae7 Move src/ to GPLv3.
Mike Sperber <sperber@deinprogramm.de>
parents: 398
diff changeset
15 along with this library. If not, see <http://www.gnu.org/licenses/>. */
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
16
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
17 /* Synched up with: Not in FSF. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
18
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
19 /* Written by Ben Wing. */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
20
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 0
diff changeset
21 #ifndef INCLUDED_ExternalClient_h_
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 0
diff changeset
22 #define INCLUDED_ExternalClient_h_
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
23
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
24 #ifndef XtNshellTimeout
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
25 #define XtNshellTimeout "shellTimeout"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
26 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
27 #ifndef XtCShellTimeout
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
28 #define XtCShellTimeout "ShellTimeout"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
29 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
30
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
31 #ifndef XtNdeadShell
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
32 #define XtNdeadShell "deadShell"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
33 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
34 #ifndef XtCDeadShell
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
35 #define XtCDeadShell "DeadShell"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
36 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
37
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
38 #ifndef XtNemacsProcID
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
39 #define XtNemacsProcID "emacsProcID"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
40 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
41 #ifndef XtCEmacsProcID
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
42 #define XtCEmacsProcID "EmacsProcID"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
43 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
44
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
45 #ifndef XtNshellReadyCallback
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
46 #define XtNshellReadyCallback "shellReadyCallback"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
47 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
48
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
49 #ifndef XtNshellName
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
50 #define XtNshellName "shellName"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
51 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
52 #ifndef XtCShellName
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
53 #define XtCShellName "ShellName"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
54 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
55
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
56 #ifndef XtNuseToolTalk
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
57 #define XtNuseToolTalk "useToolTalk"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
58 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
59 #ifndef XtCUseToolTalk
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
60 #define XtCUseToolTalk "UseToolTalk"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
61 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
62
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
63 typedef struct _ExternalClientClassRec *ExternalClientWidgetClass;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
64 typedef struct _ExternalClientRec *ExternalClientWidget;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
65 extern WidgetClass externalClientWidgetClass;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
66
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
67 /* External entry points when using direct Xlib */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
68
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
69 void ExternalClientInitialize (Display *display, Window win);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
70 void ExternalClientEventHandler (Display *display, Window win, XEvent *event);
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
71
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents: 0
diff changeset
72 #endif /* INCLUDED_ExternalClient_h_ */