{"id":16993953,"url":"https://github.com/caoimhebyrne/jnapple","last_synced_at":"2025-07-04T14:41:02.820Z","repository":{"id":103942171,"uuid":"438424905","full_name":"caoimhebyrne/JNApple","owner":"caoimhebyrne","description":"🍏 A collection of partial JNA bindings for various macOS frameworks. (e.g. Foundation, AppKit, etc.)","archived":false,"fork":false,"pushed_at":"2024-08-22T19:15:42.000Z","size":211,"stargazers_count":6,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-26T00:35:59.341Z","etag":null,"topics":["bindings","java","jna","macos"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/caoimhebyrne.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}},"created_at":"2021-12-14T22:56:51.000Z","updated_at":"2025-03-10T17:45:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"93ce047d-d49f-404a-aa11-10020d1c4892","html_url":"https://github.com/caoimhebyrne/JNApple","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caoimhebyrne%2FJNApple","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caoimhebyrne%2FJNApple/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caoimhebyrne%2FJNApple/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caoimhebyrne%2FJNApple/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/caoimhebyrne","download_url":"https://codeload.github.com/caoimhebyrne/JNApple/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248519542,"owners_count":21117761,"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":["bindings","java","jna","macos"],"created_at":"2024-10-14T03:44:23.864Z","updated_at":"2025-04-12T05:07:36.465Z","avatar_url":"https://github.com/caoimhebyrne.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JNApple\n\n🍏 A collection of partial JNA bindings for various macOS frameworks. (e.g. Foundation, AppKit, etc.)\n\n## Usage\n\nThese are just some common examples, for a wider range, check out\nour [tests](https://github.com/cbyrneee/JNApple/tree/main/src/test/java/dev/cbyrne/jnapple/test).\n\n**Creating an NSString**\n\n```java\nvar str = new NSString(\"Hello, World!\");\n// You can access this as a Java String if you wish too! (NSString#getJvmString)\n```\n\n**Creating an NSURL**\n\n```java\nvar str = new NSURL(\"https://cbyrne.dev\");\n// You can access this as a Java URL if you wish too! (NSURL#getJvmURL)\n```\n\n**Copying text to the clipboard**\n\n```java\nvar pasteboard = NSPasteboard.generalPasteboard();\npasteboard.clearContents();\npasteboard.setString(\"Hello, World!\", NSPasteboard.TypeString);\n```\n\n**Opening a file picker (NSOpenPanel)**\n\n```java\nvar panel = NSOpenPanel.openPanel();\npanel.setCanChooseFiles(true);\n\nvar result = panel.runModal();\nif(result == NSAlert.NSModalResponse.OK) {\n    NSURL url = panel.getURLs().objectAtIndex(0); // Can also use firstObject()\n    System.out.println(\"First URL: \" + url);\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaoimhebyrne%2Fjnapple","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcaoimhebyrne%2Fjnapple","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaoimhebyrne%2Fjnapple/lists"}