annotate toolboxes/graph_visualisation/include/graphviz/gvcext.h @ 0:cc4b1211e677 tip

initial commit to HG from Changeset: 646 (e263d8a21543) added further path and more save "camirversion.m"
author Daniel Wolff
date Fri, 19 Aug 2016 13:07:06 +0200
parents
children
rev   line source
Daniel@0 1
Daniel@0 2 /* vim:set shiftwidth=4 ts=8: */
Daniel@0 3
Daniel@0 4 /**********************************************************
Daniel@0 5 * This software is part of the graphviz package *
Daniel@0 6 * http://www.graphviz.org/ *
Daniel@0 7 * *
Daniel@0 8 * Copyright (c) 1994-2004 AT&T Corp. *
Daniel@0 9 * and is licensed under the *
Daniel@0 10 * Common Public License, Version 1.0 *
Daniel@0 11 * by AT&T Corp. *
Daniel@0 12 * *
Daniel@0 13 * Information and Software Systems Research *
Daniel@0 14 * AT&T Research, Florham Park NJ *
Daniel@0 15 **********************************************************/
Daniel@0 16
Daniel@0 17 /* Common header used by both clients and plugins */
Daniel@0 18
Daniel@0 19 #ifndef GVCEXT_H
Daniel@0 20 #define GVCEXT_H
Daniel@0 21
Daniel@0 22 #ifdef __cplusplus
Daniel@0 23 extern "C" {
Daniel@0 24 #endif
Daniel@0 25
Daniel@0 26 /*
Daniel@0 27 * Define an apis array of name strings using an enumerated api_t as index.
Daniel@0 28 * The enumerated type is defined here. The apis array is
Daniel@0 29 * inititialized in gvplugin.c by redefining ELEM and reinvoking APIS.
Daniel@0 30 */
Daniel@0 31 #define APIS ELEM(render) ELEM(layout) ELEM(textlayout) ELEM(device) ELEM(loadimage)
Daniel@0 32
Daniel@0 33 /*
Daniel@0 34 * Define api_t using names based on the plugin names with API_ prefixed.
Daniel@0 35 */
Daniel@0 36 #define ELEM(x) API_##x,
Daniel@0 37 typedef enum { APIS _DUMMY_ELEM_=0 } api_t; /* API_render, API_layout, ... */
Daniel@0 38 /* Stupid but true: The sole purpose of "_DUMMY_ELEM_=0"
Daniel@0 39 * is to avoid a "," after the last element of the enum
Daniel@0 40 * because some compilers when using "-pedantic"
Daniel@0 41 * generate an error for about the dangling ","
Daniel@0 42 * but only if this header is used from a .cpp file!
Daniel@0 43 * Setting it to 0 makes sure that the enumeration
Daniel@0 44 * does not define an extra value. (It does however
Daniel@0 45 * define _DUMMY_ELEM_ as an enumeration symbol,
Daniel@0 46 * but its value duplicates that of the first
Daniel@0 47 * symbol in the enumeration - in this case "render".)
Daniel@0 48 */
Daniel@0 49
Daniel@0 50 /* One could wonder why trailing "," in:
Daniel@0 51 * int nums[]={1,2,3,};
Daniel@0 52 * is OK, but in:
Daniel@0 53 * typedef enum {a,b,c,} abc_t;
Daniel@0 54 * is not!!!
Daniel@0 55 */
Daniel@0 56 #undef ELEM
Daniel@0 57
Daniel@0 58 typedef struct GVJ_s GVJ_t;
Daniel@0 59 typedef struct GVC_s GVC_t;
Daniel@0 60
Daniel@0 61 typedef struct {
Daniel@0 62 const char *name;
Daniel@0 63 void* address;
Daniel@0 64 } lt_symlist_t;
Daniel@0 65
Daniel@0 66 typedef struct gvplugin_available_s gvplugin_available_t;
Daniel@0 67
Daniel@0 68 /*visual studio*/
Daniel@0 69 #ifdef WIN32_DLL
Daniel@0 70 #ifndef GVC_EXPORTS
Daniel@0 71 __declspec(dllimport) lt_symlist_t lt_preloaded_symbols[];
Daniel@0 72 #else
Daniel@0 73 __declspec(dllexport) lt_symlist_t lt_preloaded_symbols[];
Daniel@0 74 #endif
Daniel@0 75 #endif
Daniel@0 76 /*end visual studio*/
Daniel@0 77
Daniel@0 78
Daniel@0 79 #ifndef WIN32_DLL
Daniel@0 80 #if defined(GVDLL)
Daniel@0 81 __declspec(dllexport) lt_symlist_t lt_preloaded_symbols[];
Daniel@0 82 #else
Daniel@0 83 extern lt_symlist_t lt_preloaded_symbols[];
Daniel@0 84 #endif
Daniel@0 85 #endif
Daniel@0 86
Daniel@0 87
Daniel@0 88 #ifdef __cplusplus
Daniel@0 89 }
Daniel@0 90 #endif
Daniel@0 91
Daniel@0 92
Daniel@0 93
Daniel@0 94 #endif