Editing Documentation/Maemo 5 Developer Guide/Application Development/Writing Desktop Widgets

Warning: You are not logged in. Your IP address will be recorded in this page's edit history.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 278: Line 278:
For Status Menu widget, .desktop files should be placed in the directory outputted by the following command:
For Status Menu widget, .desktop files should be placed in the directory outputted by the following command:
-
  pkg-config --variable=hildonstatusmenudesktopentrydir libhildondesktop-1
+
  pkg-config libhildondesktop-1 --variable=hildonstatusmenudesktopentrydir
==Building Widgets==
==Building Widgets==
Line 284: Line 284:
To use a widget, it needs to be built as a shared library. This is done by passing the <code>-shared</code> flag to gcc.
To use a widget, it needs to be built as a shared library. This is done by passing the <code>-shared</code> flag to gcc.
-
  gcc -shared `pkg-config --libs --cflags hildon-1 libhildondesktop-1` widget.c -o lib-widget.so
+
  gcc -shared `pkg-config hildon-1 libhildondesktop-1 --libs --cflags` widget.c -o lib-widget.so
Status Menu and Home Area widgets binaries are located in the same directory, so assign distinguishable names to them, such as "lib-example-home-widget.so" and "lib-example-status-menu-widget.so" for the Home Area and Status Menu widgets, respectively. The directory where the binary files are copied to is given by the following command (which normally outputs <code>/usr/lib/hildon-desktop</code>):
Status Menu and Home Area widgets binaries are located in the same directory, so assign distinguishable names to them, such as "lib-example-home-widget.so" and "lib-example-status-menu-widget.so" for the Home Area and Status Menu widgets, respectively. The directory where the binary files are copied to is given by the following command (which normally outputs <code>/usr/lib/hildon-desktop</code>):
-
  pkg-config --variable=hildondesktoplibdir libhildondesktop-1
+
  pkg-config libhildondesktop-1 --variable=hildondesktoplibdir
[[Category:Development]]
[[Category:Development]]
[[Category:Documentation]]
[[Category:Documentation]]
[[Category:Fremantle]]
[[Category:Fremantle]]

Learn more about Contributing to the wiki.


Please note that all contributions to maemo.org wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see maemo.org wiki:Copyrights for details). Do not submit copyrighted work without permission!


Cancel | Editing help (opens in new window)