|author||Stephen M Houston <firstname.lastname@example.org>||2018-08-02 07:36:17 -0700|
|committer||apache <email@example.com>||2018-08-02 07:36:17 -0700|
|parent||Wiki page sandbox_gadgets.md changed with summary [cleaned up compile line fo... (diff)|
Wiki page sandbox_gadgets.md changed with summary  by Stephen M Houston
1 files changed, 0 insertions, 4 deletions
diff --git a/pages/develop/e/sandbox_gadgets.md.txt b/pages/develop/e/sandbox_gadgets.md.txt
index 5d6554d88..c8baf06d9 100644
@@ -81,10 +81,6 @@ elm_main(int argc, char **argv)
-Compile it (and other examples on this page) with:
- <code>cc example.c -o example `pkg-config --cflags --libs enlightenment`</code>
The variable ``gadget`` is used to determine if the application is running as a gadget or as a standalone application. The variable ``id_num`` is used to identify the ID of the gadget, if the application is indeed running as a gadget. If the application is running as a gadget, the window is set to alpha so that the background of the window does not show up. This is for aesthetics purposes so that gadgets on gadget sites don't all have a background.
If the id of the gadget is ``-1`` the application is being run in the "Add Gadget" popup. In this case the application displays an icon. If the ID of the gadget is not ``-1`` the application is being run as a gadget in a gadget site and the ID will be unique to this gadget. This is important for complex gadgets where the application would like to save settings or configurations and have them loaded after restarts. This unique ID is how the application will identify which settings to load.