Hi All, I am facing problem with gdk_font_load method in my application. It returns NULL. I am using gtk-2.0 on Redhat Enterprise WS 4. Can anybody help me to resolve this proble? Help says that gdk_font_load is depricated. What is the name of new equivalent method? Thanx in advance, -- Bye, Lalit Kumar Pune On 6/26/06, gtk-list-request@xxxxxxxxx <gtk-list-request@xxxxxxxxx> wrote: > Send submissions to > gtk-list@xxxxxxxxx > > To subscribe or unsubscribe via the World Wide Web, visit > http://mail.gnome.org/mailman/listinfo/gtk-list > or, via email, send a message with subject or body 'help' to > gtk-list-request@xxxxxxxxx > > You can reach the person managing the list at > gtk-list-owner@xxxxxxxxx > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of gtk-list digest..." > > > Today's Topics: > > 1. Re: Drawing images ( with transparency ) one on another (lao wb) > 2. CYGWIN and GTK (carmelo gallucci) > 3. Re: CYGWIN and GTK (Tor Lillqvist) > 4. save copy of gtktextbuffer (Marko Ivancic) > 5. Re: GTK performance on Windows (Clemens Eisserer) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Mon, 26 Jun 2006 11:23:31 +0800 > From: "lao wb" <laowenbo@xxxxxxxxx> > Subject: Re: Drawing images ( with transparency ) one on another > To: " David Ne?as (Yeti) " <yeti@xxxxxxxxxxxxxxx> > Cc: gtk-list@xxxxxxxxx > Message-ID: > <e454f0840606252023r1c90ec9ch4a3ad5dae4c7c218@xxxxxxxxxxxxxx> > Content-Type: text/plain; charset="iso-8859-2" > > Hi, > I need do this too but have not succeeded yet. I try to use > gdk_draw_pixbuf and gdk_pixbuf_composite in expose event handler, but it > still doesn't work. I really need help to make my test code work. > > Laowb > > #include <gtk/gtk.h> > #define STD_WIDTH 680 > #define STD_HEIGHT 480 > > static GdkPixbuf * s_basePix; > static GdkPixbuf * s_homeMenuPix; > > gboolean on_expose(GtkWidget * widget, > GdkEventExpose * ps, > gpointer data) > { > gdk_pixbuf_composite(s_homeMenuPix, > s_basePix, 0, 0, STD_WIDTH, STD_HEIGHT, 0, 0, 0, 0, > GDK_INTERP_NEAREST, 0); > > gdk_draw_pixbuf(widget->window, widget->style->bg_gc[GTK_STATE_NORMAL], > s_homeMenuPix, 0, 0, 0, 0, > STD_WIDTH, > STD_HEIGHT, > GDK_RGB_DITHER_NORMAL, > 0, 0); > return FALSE; > } > > > int main(int argc, char * argv[]) > { > GtkWidget * mainWnd = NULL; > GdkDrawable * pixMap = NULL; > GtkWidget * img = NULL; > GtkWidget * box = NULL; > GtkWidget * button = NULL; > GtkAdjustment * vadj = NULL; > GtkAdjustment * hadj = NULL; > GdkBitmap * msk = NULL; > GdkBitmap * homeMenu = NULL; > > gtk_init(&argc, &argv); > > mainWnd = gtk_window_new(GTK_WINDOW_TOPLEVEL); > > gtk_window_set_title(GTK_WINDOW(mainWnd), "test draw...\n"); > > gtk_signal_connect(GTK_OBJECT(mainWnd), "destroy", gtk_main_quit, NULL); > > img = gtk_image_new(); > gtk_container_add(GTK_CONTAINER(mainWnd), img); > gtk_signal_connect(GTK_OBJECT(img), > "expose-event", > GTK_SIGNAL_FUNC(on_expose), > NULL); > > gtk_container_set_border_width(GTK_CONTAINER(mainWnd), 5); > > gtk_widget_show_all(mainWnd); > > homeMenu = gdk_pixmap_create_from_xpm(mainWnd->window, > &msk, > > &mainWnd->style->bg[GTK_STATE_NORMAL], > "f:/homemenu.bmp"); /* alpha > channel bitmap*/ > s_homeMenuPix = > gdk_pixbuf_get_from_drawable(s_homeMenuPix, > homeMenu, > gdk_colormap_get_system(), > 0, 0, 0, 0, > STD_WIDTH, > STD_HEIGHT); > > pixMap = gdk_pixmap_create_from_xpm(mainWnd->window, > &msk, > > &mainWnd->style->bg[GTK_STATE_NORMAL], > "f:/Sunset.bmp"); /* no alpha > channel bitmap*/ > s_basePix = > gdk_pixbuf_get_from_drawable(s_basePix, > pixMap, > gdk_colormap_get_system(), > 0, 0, 0, 0, > STD_WIDTH, > STD_HEIGHT); > > gtk_main(); > > return 0; > } > > 2006/6/19, David Ne?as (Yeti) <yeti@xxxxxxxxxxxxxxx>: > > > > On Mon, Jun 19, 2006 at 11:35:09AM +0200, hm wrote: > > > > > > I`ve got a problem. I`ve got two separate images. One is background > > for the secondone. Secondone is partially transparent. There is also table. > > Question is : how to draw in one of the table`s cells the backgraound, and > > on this background ( as a second layer ) second image (transparent) ? I > > know ( of course ) how to create images, tables. > > > > Either use gdk_draw_pixbuf() if the correct order (first > > base, then the one with alpha channel) in expose event > > handler, or use gdk_pixbuf_composite() and draw the final > > image. > > > > Yeti > > > > > > -- > > Anonyms eat their boogers. > > _______________________________________________ > > > > gtk-list@xxxxxxxxx > > http://mail.gnome.org/mailman/listinfo/gtk-list > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: /archives/gtk-list/attachments/20060626/bc9fc384/attachment.htm > > ------------------------------ > > Message: 2 > Date: Mon, 26 Jun 2006 14:02:02 +0200 > From: "carmelo gallucci" <cgallucci@xxxxxxxxx> > Subject: CYGWIN and GTK > To: <gtk-list@xxxxxxxxx> > Message-ID: > <!~!UENERkVCMDkAAQACAAAAAAAAAAAAAAAAABgAAAAAAAAA65ik2YhhxU6WZop/cqKJ2MKAAAAQAAAANp6TLCTlRk6OfSts1cGuxQEAAAAA@xxxxxxxxx> > > Content-Type: text/plain; charset="us-ascii" > > I'm doing porting f my gtk application on win2000/Xp using CYGWIN. My > application also use SDL and i want to enable SDL hacking to encapsulate > it on a gtk window. My gtk application run pefectly. I can show widget > and use it. My problem is that i cannot get this code to work (it work > perfectly under linux): > > sprintf(SDL_windowhack,"SDL_WINDOWID=%ld",GDK_WINDOW_XWINDOW(Gtk::Widget > ::gobj()->window)); > > I cannot get WINDOWID. > > When i use the macro GDK_WINDOW_XWINDOW i get the following error: > > (process:1928): GLib-GObject-CRITICAL **: > /instsoft/gnome/platform/glib-2.6.6/go > bject/gtype.c:2254: initialization assertion failed, use g_type_init() > prior to this function > > (process:1928): GLib-GObject-CRITICAL **: > /instsoft/gnome/platform/glib-2.6.6/go > bject/gtype.c:2254: initialization assertion failed, use g_type_init() > prior to this function > > (process:1928): GLib-GObject-CRITICAL **: > /instsoft/gnome/platform/glib-2.6.6/go > bject/gtype.c:2254: initialization assertion failed, use g_type_init() > prior to this function > > (process:1928): GLib-GObject-CRITICAL **: > /instsoft/gnome/platform/glib-2.6.6/go > bject/gtype.c:2254: initialization assertion failed, use g_type_init() > prior to this function > > (process:1928): Gdk-WARNING **: > /instsoft/gnome/platform/gtk+-2.6.10/gdk/x11/gdk > drawable-x11.c:971 drawable is not a pixmap or window > > What's the problem? Anyone know where the problem is? > > Thanks. > > Carmelo Gallucci > > > > ------------------------------ > > Message: 3 > Date: Mon, 26 Jun 2006 17:18:57 +0300 > From: Tor Lillqvist <tml@xxxxxx> > Subject: Re: CYGWIN and GTK > To: "carmelo gallucci" <cgallucci@xxxxxxxxx> > Cc: gtk-list@xxxxxxxxx > Message-ID: <17567.60625.324000.832379@xxxxxxxxxxxxxxxxxx> > Content-Type: text/plain; charset=us-ascii > > carmelo gallucci writes: > > What's the problem? Anyone know where the problem is? > > Well, firstly you are using an unmaintained version of GTK+ (2.6.x). > > Secondly, are you sure what you are doing makes sense? You are using a > GTK+ built for X11 on Cygwin. I don't know anything about SDL, is the > SDL you are using also for X11 on Cygwin? Or are you trying to use a > SDL that would use native Win32 (GDI) together with a GTK+ built for > X11? Surely that can't work. > > --tml > > > > ------------------------------ > > Message: 4 > Date: Mon, 26 Jun 2006 16:47:57 +0200 > From: Marko Ivancic <marko.ivancic@xxxxxxxx> > Subject: save copy of gtktextbuffer > To: gtk-list@xxxxxxxxx > Message-ID: <449FF39D.6080201@xxxxxxxx> > Content-Type: text/plain; charset=ISO-8859-2; format=flowed > > Hi. > > Is there any way to save a GtkTextBuffer (I mean the context of this > buffer including pixbufs and other embedet widgets) into another > GtkTextBuffer instance ?? > > Tnx, > By > Marko I. > > > > ------------------------------ > > Message: 5 > Date: Mon, 26 Jun 2006 16:53:29 +0200 > From: "Clemens Eisserer" <linuxhippy@xxxxxxxxx> > Subject: Re: GTK performance on Windows > To: gtk-list@xxxxxxxxx > Message-ID: > <194f62550606260753v768eeeccv7a67ccf2973c683f@xxxxxxxxxxxxxx> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > I played a bit and found something which could be considered as "slow": > > Open the configuration dialog of gimp and move another window on top of it. > This spikes cpu useage to 80-90% on an AMD Athlon XP 2000+, while you > can still see a ~4mm repaint lag. > > I wonder wether this could also be caused because of inefficient > double buffering ... time will show. > > lg Clemens > > 2006/6/23, Clemens Eisserer <linuxhippy@xxxxxxxxx>: > > First of all thanks a lot for doing that much work porting GTK to windows. > > I can't count how many apps I've used myself on windows-pcs which were > > able to run because of your work. > > > > > If one would ask specific question like "I draw 100000 line segments > > > with separate gdk_draw_line() calls, and it's too slow on Win32" one > > > might get better help. > > > > I installed gimp on some win-xp computers in the company I work for > > (sempron 1,6ghz or so) and also saw some kind of slow behaviour. These > > are very much the issues I have on linux but more "visible". Its the > > UI, menus, window resizing, layout changes or repaint-events sent to > > the window because its content was invalidated. > > I can't say wether its really slow or just feels so, maybe the graphic > > card driver had an influence (nvidia gf4 mx4000) or some other > > circumstances were not optimal. > > I simply never did care that much simply because I don't use/like this planform. > > > > Its just hard to know whats going wrong, especially if someone is no > > gtk insider. > > > > lg Clemens > > > > > ------------------------------ > > _______________________________________________ > > gtk-list@xxxxxxxxx > http://mail.gnome.org/mailman/listinfo/gtk-list > > > End of gtk-list Digest, Vol 26, Issue 37 > **************************************** > _______________________________________________ gtk-list@xxxxxxxxx http://mail.gnome.org/mailman/listinfo/gtk-list