Blame src/textprop.h

Packit Service a721b1
/* textproc.h -- header file for the text property module.
Packit Service a721b1
   Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
Packit Service a721b1
     National Institute of Advanced Industrial Science and Technology (AIST)
Packit Service a721b1
     Registration Number H15PRO112
Packit Service a721b1
Packit Service a721b1
   This file is part of the m17n library.
Packit Service a721b1
Packit Service a721b1
   The m17n library is free software; you can redistribute it and/or
Packit Service a721b1
   modify it under the terms of the GNU Lesser General Public License
Packit Service a721b1
   as published by the Free Software Foundation; either version 2.1 of
Packit Service a721b1
   the License, or (at your option) any later version.
Packit Service a721b1
Packit Service a721b1
   The m17n library is distributed in the hope that it will be useful,
Packit Service a721b1
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service a721b1
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit Service a721b1
   Lesser General Public License for more details.
Packit Service a721b1
Packit Service a721b1
   You should have received a copy of the GNU Lesser General Public
Packit Service a721b1
   License along with the m17n library; if not, write to the Free
Packit Service a721b1
   Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Packit Service a721b1
   Boston, MA 02110-1301 USA.  */
Packit Service a721b1
Packit Service a721b1
#ifndef _M17N_TEXTPROP_H_
Packit Service a721b1
#define _M17N_TEXTPROP_H_
Packit Service a721b1
Packit Service a721b1
/** MTextProperty is the structure for a text property object.  While
Packit Service a721b1
    attached, it is stored in the stacks of intervals covering the
Packit Service a721b1
    range from MTextProperty->start to MTextProperty->end.  */
Packit Service a721b1
Packit Service a721b1
struct MTextProperty
Packit Service a721b1
{
Packit Service a721b1
  /** Common header for a managed object.  */
Packit Service a721b1
  M17NObject control;
Packit Service a721b1
Packit Service a721b1
  /** Number of intervals the property is attached.  When it becomes
Packit Service a721b1
      zero, the property is detached.  */
Packit Service a721b1
  unsigned attach_count;
Packit Service a721b1
Packit Service a721b1
  /** M-text to which the property is attaced.  The value NULL means
Packit Service a721b1
      that the property is detached.  */
Packit Service a721b1
  MText *mt;
Packit Service a721b1
Packit Service a721b1
  /** Region of <mt> if the property is attached to it.  */
Packit Service a721b1
  int start, end;
Packit Service a721b1
Packit Service a721b1
  /** Key of the property.  */
Packit Service a721b1
  MSymbol key;
Packit Service a721b1
Packit Service a721b1
  /** Value of the property.  */
Packit Service a721b1
  void *val;
Packit Service a721b1
};
Packit Service a721b1
Packit Service a721b1
#define MTEXTPROP_START(prop) (prop)->start
Packit Service a721b1
#define MTEXTPROP_END(prop) (prop)->end
Packit Service a721b1
#define MTEXTPROP_KEY(prop) (prop)->key
Packit Service a721b1
#define MTEXTPROP_VAL(prop) (prop)->val
Packit Service a721b1
Packit Service a721b1
extern struct MTextPlist *mtext__copy_plist (struct MTextPlist *, 
Packit Service a721b1
					     int from, int to,
Packit Service a721b1
					     MText *mt, int pos);
Packit Service a721b1
Packit Service a721b1
extern void mtext__free_plist (MText *mt);
Packit Service a721b1
Packit Service a721b1
extern void mtext__adjust_plist_for_delete (MText *, int, int);
Packit Service a721b1
Packit Service a721b1
extern void mtext__adjust_plist_for_insert (MText *, int, int,
Packit Service a721b1
					    struct MTextPlist *);
Packit Service a721b1
Packit Service a721b1
extern void mtext__adjust_plist_for_change (MText *mt, int pos,
Packit Service a721b1
					    int len1, int len2);
Packit Service a721b1
Packit Service a721b1
extern void dump_textplist (struct MTextPlist *plist, int indent);
Packit Service a721b1
Packit Service a721b1
#endif /* _M17N_TEXTPROP_H_ */