예제 #1
0
        private static NativeMethods.ChromelyParam InitParam(InitCallbackEvent initCallback,
                                                             CreateCallbackEvent createCallback,
                                                             MovingCallbackEvent movingCallback,
                                                             ResizeCallbackEvent resizeCallback,
                                                             QuitCallbackEvent quitCallback)
        {
            NativeMethods.ChromelyParam configParam = new NativeMethods.ChromelyParam();
            configParam.initCallback   = Marshal.GetFunctionPointerForDelegate(initCallback);
            configParam.createCallback = Marshal.GetFunctionPointerForDelegate(createCallback);
            configParam.movingCallback = Marshal.GetFunctionPointerForDelegate(movingCallback);
            configParam.resizeCallback = Marshal.GetFunctionPointerForDelegate(resizeCallback);
            configParam.exitCallback   = Marshal.GetFunctionPointerForDelegate(quitCallback);

            return(configParam);
        }
예제 #2
0
        private static ChromelyParam InitParam(RunMessageLoopCallback runCallback,
                                               CefShutdownCallback cefShutdownCallback,
                                               InitCallbackEvent initCallback,
                                               CreateCallbackEvent createCallback,
                                               MovingCallbackEvent movingCallback,
                                               ResizeCallbackEvent resizeCallback,
                                               QuitCallbackEvent quitCallback)
        {
            ChromelyParam configParam = new ChromelyParam();

            configParam.runMessageLoopCallback = Marshal.GetFunctionPointerForDelegate(runCallback);
            configParam.cefShutdownCallback    = Marshal.GetFunctionPointerForDelegate(cefShutdownCallback);
            configParam.initCallback           = Marshal.GetFunctionPointerForDelegate(initCallback);
            configParam.createCallback         = Marshal.GetFunctionPointerForDelegate(createCallback);
            configParam.movingCallback         = Marshal.GetFunctionPointerForDelegate(movingCallback);
            configParam.resizeCallback         = Marshal.GetFunctionPointerForDelegate(resizeCallback);
            configParam.exitCallback           = Marshal.GetFunctionPointerForDelegate(quitCallback);

            return(configParam);
        }