]> granicus.if.org Git - graphviz/commitdiff
some code for binding keyboard events - no yet active
authorellson <devnull@localhost>
Tue, 8 Mar 2005 18:34:22 +0000 (18:34 +0000)
committerellson <devnull@localhost>
Tue, 8 Mar 2005 18:34:22 +0000 (18:34 +0000)
lib/gvc/gvevent.c
lib/gvc/gvplugin_render.h
lib/gvc/gvrender.c

index 152abec03c51db25a4b6b2428f4a284240998611..ba0eee9660c5e45af8bc684c6031e8908de683a3 100644 (file)
@@ -190,3 +190,5 @@ gvevent_key_binding_t gvevent_key_binding[] = {
     {"KP_Subtract", zoom_out_cb},
     {"F", toggle_fit_cb},
 };
+
+int gvevent_key_binding_size = ARRAY_SIZE(gvevent_key_binding);
index 0ac9cfcdbbebc94f430220ec5c18cae53cc8cc93..23e113db06f4c1e031716a285261fdd2593a5530 100644 (file)
@@ -25,7 +25,7 @@ extern "C" {
 #endif
 
     struct gvrender_engine_s {
-       void (*initialize) (GVC_t * gvc);
+       void (*initialize) (GVC_t * gvc, gvevent_key_binding_t *keys, int numkeys);
        void (*finalize) (GVC_t * gvc);
        void (*begin_job) (gvrender_job_t * job);
        void (*end_job) (gvrender_job_t * job);
index 826aba52b97d5452c4da47d5372e3da99ea5121a..1e0fd4fadac2fa10963bc64ce3c0e811f6d65f7f 100644 (file)
@@ -106,6 +106,9 @@ int gvrender_features(GVC_t * gvc)
     return features;
 }
 
+extern gvevent_key_binding_t *gvevent_key_binding;
+extern int gvevent_key_binding_size;
+
 void gvrender_initialize(GVC_t * gvc)
 {
     gvrender_job_t *job = gvc->job;
@@ -113,7 +116,7 @@ void gvrender_initialize(GVC_t * gvc)
 
     if (gvre) {
        if (gvre->initialize)
-           gvre->initialize(gvc);
+           gvre->initialize(gvc, gvevent_key_binding, gvevent_key_binding_size);
     }
 #if 0 
 /* codegens don't have this entry point */