Re: drawing an RGB bitmap or pixbuf

2005-12-13 Thread Kathrin Hauptvogel
Good morning I had the same problem many days ago. I hope this will solve your problem. add(*manage(new Gtk::Image(filename))); show_all(); bye Kathrin Am Dienstag, 13. Dezember 2005 00:06 schrieb Matt Hull: I am new to gtk and trying to draw a bitmap to the screen. the bitmap is about 200

Looking for example to draw a simple red text on my GtkDrawable

2005-12-13 Thread Bernd Muent
Hi together, I (only) want to draw a red text Example or whatever in the middle of a GtkDrawable. First I looked at gdk_draw_text. I did not find out how to draw a text in a specific color. And the other problem is that the documentation says that it is deprecated. I should use Pango rendering.

Re: how can include just glib

2005-12-13 Thread Vivien Malerba
2005/12/13, Fernando Apesteguía [EMAIL PROTECTED]: Did you try to make this? #include glib.h And then link with -lglib-2.0 (link against your glib version) You should use `pkg-config --cflags glib-2.0` to get the list of include flags and `pkg-config --libs glib-2.0` to get the list of

Re: drawing an RGB bitmap or pixbuf

2005-12-13 Thread Andrew J. Montalenti
Dear Matt, See gtk_image_set_from_pixbuf() and GdkPixbuf if you want to load the bitmap from a file. See gtk_image_set_from_pixmap() and gdk_draw_rgb_image() if you want to get the image data from some RGB buffer. You also need to create a pixmap with gdk_pixmap_new(). GdkPixmaps are

Top Window Background

2005-12-13 Thread Andy Grebe
I've got a callback function where I want to change the background of the entire window. I can set the color on startup using: style = gtk_widget_get_style(topWindow); style-bg[0] = c; style-bg[1] = c; style-bg[2] = c; style-bg[3] = c; style-bg[4] = c; gtk_widget_set_style(topWindow, style);

Re: Native Windows Gtk+ from Cygwin

2005-12-13 Thread Daryl Lee
On Mon, 2005-12-12 at 14:55 +0200, Tor Lillqvist wrote: Daryl Lee writes: I'm trying to use Cygwin to build a native Windows app using Gtk+. First, the symptoms. When I run the executable froma DOS prompt, I get an error alert: This application as failed to start because

Reference to a C++ object in GTK+ callbacks

2005-12-13 Thread Paul Santa Maria
Hi - I'm using the GTK+ 2.6.4 that came with Suse 9.3. I'm coding in C++, but using the raw GTK+ C libraries. I'm trying to pass a pointer to one of my C++ classes into a callback, so that I can call a method on that class. The code looks like this: 1. less hbaview.h = --

Re: Looking for example to draw a simple red text on my GtkDrawable

2005-12-13 Thread HuamiSoft Hubert Sokolowski
Hi! You can use context = gdk_pango_context_get (); layout = pango_layout_new (context); pango_layout_set_alignment (layout, PANGO_ALIGN_LEFT); pango_layout_set_markup (layout, str, -1); gdk_draw_layout (drawable, gc, x, y, layout); where str is pango markup text for example span

Re: public barrier functions

2005-12-13 Thread Sebastian Wilhelmi
Hi Paul, But I'd be interested to see some benchmarks; see how much this actually matters. Run a typical program twice; once with functions and once with some inlines/macros. It's quite likely that in a real-world program, the ratio of time it actually spends doing the atomic operation

Re: public barrier functions

2005-12-13 Thread Balazs Scheidler
On Mon, 2005-12-12 at 22:41 +0100, Sebastian Wilhelmi wrote: Hi Balazs, Is there a specific reasons why the barrier functions implemented by gatomic.c and gatomic.h are not exported APIs? We didn't want to create the Swiss army knife for high performance multithread programming, just

Re: Updated proposal for making the GtkFileChooser code asynchronous

2005-12-13 Thread Kristian Rietveld
On Fri, Dec 09, 2005 at 09:27:02PM +0100, Soeren Sandmann wrote: If you cancel an operation such as create_folder() before the callback is called, what are the semantics? 1 the operation will not have been completed, ie., no folder was created and no folder will be created

GTK_FLOATING broken in 2.9?

2005-12-13 Thread Murray Cumming
In GTK+ 2.9, GTK_FLOATING is deprecated and README.in states that it can no longer be used to detect floating objects. I hope nobody is using that. I assume that effort was made to avoid this ABI breakage. But does this also mean that setting GTK_FLOATING has no effect with 2.9? We do use this in

Re: linking / performance / interposing detection ...

2005-12-13 Thread Alexander Larsson
On Fri, 2005-12-09 at 14:36 +, michael meeks wrote: I guess the fix would be to use G_MODULE_BIND_LOCAL ( at least - assuming that does the right thing ) - in all the g_module_opens - which would surely be a fairly painless change / patch ? I did this for gnome-vfs an nautilus,

Re: GTK_FLOATING broken in 2.9?

2005-12-13 Thread Murray Cumming
On Tue, 13 Dec 2005, Murray Cumming wrote: In GTK+ 2.9, GTK_FLOATING is deprecated and README.in states that it can no longer be used to detect floating objects. I hope nobody is using that. I assume that effort was made to avoid this ABI breakage. But does this also mean that setting

Re: linking / performance / interposing detection ...

2005-12-13 Thread Federico Mena Quintero
On Fri, 2005-12-09 at 14:36 +, michael meeks wrote: So - as part of my -Bdirect work - trying to detect genuine cases of interposing - I ran my simple perl script over all my gnome libraries: http://go-oo.org/ooo-build/bin/finterpose (for which I attach the gnome specific exclusions

Re: GTK_FLOATING broken in 2.9?

2005-12-13 Thread Jean Bréfort
Le mardi 13 décembre 2005 à 11:44 -0500, Matthias Clasen a écrit : On 12/13/05, Murray Cumming [EMAIL PROTECTED] wrote: gtkmm 2.8 depends on glib/gtk 2.8, right? then you don't have g_object_force_floating() there. would it be of any help to

Re: inlining glib functions (Was: public barrier functions)

2005-12-13 Thread muppet
Gustavo J. A. M. Carneiro said: IMHO, some functions are obvious candidates for inlining, regardless of any profiling done on them. For instance: gchar* g_strdup (const gchar *str) { gchar *new_str; gsize length; if (str) { length = strlen (str) + 1; new_str

Re: inlining glib functions (Was: public barrier functions)

2005-12-13 Thread Tim Janik
On Tue, 13 Dec 2005, Gustavo J. A. M. Carneiro wrote: Ter, 2005-12-13 às 17:11 +0100, Tim Janik escreveu: more important than _how_ to inline is _what_ and _why_ to inline. in general, things that can easily and reasonably be inlined have been already been provided as inlined functions or

Re: inlining glib functions (Was: public barrier functions)

2005-12-13 Thread Gustavo J. A. M. Carneiro
On Tue, 2005-12-13 at 15:40 -0500, muppet wrote: Gustavo J. A. M. Carneiro said: IMHO, some functions are obvious candidates for inlining, regardless of any profiling done on them. For instance: gchar* g_strdup (const gchar *str) { gchar *new_str; gsize length; if

Re: linking / performance / interposing detection ...

2005-12-13 Thread James Henstridge
Federico Mena Quintero wrote: On Tue, 2005-12-13 at 12:16 -0600, Federico Mena Quintero wrote: Very neat. How do interposed symbols happen? Is it just people forgetting to put a static somewhere? That seems to be the case for parent_class in metal_gtk2_engine.c. Bah, I see now that

Bug #323956: Unwanted accelerate key in the action-based toolbar.

2005-12-13 Thread Yang Hong
I've submited this bug in the bugzilla, and I tried to fix it in the _gtk_toolbar_elide_underscores (...), even I force gtk_tool_button_construct_contents (...) in the gtk/gtktoolbutton.c to elide the label widget, I was failed.:-( Any comments? my patch on the _gtk_toolbar_elide_underscores,