Mercurial > audlegacy
changeset 3103:1faf842dea49
we don't need create_dblsize_image() anymore
author | Tomasz Mon <desowin@gmail.com> |
---|---|
date | Thu, 19 Jul 2007 13:37:23 +0200 |
parents | d5f270d12b0c |
children | 992250ce4cc7 |
files | src/audacious/ui_skinned_button.c src/audacious/ui_skinned_equalizer_graph.c src/audacious/ui_skinned_horizontal_slider.c src/audacious/ui_skinned_menurow.c src/audacious/ui_skinned_monostereo.c src/audacious/ui_skinned_number.c src/audacious/ui_skinned_playstatus.c src/audacious/ui_skinned_textbox.c src/audacious/util.c src/audacious/util.h |
diffstat | 10 files changed, 1 insertions(+), 125 deletions(-) [+] |
line wrap: on
line diff
--- a/src/audacious/ui_skinned_button.c Thu Jul 19 13:11:48 2007 +0200 +++ b/src/audacious/ui_skinned_button.c Thu Jul 19 13:37:23 2007 +0200 @@ -22,7 +22,6 @@ #include <gtk/gtkmain.h> #include <gtk/gtkmarshal.h> -#include <gtk/gtkimage.h> #define UI_SKINNED_BUTTON_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), UI_TYPE_SKINNED_BUTTON, UiSkinnedButtonPrivate)) typedef struct _UiSkinnedButtonPrivate UiSkinnedButtonPrivate;
--- a/src/audacious/ui_skinned_equalizer_graph.c Thu Jul 19 13:11:48 2007 +0200 +++ b/src/audacious/ui_skinned_equalizer_graph.c Thu Jul 19 13:37:23 2007 +0200 @@ -28,7 +28,6 @@ #include "util.h" #include <gtk/gtkmain.h> #include <gtk/gtkmarshal.h> -#include <gtk/gtkimage.h> #define UI_TYPE_SKINNED_EQUALIZER_GRAPH (ui_skinned_equalizer_graph_get_type())
--- a/src/audacious/ui_skinned_horizontal_slider.c Thu Jul 19 13:11:48 2007 +0200 +++ b/src/audacious/ui_skinned_horizontal_slider.c Thu Jul 19 13:37:23 2007 +0200 @@ -28,7 +28,6 @@ #include "util.h" #include <gtk/gtkmain.h> #include <gtk/gtkmarshal.h> -#include <gtk/gtkimage.h> #define UI_TYPE_SKINNED_HORIZONTAL_SLIDER (ui_skinned_horizontal_slider_get_type()) #define UI_SKINNED_HORIZONTAL_SLIDER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), UI_TYPE_SKINNED_HORIZONTAL_SLIDER, UiSkinnedHorizontalSliderPrivate))
--- a/src/audacious/ui_skinned_menurow.c Thu Jul 19 13:11:48 2007 +0200 +++ b/src/audacious/ui_skinned_menurow.c Thu Jul 19 13:37:23 2007 +0200 @@ -28,7 +28,6 @@ #include "util.h" #include <gtk/gtkmain.h> #include <gtk/gtkmarshal.h> -#include <gtk/gtkimage.h> #define UI_TYPE_SKINNED_MENUROW (ui_skinned_menurow_get_type())
--- a/src/audacious/ui_skinned_monostereo.c Thu Jul 19 13:11:48 2007 +0200 +++ b/src/audacious/ui_skinned_monostereo.c Thu Jul 19 13:37:23 2007 +0200 @@ -28,7 +28,6 @@ #include "util.h" #include <gtk/gtkmain.h> #include <gtk/gtkmarshal.h> -#include <gtk/gtkimage.h> #define UI_TYPE_SKINNED_MONOSTEREO (ui_skinned_monostereo_get_type())
--- a/src/audacious/ui_skinned_number.c Thu Jul 19 13:11:48 2007 +0200 +++ b/src/audacious/ui_skinned_number.c Thu Jul 19 13:37:23 2007 +0200 @@ -31,7 +31,6 @@ #include <ctype.h> #include <gtk/gtkmain.h> #include <gtk/gtkmarshal.h> -#include <gtk/gtkimage.h> #define UI_TYPE_SKINNED_NUMBER (ui_skinned_number_get_type()) @@ -203,12 +202,7 @@ gdk_rgb_get_visual()->depth); if (number->double_size) { - GdkImage *img, *img2x; - img = gdk_drawable_get_image(obj, 0, 0, number->width, number->height); - img2x = create_dblsize_image(img); - gdk_draw_image (image, gc, img2x, 0, 0, 0, 0, number->width*2, number->height*2); - g_object_unref(img2x); - g_object_unref(img); + image = create_dblsize_pixmap(obj); } else gdk_draw_drawable (image, gc, obj, 0, 0, 0, 0, number->width, number->height);
--- a/src/audacious/ui_skinned_playstatus.c Thu Jul 19 13:11:48 2007 +0200 +++ b/src/audacious/ui_skinned_playstatus.c Thu Jul 19 13:37:23 2007 +0200 @@ -28,7 +28,6 @@ #include "util.h" #include <gtk/gtkmain.h> #include <gtk/gtkmarshal.h> -#include <gtk/gtkimage.h> #define UI_TYPE_SKINNED_PLAYSTATUS (ui_skinned_playstatus_get_type())
--- a/src/audacious/ui_skinned_textbox.c Thu Jul 19 13:11:48 2007 +0200 +++ b/src/audacious/ui_skinned_textbox.c Thu Jul 19 13:37:23 2007 +0200 @@ -31,7 +31,6 @@ #include <ctype.h> #include <gtk/gtkmain.h> #include <gtk/gtkmarshal.h> -#include <gtk/gtkimage.h> #define UI_TYPE_SKINNED_TEXTBOX (ui_skinned_textbox_get_type()) #define UI_SKINNED_TEXTBOX_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), UI_TYPE_SKINNED_TEXTBOX, UiSkinnedTextboxPrivate))
--- a/src/audacious/util.c Thu Jul 19 13:11:48 2007 +0200 +++ b/src/audacious/util.c Thu Jul 19 13:37:23 2007 +0200 @@ -878,116 +878,6 @@ return image; } -GdkImage *create_dblsize_image(GdkImage * img) -{ -#ifdef GDK_WINDOWING_X11 - GdkImage *dblimg; - register guint x, y; - - /* - * This needs to be optimized - */ - - dblimg = - gdk_image_new(GDK_IMAGE_NORMAL, gdk_visual_get_system(), - img->width << 1, img->height << 1); - if (dblimg->bpp == 1) { - register guint8 *srcptr, *ptr, *ptr2, pix; - - srcptr = GDK_IMAGE(img)->mem; - ptr = GDK_IMAGE(dblimg)->mem; - ptr2 = ptr + dblimg->bpl; - - for (y = 0; y < img->height; y++) { - for (x = 0; x < img->width; x++) { - pix = *srcptr++; - *ptr++ = pix; - *ptr++ = pix; - *ptr2++ = pix; - *ptr2++ = pix; - } - srcptr += img->bpl - img->width; - ptr += (dblimg->bpl << 1) - dblimg->width; - ptr2 += (dblimg->bpl << 1) - dblimg->width; - } - } - if (dblimg->bpp == 2) { - guint16 *srcptr, *ptr, *ptr2, pix; - - srcptr = (guint16 *) GDK_IMAGE_XIMAGE(img)->data; - ptr = (guint16 *) GDK_IMAGE_XIMAGE(dblimg)->data; - ptr2 = ptr + (dblimg->bpl >> 1); - - for (y = 0; y < img->height; y++) { - for (x = 0; x < img->width; x++) { - pix = *srcptr++; - *ptr++ = pix; - *ptr++ = pix; - *ptr2++ = pix; - *ptr2++ = pix; - } - srcptr += (img->bpl >> 1) - img->width; - ptr += (dblimg->bpl) - dblimg->width; - ptr2 += (dblimg->bpl) - dblimg->width; - } - } - if (dblimg->bpp == 3) { - register guint8 *srcptr, *ptr, *ptr2, pix1, pix2, pix3; - - srcptr = GDK_IMAGE(img)->mem; - ptr = GDK_IMAGE(dblimg)->mem; - ptr2 = ptr + dblimg->bpl; - - for (y = 0; y < img->height; y++) { - for (x = 0; x < img->width; x++) { - pix1 = *srcptr++; - pix2 = *srcptr++; - pix3 = *srcptr++; - *ptr++ = pix1; - *ptr++ = pix2; - *ptr++ = pix3; - *ptr++ = pix1; - *ptr++ = pix2; - *ptr++ = pix3; - *ptr2++ = pix1; - *ptr2++ = pix2; - *ptr2++ = pix3; - *ptr2++ = pix1; - *ptr2++ = pix2; - *ptr2++ = pix3; - - } - srcptr += img->bpl - (img->width * 3); - ptr += (dblimg->bpl << 1) - (dblimg->width * 3); - ptr2 += (dblimg->bpl << 1) - (dblimg->width * 3); - } - } - if (dblimg->bpp == 4) { - register guint32 *srcptr, *ptr, *ptr2, pix; - - srcptr = (guint32 *) GDK_IMAGE(img)->mem; - ptr = (guint32 *) GDK_IMAGE(dblimg)->mem; - ptr2 = ptr + (dblimg->bpl >> 2); - - for (y = 0; y < img->height; y++) { - for (x = 0; x < img->width; x++) { - pix = *srcptr++; - *ptr++ = pix; - *ptr++ = pix; - *ptr2++ = pix; - *ptr2++ = pix; - } - srcptr += (img->bpl >> 2) - img->width; - ptr += (dblimg->bpl >> 1) - dblimg->width; - ptr2 += (dblimg->bpl >> 1) - dblimg->width; - } - } - return dblimg; -#else - return img; -#endif -} - /** * xmms_show_message: * @title: The title of the message to show.
--- a/src/audacious/util.h Thu Jul 19 13:11:48 2007 +0200 +++ b/src/audacious/util.h Thu Jul 19 13:37:23 2007 +0200 @@ -108,7 +108,6 @@ void xmms_usleep(gint usec); GdkPixmap *create_dblsize_pixmap(GdkPixmap *pix); -GdkImage *create_dblsize_image(GdkImage * img); GdkPixbuf *audacious_create_colorized_pixbuf(GdkPixbuf *src, gint red, gint green, gint blue);