{"id":19458646,"url":"https://github.com/pharo-spec/gtk-bindings","last_synced_at":"2025-07-17T22:35:37.551Z","repository":{"id":38204510,"uuid":"305141888","full_name":"pharo-spec/gtk-bindings","owner":"pharo-spec","description":"Gtk3 bindings for Pharo","archived":false,"fork":false,"pushed_at":"2025-04-14T12:46:19.000Z","size":3155,"stargazers_count":3,"open_issues_count":6,"forks_count":4,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-04-14T13:36:29.692Z","etag":null,"topics":["gtk3","pharo","ui"],"latest_commit_sha":null,"homepage":"","language":"Smalltalk","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pharo-spec.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2020-10-18T16:09:07.000Z","updated_at":"2023-10-28T18:59:39.000Z","dependencies_parsed_at":"2023-09-26T17:08:56.484Z","dependency_job_id":"beea3f06-b2f6-4092-80ab-7a89a4e522b7","html_url":"https://github.com/pharo-spec/gtk-bindings","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/pharo-spec%2Fgtk-bindings","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pharo-spec%2Fgtk-bindings/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pharo-spec%2Fgtk-bindings/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pharo-spec%2Fgtk-bindings/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pharo-spec","download_url":"https://codeload.github.com/pharo-spec/gtk-bindings/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250766963,"owners_count":21483895,"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":["gtk3","pharo","ui"],"created_at":"2024-11-10T17:27:58.976Z","updated_at":"2025-04-25T06:30:31.944Z","avatar_url":"https://github.com/pharo-spec.png","language":"Smalltalk","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gtk bindings\nThe Gtk3 bindings for Pharo\n\n# How to install\n\n### On Windows\nYou need Gtk3!  \nAnd you need to put it at the same place of the `Pharo.exe` executable.  \nTo simplify the process we created a VM bundled with all the DLL and resources needed to execute GTK+3\n\nYou can get it from: http://files.pharo.org/vm/pharo-spur64-headless/win/latest-win64-GTK.zip\n\nNOTE: If you are running under cygwin subsystem, remember to `chmod +x *`. Libraries have to be executable!\n\nThen, you can just download a new Pharo 9.0 image: \n\n```\ncurl https://get.pharo.org/64/90 | bash\n```\n\n### On macOS: \n\nYou need Gtk3 (installed by brew because paths are fixed for now)\n```\nbrew install gtk+3\n```\n\nAnd you need the headless VM and a Pharo 9.0 image. You can get them from the zero-conf scripts: \n\n```\ncurl https://get.pharo.org/64/90+vmHeadlessLatest | bash\n```\n\n\n### On Linux\nYou need to have Gtk3 installed.\n\nAnd you need the headless VM and a Pharo 9.0 image. You can get them from the zero-conf scripts: \n\n```\ncurl https://get.pharo.org/64/90+vmHeadlessLatest | bash\n```\n\n\n## Installing in your image\n\n### On Windows\nYou need to install it from the command line since you do not have the Playground in the UI:\n```\n./PharoConsole.exe '.\\Pharo.image' eval --save \" Metacello new\n        repository: 'github://pharo-spec/gtk-bindings';\n        baseline: 'Gtk';\n        onConflict: [ :e | e useIncoming ];\n        onUpgrade: [ :e | e useIncoming ];\n        ignoreImage;\n        load\"\n```\n\nThen you will need to restart your image to let Gtk3 to take over the event loop.\n\n### On MacOS or Linux\n\nOpen your image using `./pharo-ui Pharo.image` and evaluate:\n```Smalltalk\n Metacello new\n        repository: 'github://pharo-spec/gtk-bindings';\n        baseline: 'Gtk';\n        onConflict: [ :e | e useIncoming ];\n        onUpgrade: [ :e | e useIncoming ];\n        ignoreImage;\n        load\n```\nAfter the execution, save the image, and quit.\n\nIf you open the image using `./pharo-ui Pharo.image`, the image should give the feeling of being significantly slower. This is because the Gtk event loop is running. You can verify this by opening the process browser: you should see a line begining with `(70) GtkRunLoop`.\n\n## A first example\n\nThe following code should open a small UI:\n\n```Smalltalk\nGEngine ensureRunning.\nGtkRunLoop defer: [\n\tGtkWindow new \n\t\ttitle: 'Gtk3 Window';\n\t\tadd: (GtkBox newVertical\n\t\t\tpackStart: (GtkLabel newLabel: 'Hello!');\n\t\t\tyourself);\n\t\tshowAll ]\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpharo-spec%2Fgtk-bindings","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpharo-spec%2Fgtk-bindings","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpharo-spec%2Fgtk-bindings/lists"}