Re: Native Windows Gtk+ from Cygwin

2005-12-13 Thread Tor Lillqvist
Daryl Lee writes: > I changed the name of pkg-config to pkg-config-win, so I could use > one or the other, depending on the context for which an app is > intended. Am I just asking for trouble doing that? No. As long as you remember what you are doing, and as long as no prepackaged configure s

Re: Reference to a C++ object in GTK+ callbacks

2005-12-13 Thread Daryl Lee
On Tue, 2005-12-13 at 16:30 -0800, Stephen Pollei wrote: > On 12/13/05, Paul Santa Maria <[EMAIL PROTECTED]> wrote: > > I'm coding in C++, but using the "raw" GTK+ C > > libraries. > I'm doing similiar for a game I'm making. > > >-- > > gboolean > > play_cb (gpointer data) > >

Re: Reference to a C++ object in GTK+ callbacks

2005-12-13 Thread Stephen Pollei
On 12/13/05, Paul Santa Maria <[EMAIL PROTECTED]> wrote: > I'm coding in C++, but using the "raw" GTK+ C > libraries. I'm doing similiar for a game I'm making. >-- > gboolean > play_cb (gpointer data) > { > // Deference the object pointer to do the actual work > AnimationFi

Re: Reference to a C++ object in GTK+ callbacks

2005-12-13 Thread Wallace Owen
AnimationFile must have a public virtual function void start(), and m_animation must actually point to an Hbafile, so that when you cast the void* to AnimationFile* it's going to find a vtable slot for start(). If AnimationFile's start() isn't declared virtual, it won't go through the vtable. With

Re: Reference to a C++ object in GTK+ callbacks

2005-12-13 Thread Andrew J. Montalenti
How about trying gdb, seeing what the value of ani is at the time of the crash. How about a backtrace? It's hard to debug your problem as described. But I have a feeling with some minimal gdb'ing you can find the bug yourself. -Andrew On Tue, 2005-12-13 at 16:00 -0800, Paul Santa Maria wrote:

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 some text regar

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 => -- c

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

2005-12-13 Thread Andrew J. Montalenti
Pango probably is "the right way to do it;" an alternative is to use Cairo's "toy text API," described here: http://www.cairographics.org/manual/cairo-Text.html This has a pretty straightforward approach, e.g.: ... cairo_select_font_face(cr, "Trebuchet MS", CAIRO_FONT_WEIGHT_BOLD, CAIRO_FON

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 > >

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: 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 GdkDrawabl

Re: how can include just glib

2005-12-13 Thread Yiannis
Thanks guys It works fine. On 13/12/05, Fernando Apesteguía <[EMAIL PROTECTED]> wrote: > > Did you try to make this? > > #include > > And then link with > > -lglib-2.0 (link against your glib version) > > Best regards > > -- Forwarded message -- > From: Yiannis <[EMAIL PROTECT

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 > > 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

how can include just glib

2005-12-13 Thread Fernando Apesteguía
Did you try to make this? #include And then link with -lglib-2.0 (link against your glib version) Best regards -- Forwarded message -- From: Yiannis <[EMAIL PROTECTED]> Date: 13-dic-2005 16:08 Subject: how can include just glib To: gtk-app-devel-list@gnome.org Hi, I would li

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

how can include just glib

2005-12-13 Thread Yiannis
Hi, I would like to use just glib in my programming without the header files of gtk How is that possible? Cheers. -- -- Yiannis ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-li

Re: drawing an RGB bitmap or pixbuf

2005-12-13 Thread Andreas Stricker
Matt Hull schrieb: I am new to gtk and trying to draw a bitmap to the screen. the bitmap is about 200 by 300 pixels with 8 bit rgb, total is 24 bits. alpha is optional at the moment. But important is only that it should be in a file format supported by GTK (png, xpm, etc.) for now it is 0xf

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