Changeset 97329 in webkit


Ignore:
Timestamp:
Oct 12, 2011 6:23:06 PM (13 years ago)
Author:
gyuyoung.kim@samsung.com
Message:

[EFL] Change efl style parameter variables with WebKit coding Style
https://bugs.webkit.org/show_bug.cgi?id=69073

Reviewed by Antonio Gomes.

This is a third step in order to be more compliant with WebKit coding style.
We have used one-letter| two-letter parameter according to efl style. However, it's more difficult
for other reviewers to review EFL patches. So, this patch changes efl style parameters
with meaningful one.

Majors changes are listed below,

  • Use ewkFrame instead of o parameter in ewk_frame.cpp.
  • Use ewkView instead of o parameter in ewk_view.cpp.
  • Use menu and item instead of o parameter in ewk_contextmenu.cpp.
  • Use ewkTile instead of o parameter in ewk_tile_xxx.cpp.
  • Use tile parameter name instead of t parameter in ewk_tile_xxx.cpp.
  • Use smartData instead of sd parameter for Ewk_XXXX_Smart_Data struct.
  • Use width, height instead of w, h parameter.
  • Use xxxEvent instead of ev parameter for event. (e.g. downEvent, upEvent, wheelEvent)
  • Use scrollX, scrollY, scrollWidth, scrollHeight, centerX, centerY, deltaX, deltaY instead of sx, xy, sw,

sh, cx, cy, dx, dy.

  • Use tileUnusedCache instead of tuc parameter in tiled backing store.
  • Use red, green, blue and alpha instead of r,g,b,a.
  • Remove "_" from parameter variable.
  • Run demarchi's coding style script for ewk_tile_xxx.cpp files.
  • Remove *void* parameter in ewk_tile_xxx.cpp's internal functions.
  • ewk/ewk_auth_soup.cpp:
  • ewk/ewk_contextmenu.cpp:
  • ewk/ewk_cookies.cpp:
  • ewk/ewk_frame.cpp:
  • ewk/ewk_history.cpp:
  • ewk/ewk_js.cpp:
  • ewk/ewk_protocol_handler_soup.cpp:
  • ewk/ewk_settings.cpp:
  • ewk/ewk_tiled_backing_store.cpp:
  • ewk/ewk_tiled_backing_store.h:
  • ewk/ewk_tiled_matrix.cpp:
  • ewk/ewk_tiled_matrix.h:
  • ewk/ewk_tiled_model.cpp:
  • ewk/ewk_tiled_model.h:
  • ewk/ewk_view.cpp:
  • ewk/ewk_view_single.cpp:
  • ewk/ewk_view_tiled.cpp:
  • ewk/ewk_window_features.cpp:
Location:
trunk/Source/WebKit/efl
Files:
19 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/efl/ChangeLog

    r97080 r97329  
     12011-10-12  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
     2
     3        [EFL] Change efl style parameter variables with WebKit coding Style
     4        https://bugs.webkit.org/show_bug.cgi?id=69073
     5
     6        Reviewed by Antonio Gomes.
     7
     8        This is a third step in order to be more compliant with WebKit coding style.
     9        We have used one-letter| two-letter parameter according to efl style. However, it's more difficult
     10        for other reviewers to review EFL patches. So, this patch changes efl style parameters
     11        with meaningful one.
     12
     13        Majors changes are listed below,
     14
     15        - Use ewkFrame instead of o parameter in ewk_frame.cpp.
     16        - Use ewkView instead of o parameter in ewk_view.cpp.
     17        - Use menu and item instead of o parameter in ewk_contextmenu.cpp.
     18        - Use ewkTile instead of o parameter in ewk_tile_xxx.cpp.
     19        - Use tile parameter name instead of t parameter in ewk_tile_xxx.cpp.
     20        - Use smartData instead of sd parameter for Ewk_XXXX_Smart_Data struct.
     21        - Use width, height instead of w, h parameter.
     22        - Use xxxEvent instead of ev parameter for event. (e.g. downEvent, upEvent, wheelEvent)
     23        - Use scrollX, scrollY, scrollWidth, scrollHeight, centerX, centerY, deltaX, deltaY instead of sx, xy, sw,
     24        sh, cx, cy, dx, dy.
     25        - Use tileUnusedCache instead of tuc parameter in tiled backing store.
     26        - Use red, green, blue and alpha instead of r,g,b,a.
     27        - Remove "_" from parameter variable.
     28        - Run demarchi's coding style script for ewk_tile_xxx.cpp files.
     29        - Remove *void* parameter in ewk_tile_xxx.cpp's internal functions.
     30
     31        * ewk/ewk_auth_soup.cpp:
     32        * ewk/ewk_contextmenu.cpp:
     33        * ewk/ewk_cookies.cpp:
     34        * ewk/ewk_frame.cpp:
     35        * ewk/ewk_history.cpp:
     36        * ewk/ewk_js.cpp:
     37        * ewk/ewk_protocol_handler_soup.cpp:
     38        * ewk/ewk_settings.cpp:
     39        * ewk/ewk_tiled_backing_store.cpp:
     40        * ewk/ewk_tiled_backing_store.h:
     41        * ewk/ewk_tiled_matrix.cpp:
     42        * ewk/ewk_tiled_matrix.h:
     43        * ewk/ewk_tiled_model.cpp:
     44        * ewk/ewk_tiled_model.h:
     45        * ewk/ewk_view.cpp:
     46        * ewk/ewk_view_single.cpp:
     47        * ewk/ewk_view_tiled.cpp:
     48        * ewk/ewk_window_features.cpp:
     49
    1502011-10-10  Raphael Kubo da Costa  <kubo@profusion.mobi>
    251
     
    20582107        * ewk/ewk_view.cpp:
    20592108        (ewk_view_run_open_panel):
    2060         * ewk/ewk_view.h
     2109        * ewk/ewk_view.h:
    20612110
    206221112011-06-27  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
  • trunk/Source/WebKit/efl/ewk/ewk_auth_soup.cpp

    r96382 r97329  
    6464}
    6565
    66 static void ewk_auth_soup_dialog_session_feature_init(SoupSessionFeatureInterface* feature_interface, gpointer interface_data)
     66static void ewk_auth_soup_dialog_session_feature_init(SoupSessionFeatureInterface* featureInterface, gpointer interfaceData)
    6767{
    68     feature_interface->attach = attach;
    69     feature_interface->detach = detach;
     68    featureInterface->attach = attach;
     69    featureInterface->detach = detach;
    7070}
    7171
  • trunk/Source/WebKit/efl/ewk/ewk_contextmenu.cpp

    r96382 r97329  
    9393}
    9494
    95 const Eina_List* ewk_context_menu_item_list_get(const Ewk_Context_Menu* o)
    96 {
    97     EINA_SAFETY_ON_NULL_RETURN_VAL(o, 0);
    98 
    99     return o->items;
     95const Eina_List* ewk_context_menu_item_list_get(const Ewk_Context_Menu* menu)
     96{
     97    EINA_SAFETY_ON_NULL_RETURN_VAL(menu, 0);
     98
     99    return menu->items;
    100100}
    101101
     
    143143}
    144144
    145 Ewk_Context_Menu_Item_Type ewk_context_menu_item_type_get(const Ewk_Context_Menu_Item* o)
    146 {
    147     EINA_SAFETY_ON_NULL_RETURN_VAL(o, EWK_ACTION_TYPE);
    148     return o->type;
    149 }
    150 
    151 Eina_Bool ewk_context_menu_item_type_set(Ewk_Context_Menu_Item* o, Ewk_Context_Menu_Item_Type type)
    152 {
    153     EINA_SAFETY_ON_NULL_RETURN_VAL(o, EINA_FALSE);
    154     o->type = type;
    155     return EINA_TRUE;
    156 }
    157 
    158 Ewk_Context_Menu_Action ewk_context_menu_item_action_get(const Ewk_Context_Menu_Item* o)
    159 {
    160     EINA_SAFETY_ON_NULL_RETURN_VAL(o, EWK_CONTEXT_MENU_ITEM_TAG_NO_ACTION);
    161     return o->action;
    162 }
    163 
    164 Eina_Bool ewk_context_menu_item_action_set(Ewk_Context_Menu_Item* o, Ewk_Context_Menu_Action action)
    165 {
    166     EINA_SAFETY_ON_NULL_RETURN_VAL(o, EINA_FALSE);
    167     o->action = action;
    168     return EINA_TRUE;
    169 }
    170 
    171 const char* ewk_context_menu_item_title_get(const Ewk_Context_Menu_Item* o)
    172 {
    173     EINA_SAFETY_ON_NULL_RETURN_VAL(o, 0);
    174     return o->title;
    175 }
    176 
    177 const char* ewk_context_menu_item_title_set(Ewk_Context_Menu_Item* o, const char* title)
    178 {
    179     EINA_SAFETY_ON_NULL_RETURN_VAL(o, 0);
    180     eina_stringshare_replace(&o->title, title);
    181     return o->title;
    182 }
    183 
    184 Eina_Bool ewk_context_menu_item_checked_get(const Ewk_Context_Menu_Item* o)
    185 {
    186     EINA_SAFETY_ON_NULL_RETURN_VAL(o, EINA_FALSE);
    187     return o->checked;
    188 }
    189 
    190 Eina_Bool ewk_context_menu_item_checked_set(Ewk_Context_Menu_Item* o, Eina_Bool checked)
    191 {
    192     EINA_SAFETY_ON_NULL_RETURN_VAL(o, EINA_FALSE);
    193     o->checked = checked;
    194     return EINA_TRUE;
    195 }
    196 
    197 Eina_Bool ewk_context_menu_item_enabled_get(const Ewk_Context_Menu_Item* o)
    198 {
    199     EINA_SAFETY_ON_NULL_RETURN_VAL(o, EINA_FALSE);
    200     return o->enabled;
    201 }
    202 
    203 Eina_Bool ewk_context_menu_item_enabled_set(Ewk_Context_Menu_Item* o, Eina_Bool enabled)
    204 {
    205     EINA_SAFETY_ON_NULL_RETURN_VAL(o, EINA_FALSE);
    206     o->enabled = enabled;
     145Ewk_Context_Menu_Item_Type ewk_context_menu_item_type_get(const Ewk_Context_Menu_Item* item)
     146{
     147    EINA_SAFETY_ON_NULL_RETURN_VAL(item, EWK_ACTION_TYPE);
     148    return item->type;
     149}
     150
     151Eina_Bool ewk_context_menu_item_type_set(Ewk_Context_Menu_Item* item, Ewk_Context_Menu_Item_Type type)
     152{
     153    EINA_SAFETY_ON_NULL_RETURN_VAL(item, EINA_FALSE);
     154    item->type = type;
     155    return EINA_TRUE;
     156}
     157
     158Ewk_Context_Menu_Action ewk_context_menu_item_action_get(const Ewk_Context_Menu_Item* item)
     159{
     160    EINA_SAFETY_ON_NULL_RETURN_VAL(item, EWK_CONTEXT_MENU_ITEM_TAG_NO_ACTION);
     161    return item->action;
     162}
     163
     164Eina_Bool ewk_context_menu_item_action_set(Ewk_Context_Menu_Item* item, Ewk_Context_Menu_Action action)
     165{
     166    EINA_SAFETY_ON_NULL_RETURN_VAL(item, EINA_FALSE);
     167    item->action = action;
     168    return EINA_TRUE;
     169}
     170
     171const char* ewk_context_menu_item_title_get(const Ewk_Context_Menu_Item* item)
     172{
     173    EINA_SAFETY_ON_NULL_RETURN_VAL(item, 0);
     174    return item->title;
     175}
     176
     177const char* ewk_context_menu_item_title_set(Ewk_Context_Menu_Item* item, const char* title)
     178{
     179    EINA_SAFETY_ON_NULL_RETURN_VAL(item, 0);
     180    eina_stringshare_replace(&item->title, title);
     181    return item->title;
     182}
     183
     184Eina_Bool ewk_context_menu_item_checked_get(const Ewk_Context_Menu_Item* item)
     185{
     186    EINA_SAFETY_ON_NULL_RETURN_VAL(item, EINA_FALSE);
     187    return item->checked;
     188}
     189
     190Eina_Bool ewk_context_menu_item_checked_set(Ewk_Context_Menu_Item* item, Eina_Bool checked)
     191{
     192    EINA_SAFETY_ON_NULL_RETURN_VAL(item, EINA_FALSE);
     193    item->checked = checked;
     194    return EINA_TRUE;
     195}
     196
     197Eina_Bool ewk_context_menu_item_enabled_get(const Ewk_Context_Menu_Item* item)
     198{
     199    EINA_SAFETY_ON_NULL_RETURN_VAL(item, EINA_FALSE);
     200    return item->enabled;
     201}
     202
     203Eina_Bool ewk_context_menu_item_enabled_set(Ewk_Context_Menu_Item* item, Eina_Bool enabled)
     204{
     205    EINA_SAFETY_ON_NULL_RETURN_VAL(item, EINA_FALSE);
     206    item->enabled = enabled;
    207207    return EINA_TRUE;
    208208}
     
    257257 * @see ewk_context_menu_destroy
    258258 */
    259 Eina_Bool ewk_context_menu_free(Ewk_Context_Menu* o)
    260 {
    261     EINA_SAFETY_ON_NULL_RETURN_VAL(o, EINA_FALSE);
    262     evas_object_smart_callback_call(o->view, "contextmenu,free", o);
    263     ewk_context_menu_unref(o);
     259Eina_Bool ewk_context_menu_free(Ewk_Context_Menu* menu)
     260{
     261    EINA_SAFETY_ON_NULL_RETURN_VAL(menu, EINA_FALSE);
     262    evas_object_smart_callback_call(menu->view, "contextmenu,free", menu);
     263    ewk_context_menu_unref(menu);
    264264    return EINA_TRUE;
    265265}
     
    276276 * @see ewk_context_menu_item_new
    277277 */
    278 void ewk_context_menu_item_append(Ewk_Context_Menu* o, WebCore::ContextMenuItem& core)
     278void ewk_context_menu_item_append(Ewk_Context_Menu* menu, WebCore::ContextMenuItem& core)
    279279{
    280280    Ewk_Context_Menu_Item_Type type = static_cast<Ewk_Context_Menu_Item_Type>(core.type());
     
    286286    EINA_SAFETY_ON_NULL_RETURN(menu_item);
    287287
    288     o->items = eina_list_append(o->items, menu_item);
    289     evas_object_smart_callback_call(o->view, "contextmenu,item,appended", o);
     288    menu->items = eina_list_append(menu->items, menu_item);
     289    evas_object_smart_callback_call(menu->view, "contextmenu,item,appended", menu);
    290290}
    291291
     
    302302 * @see ewk_context_menu_item_list_get
    303303 */
    304 Ewk_Context_Menu* ewk_context_menu_custom_get(const Ewk_Context_Menu* o)
    305 {
    306     EINA_SAFETY_ON_NULL_RETURN_VAL(o, 0);
    307 
    308     evas_object_smart_callback_call(o->view, "contextmenu,customize", o->items);
    309     return o;
     304Ewk_Context_Menu* ewk_context_menu_custom_get(const Ewk_Context_Menu* menu)
     305{
     306    EINA_SAFETY_ON_NULL_RETURN_VAL(menu, 0);
     307
     308    evas_object_smart_callback_call(menu->view, "contextmenu,customize", menu->items);
     309    return menu;
    310310}
    311311
     
    317317 * @param o the context menu object
    318318 */
    319 void ewk_context_menu_show(const Ewk_Context_Menu* o)
    320 {
    321     EINA_SAFETY_ON_NULL_RETURN(o);
    322 
    323     evas_object_smart_callback_call(o->view, "contextmenu,show", o);
     319void ewk_context_menu_show(const Ewk_Context_Menu* menu)
     320{
     321    EINA_SAFETY_ON_NULL_RETURN(menu);
     322
     323    evas_object_smart_callback_call(menu->view, "contextmenu,show", menu);
    324324}
    325325
  • trunk/Source/WebKit/efl/ewk/ewk_cookies.cpp

    r95901 r97329  
    143143}
    144144
    145 void ewk_cookies_policy_set(Ewk_Cookie_Policy p)
     145void ewk_cookies_policy_set(Ewk_Cookie_Policy cookiePolicy)
    146146{
    147147#if USE(SOUP)
     
    150150
    151151    policy = SOUP_COOKIE_JAR_ACCEPT_ALWAYS;
    152     switch (p) {
     152    switch (cookiePolicy) {
    153153    case EWK_COOKIE_JAR_ACCEPT_NEVER:
    154154        policy = SOUP_COOKIE_JAR_ACCEPT_NEVER;
  • trunk/Source/WebKit/efl/ewk/ewk_frame.cpp

    r97080 r97329  
    8383
    8484#ifndef EWK_TYPE_CHECK
    85 #define EWK_FRAME_TYPE_CHECK(o, ...) do { } while (0)
     85#define EWK_FRAME_TYPE_CHECK(ewkFrame, ...) do { } while (0)
    8686#else
    87 #define EWK_FRAME_TYPE_CHECK(o, ...)                                    \
     87#define EWK_FRAME_TYPE_CHECK(ewkFrame, ...)                                    \
    8888    do {                                                                \
    89         const char* _tmp_otype = evas_object_type_get(o);               \
     89        const char* _tmp_otype = evas_object_type_get(ewkFrame);               \
    9090        if (EINA_UNLIKELY(_tmp_otype != EWK_FRAME_TYPE_STR)) {          \
    9191            EINA_LOG_CRIT                                               \
    92                 ("%p (%s) is not of an ewk_frame!", o,                  \
     92                ("%p (%s) is not of an ewk_frame!", ewkFrame,                  \
    9393                _tmp_otype ? _tmp_otype : "(null)");                    \
    9494            return __VA_ARGS__;                                         \
     
    9797#endif
    9898
    99 #define EWK_FRAME_SD_GET(o, ptr)                                \
    100     Ewk_Frame_Smart_Data* ptr = static_cast<Ewk_Frame_Smart_Data*>(evas_object_smart_data_get(o))
    101 
    102 #define EWK_FRAME_SD_GET_OR_RETURN(o, ptr, ...)         \
    103     EWK_FRAME_TYPE_CHECK(o, __VA_ARGS__);               \
    104     EWK_FRAME_SD_GET(o, ptr);                           \
     99#define EWK_FRAME_SD_GET(ewkFrame, ptr)                                \
     100    Ewk_Frame_Smart_Data* ptr = static_cast<Ewk_Frame_Smart_Data*>(evas_object_smart_data_get(ewkFrame))
     101
     102#define EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, ptr, ...)         \
     103    EWK_FRAME_TYPE_CHECK(ewkFrame, __VA_ARGS__);               \
     104    EWK_FRAME_SD_GET(ewkFrame, ptr);                           \
    105105    if (!ptr) {                                         \
    106106        CRITICAL("no smart data for object %p (%s)",    \
    107                  o, evas_object_type_get(o));           \
     107                 ewkFrame, evas_object_type_get(ewkFrame));           \
    108108        return __VA_ARGS__;                             \
    109109    }
     
    112112
    113113#ifdef EWK_FRAME_DEBUG
    114 static inline void _ewk_frame_debug(Evas_Object* o)
     114static inline void _ewk_frame_debug(Evas_Object* ewkFrame)
    115115{
    116116    Evas_Object* clip, * parent;
     
    118118    int r, g, b, a, cr, cg, cb, ca;
    119119
    120     evas_object_color_get(o, &r, &g, &b, &a);
    121     evas_object_geometry_get(o, &x, &y, &w, &h);
    122 
    123     clip = evas_object_clip_get(o);
     120    evas_object_color_get(ewkFrame, &r, &g, &b, &a);
     121    evas_object_geometry_get(ewkFrame, &x, &y, &w, &h);
     122
     123    clip = evas_object_clip_get(ewkFrame);
    124124    evas_object_color_get(clip, &cr, &cg, &cb, &ca);
    125125    evas_object_geometry_get(clip, &cx, &cy, &cw, &ch);
    126126
    127127    fprintf(stderr, "%p: type=%s name=%s, visible=%d, color=%02x%02x%02x%02x, %d,%d+%dx%d, clipper=%p (%d, %02x%02x%02x%02x, %d,%d+%dx%d)\n",
    128             o, evas_object_type_get(o), evas_object_name_get(o), evas_object_visible_get(o),
     128            ewkFrame, evas_object_type_get(ewkFrame), evas_object_name_get(ewkFrame), evas_object_visible_get(ewkFrame),
    129129            r, g, b, a, x, y, w, h,
    130130            clip, evas_object_visible_get(clip), cr, cg, cb, ca, cx, cy, cw, ch);
    131     parent = evas_object_smart_parent_get(o);
     131    parent = evas_object_smart_parent_get(ewkFrame);
    132132    if (!parent)
    133133        fprintf(stderr, "\n");
     
    168168}
    169169
    170 static Evas_Object* _ewk_frame_children_iterator_get_container(Eina_Iterator_Ewk_Frame* it)
    171 {
    172     return it->obj;
    173 }
    174 
    175 static void _ewk_frame_smart_add(Evas_Object* o)
    176 {
    177     EWK_FRAME_SD_GET(o, sd);
     170static Evas_Object* _ewk_frame_children_iterator_get_container(Eina_Iterator_Ewk_Frame* iterator)
     171{
     172    return iterator->obj;
     173}
     174
     175static void _ewk_frame_smart_add(Evas_Object* ewkFrame)
     176{
     177    EWK_FRAME_SD_GET(ewkFrame, sd);
    178178
    179179    if (!sd) {
     
    183183            return;
    184184        }
    185         evas_object_smart_data_set(o, sd);
    186     }
    187 
    188     sd->self = o;
    189 
    190     _parent_sc.add(o);
     185        evas_object_smart_data_set(ewkFrame, sd);
     186    }
     187
     188    sd->self = ewkFrame;
     189
     190    _parent_sc.add(ewkFrame);
    191191    evas_object_static_clip_set(sd->base.clipper, EINA_FALSE);
    192192    evas_object_move(sd->base.clipper, 0, 0);
     
    225225        i = 0;
    226226
    227     evas_object_smart_member_add(sd->region, o);
     227    evas_object_smart_member_add(sd->region, ewkFrame);
    228228    evas_object_hide(sd->region);
    229229#endif
    230230}
    231231
    232 static void _ewk_frame_smart_del(Evas_Object* o)
    233 {
    234     WRN("o=%p", o); // XXX REMOVE ME LATER
    235     EWK_FRAME_SD_GET(o, sd);
     232static void _ewk_frame_smart_del(Evas_Object* ewkFrame)
     233{
     234    WRN("ewkFrame=%p", ewkFrame); // XXX REMOVE ME LATER
     235    EWK_FRAME_SD_GET(ewkFrame, sd);
    236236
    237237    if (sd) {
     
    249249    }
    250250
    251     _parent_sc.del(o);
    252 }
    253 
    254 static void _ewk_frame_smart_resize(Evas_Object* o, Evas_Coord w, Evas_Coord h)
    255 {
    256     EWK_FRAME_SD_GET(o, sd);
    257     evas_object_resize(sd->base.clipper, w, h);
     251    _parent_sc.del(ewkFrame);
     252}
     253
     254static void _ewk_frame_smart_resize(Evas_Object* ewkFrame, Evas_Coord width, Evas_Coord height)
     255{
     256    EWK_FRAME_SD_GET(ewkFrame, sd);
     257    evas_object_resize(sd->base.clipper, width, height);
    258258
    259259#ifdef EWK_FRAME_DEBUG
    260     evas_object_resize(sd->region, w, h);
     260    evas_object_resize(sd->region, width, height);
    261261    Evas_Coord x, y;
    262     evas_object_geometry_get(sd->region, &x, &y, &w, &h);
     262    evas_object_geometry_get(sd->region, &x, &y, &width, &height);
    263263    INF("region=%p, visible=%d, geo=%d,%d + %dx%d",
    264         sd->region, evas_object_visible_get(sd->region), x, y, w, h);
    265     _ewk_frame_debug(o);
     264        sd->region, evas_object_visible_get(sd->region), x, y, width, height);
     265    _ewk_frame_debug(ewkFrame);
    266266#endif
    267267}
     
    289289}
    290290
    291 Evas_Object* ewk_frame_view_get(const Evas_Object* o)
    292 {
    293     EWK_FRAME_SD_GET_OR_RETURN(o, sd, 0);
     291Evas_Object* ewk_frame_view_get(const Evas_Object* ewkFrame)
     292{
     293    EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, sd, 0);
    294294    return sd->view;
    295295}
    296296
    297 Eina_Iterator* ewk_frame_children_iterator_new(Evas_Object* o)
    298 {
    299     EWK_FRAME_SD_GET_OR_RETURN(o, sd, 0);
     297Eina_Iterator* ewk_frame_children_iterator_new(Evas_Object* ewkFrame)
     298{
     299    EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, sd, 0);
    300300    Eina_Iterator_Ewk_Frame* it = static_cast<Eina_Iterator_Ewk_Frame*>
    301301                                  (calloc(1, sizeof(Eina_Iterator_Ewk_Frame)));
     
    307307    it->base.get_container = FUNC_ITERATOR_GET_CONTAINER(_ewk_frame_children_iterator_get_container);
    308308    it->base.free = FUNC_ITERATOR_FREE(free);
    309     it->obj = o;
     309    it->obj = ewkFrame;
    310310    it->currentIndex = 0;
    311311    return &it->base;
    312312}
    313313
    314 Evas_Object* ewk_frame_child_find(Evas_Object* o, const char* name)
    315 {
    316     EWK_FRAME_SD_GET_OR_RETURN(o, sd, 0);
     314Evas_Object* ewk_frame_child_find(Evas_Object* ewkFrame, const char* name)
     315{
     316    EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, sd, 0);
    317317    EINA_SAFETY_ON_NULL_RETURN_VAL(name, 0);
    318318    EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, 0);
     
    321321}
    322322
    323 Eina_Bool ewk_frame_uri_set(Evas_Object* o, const char* uri)
    324 {
    325     EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     323Eina_Bool ewk_frame_uri_set(Evas_Object* ewkFrame, const char* uri)
     324{
     325    EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, sd, EINA_FALSE);
    326326    WebCore::KURL kurl(WebCore::KURL(), WTF::String::fromUTF8(uri));
    327327    WebCore::ResourceRequest req(kurl);
     
    331331}
    332332
    333 const char* ewk_frame_uri_get(const Evas_Object* o)
    334 {
    335     EWK_FRAME_SD_GET_OR_RETURN(o, sd, 0);
     333const char* ewk_frame_uri_get(const Evas_Object* ewkFrame)
     334{
     335    EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, sd, 0);
    336336    return sd->uri;
    337337}
    338338
    339 const char* ewk_frame_title_get(const Evas_Object* o)
    340 {
    341     EWK_FRAME_SD_GET_OR_RETURN(o, sd, 0);
     339const char* ewk_frame_title_get(const Evas_Object* ewkFrame)
     340{
     341    EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, sd, 0);
    342342    return sd->title;
    343343}
    344344
    345 const char* ewk_frame_name_get(const Evas_Object* o)
    346 {
    347     EWK_FRAME_SD_GET_OR_RETURN(o, sd, 0);
     345const char* ewk_frame_name_get(const Evas_Object* ewkFrame)
     346{
     347    EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, sd, 0);
    348348
    349349    if (!sd->frame) {
     
    362362}
    363363
    364 Eina_Bool ewk_frame_contents_size_get(const Evas_Object* o, Evas_Coord* w, Evas_Coord* h)
    365 {
    366     if (w)
    367         *w = 0;
    368     if (h)
    369         *h = 0;
    370     EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
    371     if (!sd->frame || !sd->frame->view())
    372         return EINA_FALSE;
    373     if (w)
    374         *w = sd->frame->view()->contentsWidth();
    375     if (h)
    376         *h = sd->frame->view()->contentsHeight();
    377     return EINA_TRUE;
    378 }
    379 
    380 static Eina_Bool _ewk_frame_contents_set_internal(Ewk_Frame_Smart_Data* sd, const char* contents, size_t contents_size, const char* mime_type, const char* encoding, const char* base_uri, const char* unreachable_uri)
     364Eina_Bool ewk_frame_contents_size_get(const Evas_Object* ewkFrame, Evas_Coord* width, Evas_Coord* height)
     365{
     366    if (width)
     367        *width = 0;
     368    if (height)
     369        *height = 0;
     370    EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, sd, EINA_FALSE);
     371    if (width)
     372        *width = sd->frame->view()->contentsWidth();
     373    if (height)
     374        *height = sd->frame->view()->contentsHeight();
     375    return EINA_TRUE;
     376}
     377
     378static Eina_Bool _ewk_frame_contents_set_internal(Ewk_Frame_Smart_Data* smartData, const char* contents, size_t contentsSize, const char* mimeType, const char* encoding, const char* baseUri, const char* unreachableUri)
    381379{
    382380    size_t len = strlen(contents);
    383     if (contents_size < 1 || contents_size > len)
    384         contents_size = len;
    385     if (!mime_type)
    386         mime_type = "text/html";
     381    if (contentsSize < 1 || contentsSize > len)
     382        contentsSize = len;
     383    if (!mimeType)
     384        mimeType = "text/html";
    387385    if (!encoding)
    388386        encoding = "UTF-8";
    389     if (!base_uri)
    390         base_uri = "about:blank";
    391 
    392     WebCore::KURL baseKURL(WebCore::KURL(), WTF::String::fromUTF8(base_uri));
     387    if (!baseUri)
     388        baseUri = "about:blank";
     389
     390    WebCore::KURL baseKURL(WebCore::KURL(), WTF::String::fromUTF8(baseUri));
    393391    WebCore::KURL unreachableKURL;
    394     if (unreachable_uri)
    395         unreachableKURL = WebCore::KURL(WebCore::KURL(), WTF::String::fromUTF8(unreachable_uri));
     392    if (unreachableUri)
     393        unreachableKURL = WebCore::KURL(WebCore::KURL(), WTF::String::fromUTF8(unreachableUri));
    396394    else
    397395        unreachableKURL = WebCore::KURL();
    398396
    399     WTF::RefPtr<WebCore::SharedBuffer> buffer = WebCore::SharedBuffer::create(contents, contents_size);
     397    WTF::RefPtr<WebCore::SharedBuffer> buffer = WebCore::SharedBuffer::create(contents, contentsSize);
    400398    WebCore::SubstituteData substituteData
    401399        (buffer.release(),
    402         WTF::String::fromUTF8(mime_type),
     400        WTF::String::fromUTF8(mimeType),
    403401        WTF::String::fromUTF8(encoding),
    404402        baseKURL, unreachableKURL);
    405403    WebCore::ResourceRequest request(baseKURL);
    406404
    407     sd->frame->loader()->load(request, substituteData, false);
    408     return EINA_TRUE;
    409 }
    410 
    411 Eina_Bool ewk_frame_contents_set(Evas_Object* o, const char* contents, size_t contents_size, const char* mime_type, const char* encoding, const char* base_uri)
    412 {
    413     EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     405    smartData->frame->loader()->load(request, substituteData, false);
     406    return EINA_TRUE;
     407}
     408
     409Eina_Bool ewk_frame_contents_set(Evas_Object* ewkFrame, const char* contents, size_t contentsSize, const char* mimeType, const char* encoding, const char* baseUri)
     410{
     411    EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, sd, EINA_FALSE);
    414412    EINA_SAFETY_ON_FALSE_RETURN_VAL(sd->frame, EINA_FALSE);
    415413    EINA_SAFETY_ON_NULL_RETURN_VAL(contents, EINA_FALSE);
    416414    return _ewk_frame_contents_set_internal
    417                (sd, contents, contents_size, mime_type, encoding, base_uri, 0);
    418 }
    419 
    420 Eina_Bool ewk_frame_contents_alternate_set(Evas_Object* o, const char* contents, size_t contents_size, const char* mime_type, const char* encoding, const char* base_uri, const char* unreachable_uri)
    421 {
    422     EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     415               (sd, contents, contentsSize, mimeType, encoding, baseUri, 0);
     416}
     417
     418Eina_Bool ewk_frame_contents_alternate_set(Evas_Object* ewkFrame, const char* contents, size_t contentsSize, const char* mimeType, const char* encoding, const char* baseUri, const char* unreachableUri)
     419{
     420    EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, sd, EINA_FALSE);
    423421    EINA_SAFETY_ON_FALSE_RETURN_VAL(sd->frame, EINA_FALSE);
    424422    EINA_SAFETY_ON_NULL_RETURN_VAL(contents, EINA_FALSE);
    425     EINA_SAFETY_ON_NULL_RETURN_VAL(unreachable_uri, EINA_FALSE);
     423    EINA_SAFETY_ON_NULL_RETURN_VAL(unreachableUri, EINA_FALSE);
    426424    return _ewk_frame_contents_set_internal
    427                (sd, contents, contents_size, mime_type, encoding, base_uri,
    428                unreachable_uri);
    429 }
    430 
    431 Eina_Bool ewk_frame_script_execute(Evas_Object* o, const char* script)
    432 {
    433     EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     425               (sd, contents, contentsSize, mimeType, encoding, baseUri,
     426               unreachableUri);
     427}
     428
     429Eina_Bool ewk_frame_script_execute(Evas_Object* ewkFrame, const char* script)
     430{
     431    EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, sd, EINA_FALSE);
    434432    EINA_SAFETY_ON_FALSE_RETURN_VAL(sd->frame, EINA_FALSE);
    435433    EINA_SAFETY_ON_NULL_RETURN_VAL(script, EINA_FALSE);
     
    438436}
    439437
    440 Eina_Bool ewk_frame_editable_get(const Evas_Object* o)
    441 {
    442     EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     438Eina_Bool ewk_frame_editable_get(const Evas_Object* ewkFrame)
     439{
     440    EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, sd, EINA_FALSE);
    443441    EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE);
    444442    return sd->editable;
    445443}
    446444
    447 Eina_Bool ewk_frame_editable_set(Evas_Object* o, Eina_Bool editable)
    448 {
    449     EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     445Eina_Bool ewk_frame_editable_set(Evas_Object* ewkFrame, Eina_Bool editable)
     446{
     447    EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, sd, EINA_FALSE);
    450448    EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE);
    451449    editable = !!editable;
     
    457455}
    458456
    459 char* ewk_frame_selection_get(const Evas_Object* o)
    460 {
    461     EWK_FRAME_SD_GET_OR_RETURN(o, sd, 0);
     457char* ewk_frame_selection_get(const Evas_Object* ewkFrame)
     458{
     459    EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, sd, 0);
    462460    EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, 0);
    463461    WTF::CString s = sd->frame->editor()->selectedText().utf8();
     
    467465}
    468466
    469 Eina_Bool ewk_frame_text_search(const Evas_Object* o, const char* string, Eina_Bool case_sensitive, Eina_Bool forward, Eina_Bool wrap)
    470 {
    471     EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
    472     EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE);
    473     EINA_SAFETY_ON_NULL_RETURN_VAL(string, EINA_FALSE);
    474 
    475     return sd->frame->editor()->findString(WTF::String::fromUTF8(string), forward, case_sensitive, wrap, true);
    476 }
    477 
    478 unsigned int ewk_frame_text_matches_mark(Evas_Object* o, const char* string, Eina_Bool case_sensitive, Eina_Bool highlight, unsigned int limit)
    479 {
    480     EWK_FRAME_SD_GET_OR_RETURN(o, sd, 0);
     467Eina_Bool ewk_frame_text_search(const Evas_Object* ewkFrame, const char* text, Eina_Bool caseSensitive, Eina_Bool forward, Eina_Bool wrap)
     468{
     469    EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, sd, EINA_FALSE);
     470    EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE);
     471    EINA_SAFETY_ON_NULL_RETURN_VAL(text, EINA_FALSE);
     472
     473    return sd->frame->editor()->findString(WTF::String::fromUTF8(text), forward, caseSensitive, wrap, true);
     474}
     475
     476unsigned int ewk_frame_text_matches_mark(Evas_Object* ewkFrame, const char* string, Eina_Bool caseSensitive, Eina_Bool highlight, unsigned int limit)
     477{
     478    EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, sd, 0);
    481479    EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE);
    482480    EINA_SAFETY_ON_NULL_RETURN_VAL(string, 0);
    483481
    484482    sd->frame->editor()->setMarkedTextMatchesAreHighlighted(highlight);
    485     return sd->frame->editor()->countMatchesForText(WTF::String::fromUTF8(string), case_sensitive, limit, true);
    486 }
    487 
    488 Eina_Bool ewk_frame_text_matches_unmark_all(Evas_Object* o)
    489 {
    490     EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     483    return sd->frame->editor()->countMatchesForText(WTF::String::fromUTF8(string), caseSensitive, limit, true);
     484}
     485
     486Eina_Bool ewk_frame_text_matches_unmark_all(Evas_Object* ewkFrame)
     487{
     488    EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, sd, EINA_FALSE);
    491489    EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE);
    492490
     
    495493}
    496494
    497 Eina_Bool ewk_frame_text_matches_highlight_set(Evas_Object* o, Eina_Bool highlight)
    498 {
    499     EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     495Eina_Bool ewk_frame_text_matches_highlight_set(Evas_Object* ewkFrame, Eina_Bool highlight)
     496{
     497    EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, sd, EINA_FALSE);
    500498    EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE);
    501499    sd->frame->editor()->setMarkedTextMatchesAreHighlighted(highlight);
     
    503501}
    504502
    505 Eina_Bool ewk_frame_text_matches_highlight_get(const Evas_Object* o)
    506 {
    507     EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     503Eina_Bool ewk_frame_text_matches_highlight_get(const Evas_Object* ewkFrame)
     504{
     505    EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, sd, EINA_FALSE);
    508506    EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE);
    509507    return sd->frame->editor()->markedTextMatchesAreHighlighted();
     
    513511 * Comparison function used by ewk_frame_text_matches_nth_pos_get
    514512 */
    515 static bool _ewk_frame_rect_cmp_less_than(const WebCore::IntRect& i, const WebCore::IntRect& j)
    516 {
    517     return (i.y() < j.y() || (i.y() == j.y() && i.x() < j.x()));
     513static bool _ewk_frame_rect_cmp_less_than(const WebCore::IntRect& begin, const WebCore::IntRect& end)
     514{
     515    return (begin.y() < end.y() || (begin.y() == end.y() && begin.x() < end.x()));
    518516}
    519517
     
    521519 * Predicate used by ewk_frame_text_matches_nth_pos_get
    522520 */
    523 static bool _ewk_frame_rect_is_negative_value(const WebCore::IntRect& i)
    524 {
    525     return (i.x() < 0 || i.y() < 0);
    526 }
    527 
    528 Eina_Bool ewk_frame_text_matches_nth_pos_get(const Evas_Object* o, size_t n, int* x, int* y)
    529 {
    530     EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     521static bool _ewk_frame_rect_is_negative_value(const WebCore::IntRect& rect)
     522{
     523    return (rect.x() < 0 || rect.y() < 0);
     524}
     525
     526Eina_Bool ewk_frame_text_matches_nth_pos_get(const Evas_Object* ewkFrame, size_t number, int* x, int* y)
     527{
     528    EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, sd, EINA_FALSE);
    531529    EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE);
    532530
     
    536534    std::remove_if(intRects.begin(), intRects.end(), _ewk_frame_rect_is_negative_value);
    537535
    538     if (intRects.isEmpty() || n > intRects.size())
     536    if (intRects.isEmpty() || number > intRects.size())
    539537        return EINA_FALSE;
    540538
     
    542540
    543541    if (x)
    544         *x = intRects[n - 1].x();
     542        *x = intRects[number - 1].x();
    545543    if (y)
    546         *y = intRects[n - 1].y();
    547     return EINA_TRUE;
    548 }
    549 
    550 Eina_Bool ewk_frame_stop(Evas_Object* o)
    551 {
    552     EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     544        *y = intRects[number - 1].y();
     545    return EINA_TRUE;
     546}
     547
     548Eina_Bool ewk_frame_stop(Evas_Object* ewkFrame)
     549{
     550    EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, sd, EINA_FALSE);
    553551    EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE);
    554552    sd->frame->loader()->stopAllLoaders();
     
    556554}
    557555
    558 Eina_Bool ewk_frame_reload(Evas_Object* o)
    559 {
    560     EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     556Eina_Bool ewk_frame_reload(Evas_Object* ewkFrame)
     557{
     558    EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, sd, EINA_FALSE);
    561559    EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE);
    562560    sd->frame->loader()->reload();
     
    564562}
    565563
    566 Eina_Bool ewk_frame_reload_full(Evas_Object* o)
    567 {
    568     EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     564Eina_Bool ewk_frame_reload_full(Evas_Object* ewkFrame)
     565{
     566    EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, sd, EINA_FALSE);
    569567    EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE);
    570568    sd->frame->loader()->reload(true);
     
    572570}
    573571
    574 Eina_Bool ewk_frame_back(Evas_Object* o)
    575 {
    576     return ewk_frame_navigate(o, -1);
    577 }
    578 
    579 Eina_Bool ewk_frame_forward(Evas_Object* o)
    580 {
    581     return ewk_frame_navigate(o, 1);
    582 }
    583 
    584 Eina_Bool ewk_frame_navigate(Evas_Object* o, int steps)
    585 {
    586     EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     572Eina_Bool ewk_frame_back(Evas_Object* ewkFrame)
     573{
     574    return ewk_frame_navigate(ewkFrame, -1);
     575}
     576
     577Eina_Bool ewk_frame_forward(Evas_Object* ewkFrame)
     578{
     579    return ewk_frame_navigate(ewkFrame, 1);
     580}
     581
     582Eina_Bool ewk_frame_navigate(Evas_Object* ewkFrame, int steps)
     583{
     584    EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, sd, EINA_FALSE);
    587585    EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE);
    588586    WebCore::Page* page = sd->frame->page();
     
    593591}
    594592
    595 Eina_Bool ewk_frame_back_possible(Evas_Object* o)
    596 {
    597     return ewk_frame_navigate_possible(o, -1);
    598 }
    599 
    600 Eina_Bool ewk_frame_forward_possible(Evas_Object* o)
    601 {
    602     return ewk_frame_navigate_possible(o, 1);
    603 }
    604 
    605 Eina_Bool ewk_frame_navigate_possible(Evas_Object* o, int steps)
    606 {
    607     EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     593Eina_Bool ewk_frame_back_possible(Evas_Object* ewkFrame)
     594{
     595    return ewk_frame_navigate_possible(ewkFrame, -1);
     596}
     597
     598Eina_Bool ewk_frame_forward_possible(Evas_Object* ewkFrame)
     599{
     600    return ewk_frame_navigate_possible(ewkFrame, 1);
     601}
     602
     603Eina_Bool ewk_frame_navigate_possible(Evas_Object* ewkFrame, int steps)
     604{
     605    EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, sd, EINA_FALSE);
    608606    EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE);
    609607    WebCore::Page* page = sd->frame->page();
     
    641639}
    642640
    643 void ewk_frame_hit_test_free(Ewk_Hit_Test* hit_test)
    644 {
    645     EINA_SAFETY_ON_NULL_RETURN(hit_test);
    646     eina_stringshare_del(hit_test->title);
    647     eina_stringshare_del(hit_test->alternate_text);
    648     eina_stringshare_del(hit_test->link.text);
    649     eina_stringshare_del(hit_test->link.url);
    650     eina_stringshare_del(hit_test->link.title);
    651     eina_stringshare_del(hit_test->image_uri);
    652     eina_stringshare_del(hit_test->media_uri);
    653     free(hit_test);
    654 }
    655 
    656 Ewk_Hit_Test* ewk_frame_hit_test_new(const Evas_Object* o, int x, int y)
    657 {
    658     EWK_FRAME_SD_GET_OR_RETURN(o, sd, 0);
     641void ewk_frame_hit_test_free(Ewk_Hit_Test* hitTest)
     642{
     643    EINA_SAFETY_ON_NULL_RETURN(hitTest);
     644    eina_stringshare_del(hitTest->title);
     645    eina_stringshare_del(hitTest->alternate_text);
     646    eina_stringshare_del(hitTest->link.text);
     647    eina_stringshare_del(hitTest->link.url);
     648    eina_stringshare_del(hitTest->link.title);
     649    eina_stringshare_del(hitTest->image_uri);
     650    eina_stringshare_del(hitTest->media_uri);
     651    free(hitTest);
     652}
     653
     654Ewk_Hit_Test* ewk_frame_hit_test_new(const Evas_Object* ewkFrame, int x, int y)
     655{
     656    EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, sd, 0);
    659657    EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, 0);
    660658
     
    727725
    728726Eina_Bool
    729 ewk_frame_scroll_add(Evas_Object* o, int dx, int dy)
    730 {
    731     EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     727ewk_frame_scroll_add(Evas_Object* ewkFrame, int deltaX, int deltaY)
     728{
     729    EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, sd, EINA_FALSE);
    732730    EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE);
    733731    EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame->view(), EINA_FALSE);
    734     sd->frame->view()->scrollBy(WebCore::IntSize(dx, dy));
     732    sd->frame->view()->scrollBy(WebCore::IntSize(deltaX, deltaY));
    735733    return EINA_TRUE;
    736734}
    737735
    738736Eina_Bool
    739 ewk_frame_scroll_set(Evas_Object* o, int x, int y)
    740 {
    741     EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     737ewk_frame_scroll_set(Evas_Object* ewkFrame, int x, int y)
     738{
     739    EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, sd, EINA_FALSE);
    742740    EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE);
    743741    EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame->view(), EINA_FALSE);
     
    747745
    748746Eina_Bool
    749 ewk_frame_scroll_size_get(const Evas_Object* o, int* w, int* h)
    750 {
    751     if (w)
    752         *w = 0;
    753     if (h)
    754         *h = 0;
    755     EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     747ewk_frame_scroll_size_get(const Evas_Object* ewkFrame, int* width, int* height)
     748{
     749    if (width)
     750        *width = 0;
     751    if (height)
     752        *height = 0;
     753    EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, sd, EINA_FALSE);
    756754    EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE);
    757755    EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame->view(), EINA_FALSE);
    758756    WebCore::IntPoint point = sd->frame->view()->maximumScrollPosition();
    759     if (w)
    760         *w = point.x();
    761     if (h)
    762         *h = point.y();
     757    if (width)
     758        *width = point.x();
     759    if (height)
     760        *height = point.y();
    763761    return EINA_TRUE;
    764762}
    765763
    766764Eina_Bool
    767 ewk_frame_scroll_pos_get(const Evas_Object* o, int* x, int* y)
     765ewk_frame_scroll_pos_get(const Evas_Object* ewkFrame, int* x, int* y)
    768766{
    769767    if (x)
     
    771769    if (y)
    772770        *y = 0;
    773     EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     771    EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, sd, EINA_FALSE);
    774772    EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE);
    775773    EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame->view(), EINA_FALSE);
     
    782780}
    783781
    784 Eina_Bool ewk_frame_visible_content_geometry_get(const Evas_Object* o, Eina_Bool include_scrollbars, int* x, int* y, int* w, int* h)
     782Eina_Bool ewk_frame_visible_content_geometry_get(const Evas_Object* ewkFrame, Eina_Bool includeScrollbars, int* x, int* y, int* width, int* height)
    785783{
    786784    if (x)
     
    788786    if (y)
    789787        *y = 0;
    790     if (w)
    791         *w = 0;
    792     if (h)
    793         *h = 0;
    794     EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     788    if (width)
     789        *width = 0;
     790    if (height)
     791        *height = 0;
     792    EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, sd, EINA_FALSE);
    795793    EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE);
    796794    EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame->view(), EINA_FALSE);
    797     WebCore::IntRect rect = sd->frame->view()->visibleContentRect(include_scrollbars);
     795    WebCore::IntRect rect = sd->frame->view()->visibleContentRect(includeScrollbars);
    798796    if (x)
    799797        *x = rect.x();
    800798    if (y)
    801799        *y = rect.y();
    802     if (w)
    803         *w = rect.width();
    804     if (h)
    805         *h = rect.height();
    806     return EINA_TRUE;
    807 }
    808 
    809 Eina_Bool ewk_frame_paint_full_get(const Evas_Object* o)
    810 {
    811     EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     800    if (width)
     801        *width = rect.width();
     802    if (height)
     803        *height = rect.height();
     804    return EINA_TRUE;
     805}
     806
     807Eina_Bool ewk_frame_paint_full_get(const Evas_Object* ewkFrame)
     808{
     809    EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, sd, EINA_FALSE);
    812810    EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE);
    813811    EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame->view(), EINA_FALSE);
     
    815813}
    816814
    817 void ewk_frame_paint_full_set(Evas_Object* o, Eina_Bool flag)
    818 {
    819     EWK_FRAME_SD_GET_OR_RETURN(o, sd);
     815void ewk_frame_paint_full_set(Evas_Object* ewkFrame, Eina_Bool flag)
     816{
     817    EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, sd);
    820818    EINA_SAFETY_ON_NULL_RETURN(sd->frame);
    821819    EINA_SAFETY_ON_NULL_RETURN(sd->frame->view());
     
    823821}
    824822
    825 Eina_Bool ewk_frame_feed_focus_in(Evas_Object* o)
    826 {
    827     EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     823Eina_Bool ewk_frame_feed_focus_in(Evas_Object* ewkFrame)
     824{
     825    EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, sd, EINA_FALSE);
    828826    EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE);
    829827    WebCore::FocusController* c = sd->frame->page()->focusController();
     
    832830}
    833831
    834 Eina_Bool ewk_frame_feed_focus_out(Evas_Object* o)
     832Eina_Bool ewk_frame_feed_focus_out(Evas_Object* ewkFrame)
    835833{
    836834    // TODO: what to do on focus out?
     
    839837}
    840838
    841 Eina_Bool ewk_frame_feed_mouse_wheel(Evas_Object* o, const Evas_Event_Mouse_Wheel* ev)
    842 {
    843     EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
    844     EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE);
    845     EINA_SAFETY_ON_NULL_RETURN_VAL(ev, EINA_FALSE);
     839Eina_Bool ewk_frame_feed_mouse_wheel(Evas_Object* ewkFrame, const Evas_Event_Mouse_Wheel* wheelEvent)
     840{
     841    EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, sd, EINA_FALSE);
     842    EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE);
     843    EINA_SAFETY_ON_NULL_RETURN_VAL(wheelEvent, EINA_FALSE);
    846844
    847845    WebCore::FrameView* view = sd->frame->view();
    848     DBG("o=%p, view=%p, direction=%d, z=%d, pos=%d,%d",
    849         o, view, ev->direction, ev->z, ev->canvas.x, ev->canvas.y);
     846    DBG("ewkFrame=%p, view=%p, direction=%d, z=%d, pos=%d,%d",
     847        ewkFrame, view, wheelEvent->direction, wheelEvent->z, wheelEvent->canvas.x, wheelEvent->canvas.y);
    850848    EINA_SAFETY_ON_NULL_RETURN_VAL(view, EINA_FALSE);
    851849
    852     WebCore::PlatformWheelEvent event(ev);
     850    WebCore::PlatformWheelEvent event(wheelEvent);
    853851    return sd->frame->eventHandler()->handleWheelEvent(event);
    854852}
    855853
    856 Eina_Bool ewk_frame_feed_mouse_down(Evas_Object* o, const Evas_Event_Mouse_Down* ev)
    857 {
    858     EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
    859     EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE);
    860     EINA_SAFETY_ON_NULL_RETURN_VAL(ev, EINA_FALSE);
     854Eina_Bool ewk_frame_feed_mouse_down(Evas_Object* ewkFrame, const Evas_Event_Mouse_Down* downEvent)
     855{
     856    EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, sd, EINA_FALSE);
     857    EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE);
     858    EINA_SAFETY_ON_NULL_RETURN_VAL(downEvent, EINA_FALSE);
    861859
    862860    WebCore::FrameView* view = sd->frame->view();
    863     DBG("o=%p, view=%p, button=%d, pos=%d,%d",
    864         o, view, ev->button, ev->canvas.x, ev->canvas.y);
     861    DBG("ewkFrame=%p, view=%p, button=%d, pos=%d,%d",
     862        ewkFrame, view, downEvent->button, downEvent->canvas.x, downEvent->canvas.y);
    865863    EINA_SAFETY_ON_NULL_RETURN_VAL(view, EINA_FALSE);
    866864
     
    868866    evas_object_geometry_get(sd->view, &x, &y, 0, 0);
    869867
    870     WebCore::PlatformMouseEvent event(ev, WebCore::IntPoint(x, y));
     868    WebCore::PlatformMouseEvent event(downEvent, WebCore::IntPoint(x, y));
    871869    return sd->frame->eventHandler()->handleMousePressEvent(event);
    872870}
    873871
    874 Eina_Bool ewk_frame_feed_mouse_up(Evas_Object* o, const Evas_Event_Mouse_Up* ev)
    875 {
    876     EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
    877     EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE);
    878     EINA_SAFETY_ON_NULL_RETURN_VAL(ev, EINA_FALSE);
     872Eina_Bool ewk_frame_feed_mouse_up(Evas_Object* ewkFrame, const Evas_Event_Mouse_Up* upEvent)
     873{
     874    EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, sd, EINA_FALSE);
     875    EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE);
     876    EINA_SAFETY_ON_NULL_RETURN_VAL(upEvent, EINA_FALSE);
    879877
    880878    WebCore::FrameView* view = sd->frame->view();
    881     DBG("o=%p, view=%p, button=%d, pos=%d,%d",
    882         o, view, ev->button, ev->canvas.x, ev->canvas.y);
     879    DBG("ewkFrame=%p, view=%p, button=%d, pos=%d,%d",
     880        ewkFrame, view, upEvent->button, upEvent->canvas.x, upEvent->canvas.y);
    883881    EINA_SAFETY_ON_NULL_RETURN_VAL(view, EINA_FALSE);
    884882
     
    886884    evas_object_geometry_get(sd->view, &x, &y, 0, 0);
    887885
    888     WebCore::PlatformMouseEvent event(ev, WebCore::IntPoint(x, y));
     886    WebCore::PlatformMouseEvent event(upEvent, WebCore::IntPoint(x, y));
    889887    return sd->frame->eventHandler()->handleMouseReleaseEvent(event);
    890888}
    891889
    892 Eina_Bool ewk_frame_feed_mouse_move(Evas_Object* o, const Evas_Event_Mouse_Move* ev)
    893 {
    894     EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
    895     EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE);
    896     EINA_SAFETY_ON_NULL_RETURN_VAL(ev, EINA_FALSE);
     890Eina_Bool ewk_frame_feed_mouse_move(Evas_Object* ewkFrame, const Evas_Event_Mouse_Move* moveEvent)
     891{
     892    EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, sd, EINA_FALSE);
     893    EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE);
     894    EINA_SAFETY_ON_NULL_RETURN_VAL(moveEvent, EINA_FALSE);
    897895
    898896    WebCore::FrameView* view = sd->frame->view();
    899     DBG("o=%p, view=%p, pos: old=%d,%d, new=%d,%d, buttons=%d",
    900         o, view, ev->cur.canvas.x, ev->cur.canvas.y,
    901         ev->prev.canvas.x, ev->prev.canvas.y, ev->buttons);
     897    DBG("ewkFrame=%p, view=%p, pos: old=%d,%d, new=%d,%d, buttons=%d",
     898        ewkFrame, view, moveEvent->cur.canvas.x, moveEvent->cur.canvas.y,
     899        moveEvent->prev.canvas.x, moveEvent->prev.canvas.y, moveEvent->buttons);
    902900    EINA_SAFETY_ON_NULL_RETURN_VAL(view, EINA_FALSE);
    903901
     
    905903    evas_object_geometry_get(sd->view, &x, &y, 0, 0);
    906904
    907     WebCore::PlatformMouseEvent event(ev, WebCore::IntPoint(x, y));
     905    WebCore::PlatformMouseEvent event(moveEvent, WebCore::IntPoint(x, y));
    908906    return sd->frame->eventHandler()->mouseMoved(event);
    909907}
    910908
    911 Eina_Bool ewk_frame_feed_touch_event(Evas_Object* o, Ewk_Touch_Event_Type action, Eina_List* points, int metaState)
     909Eina_Bool ewk_frame_feed_touch_event(Evas_Object* ewkFrame, Ewk_Touch_Event_Type action, Eina_List* points, int metaState)
    912910{
    913911    Eina_Bool ret = EINA_FALSE;
     
    915913#if ENABLE(TOUCH_EVENTS)
    916914    EINA_SAFETY_ON_NULL_RETURN_VAL(points, EINA_FALSE);
    917     EWK_FRAME_SD_GET(o, sd);
     915    EWK_FRAME_SD_GET(ewkFrame, sd);
    918916
    919917    if (!sd || !sd->frame || !ewk_view_need_touch_events_get(sd->view))
     
    947945}
    948946
    949 static inline Eina_Bool _ewk_frame_handle_key_scrolling(WebCore::Frame* frame, const WebCore::PlatformKeyboardEvent& event)
     947static inline Eina_Bool _ewk_frame_handle_key_scrolling(WebCore::Frame* frame, const WebCore::PlatformKeyboardEvent& keyEvent)
    950948{
    951949    WebCore::ScrollDirection direction;
    952950    WebCore::ScrollGranularity granularity;
    953951
    954     int keyCode = event.windowsVirtualKeyCode();
     952    int keyCode = keyEvent.windowsVirtualKeyCode();
    955953
    956954    switch (keyCode) {
    957955    case VK_SPACE:
    958956        granularity = WebCore::ScrollByPage;
    959         if (event.shiftKey())
     957        if (keyEvent.shiftKey())
    960958            direction = WebCore::ScrollUp;
    961959        else
     
    988986    case VK_UP:
    989987        direction = WebCore::ScrollUp;
    990         if (event.ctrlKey())
     988        if (keyEvent.ctrlKey())
    991989            granularity = WebCore::ScrollByDocument;
    992990        else
     
    995993    case VK_DOWN:
    996994        direction = WebCore::ScrollDown;
    997         if (event.ctrlKey())
     995        if (keyEvent.ctrlKey())
    998996            granularity = WebCore::ScrollByDocument;
    999997        else
     
    10111009}
    10121010
    1013 Eina_Bool ewk_frame_feed_key_down(Evas_Object* o, const Evas_Event_Key_Down* ev)
    1014 {
    1015     EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
    1016     EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE);
    1017     EINA_SAFETY_ON_NULL_RETURN_VAL(ev, EINA_FALSE);
    1018 
    1019     DBG("o=%p keyname=%s (key=%s, string=%s)",
    1020         o, ev->keyname, ev->key ? ev->key : "", ev->string ? ev->string : "");
    1021 
    1022     WebCore::PlatformKeyboardEvent event(ev);
     1011Eina_Bool ewk_frame_feed_key_down(Evas_Object* ewkFrame, const Evas_Event_Key_Down* downEvent)
     1012{
     1013    EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, sd, EINA_FALSE);
     1014    EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE);
     1015    EINA_SAFETY_ON_NULL_RETURN_VAL(downEvent, EINA_FALSE);
     1016
     1017    DBG("ewkFrame=%p keyname=%s (key=%s, string=%s)",
     1018        ewkFrame, downEvent->keyname, downEvent->key ? downEvent->key : "", downEvent->string ? downEvent->string : "");
     1019
     1020    WebCore::PlatformKeyboardEvent event(downEvent);
    10231021    if (sd->frame->eventHandler()->keyEvent(event))
    10241022        return EINA_TRUE;
     
    10271025}
    10281026
    1029 Eina_Bool ewk_frame_feed_key_up(Evas_Object* o, const Evas_Event_Key_Up* ev)
    1030 {
    1031     EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
    1032     EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE);
    1033     EINA_SAFETY_ON_NULL_RETURN_VAL(ev, EINA_FALSE);
    1034 
    1035     DBG("o=%p keyname=%s (key=%s, string=%s)",
    1036         o, ev->keyname, ev->key ? ev->key : "", ev->string ? ev->string : "");
    1037 
    1038     WebCore::PlatformKeyboardEvent event(ev);
     1027Eina_Bool ewk_frame_feed_key_up(Evas_Object* ewkFrame, const Evas_Event_Key_Up* upEvent)
     1028{
     1029    EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, sd, EINA_FALSE);
     1030    EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE);
     1031    EINA_SAFETY_ON_NULL_RETURN_VAL(upEvent, EINA_FALSE);
     1032
     1033    DBG("ewkFrame=%p keyname=%s (key=%s, string=%s)",
     1034        ewkFrame, upEvent->keyname, upEvent->key ? upEvent->key : "", upEvent->string ? upEvent->string : "");
     1035
     1036    WebCore::PlatformKeyboardEvent event(upEvent);
    10391037    return sd->frame->eventHandler()->keyEvent(event);
    10401038}
    10411039
    1042 Ewk_Text_Selection_Type ewk_frame_text_selection_type_get(const Evas_Object* o)
    1043 {
    1044     EWK_FRAME_SD_GET_OR_RETURN(o, sd, EWK_TEXT_SELECTION_NONE);
     1040Ewk_Text_Selection_Type ewk_frame_text_selection_type_get(const Evas_Object* ewkFrame)
     1041{
     1042    EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, sd, EWK_TEXT_SELECTION_NONE);
    10451043    EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EWK_TEXT_SELECTION_NONE);
    10461044
     
    10701068 * frame.
    10711069 *
    1072  * @param e canvas where to create the frame object
     1070 * @param canvas canvas where to create the frame object
    10731071 *
    10741072 * @return a new frame object or @c 0 on failure
    10751073 */
    1076 Evas_Object* ewk_frame_add(Evas* e)
    1077 {
    1078     return evas_object_smart_add(e, _ewk_frame_smart_class_new());
     1074Evas_Object* ewk_frame_add(Evas* canvas)
     1075{
     1076    return evas_object_smart_add(canvas, _ewk_frame_smart_class_new());
    10791077}
    10801078
     
    10861084 * This is internal and should never be called by external users.
    10871085 */
    1088 Eina_Bool ewk_frame_init(Evas_Object* o, Evas_Object* view, WebCore::Frame* frame)
    1089 {
    1090     EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     1086Eina_Bool ewk_frame_init(Evas_Object* ewkFrame, Evas_Object* view, WebCore::Frame* frame)
     1087{
     1088    EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, sd, EINA_FALSE);
    10911089    if (!sd->frame) {
    10921090        WebCore::FrameLoaderClientEfl* flc = _ewk_frame_loader_efl_get(frame);
    1093         flc->setWebFrame(o);
     1091        flc->setWebFrame(ewkFrame);
    10941092        sd->frame = frame;
    10951093        sd->view = view;
     
    10991097
    11001098    ERR("frame %p already set for %p, ignored new %p",
    1101         sd->frame, o, frame);
     1099        sd->frame, ewkFrame, frame);
    11021100    return EINA_FALSE;
    11031101}
     
    11081106 * Adds child to the frame.
    11091107 */
    1110 Eina_Bool ewk_frame_child_add(Evas_Object* o, WTF::PassRefPtr<WebCore::Frame> child, const WTF::String& name, const WebCore::KURL& url, const WTF::String& referrer)
    1111 {
    1112     EWK_FRAME_SD_GET_OR_RETURN(o, sd, 0);
     1108Eina_Bool ewk_frame_child_add(Evas_Object* ewkFrame, WTF::PassRefPtr<WebCore::Frame> child, const WTF::String& name, const WebCore::KURL& url, const WTF::String& referrer)
     1109{
     1110    EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, sd, 0);
    11131111    char buf[256];
    11141112    Evas_Object* frame;
     
    11341132    snprintf(buf, sizeof(buf), "EWK_Frame:child/%s", name.utf8().data());
    11351133    evas_object_name_set(frame, buf);
    1136     evas_object_smart_member_add(frame, o);
     1134    evas_object_smart_member_add(frame, ewkFrame);
    11371135    evas_object_show(frame);
    11381136
     
    11631161 * @param newParent The new view that will be set as the parent of the frame.
    11641162 */
    1165 void ewk_frame_view_set(Evas_Object* o, Evas_Object* newParent)
    1166 {
    1167     EWK_FRAME_SD_GET_OR_RETURN(o, sd);
    1168 
    1169     evas_object_smart_member_del(o);
    1170     evas_object_smart_member_add(o, newParent);
     1163void ewk_frame_view_set(Evas_Object* ewkFrame, Evas_Object* newParent)
     1164{
     1165    EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, sd);
     1166
     1167    evas_object_smart_member_del(ewkFrame);
     1168    evas_object_smart_member_add(ewkFrame, newParent);
    11711169
    11721170    sd->view = newParent;
     
    11771175 * Frame was destroyed by loader, remove internal reference.
    11781176 */
    1179 void ewk_frame_core_gone(Evas_Object* o)
    1180 {
    1181     DBG("o=%p", o);
    1182     EWK_FRAME_SD_GET_OR_RETURN(o, sd);
     1177void ewk_frame_core_gone(Evas_Object* ewkFrame)
     1178{
     1179    DBG("ewkFrame=%p", ewkFrame);
     1180    EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, sd);
    11831181    sd->frame = 0;
    11841182}
     
    11911189 * actions instead.
    11921190 */
    1193 WebCore::Frame* ewk_frame_core_get(const Evas_Object* o)
    1194 {
    1195     EWK_FRAME_SD_GET_OR_RETURN(o, sd, 0);
     1191WebCore::Frame* ewk_frame_core_get(const Evas_Object* ewkFrame)
     1192{
     1193    EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, sd, 0);
    11961194    return sd->frame;
    11971195}
     
    12101208 * Emits signal: "resource,request,willsend"
    12111209 */
    1212 void ewk_frame_request_will_send(Evas_Object* o, Ewk_Frame_Resource_Request* request)
    1213 {
    1214     evas_object_smart_callback_call(o, "resource,request,willsend", request);
     1210void ewk_frame_request_will_send(Evas_Object* ewkFrame, Ewk_Frame_Resource_Request* request)
     1211{
     1212    evas_object_smart_callback_call(ewkFrame, "resource,request,willsend", request);
    12151213}
    12161214
     
    12241222 * Emits signal: "resource,request,new"
    12251223 */
    1226 void ewk_frame_request_assign_identifier(Evas_Object* o, const Ewk_Frame_Resource_Request* request)
    1227 {
    1228     evas_object_smart_callback_call(o, "resource,request,new", (void*)request);
     1224void ewk_frame_request_assign_identifier(Evas_Object* ewkFrame, const Ewk_Frame_Resource_Request* request)
     1225{
     1226    evas_object_smart_callback_call(ewkFrame, "resource,request,new", (void*)request);
    12291227}
    12301228
     
    12371235 * Emits signal: "navigation,first"
    12381236 */
    1239 void ewk_frame_did_perform_first_navigation(Evas_Object* o)
    1240 {
    1241     evas_object_smart_callback_call(o, "navigation,first", 0);
     1237void ewk_frame_did_perform_first_navigation(Evas_Object* ewkFrame)
     1238{
     1239    evas_object_smart_callback_call(ewkFrame, "navigation,first", 0);
    12421240}
    12431241
     
    12511249 * Emits signal: "state,save"
    12521250 */
    1253 void ewk_frame_view_state_save(Evas_Object* o, WebCore::HistoryItem* item)
    1254 {
    1255     evas_object_smart_callback_call(o, "state,save", 0);
     1251void ewk_frame_view_state_save(Evas_Object* ewkFrame, WebCore::HistoryItem* item)
     1252{
     1253    evas_object_smart_callback_call(ewkFrame, "state,save", 0);
    12561254}
    12571255
     
    12621260 * Emits signal: "load,started" with no parameters.
    12631261 */
    1264 void ewk_frame_load_started(Evas_Object* o)
     1262void ewk_frame_load_started(Evas_Object* ewkFrame)
    12651263{
    12661264    Evas_Object* main_frame;
    1267     DBG("o=%p", o);
    1268     evas_object_smart_callback_call(o, "load,started", 0);
    1269     EWK_FRAME_SD_GET_OR_RETURN(o, sd);
     1265    DBG("ewkFrame=%p", ewkFrame);
     1266    evas_object_smart_callback_call(ewkFrame, "load,started", 0);
     1267    EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, sd);
    12701268    ewk_view_load_started(sd->view);
    12711269
    12721270    main_frame = ewk_view_frame_main_get(sd->view);
    1273     if (main_frame == o)
     1271    if (main_frame == ewkFrame)
    12741272        ewk_view_frame_main_load_started(sd->view);
    12751273}
     
    12831281 * Emits signal: "load,provisional" with no parameters.
    12841282 */
    1285 void ewk_frame_load_provisional(Evas_Object* o)
    1286 {
    1287     evas_object_smart_callback_call(o, "load,provisional", 0);
     1283void ewk_frame_load_provisional(Evas_Object* ewkFrame)
     1284{
     1285    evas_object_smart_callback_call(ewkFrame, "load,provisional", 0);
    12881286}
    12891287
     
    12961294 * Emits signal: "load,firstlayout,finished" with no parameters.
    12971295 */
    1298 void ewk_frame_load_firstlayout_finished(Evas_Object* o)
    1299 {
    1300     evas_object_smart_callback_call(o, "load,firstlayout,finished", 0);
     1296void ewk_frame_load_firstlayout_finished(Evas_Object* ewkFrame)
     1297{
     1298    evas_object_smart_callback_call(ewkFrame, "load,firstlayout,finished", 0);
    13011299}
    13021300
     
    13091307 * Emits signal: "load,nonemptylayout,finished" with no parameters.
    13101308 */
    1311 void ewk_frame_load_firstlayout_nonempty_finished(Evas_Object* o)
    1312 {
    1313     evas_object_smart_callback_call(o, "load,nonemptylayout,finished", 0);
     1309void ewk_frame_load_firstlayout_nonempty_finished(Evas_Object* ewkFrame)
     1310{
     1311    evas_object_smart_callback_call(ewkFrame, "load,nonemptylayout,finished", 0);
    13141312}
    13151313
     
    13221320 * Emits signal: "load,document,finished" with no parameters.
    13231321 */
    1324 void ewk_frame_load_document_finished(Evas_Object* o)
    1325 {
    1326     evas_object_smart_callback_call(o, "load,document,finished", 0);
    1327     EWK_FRAME_SD_GET_OR_RETURN(o, sd);
    1328     ewk_view_load_document_finished(sd->view, o);
     1322void ewk_frame_load_document_finished(Evas_Object* ewkFrame)
     1323{
     1324    evas_object_smart_callback_call(ewkFrame, "load,document,finished", 0);
     1325    EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, sd);
     1326    ewk_view_load_document_finished(sd->view, ewkFrame);
    13291327}
    13301328
     
    13391337 *       compatible with previous WebKit.
    13401338 */
    1341 void ewk_frame_load_finished(Evas_Object* o, const char* error_domain, int error_code, Eina_Bool is_cancellation, const char* error_description, const char* failing_url)
    1342 {
    1343     Ewk_Frame_Load_Error buf, * error;
    1344     if (!error_domain) {
    1345         DBG("o=%p, success.", o);
     1339void ewk_frame_load_finished(Evas_Object* ewkFrame, const char* errorDomain, int errorCode, Eina_Bool isCancellation, const char* errorDescription, const char* failingUrl)
     1340{
     1341    Ewk_Frame_Load_Error buf, *error;
     1342    if (!errorDomain) {
     1343        DBG("ewkFrame=%p, success.", ewkFrame);
    13461344        error = 0;
    13471345    } else {
    1348         DBG("o=%p, error=%s (%d, cancellation=%hhu) \"%s\", url=%s",
    1349             o, error_domain, error_code, is_cancellation,
    1350             error_description, failing_url);
    1351 
    1352         buf.domain = error_domain;
    1353         buf.code = error_code;
    1354         buf.is_cancellation = is_cancellation;
    1355         buf.description = error_description;
    1356         buf.failing_url = failing_url;
    1357         buf.frame = o;
     1346        DBG("ewkFrame=%p, error=%s (%d, cancellation=%hhu) \"%s\", url=%s",
     1347            ewkFrame, errorDomain, errorCode, isCancellation,
     1348            errorDescription, failingUrl);
     1349
     1350        buf.domain = errorDomain;
     1351        buf.code = errorCode;
     1352        buf.is_cancellation = isCancellation;
     1353        buf.description = errorDescription;
     1354        buf.failing_url = failingUrl;
     1355        buf.frame = ewkFrame;
    13581356        error = &buf;
    13591357    }
    1360     evas_object_smart_callback_call(o, "load,finished", error);
    1361     EWK_FRAME_SD_GET_OR_RETURN(o, sd);
     1358    evas_object_smart_callback_call(ewkFrame, "load,finished", error);
     1359    EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, sd);
    13621360    ewk_view_load_finished(sd->view, error);
    13631361}
     
    13691367 * Emits signal: "load,error" with pointer to Ewk_Frame_Load_Error.
    13701368 */
    1371 void ewk_frame_load_error(Evas_Object* o, const char* error_domain, int error_code, Eina_Bool is_cancellation, const char* error_description, const char* failing_url)
     1369void ewk_frame_load_error(Evas_Object* ewkFrame, const char* errorDomain, int errorCode, Eina_Bool isCancellation, const char* errorDescription, const char* failingUrl)
    13721370{
    13731371    Ewk_Frame_Load_Error error;
    13741372
    1375     DBG("o=%p, error=%s (%d, cancellation=%hhu) \"%s\", url=%s",
    1376         o, error_domain, error_code, is_cancellation,
    1377         error_description, failing_url);
    1378 
    1379     EINA_SAFETY_ON_NULL_RETURN(error_domain);
    1380 
    1381     error.code = error_code;
    1382     error.is_cancellation = is_cancellation;
    1383     error.domain = error_domain;
    1384     error.description = error_description;
    1385     error.failing_url = failing_url;
    1386     error.frame = o;
    1387     evas_object_smart_callback_call(o, "load,error", &error);
    1388     EWK_FRAME_SD_GET_OR_RETURN(o, sd);
     1373    DBG("ewkFrame=%p, error=%s (%d, cancellation=%hhu) \"%s\", url=%s",
     1374        ewkFrame, errorDomain, errorCode, isCancellation,
     1375        errorDescription, failingUrl);
     1376
     1377    EINA_SAFETY_ON_NULL_RETURN(errorDomain);
     1378
     1379    error.code = errorCode;
     1380    error.is_cancellation = isCancellation;
     1381    error.domain = errorDomain;
     1382    error.description = errorDescription;
     1383    error.failing_url = failingUrl;
     1384    error.frame = ewkFrame;
     1385    evas_object_smart_callback_call(ewkFrame, "load,error", &error);
     1386    EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, sd);
    13891387    ewk_view_load_error(sd->view, &error);
    13901388}
     
    13961394 * Emits signal: "load,progress" with pointer to a double from 0.0 to 1.0.
    13971395 */
    1398 void ewk_frame_load_progress_changed(Evas_Object* o)
    1399 {
    1400     EWK_FRAME_SD_GET_OR_RETURN(o, sd);
     1396void ewk_frame_load_progress_changed(Evas_Object* ewkFrame)
     1397{
     1398    EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, sd);
    14011399    EINA_SAFETY_ON_NULL_RETURN(sd->frame);
    14021400
     
    14041402    double progress = sd->frame->page()->progress()->estimatedProgress();
    14051403
    1406     DBG("o=%p (p=%0.3f)", o, progress);
    1407 
    1408     evas_object_smart_callback_call(o, "load,progress", &progress);
     1404    DBG("ewkFrame=%p (p=%0.3f)", ewkFrame, progress);
     1405
     1406    evas_object_smart_callback_call(ewkFrame, "load,progress", &progress);
    14091407    ewk_view_load_progress_changed(sd->view);
    14101408}
     
    14161414 * Reports contents size changed.
    14171415 */
    1418 void ewk_frame_contents_size_changed(Evas_Object* o, Evas_Coord w, Evas_Coord h)
    1419 {
    1420     Evas_Coord size[2] = {w, h};
    1421     evas_object_smart_callback_call(o, "contents,size,changed", size);
     1416void ewk_frame_contents_size_changed(Evas_Object* ewkFrame, Evas_Coord width, Evas_Coord height)
     1417{
     1418    Evas_Coord size[2] = {width, height};
     1419    evas_object_smart_callback_call(ewkFrame, "contents,size,changed", size);
    14221420}
    14231421
     
    14271425 * Reports title changed.
    14281426 */
    1429 void ewk_frame_title_set(Evas_Object* o, const char* title)
    1430 {
    1431     DBG("o=%p, title=%s", o, title ? title : "(null)");
    1432     EWK_FRAME_SD_GET_OR_RETURN(o, sd);
     1427void ewk_frame_title_set(Evas_Object* ewkFrame, const char* title)
     1428{
     1429    DBG("ewkFrame=%p, title=%s", ewkFrame, title ? title : "(null)");
     1430    EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, sd);
    14331431    if (!eina_stringshare_replace(&sd->title, title))
    14341432        return;
    1435     evas_object_smart_callback_call(o, "title,changed", (void*)sd->title);
     1433    evas_object_smart_callback_call(ewkFrame, "title,changed", (void*)sd->title);
    14361434}
    14371435
     
    14411439 * Creates a view.
    14421440 */
    1443 void ewk_frame_view_create_for_view(Evas_Object* o, Evas_Object* view)
    1444 {
    1445     DBG("o=%p, view=%p", o, view);
    1446     EWK_FRAME_SD_GET_OR_RETURN(o, sd);
     1441void ewk_frame_view_create_for_view(Evas_Object* ewkFrame, Evas_Object* view)
     1442{
     1443    DBG("ewkFrame=%p, view=%p", ewkFrame, view);
     1444    EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, sd);
    14471445    EINA_SAFETY_ON_NULL_RETURN(sd->frame);
    14481446    Evas_Coord w, h;
     
    14681466    const char* theme = ewk_view_theme_get(view);
    14691467    sd->frame->view()->setEdjeTheme(theme);
    1470     sd->frame->view()->setEvasObject(o);
    1471 }
    1472 
    1473 ssize_t ewk_frame_source_get(const Evas_Object* o, char** frame_source)
    1474 {
    1475     EWK_FRAME_SD_GET_OR_RETURN(o, sd, -1);
     1468    sd->frame->view()->setEvasObject(ewkFrame);
     1469}
     1470
     1471ssize_t ewk_frame_source_get(const Evas_Object* ewkFrame, char** frameSource)
     1472{
     1473    EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, sd, -1);
    14761474    EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, -1);
    14771475    EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame->document(), -1);
    1478     EINA_SAFETY_ON_NULL_RETURN_VAL(frame_source, -1);
     1476    EINA_SAFETY_ON_NULL_RETURN_VAL(frameSource, -1);
    14791477
    14801478    WTF::String source;
    1481     *frame_source = 0; // Saves 0 to pointer until it's not allocated.
     1479    *frameSource = 0; // Saves 0 to pointer until it's not allocated.
    14821480
    14831481    if (!sd->frame->document()->isHTMLDocument()) {
     
    15091507
    15101508    size_t source_length = strlen(source.utf8().data());
    1511     *frame_source = static_cast<char*>(malloc(source_length + 1));
    1512     if (!*frame_source) {
     1509    *frameSource = static_cast<char*>(malloc(source_length + 1));
     1510    if (!*frameSource) {
    15131511        CRITICAL("Could not allocate memory.");
    15141512        return -1;
    15151513    }
    15161514
    1517     strncpy(*frame_source, source.utf8().data(), source_length);
    1518     (*frame_source)[source_length] = '\0';
     1515    strncpy(*frameSource, source.utf8().data(), source_length);
     1516    (*frameSource)[source_length] = '\0';
    15191517
    15201518    return source_length;
    15211519}
    15221520
    1523 Eina_List* ewk_frame_resources_location_get(const Evas_Object* o)
    1524 {
    1525     EWK_FRAME_SD_GET_OR_RETURN(o, sd, 0);
     1521Eina_List* ewk_frame_resources_location_get(const Evas_Object* ewkFrame)
     1522{
     1523    EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, sd, 0);
    15261524    EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, 0);
    15271525    EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame->document(), 0);
     
    15871585 * Emits signal: "uri,changed" with new uri as parameter.
    15881586 */
    1589 Eina_Bool ewk_frame_uri_changed(Evas_Object* o)
    1590 {
    1591     EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     1587Eina_Bool ewk_frame_uri_changed(Evas_Object* ewkFrame)
     1588{
     1589    EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, sd, EINA_FALSE);
    15921590    EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE);
    15931591    WTF::CString uri(sd->frame->document()->url().string().utf8());
     
    16001598
    16011599    eina_stringshare_replace(&sd->uri, uri.data());
    1602     evas_object_smart_callback_call(o, "uri,changed", (void*)sd->uri);
     1600    evas_object_smart_callback_call(ewkFrame, "uri,changed", (void*)sd->uri);
    16031601    return EINA_TRUE;
    16041602}
     
    16091607 * Forces layout for frame.
    16101608 */
    1611 void ewk_frame_force_layout(Evas_Object* o)
    1612 {
    1613     DBG("o=%p", o);
    1614     EWK_FRAME_SD_GET_OR_RETURN(o, sd);
     1609void ewk_frame_force_layout(Evas_Object* ewkFrame)
     1610{
     1611    DBG("ewkFrame=%p", ewkFrame);
     1612    EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, sd);
    16151613    EINA_SAFETY_ON_NULL_RETURN(sd->frame);
    16161614    WebCore::FrameView* view = sd->frame->view();
     
    16241622 * Creates plugin.
    16251623 */
    1626 WTF::PassRefPtr<WebCore::Widget> ewk_frame_plugin_create(Evas_Object* o, const WebCore::IntSize& pluginSize, WebCore::HTMLPlugInElement* element, const WebCore::KURL& url, const WTF::Vector<WTF::String>& paramNames, const WTF::Vector<WTF::String>& paramValues, const WTF::String& mimeType, bool loadManually)
     1624WTF::PassRefPtr<WebCore::Widget> ewk_frame_plugin_create(Evas_Object* ewkFrame, const WebCore::IntSize& pluginSize, WebCore::HTMLPlugInElement* element, const WebCore::KURL& url, const WTF::Vector<WTF::String>& paramNames, const WTF::Vector<WTF::String>& paramValues, const WTF::String& mimeType, bool loadManually)
    16271625{
    16281626    return 0;
     
    16371635 * Emits signal: "editorclientselection,changed" with no parameters.
    16381636 */
    1639 void ewk_frame_editor_client_selection_changed(Evas_Object* o)
    1640 {
    1641     evas_object_smart_callback_call(o, "editorclient,selection,changed", 0);
    1642     EWK_FRAME_SD_GET_OR_RETURN(o, sd);
     1637void ewk_frame_editor_client_selection_changed(Evas_Object* ewkFrame)
     1638{
     1639    evas_object_smart_callback_call(ewkFrame, "editorclient,selection,changed", 0);
     1640    EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, sd);
    16431641    ewk_view_editor_client_selection_changed(sd->view);
    16441642}
     
    16521650 * Emits signal: "editorclient,contents,changed" with no parameters.
    16531651 */
    1654 void ewk_frame_editor_client_contents_changed(Evas_Object* o)
    1655 {
    1656     evas_object_smart_callback_call(o, "editorclient,contents,changed", 0);
    1657     EWK_FRAME_SD_GET_OR_RETURN(o, sd);
     1652void ewk_frame_editor_client_contents_changed(Evas_Object* ewkFrame)
     1653{
     1654    evas_object_smart_callback_call(ewkFrame, "editorclient,contents,changed", 0);
     1655    EWK_FRAME_SD_GET_OR_RETURN(ewkFrame, sd);
    16581656    ewk_view_editor_client_contents_changed(sd->view);
    16591657}
  • trunk/Source/WebKit/efl/ewk/ewk_history.cpp

    r96382 r97329  
    9696}
    9797
    98 static inline Eina_List* _ewk_history_item_list_get(const WebCore::HistoryItemVector& core_items)
     98static inline Eina_List* _ewk_history_item_list_get(const WebCore::HistoryItemVector& coreItems)
    9999{
    100100    Eina_List* ret = 0;
    101101    unsigned int i, size;
    102102
    103     size = core_items.size();
     103    size = coreItems.size();
    104104    for (i = 0; i < size; i++) {
    105         Ewk_History_Item* item = _ewk_history_item_new(core_items[i].get());
     105        Ewk_History_Item* item = _ewk_history_item_new(coreItems[i].get());
    106106        if (item)
    107107            ret = eina_list_append(ret, item);
  • trunk/Source/WebKit/efl/ewk/ewk_js.cpp

    r95901 r97329  
    8484
    8585// These methods are used by NPAI, thats the reason to use bool instead of Eina_Bool.
    86 static bool ewk_js_property_has(NPObject* np_obj, NPIdentifier name)
    87 {
    88     Ewk_JS_Object* obj = reinterpret_cast<Ewk_JS_Object*>(np_obj);
    89 
    90     EINA_SAFETY_ON_NULL_RETURN_VAL(np_obj, false);
     86static bool ewk_js_property_has(NPObject* npObject, NPIdentifier name)
     87{
     88    Ewk_JS_Object* obj = reinterpret_cast<Ewk_JS_Object*>(npObject);
     89
     90    EINA_SAFETY_ON_NULL_RETURN_VAL(npObject, false);
    9191    EINA_MAGIC_CHECK_OR_RETURN(obj, false);
    9292
     
    103103}
    104104
    105 static bool ewk_js_property_get(NPObject* np_obj, NPIdentifier name, NPVariant* result)
    106 {
    107     Ewk_JS_Object* obj = reinterpret_cast<Ewk_JS_Object*>(np_obj);
     105static bool ewk_js_property_get(NPObject* npObject, NPIdentifier name, NPVariant* result)
     106{
     107    Ewk_JS_Object* obj = reinterpret_cast<Ewk_JS_Object*>(npObject);
    108108    Ewk_JS_Variant* value;
    109109    Ewk_JS_Property* prop;
    110110    bool fail = false;
    111111
    112     EINA_SAFETY_ON_NULL_RETURN_VAL(np_obj, false);
     112    EINA_SAFETY_ON_NULL_RETURN_VAL(npObject, false);
    113113    EINA_MAGIC_CHECK_OR_RETURN(obj, false);
    114114
     
    146146}
    147147
    148 static bool ewk_js_property_set(NPObject* np_obj, NPIdentifier name, const NPVariant* np_value)
    149 {
    150     Ewk_JS_Object* obj = reinterpret_cast<Ewk_JS_Object*>(np_obj);
     148static bool ewk_js_property_set(NPObject* npObject, NPIdentifier name, const NPVariant* npValue)
     149{
     150    Ewk_JS_Object* obj = reinterpret_cast<Ewk_JS_Object*>(npObject);
    151151    Ewk_JS_Variant* value;
    152152    Ewk_JS_Property* prop;
    153153    bool fail = false;
    154154
    155     EINA_SAFETY_ON_NULL_RETURN_VAL(np_obj, false);
     155    EINA_SAFETY_ON_NULL_RETURN_VAL(npObj, false);
    156156    EINA_MAGIC_CHECK_OR_RETURN(obj, false);
    157157
     
    167167    }
    168168
    169     ewk_js_npvariant_to_variant(value, np_value);
     169    ewk_js_npvariant_to_variant(value, npValue);
    170170    char* prop_name = _NPN_UTF8FromIdentifier(name);
    171171    prop = static_cast<Ewk_JS_Property*>(eina_hash_find(obj->cls->properties, prop_name));
     
    184184}
    185185
    186 static bool ewk_js_property_remove(NPObject* np_obj, NPIdentifier name)
    187 {
    188     Ewk_JS_Object* obj = reinterpret_cast<Ewk_JS_Object*>(np_obj);
     186static bool ewk_js_property_remove(NPObject* npObject, NPIdentifier name)
     187{
     188    Ewk_JS_Object* obj = reinterpret_cast<Ewk_JS_Object*>(npObject);
    189189    Ewk_JS_Property* prop;
    190190    bool fail = false;
    191191
    192     EINA_SAFETY_ON_NULL_RETURN_VAL(np_obj, false);
     192    EINA_SAFETY_ON_NULL_RETURN_VAL(npObject, false);
    193193    EINA_MAGIC_CHECK_OR_RETURN(obj, false);
    194194
     
    211211}
    212212
    213 static bool ewk_js_properties_enumerate(NPObject* np_obj, NPIdentifier** value, uint32_t* count)
    214 {
    215     Ewk_JS_Object* obj = reinterpret_cast<Ewk_JS_Object*>(np_obj);
     213static bool ewk_js_properties_enumerate(NPObject* npObject, NPIdentifier** value, uint32_t* count)
     214{
     215    Ewk_JS_Object* obj = reinterpret_cast<Ewk_JS_Object*>(npObject);
    216216    Eina_Iterator* it;
    217217    char* key;
    218218    int i = 0;
    219219
    220     EINA_SAFETY_ON_NULL_RETURN_VAL(np_obj, false);
     220    EINA_SAFETY_ON_NULL_RETURN_VAL(npObject, false);
    221221    EINA_MAGIC_CHECK_OR_RETURN(obj, false);
    222222
     
    236236}
    237237
    238 static bool ewk_js_method_has(NPObject* np_obj, NPIdentifier name)
    239 {
    240     Ewk_JS_Object* obj = reinterpret_cast<Ewk_JS_Object*>(np_obj);
    241 
    242     EINA_SAFETY_ON_NULL_RETURN_VAL(np_obj, false);
     238static bool ewk_js_method_has(NPObject* npObject, NPIdentifier name)
     239{
     240    Ewk_JS_Object* obj = reinterpret_cast<Ewk_JS_Object*>(npObject);
     241
     242    EINA_SAFETY_ON_NULL_RETURN_VAL(npObject, false);
    243243    EINA_MAGIC_CHECK_OR_RETURN(obj, false);
    244244
     
    250250}
    251251
    252 static bool ewk_js_method_invoke(NPObject* np_obj, NPIdentifier name, const NPVariant* np_args, uint32_t np_arg_count, NPVariant* result)
    253 {
    254     Ewk_JS_Object* obj = reinterpret_cast<Ewk_JS_Object*>(np_obj);
     252static bool ewk_js_method_invoke(NPObject* npObject, NPIdentifier name, const NPVariant* npArgs, uint32_t npArgCount, NPVariant* result)
     253{
     254    Ewk_JS_Object* obj = reinterpret_cast<Ewk_JS_Object*>(npObject);
    255255    Ewk_JS_Method* method;
    256256    Ewk_JS_Variant* args;
    257257    Ewk_JS_Variant* ret_val;
    258258
    259     EINA_SAFETY_ON_NULL_RETURN_VAL(np_obj, false);
     259    EINA_SAFETY_ON_NULL_RETURN_VAL(npObject, false);
    260260    EINA_MAGIC_CHECK_OR_RETURN(obj, false);
    261261
     
    269269        return false;
    270270
    271     args = static_cast<Ewk_JS_Variant*>(malloc(sizeof(Ewk_JS_Variant)  *np_arg_count));
     271    args = static_cast<Ewk_JS_Variant*>(malloc(sizeof(Ewk_JS_Variant)  *npArgCount));
    272272    if (!args) {
    273273        ERR("Could not allocate memory for ewk_js_variant");
     
    275275    }
    276276
    277     for (uint32_t i = 0; i < np_arg_count; i++)
    278         ewk_js_npvariant_to_variant(&args[i], &np_args[i]);
    279     ret_val = method->invoke(obj, args, np_arg_count);
     277    for (uint32_t i = 0; i < npArgCount; i++)
     278        ewk_js_npvariant_to_variant(&args[i], &npArgs[i]);
     279    ret_val = method->invoke(obj, args, npArgCount);
    280280    ewk_js_variant_to_npvariant(ret_val, result);
    281281
     
    285285}
    286286
    287 static Eina_Bool ewk_js_npobject_property_get(Ewk_JS_Object* obj, const char* name, Ewk_JS_Variant* value)
     287static Eina_Bool ewk_js_npobject_property_get(Ewk_JS_Object* jsObject, const char* name, Ewk_JS_Variant* value)
    288288{
    289289    NPIdentifier id = _NPN_GetStringIdentifier(name);
    290290    NPVariant var;
    291     bool fail = _NPN_GetProperty(0, reinterpret_cast<NPObject*>(obj), id, &var);
     291    bool fail = _NPN_GetProperty(0, reinterpret_cast<NPObject*>(jsObject), id, &var);
    292292    if (!fail)
    293293        fail = ewk_js_npvariant_to_variant(value, &var);
     
    295295}
    296296
    297 static Eina_Bool ewk_js_npobject_property_set(Ewk_JS_Object* obj, const char* name, const Ewk_JS_Variant* value)
     297static Eina_Bool ewk_js_npobject_property_set(Ewk_JS_Object* jsObject, const char* name, const Ewk_JS_Variant* value)
    298298{
    299299    NPIdentifier id = _NPN_GetStringIdentifier(name);
     
    301301    bool fail = ewk_js_variant_to_npvariant(value, &var);
    302302    if (fail)
    303         fail = _NPN_SetProperty(0, reinterpret_cast<NPObject*>(obj), id, &var);
     303        fail = _NPN_SetProperty(0, reinterpret_cast<NPObject*>(jsObject), id, &var);
    304304    return fail;
    305305}
    306306
    307 static Eina_Bool ewk_js_npobject_property_del(Ewk_JS_Object* obj, const char* name)
     307static Eina_Bool ewk_js_npobject_property_del(Ewk_JS_Object* jsObject, const char* name)
    308308{
    309309    NPIdentifier id = _NPN_GetStringIdentifier(name);
    310     return _NPN_RemoveProperty(0, reinterpret_cast<NPObject*>(obj), id);
     310    return _NPN_RemoveProperty(0, reinterpret_cast<NPObject*>(jsObject), id);
    311311}
    312312
     
    328328 * @return The Ewk_JS_Class created.
    329329 */
    330 Ewk_JS_Class* ewk_js_class_new(const Ewk_JS_Class_Meta* meta)
     330Ewk_JS_Class* ewk_js_class_new(const Ewk_JS_Class_Meta* jsMetaClass)
    331331{
    332332    Ewk_JS_Class* cls;
    333333
    334     EINA_SAFETY_ON_NULL_RETURN_VAL(meta, 0);
     334    EINA_SAFETY_ON_NULL_RETURN_VAL(jsMetaClass, 0);
    335335
    336336    cls = static_cast<Ewk_JS_Class*>(malloc(sizeof(Ewk_JS_Class)));
     
    340340    }
    341341
    342     cls->meta = meta;
     342    cls->meta = jsMetaClass;
    343343    cls->default_prop = meta->default_prop;
    344344
     
    365365 * @param cls @a Ewk_JS_Class to be released.
    366366 */
    367 void ewk_js_class_free(Ewk_JS_Class* cls)
    368 {
    369     EINA_SAFETY_ON_NULL_RETURN(cls);
    370     eina_hash_free(cls->methods);
    371     eina_hash_free(cls->properties);
    372     free(cls);
     367void ewk_js_class_free(Ewk_JS_Class* jsClass)
     368{
     369    EINA_SAFETY_ON_NULL_RETURN(jsClass);
     370    eina_hash_free(jsClass->methods);
     371    eina_hash_free(jsClass->properties);
     372    free(jsClass);
    373373}
    374374
     
    389389};
    390390
    391 static Ewk_JS_Object* ewk_js_npobject_to_object(NPObject* np_obj)
     391static Ewk_JS_Object* ewk_js_npobject_to_object(NPObject* npObject)
    392392{
    393393    NPIdentifier* values;
     
    399399    JavaScriptObject* jso;
    400400
    401     if (EINA_MAGIC_CHECK(reinterpret_cast<Ewk_JS_Object*>(np_obj), EWK_JS_OBJECT_MAGIC))
    402         return reinterpret_cast<Ewk_JS_Object*>(np_obj);
     401    if (EINA_MAGIC_CHECK(reinterpret_cast<Ewk_JS_Object*>(npObject), EWK_JS_OBJECT_MAGIC))
     402        return reinterpret_cast<Ewk_JS_Object*>(npObject);
    403403
    404404    if (!_NPN_Enumerate(0, np_obj, &values, &np_props_count))
     
    449449    obj->view = 0;
    450450
    451     jso = reinterpret_cast<JavaScriptObject*>(np_obj);
     451    jso = reinterpret_cast<JavaScriptObject*>(npObject);
    452452    if (!strcmp("Array", jso->imp->className().ascii().data()))
    453453        obj->type = EWK_JS_OBJECT_ARRAY;
     
    470470
    471471    eina_iterator_free(it);
    472     obj->base = *reinterpret_cast<JavaScriptObject*>(np_obj);
     472    obj->base = *reinterpret_cast<JavaScriptObject*>(npObject);
    473473
    474474    return obj;
     
    526526}
    527527
    528 Ewk_JS_Object* ewk_js_object_new(const Ewk_JS_Class_Meta* meta_cls)
     528Ewk_JS_Object* ewk_js_object_new(const Ewk_JS_Class_Meta* jsMetaClass)
    529529{
    530530    Ewk_JS_Object* obj;
     
    539539
    540540    EINA_MAGIC_SET(obj, EWK_JS_OBJECT_MAGIC);
    541     obj->cls = ewk_js_class_new(meta_cls);
     541    obj->cls = ewk_js_class_new(jsMetaClass);
    542542    obj->view = 0;
    543543    obj->name = 0;
     
    595595}
    596596
    597 void ewk_js_object_free(Ewk_JS_Object* obj)
    598 {
    599     EINA_SAFETY_ON_NULL_RETURN(obj);
    600     EINA_MAGIC_CHECK_OR_RETURN(obj);
    601     Eina_Bool script_obj = !obj->cls->meta;
    602 
    603     eina_hash_free(obj->properties);
    604     eina_stringshare_del(obj->name);
    605 
    606     ewk_js_class_free(const_cast<Ewk_JS_Class*>(obj->cls));
    607 
    608     EINA_MAGIC_SET(obj, EINA_MAGIC_NONE);
     597void ewk_js_object_free(Ewk_JS_Object* jsObject)
     598{
     599    EINA_SAFETY_ON_NULL_RETURN(jsObject);
     600    EINA_MAGIC_CHECK_OR_RETURN(jsObject);
     601    Eina_Bool script_obj = !jsObject->cls->meta;
     602
     603    eina_hash_free(jsObject->properties);
     604    eina_stringshare_del(jsObject->name);
     605
     606    ewk_js_class_free(const_cast<Ewk_JS_Class*>(jsObject->cls));
     607
     608    EINA_MAGIC_SET(jsObject, EINA_MAGIC_NONE);
    609609
    610610    if (script_obj)
    611         free(obj);
    612 }
    613 
    614 Eina_Hash* ewk_js_object_properties_get(const Ewk_JS_Object* obj)
    615 {
    616     EINA_SAFETY_ON_NULL_RETURN_VAL(obj, 0);
    617     EINA_MAGIC_CHECK_OR_RETURN(obj, 0);
    618     return obj->properties;
    619 }
    620 
    621 const char* ewk_js_object_name_get(const Ewk_JS_Object* obj)
    622 {
    623     EINA_SAFETY_ON_NULL_RETURN_VAL(obj, 0);
    624     EINA_MAGIC_CHECK_OR_RETURN(obj, 0);
    625     return obj->name;
    626 }
    627 
    628 Eina_Bool ewk_js_object_invoke(Ewk_JS_Object* obj, Ewk_JS_Variant* args, int arg_count, Ewk_JS_Variant* result)
     611        free(jsObject);
     612}
     613
     614Eina_Hash* ewk_js_object_properties_get(const Ewk_JS_Object* jsObject)
     615{
     616    EINA_SAFETY_ON_NULL_RETURN_VAL(jsObject, 0);
     617    EINA_MAGIC_CHECK_OR_RETURN(jsObject, 0);
     618    return jsObject->properties;
     619}
     620
     621const char* ewk_js_object_name_get(const Ewk_JS_Object* jsObject)
     622{
     623    EINA_SAFETY_ON_NULL_RETURN_VAL(jsObject, 0);
     624    EINA_MAGIC_CHECK_OR_RETURN(jsObject, 0);
     625    return jsObject->name;
     626}
     627
     628Eina_Bool ewk_js_object_invoke(Ewk_JS_Object* jsObject, Ewk_JS_Variant* args, int argCount, Ewk_JS_Variant* result)
    629629{
    630630    NPVariant* np_args;
     
    632632    bool fail = EINA_FALSE;
    633633
    634     EINA_MAGIC_CHECK_OR_RETURN(obj, EINA_FALSE);
    635     if (ewk_js_object_type_get(obj) != EWK_JS_OBJECT_FUNCTION)
     634    EINA_MAGIC_CHECK_OR_RETURN(jsObject, EINA_FALSE);
     635    if (ewk_js_object_type_get(jsObject) != EWK_JS_OBJECT_FUNCTION)
    636636        return EINA_FALSE;
    637     if (arg_count)
     637    if (argCount)
    638638        EINA_SAFETY_ON_NULL_RETURN_VAL(args, EINA_FALSE);
    639639
     
    644644    }
    645645
    646     for (int i = 0; i < arg_count; i++)
     646    for (int i = 0; i < argCount; i++)
    647647        if (!ewk_js_variant_to_npvariant(&args[i], &np_args[i]))
    648648            goto end;
    649649
    650     if (!(fail = _NPN_InvokeDefault(0, reinterpret_cast<NPObject*>(obj), np_args, arg_count, &np_result)))
     650    if (!(fail = _NPN_InvokeDefault(0, reinterpret_cast<NPObject*>(jsObject), np_args, argCount, &np_result)))
    651651        goto end;
    652652    if (result)
     
    658658}
    659659
    660 Ewk_JS_Object_Type ewk_js_object_type_get(Ewk_JS_Object* obj)
    661 {
    662     EINA_SAFETY_ON_NULL_RETURN_VAL(obj, EWK_JS_OBJECT_OBJECT);
    663     EINA_MAGIC_CHECK_OR_RETURN(obj, EWK_JS_OBJECT_OBJECT);
     660Ewk_JS_Object_Type ewk_js_object_type_get(Ewk_JS_Object* jsObject)
     661{
     662    EINA_SAFETY_ON_NULL_RETURN_VAL(jsObject, EWK_JS_OBJECT_OBJECT);
     663    EINA_MAGIC_CHECK_OR_RETURN(jsOobject, EWK_JS_OBJECT_OBJECT);
    664664
    665665    return obj->type;
    666666}
    667667
    668 void ewk_js_object_type_set(Ewk_JS_Object* obj, Ewk_JS_Object_Type type)
    669 {
    670     EINA_SAFETY_ON_NULL_RETURN(obj);
    671     EINA_MAGIC_CHECK_OR_RETURN(obj);
    672 
    673     obj->type = type;
    674 }
    675 
    676 void ewk_js_variant_free(Ewk_JS_Variant* var)
    677 {
    678     EINA_SAFETY_ON_NULL_RETURN(var);
    679     if (var->type == EWK_JS_VARIANT_STRING)
    680         free(var->value.s);
    681     else if (var->type == EWK_JS_VARIANT_OBJECT)
    682         ewk_js_object_free(var->value.o);
    683     free(var);
    684 }
    685 
    686 void ewk_js_variant_array_free(Ewk_JS_Variant* var, int count)
    687 {
    688     EINA_SAFETY_ON_NULL_RETURN(var);
     668void ewk_js_object_type_set(Ewk_JS_Object* jsObject, Ewk_JS_Object_Type type)
     669{
     670    EINA_SAFETY_ON_NULL_RETURN(jsObject);
     671    EINA_MAGIC_CHECK_OR_RETURN(jsObject);
     672
     673    object->type = type;
     674}
     675
     676void ewk_js_variant_free(Ewk_JS_Variant* jsVariant)
     677{
     678    EINA_SAFETY_ON_NULL_RETURN(jsVariant);
     679    if (variant->type == EWK_JS_VARIANT_STRING)
     680        free(jsVariant->value.s);
     681    else if (jsVariant->type == EWK_JS_VARIANT_OBJECT)
     682        ewk_js_object_free(jsVariant->value.o);
     683    free(jsVariant);
     684}
     685
     686void ewk_js_variant_array_free(Ewk_JS_Variant* jsVariant, int count)
     687{
     688    EINA_SAFETY_ON_NULL_RETURN(jsVariant);
    689689    for (int i = 0; i < count; i++) {
    690         if (var[i].type == EWK_JS_VARIANT_STRING)
    691             free(var[i].value.s);
    692         else if (var[i].type == EWK_JS_VARIANT_OBJECT)
    693             ewk_js_object_free(var[i].value.o);
    694     }
    695     free(var);
     690        if (jsVariant[i].type == EWK_JS_VARIANT_STRING)
     691            free(jsVariant[i].value.s);
     692        else if (jsVariant[i].type == EWK_JS_VARIANT_OBJECT)
     693            ewk_js_object_free(jsVariant[i].value.o);
     694    }
     695    free(jsVariant);
    696696}
    697697
    698698#else
    699699
    700 Eina_Hash* ewk_js_object_properties_get(const Ewk_JS_Object* obj)
     700Eina_Hash* ewk_js_object_properties_get(const Ewk_JS_Object* jsObject)
    701701{
    702702    return 0;
    703703}
    704704
    705 const char* ewk_js_object_name_get(const Ewk_JS_Object* obj)
     705const char* ewk_js_object_name_get(const Ewk_JS_Object* jsObject)
    706706{
    707707    return 0;
    708708}
    709709
    710 void ewk_js_variant_free(Ewk_JS_Variant* var)
    711 {
    712 }
    713 
    714 void ewk_js_variant_array_free(Ewk_JS_Variant* var, int count)
    715 {
    716 }
    717 
    718 Ewk_JS_Object* ewk_js_object_new(const Ewk_JS_Class_Meta* meta_cls)
     710void ewk_js_variant_free(Ewk_JS_Variant* jsVariant)
     711{
     712}
     713
     714void ewk_js_variant_array_free(Ewk_JS_Variant* jsVariant, int count)
     715{
     716}
     717
     718Ewk_JS_Object* ewk_js_object_new(const Ewk_JS_Class_Meta* jsMetaClass)
    719719{
    720720    return 0;
    721721}
    722722
    723 void ewk_js_object_free(Ewk_JS_Object* obj)
    724 {
    725 }
    726 
    727 Eina_Bool ewk_js_object_invoke(Ewk_JS_Object* obj, Ewk_JS_Variant* args, int arg_count, Ewk_JS_Variant* result)
     723void ewk_js_object_free(Ewk_JS_Object* jsObject)
     724{
     725}
     726
     727Eina_Bool ewk_js_object_invoke(Ewk_JS_Object* jsObject, Ewk_JS_Variant* args, int argCount, Ewk_JS_Variant* result)
    728728{
    729729    return EINA_FALSE;
    730730}
    731731
    732 Ewk_JS_Object_Type ewk_js_object_type_get(Ewk_JS_Object* obj)
     732Ewk_JS_Object_Type ewk_js_object_type_get(Ewk_JS_Object* jsObject)
    733733{
    734734    return EWK_JS_OBJECT_INVALID;
    735735}
    736736
    737 void ewk_js_object_type_set(Ewk_JS_Object* obj, Ewk_JS_Object_Type type)
     737void ewk_js_object_type_set(Ewk_JS_Object* jsObject, Ewk_JS_Object_Type type)
    738738{
    739739}
  • trunk/Source/WebKit/efl/ewk/ewk_protocol_handler_soup.cpp

    r95901 r97329  
    5252}
    5353
    54 static void ewk_custom_protocol_handler_finalize(GObject* obj)
     54static void ewk_custom_protocol_handler_finalize(GObject* object)
    5555{
    56     EwkProtocolHandlerPrivate* priv  = G_TYPE_INSTANCE_GET_PRIVATE(obj, EWK_TYPE_CUSTOM_PROTOCOL_HANDLER,
     56    EwkProtocolHandlerPrivate* priv  = G_TYPE_INSTANCE_GET_PRIVATE(object, EWK_TYPE_CUSTOM_PROTOCOL_HANDLER,
    5757                                                                   EwkProtocolHandlerPrivate);
    5858    if (priv)
    5959        free(priv->mime);
    6060
    61     G_OBJECT_CLASS(ewk_custom_protocol_handler_parent_class)->finalize(obj);
     61    G_OBJECT_CLASS(ewk_custom_protocol_handler_parent_class)->finalize(object);
    6262}
    6363
  • trunk/Source/WebKit/efl/ewk/ewk_settings.cpp

    r96217 r97329  
    3232#include "KURL.h"
    3333#include "MemoryCache.h"
     34// FIXME: Why is there a directory in this include?
     35#include "appcache/ApplicationCacheStorage.h"
    3436#include "ewk_private.h"
    3537
     
    4446#include <wtf/text/CString.h>
    4547#include <wtf/text/StringConcatenate.h>
    46 
    47 // FIXME: Why is there a directory in this include?
    48 #include "appcache/ApplicationCacheStorage.h"
    4948
    5049static const char* _ewk_cache_directory_path = 0;
     
    230229}
    231230
    232 void ewk_settings_repaint_throttling_set(double deferred_repaint_delay, double initial_deferred_repaint_delay_during_loading, double max_deferred_repaint_delay_during_loading, double deferred_repaint_delay_increment_during_loading)
    233 {
    234     WebCore::FrameView::setRepaintThrottlingDeferredRepaintDelay(deferred_repaint_delay);
    235     WebCore::FrameView::setRepaintThrottlingnInitialDeferredRepaintDelayDuringLoading(initial_deferred_repaint_delay_during_loading);
    236     WebCore::FrameView::setRepaintThrottlingMaxDeferredRepaintDelayDuringLoading(max_deferred_repaint_delay_during_loading);
    237     WebCore::FrameView::setRepaintThrottlingDeferredRepaintDelayIncrementDuringLoading(deferred_repaint_delay_increment_during_loading);
     231void ewk_settings_repaint_throttling_set(double deferredRepaintDelay, double initialDeferredRepaintDelayDuringLoading, double maxDeferredRepaintDelayDuringLoading, double deferredRepaintDelayIncrementDuringLoading)
     232{
     233    WebCore::FrameView::setRepaintThrottlingDeferredRepaintDelay(deferredRepaintDelay);
     234    WebCore::FrameView::setRepaintThrottlingnInitialDeferredRepaintDelayDuringLoading(initialDeferredRepaintDelayDuringLoading);
     235    WebCore::FrameView::setRepaintThrottlingMaxDeferredRepaintDelayDuringLoading(maxDeferredRepaintDelayDuringLoading);
     236    WebCore::FrameView::setRepaintThrottlingDeferredRepaintDelayIncrementDuringLoading(deferredRepaintDelayIncrementDuringLoading);
    238237}
    239238
  • trunk/Source/WebKit/efl/ewk/ewk_tiled_backing_store.cpp

    r96495 r97329  
    4747struct _Ewk_Tiled_Backing_Store_Item {
    4848    EINA_INLIST;
    49     Ewk_Tile *tile;
     49    Ewk_Tile* tile;
    5050    struct {
    51         Evas_Coord x, y, w, h;
     51        Evas_Coord x, y, width, height;
    5252    } geometry;
    5353    Eina_Bool smooth_scale;
     
    6262struct _Ewk_Tiled_Backing_Store_Data {
    6363    Evas_Object_Smart_Clipped_Data base;
    64     Evas_Object *self;
    65     Evas_Object *contents_clipper;
     64    Evas_Object* self;
     65    Evas_Object* contents_clipper;
    6666    struct {
    67         Eina_Inlist **items;
    68         Evas_Coord x, y, w, h;
     67        Eina_Inlist** items;
     68        Evas_Coord x, y, width, height;
    6969        long cols, rows;
    7070        struct {
    71             Evas_Coord w, h;
     71            Evas_Coord width, height;
    7272            float zoom;
    73             Eina_Bool zoom_weak_smooth_scale:1;
     73            Eina_Bool zoom_weak_smooth_scale : 1;
    7474        } tile;
    7575        struct {
     
    8181    Evas_Colorspace cspace;
    8282    struct {
    83         Ewk_Tile_Matrix *matrix;
     83        Ewk_Tile_Matrix* matrix;
    8484        struct {
    8585            unsigned long col, row;
     
    9191    } model;
    9292    struct {
    93         Eina_Bool (*cb)(void *data, Ewk_Tile *t, const Eina_Rectangle *area);
    94         void *data;
    95         Eina_Inlist *pre_render_requests;
    96         Ecore_Idler *idler;
     93        Eina_Bool (*cb)(void* data, Ewk_Tile* tile, const Eina_Rectangle* area);
     94        void* data;
     95        Eina_Inlist* pre_render_requests;
     96        Ecore_Idler* idler;
    9797        Eina_Bool disabled;
    98         Eina_Bool suspend:1;
     98        Eina_Bool suspend : 1;
    9999    } render;
    100100    struct {
    101         void *(*pre_cb)(void *data, Evas_Object *o);
    102         void *pre_data;
    103         void *(*post_cb)(void *data, void *pre_data, Evas_Object *o);
    104         void *post_data;
     101        void* (*pre_cb)(void* data, Evas_Object* ewkTile);
     102        void* pre_data;
     103        void* (*post_cb)(void* data, void* pre_data, Evas_Object* ewkTile);
     104        void* post_data;
    105105    } process;
    106106    struct {
    107         Eina_Bool any:1;
    108         Eina_Bool pos:1;
    109         Eina_Bool size:1;
    110         Eina_Bool model:1;
    111         Eina_Bool offset:1;
     107        Eina_Bool any : 1;
     108        Eina_Bool pos : 1;
     109        Eina_Bool size : 1;
     110        Eina_Bool model : 1;
     111        Eina_Bool offset : 1;
    112112    } changed;
    113113#ifdef DEBUG_MEM_LEAKS
    114     Ecore_Event_Handler *sig_usr;
     114    Ecore_Event_Handler* sig_usr;
    115115#endif
    116116};
     
    126126    }
    127127
    128 static void _ewk_tiled_backing_store_fill_renderers(Ewk_Tiled_Backing_Store_Data *priv);
    129 static inline void _ewk_tiled_backing_store_view_dbg(const Ewk_Tiled_Backing_Store_Data *priv);
    130 static inline void _ewk_tiled_backing_store_changed(Ewk_Tiled_Backing_Store_Data *priv);
    131 
    132 static inline void _ewk_tiled_backing_store_updates_process(Ewk_Tiled_Backing_Store_Data *priv)
    133 {
    134     void *data = 0;
     128static void _ewk_tiled_backing_store_fill_renderers(Ewk_Tiled_Backing_Store_Data* priv);
     129static inline void _ewk_tiled_backing_store_view_dbg(const Ewk_Tiled_Backing_Store_Data* priv);
     130static inline void _ewk_tiled_backing_store_changed(Ewk_Tiled_Backing_Store_Data* priv);
     131
     132static inline void _ewk_tiled_backing_store_updates_process(Ewk_Tiled_Backing_Store_Data* priv)
     133{
     134    void* data = 0;
    135135
    136136    /* Do not process updates. Note that we still want to get updates requests
     
    150150}
    151151
    152 static int _ewk_tiled_backing_store_flush(void *data)
     152static int _ewk_tiled_backing_store_flush(void* data)
    153153{
    154154    Ewk_Tiled_Backing_Store_Data* priv = static_cast<Ewk_Tiled_Backing_Store_Data*>(data);
    155     Ewk_Tile_Unused_Cache *tuc = ewk_tile_matrix_unused_cache_get(priv->model.matrix);
     155    Ewk_Tile_Unused_Cache* tuc = ewk_tile_matrix_unused_cache_get(priv->model.matrix);
    156156
    157157    if (tuc) {
     
    164164}
    165165
    166 static Ewk_Tile *_ewk_tiled_backing_store_tile_new(Ewk_Tiled_Backing_Store_Data *priv, unsigned long col, unsigned long row, float zoom)
    167 {
    168     Ewk_Tile *t;
    169     Evas *evas = evas_object_evas_get(priv->self);
     166static Ewk_Tile* _ewk_tiled_backing_store_tile_new(Ewk_Tiled_Backing_Store_Data* priv, unsigned long column, unsigned long row, float zoom)
     167{
     168    Ewk_Tile* tile;
     169    Evas* evas = evas_object_evas_get(priv->self);
    170170    if (!evas) {
    171171        CRITICAL("evas_object_evas_get failed!");
     
    173173    }
    174174
    175     t = ewk_tile_matrix_tile_new
    176         (priv->model.matrix, evas, col, row, zoom);
    177 
    178     if (!t) {
     175    tile = ewk_tile_matrix_tile_new
     176               (priv->model.matrix, evas, column, row, zoom);
     177
     178    if (!tile) {
    179179        CRITICAL("ewk_tile_matrix_tile_new failed!");
    180180        return 0;
    181181    }
    182182
    183     return t;
    184 }
    185 
    186 static void _ewk_tiled_backing_store_item_move(Ewk_Tiled_Backing_Store_Item *it, Evas_Coord x, Evas_Coord y)
    187 {
    188     it->geometry.x = x;
    189     it->geometry.y = y;
    190 
    191     if (it->tile)
    192         evas_object_move(it->tile->image, x, y);
    193 }
    194 
    195 static void _ewk_tiled_backing_store_item_resize(Ewk_Tiled_Backing_Store_Item *it, Evas_Coord w, Evas_Coord h)
    196 {
    197     it->geometry.w = w;
    198     it->geometry.h = h;
    199 
    200     if (it->tile) {
    201         evas_object_resize(it->tile->image, w, h);
    202         evas_object_image_fill_set(it->tile->image, 0, 0, w, h);
    203     }
    204 }
    205 
    206 static void _ewk_tiled_backing_store_tile_associate(Ewk_Tiled_Backing_Store_Data *priv, Ewk_Tile *t, Ewk_Tiled_Backing_Store_Item *it)
    207 {
    208     if (it->tile)
    209         CRITICAL("it->tile=%p, but it should be 0!", it->tile);
    210     it->tile = t;
    211     evas_object_move(it->tile->image, it->geometry.x, it->geometry.y);
    212     evas_object_resize(it->tile->image, it->geometry.w, it->geometry.h);
     183    return tile;
     184}
     185
     186static void _ewk_tiled_backing_store_item_move(Ewk_Tiled_Backing_Store_Item* item, Evas_Coord x, Evas_Coord y)
     187{
     188    item->geometry.x = x;
     189    item->geometry.y = y;
     190
     191    if (item->tile)
     192        evas_object_move(item->tile->image, x, y);
     193}
     194
     195static void _ewk_tiled_backing_store_item_resize(Ewk_Tiled_Backing_Store_Item* item, Evas_Coord width, Evas_Coord height)
     196{
     197    item->geometry.width = width;
     198    item->geometry.height = height;
     199
     200    if (item->tile) {
     201        evas_object_resize(item->tile->image, width, height);
     202        evas_object_image_fill_set(item->tile->image, 0, 0, width, height);
     203    }
     204}
     205
     206static void _ewk_tiled_backing_store_tile_associate(Ewk_Tiled_Backing_Store_Data* priv, Ewk_Tile* tile, Ewk_Tiled_Backing_Store_Item* item)
     207{
     208    if (item->tile)
     209        CRITICAL("it->tile=%p, but it should be 0!", item->tile);
     210    item->tile = tile;
     211    evas_object_move(item->tile->image, item->geometry.x, item->geometry.y);
     212    evas_object_resize(item->tile->image, item->geometry.width, item->geometry.height);
    213213    evas_object_image_fill_set
    214         (it->tile->image, 0, 0, it->geometry.w, it->geometry.h);
    215     evas_object_image_smooth_scale_set(it->tile->image, it->smooth_scale);
    216 
    217     if (!ewk_tile_visible_get(t))
    218         evas_object_smart_member_add(t->image, priv->self);
    219 
    220     ewk_tile_show(t);
    221 }
    222 
    223 static void _ewk_tiled_backing_store_tile_dissociate(Ewk_Tiled_Backing_Store_Data *priv, Ewk_Tiled_Backing_Store_Item *it, double last_used)
    224 {
    225     Ewk_Tile_Unused_Cache *tuc;
    226     ewk_tile_hide(it->tile);
    227     if (!ewk_tile_visible_get(it->tile))
    228         evas_object_smart_member_del(it->tile->image);
    229     ewk_tile_matrix_tile_put(priv->model.matrix, it->tile, last_used);
     214        (item->tile->image, 0, 0, item->geometry.width, item->geometry.height);
     215    evas_object_image_smooth_scale_set(item->tile->image, item->smooth_scale);
     216
     217    if (!ewk_tile_visible_get(tile))
     218        evas_object_smart_member_add(tile->image, priv->self);
     219
     220    ewk_tile_show(tile);
     221}
     222
     223static void _ewk_tiled_backing_store_tile_dissociate(Ewk_Tiled_Backing_Store_Data* priv, Ewk_Tiled_Backing_Store_Item* item, double lastUsed)
     224{
     225    Ewk_Tile_Unused_Cache* tuc;
     226    ewk_tile_hide(item->tile);
     227    if (!ewk_tile_visible_get(item->tile))
     228        evas_object_smart_member_del(item->tile->image);
     229    ewk_tile_matrix_tile_put(priv->model.matrix, item->tile, lastUsed);
    230230    tuc = ewk_tile_matrix_unused_cache_get(priv->model.matrix);
    231231    ewk_tile_unused_cache_auto_flush(tuc);
    232232
    233     it->tile = 0;
    234 }
    235 
    236 static void _ewk_tiled_backing_store_tile_dissociate_all(Ewk_Tiled_Backing_Store_Data *priv)
    237 {
    238     Eina_Inlist *it;
    239     Ewk_Tiled_Backing_Store_Item *item;
     233    item->tile = 0;
     234}
     235
     236static void _ewk_tiled_backing_store_tile_dissociate_all(Ewk_Tiled_Backing_Store_Data* priv)
     237{
     238    Eina_Inlist* it;
     239    Ewk_Tiled_Backing_Store_Item* item;
    240240    int i;
    241241    double last_used = ecore_loop_time_get();
     
    249249}
    250250
    251 static inline Eina_Bool _ewk_tiled_backing_store_pre_render_request_add(Ewk_Tiled_Backing_Store_Data *priv, unsigned long col, unsigned long row, float zoom, Ewk_Tiled_Backing_Store_Pre_Render_Priority priority)
    252 {
    253     Ewk_Tiled_Backing_Store_Pre_Render_Request *r;
     251static inline Eina_Bool _ewk_tiled_backing_store_pre_render_request_add(Ewk_Tiled_Backing_Store_Data* priv, unsigned long column, unsigned long row, float zoom, Ewk_Tiled_Backing_Store_Pre_Render_Priority priority)
     252{
     253    Ewk_Tiled_Backing_Store_Pre_Render_Request* r;
    254254
    255255    r = static_cast<Ewk_Tiled_Backing_Store_Pre_Render_Request*>(malloc(sizeof(*r)));
     
    259259    if (priority == PRE_RENDER_PRIORITY_HIGH)
    260260        priv->render.pre_render_requests = eina_inlist_prepend
    261             (priv->render.pre_render_requests, EINA_INLIST_GET(r));
     261                                               (priv->render.pre_render_requests, EINA_INLIST_GET(r));
    262262    else
    263263        priv->render.pre_render_requests = eina_inlist_append
    264             (priv->render.pre_render_requests, EINA_INLIST_GET(r));
    265 
    266     r->col = col;
     264                                               (priv->render.pre_render_requests, EINA_INLIST_GET(r));
     265
     266    r->col = column;
    267267    r->row = row;
    268268    r->zoom = zoom;
     
    271271}
    272272
    273 static inline void _ewk_tiled_backing_store_pre_render_request_del(Ewk_Tiled_Backing_Store_Data *priv, Ewk_Tiled_Backing_Store_Pre_Render_Request *r)
     273static inline void _ewk_tiled_backing_store_pre_render_request_del(Ewk_Tiled_Backing_Store_Data* priv, Ewk_Tiled_Backing_Store_Pre_Render_Request* request)
    274274{
    275275    priv->render.pre_render_requests = eina_inlist_remove
    276         (priv->render.pre_render_requests, EINA_INLIST_GET(r));
    277     free(r);
    278 }
    279 
    280 static inline Ewk_Tiled_Backing_Store_Pre_Render_Request *_ewk_tiled_backing_store_pre_render_request_first(const Ewk_Tiled_Backing_Store_Data *priv)
     276                                           (priv->render.pre_render_requests, EINA_INLIST_GET(request));
     277    free(request);
     278}
     279
     280static inline Ewk_Tiled_Backing_Store_Pre_Render_Request* _ewk_tiled_backing_store_pre_render_request_first(const Ewk_Tiled_Backing_Store_Data* priv)
    281281{
    282282    return EINA_INLIST_CONTAINER_GET(
    283         priv->render.pre_render_requests,
    284         Ewk_Tiled_Backing_Store_Pre_Render_Request);
    285 }
    286 
    287 static void _ewk_tiled_backing_store_pre_render_request_flush(Ewk_Tiled_Backing_Store_Data *priv)
    288 {
    289     Eina_Inlist **pl = &priv->render.pre_render_requests;
     283               priv->render.pre_render_requests,
     284               Ewk_Tiled_Backing_Store_Pre_Render_Request);
     285}
     286
     287static void _ewk_tiled_backing_store_pre_render_request_flush(Ewk_Tiled_Backing_Store_Data* priv)
     288{
     289    Eina_Inlist** pl = &priv->render.pre_render_requests;
    290290    while (*pl) {
    291         Ewk_Tiled_Backing_Store_Pre_Render_Request *r;
     291        Ewk_Tiled_Backing_Store_Pre_Render_Request* r;
    292292        r = _ewk_tiled_backing_store_pre_render_request_first(priv);
    293293        *pl = eina_inlist_remove(*pl, *pl);
     
    296296}
    297297
    298 static void _ewk_tiled_backing_store_pre_render_request_clear(Ewk_Tiled_Backing_Store_Data *priv)
    299 {
    300     Eina_Inlist **pl = &priv->render.pre_render_requests;
    301     Eina_Inlist *iter = *pl, *tmp;
     298static void _ewk_tiled_backing_store_pre_render_request_clear(Ewk_Tiled_Backing_Store_Data* priv)
     299{
     300    Eina_Inlist** pl = &priv->render.pre_render_requests;
     301    Eina_Inlist* iter = *pl, * tmp;
    302302    while (iter) {
    303         Ewk_Tiled_Backing_Store_Pre_Render_Request *r =
     303        Ewk_Tiled_Backing_Store_Pre_Render_Request* r =
    304304            EINA_INLIST_CONTAINER_GET(
    305305                iter, Ewk_Tiled_Backing_Store_Pre_Render_Request);
     
    312312
    313313/* assumes priv->process.pre_cb was called if required! */
    314 static void _ewk_tiled_backing_store_pre_render_request_process_single(Ewk_Tiled_Backing_Store_Data *priv)
    315 {
    316     Ewk_Tiled_Backing_Store_Pre_Render_Request *req;
     314static void _ewk_tiled_backing_store_pre_render_request_process_single(Ewk_Tiled_Backing_Store_Data* priv)
     315{
     316    Ewk_Tiled_Backing_Store_Pre_Render_Request* req;
    317317    Eina_Rectangle area;
    318     Ewk_Tile_Matrix *tm = priv->model.matrix;
    319     Ewk_Tile *t;
    320     Ewk_Tile_Unused_Cache *tuc;
     318    Ewk_Tile_Matrix* tm = priv->model.matrix;
     319    Ewk_Tile* tile;
     320    Ewk_Tile_Unused_Cache* tuc;
    321321    unsigned long col, row;
    322322    float zoom;
     
    336336    }
    337337
    338     t = _ewk_tiled_backing_store_tile_new(priv, col, row, zoom);
    339     if (!t)
     338    tile = _ewk_tiled_backing_store_tile_new(priv, col, row, zoom);
     339    if (!tile)
    340340        goto end;
    341341
    342342    area.x = 0;
    343343    area.y = 0;
    344     area.w = priv->view.tile.w;
    345     area.h = priv->view.tile.h;
    346 
    347     priv->render.cb(priv->render.data, t, &area);
     344    area.w = priv->view.tile.width;
     345    area.h = priv->view.tile.height;
     346
     347    priv->render.cb(priv->render.data, tile, &area);
    348348    evas_object_image_data_update_add(
    349         t->image,
     349        tile->image,
    350350        area.x, area.y, area.w, area.h);
    351     ewk_tile_matrix_tile_updates_clear(tm, t);
    352 
    353     ewk_tile_matrix_tile_put(tm, t, last_used);
     351    ewk_tile_matrix_tile_updates_clear(tm, tile);
     352
     353    ewk_tile_matrix_tile_put(tm, tile, last_used);
    354354
    355355end:
     
    359359}
    360360
    361 static Eina_Bool _ewk_tiled_backing_store_item_process_idler_cb(void *data)
     361static Eina_Bool _ewk_tiled_backing_store_item_process_idler_cb(void* data)
    362362{
    363363    Ewk_Tiled_Backing_Store_Data* priv = static_cast<Ewk_Tiled_Backing_Store_Data*>(data);
     
    379379}
    380380
    381 static inline void _ewk_tiled_backing_store_item_process_idler_stop(Ewk_Tiled_Backing_Store_Data *priv)
     381static inline void _ewk_tiled_backing_store_item_process_idler_stop(Ewk_Tiled_Backing_Store_Data* priv)
    382382{
    383383    if (!priv->render.idler)
     
    388388}
    389389
    390 static inline void _ewk_tiled_backing_store_item_process_idler_start(Ewk_Tiled_Backing_Store_Data *priv)
     390static inline void _ewk_tiled_backing_store_item_process_idler_start(Ewk_Tiled_Backing_Store_Data* priv)
    391391{
    392392    if (priv->render.idler)
     
    396396}
    397397
    398 static Eina_Bool _ewk_tiled_backing_store_disable_render(Ewk_Tiled_Backing_Store_Data *priv)
     398static Eina_Bool _ewk_tiled_backing_store_disable_render(Ewk_Tiled_Backing_Store_Data* priv)
    399399{
    400400    if (priv->render.suspend)
     
    406406}
    407407
    408 static Eina_Bool _ewk_tiled_backing_store_enable_render(Ewk_Tiled_Backing_Store_Data *priv)
     408static Eina_Bool _ewk_tiled_backing_store_enable_render(Ewk_Tiled_Backing_Store_Data* priv)
    409409{
    410410    if (!priv->render.suspend)
     
    419419}
    420420
    421 static inline Eina_Bool _ewk_tiled_backing_store_item_fill(Ewk_Tiled_Backing_Store_Data *priv, Ewk_Tiled_Backing_Store_Item *it, unsigned long col, unsigned long row)
    422 {
    423     unsigned long m_col = priv->model.base.col + col;
     421static inline Eina_Bool _ewk_tiled_backing_store_item_fill(Ewk_Tiled_Backing_Store_Data* priv, Ewk_Tiled_Backing_Store_Item* item, unsigned long column, unsigned long row)
     422{
     423    unsigned long m_col = priv->model.base.col + column;
    424424    unsigned long m_row = priv->model.base.row + row;
    425425    double last_used = ecore_loop_time_get();
    426426
    427427    if (m_col >= priv->model.cur.cols || m_row >= priv->model.cur.rows) {
    428         if (it->tile)
    429             _ewk_tiled_backing_store_tile_dissociate(priv, it, last_used);
     428        if (item->tile)
     429            _ewk_tiled_backing_store_tile_dissociate(priv, item, last_used);
    430430    } else {
    431         Ewk_Tile *t;
     431        Ewk_Tile* tile;
    432432        const float zoom = priv->view.tile.zoom;
    433433
    434         if (it->tile) {
    435             Ewk_Tile *old = it->tile;
     434        if (item->tile) {
     435            Ewk_Tile* old = item->tile;
    436436            if (old->row != m_row || old->col != m_col || old->zoom != zoom)
    437                 _ewk_tiled_backing_store_tile_dissociate(priv, it, last_used);
     437                _ewk_tiled_backing_store_tile_dissociate(priv, item, last_used);
    438438            else if (old->row == m_row && old->col == m_col && old->zoom == zoom)
    439439                goto end;
    440440        }
    441441
    442         t = ewk_tile_matrix_tile_exact_get(priv->model.matrix, m_col, m_row, zoom);
    443 
    444         if (!t) {
     442        tile = ewk_tile_matrix_tile_exact_get(priv->model.matrix, m_col, m_row, zoom);
     443
     444        if (!tile) {
    445445            /* NOTE: it never returns 0 if it->tile was set! */
    446             if (it->tile) {
    447                 CRITICAL("it->tile=%p, but it should be 0!", it->tile);
    448                 _ewk_tiled_backing_store_tile_dissociate(priv, it,
     446            if (item->tile) {
     447                CRITICAL("it->tile=%p, but it should be 0!", item->tile);
     448                _ewk_tiled_backing_store_tile_dissociate(priv, item,
    449449                                                         last_used);
    450450            }
     
    452452            /* Do not add new requests to the render queue */
    453453            if (!priv->render.suspend) {
    454                 t = _ewk_tiled_backing_store_tile_new(priv, m_col, m_row, zoom);
    455                 if (!t)
     454                tile = _ewk_tiled_backing_store_tile_new(priv, m_col, m_row, zoom);
     455                if (!tile)
    456456                    return EINA_FALSE;
    457                 _ewk_tiled_backing_store_tile_associate(priv, t, it);
     457                _ewk_tiled_backing_store_tile_associate(priv, tile, item);
    458458            }
    459         } else if (t != it->tile) {
    460             if (it->tile)
     459        } else if (tile != item->tile) {
     460            if (item->tile)
    461461                _ewk_tiled_backing_store_tile_dissociate(priv,
    462                                                              it, last_used);
    463             _ewk_tiled_backing_store_tile_associate(priv, t, it);
     462                                                         item, last_used);
     463            _ewk_tiled_backing_store_tile_associate(priv, tile, item);
    464464        }
    465465
    466       end:
     466end:
    467467
    468468        return EINA_TRUE;
     
    472472}
    473473
    474 static Ewk_Tiled_Backing_Store_Item *_ewk_tiled_backing_store_item_add(Ewk_Tiled_Backing_Store_Data *priv, unsigned long col, unsigned long row)
    475 {
    476     Ewk_Tiled_Backing_Store_Item *it;
     474static Ewk_Tiled_Backing_Store_Item* _ewk_tiled_backing_store_item_add(Ewk_Tiled_Backing_Store_Data* priv, unsigned long column, unsigned long row)
     475{
     476    Ewk_Tiled_Backing_Store_Item* it;
    477477    Evas_Coord x, y, tw, th;
    478478
     
    483483        return 0;
    484484
    485     tw = priv->view.tile.w;
    486     th = priv->view.tile.h;
    487     x = priv->view.offset.base.x + priv->view.x + tw  *col;
     485    tw = priv->view.tile.width;
     486    th = priv->view.tile.height;
     487    x = priv->view.offset.base.x + priv->view.x + tw  *column;
    488488    y = priv->view.offset.base.y + priv->view.y + th  *row;
    489489
     
    493493    _ewk_tiled_backing_store_item_move(it, x, y);
    494494    _ewk_tiled_backing_store_item_resize(it, tw, th);
    495     if (!_ewk_tiled_backing_store_item_fill(priv, it, col, row)) {
     495    if (!_ewk_tiled_backing_store_item_fill(priv, it, column, row)) {
    496496        free(it);
    497497        return 0;
     
    501501}
    502502
    503 static void _ewk_tiled_backing_store_item_del(Ewk_Tiled_Backing_Store_Data *priv, Ewk_Tiled_Backing_Store_Item *it)
    504 {
    505     if (it->tile) {
     503static void _ewk_tiled_backing_store_item_del(Ewk_Tiled_Backing_Store_Data* priv, Ewk_Tiled_Backing_Store_Item* item)
     504{
     505    if (item->tile) {
    506506        double last_used = ecore_loop_time_get();
    507         _ewk_tiled_backing_store_tile_dissociate(priv, it, last_used);
    508     }
    509 
    510     free(it);
    511 }
    512 
    513 static void _ewk_tiled_backing_store_item_smooth_scale_set(Ewk_Tiled_Backing_Store_Item *it, Eina_Bool smooth_scale)
    514 {
    515     if (it->smooth_scale == smooth_scale)
    516         return;
    517 
    518     if (it->tile)
    519         evas_object_image_smooth_scale_set(it->tile->image, smooth_scale);
    520 }
    521 
    522 static inline void _ewk_tiled_backing_store_changed(Ewk_Tiled_Backing_Store_Data *priv)
     507        _ewk_tiled_backing_store_tile_dissociate(priv, item, last_used);
     508    }
     509
     510    free(item);
     511}
     512
     513static void _ewk_tiled_backing_store_item_smooth_scale_set(Ewk_Tiled_Backing_Store_Item* item, Eina_Bool smoothScale)
     514{
     515    if (item->smooth_scale == smoothScale)
     516        return;
     517
     518    if (item->tile)
     519        evas_object_image_smooth_scale_set(item->tile->image, smoothScale);
     520}
     521
     522static inline void _ewk_tiled_backing_store_changed(Ewk_Tiled_Backing_Store_Data* priv)
    523523{
    524524    if (priv->changed.any)
     
    528528}
    529529
    530 static void _ewk_tiled_backing_store_view_cols_end_del(Ewk_Tiled_Backing_Store_Data *priv, Eina_Inlist **p_row, unsigned int count)
    531 {
    532     Eina_Inlist *n;
     530static void _ewk_tiled_backing_store_view_cols_end_del(Ewk_Tiled_Backing_Store_Data* priv, Eina_Inlist** p_row, unsigned int count)
     531{
     532    Eina_Inlist* n;
    533533    unsigned int i;
    534534
     
    539539
    540540    for (i = 0; i < count; i++) {
    541         Ewk_Tiled_Backing_Store_Item *it;
     541        Ewk_Tiled_Backing_Store_Item* it;
    542542        it = EINA_INLIST_CONTAINER_GET(n, Ewk_Tiled_Backing_Store_Item);
    543543        n = n->prev;
     
    547547}
    548548
    549 static Eina_Bool _ewk_tiled_backing_store_view_cols_end_add(Ewk_Tiled_Backing_Store_Data *priv, Eina_Inlist **p_row, unsigned int base_col, unsigned int count)
     549static Eina_Bool _ewk_tiled_backing_store_view_cols_end_add(Ewk_Tiled_Backing_Store_Data* priv, Eina_Inlist** p_row, unsigned int base_column, unsigned int count)
    550550{
    551551    unsigned int i, r = p_row - priv->view.items;
    552552
    553     for (i = 0; i < count; i++, base_col++) {
    554         Ewk_Tiled_Backing_Store_Item *it;
    555 
    556         it = _ewk_tiled_backing_store_item_add(priv, base_col, r);
     553    for (i = 0; i < count; i++, base_column++) {
     554        Ewk_Tiled_Backing_Store_Item* it;
     555
     556        it = _ewk_tiled_backing_store_item_add(priv, base_column, r);
    557557        if (!it) {
    558558            CRITICAL("failed to add column %u of %u in row %u.", i, count, r);
     
    566566}
    567567
    568 static void _ewk_tiled_backing_store_view_row_del(Ewk_Tiled_Backing_Store_Data *priv, Eina_Inlist *row)
     568static void _ewk_tiled_backing_store_view_row_del(Ewk_Tiled_Backing_Store_Data* priv, Eina_Inlist* row)
    569569{
    570570    while (row) {
    571         Ewk_Tiled_Backing_Store_Item *it;
     571        Ewk_Tiled_Backing_Store_Item* it;
    572572        it = EINA_INLIST_CONTAINER_GET(row, Ewk_Tiled_Backing_Store_Item);
    573573        row = row->next;
     
    576576}
    577577
    578 static void _ewk_tiled_backing_store_view_rows_range_del(Ewk_Tiled_Backing_Store_Data *priv, Eina_Inlist **start, Eina_Inlist **end)
     578static void _ewk_tiled_backing_store_view_rows_range_del(Ewk_Tiled_Backing_Store_Data* priv, Eina_Inlist** start, Eina_Inlist** end)
    579579{
    580580    for (; start < end; start++) {
     
    584584}
    585585
    586 static void _ewk_tiled_backing_store_view_rows_all_del(Ewk_Tiled_Backing_Store_Data *priv)
    587 {
    588     Eina_Inlist **start;
    589     Eina_Inlist **end;
     586static void _ewk_tiled_backing_store_view_rows_all_del(Ewk_Tiled_Backing_Store_Data* priv)
     587{
     588    Eina_Inlist** start;
     589    Eina_Inlist** end;
    590590
    591591    start = priv->view.items;
     
    599599}
    600600
    601 static void _ewk_tiled_backing_store_render(void *data, Ewk_Tile *t, const Eina_Rectangle *area)
     601static void _ewk_tiled_backing_store_render(void* data, Ewk_Tile* tile, const Eina_Rectangle* area)
    602602{
    603603    Ewk_Tiled_Backing_Store_Data* priv = static_cast<Ewk_Tiled_Backing_Store_Data*>(data);
    604604
    605605    INF("TODO %p (visible? %d) [%lu,%lu] %d,%d + %dx%d",
    606         t, t->visible, t->col, t->row, area->x, area->y, area->w, area->h);
    607 
    608     if (!t->visible)
    609         return;
    610 
    611     if (priv->view.tile.w != t->w || priv->view.tile.h != t->h)
     606        tile, tile->visible, tile->col, tile->row, area->x, area->y, area->w, area->h);
     607
     608    if (!tile->visible)
     609        return;
     610
     611    if (priv->view.tile.width != tile->width || priv->view.tile.height != tile->height)
    612612        return; // todo: remove me later, don't even flag as dirty!
    613613
    614614    EINA_SAFETY_ON_NULL_RETURN(priv->render.cb);
    615     if (!priv->render.cb(priv->render.data, t, area))
    616         return;
    617 
    618     evas_object_image_data_update_add(t->image, area->x, area->y, area->w, area->h);
    619 }
    620 
    621 static inline void _ewk_tiled_backing_store_model_matrix_create(Ewk_Tiled_Backing_Store_Data *priv, Ewk_Tile_Unused_Cache *tuc)
     615    if (!priv->render.cb(priv->render.data, tile, area))
     616        return;
     617
     618    evas_object_image_data_update_add(tile->image, area->x, area->y, area->w, area->h);
     619}
     620
     621static inline void _ewk_tiled_backing_store_model_matrix_create(Ewk_Tiled_Backing_Store_Data* priv, Ewk_Tile_Unused_Cache* tileUnusedCache)
    622622{
    623623    if (priv->model.matrix) {
     
    630630    }
    631631
    632     priv->model.matrix = ewk_tile_matrix_new(tuc, priv->model.cur.cols, priv->model.cur.rows, priv->cspace, _ewk_tiled_backing_store_render, priv);
    633 }
    634 
    635 static void _ewk_tiled_backing_store_smart_member_del(Evas_Object *o, Evas_Object *member)
    636 {
    637     PRIV_DATA_GET_OR_RETURN(o, priv);
     632    priv->model.matrix = ewk_tile_matrix_new(tileUnusedCache, priv->model.cur.cols, priv->model.cur.rows, priv->cspace, _ewk_tiled_backing_store_render, priv);
     633}
     634
     635static void _ewk_tiled_backing_store_smart_member_del(Evas_Object* ewkTile, Evas_Object* member)
     636{
     637    PRIV_DATA_GET_OR_RETURN(ewkTile, priv);
    638638    if (!priv->contents_clipper)
    639639        return;
     
    643643}
    644644
    645 static void _ewk_tiled_backing_store_smart_member_add(Evas_Object *o, Evas_Object *member)
    646 {
    647     PRIV_DATA_GET_OR_RETURN(o, priv);
     645static void _ewk_tiled_backing_store_smart_member_add(Evas_Object* ewkTile, Evas_Object* member)
     646{
     647    PRIV_DATA_GET_OR_RETURN(ewkTile, priv);
    648648    if (!priv->contents_clipper)
    649649        return;
    650650    evas_object_clip_set(member, priv->contents_clipper);
    651     if (evas_object_visible_get(o))
     651    if (evas_object_visible_get(ewkTile))
    652652        evas_object_show(priv->contents_clipper);
    653653}
    654654
    655655#ifdef DEBUG_MEM_LEAKS
    656 static void _ewk_tiled_backing_store_mem_dbg(Ewk_Tiled_Backing_Store_Data *priv)
     656static void _ewk_tiled_backing_store_mem_dbg(Ewk_Tiled_Backing_Store_Data* priv)
    657657{
    658658    static int run = 0;
     
    671671}
    672672
    673 static Eina_Bool _ewk_tiled_backing_store_sig_usr(void *data, int type, void *event)
    674 {
    675     Ecore_Event_Signal_User *sig = (Ecore_Event_Signal_User*)event;
    676     Ewk_Tiled_Backing_Store_Data *priv = (Ewk_Tiled_Backing_Store_Data*)data;
     673static Eina_Bool _ewk_tiled_backing_store_sig_usr(void* data, int type, void* event)
     674{
     675    Ecore_Event_Signal_User* sig = (Ecore_Event_Signal_User*)event;
     676    Ewk_Tiled_Backing_Store_Data* priv = (Ewk_Tiled_Backing_Store_Data*)data;
    677677
    678678    if (sig->number == 2) {
    679         Ewk_Tile_Unused_Cache *tuc;
     679        Ewk_Tile_Unused_Cache* tuc;
    680680        tuc = ewk_tile_matrix_unused_cache_get(priv->model.matrix);
    681681        ewk_tile_unused_cache_auto_flush(tuc);
     
    688688#endif
    689689
    690 static void _ewk_tiled_backing_store_smart_add(Evas_Object *o)
    691 {
    692     Ewk_Tiled_Backing_Store_Data *priv;
    693 
    694     DBG("o=%p", o);
     690static void _ewk_tiled_backing_store_smart_add(Evas_Object* ewkTile)
     691{
     692    Ewk_Tiled_Backing_Store_Data* priv;
     693
     694    DBG("o=%p", ewkTile);
    695695
    696696    priv = static_cast<Ewk_Tiled_Backing_Store_Data*>(calloc(1, sizeof(*priv)));
     
    698698        return;
    699699
    700     priv->self = o;
     700    priv->self = ewkTile;
    701701    priv->view.tile.zoom = 1.0;
    702     priv->view.tile.w = DEFAULT_TILE_W;
    703     priv->view.tile.h = DEFAULT_TILE_H;
     702    priv->view.tile.width = DEFAULT_TILE_W;
     703    priv->view.tile.height = DEFAULT_TILE_H;
    704704    priv->view.offset.cur.x = 0;
    705705    priv->view.offset.cur.y = 0;
     
    720720    priv->cspace = EVAS_COLORSPACE_ARGB8888; // TODO: detect it.
    721721
    722     evas_object_smart_data_set(o, priv);
    723     _parent_sc.add(o);
     722    evas_object_smart_data_set(ewkTile, priv);
     723    _parent_sc.add(ewkTile);
    724724
    725725    priv->contents_clipper = evas_object_rectangle_add(
    726         evas_object_evas_get(o));
     726        evas_object_evas_get(ewkTile));
    727727    evas_object_move(priv->contents_clipper, 0, 0);
    728728    evas_object_resize(priv->contents_clipper,
     
    730730    evas_object_color_set(priv->contents_clipper, 255, 255, 255, 255);
    731731    evas_object_show(priv->contents_clipper);
    732     evas_object_smart_member_add(priv->contents_clipper, o);
     732    evas_object_smart_member_add(priv->contents_clipper, ewkTile);
    733733
    734734    _ewk_tiled_backing_store_model_matrix_create(priv, 0);
     
    739739#ifdef DEBUG_MEM_LEAKS
    740740    priv->sig_usr = ecore_event_handler_add
    741         (ECORE_EVENT_SIGNAL_USER, _ewk_tiled_backing_store_sig_usr, priv);
     741                        (ECORE_EVENT_SIGNAL_USER, _ewk_tiled_backing_store_sig_usr, priv);
    742742#endif
    743743}
    744744
    745 static void _ewk_tiled_backing_store_smart_del(Evas_Object *o)
    746 {
    747     PRIV_DATA_GET_OR_RETURN(o, priv);
    748     DBG("o=%p", o);
    749     Ewk_Tile_Unused_Cache *tuc;
     745static void _ewk_tiled_backing_store_smart_del(Evas_Object* ewkTile)
     746{
     747    PRIV_DATA_GET_OR_RETURN(ewkTile, priv);
     748    DBG("o=%p", ewkTile);
     749    Ewk_Tile_Unused_Cache* tuc;
    750750
    751751    tuc = ewk_tile_matrix_unused_cache_get(priv->model.matrix);
     
    768768    evas_object_del(priv->contents_clipper);
    769769
    770     _parent_sc.del(o);
     770    _parent_sc.del(ewkTile);
    771771
    772772#ifdef DEBUG_MEM_LEAKS
     
    776776}
    777777
    778 static void _ewk_tiled_backing_store_smart_move(Evas_Object *o, Evas_Coord x, Evas_Coord y)
    779 {
    780     DBG("o=%p, new pos: %dx%d", o, x, y);
    781 
    782     PRIV_DATA_GET_OR_RETURN(o, priv);
     778static void _ewk_tiled_backing_store_smart_move(Evas_Object* ewkTile, Evas_Coord x, Evas_Coord y)
     779{
     780    DBG("o=%p, new pos: %dx%d", ewkTile, x, y);
     781
     782    PRIV_DATA_GET_OR_RETURN(ewkTile, priv);
    783783
    784784    if (priv->changed.pos)
     
    792792}
    793793
    794 static void _ewk_tiled_backing_store_smart_resize(Evas_Object *o, Evas_Coord w, Evas_Coord h)
    795 {
    796     DBG("o=%p, new size: %dx%d", o, w, h);
    797 
    798     PRIV_DATA_GET_OR_RETURN(o, priv);
     794static void _ewk_tiled_backing_store_smart_resize(Evas_Object* ewkTile, Evas_Coord width, Evas_Coord height)
     795{
     796    DBG("o=%p, new size: %dx%d", ewkTile, width, height);
     797
     798    PRIV_DATA_GET_OR_RETURN(ewkTile, priv);
    799799
    800800    if (priv->changed.size)
    801801        return;
    802802
    803     if (priv->view.w == w && priv->view.h == h)
     803    if (priv->view.width == width && priv->view.height == height)
    804804        return;
    805805
     
    808808}
    809809
    810 static void _ewk_tiled_backing_store_recalc_renderers(Ewk_Tiled_Backing_Store_Data *priv, Evas_Coord w, Evas_Coord h, Evas_Coord tw, Evas_Coord th)
     810static void _ewk_tiled_backing_store_recalc_renderers(Ewk_Tiled_Backing_Store_Data* priv, Evas_Coord width, Evas_Coord height, Evas_Coord tileWidth, Evas_Coord tileHeight)
    811811{
    812812    long cols, rows, old_rows, old_cols;
    813     INF("o=%p, new size: %dx%d", priv->self, w, h);
    814 
    815     cols = 1 + (int)ceil((float)w / (float)tw);
    816     rows = 1 + (int)ceil((float)h / (float)th);
     813    INF("o=%p, new size: %dx%d", priv->self, width, height);
     814
     815    cols = 1 + static_cast<int>(ceil(static_cast<float>(width / tileWidth)));
     816    rows = 1 + static_cast<int>(ceil(static_cast<float>(height / tileHeight)));
    817817
    818818    INF("o=%p new grid size cols: %ld, rows: %ld, was %ld, %ld",
     
    826826
    827827    if (rows < old_rows) {
    828         Eina_Inlist **start, **end;
     828        Eina_Inlist** start, **end;
    829829        start = priv->view.items + rows;
    830830        end = priv->view.items + old_rows;
     
    840840    priv->view.cols = cols;
    841841    if (rows > old_rows) {
    842         Eina_Inlist **start, **end;
    843         start = priv->view.items + old_rows;
    844         end = priv->view.items + rows;
     842        Eina_Inlist** start = priv->view.items + old_rows;
     843        Eina_Inlist** end = priv->view.items + rows;
    845844        for (; start < end; start++) {
    846             Eina_Bool r;
    847845            *start = 0;
    848             r = _ewk_tiled_backing_store_view_cols_end_add
    849                 (priv, start, 0, cols);
     846            Eina_Bool r = _ewk_tiled_backing_store_view_cols_end_add(priv, start, 0, cols);
    850847            if (!r) {
    851848                CRITICAL("failed to allocate %ld columns", cols);
    852                 _ewk_tiled_backing_store_view_rows_range_del
    853                     (priv, priv->view.items + old_rows, start);
     849                _ewk_tiled_backing_store_view_rows_range_del(priv, priv->view.items + old_rows, start);
    854850                priv->view.rows = old_rows;
    855851                return;
     
    859855
    860856    if (cols != old_cols) {
    861         Eina_Inlist **start, **end;
    862857        int todo = cols - old_cols;
    863         start = priv->view.items;
    864         end = start + std::min(old_rows, rows);
     858        Eina_Inlist** start = priv->view.items;
     859        Eina_Inlist** end = start + std::min(old_rows, rows);
    865860        if (todo > 0) {
    866861            for (; start < end; start++) {
    867                 Eina_Bool r;
    868                 r = _ewk_tiled_backing_store_view_cols_end_add
    869                     (priv, start, old_cols, todo);
     862                Eina_Bool r = _ewk_tiled_backing_store_view_cols_end_add(priv, start, old_cols, todo);
    870863                if (!r) {
    871864                    CRITICAL("failed to allocate %d columns!", todo);
     
    892885}
    893886
    894 static void _ewk_tiled_backing_store_smart_calculate_size(Ewk_Tiled_Backing_Store_Data *priv, Evas_Coord w, Evas_Coord h)
    895 {
    896     evas_object_resize(priv->base.clipper, w, h);
    897 
    898     priv->view.w = w;
    899     priv->view.h = h;
     887static void _ewk_tiled_backing_store_smart_calculate_size(Ewk_Tiled_Backing_Store_Data* priv, Evas_Coord width, Evas_Coord height)
     888{
     889    evas_object_resize(priv->base.clipper, width, height);
     890
     891    priv->view.width = width;
     892    priv->view.height = height;
    900893
    901894    _ewk_tiled_backing_store_recalc_renderers(
    902         priv, w, h, priv->view.tile.w, priv->view.tile.h);
     895        priv, width, height, priv->view.tile.width, priv->view.tile.height);
    903896}
    904897
    905898// TODO: remove me later.
    906 static inline void _ewk_tiled_backing_store_view_dbg(const Ewk_Tiled_Backing_Store_Data *priv)
    907 {
    908     Eina_Inlist **start, **end;
     899static inline void _ewk_tiled_backing_store_view_dbg(const Ewk_Tiled_Backing_Store_Data* priv)
     900{
     901    Eina_Inlist** start, **end;
    909902    printf("tiles=%2ld,%2ld  model=%2ld,%2ld [%dx%d] base=%+3ld,%+4ld offset=%+4d,%+4d old=%+4d,%+4d base=%+3d,%+3d\n",
    910903           priv->view.cols, priv->view.rows,
     
    919912    end = priv->view.items + priv->view.rows;
    920913    for (; start < end; start++) {
    921         const Ewk_Tiled_Backing_Store_Item *it;
     914        const Ewk_Tiled_Backing_Store_Item* it;
    922915
    923916        EINA_INLIST_FOREACH(*start, it) {
     
    947940 * @param count the number of times to repeat the process.
    948941 */
    949 static void _ewk_tiled_backing_store_view_wrap_up(Ewk_Tiled_Backing_Store_Data *priv, Evas_Coord x, Evas_Coord y, unsigned int count)
     942static void _ewk_tiled_backing_store_view_wrap_up(Ewk_Tiled_Backing_Store_Data* priv, Evas_Coord x, Evas_Coord y, unsigned int count)
    950943{
    951944    unsigned int last_row = priv->view.rows - 1;
    952     Evas_Coord tw = priv->view.tile.w;
    953     Evas_Coord th = priv->view.tile.h;
     945    Evas_Coord tw = priv->view.tile.width;
     946    Evas_Coord th = priv->view.tile.height;
    954947    Evas_Coord off_y = priv->view.offset.base.y + count * th;
    955948    Evas_Coord oy = y + (last_row - count + 1) * th + off_y;
    956     Eina_Inlist **itr_start, **itr_end;
     949    Eina_Inlist** itr_start, **itr_end;
    957950
    958951    itr_start = priv->view.items;
     
    960953
    961954    for (; count > 0; count--) {
    962         Eina_Inlist **itr;
    963         Eina_Inlist *tmp = *itr_start;
    964         Ewk_Tiled_Backing_Store_Item *it;
     955        Eina_Inlist** itr;
     956        Eina_Inlist* tmp = *itr_start;
     957        Ewk_Tiled_Backing_Store_Item* it;
    965958        Evas_Coord ox = x + priv->view.offset.base.x;
    966959        int c = 0;
     
    995988 * @param count the number of times to repeat the process.
    996989 */
    997 static void _ewk_tiled_backing_store_view_wrap_down(Ewk_Tiled_Backing_Store_Data *priv, Evas_Coord x, Evas_Coord y, unsigned int count)
    998 {
    999     Evas_Coord tw = priv->view.tile.w;
    1000     Evas_Coord th = priv->view.tile.h;
     990static void _ewk_tiled_backing_store_view_wrap_down(Ewk_Tiled_Backing_Store_Data* priv, Evas_Coord x, Evas_Coord y, unsigned int count)
     991{
     992    Evas_Coord tw = priv->view.tile.width;
     993    Evas_Coord th = priv->view.tile.height;
    1001994    Evas_Coord off_y = priv->view.offset.base.y - count * th;
    1002995    Evas_Coord oy = y + off_y + (count - 1) * th;
    1003     Eina_Inlist **itr_start, **itr_end;
     996    Eina_Inlist** itr_start, **itr_end;
    1004997
    1005998    itr_start = priv->view.items + priv->view.rows - 1;
     
    10071000
    10081001    for (; count > 0; count--) {
    1009         Eina_Inlist **itr;
    1010         Eina_Inlist *tmp = *itr_start;
    1011         Ewk_Tiled_Backing_Store_Item *it;
     1002        Eina_Inlist** itr;
     1003        Eina_Inlist* tmp = *itr_start;
     1004        Ewk_Tiled_Backing_Store_Item* it;
    10121005        Evas_Coord ox = x + priv->view.offset.base.x;
    10131006        int c = 0;
     
    10421035 * @param count the number of times to repeat the process.
    10431036 */
    1044 static void _ewk_tiled_backing_store_view_wrap_left(Ewk_Tiled_Backing_Store_Data *priv, Evas_Coord x, Evas_Coord y, unsigned int count)
     1037static void _ewk_tiled_backing_store_view_wrap_left(Ewk_Tiled_Backing_Store_Data* priv, Evas_Coord x, Evas_Coord y, unsigned int count)
    10451038{
    10461039    unsigned int r, last_col = priv->view.cols - 1;
    1047     Evas_Coord tw = priv->view.tile.w;
    1048     Evas_Coord th = priv->view.tile.h;
     1040    Evas_Coord tw = priv->view.tile.width;
     1041    Evas_Coord th = priv->view.tile.height;
    10491042    Evas_Coord off_x = priv->view.offset.base.x + count * tw;
    10501043    Evas_Coord oy = y + priv->view.offset.base.y;
    1051     Eina_Inlist **itr;
    1052     Eina_Inlist **itr_end;
     1044    Eina_Inlist** itr;
     1045    Eina_Inlist** itr_end;
    10531046
    10541047    itr = priv->view.items;
     
    10631056
    10641057        for (i = 0; i < count; i++, c++, ox += tw) {
    1065             Ewk_Tiled_Backing_Store_Item *it;
     1058            Ewk_Tiled_Backing_Store_Item* it;
    10661059            it = EINA_INLIST_CONTAINER_GET(*itr, Ewk_Tiled_Backing_Store_Item);
    10671060            *itr = eina_inlist_demote(*itr, *itr);
     
    10891082 * @param count the number of times to repeat the process.
    10901083 */
    1091 static void _ewk_tiled_backing_store_view_wrap_right(Ewk_Tiled_Backing_Store_Data *priv, Evas_Coord x, Evas_Coord y, unsigned int count)
     1084static void _ewk_tiled_backing_store_view_wrap_right(Ewk_Tiled_Backing_Store_Data* priv, Evas_Coord x, Evas_Coord y, unsigned int count)
    10921085{
    10931086    unsigned int r;
    1094     Evas_Coord tw = priv->view.tile.w;
    1095     Evas_Coord th = priv->view.tile.h;
     1087    Evas_Coord tw = priv->view.tile.width;
     1088    Evas_Coord th = priv->view.tile.height;
    10961089    Evas_Coord off_x = priv->view.offset.base.x - count * tw;
    10971090    Evas_Coord oy = y + priv->view.offset.base.y;
    1098     Eina_Inlist **itr, **itr_end;
     1091    Eina_Inlist** itr, ** itr_end;
    10991092
    11001093    itr = priv->view.items;
     
    11091102
    11101103        for (i = 0; i < count; i++, c--, ox -= tw) {
    1111             Ewk_Tiled_Backing_Store_Item *it;
     1104            Ewk_Tiled_Backing_Store_Item* it;
    11121105            it = EINA_INLIST_CONTAINER_GET((*itr)->last, Ewk_Tiled_Backing_Store_Item);
    11131106            *itr = eina_inlist_promote(*itr, (*itr)->last);
     
    11221115}
    11231116
    1124 static void _ewk_tiled_backing_store_view_refill(Ewk_Tiled_Backing_Store_Data *priv, Evas_Coord x, Evas_Coord y, int step_x, int step_y)
    1125 {
    1126     Eina_Inlist **itr, **itr_end;
     1117static void _ewk_tiled_backing_store_view_refill(Ewk_Tiled_Backing_Store_Data* priv, Evas_Coord x, Evas_Coord y, int stepX, int stepY)
     1118{
     1119    Eina_Inlist** itr, **itr_end;
    11271120    Evas_Coord base_ox, oy, tw, th;
    11281121    unsigned int r;
     
    11301123    evas_object_move(priv->base.clipper, x, y);
    11311124
    1132     tw = priv->view.tile.w;
    1133     th = priv->view.tile.h;
     1125    tw = priv->view.tile.width;
     1126    th = priv->view.tile.height;
    11341127
    11351128    base_ox = x + priv->view.offset.base.x;
     
    11401133    r = 0;
    11411134
    1142     priv->model.base.col -= step_x;
    1143     priv->model.base.row -= step_y;
     1135    priv->model.base.col -= stepX;
     1136    priv->model.base.row -= stepY;
    11441137
    11451138    for (; itr < itr_end; itr++, r++) {
    1146         Ewk_Tiled_Backing_Store_Item *it;
     1139        Ewk_Tiled_Backing_Store_Item* it;
    11471140        Evas_Coord ox = base_ox;
    11481141        unsigned int c = 0;
     
    11571150}
    11581151
    1159 static void _ewk_tiled_backing_store_view_pos_apply(Ewk_Tiled_Backing_Store_Data *priv, Evas_Coord x, Evas_Coord y)
    1160 {
    1161     Eina_Inlist **itr, **itr_end;
     1152static void _ewk_tiled_backing_store_view_pos_apply(Ewk_Tiled_Backing_Store_Data* priv, Evas_Coord x, Evas_Coord y)
     1153{
     1154    Eina_Inlist** itr, **itr_end;
    11621155    Evas_Coord base_ox, oy, tw, th;
    11631156
    11641157    evas_object_move(priv->base.clipper, x, y);
    11651158
    1166     tw = priv->view.tile.w;
    1167     th = priv->view.tile.h;
     1159    tw = priv->view.tile.width;
     1160    th = priv->view.tile.height;
    11681161
    11691162    base_ox = x + priv->view.offset.base.x;
     
    11731166    itr_end = itr + priv->view.rows;
    11741167    for (; itr < itr_end; itr++) {
    1175         Ewk_Tiled_Backing_Store_Item *it;
     1168        Ewk_Tiled_Backing_Store_Item* it;
    11761169        Evas_Coord ox = base_ox;
    11771170        EINA_INLIST_FOREACH(*itr, it) {
     
    11831176}
    11841177
    1185 static void _ewk_tiled_backing_store_smart_calculate_offset_force(Ewk_Tiled_Backing_Store_Data *priv)
     1178static void _ewk_tiled_backing_store_smart_calculate_offset_force(Ewk_Tiled_Backing_Store_Data* priv)
    11861179{
    11871180    Evas_Coord dx = priv->view.offset.cur.x - priv->view.offset.old.x;
     
    11931186        priv->self, dx, dy, priv->view.offset.cur.x, priv->view.offset.cur.y);
    11941187
    1195     tw = priv->view.tile.w;
    1196     th = priv->view.tile.h;
     1188    tw = priv->view.tile.width;
     1189    th = priv->view.tile.height;
    11971190
    11981191    long new_col = -priv->view.offset.cur.x / tw;
     
    12151208}
    12161209
    1217 static void _ewk_tiled_backing_store_smart_calculate_offset(Ewk_Tiled_Backing_Store_Data *priv, Evas_Coord x, Evas_Coord y)
     1210static void _ewk_tiled_backing_store_smart_calculate_offset(Ewk_Tiled_Backing_Store_Data* priv, Evas_Coord x, Evas_Coord y)
    12181211{
    12191212    Evas_Coord dx = priv->view.offset.cur.x - priv->view.offset.old.x;
     
    12281221        return;
    12291222
    1230     tw = priv->view.tile.w;
    1231     th = priv->view.tile.h;
     1223    tw = priv->view.tile.width;
     1224    th = priv->view.tile.height;
    12321225
    12331226    long new_col = -priv->view.offset.cur.x / tw;
     
    12721265}
    12731266
    1274 static void _ewk_tiled_backing_store_smart_calculate_pos(Ewk_Tiled_Backing_Store_Data *priv, Evas_Coord x, Evas_Coord y)
     1267static void _ewk_tiled_backing_store_smart_calculate_pos(Ewk_Tiled_Backing_Store_Data* priv, Evas_Coord x, Evas_Coord y)
    12751268{
    12761269    _ewk_tiled_backing_store_view_pos_apply(priv, x, y);
     
    12831276}
    12841277
    1285 static void _ewk_tiled_backing_store_fill_renderers(Ewk_Tiled_Backing_Store_Data *priv)
    1286 {
    1287     Eina_Inlist *it;
    1288     Ewk_Tiled_Backing_Store_Item *item;
     1278static void _ewk_tiled_backing_store_fill_renderers(Ewk_Tiled_Backing_Store_Data* priv)
     1279{
     1280    Eina_Inlist* it;
     1281    Ewk_Tiled_Backing_Store_Item* item;
    12891282    int i, j;
    12901283
     
    12971290}
    12981291
    1299 static void _ewk_tiled_backing_store_smart_calculate(Evas_Object *o)
     1292static void _ewk_tiled_backing_store_smart_calculate(Evas_Object* ewkTile)
    13001293{
    13011294    Evas_Coord x, y, w, h;
    13021295
    1303     evas_object_geometry_get(o, &x, &y, &w, &h);
    1304     DBG("o=%p at %d,%d + %dx%d", o, x, y, w, h);
    1305 
    1306     PRIV_DATA_GET_OR_RETURN(o, priv);
     1296    evas_object_geometry_get(ewkTile, &x, &y, &w, &h);
     1297    DBG("o=%p at %d,%d + %dx%d", ewkTile, x, y, w, h);
     1298
     1299    PRIV_DATA_GET_OR_RETURN(ewkTile, priv);
    13071300
    13081301    priv->changed.any = EINA_FALSE;
     
    13131306        unsigned long cols, rows;
    13141307
    1315         cols = priv->model.width / priv->view.tile.w + 1;
    1316         rows = priv->model.height / priv->view.tile.h + 1;
     1308        cols = priv->model.width / priv->view.tile.width + 1;
     1309        rows = priv->model.height / priv->view.tile.height + 1;
    13171310
    13181311        priv->model.old.cols = priv->model.cur.cols;
     
    13491342        _ewk_tiled_backing_store_fill_renderers(priv);
    13501343        ewk_tile_matrix_resize(priv->model.matrix,
    1351                            priv->model.cur.cols,
    1352                            priv->model.cur.rows);
     1344                               priv->model.cur.cols,
     1345                               priv->model.cur.rows);
    13531346        priv->changed.model = EINA_FALSE;
    13541347        evas_object_resize(priv->contents_clipper, priv->model.width, priv->model.height);
     
    13581351         * repainting the whole viewport */
    13591352        const Eina_Rectangle r =
    1360             { 0, 0, priv->model.width, priv->model.height };
     1353        { 0, 0, priv->model.width, priv->model.height };
    13611354        ewk_tile_matrix_update(priv->model.matrix, &r,
    13621355                               priv->view.tile.zoom);
     
    13681361
    13691362    if (priv->view.offset.base.x > 0
    1370         || priv->view.offset.base.x <= - priv->view.tile.w
     1363        || priv->view.offset.base.x <= - priv->view.tile.width
    13711364        || priv->view.offset.base.y > 0
    1372         || priv->view.offset.base.y <= - priv->view.tile.h)
     1365        || priv->view.offset.base.y <= - priv->view.tile.height)
    13731366        ERR("incorrect base offset %+4d,%+4d, tile=%dx%d, cur=%+4d,%+4d\n",
    13741367            priv->view.offset.base.x, priv->view.offset.base.y,
    1375             priv->view.tile.w, priv->view.tile.h,
     1368            priv->view.tile.width, priv->view.tile.height,
    13761369            priv->view.offset.cur.x, priv->view.offset.cur.y);
    13771370
    13781371}
    13791372
    1380 Evas_Object *ewk_tiled_backing_store_add(Evas *e)
    1381 {
    1382     static Evas_Smart *smart = 0;
     1373Evas_Object* ewk_tiled_backing_store_add(Evas* canvas)
     1374{
     1375    static Evas_Smart* smart = 0;
    13831376
    13841377    if (_ewk_tiled_log_dom < 0)
     
    14031396    }
    14041397
    1405     return evas_object_smart_add(e, smart);
    1406 }
    1407 
    1408 void ewk_tiled_backing_store_render_cb_set(Evas_Object *o, Eina_Bool (*cb)(void *data, Ewk_Tile *t, const Eina_Rectangle *area), const void *data)
    1409 {
    1410     EINA_SAFETY_ON_NULL_RETURN(cb);
    1411     PRIV_DATA_GET_OR_RETURN(o, priv);
    1412     priv->render.cb = cb;
     1398    return evas_object_smart_add(canvas, smart);
     1399}
     1400
     1401void ewk_tiled_backing_store_render_cb_set(Evas_Object* ewkTile, Eina_Bool (*callback)(void* data, Ewk_Tile* tile, const Eina_Rectangle* area), const void* data)
     1402{
     1403    EINA_SAFETY_ON_NULL_RETURN(callback);
     1404    PRIV_DATA_GET_OR_RETURN(ewkTile, priv);
     1405    priv->render.cb = callback;
    14131406    priv->render.data = (void*)data;
    14141407}
    14151408
    1416 Ewk_Tile_Unused_Cache *ewk_tiled_backing_store_tile_unused_cache_get(const Evas_Object *o)
    1417 {
    1418     PRIV_DATA_GET_OR_RETURN(o, priv, 0);
     1409Ewk_Tile_Unused_Cache* ewk_tiled_backing_store_tile_unused_cache_get(const Evas_Object* ewkTile)
     1410{
     1411    PRIV_DATA_GET_OR_RETURN(ewkTile, priv, 0);
    14191412    return ewk_tile_matrix_unused_cache_get(priv->model.matrix);
    14201413}
    14211414
    1422 void ewk_tiled_backing_store_tile_unused_cache_set(Evas_Object *o, Ewk_Tile_Unused_Cache *tuc)
    1423 {
    1424     PRIV_DATA_GET_OR_RETURN(o, priv);
    1425 
    1426     if (ewk_tile_matrix_unused_cache_get(priv->model.matrix) == tuc)
    1427         return;
    1428 
    1429     _ewk_tiled_backing_store_model_matrix_create(priv, tuc);
    1430 }
    1431 
    1432 static Eina_Bool _ewk_tiled_backing_store_scroll_full_offset_set_internal(Ewk_Tiled_Backing_Store_Data *priv, Evas_Coord x, Evas_Coord y)
     1415void ewk_tiled_backing_store_tile_unused_cache_set(Evas_Object* ewkTile, Ewk_Tile_Unused_Cache* tileUnusedCache)
     1416{
     1417    PRIV_DATA_GET_OR_RETURN(ewkTile, priv);
     1418
     1419    if (ewk_tile_matrix_unused_cache_get(priv->model.matrix) == tileUnusedCache)
     1420        return;
     1421
     1422    _ewk_tiled_backing_store_model_matrix_create(priv, tileUnusedCache);
     1423}
     1424
     1425static Eina_Bool _ewk_tiled_backing_store_scroll_full_offset_set_internal(Ewk_Tiled_Backing_Store_Data* priv, Evas_Coord x, Evas_Coord y)
    14331426{
    14341427    /* TODO: check offset go out of bounds, clamp */
     
    14451438}
    14461439
    1447 Eina_Bool ewk_tiled_backing_store_scroll_full_offset_set(Evas_Object *o, Evas_Coord x, Evas_Coord y)
    1448 {
    1449     DBG("o=%p, x=%d, y=%d", o, x, y);
    1450 
    1451     PRIV_DATA_GET_OR_RETURN(o, priv, EINA_FALSE);
     1440Eina_Bool ewk_tiled_backing_store_scroll_full_offset_set(Evas_Object* ewkTile, Evas_Coord x, Evas_Coord y)
     1441{
     1442    DBG("o=%p, x=%d, y=%d", ewkTile, x, y);
     1443
     1444    PRIV_DATA_GET_OR_RETURN(ewkTile, priv, EINA_FALSE);
    14521445    if (x == priv->view.offset.cur.x && y == priv->view.offset.cur.y)
    14531446        return EINA_TRUE;
     
    14561449}
    14571450
    1458 Eina_Bool ewk_tiled_backing_store_scroll_full_offset_add(Evas_Object *o, Evas_Coord dx, Evas_Coord dy)
    1459 {
    1460     DBG("o=%p, dx=%d, dy=%d", o, dx, dy);
    1461 
    1462     PRIV_DATA_GET_OR_RETURN(o, priv, EINA_FALSE);
     1451Eina_Bool ewk_tiled_backing_store_scroll_full_offset_add(Evas_Object* ewkTile, Evas_Coord dx, Evas_Coord dy)
     1452{
     1453    DBG("o=%p, dx=%d, dy=%d", ewkTile, dx, dy);
     1454
     1455    PRIV_DATA_GET_OR_RETURN(ewkTile, priv, EINA_FALSE);
    14631456    if (!dx && !dy)
    14641457        return EINA_TRUE;
    14651458
    14661459    return _ewk_tiled_backing_store_scroll_full_offset_set_internal
    1467         (priv, priv->view.offset.cur.x + dx, priv->view.offset.cur.y + dy);
    1468 }
    1469 
    1470 static Eina_Bool _ewk_tiled_backing_store_zoom_set_internal(Ewk_Tiled_Backing_Store_Data *priv, float *zoom, Evas_Coord cx, Evas_Coord cy, Evas_Coord *offx, Evas_Coord *offy)
    1471 {
    1472     *offx = priv->view.offset.cur.x;
    1473     *offy = priv->view.offset.cur.y;
     1460               (priv, priv->view.offset.cur.x + dx, priv->view.offset.cur.y + dy);
     1461}
     1462
     1463static Eina_Bool _ewk_tiled_backing_store_zoom_set_internal(Ewk_Tiled_Backing_Store_Data* priv, float* zoom, Evas_Coord currentX, Evas_Coord currentY, Evas_Coord* offsetX, Evas_Coord* offsetY)
     1464{
     1465    *offsetX = priv->view.offset.cur.x;
     1466    *offsetY = priv->view.offset.cur.y;
    14741467
    14751468    if (fabsf(priv->view.tile.zoom - *zoom) < ZOOM_STEP_MIN) {
     
    14821475    Evas_Coord tw, th;
    14831476
    1484     *zoom = ROUNDED_ZOOM(priv->view.tile.w, *zoom);
    1485 
    1486     tw = priv->view.tile.w;
    1487     th = priv->view.tile.h;
     1477    *zoom = ROUNDED_ZOOM(priv->view.tile.width, *zoom);
     1478
     1479    tw = priv->view.tile.width;
     1480    th = priv->view.tile.height;
    14881481
    14891482    float scale = *zoom / priv->view.tile.zoom;
    14901483
    14911484    priv->view.tile.zoom = *zoom;
    1492     // todo: check cx [0, w]...
    1493     priv->view.offset.zoom_center.x = cx;
    1494     priv->view.offset.zoom_center.y = cy;
    1495 
    1496 
    1497     if (!priv->view.w || !priv->view.h) {
     1485    // todo: check currentX [0, w]...
     1486    priv->view.offset.zoom_center.x = currentX;
     1487    priv->view.offset.zoom_center.y = currentY;
     1488
     1489
     1490    if (!priv->view.width || !priv->view.height) {
    14981491        priv->view.offset.base.x = 0;
    14991492        priv->view.offset.base.y = 0;
    15001493        return EINA_TRUE;
    15011494    }
    1502     Eina_Inlist **itr, **itr_end;
    1503     Ewk_Tiled_Backing_Store_Item *it;
    1504 
    1505     Evas_Coord new_x = cx + (priv->view.offset.cur.x - cx) * scale;
    1506     Evas_Coord new_y = cy + (priv->view.offset.cur.y - cy) * scale;
    1507 
    1508     Evas_Coord model_width = priv->model.width * scale;
    1509     Evas_Coord model_height = priv->model.height * scale;
    1510 
    1511     if (model_width < priv->view.w || new_x >= 0)
     1495    Eina_Inlist** itr, **itr_end;
     1496    Ewk_Tiled_Backing_Store_Item* it;
     1497
     1498    Evas_Coord new_x = currentX + (priv->view.offset.cur.x - currentX) * scale;
     1499    Evas_Coord new_y = currentY + (priv->view.offset.cur.y - currentY) * scale;
     1500
     1501    Evas_Coord model_w = priv->model.width * scale;
     1502    Evas_Coord model_h = priv->model.height * scale;
     1503
     1504    if (model_w < priv->view.width || new_x >= 0)
    15121505        new_x = 0;
    1513     else if (-new_x + priv->view.w >= model_width)
    1514         new_x = -model_width + priv->view.w;
    1515 
    1516     if (model_height < priv->view.h || new_y >= 0)
     1506    else if (-new_x + priv->view.width >= model_w)
     1507        new_x = -model_w + priv->view.width;
     1508
     1509    if (model_h < priv->view.height || new_y >= 0)
    15171510        new_y = 0;
    1518     else if (-new_y + priv->view.h >= model_height)
    1519         new_y = -model_height + priv->view.h;
     1511    else if (-new_y + priv->view.height >= model_h)
     1512        new_y = -model_h + priv->view.height;
    15201513
    15211514    Evas_Coord bx = new_x % tw;
     
    15351528    priv->view.offset.old.x = priv->view.offset.cur.x;
    15361529    priv->view.offset.old.y = priv->view.offset.cur.y;
    1537     *offx = priv->view.offset.cur.x;
    1538     *offy = priv->view.offset.cur.y;
     1530    *offsetX = priv->view.offset.cur.x;
     1531    *offsetY = priv->view.offset.cur.y;
    15391532
    15401533    evas_object_move(
     
    15531546    for (; itr < itr_end; itr++) {
    15541547        Evas_Coord ox = base_ox;
    1555         Eina_Inlist *lst = *itr;
     1548        Eina_Inlist* lst = *itr;
    15561549
    15571550        EINA_INLIST_FOREACH(lst, it) {
     
    15661559}
    15671560
    1568 Eina_Bool ewk_tiled_backing_store_zoom_set(Evas_Object *o, float *zoom, Evas_Coord cx, Evas_Coord cy, Evas_Coord *offx, Evas_Coord *offy)
    1569 {
    1570     DBG("o=%p, zoom=%f", o, (double)*zoom);
    1571 
    1572     PRIV_DATA_GET_OR_RETURN(o, priv, EINA_FALSE);
    1573 
    1574     return _ewk_tiled_backing_store_zoom_set_internal(priv, zoom, cx, cy, offx, offy);
    1575 }
    1576 
    1577 Eina_Bool ewk_tiled_backing_store_zoom_weak_set(Evas_Object *o, float zoom, Evas_Coord cx, Evas_Coord cy)
    1578 {
    1579     DBG("o=%p, zoom=%f", o, (double)zoom);
    1580     PRIV_DATA_GET_OR_RETURN(o, priv, EINA_FALSE);
    1581     if (!priv->view.w || !priv->view.h)
     1561Eina_Bool ewk_tiled_backing_store_zoom_set(Evas_Object* ewkTile, float* zoom, Evas_Coord currentX, Evas_Coord currentY, Evas_Coord* offsetX, Evas_Coord* offsetY)
     1562{
     1563    DBG("o=%p, zoom=%f", ewkTile, *zoom);
     1564
     1565    PRIV_DATA_GET_OR_RETURN(ewkTile, priv, EINA_FALSE);
     1566
     1567    return _ewk_tiled_backing_store_zoom_set_internal(priv, zoom, currentX, currentY, offsetX, offsetY);
     1568}
     1569
     1570Eina_Bool ewk_tiled_backing_store_zoom_weak_set(Evas_Object* ewkTile, float zoom, Evas_Coord currentX, Evas_Coord currentY)
     1571{
     1572    DBG("o=%p, zoom=%f", ewkTile, zoom);
     1573    PRIV_DATA_GET_OR_RETURN(ewkTile, priv, EINA_FALSE);
     1574    if (!priv->view.width || !priv->view.height)
    15821575        return EINA_FALSE;
    1583     Eina_Inlist **itr, **itr_end;
    1584     Ewk_Tiled_Backing_Store_Item *it;
     1576    Eina_Inlist** itr, ** itr_end;
     1577    Ewk_Tiled_Backing_Store_Item* it;
    15851578    Evas_Coord tw, th;
    15861579    Eina_Bool recalc = EINA_FALSE;
     
    15881581    float scale = zoom / priv->view.tile.zoom;
    15891582
    1590     tw = TILE_SIZE_AT_ZOOM(priv->view.tile.w, scale);
    1591     scale = TILE_ZOOM_AT_SIZE(tw, priv->view.tile.w);
    1592     th = TILE_SIZE_AT_ZOOM(priv->view.tile.h, scale);
     1583    tw = TILE_SIZE_AT_ZOOM(priv->view.tile.width, scale);
     1584    scale = TILE_ZOOM_AT_SIZE(tw, priv->view.tile.width);
     1585    th = TILE_SIZE_AT_ZOOM(priv->view.tile.height, scale);
    15931586    zoom = scale * priv->view.tile.zoom;
    15941587
    1595     Evas_Coord model_width = priv->model.width * scale;
    1596     Evas_Coord model_height = priv->model.height * scale;
    1597 
    1598     evas_object_resize(priv->contents_clipper, model_width, model_height);
    1599 
    1600     int vrows = ceil((float)priv->view.h / (float)th) + 1;
    1601     int vcols = ceil((float)priv->view.w / (float)tw) + 1;
    1602     Evas_Coord new_x = cx + (priv->view.offset.cur.x - cx) * scale;
    1603     Evas_Coord new_y = cy + (priv->view.offset.cur.y - cy) * scale;
     1588    Evas_Coord model_w = priv->model.width * scale;
     1589    Evas_Coord model_h = priv->model.height * scale;
     1590
     1591    evas_object_resize(priv->contents_clipper, model_w, model_h);
     1592
     1593    int vrows = static_cast<int>(ceil(static_cast<float>(priv->view.height / th)) + 1);
     1594    int vcols = static_cast<int>(ceil(static_cast<float>(priv->view.width / tw)) + 1);
     1595    Evas_Coord new_x = currentX + (priv->view.offset.cur.x - currentX) * scale;
     1596    Evas_Coord new_y = currentY + (priv->view.offset.cur.y - currentY) * scale;
    16041597    Evas_Coord bx = new_x % tw;
    16051598    Evas_Coord by = new_y % th;
     
    16171610
    16181611    if (recalc) {
    1619         Evas_Coord w, h;
    1620         evas_object_geometry_get(o, 0, 0, &w, &h);
    1621         _ewk_tiled_backing_store_recalc_renderers(priv, w, h, tw, th);
     1612        Evas_Coord width, height;
     1613        evas_object_geometry_get(ewkTile, 0, 0, &width, &height);
     1614        _ewk_tiled_backing_store_recalc_renderers(priv, width, height, tw, th);
    16221615        _ewk_tiled_backing_store_fill_renderers(priv);
    16231616        _ewk_tiled_backing_store_updates_process(priv);
     
    16361629    for (; itr < itr_end; itr++) {
    16371630        Evas_Coord ox = base_ox;
    1638         Eina_Inlist *lst = *itr;
     1631        Eina_Inlist* lst = *itr;
    16391632
    16401633        EINA_INLIST_FOREACH(lst, it) {
     
    16491642}
    16501643
    1651 void ewk_tiled_backing_store_fix_offsets(Evas_Object *o, Evas_Coord w, Evas_Coord h)
    1652 {
    1653     PRIV_DATA_GET_OR_RETURN(o, priv);
    1654     Eina_Inlist **itr, **itr_end;
    1655     Ewk_Tiled_Backing_Store_Item *it;
     1644void ewk_tiled_backing_store_fix_offsets(Evas_Object* ewkTile, Evas_Coord width, Evas_Coord height)
     1645{
     1646    PRIV_DATA_GET_OR_RETURN(ewkTile, priv);
     1647    Eina_Inlist** itr, **itr_end;
     1648    Ewk_Tiled_Backing_Store_Item* it;
    16561649    Evas_Coord new_x = priv->view.offset.cur.x;
    16571650    Evas_Coord new_y = priv->view.offset.cur.y;
    16581651    Evas_Coord bx = priv->view.offset.base.x;
    16591652    Evas_Coord by = priv->view.offset.base.y;
    1660     Evas_Coord tw = priv->view.tile.w;
    1661     Evas_Coord th = priv->view.tile.h;
    1662 
    1663     if (-new_x > w) {
    1664         new_x = -w;
     1653    Evas_Coord tw = priv->view.tile.width;
     1654    Evas_Coord th = priv->view.tile.height;
     1655
     1656    if (-new_x > width) {
     1657        new_x = -width;
    16651658        bx = new_x % tw;
    16661659        priv->model.base.col = -new_x / tw;
    16671660    }
    16681661
    1669     if (-new_y > h) {
    1670         new_y = -h;
     1662    if (-new_y > height) {
     1663        new_y = -height;
    16711664        by = new_y % th;
    16721665        priv->model.base.row = -new_y / th;
    16731666    }
    16741667
    1675     if (bx >= 0 || bx <= -2 * priv->view.tile.w) {
     1668    if (bx >= 0 || bx <= -2 * priv->view.tile.width) {
    16761669        bx = new_x % tw;
    16771670        priv->model.base.col = -new_x / tw;
    16781671    }
    16791672
    1680     if (by >= 0 || by <= -2 * priv->view.tile.h) {
     1673    if (by >= 0 || by <= -2 * priv->view.tile.height) {
    16811674        by = new_y % th;
    16821675        priv->model.base.row = -new_y / th;
     
    17011694    for (; itr < itr_end; itr++) {
    17021695        Evas_Coord ox = base_ox;
    1703         Eina_Inlist *lst = *itr;
     1696        Eina_Inlist* lst = *itr;
    17041697
    17051698        EINA_INLIST_FOREACH(lst, it) {
     
    17121705}
    17131706
    1714 void ewk_tiled_backing_store_zoom_weak_smooth_scale_set(Evas_Object *o, Eina_Bool smooth_scale)
    1715 {
    1716     PRIV_DATA_GET_OR_RETURN(o, priv);
    1717     Eina_Inlist **itr, **itr_end;
     1707void ewk_tiled_backing_store_zoom_weak_smooth_scale_set(Evas_Object* ewkTile, Eina_Bool smoothScale)
     1708{
     1709    PRIV_DATA_GET_OR_RETURN(ewkTile, priv);
     1710    Eina_Inlist** itr, **itr_end;
    17181711
    17191712    itr = priv->view.items;
    17201713    itr_end = itr + priv->view.rows;
    1721     priv->view.tile.zoom_weak_smooth_scale = smooth_scale;
     1714    priv->view.tile.zoom_weak_smooth_scale = smoothScale;
    17221715
    17231716    for (; itr< itr_end; itr++) {
    1724         Ewk_Tiled_Backing_Store_Item *it;
     1717        Ewk_Tiled_Backing_Store_Item* it;
    17251718        EINA_INLIST_FOREACH(*itr, it)
    17261719            if (it->tile)
    17271720                _ewk_tiled_backing_store_item_smooth_scale_set
    1728                     (it, smooth_scale);
    1729     }
    1730 }
    1731 
    1732 Eina_Bool ewk_tiled_backing_store_update(Evas_Object *o, const Eina_Rectangle *update)
    1733 {
    1734     PRIV_DATA_GET_OR_RETURN(o, priv, EINA_FALSE);
     1721                    (it, smoothScale);
     1722    }
     1723}
     1724
     1725Eina_Bool ewk_tiled_backing_store_update(Evas_Object* ewkTile, const Eina_Rectangle* update)
     1726{
     1727    PRIV_DATA_GET_OR_RETURN(ewkTile, priv, EINA_FALSE);
    17351728
    17361729    if (priv->render.disabled)
     
    17411734}
    17421735
    1743 void ewk_tiled_backing_store_updates_process_pre_set(Evas_Object *o, void *(*cb)(void *data, Evas_Object *o), const void *data)
    1744 {
    1745     PRIV_DATA_GET_OR_RETURN(o, priv);
    1746     priv->process.pre_cb = cb;
     1736void ewk_tiled_backing_store_updates_process_pre_set(Evas_Object* ewkTile, void* (*callback)(void* data, Evas_Object *ewkTile), const void* data)
     1737{
     1738    PRIV_DATA_GET_OR_RETURN(ewkTile, priv);
     1739    priv->process.pre_cb = callback;
    17471740    priv->process.pre_data = (void*)data;
    17481741}
    17491742
    1750 void ewk_tiled_backing_store_updates_process_post_set(Evas_Object *o, void *(*cb)(void *data, void *pre_data, Evas_Object *o), const void *data)
    1751 {
    1752     PRIV_DATA_GET_OR_RETURN(o, priv);
    1753     priv->process.post_cb = cb;
     1743void ewk_tiled_backing_store_updates_process_post_set(Evas_Object* ewkTile, void* (*callback)(void* data, void* pre_data, Evas_Object *ewkTile), const void* data)
     1744{
     1745    PRIV_DATA_GET_OR_RETURN(ewkTile, priv);
     1746    priv->process.post_cb = callback;
    17541747    priv->process.post_data = (void*)data;
    17551748}
    17561749
    1757 void ewk_tiled_backing_store_updates_process(Evas_Object *o)
    1758 {
    1759     PRIV_DATA_GET_OR_RETURN(o, priv);
     1750void ewk_tiled_backing_store_updates_process(Evas_Object* ewkTile)
     1751{
     1752    PRIV_DATA_GET_OR_RETURN(ewkTile, priv);
    17601753    _ewk_tiled_backing_store_updates_process(priv);
    17611754}
    17621755
    1763 void ewk_tiled_backing_store_updates_clear(Evas_Object *o)
    1764 {
    1765     PRIV_DATA_GET_OR_RETURN(o, priv);
     1756void ewk_tiled_backing_store_updates_clear(Evas_Object* ewkTile)
     1757{
     1758    PRIV_DATA_GET_OR_RETURN(ewkTile, priv);
    17661759
    17671760    ewk_tile_matrix_updates_clear(priv->model.matrix);
    17681761}
    17691762
    1770 void ewk_tiled_backing_store_contents_resize(Evas_Object *o, Evas_Coord width, Evas_Coord height)
    1771 {
    1772     PRIV_DATA_GET_OR_RETURN(o, priv);
     1763void ewk_tiled_backing_store_contents_resize(Evas_Object* ewkTile, Evas_Coord width, Evas_Coord height)
     1764{
     1765    PRIV_DATA_GET_OR_RETURN(ewkTile, priv);
    17731766
    17741767    if (width == priv->model.width && height == priv->model.height)
     
    17791772    priv->changed.model = EINA_TRUE;
    17801773
    1781     DBG("width,height=%d, %d", width, height);
     1774    DBG("w,h=%d, %d", width, height);
    17821775    _ewk_tiled_backing_store_changed(priv);
    17831776}
    17841777
    1785 void ewk_tiled_backing_store_disabled_update_set(Evas_Object *o, Eina_Bool value)
    1786 {
    1787     PRIV_DATA_GET_OR_RETURN(o, priv);
     1778void ewk_tiled_backing_store_disabled_update_set(Evas_Object* ewkTile, Eina_Bool value)
     1779{
     1780    PRIV_DATA_GET_OR_RETURN(ewkTile, priv);
    17881781
    17891782    if (value != priv->render.disabled)
     
    17911784}
    17921785
    1793 void ewk_tiled_backing_store_flush(Evas_Object *o)
    1794 {
    1795     PRIV_DATA_GET_OR_RETURN(o, priv);
    1796     Ewk_Tile_Unused_Cache *tuc = 0;
     1786void ewk_tiled_backing_store_flush(Evas_Object* ewkTile)
     1787{
     1788    PRIV_DATA_GET_OR_RETURN(ewkTile, priv);
     1789    Ewk_Tile_Unused_Cache* tuc = 0;
    17971790
    17981791    priv->view.offset.cur.x = 0;
     
    18261819}
    18271820
    1828 Eina_Bool ewk_tiled_backing_store_pre_render_region(Evas_Object *o, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, float zoom)
    1829 {
    1830     PRIV_DATA_GET_OR_RETURN(o, priv, EINA_FALSE);
     1821Eina_Bool ewk_tiled_backing_store_pre_render_region(Evas_Object* ewkTile, Evas_Coord x, Evas_Coord y, Evas_Coord width, Evas_Coord height, float zoom)
     1822{
     1823    PRIV_DATA_GET_OR_RETURN(ewkTile, priv, EINA_FALSE);
    18311824    Eina_Tile_Grid_Slicer slicer;
    1832     const Eina_Tile_Grid_Info *info;
     1825    const Eina_Tile_Grid_Info* info;
    18331826    Evas_Coord tw, th;
    1834     Ewk_Tile_Unused_Cache *tuc;
    1835 
    1836     tw = priv->view.tile.w;
    1837     th = priv->view.tile.h;
    1838     zoom = ROUNDED_ZOOM(priv->view.tile.w, zoom);
    1839 
    1840     if (!eina_tile_grid_slicer_setup(&slicer, x, y, w, h, tw, th)) {
     1827    Ewk_Tile_Unused_Cache* tuc;
     1828
     1829    tw = priv->view.tile.width;
     1830    th = priv->view.tile.height;
     1831    zoom = ROUNDED_ZOOM(priv->view.tile.width, zoom);
     1832
     1833    if (!eina_tile_grid_slicer_setup(&slicer, x, y, width, height, tw, th)) {
    18411834        ERR("could not setup grid slicer for %d,%d+%dx%d tile=%dx%d",
    1842             x, y, w, h, tw, th);
     1835            x, y, width, height, tw, th);
    18431836        return EINA_FALSE;
    18441837    }
     
    18541847
    18551848    tuc = ewk_tile_matrix_unused_cache_get(priv->model.matrix);
    1856     ewk_tile_unused_cache_lock_area(tuc, x, y, w, h, zoom);
     1849    ewk_tile_unused_cache_lock_area(tuc, x, y, width, height, zoom);
    18571850    return EINA_TRUE;
    18581851}
    18591852
    1860 Eina_Bool ewk_tiled_backing_store_pre_render_relative_radius(Evas_Object *o, unsigned int n, float zoom)
    1861 {
    1862     PRIV_DATA_GET_OR_RETURN(o, priv, EINA_FALSE);
    1863     unsigned long start_row, end_row, start_col, end_col, i, j, w, h;
    1864     Ewk_Tile_Unused_Cache *tuc;
     1853Eina_Bool ewk_tiled_backing_store_pre_render_relative_radius(Evas_Object* ewkTile, unsigned int n, float zoom)
     1854{
     1855    PRIV_DATA_GET_OR_RETURN(ewkTile, priv, EINA_FALSE);
     1856    unsigned long start_row, end_row, start_col, end_col, i, j, width, height;
     1857    Ewk_Tile_Unused_Cache* tuc;
    18651858
    18661859    INF("priv->model.base.row =%ld, n=%u priv->view.rows=%lu",
    1867             priv->model.base.row, n, priv->view.rows);
     1860        priv->model.base.row, n, priv->view.rows);
    18681861    start_row = (long)priv->model.base.row - n;
    18691862    start_col = (long)priv->model.base.col - n;
    18701863    end_row = std::min(priv->model.cur.rows - 1,
    1871                   priv->model.base.row + priv->view.rows + n - 1);
     1864                       priv->model.base.row + priv->view.rows + n - 1);
    18721865    end_col = std::min(priv->model.cur.cols - 1,
    1873                   priv->model.base.col + priv->view.cols + n - 1);
     1866                       priv->model.base.col + priv->view.cols + n - 1);
    18741867
    18751868    INF("start_row=%lu, end_row=%lu, start_col=%lu, end_col=%lu",
    1876          start_row, end_row, start_col, end_col);
    1877 
    1878     zoom = ROUNDED_ZOOM(priv->view.tile.w, zoom);
     1869        start_row, end_row, start_col, end_col);
     1870
     1871    zoom = ROUNDED_ZOOM(priv->view.tile.width, zoom);
    18791872
    18801873    for (i = start_row; i <= end_row; i++)
     
    18871880
    18881881    tuc = ewk_tile_matrix_unused_cache_get(priv->model.matrix);
    1889     h = (end_row - start_row + 1) * TILE_SIZE_AT_ZOOM(priv->view.tile.h, zoom);
    1890     w = (end_col - start_col + 1) * TILE_SIZE_AT_ZOOM(priv->view.tile.w, zoom);
     1882    height = (end_row - start_row + 1) * TILE_SIZE_AT_ZOOM(priv->view.tile.height, zoom);
     1883    width = (end_col - start_col + 1) * TILE_SIZE_AT_ZOOM(priv->view.tile.width, zoom);
    18911884    ewk_tile_unused_cache_lock_area(tuc,
    1892             start_col * TILE_SIZE_AT_ZOOM(priv->view.tile.w, zoom),
    1893             start_row * TILE_SIZE_AT_ZOOM(priv->view.tile.h, zoom), w, h, zoom);
     1885                                    start_col * TILE_SIZE_AT_ZOOM(priv->view.tile.width, zoom),
     1886                                    start_row * TILE_SIZE_AT_ZOOM(priv->view.tile.height, zoom), width, height, zoom);
    18941887
    18951888    return EINA_TRUE;
    18961889}
    18971890
    1898 void ewk_tiled_backing_store_pre_render_cancel(Evas_Object *o)
    1899 {
    1900     PRIV_DATA_GET_OR_RETURN(o, priv);
    1901     Ewk_Tile_Unused_Cache *tuc;
     1891void ewk_tiled_backing_store_pre_render_cancel(Evas_Object* ewkTile)
     1892{
     1893    PRIV_DATA_GET_OR_RETURN(ewkTile, priv);
     1894    Ewk_Tile_Unused_Cache* tuc;
    19021895
    19031896    _ewk_tiled_backing_store_pre_render_request_clear(priv);
     
    19071900}
    19081901
    1909 Eina_Bool ewk_tiled_backing_store_disable_render(Evas_Object *o)
    1910 {
    1911     PRIV_DATA_GET_OR_RETURN(o, priv, EINA_FALSE);
     1902Eina_Bool ewk_tiled_backing_store_disable_render(Evas_Object* ewkTile)
     1903{
     1904    PRIV_DATA_GET_OR_RETURN(ewkTile, priv, EINA_FALSE);
    19121905    return _ewk_tiled_backing_store_disable_render(priv);
    19131906}
    19141907
    1915 Eina_Bool ewk_tiled_backing_store_enable_render(Evas_Object *o)
    1916 {
    1917     PRIV_DATA_GET_OR_RETURN(o, priv, EINA_FALSE);
     1908Eina_Bool ewk_tiled_backing_store_enable_render(Evas_Object* ewkTile)
     1909{
     1910    PRIV_DATA_GET_OR_RETURN(ewkTile, priv, EINA_FALSE);
    19181911    _ewk_tiled_backing_store_changed(priv);
    19191912    return _ewk_tiled_backing_store_enable_render(priv);
  • trunk/Source/WebKit/efl/ewk/ewk_tiled_backing_store.h

    r96495 r97329  
    7373
    7474    /** Never ever change those after tile is created (respect const!) */
    75     const Evas_Coord w, h;        /**< tile size (see TILE_SIZE_AT_ZOOM()) */
     75    const Evas_Coord width, height;        /**< tile size (see TILE_SIZE_AT_ZOOM()) */
    7676    const Evas_Colorspace cspace; /**< colorspace */
    7777    const float zoom;             /**< zoom level contents were rendered at */
     
    9191Evas_Object* ewk_tiled_backing_store_add(Evas* e);
    9292
    93 void ewk_tiled_backing_store_render_cb_set(Evas_Object *o, Eina_Bool (* cb)(void* data, Ewk_Tile* t, const Eina_Rectangle* area), const void* data);
     93void ewk_tiled_backing_store_render_cb_set(Evas_Object *o, Eina_Bool (*cb)(void* data, Ewk_Tile* t, const Eina_Rectangle* area), const void* data);
    9494
    9595Eina_Bool ewk_tiled_backing_store_scroll_full_offset_set(Evas_Object* o, Evas_Coord x, Evas_Coord y);
  • trunk/Source/WebKit/efl/ewk/ewk_tiled_matrix.cpp

    r96495 r97329  
    3333
    3434struct _Ewk_Tile_Matrix {
    35     Eina_Matrixsparse *matrix;
    36     Ewk_Tile_Unused_Cache *tuc;
     35    Eina_Matrixsparse* matrix;
     36    Ewk_Tile_Unused_Cache* tuc;
    3737    Evas_Colorspace cspace;
    3838    struct {
    39         void (*cb)(void *data, Ewk_Tile *t, const Eina_Rectangle *update);
    40         void *data;
     39        void (*cb)(void* data, Ewk_Tile* tile, const Eina_Rectangle* update);
     40        void* data;
    4141    } render;
    4242    unsigned int frozen;
    43     Eina_List *updates;
     43    Eina_List* updates;
    4444    struct {
    45         Evas_Coord w, h;
     45        Evas_Coord width, height;
    4646    } tile;
    4747#ifdef DEBUG_MEM_LEAKS
     
    6060
    6161/* called when matrixsparse is resized or freed */
    62 static void _ewk_tile_matrix_cell_free(void *user_data, void *cell_data)
    63 {
    64     Ewk_Tile_Matrix* tm = static_cast<Ewk_Tile_Matrix*>(user_data);
    65     Ewk_Tile* t = static_cast<Ewk_Tile*>(cell_data);
    66 
    67     if (!t)
     62static void _ewk_tile_matrix_cell_free(void* userData, void* cellData)
     63{
     64    Ewk_Tile_Matrix* tm = static_cast<Ewk_Tile_Matrix*>(userData);
     65    Ewk_Tile* tile = static_cast<Ewk_Tile*>(cellData);
     66
     67    if (!tile)
    6868        return;
    6969
    7070    ewk_tile_unused_cache_freeze(tm->tuc);
    7171
    72     if (t->updates || t->stats.full_update)
    73         tm->updates = eina_list_remove(tm->updates, t);
    74 
    75     if (t->visible)
    76         ERR("freeing cell that is visible, leaking tile %p", t);
     72    if (tile->updates || tile->stats.full_update)
     73        tm->updates = eina_list_remove(tm->updates, tile);
     74
     75    if (tile->visible)
     76        ERR("freeing cell that is visible, leaking tile %p", tile);
    7777    else {
    78         if (!ewk_tile_unused_cache_tile_get(tm->tuc, t))
    79             ERR("tile %p was not in cache %p? leaking...", t, tm->tuc);
     78        if (!ewk_tile_unused_cache_tile_get(tm->tuc, tile))
     79            ERR("tile %p was not in cache %p? leaking...", tile, tm->tuc);
    8080        else {
    81             DBG("tile cell does not exist anymore, free it %p", t);
    82 #ifdef DEBUG_MEM_LEAKS
    83             tm->stats.bytes.freed += t->bytes;
     81            DBG("tile cell does not exist anymore, free it %p", tile);
     82#ifdef DEBUG_MEM_LEAKS
     83            tm->stats.bytes.freed += tile->bytes;
    8484            tm->stats.tiles.freed++;
    8585#endif
    86             ewk_tile_free(t);
     86            ewk_tile_free(tile);
    8787        }
    8888    }
     
    9292
    9393/* called when cache of unused tile is flushed */
    94 static void _ewk_tile_matrix_tile_free(void *data, Ewk_Tile *t)
     94static void _ewk_tile_matrix_tile_free(void* data, Ewk_Tile* tile)
    9595{
    9696    Ewk_Tile_Matrix* tm = static_cast<Ewk_Tile_Matrix*>(data);
    97     Eina_Matrixsparse_Cell *cell;
    98  
    99     if (!eina_matrixsparse_cell_idx_get(tm->matrix, t->row, t->col, &cell)) {
    100         ERR("removing tile %p that was not in the matrix? Leaking...", t);
     97    Eina_Matrixsparse_Cell* cell;
     98
     99    if (!eina_matrixsparse_cell_idx_get(tm->matrix, tile->row, tile->col, &cell)) {
     100        ERR("removing tile %p that was not in the matrix? Leaking...", tile);
    101101        return;
    102102    }
    103103
    104104    if (!cell) {
    105         ERR("removing tile %p that was not in the matrix? Leaking...", t);
     105        ERR("removing tile %p that was not in the matrix? Leaking...", tile);
    106106        return;
    107107    }
    108108
    109     if (t->updates || t->stats.full_update)
    110         tm->updates = eina_list_remove(tm->updates, t);
     109    if (tile->updates || tile->stats.full_update)
     110        tm->updates = eina_list_remove(tm->updates, tile);
    111111
    112112    /* set to null to avoid double free */
     
    114114    eina_matrixsparse_cell_clear(cell);
    115115
    116     if (EINA_UNLIKELY(!!t->visible)) {
     116    if (EINA_UNLIKELY(!!tile->visible)) {
    117117        ERR("cache of unused tiles requesting deletion of used tile %p? "
    118             "Leaking...", t);
     118            "Leaking...", tile);
    119119        return;
    120120    }
    121121
    122122#ifdef DEBUG_MEM_LEAKS
    123     tm->stats.bytes.freed += t->bytes;
     123    tm->stats.bytes.freed += tile->bytes;
    124124    tm->stats.tiles.freed++;
    125125#endif
    126126
    127     ewk_tile_free(t);
     127    ewk_tile_free(tile);
    128128}
    129129
     
    138138 * @param tuc cache of unused tiles or @c 0 to create one
    139139 *        automatically.
    140  * @param cols number of columns in the matrix.
     140 * @param columns number of columns in the matrix.
    141141 * @param rows number of rows in the matrix.
    142142 * @param cspace the color space used to create tiles in this matrix.
     
    146146 * @return newly allocated instance on success, @c 0 on failure.
    147147 */
    148 Ewk_Tile_Matrix *ewk_tile_matrix_new(Ewk_Tile_Unused_Cache *tuc, unsigned long cols, unsigned long rows, Evas_Colorspace cspace, void (*render_cb)(void *data, Ewk_Tile *t, const Eina_Rectangle *update), const void *render_data)
     148Ewk_Tile_Matrix* ewk_tile_matrix_new(Ewk_Tile_Unused_Cache* tileUnusedCache, unsigned long columns, unsigned long rows, Evas_Colorspace colorSpace, void (*render_callback)(void* data, Ewk_Tile* tile, const Eina_Rectangle* update), const void* renderData)
    149149{
    150150    Ewk_Tile_Matrix* tm = static_cast<Ewk_Tile_Matrix*>(calloc(1, sizeof(Ewk_Tile_Matrix)));
     
    152152        return 0;
    153153
    154     tm->matrix = eina_matrixsparse_new(rows, cols, _ewk_tile_matrix_cell_free, tm);
     154    tm->matrix = eina_matrixsparse_new(rows, columns, _ewk_tile_matrix_cell_free, tm);
    155155    if (!tm->matrix) {
    156156        ERR("could not create sparse matrix.");
     
    159159    }
    160160
    161     if (tuc)
    162         tm->tuc = ewk_tile_unused_cache_ref(tuc);
     161    if (tileUnusedCache)
     162        tm->tuc = ewk_tile_unused_cache_ref(tileUnusedCache);
    163163    else {
    164164        tm->tuc = ewk_tile_unused_cache_new(40960000);
     
    171171    }
    172172
    173     tm->cspace = cspace;
    174     tm->render.cb = render_cb;
    175     tm->render.data = (void *)render_data;
    176     tm->tile.w = DEFAULT_TILE_W;
    177     tm->tile.h = DEFAULT_TILE_H;
     173    tm->cspace = colorSpace;
     174    tm->render.cb = render_callback;
     175    tm->render.data = (void*)renderData;
     176    tm->tile.width = DEFAULT_TILE_W;
     177    tm->tile.height = DEFAULT_TILE_H;
    178178
    179179    return tm;
     
    185185 * The cache instance is unreferenced, possibly freeing it.
    186186 */
    187 void ewk_tile_matrix_free(Ewk_Tile_Matrix *tm)
     187void ewk_tile_matrix_free(Ewk_Tile_Matrix* tileMatrix)
    188188{
    189189#ifdef DEBUG_MEM_LEAKS
     
    191191#endif
    192192
    193     EINA_SAFETY_ON_NULL_RETURN(tm);
    194     ewk_tile_unused_cache_freeze(tm->tuc);
    195 
    196     eina_matrixsparse_free(tm->matrix);
    197 
    198     ewk_tile_unused_cache_thaw(tm->tuc);
    199     ewk_tile_unused_cache_unref(tm->tuc);
    200 
    201 #ifdef DEBUG_MEM_LEAKS
    202     tiles = tm->stats.tiles.allocated - tm->stats.tiles.freed;
    203     bytes = tm->stats.bytes.allocated - tm->stats.bytes.freed;
     193    EINA_SAFETY_ON_NULL_RETURN(tileMatrix);
     194    ewk_tile_unused_cache_freeze(tileMatrix->tuc);
     195
     196    eina_matrixsparse_free(tileMatrix->matrix);
     197
     198    ewk_tile_unused_cache_thaw(tileMatrix->tuc);
     199    ewk_tile_unused_cache_unref(tileMatrix->tuc);
     200
     201#ifdef DEBUG_MEM_LEAKS
     202    tiles = tileMatrix->stats.tiles.allocated - tileMatrix->stats.tiles.freed;
     203    bytes = tileMatrix->stats.bytes.allocated - tileMatrix->stats.bytes.freed;
    204204
    205205    tiles_leaked += tiles;
     
    207207
    208208    if (tiles || bytes)
    209         ERR("tiled matrix leaked: tiles[+%"PRIu64",-%"PRIu64":%"PRIu64"] "
    210            "bytes[+%"PRIu64",-%"PRIu64":%"PRIu64"]",
    211             tm->stats.tiles.allocated, tm->stats.tiles.freed, tiles,
    212             tm->stats.bytes.allocated, tm->stats.bytes.freed, bytes);
     209        ERR("tiled matrix leaked: tiles[+%" PRIu64 ",-%" PRIu64 ":%" PRIu64 "] "
     210            "bytes[+%" PRIu64 ",-%" PRIu64 ":%" PRIu64 "]",
     211            tileMatrix->stats.tiles.allocated, tileMatrix->stats.tiles.freed, tiles,
     212            tileMatrix->stats.bytes.allocated, tileMatrix->stats.bytes.freed, bytes);
    213213    else if (tiles_leaked || bytes_leaked)
    214         WRN("tiled matrix had no leaks: tiles[+%"PRIu64",-%"PRIu64"] "
    215            "bytes[+%"PRIu64",-%"PRIu64"], but some other leaked "
    216             "%"PRIu64" tiles (%"PRIu64" bytes)",
    217             tm->stats.tiles.allocated, tm->stats.tiles.freed,
    218             tm->stats.bytes.allocated, tm->stats.bytes.freed,
     214        WRN("tiled matrix had no leaks: tiles[+%" PRIu64 ",-%" PRIu64 "] "
     215            "bytes[+%" PRIu64 ",-%" PRIu64 "], but some other leaked "
     216            "%" PRIu64 " tiles (%" PRIu64 " bytes)",
     217            tileMatrix->stats.tiles.allocated, tileMatrix->stats.tiles.freed,
     218            tileMatrix->stats.bytes.allocated, tileMatrixm->stats.bytes.freed,
    219219            tiles_leaked, bytes_leaked);
    220220    else
    221         INF("tiled matrix had no leaks: tiles[+%"PRIu64",-%"PRIu64"] "
    222            "bytes[+%"PRIu64",-%"PRIu64"]",
    223             tm->stats.tiles.allocated, tm->stats.tiles.freed,
    224             tm->stats.bytes.allocated, tm->stats.bytes.freed);
    225 #endif
    226 
    227     free(tm);
     221        INF("tiled matrix had no leaks: tiles[+%" PRIu64 ",-%" PRIu64 "] "
     222            "bytes[+%" PRIu64 ",-%" PRIu64 "]",
     223            tileMatrix->stats.tiles.allocated, tileMatrix->stats.tiles.freed,
     224            tileMatrix->stats.bytes.allocated, tileMatrix->stats.bytes.freed);
     225#endif
     226
     227    free(tileMatrix);
    228228}
    229229
     
    231231 * Resize matrix to given number of rows and columns.
    232232 */
    233 void ewk_tile_matrix_resize(Ewk_Tile_Matrix *tm, unsigned long cols, unsigned long rows)
    234 {
    235     EINA_SAFETY_ON_NULL_RETURN(tm);
    236     eina_matrixsparse_size_set(tm->matrix, rows, cols);
     233void ewk_tile_matrix_resize(Ewk_Tile_Matrix* tileMatrix, unsigned long cols, unsigned long rows)
     234{
     235    EINA_SAFETY_ON_NULL_RETURN(tileMatrix);
     236    eina_matrixsparse_size_set(tileMatrix->matrix, rows, cols);
    237237}
    238238
     
    242242 * No reference is taken to the cache.
    243243 */
    244 Ewk_Tile_Unused_Cache *ewk_tile_matrix_unused_cache_get(const Ewk_Tile_Matrix *tm)
    245 {
    246     EINA_SAFETY_ON_NULL_RETURN_VAL(tm, 0);
    247     return tm->tuc;
     244Ewk_Tile_Unused_Cache* ewk_tile_matrix_unused_cache_get(const Ewk_Tile_Matrix* tileMatrix)
     245{
     246    EINA_SAFETY_ON_NULL_RETURN_VAL(tileMatrix, 0);
     247    return tileMatrix->tuc;
    248248}
    249249
     
    251251 * Get the exact tile for the given position and zoom.
    252252 *
    253  * If the tile was unused then it's removed from the cache.
     253 * If the tile.widthas unused then it's removed from the cache.
    254254 *
    255255 * After usage, please give it back using
     
    257257 * then use ewk_tile_matrix_tile_exact_exists().
    258258 *
    259  * @param tm the tile matrix to get tile from.
    260  * @param col the column number.
     259 * @param tileMatrix the tile matrix to get tile from.
     260 * @param column the column number.
    261261 * @param row the row number.
    262262 * @param zoom the exact zoom to use.
     
    269269 * @see ewk_tile_matrix_tile_exact_get()
    270270 */
    271 Ewk_Tile *ewk_tile_matrix_tile_exact_get(Ewk_Tile_Matrix *tm, unsigned long col, unsigned long row, float zoom)
    272 {
    273     Ewk_Tile* t = static_cast<Ewk_Tile*>(eina_matrixsparse_data_idx_get(tm->matrix, row, col));
    274     if (!t)
     271Ewk_Tile* ewk_tile_matrix_tile_exact_get(Ewk_Tile_Matrix* tileMatrix, unsigned long column, unsigned long row, float zoom)
     272{
     273    Ewk_Tile* tile = static_cast<Ewk_Tile*>(eina_matrixsparse_data_idx_get(tileMatrix->matrix, row, column));
     274    if (!tile)
    275275        return 0;
    276276
    277     if (t->zoom == zoom)
     277    if (tile->zoom == zoom)
    278278        goto end;
    279279
    280   end:
    281     if (!t->visible) {
    282         if (!ewk_tile_unused_cache_tile_get(tm->tuc, t))
     280end:
     281    if (!tile->visible) {
     282        if (!ewk_tile_unused_cache_tile_get(tileMatrix->tuc, tile))
    283283            WRN("Ewk_Tile was unused but not in cache? bug!");
    284284    }
    285285
    286     return t;
     286    return tile;
    287287}
    288288
     
    290290 * Checks if tile of given zoom exists in matrix.
    291291 *
    292  * @param tm the tile matrix to check tile existence.
    293  * @param col the column number.
     292 * @param tileMatrix the tile matrix to check tile existence.
     293 * @param column the column number.
    294294 * @param row the row number.
    295295 * @param zoom the exact zoom to query.
     
    299299 * @see ewk_tile_matrix_tile_exact_get()
    300300 */
    301 Eina_Bool ewk_tile_matrix_tile_exact_exists(Ewk_Tile_Matrix *tm, unsigned long col, unsigned long row, float zoom)
    302 {
    303     if (!eina_matrixsparse_data_idx_get(tm->matrix, row, col))
     301Eina_Bool ewk_tile_matrix_tile_exact_exists(Ewk_Tile_Matrix* tileMatrix, unsigned long column, unsigned long row, float zoom)
     302{
     303    if (!eina_matrixsparse_data_idx_get(tileMatrix->matrix, row, column))
    304304        return EINA_FALSE;
    305305
     
    314314 * ewk_tile_matrix_tile_put() to give it back to matrix.
    315315 *
    316  * @param tm the tile matrix to create tile on.
    317  * @param col the column number.
     316 * @param tileMatrix the tile matrix to create tile on.
     317 * @param column the column number.
    318318 * @param row the row number.
    319319 * @param zoom the level to create tile, used to determine tile size.
    320320 */
    321 Ewk_Tile *ewk_tile_matrix_tile_new(Ewk_Tile_Matrix *tm, Evas *evas, unsigned long col, unsigned long row, float zoom)
     321Ewk_Tile* ewk_tile_matrix_tile_new(Ewk_Tile_Matrix* tileMatrix, Evas* canvas, unsigned long column, unsigned long row, float zoom)
    322322{
    323323    Evas_Coord tw, th;
    324     Ewk_Tile *t;
    325 
    326     EINA_SAFETY_ON_NULL_RETURN_VAL(tm, 0);
     324    Ewk_Tile* tile;
     325
     326    EINA_SAFETY_ON_NULL_RETURN_VAL(tileMatrix, 0);
    327327    EINA_SAFETY_ON_FALSE_RETURN_VAL(zoom > 0.0, 0);
    328328
    329     tw = tm->tile.w;
    330     th = tm->tile.h;
    331 
    332     t = ewk_tile_new(evas, tw, th, zoom, tm->cspace);
    333     if (!t) {
    334         ERR("could not create tile %dx%d at %f, cspace=%d", tw, th, (double)zoom, tm->cspace);
     329    tw = tileMatrix->tile.width;
     330    th = tileMatrix->tile.height;
     331
     332    tile = ewk_tile_new(canvas, tw, th, zoom, tileMatrix->cspace);
     333    if (!tile) {
     334        ERR("could not create tile %dx%d at %f, cspace=%d", tw, th, (double)zoom, tileMatrix->cspace);
    335335        return 0;
    336336    }
    337337
    338     if (!eina_matrixsparse_data_idx_set(tm->matrix, row, col, t)) {
     338    if (!eina_matrixsparse_data_idx_set(tileMatrix->matrix, row, column, tile)) {
    339339        ERR("could not set matrix cell, row/col outside matrix dimensions!");
    340         ewk_tile_free(t);
     340        ewk_tile_free(tile);
    341341        return 0;
    342342    }
    343343
    344     t->col = col;
    345     t->row = row;
    346     t->x = col * tw;
    347     t->y = row * th;
    348 
    349     cairo_translate(t->cairo, -t->x, -t->y);
    350 
    351     t->stats.full_update = EINA_TRUE;
    352     tm->updates = eina_list_append(tm->updates, t);
    353 
    354 #ifdef DEBUG_MEM_LEAKS
    355     tm->stats.bytes.allocated += t->bytes;
    356     tm->stats.tiles.allocated++;
    357 #endif
    358 
    359     return t;
     344    tile->col = column;
     345    tile->row = row;
     346    tile->x = column * tw;
     347    tile->y = row * th;
     348
     349    cairo_translate(tile->cairo, -tile->x, -tile->y);
     350
     351    tile->stats.full_update = EINA_TRUE;
     352    tileMatrix->updates = eina_list_append(tileMatrix->updates, tile);
     353
     354#ifdef DEBUG_MEM_LEAKS
     355    tileMatrix->stats.bytes.allocated += tile->bytes;
     356    tileMatrix->stats.tiles.allocated++;
     357#endif
     358
     359    return tile;
    360360}
    361361
     
    367367 *
    368368 * Any previous reference to tile should be released
    369  * (ewk_tile_hide()) before calling this function, so it will
     369 * (ewk_tile.heightide()) before calling this function, so it will
    370370 * be known if it is not visibile anymore and thus can be put into the
    371371 * unused cache.
    372372 *
    373  * @param tm the tile matrix to return tile to.
     373 * @param tileMatrix the tile matrix to return tile to.
    374374 * @param t the tile instance to return, must @b not be @c 0.
    375  * @param last_used time in which tile was last used.
     375 * @param last_used time in which tile.widthas last used.
    376376 *
    377377 * @return #EINA_TRUE on success or #EINA_FALSE on failure.
    378378 */
    379 Eina_Bool ewk_tile_matrix_tile_put(Ewk_Tile_Matrix *tm, Ewk_Tile *t, double last_used)
    380 {
    381     EINA_SAFETY_ON_NULL_RETURN_VAL(tm, EINA_FALSE);
    382     EINA_SAFETY_ON_NULL_RETURN_VAL(t, EINA_FALSE);
    383 
    384     if (t->visible)
     379Eina_Bool ewk_tile_matrix_tile_put(Ewk_Tile_Matrix* tileMatrix, Ewk_Tile* tile, double lastUsed)
     380{
     381    EINA_SAFETY_ON_NULL_RETURN_VAL(tileMatrix, EINA_FALSE);
     382    EINA_SAFETY_ON_NULL_RETURN_VAL(tile, EINA_FALSE);
     383
     384    if (tile->visible)
    385385        return EINA_TRUE;
    386386
    387     t->stats.last_used = last_used;
    388     return ewk_tile_unused_cache_tile_put(tm->tuc, t, _ewk_tile_matrix_tile_free, tm);
    389 }
    390 
    391 Eina_Bool ewk_tile_matrix_tile_update(Ewk_Tile_Matrix *tm, unsigned long col, unsigned long row, const Eina_Rectangle *update)
     387    tile->stats.last_used = lastUsed;
     388    return ewk_tile_unused_cache_tile_put(tileMatrix->tuc, tile, _ewk_tile_matrix_tile_free, tileMatrix);
     389}
     390
     391Eina_Bool ewk_tile_matrix_tile_update(Ewk_Tile_Matrix* tileMatrix, unsigned long col, unsigned long row, const Eina_Rectangle* update)
    392392{
    393393    Eina_Rectangle new_update;
    394     EINA_SAFETY_ON_NULL_RETURN_VAL(tm, EINA_FALSE);
     394    EINA_SAFETY_ON_NULL_RETURN_VAL(tileMatrix, EINA_FALSE);
    395395    EINA_SAFETY_ON_NULL_RETURN_VAL(update, EINA_FALSE);
    396396
     
    402402    }
    403403
    404     if (update->x + update->w - 1 >= tm->tile.w)
    405         new_update.w = tm->tile.w - update->x;
    406     if (update->y + update->h - 1 >= tm->tile.h)
    407         new_update.h = tm->tile.h - update->y;
    408 
    409     Ewk_Tile* t = static_cast<Ewk_Tile*>(eina_matrixsparse_data_idx_get(tm->matrix, row, col));
    410     if (!t)
     404    if (update->x + update->w - 1 >= tileMatrix->tile.width)
     405        new_update.w = tileMatrix->tile.width - update->x;
     406    if (update->y + update->h - 1 >= tileMatrix->tile.height)
     407        new_update.h = tileMatrix->tile.height - update->y;
     408
     409    Ewk_Tile* tile = static_cast<Ewk_Tile*>(eina_matrixsparse_data_idx_get(tileMatrix->matrix, row, col));
     410    if (!tile)
    411411        return EINA_TRUE;
    412412
    413     if (!t->updates && !t->stats.full_update)
    414         tm->updates = eina_list_append(tm->updates, t);
    415     ewk_tile_update_area(t, &new_update);
     413    if (!tile->updates && !tile->stats.full_update)
     414        tileMatrix->updates = eina_list_append(tileMatrix->updates, tile);
     415    ewk_tile_update_area(tile, &new_update);
    416416
    417417    return EINA_TRUE;
    418418}
    419419
    420 Eina_Bool ewk_tile_matrix_tile_update_full(Ewk_Tile_Matrix *tm, unsigned long col, unsigned long row)
    421 {
    422     Eina_Matrixsparse_Cell *cell;
    423     EINA_SAFETY_ON_NULL_RETURN_VAL(tm, EINA_FALSE);
    424 
    425     if (!eina_matrixsparse_cell_idx_get(tm->matrix, row, col, &cell))
     420Eina_Bool ewk_tile_matrix_tile_update_full(Ewk_Tile_Matrix* tileMatrix, unsigned long column, unsigned long row)
     421{
     422    Eina_Matrixsparse_Cell* cell;
     423    EINA_SAFETY_ON_NULL_RETURN_VAL(tileMatrix, EINA_FALSE);
     424
     425    if (!eina_matrixsparse_cell_idx_get(tileMatrix->matrix, row, column, &cell))
    426426        return EINA_FALSE;
    427427
     
    429429        return EINA_TRUE;
    430430
    431     Ewk_Tile* t = static_cast<Ewk_Tile*>(eina_matrixsparse_cell_data_get(cell));
    432     if (!t) {
     431    Ewk_Tile* tile = static_cast<Ewk_Tile*>(eina_matrixsparse_cell_data_get(cell));
     432    if (!tile) {
    433433        CRITICAL("matrix cell with no tile!");
    434434        return EINA_TRUE;
    435435    }
    436436
    437     if (!t->updates && !t->stats.full_update)
    438         tm->updates = eina_list_append(tm->updates, t);
    439     ewk_tile_update_full(t);
     437    if (!tile->updates && !tile->stats.full_update)
     438        tileMatrix->updates = eina_list_append(tileMatrix->updates, tile);
     439    ewk_tile_update_full(tile);
    440440
    441441    return EINA_TRUE;
    442442}
    443443
    444 void ewk_tile_matrix_tile_updates_clear(Ewk_Tile_Matrix *tm, Ewk_Tile *t)
    445 {
    446     EINA_SAFETY_ON_NULL_RETURN(tm);
    447     if (!t->updates && !t->stats.full_update)
     444void ewk_tile_matrix_tile_updates_clear(Ewk_Tile_Matrix* tileMatrix, Ewk_Tile* tile)
     445{
     446    EINA_SAFETY_ON_NULL_RETURN(tileMatrix);
     447    if (!tile->updates && !tile->stats.full_update)
    448448        return;
    449     ewk_tile_updates_clear(t);
    450     tm->updates = eina_list_remove(tm->updates, t);
    451 }
    452 
    453 static Eina_Bool _ewk_tile_matrix_slicer_setup(Ewk_Tile_Matrix *tm, const Eina_Rectangle *area, float zoom, Eina_Tile_Grid_Slicer *slicer)
     449    ewk_tile_updates_clear(tile);
     450    tileMatrix->updates = eina_list_remove(tileMatrix->updates, tile);
     451}
     452
     453static Eina_Bool _ewk_tile_matrix_slicer_setup(Ewk_Tile_Matrix* tileMatrix, const Eina_Rectangle* area, float zoom, Eina_Tile_Grid_Slicer* slicer)
    454454{
    455455    unsigned long rows, cols;
    456     Evas_Coord x, y, w, h, tw, th;
     456    Evas_Coord x, y, width, height, tw, th;
    457457
    458458    if (area->w <= 0 || area->h <= 0) {
     
    464464    x = area->x;
    465465    y = area->y;
    466     w = area->w;
    467     h = area->h;
    468 
    469     tw = tm->tile.w;
    470     th = tm->tile.h;
     466    width = area->w;
     467    height = area->h;
     468
     469    tw = tileMatrix->tile.width;
     470    th = tileMatrix->tile.height;
    471471
    472472    // cropping area region to fit matrix
    473     eina_matrixsparse_size_get(tm->matrix, &rows, &cols);
     473    eina_matrixsparse_size_get(tileMatrix->matrix, &rows, &cols);
    474474    if (x < 0) {
    475         w += x;
     475        width += x;
    476476        x = 0;
    477477    }
    478478    if (y < 0) {
    479         h += y;
     479        height += y;
    480480        y = 0;
    481481    }
    482482
    483     if (y + h - 1 > (long)(rows * th))
    484         h = rows * th - y;
    485     if (x + w - 1 > (long)(cols * tw))
    486         w = cols * tw - x;
    487 
    488     return eina_tile_grid_slicer_setup(slicer, x, y, w, h, tw, th);
    489 }
    490 
    491 
    492 Eina_Bool ewk_tile_matrix_update(Ewk_Tile_Matrix *tm, const Eina_Rectangle *update, float zoom)
    493 {
    494     const Eina_Tile_Grid_Info *info;
     483    if (y + height - 1 > (long)(rows * th))
     484        height = rows * th - y;
     485    if (x + width - 1 > (long)(cols * tw))
     486        width = cols * tw - x;
     487
     488    return eina_tile_grid_slicer_setup(slicer, x, y, width, height, tw, th);
     489}
     490
     491
     492Eina_Bool ewk_tile_matrix_update(Ewk_Tile_Matrix* tileMatrix, const Eina_Rectangle* update, float zoom)
     493{
     494    const Eina_Tile_Grid_Info* info;
    495495    Eina_Tile_Grid_Slicer slicer;
    496     EINA_SAFETY_ON_NULL_RETURN_VAL(tm, EINA_FALSE);
     496    EINA_SAFETY_ON_NULL_RETURN_VAL(tileMatrix, EINA_FALSE);
    497497    EINA_SAFETY_ON_NULL_RETURN_VAL(update, EINA_FALSE);
    498498
     
    503503    }
    504504
    505     if (!_ewk_tile_matrix_slicer_setup(tm, update, zoom, &slicer)) {
     505    if (!_ewk_tile_matrix_slicer_setup(tileMatrix, update, zoom, &slicer)) {
    506506        ERR("Could not setup slicer for update %d,%d+%dx%d at zoom %f",
    507507            update->x, update->y, update->w, update->h, zoom);
     
    514514        row = info->row;
    515515
    516         Ewk_Tile* t = static_cast<Ewk_Tile*>(eina_matrixsparse_data_idx_get(tm->matrix, row, col));
    517         if (!t)
     516        Ewk_Tile* tile = static_cast<Ewk_Tile*>(eina_matrixsparse_data_idx_get(tileMatrix->matrix, row, col));
     517        if (!tile)
    518518            continue;
    519519
    520         if (!t->updates && !t->stats.full_update)
    521             tm->updates = eina_list_append(tm->updates, t);
     520        if (!tile->updates && !tile->stats.full_update)
     521            tileMatrix->updates = eina_list_append(tileMatrix->updates, tile);
    522522        if (info->full)
    523             ewk_tile_update_full(t);
     523            ewk_tile_update_full(tile);
    524524        else
    525             ewk_tile_update_area(t, &info->rect);
     525            ewk_tile_update_area(tile, &info->rect);
    526526    }
    527527
     
    530530}
    531531
    532 void ewk_tile_matrix_updates_process(Ewk_Tile_Matrix *tm)
    533 {
    534     Eina_List *l, *l_next;
     532void ewk_tile_matrix_updates_process(Ewk_Tile_Matrix* tileMatrix)
     533{
     534    Eina_List* l, * l_next;
    535535    void* item;
    536     EINA_SAFETY_ON_NULL_RETURN(tm);
     536    EINA_SAFETY_ON_NULL_RETURN(tileMatrix);
    537537
    538538    // process updates, unflag tiles
    539     EINA_LIST_FOREACH_SAFE(tm->updates, l, l_next, item) {
     539    EINA_LIST_FOREACH_SAFE(tileMatrix->updates, l, l_next, item) {
    540540        Ewk_Tile* tile = static_cast<Ewk_Tile*>(item);
    541         ewk_tile_updates_process(tile, tm->render.cb, tm->render.data);
     541        ewk_tile_updates_process(tile, tileMatrix->render.cb, tileMatrix->render.data);
    542542        if (tile->visible) {
    543543            ewk_tile_updates_clear(tile);
    544             tm->updates = eina_list_remove_list(tm->updates, l);
     544            tileMatrix->updates = eina_list_remove_list(tileMatrix->updates, l);
    545545        }
    546546    }
    547547}
    548548
    549 void ewk_tile_matrix_updates_clear(Ewk_Tile_Matrix *tm)
     549void ewk_tile_matrix_updates_clear(Ewk_Tile_Matrix* tileMatrix)
    550550{
    551551    void* item;
    552     EINA_SAFETY_ON_NULL_RETURN(tm);
    553 
    554     EINA_LIST_FREE(tm->updates, item)
     552    EINA_SAFETY_ON_NULL_RETURN(tileMatrix);
     553
     554    EINA_LIST_FREE(tileMatrix->updates, item)
    555555        ewk_tile_updates_clear(static_cast<Ewk_Tile*>(item));
    556     tm->updates = 0;
     556    tileMatrix->updates = 0;
    557557}
    558558
    559559// remove me later!
    560 void ewk_tile_matrix_dbg(const Ewk_Tile_Matrix *tm)
    561 {
    562     Eina_Iterator *it = eina_matrixsparse_iterator_complete_new(tm->matrix);
    563     Eina_Matrixsparse_Cell *cell;
     560void ewk_tile_matrix_dbg(const Ewk_Tile_Matrix* tileMatrix)
     561{
     562    Eina_Iterator* it = eina_matrixsparse_iterator_complete_new(tileMatrix->matrix);
     563    Eina_Matrixsparse_Cell* cell;
    564564    Eina_Bool last_empty = EINA_FALSE;
    565565
    566566#ifdef DEBUG_MEM_LEAKS
    567     printf("Ewk_Tile Matrix: tiles[+%"PRIu64",-%"PRIu64":%"PRIu64"] "
    568            "bytes[+%"PRIu64",-%"PRIu64":%"PRIu64"]\n",
     567    printf("Ewk_Tile Matrix: tiles[+%" PRIu64 ",-%" PRIu64 ":%" PRIu64 "] "
     568           "bytes[+%" PRIu64 ",-%" PRIu64 ":%" PRIu64 "]\n",
    569569           tm->stats.tiles.allocated, tm->stats.tiles.freed,
    570570           tm->stats.tiles.allocated - tm->stats.tiles.freed,
     
    579579        eina_matrixsparse_cell_position_get(cell, &row, &col);
    580580
    581         Ewk_Tile* t = static_cast<Ewk_Tile*>(eina_matrixsparse_cell_data_get(cell));
    582         if (!t) {
     581        Ewk_Tile* tile = static_cast<Ewk_Tile*>(eina_matrixsparse_cell_data_get(cell));
     582        if (!tile) {
    583583            if (!last_empty) {
    584584                last_empty = EINA_TRUE;
     
    591591                printf("\n");
    592592            }
    593             printf("%3lu,%3lu %10p:", col, row, t);
    594             printf(" [%3lu,%3lu + %dx%d @ %0.3f]%c", t->col, t->row, t->w, t->h, t->zoom, t->visible ? '*': ' ');
     593            printf("%3lu,%3lu %10p:", col, row, tile);
     594            printf(" [%3lu,%3lu + %dx%d @ %0.3f]%c", tile->col, tile->row, tile->width, tile->height, tile->zoom, tile->visible ? '*' : ' ');
    595595            printf("\n");
    596596        }
     
    600600    eina_iterator_free(it);
    601601
    602     ewk_tile_unused_cache_dbg(tm->tuc);
     602    ewk_tile_unused_cache_dbg(tileMatrix->tuc);
    603603}
    604604
     
    612612 * @see ewk_tile_matrix_thaw()
    613613 */
    614 void ewk_tile_matrix_freeze(Ewk_Tile_Matrix *tm)
    615 {
    616     EINA_SAFETY_ON_NULL_RETURN(tm);
    617     if (!tm->frozen)
    618         ewk_tile_unused_cache_freeze(tm->tuc);
    619     tm->frozen++;
     614void ewk_tile_matrix_freeze(Ewk_Tile_Matrix* tileMatrix)
     615{
     616    EINA_SAFETY_ON_NULL_RETURN(tileMatrix);
     617    if (!tileMatrix->frozen)
     618        ewk_tile_unused_cache_freeze(tileMatrix->tuc);
     619    tileMatrix->frozen++;
    620620}
    621621
     
    626626 * will run immediately.
    627627 */
    628 void ewk_tile_matrix_thaw(Ewk_Tile_Matrix *tm)
    629 {
    630     EINA_SAFETY_ON_NULL_RETURN(tm);
    631     if (!tm->frozen) {
     628void ewk_tile_matrix_thaw(Ewk_Tile_Matrix* tileMatrix)
     629{
     630    EINA_SAFETY_ON_NULL_RETURN(tileMatrix);
     631    if (!tileMatrix->frozen) {
    632632        ERR("thawing more than freezing!");
    633633        return;
    634634    }
    635635
    636     tm->frozen--;
    637     if (!tm->frozen)
    638         ewk_tile_unused_cache_thaw(tm->tuc);
    639 }
     636    tileMatrix->frozen--;
     637    if (!tileMatrix->frozen)
     638        ewk_tile_unused_cache_thaw(tileMatrix->tuc);
     639}
  • trunk/Source/WebKit/efl/ewk/ewk_tiled_matrix.h

    r95901 r97329  
    5353void ewk_tile_matrix_dbg(const Ewk_Tile_Matrix* tm);
    5454void ewk_tile_unused_cache_dbg(const Ewk_Tile_Unused_Cache* tuc);
    55 void ewk_tile_accounting_dbg(void);
     55void ewk_tile_accounting_dbg();
    5656
    5757
  • trunk/Source/WebKit/efl/ewk/ewk_tiled_model.cpp

    r96495 r97329  
    3737#endif
    3838
    39 #define IDX(col, row, rowspan) (col + (row * rowspan))
     39#define IDX(col, row, rowspan) (col + (rowidth * rowspan))
    4040
    4141#ifdef DEBUG_MEM_LEAKS
     
    5454
    5555static size_t accounting_len = 0;
    56 static struct tile_account *accounting = 0;
    57 
    58 static inline struct tile_account *_ewk_tile_account_get(const Ewk_Tile *t)
    59 {
    60     struct tile_account *acc;
     56static struct tile_account* accounting = 0;
     57
     58static inline struct tile_account* _ewk_tile_account_get(const Ewk_Tile* tile)
     59{
     60    struct tile_account* acc;
    6161    size_t i;
    6262
    6363    for (i = 0; i < accounting_len; i++) {
    64         if (accounting[i].size == t->w)
     64        if (accounting[i].size == tile->width)
    6565            return accounting + i;
    6666    }
     
    7070
    7171    acc = accounting + accounting_len;
    72     acc->size = t->w;
     72    acc->size = tile->width;
    7373    acc->tiles.allocated = 0;
    7474    acc->tiles.freed = 0;
     
    8181}
    8282
    83 static inline void _ewk_tile_account_allocated(const Ewk_Tile *t)
    84 {
    85     struct tile_account *acc = _ewk_tile_account_get(t);
     83static inline void _ewk_tile_account_allocated(const Ewk_Tile* tile)
     84{
     85    struct tile_account* acc = _ewk_tile_account_get(tile);
    8686    if (!acc)
    8787        return;
    88     acc->bytes.allocated += t->bytes;
     88    acc->bytes.allocated += tile->bytes;
    8989    acc->tiles.allocated++;
    9090
    91     bytes_allocated += t->bytes;
     91    bytes_allocated += tile->bytes;
    9292    tiles_allocated++;
    9393}
    9494
    95 static inline void _ewk_tile_account_freed(const Ewk_Tile *t)
    96 {
    97     struct tile_account *acc = _ewk_tile_account_get(t);
     95static inline void _ewk_tile_account_freed(const Ewk_Tile* tile)
     96{
     97    struct tile_account* acc = _ewk_tile_account_get(tile);
    9898    if (!acc)
    9999        return;
    100100
    101     acc->bytes.freed += t->bytes;
     101    acc->bytes.freed += tile->bytes;
    102102    acc->tiles.freed++;
    103103
    104     bytes_freed += t->bytes;
     104    bytes_freed += tile->bytes;
    105105    tiles_freed++;
    106106}
    107107
    108 void ewk_tile_accounting_dbg(void)
    109 {
    110     struct tile_account *acc;
    111     struct tile_account *acc_end;
    112 
    113     printf("TILE BALANCE: tiles[+%"PRIu64",-%"PRIu64":%"PRIu64"] "
    114            "bytes[+%"PRIu64",-%"PRIu64":%"PRIu64"]\n",
    115             tiles_allocated, tiles_freed, tiles_allocated - tiles_freed,
    116             bytes_allocated, bytes_freed, bytes_allocated - bytes_freed);
     108void ewk_tile_accounting_dbg()
     109{
     110    struct tile_account* acc;
     111    struct tile_account* acc_end;
     112
     113    printf("TILE BALANCE: tiles[+%" PRIu64 ",-%" PRIu64 ":%" PRIu64 "] "
     114           "bytes[+%" PRIu64 ",-%" PRIu64 ":%" PRIu64 "]\n",
     115           tiles_allocated, tiles_freed, tiles_allocated - tiles_freed,
     116           bytes_allocated, bytes_freed, bytes_allocated - bytes_freed);
    117117
    118118    if (!accounting_len)
     
    128128        bytes = acc->bytes.allocated - acc->bytes.freed;
    129129
    130         printf("   %4d: tiles[+%4"PRIu64",-%4"PRIu64":%4"PRIu64"] "
    131                "bytes[+%8"PRIu64",-%8"PRIu64":%8"PRIu64"]%s\n",
     130        printf("   %4d: tiles[+%4" PRIu64 ",-%4" PRIu64 ":%4" PRIu64 "] "
     131               "bytes[+%8" PRIu64 ",-%8" PRIu64 ":%8" PRIu64 "]%s\n",
    132132               acc->size,
    133133               acc->tiles.allocated, acc->tiles.freed, tiles,
     
    139139#else
    140140
    141 static inline void _ewk_tile_account_allocated(const Ewk_Tile *t) { }
    142 static inline void _ewk_tile_account_freed(const Ewk_Tile *t) { }
    143 
    144 void ewk_tile_accounting_dbg(void)
     141static inline void _ewk_tile_account_allocated(const Ewk_Tile* tile) { }
     142static inline void _ewk_tile_account_freed(const Ewk_Tile* tile) { }
     143
     144void ewk_tile_accounting_dbg()
    145145{
    146146    printf("compile webkit with DEBUG_MEM_LEAKS defined!\n");
     
    148148#endif
    149149
    150 static inline void _ewk_tile_paint_rgb888(Ewk_Tile *t, uint8_t r, uint8_t g, uint8_t b)
    151 {
    152     uint32_t *dst32, *dst32_end, c1;
    153     uint64_t *dst64, *dst64_end, c2;
    154 
    155     c1 = 0xff000000 | ((uint32_t)r << 16) | ((uint32_t)g << 8) | b;
    156     c2 = ((uint64_t)c1 << 32) | c1;
    157 
    158     dst64 = (uint64_t *)t->pixels;
    159     dst64_end = dst64 + ((t->bytes / 8) & ~7);
     150static inline void _ewk_tile_paint_rgb888(Ewk_Tile* tile, uint8_t red, uint8_t green, uint8_t blue)
     151{
     152    uint32_t c1 = 0xff000000 | ((uint32_t)red << 16) | ((uint32_t)green << 8) | blue;
     153    uint32_t c2 = ((uint64_t)c1 << 32) | c1;
     154
     155    uint64_t* dst64 = (uint64_t*)tile->pixels;
     156    uint64_t* dst64_end = dst64 + ((tile->bytes / 8) & ~7);
    160157    for (; dst64 < dst64_end; dst64 += 8) {
    161158        /* TODO: ARM add pld or NEON instructions */
     
    170167    }
    171168
    172     dst32 = (uint32_t *)dst64_end;
    173     dst32_end = (uint32_t *)(t->pixels + t->bytes);
     169    uint32_t* dst32 = (uint32_t*)dst64_end;
     170    uint32_t* dst32_end = (uint32_t*)(tile->pixels + tile->bytes);
    174171    for (; dst32 < dst32_end; dst32++)
    175172        *dst32 = c1;
    176173}
    177174
    178 static inline void _ewk_tile_paint_rgb565(Ewk_Tile *t, uint8_t r, uint8_t g, uint8_t b)
    179 {
    180     uint16_t *dst16, *dst16_end, c1;
    181     uint64_t *dst64, *dst64_end, c2;
    182 
    183     c1 = ((((r >> 3) & 0x1f) << 11) |
    184           (((g >> 2) & 0x3f) << 5) |
    185           ((b >> 3) & 0x1f));
     175static inline void _ewk_tile_paint_rgb565(Ewk_Tile* tile, uint8_t red, uint8_t green, uint8_t blue)
     176{
     177    uint16_t* dst16, * dst16_end, c1;
     178    uint64_t* dst64, * dst64_end, c2;
     179
     180    c1 = ((((red >> 3) & 0x1f) << 11) |
     181          (((green >> 2) & 0x3f) << 5) |
     182          ((blue >> 3) & 0x1f));
    186183
    187184    c2 = (((uint64_t)c1 << 48) | ((uint64_t)c1 << 32) |
    188185          ((uint64_t)c1 << 16) | c1);
    189186
    190     dst64 = (uint64_t *)t->pixels;
    191     dst64_end = dst64 + ((t->bytes / 8) & ~7);
     187    dst64 = (uint64_t*)tile->pixels;
     188    dst64_end = dst64 + ((tile->bytes / 8) & ~7);
    192189    for (; dst64 < dst64_end; dst64 += 8) {
    193190        /* TODO: ARM add pld or NEON instructions */
     
    202199    }
    203200
    204     dst16 = (uint16_t *)dst16_end;
    205     dst16_end = (uint16_t *)(t->pixels + t->bytes);
     201    dst16 = (uint16_t*)dst16_end;
     202    dst16_end = (uint16_t*)(tile->pixels + tile->bytes);
    206203    for (; dst16 < dst16_end; dst16++)
    207204        *dst16 = c1;
    208205}
    209206
    210 static inline void _ewk_tile_paint(Ewk_Tile *t, uint8_t r, uint8_t g, uint8_t b)
    211 {
    212     if (t->cspace == EVAS_COLORSPACE_ARGB8888)
    213         _ewk_tile_paint_rgb888(t, r, g, b);
    214     else if (t->cspace == EVAS_COLORSPACE_RGB565_A5P)
    215         _ewk_tile_paint_rgb565(t, r, g, b);
     207static inline void _ewk_tile_paint(Ewk_Tile* tile, uint8_t red, uint8_t green, uint8_t blue)
     208{
     209    if (tile->cspace == EVAS_COLORSPACE_ARGB8888)
     210        _ewk_tile_paint_rgb888(tile, red, green, blue);
     211    else if (tile->cspace == EVAS_COLORSPACE_RGB565_A5P)
     212        _ewk_tile_paint_rgb565(tile, red, green, blue);
    216213    else
    217         ERR("unknown color space: %d", t->cspace);
     214        ERR("unknown color space: %d", tile->cspace);
    218215}
    219216
     
    233230 * @c stats.full_update and @c updates.
    234231 */
    235 Ewk_Tile *ewk_tile_new(Evas *evas, Evas_Coord w, Evas_Coord h, float zoom, Evas_Colorspace cspace)
    236 {
    237     Evas_Coord *ec;
    238     Evas_Colorspace *ecs;
    239     float *f;
    240     size_t *s;
    241     Ewk_Tile *t;
     232Ewk_Tile* ewk_tile_new(Evas* evas, Evas_Coord width, Evas_Coord height, float zoom, Evas_Colorspace colorSpace)
     233{
     234    Evas_Coord* ec;
     235    Evas_Colorspace* ecs;
     236    float* f;
     237    size_t* s;
     238    Ewk_Tile* tile;
    242239    unsigned int area;
    243240    size_t bytes;
     
    245242    cairo_status_t status;
    246243    int stride;
    247     Ecore_Evas *ee;
    248     const char *engine;
    249 
    250     area = w * h;
    251 
    252     if (cspace == EVAS_COLORSPACE_ARGB8888) {
     244    Ecore_Evas* ee;
     245    const char* engine;
     246
     247    area = width * height;
     248
     249    if (colorSpace == EVAS_COLORSPACE_ARGB8888) {
    253250        bytes = area * 4;
    254         stride = w * 4;
     251        stride = width * 4;
    255252        format = CAIRO_FORMAT_ARGB32;
    256     } else if (cspace == EVAS_COLORSPACE_RGB565_A5P) {
     253    } else if (colorSpace == EVAS_COLORSPACE_RGB565_A5P) {
    257254        bytes = area * 2;
    258         stride = w * 2;
     255        stride = width * 2;
    259256        format = CAIRO_FORMAT_RGB16_565;
    260257    } else {
    261         ERR("unknown color space: %d", cspace);
     258        ERR("unknown color space: %d", colorSpace);
    262259        return 0;
    263260    }
    264261
    265     DBG("size: %dx%d (%d), zoom: %f, cspace=%d", w, h, area, (double)zoom, cspace);
    266 
    267     t = static_cast<Ewk_Tile*>(malloc(sizeof(Ewk_Tile)));
    268     if (!t)
     262    DBG("size: %dx%d (%d), zoom: %f, cspace=%d", width, height, area, (double)zoom, colorSpace);
     263
     264    tile = static_cast<Ewk_Tile*>(malloc(sizeof(Ewk_Tile)));
     265    if (!tile)
    269266        return 0;
    270267
    271     t->image = evas_object_image_add(evas);
     268    tile->image = evas_object_image_add(evas);
    272269
    273270    ee = ecore_evas_ecore_evas_get(evas);
    274271    engine = ecore_evas_engine_name_get(ee);
    275272    if (engine && !strcmp(engine, "opengl_x11"))
    276         evas_object_image_content_hint_set(t->image, EVAS_IMAGE_CONTENT_HINT_DYNAMIC);
    277 
    278     t->visible = 0;
    279     t->updates = 0;
    280 
    281     memset(&t->stats, 0, sizeof(Ewk_Tile_Stats));
    282     t->stats.area = area;
     273        evas_object_image_content_hint_set(tile->image, EVAS_IMAGE_CONTENT_HINT_DYNAMIC);
     274
     275    tile->visible = 0;
     276    tile->updates = 0;
     277
     278    memset(&tile->stats, 0, sizeof(Ewk_Tile_Stats));
     279    tile->stats.area = area;
    283280
    284281    /* ugly, but let's avoid at all costs having users to modify those */
    285     ec = (Evas_Coord *)&t->w;
    286     *ec = w;
    287 
    288     ec = (Evas_Coord *)&t->h;
    289     *ec = h;
    290 
    291     ecs = (Evas_Colorspace *)&t->cspace;
    292     *ecs = cspace;
    293 
    294     f = (float *)&t->zoom;
     282    ec = (Evas_Coord*)&tile->width;
     283    *ec = width;
     284
     285    ec = (Evas_Coord*)&tile->height;
     286    *ec = height;
     287
     288    ecs = (Evas_Colorspace*)&tile->cspace;
     289    *ecs = colorSpace;
     290
     291    f = (float*)&tile->zoom;
    295292    *f = zoom;
    296293
    297     s = (size_t *)&t->bytes;
     294    s = (size_t*)&tile->bytes;
    298295    *s = bytes;
    299296
    300     evas_object_image_size_set(t->image, t->w, t->h);
    301     evas_object_image_colorspace_set(t->image, t->cspace);
    302     t->pixels = static_cast<uint8_t*>(evas_object_image_data_get(t->image, EINA_TRUE));
    303     t->surface = cairo_image_surface_create_for_data(t->pixels, format, w, h, stride);
    304     status = cairo_surface_status(t->surface);
     297    evas_object_image_size_set(tile->image, tile->width, tile->height);
     298    evas_object_image_colorspace_set(tile->image, tile->cspace);
     299    tile->pixels = static_cast<uint8_t*>(evas_object_image_data_get(tile->image, EINA_TRUE));
     300    tile->surface = cairo_image_surface_create_for_data(tile->pixels, format, width, height, stride);
     301    status = cairo_surface_status(tile->surface);
    305302    if (status != CAIRO_STATUS_SUCCESS) {
    306303        ERR("failed to create cairo surface: %s",
    307304            cairo_status_to_string(status));
    308         free(t);
     305        free(tile);
    309306        return 0;
    310307    }
    311308
    312     t->cairo = cairo_create(t->surface);
    313     status = cairo_status(t->cairo);
     309    tile->cairo = cairo_create(tile->surface);
     310    status = cairo_status(tile->cairo);
    314311    if (status != CAIRO_STATUS_SUCCESS) {
    315312        ERR("failed to create cairo: %s", cairo_status_to_string(status));
    316         cairo_surface_destroy(t->surface);
    317         evas_object_del(t->image);
    318         free(t);
     313        cairo_surface_destroy(tile->surface);
     314        evas_object_del(tile->image);
     315        free(tile);
    319316        return 0;
    320317    }
    321318
    322     _ewk_tile_account_allocated(t);
    323 
    324     return t;
     319    _ewk_tile_account_allocated(tile);
     320
     321    return tile;
    325322}
    326323
     
    328325 * Free tile memory.
    329326 */
    330 void ewk_tile_free(Ewk_Tile *t)
    331 {
    332     _ewk_tile_account_freed(t);
    333 
    334     if (t->updates)
    335         eina_tiler_free(t->updates);
    336 
    337     cairo_surface_destroy(t->surface);
    338     cairo_destroy(t->cairo);
    339     evas_object_del(t->image);
    340     free(t);
     327void ewk_tile_free(Ewk_Tile* tile)
     328{
     329    _ewk_tile_account_freed(tile);
     330
     331    if (tile->updates)
     332        eina_tiler_free(tile->updates);
     333
     334    cairo_surface_destroy(tile->surface);
     335    cairo_destroy(tile->cairo);
     336    evas_object_del(tile->image);
     337    free(tile);
    341338}
    342339
     
    344341 * Make the tile visible, incrementing its counter.
    345342 */
    346 void ewk_tile_show(Ewk_Tile *t)
    347 {
    348     t->visible++;
    349     evas_object_show(t->image);
     343void ewk_tile_show(Ewk_Tile* tile)
     344{
     345    tile->visible++;
     346    evas_object_show(tile->image);
    350347}
    351348
     
    353350 * Decrement the visibility counter, making it invisible if necessary.
    354351 */
    355 void ewk_tile_hide(Ewk_Tile *t)
    356 {
    357     t->visible--;
    358     if (!t->visible)
    359         evas_object_hide(t->image);
     352void ewk_tile_hide(Ewk_Tile* tile)
     353{
     354    tile->visible--;
     355    if (!tile->visible)
     356        evas_object_hide(tile->image);
    360357}
    361358
     
    363360 * Returns EINA_TRUE if the tile is visible, EINA_FALSE otherwise.
    364361 */
    365 Eina_Bool ewk_tile_visible_get(Ewk_Tile *t)
    366 {
    367     return !!t->visible;
     362Eina_Bool ewk_tile_visible_get(Ewk_Tile* tile)
     363{
     364    return !!tile->visible;
    368365}
    369366
     
    371368 * Mark whole tile as dirty and requiring update.
    372369 */
    373 void ewk_tile_update_full(Ewk_Tile *t)
     370void ewk_tile_update_full(Ewk_Tile* tile)
    374371{
    375372    /* TODO: list of tiles pending updates? */
    376     t->stats.misses++;
    377 
    378     if (!t->stats.full_update) {
    379         t->stats.full_update = EINA_TRUE;
    380         if (t->updates) {
    381             eina_tiler_free(t->updates);
    382             t->updates = 0;
     373    tile->stats.misses++;
     374
     375    if (!tile->stats.full_update) {
     376        tile->stats.full_update = EINA_TRUE;
     377        if (tile->updates) {
     378            eina_tiler_free(tile->updates);
     379            tile->updates = 0;
    383380        }
    384381    }
     
    388385 * Mark the specific subarea as dirty and requiring update.
    389386 */
    390 void ewk_tile_update_area(Ewk_Tile *t, const Eina_Rectangle *r)
     387void ewk_tile_update_area(Ewk_Tile* tile, const Eina_Rectangle* rect)
    391388{
    392389    /* TODO: list of tiles pending updates? */
    393     t->stats.misses++;
    394 
    395     if (t->stats.full_update)
     390    tile->stats.misses++;
     391
     392    if (tile->stats.full_update)
    396393        return;
    397394
    398     if (!r->x && !r->y && r->w == t->w && r->h == t->h) {
    399         t->stats.full_update = EINA_TRUE;
    400         if (t->updates) {
    401             eina_tiler_free(t->updates);
    402             t->updates = 0;
     395    if (!rect->x && !rect->y && rect->w == tile->width && rect->h == tile->height) {
     396        tile->stats.full_update = EINA_TRUE;
     397        if (tile->updates) {
     398            eina_tiler_free(tile->updates);
     399            tile->updates = 0;
    403400        }
    404401        return;
    405402    }
    406403
    407     if (!t->updates) {
    408         t->updates = eina_tiler_new(t->w, t->h);
    409         if (!t->updates) {
    410             CRITICAL("could not create eina_tiler %dx%d.", t->w, t->h);
     404    if (!tile->updates) {
     405        tile->updates = eina_tiler_new(tile->width, tile->height);
     406        if (!tile->updates) {
     407            CRITICAL("could not create eina_tiler %dx%d.", tile->width, tile->height);
    411408            return;
    412409        }
    413410    }
    414411
    415     eina_tiler_rect_add(t->updates, r);
     412    eina_tiler_rect_add(tile->updates, rect);
    416413}
    417414
     
    422419 * updates, use ewk_tile_updates_clear() for that.
    423420 */
    424 void ewk_tile_updates_process(Ewk_Tile *t, void (*cb)(void *data, Ewk_Tile *t, const Eina_Rectangle *update), const void *data)
    425 {
    426     if (t->stats.full_update) {
    427         Eina_Rectangle r;
    428         r.x = 0;
    429         r.y = 0;
    430         r.w = t->w;
    431         r.h = t->h;
     421void ewk_tile_updates_process(Ewk_Tile* tile, void (*callback)(void* data, Ewk_Tile* tile, const Eina_Rectangle* update), const void* data)
     422{
     423    if (tile->stats.full_update) {
     424        Eina_Rectangle rect;
     425        rect.x = 0;
     426        rect.y = 0;
     427        rect.w = tile->width;
     428        rect.h = tile->height;
    432429#ifdef TILE_STATS_ACCOUNT_RENDER_TIME
    433430        struct timeval timev;
    434431        double render_start;
    435432        gettimeofday(&timev, 0);
    436         render_start = (double)timev.tv_sec +
    437             (((double)timev.tv_usec) / 1000000);
     433        render_startile = (double)timev.tv_sec +
     434                       (((double)timev.tv_usec) / 1000000);
    438435#endif
    439         cb((void *)data, t, &r);
     436        callback((void*)data, tile, &rect);
    440437#ifdef TILE_STATS_ACCOUNT_RENDER_TIME
    441438        gettimeofday(&timev, 0);
    442         t->stats.render_time = (double)timev.tv_sec +
    443             (((double)timev.tv_usec) / 1000000) - render_start;
     439        tile->stats.render_time = (double)timev.tv_sec +
     440                               (((double)timev.tv_usec) / 1000000) - render_start;
    444441#endif
    445     } else if (t->updates) {
    446         Eina_Iterator *itr = eina_tiler_iterator_new(t->updates);
    447         Eina_Rectangle *r;
     442    } else if (tile->updates) {
     443        Eina_Iterator* itr = eina_tiler_iterator_new(tile->updates);
     444        Eina_Rectangle* rect;
    448445        if (!itr) {
    449446            CRITICAL("could not create tiler iterator!");
    450447            return;
    451448        }
    452         EINA_ITERATOR_FOREACH(itr, r)
    453             cb((void *)data, t, r);
     449        EINA_ITERATOR_FOREACH(itr, rect)
     450            callback((void*)data, tile, rect);
    454451        eina_iterator_free(itr);
    455452    }
     
    460457 *
    461458 * This will change the tile statistics, specially zero stat.misses
    462  * and unset stats.full_update. If t->updates existed, then it will be
     459 * and unset stats.full_update. If tile->updates existed, then it will be
    463460 * destroyed.
    464461 *
     
    466463 * called.
    467464 */
    468 void ewk_tile_updates_clear(Ewk_Tile *t)
     465void ewk_tile_updates_clear(Ewk_Tile* tile)
    469466{
    470467    /* TODO: remove from list of pending updates? */
    471     t->stats.misses = 0;
    472 
    473     if (t->stats.full_update)
    474         t->stats.full_update = 0;
    475     else if (t->updates) {
    476         eina_tiler_free(t->updates);
    477         t->updates = 0;
     468    tile->stats.misses = 0;
     469
     470    if (tile->stats.full_update)
     471        tile->stats.full_update = 0;
     472    else if (tile->updates) {
     473        eina_tiler_free(tile->updates);
     474        tile->updates = 0;
    478475    }
    479476}
     
    481478typedef struct _Ewk_Tile_Unused_Cache_Entry Ewk_Tile_Unused_Cache_Entry;
    482479struct _Ewk_Tile_Unused_Cache_Entry {
    483     Ewk_Tile *tile;
     480    Ewk_Tile* tile;
    484481    int weight;
    485482    struct {
    486         void (*cb)(void *data, Ewk_Tile *t);
    487         void *data;
     483        void (*cb)(void* data, Ewk_Tile* tile);
     484        void* data;
    488485    } tile_free;
    489486};
     
    491488struct _Ewk_Tile_Unused_Cache {
    492489    struct {
    493         Eina_List *list;
     490        Eina_List* list;
    494491        size_t count;
    495492        size_t allocated;
     
    523520 *         possible to allocate memory, @c 0 is returned.
    524521 */
    525 Ewk_Tile_Unused_Cache *ewk_tile_unused_cache_new(size_t max)
    526 {
    527     Ewk_Tile_Unused_Cache *tuc;
    528 
    529     tuc = static_cast<Ewk_Tile_Unused_Cache*>(calloc(1, sizeof(Ewk_Tile_Unused_Cache)));
    530     if (!tuc)
     522Ewk_Tile_Unused_Cache* ewk_tile_unused_cache_new(size_t max)
     523{
     524    Ewk_Tile_Unused_Cache* tileUnusedCache;
     525
     526    tileUnusedCache = static_cast<Ewk_Tile_Unused_Cache*>(calloc(1, sizeof(Ewk_Tile_Unused_Cache)));
     527    if (!tileUnusedCache)
    531528        return 0;
    532529
    533     DBG("tuc=%p", tuc);
    534     tuc->memory.max = max;
    535     tuc->references = 1;
    536     return tuc;
    537 }
    538 
    539 void ewk_tile_unused_cache_lock_area(Ewk_Tile_Unused_Cache *tuc, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, float zoom)
    540 {
    541     EINA_SAFETY_ON_NULL_RETURN(tuc);
    542 
    543     tuc->locked.locked = EINA_TRUE;
    544     tuc->locked.x = x;
    545     tuc->locked.y = y;
    546     tuc->locked.w = w;
    547     tuc->locked.h = h;
    548     tuc->locked.zoom = zoom;
    549 }
    550 
    551 void ewk_tile_unused_cache_unlock_area(Ewk_Tile_Unused_Cache *tuc)
    552 {
    553     EINA_SAFETY_ON_NULL_RETURN(tuc);
    554 
    555     tuc->locked.locked = EINA_FALSE;
     530    DBG("tileUnusedCache=%p", tileUnusedCache);
     531    tileUnusedCache->memory.max = max;
     532    tileUnusedCache->references = 1;
     533    return tileUnusedCache;
     534}
     535
     536void ewk_tile_unused_cache_lock_area(Ewk_Tile_Unused_Cache* tileUnusedCache, Evas_Coord x, Evas_Coord y, Evas_Coord width, Evas_Coord height, float zoom)
     537{
     538    EINA_SAFETY_ON_NULL_RETURN(tileUnusedCache);
     539
     540    tileUnusedCache->locked.locked = EINA_TRUE;
     541    tileUnusedCache->locked.x = x;
     542    tileUnusedCache->locked.y = y;
     543    tileUnusedCache->locked.w = width;
     544    tileUnusedCache->locked.h = height;
     545    tileUnusedCache->locked.zoom = zoom;
     546}
     547
     548void ewk_tile_unused_cache_unlock_area(Ewk_Tile_Unused_Cache* tileUnusedCache)
     549{
     550    EINA_SAFETY_ON_NULL_RETURN(tileUnusedCache);
     551
     552    tileUnusedCache->locked.locked = EINA_FALSE;
    556553}
    557554
     
    568565 * @see ewk_tile_unused_cache_unref()
    569566 */
    570 static void _ewk_tile_unused_cache_free(Ewk_Tile_Unused_Cache *tuc)
    571 {
    572     EINA_SAFETY_ON_NULL_RETURN(tuc);
    573 
    574     DBG("tuc=%p, "
     567static void _ewk_tile_unused_cache_free(Ewk_Tile_Unused_Cache* tileUnusedCache)
     568{
     569    EINA_SAFETY_ON_NULL_RETURN(tileUnusedCache);
     570
     571    DBG("tileUnusedCache=%p, "
    575572        "entries=(count:%zd, allocated:%zd), "
    576573        "memory=(max:%zd, used:%zd)",
    577         tuc, tuc->entries.count, tuc->entries.allocated,
    578         tuc->memory.max, tuc->memory.used);
    579 
    580     ewk_tile_unused_cache_clear(tuc);
    581     free(tuc);
     574        tileUnusedCache, tileUnusedCache->entries.count, tileUnusedCache->entries.allocated,
     575        tileUnusedCache->memory.max, tileUnusedCache->memory.used);
     576
     577    ewk_tile_unused_cache_clear(tileUnusedCache);
     578    free(tileUnusedCache);
    582579}
    583580
     
    588585 * kept are those that aren't in the cache (i.e. that are visible).
    589586 */
    590 void ewk_tile_unused_cache_clear(Ewk_Tile_Unused_Cache *tuc)
    591 {
    592     EINA_SAFETY_ON_NULL_RETURN(tuc);
    593 
    594     if (!tuc->entries.count)
     587void ewk_tile_unused_cache_clear(Ewk_Tile_Unused_Cache* tileUnusedCache)
     588{
     589    EINA_SAFETY_ON_NULL_RETURN(tileUnusedCache);
     590
     591    if (!tileUnusedCache->entries.count)
    595592        return;
    596593
    597594    void* item;
    598     EINA_LIST_FREE(tuc->entries.list, item) {
     595    EINA_LIST_FREE(tileUnusedCache->entries.list, item) {
    599596        Ewk_Tile_Unused_Cache_Entry* itr = static_cast<Ewk_Tile_Unused_Cache_Entry*>(item);
    600597        itr->tile_free.cb(itr->tile_free.data, itr->tile);
     
    602599    }
    603600
    604     tuc->memory.used = 0;
    605     tuc->entries.count = 0;
    606 }
    607 
    608 /**
    609  * Hold reference to cache.
     601    tileUnusedCache->memory.used = 0;
     602    tileUnusedCache->entries.count = 0;
     603}
     604
     605/**
     606 * heightold reference to cache.
    610607 *
    611608 * @return same pointer as taken.
     
    613610 * @see ewk_tile_unused_cache_unref()
    614611 */
    615 Ewk_Tile_Unused_Cache *ewk_tile_unused_cache_ref(Ewk_Tile_Unused_Cache *tuc)
    616 {
    617     EINA_SAFETY_ON_NULL_RETURN_VAL(tuc, 0);
    618     tuc->references++;
    619     return tuc;
     612Ewk_Tile_Unused_Cache* ewk_tile_unused_cache_ref(Ewk_Tile_Unused_Cache* tileUnusedCache)
     613{
     614    EINA_SAFETY_ON_NULL_RETURN_VAL(tileUnusedCache, 0);
     615    tileUnusedCache->references++;
     616    return tileUnusedCache;
    620617}
    621618
     
    626623 * @see ewk_tile_unused_cache_free()
    627624 */
    628 void ewk_tile_unused_cache_unref(Ewk_Tile_Unused_Cache *tuc)
    629 {
    630     EINA_SAFETY_ON_NULL_RETURN(tuc);
    631     tuc->references--;
    632     if (!tuc->references)
    633         _ewk_tile_unused_cache_free(tuc);
    634 }
    635 
    636 void ewk_tile_unused_cache_max_set(Ewk_Tile_Unused_Cache *tuc, size_t max)
    637 {
    638     EINA_SAFETY_ON_NULL_RETURN(tuc);
    639     tuc->memory.max = max;
    640 }
    641 
    642 size_t ewk_tile_unused_cache_max_get(const Ewk_Tile_Unused_Cache *tuc)
    643 {
    644     EINA_SAFETY_ON_NULL_RETURN_VAL(tuc, 0);
    645     return tuc->memory.max;
    646 }
    647 
    648 size_t ewk_tile_unused_cache_used_get(const Ewk_Tile_Unused_Cache *tuc)
    649 {
    650     EINA_SAFETY_ON_NULL_RETURN_VAL(tuc, 0);
    651     return tuc->memory.used;
    652 }
    653 
    654 size_t ewk_tile_unused_cache_flush(Ewk_Tile_Unused_Cache *tuc, size_t bytes)
    655 {
    656     Eina_List *l, *l_next;
    657     EINA_SAFETY_ON_NULL_RETURN_VAL(tuc, 0);
     625void ewk_tile_unused_cache_unref(Ewk_Tile_Unused_Cache* tileUnusedCache)
     626{
     627    EINA_SAFETY_ON_NULL_RETURN(tileUnusedCache);
     628    tileUnusedCache->references--;
     629    if (!tileUnusedCache->references)
     630        _ewk_tile_unused_cache_free(tileUnusedCache);
     631}
     632
     633void ewk_tile_unused_cache_max_set(Ewk_Tile_Unused_Cache* tileUnusedCache, size_t max)
     634{
     635    EINA_SAFETY_ON_NULL_RETURN(tileUnusedCache);
     636    tileUnusedCache->memory.max = max;
     637}
     638
     639size_t ewk_tile_unused_cache_max_get(const Ewk_Tile_Unused_Cache* tileUnusedCache)
     640{
     641    EINA_SAFETY_ON_NULL_RETURN_VAL(tileUnusedCache, 0);
     642    return tileUnusedCache->memory.max;
     643}
     644
     645size_t ewk_tile_unused_cache_used_get(const Ewk_Tile_Unused_Cache* tileUnusedCache)
     646{
     647    EINA_SAFETY_ON_NULL_RETURN_VAL(tileUnusedCache, 0);
     648    return tileUnusedCache->memory.used;
     649}
     650
     651size_t ewk_tile_unused_cache_flush(Ewk_Tile_Unused_Cache* tileUnusedCache, size_t bytes)
     652{
     653    Eina_List* l, * l_next;
     654    EINA_SAFETY_ON_NULL_RETURN_VAL(tileUnusedCache, 0);
    658655    size_t done;
    659656    unsigned int count;
    660657
    661     if (!tuc->entries.count)
     658    if (!tileUnusedCache->entries.count)
    662659        return 0;
    663660    if (bytes < 1)
     
    672669    done = 0;
    673670    count = 0;
    674     EINA_LIST_FOREACH_SAFE(tuc->entries.list, l, l_next, item) {
     671    EINA_LIST_FOREACH_SAFE(tileUnusedCache->entries.list, l, l_next, item) {
    675672        Ewk_Tile_Unused_Cache_Entry* itr = static_cast<Ewk_Tile_Unused_Cache_Entry*>(item);
    676         Ewk_Tile *t = itr->tile;
     673        Ewk_Tile* tile = itr->tile;
    677674        if (done > bytes)
    678675            break;
    679         if (tuc->locked.locked
    680             && t->x + t->w > tuc->locked.x
    681             && t->y + t->h > tuc->locked.y
    682             && t->x < tuc->locked.x + tuc->locked.w
    683             && t->y < tuc->locked.y + tuc->locked.h
    684             && t->zoom == tuc->locked.zoom) {
     676        if (tileUnusedCache->locked.locked
     677            && tile->x + tile->width > tileUnusedCache->locked.x
     678            && tile->y + tile->height > tileUnusedCache->locked.y
     679            && tile->x < tileUnusedCache->locked.x + tileUnusedCache->locked.w
     680            && tile->y < tileUnusedCache->locked.y + tileUnusedCache->locked.h
     681            && tile->zoom == tileUnusedCache->locked.zoom) {
    685682            continue;
    686683        }
    687684        done += sizeof(Ewk_Tile) + itr->tile->bytes;
    688685        itr->tile_free.cb(itr->tile_free.data, itr->tile);
    689         tuc->entries.list = eina_list_remove_list(tuc->entries.list, l);
     686        tileUnusedCache->entries.list = eina_list_remove_list(tileUnusedCache->entries.list, l);
    690687        free(itr);
    691688        count++;
    692689    }
    693690
    694     tuc->memory.used -= done;
    695     tuc->entries.count -= count;
     691    tileUnusedCache->memory.used -= done;
     692    tileUnusedCache->entries.count -= count;
    696693
    697694    return done;
    698695}
    699696
    700 void ewk_tile_unused_cache_auto_flush(Ewk_Tile_Unused_Cache *tuc)
    701 {
    702     EINA_SAFETY_ON_NULL_RETURN(tuc);
    703     if (tuc->memory.used <= tuc->memory.max)
     697void ewk_tile_unused_cache_auto_flush(Ewk_Tile_Unused_Cache* tileUnusedCache)
     698{
     699    EINA_SAFETY_ON_NULL_RETURN(tileUnusedCache);
     700    if (tileUnusedCache->memory.used <= tileUnusedCache->memory.max)
    704701        return;
    705     ewk_tile_unused_cache_flush(tuc, tuc->memory.used - tuc->memory.max);
    706     if (tuc->memory.used > tuc->memory.max)
     702    ewk_tile_unused_cache_flush(tileUnusedCache, tileUnusedCache->memory.used - tileUnusedCache->memory.max);
     703    if (tileUnusedCache->memory.used > tileUnusedCache->memory.max)
    707704        CRITICAL("Cache still using too much memory: %zd KB; max: %zd KB",
    708                  tuc->memory.used, tuc->memory.max);
     705                 tileUnusedCache->memory.used, tileUnusedCache->memory.max);
    709706}
    710707
     
    713710 *
    714711 * Maintenance tasks optimize cache usage, but maybe we know we should
    715  * hold on them until we do the last operation, in this case we freeze
     712 * heightold on them until we do the last operation, in this case we freeze
    716713 * while operating and then thaw when we're done.
    717714 *
    718715 * @see ewk_tile_unused_cache_thaw()
    719716 */
    720 void ewk_tile_unused_cache_freeze(Ewk_Tile_Unused_Cache *tuc)
    721 {
    722     tuc->frozen++;
     717void ewk_tile_unused_cache_freeze(Ewk_Tile_Unused_Cache* tileUnusedCache)
     718{
     719    tileUnusedCache->frozen++;
    723720}
    724721
     
    729726 * will run immediately.
    730727 */
    731 void ewk_tile_unused_cache_thaw(Ewk_Tile_Unused_Cache *tuc)
    732 {
    733     if (!tuc->frozen) {
     728void ewk_tile_unused_cache_thaw(Ewk_Tile_Unused_Cache* tileUnusedCache)
     729{
     730    if (!tileUnusedCache->frozen) {
    734731        ERR("thawing more than freezing!");
    735732        return;
    736733    }
    737734
    738     tuc->frozen--;
     735    tileUnusedCache->frozen--;
    739736}
    740737
     
    746743 * ewk_tile_unused_cache_tile_put().
    747744 *
    748  * @param tuc cache of unused tiles
     745 * @param tileUnusedCache cache of unused tiles
    749746 * @param t the tile to be removed from Ewk_Tile_Unused_Cache.
    750747 *
    751748 * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
    752749 */
    753 Eina_Bool ewk_tile_unused_cache_tile_get(Ewk_Tile_Unused_Cache *tuc, Ewk_Tile *t)
    754 {
    755     Eina_List *e, *l;
     750Eina_Bool ewk_tile_unused_cache_tile_get(Ewk_Tile_Unused_Cache* tileUnusedCache, Ewk_Tile* tile)
     751{
     752    Eina_List* e, * l;
    756753
    757754    void* item;
    758755    e = 0;
    759     EINA_LIST_FOREACH(tuc->entries.list, l, item) {
     756    EINA_LIST_FOREACH(tileUnusedCache->entries.list, l, item) {
    760757        Ewk_Tile_Unused_Cache_Entry* entry = static_cast<Ewk_Tile_Unused_Cache_Entry*>(item);
    761         if (entry->tile == t) {
     758        if (entry->tile == tile) {
    762759            e = l;
    763760            break;
     
    765762    }
    766763    if (!e) {
    767         ERR("tile %p not found in cache %p", t, tuc);
     764        ERR("tile %p not found in cache %p", tile, tileUnusedCache);
    768765        return EINA_FALSE;
    769766    }
    770767
    771     tuc->entries.count--;
    772     tuc->memory.used -= sizeof(Ewk_Tile) + t->bytes;
    773     tuc->entries.list = eina_list_remove_list(tuc->entries.list, e);
     768    tileUnusedCache->entries.count--;
     769    tileUnusedCache->memory.used -= sizeof(Ewk_Tile) + tile->bytes;
     770    tileUnusedCache->entries.list = eina_list_remove_list(tileUnusedCache->entries.list, e);
    774771    free(item);
    775772
     
    780777 * Put tile into cache of unused tiles, adding it to the cache.
    781778 *
    782  * This should be called when @c t->visible is @c 0 and no objects are
     779 * This should be called when @c tile->visible is @c 0 and no objects are
    783780 * using the tile anymore, making it available to be expired and have
    784781 * its memory replaced.
     
    789786 * because usually we want a lazy operation for better performance.
    790787 *
    791  * @param tuc cache of unused tiles
     788 * @param tileUnusedCache cache of unused tiles
    792789 * @param t tile to be added to cache.
    793790 * @param tile_free_cb function used to free tiles.
    794791 * @param data context to give back to @a tile_free_cb as first argument.
    795792 *
    796  * @return #EINA_TRUE on success, #EINA_FALSE otherwise. If @c t->visible
     793 * @return #EINA_TRUE on success, #EINA_FALSE otherwise. If @c tile->visible
    797794 *         is not #EINA_FALSE, then it will return #EINA_FALSE.
    798795 *
    799796 * @see ewk_tile_unused_cache_auto_flush()
    800797 */
    801 Eina_Bool ewk_tile_unused_cache_tile_put(Ewk_Tile_Unused_Cache *tuc, Ewk_Tile *t, void (*tile_free_cb)(void *data, Ewk_Tile *t), const void *data)
    802 {
    803     Ewk_Tile_Unused_Cache_Entry *e;
    804 
    805     if (t->visible) {
    806         ERR("tile=%p is not unused (visible=%d)", t, t->visible);
     798Eina_Bool ewk_tile_unused_cache_tile_put(Ewk_Tile_Unused_Cache* tileUnusedCache, Ewk_Tile* tile, void (* tile_free_cb)(void* data, Ewk_Tile* tile), const void* data)
     799{
     800    Ewk_Tile_Unused_Cache_Entry* uce;
     801
     802    if (tile->visible) {
     803        ERR("tile=%p is not unused (visible=%d)", tile, tile->visible);
    807804        return EINA_FALSE;
    808805    }
    809806
    810     e = static_cast<Ewk_Tile_Unused_Cache_Entry*>(malloc(sizeof(Ewk_Tile_Unused_Cache_Entry)));
    811     if (!e)
     807    uce = static_cast<Ewk_Tile_Unused_Cache_Entry*>(malloc(sizeof(Ewk_Tile_Unused_Cache_Entry)));
     808    if (!uce)
    812809        return EINA_FALSE;
    813810
    814     tuc->entries.list = eina_list_append(tuc->entries.list, e);
     811    tileUnusedCache->entries.list = eina_list_append(tileUnusedCache->entries.list, uce);
    815812    if (eina_error_get()) {
    816813        ERR("List allocation failed");
     
    818815    }
    819816
    820     e->tile = t;
    821     e->weight = 0; /* calculated just before sort */
    822     e->tile_free.cb = tile_free_cb;
    823     e->tile_free.data = (void *)data;
    824 
    825     tuc->entries.count++;
    826     tuc->memory.used += sizeof(Ewk_Tile) + t->bytes;
     817    uce->tile = tile;
     818    uce->weight = 0; /* calculated just before sort */
     819    uce->tile_free.cb = tile_free_cb;
     820    uce->tile_free.data = (void*)data;
     821
     822    tileUnusedCache->entries.count++;
     823    tileUnusedCache->memory.used += sizeof(Ewk_Tile) + tile->bytes;
    827824
    828825    return EINA_TRUE;
    829826}
    830827
    831 void ewk_tile_unused_cache_dbg(const Ewk_Tile_Unused_Cache *tuc)
     828void ewk_tile_unused_cache_dbg(const Ewk_Tile_Unused_Cache* tileUnusedCache)
    832829{
    833830    void* item;
    834     Eina_List *l;
     831    Eina_List* l;
    835832    int count = 0;
    836833    printf("Cache of unused tiles: entries: %zu/%zu, memory: %zu/%zu\n",
    837            tuc->entries.count, tuc->entries.allocated,
    838            tuc->memory.used, tuc->memory.max);
    839 
    840     EINA_LIST_FOREACH(tuc->entries.list, l, item) {
    841         const Ewk_Tile *t = static_cast<Ewk_Tile_Unused_Cache_Entry*>(item)->tile;
     834           tileUnusedCache->entries.count, tileUnusedCache->entries.allocated,
     835           tileUnusedCache->memory.used, tileUnusedCache->memory.max);
     836
     837    EINA_LIST_FOREACH(tileUnusedCache->entries.list, l, item) {
     838        const Ewk_Tile* tile = static_cast<Ewk_Tile_Unused_Cache_Entry*>(item)->tile;
    842839        printf(" [%3lu,%3lu + %dx%d @ %0.3f]%c",
    843                t->col, t->row, t->w, t->h, t->zoom,
    844                t->visible ? '*': ' ');
     840               tile->col, tile->row, tile->width, tile->height, tile->zoom,
     841               tile->visible ? '*' : ' ');
    845842
    846843        if (!(count % 4))
  • trunk/Source/WebKit/efl/ewk/ewk_tiled_model.h

    r95901 r97329  
    3535void ewk_tile_update_full(Ewk_Tile* t);
    3636void ewk_tile_update_area(Ewk_Tile* t, const Eina_Rectangle* r);
    37 void ewk_tile_updates_process(Ewk_Tile* t, void (* cb)(void* data, Ewk_Tile* t, const Eina_Rectangle* update), const void* data);
     37void ewk_tile_updates_process(Ewk_Tile* t, void (*cb)(void* data, Ewk_Tile* t, const Eina_Rectangle* update), const void* data);
    3838void ewk_tile_updates_clear(Ewk_Tile* t);
    3939
  • trunk/Source/WebKit/efl/ewk/ewk_view.cpp

    r97043 r97329  
    179179
    180180#ifndef EWK_TYPE_CHECK
    181 #define EWK_VIEW_TYPE_CHECK(o, ...) do { } while (0)
     181#define EWK_VIEW_TYPE_CHECK(ewkView, ...) do { } while (0)
    182182#else
    183 #define EWK_VIEW_TYPE_CHECK(o, ...)                                     \
     183#define EWK_VIEW_TYPE_CHECK(ewkView, ...)                                     \
    184184    do {                                                                \
    185         const char* _tmp_otype = evas_object_type_get(o);               \
    186         const Evas_Smart* _tmp_s = evas_object_smart_smart_get(o);      \
     185        const char* _tmp_otype = evas_object_type_get(ewkView);               \
     186        const Evas_Smart* _tmp_s = evas_object_smart_smart_get(ewkView);      \
    187187        if (EINA_UNLIKELY(!_tmp_s)) {                                   \
    188188            EINA_LOG_CRIT                                               \
    189                 ("%p (%s) is not a smart object!", o,                   \
     189                ("%p (%s) is not a smart object!", ewkView,                   \
    190190                _tmp_otype ? _tmp_otype : "(null)");                   \
    191191            return __VA_ARGS__;                                         \
     
    194194        if (EINA_UNLIKELY(!_tmp_sc)) {                                  \
    195195            EINA_LOG_CRIT                                               \
    196                 ("%p (%s) is not a smart object!", o,                   \
     196                ("%p (%s) is not a smart object!", ewkView,                   \
    197197                _tmp_otype ? _tmp_otype : "(null)");                   \
    198198            return __VA_ARGS__;                                         \
     
    201201            EINA_LOG_CRIT                                               \
    202202                ("%p (%s) is not of an ewk_view (need %p, got %p)!",    \
    203                 o, _tmp_otype ? _tmp_otype : "(null)",                 \
     203                ewkView, _tmp_otype ? _tmp_otype : "(null)",                 \
    204204                EWK_VIEW_TYPE_STR, _tmp_sc->data);                     \
    205205            return __VA_ARGS__;                                         \
     
    208208#endif
    209209
    210 #define EWK_VIEW_SD_GET(o, ptr)                                 \
    211     Ewk_View_Smart_Data* ptr = static_cast<Ewk_View_Smart_Data*>(evas_object_smart_data_get(o))
    212 
    213 #define EWK_VIEW_SD_GET_OR_RETURN(o, ptr, ...)          \
    214     EWK_VIEW_TYPE_CHECK(o, __VA_ARGS__);                \
    215     EWK_VIEW_SD_GET(o, ptr);                            \
     210#define EWK_VIEW_SD_GET(ewkView, ptr)                                 \
     211    Ewk_View_Smart_Data* ptr = static_cast<Ewk_View_Smart_Data*>(evas_object_smart_data_get(ewkView))
     212
     213#define EWK_VIEW_SD_GET_OR_RETURN(ewkView, ptr, ...)          \
     214    EWK_VIEW_TYPE_CHECK(ewkView, __VA_ARGS__);                \
     215    EWK_VIEW_SD_GET(ewkView, ptr);                            \
    216216    if (!ptr) {                                         \
    217217        CRITICAL("no smart data for object %p (%s)",    \
    218                  o, evas_object_type_get(o));           \
     218                 ewkView, evas_object_type_get(ewkView));           \
    219219        return __VA_ARGS__;                             \
    220220    }
     
    231231    }
    232232
    233 static void _ewk_view_smart_changed(Ewk_View_Smart_Data* sd)
    234 {
    235     if (sd->changed.any)
     233static void _ewk_view_smart_changed(Ewk_View_Smart_Data* smartData)
     234{
     235    if (smartData->changed.any)
    236236        return;
    237     sd->changed.any = EINA_TRUE;
    238     evas_object_smart_changed(sd->self);
     237    smartData->changed.any = EINA_TRUE;
     238    evas_object_smart_changed(smartData->self);
    239239}
    240240
     
    251251}
    252252
    253 static void _ewk_view_repaint_add(Ewk_View_Private_Data* priv, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h)
     253static void _ewk_view_repaint_add(Ewk_View_Private_Data* priv, Evas_Coord x, Evas_Coord y, Evas_Coord width, Evas_Coord height)
    254254{
    255255    Eina_Rectangle* r;
     
    271271    r->x = x;
    272272    r->y = y;
    273     r->w = w;
    274     r->h = h;
    275 
    276     DBG("add repaint %d, %d+%dx%d", x, y, w, h);
     273    r->w = width;
     274    r->h = height;
     275
     276    DBG("add repaint %d, %d+%dx%d", x, y, width, height);
    277277}
    278278
     
    297297}
    298298
    299 static void _ewk_view_scroll_add(Ewk_View_Private_Data* priv, Evas_Coord dx, Evas_Coord dy, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Eina_Bool main_scroll)
     299static void _ewk_view_scroll_add(Ewk_View_Private_Data* priv, Evas_Coord dx, Evas_Coord dy, Evas_Coord x, Evas_Coord y, Evas_Coord width, Evas_Coord height, Eina_Bool mainScroll)
    300300{
    301301    Ewk_Scroll_Request* r;
    302302    Ewk_Scroll_Request* r_end;
    303     Evas_Coord x2 = x + w, y2 = y + h;
     303    Evas_Coord x2 = x + width, y2 = y + height;
    304304
    305305    r = priv->scrolls.array;
    306306    r_end = r + priv->scrolls.count;
    307307    for (; r < r_end; r++) {
    308         if (r->x == x && r->y == y && r->w == w && r->h == h) {
     308        if (r->x == x && r->y == y && r->w == width && r->h == height) {
    309309            DBG("region already scrolled %d,%d+%dx%d %+03d,%+03d add "
    310310                "%+03d,%+03d",
     
    338338    r->x = x;
    339339    r->y = y;
    340     r->w = w;
    341     r->h = h;
     340    r->w = width;
     341    r->h = height;
    342342    r->x2 = x2;
    343343    r->y2 = y2;
    344344    r->dx = dx;
    345345    r->dy = dy;
    346     r->main_scroll = main_scroll;
    347     DBG("add scroll in region: %d, %d+%dx%d %+03d, %+03d", x, y, w, h, dx, dy);
     346    r->main_scroll = mainScroll;
     347    DBG("add scroll in region: %d, %d+%dx%d %+03d, %+03d", x, y, width, height, dx, dy);
    348348
    349349    Eina_Rectangle* pr;
     
    368368
    369369// Default Event Handling //////////////////////////////////////////////
    370 static Eina_Bool _ewk_view_smart_focus_in(Ewk_View_Smart_Data* sd)
    371 {
    372     EWK_VIEW_PRIV_GET(sd, priv);
     370static Eina_Bool _ewk_view_smart_focus_in(Ewk_View_Smart_Data* smartData)
     371{
     372    EWK_VIEW_PRIV_GET(smartData, priv);
    373373    WebCore::FocusController* fc = priv->page->focusController();
    374     DBG("o=%p, fc=%p", sd->self, fc);
     374    DBG("ewkView=%p, fc=%p", smartData->self, fc);
    375375    EINA_SAFETY_ON_NULL_RETURN_VAL(fc, EINA_FALSE);
    376376
     
    380380}
    381381
    382 static Eina_Bool _ewk_view_smart_focus_out(Ewk_View_Smart_Data* sd)
    383 {
    384     EWK_VIEW_PRIV_GET(sd, priv);
     382static Eina_Bool _ewk_view_smart_focus_out(Ewk_View_Smart_Data* smartData)
     383{
     384    EWK_VIEW_PRIV_GET(smartData, priv);
    385385    WebCore::FocusController* fc = priv->page->focusController();
    386     DBG("o=%p, fc=%p", sd->self, fc);
     386    DBG("ewkView=%p, fc=%p", smartData->self, fc);
    387387    EINA_SAFETY_ON_NULL_RETURN_VAL(fc, EINA_FALSE);
    388388
     
    392392}
    393393
    394 static Eina_Bool _ewk_view_smart_mouse_wheel(Ewk_View_Smart_Data* sd, const Evas_Event_Mouse_Wheel* ev)
    395 {
    396     return ewk_frame_feed_mouse_wheel(sd->main_frame, ev);
    397 }
    398 
    399 static Eina_Bool _ewk_view_smart_mouse_down(Ewk_View_Smart_Data* sd, const Evas_Event_Mouse_Down* ev)
    400 {
    401     return ewk_frame_feed_mouse_down(sd->main_frame, ev);
    402 }
    403 
    404 static Eina_Bool _ewk_view_smart_mouse_up(Ewk_View_Smart_Data* sd, const Evas_Event_Mouse_Up* ev)
    405 {
    406     return ewk_frame_feed_mouse_up(sd->main_frame, ev);
    407 }
    408 
    409 static Eina_Bool _ewk_view_smart_mouse_move(Ewk_View_Smart_Data* sd, const Evas_Event_Mouse_Move* ev)
    410 {
    411     return ewk_frame_feed_mouse_move(sd->main_frame, ev);
    412 }
    413 
    414 static Eina_Bool _ewk_view_smart_key_down(Ewk_View_Smart_Data* sd, const Evas_Event_Key_Down* ev)
    415 {
    416     Evas_Object* frame = ewk_view_frame_focused_get(sd->self);
     394static Eina_Bool _ewk_view_smart_mouse_wheel(Ewk_View_Smart_Data* smartData, const Evas_Event_Mouse_Wheel* wheelEvent)
     395{
     396    return ewk_frame_feed_mouse_wheel(smartData->main_frame, wheelEvent);
     397}
     398
     399static Eina_Bool _ewk_view_smart_mouse_down(Ewk_View_Smart_Data* smartData, const Evas_Event_Mouse_Down* downEvent)
     400{
     401    return ewk_frame_feed_mouse_down(smartData->main_frame, downEvent);
     402}
     403
     404static Eina_Bool _ewk_view_smart_mouse_up(Ewk_View_Smart_Data* smartData, const Evas_Event_Mouse_Up* upEvent)
     405{
     406    return ewk_frame_feed_mouse_up(smartData->main_frame, upEvent);
     407}
     408
     409static Eina_Bool _ewk_view_smart_mouse_move(Ewk_View_Smart_Data* smartData, const Evas_Event_Mouse_Move* moveEvent)
     410{
     411    return ewk_frame_feed_mouse_move(smartData->main_frame, moveEvent);
     412}
     413
     414static Eina_Bool _ewk_view_smart_key_down(Ewk_View_Smart_Data* smartData, const Evas_Event_Key_Down* downEvent)
     415{
     416    Evas_Object* frame = ewk_view_frame_focused_get(smartData->self);
    417417
    418418    if (!frame)
    419         frame = sd->main_frame;
    420 
    421     return ewk_frame_feed_key_down(frame, ev);
    422 }
    423 
    424 static Eina_Bool _ewk_view_smart_key_up(Ewk_View_Smart_Data* sd, const Evas_Event_Key_Up* ev)
    425 {
    426     Evas_Object* frame = ewk_view_frame_focused_get(sd->self);
     419        frame = smartData->main_frame;
     420
     421    return ewk_frame_feed_key_down(frame, downEvent);
     422}
     423
     424static Eina_Bool _ewk_view_smart_key_up(Ewk_View_Smart_Data* smartData, const Evas_Event_Key_Up* upEvent)
     425{
     426    Evas_Object* frame = ewk_view_frame_focused_get(smartData->self);
    427427
    428428    if (!frame)
    429         frame = sd->main_frame;
    430 
    431     return ewk_frame_feed_key_up(frame, ev);
    432 }
    433 
    434 static void _ewk_view_smart_add_console_message(Ewk_View_Smart_Data* sd, const char* message, unsigned int lineNumber, const char* sourceID)
     429        frame = smartData->main_frame;
     430
     431    return ewk_frame_feed_key_up(frame, upEvent);
     432}
     433
     434static void _ewk_view_smart_add_console_message(Ewk_View_Smart_Data* smartData, const char* message, unsigned int lineNumber, const char* sourceID)
    435435{
    436436    INF("console message: %s @%d: %s\n", sourceID, lineNumber, message);
    437437}
    438438
    439 static void _ewk_view_smart_run_javascript_alert(Ewk_View_Smart_Data* sd, Evas_Object* frame, const char* message)
     439static void _ewk_view_smart_run_javascript_alert(Ewk_View_Smart_Data* smartData, Evas_Object* frame, const char* message)
    440440{
    441441    INF("javascript alert: %s\n", message);
    442442}
    443443
    444 static Eina_Bool _ewk_view_smart_run_javascript_confirm(Ewk_View_Smart_Data* sd, Evas_Object* frame, const char* message)
     444static Eina_Bool _ewk_view_smart_run_javascript_confirm(Ewk_View_Smart_Data* smartData, Evas_Object* frame, const char* message)
    445445{
    446446    INF("javascript confirm: %s", message);
     
    449449}
    450450
    451 static Eina_Bool _ewk_view_smart_should_interrupt_javascript(Ewk_View_Smart_Data* sd)
     451static Eina_Bool _ewk_view_smart_should_interrupt_javascript(Ewk_View_Smart_Data* smartData)
    452452{
    453453    INF("should interrupt javascript?\n"
     
    456456}
    457457
    458 static Eina_Bool _ewk_view_smart_run_javascript_prompt(Ewk_View_Smart_Data* sd, Evas_Object* frame, const char* message, const char* defaultValue, char** value)
     458static Eina_Bool _ewk_view_smart_run_javascript_prompt(Ewk_View_Smart_Data* smartData, Evas_Object* frame, const char* message, const char* defaultValue, char** value)
    459459{
    460460    *value = strdup("test");
     
    470470
    471471// Event Handling //////////////////////////////////////////////////////
    472 static void _ewk_view_on_focus_in(void* data, Evas* e, Evas_Object* o, void* event_info)
     472static void _ewk_view_on_focus_in(void* data, Evas* eventType, Evas_Object* callback, void* eventInfo)
    473473{
    474474    Ewk_View_Smart_Data* sd = static_cast<Ewk_View_Smart_Data*>(data);
     
    478478}
    479479
    480 static void _ewk_view_on_focus_out(void* data, Evas* e, Evas_Object* o, void* event_info)
     480static void _ewk_view_on_focus_out(void* data, Evas* eventType, Evas_Object* callback, void* eventInfo)
    481481{
    482482    Ewk_View_Smart_Data* sd = static_cast<Ewk_View_Smart_Data*>(data);
     
    486486}
    487487
    488 static void _ewk_view_on_mouse_wheel(void* data, Evas* e, Evas_Object* o, void* event_info)
    489 {
    490     Evas_Event_Mouse_Wheel* ev = static_cast<Evas_Event_Mouse_Wheel*>(event_info);
     488static void _ewk_view_on_mouse_wheel(void* data, Evas* eventType, Evas_Object* callback, void* eventInfo)
     489{
     490    Evas_Event_Mouse_Wheel* ev = static_cast<Evas_Event_Mouse_Wheel*>(eventInfo);
    491491    Ewk_View_Smart_Data* sd = static_cast<Ewk_View_Smart_Data*>(data);
    492492    EINA_SAFETY_ON_NULL_RETURN(sd->api);
     
    495495}
    496496
    497 static void _ewk_view_on_mouse_down(void* data, Evas* e, Evas_Object* o, void* event_info)
    498 {
    499     Evas_Event_Mouse_Down* ev = static_cast<Evas_Event_Mouse_Down*>(event_info);
     497static void _ewk_view_on_mouse_down(void* data, Evas* eventType, Evas_Object* callback, void* eventInfo)
     498{
     499    Evas_Event_Mouse_Down* ev = static_cast<Evas_Event_Mouse_Down*>(eventInfo);
    500500    Ewk_View_Smart_Data* sd = static_cast<Ewk_View_Smart_Data*>(data);
    501501    EINA_SAFETY_ON_NULL_RETURN(sd->api);
     
    504504}
    505505
    506 static void _ewk_view_on_mouse_up(void* data, Evas* e, Evas_Object* o, void* event_info)
    507 {
    508     Evas_Event_Mouse_Up* ev = static_cast<Evas_Event_Mouse_Up*>(event_info);
     506static void _ewk_view_on_mouse_up(void* data, Evas* eventType, Evas_Object* callback, void* eventInfo)
     507{
     508    Evas_Event_Mouse_Up* ev = static_cast<Evas_Event_Mouse_Up*>(eventInfo);
    509509    Ewk_View_Smart_Data* sd = static_cast<Ewk_View_Smart_Data*>(data);
    510510    EINA_SAFETY_ON_NULL_RETURN(sd->api);
     
    513513}
    514514
    515 static void _ewk_view_on_mouse_move(void* data, Evas* e, Evas_Object* o, void* event_info)
    516 {
    517     Evas_Event_Mouse_Move* ev = static_cast<Evas_Event_Mouse_Move*>(event_info);
     515static void _ewk_view_on_mouse_move(void* data, Evas* eventType, Evas_Object* callback, void* eventInfo)
     516{
     517    Evas_Event_Mouse_Move* ev = static_cast<Evas_Event_Mouse_Move*>(eventInfo);
    518518    Ewk_View_Smart_Data* sd = static_cast<Ewk_View_Smart_Data*>(data);
    519519    EINA_SAFETY_ON_NULL_RETURN(sd->api);
     
    522522}
    523523
    524 static void _ewk_view_on_key_down(void* data, Evas* e, Evas_Object* o, void* event_info)
    525 {
    526     Evas_Event_Key_Down* ev = static_cast<Evas_Event_Key_Down*>(event_info);
     524static void _ewk_view_on_key_down(void* data, Evas* eventType, Evas_Object* callback, void* eventInfo)
     525{
     526    Evas_Event_Key_Down* ev = static_cast<Evas_Event_Key_Down*>(eventInfo);
    527527    Ewk_View_Smart_Data* sd = static_cast<Ewk_View_Smart_Data*>(data);
    528528    EINA_SAFETY_ON_NULL_RETURN(sd->api);
     
    531531}
    532532
    533 static void _ewk_view_on_key_up(void* data, Evas* e, Evas_Object* o, void* event_info)
    534 {
    535     Evas_Event_Key_Up* ev = static_cast<Evas_Event_Key_Up*>(event_info);
     533static void _ewk_view_on_key_up(void* data, Evas* eventType, Evas_Object* callback, void* eventInfo)
     534{
     535    Evas_Event_Key_Up* ev = static_cast<Evas_Event_Key_Up*>(eventInfo);
    536536    Ewk_View_Smart_Data* sd = static_cast<Ewk_View_Smart_Data*>(data);
    537537    EINA_SAFETY_ON_NULL_RETURN(sd->api);
     
    540540}
    541541
    542 static WTF::PassRefPtr<WebCore::Frame> _ewk_view_core_frame_new(Ewk_View_Smart_Data* sd, Ewk_View_Private_Data* priv, WebCore::HTMLFrameOwnerElement* owner)
    543 {
    544     WebCore::FrameLoaderClientEfl* flc = new WebCore::FrameLoaderClientEfl(sd->self);
     542static WTF::PassRefPtr<WebCore::Frame> _ewk_view_core_frame_new(Ewk_View_Smart_Data* smartData, Ewk_View_Private_Data* priv, WebCore::HTMLFrameOwnerElement* owner)
     543{
     544    WebCore::FrameLoaderClientEfl* flc = new WebCore::FrameLoaderClientEfl(smartData->self);
    545545    if (!flc) {
    546546        CRITICAL("Could not create frame loader client.");
     
    554554static Evas_Smart_Class _parent_sc = EVAS_SMART_CLASS_INIT_NULL;
    555555
    556 static Ewk_View_Private_Data* _ewk_view_priv_new(Ewk_View_Smart_Data* sd)
     556static Ewk_View_Private_Data* _ewk_view_priv_new(Ewk_View_Smart_Data* smartData)
    557557{
    558558    Ewk_View_Private_Data* priv =
     
    567567
    568568    WebCore::Page::PageClients pageClients;
    569     pageClients.chromeClient = static_cast<WebCore::ChromeClient*>(new WebCore::ChromeClientEfl(sd->self));
    570     pageClients.editorClient = static_cast<WebCore::EditorClient*>(new WebCore::EditorClientEfl(sd->self));
     569    pageClients.chromeClient = static_cast<WebCore::ChromeClient*>(new WebCore::ChromeClientEfl(smartData->self));
     570    pageClients.editorClient = static_cast<WebCore::EditorClient*>(new WebCore::EditorClientEfl(smartData->self));
    571571    pageClients.dragClient = static_cast<WebCore::DragClient*>(new WebCore::DragClientEfl);
    572572    pageClients.inspectorClient = static_cast<WebCore::InspectorClient*>(new WebCore::InspectorClientEfl);
     
    596596
    597597    priv->page_settings->setLoadsImagesAutomatically(true);
    598     priv->page_settings->setDefaultFixedFontSize(12);
    599     priv->page_settings->setDefaultFontSize(16);
     598    priv->page_settings->setDefaultFixedFontSize(10);
     599    priv->page_settings->setDefaultFontSize(13);
    600600    priv->page_settings->setSerifFontFamily("serif");
    601601    priv->page_settings->setFixedFontFamily("monotype");
     
    667667    priv->settings.dom_timer_interval = priv->page_settings->defaultMinDOMTimerInterval();
    668668
    669     priv->main_frame = _ewk_view_core_frame_new(sd, priv, 0).get();
     669    priv->main_frame = _ewk_view_core_frame_new(smartData, priv, 0).get();
    670670    if (!priv->main_frame) {
    671671        CRITICAL("Could not create main frame.");
     
    722722}
    723723
    724 static void _ewk_view_smart_add(Evas_Object* o)
    725 {
    726     const Evas_Smart* smart = evas_object_smart_smart_get(o);
     724static void _ewk_view_smart_add(Evas_Object* ewkView)
     725{
     726    const Evas_Smart* smart = evas_object_smart_smart_get(ewkView);
    727727    const Evas_Smart_Class* sc = evas_smart_class_get(smart);
    728728    const Ewk_View_Smart_Class* api = reinterpret_cast<const Ewk_View_Smart_Class*>(sc);
    729729    EINA_SAFETY_ON_NULL_RETURN(api->backing_store_add);
    730     EWK_VIEW_SD_GET(o, sd);
     730    EWK_VIEW_SD_GET(ewkView, sd);
    731731
    732732    if (!sd) {
     
    736736            return;
    737737        }
    738         evas_object_smart_data_set(o, sd);
     738        evas_object_smart_data_set(ewkView, sd);
    739739    }
    740740
     
    744744    sd->bg_color.a = 255;
    745745
    746     sd->self = o;
     746    sd->self = ewkView;
    747747    sd->_priv = _ewk_view_priv_new(sd);
    748748    sd->api = api;
    749749
    750     _parent_sc.add(o);
     750    _parent_sc.add(ewkView);
    751751
    752752    if (!sd->_priv)
     
    761761    }
    762762
    763     evas_object_smart_member_add(sd->backing_store, o);
     763    evas_object_smart_member_add(sd->backing_store, ewkView);
    764764    evas_object_show(sd->backing_store);
    765765    evas_object_pass_events_set(sd->backing_store, EINA_TRUE);
     
    767767    sd->events_rect = evas_object_rectangle_add(sd->base.evas);
    768768    evas_object_color_set(sd->events_rect, 0, 0, 0, 0);
    769     evas_object_smart_member_add(sd->events_rect, o);
     769    evas_object_smart_member_add(sd->events_rect, ewkView);
    770770    evas_object_show(sd->events_rect);
    771771
     
    776776    }
    777777
    778     if (!ewk_frame_init(sd->main_frame, o, priv->main_frame)) {
     778    if (!ewk_frame_init(sd->main_frame, ewkView, priv->main_frame)) {
    779779        ERR("Could not initialize main frme object.");
    780780        evas_object_del(sd->main_frame);
     
    787787
    788788    evas_object_name_set(sd->main_frame, "EWK_Frame:main");
    789     evas_object_smart_member_add(sd->main_frame, o);
     789    evas_object_smart_member_add(sd->main_frame, ewkView);
    790790    evas_object_show(sd->main_frame);
    791791
    792 #define CONNECT(s, c) evas_object_event_callback_add(o, s, c, sd)
     792#define CONNECT(s, c) evas_object_event_callback_add(ewkView, s, c, sd)
    793793    CONNECT(EVAS_CALLBACK_FOCUS_IN, _ewk_view_on_focus_in);
    794794    CONNECT(EVAS_CALLBACK_FOCUS_OUT, _ewk_view_on_focus_out);
     
    802802}
    803803
    804 static void _ewk_view_smart_del(Evas_Object* o)
    805 {
    806     EWK_VIEW_SD_GET(o, sd);
     804static void _ewk_view_smart_del(Evas_Object* ewkView)
     805{
     806    EWK_VIEW_SD_GET(ewkView, sd);
    807807    Ewk_View_Private_Data* priv = sd ? sd->_priv : 0;
    808808
    809     ewk_view_stop(o);
    810     _parent_sc.del(o);
     809    ewk_view_stop(ewkView);
     810    _parent_sc.del(ewkView);
    811811    _ewk_view_priv_del(priv);
    812812}
    813813
    814 static void _ewk_view_smart_resize(Evas_Object* o, Evas_Coord w, Evas_Coord h)
    815 {
    816     EWK_VIEW_SD_GET_OR_RETURN(o, sd);
     814static void _ewk_view_smart_resize(Evas_Object* ewkView, Evas_Coord w, Evas_Coord h)
     815{
     816    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd);
    817817
    818818    // these should be queued and processed in calculate as well!
     
    823823}
    824824
    825 static void _ewk_view_smart_move(Evas_Object* o, Evas_Coord x, Evas_Coord y)
    826 {
    827     EWK_VIEW_SD_GET_OR_RETURN(o, sd);
     825static void _ewk_view_smart_move(Evas_Object* ewkView, Evas_Coord x, Evas_Coord y)
     826{
     827    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd);
    828828    sd->changed.position = EINA_TRUE;
    829829    _ewk_view_smart_changed(sd);
    830830}
    831831
    832 static void _ewk_view_smart_calculate(Evas_Object* o)
    833 {
    834     EWK_VIEW_SD_GET(o, sd);
     832static void _ewk_view_smart_calculate(Evas_Object* ewkView)
     833{
     834    EWK_VIEW_SD_GET(ewkView, sd);
    835835    EWK_VIEW_PRIV_GET(sd, priv);
    836836    EINA_SAFETY_ON_NULL_RETURN(sd->api->contents_resize);
     
    844844        return;
    845845
    846     evas_object_geometry_get(o, &x, &y, &w, &h);
    847 
    848     DBG("o=%p geo=[%d, %d + %dx%d], changed: size=%hhu, "
     846    evas_object_geometry_get(ewkView, &x, &y, &w, &h);
     847
     848    DBG("ewkView=%p geo=[%d, %d + %dx%d], changed: size=%hhu, "
    849849        "scrolls=%zu, repaints=%zu",
    850         o, x, y, w, h, sd->changed.size,
     850        ewkView, x, y, w, h, sd->changed.size,
    851851        priv->scrolls.count, priv->repaints.count);
    852852
     
    867867
    868868        // This callback is a good place e.g. to change fixed layout size (ewk_view_fixed_layout_size_set).
    869         evas_object_smart_callback_call(o, "view,resized", 0);
     869        evas_object_smart_callback_call(ewkView, "view,resized", 0);
    870870    }
    871871    sd->changed.size = EINA_FALSE;
     
    896896}
    897897
    898 static void _ewk_view_smart_show(Evas_Object* o)
    899 {
    900     EWK_VIEW_SD_GET_OR_RETURN(o, sd);
     898static void _ewk_view_smart_show(Evas_Object* ewkView)
     899{
     900    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd);
    901901
    902902    if (evas_object_clipees_get(sd->base.clipper))
     
    905905}
    906906
    907 static void _ewk_view_smart_hide(Evas_Object* o)
    908 {
    909     EWK_VIEW_SD_GET_OR_RETURN(o, sd);
     907static void _ewk_view_smart_hide(Evas_Object* ewkView)
     908{
     909    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd);
    910910
    911911    evas_object_hide(sd->base.clipper);
     
    913913}
    914914
    915 static Eina_Bool _ewk_view_smart_contents_resize(Ewk_View_Smart_Data* sd, int w, int h)
    916 {
    917     return EINA_TRUE;
    918 }
    919 
    920 static Eina_Bool _ewk_view_smart_zoom_set(Ewk_View_Smart_Data* sd, float zoom, Evas_Coord cx, Evas_Coord cy)
     915static Eina_Bool _ewk_view_smart_contents_resize(Ewk_View_Smart_Data* smartData, int width, int height)
     916{
     917    return EINA_TRUE;
     918}
     919
     920static Eina_Bool _ewk_view_smart_zoom_set(Ewk_View_Smart_Data* smartData, float zoom, Evas_Coord centerX, Evas_Coord centerY)
    921921{
    922922    double px, py;
     
    924924    Eina_Bool ret;
    925925
    926     ewk_frame_scroll_size_get(sd->main_frame, &w, &h);
    927     ewk_frame_scroll_pos_get(sd->main_frame, &x, &y);
    928 
    929     if (w + sd->view.w > 0)
    930         px = static_cast<double>(x + cx) / (w + sd->view.w);
     926    ewk_frame_scroll_size_get(smartData->main_frame, &w, &h);
     927    ewk_frame_scroll_pos_get(smartData->main_frame, &x, &y);
     928
     929    if (w + smartData->view.w > 0)
     930        px = static_cast<double>(x + centerX) / (w + smartData->view.w);
    931931    else
    932932        px = 0.0;
    933933
    934     if (h + sd->view.h > 0)
    935         py = static_cast<double>(y + cy) / (h + sd->view.h);
     934    if (h + smartData->view.h > 0)
     935        py = static_cast<double>(y + centerY) / (h + smartData->view.h);
    936936    else
    937937        py = 0.0;
    938938
    939     ret = ewk_frame_page_zoom_set(sd->main_frame, zoom);
    940 
    941     ewk_frame_scroll_size_get(sd->main_frame, &w, &h);
    942     x = (w + sd->view.w) * px - cx;
    943     y = (h + sd->view.h) * py - cy;
    944     ewk_frame_scroll_set(sd->main_frame, x, y);
     939    ret = ewk_frame_page_zoom_set(smartData->main_frame, zoom);
     940
     941    ewk_frame_scroll_size_get(smartData->main_frame, &w, &h);
     942    x = (w + smartData->view.w) * px - centerX;
     943    y = (h + smartData->view.h) * py - centerY;
     944    ewk_frame_scroll_set(smartData->main_frame, x, y);
    945945    return ret;
    946946}
    947947
    948 static void _ewk_view_smart_flush(Ewk_View_Smart_Data* sd)
    949 {
    950     EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv);
     948static void _ewk_view_smart_flush(Ewk_View_Smart_Data* smartData)
     949{
     950    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
    951951    _ewk_view_repaints_flush(priv);
    952952    _ewk_view_scrolls_flush(priv);
    953953}
    954954
    955 static Eina_Bool _ewk_view_smart_pre_render_region(Ewk_View_Smart_Data* sd, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, float zoom)
     955static Eina_Bool _ewk_view_smart_pre_render_region(Ewk_View_Smart_Data* smartData, Evas_Coord x, Evas_Coord y, Evas_Coord width, Evas_Coord height, float zoom)
    956956{
    957957    WRN("not supported by engine. sd=%p area=%d,%d+%dx%d, zoom=%f",
    958         sd, x, y, w, h, zoom);
     958        smartData, x, y, width, height, zoom);
    959959    return EINA_FALSE;
    960960}
    961961
    962 static Eina_Bool _ewk_view_smart_pre_render_relative_radius(Ewk_View_Smart_Data* sd, unsigned int n, float zoom)
     962static Eina_Bool _ewk_view_smart_pre_render_relative_radius(Ewk_View_Smart_Data* smartData, unsigned int number, float zoom)
    963963{
    964964    WRN("not supported by engine. sd=%p, n=%u zoom=%f",
    965         sd, n, zoom);
     965        smartData, number, zoom);
    966966    return EINA_FALSE;
    967967}
    968968
    969 static void _ewk_view_smart_pre_render_cancel(Ewk_View_Smart_Data* sd)
    970 {
    971     WRN("not supported by engine. sd=%p", sd);
    972 }
    973 
    974 static void _ewk_view_zoom_animated_mark_stop(Ewk_View_Smart_Data* sd)
    975 {
    976     sd->animated_zoom.zoom.start = 0.0;
    977     sd->animated_zoom.zoom.end = 0.0;
    978     sd->animated_zoom.zoom.current = 0.0;
    979 }
    980 
    981 static void _ewk_view_zoom_animated_finish(Ewk_View_Smart_Data* sd)
    982 {
    983     EWK_VIEW_PRIV_GET(sd, priv);
     969static void _ewk_view_smart_pre_render_cancel(Ewk_View_Smart_Data* smartData)
     970{
     971    WRN("not supported by engine. sd=%p", smartData);
     972}
     973
     974static void _ewk_view_zoom_animated_mark_stop(Ewk_View_Smart_Data* smartData)
     975{
     976    smartData->animated_zoom.zoom.start = 0.0;
     977    smartData->animated_zoom.zoom.end = 0.0;
     978    smartData->animated_zoom.zoom.current = 0.0;
     979}
     980
     981static void _ewk_view_zoom_animated_finish(Ewk_View_Smart_Data* smartData)
     982{
     983    EWK_VIEW_PRIV_GET(smartData, priv);
    984984    ecore_animator_del(priv->animated_zoom.animator);
    985985    priv->animated_zoom.animator = 0;
    986     _ewk_view_zoom_animated_mark_stop(sd);
    987     evas_object_smart_callback_call(sd->self, "zoom,animated,end", 0);
     986    _ewk_view_zoom_animated_mark_stop(smartData);
     987    evas_object_smart_callback_call(smartData->self, "zoom,animated,end", 0);
    988988}
    989989
     
    10331033}
    10341034
    1035 static void _ewk_view_zoom_animation_start(Ewk_View_Smart_Data* sd)
    1036 {
    1037     EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv);
     1035static void _ewk_view_zoom_animation_start(Ewk_View_Smart_Data* smartData)
     1036{
     1037    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
    10381038    if (priv->animated_zoom.animator)
    10391039        return;
    10401040    priv->animated_zoom.animator = ecore_animator_add
    1041                                        (_ewk_view_zoom_animator_cb, sd);
    1042 }
    1043 
    1044 static WebCore::ViewportAttributes _ewk_view_viewport_attributes_compute(const Evas_Object* o)
    1045 {
    1046     EWK_VIEW_SD_GET(o, sd);
     1041                                       (_ewk_view_zoom_animator_cb, smartData);
     1042}
     1043
     1044static WebCore::ViewportAttributes _ewk_view_viewport_attributes_compute(const Evas_Object* ewkView)
     1045{
     1046    EWK_VIEW_SD_GET(ewkView, sd);
    10471047    EWK_VIEW_PRIV_GET(sd, priv);
    10481048
     
    10581058}
    10591059
    1060 static Eina_Bool _ewk_view_smart_disable_render(Ewk_View_Smart_Data* sd)
    1061 {
    1062     WRN("not supported by engine. sd=%p", sd);
     1060static Eina_Bool _ewk_view_smart_disable_render(Ewk_View_Smart_Data* smartData)
     1061{
     1062    WRN("not supported by engine. sd=%p", smartData);
    10631063    return EINA_FALSE;
    10641064}
    10651065
    1066 static Eina_Bool _ewk_view_smart_enable_render(Ewk_View_Smart_Data* sd)
    1067 {
    1068     WRN("not supported by engine. sd=%p", sd);
     1066static Eina_Bool _ewk_view_smart_enable_render(Ewk_View_Smart_Data* smartData)
     1067{
     1068    WRN("not supported by engine. sd=%p", smartData);
    10691069    return EINA_FALSE;
    10701070}
     
    11211121}
    11221122
    1123 void ewk_view_fixed_layout_size_set(Evas_Object* o, Evas_Coord w, Evas_Coord h)
    1124 {
    1125     EWK_VIEW_SD_GET_OR_RETURN(o, sd);
     1123void ewk_view_fixed_layout_size_set(Evas_Object* ewkView, Evas_Coord width, Evas_Coord height)
     1124{
     1125    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd);
    11261126    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv);
    11271127
    11281128    WebCore::FrameView* view = priv->main_frame->view();
    1129     if (w <= 0 && h <= 0) {
     1129    if (width <= 0 && height <= 0) {
    11301130        if (!view->useFixedLayout())
    11311131            return;
     
    11331133    } else {
    11341134        WebCore::IntSize size = view->fixedLayoutSize();
    1135         if (size.width() == w && size.height() == h)
     1135        if (size.width() == width && size.height() == height)
    11361136            return;
    11371137        if (view)
    1138             view->setFixedLayoutSize(WebCore::IntSize(w, h));
     1138            view->setFixedLayoutSize(WebCore::IntSize(width, height));
    11391139    }
    11401140
     
    11451145}
    11461146
    1147 void ewk_view_fixed_layout_size_get(const Evas_Object* o, Evas_Coord* w, Evas_Coord* h)
    1148 {
    1149     if (w)
    1150         *w = 0;
    1151     if (h)
    1152         *h = 0;
    1153     EWK_VIEW_SD_GET_OR_RETURN(o, sd);
     1147void ewk_view_fixed_layout_size_get(const Evas_Object* ewkView, Evas_Coord* width, Evas_Coord* height)
     1148{
     1149    if (width)
     1150        *width = 0;
     1151    if (height)
     1152        *height = 0;
     1153    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd);
    11541154    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv);
    11551155    WebCore::FrameView* view = priv->main_frame->view();
    11561156    if (view->useFixedLayout()) {
    11571157        WebCore::IntSize size = view->fixedLayoutSize();
    1158         if (w)
    1159             *w = size.width();
    1160         if (h)
    1161             *h = size.height();
    1162     }
    1163 }
    1164 
    1165 void ewk_view_theme_set(Evas_Object* o, const char* path)
    1166 {
    1167     EWK_VIEW_SD_GET_OR_RETURN(o, sd);
     1158        if (width)
     1159            *width = size.width();
     1160        if (height)
     1161            *height = size.height();
     1162    }
     1163}
     1164
     1165void ewk_view_theme_set(Evas_Object* ewkView, const char* path)
     1166{
     1167    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd);
    11681168    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv);
    11691169    if (!eina_stringshare_replace(&priv->settings.theme, path))
     
    11781178}
    11791179
    1180 const char* ewk_view_theme_get(const Evas_Object* o)
    1181 {
    1182     EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0);
     1180const char* ewk_view_theme_get(const Evas_Object* ewkView)
     1181{
     1182    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, 0);
    11831183    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, 0);
    11841184    return priv->settings.theme;
    11851185}
    11861186
    1187 Evas_Object* ewk_view_frame_main_get(const Evas_Object* o)
    1188 {
    1189     EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0);
     1187Evas_Object* ewk_view_frame_main_get(const Evas_Object* ewkView)
     1188{
     1189    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, 0);
    11901190    return sd->main_frame;
    11911191}
    11921192
    1193 Evas_Object* ewk_view_frame_focused_get(const Evas_Object* o)
    1194 {
    1195     EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0);
     1193Evas_Object* ewk_view_frame_focused_get(const Evas_Object* ewkView)
     1194{
     1195    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, 0);
    11961196    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, 0);
    11971197
     
    12061206}
    12071207
    1208 Eina_Bool ewk_view_uri_set(Evas_Object* o, const char* uri)
    1209 {
    1210     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     1208Eina_Bool ewk_view_uri_set(Evas_Object* ewkView, const char* uri)
     1209{
     1210    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    12111211    return ewk_frame_uri_set(sd->main_frame, uri);
    12121212}
    12131213
    1214 const char* ewk_view_uri_get(const Evas_Object* o)
    1215 {
    1216     EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0);
     1214const char* ewk_view_uri_get(const Evas_Object* ewkView)
     1215{
     1216    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, 0);
    12171217    return ewk_frame_uri_get(sd->main_frame);
    12181218}
    12191219
    1220 const char* ewk_view_title_get(const Evas_Object* o)
    1221 {
    1222     EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0);
     1220const char* ewk_view_title_get(const Evas_Object* ewkView)
     1221{
     1222    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, 0);
    12231223    return ewk_frame_title_get(sd->main_frame);
    12241224}
    12251225
    1226 Eina_Bool ewk_view_editable_get(const Evas_Object* o)
    1227 {
    1228     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     1226Eina_Bool ewk_view_editable_get(const Evas_Object* ewkView)
     1227{
     1228    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    12291229    return ewk_frame_editable_get(sd->main_frame);
    12301230}
    12311231
    1232 void ewk_view_bg_color_set(Evas_Object* o, int r, int g, int b, int a)
    1233 {
    1234     EWK_VIEW_SD_GET_OR_RETURN(o, sd);
     1232void ewk_view_bg_color_set(Evas_Object* ewkView, int red, int green, int blue, int alpha)
     1233{
     1234    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd);
    12351235    EINA_SAFETY_ON_NULL_RETURN(sd->api);
    12361236    EINA_SAFETY_ON_NULL_RETURN(sd->api->bg_color_set);
    12371237
    1238     if (a < 0) {
    1239         WRN("Alpha less than zero (%d).", a);
    1240         a = 0;
    1241     } else if (a > 255) {
    1242         WRN("Alpha is larger than 255 (%d).", a);
    1243         a = 255;
     1238    if (alpha < 0) {
     1239        WRN("Alpha less than zero (%d).", alpha);
     1240        alpha = 0;
     1241    } else if (alpha > 255) {
     1242        WRN("Alpha is larger than 255 (%d).", alpha);
     1243        alpha = 255;
    12441244    }
    12451245
     
    12531253        c = a;                                                          \
    12541254    }
    1255     CHECK_PREMUL_COLOR(r, a);
    1256     CHECK_PREMUL_COLOR(g, a);
    1257     CHECK_PREMUL_COLOR(b, a);
     1255    CHECK_PREMUL_COLOR(red, alpha);
     1256    CHECK_PREMUL_COLOR(green, alpha);
     1257    CHECK_PREMUL_COLOR(blue, alpha);
    12581258#undef CHECK_PREMUL_COLOR
    12591259
    1260     sd->bg_color.r = r;
    1261     sd->bg_color.g = g;
    1262     sd->bg_color.b = b;
    1263     sd->bg_color.a = a;
    1264 
    1265     sd->api->bg_color_set(sd, r, g, b, a);
     1260    sd->bg_color.r = red;
     1261    sd->bg_color.g = green;
     1262    sd->bg_color.b = blue;
     1263    sd->bg_color.a = alpha;
     1264
     1265    sd->api->bg_color_set(sd, red, green, blue, alpha);
    12661266
    12671267    WebCore::FrameView* view = sd->_priv->main_frame->view();
     
    12691269        WebCore::Color color;
    12701270
    1271         if (!a)
     1271        if (!alpha)
    12721272            color = WebCore::Color(0, 0, 0, 0);
    1273         else if (a == 255)
    1274             color = WebCore::Color(r, g, b, a);
     1273        else if (alpha == 255)
     1274            color = WebCore::Color(red, green, blue, alpha);
    12751275        else
    1276             color = WebCore::Color(r * 255 / a, g * 255 / a, b * 255 / a, a);
    1277 
    1278         view->updateBackgroundRecursively(color, !a);
    1279     }
    1280 }
    1281 
    1282 void ewk_view_bg_color_get(const Evas_Object* o, int* r, int* g, int* b, int* a)
    1283 {
    1284     if (r)
    1285         *r = 0;
    1286     if (g)
    1287         *g = 0;
    1288     if (b)
    1289         *b = 0;
    1290     if (a)
    1291         *a = 0;
    1292     EWK_VIEW_SD_GET_OR_RETURN(o, sd);
    1293     if (r)
    1294         *r = sd->bg_color.r;
    1295     if (g)
    1296         *g = sd->bg_color.g;
    1297     if (b)
    1298         *b = sd->bg_color.b;
    1299     if (a)
    1300         *a = sd->bg_color.a;
    1301 }
    1302 
    1303 Eina_Bool ewk_view_text_search(const Evas_Object* o, const char* string, Eina_Bool case_sensitive, Eina_Bool forward, Eina_Bool wrap)
    1304 {
    1305     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     1276            color = WebCore::Color(red * 255 / alpha, green * 255 / alpha, blue * 255 / alpha, alpha);
     1277
     1278        view->updateBackgroundRecursively(color, !alpha);
     1279    }
     1280}
     1281
     1282void ewk_view_bg_color_get(const Evas_Object* ewkView, int* red, int* green, int* blue, int* alpha)
     1283{
     1284    if (red)
     1285        *red = 0;
     1286    if (green)
     1287        *green = 0;
     1288    if (blue)
     1289        *blue = 0;
     1290    if (alpha)
     1291        *alpha = 0;
     1292    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd);
     1293    if (red)
     1294        *red = sd->bg_color.r;
     1295    if (green)
     1296        *green = sd->bg_color.g;
     1297    if (blue)
     1298        *blue = sd->bg_color.b;
     1299    if (alpha)
     1300        *alpha = sd->bg_color.a;
     1301}
     1302
     1303Eina_Bool ewk_view_text_search(const Evas_Object* ewkView, const char* string, Eina_Bool caseSensitive, Eina_Bool forward, Eina_Bool wrap)
     1304{
     1305    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    13061306    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
    13071307    EINA_SAFETY_ON_NULL_RETURN_VAL(string, EINA_FALSE);
     
    13091309    WebCore::FindDirection direction;
    13101310
    1311     if (case_sensitive)
     1311    if (caseSensitive)
    13121312        sensitive = WTF::TextCaseSensitive;
    13131313    else
     
    13271327 * @param o view object where to search text.
    13281328 * @param string reference string to match.
    1329  * @param case_sensitive if match should be case sensitive or not.
     1329 * @param caseSensitive if match should be case sensitive or not.
    13301330 * @param highlight if matches should be highlighted.
    13311331 * @param limit maximum amount of matches, or zero to unlimited.
     
    13331333 * @return number of matches.
    13341334 */
    1335 unsigned int ewk_view_text_matches_mark(Evas_Object* o, const char* string, Eina_Bool case_sensitive, Eina_Bool highlight, unsigned int limit)
    1336 {
    1337     EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0);
     1335unsigned int ewk_view_text_matches_mark(Evas_Object* ewkView, const char* string, Eina_Bool caseSensitive, Eina_Bool highlight, unsigned int limit)
     1336{
     1337    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, 0);
    13381338    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, 0);
    13391339    EINA_SAFETY_ON_NULL_RETURN_VAL(string, 0);
    13401340    WTF::TextCaseSensitivity sensitive;
    13411341
    1342     if (case_sensitive)
     1342    if (caseSensitive)
    13431343        sensitive = WTF::TextCaseSensitive;
    13441344    else
     
    13481348}
    13491349
    1350 Eina_Bool ewk_view_text_matches_unmark_all(Evas_Object* o)
    1351 {
    1352     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     1350Eina_Bool ewk_view_text_matches_unmark_all(Evas_Object* ewkView)
     1351{
     1352    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    13531353    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
    13541354    priv->page->unmarkAllTextMatches();
     
    13561356}
    13571357
    1358 Eina_Bool ewk_view_text_matches_highlight_set(Evas_Object* o, Eina_Bool highlight)
    1359 {
    1360     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     1358Eina_Bool ewk_view_text_matches_highlight_set(Evas_Object* ewkView, Eina_Bool highlight)
     1359{
     1360    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    13611361    return ewk_frame_text_matches_highlight_set(sd->main_frame, highlight);
    13621362}
    13631363
    1364 Eina_Bool ewk_view_text_matches_highlight_get(const Evas_Object* o)
    1365 {
    1366     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     1364Eina_Bool ewk_view_text_matches_highlight_get(const Evas_Object* ewkView)
     1365{
     1366    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    13671367    return ewk_frame_text_matches_highlight_get(sd->main_frame);
    13681368}
    13691369
    1370 Eina_Bool ewk_view_editable_set(Evas_Object* o, Eina_Bool editable)
    1371 {
    1372     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     1370Eina_Bool ewk_view_editable_set(Evas_Object* ewkView, Eina_Bool editable)
     1371{
     1372    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    13731373    return ewk_frame_editable_set(sd->main_frame, editable);
    13741374}
    13751375
    1376 char* ewk_view_selection_get(const Evas_Object* o)
    1377 {
    1378     EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0);
     1376char* ewk_view_selection_get(const Evas_Object* ewkView)
     1377{
     1378    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, 0);
    13791379    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, 0);
    13801380    CString s = priv->page->focusController()->focusedOrMainFrame()->editor()->selectedText().utf8();
     
    13891389}
    13901390
    1391 Eina_Bool ewk_view_execute_editor_command(Evas_Object* o, const Ewk_Editor_Command command, const char* value)
    1392 {
    1393     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     1391Eina_Bool ewk_view_execute_editor_command(Evas_Object* ewkView, const Ewk_Editor_Command command, const char* value)
     1392{
     1393    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    13941394    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
    13951395
     
    14161416}
    14171417
    1418 Eina_Bool ewk_view_context_menu_forward_event(Evas_Object* o, const Evas_Event_Mouse_Down* ev)
     1418Eina_Bool ewk_view_context_menu_forward_event(Evas_Object* ewkView, const Evas_Event_Mouse_Down* downEvent)
    14191419{
    14201420#if ENABLE(CONTEXT_MENUS)
    1421     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     1421    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    14221422    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
    14231423    Eina_Bool mouse_press_handled = EINA_FALSE;
     
    14281428    evas_object_geometry_get(sd->self, &x, &y, 0, 0);
    14291429
    1430     WebCore::PlatformMouseEvent event(ev, WebCore::IntPoint(x, y));
     1430    WebCore::PlatformMouseEvent event(downEvent, WebCore::IntPoint(x, y));
    14311431
    14321432    if (main_frame->view()) {
     
    14521452}
    14531453
    1454 double ewk_view_load_progress_get(const Evas_Object* o)
    1455 {
    1456     EWK_VIEW_SD_GET_OR_RETURN(o, sd, -1.0);
     1454double ewk_view_load_progress_get(const Evas_Object* ewkView)
     1455{
     1456    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, -1.0);
    14571457    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, -1.0);
    14581458    return priv->page->progress()->estimatedProgress();
    14591459}
    14601460
    1461 Eina_Bool ewk_view_stop(Evas_Object* o)
    1462 {
    1463     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     1461Eina_Bool ewk_view_stop(Evas_Object* ewkView)
     1462{
     1463    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    14641464    return ewk_frame_stop(sd->main_frame);
    14651465}
    14661466
    1467 Eina_Bool ewk_view_reload(Evas_Object* o)
    1468 {
    1469     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     1467Eina_Bool ewk_view_reload(Evas_Object* ewkView)
     1468{
     1469    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    14701470    return ewk_frame_reload(sd->main_frame);
    14711471}
    14721472
    1473 Eina_Bool ewk_view_reload_full(Evas_Object* o)
    1474 {
    1475     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     1473Eina_Bool ewk_view_reload_full(Evas_Object* ewkView)
     1474{
     1475    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    14761476    return ewk_frame_reload_full(sd->main_frame);
    14771477}
    14781478
    1479 Eina_Bool ewk_view_back(Evas_Object* o)
    1480 {
    1481     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     1479Eina_Bool ewk_view_back(Evas_Object* ewkView)
     1480{
     1481    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    14821482    return ewk_frame_back(sd->main_frame);
    14831483}
    14841484
    1485 Eina_Bool ewk_view_forward(Evas_Object* o)
    1486 {
    1487     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     1485Eina_Bool ewk_view_forward(Evas_Object* ewkView)
     1486{
     1487    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    14881488    return ewk_frame_forward(sd->main_frame);
    14891489}
    14901490
    1491 Eina_Bool ewk_view_navigate(Evas_Object* o, int steps)
    1492 {
    1493     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     1491Eina_Bool ewk_view_navigate(Evas_Object* ewkView, int steps)
     1492{
     1493    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    14941494    return ewk_frame_navigate(sd->main_frame, steps);
    14951495}
    14961496
    1497 Eina_Bool ewk_view_back_possible(Evas_Object* o)
    1498 {
    1499     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     1497Eina_Bool ewk_view_back_possible(Evas_Object* ewkView)
     1498{
     1499    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    15001500    return ewk_frame_back_possible(sd->main_frame);
    15011501}
    15021502
    1503 Eina_Bool ewk_view_forward_possible(Evas_Object* o)
    1504 {
    1505     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     1503Eina_Bool ewk_view_forward_possible(Evas_Object* ewkView)
     1504{
     1505    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    15061506    return ewk_frame_forward_possible(sd->main_frame);
    15071507}
    15081508
    1509 Eina_Bool ewk_view_navigate_possible(Evas_Object* o, int steps)
    1510 {
    1511     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     1509Eina_Bool ewk_view_navigate_possible(Evas_Object* ewkView, int steps)
     1510{
     1511    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    15121512    return ewk_frame_navigate_possible(sd->main_frame, steps);
    15131513}
    15141514
    1515 Eina_Bool ewk_view_history_enable_get(const Evas_Object* o)
    1516 {
    1517     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     1515Eina_Bool ewk_view_history_enable_get(const Evas_Object* ewkView)
     1516{
     1517    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    15181518    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
    15191519    return static_cast<WebCore::BackForwardListImpl*>(priv->page->backForwardList())->enabled();
    15201520}
    15211521
    1522 Eina_Bool ewk_view_history_enable_set(Evas_Object* o, Eina_Bool enable)
    1523 {
    1524     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     1522Eina_Bool ewk_view_history_enable_set(Evas_Object* ewkView, Eina_Bool enable)
     1523{
     1524    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    15251525    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
    15261526    static_cast<WebCore::BackForwardListImpl*>(priv->page->backForwardList())->setEnabled(enable);
     
    15281528}
    15291529
    1530 Ewk_History* ewk_view_history_get(const Evas_Object* o)
    1531 {
    1532     EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0);
     1530Ewk_History* ewk_view_history_get(const Evas_Object* ewkView)
     1531{
     1532    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, 0);
    15331533    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, 0);
    15341534    if (!static_cast<WebCore::BackForwardListImpl*>(priv->page->backForwardList())->enabled()) {
     
    15451545}
    15461546
    1547 Eina_Bool ewk_view_zoom_set(Evas_Object* o, float zoom, Evas_Coord cx, Evas_Coord cy)
    1548 {
    1549     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     1547Eina_Bool ewk_view_zoom_set(Evas_Object* ewkView, float zoom, Evas_Coord cx, Evas_Coord cy)
     1548{
     1549    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    15501550    EWK_VIEW_PRIV_GET(sd, priv);
    15511551
     
    16201620}
    16211621
    1622 Eina_Bool ewk_view_zoom_weak_smooth_scale_get(const Evas_Object* o)
    1623 {
    1624     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     1622Eina_Bool ewk_view_zoom_weak_smooth_scale_get(const Evas_Object* ewkView)
     1623{
     1624    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    16251625    return sd->zoom_weak_smooth_scale;
    16261626}
    16271627
    1628 void ewk_view_zoom_weak_smooth_scale_set(Evas_Object* o, Eina_Bool smooth_scale)
    1629 {
    1630     EWK_VIEW_SD_GET_OR_RETURN(o, sd);
    1631     smooth_scale = !!smooth_scale;
    1632     if (sd->zoom_weak_smooth_scale == smooth_scale)
     1628void ewk_view_zoom_weak_smooth_scale_set(Evas_Object* ewkView, Eina_Bool smoothScale)
     1629{
     1630    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd);
     1631    smoothScale = !!smoothScale;
     1632    if (sd->zoom_weak_smooth_scale == smoothScale)
    16331633        return;
    1634     sd->zoom_weak_smooth_scale = smooth_scale;
     1634    sd->zoom_weak_smooth_scale = smoothScale;
    16351635    EINA_SAFETY_ON_NULL_RETURN(sd->api);
    16361636    EINA_SAFETY_ON_NULL_RETURN(sd->api->zoom_weak_smooth_scale_set);
    1637     sd->api->zoom_weak_smooth_scale_set(sd, smooth_scale);
    1638 }
    1639 
    1640 Eina_Bool ewk_view_zoom_weak_set(Evas_Object* o, float zoom, Evas_Coord cx, Evas_Coord cy)
    1641 {
    1642     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     1637    sd->api->zoom_weak_smooth_scale_set(sd, smoothScale);
     1638}
     1639
     1640Eina_Bool ewk_view_zoom_weak_set(Evas_Object* ewkView, float zoom, Evas_Coord centerX, Evas_Coord centerY)
     1641{
     1642    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    16431643    EWK_VIEW_PRIV_GET(sd, priv);
    16441644
     
    16631663    sd->animated_zoom.zoom.end = zoom;
    16641664    sd->animated_zoom.zoom.current = zoom;
    1665     return sd->api->zoom_weak_set(sd, zoom, cx, cy);
    1666 }
    1667 
    1668 Eina_Bool ewk_view_zoom_animated_mark_start(Evas_Object* o, float zoom)
    1669 {
    1670     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     1665    return sd->api->zoom_weak_set(sd, zoom, centerX, centerY);
     1666}
     1667
     1668Eina_Bool ewk_view_zoom_animated_mark_start(Evas_Object* ewkView, float zoom)
     1669{
     1670    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    16711671    sd->animated_zoom.zoom.start = zoom;
    16721672    return EINA_TRUE;
    16731673}
    16741674
    1675 Eina_Bool ewk_view_zoom_animated_mark_end(Evas_Object* o, float zoom)
    1676 {
    1677     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     1675Eina_Bool ewk_view_zoom_animated_mark_end(Evas_Object* ewkView, float zoom)
     1676{
     1677    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    16781678    sd->animated_zoom.zoom.end = zoom;
    16791679    return EINA_TRUE;
    16801680}
    16811681
    1682 Eina_Bool ewk_view_zoom_animated_mark_current(Evas_Object* o, float zoom)
    1683 {
    1684     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     1682Eina_Bool ewk_view_zoom_animated_mark_current(Evas_Object* ewkView, float zoom)
     1683{
     1684    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    16851685    sd->animated_zoom.zoom.current = zoom;
    16861686    return EINA_TRUE;
    16871687}
    16881688
    1689 Eina_Bool ewk_view_zoom_animated_mark_stop(Evas_Object* o)
    1690 {
    1691     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     1689Eina_Bool ewk_view_zoom_animated_mark_stop(Evas_Object* ewkView)
     1690{
     1691    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    16921692    _ewk_view_zoom_animated_mark_stop(sd);
    16931693    return EINA_TRUE;
    16941694}
    16951695
    1696 Eina_Bool ewk_view_zoom_animated_set(Evas_Object* o, float zoom, float duration, Evas_Coord cx, Evas_Coord cy)
     1696Eina_Bool ewk_view_zoom_animated_set(Evas_Object* ewkView, float zoom, float duration, Evas_Coord centerX, Evas_Coord centerY)
    16971697{
    16981698    double now;
    1699     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     1699    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    17001700    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
    17011701    EINA_SAFETY_ON_NULL_RETURN_VAL(sd->api, EINA_FALSE);
     
    17231723    }
    17241724
    1725     if (cx < 0)
    1726         cx = 0;
    1727     if (cy < 0)
    1728         cy = 0;
     1725    if (centerX < 0)
     1726        centerX = 0;
     1727    if (centerY < 0)
     1728        centerY = 0;
    17291729
    17301730    now = ecore_loop_time_get();
     
    17341734    priv->animated_zoom.zoom.end = zoom;
    17351735    priv->animated_zoom.zoom.range = (priv->animated_zoom.zoom.end - priv->animated_zoom.zoom.start);
    1736     priv->animated_zoom.center.x = cx;
    1737     priv->animated_zoom.center.y = cy;
     1736    priv->animated_zoom.center.x = centerX;
     1737    priv->animated_zoom.center.y = centerY;
    17381738    sd->animated_zoom.zoom.current = priv->animated_zoom.zoom.start;
    17391739    sd->animated_zoom.zoom.start = priv->animated_zoom.zoom.start;
     
    17431743}
    17441744
    1745 Eina_Bool ewk_view_pre_render_region(Evas_Object* o, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, float zoom)
    1746 {
    1747     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     1745Eina_Bool ewk_view_pre_render_region(Evas_Object* ewkView, Evas_Coord x, Evas_Coord y, Evas_Coord width, Evas_Coord height, float zoom)
     1746{
     1747    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    17481748    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
    17491749    EINA_SAFETY_ON_NULL_RETURN_VAL(sd->api->pre_render_region, EINA_FALSE);
     
    17661766    cw *= zoom / cur_zoom;
    17671767    ch *= zoom / cur_zoom;
    1768     DBG("region %d,%d+%dx%d @ %f contents=%dx%d", x, y, w, h, zoom, cw, ch);
    1769 
    1770     if (x + w > cw)
    1771         w = cw - x;
    1772 
    1773     if (y + h > ch)
    1774         h = ch - y;
     1768    DBG("region %d,%d+%dx%d @ %f contents=%dx%d", x, y, width, height, zoom, cw, ch);
     1769
     1770    if (x + width > cw)
     1771        width = cw - x;
     1772
     1773    if (y + height > ch)
     1774        height = ch - y;
    17751775
    17761776    if (x < 0) {
    1777         w += x;
     1777        width += x;
    17781778        x = 0;
    17791779    }
    17801780    if (y < 0) {
    1781         h += y;
     1781        height += y;
    17821782        y = 0;
    17831783    }
    17841784
    1785     return sd->api->pre_render_region(sd, x, y, w, h, zoom);
    1786 }
    1787 
    1788 Eina_Bool ewk_view_pre_render_relative_radius(Evas_Object* o, unsigned int n)
    1789 {
    1790     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     1785    return sd->api->pre_render_region(sd, x, y, width, height, zoom);
     1786}
     1787
     1788Eina_Bool ewk_view_pre_render_relative_radius(Evas_Object* ewkView, unsigned int number)
     1789{
     1790    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    17911791    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
    17921792    EINA_SAFETY_ON_NULL_RETURN_VAL(sd->api->pre_render_relative_radius, EINA_FALSE);
     
    17971797
    17981798    cur_zoom = ewk_frame_page_zoom_get(sd->main_frame);
    1799     return sd->api->pre_render_relative_radius(sd, n, cur_zoom);
    1800 }
    1801 
    1802 unsigned int ewk_view_imh_get(const Evas_Object* o)
    1803 {
    1804     EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0);
     1799    return sd->api->pre_render_relative_radius(sd, number, cur_zoom);
     1800}
     1801
     1802unsigned int ewk_view_imh_get(const Evas_Object* ewkView)
     1803{
     1804    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, 0);
    18051805    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, 0);
    18061806    return priv->imh;
    18071807}
    18081808
    1809 void ewk_view_pre_render_cancel(Evas_Object* o)
    1810 {
    1811     EWK_VIEW_SD_GET_OR_RETURN(o, sd);
     1809void ewk_view_pre_render_cancel(Evas_Object* ewkView)
     1810{
     1811    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd);
    18121812    EINA_SAFETY_ON_NULL_RETURN(sd->api->pre_render_cancel);
    18131813    sd->api->pre_render_cancel(sd);
    18141814}
    18151815
    1816 Eina_Bool ewk_view_enable_render(const Evas_Object* o)
    1817 {
    1818     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     1816Eina_Bool ewk_view_enable_render(const Evas_Object* ewkView)
     1817{
     1818    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    18191819    EINA_SAFETY_ON_NULL_RETURN_VAL(sd->api->enable_render, EINA_FALSE);
    18201820    return sd->api->enable_render(sd);
    18211821}
    18221822
    1823 Eina_Bool ewk_view_disable_render(const Evas_Object* o)
    1824 {
    1825     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     1823Eina_Bool ewk_view_disable_render(const Evas_Object* ewkView)
     1824{
     1825    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    18261826    EINA_SAFETY_ON_NULL_RETURN_VAL(sd->api->disable_render, EINA_FALSE);
    18271827    return sd->api->disable_render(sd);
    18281828}
    18291829
    1830 const char* ewk_view_setting_user_agent_get(const Evas_Object* o)
    1831 {
    1832     EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0);
     1830const char* ewk_view_setting_user_agent_get(const Evas_Object* ewkView)
     1831{
     1832    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, 0);
    18331833    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, 0);
    18341834    return priv->settings.user_agent;
    18351835}
    18361836
    1837 Eina_Bool ewk_view_setting_user_agent_set(Evas_Object* o, const char* user_agent)
    1838 {
    1839     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
    1840     EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
    1841     if (eina_stringshare_replace(&priv->settings.user_agent, user_agent)) {
     1837Eina_Bool ewk_view_setting_user_agent_set(Evas_Object* ewkView, const char* userAgent)
     1838{
     1839    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
     1840    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
     1841    if (eina_stringshare_replace(&priv->settings.user_agent, userAgent)) {
    18421842        WebCore::FrameLoaderClientEfl* client = static_cast<WebCore::FrameLoaderClientEfl*>(priv->main_frame->loader()->client());
    1843         client->setCustomUserAgent(String::fromUTF8(user_agent));
    1844     }
    1845     return EINA_TRUE;
    1846 }
    1847 
    1848 const char* ewk_view_setting_user_stylesheet_get(const Evas_Object* o)
    1849 {
    1850     EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0);
     1843        client->setCustomUserAgent(String::fromUTF8(userAgent));
     1844    }
     1845    return EINA_TRUE;
     1846}
     1847
     1848const char* ewk_view_setting_user_stylesheet_get(const Evas_Object* ewkView)
     1849{
     1850    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, 0);
    18511851    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, 0);
    18521852    return priv->settings.user_stylesheet;
    18531853}
    18541854
    1855 Eina_Bool ewk_view_setting_user_stylesheet_set(Evas_Object* o, const char* uri)
    1856 {
    1857     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     1855Eina_Bool ewk_view_setting_user_stylesheet_set(Evas_Object* ewkView, const char* uri)
     1856{
     1857    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    18581858    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
    18591859    if (eina_stringshare_replace(&priv->settings.user_stylesheet, uri)) {
     
    18641864}
    18651865
    1866 Eina_Bool ewk_view_setting_auto_load_images_get(const Evas_Object* o)
    1867 {
    1868     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     1866Eina_Bool ewk_view_setting_auto_load_images_get(const Evas_Object* ewkView)
     1867{
     1868    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    18691869    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
    18701870    return priv->settings.auto_load_images;
    18711871}
    18721872
    1873 Eina_Bool ewk_view_setting_auto_load_images_set(Evas_Object* o, Eina_Bool automatic)
    1874 {
    1875     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     1873Eina_Bool ewk_view_setting_auto_load_images_set(Evas_Object* ewkView, Eina_Bool automatic)
     1874{
     1875    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    18761876    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
    18771877    automatic = !!automatic;
     
    18831883}
    18841884
    1885 Eina_Bool ewk_view_setting_auto_shrink_images_get(const Evas_Object* o)
    1886 {
    1887     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     1885Eina_Bool ewk_view_setting_auto_shrink_images_get(const Evas_Object* ewkView)
     1886{
     1887    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    18881888    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
    18891889    return priv->settings.auto_shrink_images;
    18901890}
    18911891
    1892 Eina_Bool ewk_view_setting_auto_shrink_images_set(Evas_Object* o, Eina_Bool automatic)
    1893 {
    1894     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     1892Eina_Bool ewk_view_setting_auto_shrink_images_set(Evas_Object* ewkView, Eina_Bool automatic)
     1893{
     1894    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    18951895    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
    18961896    automatic = !!automatic;
     
    19021902}
    19031903
    1904 Eina_Bool ewk_view_setting_enable_auto_resize_window_get(const Evas_Object* o)
    1905 {
    1906     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     1904Eina_Bool ewk_view_setting_enable_auto_resize_window_get(const Evas_Object* ewkView)
     1905{
     1906    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    19071907    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
    19081908    return priv->settings.enable_auto_resize_window;
    19091909}
    19101910
    1911 Eina_Bool ewk_view_setting_enable_auto_resize_window_set(Evas_Object* o, Eina_Bool resizable)
    1912 {
    1913     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     1911Eina_Bool ewk_view_setting_enable_auto_resize_window_set(Evas_Object* ewkView, Eina_Bool resizable)
     1912{
     1913    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    19141914    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
    19151915    priv->settings.enable_auto_resize_window = resizable;
     
    19171917}
    19181918
    1919 Eina_Bool ewk_view_setting_enable_scripts_get(const Evas_Object* o)
    1920 {
    1921     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     1919Eina_Bool ewk_view_setting_enable_scripts_get(const Evas_Object* ewkView)
     1920{
     1921    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    19221922    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
    19231923    return priv->settings.enable_scripts;
    19241924}
    19251925
    1926 Eina_Bool ewk_view_setting_enable_scripts_set(Evas_Object* o, Eina_Bool enable)
    1927 {
    1928     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     1926Eina_Bool ewk_view_setting_enable_scripts_set(Evas_Object* ewkView, Eina_Bool enable)
     1927{
     1928    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    19291929    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
    19301930    enable = !!enable;
     
    19361936}
    19371937
    1938 Eina_Bool ewk_view_setting_enable_plugins_get(const Evas_Object* o)
    1939 {
    1940     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     1938Eina_Bool ewk_view_setting_enable_plugins_get(const Evas_Object* ewkView)
     1939{
     1940    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    19411941    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
    19421942    return priv->settings.enable_plugins;
    19431943}
    19441944
    1945 Eina_Bool ewk_view_setting_enable_plugins_set(Evas_Object* o, Eina_Bool enable)
    1946 {
    1947     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     1945Eina_Bool ewk_view_setting_enable_plugins_set(Evas_Object* ewkView, Eina_Bool enable)
     1946{
     1947    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    19481948    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
    19491949    enable = !!enable;
     
    19551955}
    19561956
    1957 Eina_Bool ewk_view_setting_enable_frame_flattening_get(const Evas_Object* o)
    1958 {
    1959     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     1957Eina_Bool ewk_view_setting_enable_frame_flattening_get(const Evas_Object* ewkView)
     1958{
     1959    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    19601960    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
    19611961    return priv->settings.enable_frame_flattening;
    19621962}
    19631963
    1964 Eina_Bool ewk_view_setting_enable_frame_flattening_set(Evas_Object* o, Eina_Bool enable)
    1965 {
    1966     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     1964Eina_Bool ewk_view_setting_enable_frame_flattening_set(Evas_Object* ewkView, Eina_Bool enable)
     1965{
     1966    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    19671967    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
    19681968    enable = !!enable;
     
    19741974}
    19751975
    1976 Eina_Bool ewk_view_setting_scripts_window_open_get(const Evas_Object* o)
    1977 {
    1978     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     1976Eina_Bool ewk_view_setting_scripts_window_open_get(const Evas_Object* ewkView)
     1977{
     1978    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    19791979    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
    19801980    return priv->settings.scripts_window_open;
    19811981}
    19821982
    1983 Eina_Bool ewk_view_setting_scripts_window_open_set(Evas_Object* o, Eina_Bool allow)
    1984 {
    1985     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     1983Eina_Bool ewk_view_setting_scripts_window_open_set(Evas_Object* ewkView, Eina_Bool allow)
     1984{
     1985    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    19861986    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
    19871987    allow = !!allow;
     
    19931993}
    19941994
    1995 Eina_Bool ewk_view_setting_scripts_can_close_windows_get(const Evas_Object* o)
    1996 {
    1997     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     1995Eina_Bool ewk_view_setting_scripts_can_close_windows_get(const Evas_Object* ewkView)
     1996{
     1997    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    19981998    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
    19991999    return priv->settings.scripts_can_close_windows;
    20002000}
    20012001
    2002 Eina_Bool ewk_view_setting_scripts_can_close_windows_set(Evas_Object* o, Eina_Bool allow)
    2003 {
    2004     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     2002Eina_Bool ewk_view_setting_scripts_can_close_windows_set(Evas_Object* ewkView, Eina_Bool allow)
     2003{
     2004    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    20052005    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
    20062006    allow = !!allow;
     
    20122012}
    20132013
    2014 Eina_Bool ewk_view_setting_resizable_textareas_get(const Evas_Object* o)
    2015 {
    2016     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     2014Eina_Bool ewk_view_setting_resizable_textareas_get(const Evas_Object* ewkView)
     2015{
     2016    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    20172017    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
    20182018    return priv->settings.resizable_textareas;
    20192019}
    20202020
    2021 Eina_Bool ewk_view_setting_resizable_textareas_set(Evas_Object* o, Eina_Bool enable)
    2022 {
    2023     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     2021Eina_Bool ewk_view_setting_resizable_textareas_set(Evas_Object* ewkView, Eina_Bool enable)
     2022{
     2023    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    20242024    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
    20252025    enable = !!enable;
     
    20312031}
    20322032
    2033 Eina_Bool ewk_view_setting_private_browsing_get(const Evas_Object* o)
    2034 {
    2035     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     2033Eina_Bool ewk_view_setting_private_browsing_get(const Evas_Object* ewkView)
     2034{
     2035    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    20362036    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
    20372037    return priv->settings.private_browsing;
    20382038}
    20392039
    2040 Eina_Bool ewk_view_setting_private_browsing_set(Evas_Object* o, Eina_Bool enable)
    2041 {
    2042     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     2040Eina_Bool ewk_view_setting_private_browsing_set(Evas_Object* ewkView, Eina_Bool enable)
     2041{
     2042    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    20432043    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
    20442044    enable = !!enable;
     
    20502050}
    20512051
    2052 Eina_Bool ewk_view_setting_offline_app_cache_get(const Evas_Object* o)
    2053 {
    2054     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     2052Eina_Bool ewk_view_setting_offline_app_cache_get(const Evas_Object* ewkView)
     2053{
     2054    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    20552055    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
    20562056    return priv->settings.offline_app_cache;
    20572057}
    20582058
    2059 Eina_Bool ewk_view_setting_offline_app_cache_set(Evas_Object* o, Eina_Bool enable)
    2060 {
    2061     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     2059Eina_Bool ewk_view_setting_offline_app_cache_set(Evas_Object* ewkView, Eina_Bool enable)
     2060{
     2061    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    20622062    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
    20632063    enable = !!enable;
     
    20702070
    20712071
    2072 Eina_Bool ewk_view_setting_caret_browsing_get(const Evas_Object* o)
    2073 {
    2074     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     2072Eina_Bool ewk_view_setting_caret_browsing_get(const Evas_Object* ewkView)
     2073{
     2074    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    20752075    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
    20762076    return priv->settings.caret_browsing;
    20772077}
    20782078
    2079 Eina_Bool ewk_view_setting_caret_browsing_set(Evas_Object* o, Eina_Bool enable)
    2080 {
    2081     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     2079Eina_Bool ewk_view_setting_caret_browsing_set(Evas_Object* ewkView, Eina_Bool enable)
     2080{
     2081    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    20822082    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
    20832083    enable = !!enable;
     
    20892089}
    20902090
    2091 const char* ewk_view_setting_encoding_custom_get(const Evas_Object* o)
    2092 {
    2093     EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0);
     2091const char* ewk_view_setting_encoding_custom_get(const Evas_Object* ewkView)
     2092{
     2093    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, 0);
    20942094    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, 0);
    2095     Evas_Object* main_frame = ewk_view_frame_main_get(o);
     2095    Evas_Object* main_frame = ewk_view_frame_main_get(ewkView);
    20962096    WebCore::Frame* core_frame = ewk_frame_core_get(main_frame);
    20972097
     
    21052105}
    21062106
    2107 Eina_Bool ewk_view_setting_encoding_custom_set(Evas_Object* o, const char* encoding)
    2108 {
    2109     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
    2110     EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
    2111     Evas_Object* main_frame = ewk_view_frame_main_get(o);
     2107Eina_Bool ewk_view_setting_encoding_custom_set(Evas_Object* ewkView, const char* encoding)
     2108{
     2109    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
     2110    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
     2111    Evas_Object* main_frame = ewk_view_frame_main_get(ewkView);
    21122112    WebCore::Frame* core_frame = ewk_frame_core_get(main_frame);
    21132113    DBG("%s", encoding);
     
    21172117}
    21182118
    2119 const char* ewk_view_setting_encoding_default_get(const Evas_Object* o)
    2120 {
    2121     EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0);
     2119const char* ewk_view_setting_encoding_default_get(const Evas_Object* ewkView)
     2120{
     2121    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, 0);
    21222122    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, 0);
    21232123    return priv->settings.encoding_default;
    21242124}
    21252125
    2126 Eina_Bool ewk_view_setting_encoding_default_set(Evas_Object* o, const char* encoding)
    2127 {
    2128     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     2126Eina_Bool ewk_view_setting_encoding_default_set(Evas_Object* ewkView, const char* encoding)
     2127{
     2128    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    21292129    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
    21302130    if (eina_stringshare_replace(&priv->settings.encoding_default, encoding))
     
    21332133}
    21342134
    2135 Eina_Bool ewk_view_setting_encoding_detector_set(Evas_Object* o, Eina_Bool enable)
    2136 {
    2137     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     2135Eina_Bool ewk_view_setting_encoding_detector_set(Evas_Object* ewkView, Eina_Bool enable)
     2136{
     2137    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    21382138    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
    21392139    enable = !!enable;
     
    21452145}
    21462146
    2147 Eina_Bool ewk_view_setting_encoding_detector_get(const Evas_Object* o)
    2148 {
    2149     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     2147Eina_Bool ewk_view_setting_encoding_detector_get(const Evas_Object* ewkView)
     2148{
     2149    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    21502150    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
    21512151    return priv->settings.encoding_detector;
    21522152}
    21532153
    2154 Eina_Bool ewk_view_setting_enable_developer_extras_get(const Evas_Object* o)
    2155 {
    2156     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     2154Eina_Bool ewk_view_setting_enable_developer_extras_get(const Evas_Object* ewkView)
     2155{
     2156    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    21572157    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
    21582158    return priv->settings.enable_developer_extras;
    21592159}
    21602160
    2161 Eina_Bool ewk_view_setting_enable_developer_extras_set(Evas_Object* o, Eina_Bool enable)
    2162 {
    2163     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     2161Eina_Bool ewk_view_setting_enable_developer_extras_set(Evas_Object* ewkView, Eina_Bool enable)
     2162{
     2163    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    21642164    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
    21652165    enable = !!enable;
     
    21712171}
    21722172
    2173 int ewk_view_setting_font_minimum_size_get(const Evas_Object* o)
    2174 {
    2175     EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0);
     2173int ewk_view_setting_font_minimum_size_get(const Evas_Object* ewkView)
     2174{
     2175    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, 0);
    21762176    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, 0);
    21772177    return priv->settings.font_minimum_size;
    21782178}
    21792179
    2180 Eina_Bool ewk_view_setting_font_minimum_size_set(Evas_Object* o, int size)
    2181 {
    2182     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     2180Eina_Bool ewk_view_setting_font_minimum_size_set(Evas_Object* ewkView, int size)
     2181{
     2182    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    21832183    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
    21842184    if (priv->settings.font_minimum_size != size) {
     
    21892189}
    21902190
    2191 int ewk_view_setting_font_minimum_logical_size_get(const Evas_Object* o)
    2192 {
    2193     EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0);
     2191int ewk_view_setting_font_minimum_logical_size_get(const Evas_Object* ewkView)
     2192{
     2193    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, 0);
    21942194    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, 0);
    21952195    return priv->settings.font_minimum_logical_size;
    21962196}
    21972197
    2198 Eina_Bool ewk_view_setting_font_minimum_logical_size_set(Evas_Object* o, int size)
    2199 {
    2200     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     2198Eina_Bool ewk_view_setting_font_minimum_logical_size_set(Evas_Object* ewkView, int size)
     2199{
     2200    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    22012201    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
    22022202    if (priv->settings.font_minimum_logical_size != size) {
     
    22072207}
    22082208
    2209 int ewk_view_setting_font_default_size_get(const Evas_Object* o)
    2210 {
    2211     EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0);
     2209int ewk_view_setting_font_default_size_get(const Evas_Object* ewkView)
     2210{
     2211    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, 0);
    22122212    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, 0);
    22132213    return priv->settings.font_default_size;
    22142214}
    22152215
    2216 Eina_Bool ewk_view_setting_font_default_size_set(Evas_Object* o, int size)
    2217 {
    2218     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     2216Eina_Bool ewk_view_setting_font_default_size_set(Evas_Object* ewkView, int size)
     2217{
     2218    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    22192219    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
    22202220    if (priv->settings.font_default_size != size) {
     
    22252225}
    22262226
    2227 int ewk_view_setting_font_monospace_size_get(const Evas_Object* o)
    2228 {
    2229     EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0);
     2227int ewk_view_setting_font_monospace_size_get(const Evas_Object* ewkView)
     2228{
     2229    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, 0);
    22302230    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, 0);
    22312231    return priv->settings.font_monospace_size;
    22322232}
    22332233
    2234 Eina_Bool ewk_view_setting_font_monospace_size_set(Evas_Object* o, int size)
    2235 {
    2236     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     2234Eina_Bool ewk_view_setting_font_monospace_size_set(Evas_Object* ewkView, int size)
     2235{
     2236    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    22372237    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
    22382238    if (priv->settings.font_monospace_size != size) {
     
    22432243}
    22442244
    2245 const char* ewk_view_font_family_name_get(const Evas_Object* o, Ewk_Font_Family font_family)
    2246 {
    2247     EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0);
     2245const char* ewk_view_font_family_name_get(const Evas_Object* ewkView, Ewk_Font_Family fontFamily)
     2246{
     2247    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, 0);
    22482248    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, 0);
    22492249
    2250     switch (font_family) {
     2250    switch (fontFamily) {
    22512251    case EWK_FONT_FAMILY_STANDARD:
    22522252        return priv->settings.font_standard;
     
    22652265}
    22662266
    2267 Eina_Bool ewk_view_font_family_name_set(Evas_Object* o, Ewk_Font_Family font_family, const char* name)
    2268 {
    2269     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
    2270     EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
    2271 
    2272     switch (font_family) {
     2267Eina_Bool ewk_view_font_family_name_set(Evas_Object* ewkView, Ewk_Font_Family fontFamily, const char* name)
     2268{
     2269    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
     2270    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
     2271
     2272    switch (fontFamily) {
    22732273    case EWK_FONT_FAMILY_STANDARD:
    22742274        if (eina_stringshare_replace(&priv->settings.font_standard, name))
     
    23022302}
    23032303
    2304 Eina_Bool ewk_view_setting_spatial_navigation_get(const Evas_Object* o)
    2305 {
    2306     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     2304Eina_Bool ewk_view_setting_spatial_navigation_get(const Evas_Object* ewkView)
     2305{
     2306    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    23072307    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
    23082308    return priv->settings.spatial_navigation;
    23092309}
    23102310
    2311 Eina_Bool ewk_view_setting_spatial_navigation_set(Evas_Object* o, Eina_Bool enable)
    2312 {
    2313     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     2311Eina_Bool ewk_view_setting_spatial_navigation_set(Evas_Object* ewkView, Eina_Bool enable)
     2312{
     2313    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    23142314    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
    23152315    enable = !!enable;
     
    23212321}
    23222322
    2323 Eina_Bool ewk_view_setting_local_storage_get(const Evas_Object* o)
    2324 {
    2325     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     2323Eina_Bool ewk_view_setting_local_storage_get(const Evas_Object* ewkView)
     2324{
     2325    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    23262326    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
    23272327    return priv->settings.local_storage;
    23282328}
    23292329
    2330 Eina_Bool ewk_view_setting_local_storage_set(Evas_Object* o, Eina_Bool enable)
    2331 {
    2332     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     2330Eina_Bool ewk_view_setting_local_storage_set(Evas_Object* ewkView, Eina_Bool enable)
     2331{
     2332    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    23332333    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
    23342334    enable = !!enable;
     
    23402340}
    23412341
    2342 Eina_Bool ewk_view_setting_page_cache_get(const Evas_Object* o)
    2343 {
    2344     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     2342Eina_Bool ewk_view_setting_page_cache_get(const Evas_Object* ewkView)
     2343{
     2344    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    23452345    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
    23462346    return priv->settings.page_cache;
    23472347}
    23482348
    2349 Eina_Bool ewk_view_setting_page_cache_set(Evas_Object* o, Eina_Bool enable)
    2350 {
    2351     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     2349Eina_Bool ewk_view_setting_page_cache_set(Evas_Object* ewkView, Eina_Bool enable)
     2350{
     2351    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    23522352    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
    23532353    enable = !!enable;
     
    23592359}
    23602360
    2361 const char* ewk_view_setting_local_storage_database_path_get(const Evas_Object* o)
    2362 {
    2363     EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0);
     2361const char* ewk_view_setting_local_storage_database_path_get(const Evas_Object* ewkView)
     2362{
     2363    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, 0);
    23642364    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, 0);
    23652365    return priv->settings.local_storage_database_path;
    23662366}
    23672367
    2368 Eina_Bool ewk_view_setting_local_storage_database_path_set(Evas_Object* o, const char* path)
    2369 {
    2370     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     2368Eina_Bool ewk_view_setting_local_storage_database_path_set(Evas_Object* ewkView, const char* path)
     2369{
     2370    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    23712371    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
    23722372    if (eina_stringshare_replace(&priv->settings.local_storage_database_path, path))
     
    23752375}
    23762376
    2377 Eina_Bool ewk_view_setting_minimum_timer_interval_set(Evas_Object* o, double interval)
    2378 {
    2379     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     2377Eina_Bool ewk_view_setting_minimum_timer_interval_set(Evas_Object* ewkView, double interval)
     2378{
     2379    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    23802380    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
    23812381    if (fabs(priv->settings.dom_timer_interval - interval) >= std::numeric_limits<double>::epsilon()) {
     
    23862386}
    23872387
    2388 double ewk_view_setting_minimum_timer_interval_get(const Evas_Object* o)
    2389 {
    2390     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     2388double ewk_view_setting_minimum_timer_interval_get(const Evas_Object* ewkView)
     2389{
     2390    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    23912391    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
    23922392    return priv->settings.dom_timer_interval;
    23932393}
    23942394
    2395 Ewk_View_Smart_Data* ewk_view_smart_data_get(const Evas_Object* o)
    2396 {
    2397     EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0);
     2395Ewk_View_Smart_Data* ewk_view_smart_data_get(const Evas_Object* ewkView)
     2396{
     2397    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, 0);
    23982398    return sd;
    23992399}
     
    24672467 *       to define their own backing store.
    24682468 */
    2469 void ewk_view_repaint_add(Ewk_View_Private_Data* priv, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h)
     2469void ewk_view_repaint_add(Ewk_View_Private_Data* priv, Evas_Coord x, Evas_Coord y, Evas_Coord width, Evas_Coord height)
    24702470{
    24712471    EINA_SAFETY_ON_NULL_RETURN(priv);
    2472     _ewk_view_repaint_add(priv, x, y, w, h);
     2472    _ewk_view_repaint_add(priv, x, y, width, height);
    24732473}
    24742474
     
    24932493}
    24942494
    2495 void ewk_view_scrolls_process(Ewk_View_Smart_Data* sd)
    2496 {
    2497     EINA_SAFETY_ON_NULL_RETURN(sd);
    2498     EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv);
    2499     if (!sd->api->scrolls_process(sd))
     2495void ewk_view_scrolls_process(Ewk_View_Smart_Data* smartData)
     2496{
     2497    EINA_SAFETY_ON_NULL_RETURN(smartData);
     2498    EWK_VIEW_PRIV_GET_OR_RETURN(smartData, priv);
     2499    if (!smartData->api->scrolls_process(smartData))
    25002500        ERR("failed to process scrolls.");
    25012501    _ewk_view_scrolls_flush(priv);
     
    25362536}
    25372537
    2538 void ewk_view_paint_context_free(Ewk_View_Paint_Context* ctxt)
    2539 {
    2540     EINA_SAFETY_ON_NULL_RETURN(ctxt);
    2541     delete ctxt->gc;
    2542     cairo_destroy(ctxt->cr);
    2543     free(ctxt);
    2544 }
    2545 
    2546 void ewk_view_paint_context_save(Ewk_View_Paint_Context* ctxt)
    2547 {
    2548     EINA_SAFETY_ON_NULL_RETURN(ctxt);
    2549     cairo_save(ctxt->cr);
    2550     ctxt->gc->save();
    2551 }
    2552 
    2553 void ewk_view_paint_context_restore(Ewk_View_Paint_Context* ctxt)
    2554 {
    2555     EINA_SAFETY_ON_NULL_RETURN(ctxt);
    2556     ctxt->gc->restore();
    2557     cairo_restore(ctxt->cr);
    2558 }
    2559 
    2560 void ewk_view_paint_context_clip(Ewk_View_Paint_Context* ctxt, const Eina_Rectangle* area)
    2561 {
    2562     EINA_SAFETY_ON_NULL_RETURN(ctxt);
     2538void ewk_view_paint_context_free(Ewk_View_Paint_Context* context)
     2539{
     2540    EINA_SAFETY_ON_NULL_RETURN(context);
     2541    delete context->gc;
     2542    cairo_destroy(context->cr);
     2543    free(context);
     2544}
     2545
     2546void ewk_view_paint_context_save(Ewk_View_Paint_Context* context)
     2547{
     2548    EINA_SAFETY_ON_NULL_RETURN(context);
     2549    cairo_save(context->cr);
     2550    context->gc->save();
     2551}
     2552
     2553void ewk_view_paint_context_restore(Ewk_View_Paint_Context* context)
     2554{
     2555    EINA_SAFETY_ON_NULL_RETURN(context);
     2556    context->gc->restore();
     2557    cairo_restore(context->cr);
     2558}
     2559
     2560void ewk_view_paint_context_clip(Ewk_View_Paint_Context* context, const Eina_Rectangle* area)
     2561{
     2562    EINA_SAFETY_ON_NULL_RETURN(context);
    25632563    EINA_SAFETY_ON_NULL_RETURN(area);
    2564     ctxt->gc->clip(WebCore::IntRect(area->x, area->y, area->w, area->h));
    2565 }
    2566 
    2567 void ewk_view_paint_context_paint(Ewk_View_Paint_Context* ctxt, const Eina_Rectangle* area)
    2568 {
    2569     EINA_SAFETY_ON_NULL_RETURN(ctxt);
     2564    context->gc->clip(WebCore::IntRect(area->x, area->y, area->w, area->h));
     2565}
     2566
     2567void ewk_view_paint_context_paint(Ewk_View_Paint_Context* context, const Eina_Rectangle* area)
     2568{
     2569    EINA_SAFETY_ON_NULL_RETURN(context);
    25702570    EINA_SAFETY_ON_NULL_RETURN(area);
    25712571
    25722572    WebCore::IntRect rect(area->x, area->y, area->w, area->h);
    25732573
    2574     if (ctxt->view->isTransparent())
    2575         ctxt->gc->clearRect(rect);
    2576     ctxt->view->paint(ctxt->gc, rect);
    2577 }
    2578 
    2579 void ewk_view_paint_context_paint_contents(Ewk_View_Paint_Context* ctxt, const Eina_Rectangle* area)
    2580 {
    2581     EINA_SAFETY_ON_NULL_RETURN(ctxt);
     2574    if (context->view->isTransparent())
     2575        context->gc->clearRect(rect);
     2576    context->view->paint(context->gc, rect);
     2577}
     2578
     2579void ewk_view_paint_context_paint_contents(Ewk_View_Paint_Context* context, const Eina_Rectangle* area)
     2580{
     2581    EINA_SAFETY_ON_NULL_RETURN(context);
    25822582    EINA_SAFETY_ON_NULL_RETURN(area);
    25832583
    25842584    WebCore::IntRect rect(area->x, area->y, area->w, area->h);
    25852585
    2586     if (ctxt->view->isTransparent())
    2587         ctxt->gc->clearRect(rect);
    2588 
    2589     ctxt->view->paintContents(ctxt->gc, rect);
    2590 }
    2591 
    2592 void ewk_view_paint_context_scale(Ewk_View_Paint_Context* ctxt, float scale_x, float scale_y)
    2593 {
    2594     EINA_SAFETY_ON_NULL_RETURN(ctxt);
    2595 
    2596     ctxt->gc->scale(WebCore::FloatSize(scale_x, scale_y));
    2597 }
    2598 
    2599 void ewk_view_paint_context_translate(Ewk_View_Paint_Context* ctxt, float x, float y)
    2600 {
    2601     EINA_SAFETY_ON_NULL_RETURN(ctxt);
    2602 
    2603     ctxt->gc->translate(x, y);
     2586    if (context->view->isTransparent())
     2587        context->gc->clearRect(rect);
     2588
     2589    context->view->paintContents(context->gc, rect);
     2590}
     2591
     2592void ewk_view_paint_context_scale(Ewk_View_Paint_Context* context, float scaleX, float scaleY)
     2593{
     2594    EINA_SAFETY_ON_NULL_RETURN(context);
     2595
     2596    context->gc->scale(WebCore::FloatSize(scaleX, scaleY));
     2597}
     2598
     2599void ewk_view_paint_context_translate(Ewk_View_Paint_Context* context, float x, float y)
     2600{
     2601    EINA_SAFETY_ON_NULL_RETURN(context);
     2602
     2603    context->gc->translate(x, y);
    26042604}
    26052605
     
    26602660 * Emits signal: "ready" with no parameters.
    26612661 */
    2662 void ewk_view_ready(Evas_Object* o)
    2663 {
    2664     DBG("o=%p", o);
    2665     evas_object_smart_callback_call(o, "ready", 0);
     2662void ewk_view_ready(Evas_Object* ewkView)
     2663{
     2664    DBG("ewkView=%p", ewkView);
     2665    evas_object_smart_callback_call(ewkView, "ready", 0);
    26662666}
    26672667
     
    26742674 * enabled or not.
    26752675 */
    2676 void ewk_view_input_method_state_set(Evas_Object* o, Eina_Bool active)
    2677 {
    2678     EWK_VIEW_SD_GET_OR_RETURN(o, sd);
     2676void ewk_view_input_method_state_set(Evas_Object* ewkView, Eina_Bool active)
     2677{
     2678    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd);
    26792679    EWK_VIEW_PRIV_GET(sd, priv);
    26802680    WebCore::Frame* focusedFrame = priv->page->focusController()->focusedOrMainFrame();
     
    27032703    }
    27042704
    2705     evas_object_smart_callback_call(o, "inputmethod,changed", (void*)active);
     2705    evas_object_smart_callback_call(ewkView, "inputmethod,changed", (void*)active);
    27062706}
    27072707
     
    27122712 * Emits signal: "title,changed" with pointer to new title string.
    27132713 */
    2714 void ewk_view_title_set(Evas_Object* o, const char* title)
    2715 {
    2716     DBG("o=%p, title=%s", o, title ? title : "(null)");
    2717     evas_object_smart_callback_call(o, "title,changed", (void*)title);
     2714void ewk_view_title_set(Evas_Object* ewkView, const char* title)
     2715{
     2716    DBG("ewkView=%p, title=%s", ewkView, title ? title : "(null)");
     2717    evas_object_smart_callback_call(ewkView, "title,changed", (void*)title);
    27182718}
    27192719
     
    27242724 * Emits signal: "uri,changed" with pointer to the new uri string.
    27252725 */
    2726 void ewk_view_uri_changed(Evas_Object* o)
    2727 {
    2728     EWK_VIEW_SD_GET_OR_RETURN(o, sd);
     2726void ewk_view_uri_changed(Evas_Object* ewkView)
     2727{
     2728    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd);
    27292729    const char* uri = ewk_frame_uri_get(sd->main_frame);
    2730     DBG("o=%p, uri=%s", o, uri ? uri : "(null)");
    2731     evas_object_smart_callback_call(o, "uri,changed", (void*)uri);
     2730    DBG("ewkView=%p, uri=%s", ewkView, uri ? uri : "(null)");
     2731    evas_object_smart_callback_call(ewkView, "uri,changed", (void*)uri);
    27322732}
    27332733
     
    27412741 * Emits signal: "load,document,finished" with @p frame as the parameter.
    27422742 */
    2743 void ewk_view_load_document_finished(Evas_Object* o, Evas_Object* frame)
    2744 {
    2745     evas_object_smart_callback_call(o, "load,document,finished", frame);
     2743void ewk_view_load_document_finished(Evas_Object* ewkView, Evas_Object* frame)
     2744{
     2745    evas_object_smart_callback_call(ewkView, "load,document,finished", frame);
    27462746}
    27472747
     
    27542754 * Emits signal: "load,started" with no parameters.
    27552755 */
    2756 void ewk_view_load_started(Evas_Object* o)
    2757 {
    2758     DBG("o=%p", o);
    2759     evas_object_smart_callback_call(o, "load,started", 0);
     2756void ewk_view_load_started(Evas_Object* ewkView)
     2757{
     2758    DBG("ewkView=%p", ewkView);
     2759    evas_object_smart_callback_call(ewkView, "load,started", 0);
    27602760}
    27612761
     
    27672767 * Emits signal: "load,started" on main frame with no parameters.
    27682768 */
    2769 void ewk_view_frame_main_load_started(Evas_Object* o)
    2770 {
    2771     DBG("o=%p", o);
    2772     Evas_Object* frame = ewk_view_frame_main_get(o);
     2769void ewk_view_frame_main_load_started(Evas_Object* ewkView)
     2770{
     2771    DBG("ewkView=%p", ewkView);
     2772    Evas_Object* frame = ewk_view_frame_main_get(ewkView);
    27732773    evas_object_smart_callback_call(frame, "load,started", 0);
    27742774}
     
    27822782 * Emits signal: "load,provisional" on View with no parameters.
    27832783 */
    2784 void ewk_view_load_provisional(Evas_Object* o)
    2785 {
    2786     DBG("o=%p", o);
    2787     evas_object_smart_callback_call(o, "load,provisional", 0);
     2784void ewk_view_load_provisional(Evas_Object* ewkView)
     2785{
     2786    DBG("ewkView=%p", ewkView);
     2787    evas_object_smart_callback_call(ewkView, "load,provisional", 0);
    27882788}
    27892789
     
    27962796 * Emits signal: "load,newwindow,show" on view with no parameters.
    27972797 */
    2798 void ewk_view_load_show(Evas_Object* o)
    2799 {
    2800     DBG("o=%p", o);
    2801     evas_object_smart_callback_call(o, "load,newwindow,show", 0);
     2798void ewk_view_load_show(Evas_Object* ewkView)
     2799{
     2800    DBG("ewkView=%p", ewkView);
     2801    evas_object_smart_callback_call(ewkView, "load,newwindow,show", 0);
    28022802}
    28032803
     
    28092809 * @param o View.
    28102810 */
    2811 void ewk_view_frame_main_cleared(Evas_Object* o)
    2812 {
    2813     DBG("o=%p", o);
    2814     EWK_VIEW_SD_GET_OR_RETURN(o, sd);
     2811void ewk_view_frame_main_cleared(Evas_Object* ewkView)
     2812{
     2813    DBG("ewkView=%p", ewkView);
     2814    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd);
    28152815    EINA_SAFETY_ON_NULL_RETURN(sd->api->flush);
    28162816    sd->api->flush(sd);
     
    28252825 * Emits signal: "icon,received" with no parameters.
    28262826 */
    2827 void ewk_view_frame_main_icon_received(Evas_Object* o)
    2828 {
    2829     DBG("o=%p", o);
    2830     Evas_Object* frame = ewk_view_frame_main_get(o);
     2827void ewk_view_frame_main_icon_received(Evas_Object* ewkView)
     2828{
     2829    DBG("ewkView=%p", ewkView);
     2830    Evas_Object* frame = ewk_view_frame_main_get(ewkView);
    28312831    evas_object_smart_callback_call(frame, "icon,received", 0);
    28322832}
     
    28422842 *       compatible with previous WebKit.
    28432843 */
    2844 void ewk_view_load_finished(Evas_Object* o, const Ewk_Frame_Load_Error* error)
    2845 {
    2846     DBG("o=%p, error=%p", o, error);
    2847     evas_object_smart_callback_call(o, "load,finished", (void*)error);
     2844void ewk_view_load_finished(Evas_Object* ewkView, const Ewk_Frame_Load_Error* error)
     2845{
     2846    DBG("ewkView=%p, error=%p", ewkView, error);
     2847    evas_object_smart_callback_call(ewkView, "load,finished", (void*)error);
    28482848}
    28492849
     
    28542854 * Emits signal: "load,error" with pointer to Ewk_Frame_Load_Error.
    28552855 */
    2856 void ewk_view_load_error(Evas_Object* o, const Ewk_Frame_Load_Error* error)
    2857 {
    2858     DBG("o=%p, error=%p", o, error);
    2859     evas_object_smart_callback_call(o, "load,error", (void*)error);
     2856void ewk_view_load_error(Evas_Object* ewkView, const Ewk_Frame_Load_Error* error)
     2857{
     2858    DBG("ewkView=%p, error=%p", ewkView, error);
     2859    evas_object_smart_callback_call(ewkView, "load,error", (void*)error);
    28602860}
    28612861
     
    28662866 * Emits signal: "load,progress" with pointer to a double from 0.0 to 1.0.
    28672867 */
    2868 void ewk_view_load_progress_changed(Evas_Object* o)
    2869 {
    2870     EWK_VIEW_SD_GET_OR_RETURN(o, sd);
     2868void ewk_view_load_progress_changed(Evas_Object* ewkView)
     2869{
     2870    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd);
    28712871    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv);
    28722872
     
    28742874    double progress = priv->page->progress()->estimatedProgress();
    28752875
    2876     DBG("o=%p (p=%0.3f)", o, progress);
    2877 
    2878     evas_object_smart_callback_call(o, "load,progress", &progress);
     2876    DBG("ewkView=%p (p=%0.3f)", ewkView, progress);
     2877
     2878    evas_object_smart_callback_call(ewkView, "load,progress", &progress);
    28792879}
    28802880
     
    28882888 * Emits signal: "restore" with frame.
    28892889 */
    2890 void ewk_view_restore_state(Evas_Object* o, Evas_Object* frame)
    2891 {
    2892     evas_object_smart_callback_call(o, "restore", frame);
     2890void ewk_view_restore_state(Evas_Object* ewkView, Evas_Object* frame)
     2891{
     2892    evas_object_smart_callback_call(ewkView, "restore", frame);
    28932893}
    28942894
     
    29142914 * @see ewk_window_features_ref().
    29152915 */
    2916 Evas_Object* ewk_view_window_create(Evas_Object* o, Eina_Bool javascript, const WebCore::WindowFeatures* coreFeatures)
    2917 {
    2918     EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0);
     2916Evas_Object* ewk_view_window_create(Evas_Object* ewkView, Eina_Bool javascript, const WebCore::WindowFeatures* coreFeatures)
     2917{
     2918    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, 0);
    29192919
    29202920    if (!sd->api->window_create)
    2921         return o;
     2921        return ewkView;
    29222922
    29232923    Ewk_Window_Features* window_features = ewk_window_features_new_from_core(coreFeatures);
     
    29422942 * @param o View to be closed.
    29432943 */
    2944 void ewk_view_window_close(Evas_Object* o)
    2945 {
    2946     EWK_VIEW_SD_GET_OR_RETURN(o, sd);
    2947 
    2948     ewk_view_stop(o);
     2944void ewk_view_window_close(Evas_Object* ewkView)
     2945{
     2946    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd);
     2947
     2948    ewk_view_stop(ewkView);
    29492949    if (!sd->api->window_close)
    29502950        return;
     
    29582958 * Emits signal: "link,hover,in"
    29592959 */
    2960 void ewk_view_mouse_link_hover_in(Evas_Object* o, void* data)
    2961 {
    2962     evas_object_smart_callback_call(o, "link,hover,in", data);
     2960void ewk_view_mouse_link_hover_in(Evas_Object* ewkView, void* data)
     2961{
     2962    evas_object_smart_callback_call(ewkView, "link,hover,in", data);
    29632963}
    29642964
     
    29692969 * Emits signal: "link,hover,out"
    29702970 */
    2971 void ewk_view_mouse_link_hover_out(Evas_Object* o)
    2972 {
    2973     evas_object_smart_callback_call(o, "link,hover,out", 0);
     2971void ewk_view_mouse_link_hover_out(Evas_Object* ewkView)
     2972{
     2973    evas_object_smart_callback_call(ewkView, "link,hover,out", 0);
    29742974}
    29752975
     
    29802980 * Emits signal: "toolbars,visible,set" with a pointer to a boolean.
    29812981 */
    2982 void ewk_view_toolbars_visible_set(Evas_Object* o, Eina_Bool visible)
    2983 {
    2984     DBG("o=%p (visible=%d)", o, !!visible);
    2985     evas_object_smart_callback_call(o, "toolbars,visible,set", &visible);
     2982void ewk_view_toolbars_visible_set(Evas_Object* ewkView, Eina_Bool visible)
     2983{
     2984    DBG("ewkView=%p (visible=%d)", ewkView, !!visible);
     2985    evas_object_smart_callback_call(ewkView, "toolbars,visible,set", &visible);
    29862986}
    29872987
     
    29972997 * Emits signal: "toolbars,visible,get" with a pointer to a boolean.
    29982998 */
    2999 void ewk_view_toolbars_visible_get(Evas_Object* o, Eina_Bool* visible)
    3000 {
    3001     DBG("%s, o=%p", __func__, o);
     2999void ewk_view_toolbars_visible_get(Evas_Object* ewkView, Eina_Bool* visible)
     3000{
     3001    DBG("%s, o=%p", __func__, ewkView);
    30023002    *visible = EINA_FALSE;
    3003     evas_object_smart_callback_call(o, "toolbars,visible,get", visible);
     3003    evas_object_smart_callback_call(ewkView, "toolbars,visible,get", visible);
    30043004}
    30053005
     
    30133013 * Emits signal: "statusbar,visible,set" with a pointer to a boolean.
    30143014 */
    3015 void ewk_view_statusbar_visible_set(Evas_Object* o, Eina_Bool visible)
    3016 {
    3017     DBG("o=%p (visible=%d)", o, !!visible);
    3018     evas_object_smart_callback_call(o, "statusbar,visible,set", &visible);
     3015void ewk_view_statusbar_visible_set(Evas_Object* ewkView, Eina_Bool visible)
     3016{
     3017    DBG("ewkView=%p (visible=%d)", ewkView, !!visible);
     3018    evas_object_smart_callback_call(ewkView, "statusbar,visible,set", &visible);
    30193019}
    30203020
     
    30303030 * Emits signal: "statusbar,visible,get" with a pointer to a boolean.
    30313031 */
    3032 void ewk_view_statusbar_visible_get(Evas_Object* o, Eina_Bool* visible)
    3033 {
    3034     DBG("%s, o=%p", __func__, o);
     3032void ewk_view_statusbar_visible_get(Evas_Object* ewkView, Eina_Bool* visible)
     3033{
     3034    DBG("%s, o=%p", __func__, ewkView);
    30353035    *visible = EINA_FALSE;
    3036     evas_object_smart_callback_call(o, "statusbar,visible,get", visible);
     3036    evas_object_smart_callback_call(ewkView, "statusbar,visible,get", visible);
    30373037}
    30383038
     
    30463046 * Emits signal: "statusbar,text,set" with a string.
    30473047 */
    3048 void ewk_view_statusbar_text_set(Evas_Object* o, const char* text)
    3049 {
    3050     DBG("o=%p (text=%s)", o, text);
     3048void ewk_view_statusbar_text_set(Evas_Object* ewkView, const char* text)
     3049{
     3050    DBG("ewkView=%p (text=%s)", ewkView, text);
    30513051    INF("status bar text set: %s", text);
    3052     evas_object_smart_callback_call(o, "statusbar,text,set", (void*)text);
     3052    evas_object_smart_callback_call(ewkView, "statusbar,text,set", (void*)text);
    30533053}
    30543054
     
    30623062 * Emits signal: "scrollbars,visible,set" with a pointer to a boolean.
    30633063 */
    3064 void ewk_view_scrollbars_visible_set(Evas_Object* o, Eina_Bool visible)
    3065 {
    3066     DBG("o=%p (visible=%d)", o, !!visible);
    3067     evas_object_smart_callback_call(o, "scrollbars,visible,set", &visible);
     3064void ewk_view_scrollbars_visible_set(Evas_Object* ewkView, Eina_Bool visible)
     3065{
     3066    DBG("ewkView=%p (visible=%d)", ewkView, !!visible);
     3067    evas_object_smart_callback_call(ewkView, "scrollbars,visible,set", &visible);
    30683068}
    30693069
     
    30793079 * Emits signal: "scrollbars,visible,get" with a pointer to a boolean.
    30803080 */
    3081 void ewk_view_scrollbars_visible_get(Evas_Object* o, Eina_Bool* visible)
    3082 {
    3083     DBG("%s, o=%p", __func__, o);
     3081void ewk_view_scrollbars_visible_get(Evas_Object* ewkView, Eina_Bool* visible)
     3082{
     3083    DBG("%s, o=%p", __func__, ewkView);
    30843084    *visible = EINA_FALSE;
    3085     evas_object_smart_callback_call(o, "scrollbars,visible,get", visible);
     3085    evas_object_smart_callback_call(ewkView, "scrollbars,visible,get", visible);
    30863086}
    30873087
     
    30953095 * Emits signal: "menubar,visible,set" with a pointer to a boolean.
    30963096 */
    3097 void ewk_view_menubar_visible_set(Evas_Object* o, Eina_Bool visible)
    3098 {
    3099     DBG("o=%p (visible=%d)", o, !!visible);
    3100     evas_object_smart_callback_call(o, "menubar,visible,set", &visible);
     3097void ewk_view_menubar_visible_set(Evas_Object* ewkView, Eina_Bool visible)
     3098{
     3099    DBG("ewkView=%p (visible=%d)", ewkView, !!visible);
     3100    evas_object_smart_callback_call(ewkView, "menubar,visible,set", &visible);
    31013101}
    31023102
     
    31123112 * Emits signal: "menubar,visible,get" with a pointer to a boolean.
    31133113 */
    3114 void ewk_view_menubar_visible_get(Evas_Object* o, Eina_Bool* visible)
    3115 {
    3116     DBG("%s, o=%p", __func__, o);
     3114void ewk_view_menubar_visible_get(Evas_Object* ewkView, Eina_Bool* visible)
     3115{
     3116    DBG("%s, o=%p", __func__, ewkView);
    31173117    *visible = EINA_FALSE;
    3118     evas_object_smart_callback_call(o, "menubar,visible,get", visible);
     3118    evas_object_smart_callback_call(ewkView, "menubar,visible,get", visible);
    31193119}
    31203120
     
    31293129 * removed, text will be 0 or '\0'
    31303130 */
    3131 void ewk_view_tooltip_text_set(Evas_Object* o, const char* text)
    3132 {
    3133     DBG("o=%p text=%s", o, text);
    3134     evas_object_smart_callback_call(o, "tooltip,text,set", (void*)text);
     3131void ewk_view_tooltip_text_set(Evas_Object* ewkView, const char* text)
     3132{
     3133    DBG("ewkView=%p text=%s", ewkView, text);
     3134    evas_object_smart_callback_call(ewkView, "tooltip,text,set", (void*)text);
    31353135}
    31363136
     
    31443144 *
    31453145 */
    3146 void ewk_view_add_console_message(Evas_Object* o, const char* message, unsigned int lineNumber, const char* sourceID)
    3147 {
    3148     DBG("o=%p message=%s lineNumber=%u sourceID=%s", o, message, lineNumber, sourceID);
    3149     EWK_VIEW_SD_GET_OR_RETURN(o, sd);
     3146void ewk_view_add_console_message(Evas_Object* ewkView, const char* message, unsigned int lineNumber, const char* sourceID)
     3147{
     3148    DBG("ewkView=%p message=%s lineNumber=%u sourceID=%s", ewkView, message, lineNumber, sourceID);
     3149    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd);
    31503150    EINA_SAFETY_ON_NULL_RETURN(sd->api);
    31513151    EINA_SAFETY_ON_NULL_RETURN(sd->api->add_console_message);
     
    31533153}
    31543154
    3155 bool ewk_view_focus_can_cycle(Evas_Object* o, Ewk_Focus_Direction direction)
    3156 {
    3157     DBG("o=%p direction=%d", o, direction);
    3158     EWK_VIEW_SD_GET_OR_RETURN(o, sd, false);
     3155bool ewk_view_focus_can_cycle(Evas_Object* ewkView, Ewk_Focus_Direction direction)
     3156{
     3157    DBG("ewkView=%p direction=%d", ewkView, direction);
     3158    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, false);
    31593159    EINA_SAFETY_ON_NULL_RETURN_VAL(sd->api, false);
    31603160
     
    31653165}
    31663166
    3167 void ewk_view_run_javascript_alert(Evas_Object* o, Evas_Object* frame, const char* message)
    3168 {
    3169     DBG("o=%p frame=%p message=%s", o, frame, message);
    3170     EWK_VIEW_SD_GET_OR_RETURN(o, sd);
     3167void ewk_view_run_javascript_alert(Evas_Object* ewkView, Evas_Object* frame, const char* message)
     3168{
     3169    DBG("ewkView=%p frame=%p message=%s", ewkView, frame, message);
     3170    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd);
    31713171    EINA_SAFETY_ON_NULL_RETURN(sd->api);
    31723172
     
    31773177}
    31783178
    3179 Eina_Bool ewk_view_run_javascript_confirm(Evas_Object* o, Evas_Object* frame, const char* message)
    3180 {
    3181     DBG("o=%p frame=%p message=%s", o, frame, message);
    3182     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     3179Eina_Bool ewk_view_run_javascript_confirm(Evas_Object* ewkView, Evas_Object* frame, const char* message)
     3180{
     3181    DBG("ewkView=%p frame=%p message=%s", ewkView, frame, message);
     3182    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    31833183    EINA_SAFETY_ON_NULL_RETURN_VAL(sd->api, EINA_FALSE);
    31843184
     
    31893189}
    31903190
    3191 Eina_Bool ewk_view_run_javascript_prompt(Evas_Object* o, Evas_Object* frame, const char* message, const char* defaultValue, char** value)
    3192 {
    3193     DBG("o=%p frame=%p message=%s", o, frame, message);
    3194     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     3191Eina_Bool ewk_view_run_javascript_prompt(Evas_Object* ewkView, Evas_Object* frame, const char* message, const char* defaultValue, char** value)
     3192{
     3193    DBG("ewkView=%p frame=%p message=%s", ewkView, frame, message);
     3194    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    31953195    EINA_SAFETY_ON_NULL_RETURN_VAL(sd->api, EINA_FALSE);
    31963196
     
    32123212 * @return @c EINA_TRUE if script should be stopped; @c EINA_FALSE otherwise
    32133213 */
    3214 Eina_Bool ewk_view_should_interrupt_javascript(Evas_Object* o)
    3215 {
    3216     DBG("o=%p", o);
    3217     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     3214Eina_Bool ewk_view_should_interrupt_javascript(Evas_Object* ewkView)
     3215{
     3216    DBG("ewkView=%p", ewkView);
     3217    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    32183218    EINA_SAFETY_ON_NULL_RETURN_VAL(sd->api, EINA_FALSE);
    32193219
     
    32383238 * site's requirement.
    32393239 */
    3240 uint64_t ewk_view_exceeded_database_quota(Evas_Object* o, Evas_Object* frame, const char* databaseName, uint64_t current_size, uint64_t expected_size)
    3241 {
    3242     DBG("o=%p", o);
    3243     EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0);
     3240uint64_t ewk_view_exceeded_database_quota(Evas_Object* ewkView, Evas_Object* frame, const char* databaseName, uint64_t currentSize, uint64_t expectedSize)
     3241{
     3242    DBG("ewkView=%p", ewkView);
     3243    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, 0);
    32443244    EINA_SAFETY_ON_NULL_RETURN_VAL(sd->api, 0);
    32453245    if (!sd->api->exceeded_database_quota)
    32463246        return 0;
    32473247
    3248     INF("current_size=%" PRIu64 " expected_size=%" PRIu64, current_size, expected_size);
    3249     return sd->api->exceeded_database_quota(sd, frame, databaseName, current_size, expected_size);
     3248    INF("current_size=%" PRIu64 " expected_size=%" PRIu64, currentSize, expectedSize);
     3249    return sd->api->exceeded_database_quota(sd, frame, databaseName, currentSize, expectedSize);
    32503250}
    32513251
     
    32633263 * @return @EINA_FALSE if user canceled file selection; @EINA_TRUE if confirmed.
    32643264 */
    3265 Eina_Bool ewk_view_run_open_panel(Evas_Object* o, Evas_Object* frame, Eina_Bool allows_multiple_files, const char* accept_types, Eina_List** selected_filenames)
    3266 {
    3267     DBG("o=%p frame=%p allows_multiple_files=%d", o, frame, allows_multiple_files);
    3268     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     3265Eina_Bool ewk_view_run_open_panel(Evas_Object* ewkView, Evas_Object* frame, Eina_Bool allowsMultipleFiles, const char* acceptTypes, Eina_List** selectedFilenames)
     3266{
     3267    DBG("ewkView=%p frame=%p allows_multiple_files=%d", ewkView, frame, allowsMultipleFiles);
     3268    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    32693269    EINA_SAFETY_ON_NULL_RETURN_VAL(sd->api, EINA_FALSE);
    32703270    Eina_Bool confirm;
     
    32733273        return EINA_FALSE;
    32743274
    3275     *selected_filenames = 0;
    3276 
    3277     confirm = sd->api->run_open_panel(sd, frame, allows_multiple_files, accept_types, selected_filenames);
    3278     if (!confirm && *selected_filenames)
     3275    *selectedFilenames = 0;
     3276
     3277    confirm = sd->api->run_open_panel(sd, frame, allowsMultipleFiles, acceptTypes, selectedFilenames);
     3278    if (!confirm && *selectedFilenames)
    32793279        ERR("Canceled file selection, but selected filenames != 0. Free names before return.");
    32803280    return confirm;
    32813281}
    32823282
    3283 void ewk_view_repaint(Evas_Object* o, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h)
    3284 {
    3285     DBG("o=%p, region=%d,%d + %dx%d", o, x, y, w, h);
    3286     EWK_VIEW_SD_GET_OR_RETURN(o, sd);
     3283void ewk_view_repaint(Evas_Object* ewkView, Evas_Coord x, Evas_Coord y, Evas_Coord width, Evas_Coord height)
     3284{
     3285    DBG("ewkView=%p, region=%d,%d + %dx%d", ewkView, x, y, width, height);
     3286    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd);
    32873287    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv);
    32883288
     
    32923292    }
    32933293
    3294     _ewk_view_repaint_add(priv, x, y, w, h);
     3294    _ewk_view_repaint_add(priv, x, y, width, height);
    32953295    _ewk_view_smart_changed(sd);
    32963296}
    32973297
    3298 void ewk_view_scroll(Evas_Object* o, Evas_Coord dx, Evas_Coord dy, Evas_Coord sx, Evas_Coord sy, Evas_Coord sw, Evas_Coord sh, Evas_Coord cx, Evas_Coord cy, Evas_Coord cw, Evas_Coord ch, Eina_Bool main_frame)
    3299 {
    3300     DBG("o=%p, delta: %d,%d, scroll: %d,%d+%dx%d, clip: %d,%d+%dx%d",
    3301         o, dx, dy, sx, sy, sw, sh, cx, cy, cw, ch);
    3302 
    3303     if ((sx != cx) || (sy != cy) || (sw != cw) || (sh != ch))
     3298void ewk_view_scroll(Evas_Object* ewkView, Evas_Coord dx, Evas_Coord dy, Evas_Coord scrollX, Evas_Coord scrollY, Evas_Coord scrollWidth, Evas_Coord scrollHeight, Evas_Coord centerX, Evas_Coord centerY, Evas_Coord centerWidth, Evas_Coord centerHeight, Eina_Bool mainFrame)
     3299{
     3300    DBG("ewkView=%p, delta: %d,%d, scroll: %d,%d+%dx%d, clip: %d,%d+%dx%d",
     3301        ewkView, dx, dy, scrollX, scrollY, scrollWidth, scrollHeight, centerX, centerY, centerWidth, centerHeight);
     3302
     3303    if ((scrollX != centerX) || (scrollY != centerY) || (scrollWidth != centerWidth) || (scrollHeight != centerHeight))
    33043304        WRN("scroll region and clip are different! %d,%d+%dx%d and %d,%d+%dx%d",
    3305             sx, sy, sw, sh, cx, cy, cw, ch);
    3306 
    3307     EWK_VIEW_SD_GET_OR_RETURN(o, sd);
     3305            scrollX, scrollY, scrollWidth, scrollHeight, centerX, centerY, centerWidth, centerHeight);
     3306
     3307    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd);
    33083308    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv);
    33093309    EINA_SAFETY_ON_TRUE_RETURN(!dx && !dy);
    33103310
    3311     _ewk_view_scroll_add(priv, dx, dy, sx, sy, sw, sh, main_frame);
     3311    _ewk_view_scroll_add(priv, dx, dy, scrollX, scrollY, scrollWidth, scrollHeight, mainFrame);
    33123312
    33133313    _ewk_view_smart_changed(sd);
    33143314}
    33153315
    3316 WebCore::Page* ewk_view_core_page_get(const Evas_Object* o)
    3317 {
    3318     EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0);
     3316WebCore::Page* ewk_view_core_page_get(const Evas_Object* ewkView)
     3317{
     3318    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, 0);
    33193319    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, 0);
    33203320    return priv->page;
     
    33263326 * Emits "frame,created" with the new frame object on success.
    33273327 */
    3328 WTF::PassRefPtr<WebCore::Frame> ewk_view_frame_create(Evas_Object* o, Evas_Object* frame, const WTF::String& name, WebCore::HTMLFrameOwnerElement* ownerElement, const WebCore::KURL& url, const WTF::String& referrer)
    3329 {
    3330     DBG("o=%p, frame=%p, name=%s, ownerElement=%p, url=%s, referrer=%s",
    3331         o, frame, name.utf8().data(), ownerElement,
     3328WTF::PassRefPtr<WebCore::Frame> ewk_view_frame_create(Evas_Object* ewkView, Evas_Object* frame, const WTF::String& name, WebCore::HTMLFrameOwnerElement* ownerElement, const WebCore::KURL& url, const WTF::String& referrer)
     3329{
     3330    DBG("ewkView=%p, frame=%p, name=%s, ownerElement=%p, url=%s, referrer=%s",
     3331        ewkView, frame, name.utf8().data(), ownerElement,
    33323332        url.string().utf8().data(), referrer.utf8().data());
    33333333
    3334     EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0);
     3334    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, 0);
    33353335    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, 0);
    33363336
     
    33543354    _ewk_view_smart_changed(sd);
    33553355
    3356     evas_object_smart_callback_call(o, "frame,created", frame);
     3356    evas_object_smart_callback_call(ewkView, "frame,created", frame);
    33573357    return cf.release();
    33583358}
    33593359
    3360 WTF::PassRefPtr<WebCore::Widget> ewk_view_plugin_create(Evas_Object* o, Evas_Object* frame, const WebCore::IntSize& pluginSize, WebCore::HTMLPlugInElement* element, const WebCore::KURL& url, const WTF::Vector<WTF::String>& paramNames, const WTF::Vector<WTF::String>& paramValues, const WTF::String& mimeType, bool loadManually)
    3361 {
    3362     DBG("o=%p, frame=%p, size=%dx%d, element=%p, url=%s, mimeType=%s",
    3363         o, frame, pluginSize.width(), pluginSize.height(), element,
     3360WTF::PassRefPtr<WebCore::Widget> ewk_view_plugin_create(Evas_Object* ewkView, Evas_Object* frame, const WebCore::IntSize& pluginSize, WebCore::HTMLPlugInElement* element, const WebCore::KURL& url, const WTF::Vector<WTF::String>& paramNames, const WTF::Vector<WTF::String>& paramValues, const WTF::String& mimeType, bool loadManually)
     3361{
     3362    DBG("ewkView=%p, frame=%p, size=%dx%d, element=%p, url=%s, mimeType=%s",
     3363        ewkView, frame, pluginSize.width(), pluginSize.height(), element,
    33643364        url.string().utf8().data(), mimeType.utf8().data());
    33653365
    3366     EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0);
     3366    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, 0);
    33673367    sd->changed.frame_rect = EINA_TRUE;
    33683368    _ewk_view_smart_changed(sd);
     
    33843384 * Emits: "popup,create" with a list of Ewk_Menu containing each item's data
    33853385 */
    3386 void ewk_view_popup_new(Evas_Object* o, WebCore::PopupMenuClient* client, int selected, const WebCore::IntRect& rect)
    3387 {
    3388     INF("o=%p", o);
    3389     EWK_VIEW_SD_GET_OR_RETURN(o, sd);
     3386void ewk_view_popup_new(Evas_Object* ewkView, WebCore::PopupMenuClient* client, int selected, const WebCore::IntRect& rect)
     3387{
     3388    INF("ewkView=%p", ewkView);
     3389    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd);
    33903390    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv);
    33913391
    33923392    if (priv->popup.menu_client)
    3393         ewk_view_popup_destroy(o);
     3393        ewk_view_popup_destroy(ewkView);
    33943394
    33953395    priv->popup.menu_client = client;
     
    34143414    priv->popup.menu.width = rect.width();
    34153415    priv->popup.menu.height = rect.height();
    3416     evas_object_smart_callback_call(o, "popup,create", &priv->popup.menu);
    3417 }
    3418 
    3419 Eina_Bool ewk_view_popup_destroy(Evas_Object* o)
    3420 {
    3421     INF("o=%p", o);
    3422     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     3416    evas_object_smart_callback_call(ewkView, "popup,create", &priv->popup.menu);
     3417}
     3418
     3419Eina_Bool ewk_view_popup_destroy(Evas_Object* ewkView)
     3420{
     3421    INF("ewkView=%p", ewkView);
     3422    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    34233423    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
    34243424
     
    34263426        return EINA_FALSE;
    34273427
    3428     evas_object_smart_callback_call(o, "popup,willdelete", &priv->popup.menu);
     3428    evas_object_smart_callback_call(ewkView, "popup,willdelete", &priv->popup.menu);
    34293429
    34303430    void* itemv;
     
    34403440}
    34413441
    3442 void ewk_view_popup_selected_set(Evas_Object* o, int index)
    3443 {
    3444     INF("o=%p", o);
    3445     EWK_VIEW_SD_GET_OR_RETURN(o, sd);
     3442void ewk_view_popup_selected_set(Evas_Object* ewkView, int index)
     3443{
     3444    INF("ewkView=%p", ewkView);
     3445    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd);
    34463446    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv);
    34473447    EINA_SAFETY_ON_NULL_RETURN(priv->popup.menu_client);
     
    34603460 * requested download. The download per se must be handled outside of webkit.
    34613461 */
    3462 void ewk_view_download_request(Evas_Object* o, Ewk_Download* download)
    3463 {
    3464     DBG("view=%p", o);
    3465     evas_object_smart_callback_call(o, "download,request", download);
     3462void ewk_view_download_request(Evas_Object* ewkView, Ewk_Download* download)
     3463{
     3464    DBG("ewkView=%p", ewkView);
     3465    evas_object_smart_callback_call(ewkView, "download,request", download);
    34663466}
    34673467
     
    34733473 * @param frame the frame.
    34743474 */
    3475 void ewk_view_js_window_object_clear(Evas_Object* o, Evas_Object* frame)
    3476 {
    3477     evas_object_smart_callback_call(o, "js,windowobject,clear", frame);
     3475void ewk_view_js_window_object_clear(Evas_Object* ewkView, Evas_Object* frame)
     3476{
     3477    evas_object_smart_callback_call(ewkView, "js,windowobject,clear", frame);
    34783478}
    34793479
     
    34863486 * Emits signal: "viewport,changed" with no parameters.
    34873487 */
    3488 void ewk_view_viewport_attributes_set(Evas_Object* o, const WebCore::ViewportArguments& arguments)
    3489 {
    3490     EWK_VIEW_SD_GET(o, sd);
     3488void ewk_view_viewport_attributes_set(Evas_Object* ewkView, const WebCore::ViewportArguments& arguments)
     3489{
     3490    EWK_VIEW_SD_GET(ewkView, sd);
    34913491    EWK_VIEW_PRIV_GET(sd, priv);
    34923492
    34933493    priv->viewport_arguments = arguments;
    3494     evas_object_smart_callback_call(o, "viewport,changed", 0);
    3495 }
    3496 
    3497 void ewk_view_viewport_attributes_get(const Evas_Object* o, int* w, int* h, float* init_scale, float* max_scale, float* min_scale, float* device_pixel_ratio, Eina_Bool* user_scalable)
    3498 {
    3499     WebCore::ViewportAttributes attributes = _ewk_view_viewport_attributes_compute(o);
    3500 
    3501     if (w)
    3502         *w = attributes.layoutSize.width();
    3503     if (h)
    3504         *h = attributes.layoutSize.height();
    3505     if (init_scale)
    3506         *init_scale = attributes.initialScale;
    3507     if (max_scale)
    3508         *max_scale = attributes.maximumScale;
    3509     if (min_scale)
    3510         *min_scale = attributes.minimumScale;
    3511     if (device_pixel_ratio)
    3512         *device_pixel_ratio = attributes.devicePixelRatio;
    3513     if (user_scalable)
    3514         *user_scalable = static_cast<bool>(attributes.userScalable);
    3515 }
    3516 
    3517 Eina_Bool ewk_view_zoom_range_set(Evas_Object* o, float min_scale, float max_scale)
    3518 {
    3519     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
    3520     EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
    3521 
    3522     if (max_scale < min_scale) {
     3494    evas_object_smart_callback_call(ewkView, "viewport,changed", 0);
     3495}
     3496
     3497void ewk_view_viewport_attributes_get(const Evas_Object* ewkView, int* width, int* height, float* initScale, float* maxScale, float* minScale, float* devicePixelRatio, Eina_Bool* userScalable)
     3498{
     3499    WebCore::ViewportAttributes attributes = _ewk_view_viewport_attributes_compute(ewkView);
     3500
     3501    if (width)
     3502        *width = attributes.layoutSize.width();
     3503    if (height)
     3504        *height = attributes.layoutSize.height();
     3505    if (initScale)
     3506        *initScale = attributes.initialScale;
     3507    if (maxScale)
     3508        *maxScale = attributes.maximumScale;
     3509    if (minScale)
     3510        *minScale = attributes.minimumScale;
     3511    if (devicePixelRatio)
     3512        *devicePixelRatio = attributes.devicePixelRatio;
     3513    if (userScalable)
     3514        *userScalable = static_cast<bool>(attributes.userScalable);
     3515}
     3516
     3517Eina_Bool ewk_view_zoom_range_set(Evas_Object* ewkView, float minScale, float maxScale)
     3518{
     3519    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
     3520    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
     3521
     3522    if (maxScale < minScale) {
    35233523        WRN("min_scale is larger than max_scale");
    35243524        return EINA_FALSE;
    35253525    }
    35263526
    3527     priv->settings.zoom_range.min_scale = min_scale;
    3528     priv->settings.zoom_range.max_scale = max_scale;
    3529 
    3530     return EINA_TRUE;
    3531 }
    3532 
    3533 float ewk_view_zoom_range_min_get(const Evas_Object* o)
    3534 {
    3535     EWK_VIEW_SD_GET_OR_RETURN(o, sd, -1.0);
     3527    priv->settings.zoom_range.min_scale = minScale;
     3528    priv->settings.zoom_range.max_scale = maxScale;
     3529
     3530    return EINA_TRUE;
     3531}
     3532
     3533float ewk_view_zoom_range_min_get(const Evas_Object* ewkView)
     3534{
     3535    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, -1.0);
    35363536    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, -1.0);
    35373537
     
    35393539}
    35403540
    3541 float ewk_view_zoom_range_max_get(const Evas_Object* o)
    3542 {
    3543     EWK_VIEW_SD_GET_OR_RETURN(o, sd, -1.0);
     3541float ewk_view_zoom_range_max_get(const Evas_Object* ewkView)
     3542{
     3543    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, -1.0);
    35443544    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, -1.0);
    35453545
     
    35473547}
    35483548
    3549 Eina_Bool ewk_view_user_scalable_set(Evas_Object* o, Eina_Bool user_scalable)
    3550 {
    3551     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
    3552     EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
    3553 
    3554     priv->settings.zoom_range.user_scalable = user_scalable;
    3555 
    3556     return EINA_TRUE;
    3557 }
    3558 
    3559 Eina_Bool ewk_view_user_scalable_get(const Evas_Object* o)
    3560 {
    3561     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     3549Eina_Bool ewk_view_user_scalable_set(Evas_Object* ewkView, Eina_Bool userScalable)
     3550{
     3551    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
     3552    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
     3553
     3554    priv->settings.zoom_range.user_scalable = userScalable;
     3555
     3556    return EINA_TRUE;
     3557}
     3558
     3559Eina_Bool ewk_view_user_scalable_get(const Evas_Object* ewkView)
     3560{
     3561    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    35623562    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
    35633563
     
    35653565}
    35663566
    3567 float ewk_view_device_pixel_ratio_get(const Evas_Object* o)
    3568 {
    3569     EWK_VIEW_SD_GET_OR_RETURN(o, sd, -1.0);
     3567float ewk_view_device_pixel_ratio_get(const Evas_Object* ewkView)
     3568{
     3569    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, -1.0);
    35703570    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, -1.0);
    35713571
     
    35733573}
    35743574
    3575 void ewk_view_did_first_visually_nonempty_layout(Evas_Object* o)
    3576 {
    3577     EWK_VIEW_SD_GET_OR_RETURN(o, sd);
     3575void ewk_view_did_first_visually_nonempty_layout(Evas_Object* ewkView)
     3576{
     3577    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd);
    35783578    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv);
    35793579    if (!priv->flags.view_cleared) {
    3580         ewk_view_frame_main_cleared(o);
    3581         ewk_view_enable_render(o);
     3580        ewk_view_frame_main_cleared(ewkView);
     3581        ewk_view_enable_render(ewkView);
    35823582        priv->flags.view_cleared = EINA_TRUE;
    35833583    }
     
    35903590 * @param o view.
    35913591 */
    3592 void ewk_view_dispatch_did_finish_loading(Evas_Object* o)
     3592void ewk_view_dispatch_did_finish_loading(Evas_Object* ewkView)
    35933593{
    35943594    /* If we reach this point and rendering is still disabled, WebCore will not
     
    35963596     * forcefully re-enable the rendering.
    35973597     */
    3598     ewk_view_did_first_visually_nonempty_layout(o);
    3599 }
    3600 
    3601 void ewk_view_transition_to_commited_for_newpage(Evas_Object* o)
    3602 {
    3603     EWK_VIEW_SD_GET_OR_RETURN(o, sd);
     3598    ewk_view_did_first_visually_nonempty_layout(ewkView);
     3599}
     3600
     3601void ewk_view_transition_to_commited_for_newpage(Evas_Object* ewkView)
     3602{
     3603    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd);
    36043604    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv);
    36053605
    3606     ewk_view_disable_render(o);
     3606    ewk_view_disable_render(ewkView);
    36073607    priv->flags.view_cleared = EINA_FALSE;
    36083608}
     
    36183618 * @param request Request which contain url to navigate
    36193619 */
    3620 Eina_Bool ewk_view_navigation_policy_decision(Evas_Object* o, Ewk_Frame_Resource_Request* request)
    3621 {
    3622     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_TRUE);
     3620Eina_Bool ewk_view_navigation_policy_decision(Evas_Object* ewkView, Ewk_Frame_Resource_Request* request)
     3621{
     3622    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_TRUE);
    36233623    EINA_SAFETY_ON_NULL_RETURN_VAL(sd->api, EINA_TRUE);
    36243624
     
    36293629}
    36303630
    3631 Eina_Bool ewk_view_js_object_add(Evas_Object* o, Ewk_JS_Object* obj, const char* obj_name)
     3631Eina_Bool ewk_view_js_object_add(Evas_Object* ewkView, Ewk_JS_Object* object, const char* objectName)
    36323632{
    36333633#if ENABLE(NETSCAPE_PLUGIN_API)
    3634     if (obj->view) // object has already been added to another ewk_view
     3634    if (object->view) // object has already been added to another ewk_view
    36353635        return EINA_FALSE;
    3636     obj->name = eina_stringshare_add(obj_name);
    3637     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     3636    object->name = eina_stringshare_add(object_name);
     3637    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    36383638    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
    36393639
     
    36503650    JSC::ExecState* exec = window->globalExec();
    36513651
    3652     obj->view = o;
     3652    obj->view = ewkView;
    36533653    JSC::JSObject* runtimeObject = (JSC::JSObject*)JSC::Bindings::CInstance::create((NPObject*)obj, root)->createRuntimeObject(exec);
    36543654    JSC::Identifier id = JSC::Identifier(exec, obj_name);
     
    36623662}
    36633663
    3664 Eina_Bool ewk_view_protocol_handler_set(Evas_Object* o, const char** protocols, Ewk_View_Resource_Handler_Cb handler, void* context)
    3665 {
    3666     EWK_VIEW_SD_GET(o, sd);
     3664Eina_Bool ewk_view_protocol_handler_set(Evas_Object* ewkView, const char** protocols, Ewk_View_Resource_Handler_Cb handler, void* context)
     3665{
     3666    EWK_VIEW_SD_GET(ewkView, sd);
    36673667    EWK_VIEW_PRIV_GET(sd, priv);
    36683668
     
    36763676}
    36773677
    3678 Eina_Bool ewk_view_protocol_handler_unset(Evas_Object* o)
    3679 {
    3680     EWK_VIEW_SD_GET(o, sd);
     3678Eina_Bool ewk_view_protocol_handler_unset(Evas_Object* ewkView)
     3679{
     3680    EWK_VIEW_SD_GET(ewkView, sd);
    36813681    EWK_VIEW_PRIV_GET(sd, priv);
    36823682    Eina_Bool ret = ewk_custom_protocol_handler_all_unset();
     
    36903690}
    36913691
    3692 void* ewk_view_protocol_handler_resource_get(Evas_Object* o, size_t* bytesRead, char** mime, const char* file)
    3693 {
    3694     EWK_VIEW_SD_GET(o, sd);
     3692void* ewk_view_protocol_handler_resource_get(Evas_Object* ewkView, size_t* bytesRead, char** mime, const char* file)
     3693{
     3694    EWK_VIEW_SD_GET(ewkView, sd);
    36953695    EWK_VIEW_PRIV_GET(sd, priv);
    36963696
     
    37113711 * @param h new content height.
    37123712 */
    3713 void ewk_view_contents_size_changed(Evas_Object* o, int w, int h)
    3714 {
    3715     EWK_VIEW_SD_GET_OR_RETURN(o, sd);
     3713void ewk_view_contents_size_changed(Evas_Object* ewkView, int width, int height)
     3714{
     3715    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd);
    37163716    EINA_SAFETY_ON_NULL_RETURN(sd->api);
    37173717    EINA_SAFETY_ON_NULL_RETURN(sd->api->contents_resize);
    37183718
    3719     if (!sd->api->contents_resize(sd, w, h))
    3720         ERR("failed to resize contents to %dx%d", w, h);
     3719    if (!sd->api->contents_resize(sd, width, height))
     3720        ERR("failed to resize contents to %dx%d", width, height);
    37213721}
    37223722
     
    37293729 * @return page size.
    37303730 */
    3731 WebCore::FloatRect ewk_view_page_rect_get(const Evas_Object* o)
    3732 {
    3733     EWK_VIEW_SD_GET(o, sd);
     3731WebCore::FloatRect ewk_view_page_rect_get(const Evas_Object* ewkView)
     3732{
     3733    EWK_VIEW_SD_GET(ewkView, sd);
    37343734    EWK_VIEW_PRIV_GET(sd, priv);
    37353735
     
    37393739
    37403740#if ENABLE(TOUCH_EVENTS)
    3741 void ewk_view_need_touch_events_set(Evas_Object* o, bool needed)
    3742 {
    3743     EWK_VIEW_SD_GET(o, sd);
     3741void ewk_view_need_touch_events_set(Evas_Object* ewkView, bool needed)
     3742{
     3743    EWK_VIEW_SD_GET(ewkView, sd);
    37443744    EWK_VIEW_PRIV_GET(sd, priv);
    37453745
     
    37473747}
    37483748
    3749 Eina_Bool ewk_view_need_touch_events_get(const Evas_Object* o)
    3750 {
    3751     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
     3749Eina_Bool ewk_view_need_touch_events_get(const Evas_Object* ewkView)
     3750{
     3751    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
    37523752    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
    37533753    return priv->flags.need_touch_events;
     
    37553755#endif
    37563756
    3757 Eina_Bool ewk_view_mode_set(Evas_Object* o, Ewk_View_Mode view_mode)
    3758 {
    3759     EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
    3760     EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
    3761 
    3762     switch (view_mode) {
     3757Eina_Bool ewk_view_mode_set(Evas_Object* ewkView, Ewk_View_Mode viewMode)
     3758{
     3759    EWK_VIEW_SD_GET_OR_RETURN(ewkView, sd, EINA_FALSE);
     3760    EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
     3761
     3762    switch (viewMode) {
    37633763    case EWK_VIEW_MODE_WINDOWED:
    37643764        priv->page->setViewMode(WebCore::Page::ViewModeWindowed);
     
    37833783}
    37843784
    3785 Ewk_View_Mode ewk_view_mode_get(const Evas_Object* o)
     3785Ewk_View_Mode ewk_view_mode_get(const Evas_Object* ewkView)
    37863786{
    37873787    Ewk_View_Mode mode = EWK_VIEW_MODE_WINDOWED;
    37883788
    3789     EWK_VIEW_SD_GET(o, sd);
     3789    EWK_VIEW_SD_GET(ewkView, sd);
    37903790    if (!sd)
    37913791        return mode;
     
    38223822 * Emits signal: "editorclientselection,changed" with no parameters.
    38233823 */
    3824 void ewk_view_editor_client_selection_changed(Evas_Object* o)
    3825 {
    3826     evas_object_smart_callback_call(o, "editorclient,selection,changed", 0);
     3824void ewk_view_editor_client_selection_changed(Evas_Object* ewkView)
     3825{
     3826    evas_object_smart_callback_call(ewkView, "editorclient,selection,changed", 0);
    38273827}
    38283828
     
    38353835 * Emits signal: "editorclient,contents,changed" with no parameters.
    38363836 */
    3837 void ewk_view_editor_client_contents_changed(Evas_Object* o)
    3838 {
    3839     evas_object_smart_callback_call(o, "editorclient,contents,changed", 0);
    3840 }
     3837void ewk_view_editor_client_contents_changed(Evas_Object* ewkView)
     3838{
     3839    evas_object_smart_callback_call(ewkView, "editorclient,contents,changed", 0);
     3840}
  • trunk/Source/WebKit/efl/ewk/ewk_view_single.cpp

    r96382 r97329  
    1010    This library is distributed in the hope that it will be useful,
    1111    but WITHOUT ANY WARRANTY; without even the implied warranty of
    12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     12    MERchANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    1313    Library General Public License for more details.
    1414
     
    3232static Ewk_View_Smart_Class _parent_sc = EWK_VIEW_SMART_CLASS_INIT_NULL;
    3333
    34 static void _ewk_view_single_on_del(void* data, Evas* e, Evas_Object* o, void* event_info)
     34static void _ewk_view_single_on_del(void* data, Evas* eventType, Evas_Object* callback, void* eventInfo)
    3535{
    3636    Evas_Object* clip = (Evas_Object*)data;
     
    3838}
    3939
    40 static void _ewk_view_single_smart_add(Evas_Object* o)
     40static void _ewk_view_single_smart_add(Evas_Object* ewkSingle)
    4141{
    4242    Ewk_View_Smart_Data* sd;
    4343
    44     _parent_sc.sc.add(o);
    45 
    46     sd = static_cast<Ewk_View_Smart_Data*>(evas_object_smart_data_get(o));
     44    _parent_sc.sc.add(ewkSingle);
     45
     46    sd = static_cast<Ewk_View_Smart_Data*>(evas_object_smart_data_get(ewkSingle));
    4747    if (!sd)
    4848        return;
    4949
    5050    Evas_Object* clip = evas_object_rectangle_add(sd->base.evas);
    51     evas_object_clip_set(sd->backing_store, clip);
    52     evas_object_smart_member_add(clip, o);
    5351    evas_object_show(clip);
    5452
     
    5755}
    5856
    59 static Evas_Object* _ewk_view_single_smart_backing_store_add(Ewk_View_Smart_Data* sd)
    60 {
    61     Evas_Object* bs = evas_object_image_add(sd->base.evas);
     57static Evas_Object* _ewk_view_single_smart_backing_store_add(Ewk_View_Smart_Data* smartData)
     58{
     59    Evas_Object* bs = evas_object_image_add(smartData->base.evas);
    6260    evas_object_image_alpha_set(bs, EINA_FALSE);
    63     evas_object_image_smooth_scale_set(bs, sd->zoom_weak_smooth_scale);
     61    evas_object_image_smooth_scale_set(bs, smartData->zoom_weak_smooth_scale);
    6462
    6563    return bs;
    6664}
    6765
    68 static void _ewk_view_single_smart_resize(Evas_Object* o, Evas_Coord w, Evas_Coord h)
    69 {
    70     Ewk_View_Smart_Data* sd = static_cast<Ewk_View_Smart_Data*>(evas_object_smart_data_get(o));
    71     _parent_sc.sc.resize(o, w, h);
     66static void _ewk_view_single_smart_resize(Evas_Object* ewkSingle, Evas_Coord width, Evas_Coord height)
     67{
     68    Ewk_View_Smart_Data* sd = static_cast<Ewk_View_Smart_Data*>(evas_object_smart_data_get(ewkSingle));
     69    _parent_sc.sc.resize(ewkSingle, width, height);
    7270
    7371    if (!sd)
     
    7573
    7674    // these should be queued and processed in calculate as well!
    77     evas_object_image_size_set(sd->backing_store, w, h);
     75    evas_object_image_size_set(sd->backing_store, width, height);
    7876    if (sd->animated_zoom.zoom.current < 0.00001) {
    7977        Evas_Object* clip = evas_object_clip_get(sd->backing_store);
    8078        Evas_Coord x, y, cw, ch;
    81         evas_object_image_fill_set(sd->backing_store, 0, 0, w, h);
     79        evas_object_image_fill_set(sd->backing_store, 0, 0, width, height);
    8280        evas_object_geometry_get(sd->backing_store, &x, &y, 0, 0);
    8381        evas_object_move(clip, x, y);
    8482        ewk_frame_contents_size_get(sd->main_frame, &cw, &ch);
    85         if (w > cw)
    86             w = cw;
    87         if (h > ch)
    88             h = ch;
    89         evas_object_resize(clip, w, h);
    90     }
    91 }
    92 
    93 static inline void _ewk_view_4b_move_region_up(uint32_t* image, size_t rows, size_t x, size_t y, size_t w, size_t h, size_t rowsize)
     83        if (width > cw)
     84            width = cw;
     85        if (height > ch)
     86            height = ch;
     87        evas_object_resize(clip, width, height);
     88    }
     89}
     90
     91static inline void _ewk_view_4b_move_region_up(uint32_t* image, size_t rows, size_t x, size_t y, size_t width, size_t height, size_t rowSize)
    9492{
    9593    uint32_t* src;
    9694    uint32_t* dst;
    9795
    98     dst = image + x + y * rowsize;
    99     src = dst + rows * rowsize;
    100     h -= rows;
    101 
    102     for (; h > 0; h--, dst += rowsize, src += rowsize)
    103         memcpy(dst, src, w * 4);
    104 }
    105 
    106 static inline void _ewk_view_4b_move_region_down(uint32_t* image, size_t rows, size_t x, size_t y, size_t w, size_t h, size_t rowsize)
     96    dst = image + x + y * rowSize;
     97    src = dst + rows * rowSize;
     98    height -= rows;
     99
     100    for (; height > 0; height--, dst += rowSize, src += rowSize)
     101        memcpy(dst, src, width * 4);
     102}
     103
     104static inline void _ewk_view_4b_move_region_down(uint32_t* image, size_t rows, size_t x, size_t y, size_t width, size_t height, size_t rowSize)
    107105{
    108106    uint32_t* src;
    109107    uint32_t* dst;
    110108
    111     h -= rows;
    112     src = image + x + (y + h - 1) * rowsize;
    113     dst = src + rows * rowsize;
    114 
    115     for (; h > 0; h--, dst -= rowsize, src -= rowsize)
    116         memcpy(dst, src, w * 4);
     109    height -= rows;
     110    src = image + x + (y + height - 1) * rowSize;
     111    dst = src + rows * rowSize;
     112
     113    for (; height > 0; height--, dst -= rowSize, src -= rowSize)
     114        memcpy(dst, src, width * 4);
    117115}
    118116
     
    137135}
    138136
    139 static inline void _ewk_view_4b_move_region_left(uint32_t* image, size_t cols, size_t x, size_t y, size_t w, size_t h, size_t rowsize)
     137static inline void _ewk_view_4b_move_region_left(uint32_t* image, size_t cols, size_t x, size_t y, size_t width, size_t height, size_t rowSize)
    140138{
    141139    uint32_t* src;
    142140    uint32_t* dst;
    143141
    144     dst = image + x + y * rowsize;
     142    dst = image + x + y * rowSize;
    145143    src = dst + cols;
    146     w -= cols;
    147 
    148     for (; h > 0; h--, dst += rowsize, src += rowsize)
    149         _ewk_view_4b_move_line_left(dst, src, w);
    150 }
    151 
    152 static inline void _ewk_view_4b_move_region_right(uint32_t* image, size_t cols, size_t x, size_t y, size_t w, size_t h, size_t rowsize)
     144    width -= cols;
     145
     146    for (; height > 0; height--, dst += rowSize, src += rowSize)
     147        _ewk_view_4b_move_line_left(dst, src, width);
     148}
     149
     150static inline void _ewk_view_4b_move_region_right(uint32_t* image, size_t columns, size_t x, size_t y, size_t width, size_t height, size_t rowSize)
    153151{
    154152    uint32_t* src;
    155153    uint32_t* dst;
    156154
    157     w -= cols;
    158     src = image + (x + w - 1) + y * rowsize;
    159     dst = src + cols;
    160 
    161     for (; h > 0; h--, dst += rowsize, src += rowsize)
    162         _ewk_view_4b_move_line_right(dst, src, w);
     155    width -= columns;
     156    src = image + (x + width - 1) + y * rowSize;
     157    dst = src + columns;
     158
     159    for (; height > 0; height--, dst += rowSize, src += rowSize)
     160        _ewk_view_4b_move_line_right(dst, src, width);
    163161}
    164162
    165163/* catch-all function, not as optimized as the others, but does the work. */
    166 static inline void _ewk_view_4b_move_region(uint32_t* image, int dx, int dy, size_t x, size_t y, size_t w, size_t h, size_t rowsize)
     164static inline void _ewk_view_4b_move_region(uint32_t* image, int deltaX, int deltaY, size_t x, size_t y, size_t width, size_t height, size_t rowSize)
    167165{
    168166    uint32_t* src;
    169167    uint32_t* dst;
    170168
    171     if (dy < 0) {
    172         h += dy;
    173         dst = image + x + y * rowsize;
    174         src = dst - dy * rowsize;
    175         if (dx <= 0) {
    176             w += dx;
    177             src -= dx;
    178             for (; h > 0; h--, dst += rowsize, src += rowsize)
    179                 _ewk_view_4b_move_line_left(dst, src, w);
     169    if (deltaY < 0) {
     170        height += deltaY;
     171        dst = image + x + y * rowSize;
     172        src = dst - deltaY * rowSize;
     173        if (deltaX <= 0) {
     174            width += deltaX;
     175            src -= deltaX;
     176            for (; height > 0; height--, dst += rowSize, src += rowSize)
     177                _ewk_view_4b_move_line_left(dst, src, width);
    180178        } else {
    181             w -= dx;
    182             src += w - 1;
    183             dst += w + dx -1;
    184             for (; h > 0; h--, dst += rowsize, src += rowsize)
    185                 _ewk_view_4b_move_line_right(dst, src, w);
     179            width -= deltaX;
     180            src += width - 1;
     181            dst += width + deltaX -1;
     182            for (; height > 0; height--, dst += rowSize, src += rowSize)
     183                _ewk_view_4b_move_line_right(dst, src, width);
    186184        }
    187185    } else {
    188         h -= dy;
    189         src = image + x + (y + h - 1) * rowsize;
    190         dst = src + dy * rowsize;
    191         if (dx <= 0) {
    192             w += dx;
    193             src -= dx;
    194             for (; h > 0; h--, dst -= rowsize, src -= rowsize)
    195                 _ewk_view_4b_move_line_left(dst, src, w);
     186        height -= deltaY;
     187        src = image + x + (y + height - 1) * rowSize;
     188        dst = src + deltaY * rowSize;
     189        if (deltaX <= 0) {
     190            width += deltaX;
     191            src -= deltaX;
     192            for (; height > 0; height--, dst -= rowSize, src -= rowSize)
     193                _ewk_view_4b_move_line_left(dst, src, width);
    196194        } else {
    197             w -= dx;
    198             src += w - 1;
    199             dst += w + dx - 1;
    200             for (; h > 0; h--, dst -= rowsize, src -= rowsize)
    201                 _ewk_view_4b_move_line_right(dst, src, w);
     195            width -= deltaX;
     196            src += width - 1;
     197            dst += width + deltaX - 1;
     198            for (; height > 0; height--, dst -= rowSize, src -= rowSize)
     199                _ewk_view_4b_move_line_right(dst, src, width);
    202200        }
    203201    }
    204202}
    205203
    206 static inline void _ewk_view_single_scroll_process_single(Ewk_View_Smart_Data* sd, void* pixels, Evas_Coord ow, Evas_Coord oh, const Ewk_Scroll_Request* sr)
     204static inline void _ewk_view_single_scroll_process_single(Ewk_View_Smart_Data* smartData, void* pixels, Evas_Coord width, Evas_Coord height, const Ewk_Scroll_Request* scrollRequest)
    207205{
    208206    Evas_Coord sx, sy, sw, sh;
    209207
    210208    DBG("%d,%d + %d,%d %+03d,%+03d, store: %p %dx%d",
    211         sr->x, sr->y, sr->w, sr->h, sr->dx, sr->dy, pixels, ow, oh);
    212 
    213     sx = sr->x;
    214     sy = sr->y;
    215     sw = sr->w;
    216     sh = sr->h;
    217 
    218     if (abs(sr->dx) >= sw || abs(sr->dy) >= sh) {
     209        scrollRequest->x, scrollRequest->y, scrollRequest->w, scrollRequest->h, scrollRequest->dx, scrollRequest->dy, pixels, width, height);
     210
     211    sx = scrollRequest->x;
     212    sy = scrollRequest->y;
     213    sw = scrollRequest->w;
     214    sh = scrollRequest->h;
     215
     216    if (abs(scrollRequest->dx) >= sw || abs(scrollRequest->dy) >= sh) {
    219217        /* doubt webkit would be so stupid... */
    220218        DBG("full page scroll %+03d,%+03d. convert to repaint %d,%d + %dx%d",
    221             sr->dx, sr->dy, sx, sy, sw, sh);
    222         ewk_view_repaint_add(sd->_priv, sx, sy, sw, sh);
     219            scrollRequest->dx, scrollRequest->dy, sx, sy, sw, sh);
     220        ewk_view_repaint_add(smartData->_priv, sx, sy, sw, sh);
    223221        return;
    224222    }
     
    233231    }
    234232
    235     if (sx + sw > ow)
    236         sw = ow - sx;
    237     if (sy + sh > oh)
    238         sh = oh - sy;
     233    if (sx + sw > width)
     234        sw = width - sx;
     235    if (sy + sh > height)
     236        sh = height - sy;
    239237
    240238    if (sw < 0)
     
    244242
    245243    EINA_SAFETY_ON_TRUE_RETURN(!sw || !sh);
    246     if (!sr->dx) {
    247         if (sr->dy < 0) {
     244    if (!scrollRequest->dx) {
     245        if (scrollRequest->dy < 0) {
    248246            DBG("scroll up: %+03d,%+03d update=%d,%d+%dx%d, "
    249247                "repaint=%d,%d+%dx%d",
    250                 sr->dx, sr->dy, sx, sy, sw, sh + sr->dy,
    251                 sx, sy + sh + sr->dy, sw, -sr->dy);
     248                scrollRequest->dx, scrollRequest->dy, sx, sy, sw, sh + scrollRequest->dy,
     249                sx, sy + sh + scrollRequest->dy, sw, -scrollRequest->dy);
    252250
    253251            _ewk_view_4b_move_region_up
    254                 (static_cast<uint32_t*>(pixels), -sr->dy, sx, sy, sw, sh, ow);
     252                (static_cast<uint32_t*>(pixels), -scrollRequest->dy, sx, sy, sw, sh, width);
    255253            evas_object_image_data_update_add
    256                 (sd->backing_store, sx, sy, sw, sh + sr->dy);
    257 
    258             ewk_view_repaint_add(sd->_priv, sx, sy + sh + sr->dy, sw, -sr->dy);
    259         } else if (sr->dy > 0) {
     254                (smartData->backing_store, sx, sy, sw, sh + scrollRequest->dy);
     255
     256            ewk_view_repaint_add(smartData->_priv, sx, sy + sh + scrollRequest->dy, sw, -scrollRequest->dy);
     257        } else if (scrollRequest->dy > 0) {
    260258            DBG("scroll down: %+03d,%+03d update=%d,%d+%dx%d, "
    261259                "repaint=%d,%d+%dx%d",
    262                 sr->dx, sr->dy, sx, sy + sr->dy, sw, sh - sr->dy,
    263                 sx, sy, sw, sr->dy);
     260                scrollRequest->dx, scrollRequest->dy, sx, sy + scrollRequest->dy, sw, sh - scrollRequest->dy,
     261                sx, sy, sw, scrollRequest->dy);
    264262
    265263            _ewk_view_4b_move_region_down
    266                 (static_cast<uint32_t*>(pixels), sr->dy, sx, sy, sw, sh, ow);
     264                (static_cast<uint32_t*>(pixels), scrollRequest->dy, sx, sy, sw, sh, width);
    267265            evas_object_image_data_update_add
    268                 (sd->backing_store, sx, sy + sr->dy, sw, sh - sr->dy);
    269 
    270             ewk_view_repaint_add(sd->_priv, sx, sy, sw, sr->dy);
     266                (smartData->backing_store, sx, sy + scrollRequest->dy, sw, sh - scrollRequest->dy);
     267
     268            ewk_view_repaint_add(smartData->_priv, sx, sy, sw, scrollRequest->dy);
    271269        }
    272     } else if (!sr->dy) {
    273         if (sr->dx < 0) {
     270    } else if (!scrollRequest->dy) {
     271        if (scrollRequest->dx < 0) {
    274272            DBG("scroll left: %+03d,%+03d update=%d,%d+%dx%d, "
    275273                "repaint=%d,%d+%dx%d",
    276                 sr->dx, sr->dy, sx, sy, sw + sr->dx, sh,
    277                 sx + sw + sr->dx, sy, -sr->dx, sh);
     274                scrollRequest->dx, scrollRequest->dy, sx, sy, sw + scrollRequest->dx, sh,
     275                sx + sw + scrollRequest->dx, sy, -scrollRequest->dx, sh);
    278276
    279277            _ewk_view_4b_move_region_left
    280                 (static_cast<uint32_t*>(pixels), -sr->dx, sx, sy, sw, sh, ow);
     278                (static_cast<uint32_t*>(pixels), -scrollRequest->dx, sx, sy, sw, sh, width);
    281279            evas_object_image_data_update_add
    282                 (sd->backing_store, sx, sy, sw + sr->dx, sh);
    283 
    284             ewk_view_repaint_add(sd->_priv, sx + sw + sr->dx, sy, -sr->dx, sh);
    285         } else if (sr->dx > 0) {
     280                (smartData->backing_store, sx, sy, sw + scrollRequest->dx, sh);
     281
     282            ewk_view_repaint_add(smartData->_priv, sx + sw + scrollRequest->dx, sy, -scrollRequest->dx, sh);
     283        } else if (scrollRequest->dx > 0) {
    286284            DBG("scroll up: %+03d,%+03d update=%d,%d+%dx%d, "
    287285                "repaint=%d,%d+%dx%d",
    288                 sr->dx, sr->dy, sx + sr->dx, sy, sw - sr->dx, sh,
    289                 sx, sy, sr->dx, sh);
     286                scrollRequest->dx, scrollRequest->dy, sx + scrollRequest->dx, sy, sw - scrollRequest->dx, sh,
     287                sx, sy, scrollRequest->dx, sh);
    290288
    291289            _ewk_view_4b_move_region_right
    292                 (static_cast<uint32_t*>(pixels), sr->dx, sx, sy, sw, sh, ow);
     290                (static_cast<uint32_t*>(pixels), scrollRequest->dx, sx, sy, sw, sh, width);
    293291            evas_object_image_data_update_add
    294                 (sd->backing_store, sx + sr->dx, sy, sw - sr->dx, sh);
    295 
    296             ewk_view_repaint_add(sd->_priv, sx, sy, sr->dx, sh);
     292                (smartData->backing_store, sx + scrollRequest->dx, sy, sw - scrollRequest->dx, sh);
     293
     294            ewk_view_repaint_add(smartData->_priv, sx, sy, scrollRequest->dx, sh);
    297295        }
    298296    } else {
    299297        Evas_Coord mx, my, mw, mh, ax, ay, aw, ah, bx, by, bw, bh;
    300298
    301         if (sr->dx < 0) {
     299        if (scrollRequest->dx < 0) {
    302300            mx = sx;
    303             mw = sw + sr->dx;
     301            mw = sw + scrollRequest->dx;
    304302            ax = mx + mw;
    305             aw = -sr->dx;
     303            aw = -scrollRequest->dx;
    306304        } else {
    307305            ax = sx;
    308             aw = sr->dx;
     306            aw = scrollRequest->dx;
    309307            mx = ax + aw;
    310             mw = sw - sr->dx;
     308            mw = sw - scrollRequest->dx;
    311309        }
    312310
    313         if (sr->dy < 0) {
     311        if (scrollRequest->dy < 0) {
    314312            my = sy;
    315             mh = sh + sr->dy;
     313            mh = sh + scrollRequest->dy;
    316314            by = my + mh;
    317             bh = -sr->dy;
     315            bh = -scrollRequest->dy;
    318316        } else {
    319317            by = sy;
    320             bh = sr->dy;
     318            bh = scrollRequest->dy;
    321319            my = by + bh;
    322             mh = sh - sr->dy;
     320            mh = sh - scrollRequest->dy;
    323321        }
    324322
     
    330328        DBG("scroll diagonal: %+03d,%+03d update=%d,%d+%dx%d, "
    331329            "repaints: h=%d,%d+%dx%d v=%d,%d+%dx%d",
    332             sr->dx, sr->dy, mx, my, mw, mh, ax, ay, aw, ah, bx, by, bw, bh);
     330            scrollRequest->dx, scrollRequest->dy, mx, my, mw, mh, ax, ay, aw, ah, bx, by, bw, bh);
    333331
    334332        _ewk_view_4b_move_region
    335             (static_cast<uint32_t*>(pixels), sr->dx, sr->dy, sx, sy, sw, sh, ow);
    336 
    337         evas_object_image_data_update_add(sd->backing_store, mx, my, mw, mh);
    338         ewk_view_repaint_add(sd->_priv, ax, ay, aw, ah);
    339         ewk_view_repaint_add(sd->_priv, bx, by, bw, bh);
    340     }
    341 }
    342 
    343 static Eina_Bool _ewk_view_single_smart_scrolls_process(Ewk_View_Smart_Data* sd)
     333            (static_cast<uint32_t*>(pixels), scrollRequest->dx, scrollRequest->dy, sx, sy, sw, sh, width);
     334
     335        evas_object_image_data_update_add(smartData->backing_store, mx, my, mw, mh);
     336        ewk_view_repaint_add(smartData->_priv, ax, ay, aw, ah);
     337        ewk_view_repaint_add(smartData->_priv, bx, by, bw, bh);
     338    }
     339}
     340
     341static Eina_Bool _ewk_view_single_smart_scrolls_process(Ewk_View_Smart_Data* smartData)
    344342{
    345343    const Ewk_Scroll_Request* sr;
     
    347345    Evas_Coord ow, oh;
    348346    size_t count;
    349     void* pixels = evas_object_image_data_get(sd->backing_store, 1);
    350     evas_object_image_size_get(sd->backing_store, &ow, &oh);
    351 
    352     sr = ewk_view_scroll_requests_get(sd->_priv, &count);
     347    void* pixels = evas_object_image_data_get(smartData->backing_store, 1);
     348    evas_object_image_size_get(smartData->backing_store, &ow, &oh);
     349
     350    sr = ewk_view_scroll_requests_get(smartData->_priv, &count);
    353351    sr_end = sr + count;
    354352    for (; sr < sr_end; sr++)
    355         _ewk_view_single_scroll_process_single(sd, pixels, ow, oh, sr);
    356 
    357     evas_object_image_data_set(sd->backing_store, pixels);
     353        _ewk_view_single_scroll_process_single(smartData, pixels, ow, oh, sr);
     354
     355    evas_object_image_data_set(smartData->backing_store, pixels);
    358356
    359357    return EINA_TRUE;
    360358}
    361359
    362 static Eina_Bool _ewk_view_single_smart_repaints_process(Ewk_View_Smart_Data* sd)
     360static Eina_Bool _ewk_view_single_smart_repaints_process(Ewk_View_Smart_Data* smartData)
    363361{
    364362    Ewk_View_Paint_Context* ctxt;
     
    377375    Eina_Bool ret = EINA_TRUE;
    378376
    379     if (sd->animated_zoom.zoom.current < 0.00001) {
    380         Evas_Object* clip = evas_object_clip_get(sd->backing_store);
     377    if (smartData->animated_zoom.zoom.current < 0.00001) {
     378        Evas_Object* clip = evas_object_clip_get(smartData->backing_store);
    381379        Evas_Coord w, h, cw, ch;
    382380        // reset effects of zoom_weak_set()
    383381        evas_object_image_fill_set
    384             (sd->backing_store, 0, 0, sd->view.w, sd->view.h);
    385         evas_object_move(clip, sd->view.x, sd->view.y);
    386 
    387         w = sd->view.w;
    388         h = sd->view.h;
    389 
    390         ewk_frame_contents_size_get(sd->main_frame, &cw, &ch);
     382            (smartData->backing_store, 0, 0, smartData->view.w, smartData->view.h);
     383        evas_object_move(clip, smartData->view.x, smartData->view.y);
     384
     385        w = smartData->view.w;
     386        h = smartData->view.h;
     387
     388        ewk_frame_contents_size_get(smartData->main_frame, &cw, &ch);
    391389        if (w > cw)
    392390            w = cw;
     
    396394    }
    397395
    398     pixels = evas_object_image_data_get(sd->backing_store, 1);
    399     evas_object_image_size_get(sd->backing_store, &ow, &oh);
     396    pixels = evas_object_image_data_get(smartData->backing_store, 1);
     397    evas_object_image_size_get(smartData->backing_store, &ow, &oh);
    400398    format = CAIRO_FORMAT_ARGB32;
    401399
     
    418416    }
    419417
    420     ctxt = ewk_view_paint_context_new(sd->_priv, cairo);
     418    ctxt = ewk_view_paint_context_new(smartData->_priv, cairo);
    421419    if (!ctxt) {
    422420        ERR("could not create paint context");
     
    432430    }
    433431
    434     pr = ewk_view_repaints_get(sd->_priv, &count);
     432    pr = ewk_view_repaints_get(smartData->_priv, &count);
    435433    pr_end = pr + count;
    436434    for (; pr < pr_end; pr++)
     
    444442    }
    445443
    446     ewk_view_layout_if_needed_recursive(sd->_priv);
     444    ewk_view_layout_if_needed_recursive(smartData->_priv);
    447445
    448446    int sx, sy;
    449     ewk_frame_scroll_pos_get(sd->main_frame, &sx, &sy);
     447    ewk_frame_scroll_pos_get(smartData->main_frame, &sx, &sy);
    450448
    451449    EINA_ITERATOR_FOREACH(itr, r) {
     
    465463        ewk_view_paint_context_restore(ctxt);
    466464        evas_object_image_data_update_add
    467             (sd->backing_store, r->x, r->y, r->w, r->h);
     465            (smartData->backing_store, r->x, r->y, r->w, r->h);
    468466    }
    469467    eina_iterator_free(itr);
     
    478476    cairo_surface_destroy(surface);
    479477error_cairo_surface:
    480     evas_object_image_data_set(sd->backing_store, pixels); /* dec refcount */
     478    evas_object_image_data_set(smartData->backing_store, pixels); /* dec refcount */
    481479
    482480    return ret;
    483481}
    484482
    485 static Eina_Bool _ewk_view_single_smart_zoom_weak_set(Ewk_View_Smart_Data* sd, float zoom, Evas_Coord cx, Evas_Coord cy)
     483static Eina_Bool _ewk_view_single_smart_zoom_weak_set(Ewk_View_Smart_Data* smartData, float zoom, Evas_Coord centerX, Evas_Coord centerY)
    486484{
    487485    // TODO: review
    488     float scale = zoom / sd->animated_zoom.zoom.start;
    489     Evas_Coord w = sd->view.w * scale;
    490     Evas_Coord h = sd->view.h * scale;
     486    float scale = zoom / smartData->animated_zoom.zoom.start;
     487    Evas_Coord w = smartData->view.w * scale;
     488    Evas_Coord h = smartData->view.h * scale;
    491489    Evas_Coord dx, dy, cw, ch;
    492     Evas_Object* clip = evas_object_clip_get(sd->backing_store);
    493 
    494     ewk_frame_contents_size_get(sd->main_frame, &cw, &ch);
    495     if (sd->view.w > 0 && sd->view.h > 0) {
    496         dx = (w * (sd->view.w - cx)) / sd->view.w;
    497         dy = (h * (sd->view.h - cy)) / sd->view.h;
     490    Evas_Object* clip = evas_object_clip_get(smartData->backing_store);
     491
     492    ewk_frame_contents_size_get(smartData->main_frame, &cw, &ch);
     493    if (smartData->view.w > 0 && smartData->view.h > 0) {
     494        dx = (w * (smartData->view.w - centerX)) / smartData->view.w;
     495        dy = (h * (smartData->view.h - centerY)) / smartData->view.h;
    498496    } else {
    499497        dx = 0;
     
    501499    }
    502500
    503     evas_object_image_fill_set(sd->backing_store, cx + dx, cy + dy, w, h);
    504 
    505     if (sd->view.w > 0 && sd->view.h > 0) {
    506         dx = ((sd->view.w - w) * cx) / sd->view.w;
    507         dy = ((sd->view.h - h) * cy) / sd->view.h;
     501    evas_object_image_fill_set(smartData->backing_store, centerX + dx, centerY + dy, w, h);
     502
     503    if (smartData->view.w > 0 && smartData->view.h > 0) {
     504        dx = ((smartData->view.w - w) * centerX) / smartData->view.w;
     505        dy = ((smartData->view.h - h) * centerY) / smartData->view.h;
    508506    } else {
    509507        dx = 0;
    510508        dy = 0;
    511509    }
    512     evas_object_move(clip, sd->view.x + dx, sd->view.y + dy);
    513 
    514     if (cw < sd->view.w)
     510    evas_object_move(clip, smartData->view.x + dx, smartData->view.y + dy);
     511
     512    if (cw < smartData->view.w)
    515513        w = cw * scale;
    516     if (ch < sd->view.h)
     514    if (ch < smartData->view.h)
    517515        h = ch * scale;
    518516    evas_object_resize(clip, w, h);
     
    520518}
    521519
    522 static void _ewk_view_single_smart_zoom_weak_smooth_scale_set(Ewk_View_Smart_Data* sd, Eina_Bool smooth_scale)
    523 {
    524     evas_object_image_smooth_scale_set(sd->backing_store, smooth_scale);
    525 }
    526 
    527 static void _ewk_view_single_smart_bg_color_set(Ewk_View_Smart_Data* sd, unsigned char r, unsigned char g, unsigned char b, unsigned char a)
    528 {
    529     evas_object_image_alpha_set(sd->backing_store, a < 255);
     520static void _ewk_view_single_smart_zoom_weak_smooth_scale_set(Ewk_View_Smart_Data* smartData, Eina_Bool smooth_scale)
     521{
     522    evas_object_image_smooth_scale_set(smartData->backing_store, smooth_scale);
     523}
     524
     525static void _ewk_view_single_smart_bg_color_set(Ewk_View_Smart_Data* smartData, unsigned char red, unsigned char green, unsigned char blue, unsigned char alpha)
     526{
     527    evas_object_image_alpha_set(smartData->backing_store, alpha < 255);
    530528}
    531529
     
    564562}
    565563
    566 Evas_Object* ewk_view_single_add(Evas* e)
    567 {
    568     return evas_object_smart_add(e, _ewk_view_single_smart_class_new());
    569 }
     564Evas_Object* ewk_view_single_add(Evas* canvas)
     565{
     566    return evas_object_smart_add(canvas, _ewk_view_single_smart_class_new());
     567}
  • trunk/Source/WebKit/efl/ewk/ewk_view_tiled.cpp

    r96382 r97329  
    3131static Ewk_View_Smart_Class _parent_sc = EWK_VIEW_SMART_CLASS_INIT_NULL;
    3232
    33 static Eina_Bool _ewk_view_tiled_render_cb(void* data, Ewk_Tile* t, const Eina_Rectangle* area)
     33static Eina_Bool _ewk_view_tiled_render_cb(void* data, Ewk_Tile* tile, const Eina_Rectangle* area)
    3434{
    3535    Ewk_View_Private_Data* priv = static_cast<Ewk_View_Private_Data*>(data);
    36     Eina_Rectangle r = {area->x + t->x, area->y + t->y, area->w, area->h};
    37 
    38     return ewk_view_paint_contents(priv, t->cairo, &r);
    39 }
    40 
    41 static void* _ewk_view_tiled_updates_process_pre(void* data, Evas_Object* o)
     36    Eina_Rectangle rect = {area->x + tile->x, area->y + tile->y, area->w, area->h};
     37
     38    return ewk_view_paint_contents(priv, tile->cairo, &rect);
     39}
     40
     41static void* _ewk_view_tiled_updates_process_pre(void* data, Evas_Object* ewkTile)
    4242{
    4343    Ewk_View_Private_Data* priv = static_cast<Ewk_View_Private_Data*>(data);
     
    4646}
    4747
    48 static Evas_Object* _ewk_view_tiled_smart_backing_store_add(Ewk_View_Smart_Data* sd)
    49 {
    50     Evas_Object* bs = ewk_tiled_backing_store_add(sd->base.evas);
     48static Evas_Object* _ewk_view_tiled_smart_backing_store_add(Ewk_View_Smart_Data* smartData)
     49{
     50    Evas_Object* bs = ewk_tiled_backing_store_add(smartData->base.evas);
    5151    ewk_tiled_backing_store_render_cb_set
    52         (bs, _ewk_view_tiled_render_cb, sd->_priv);
     52        (bs, _ewk_view_tiled_render_cb, smartData->_priv);
    5353    ewk_tiled_backing_store_updates_process_pre_set
    54         (bs, _ewk_view_tiled_updates_process_pre, sd->_priv);
     54        (bs, _ewk_view_tiled_updates_process_pre, smartData->_priv);
    5555    return bs;
    5656}
    5757
    5858static void
    59 _ewk_view_tiled_contents_size_changed_cb(void* data, Evas_Object* o, void* event_info)
    60 {
    61     Evas_Coord* size = static_cast<Evas_Coord*>(event_info);
    62     Ewk_View_Smart_Data* sd = static_cast<Ewk_View_Smart_Data*>(data);
     59_ewk_view_tiled_contents_size_changed_cb(void* data, Evas_Object* ewkTile, void* eventInfo)
     60{
     61    Evas_Coord* size = static_cast<Evas_Coord*>(eventInfo);
     62    Ewk_View_Smart_Data* smartData = static_cast<Ewk_View_Smart_Data*>(data);
    6363
    6464    ewk_tiled_backing_store_contents_resize
    65         (sd->backing_store, size[0], size[1]);
    66 }
    67 
    68 static void _ewk_view_tiled_smart_add(Evas_Object* o)
     65        (smartData->backing_store, size[0], size[1]);
     66}
     67
     68static void _ewk_view_tiled_smart_add(Evas_Object* ewkTile)
    6969{
    7070    Ewk_View_Smart_Data* sd;
    7171
    72     _parent_sc.sc.add(o);
    73 
    74     sd = static_cast<Ewk_View_Smart_Data*>(evas_object_smart_data_get(o));
     72    _parent_sc.sc.add(ewkTile);
     73
     74    sd = static_cast<Ewk_View_Smart_Data*>(evas_object_smart_data_get(ewkTile));
    7575    if (!sd)
    7676        return;
     
    8282}
    8383
    84 static Eina_Bool _ewk_view_tiled_smart_scrolls_process(Ewk_View_Smart_Data* sd)
     84static Eina_Bool _ewk_view_tiled_smart_scrolls_process(Ewk_View_Smart_Data* smartData)
    8585{
    8686    const Ewk_Scroll_Request* sr;
     
    8989    Evas_Coord vw, vh;
    9090
    91     ewk_frame_contents_size_get(sd->main_frame, &vw, &vh);
    92 
    93     sr = ewk_view_scroll_requests_get(sd->_priv, &count);
     91    ewk_frame_contents_size_get(smartData->main_frame, &vw, &vh);
     92
     93    sr = ewk_view_scroll_requests_get(smartData->_priv, &count);
    9494    sr_end = sr + count;
    9595    for (; sr < sr_end; sr++) {
    9696        if (sr->main_scroll)
    9797            ewk_tiled_backing_store_scroll_full_offset_add
    98                 (sd->backing_store, sr->dx, sr->dy);
     98                (smartData->backing_store, sr->dx, sr->dy);
    9999        else {
    100100            Evas_Coord sx, sy, sw, sh;
     
    109109                DBG("full page scroll %+03d,%+03d. convert to repaint %d,%d + %dx%d",
    110110                    sr->dx, sr->dy, sx, sy, sw, sh);
    111                 ewk_view_repaint_add(sd->_priv, sx, sy, sw, sh);
     111                ewk_view_repaint_add(smartData->_priv, sx, sy, sw, sh);
    112112                continue;
    113113            }
     
    130130            sw += abs(sr->dx);
    131131            sh += abs(sr->dy);
    132             ewk_view_repaint_add(sd->_priv, sx, sy, sw, sh);
     132            ewk_view_repaint_add(smartData->_priv, sx, sy, sw, sh);
    133133            INF("using repaint for inner frame scolling!");
    134134        }
     
    138138}
    139139
    140 static Eina_Bool _ewk_view_tiled_smart_repaints_process(Ewk_View_Smart_Data* sd)
     140static Eina_Bool _ewk_view_tiled_smart_repaints_process(Ewk_View_Smart_Data* smartData)
    141141{
    142142    const Eina_Rectangle* pr, * pr_end;
     
    144144    int sx, sy;
    145145
    146     ewk_frame_scroll_pos_get(sd->main_frame, &sx, &sy);
    147 
    148     pr = ewk_view_repaints_get(sd->_priv, &count);
     146    ewk_frame_scroll_pos_get(smartData->main_frame, &sx, &sy);
     147
     148    pr = ewk_view_repaints_get(smartData->_priv, &count);
    149149    pr_end = pr + count;
    150150    for (; pr < pr_end; pr++) {
     
    154154        r.w = pr->w;
    155155        r.h = pr->h;
    156         ewk_tiled_backing_store_update(sd->backing_store, &r);
     156        ewk_tiled_backing_store_update(smartData->backing_store, &r);
    157157    }
    158     ewk_tiled_backing_store_updates_process(sd->backing_store);
    159 
    160     return EINA_TRUE;
    161 }
    162 
    163 static Eina_Bool _ewk_view_tiled_smart_contents_resize(Ewk_View_Smart_Data* sd, int w, int h)
    164 {
    165     ewk_tiled_backing_store_contents_resize(sd->backing_store, w, h);
    166     return EINA_TRUE;
    167 }
    168 
    169 static Eina_Bool _ewk_view_tiled_smart_zoom_set(Ewk_View_Smart_Data* sd, float zoom, Evas_Coord cx, Evas_Coord cy)
     158    ewk_tiled_backing_store_updates_process(smartData->backing_store);
     159
     160    return EINA_TRUE;
     161}
     162
     163static Eina_Bool _ewk_view_tiled_smart_contents_resize(Ewk_View_Smart_Data* smartData, int width, int height)
     164{
     165    ewk_tiled_backing_store_contents_resize(smartData->backing_store, width, height);
     166    return EINA_TRUE;
     167}
     168
     169static Eina_Bool _ewk_view_tiled_smart_zoom_set(Ewk_View_Smart_Data* smartData, float zoom, Evas_Coord centerX, Evas_Coord centerY)
    170170{
    171171    Evas_Coord x, y, w, h;
    172172    Eina_Bool r;
    173     r = ewk_tiled_backing_store_zoom_set(sd->backing_store,
    174                                          &zoom, cx, cy, &x, &y);
     173    r = ewk_tiled_backing_store_zoom_set(smartData->backing_store,
     174                                         &zoom, centerX, centerY, &x, &y);
    175175    if (!r)
    176176        return r;
    177     ewk_tiled_backing_store_disabled_update_set(sd->backing_store, EINA_TRUE);
    178     r = _parent_sc.zoom_set(sd, zoom, cx, cy);
    179     ewk_frame_scroll_set(sd->main_frame, -x, -y);
    180     ewk_frame_scroll_size_get(sd->main_frame, &w, &h);
    181     ewk_tiled_backing_store_fix_offsets(sd->backing_store, w, h);
    182     ewk_view_scrolls_process(sd);
    183     evas_object_smart_calculate(sd->backing_store);
    184     evas_object_smart_calculate(sd->self);
    185     ewk_tiled_backing_store_disabled_update_set(sd->backing_store, EINA_FALSE);
     177    ewk_tiled_backing_store_disabled_update_set(smartData->backing_store, EINA_TRUE);
     178    r = _parent_sc.zoom_set(smartData, zoom, centerX, centerY);
     179    ewk_frame_scroll_set(smartData->main_frame, -x, -y);
     180    ewk_frame_scroll_size_get(smartData->main_frame, &w, &h);
     181    ewk_tiled_backing_store_fix_offsets(smartData->backing_store, w, h);
     182    ewk_view_scrolls_process(smartData);
     183    evas_object_smart_calculate(smartData->backing_store);
     184    evas_object_smart_calculate(smartData->self);
     185    ewk_tiled_backing_store_disabled_update_set(smartData->backing_store, EINA_FALSE);
    186186    return r;
    187187}
    188188
    189 static Eina_Bool _ewk_view_tiled_smart_zoom_weak_set(Ewk_View_Smart_Data* sd, float zoom, Evas_Coord cx, Evas_Coord cy)
    190 {
    191     return ewk_tiled_backing_store_zoom_weak_set(sd->backing_store, zoom, cx, cy);
    192 }
    193 
    194 static void _ewk_view_tiled_smart_zoom_weak_smooth_scale_set(Ewk_View_Smart_Data* sd, Eina_Bool smooth_scale)
    195 {
    196     ewk_tiled_backing_store_zoom_weak_smooth_scale_set(sd->backing_store, smooth_scale);
    197 }
    198 
    199 static void _ewk_view_tiled_smart_flush(Ewk_View_Smart_Data* sd)
    200 {
    201     ewk_tiled_backing_store_flush(sd->backing_store);
    202     _parent_sc.flush(sd);
    203 }
    204 
    205 static Eina_Bool _ewk_view_tiled_smart_pre_render_region(Ewk_View_Smart_Data* sd, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, float zoom)
     189static Eina_Bool _ewk_view_tiled_smart_zoom_weak_set(Ewk_View_Smart_Data* smartData, float zoom, Evas_Coord centerX, Evas_Coord centerY)
     190{
     191    return ewk_tiled_backing_store_zoom_weak_set(smartData->backing_store, zoom, centerX, centerY);
     192}
     193
     194static void _ewk_view_tiled_smart_zoom_weak_smooth_scale_set(Ewk_View_Smart_Data* smartData, Eina_Bool smoothScale)
     195{
     196    ewk_tiled_backing_store_zoom_weak_smooth_scale_set(smartData->backing_store, smoothScale);
     197}
     198
     199static void _ewk_view_tiled_smart_flush(Ewk_View_Smart_Data* smartData)
     200{
     201    ewk_tiled_backing_store_flush(smartData->backing_store);
     202    _parent_sc.flush(smartData);
     203}
     204
     205static Eina_Bool _ewk_view_tiled_smart_pre_render_region(Ewk_View_Smart_Data* smartData, Evas_Coord x, Evas_Coord y, Evas_Coord width, Evas_Coord height, float zoom)
    206206{
    207207    return ewk_tiled_backing_store_pre_render_region
    208                (sd->backing_store, x, y, w, h, zoom);
    209 }
    210 
    211 static Eina_Bool _ewk_view_tiled_smart_pre_render_relative_radius(Ewk_View_Smart_Data* sd, unsigned int n, float zoom)
     208               (smartData->backing_store, x, y, width, height, zoom);
     209}
     210
     211static Eina_Bool _ewk_view_tiled_smart_pre_render_relative_radius(Ewk_View_Smart_Data* smartData, unsigned int n, float zoom)
    212212{
    213213    return ewk_tiled_backing_store_pre_render_relative_radius
    214                (sd->backing_store, n, zoom);
    215 }
    216 
    217 static void _ewk_view_tiled_smart_pre_render_cancel(Ewk_View_Smart_Data* sd)
    218 {
    219     ewk_tiled_backing_store_pre_render_cancel(sd->backing_store);
    220 }
    221 
    222 static Eina_Bool _ewk_view_tiled_smart_disable_render(Ewk_View_Smart_Data* sd)
    223 {
    224     return ewk_tiled_backing_store_disable_render(sd->backing_store);
    225 }
    226 
    227 static Eina_Bool _ewk_view_tiled_smart_enable_render(Ewk_View_Smart_Data* sd)
    228 {
    229     return ewk_tiled_backing_store_enable_render(sd->backing_store);
     214               (smartData->backing_store, n, zoom);
     215}
     216
     217static void _ewk_view_tiled_smart_pre_render_cancel(Ewk_View_Smart_Data* smartData)
     218{
     219    ewk_tiled_backing_store_pre_render_cancel(smartData->backing_store);
     220}
     221
     222static Eina_Bool _ewk_view_tiled_smart_disable_render(Ewk_View_Smart_Data* smartData)
     223{
     224    return ewk_tiled_backing_store_disable_render(smartData->backing_store);
     225}
     226
     227static Eina_Bool _ewk_view_tiled_smart_enable_render(Ewk_View_Smart_Data* smartData)
     228{
     229    return ewk_tiled_backing_store_enable_render(smartData->backing_store);
    230230}
    231231
     
    269269}
    270270
    271 Evas_Object* ewk_view_tiled_add(Evas* e)
    272 {
    273     return evas_object_smart_add(e, _ewk_view_tiled_smart_class_new());
    274 }
    275 
    276 Ewk_Tile_Unused_Cache* ewk_view_tiled_unused_cache_get(const Evas_Object* o)
    277 {
    278     Ewk_View_Smart_Data* sd = ewk_view_smart_data_get(o);
     271Evas_Object* ewk_view_tiled_add(Evas* canvas)
     272{
     273    return evas_object_smart_add(canvas, _ewk_view_tiled_smart_class_new());
     274}
     275
     276Ewk_Tile_Unused_Cache* ewk_view_tiled_unused_cache_get(const Evas_Object* ewkTile)
     277{
     278    Ewk_View_Smart_Data* sd = ewk_view_smart_data_get(ewkTile);
    279279    EINA_SAFETY_ON_NULL_RETURN_VAL(sd, 0);
    280280    return ewk_tiled_backing_store_tile_unused_cache_get(sd->backing_store);
    281281}
    282282
    283 void ewk_view_tiled_unused_cache_set(Evas_Object* o, Ewk_Tile_Unused_Cache* cache)
    284 {
    285     Ewk_View_Smart_Data* sd = ewk_view_smart_data_get(o);
     283void ewk_view_tiled_unused_cache_set(Evas_Object* ewkTile, Ewk_Tile_Unused_Cache* cache)
     284{
     285    Ewk_View_Smart_Data* sd = ewk_view_smart_data_get(ewkTile);
    286286    EINA_SAFETY_ON_NULL_RETURN(sd);
    287287    ewk_tiled_backing_store_tile_unused_cache_set(sd->backing_store, cache);
  • trunk/Source/WebKit/efl/ewk/ewk_window_features.cpp

    r95901 r97329  
    3636};
    3737
    38 void ewk_window_features_unref(Ewk_Window_Features* window_features)
     38void ewk_window_features_unref(Ewk_Window_Features* windowFeatures)
    3939{
    40     EINA_SAFETY_ON_NULL_RETURN(window_features);
    41     EINA_SAFETY_ON_FALSE_RETURN(window_features->__ref > 0);
     40    EINA_SAFETY_ON_NULL_RETURN(windowFeatures);
     41    EINA_SAFETY_ON_FALSE_RETURN(windowFeatures->__ref > 0);
    4242
    43     if (--window_features->__ref)
     43    if (--windowFeatures->__ref)
    4444        return;
    4545
    46     delete window_features->core;
    47     window_features->core = 0;
    48     free(window_features);
     46    delete windowFeatures->core;
     47    windowFeatures->core = 0;
     48    free(windowFeatures);
    4949}
    5050
    51 void ewk_window_features_ref(Ewk_Window_Features* window_features)
     51void ewk_window_features_ref(Ewk_Window_Features* windowFeatures)
    5252{
    53     EINA_SAFETY_ON_NULL_RETURN(window_features);
    54     window_features->__ref++;
     53    EINA_SAFETY_ON_NULL_RETURN(windowFeatures);
     54    windowFeatures->__ref++;
    5555}
    5656
    57 void ewk_window_features_bool_property_get(const Ewk_Window_Features* window_features, Eina_Bool* toolbar_visible, Eina_Bool* statusbar_visible, Eina_Bool* scrollbars_visible, Eina_Bool* menubar_visible, Eina_Bool* locationbar_visible, Eina_Bool* fullscreen)
     57void ewk_window_features_bool_property_get(const Ewk_Window_Features* windowFeatures, Eina_Bool* toolbarVisible, Eina_Bool* statusbarVisible, Eina_Bool* scrollbarsVisible, Eina_Bool* menubarVisible, Eina_Bool* locationbarVisible, Eina_Bool* fullScreen)
    5858{
    59     EINA_SAFETY_ON_NULL_RETURN(window_features);
    60     EINA_SAFETY_ON_NULL_RETURN(window_features->core);
     59    EINA_SAFETY_ON_NULL_RETURN(windowFeatures);
     60    EINA_SAFETY_ON_NULL_RETURN(windowFeatures->core);
    6161
    62     if (toolbar_visible)
    63         *toolbar_visible = window_features->core->toolBarVisible;
     62    if (toolbarVisible)
     63        *toolbarVisible = windowFeatures->core->toolBarVisible;
    6464
    65     if (statusbar_visible)
    66         *statusbar_visible = window_features->core->statusBarVisible;
     65    if (statusbarVisible)
     66        *statusbarVisible = windowFeatures->core->statusBarVisible;
    6767
    68     if (scrollbars_visible)
    69         *scrollbars_visible = window_features->core->scrollbarsVisible;
     68    if (scrollbarsVisible)
     69        *scrollbarsVisible = windowFeatures->core->scrollbarsVisible;
    7070
    71     if (menubar_visible)
    72         *menubar_visible = window_features->core->menuBarVisible;
     71    if (menubarVisible)
     72        *menubarVisible = windowFeatures->core->menuBarVisible;
    7373
    74     if (locationbar_visible)
    75         *locationbar_visible = window_features->core->locationBarVisible;
     74    if (locationbarVisible)
     75        *locationbarVisible = windowFeatures->core->locationBarVisible;
    7676
    77     if (fullscreen)
    78         *fullscreen = window_features->core->fullscreen;
     77    if (fullScreen)
     78        *fullScreen = windowFeatures->core->fullscreen;
    7979}
    8080
    81 void ewk_window_features_int_property_get(const Ewk_Window_Features* window_features, int* x, int* y, int* w, int* h)
     81void ewk_window_features_int_property_get(const Ewk_Window_Features* windowFeatures, int* x, int* y, int* width, int* height)
    8282{
    83     EINA_SAFETY_ON_NULL_RETURN(window_features);
    84     EINA_SAFETY_ON_NULL_RETURN(window_features->core);
     83    EINA_SAFETY_ON_NULL_RETURN(windowFeatures);
     84    EINA_SAFETY_ON_NULL_RETURN(windowFeatures->core);
    8585
    8686    if (x)
    87         *x = window_features->core->xSet ? static_cast<int>(window_features->core->x) : -1;
     87        *x = windowFeatures->core->xSet ? static_cast<int>(windowFeatures->core->x) : -1;
    8888
    8989    if (y)
    90         *y = window_features->core->ySet ? static_cast<int>(window_features->core->y) : -1;
     90        *y = windowFeatures->core->ySet ? static_cast<int>(windowFeatures->core->y) : -1;
    9191
    92     if (w)
    93         *w = window_features->core->widthSet ? static_cast<int>(window_features->core->width) : -1;
     92    if (width)
     93        *width = windowFeatures->core->widthSet ? static_cast<int>(windowFeatures->core->width) : -1;
    9494
    95     if (h)
    96         *h = window_features->core->heightSet ? static_cast<int>(window_features->core->height) : -1;
     95    if (height)
     96        *height = windowFeatures->core->heightSet ? static_cast<int>(windowFeatures->core->height) : -1;
    9797}
    9898
Note: See TracChangeset for help on using the changeset viewer.