Minor fix.
[nedit.git] / source / tags.h
blobe8749adf459f40fb7b7a56bd7d4c94fdcb1a92ba
1 /* $Id: tags.h,v 1.16 2005/02/15 01:10:16 n8gray Exp $ */
2 /*******************************************************************************
3 * *
4 * tags.h -- Nirvana Editor Tags Header File *
5 * *
6 * Copyright 2002 The NEdit Developers *
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 versions 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 for *
17 * 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 * July 31, 2001 *
25 * *
26 *******************************************************************************/
28 #ifndef NEDIT_TAGS_H_INCLUDED
29 #define NEDIT_TAGS_H_INCLUDED
31 #include "nedit.h"
33 #include <X11/Intrinsic.h>
34 #include <X11/X.h>
35 #include <time.h>
37 typedef struct _tagFile {
38 struct _tagFile *next;
39 char *filename;
40 time_t date;
41 Boolean loaded;
42 short index;
43 short refcount; /* Only tips files are refcounted, not tags files */
44 } tagFile;
46 extern tagFile *TagsFileList; /* list of loaded tags files */
47 extern tagFile *TipsFileList; /* list of loaded calltips tag files */
49 /* file_type and search_type arguments are to select between tips and tags,
50 and should be one of TAG or TIP. TIP_FROM_TAG is for ShowTipString. */
51 enum mode {TAG, TIP_FROM_TAG, TIP};
53 int AddRelTagsFile(const char *tagSpec, const char *windowPath,
54 int file_type);
55 /* tagSpec is a colon-delimited list of filenames */
56 int AddTagsFile(const char *tagSpec, int file_type);
57 int DeleteTagsFile(const char *tagSpec, int file_type, Boolean force_unload);
58 int LookupTag(const char *name, const char **file, int *lang,
59 const char **searchString, int * pos, const char **path,
60 int search_type);
62 /* Routines for handling tags or tips from the current selection */
63 void FindDefinition(WindowInfo *window, Time time, const char *arg);
64 void FindDefCalltip(WindowInfo *window, Time time, const char *arg);
66 /* Display (possibly finding first) a calltip. Search type can only be
67 TIP or TIP_FROM_TAG here. */
68 int ShowTipString(WindowInfo *window, char *text, Boolean anchored,
69 int pos, Boolean lookup, int search_type, int hAlign, int vAlign,
70 int alignMode);
72 #endif /* NEDIT_TAGS_H_INCLUDED */