| 1 |
/* gtkmm example Copyright (C) 2025 gtkmm development team |
| 2 |
* |
| 3 |
* This program is free software; you can redistribute it and/or modify |
| 4 |
* it under the terms of the GNU General Public License as published by |
| 5 |
* the Free Software Foundation; either version 2 of the License, or |
| 6 |
* (at your option) any later version. |
| 7 |
* |
| 8 |
* This program is distributed in the hope that it will be useful, |
| 9 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 |
* GNU General Public License for more details. |
| 12 |
* |
| 13 |
* You should have received a copy of the GNU General Public License along |
| 14 |
* with this program; if not, see <https://www.gnu.org/licenses/>. |
| 15 |
*/ |
| 16 |
|
| 17 |
#ifndef GTKMM_EXAMPLEWINDOW_H |
| 18 |
#define GTKMM_EXAMPLEWINDOW_H |
| 19 |
|
| 20 |
// https://gitlab.gnome.org/GNOME/gtkmm-documentation/-/issues/26 |
| 21 |
|
| 22 |
// g++ -o app main.cc examplewindow.cc `pkg-config --cflags --libs gtkmm-4.0 webkitgtk-6.0` -std=c++17 |
| 23 |
|
| 24 |
// If you get this execution error: |
| 25 |
// bwrap: setting up uid map: Permission denied |
| 26 |
// see instructions at https://funos.org/solve-bwrap-permission-denied/ |
| 27 |
// 1. Add file /etc/apparmor.d/bwrap with contents: |
| 28 |
// abi <abi/4.0>, |
| 29 |
// include <tunables/global> |
| 30 |
// |
| 31 |
// profile bwrap /usr/bin/bwrap flags=(unconfined) { |
| 32 |
// userns, |
| 33 |
// |
| 34 |
// # Site-specific additions and overrides. See local/README for details. |
| 35 |
// include if exists <local/bwrap> |
| 36 |
// } |
| 37 |
// 2. Restart AppArmor: |
| 38 |
// sudo systemctl restart apparmor.service |
| 39 |
|
| 40 |
#include <gtkmm.h> |
| 41 |
|
| 42 |
class ExampleWindow : public Gtk::Window |
| 43 |
{ |
| 44 |
public: |
| 45 |
ExampleWindow(); |
| 46 |
~ExampleWindow() override; |
| 47 |
|
| 48 |
protected: |
| 49 |
}; |
| 50 |
|
| 51 |
#endif // GTKMM_EXAMPLEWINDOW_H |