about button_press_signal?

2002-01-17 Thread changan

/*function first*/
#include gtk/gtk.h
#include stdio.h
gint response(GtkWidget *widget,GdkEvent* event,gpointer data)
{
printf(button was pressed\n);
}
int main(int argc,char *argv[])
{
GtkWidget *window;

gtk_init(argc,argv);
window=gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_widget_set_usize(window,300,200);

gtk_signal_connect(GTK_OBJECT(window),delete_event,GTK_SIGNAL_FUNC(gtk_mai
n_quit),NULL);
gtk_widget_show(window);


gtk_signal_connect_object(GTK_OBJECT(window),button_press_event,GTK_SIGNAL
_FUNC(response),NULL);

gtk_main();
exit(0);
}

/*function second*/
#include gtk/gtk.h
#include stdio.h
gint response(GtkWidget *widget,GdkEvent* event,gpointer data)
{
printf(button was pressed\n);
}
int main(int argc,char *argv[])
{
GtkWidget *window;
GtkWidget *fixed;

gtk_init(argc,argv);
window=gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_widget_set_usize(window,300,200);

gtk_signal_connect(GTK_OBJECT(window),delete_event,GTK_SIGNAL_FUNC(gtk_mai
n_quit),NULL);
gtk_widget_show(window);

fixed=gtk_fixed_new();
gtk_container_add(GTK_CONTAINER(window),fixed);
gtk_widget_show(fixed);


gtk_signal_connect_object(GTK_OBJECT(window),button_press_event,GTK_SIGNAL
_FUNC(response),NULL);

gtk_main();
exit(0);
}

The second function can receive button_press_event and the first can
not,why?
The widget that inherit GtkWidget could catch button_press_event,didn't so?
In second function I replaced GtkFixed by GtkBox . Then it can't catch
button_press_event.
Who can explain for me ?
Thank you!
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



Text-View-Width

2002-01-17 Thread Alberto Manuel Brandao Simoes


Same problem with the 'mono' face!
-- 
f u cn rd ths, u cn gt a gd jb n cmptr prgrmmng.
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



need statistics

2002-01-17 Thread azra yasin
hello , 
i am working on a GUI project of GCC for linux , i want to know some statistics about the need to develop the GUI for linux command line compiler. can any one provide me such statistics. 
thanks in advance.
azra Do You Yahoo!?
Send FREE video emails in Yahoo! Mail.

Re: need statistics

2002-01-17 Thread Jeff Creem



Yes...66% of the people don't understand your question. 33% 
are not sure if there is a question in the
statements below.

  - Original Message - 
  From: 
  azra 
  yasin 
  To: [EMAIL PROTECTED] 
  Sent: Thursday, January 17, 2002 4:48 
  AM
  Subject: need statistics 
  
  hello , 
  i am working on a GUI project of GCC for linux , i want to know some 
  statistics about the need to develop the GUI for linux command line compiler. 
  can any one provide me such statistics. 
  thanks in advance.
  azra 
  
  
  Do You Yahoo!?Send FREE video 
  emails in Yahoo! 
Mail.


Re: need statistics

2002-01-17 Thread Appar



Team,
All these days we were using this email service 
effectitivly. I request allnot to miss use 
it.
If you still want to have communication with one 
person which is not relevant to gtk, please send him/her email directly. I sorry 
to say this.
Thanks  RegardsAppar

  - Original Message - 
  From: 
  Santhosh Kumar Divakar 
  To: Jeff Creem ; azra 
  yasin ; [EMAIL PROTECTED] 
  Sent: Thursday, January 17, 2002 5:21 
  PM
  Subject: Re: need statistics 
  
  hi azra,
   i think its not required for any 
  class of programmer except for a sloth.
  i do not have any statistics but then i have seen 
  people using command 
  line cribbing when they come over to VC++. 
  somethings are better where
  they are. 
   BTW jeff has probably got an almost 
  correct statistics here. around 200 
  people will see this need. the only 1 % who 
  understands this is 2 ppl. one
  u and another me ;))).
   regards
  
  
  
- Original Message - 
From: 
Jeff Creem 

To: azra yasin ; [EMAIL PROTECTED] 
Sent: Thursday, January 17, 2002 5:14 
PM
Subject: Re: need statistics 

Yes...66% of the people don't understand your question. 
33% are not sure if there is a question in the
statements below.

  - Original Message - 
  From: 
  azra yasin 
  To: [EMAIL PROTECTED] 
  Sent: Thursday, January 17, 2002 4:48 
  AM
  Subject: need statistics 
  
  hello , 
  i am working on a GUI project of GCC for linux , i want to know some 
  statistics about the need to develop the GUI for linux command line 
  compiler. can any one provide me such statistics. 
  thanks in advance.
  azra 
  
  
  Do You Yahoo!?Send FREE video 
  emails in Yahoo! 
  Mail.


Re: need statistics

2002-01-17 Thread Michael Natterer

Hi,

Would you please stop sending HTML mail to the list?

thnaks,
--Mitch
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



Copying bitmaps into bitmaps

2002-01-17 Thread Edscott Wilson García


I've been trying to copy a bitmap into a bitmap with gdk_draw_pixmap(), 
without success. Is it necesary to use XCopyPlane in lieu of some gdk routine?
Basically all I want to do is a binary OR between the data in the 2 bitmaps.

TIA,

Edscott Wilson Garcia
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



Re: Copying bitmaps into bitmaps

2002-01-17 Thread Havoc Pennington


Edscott Wilson García [EMAIL PROTECTED] writes:
 I've been trying to copy a bitmap into a bitmap with gdk_draw_pixmap(), 
 without success. Is it necesary to use XCopyPlane in lieu of some
 gdk routine?

When you say without success, what happens? It should work fine.

 Basically all I want to do is a binary OR between the data in the 2 bitmaps.
 

That isn't what gdk_draw_pixmap() normally does, it just copies the
bits and overwrites the ones in dest. Look at gdk_gc_set_function(), 
I'm not sure it affects drawing a pixmap but I think it might.

Havoc
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



Re: need statistics

2002-01-17 Thread Valdis . Kletnieks

On Thu, 17 Jan 2002 01:48:31 PST, azra yasin [EMAIL PROTECTED]  said:

 i am working on a GUI project of GCC for linux , i want to know some statistics 
about the need to develop the GUI for linux command line compiler. can any one 
provide me  such statistics. 

GCC is almost always used in a Makefile/configure/autoconf type environment,
and as such a GUI interface wouldn't get you much.  What would it do, allow
you to set flags via buttons? (-fvomit-frame-pointer on/off)?

What *would* be interesting would be a more integrated environment such as
IBM's VisualAge compiler or the SGI compiler tools, to do things like
(for example) if you edit a function and add a parameter to it, that it
would then show you all the places that function was called and prompt you
to fix the calls.

But that's a job for emacs/etags, not the compiler itself
-- 
Valdis Kletnieks
Computer Systems Senior Engineer
Virginia Tech




msg07419/pgp0.pgp
Description: PGP signature


Re: Copying bitmaps into bitmaps

2002-01-17 Thread Edscott Wilson García

On Thu 17 Jan 2002 10:01, Havoc Pennington wrote:
 Edscott Wilson García [EMAIL PROTECTED] writes:
  I've been trying to copy a bitmap into a bitmap with gdk_draw_pixmap(),
  without success. Is it necesary to use XCopyPlane in lieu of some
  gdk routine?

 When you say without success, what happens? It should work fine.

I get messages like:

xftree: Fatal XLib internal error
BadMatch (invalid parameter attributes)
Request 62, Error 8

when I try to use the resulting bitmap. It croaks with only one copy from 
existing bitmap to a bitmap created with  
gdk_pixmap_new(window,pix_w,pix_h,1). 

After looking at a book by Barkakati, (X Window System Programming, 1991) he 
says that bitmaps should be copied into pixmaps by XCopyPlane(), not 
XCopyArea() (the latter being used by gdk_draw_pixmap()).


  Basically all I want to do is a binary OR between the data in the 2
  bitmaps.

 That isn't what gdk_draw_pixmap() normally does, it just copies the
 bits and overwrites the ones in dest. Look at gdk_gc_set_function(),
 I'm not sure it affects drawing a pixmap but I think it might.

Basically what I want is a transparency mask resulting from the combination 
of two (or more) pixmaps with different transparency masks. Which would be a 
binary AND between the data. I'll look at gdk_gc_set_function(), and see what 
I can do with it.

saludos,

Edscott

 

 Havoc
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



change the colour of widget after it has been shown

2002-01-17 Thread Rahul Pande

Hi,

please give me some hint on how to solve this...

the problem is that i have already drawn an (arrow)
widget, and after gtk_main has been called, i will
monitor a file for input. 

when there is input, a function will be called, and 
I have the address of the arrow widget, and now at
this stage, is there any way to change its color to
some other, and back, i.e. as if the arrow has flashed


(i dont want to destroy it and redraw it with another
color) 

regards,
rahul





---
Information transmitted by this E-MAIL is proprietary to Wipro and/or its Customers and
is intended for use only by the individual or entity to which it is
addressed, and may contain information that is privileged, confidential or
exempt from disclosure under applicable law. If you are not the intended
recipient or it appears that this mail has been forwarded to you without
proper authority, you are notified that any use or dissemination of this
information in any manner is strictly prohibited. In such cases, please
notify us immediately at mailto:[EMAIL PROTECTED] and delete this mail
from your records.




Re: change the colour of widget after it has been shown

2002-01-17 Thread Paul Davis

please give me some hint on how to solve this...

first of all, please turn off the automatic use of MIME by your email
system. there is no reason to use attachments to bind a
disclaimer. its also a highly inappropriate disclaimer given that you
are writing to a public mailing list asking for assistance, and using
MIME to attach it is bad, especially when the disclaimer is regular
ASCII (the standard format for all email).

the problem is that i have already drawn an (arrow)
widget, and after gtk_main has been called, i will
monitor a file for input. 

when there is input, a function will be called, and 
I have the address of the arrow widget, and now at
this stage, is there any way to change its color to
some other, and back, i.e. as if the arrow has flashed


http://pobox.com/~hp/gtk-colors.html

and Havoc - can we get a link to this document added to the GTK+ FAQ?
it and the threads questions are the 2 most common queries here, and
being able to just tell people to look at the FAQ would be good.

--p
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



Re: Copying bitmaps into bitmaps

2002-01-17 Thread Havoc Pennington


Edscott Wilson García [EMAIL PROTECTED] writes: 
 After looking at a book by Barkakati, (X Window System Programming, 1991) he 
 says that bitmaps should be copied into pixmaps by XCopyPlane(), not 
 XCopyArea() (the latter being used by gdk_draw_pixmap()).


That's right, but I thought you were copying between two bitmaps. 
CopyArea() should work OK for that AFAIK.

The bad match is caused by copying between two pixmaps with a
different bit depth.
 
Havoc
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



Re: Copying bitmaps into bitmaps

2002-01-17 Thread Edscott Wilson García

On Thu 17 Jan 2002 13:38, Havoc Pennington wrote:
 Edscott Wilson García [EMAIL PROTECTED] writes:
  After looking at a book by Barkakati, (X Window System Programming, 1991)
  he says that bitmaps should be copied into pixmaps by XCopyPlane(), not
  XCopyArea() (the latter being used by gdk_draw_pixmap()).

 That's right, but I thought you were copying between two bitmaps.
 CopyArea() should work OK for that AFAIK.

But isn't a bitmap nothing more than a pixmap of depth 1? If 
gdk_pixmap_new(window,pix_w,pix_h,1);
is not the correct way to create an empty bitmap with gtk, how should it be 
created?

edscott


 The bad match is caused by copying between two pixmaps with a
 different bit depth.

 Havoc
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



Re: change the colour of widget after it has been shown

2002-01-17 Thread Flávio Alberto Lopes Soares

I create 2 pixmaps equals and put a gtk_timeout_add to swap these
pixmaps (I change the function create_pixmap from support.c from
gladefiles to make this swap), I believe that works, in this way the
pixmap seems to blink. I don't know if it is the better way,
but...works.

The function that make pixmap swap:


int
troca_pixmap(gpointer user_data, char *nome_pixmap, char *filename,
gboolean use_pixmap_interno, GdkPixmap *pixmap_interno)
{

  GtkWidget *pixmap;
  GdkColormap *colormap;
  GdkPixmap *gdkpixmap;
  GdkBitmap *mask;
  gchar *pathname = NULL;

  pixmap = lookup_widget(user_data, nome_pixmap); /* lookup_widget from
support.c from glade */

  if(use_pixmap_interno == FALSE)
{
  if (!filename || !filename[0])
return -1;

  pathname = gnome_pixmap_file (filename);
  if (!pathname)
{
  g_warning (_(Couldn't find pixmap file: %s), filename);
  return -1;
}

  colormap = gtk_widget_get_colormap (user_data);

  gdkpixmap = gdk_pixmap_colormap_create_from_xpm (NULL, colormap,
mask, NULL, pathname);

  if (gdkpixmap == NULL)
{
  g_warning (_(Couldn't create pixmap from file: %s), pathname);
  g_free (pathname);
  return -1;
}
}

   else
 {
  if (pixmap_interno == NULL)
{
  g_warning (_(Couldn't create pixmap from pixmap_interno));
  return -1;
}

   gdkpixmap = pixmap_interno;
 }

  if(use_pixmap_interno == FALSE)
{
  g_free (pathname);
  gtk_pixmap_set(GTK_PIXMAP(pixmap), gdkpixmap, mask);
}
  else
  gtk_pixmap_set(GTK_PIXMAP(pixmap), gdkpixmap, NULL);

   if(use_pixmap_interno == FALSE)
 {
   gdk_pixmap_unref (gdkpixmap);
   gdk_bitmap_unref (mask);
 }

  return 1;
}



Success
Flavio Alberto

Em 18 Jan 2002 01:13:54 +0530, Rahul Pande escreveu:
 Hi,
 
 please give me some hint on how to solve this...
 
 the problem is that i have already drawn an (arrow)
 widget, and after gtk_main has been called, i will
 monitor a file for input. 
 
 when there is input, a function will be called, and 
 I have the address of the arrow widget, and now at
 this stage, is there any way to change its color to
 some other, and back, i.e. as if the arrow has flashed
 
 
 (i dont want to destroy it and redraw it with another
 color) 
 
 regards,
 rahul
 
 
 
 
 --=_NextPartTM-000-2eea1f60-0b5c-11d6-a941-00b0d0d06be8
 
---
 Information transmitted by this E-MAIL is proprietary to Wipro and/or its Customers 
and
 is intended for use only by the individual or entity to which it is
 addressed, and may contain information that is privileged, confidential or
 exempt from disclosure under applicable law. If you are not the intended
 recipient or it appears that this mail has been forwarded to you without
 proper authority, you are notified that any use or dissemination of this
 information in any manner is strictly prohibited. In such cases, please
 notify us immediately at mailto:[EMAIL PROTECTED] and delete this mail
 from your records.
 


___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



Re: Copying bitmaps into bitmaps

2002-01-17 Thread Havoc Pennington


Edscott Wilson García [EMAIL PROTECTED] writes: 
 But isn't a bitmap nothing more than a pixmap of depth 1? If 
 gdk_pixmap_new(window,pix_w,pix_h,1);
 is not the correct way to create an empty bitmap with gtk, how should it be 
 created?

That is the right way. One of us is missing some detail.

Havoc
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



Re: change the colour of widget after it has been shown

2002-01-17 Thread Havoc Pennington


Paul Davis [EMAIL PROTECTED] writes:  
 http://pobox.com/~hp/gtk-colors.html

 and Havoc - can we get a link to this document added to the GTK+ FAQ?
 it and the threads questions are the 2 most common queries here, and
 being able to just tell people to look at the FAQ would be good.
 

Yeah, probably a good idea, cc'ing Tony.

Havoc
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



How to render text to a drawable? (gtk+ 1.3)

2002-01-17 Thread Jason Tackaberry

Hi everyone,

I'd done a bit of programming with gtk+ 1.2 (but not much), and I am
working on a new project using gtk 1.3.  I have a pixmap that I simply
need to render some text to.  gdk_draw_text is deprecated, so I assume
we are supposed to use pango.

I see a pango_x_render, which lets you render to an X drawable, but I
don't see any gdk equivalent.  I suppose I could fetch the X drawable
from gdk but it seems to me the _right_ way to do this shouldn't be that
convoluted.  I'm convinced I'm missing something.  Can anyone help?

Best,
Jason.

___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



Re: Copying bitmaps into bitmaps

2002-01-17 Thread Edscott Wilson García

On Thu 17 Jan 2002 14:21, Havoc Pennington wrote:
 Edscott Wilson García [EMAIL PROTECTED] writes:
  But isn't a bitmap nothing more than a pixmap of depth 1? If
  gdk_pixmap_new(window,pix_w,pix_h,1);
  is not the correct way to create an empty bitmap with gtk, how should it
  be created?

 That is the right way. One of us is missing some detail.


Its as simple as the following code, where gPIM[0] is a valid and working 
GdkBitmap with width pix_w and height pix_h,  and h is a gtkdialog.

static GdkBitmap *gPM;

static void create_higher_bitmap(){
/* This should work, but it doesn't */
  GdkGC *gc; 
  gPM=gdk_pixmap_new (h-window,pix_w,pix_h,1);
  if (!gPIM){fprintf(stderr,xftree: error 3348\n);return;}
  gc = gdk_gc_new (h-window);
  gdk_draw_pixmap(gPM,gc,gPIM[0],0,0,0,0,pix_w,pix_h);
  gdk_gc_destroy (gc);
  return; 
}

gdk_pixmap_new does not return NULL. 
Maybe I'm screwing up with the gc which should have special considerations 
for bitmap working.
Maybe there's something particular with src_private-xwindow or 
drawable_private-xwindow:

  XCopyArea (drawable_private-xdisplay,
 src_private-xwindow,
 drawable_private-xwindow,
 gc_private-xgc,
 xsrc, ysrc,
 width, height,
 xdest, ydest);



edscott
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



How to set the combo box item

2002-01-17 Thread Andy Schmidgall

I'm using a combo box in one of my applications. I can set it up fine, and
it works ok. I am just wondering if there is a way to set what item is
selected? For example, I might want the combo box to automatically select a
certain item based input from other widgets. I looked through the docs and
header files and I didn't see anything like this.


Additionally, I'm a bit confused about what widgets I can directly access in
the combo struct.

The tutorial says you can use the entry widget:  Now, if you want to set
the string in the entry section of the combo box, this is done by
manipulating the entry widget directly:

However, the documentation
(http://developer.gnome.org/doc/API/gtk/gtkcombo.html#GTKCOMBO-STRUCT) says
you shouldn't change the entry or the list directly

Finally, to add to the confusion, the header file says that *only* the entry
and the list should modified.

Maybe I'm being too picky? Just a bit confused on what things I should and
shouldn't be doing to the widgets :)

-Andy

___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



Re: Copying bitmaps into bitmaps

2002-01-17 Thread Paul Davis

On Thu 17 Jan 2002 14:21, Havoc Pennington wrote:
 Edscott Wilson García [EMAIL PROTECTED] writes:
  But isn't a bitmap nothing more than a pixmap of depth 1? If
  gdk_pixmap_new(window,pix_w,pix_h,1);
  is not the correct way to create an empty bitmap with gtk, how should it
  be created?

 That is the right way. One of us is missing some detail.


Its as simple as the following code, where gPIM[0] is a valid and working 
GdkBitmap with width pix_w and height pix_h,  and h is a gtkdialog.

when are you calling this? i trust that is from an expose event handler?
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



got it:bitmaps

2002-01-17 Thread Edscott Wilson García


From the docs: The created GC must always be used with drawables of the same 
depth as this one.

The gc I am using during bitmap copy does not have depth 1. This must be the 
problem. I probably have to use create the gc using the original bitmap, not 
the window.

Thank you much for your help, and I'm sorry for the wasted bandwidth

Edscott


On Thu 17 Jan 2002 14:21, you wrote:
 Edscott Wilson García [EMAIL PROTECTED] writes:
  But isn't a bitmap nothing more than a pixmap of depth 1? If
  gdk_pixmap_new(window,pix_w,pix_h,1);
  is not the correct way to create an empty bitmap with gtk, how should it
  be created?

 That is the right way. One of us is missing some detail.

 Havoc
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



Re: How to render text to a drawable? (gtk+ 1.3)

2002-01-17 Thread Havoc Pennington


Jason Tackaberry [EMAIL PROTECTED] writes: 
 I see a pango_x_render, which lets you render to an X drawable, but I
 don't see any gdk equivalent.  I suppose I could fetch the X drawable
 from gdk but it seems to me the _right_ way to do this shouldn't be that
 convoluted.  I'm convinced I'm missing something.  Can anyone help?
 

Yep, you want gdk_draw_layout().

Havoc
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



Re: Copying bitmaps into bitmaps

2002-01-17 Thread Havoc Pennington


Edscott Wilson García [EMAIL PROTECTED] writes:
   gc = gdk_gc_new (h-window);

Try using one of the bitmaps here instead of the window, the bad match
may be a GC/drawable issue rather than src/dest drawable.

Havoc
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



Re: How to render text to a drawable? (gtk+ 1.3)

2002-01-17 Thread Jason Tackaberry

On Thu, 2002-01-17 at 17:17, Havoc Pennington wrote:
 Yep, you want gdk_draw_layout().

Too easy.  Thanks, Havoc.

Regards,
Jason.

___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



Re: How to set the combo box item

2002-01-17 Thread Skip Montanaro


Andy I'm using a combo box in one of my applications. I can set it up
Andy fine, and it works ok. I am just wondering if there is a way to
Andy set what item is selected? For example, I might want the combo box
Andy to automatically select a certain item based input from other
Andy widgets. I looked through the docs and header files and I didn't
Andy see anything like this.

The Combo widget has entry and list attributes you use for direct
manipulation.
 
Andy Additionally, I'm a bit confused about what widgets I can directly
Andy access in the combo struct.

There is no Combo-level API for some of the things you need to do.  You
currently have to access the entry and list widget's directly.  The 2.0 API
is frozen, so it will probably be 2.2 before you might see any enhancement
to the Combo widget's API.

Andy Maybe I'm being too picky? Just a bit confused on what things I
Andy should and shouldn't be doing to the widgets :)

In my rather minimal Gtk experience, the Combo widget is the worst offender
in this regard.  I have occasionally stumbled upon this with other widgets
though.

-- 
Skip Montanaro ([EMAIL PROTECTED] - http://www.mojam.com/)
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



How do other non GUI stuff during gtk_main? (Parallel process?...)

2002-01-17 Thread Chris Seberino

gtk_main makes program wait for GTK+ events.

What if I want to have a math program
also running **at the same time**??? I want
this math program to keep streaming
numbers that cause pictures to change on GUI.

Likewise, I want events to affect behavior
of math program.

How can I have GUI and math program interact???

Notice that math program runs constantly so
it is not an event that comes and goes.

Any help would be greatly appreciated.

Chris

-- 
===
| Dr. Christian Seberino  || (619) 553-7940  (office) |
| SPAWARSYSCEN 2363   || (619) 553-2836  (fax)|
| 53560 HULL ST   ||  |
| SAN DIEGO CA 92152-5001 || [EMAIL PROTECTED] |
===
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



Why some code for certain events declared to be static???

2002-01-17 Thread Chris Seberino

GTK+ Tutorial has scribble.c code that has
many subroutines that are tied to events.

Many of these are static.  Please explain
what static gives you in C.

Sincerely,

Chris

-- 
===
| Dr. Christian Seberino  || (619) 553-7940  (office) |
| SPAWARSYSCEN 2363   || (619) 553-2836  (fax)|
| 53560 HULL ST   ||  |
| SAN DIEGO CA 92152-5001 || [EMAIL PROTECTED] |
===
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



Drawing on pixmap good just because expose event handled faster?

2002-01-17 Thread Chris Seberino

Is the only reason why drawing on pixmaps is preferred because
portion of window to be redrawn can be done faster
with regards to an expose event???

Is the sole purpose of inventing a pixmap object
scribbl.c in GTK+ tutorial has a pixmap object to
be global I think and defined to be static.
This beast does not look very elegant and so I was
wondering why it was necessary and why or if there
was a way to simplify code even more.

By the way, expose event just means that window was uncovered
and needs be redrawn right?? Just checking.

Thanks,

Chris


-- 
===
| Dr. Christian Seberino  || (619) 553-7940  (office) |
| SPAWARSYSCEN 2363   || (619) 553-2836  (fax)|
| 53560 HULL ST   ||  |
| SAN DIEGO CA 92152-5001 || [EMAIL PROTECTED] |
===
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



configure event just means resized or first displayed right?

2002-01-17 Thread Chris Seberino

Does the configure event just imply window
was resized and/or just created???

Chris
-- 
===
| Dr. Christian Seberino  || (619) 553-7940  (office) |
| SPAWARSYSCEN 2363   || (619) 553-2836  (fax)|
| 53560 HULL ST   ||  |
| SAN DIEGO CA 92152-5001 || [EMAIL PROTECTED] |
===
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



Re: Why some code for certain events declared to be static???

2002-01-17 Thread Skip Montanaro


Chris GTK+ Tutorial has scribble.c code that has many subroutines that
Chris are tied to events.

Chris Many of these are static.  Please explain what static gives you
Chris in C.

In a small standalone application like scribble it doesn't really buy you
much, but if you are writing a more significant application, using static to
restrict the visibility of functions only used local to the file they are
declared in reduces global namespace pollution and thus the chance for
conflicts at compile or link time.  Just to provide a dumb example, suppose
you named an event handler connect.  If it's not declared static it will
conflict with the standard library function of the same name.

-- 
Skip Montanaro ([EMAIL PROTECTED] - http://www.mojam.com/)
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



Re: How do other non GUI stuff during gtk_main? (Parallel process?...)

2002-01-17 Thread rsteinke

From: Chris Seberino [EMAIL PROTECTED]

 gtk_main makes program wait for GTK+ events.

 What if I want to have a math program
 also running **at the same time**??? I want
 this math program to keep streaming
 numbers that cause pictures to change on GUI.

 Likewise, I want events to affect behavior
 of math program.

 How can I have GUI and math program interact???

 Notice that math program runs constantly so
 it is not an event that comes and goes.

Usually, different processes communicate by pipes.
Just take the file descriptor for your pipe, wrap it
in a GIOChannel (see the glib API), and put a watch
on that channel with g_io_add_watch().

Ron Steinke
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



Re: configure event just means resized or first displayed right?

2002-01-17 Thread Havoc Pennington


Hi,

Configure event means the drawing area got a new size. This always
happens at least once when the drawing area first comes onscreen.

Havoc
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list



Any toy code showing use of fork pipes GTK+ together anywhere? (e.g. real time EKG simulation!!!)

2002-01-17 Thread Chris Seberino

This list is giving me great advice on lots of stuff
but I am nowhere near some of the GTK+ gods on this
list and won't be for a long time if ever.

Does anyone know of any sample GTK+ programs that
fork off a data generating program and then collect
that data with pipes to affect GUI

e.g. Imagine simulating an EKG for a hospital in GTK+.
The EKG object would keep getting data from a patient's
heart and we would need to read it and update a plot
of that data constantly.

Similarly, one could simulate a tape that kept
blaring stock quotes across it.  There would
be a forked process that read stock data and
GUI would read it as an event.


Chris


-- 
===
| Dr. Christian Seberino  || (619) 553-7940  (office) |
| SPAWARSYSCEN 2363   || (619) 553-2836  (fax)|
| 53560 HULL ST   ||  |
| SAN DIEGO CA 92152-5001 || [EMAIL PROTECTED] |
===
___
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list