Skip to content

RomanMoz/fpGTK3

Repository files navigation

fpGTK3

GTK3 Library for Free Pascal

Lightweight and easy-to-use GTK3 bindings for Free Pascal, enabling seamless integration with the GTK3 toolkit for building modern graphical applications. Features

Full GTK3 bindings for Free Pascal.
Simple and intuitive API for GUI development.
Support for creating windows, widgets, and event handling.
Examples included for rapid prototyping.
Cross-platform support (Linux, Windows, macOS).

Installation Using the Source Code

Clone the repository:

https://github.com/RomanMoz/fpGTK3

Add the library to your Free Pascal project:

Include the library path in your Free Pascal project options.
Import the GTK3 units in your Pascal code:

    Uses math, classes, gtk3, gobject2, glib2;

Dependencies

Ensure GTK3 is installed on your system:
    Linux: Install via your package manager (e.g., sudo apt install libgtk-3-dev).
    Windows: Download the GTK runtime from MSYS2.
    macOS: Use Homebrew (brew install gtk+3).

Quick Start

Create a simple GTK3 application in Free Pascal:

See: gtktest.pas

Examples

The repository includes several examples to help you get started:

Simple Window: A basic GTK3 window with event handling.
Button Demo: Add buttons and respond to clicks.
WebKit: A more advanced example using GTK3 WebKit.

Browse the /examples folder for more code samples.

Contributing

Contributions are welcome! If you encounter bugs or have feature requests, please open an issue or submit a pull request.

License

This project is licensed under the GNU General Public License. See the LICENSE file for details.