Yes/no-question: Is there a Groovy GDK function to capitalize the first character of a string?
I'm looking for a Groovy equivalent of Perl's ucfirst(..) or Apache Commons StringUtils.capitalize(str) (the latter capitalizes the first letter of all words in the input string).
I'm currently coding this by hand using ..
str = str[0].toUpp...
I'm using Glade-3 for my GUI design, but I keep hitting this problem. I don't see anything in the GTK+ documentation mapping signals to events or in Glade-3 (3.4.5). Is there a place in the GTK+ source code to find this information?
Note: It is important in this question to recognize that events and signals are NOT the same thing in GTK...
I'm wrapping a foreign Win32 window with gdk_window_foreign_new. If I do e.g. gdk_window_get_root_origin on the GdkWindow after the foreign window has been destroyed, GDK prints a warning about the invalid handle. So the user is well informed but is there a way for my program to get informed too?
One possibility is to call IsWindow on t...
Is it possible to make a copy of Gdk.image object using lablgtk2 for Ocaml?
I tried to find 'copy' or 'clone' methods but failed.
...
I am working on a demo application for a library me and two colleagues are writing to allow GNOME applications that run audio events though libCanberra to allow users to select visual events to replace them. This is an accessibility-minded effort to help both visually and aurally impaired users gain the benefits of audio alerts and such....
I have an application that can successfully inject keyboard input using the SendInput API with the UNICODE flag set. This causes WM_KEYUP and WM_KEYDOWN messages to be generated with the VK code of E7 (VK_PACKET), which gets appropriately translated into the correct WM_CHAR message. This works in all the applications I have tried except ...
I'm creating a small app must be able to receive URLs. If the apps window is open, I should be able to drag a link from a browser and drop it into the app - and the app will save the URL to a database.
I'm creating this in Python/GTk. But I am a bit confused about the drag and drop functionality in it. So, how do it?
Some sample code t...
I've started learning Lisp recently and wanted to write a program which uses gtk interface. I've installed lambda-gtk bindings (on CMUCL). I want to have putpixel/getpixel ability on a pixbuf. But I found that I'm unable to direct access memory. (or just don't know how)
Function (gdk:pixbuf-get-pixels pixbuf) returns me a number - memor...
I was trying to write my own put-pixel on (Gdk) pixbuf in Lisp. When I finally realized how I can operate on C pointers in CL, new obstacle came along - (gdk:pixbuf-get-pixels pb) returns me negative number. My question is: can I convert it somehow to a valid pointer? My attempts to use cffi:convert-from-foreign and cffi:translate-from-f...
I have two png images First one with Width1 2247 Height1 190 and second one with Width2 155 Height2 36. I wan't the second image(src) to be placed in the center of first image(dest). I created pixel buf of both and used gdk_pixbuf_composite as follows.
gdk_pixbuf_composite( srcpixbuf, dstpixbuf, 1000, 100, width2, height2, 0, 0, 1, 1, G...
I've got a gtk application which features a tray icon, if the user clicks on the icon the visibility of the window is toggled when he's on the same workspace as the window is. When he's on another workspace the window moves to that one.
Now, if the application and user are on the same screen and the app is completely overlayed by anothe...
I'm trying to intercept events using Gdk.Window.AddFilter(Gdk.FilterFunc) in Mono. So far, I have been able to hook up the filter function, but now I am trying to use the events in the filter function.
This is what I have in the filter function so far:
private Gdk.FilterReturn FilterFunction(IntPtr xEvent, Gdk.Event evnt)
{
if (ev...
I'm interested in offloading X client from heavy computations.
As far as I understand I can do it using XRender in some way. But I do no found how.
...
using gdk_screen_get_monitor_geometry (xrandr) I can get the resolutions for
separate monitors (for example when there are 2 monitors used as a single screen like nvidias twinview)
However _NET_WORKAREA seems to give one giant area even if the resolution of the other monitor is smaller. (a panel at the bottom of the second monitor woul...
I have a c++ program in which a gdk-pixbuf is created. I want to output it as an image, so I call gdk_pixbuf_save_to_stream(pixbuf,stream,type,NULL,&err,NULL). This works fine when "type" is png or tiff, but with jpeg or bmp it just produces a black square. The original pixbuf consists of black-on-transparent (and gdk_pixbuf_get_has_a...
Hi All,
Big picture: I want to render an RGB image via GTK on a linux box.
I'm a frustrated GTK newbie, so please forgive me.
I assume that I should create a Drawable_area in which to render the image -- correct?
Do I then have to create a graphics context attached to that area? How?
my simple app (which doesn't even address the r...
In GDK there's an object called GdkRectangle that is used to draw rectangles. Is there a similar object for ellipses?
...
I want to make a GdkRectangle clickable so that I can select it and get a dot in every corner of the rectangle, implying that the user can move or resize the rectangle.
Is there an event that triggers when a GdkRectangle is clicked? What's the syntax of the accompanying g_signal_connect command?
...
I get those two errors when trying to compile GTK+:
../../gdk/gdkaliasdef.c:1142: error: ‘gdk_drag_context_get_device’ aliased to undefined symbol ‘IA__gdk_drag_context_get_device’
../../gdk/gdkaliasdef.c:1145: error: ‘gdk_drag_context_set_device’ aliased to undefined symbol ‘IA__gdk_drag_context_set_device’
those lines are:
#undef g...
So I'm beginning to wonder how leaky the gnome2 libraries for ruby1.8.6 are.
#!/usr/bin/env ruby
require 'gtk2'
while true
sleep 0.1
pixbuf = Gdk::PixbufLoader.new
pixbuf = nil
end
this leaks about 16kb/sec according to watch -n 1 ps -o rss -p <process id>
This is compounded if you start trying to write a chunk of large chun...