gtk

Use of the Gtk.GLArea in Pygobject GTK3

家住魔仙堡 提交于 2020-01-01 18:39:18
问题 The documentation for use of the python wrappers for GTk3 are somewhat limited. I have found several of the common widget examples. I am trying to use the Gtk.GLArea widget. The API documentation is for C and I have not had much luck guessing the equivalent python calls to use this widget. In the example the widget is created using the following C code: // create a GtkGLArea instance GtkWidget *gl_area = gtk_gl_area_new (); g_signal_connect (gl_area, "render", G_CALLBACK (render), NULL); Then

Stacking widgets in Gtk+

笑着哭i 提交于 2020-01-01 17:12:05
问题 Is there a way in Gtk+ to stack one widget on top of another -- not counting GtkFixed? GtkFixed doesn't work well for two reasons: 1) I need Z order, and 2) I need one widget to stretch and fill provided space. 回答1: I don't think there is a proper container in standard GTK. I would subclass Gtk::Fixed... it is still the closest one you can get, and if you use gtkmm then subclassing shouldn't be very difficult¹. Then you can control the dimensions of all widgets, stretching one selected child

How do I get Keyboard and Mouse Input in GTK?

时光怂恿深爱的人放手 提交于 2020-01-01 17:03:18
问题 I want to recieve keyboard and mouse input in GTK+. For keyboard input, I tried using the accelgroup but it wasn't somehow as smooth as say SDL or SFML. When I pressed a key. It responded, paused for some time, responded again, pause for sometime and so on. By Mouse input I mean getting the position of the Mouse at a given time and whether a mouse button is clicked. By keyboard input I want to track keypresses and releases. I am using GTK+ and cairo for an Educational Graphics Program. Kind

Multithreaded Gstreamer w/ PyGTK crashing (xcb_xlib_threads_sequence_lost)

本秂侑毒 提交于 2020-01-01 12:13:06
问题 I understand that one is not supposed to update the UI from other threads in gtk , or face consequences, but I am not sure how I can avoid that while using gstreamer . My application crashes from time to time during video stream initialization with a following complaint: [xcb] Unknown sequence number while processing queue [xcb] Most likely this is a multi-threaded client and XInitThreads has not been called [xcb] Aborting, sorry about that. python: ../../src/xcb_io.c:274: poll_for_event:

Multithreaded Gstreamer w/ PyGTK crashing (xcb_xlib_threads_sequence_lost)

烈酒焚心 提交于 2020-01-01 12:13:04
问题 I understand that one is not supposed to update the UI from other threads in gtk , or face consequences, but I am not sure how I can avoid that while using gstreamer . My application crashes from time to time during video stream initialization with a following complaint: [xcb] Unknown sequence number while processing queue [xcb] Most likely this is a multi-threaded client and XInitThreads has not been called [xcb] Aborting, sorry about that. python: ../../src/xcb_io.c:274: poll_for_event:

Unable to get height/width of a widget - gtkmm

五迷三道 提交于 2020-01-01 10:54:07
问题 I'm writing an application using gtkmm. I wrote a simple widget class, that I want to display in the application's main window only in some cases. Otherwise, I would like a Label "disabled" to be visible. To achieve that I packed both the widget and the label into one VBox, and I show() and hide() them in order to swap them. However, the custom widget is far larger than the label, so I need to resize the label a bit . I know I can use label.set_size_request(x,y), and it works, when I type the

Is there a windowed setting option for the Go compiler?

那年仲夏 提交于 2020-01-01 09:23:11
问题 I'm using Go (6g) to compile a GTK application and I want to know if there is a compiler/linker option to make it a Windows executable as opposed to console executable. MinGW has a -mwindows option for this and currently I'm having to manually alter the PE header with a hex editor which is annoying. 回答1: -ldflags 'flag list' arguments to pass on each 5l, 6l, or 8l linker invocation Compile packages and dependencies -Hwindowsgui (only in 6l/8l) Write Windows PE32+ GUI binaries Command ld Add

Should I rewrite GUI with GTK+ instead of WinForms for Mono?

十年热恋 提交于 2020-01-01 02:27:09
问题 I was making an application with Visual Studio, winforms and I'm using openTK. Recently I thought about making it cross-platform. I'm going to use Mono, because I don't know anything else similar. And I have totally no experience with GTK+. In my application, currently there are 4 windows(of course there will be more in future). I want to make application fast in Windows, Linux and OS X. I have read, that GTK+ is better than WinForms, but still not sure which to choose. So, should I remake

Compiling and Linking GTK 3 with C project on Ubuntu

余生长醉 提交于 2019-12-31 19:28:34
问题 I believe this is not a duplicate question, I have seen all questions/answers before I post this question. I think I have a different situation here. I use Ubuntu 12.04 and downloaded GTK 2 and 3 . I have copied a simple GTK source code from GNOME's website. But when I use this command in terminal: gcc `pkg-config --cflags --libs gtk+-3.0` hello.c -o hello I get this: hello.c:(.text+0x17): undefined reference to `gtk_init' hello.c:(.text+0x23): undefined reference to `gtk_window_new' hello.c:

LINUX C#开发图形界面环境准备

断了今生、忘了曾经 提交于 2019-12-31 13:34:26
  我要移植WINDOWS的C#代码,界面怎么办? 下载 https://download.mono-project.com/sources/gtk-sharp212/ 编译安装 tar -zxvf gtk-sharp-2.12.45.tar.gz cd gtk-sharp-2.12.4 ./configure --prefix=/usr make sudo make install 编译错误 来源: CSDN 作者: 柳鲲鹏 链接: https://blog.csdn.net/quantum7/article/details/103779977