Title: RE: Emitting signals

Hi Alan,

I found this snippet of code inside a GTK Theme Switcher written by "[EMAIL PROTECTED]".
It doesn't specifically send the event you want, but maybe its relevant enough to help you synthesize one that does.

Maybe Havoc, Muhri, and Tor could comment on whether this could be modified to help or not, since I really don't know. Looks like there is UNIX GDK code to do something in gdk_send_clientmessage_toall(), but none in the Win32 port as yet though.

void
send_refresh_signal(void)
{
  GdkEventClient event; 
  event.type = GDK_CLIENT_EVENT;
  event.send_event = TRUE;
  event.window = NULL;
  event.message_type = gdk_atom_intern("_GTK_READ_RCFILES", FALSE);
  event.data_format = 8;
  gdk_event_send_clientmessage_toall((GdkEvent *)&event);
}

Just trying to help,

   Tim.


    ----------
    From:   Havoc Pennington[SMTP:[EMAIL PROTECTED]]
    Sent:   Saturday, September 30, 2000 11:43 PM
    To:     Dugas, Alan
    Cc:     [EMAIL PROTECTED]; [EMAIL PROTECTED]
    Subject:        Re: Emitting signals


    "Dugas, Alan" <[EMAIL PROTECTED]> writes:
    > Is there a way to emit a signal globally to all windows or all
    > widgets regardless of what window they are in?  What I have are
    > several graphics windows that need to be updated every time a new
    > piece of data is gathered.  I would like to be able to send a
    > signal, say "expose", to all of the graphics windows without having
    > to individually store each of them in an array somewhere.

    The answer is pretty much no; you have to keep a list.

    Then sythesize an expose and send it with gtk_widget_event(), the
    default implementaiton of the draw method on GtkWidget (in
    gtk/gtkwidget.c) has an example.

    Havoc


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

Reply via email to