<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Th30z - Coding on the Fly &#187; WebKit</title>
	<atom:link href="http://th30z.netsons.org/tag/webkit/feed/" rel="self" type="application/rss+xml" />
	<link>http://th30z.netsons.org</link>
	<description>Matteo Bertozzi, Objective-C, Cocoa, C, C++, Qt4, iPhone, Mac OS X, Open Moko, Matteo Bertozzi Development</description>
	<lastBuildDate>Sun, 22 Nov 2009 09:47:19 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Qt4 Google MapView</title>
		<link>http://th30z.netsons.org/2009/07/qt4-google-mapview/</link>
		<comments>http://th30z.netsons.org/2009/07/qt4-google-mapview/#comments</comments>
		<pubDate>Sun, 12 Jul 2009 09:07:07 +0000</pubDate>
		<dc:creator>Matteo Bertozzi</dc:creator>
				<category><![CDATA[Qt4]]></category>
		<category><![CDATA[Google Maps]]></category>
		<category><![CDATA[WebKit]]></category>

		<guid isPermaLink="false">http://th30z.netsons.org/?p=988</guid>
		<description><![CDATA[I&#8217;ve received a couple of requests about Google Maps and Qt4. Today I&#8217;ve written a simple Widget that allows you to interact with Google Maps and Google Geocoder. You can set Map Type (Roadmap, Satellite, Terrain and Hybrid), you can set your center Coordinate, add Markers, add Info Windows get the User Click Coordinates and [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve received a couple of requests about Google Maps and Qt4. Today I&#8217;ve written a simple Widget that allows you to interact with Google Maps and Google Geocoder. You can set Map Type (Roadmap, Satellite, Terrain and Hybrid), you can set your center Coordinate, add Markers, add Info Windows get the User Click Coordinates and other things that Google Maps allows to do.</p>
<p><a href="http://th30z.netsons.org/wp-content/uploads/Qt4GKMapView.png"><img class="aligncenter size-full wp-image-991" title="Qt4 Google MapView" src="http://th30z.netsons.org/wp-content/uploads/Qt4GKMapView.png" alt="Qt4 Google MapView" width="575" height="400" /></a></p>
<p>With few lines of code, you can interact with Google Maps, and below you can see how to do it. (<em>Other methods and overloads are available, check the GKMapView.h in the Source Code packet, link is at the end of the post</em>).<br />
<code></p>
<pre>
GKMapView mapView;

// Change the Default MapType (Roadmap, Satellite, Terrain, Hybrid)
mapView.setMapType(GKMapTypeSatellite);

// Use Geocoder to Get Location from Address or Viceversa.
// See the Signals locationFound, locationNotFound() and
// addressFound(), addressNotFound() to get your results.
mapView.locationFromAddress(&quot;San Mateo&quot;);
mapView.addressFromLocation(32.718834, -117.164);

// Add Marker With Info Window at Specified Address (or Location)
mapView.addMarkerWithWindow(&quot;Bedford MA Marker&quot;,
                            &quot;&lt;b&gt;Bedford MA&lt;/b&gt; Marker&quot;,
                            &quot;Bedford MA&quot;);

// Add Info Window without Marker using Address or Coordinates
mapView.addInfoWindow(&quot;Hello from &lt;b&gt;San Mateo&lt;/b&gt;&quot;, &quot;San Mateo&quot;);
mapView.addInfoWindow(&quot;Hello from &lt;b&gt;San Diego&lt;/b&gt;&quot;, 32.718834, -117.164);

// Change your Current Location
mapView.setLocation(&quot;Phoenix AZ&quot;);
</pre>
<p></code></p>
<p>The Source Code is available Here with a small example: <a href="http://th30z.netsons.org/wp-content/uploads/Qt4GoogleMapView.zip">Qt4 Google Map View Source Code</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://th30z.netsons.org/2009/07/qt4-google-mapview/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Qt4 Geo IP Location</title>
		<link>http://th30z.netsons.org/2009/06/qt4-geo-ip-location/</link>
		<comments>http://th30z.netsons.org/2009/06/qt4-geo-ip-location/#comments</comments>
		<pubDate>Fri, 12 Jun 2009 05:52:57 +0000</pubDate>
		<dc:creator>Matteo Bertozzi</dc:creator>
				<category><![CDATA[Qt4]]></category>
		<category><![CDATA[GeoLocation]]></category>
		<category><![CDATA[WebKit]]></category>

		<guid isPermaLink="false">http://th30z.netsons.org/?p=921</guid>
		<description><![CDATA[In a time of Google Maps, Geo Location and other services like this&#8230; Here an example of Geo IP Location Service (http://www.hostip.info/) is really far from perfect, but it&#8217;s just an example.

The sample uses QNetworkAccessManager to get the Geo Location of the IP, and Webkit to display the address on the Google Map.
The Source Code [...]]]></description>
			<content:encoded><![CDATA[<p>In a time of Google Maps, Geo Location and other services like this&#8230; Here an example of Geo IP Location Service (<a title="Host IP Info" href="http://www.hostip.info/">http://www.hostip.info/</a>) is really far from perfect, but it&#8217;s just an example.</p>
<p><a href="http://th30z.netsons.org/wp-content/uploads/qtgeoiplocation.png"><img class="aligncenter size-full wp-image-923" title="Qt Geo IP Location" src="http://th30z.netsons.org/wp-content/uploads/qtgeoiplocation.png" alt="Qt Geo IP Location" width="509" height="431" /></a></p>
<p><em>The sample uses QNetworkAccessManager to get the Geo Location of the IP, and Webkit to display the address on the Google Map.</em></p>
<p>The Source Code is available Here: <a title="Qt Geo IP Location Source Code" href="http://th30z.netsons.org/wp-content/uploads/qtgeoiplocation.zip">Qt4 Geo IP Location Source Code</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://th30z.netsons.org/2009/06/qt4-geo-ip-location/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Qt WebKit: Virtual Keyboard</title>
		<link>http://th30z.netsons.org/2009/03/qt-webkit-virtual-keyboard/</link>
		<comments>http://th30z.netsons.org/2009/03/qt-webkit-virtual-keyboard/#comments</comments>
		<pubDate>Mon, 16 Mar 2009 19:03:49 +0000</pubDate>
		<dc:creator>Matteo Bertozzi</dc:creator>
				<category><![CDATA[Qt4]]></category>
		<category><![CDATA[WebKit]]></category>

		<guid isPermaLink="false">http://th30z.netsons.org/?p=612</guid>
		<description><![CDATA[The Development of &#8220;Moko Touch&#8221; (My iPhone Clone for OpenMoko) goes on, And I&#8217;m writing a Mobile WebKit Browser. But The Phone need a Virtual Keyboard, and I Need to handle the WebKit forms. Internal WebKit/VirtualKeyboard of QtExtended doesn&#8217;t handle password forms&#8230; So, here an example of How to Add a Virtual Keyboard to your [...]]]></description>
			<content:encoded><![CDATA[<p>The Development of &#8220;Moko Touch&#8221; (My iPhone Clone for OpenMoko) goes on, And I&#8217;m writing a Mobile WebKit Browser. But The Phone need a Virtual Keyboard, and I Need to handle the WebKit forms. <em>Internal WebKit/VirtualKeyboard of QtExtended doesn&#8217;t handle password forms&#8230;</em> So, here an example of How to Add a Virtual Keyboard to your QWebView.</p>
<p><a href="http://th30z.netsons.org/wp-content/uploads/qwebkit-vkeyboard.png"><img class="aligncenter size-medium wp-image-610" title="QWebKit Virtual Keyboard" src="http://th30z.netsons.org/wp-content/uploads/qwebkit-vkeyboard-350x266.png" alt="QWebKit Virtual Keyboard" width="350" height="266" /></a></p>
<p>Usage is easy, load your web page click on a Editable form and the keyboard will magically appear, click out of a form and keyboard will magically disappear <img src='http://th30z.netsons.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>The code use a lot of JavaScript to handle the form click and focused out, and I don&#8217;t like it! So, If you&#8217;ve suggestions on how to implement it differently, post a comment or send me a mail! Thanks.</p>
<p>The Source Code is Available here: <a title="QtWebKit Virtual Keyboard Source Code" href="http://th30z.netsons.org/wp-content/uploads/qwebkitkeyboard.zip">QtWebKit Virtual Keyboard Source Code</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://th30z.netsons.org/2009/03/qt-webkit-virtual-keyboard/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WebKit: Google Maps</title>
		<link>http://th30z.netsons.org/2009/02/webkit-google-maps/</link>
		<comments>http://th30z.netsons.org/2009/02/webkit-google-maps/#comments</comments>
		<pubDate>Sun, 01 Feb 2009 17:12:51 +0000</pubDate>
		<dc:creator>Matteo Bertozzi</dc:creator>
				<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Google Maps]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[WebKit]]></category>

		<guid isPermaLink="false">http://th30z.netsons.org/?p=512</guid>
		<description><![CDATA[Following the Google StreetView post, another example on How Cocoa Application can Interact with Google. Today the WebKit shows Google Maps.

Like iPhoto &#8216;09 you can select you Map Type (Terrain, Satellite, Hybrid) and you can Zoom In or Zoom Out using controls of your Application.

You can Find the Source Code Here: Cocoa Google Maps.
]]></description>
			<content:encoded><![CDATA[<p>Following the <a href="http://th30z.netsons.org/2009/01/webkit-google-streetview/">Google StreetView</a> post, another example on How Cocoa Application can Interact with Google. Today the WebKit shows Google Maps.<br />
<a href="http://th30z.netsons.org/wp-content/uploads/cocoa-googlemaps-alisoviejo.png"><img src="http://th30z.netsons.org/wp-content/uploads/cocoa-googlemaps-alisoviejo-350x265.png" alt="Cocoa Google Maps - Aliso Viejo" title="Cocoa Google Maps - Aliso Viejo" width="350" height="265" class="aligncenter size-medium wp-image-513" /></a><br />
Like iPhoto &#8216;09 you can select you Map Type (Terrain, Satellite, Hybrid) and you can Zoom In or Zoom Out using controls of your Application.<br />
<a href="http://th30z.netsons.org/wp-content/uploads/cocoa-googlemaps-redwood.png"><img src="http://th30z.netsons.org/wp-content/uploads/cocoa-googlemaps-redwood-350x276.png" alt="Cocoa Google Maps - Red Wood" title="Cocoa Google Maps - Red Wood" width="350" height="276" class="aligncenter size-medium wp-image-514" /></a><br />
You can Find the Source Code Here: <a href='http://th30z.netsons.org/wp-content/uploads/cocoa-googlemaps.zip'>Cocoa Google Maps</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://th30z.netsons.org/2009/02/webkit-google-maps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WebKit: Google StreetView</title>
		<link>http://th30z.netsons.org/2009/01/webkit-google-streetview/</link>
		<comments>http://th30z.netsons.org/2009/01/webkit-google-streetview/#comments</comments>
		<pubDate>Sat, 17 Jan 2009 08:56:38 +0000</pubDate>
		<dc:creator>Matteo Bertozzi</dc:creator>
				<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[StreetView]]></category>
		<category><![CDATA[WebKit]]></category>

		<guid isPermaLink="false">http://th30z.netsons.org/?p=469</guid>
		<description><![CDATA[Last iPhoto &#8216;09 presented at MacWorld contains a couple of interesting Features: Faces and Places. Today, I&#8217;ve a little bit of free time to play with my Mac, and the topic is How to embed Google StreetView into a Cocoa Application.

The Solution is using WebKit and Google Maps API. We&#8217;ve a simple HTML file that [...]]]></description>
			<content:encoded><![CDATA[<p>Last <a href="http://www.apple.com/ilife/iphoto/">iPhoto</a> &#8216;09 presented at MacWorld contains a couple of interesting Features: Faces and Places. Today, I&#8217;ve a little bit of free time to play with my Mac, and the topic is How to embed <a href="http://maps.google.com/help/maps/streetview/">Google StreetView</a> into a Cocoa Application.<br />
<a href="http://th30z.netsons.org/wp-content/uploads/cocoa-streetview-cuppertino.png"><img class="aligncenter size-medium wp-image-466" title="Cocoa Streetview Cuppertino" src="http://th30z.netsons.org/wp-content/uploads/cocoa-streetview-cuppertino-350x276.png" alt="Cocoa Streetview Cuppertino" width="350" height="276" /></a><br />
The Solution is using WebKit and <a href="http://code.google.com/apis/maps/">Google Maps API</a>. We&#8217;ve a simple HTML file that contains StreetView &#8220;Canvas&#8221; and a couple of javascript methods that interact with GStreetviewPanorama Object.<br />
<a href="http://th30z.netsons.org/wp-content/uploads/cocoa-streetview-sanfrancisco.png"><img class="aligncenter size-medium wp-image-467" title="Cocoa Streetview San Francisco" src="http://th30z.netsons.org/wp-content/uploads/cocoa-streetview-sanfrancisco-350x276.png" alt="Cocoa Streetview San Francisco" width="350" height="276" /></a><br />
The Source Code is Available Here: <a href='http://th30z.netsons.org/wp-content/uploads/googlestreetview.zip'>Cocoa StreetView Source</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://th30z.netsons.org/2009/01/webkit-google-streetview/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>WebKit: Dynamic Content</title>
		<link>http://th30z.netsons.org/2008/12/webkit-dynamic-content/</link>
		<comments>http://th30z.netsons.org/2008/12/webkit-dynamic-content/#comments</comments>
		<pubDate>Sat, 06 Dec 2008 10:42:57 +0000</pubDate>
		<dc:creator>Matteo Bertozzi</dc:creator>
				<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[WebKit]]></category>

		<guid isPermaLink="false">http://th30z.netsons.org/?p=427</guid>
		<description><![CDATA[Today I&#8217;ve played a bit with WebKit. I Want do something like Cocoa VBox View and NSScrollView but with more flexibility. Below you can see the example result.

The interesting part of this example is How to manage WebKit content,  and how to add something dynamically.
I use webView:decidePolicyForNavigationAction:request:frame:decisionListener: of WebPolicyDelegate Protocol to handle my custom [...]]]></description>
			<content:encoded><![CDATA[<p>Today I&#8217;ve played a bit with <strong>WebKit</strong>. I Want do something like <a href="http://th30z.netsons.org/2008/11/cocoa-vbox-view-and-nsscrollview/">Cocoa VBox View and NSScrollView</a> but with more flexibility. Below you can see the example result.</p>
<p><a href="http://th30z.netsons.org/wp-content/uploads/webkitdynamiccontent.png"  title="WebKit Dynamic Content"><img src="http://th30z.netsons.org/wp-content/uploads/webkitdynamiccontent.png" alt="WebKit Dynamic Content" title="WebKit Dynamic Content" width="597" height="394" class="aligncenter size-full wp-image-424" /></a></p>
<p>The interesting part of this example is How to manage WebKit content,  and how to add something dynamically.</p>
<p>I use <em>webView:decidePolicyForNavigationAction:request:frame:decisionListener:</em> of <strong>WebPolicyDelegate Protocol</strong> to handle my custom requests, in this way&#8230;</p>
<pre>
- (void)webView:(WebView *)sender
    decidePolicyForNavigationAction:(NSDictionary *)actionInformation
   request:(NSURLRequest *)request frame:(WebFrame *)frame
   decisionListener:(id)listener
{
    if ([[[request URL] path] isEqualToString:@"PATH to Handle"]) {
        [listener ignore];
        // Handle Request
    } else {
         [listener use];
    }
}
</pre>
<p>&#8230;Then with a little bit of JavaScript I&#8217;ll set my dynamic content loaded from Database or somewhere else.</p>
<pre>
NSArray *args = [NSArray arrayWithObjects:@"Item1Content",
                                  @"Hi, I'm Test 1 Content", nil];
[[webKit windowScriptObject] callWebScriptMethod:@"fillElement"
                               withArguments:args];
</pre>
<p>The <strong>fillElement</strong> method is a simple JS function like this <em>document.getElementById(elem).innerHTML = data;</em></p>
<p>Here you can find the <a href="http://th30z.netsons.org/wp-content/uploads/testwebkit.zip">Source Code</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://th30z.netsons.org/2008/12/webkit-dynamic-content/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
