gvcproc.h 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  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. #pragma once
  11. #include <stdbool.h>
  12. #include <stddef.h>
  13. #include <stdio.h>
  14. /* these are intended to be private entry points - see gvc.h for the public ones */
  15. /* configuration */
  16. char *gvconfig_libdir(GVC_t * gvc);
  17. void gvconfig(GVC_t * gvc, bool rescan);
  18. char *gvhostname(void);
  19. /* plugins */
  20. bool gvplugin_install(GVC_t *gvc, api_t api,
  21. const char *typestr, int quality, gvplugin_package_t *package,
  22. gvplugin_installed_t * typeptr);
  23. /// load a plugin
  24. ///
  25. /// @param debug An optional sink to print debug comments to explaining failures
  26. gvplugin_available_t *gvplugin_load(GVC_t *gvc, api_t api, const char *type,
  27. FILE *debug);
  28. gvplugin_library_t *gvplugin_library_load(GVC_t *gvc, const char *pathname);
  29. api_t gvplugin_api(const char *str);
  30. char * gvplugin_api_name(api_t api);
  31. void gvplugin_write_status(GVC_t * gvc);
  32. char *gvplugin_list(GVC_t * gvc, api_t api, const char *str);
  33. Agraph_t * gvplugin_graph(GVC_t * gvc);
  34. /* job */
  35. void gvjobs_output_filename(GVC_t * gvc, const char *name);
  36. bool gvjobs_output_langname(GVC_t * gvc, const char *name);
  37. GVJ_t *gvjobs_first(GVC_t * gvc);
  38. GVJ_t *gvjobs_next(GVC_t * gvc);
  39. void gvjobs_delete(GVC_t * gvc);
  40. /* emit */
  41. void gvemit_graph(GVC_t * gvc, graph_t * g);
  42. /* textlayout */
  43. int gvtextlayout_select(GVC_t * gvc);
  44. bool gvtextlayout(GVC_t *gvc, textspan_t *span, char **fontpath);
  45. /* loadimage */
  46. void gvloadimage(GVJ_t *job, usershape_t *us, boxf b, bool filled, const char *target);
  47. /* usershapes */
  48. point gvusershape_size_dpi(usershape_t *us, pointf dpi);
  49. point gvusershape_size(graph_t *g, char *name);
  50. usershape_t *gvusershape_find(const char *name);
  51. /* device */
  52. int gvdevice_initialize(GVJ_t * job);
  53. void gvdevice_format(GVJ_t * job);
  54. void gvdevice_finalize(GVJ_t * job);
  55. /* render */
  56. #ifdef GVDLL
  57. #ifdef GVC_EXPORTS
  58. __declspec(dllexport) pointf gvrender_ptf(GVJ_t *job, pointf p);
  59. #else
  60. __declspec(dllimport) pointf gvrender_ptf(GVJ_t *job, pointf p);
  61. #endif
  62. #else
  63. pointf gvrender_ptf(GVJ_t *job, pointf p);
  64. #endif
  65. pointf *gvrender_ptf_A(GVJ_t *job, pointf *af, pointf *AF, size_t n);
  66. int gvrender_begin_job(GVJ_t * job);
  67. void gvrender_end_job(GVJ_t * job);
  68. int gvrender_select(GVJ_t * job, const char *lang);
  69. int gvrender_features(GVJ_t * job);
  70. void gvrender_begin_graph(GVJ_t *job);
  71. void gvrender_end_graph(GVJ_t * job);
  72. void gvrender_begin_page(GVJ_t * job);
  73. void gvrender_end_page(GVJ_t * job);
  74. void gvrender_begin_layer(GVJ_t * job);
  75. void gvrender_end_layer(GVJ_t * job);
  76. void gvrender_begin_cluster(GVJ_t *job);
  77. void gvrender_end_cluster(GVJ_t *job);
  78. void gvrender_begin_nodes(GVJ_t * job);
  79. void gvrender_end_nodes(GVJ_t * job);
  80. void gvrender_begin_edges(GVJ_t * job);
  81. void gvrender_end_edges(GVJ_t * job);
  82. void gvrender_begin_node(GVJ_t *job);
  83. void gvrender_end_node(GVJ_t * job);
  84. void gvrender_begin_edge(GVJ_t *job);
  85. void gvrender_end_edge(GVJ_t * job);
  86. void gvrender_begin_anchor(GVJ_t * job,
  87. char *href, char *tooltip, char *target, char *id);
  88. void gvrender_end_anchor(GVJ_t * job);
  89. void gvrender_begin_label(GVJ_t * job, label_type type);
  90. void gvrender_end_label(GVJ_t * job);
  91. void gvrender_textspan(GVJ_t * job, pointf p, textspan_t * span);
  92. void gvrender_set_pencolor(GVJ_t * job, char *name);
  93. void gvrender_set_penwidth(GVJ_t * job, double penwidth);
  94. void gvrender_set_fillcolor(GVJ_t * job, char *name);
  95. void gvrender_set_gradient_vals(GVJ_t *job, char *stopcolor, int angle,
  96. double frac);
  97. void gvrender_set_style(GVJ_t * job, char **s);
  98. void gvrender_ellipse(GVJ_t * job, pointf * AF, int filled);
  99. void gvrender_polygon(GVJ_t *job, pointf *af, size_t n, int filled);
  100. void gvrender_box(GVJ_t * job, boxf BF, int filled);
  101. void gvrender_beziercurve(GVJ_t *job, pointf *AF, size_t n, int filled);
  102. void gvrender_polyline(GVJ_t * job, pointf * AF, size_t n);
  103. void gvrender_comment(GVJ_t * job, char *str);
  104. void gvrender_usershape(GVJ_t *job, char *name, pointf *AF, size_t n,
  105. bool filled, char *imagescale, char *imagepos);
  106. /* layout */
  107. int gvlayout_select(GVC_t * gvc, const char *str);