Restored the "invalid default virtual key binding" workaround that had
[nedit.git] / source / rangeset.h
blob2799eac91dfd01705210c9c9475efd6301af2a22
1 /* $Id: rangeset.h,v 1.6 2004/07/21 11:32:05 yooden Exp $ */
2 /*******************************************************************************
3 * *
4 * rangeset.h -- Nirvana Editor rangest header *
5 * *
6 * Copyright (C) 1999 Mark Edel *
7 * *
8 * This is free software; you can redistribute it and/or modify it under the *
9 * terms of the GNU General Public License as published by the Free Software *
10 * Foundation; either version 2 of the License, or (at your option) any later *
11 * version. In addition, you may distribute version of this program linked to *
12 * Motif or Open Motif. See README for details. *
13 * *
14 * This software is distributed in the hope that it will be useful, but WITHOUT *
15 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or *
16 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License *
17 * for more details. *
18 * *
19 * You should have received a copy of the GNU General Public License along with *
20 * software; if not, write to the Free Software Foundation, Inc., 59 Temple *
21 * Place, Suite 330, Boston, MA 02111-1307 USA *
22 * *
23 * Nirvana Text Editor *
24 * Sep 26, 2002 *
25 * *
26 * Written by Tony Balinski with contributions from Andrew Hood *
27 * *
28 * Modifications: *
29 * *
30 * *
31 *******************************************************************************/
32 #ifndef rangeset_h_DEFINED
33 #define rangeset_h_DEFINED
35 #include <Xm/Xm.h>
37 #define N_RANGESETS 63
39 typedef struct _Range Range;
40 typedef struct _Rangeset Rangeset;
42 void RangesetRefreshRange(Rangeset *rangeset, int start, int end);
43 void RangesetEmpty(Rangeset *rangeset);
44 void RangesetInit(Rangeset *rangeset, int label, textBuffer *buf);
45 int RangesetChangeModifyResponse(Rangeset *rangeset, char *name);
46 int RangesetFindRangeNo(Rangeset *rangeset, int index, int *start, int *end);
47 int RangesetFindRangeOfPos(Rangeset *rangeset, int pos, int incl_end);
48 int RangesetCheckRangeOfPos(Rangeset *rangeset, int pos);
49 int RangesetInverse(Rangeset *p);
50 int RangesetAdd(Rangeset *origSet, Rangeset *plusSet);
51 int RangesetAddBetween(Rangeset *rangeset, int start, int end);
52 int RangesetRemove(Rangeset *origSet, Rangeset *minusSet);
53 int RangesetRemoveBetween(Rangeset *rangeset, int start, int end);
54 int RangesetGetNRanges(Rangeset *rangeset);
55 void RangesetGetInfo(Rangeset *rangeset, int *defined, int *label,
56 int *count, char **color, char **name, char **mode);
57 void RangesetSetMaxpos(Rangeset *rangeset, int maxpos);
58 RangesetTable *RangesetTableAlloc(textBuffer *buf);
59 RangesetTable *RangesetTableFree(RangesetTable *table);
60 RangesetTable *RangesetTableClone(RangesetTable *srcTable,
61 textBuffer *destBuffer);
62 int RangesetFindIndex(RangesetTable *table, int label, int must_be_active);
63 int RangesetLabelOK(int label);
64 int RangesetCreate(RangesetTable *table);
65 int nRangesetsAvailable(RangesetTable *table);
66 Rangeset *RangesetForget(RangesetTable *table, int label);
67 Rangeset *RangesetFetch(RangesetTable *table, int label);
68 unsigned char * RangesetGetList(RangesetTable *table);
69 void RangesetTableUpdatePos(RangesetTable *table, int pos, int n_ins, int n_del);
70 void RangesetBufModifiedCB(int pos, int nInserted, int nDeleted, int nRestyled,
71 char *deletedText, void *cbArg);
72 int RangesetIndex1ofPos(RangesetTable *table, int pos, int needs_color);
73 int RangesetAssignColorName(Rangeset *rangeset, char *color_name);
74 int RangesetAssignColorPixel(Rangeset *rangeset, Pixel color, int ok);
75 char *RangesetGetColorName(Rangeset *rangeset);
76 char *RangesetGetName(Rangeset *rangeset);
77 int RangesetAssignName(Rangeset *rangeset, char *name);
78 int RangesetGetColorValid(Rangeset *rangeset, Pixel *color);
79 char *RangesetTableGetColorName(RangesetTable *table, int index);
80 int RangesetTableGetColorValid(RangesetTable *table, int index, Pixel *color);
81 int RangesetTableAssignColorPixel(RangesetTable *table, int index, Pixel color,
82 int ok);
84 #endif /* rangeset_h_DEFINED */