2 * Copyright 2012 Samsung Electronics Co., Ltd
4 * Licensed under the Flora License, Version 1.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.tizenopensource.org/license
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
24 * @defgroup SLP_PG_UI_GADGET UI gadget library
27 <h1 class="pg">Introduction</h1>
28 <h2 class="pg">Purpose of this document</h2>
29 The purpose of this document is to describe how to develop/use UI gadget. This document gives programming guidelines to UI gadget devlopers and users.
30 <h2 class="pg">Scope</h2>
31 The scope of this document is limited to UI gadget component interface and API usage.
33 <h1 class="pg">UI gadget architecture</h1>
34 <h2 class="pg">UI gadget</h2>
35 An UI gadget is a visual component providing views (or features) of other applications, e.g., phonebook, myfile. Because UI gadgets are supposed to deliver most commonly used features that the platform can natively support, developers can avoid unnecessary massive code writing using UI gadgets. Hence an UI gadget eventually includes logics to handle simple request. UI gadget is able to be managed by UI gadget library.
36 \image html SLP_UI_Gadget_PG_image00.png "Picture 1. UI gadget architecture diagram"
38 <h2 class="pg">UI gadget features</h2>
39 UI Gadget Library has the following features:
40 - It provides component interfaces for UI Gadget
41 - It manages UI gadget instances in an application according to their lifecycle
43 <h2 class="pg">Lifecycle</h2>
44 Essentially, an UI gadget has following five states (See Picture 2)
45 - The initial state is \b Ready
46 - If an UI gadget has been created, it is \b Created
47 - If an UI gadget has been started, it is \b Running
48 - If the application that is using an UI gadget is put into background, it is \b Stopped
49 - If an UI gadget has been destroyed, it is \b Destroyed
51 An UI gadget has five callback methods that you can implement to perform operations when the UI gadget moves between states
52 - When an UI gadget is created, \b create() is invoked
53 - When an UI gadget is started, \b start() is invoked
54 - When the application that is using an UI gadget is put into background, \b pause() is invoked
55 - When the application that is using an UI gadget is brought to the foreground, \b resume() is invoked.
56 - When an UI gadget is destroyed, \b destroy() is invoked
58 In addition, an UI gadget has callback methods for system events and message:
59 - When an system event is generated, event() is invoked
60 - When an UI gadget receives message from the caller, message() is invoked
62 \image html SLP_UI_Gadget_PG_image01.png "Picture 2. UI gadget state diagram"
64 <h2 class="pg">Management</h2>
65 UI gadgets in an application are managed as a TREE structure (See Picture 3.) The features for the tree are:
66 - Root of the tree is the UI gadget manager
67 - UI gadget caller is parent of callees
68 - Parents arrange the layout of their children
70 Every application which is using UI gadgets has one UI gadget manager as a root of the tree. And the UI gadget manager propagates system events and task management events by post-order traversal. Available system events are <i>low memory, low battery, language changed, and window rotate event</i>. And task management events are <i>pause and resume</i>.
72 \image html SLP_UI_Gadget_PG_image02.png "Picture 3. UI gadget management policy"
74 <h1 class="pg">Getting started</h1>
75 <h2 class="pg">How to make UI gadget</h2>
76 In this section, we are going to write your first UI gadget called "helloUG-efl". Before we get started, make sure you have read the overview, especially, lifecycle section. We will mainly deal with the operations of lifecycle.
78 \note <b>Sample codes</b> are included in the UI gadget source package. The samples for UI gadget developers are located in "/test/ug/", and the samples for UI gadget users are in "/test/app/." For instance, "helloUG-efl" codes are in "/test/ug/helloUG-efl/."
79 \note <b>Naming rule:</b> The name of UI gadget must be "{NAME}-{UI LIB NAME}", e.g., "helloUG-efl"
82 <h3 class="pg">UI gadget template</h3>
83 To create an UI gadget, start by generating boilerplate code using UI gadget template as follow:
85 # ug-gen.sh helloUG-efl helloUG-efl EFL
88 \note <b>How to install UI gadget template:</b>
90 # apt-get install ui-gadget-template
93 \note <b>How to use UI gadget template:</b>
95 # ug-gen.sh [destination] [name] [UI library]
97 - destination: destination directory
98 - name: UI gadget name
99 - UI library: UI library to use. Only EFL is available for now
101 After you generate code, you get following files:
102 - <i>helloUG-efl.c</i> (Source)
103 - <i>helloUG-efl.h</i> (Private header)
104 - <i>CMakeList.txt</i> (Build script)
105 - <i>po/*</i> (I18N files)
107 <i>helloUG-efl.c</i> contains base code, and the most important parts are <i>UG_MODULE_INIT</i> and <i>UG_MODULE_EXIT</i> which are symbols to export for dynamic linking. <i>UG_MODULE_INIT</i> is invoked when the UI gadget is loading, and it sets operations, private data, and the option. <i>UG_MODULE_EXIT</i> is invoked when the UI gadget is unloading, and it clears private data.<br><br>
108 Even if you don't understand generated code right now, don't worry about it. What you have to do is just implementation of operations according to their role (see next section.)
111 UG_MODULE_API int UG_MODULE_INIT(struct ug_module_ops *ops)
113 struct ug_data *ugd; // User defined private data
118 ugd = calloc(1, sizeof(struct ug_data));
123 ops->create = on_create;
125 ops->start = on_start;
127 ops->pause = on_pause;
129 ops->resume = on_resume;
131 ops->destroy = on_destroy;
133 ops-> message = on_message;
135 ops->event = on_event;
139 ops->opt = UG_OPT_INDICATOR_ENABLE;
144 UG_MODULE_API void UG_MODULE_EXIT(struct ug_module_ops *ops)
153 free(ugd); // clear private data
158 \note <b>struct ug_module_ops</b> is a data structure describing operations, private data, and the option of UI gadget:
160 struct ug_module_ops {
161 void *(*create)(struct ui_gadget *ug, enum ug_mode mode, bundle *data, void *priv);
162 void (*start)(struct ui_gadget *ug, bundle *data, void *priv);
163 void (*pause)(struct ui_gadget *ug, bundle *data, void *priv);
164 void (*resume)(struct ui_gadget *ug, bundle *data, void *priv);
165 void (*destroy)(struct ui_gadget *ug, bundle *data, void *priv);
166 void (*message)(struct ui_gadget *ug, bundle *msg, bundle *data, void *priv);
167 void (*event)(struct ui_gadget *ug, enum ug_event event, bundle *data, void *priv);
174 \note <b>enum ug_option</b> is UI gadget options, available options are:
177 UG_OPT_INDICATOR_ENABLE
178 // Enable indicator with portrait window
179 UG_OPT_INDICATOR_PORTRAIT_ONLY
180 // Enable indicator with landscape window
181 UG_OPT_INDICATOR_LANDSCAPE_ONLY
183 UG_OPT_INDICATOR_DISABLE
186 \note <b>struct ug_data</b> is a user defined private data structure describing base layout, own UI gadget handler, and whatever you need:
190 struct ui_gadget *ug;
192 // PUT WHATEVER YOU NEED
197 <h3 class="pg">Operations</h3>
198 There are five state operations, a message operation, and an event operation: <i>create, start, pause, resume, destroy, message, and event.</i>
200 When "helloUG-efl" is created, the create operation is invoked. The implementation of create operation is <b>on_create()</b>. Basically, in the operation, we have to make a base layout and return it. Hence, we made base layout using <i>"window layout winset."</i> In case of fullview, we let indicator area be shown, otherwise, we don't (see <i>create_fullview()</i> and <i>create_frameview()</i>.) In addition, in the base layout, we put a box including a label and two buttons (see <i>create_content()</i>.) The label is labeled "Hello UI Gadget." And the first button, labeled "Send result", is for sending result to the "helloUG-efl" caller. The other button, labeled "Back", is for sending destroy request to the caller. For more information about two buttons, please see <i>Send results and request to destroy section</i>.
202 \note <b>Arguments:</b> All operations receive bundle type data which is named <i>data</i> (see \ref bundle_PG "bundle programming guide") And the argument <i>data</i> is automatically released by UI gadget manager after the UI gadget is destroyed.
206 static void *on_create(struct ui_gadget *ug, enum ug_mode mode, bundle *data, void *priv)
209 Evas_Object *content;
218 parent = ug_get_parent_layout(ug);
222 if (mode == UG_MODE_FULLVIEW)
223 ugd->base = create_fullview(parent, ugd);
225 ugd->base = create_frameview(parent, ugd);
228 content = create_content(parent, ugd);
229 elm_layout_content_set(ugd->base, "elm.swallow.content", content);
234 static Evas_Object *create_fullview(Evas_Object *parent, struct ug_data *ugd)
238 base = elm_layout_add(parent);
242 elm_layout_theme_set(base, "standard", "window", "integration");
243 // In case of fullview, show indicator area
244 edje_object_signal_emit(_EDJ(base), "elm,state,show,indicator", "elm");
245 edje_object_signal_emit(_EDJ(base), "elm,state,show,content", "elm");
250 static Evas_Object *create_frameview(Evas_Object *parent, struct ug_data *ugd)
254 base = elm_layout_add(parent);
258 // In case of frameview, do not show indicator area
260 elm_layout_theme_set(base, "standard", "window", "integration");
261 edje_object_signal_emit(_EDJ(base), "elm,state,show,content", "elm");
266 static Evas_Object *create_content(Evas_Object *parent, struct ug_data *ugd)
268 Evas_Object *bx, *eo;
271 bx = elm_box_add(parent);
273 // add label and pack it in the box
274 eo = elm_label_add(parent);
275 elm_label_label_set(eo, _("Hello UI Gadget"));
276 evas_object_size_hint_align_set(eo, 0.5, EVAS_HINT_FILL);
277 evas_object_size_hint_weight_set(eo, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
278 evas_object_show(eo);
279 elm_box_pack_end(bx, eo);
281 // add buttons and pack it in the box
282 eo = elm_button_add(parent);
283 elm_button_label_set(eo, _("Send result"));
284 evas_object_size_hint_align_set(eo, EVAS_HINT_FILL, EVAS_HINT_FILL);
285 evas_object_smart_callback_add(eo, "clicked", result_cb, ugd);
286 elm_object_style_set(eo, "bottom_btn");
288 evas_object_show(eo);
289 elm_box_pack_end(bx, eo);
291 eo = elm_button_add(parent);
292 elm_button_label_set(eo, _("Back"));
293 evas_object_size_hint_align_set(eo, EVAS_HINT_FILL, EVAS_HINT_FILL);
294 evas_object_smart_callback_add(eo, "clicked", back_cb, ugd);
295 elm_object_style_set(eo, "bottom_btn");
297 evas_object_show(eo);
298 elm_box_pack_end(bx, eo);
304 When "helloUG-efl" starts, the start operation is invoked. The implementation of start operation is <b>on_start()</b>. In this operation, we do nothing:
308 static void on_start(struct ui_gadget *ug, bundle *data, void *priv)
314 When "helloUG-efl" is destroyed, the destroy operation is invoked. The implementation of destroy operation is <b>on_destroy()</b>. In the method, we delete base layout:
318 static void on_destroy(struct ui_gadget *ug, bundle *data, void *priv)
327 evas_object_del(ugd->base);
332 When the application using "helloUG-efl" is put into background, the pause operation is invoked. When the application is brought to the foreground, the resume operation is invoked. Besides, when an UI gadget receives message from its caller, the message operation is invoked. And when a system event is generated, the event operation is invoked. The implementation of pause, resume, message, and event operations are <b>on_pause(), on_resume(), on_message(), and on_event()</b>. In these operations, we do nothing:
336 static void on_pause(struct ui_gadget *ug, bundle *data, void *priv)
339 static void on_resume(struct ui_gadget *ug, bundle *data, void *priv)
343 static void on_message(struct ui_gadget *ug, bundle *msg, bundle *data, void *priv)
347 static void on_event(struct ui_gadget *ug, enum ug_event event, bundle *data, void *priv)
350 case UG_EVENT_LOW_MEMORY:
352 case UG_EVENT_LOW_BATTERY:
354 case UG_EVENT_LANG_CHANGE:
356 case UG_EVENT_ROTATE_PORTRAIT:
358 case UG_EVENT_ROTATE_PORTRAIT_UPSIDEDOWN:
360 case UG_EVENT_ROTATE_LANDSCAPE:
362 case UG_EVENT_ROTATE_LANDSCAPE_UPSIDEDOWN:
370 \warning Message data of message operation is bundle type data, named <i>msg.</i> <b>Because the message data is released after message operation is finished,</b> if you want to keep using it, please use <b>bundle_dup()</b> which duplicates given bundle data (see \ref bundle_PG "bundle programming guide")
373 <h3 class="pg">Send results and request to destroy</h3>
374 Usually, an UI gadget needs to send results or destroy request to the UI gadget caller. To send result, use <b>ug_send_result()</b>, and to send the destroy request, use <b>ug_destroy_me().</b>
376 We use bundle library for composing result data. The bundle provides us a few APIs to make a list of dictionary data that consists of key and value. (ex. {"name" "John Doe"}) To get more information of bundle, please see \ref bundle_PG "bundle programming guide".
378 \warning After send your result data, you have to release it using <b>bundle_free()</b> API.
380 In our "helloUG-efl", we made two buttons for sending results and destroy request as below:
384 //Include to use bundle APIs
387 static void result_cb(void *data, Evas_Object *obj, void *event_info)
400 bundle_add(b, "name", "helloUG-efl");
401 bundle_add(b, "description", "sample UI gadget");
403 ug_send_result(ugd->ug, b);
409 static void back_cb(void *data, Evas_Object *obj, void *event_info)
417 //Send destroy request
418 ug_destroy_me(ugd->ug);
422 \note <b>To use bundle</b>
423 - Install libbundle-dev package
424 - Modify CMakeFile.txt to use bundle package as follow:
427 pkg_check_modules(pkgs REQUIRED elementary ui-gadget-efl bundle)
432 <h3 class="pg">Internationalization</h3>
433 Basically, we use <b><i>dgettext</i></b> for translating a text string into the user's native language because each UI gadget uses different textdomain. Fortunately, if you generate your code using UI gadget template, you don't need to worry about <i>dgettext</i> and textdomain because a few macros are kindly provided by template. In helloUG-efl.h, which is a generated private header of "helloUG-efl", there are a few macros for convenience:
436 #define PKGNAME "ug-helloUG-efl"
437 #define _(s) dgettext(PKGNAME, s)
438 #define dgettext_noop(s) (s)
439 #define N_(s) dgettext_noop(s)
442 The PKGNAME is textdomain of "helloUG-efl", and _() is a dgettext wrapper, and N_() is dummy macro. In addition, _() and N_() are additional keywords for marking translatable string for xgettext. Especially, N_() is a dummy keyword for special case as follow:
444 static const char *message[] = {
445 N_("translatable string"),
449 For more information, please see <a href="http://www.gnu.org/software/gettext/manual/gettext.html">GNU gettext utilities</a>.
451 \note <b>xgettext</b> extracts gettext strings from given input files. The canonical keyword for marking translatable strings is 'gettext'. For convenience, many packages use '_' as a keyword instead of 'gettext', and write '_("translatable string")' instead of 'gettext("translatable string")'.
454 <h3 class="pg">Rotation and indicator</h3>
455 When the UI gadget is created as fullview, we have to consider whether the indicator is shown or not. For instance, "Image viewer" shows the indicator on the portrait mode but not on the landscape mode. Hence, we provided option field named <i>opt</i> of <i>struct ug_module_ops</i> in UG_MODULE_INIT.
456 Available options are as following:
457 - UG_OPT_INDICATOR_ENABLE (default)
458 - UG_OPT_INDICATOR_POTRAIT_ONLY
459 - UG_OPT_LANDSCAPE_ONLY
460 - UG_OPT_INDICATOR_DISABLE
462 And we used UG_OPT_INDICATOR_ENABLE in "helloUG-efl"
465 <h3 class="pg">Build and test</h3>
466 Before you build, you have to make sure whether translatable strings exist or not. IF translatable strings EXIST, please follow these steps before you build:
472 IF NOT, please remove the following line in your CMakeList.txt
477 To build "helloUG-efl", follow these steps:
481 # cmake -DCMAKE_INSTALL_PREFIX=/usr ..
486 \note <b>Naming rule:</b> The output library name is <b>"libug-helloUG-efl.so"</b>, and we use <b>"helloUG-efl"</b> as UI gadget name except prefix <b>"libug-"</b> and postfix ".so" In other word, when you make an UI gadget, the name of library MUST be <b>"libug-XXXXXX.so"</b>
487 \note <b>Installation directory:</b> UI gadgets MUST be installed in "${PREFIX}/lib/ug/"
489 Finally, we made our first UI gadget, "helloUG-efl." Let's test it using <i>ug-launcher</i> which is simple UI gadget launcher. Because we are using beat style buttons in our UI gadget, we specify "beat" as ELM_THEME.
492 # ELM_THEME=beat ug-launcher -n helloUG-efl
496 # ELM_THEME=beat ug-launcher -n helloUG-efl -f
499 \note <b>How to install UG launcher</b>
501 # apt-get install ui-gadget-tools
503 \note <b>How to use UG launcher</b>
505 # ug-launcher [-F] [-f] -n <UG_NAME> [-d <Argument>]
507 - -d: argument, key, value pair.
508 - -F: Fullview mode (default)
510 \note <b> Example: </b>
512 # ug-launcher -F -n helloUG-efl -d "name,John doe" -d "age,30"
515 \image html SLP_UI_Gadget_PG_image03.png "Picture 3. helloUG-efl test: Fullview (left) and Frameview (right)
518 <h2 class="pg">How to use UI gadget</h2>
519 Now, we are going to use "helloUG-efl" of previous section.
522 <h3 class="pg">Initialize</h3>
524 If you are UI gadget developer who is trying to use UI gadgets, please skip this section. This section is for application developers who use UI gadgets.
525 You have to initialize UI gadget manager before you use UI gadgets. To initialize, use <b>ug_init()</b> with arguments: <i>disp, xid, win and opt</i>. <i>disp</i> is default display, and <i>xid</i> is X window id of win. <i>win</i> is window evas object for UI gadgets, and it is usually main window. <i>opti</i> is rotation and indicator option for your application (see <i>Rotation and indicator section</i>.)
527 The <i>disp</i> and <i>xid</i> are used for indicator management. If you don't know how to get display and X window ID, just use following macro: <b>UG_INIT_EFL(win, opt);</b>
529 \note <b>Prototype of ug_init():</b>
531 int ug_init (Display *disp, Window xid, void *win, enum ug_option opt);
533 \note <b>Macros for convenience (see 3 API reference quide):</b>
535 UG_INIT_EFL(win, opt);
539 <h3 class="pg">Create UI gadget instance</h3>
541 To create UI gadget instance, you have to invoke <b>ug_create()</b> which has five arguments: <i>parent, name, mode, data, and cbs.</i>
543 First, the <i>parent</i> is provided for specifying parent UI gadget, and it helps UI gadget manager to manage UI gadget tree (see <i>Management section.</i>) For instance, if the UI gadget 'A' uses other UI gadgets, the parent has to be the 'A.' Otherwise, if an application uses UI gadgets, the <i>parent</i> has to be NULL.
545 Second, the <i>name</i> is the UI gadget's name (ex. "helloUG-efl")
547 Third, the <i>mode</i> could be UG_MODE_FULLVIEW to show the UI gadget as fullview, or UG_MODE_FRAMEVIEW to show it as frameview.
549 Fourth, the <i>data</i> is arguments for the UI gadget which is bundle type (see \ref bundle_PG "bundle programming guide")
551 \warning After create UI gadget, you have to release the argument using <b>bundle_free()</b> API.
553 Fifth, the <i>cbs</i> is data describing layout callback, result callback, destroy callback, and private data. In detail, layout callback is used for layout arrangement, and it invoked after the UI gadget is created, and result callback is invoked to receive result from the UI gadget. And destroy callback is invoked to deal with destroy request from the UI gadget.
555 \warning Result data of the result callback is bundle type data, named <i>result</i>. <b>Because the result data is released after result callback is finished</b>, if you want to keep using it, please use <b>bundle_dup()</b> which duplicates given bundle data (see \ref bundle_PG "bundle programming guide")
557 \note <b>Prototype of ug_create():</b>
559 struct ui_gadget *ug_create (struct ui_gadget *parent,
565 \note <b>struct ug_cbs</b> is describing some callbacks and private data:
568 void (*layout_cb)(struct ui_gadget *ug, enum ug_mode mode, void *priv);
569 void (*result_cb)(struct ui_gadget *ug, bundle *result, void *priv);
570 void (*destroy_cb)(struct ui_gadget *ug, void *priv);
575 Here are some examples:
580 struct ui_gadget *ug;
583 static void layout_cb(struct ui_gadget *ug, enum ug_mode mode, void *priv)
585 Evas_Object *base, *win;
590 base = ug_get_layout(ug);
594 win = ug_get_window();
597 case UG_MODE_FULLVIEW:
598 evas_object_size_hint_weight_set(base, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
599 elm_win_resize_object_add(win, base);
600 evas_object_show(base);
607 static void result_cb(struct ui_gadget *ug, bundle *result, void *priv)
609 struct my_data *mydata;
617 val = bundle_get_val(result, "name");
619 fprintf(stderr, "The name of UI gadget that sends result is %s\n", val);
626 static void destroy_cb(struct ui_gadget *ug, void *priv)
628 struct my_data *mydata;
639 struct ui_gadget *create_ug(struct my_data *data)
641 struct ui_gadget *ug;
642 struct ug_cbs cbs = {0, };
644 cbs.layout_cb = layout_cb;
645 cbs.result_cb = result_cb;
646 cbs.destroy_cb = destroy_cb;
647 cbs.priv = (void *)data;
649 ug = ug_create(NULL, "helloUG-efl", UG_MODE_FULLVIEW, NULL, &cbs);
658 struct ui_gadget *ug;
659 Evas_Object *main_layout;
662 static void layout_cb(struct ui_gadget *ug, enum ug_mode mode, void *priv)
664 Evas_Object *base, *win;
665 struct my_data *mydata;
672 base = ug_get_layout(ug);
676 win = ug_get_window();
679 case UG_MODE_FRAMEVIEW:
680 elm_layout_content_set(mydata->main_layout, "content", base);
687 static void result_cb(struct ui_gadget *ug, bundle *result, void *priv)
689 struct my_data *mydata;
698 val = bundle_get_val(result, "name");
700 fprintf(stderr, "The name of UI gadget that sends result is %s\n", val);
708 static void destroy_cb(struct ui_gadget *ug, void *priv)
710 struct my_data *mydata;
721 struct ui_gadget *create_ug(struct my_data *data)
723 struct ui_gadget *ug;
724 struct ug_cbs cbs = {0, };
726 cbs.layout_cb = layout_cb;
727 cbs.result_cb = result_cb;
728 cbs.destroy_cb = destroy_cb;
729 cbs.priv = (void *)data;
731 ug = ug_create(NULL, "helloUG-efl", UG_MODE_FRAMEVIEW, NULL, &cbs);
738 <h2 class="pg">Send message</h2>
740 We provide API for sending message: <b>ug_send_message()</b>. When you send a message, you have to use bundle type data (see \ref bundle_PG "bundle programming guide").
742 \note <b>Prototype of ug_send_message():</b>
744 int ug_send_message (struct ui_gadget *ug, bundle *msg);
747 \warning After send your message, you have to release it using <b>bundle_free()</b> API.
756 bundle_add(b, "name", "helloUG-efl");
757 bundle_add(b, "type", "test message");
760 ug_send_message(ug b);
768 <h2 class="pg">Propagate event</h2>
770 If you are UI gadget developer who is trying to use UI gadgets, please skip this section. This section is for application developers who use UI gadgets.
772 We provide some APIs for event propagation: <b>ug_pause(), ug_resume(), and ug_send_event()</b>. <b>ug_pause()</b> and <b>ug_resume()</b> are used for task-managing. If the application is put into background, invoke <b>ug_pause()</b>, otherwise, if the application is brought to the foreground, invoke <b>ug_resume()</b>. <b>ug_send_event()</b> is used for system event: <i>low memory, low battery, language change, rotate portrait, rotate portrait upside-down, rotate landscape, and rotate landscape upside-down.</i>
774 \note <b>Prototype of ug_pause(), ug_resume(), and ug_send_event():</b>
777 int ug_resume (void);
778 int ug_send_event (enum ug_event event);
782 <h2 class="pg">Destroy all UI gadgets</h2>
784 If you are UI gadget developer who is trying to use UI gadgets, please skip this section. This section is for application developers who use UI gadgets.
786 When you terminate your application, destroy all UI gadgets using <b>ug_destroy_all()</b>.
788 \note <b>Prototype of ug_destroy_all: </b>
790 int ug_destroy_all (void);