1GTK — The GTK toolkit 2===================== 3 4[![Build status](https://gitlab.gnome.org/GNOME/gtk/badges/master/pipeline.svg)](https://gitlab.gnome.org/GNOME/gtk/-/commits/master) 5 6General information 7------------------- 8 9GTK is a multi-platform toolkit for creating graphical user interfaces. 10Offering a complete set of widgets, GTK is suitable for projects ranging 11from small one-off projects to complete application suites. 12 13GTK is a free and open-source software project. However, the licensing terms 14for GTK, the GNU LGPL, allow it to be used by all developers, including those 15developing proprietary software, without any license fees or royalties. 16 17GTK is hosted by the GNOME project (thanks!) and used by a wide variety 18of applications and projects. 19 20The official download location 21 22 - https://download.gnome.org/sources/gtk/ 23 24The official web site 25 26 - https://www.gtk.org 27 28The official developers blog 29 30 - https://blog.gtk.org 31 32Discussion forum 33 34 - https://discourse.gnome.org/c/platform/core/ 35 36Nightly documentation can be found at 37 - Gtk: https://gnome.pages.gitlab.gnome.org/gtk/gtk4/ 38 - Gdk: https://gnome.pages.gitlab.gnome.org/gtk/gdk4/ 39 - Gsk: https://gnome.pages.gitlab.gnome.org/gtk/gsk4/ 40 41Nightly flatpaks of our demos can be installed from the 42[GNOME Nightly](https://wiki.gnome.org/Apps/Nightly) repository: 43 - `flatpak remote-add --if-not-exists gnome-nightly https://nightly.gnome.org/gnome-nightly.flatpakrepo` 44 - `flatpak install gnome-nightly org.gtk.Demo4` 45 - `flatpak install gnome-nightly org.gtk.WidgetFactory4` 46 - `flatpak install gnome-nightly org.gtk.IconBrowser4` 47 48Building and installing 49----------------------- 50 51In order to build GTK you will need: 52 53 - [a C99 compatible compiler](https://wiki.gnome.org/Projects/GLib/CompilerRequirements) 54 - [Python 3](https://www.python.org/) 55 - [Meson](http://mesonbuild.com) 56 - [Ninja](https://ninja-build.org) 57 58You will also need various dependencies, based on the platform you are 59building for: 60 61 - [GLib](https://download.gnome.org/sources/glib/) 62 - [GdkPixbuf](https://download.gnome.org/sources/gdk-pixbuf/) 63 - [GObject-Introspection](https://download.gnome.org/sources/gobject-introspection/) 64 - [Cairo](https://www.cairographics.org/) 65 - [Pango](https://download.gnome.org/sources/pango/) 66 - [Epoxy](https://github.com/anholt/libepoxy) 67 - [Graphene](https://github.com/ebassi/graphene) 68 - [Xkb-common](https://github.com/xkbcommon/libxkbcommon) 69 70If you are building the X11 backend, you will also need: 71 72 - Xlib, and the following X extensions: 73 - xrandr 74 - xrender 75 - xi 76 - xext 77 - xfixes 78 - xcursor 79 - xdamage 80 - xcomposite 81 82If you are building the Wayland backend, you will also need: 83 84 - Wayland-client 85 - Wayland-protocols 86 - Wayland-cursor 87 - Wayland-EGL 88 89Once you have all the necessary dependencies, you can build GTK by using 90Meson: 91 92```sh 93$ meson _build . 94$ cd _build 95$ ninja 96``` 97 98You can run the test suite using: 99 100```sh 101$ meson test 102``` 103 104And, finally, you can install GTK using: 105 106``` 107$ sudo ninja install 108``` 109 110Complete information about installing GTK and related libraries 111can be found in the file: 112 113``` 114docs/reference/gtk/html/gtk-building.html 115``` 116 117Or [online](https://developer.gnome.org/gtk4/stable/gtk-building.html) 118 119How to report bugs 120------------------ 121 122Bugs should be reported on the [issues page](https://gitlab.gnome.org/GNOME/gtk/issues/new). 123 124In the bug report please include: 125 126* Information about your system. For instance: 127 128 - which version of GTK you are using 129 - what operating system and version 130 - for Linux, which distribution 131 - if you built GTK, the list of options used to configure the build 132 133 And anything else you think is relevant. 134 135* How to reproduce the bug. 136 137 If you can reproduce it with one of the demo applications that are 138 built in the demos/ subdirectory, on one of the test programs that 139 are built in the tests/ subdirectory, that will be most convenient. 140 Otherwise, please include a short test program that exhibits the 141 behavior. As a last resort, you can also provide a pointer to a 142 larger piece of software that can be downloaded. 143 144* If the bug was a crash, the exact text that was printed out 145 when the crash occurred. 146 147* Further information such as stack traces may be useful, but 148 is not necessary. 149 150Contributing to GTK 151------------------- 152 153Please, follow the [contribution guide](./CONTRIBUTING.md) to know how to 154start contributing to GTK. 155 156If you want to support GTK financially, please consider donating to 157the GNOME project, which runs the infrastructure hosting GTK. 158 159Release notes 160------------- 161 162The release notes for GTK are part of the migration guide in the API 163reference. See: 164 165 - [3.x release notes](https://developer.gnome.org/gtk3/stable/gtk-migrating-2-to-3.html) 166 - [4.x release notes](https://docs.gtk.org/gtk4/migrating-3to4.html) 167 168Licensing terms 169--------------- 170 171GTK is released under the terms of the GNU Lesser General Public License, 172version 2.1 or, at your option, any later version, as published by the Free 173Software Foundation. 174 175Please, see the [`COPYING`](./COPYING) file for further information. 176 177GTK includes a small number of source files under the Apache license: 178- A fork of the roaring bitmaps implementation in [gtk/roaring](./gtk/roaring) 179- An adaptation of timsort from python in [gtk/timsort](./gtk/timsort) 180