]> granicus.if.org Git - graphviz/commitdiff
API BREAK: use a C99 bool for 'GVJ_t.external_context'
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 15 Jan 2022 23:45:31 +0000 (15:45 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 16 Jan 2022 17:46:33 +0000 (09:46 -0800)
CHANGELOG.md
lib/gvc/gvc.c
lib/gvc/gvcjob.h
plugin.demo/xgtk/src/callbacks.c
plugin/glitz/gvdevice_glitz.c
plugin/gtk/callbacks.c
plugin/xlib/gvdevice_xlib.c
tclpkg/tcldot/tcldot-graphcmd.c

index cfbeb19a32fce7a62739f817026d53e348b5f70d..58d9dfdd161bc24f96dd4102d7abf24f6805e8a0 100644 (file)
@@ -37,8 +37,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
   C99 `bool` instead of a Graphviz-specific `boolean`.
 - **Breaking**: The `must_inline` and `nocache` fields of the `usershape_t`
   struct are now C99 `bool`s instead of Graphviz-specific `boolean`s.
-- **Breaking**: The `device_sets_dpi` field of the `GVJ_t` struct is now a C99
-  `bool` instead of a Graphviz-specific `boolean`.
+- **Breaking**: The `device_sets_dpi` and `external_context` fields of the
+  `GVJ_t` struct are now C99 `bool`s instead of Graphviz-specific `boolean`s.
 - **Breaking**: 1-bit fields of the `obj_state_s` struct are now unsigned
   instead of signed.
 - **Breaking**: Graphviz headers no longer define the constant `MAXSHORT`. A
index 8bb185f469b4d1a1497021460fd80e76d6213563..1df28de13f71deaeddc36e811d2a84ccb9c7f418 100644 (file)
@@ -166,7 +166,7 @@ int gvRenderContext(GVC_t *gvc, graph_t *g, const char *format, void *context)
     }
        
     job->context = context;
-    job->external_context = TRUE;
+    job->external_context = true;
        
     rc = gvRenderJobs(gvc, g);
     gvrender_end_job(job);
index 00cceacfe6f8c81cd0742a21ba1e5134a901712a..5bfd6f651d789757b15a4db3604725688b33c6fc 100644 (file)
@@ -299,7 +299,7 @@ extern "C" {
        int screen;
 
        void *context;          /* gd or cairo surface */
-       boolean external_context;       /* context belongs to caller */
+       bool external_context;  /* context belongs to caller */
        char *imagedata;        /* location of imagedata */
 
         int flags;             /* emit_graph flags */
index ae235deb0310b02dc1e8d245ed8ed150e380a1c5..06435185b998f3a53126b416750c27c8cb492e0f 100644 (file)
@@ -11,6 +11,7 @@
 #include "config.h"
 
 #include <gtk/gtk.h>
+#include <stdbool.h>
 
 #include "gvplugin_device.h"
 
@@ -210,7 +211,7 @@ on_drawingarea1_expose_event           (GtkWidget       *widget,
     (job->callbacks->motion)(job, job->pointer);
 
     job->context = (void *)cr;
-    job->external_context = TRUE;
+    job->external_context = true;
     job->width = widget->allocation.width;
     job->height = widget->allocation.height;
     if (job->has_been_rendered) {
@@ -275,7 +276,7 @@ on_drawingarea2_expose_event           (GtkWidget       *widget,
     (job->callbacks->motion)(job, job->pointer);
 
     job->context = (void *)cr;
-    job->external_context = TRUE;
+    job->external_context = true;
     job->width = widget->allocation.width;
     job->height = widget->allocation.height;
 
index 079cdc9a7625e6995ab8f8c825e3b32c6ec7fb06..09b6b3c083a1cb6a19d039e339250050bbcd9f8f 100644 (file)
@@ -254,7 +254,7 @@ static void update_display(GVJ_t *job, Display *dpy)
                        window->pix, window->visual,
                        job->width, job->height);
        job->context = (void *)cairo_create(surface);
-       job->external_context = TRUE;
+       job->external_context = true;
         (job->callbacks->refresh)(job);
        cairo_surface_destroy(surface);
        XCopyArea(dpy, window->pix, window->win, window->gc,
index 6dfe15de2b5d84014ab474183ad4bb40214ca42c..53d4f7d39a14033d9d68d1e75051b5cf806dab13 100644 (file)
@@ -11,6 +11,7 @@
 #include "config.h"
 
 #include <gtk/gtk.h>
+#include <stdbool.h>
 
 #include <gvc/gvplugin_device.h>
 
@@ -211,7 +212,7 @@ on_drawingarea1_expose_event           (GtkWidget       *widget,
     (job->callbacks->motion)(job, job->pointer);
 
     job->context = cr;
-    job->external_context = TRUE;
+    job->external_context = true;
     job->width = widget->allocation.width;
     job->height = widget->allocation.height;
     if (job->has_been_rendered) {
@@ -276,7 +277,7 @@ on_drawingarea2_expose_event           (GtkWidget       *widget,
     (job->callbacks->motion)(job, job->pointer);
 
     job->context = cr;
-    job->external_context = TRUE;
+    job->external_context = true;
     job->width = widget->allocation.width;
     job->height = widget->allocation.height;
 
index c29f6024f2d11f16ef8590b2eb4239c5341e84f3..78cc13528c018b24ab1d15c0cf18c3a794cedeca 100644 (file)
@@ -242,7 +242,7 @@ static void update_display(GVJ_t *job, Display *dpy)
                        window->pix, window->visual,
                        job->width, job->height);
        job->context = (void *)cairo_create(surface);
-       job->external_context = TRUE;
+       job->external_context = true;
         (job->callbacks->refresh)(job);
        cairo_surface_destroy(surface);
        XCopyArea(dpy, window->pix, window->win, window->gc,
index d902b201ada06277e9e2842dd71858f5fbdebfa1..e7ee1deaefb6afe8255d7ef728f1466f00c41a6b 100644 (file)
@@ -8,6 +8,7 @@
  * Contributors: Details at https://graphviz.org
  *************************************************************************/
 
+#include <stdbool.h>
 #include "tcldot.h"
 
 int graphcmd(ClientData clientData, Tcl_Interp * interp,
@@ -337,7 +338,7 @@ int graphcmd(ClientData clientData, Tcl_Interp * interp,
        job = gvc->job;
        job->imagedata = canvas;
        job->context = interp;
-       job->external_context = TRUE;
+       job->external_context = true;
        job->output_file = stdout;
 
        /* make sure that layout is done */