예제 #1
0
 public virtual void Register(SafeContextHandle context)
 {
     unsafe
     {
         UnsafeNativeMethods.gvAddLibrary(context, (gvplugin_library_t*)_library.DangerousGetHandle());
     }
 }
예제 #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;
     }
 }
예제 #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);
            }
        }
예제 #4
0
 public static extern int gvRender(SafeContextHandle gvc, GraphHandle g, [MarshalAs(UnmanagedType.LPStr)] string format, IntPtr FILE_out);
예제 #5
0
 public static extern int gvLayout(SafeContextHandle gvc, GraphHandle g, [MarshalAs(UnmanagedType.LPStr)] string engine);
예제 #6
0
 public static extern GraphHandle gvNextInputGraph(SafeContextHandle gvc);
예제 #7
0
 public static extern string gvcBuildDate(SafeContextHandle gvc);
예제 #8
0
 public static extern unsafe char **gvcInfo(SafeContextHandle gvc);
예제 #9
0
 public static extern void gvFinalize(SafeContextHandle gvc);
예제 #10
0
 public static extern void gvFinalize(SafeContextHandle gvc);
예제 #11
0
 public static extern string gvcVersion(SafeContextHandle gvc);
예제 #12
0
 public static unsafe extern char** gvcInfo(SafeContextHandle gvc);
예제 #13
0
 public static extern string gvcBuildDate(SafeContextHandle gvc);
예제 #14
0
 public static unsafe extern void gvAddLibrary(SafeContextHandle gvc, gvplugin_library_t* lib);
예제 #15
0
 public static extern unsafe int gvRenderContext(SafeContextHandle gvc, GraphHandle g, [MarshalAs(UnmanagedType.LPStr)] string format, void *context);
예제 #16
0
 public static extern int gvRenderJobs(SafeContextHandle gvc, GraphHandle g);
예제 #17
0
 public static extern int gvFreeLayout(SafeContextHandle gvc, GraphHandle g);
예제 #18
0
 public static extern int gvLayout(SafeContextHandle gvc, GraphHandle g, [MarshalAs(UnmanagedType.LPStr)]string engine);
예제 #19
0
 public static extern int gvLayoutJobs(SafeContextHandle gvc, GraphHandle g);
예제 #20
0
 private static unsafe extern byte** gvPluginList(SafeContextHandle gvc, [MarshalAs(UnmanagedType.LPStr)]string kind, out int sz, [MarshalAs(UnmanagedType.LPStr)]string unused);
예제 #21
0
 public static extern GraphHandle gvNextInputGraph(SafeContextHandle gvc);
예제 #22
0
 public static extern string gvcVersion(SafeContextHandle gvc);
예제 #23
0
 public static extern int gvParseArgs(SafeContextHandle gvc, int argc, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1, ArraySubType = UnmanagedType.LPStr)]string[] argv);
예제 #24
0
 public static extern int gvParseArgs(SafeContextHandle gvc, int argc, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1, ArraySubType = UnmanagedType.LPStr)] string[] argv);
예제 #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;
            }
        }
예제 #26
0
 public static extern GraphHandle gvPluginsGraph(SafeContextHandle gvc);
예제 #27
0
 public static extern GraphHandle gvPluginsGraph(SafeContextHandle gvc);
예제 #28
0
 public static extern int gvLayoutJobs(SafeContextHandle gvc, GraphHandle g);
예제 #29
0
 public static extern int gvRender(SafeContextHandle gvc, GraphHandle g, [MarshalAs(UnmanagedType.LPStr)]string format, IntPtr FILE_out);
예제 #30
0
 public static extern int gvRenderFilename(SafeContextHandle gvc, GraphHandle g, [MarshalAs(UnmanagedType.LPStr)] string format, [MarshalAs(UnmanagedType.LPStr)] string filename);
예제 #31
0
 public static unsafe extern int gvRenderContext(SafeContextHandle gvc, GraphHandle g, [MarshalAs(UnmanagedType.LPStr)]string format, void* context);
예제 #32
0
 public static extern unsafe int gvRenderData(SafeContextHandle gvc, GraphHandle g, [MarshalAs(UnmanagedType.LPStr)] string format, byte **result, uint *length);
예제 #33
0
 public static unsafe extern int gvRenderData(SafeContextHandle gvc, GraphHandle g, [MarshalAs(UnmanagedType.LPStr)]string format, byte** result, uint* length);
예제 #34
0
 public static extern int gvFreeLayout(SafeContextHandle gvc, GraphHandle g);
예제 #35
0
 public static extern int gvRenderFilename(SafeContextHandle gvc, GraphHandle g, [MarshalAs(UnmanagedType.LPStr)]string format, [MarshalAs(UnmanagedType.LPStr)]string filename);
예제 #36
0
 private static extern unsafe byte **gvPluginList(SafeContextHandle gvc, [MarshalAs(UnmanagedType.LPStr)] string kind, out int sz, [MarshalAs(UnmanagedType.LPStr)] string unused);
예제 #37
0
 public static extern int gvRenderJobs(SafeContextHandle gvc, GraphHandle g);
예제 #38
0
 public static extern unsafe void gvAddLibrary(SafeContextHandle gvc, gvplugin_library_t *lib);
예제 #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);
     }
 }