2008/2/28 Demetris Zavorotnichenko <[EMAIL PROTECTED]>: > I have done it like this: > gtk_widget_shape_combine_mask(GTK_WIDGET(button->window),mask,0,0); > You are type-casting a GdkWindow to a GtkWidget, which you cannot do. In this case its sufficient if you do gtk_widget_shape_combine_mask(GTK_WIDGET(button),mask, ...); or gdk_window_shape_combine_mask (button->window, mask, ...);
> > > > > It compiles > > But when I run the application I get: > > > > gtk_widget_shape_combine_mask: assertion 'GTK_IS_WIDGET (widget)' failed > > > > What am I doing wrong? > > > > How should the function look like ? > > > > > ------------------------------ > > *From:* Gautam Ravi [mailto:[EMAIL PROTECTED] > *Sent:* Thursday, February 28, 2008 3:19 PM > *To:* Demetris Zavorotnichenko > *Cc:* gtk-list@gnome.org > *Subject:* Re: Button from an image (round Button) > > > > Hi, > > GtkButton has its own GdkWindow. It can be accessed like GTK_WIDGET > (button)->window. > > You can do the "shape_combine_mask" for the GtkButton's window also. See > that "shape_combine_mask" is done when it is realized. > > -- > Regards > Gautam > > > 2008/2/27 Demetris Zavorotnichenko <[EMAIL PROTECTED]>: > > Hi everyone. > > > > Forgive me if my question is going to sound silly. But I'm new to GTK so I > have to ask. > > > > I want to create a button that would not be as a normal button, but with a > shape I have from a PNG image(with transparency) > > > > I have tried to do "shape_combine_mask" , created the masks, but it seems > this works only for windows. > > > > But I need a button with the shape from a PNG image and if I press it I > would call a function so the button would have roll_over, or atleast > "clicked" signals. Plus I want to make a bunch of them to create a keypad so > I would have to move them and arrange them in a loop. > > > > > > How could I do this ? > > > > PLS help out. > > > > Yours truly, Demetris Z. > > > _______________________________________________ > gtk-list mailing list > gtk-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtk-list > > > > _______________________________________________ > gtk-list mailing list > gtk-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtk-list > >
_______________________________________________ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list