gtkmm

interfacing gobject with C++

吃可爱长大的小学妹 提交于 2019-12-02 10:33:53
I’m trying to create a custom audio sink plugin for gstreamer using the Gst::AudioSink as a base class. For me this involves multiple learning curves as I’m new to gstreamer, gstreamermm and gobject. Also I have no background or real interest in gtkmm as I’m not working on GUI code at present. I am trying to create a class along the lines of: class MyAudioSink: public Gst::AudioSink { public: explicit MyAudioSink(KantarAudioSink *gobj); virtual ~MyAudioSink(); static void class_init(Gst::ElementClass<MyAudioSink> *klass); virtual int write_vfunc(gpointer data, guint length) override; virtual

“Gtk-WARNING **: cannot open display:” when running a gtkmm project in Eclipse

与世无争的帅哥 提交于 2019-12-01 11:17:00
I'm trying to run a gtkmm project in Eclipse CDT (On Ubuntu). The project compiles fine, there are no errors reported but when I try to run the project the console prints out this message "Gtk-WARNING **: cannot open display:" If I go to where the executable is located, in nautilus, I can open it and it runs fine. It's just a problem when trying to run directly from Eclipse. Thanks, It sounds like the the "DISPLAY" environment variable is not being set in the environment used by eclipse to launch your application. To check this, Edit the Run Configuration for the the program you are trying to

Get data from selected row of gtk treeview - gtkmm, c++

我怕爱的太早我们不能终老 提交于 2019-12-01 06:56:00
I have a GTK application that has a window with a treeview and a button. When the button is clicked I need to get the data from the first (and only) column of the selected row in the treeview . This is the class for the columns: class ModelColumns: public Gtk::TreeModel::ColumnRecord{ public: ModelColumns(){ add(m_port_name); } Gtk::TreeModelColumn<Glib::ustring> m_port_name; }; This is like in the example here but with only one column: http://www.lugod.org/presentations/gtkmm/treeview.html This is the button click signal handler at the moment: tvPorts is the treeview widget tvPortsList is the

Get data from selected row of gtk treeview - gtkmm, c++

耗尽温柔 提交于 2019-12-01 05:28:48
问题 I have a GTK application that has a window with a treeview and a button. When the button is clicked I need to get the data from the first (and only) column of the selected row in the treeview . This is the class for the columns: class ModelColumns: public Gtk::TreeModel::ColumnRecord{ public: ModelColumns(){ add(m_port_name); } Gtk::TreeModelColumn<Glib::ustring> m_port_name; }; This is like in the example here but with only one column: http://www.lugod.org/presentations/gtkmm/treeview.html