[webkit-efl] About using ewk_view* to other ewk_xxx.cpp files.

Kihong Kwon vimff0 at gmail.com
Mon Dec 26 22:34:24 PST 2011


Hi. WebKit-EFL

I have a patch for adding the notification api to the
WebKit-EFL.(https://bugs.webkit.org/show_bug.cgi?id=73544)
But, I have a issue about using ewk_view pointer in the ewk_notification.cpp.

I would like to make a ewk_notification.h/cpp independently from
ewk_view.h/cpp, because ewk_view.h/cpp is too large and I think the
Notification API can be made independently.
But, I have to use Evas_Object* ewkView, because of notification
callback functions for the JS.

Can I use ewk_view* in the ewk_notification.h/cpp files?
There is no example like this in the EFL.
How do you think about this?

For example : ewk_notification.cpp
---------------------------------------------------------------------------------------------------------------------------------------------------------
void ewk_notification_displayed(const Evas_Object* ewkView, const
Ewk_Notification* ewkNotification)
{
#if ENABLE(NOTIFICATIONS)
    static_cast<WebCore::NotificationPresenterClientEfl*>(EWKPrivate::corePage(ewkView)->notificationController()->client())->notificationDisplayed(static_cast<WebCore::Notification*>(ewkNotification->notification));
#endif
}

……

void ewk_notification_request_permission(Evas_Object* ewkView, const
char* domain)
{
    evas_object_smart_callback_call(ewkView,
"notification,contents,requestPermission", (void*)domain);
}
----------------------------------------------------------------------------------------------------------------------------------------------------------

Thank you.
BR.
Kihong


More information about the webkit-efl mailing list