gtk

Is it possible to integrate flash SWF app into GTK+ Gui and be able to interact with it from your C code?

Is it possible to integrate flash SWF app into GTK+ as part of Gui and be able to interact with it from your C code? Do you know any examples avaliable for reading there code? ...

How do I send a client-event asynchronously to a GtkWidget?

I'm trying to send and receive a client-event using a GtkWidget on the win32 platform. The sending code looks like this: GtkWidget *Wnd; GdkNativeWindow Hnd = #ifdef WIN32 GDK_WINDOW_HWND(Wnd->window); #else GDK_WINDOW_XWINDOW(Wnd->window); #endif GdkEvent *Event = gdk_event_new(GDK_CLIENT_EVENT); // fill out Event params gdk_ev...

c/gtk convert structure to the type of GtkWindow

Hello I have structure: typedef struct _MainWin { GtkWindow parent; GtkWidget* scroll; GtkWidget* box; }MainWin; I created application main window from this structure. Now i need in main window full screen. When i try to call: gtk_window_fullscree(GTK_WINDOW(mw); Where mw is object of MainWin i see: **gtk_window_fullscr...

Convert a GTK python script to C

The following script will take a screenshot on a Gnome desktop. import gtk.gdk w = gtk.gdk.get_default_root_window() sz = w.get_size() pb = gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB,False, 8, sz[0], sz[1]) pb = pb.get_from_drawable(w, w.get_colormap(), 0, 0, 0, 0, sz[0], sz[1]) if (pb != None): pb.save("screenshot.png", "png") prin...

How to create a cross-plataform application, doing the interface modules (Mac/Qt/GTK+) in a totally independent manner? (Like Transmission)

I'm amazed at Transmission, a BT client. It has a Mac, a GTK+, a QT, a Web Client and a CLI interface to it. I tried reading some of it's source to understand how he creates all these interfaces, but no luck. Does the developer creates them using a single ide? Or does he create the interface logic in each specific environment (speciall...

alpha blending in gtk

How can you draw semi-transparent primitives such as filled polygons to a Drawable in GTK? Its 2010, and I google isn't finding how to put an alpha value into a colour for me. What am I missing? ...

PyGTK: Manually render an existing widget at a given Rectangle? (TextView in a custom CellRenderer)

Hello! I am trying to draw a TextView into the cell of a TreeView. (Why? I would like to have custom tags on text, so they can be clickable and trigger different actions/popup menus depending on where user clicks). I have been trying to write a customized CellRenderer for this purpose, but so far I failed because I find it extremely di...

How to set background color of treeview widget in Gtk using C

I would like to set background color of treeview widget through xml like this becoz even-row-color and odd-row-color are style property of treeview widget.When I apply this my all the widgets available on window will be disappear. can anybody tell me the solution for this problem. True White gray ...

Copy window content between applications on Mac

In my application I have a NSWindow with some drawing which is quickly changing (i.e. animation or video). Also I have another application, emulated via X11, which created GtkWindow. How can I copy all the drawings from the first Cocoa window to the second Gtk one in real-time? Or, let me better divide the question on two parts: How...

How to use pkg-config for setting include paths in Xcode?

For example, if I need Gtk+ include paths. How to use pkg-config gtk+-2.0 --cflags in Xcode project settings? ...

Catching a click anywhere inside a gtk.Window

Hello people, consider the following python code: import gtk class MainWindow(): def __init__(self): self.window = gtk.Window() self.window.show() if __name__ == "__main__": main = MainWindow() gtk.main() I'd need to catch clicks anywhere inside this gtk.Window(). I haven't found any suitable event (I als...

GtkHBox parts location

Hello, GtkHBox divided into 2 parts. In both parts there is a certain set of widgets. In his ochenred this GtkHBox located on GtkVBox. The fact that 2 of the GtkHBox occupy the same space at the base GtkVBox, in this case I need to set the width of 1 part GtkHBox'a, but that would be the second part of it occupied all available space. H...

ruby gtk memory leak on image overlays

Okay: I'm on a linux system, so if you are windows I'm sure you can figure out how to do the equivalent of some of the actions I describe below Create 'test.svg' as such: <svg> <circle cx="100" cy="100" r="100"/> </svg> Now create this little ruby script: #!/usr/bin/env ruby require 'gtk2' Gtk::init pixbuf = Gdk::Pixbuf.new "test...

Redrawing a widget in Gtk.

I'm trying to redraw a GtkDrawingArea using the gtk_widget_queue_draw function, but the widget is not redrawing. Here's the code, the gtk_widget_queue_draw is inside a button-press-event callback function. static gboolean click(GtkWidget *board,GdkEventButton *event,gpointer parentWindow){ static int origen = -1; static int des...

How to select an item in a gtk.IconView (Python)

In a gtk.IconView I can use get_selected_items() to find the paths of the items a user selected in the view. I'm now looking for the corresponding method to set the selection of an IconView. But I can't find any!? What am I missing? ...

How do I get the giomm-2.4 package?

Hello, I am trying to build a GTK application (c++) using NetBeans. After including the gtkmm.h file I had to use the pkg-config tool to determine what it's dependencies where. I then added them to the included folders. Netbean complains that it cannot find 'giomm-2.4'. This package does not exist in /usr/lib and I cannot seem to find t...

Taking a screenshot with C\GTK

I'm trying to take a screenshot of the entire screen with C and GTK. I don't want to make a call to an external application for speed reasons. I've found Python code for this (http://stackoverflow.com/questions/69645/take-a-screenshot-via-a-python-script-linux/782768#782768); I just need to figure out how to do that in C. ...

g_io_scheduler_job_send_to_mainloop problem

Hello, I have foowing code fo runing function in another thread: void load (....) { GIOSchedulerJob *job; g_io_scheduler_job_send_to_mainloop(job,(GSourceFunc)job_func,&param, g_free); } gboolean job_func(GIOSchedulerJob *job, GSourceFunc func, gpointer user_data, GDestroyNotify notify) { JobParam* job_p...

Getting size of Gtk.Table in python

Hello, I am having a problem with widget Gtk.Table - I would like to know, if there is a way how to get a current size of the table (number of rows and columns). Thank you, very much for help, Tomas ...

Instantiating named GTK widgets in Python

Hi, I have a simple GUI build with Glade 3 and I have a gtk.Entry widget with name "input_entry1". I would like to instantiate new gtk.Entry widget called "input_entry2" but I would like to do it simply in Python code, not with Glade, but I can't figure out how to set a name to instance of widget (or create a named widget). Thanks a lot...