Title bar icons

>I've looked through the archives in order to find out how to set an icon
>that gets displayed in the title bar of the window and when the window
>is iconified. I've found a reference to gdk_window_set_icon(), but
>unfortunately that function does not have any documentation in the API
>docs. Can someone explain its semantics?

Hi Andrei,

After some help from Havoc, I managed to get gdk_window_set_icon() working.

I am working on UNIX/Linux, and the function is used to give a window an
icon, when the window itself is iconised.

I have a Pixmap for the icon called IconPixMap. First make the Pixmap from 
an xpm which contains the icon desired.

  GdkPixmap * IconPixMap = NULL;
  GdkBitmap * mask = NULL;
  IconPixMap = gdk_pixmap_colormap_create_from_xpm (
                                                    (gchar *) PathToXpmFile

To associate my Pixmap Icon with given widget's window (first ensure the widget have been
created !, then)

  gdk_window_set_icon (widget->window, 
		       (GdkBitmap * ) NULL

Hope this way useful....

best regards


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]