Home | History | Annotate | Download | only in video

Lines Matching full:icon

1671  * Sets/Gets the title and icon text of the display window, if any.
1673 void SDL_WM_SetCaption (const char *title, const char *icon)
1685 if ( icon ) {
1689 video->wm_icon = SDL_strdup(icon);
1691 if ( (title || icon) && (video->SetCaption != NULL) ) {
1696 void SDL_WM_GetCaption (char **title, char **icon)
1704 if ( icon ) {
1705 *icon = video->wm_icon;
1712 static void CreateMaskFromColorKeyOrAlpha(SDL_Surface *icon, Uint8 *mask, int flags)
1716 #define SET_MASKBIT(icon, x, y, mask) \
1717 mask[(y*((icon->w+7)/8))+(x/8)] &= ~(0x01<<(7-(x%8)))
1719 colorkey = icon->format->colorkey;
1720 switch (icon->format->BytesPerPixel) {
1722 for ( y=0; y<icon->h; ++y ) {
1723 pixels = (Uint8 *)icon->pixels + y*icon->pitch;
1724 for ( x=0; x<icon->w; ++x ) {
1726 SET_MASKBIT(icon, x, y, mask);
1734 for ( y=0; y<icon->h; ++y ) {
1735 pixels = (Uint16 *)icon->pixels +
1736 y*icon->pitch/2;
1737 for ( x=0; x<icon->w; ++x ) {
1739 SET_MASKBIT(icon, x, y, mask);
1740 } else if((flags & 2) && (*pixels & icon->format->Amask) == 0) {
1741 SET_MASKBIT(icon, x, y, mask);
1750 for ( y=0; y<icon->h; ++y ) {
1751 pixels = (Uint32 *)icon->pixels +
1752 y*icon->pitch/4;
1753 for ( x=0; x<icon->w; ++x ) {
1755 SET_MASKBIT(icon, x, y, mask);
1756 } else if((flags & 2) && (*pixels & icon->format->Amask) == 0) {
1757 SET_MASKBIT(icon, x, y, mask);
1768 * Sets the window manager icon for the display window.
1770 void SDL_WM_SetIcon (SDL_Surface *icon, Uint8 *mask)
1775 if ( icon && video->SetIcon ) {
1776 /* Generate a mask if necessary, and create the icon! */
1778 int mask_len = icon->h*(icon->w+7)/8;
1785 if ( icon->flags & SDL_SRCCOLORKEY ) flags |= 1;
1786 if ( icon->flags & SDL_SRCALPHA ) flags |= 2;
1788 CreateMaskFromColorKeyOrAlpha(icon, mask, flags);
1790 video->SetIcon(video, icon, mask);
1793 video->SetIcon(this, icon, mask);