Exemplo n.º 1
0
G_GNUC_COLD void
icon_init(void)
{
    GtkPixmap *pixmap;
    pixmap = (GtkPixmap *) create_pixmap(gui_main_window(), "icon.xpm");
    gtk_pixmap_get(pixmap, &icon_map, &icon_mask);
    gdk_window_set_icon(gui_main_window()->window, NULL, icon_map, icon_mask);
}
Exemplo n.º 2
0
// Set ICON PIXMAP property for window
int
clip_GTK_WINDOWSETICONPIXMAP(ClipMachine * cm)
{
	C_widget *cwin = _fetch_cw_arg(cm);
	C_widget *cpix = _fetch_cwidget(cm,_clip_spar(cm,2));
        GdkPixmap *pix;
        GdkBitmap *bit;
	CHECKCWID(cwin,GTK_IS_WINDOW);
	CHECKARG2(2,MAP_t,NUMERIC_t); CHECKCWID(cpix,GTK_IS_PIXMAP);
	gtk_pixmap_get(GTK_PIXMAP(cpix->widget), &pix, &bit);
	gdk_window_set_icon(GDK_WINDOW(cwin->widget->window),
			    GDK_WINDOW(cpix->widget->window),
		pix, bit);
	return 0;
err:
	return 1;
}
Exemplo n.º 3
0
int
clip_GDK_WINDOWSETBACKPIXMAP(ClipMachine * cm)
{
	C_widget    *cwin = _fetch_cw_arg(cm);
        C_widget    *cpix = _fetch_cwidget(cm, _clip_spar(cm, 2));
        gboolean relative = _clip_parl(cm, 3);
	GdkWindow *win = NULL;
        GdkPixmap *pix = NULL;
        GdkBitmap *mask;

	CHECKCWID(cwin,GTK_IS_WIDGET); CHECKOPT(2, MAP_t);
	CHECKCWIDOPT(cpix,GTK_IS_PIXMAP);
	CHECKARG(3,LOGICAL_t);

	if (cwin && cwin->widget) win = (GdkWindow *)cwin->widget->window;

	if (cpix) gtk_pixmap_get(GTK_PIXMAP(cpix->widget), &pix, &mask);

	gdk_window_set_back_pixmap(win, pix, relative);

	return 0;
err:
	return 1;
}