Unity Launcher Binding


/ Published in: Java
Save to your folder(s)

This snippet presents how the java library to ubuntu unity launcher could look like.


Copy this code and paste it in your HTML
  1. /**
  2. * This interface provides access to some native Unity methods.
  3. * @author kdaniel
  4. *
  5. */
  6. public interface UnityLauncherLibrary extends Library {
  7. UnityLauncherLibrary INSTANCE = (UnityLauncherLibrary)
  8. Native.loadLibrary("libunity",
  9. UnityLauncherLibrary.class);
  10.  
  11. /**
  12. * Gets an "object" corresponding to particular *.desktop file.
  13. * @param id - the id of the launcher
  14. * @return a pointer to the object
  15. */
  16. public abstract Pointer unity_launcher_entry_get_for_desktop_id (String id);
  17. /**
  18. * Makes a progress bar visible for particular launcher entry.
  19. * @param self - a launcher entry that should or should not display the progress bar
  20. * @param visible - true if the progress bar should be made visible.
  21. */
  22. public abstract void unity_launcher_entry_set_progress_visible (Pointer self, boolean visible);
  23. /**
  24. * Actually updates the progress bar in Unity Launcher.
  25. * @param self - a launcher entry that should or should not display the progress bar
  26. * @param progress - a value from range 0.0 to 1.0.
  27. */
  28. public abstract void unity_launcher_entry_set_progress (Pointer self, double progress);
  29. }

URL: http://eclipseandlinux.blogspot.com/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.