gtk3

PyGObject GTK+ 3 - Documentation?

蹲街弑〆低调 提交于 2019-12-02 15:38:47
PyGObject appears to have no real documentation. This tutorial is as close as it gets. I've been struggling all morning simply trying to find a description of the arguments accepted by the Gtk.Window constructor. It seems I can't do much reflection in Python because everything in PyGObject is dynamically generated. All I want is to know what arguments I can pass to this constructor! There doesn't appear to be an equivalent of this object in the GTK+ 3 documentation, and reading the source code to figure out the bindings has proven to be an extremely daunting task. Any ideas?? I agree that this

How do I cast Widget to Label in Haskell's GI-Gtk?

喜夏-厌秋 提交于 2019-12-02 10:59:57
I have this sample code where I have a ListBox containing ListBoxRows, which in turn contain a Label. When I click on the ListBox, I get a ListBoxRow. So far so good. The problems start when I want to interact with the ListBoxRows children. I have used this function to get the Label, which is the child of the ListBoxRow. https://hackage.haskell.org/package/gi-gtk-3.0.18/docs/GI-Gtk-Objects-Container.html#g:13 However, the returned type is Widget. How do I convert the type of the object? Function widgetGetName tells me it is a label, but the Haskell Type system insists it is a Widget, so I can

How to fix the Code::Blocks wizard to look for GTK+ 3.0 and not 2.0?

爱⌒轻易说出口 提交于 2019-12-02 10:28:32
问题 I have been using Code::Blocks since I started programming in C, after trying every C compiler in existence under windows I found Code::Blocks the most easiest to work with because I wouldn't have to spend an entire year learning how to use the program before I could start writing 'hello world' apps in it XD...... Anyway I installed GTK+ 3.0 and setup the environmental variables and ran the cmd prompt commands as the setup tutorial told me to.... I even ran the gtk-demo file from the cmd

How to pack a button in a HeaderBar using Genie?

有些话、适合烂在心里 提交于 2019-12-02 10:14:28
问题 Background My aim is to improve a little text editor as an exercise. It is running fine after the HeaderBar was added, however I can't find a way to pack buttons in it. Code uses Granite.Widgets Gtk init Gtk.init (ref args) var app = new Application () app.show_all () Gtk.main () // This class holds all the elements from the GUI class Application : Gtk.Window _view:Gtk.TextView construct () // Prepare Gtk.Window: this.window_position = Gtk.WindowPosition.CENTER this.destroy.connect (Gtk.main

How to render SDL2 texture into GTK3+ window?

戏子无情 提交于 2019-12-02 08:20:33
I am creating a music player and trying to use GTK3+ for creating user interface. I am using SDL_CreateWindowFrom function to let SDL2 use GTK3+ window rather than creating one but cann't figure out the steps I need to follow in order to render the SDL2 textures into GTK3+ window. Code getting GTK3 window ID window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW(window), "---"); gtk_widget_show(window); gdkWin = gtk_widget_get_window(GTK_WIDGET(window)); data->playContext->winID = GDK_WINDOW_XID(gdkWin); gtk_main(); Code Setting SDL2 window playContext->display->window =

How to fix the Code::Blocks wizard to look for GTK+ 3.0 and not 2.0?

試著忘記壹切 提交于 2019-12-02 06:36:28
I have been using Code::Blocks since I started programming in C, after trying every C compiler in existence under windows I found Code::Blocks the most easiest to work with because I wouldn't have to spend an entire year learning how to use the program before I could start writing 'hello world' apps in it XD...... Anyway I installed GTK+ 3.0 and setup the environmental variables and ran the cmd prompt commands as the setup tutorial told me to.... I even ran the gtk-demo file from the cmd prompt....When I went to run through the Code::Blocks 13.10 gtk+ wizard it kept telling me that GTK+ seemed

import errors with Python and Gtk+ 3

烈酒焚心 提交于 2019-12-02 06:27:47
问题 I'm working in a program that is written in Gtk+ 3 and Python . A related question I asked about my program is here. Now, that I advanced a bit more, I have the following imports: import aplpy import montage import subprocess from gi.repository import Gtk, GdkPixbuf and when I run it I get this error: $ ./makeRGB-frame.py Traceback (most recent call last): File "./makeRGB-frame.py", line 34, in <module> from gi.repository import Gtk, GdkPixbuf File "/usr/lib64/python2.7/site-packages/gi/_

How to pack a button in a HeaderBar using Genie?

ぐ巨炮叔叔 提交于 2019-12-02 05:48:44
Background My aim is to improve a little text editor as an exercise. It is running fine after the HeaderBar was added, however I can't find a way to pack buttons in it. Code uses Granite.Widgets Gtk init Gtk.init (ref args) var app = new Application () app.show_all () Gtk.main () // This class holds all the elements from the GUI class Application : Gtk.Window _view:Gtk.TextView construct () // Prepare Gtk.Window: this.window_position = Gtk.WindowPosition.CENTER this.destroy.connect (Gtk.main_quit) this.set_default_size (400, 400) // Headerbar definition headerbar:Gtk.HeaderBar = new Gtk

gtk python grid resize

こ雲淡風輕ζ 提交于 2019-12-02 05:06:07
Following the official tutorials about containers. I have the follwoing code import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk class MainWindow(Gtk.Window): def __init__(self): Gtk.Window.__init__(self, title="test") grid = Gtk.Grid() self.add(grid) button1 = Gtk.Button(label="Button 1") button2 = Gtk.Button(label="Button 2") button3 = Gtk.Button(label="Button 3") button4 = Gtk.Button(label="Button 4") button5 = Gtk.Button(label="Button 5") button6 = Gtk.Button(label="Button 6") grid.add(button1) grid.attach(button2, 1, 0, 2, 1) grid.attach_next_to(button3, button1, Gtk

GTK+ 3.0 setup in Visual Studio 2013

时光毁灭记忆、已成空白 提交于 2019-12-02 02:48:07
问题 So I'm trying to use GTK+ 3.0 in Visual Studio 2013, and I followed this tutorial:How to configure gtk on Visual studio 2010. The problem is that whenever I try to build the solution, I get Linker errors. I'm using this code: #include <gtk-3.0\gtk\gtk.h> int main(int argc, char* argv[]) { gtk_init(&argc, &argv); GtkWidget* window = gtk_window_new(GTK_WINDOW_TOPLEVEL); //gtk_widget_set_usize(window, 300, 200); g_signal_connect(G_OBJECT(window), "destroy", G_CALLBACK(gtk_main_quit), NULL); gtk