NeoMutt  2024-10-02-37-gfa9146
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
node_condbool.c File Reference

Expando Node for a Conditional Boolean. More...

#include "config.h"
#include <stdio.h>
#include "mutt/lib.h"
#include "node_condbool.h"
#include "definition.h"
#include "helpers.h"
#include "node.h"
#include "parse.h"
#include "render.h"
+ Include dependency graph for node_condbool.c:

Go to the source code of this file.

Functions

struct ExpandoNodenode_condbool_new (const char *start, const char *end, int did, int uid)
 Create a new CondBool ExpandoNode.
 
struct ExpandoNodenode_condbool_parse (const char *str, const struct ExpandoDefinition *defs, ExpandoParserFlags flags, const char **parsed_until, struct ExpandoParseError *err)
 Parse a CondBool format string - Implements ExpandoDefinition::parse() -.
 
int node_condbool_render (const struct ExpandoNode *node, const struct ExpandoRenderData *rdata, struct Buffer *buf, int max_cols, void *data, MuttFormatFlags flags)
 Callback for every bool node - Implements ExpandoNode::render() -.
 

Detailed Description

Expando Node for a Conditional Boolean.

Authors
  • Tóth János
  • Richard Russon

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Definition in file node_condbool.c.

Function Documentation

◆ node_condbool_new()

struct ExpandoNode * node_condbool_new ( const char *  start,
const char *  end,
int  did,
int  uid 
)

Create a new CondBool ExpandoNode.

Parameters
startStart of string to store
endEnd of string to store
didDomain ID
uidUnique ID
Return values
ptrNew CondBool ExpandoNode

Definition at line 48 of file node_condbool.c.

49{
50 struct ExpandoNode *node = node_new();
51
52 node->type = ENT_CONDBOOL;
53 node->did = did;
54 node->uid = uid;
56
57 return node;
58}
int node_condbool_render(const struct ExpandoNode *node, const struct ExpandoRenderData *rdata, struct Buffer *buf, int max_cols, void *data, MuttFormatFlags flags)
Callback for every bool node - Implements ExpandoNode::render() -.
struct ExpandoNode * node_new(void)
Create a new empty ExpandoNode.
Definition: node.c:39
@ ENT_CONDBOOL
True/False boolean condition.
Definition: node.h:42
Basic Expando Node.
Definition: node.h:67
int uid
Unique ID, e.g. ED_EMA_SIZE.
Definition: node.h:70
int(* render)(const struct ExpandoNode *node, const struct ExpandoRenderData *rdata, struct Buffer *buf, int max_cols, void *data, MuttFormatFlags flags)
Definition: node.h:91
int did
Domain ID, e.g. ED_EMAIL.
Definition: node.h:69
enum ExpandoNodeType type
Type of Node, e.g. ENT_EXPANDO.
Definition: node.h:68
+ Here is the call graph for this function:
+ Here is the caller graph for this function: