[Gtk-sharp-list] 2 Questions

Luca Roccia little_rock@users.sourceforge.net
24 Jul 2003 17:06:08 +0200


1) In C I was using:

gdk_pixmap = gdk_pixmap_create_from_xpm (window->window,
&gdk_pixmap_mask, &style->bg[GTK_STATE_NORMAL], IMAGE_ABOUT_PATH);
pixmap = gtk_pixmap_new (gdk_pixmap, gdk_bitmap);
gtk_widget_shape_combine_mask (window, gdk_bitmap, 0, 0);

to create a window with a transparent image as bg.
How can I do it in gtk#?

2) Always in C I associated a Button press event to a window and in the
callback function I could get the x, y coordinates of the mouse within
the window. How can I get them in gth#?

in C I used:

shape_pressed (GtkWidget * widget, GdkEventButton * event, gpointer
user_data) {
	if (event->x >= CLOSE_BTT_X_MIN && event->x <= CLOSE_BTT_X_MAX &&
event->y >= CLOSE_BTT_Y_MIN && event->y <= CLOSE_BTT_Y_MAX)
...

Tnx for your answers

---
Luca Roccia