Beispiel #1
0
 public static extern IntPtr PhPluginAddMenuItem(
     [In, Out] PhPlugin *Plugin,
     [In] PhMenuLocationType Location,
     [In] String InsertAfter,
     [In] Int32 Id,
     [In] String Text,
     [In] IntPtr Context
     );
        public static PluginInstance Register(string name, string displayName, string author, string description, string url, bool hasOptions)
        {
            PhPluginInformation *info;

            PhPlugin *plugin = NativeApi.PhRegisterPlugin(name, IntPtr.Zero, &info);

            if (plugin != null)
            {
                info->DisplayName = (void *)NativeApi.StringToNativeUni(displayName);
                info->Author      = (void *)NativeApi.StringToNativeUni(author);
                info->Description = (void *)NativeApi.StringToNativeUni(description);
                info->Url         = (void *)NativeApi.StringToNativeUni(url);
                info->HasOptions  = hasOptions;

                return(new PluginInstance(plugin));
            }

            return(null);
        }
Beispiel #3
0
 public static extern PhCallback *PhGetPluginCallback(
     [In] PhPlugin *Plugin,
     [In] PhPluginCallback Callback
     );
 private PluginInstance(PhPlugin *plugin)
 {
     this.Plugin = plugin;
 }
 private PluginInstance(PhPlugin* plugin)
 {
     this.Plugin = plugin;
 }