geany  1.38
About: Geany is a text editor (using GTK2) with basic features of an integrated development environment (syntax highlighting, code folding, symbol name auto-completion, ...). F: office T: editor programming GTK+ IDE
  Fossies Dox: geany-1.38.tar.bz2  ("unofficial" and yet experimental doxygen-generated source code documentation)  

ptag_p.h
Go to the documentation of this file.
1/*
2 *
3 * Copyright (c) 2016, Red Hat, Inc.
4 * Copyright (c) 2016, Masatake YAMATO
5 *
6 * Author: Masatake YAMATO <yamato@redhat.com>
7 *
8 * This source code is released for free distribution under the terms of the
9 * GNU General Public License version 2 or (at your option) any later version.
10 *
11 */
12#ifndef CTAGS_MAIN_PTAG_H
13#define CTAGS_MAIN_PTAG_H
14
15#include "general.h"
16#include "types.h"
17
18#define PSEUDO_TAG_PREFIX "!_"
19#define PSEUDO_TAG_SEPARATOR "!"
20
21typedef enum ePtagType { /* pseudo tag content control */
23 /* Only --output-format=json use this ptag.
24 Applications of the output may expect this comes first in the output. */
26
33#ifdef HAVE_ICONV
34 PTAG_FILE_ENCODING,
35#endif
47
48typedef enum ePtagFlag {
49 /* use isPtagCommonInParsers() for testing. */
50 PTAGF_COMMON = 1 << 0,
51 /* use isPtagParserSpecific for testing.
52 * PSEUDO_TAG_SEPARATOR is used for printing. */
53 PTAGF_PARSER = 1 << 1,
55
56struct sPtagDesc {
57 bool enabled;
58 const char* name;
59 const char* description; /* displayed in --list-pseudo-tags output */
60
61 /* For making ptags for common in parsers, LANG_IGNOR is for the second
62 * argument and a pointer for optionValues type value for the third argument
63 * are passed.
64 *
65 * For parser specific ptags, the pointer for parserObject
66 * of the parser is passed as the thrid argument.
67 */
68 bool (* makeTag) (ptagDesc *, langType, const void *);
69
71};
72
73extern bool makePtagIfEnabled (ptagType type, langType language, const void *data);
74extern ptagDesc* getPtagDesc (ptagType type);
75extern ptagType getPtagTypeForName (const char *name);
76extern void printPtags (bool withListHeader, bool machinable, FILE *fp);
77extern bool isPtagEnabled (ptagType type);
78extern bool isPtagCommonInParsers (ptagType type);
79extern bool isPtagParserSpecific (ptagType type);
80extern bool enablePtag (ptagType type, bool state);
81
82#endif /* CTAGS_MAIN_FIELD_H */
const gchar * name
Definition: document.c:3219
bool isPtagParserSpecific(ptagType type)
Definition: ptag.c:264
ptagType getPtagTypeForName(const char *name)
Definition: ptag.c:247
ptagDesc * getPtagDesc(ptagType type)
Definition: ptag.c:238
void printPtags(bool withListHeader, bool machinable, FILE *fp)
Definition: ptag.c:277
bool isPtagCommonInParsers(ptagType type)
Definition: ptag.c:258
enum ePtagFlag ptagFlag
bool enablePtag(ptagType type, bool state)
Definition: ptag.c:225
bool isPtagEnabled(ptagType type)
Definition: ptag.c:214
bool makePtagIfEnabled(ptagType type, langType language, const void *data)
Definition: ptag.c:201
ePtagType
Definition: ptag_p.h:21
@ PTAG_PROGRAM_AUTHOR
Definition: ptag_p.h:29
@ PTAG_PATTERN_TRUNCATION
Definition: ptag_p.h:42
@ PTAG_KIND_DESCRIPTION
Definition: ptag_p.h:37
@ PTAG_JSON_OUTPUT_VERSION
Definition: ptag_p.h:25
@ PTAG_FILE_SORTED
Definition: ptag_p.h:28
@ PTAG_PROGRAM_URL
Definition: ptag_p.h:31
@ PTAG_PROGRAM_NAME
Definition: ptag_p.h:30
@ PTAG_FIELD_DESCRIPTION
Definition: ptag_p.h:38
@ PTAG_PROGRAM_VERSION
Definition: ptag_p.h:32
@ PTAG_UNKNOWN
Definition: ptag_p.h:22
@ PTAG_COUNT
Definition: ptag_p.h:45
@ PTAG_OUTPUT_EXCMD
Definition: ptag_p.h:44
@ PTAG_PROC_CWD
Definition: ptag_p.h:43
@ PTAG_FILE_FORMAT
Definition: ptag_p.h:27
@ PTAG_EXTRA_DESCRIPTION
Definition: ptag_p.h:39
@ PTAG_OUTPUT_FILESEP
Definition: ptag_p.h:41
@ PTAG_KIND_SEPARATOR
Definition: ptag_p.h:36
@ PTAG_OUTPUT_MODE
Definition: ptag_p.h:40
ePtagFlag
Definition: ptag_p.h:48
@ PTAGF_COMMON
Definition: ptag_p.h:50
@ PTAGF_PARSER
Definition: ptag_p.h:53
enum ePtagType ptagType
const char * description
Definition: ptag_p.h:59
const char * name
Definition: ptag_p.h:58
bool enabled
Definition: ptag_p.h:57
bool(* makeTag)(ptagDesc *, langType, const void *)
Definition: ptag_p.h:68
ptagFlag flags
Definition: ptag_p.h:70
int langType
Definition: types.h:13