{"id":19458649,"url":"https://github.com/pharo-spec/spec-gtk","last_synced_at":"2025-04-25T06:30:32.665Z","repository":{"id":44905648,"uuid":"305143666","full_name":"pharo-spec/Spec-Gtk","owner":"pharo-spec","description":"Spec GTK bindings for Pharo","archived":false,"fork":false,"pushed_at":"2025-04-15T13:59:42.000Z","size":2371,"stargazers_count":13,"open_issues_count":20,"forks_count":3,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-04-15T14:46:45.010Z","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:18:08.000Z","updated_at":"2024-10-24T19:19:38.000Z","dependencies_parsed_at":"2024-02-03T08:35:03.179Z","dependency_job_id":"a992ba9b-b621-417b-90ea-08ad8cdccd82","html_url":"https://github.com/pharo-spec/Spec-Gtk","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%2FSpec-Gtk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pharo-spec%2FSpec-Gtk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pharo-spec%2FSpec-Gtk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pharo-spec%2FSpec-Gtk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pharo-spec","download_url":"https://codeload.github.com/pharo-spec/Spec-Gtk/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:59.549Z","updated_at":"2025-04-25T06:30:31.989Z","avatar_url":"https://github.com/pharo-spec.png","language":"Smalltalk","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spec-Gtk\nThe Spec Gtk 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\n### On Linux\nYou need to have Gtk3 installed (this should be already the case).  \n**IMPORTANT:** Since the zeroconf VMs (the ones used by PharoLauncher) are really not suitable for linux environments, better not try to use them, as they will not find important dependences. Instead, use the ones Pharo provides through the [Open Building Service](https://software.opensuse.org//download.html?project=devel:languages:pharo:stable\u0026package=pharo-ui).\n\n### On macOS: \n**IMPORTANT:** Spec-Gtk is currently not working on mac. We will update this as soon as we figure out how to make our \ngtk3 bindings to work on latest mac machines (which includes ARM processors, so not so easy).  \n\nYou need Gtk3 (installed by brew because paths are fixed for now)\n```\nbrew install gtk+3\n```\n\n## Installing in your image\n\n1) Download a Pharo 11.0 image:\n\n```\ncurl get.pharo.org/110 | bash\n```\n\n2) Open your image using `./pharo-ui Pharo.image` and evaluate:\n```Smalltalk\n Metacello new\n        repository: 'github://pharo-spec/Spec-Gtk';\n        baseline: 'SpecGtk';\n        onConflict: [ :e | e useIncoming ];\n        onUpgrade: [ :e | e useIncoming ];\n        ignoreImage;\n        load\n```\nAfter the execution, save the image, and quit.\n\nIn macOS, if 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\nThe following code should open a small UI:\n\n```Smalltalk\nSpLabelPresenter new\n\tapplication: (SpApplication new useBackend: #Gtk);\t\n\tlabel: 'Hello, Gtk3';\n\topen.\n```\n\n## A note on execution\nPharo has different ways of being ejecuted. The default one will execute the VM and everything needed in the main thread. \nThis is usually suitable for Pharo needs, but it is a problem when the UI loop is required to run separately (not just for Gtk \nbut any backend that you need to run on idle mode).  \nFortunaltely, Pharo implements also a way to be executed in a worker thread, making space so the main thread can be used for other \npurposes. **We highly recommend that you execute Pharo using a worker thread** (future versions of Spec-Gtk will *require* this usage, \nand is definitevely better.  \n\nExecuting Pharo in a worker thread: \n```\npharo --worker MyImage.image --interactive\n``` \n\n## Current status\n\nCurrently, only the low-level infrastructure is supported. Tools building based on solely Spec2/Gtk are under way. Be patient.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpharo-spec%2Fspec-gtk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpharo-spec%2Fspec-gtk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpharo-spec%2Fspec-gtk/lists"}