| 1 |
/************************************************************************* |
| 2 |
* Copyright (c) 2011 AT&T Intellectual Property |
| 3 |
* All rights reserved. This program and the accompanying materials |
| 4 |
* are made available under the terms of the Eclipse Public License v1.0 |
| 5 |
* which accompanies this distribution, and is available at |
| 6 |
* https://www.eclipse.org/legal/epl-v10.html |
| 7 |
* |
| 8 |
* Contributors: Details at https://graphviz.org |
| 9 |
*************************************************************************/ |
| 10 |
|
| 11 |
#pragma once |
| 12 |
|
| 13 |
#ifdef __cplusplus |
| 14 |
extern "C" { |
| 15 |
#endif |
| 16 |
|
| 17 |
#include "config.h" |
| 18 |
|
| 19 |
#include <common/render.h> |
| 20 |
#include <cdt/cdt.h> |
| 21 |
|
| 22 |
typedef struct _grid Grid; |
| 23 |
|
| 24 |
typedef struct _node_list { |
| 25 |
Agnode_t *node; |
| 26 |
struct _node_list *next; |
| 27 |
} node_list; |
| 28 |
|
| 29 |
typedef struct { |
| 30 |
int i, j; |
| 31 |
} gridpt; |
| 32 |
|
| 33 |
typedef struct { |
| 34 |
gridpt p; /* index of cell */ |
| 35 |
node_list *nodes; /* nodes in cell */ |
| 36 |
Dtlink_t link; /* cdt data */ |
| 37 |
} cell; |
| 38 |
|
| 39 |
extern Grid *mkGrid(int); |
| 40 |
extern void adjustGrid(Grid * g, int nnodes); |
| 41 |
extern void clearGrid(Grid *); |
| 42 |
extern void addGrid(Grid *, int, int, Agnode_t *); |
| 43 |
extern void walkGrid(Grid *, int (*)(void *, void *)); |
| 44 |
extern cell *findGrid(Grid *, int, int); |
| 45 |
extern void delGrid(Grid *); |
| 46 |
extern int gLength(cell * p); |
| 47 |
|
| 48 |
#ifdef __cplusplus |
| 49 |
} |
| 50 |
#endif |