{"id":16747972,"url":"https://github.com/amake/desktopsupport","last_synced_at":"2025-04-10T13:52:13.471Z","repository":{"id":74600160,"uuid":"180752086","full_name":"amake/DesktopSupport","owner":"amake","description":"A library to bridge Apple Java Extensions and JEP 272 desktop APIs","archived":false,"fork":false,"pushed_at":"2021-06-30T05:28:17.000Z","size":143,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-24T12:39:10.707Z","etag":null,"topics":["apple","java","jep-272"],"latest_commit_sha":null,"homepage":"https://mvnrepository.com/artifact/org.madlonkay/desktopsupport","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/amake.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"amake"}},"created_at":"2019-04-11T08:49:17.000Z","updated_at":"2024-05-22T23:22:00.000Z","dependencies_parsed_at":"2023-06-19T18:36:46.451Z","dependency_job_id":null,"html_url":"https://github.com/amake/DesktopSupport","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amake%2FDesktopSupport","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amake%2FDesktopSupport/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amake%2FDesktopSupport/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amake%2FDesktopSupport/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amake","download_url":"https://codeload.github.com/amake/DesktopSupport/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248228681,"owners_count":21068737,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apple","java","jep-272"],"created_at":"2024-10-13T02:11:24.790Z","updated_at":"2025-04-10T13:52:13.457Z","avatar_url":"https://github.com/amake.png","language":"Java","funding_links":["https://github.com/sponsors/amake"],"categories":[],"sub_categories":[],"readme":"# DesktopSupport Library for Java\n\nThis library bridges the Apple Java Extensions APIs and the JEP 272 desktop APIs\nadded in Java 9. It is intended for use by applications that want to support\nrunning on both Java 8 and Java 11.\n\n- [Apple Java Extensions](https://developer.apple.com/library/archive/samplecode/AppleJavaExtensions/Introduction/Intro.html)\n- [Apple Java Extensions Javadoc](https://coderanch.com/how-to/javadoc/appledoc/api/)\n- [JEP 272: Platform-Specific Desktop Features](https://openjdk.java.net/jeps/272)\n\n## Implementation\n\nThis library wraps a subset of the `com.apple.eawt.Application` API and\ndelegates to whichever actual implementation is available: Apple or Java 9+, or\na dummy no-op implementation if neither.\n\nThus it is safe to call the API anywhere, without checking the platform\nfirst. Note, however, that listeners and handlers will never be called under the\nno-op implementation, so critical logic must not be placed there.\n\n| Java version | Platform | Implementation     |\n|--------------|----------|----------------    |\n| Java 8       | macOS    | `com.apple.eawt.*` |\n| Java 8       | Other    | No-op              |\n| Java 11      | Any      | `java.awt.*`       |\n\n### Coverage\n\n- Non-deprecated methods on `com.apple.eawt.Application`\n- Methods on `com.apple.eawt.FullScreenUtilities`\n- `UIManager#createLookAndFeel` from Java 9+\n\n## Requirements\n\nJava 8+ is required to run.\n\nJava 11 is required in order to build.\n\n## Usage\n\nAdd the dependency:\n\n```groovy\nimplementation 'org.madlonkay:desktopsupport:+'\n```\n\nCall methods on `DesktopSupport.getSupport()`:\n\n```java\nDesktopSupport.getSupport().disableSuddenTermination();\nDesktopSupport.getSupport().setAboutHandler(e -\u003e {\n    // handle About event\n});\n```\n\nThe API is meant to mostly match the ones it wraps, but it is not quite a\ndrop-in replacement:\n\n- Event objects that have no methods or payloads (e.g. `AboutEvent`) are just\n  `EventObject`\n- `FullScreenUtilities` (Apple) and `Taskbar`/`GraphicsEnvironment`/etc. (Java\n  9) methods are on `IDesktopSupport` with everything else rather than in a\n  separate class\n\n## License\n\nApache 2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famake%2Fdesktopsupport","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famake%2Fdesktopsupport","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famake%2Fdesktopsupport/lists"}