Questions tagged [gtk4]
194 questions
0
votes
0 answers
Confused about Trait Bounding in functions Rust
first post on here so apologies if I don't give enough information to get a clear picture.
I'm attempting to write a basic VST in Rust, the example I'm following has used a deprecated gtk method to actually build out the app and so I'm having to…

rusty_vibess
- 13
- 4
0
votes
0 answers
What are the best practices for resolution independent / responsive UI design with GTK/gtkmm?
I understand that in GTK >= 3.x all metrics are in logical pixels which will be scaled by a given scale factor (e.g. env var GDK_SCALE), resulting in the actual physical pixel metrics. Unfortunately the scale factor is an integer and as such rather…

khaos
- 632
- 3
- 11
0
votes
0 answers
Trying to implement (GTK 4 C) the shader to have each face like MeshLab does, but I'm missing something
I'm currently making a GTK 4 Application in C language, and I'm trying for the first time to use OpenGL, and GTK glArea widget only uses modern OpenGL that needs shaders. I found a shader (here : OpenGL shader to shade each face similar to MeshLab's…

gilboonet
- 21
- 5
0
votes
0 answers
How to connect to End Of Stream with Gtk.Video()
Here is how I load / play a video file with the new Gtk4 Video component:
self.video = Gtk.Video()
# (...)
stream = Gtk.MediaFile.new_for_file(file)
self.video.set_media_stream(stream)
stream.play()
But how can I know when the video playback…

yPhil
- 8,049
- 4
- 57
- 83
0
votes
1 answer
Trivial GUI "update" question with Gtk4 and Python
First of all - sorry. I know that this is very trivial, but I just can't wrap my head around this. Total newbie at GUI department.
But to the point: My very simple program calls another program that generates a jpeg file. My program then shows that…

MastusAR
- 1
0
votes
0 answers
Rust GTK4 can't get monitors parameters
I want to list monitors to fill dropdown with monitors parameters.
I'm able to get display then all 3 connected monitors but monitors.item(i).unwrap() is Object not Monitor. How can I get to monitors to get params from them?
fn…

d3im
- 323
- 2
- 4
- 18
0
votes
1 answer
Wayland add window positioning
I try to use HEADERBAR, but cannot found information about how add it to non-toplevel-window/widget. I need to allow user to move window, but only in certain condition (when user invokes specific window mode). I see Firefox work with PIP…

nintyfan
- 386
- 3
- 16
0
votes
0 answers
Rust Gtk4 using window close function in EventControllerKey
I new to rust and Gtk4. I am trying to write a small logout program. I am using Rust and Gtk4. I want to be able to execute the lock screen and close the window. I am have trouble on closing the window. Here is main code and If someone to give me a…
0
votes
0 answers
GTK4.0 File not found
fatal error: gtk/gtk.h: No such file or directory
#include
^~~~~~~~~~~
compilation terminated.
I kept getting this error even though I am sure GTK4.0 is installed through MSYS2mingw64.
In case you are wondering my launch.json…

unique27
- 1
- 3
0
votes
1 answer
Gtk4 Gtk.Video() doesn't play
It's been a while now that Gtk4 shipped out, with a new Gtk.Video() component that allows to display a video in a Gtk window without resorting to using Gstreamer.
It's a very simple class with only a handful of subclasses (4) methods (10) &…

yPhil
- 8,049
- 4
- 57
- 83
0
votes
0 answers
File Chooser Dialog not showing (GTK4/Rust)
I just started coding with Rust and I want to make a linux application using Gtk4.
I'm trying to implement a FileChooserDialog following the Text_viewer Example from gtk-rs github but the window is not showing off and I'm not sure what I'm really…

Mysterion
- 111
- 2
- 10
0
votes
0 answers
How to create a reference to GtkTextView in a window?
How to obtain a reference to a TextView widget in a callback function
static void print_text(GtkWindow * window, gpointer data)
{
const gchar text;
GtkTextView text_view;
/* obtaining a reference textview of text_view*/
…

binary_psychic
- 71
- 6
0
votes
1 answer
How to read data from TextView in gtk4?
I am building a calculator app using c language and gtk4, in activate function I have
GtkWidget * entry;
GObject * Sum = gtk_builder_get_object(builder, "sum");
entry = gtk_entry_new ();
gtk_entry_set_max_length (GTK_ENTRY (entry),…

binary_psychic
- 71
- 6
0
votes
1 answer
package Adw doesn't have EntryRow
I'm trying to make a boxed-list with an AdwEntryRow, following:
https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/boxed-lists.html#boxed-lists
However I don't find this class in Adw
(Pdb) Adw

Shake0
- 147
- 5
0
votes
1 answer
GTK Clickable Text inside Text View/Buffer
How to make a portion of text inside a GTKTextView to be clickable, so that clicking on the specified portion will trigger some event? And, moreover, how to obtain the exact portion of the text being clicked in the event that is triggered?

Danny Witwer
- 1
- 1