+ /* set up the hilite texture for the icon */
+ popup.a_icon->texture[1].data.rgba.width = ICON_SIZE;
+ popup.a_icon->texture[1].data.rgba.height = ICON_SIZE;
+ popup.a_icon->texture[1].data.rgba.alpha = 0xff;
+ popup.hilite_rgba = g_new(RrPixel32, ICON_SIZE * ICON_SIZE);
+ popup.a_icon->texture[1].data.rgba.data = popup.hilite_rgba;
+
+ /* create the hilite under the target icon */
+ {
+ RrPixel32 color;
+ gint x, y, o;
+
+ color = ((ob_rr_theme->osd_color->r & 0xff) << RrDefaultRedOffset) +
+ ((ob_rr_theme->osd_color->g & 0xff) << RrDefaultGreenOffset) +
+ ((ob_rr_theme->osd_color->b & 0xff) << RrDefaultBlueOffset);
+
+ o = 0;
+ for (x = 0; x < ICON_SIZE; x++)
+ for (y = 0; y < ICON_SIZE; y++) {
+ guchar a;
+
+ if (x < ICON_HILITE_WIDTH ||
+ x >= ICON_SIZE - ICON_HILITE_WIDTH ||
+ y < ICON_HILITE_WIDTH ||
+ y >= ICON_SIZE - ICON_HILITE_WIDTH)
+ {
+ /* the border of the target */
+ a = 0x88;
+ }
+ else {
+ /* the background of the target */
+ a = 0x22;
+ }
+
+ popup.hilite_rgba[o++] =
+ color + (a << RrDefaultAlphaOffset);
+ }
+ }
+