Re: [gtk-list] gtk_get_current_event() (gtk+970606)
- From: Peter Mattis <petm scam XCF Berkeley EDU>
- cc: gtk-list redhat com
- Subject: Re: [gtk-list] gtk_get_current_event() (gtk+970606)
- Date: Sun, 03 Aug 1997 00:08:42 -0700
Hideki Fujimoto writes:
>/* key handler */
>void
>key (void)
>{
> GdkEvent *event;
> GdkEventKey kevent;
> gchar ch;
>
> gtk_get_current_event(event);
> kevent = event->key;
> ch = kevent.keyval;
> g_print("input char: %c\n", ch);
>}
"gtk_get_current_event" fills in an event structure you pass it. So
the above wouldn't work because you are passing a pointer to random
memory. It should be something more like:
GdkEvent event;
...
gtk_get_current_event (&event);
...
Peter
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]