public static int get_dpi(cef_print_settings_t *self)
        {
            get_dpi_delegate d;
            var p = self->_get_dpi;

            if (p == _pc)
            {
                d = _dc;
            }
            else
            {
                d = (get_dpi_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_dpi_delegate));
                if (_pc == IntPtr.Zero)
                {
                    _dc = d; _pc = p;
                }
            }
            return(d(self));
        }
示例#2
0
 public static int get_dpi(cef_print_settings_t* self)
 {
     get_dpi_delegate d;
     var p = self->_get_dpi;
     if (p == _pc) { d = _dc; }
     else
     {
         d = (get_dpi_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_dpi_delegate));
         if (_pc == IntPtr.Zero) { _dc = d; _pc = p; }
     }
     return d(self);
 }