Ejemplo n.º 1
0
 public virtual void Register(SafeContextHandle context)
 {
     unsafe
     {
         UnsafeNativeMethods.gvAddLibrary(context, (gvplugin_library_t*)_library.DangerousGetHandle());
     }
 }
Ejemplo n.º 2
0
 public override void Register(SafeContextHandle context)
 {
     base.Register(context);
     unsafe
     {
         GVC_t* gvc = (GVC_t*)context.DangerousGetHandle();
         PluginEngine textLayoutEngine = Engines.Single(i => i.Api == api_t.TextLayout);
         gvc->textlayout.engine = (gvtextlayout_engine_t*)textLayoutEngine.InstalledPluginData->engine;
     }
 }
Ejemplo n.º 3
0
        public static string[] gvPluginList(SafeContextHandle gvc, string kind)
        {
            int count;

            unsafe
            {
                byte **  data   = gvPluginList(gvc, kind, out count, null);
                string[] result = new string[count];
                for (int i = 0; i < count; i++)
                {
                    result[i] = Marshal.PtrToStringAnsi((IntPtr)data[i]);
                    gfree((IntPtr)data[i]);
                }

                gfree((IntPtr)data);
                return(result);
            }
        }
Ejemplo n.º 4
0
 public static extern int gvRender(SafeContextHandle gvc, GraphHandle g, [MarshalAs(UnmanagedType.LPStr)] string format, IntPtr FILE_out);
Ejemplo n.º 5
0
 public static extern int gvLayout(SafeContextHandle gvc, GraphHandle g, [MarshalAs(UnmanagedType.LPStr)] string engine);
Ejemplo n.º 6
0
 public static extern GraphHandle gvNextInputGraph(SafeContextHandle gvc);
Ejemplo n.º 7
0
 public static extern string gvcBuildDate(SafeContextHandle gvc);
Ejemplo n.º 8
0
 public static extern unsafe char **gvcInfo(SafeContextHandle gvc);
Ejemplo n.º 9
0
 public static extern void gvFinalize(SafeContextHandle gvc);
Ejemplo n.º 10
0
 public static extern void gvFinalize(SafeContextHandle gvc);
Ejemplo n.º 11
0
 public static extern string gvcVersion(SafeContextHandle gvc);
Ejemplo n.º 12
0
 public static unsafe extern char** gvcInfo(SafeContextHandle gvc);
Ejemplo n.º 13
0
 public static extern string gvcBuildDate(SafeContextHandle gvc);
Ejemplo n.º 14
0
 public static unsafe extern void gvAddLibrary(SafeContextHandle gvc, gvplugin_library_t* lib);
Ejemplo n.º 15
0
 public static extern unsafe int gvRenderContext(SafeContextHandle gvc, GraphHandle g, [MarshalAs(UnmanagedType.LPStr)] string format, void *context);
Ejemplo n.º 16
0
 public static extern int gvRenderJobs(SafeContextHandle gvc, GraphHandle g);
Ejemplo n.º 17
0
 public static extern int gvFreeLayout(SafeContextHandle gvc, GraphHandle g);
Ejemplo n.º 18
0
 public static extern int gvLayout(SafeContextHandle gvc, GraphHandle g, [MarshalAs(UnmanagedType.LPStr)]string engine);
Ejemplo n.º 19
0
 public static extern int gvLayoutJobs(SafeContextHandle gvc, GraphHandle g);
Ejemplo n.º 20
0
 private static unsafe extern byte** gvPluginList(SafeContextHandle gvc, [MarshalAs(UnmanagedType.LPStr)]string kind, out int sz, [MarshalAs(UnmanagedType.LPStr)]string unused);
Ejemplo n.º 21
0
 public static extern GraphHandle gvNextInputGraph(SafeContextHandle gvc);
Ejemplo n.º 22
0
 public static extern string gvcVersion(SafeContextHandle gvc);
Ejemplo n.º 23
0
 public static extern int gvParseArgs(SafeContextHandle gvc, int argc, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1, ArraySubType = UnmanagedType.LPStr)]string[] argv);
Ejemplo n.º 24
0
 public static extern int gvParseArgs(SafeContextHandle gvc, int argc, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1, ArraySubType = UnmanagedType.LPStr)] string[] argv);
Ejemplo n.º 25
0
        public static string[] gvPluginList(SafeContextHandle gvc, string kind)
        {
            int count;
            unsafe
            {
                byte** data = gvPluginList(gvc, kind, out count, null);
                string[] result = new string[count];
                for (int i = 0; i < count; i++)
                {
                    result[i] = Marshal.PtrToStringAnsi((IntPtr)data[i]);
                    gfree((IntPtr)data[i]);
                }

                gfree((IntPtr)data);
                return result;
            }
        }
Ejemplo n.º 26
0
 public static extern GraphHandle gvPluginsGraph(SafeContextHandle gvc);
Ejemplo n.º 27
0
 public static extern GraphHandle gvPluginsGraph(SafeContextHandle gvc);
Ejemplo n.º 28
0
 public static extern int gvLayoutJobs(SafeContextHandle gvc, GraphHandle g);
Ejemplo n.º 29
0
 public static extern int gvRender(SafeContextHandle gvc, GraphHandle g, [MarshalAs(UnmanagedType.LPStr)]string format, IntPtr FILE_out);
Ejemplo n.º 30
0
 public static extern int gvRenderFilename(SafeContextHandle gvc, GraphHandle g, [MarshalAs(UnmanagedType.LPStr)] string format, [MarshalAs(UnmanagedType.LPStr)] string filename);
Ejemplo n.º 31
0
 public static unsafe extern int gvRenderContext(SafeContextHandle gvc, GraphHandle g, [MarshalAs(UnmanagedType.LPStr)]string format, void* context);
Ejemplo n.º 32
0
 public static extern unsafe int gvRenderData(SafeContextHandle gvc, GraphHandle g, [MarshalAs(UnmanagedType.LPStr)] string format, byte **result, uint *length);
Ejemplo n.º 33
0
 public static unsafe extern int gvRenderData(SafeContextHandle gvc, GraphHandle g, [MarshalAs(UnmanagedType.LPStr)]string format, byte** result, uint* length);
Ejemplo n.º 34
0
 public static extern int gvFreeLayout(SafeContextHandle gvc, GraphHandle g);
Ejemplo n.º 35
0
 public static extern int gvRenderFilename(SafeContextHandle gvc, GraphHandle g, [MarshalAs(UnmanagedType.LPStr)]string format, [MarshalAs(UnmanagedType.LPStr)]string filename);
Ejemplo n.º 36
0
 private static extern unsafe byte **gvPluginList(SafeContextHandle gvc, [MarshalAs(UnmanagedType.LPStr)] string kind, out int sz, [MarshalAs(UnmanagedType.LPStr)] string unused);
Ejemplo n.º 37
0
 public static extern int gvRenderJobs(SafeContextHandle gvc, GraphHandle g);
Ejemplo n.º 38
0
 public static extern unsafe void gvAddLibrary(SafeContextHandle gvc, gvplugin_library_t *lib);
Ejemplo n.º 39
0
 private static void drawGraph(SafeContextHandle context, GraphHandle g)
 {
     int result = UnsafeNativeMethods.gvRenderFilename(context, g, "wpf", "test.dot");
     if (result != 0)
     {
         string message = UnsafeNativeMethods.aglasterr();
         throw new Exception(message);
     }
 }