|
how are you ?
can you help me?
now , i am studying gtk .
how to get right button
click state? now , i want to get the
right button click state , but i only get the left button state .
my code is
here:
gint On_StreamDraw_Button_Press (GtkWidget *widget,
GdkEventMotion *event)
{ gint x; gint y; GdkModifierType state;
GdkDrawable* pixmap; pixmap = widget->window; /* --- If it's a hint... (combining several events) --- */ if (event->is_hint) { /* --- Get new position --- */ gdk_window_get_pointer (event->window, &x, &y, &state); } else { /* --- Get new position --- */ x = event->x; y = event->y; state = (GdkModifierType)event->state; } /* --- If the mouse button is down ---
*/
if ((state & GDK_BUTTON2_MASK) && (pixmap != NULL)) { g_message("Button2\n"); } /* --- If the mouse button is down ---
*/
if ((state & GDK_BUTTON1_MASK) && (pixmap != NULL)) { g_message("Button1\n");
} return 0;
} but , when i click right button , no message print , when i click left
button , print the message : "the message :Button1"
can you tell me the reason ?
thans.
|
- (no subject) Olaf
- (no subject) Olaf Leidinger
- (no subject) Kishore Prahallad Sunkeswari
- Re: (no subject) Rodrigo Moya
- Re: (no subject) Giovanni Masullo
- Scrolling GTK list S. P. Kishore
- Re: Scrolling GTK list Rodrigo Moya
- Re: Scrolling GTK list S. P. Kishore
- Re: Scrolling GTK list Paul Davis
- (no subject) 秦 嘉
- (no subject) haojl
- (no subject) haojl
- (no subject) thota uma kanth
- (no subject) fullsail
- (no subject) Ernesto Ruiz
- Re: (no subject) Paul Davis
- (no subject) Vahid Zahiri
- send signal or event to widget? Vahid Zahiri
- (no subject) [EMAIL PROTECTED]
- (no subject) Wasim Jaffer
- Re: (no subject) Havoc Pennington
