--- np2/x11/gtk2/gtk_drawmng.c 2004/07/27 17:07:50 1.3 +++ np2/x11/gtk2/gtk_drawmng.c 2008/03/13 16:27:39 1.6 @@ -1,4 +1,4 @@ -/* $Id: gtk_drawmng.c,v 1.3 2004/07/27 17:07:50 monaka Exp $ */ +/* $Id: gtk_drawmng.c,v 1.6 2008/03/13 16:27:39 monaka Exp $ */ /* * Copyright (c) 2003 NONAKA Kimihiro @@ -12,8 +12,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES @@ -132,7 +130,7 @@ destroy: GtkWidget *da = hdl->drawarea; drawmng_release((DRAWMNG_HDL)hdl); if (da) { - gtk_widget_unref(da); + g_object_unref(da); } } return NULL; @@ -147,10 +145,10 @@ drawmng_release(DRAWMNG_HDL dhdl) while (hdl->d.drawing) usleep(1); if (hdl->backsurf) { - gdk_pixmap_unref(hdl->backsurf); + g_object_unref(hdl->backsurf); } if (hdl->surface) { - gdk_image_destroy(hdl->surface); + g_object_unref(hdl->surface); } _MFREE(hdl); } @@ -213,11 +211,11 @@ drawmng_blt(DRAWMNG_HDL dhdl, RECT_T *sr width = r.right - p.x; height = r.bottom - p.y; - gdk_draw_pixmap(hdl->drawarea->window, gc, + gdk_draw_drawable(hdl->drawarea->window, gc, hdl->backsurf, r.left, r.top, p.x, p.y, width, height); } else { - gdk_draw_pixmap(hdl->drawarea->window, gc, + gdk_draw_drawable(hdl->drawarea->window, gc, hdl->backsurf, 0, 0, 0, 0, hdl->d.width, hdl->d.height); }