[webkit-gtk] WebKit 2 search API proposal

Sergio Villar Senin svillar at igalia.com
Mon Dec 26 09:37:17 PST 2011


En 26/12/11 14:17, Carlos Garcia Campos escribiu:
> El lun, 26-12-2011 a las 13:40 +0100, Sergio Villar Senin escribió:
>> - WebKitWebFindClient webkit_web_view_get_find_client()
>> - void webkit_web_view_get_find_client(WebKitWebFindClient)
> 
> I guess this would be set_find_client.

Yep it's a typo

> I would avoid using FindClient this way, we are indeed removing
> LoaderClient object. I like the idea of using a separate object, but I
> would do something similar to the downloads API. 
> 
> WebKitSearch *webkit_web_view_search(view, string, flags);
> 
> WebKitSearch object would be your FindClient object, but it's created on
> demand for every search.

I think your proposal is better than mine indeed.

>> - webkit_web_find_client_search (string, flags)
>>  + signals
>>    + found-string(string, match_count)
>>    + find-error(string)
>>    + matches-count(string, match_count)
> 
> The string is stored in the WebKitSearch/FindClient object, so we
> shouldn't need to pass it on every signal, we could add API to get if
> needed from the callbacks.

Correct.

Thanks for your comments.


More information about the webkit-gtk mailing list