{"id":27061206,"url":"https://github.com/felipefma/gtkcalc","last_synced_at":"2025-04-05T14:20:03.621Z","repository":{"id":269888999,"uuid":"908765538","full_name":"FelipeFMA/gtkcalc","owner":"FelipeFMA","description":"Simple calculator in C with GTK, created for fun and learning.","archived":false,"fork":false,"pushed_at":"2025-03-09T21:23:09.000Z","size":148,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-09T22:25:05.551Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","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/FelipeFMA.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":"2024-12-26T23:05:02.000Z","updated_at":"2025-03-09T21:23:33.000Z","dependencies_parsed_at":"2024-12-27T00:17:32.419Z","dependency_job_id":"144810c1-a84c-4819-9e0e-9737faa55765","html_url":"https://github.com/FelipeFMA/gtkcalc","commit_stats":null,"previous_names":["felipefma/gtkcalc"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FelipeFMA%2Fgtkcalc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FelipeFMA%2Fgtkcalc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FelipeFMA%2Fgtkcalc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FelipeFMA%2Fgtkcalc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FelipeFMA","download_url":"https://codeload.github.com/FelipeFMA/gtkcalc/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247346637,"owners_count":20924244,"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":[],"created_at":"2025-04-05T14:20:03.009Z","updated_at":"2025-04-05T14:20:03.616Z","avatar_url":"https://github.com/FelipeFMA.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GTK Calculator\n\nA simple calculator application built with C and GTK3.\n\n![image](https://github.com/user-attachments/assets/eebed299-db4b-4e00-8f2f-813a473fb4e2)\n\n\n## Features\n\n- Basic arithmetic operations: addition, subtraction, multiplication, and division\n- Decimal point support\n- Clear button (C) to reset the calculator\n- Backspace button (⌫) to delete the last digit\n- Improved error handling for division by zero and invalid operations\n- Better visual feedback with button highlighting\n- Responsive UI with improved styling\n\n## Requirements\n\n- GCC compiler\n- GTK3 development libraries\n- Math library (libm)\n\n## Building the Application\n\nTo build the calculator, make sure you have the required dependencies installed:\n\n### Ubuntu/Debian\n```bash\nsudo apt-get install build-essential libgtk-3-dev\n```\n\n### Fedora\n```bash\nsudo dnf install gcc gtk3-devel\n```\n\n### Arch Linux\n```bash\nsudo pacman -S gcc gtk3\n```\n\nThen, build the application:\n```bash\nmake\n```\n\n## Running the Calculator\n\nAfter building, run the calculator with:\n```bash\n./calculator\n```\n\n## Usage\n\n- Click the number buttons (0-9) to input numbers\n- Click the decimal point (.) button to add a decimal point\n- Click operation buttons (+, -, *, /) to perform arithmetic operations\n- Click the equals (=) button to calculate the result\n- Click the clear (C) button to reset the calculator\n- Click the backspace (⌫) button to delete the last digit\n\n### Keyboard Shortcuts\n\nThe calculator also supports keyboard input:\n- Number keys (0-9) for entering digits\n- Period (.) for decimal point\n- Operation keys (+, -, *, /) for arithmetic operations\n- Enter or = for calculating the result\n- Escape or 'c' key for clearing the calculator\n- Backspace for deleting the last digit\n\n## Code Structure\n\nThe calculator has been refactored to use a more modular approach:\n- Calculator state is encapsulated in a struct\n- Improved error handling for mathematical operations\n- Better visual feedback with CSS styling\n- Cleaner code organization with proper documentation\n\n## Cleaning Up\n\nTo clean the build files:\n```bash\nmake clean\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffelipefma%2Fgtkcalc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffelipefma%2Fgtkcalc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffelipefma%2Fgtkcalc/lists"}