Questions tagged [gtk4]

194 questions
0
votes
1 answer

Get Parent From gtk-rs CompositeTemplate

How do I get the parent of a CompositeTemplate in gtk-rs? #[derive(Debug, Default, gtk::CompositeTemplate)] #[template(resource = "/org/bil4x4/gnote/tree_view")] pub struct GnoteTreeView { #[template_child] pub…
0
votes
0 answers

1) gtk/gtk.h: No such file or directory

I am facing an issue in gtk 4 with MSYS2 and c language in VS-code, it shows an error of : gtk/gtk.h: No such file or directory #include int main (int argc, char **argv) { gtk_init (&argc, &argv); //gtk code comes here …
0
votes
1 answer

GTK4 Library Build fails to include dialog functions

I am trying to build a version of GTK4.4.2 on my Pi4/Bullseye that includes Vulkan support. I have downloaded GTK4.4.2 from gnome.org. I believe I have installed all its dependencies (glib, vulkan, etc.). I set the proper meson config params, run…
0
votes
0 answers

GTK Buttons how to create a bevel/3D effect

I would like to have my buttons, when toggled, to have a 3D bevelled look, as in the below image, created with Powerpoint: Is this possible? In GTK4 the ShadowType and Relief properties have been removed, and it is recommended to use…
Cheetaiean
  • 901
  • 1
  • 12
  • 26
0
votes
0 answers

Show search history/suggestions for Gtk.SearchEntry

I want to create a suggestions drop down for a SearchEntry object in Gtk4 using Python. In Gtk3 I can do the following to achieve my desired result: import gi gi.require_version("Gtk", "3.0") from gi.repository import Gtk as gtk, Gdk urls = [ …
Tobias P. G.
  • 827
  • 8
  • 15
0
votes
0 answers

pygobject gtk4 , triying to print

i m trying to print my windows app , there is a lack of information actually , and all examples are in gtk3 i was able to print an hello world , but not my windows i m using gnome builder from gi.repository import Adw from gi.repository import…
0
votes
0 answers

How to get GTK4 video playback using gtk_media_file_new_for_input_stream?

I'm trying to write a GTK4 app using python with an embedded media player to use for streaming. Here's what I have now: def async_run(func, *args): thread = Thread(target=func, args=args) thread.start() class VideoStream: def…
pi_squared
  • 91
  • 6
0
votes
0 answers

What rust trait bounds and how to satisfy them

For example: fn main() { // Create a new application let app = Application::builder().application_id(APP_ID).build(); // Connect to "activate" signal of `app` app.connect_activate(build_ui); // Run the application …
0
votes
1 answer

How can I add characters to an Entry input field with a button in rust gtk4

I would like to add characters to an input field using Rust gtk4. I've created the entry field as such (please assume I have a main function that runs the app and I another function that creates the UI): let input = Entry::builder() …
Shane Gervais
  • 107
  • 12
0
votes
2 answers

Why can't I use clone!() in gtk4 for Rust?

I've just installed gtk4 over gtk for Rust and wrote a hello world program to test if it works. I want to use the clone macro to pass a weak reference for my button but, its not recognising the clone in gtk4::glib and says I have to use gtk::glib…
Shane Gervais
  • 107
  • 12
0
votes
2 answers

GTK how to increase Grid cell width and height

The following code creates a grid of cat icons, using the cat.jpg file below. static void make_toggles(GtkWidget * window) { GtkWidget *stop_grid, vpaned; int i; stop_grid = gtk_grid_new(); vpaned =…
Cheetaiean
  • 901
  • 1
  • 12
  • 26
0
votes
0 answers

Previous keypress event or current key state (Python GTK)

My code: class MainWindow(Gtk.ApplicationWindow): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.assigned_keys = { 111:False, 113:False, 114:False, …
0
votes
1 answer

Error - The procedure entry point could not be located in libpango-1.0.dll - Gtk4 Build App

When i try to open the .exe file from the Gtk4 build i get the above error The procedure entry point hb_ot_color_glyph_has_paint could not be located in the dynamic link library CAmsys64\mingw64\bin\liopango-1.0-0.dll The build was finished…
Shadow_Knight
  • 41
  • 1
  • 7
0
votes
0 answers

How to use GtkPopoverMenuBar in GTK4?

Currently, I'm trying to use GtkPopoverMenuBar widget in a GTK4 app in C, based on the tutorial listed here: https://toshiocp.github.io/Gtk4-tutorial/sec17.html Here's the current code I have: #include static…
0
votes
1 answer

Why Vala Compiler Throws Errors When Using Question Mark (?) Operator?

I tried to build G4Music (https://gitlab.gnome.org/neithern/g4music) following its instructions but I got many syntax errors. As you can see GTK-4.0 is marked as not found. However I have installed GTK-4.4 dev packages. I'm using RHEL 9 as distro…
jplc
  • 354
  • 1
  • 11