[SAMPLE APP][APP-COMMON] Type definitions section added
authorMichal Pawluk <m.pawluk@samsung.com>
Mon, 10 Aug 2015 10:17:59 +0000 (12:17 +0200)
committerMichal Pawluk <m.pawluk@samsung.com>
Fri, 21 Aug 2015 08:07:35 +0000 (10:07 +0200)
Change-Id: Ieaccf926c75bd40bbe8def7352960152120d4995
Signed-off-by: Michal Pawluk <m.pawluk@samsung.com>
org.tizen.sampledescriptions/html/mobile_n/appcommon_sd_mn.htm

index 26da8af..ae5d4ac 100644 (file)
 
 <h2>Implementation</h2>
 
+<h3>Type definitions</h3>
+
+<pre class="prettyprint">
+struct __appdata {
+&nbsp;&nbsp;&nbsp;viewdata_s view;&nbsp;&nbsp;&nbsp;/* View related data. */
+&nbsp;&nbsp;&nbsp;modeldata_s model;&nbsp;/* Model related data. */
+};
+</pre>
+
+<pre class="prettyprint">
+/* All the Evas_Object objects represent UI widgets. */
+struct __viewdata {
+&nbsp;&nbsp;&nbsp;Evas_Object *win;
+&nbsp;&nbsp;&nbsp;Evas_Object *conform;
+&nbsp;&nbsp;&nbsp;Evas_Object *layout_main_panel;
+&nbsp;&nbsp;&nbsp;Evas_Object *main_toolbar;
+&nbsp;&nbsp;&nbsp;Evas_Object *main_toolbar_item_app;
+&nbsp;&nbsp;&nbsp;Evas_Object *main_toolbar_item_events;
+&nbsp;&nbsp;&nbsp;Evas_Object *main_toolbar_item_paths;
+&nbsp;&nbsp;&nbsp;Evas_Object *layout_app;
+&nbsp;&nbsp;&nbsp;Evas_Object *layout_events;
+&nbsp;&nbsp;&nbsp;Evas_Object *layout_paths;
+&nbsp;&nbsp;&nbsp;Evas_Object *paths_list;
+&nbsp;&nbsp;&nbsp;Evas_Object *popup_paths;
+&nbsp;&nbsp;&nbsp;Evas_Object *popup_files_list;
+&nbsp;&nbsp;&nbsp;/* Callback function called when popup window is opened from "Paths" tab of the main application's view. */
+&nbsp;&nbsp;&nbsp;paths_popup_opened_cb popup_opened_cb;
+};
+</pre>
+
+<pre class="prettyprint">
+typedef void(*paths_popup_opened_cb)(const char *path);
+</pre>
+
+<pre class="prettyprint">
+/* Handlers for common application events:
+&nbsp;*&nbsp;&nbsp;&nbsp;APP_EVENT_LOW_BATTERY,
+&nbsp;*&nbsp;&nbsp;&nbsp;APP_EVENT_LOW_MEMORY,
+&nbsp;*&nbsp;&nbsp;&nbsp;APP_EVENT_DEVICE_ORIENTATION_CHANGED,
+&nbsp;*&nbsp;&nbsp;&nbsp;APP_EVENT_LANGUAGE_CHANGED,
+&nbsp;*&nbsp;&nbsp;&nbsp;APP_EVENT_REGION_FORMAT_CHANGED,
+&nbsp;*&nbsp;&nbsp;&nbsp;APP_EVENT_SUSPENDED_STATE_CHANGED.
+&nbsp;*/
+struct __modeldata {
+&nbsp;&nbsp;&nbsp;app_event_handler_h handlers[5];
+}
+</pre>
+
+<pre class="prettyprint">
+/* Data structure used to populate the elm_genlist widget in "Paths" tab with relevant data. */
+struct __path_list_item {
+&nbsp;&nbsp;&nbsp;char *top_label;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Name of the file resources pointed by the path. */
+&nbsp;&nbsp;&nbsp;char *bottom_label;&nbsp;&nbsp;/* Path to the file resources. */
+&nbsp;&nbsp;&nbsp;path_item_type type;&nbsp;/* Type of the file resources. */
+};
+</pre>
+
+<pre class="prettyprint">
+typedef enum {
+&nbsp;&nbsp;&nbsp;PIT_DATA,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Data directory containing private data of the application. */
+&nbsp;&nbsp;&nbsp;PIT_CACHE,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Cache directory containing temporary data of the application. */
+&nbsp;&nbsp;&nbsp;PIT_RESOURCE,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Resource directory. */
+&nbsp;&nbsp;&nbsp;PIT_SHARED_DATA,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Shared data directory which is used to share data with other applications. */
+&nbsp;&nbsp;&nbsp;PIT_SHARED_RESOURCE,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Shared resource directory which is used to share resources with other applications. */
+&nbsp;&nbsp;&nbsp;PIT_SHARED_TRUSTED,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Shared trusted directory which is used to share data with a family of trusted applications. */
+&nbsp;&nbsp;&nbsp;PIT_EXTERNAL_DATA,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* External data directory containing data of the application. */
+&nbsp;&nbsp;&nbsp;PIT_EXTERNAL_CACHE,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* External cache directory containing temporary data of the application. */
+&nbsp;&nbsp;&nbsp;PIT_EXTERNAL_SHARED_DATA,&nbsp;/* External shared data directory which is used to share the data with other applications. */
+&nbsp;&nbsp;&nbsp;PIT_TEP_RESOURCE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Tizen Expansion Package directory. */
+} path_item_type;
+</pre>
+
+
 
 <script type="text/javascript" src="../scripts/jquery.zclip.min.js"></script>
 <script type="text/javascript" src="../scripts/showhide.js"></script>
@@ -122,4 +195,4 @@ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga
 </script>
 
 </body>
-</html>
\ No newline at end of file
+</html>