コード例 #1
0
ファイル: CefPrintHandler.cs プロジェクト: kc5nra/cefglue
 private int on_print_job(cef_print_handler_t* self, cef_string_t* document_name, cef_string_t* pdf_file_path, cef_print_job_callback_t* callback)
 {
     string mDocumentName = document_name->ToString();
     string mPdfFilePath = document_name->ToString();
     CefPrintJobCallback mCallback = CefPrintJobCallback.FromNative(callback);
     return OnPrintJob(mDocumentName, mPdfFilePath, mCallback);
 }
コード例 #2
0
ファイル: CefPrintHandler.cs プロジェクト: rajsite/lvcef
        private int on_print_job(cef_print_handler_t* self, cef_string_t* document_name, cef_string_t* pdf_file_path, cef_print_job_callback_t* callback)
        {
            CheckSelf(self);

            var m_documentName = cef_string_t.ToString(document_name);
            var m_pdfFilePath = cef_string_t.ToString(pdf_file_path);
            var m_callback = CefPrintJobCallback.FromNative(callback);

            var m_result = OnPrintJob(m_documentName, m_pdfFilePath, m_callback);

            return m_result ? 1 : 0;
        }
コード例 #3
0
 public static int get_refct(cef_print_job_callback_t* self)
 {
     get_refct_delegate d;
     var p = self->_base._get_refct;
     if (p == _p2) { d = _d2; }
     else
     {
         d = (get_refct_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(get_refct_delegate));
         if (_p2 == IntPtr.Zero) { _d2 = d; _p2 = p; }
     }
     return d(self);
 }
コード例 #4
0
 public static int release(cef_print_job_callback_t* self)
 {
     release_delegate d;
     var p = self->_base._release;
     if (p == _p1) { d = _d1; }
     else
     {
         d = (release_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(release_delegate));
         if (_p1 == IntPtr.Zero) { _d1 = d; _p1 = p; }
     }
     return d(self);
 }
コード例 #5
0
 public static int add_ref(cef_print_job_callback_t* self)
 {
     add_ref_delegate d;
     var p = self->_base._add_ref;
     if (p == _p0) { d = _d0; }
     else
     {
         d = (add_ref_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(add_ref_delegate));
         if (_p0 == IntPtr.Zero) { _d0 = d; _p0 = p; }
     }
     return d(self);
 }
コード例 #6
0
 public static void cont(cef_print_job_callback_t* self)
 {
     cont_delegate d;
     var p = self->_cont;
     if (p == _p3) { d = _d3; }
     else
     {
         d = (cont_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(cont_delegate));
         if (_p3 == IntPtr.Zero) { _d3 = d; _p3 = p; }
     }
     d(self);
 }
コード例 #7
0
 private CefPrintJobCallback(cef_print_job_callback_t* ptr)
 {
     if (ptr == null) throw new ArgumentNullException("ptr");
     _self = ptr;
 }
コード例 #8
0
 internal static CefPrintJobCallback FromNativeOrNull(cef_print_job_callback_t* ptr)
 {
     if (ptr == null) return null;
     return new CefPrintJobCallback(ptr);
 }
コード例 #9
0
 internal static CefPrintJobCallback FromNative(cef_print_job_callback_t* ptr)
 {
     return new CefPrintJobCallback(ptr);
 }