135c59e96SMasatake YAMATO /* 235c59e96SMasatake YAMATO * 335c59e96SMasatake YAMATO * Copyright (c) 2015, Red Hat, Inc. 435c59e96SMasatake YAMATO * Copyright (c) 2015, Masatake YAMATO 535c59e96SMasatake YAMATO * 635c59e96SMasatake YAMATO * Author: Masatake YAMATO <yamato@redhat.com> 735c59e96SMasatake YAMATO * 835c59e96SMasatake YAMATO * This source code is released for free distribution under the terms of the 935c59e96SMasatake YAMATO * GNU General Public License version 2 or (at your option) any later version. 1035c59e96SMasatake YAMATO * 1135c59e96SMasatake YAMATO */ 1235c59e96SMasatake YAMATO #ifndef CTAGS_MAIN_XTAG_H 1335c59e96SMasatake YAMATO #define CTAGS_MAIN_XTAG_H 1435c59e96SMasatake YAMATO 15e2a3289bSMasatake YAMATO /* 16e2a3289bSMasatake YAMATO * INCLUDE FILES 17e2a3289bSMasatake YAMATO */ 18ecb981e8SMasatake YAMATO 19e2a3289bSMasatake YAMATO #include "general.h" 20e2a3289bSMasatake YAMATO 21e2a3289bSMasatake YAMATO /* 22e2a3289bSMasatake YAMATO * DATA DECLARATIONS 23e2a3289bSMasatake YAMATO */ 2435c59e96SMasatake YAMATO 2535c59e96SMasatake YAMATO typedef enum eXtagType { /* extra tag content control */ 2635c59e96SMasatake YAMATO XTAG_UNKNOWN = -1, 2735c59e96SMasatake YAMATO 2835c59e96SMasatake YAMATO XTAG_FILE_SCOPE, 2935c59e96SMasatake YAMATO XTAG_FILE_NAMES, 3040c4987bSMasatake YAMATO XTAG_PSEUDO_TAGS, 3135c59e96SMasatake YAMATO XTAG_QUALIFIED_TAGS, 3220703582SMasatake YAMATO XTAG_REFERENCE_TAGS, 33*46a698ceSMasatake YAMATO XTAG_GUEST, 34*46a698ceSMasatake YAMATO XTAG_TAGS_GENERATED_BY_GUEST_PARSERS = XTAG_GUEST, /* Geany uses the old name */ 35*46a698ceSMasatake YAMATO XTAG_SUBPARSER, 360e4c5d4aSMasatake YAMATO XTAG_ANONYMOUS, 3735c59e96SMasatake YAMATO 3835c59e96SMasatake YAMATO XTAG_COUNT 3935c59e96SMasatake YAMATO } xtagType; 4035c59e96SMasatake YAMATO 41f60f4e0bSMasatake YAMATO struct sXtagDefinition { 42ce990805SThomas Braun bool enabled; 438643c5b5SMasatake YAMATO /* letter, and ftype are initialized in the main part, 448643c5b5SMasatake YAMATO not in a parser. */ 458643c5b5SMasatake YAMATO #define NUL_XTAG_LETTER '\0' 4635c59e96SMasatake YAMATO unsigned char letter; 478cd893daSMasatake YAMATO const char* name; /* used in extra: field */ 481f030f3bSMasatake YAMATO const char* description; /* displayed in --list-extra output */ 4935c59e96SMasatake YAMATO 503d546395SMasatake YAMATO /* If the value for "enabled" is given dynamically, 513d546395SMasatake YAMATO use this field. 523d546395SMasatake YAMATO 533d546395SMasatake YAMATO "enabled" field of Pseudo extra tag depends on where 543d546395SMasatake YAMATO the output stream is connected to. If it is connected 55759d281dSK.Takata to standard output, the tag is disabled by default. 563d546395SMasatake YAMATO If it is connected to a regular file, the tag is enabled 573d546395SMasatake YAMATO by default. */ 58a70e0bbeSMasatake YAMATO bool (* isEnabled) (struct sXtagDefinition *def); 59d4dfe861SMasatake YAMATO bool (* isFixed) (struct sXtagDefinition *def); 6064270418SMasatake YAMATO void (* enable) (struct sXtagDefinition *def, bool state); 618643c5b5SMasatake YAMATO 628643c5b5SMasatake YAMATO unsigned int xtype; /* Given from the main part */ 63f60f4e0bSMasatake YAMATO }; 6435c59e96SMasatake YAMATO 65ce990805SThomas Braun extern bool isXtagEnabled (xtagType type); 66ecb981e8SMasatake YAMATO 6735c59e96SMasatake YAMATO #endif /* CTAGS_MAIN_FIELD_H */ 68