Re: 100 Different Colors

2005-06-21 Thread Jan-Marek Glogowski
Hi I need to create 100 little squares and each of them has to be a different color. They can't just be a random color: they have to follow the colors of the standard color spectrum/palette. For example, the first one is dark blue, then lighter blue, ... , green, ... , red. Std. color

Re: segmentation fault when trying to save a pixbuf into a file

2005-06-21 Thread Tim Müller
On Tuesday 21 June 2005 12:59, y g wrote: I had posted in the past but with no luck about segmentation faults that I am getting when trying to save a pixbuf into a file. With a bit more debugging this is the error I am getting when I try: gdk_pixbuf_save(pixbuf, temp.bmp, bmp, NULL);

gtk_entry display val

2005-06-21 Thread srinivas
hi ; i want to display int values in gtk_entry widget; gchar data=(gchar *)malloc(sizeof(gchar)*MAX_SIZE); for (int_num =0; int_num data; int_num++) { sprintf (data, %d, int_num); gtk_entry_set_text (GTK_ENTRY (win_entry),(gchar *) int_num );

Re: What key is now pressed?

2005-06-21 Thread Jan
The main idea to know that key press or down in whole system, not only if my window have focus. On Mon, Jun 20, 2005 at 02:27:18PM -0400, Liam R. E. Quin wrote: On Mon, 2005-06-20 at 21:28 +, Jan wrote: Hello. Using gdk_display_get_pointer, I can know is ctrl, alt, shift now up or

Re: 100 Different Colors

2005-06-21 Thread Lola Smith
Jan-Marek, thanks for your response. I tried this: for (i=0; i100; i++) { c.pixel = 0; c.red = G_MAXUINT16; c.blue = (i % 33 / 99) * G_MAXUINT16; c.green = i/99 * G_MAXUINT16; gdk_gc_set_rgb_fg_color( gc, c ); gdk_draw_rectangle (widget-window, gc, TRUE, i*15, 0, 11,

Re: What key is now pressed?

2005-06-21 Thread Tristan Van Berkom
Jan wrote: The main idea to know that key press or down in whole system, not only if my window have focus. I think this is as close as it gets using GTK+: http://developer.gnome.org/doc/API/2.0/gtk/gtk-General.html#gtk-key-snooper-install This callback will be called for every key press /that

gscanner

2005-06-21 Thread Joseph Turner
Hi Basically, getting some errors when I use gscanner, and I think I've narrowed it down to my attempt to set - cpair_comment_single to --\n (The default is #\n) I suspect this is because it is expecting only ONE character as the start of the comment. Any thoughts on this? I can probably get

what's GtkAnchorType or GtkAnchor intented to do ?

2005-06-21 Thread ztl_post
What is gtk Anchor intented to do ? I searches the reference manual, but no interpretation was found. What is a anchor ? May anyone explain it ? thanks. -- You have been selected for a secret mission. ___ gtk-app-devel-list mailing list

Re: gtk_entry display val

2005-06-21 Thread Antonio Gomes
Sorry , if I did not understand properly your intentions. If so, I suggest you take a look at: http://developer.gnome.org/doc/API/2.0/gtk/GtkSpinButton.html regards On 6/21/05, srinivas [EMAIL PROTECTED] wrote: hi ; i want to display int values in gtk_entry widget; gchar data=(gchar

RE: 100 Different Colors

2005-06-21 Thread Lola Smith
Before your call to gdk_set_rgb_fg_color, do a g_print on the values of c.red, c.blue, c.green, and i. You may be surprised at what you see. You're right. They're all the same thoughout the loop. red = 65535, blue = 0, green = 0, except at the very end green = 65535 (hence the yellow color).

Re: 100 Different Colors

2005-06-21 Thread Kevin DeKorte
You are dividing first and getting an int 0 * G_MAXUINT16 in the line c.green = i/99 * G_MAXUINT16; Multiply first and then divide. you might need a long int tmp to hold the value prior to assigning to c.green. By dividing first you basically are doing a multiply by 0 and that is why it is 0

Re: 100 Different Colors

2005-06-21 Thread Kevin DeKorte
Also c.green = (i/99.0) * G_MAXUINT16; Might work as well. Kevin On Tuesday 21 June 2005 02:08 pm, Kevin DeKorte wrote: You are dividing first and getting an int 0 * G_MAXUINT16 in the line c.green = i/99 * G_MAXUINT16; Multiply first and then divide. you might need a long int tmp to

Re: gtk_entry display val

2005-06-21 Thread srinivas
hi all; according to your suggestion i can use spinbutton, but can i display the spinbutton with out arrows. thanks for reply; srinivas. On Tue, 2005-06-21 at 19:21, srinivas wrote: hi ; i want to display int values in gtk_entry widget; gchar data=(gchar

Fwd: Using GtkTextTags with Cursive script like Arabic

2005-06-21 Thread Gaurav Jain
Hi, I sent this query to the i18list, but received no response. Maybe it is more of a generic issue with GtkTextTags, so I thought I will post it to this list. Please do let me know if you have any comments on this problem. Thanks, Gaurav -- I'm trying to allow rich-text editing in a