Re: draw a 16bpp unindexed image on PC linux
From: John Cupitt [EMAIL PROTECTED] gtk+-2.4.x/tests/testrgb Chose visual type=true color depth=24, image bpp=32, lsb first Color test time elapsed: 0.82s, 60.8 fps, 15.58 megapixels/s Grayscale test time elapsed: 0.76s, 65.6 fps, 16.80 megapixels/s Alpha test time elapsed: 18.28s, 2.7 fps, 0.70 megapixels/s Alpha test (to pixmap) time elapsed: 18.15s, 2.8 fps, 0.71 megapixels/s I keep OpenGL in mind. Apparently I have to write an object culling system and perhaps a clipping system if I use pixbuf. My software is already starting to look like OpenGL and it is puzzling what I should implement and what I should leave to OpenGL or to GTK. Juhana ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: gtk_widget_set_uposition() in Gtk-2.0?
This function is only really useful on a window, so you are supposed to use gtk_window_set_position() instead. But gtk_window_set_position() doesn't allow an arbitrary position to be specified. You can only really position at the center or the mouse position. This leads me to think that I'm on the wrong track. I'm trying to create my own tooltips (because it seems you can only apply the built-in Gtk-2.0 tooltips on individual widgets, and I need tooltips for various areas within a drawing area). The following code hopefully shows what I'm trying to do, and why I would like to be able to position the window explicity: window = gtk_window_new(GTK_WINDOW_POPUP); hbox = gtk_hbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(window), hbox); label = gtk_label_new(text goes here); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 4); gtk_widget_realize(window); gdk_color_parse(yellow, colour); gtk_widget_modify_bg(window, GTK_STATE_NORMAL, colour); gtk_window_set_position(GTK_WINDOW (window), GTK_WIN_POS_MOUSE); /*gtk_widget_set_uposition(GTK_WINDOW(window), x, y); */ gdk_window_set_decorations(window-window, 0); gtk_widget_show_all(window); gdk_window_raise(window-window); Are you compiling with the compiler flag -Wall? If not, I strongly suggest you do. I always do. I understand what the flag does now - I thought it would prevent the code compiling, but I see it just kicks out a compiler warning. regards, -- David J. Singer [EMAIL PROTECTED] Time flies like an arrow, fruit flies like a banana ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: gtk_widget_set_uposition() in Gtk-2.0?
Le sam 19/06/2004 14:27, David J. Singer a crit : This function is only really useful on a window, so you are supposed to use gtk_window_set_position() instead. But gtk_window_set_position() doesn't allow an arbitrary position to be specified. You can only really position at the center or the mouse position. This leads me to think that I'm on the wrong track. I'm trying to create my own tooltips (because it seems you can only apply the built-in Gtk-2.0 tooltips on individual widgets, and I need tooltips for various areas within a drawing area). The following code hopefully shows what I'm trying to do, and why I would like to be able to position the window explicity: window = gtk_window_new(GTK_WINDOW_POPUP); hbox = gtk_hbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(window), hbox); label = gtk_label_new(text goes here); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 4); gtk_widget_realize(window); gdk_color_parse(yellow, colour); gtk_widget_modify_bg(window, GTK_STATE_NORMAL, colour); gtk_window_set_position(GTK_WINDOW (window), GTK_WIN_POS_MOUSE); /*gtk_widget_set_uposition(GTK_WINDOW(window), x, y); */ gdk_window_set_decorations(window-window, 0); gtk_widget_show_all(window); gdk_window_raise(window-window); Are you compiling with the compiler flag -Wall? If not, I strongly suggest you do. I always do. I understand what the flag does now - I thought it would prevent the code compiling, but I see it just kicks out a compiler warning. Try using gtk_window_move signature.asc Description: Ceci est une partie de message =?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?= ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: gtk_widget_set_uposition() in Gtk-2.0?
Hi, David J. Singer [EMAIL PROTECTED] writes: This function is only really useful on a window, so you are supposed to use gtk_window_set_position() instead. But gtk_window_set_position() doesn't allow an arbitrary position to be specified. You can only really position at the center or the mouse position. Well, you want to use gtk_window_move() then. window = gtk_window_new(GTK_WINDOW_POPUP); hbox = gtk_hbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(window), hbox); label = gtk_label_new(text goes here); gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 4); gtk_widget_realize(window); gdk_color_parse(yellow, colour); gtk_widget_modify_bg(window, GTK_STATE_NORMAL, colour); gtk_window_set_position(GTK_WINDOW (window), GTK_WIN_POS_MOUSE); /*gtk_widget_set_uposition(GTK_WINDOW(window), x, y); */ gdk_window_set_decorations(window-window, 0); You don't need to unset decorations on a popup window. gtk_widget_show_all(window); gdk_window_raise(window-window); Use gtk_window_present() instead of gdk_window_raise(). That will allow you to write your code w/o accessing window-window so you can get rid of the nasty call to gtk_widget_realize(). Sven ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
passwords as *
i am a newbie in GTK.tell me how do i make text esp. passwords, when entered ,be displayed as *(asterisk) Indiatimes Email now powered by APIC Advantage. Help! HelpClick on the image to chat with me ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: passwords as *
Le sam 19/06/2004 15:47, vikram_dravid_sr a crit : i am a newbie in GTK.tell me how do i make text esp. passwords, when entered ,be displayed as *(asterisk) __ GTkEntry *entry; entry = GTK_ENTRY (gtk_entry_new ()); gtk_entry_set_visibility (entry, FALSE); signature.asc Description: Ceci est une partie de message =?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?= ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Building shared libraries under cygwin
Hi, I'm trying to build GTK+2.4.3, Pango 1.4, GLib 2.4.2 and ATK 1.6.0 under Cygwin, and it's not going completely right. It seems that not all shared libraries are build correctly. 1. I managed to get ATK to build correctly with shared libraries, but: I had to modify atk/Makefile.in:39 to add a $(srcdir) in front of the atk.def file (otherwise it didn't build in a vpath). 2. GLib builds correctly as far as I can tell. 3. Pango doesn't build all the shared libraries correctly. I'm trying to build this under an X11 environment, and for example pangoxft doesn't build as a shared library due to missing symbols. Presumable this needs a separate 'pangoxft.def' file? From the compilation output I know that there are a (small) number of other shared liraries that also fail to build due to missing/undefined symbols. Are there any fixes to pango to get it to build the shared libraries correctly? Kind regards, Maarten ps. In case this is fixed in CVS, are there any snapshots available? On my system (cygwin) I can't go through the autoconf stuff because packages like jade/openjade are not available... ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: Building shared libraries under cygwin
Hi, Maarten Boekhold [EMAIL PROTECTED] writes: ps. In case this is fixed in CVS, are there any snapshots available? On my system (cygwin) I can't go through the autoconf stuff because packages like jade/openjade are not available... You shouldn't need these if you pass --disable-gtk-doc to autogen.sh. Sven ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: gtk_widget_set_uposition() in Gtk-2.0?
Well, you want to use gtk_window_move() then. Ah. Yes. And thanks for the other tips too. regards -- David J. Singer [EMAIL PROTECTED] Time flies like an arrow, fruit flies like a banana ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
output in gtktextview
how to catch the output of a command(cdparanoia) and send to GtkTextView in real time while the command this in execution ? Thanks! ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: output in gtktextview
Le sam 19/06/2004 19:56, Ranieri a crit : how to catch the output of a command(cdparanoia) and send to GtkTextView in real time while the command this in execution ? Thanks! g_spawn_asyn_with_pipes might be the solution. signature.asc Description: Ceci est une partie de message =?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?= ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: How to create a scrolled text window with GTK 2.x?
Hi I have also tried this: GtkWidget* textWindow = gtk_text_view_new(); GtkWidget* scrolledTextWindow = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledTextWindow), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW(scrolledTextWindow), textWindow); Textview has native scrolling, so use: gtk_container_add( GTK_CONTAINER( scrolledTextWindow ), textWindow ); This will scroll when you type - I'm not sure what happens, if you add text via the gtk_text_buffer_* funtions. About the GtkPaned stuff: I had a look at the code, and there aren't any signals emitted. Seems nobody cared about the widget for a long time. Best would be to create a bug report. Maybe you want to provide a proper implementation. Jan-Marek ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list
Re: how to put image as background of window
Hi To set a background image use: gdk_window_set_back_pixmap At ftp://ftp.gnome.org/pub/gnome/sources/gdk-pixbuf you can find the old pixbuf code for gtk+ v1.2. This can handle image loading, drawing, scaling etc. Take a look at the API at http://developer.gnome.org/doc/API/gdk-pixbuf/ People tend to forget it: there are demo application included in the source distributions of Gtk, which help to understand how things can be done. HTH Jan-Marek ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list