1 /* textproc.h -- header file for the text property module.
2 Copyright (C) 2003, 2004
3 National Institute of Advanced Industrial Science and Technology (AIST)
4 Registration Number H15PRO112
6 This file is part of the m17n library.
8 The m17n library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Lesser General Public License
10 as published by the Free Software Foundation; either version 2.1 of
11 the License, or (at your option) any later version.
13 The m17n library is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Lesser General Public License for more details.
18 You should have received a copy of the GNU Lesser General Public
19 License along with the m17n library; if not, write to the Free
20 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
23 #ifndef _M17N_TEXTPROP_H_
24 #define _M17N_TEXTPROP_H_
26 /** MTextProperty is the structure for a text property object. While
27 attached, it is stored in the stacks of intervals covering the
28 range from MTextProperty->start to MTextProperty->end. */
32 /** Common header for a managed object. */
35 /** Number of intervals the property is attached. When it becomes
36 zero, the property is detached. */
37 unsigned attach_count;
39 /** M-text to which the property is attaced. The value NULL means
40 that the property is detached. */
43 /** Region of <mt> if the property is attached to it. */
46 /** Key of the property. */
49 /** Value of the property. */
54 extern struct MTextPlist *mtext__copy_plist (struct MTextPlist *,
58 extern void mtext__free_plist (MText *mt);
60 extern void mtext__adjust_plist_for_delete (MText *, int, int);
62 extern void mtext__adjust_plist_for_insert (MText *, int, int,
65 extern void mtext__adjust_plist_for_change (MText *mt, int from, int to);
67 extern void dump_textplist (struct MTextPlist *plist, int indent);
69 #endif /* _M17N_TEXTPROP_H_ */