Source/WebKit/efl/ewk/ewk_view.cpp
Ewk_View_Paint_Context* ewk_view_paint_context_new(Ewk_View_Private_Data* priv, cairo_t* cr)
{
    EINA_SAFETY_ON_NULL_RETURN_VAL(priv, 0);
    EINA_SAFETY_ON_NULL_RETURN_VAL(cr, 0);
    EINA_SAFETY_ON_NULL_RETURN_VAL(priv->main_frame, 0);
    WebCore::FrameView* view = priv->main_frame->view();
    EINA_SAFETY_ON_NULL_RETURN_VAL(view, 0);
    Ewk_View_Paint_Context* ctxt = (Ewk_View_Paint_Context*)malloc(sizeof(*ctxt));
    EINA_SAFETY_ON_NULL_RETURN_VAL(ctxt, 0);

    ctxt->gc = new WebCore::GraphicsContext(cr);
    if (!ctxt->gc) {
        free(ctxt);
        return 0;
    }
    ctxt->view = view;
    ctxt->cr = cairo_reference(cr);
    return ctxt;
}
/**
 * Create a new paint context using the view as source and cairo as output.
 *
 * @param priv private handle pointer of the view to use as paint source.
 * @param cr cairo context to use as paint destination. A new
 *        reference is taken, so it's safe to call cairo_destroy()
 *        after this function returns.
 *
 * @return newly allocated instance or @c 0 on errors.
 *
 * @note this is not for general use but just for subclasses that want
 *       to define their own backing store.
 */
Create a new paint context using the view as source and cairo as output.
@param priv private handle pointer of the view to use as paint source.
@param cr cairo context to use as paint destination. A new
reference is taken, so it's safe to call cairo_destroy()
after this function returns.

@return newly allocated instance or @c 0 on errors.

@note this is not for general use but just for subclasses that want
to define their own backing store.
Create a new paint context using the view as source and cairo as output . @param priv private handle pointer of the view to use as paint source . @param cr cairo context to use as paint destination . A new reference is taken so it ' s safe to call cairo_destroy () after this function returns . @return newly allocated instance or @c 0 on errors . @note this is not for general use but just for subclasses that want to define their own backing store .
Ewk_View_Paint_Context* ewk_view_paint_context_new(Ewk_View_Private_Data* priv, cairo_t* cr)
{
    EINA_SAFETY_ON_NULL_RETURN_VAL(priv, 0);
    EINA_SAFETY_ON_NULL_RETURN_VAL(cr, 0);
    EINA_SAFETY_ON_NULL_RETURN_VAL(priv->main_frame, 0);
    WebCore::FrameView* view = priv->main_frame->view();
    EINA_SAFETY_ON_NULL_RETURN_VAL(view, 0);
    Ewk_View_Paint_Context* ctxt = (Ewk_View_Paint_Context*)malloc(sizeof(*ctxt));
    EINA_SAFETY_ON_NULL_RETURN_VAL(ctxt, 0);
    ctxt->gc = new WebCore::GraphicsContext(cr);
    if (!ctxt->gc) {
        free(ctxt);
        return 0;
    }
    ctxt->view = view;
    ctxt->cr = cairo_reference(cr);
    return ctxt;
}
Ewk_View_Paint_Context * ewk_view_paint_context_new ( Ewk_View_Private_Data * priv , cairo_t * cr ) { EINA_SAFETY_ON_NULL_RETURN_VAL ( priv , 0 ) ; EINA_SAFETY_ON_NULL_RETURN_VAL ( cr , 0 ) ; EINA_SAFETY_ON_NULL_RETURN_VAL ( priv -> main_frame , 0 ) ; WebCore :: FrameView * view = priv -> main_frame -> view ( ) ; EINA_SAFETY_ON_NULL_RETURN_VAL ( view , 0 ) ; Ewk_View_Paint_Context * ctxt = ( Ewk_View_Paint_Context * ) malloc ( sizeof ( * ctxt ) ) ; EINA_SAFETY_ON_NULL_RETURN_VAL ( ctxt , 0 ) ; ctxt -> gc = new WebCore :: GraphicsContext ( cr ) ; if ( ! ctxt -> gc ) { free ( ctxt ) ; return 0 ; } ctxt -> view = view ; ctxt -> cr = cairo_reference ( cr ) ; return ctxt ; }
Create a new paint context using the view as source and cairo as output.
Create a new paint context using the view as source and cairo as output .