button_release_event
- From: Jan <janjakon mail ru>
- To: gtk-app-devel-list gnome org
- Subject: button_release_event
- Date: Mon, 27 Dec 2004 01:14:28 +0300
Hello.
I apologize for my importunity.
But I can not find any eyeful information in documentation.
I try to draw line from point where user press left mouse button.
I have follows initialization code:
GtkWidget *topLevelWindow=gtk_window_new(GTK_WINDOW_TOPLEVEL);
g_signal_connect(G_OBJECT(topLevelWindow), "delete_event",
G_CALLBACK(OnDelete), NULL);
g_signal_connect(G_OBJECT(topLevelWindow),
"destroy", G_CALLBACK(OnDestroy),
NULL);
GtkWidget *canvas=gtk_drawing_area_new();
g_signal_connect(G_OBJECT(canvas), "expose_event",
G_CALLBACK(OnDraw), NULL);
g_signal_connect(G_OBJECT(GTK_WINDOW(topLevelWindow)),
"button_release_event", G_CALLBACK(OnButtonReleaseEvent),
NULL);
gtk_container_add(GTK_CONTAINER(topLevelWindow), canvas);
gtk_widget_show(canvas);
gtk_widget_show(topLevelWindow);
And have follow OnButtonReleaseEvent:
gboolean OnButtonReleaseEvent(GtkWidget *widget, GdkEventExpose *event, gpointer data)
{
g_print("Release Event!\n");
return TRUE;
}
I clicked and clicked on window of my application
and there are no "Release Event!".
Why so?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]