Lines Matching refs:icon

1697  * Sets/Gets the title and icon text of the display window, if any.
1699 void SDL_WM_SetCaption (const char *title, const char *icon)
1711 if ( icon ) {
1715 video->wm_icon = SDL_strdup(icon);
1717 if ( (title || icon) && (video->SetCaption != NULL) ) {
1728 void SDL_WM_GetCaption (char **title, char **icon)
1736 if ( icon ) {
1737 *icon = video->wm_icon;
1744 static void CreateMaskFromColorKeyOrAlpha(SDL_Surface *icon, Uint8 *mask, int flags)
1748 #define SET_MASKBIT(icon, x, y, mask) \
1749 mask[(y*((icon->w+7)/8))+(x/8)] &= ~(0x01<<(7-(x%8)))
1751 colorkey = icon->format->colorkey;
1752 switch (icon->format->BytesPerPixel) {
1754 for ( y=0; y<icon->h; ++y ) {
1755 pixels = (Uint8 *)icon->pixels + y*icon->pitch;
1756 for ( x=0; x<icon->w; ++x ) {
1758 SET_MASKBIT(icon, x, y, mask);
1766 for ( y=0; y<icon->h; ++y ) {
1767 pixels = (Uint16 *)icon->pixels +
1768 y*icon->pitch/2;
1769 for ( x=0; x<icon->w; ++x ) {
1771 SET_MASKBIT(icon, x, y, mask);
1772 } else if((flags & 2) && (*pixels & icon->format->Amask) == 0) {
1773 SET_MASKBIT(icon, x, y, mask);
1782 for ( y=0; y<icon->h; ++y ) {
1783 pixels = (Uint32 *)icon->pixels +
1784 y*icon->pitch/4;
1785 for ( x=0; x<icon->w; ++x ) {
1787 SET_MASKBIT(icon, x, y, mask);
1788 } else if((flags & 2) && (*pixels & icon->format->Amask) == 0) {
1789 SET_MASKBIT(icon, x, y, mask);
1800 * Sets the window manager icon for the display window.
1802 void SDL_WM_SetIcon (SDL_Surface *icon, Uint8 *mask)
1807 if ( icon && video->SetIcon ) {
1808 /* Generate a mask if necessary, and create the icon! */
1810 int mask_len = icon->h*(icon->w+7)/8;
1817 if ( icon->flags & SDL_SRCCOLORKEY ) flags |= 1;
1818 if ( icon->flags & SDL_SRCALPHA ) flags |= 2;
1820 CreateMaskFromColorKeyOrAlpha(icon, mask, flags);
1822 video->SetIcon(video, icon, mask);
1825 video->SetIcon(this, icon, mask);