UNIXworkcode

1 /******************************************************************************* 2 * * 3 * tags.h -- Nirvana Editor Tags Header File * 4 * * 5 * Copyright 2002 The NEdit Developers * 6 * * 7 * This is free software; you can redistribute it and/or modify it under the * 8 * terms of the GNU General Public License as published by the Free Software * 9 * Foundation; either version 2 of the License, or (at your option) any later * 10 * version. In addition, you may distribute versions of this program linked to * 11 * Motif or Open Motif. See README for details. * 12 * * 13 * This software is distributed in the hope that it will be useful, but WITHOUT * 14 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * 15 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * 16 * more details. * 17 * * 18 * You should have received a copy of the GNU General Public License along with * 19 * software; if not, write to the Free Software Foundation, Inc., 59 Temple * 20 * Place, Suite 330, Boston, MA 02111-1307 USA * 21 * * 22 * Nirvana Text Editor * 23 * July 31, 2001 * 24 * * 25 *******************************************************************************/ 26 27 #ifndef NEDIT_TAGS_H_INCLUDED 28 #define NEDIT_TAGS_H_INCLUDED 29 30 #include "nedit.h" 31 32 #include <X11/Intrinsic.h> 33 #include <X11/X.h> 34 #include <time.h> 35 36 typedef struct _tagFile { 37 struct _tagFile *next; 38 char *filename; 39 time_t date; 40 Boolean loaded; 41 short index; 42 short refcount; /* Only tips files are refcounted, not tags files */ 43 } tagFile; 44 45 extern tagFile *TagsFileList; /* list of loaded tags files */ 46 extern tagFile *TipsFileList; /* list of loaded calltips tag files */ 47 48 /* file_type and search_type arguments are to select between tips and tags, 49 and should be one of TAG or TIP. TIP_FROM_TAG is for ShowTipString. */ 50 enum mode {TAG, TIP_FROM_TAG, TIP}; 51 52 int AddRelTagsFile(const char *tagSpec, const char *windowPath, 53 int file_type); 54 /* tagSpec is a colon-delimited list of filenames */ 55 int AddTagsFile(const char *tagSpec, int file_type); 56 int DeleteTagsFile(const char *tagSpec, int file_type, Boolean force_unload); 57 int LookupTag(const char *name, const char **file, int *lang, 58 const char **searchString, int * pos, const char **path, 59 int search_type); 60 61 /* Routines for handling tags or tips from the current selection */ 62 void FindDefinition(WindowInfo *window, Time time, const char *arg); 63 void FindDefCalltip(WindowInfo *window, Time time, const char *arg); 64 65 /* Display (possibly finding first) a calltip. Search type can only be 66 TIP or TIP_FROM_TAG here. */ 67 int ShowTipString(WindowInfo *window, char *text, Boolean anchored, 68 int pos, Boolean lookup, int search_type, int hAlign, int vAlign, 69 int alignMode); 70 71 #endif /* NEDIT_TAGS_H_INCLUDED */ 72