Minor grammar changes
authorkrzsas <krzsas@gmail.com>
Tue, 3 Apr 2007 07:09:37 +0000 (07:09 +0000)
committerkrzsas <krzsas@gmail.com>
Tue, 3 Apr 2007 07:09:37 +0000 (07:09 +0000)
git-svn-id: file:///svnroot/mdictionary/www@120 5bde0345-f819-0410-ac75-e5045f9217cc

devhowto.html

index 329f935..548a817 100644 (file)
@@ -41,7 +41,7 @@
                                        
                                        <td class="content">
 <div class="faq_title">Developer's HOWTO: making Your own GUI for mDictionary</div>                                    
-<p><b>mDictionary</b> is intended to be as modifiable as possible. So apart from developing Your own dictionary engines, You can also create alternative user interface, should You find ours inattractive. For the intrepid ones, we have described how to do that.</p>
+<p><b>mDictionary</b> is intended to be as modifiable as possible. So apart from developing Your own dictionary engines, You can also create alternative user interface, should You find ours inattractive. For the intrepid ones, I have described how to do that. In this howto, I am going to explain how to communicate GUI with the engines's manager</p>
 
 <p>The only header file You need to include in Your GUI is <func>ws_dbus.h</func>. It contains all the functions necessary to communicate with the engines manager. The header file is available from our svn repository at <a href="https://garage.maemo.org">https://garage.maemo.org</a>.</p>
 <p>Firstly, You initialize our dbus wrapper library with <func>ws_dbus_create</func> function. You have to specify the name and the version of Your app and store the function's return value as it is necessary for further dbus wrapper communication.</p>
@@ -88,16 +88,23 @@ whenever the manager calls a remote method.
 <div class="code">void ws_gui_dbus_return_words (GError *error, GArray *words, gpointer user_data);</div>
 <p>
 <div class="faq_question">
-Accessing data in from a callback handling function:
+Accessing received data inside a callback handling function:
 </div>
 </p>
 In this case, words is a <func>GArray</func> of <func>osso_rpc_t</func> values. To access the contents of an osso_rpc_t variable, You first have to check its type by accessing the type field. The value field is an union of primitives. Depending on the type, You should read the value by accessing a proper field. Here is an example:
 
-<div class="code">osso_rpc_t data;
-if (data.type == DBUS_TYPE_STRING)
+<div class="code">int i;
+osso_rpc_t data;
+for (i = 0; i < words->len; ++i)
 {
+
        data = g_array_index (words, osso_rpc_t, 0);
-       tmp_word = g_strdup(data.value.s);
+       if (data.type == DBUS_TYPE_STRING)
+
+       {
+               char *tmp_word = g_strdup(data.value.s);
+       };
+
 };
 </div>
 <div class="faq_question">