Tao.Sdl SDK Documentation

Sdl.SDL_WM_SetIcon Method 

Sets the icon for the display window.

[Visual Basic]
Public Shared Sub SDL_WM_SetIcon( _
   ByVal icon As IntPtr, _
   ByVal mask As Byte() _
)
[C#]
public static void SDL_WM_SetIcon(
   IntPtr icon,
   byte[] mask
);

Parameters

icon
Pointer to an SDL_Surface
mask

Remarks

Sets the icon for the display window. Win32 icons must be 32x32.

This function must be called before the first call to SDL_SetVideoMode.

The mask is a bitmask that describes the shape of the icon. If mask is NULL, then the shape is determined by the colorkey of icon, if any, or makes the icon rectangular (no transparency) otherwise.

If mask is non-NULL, it points to a bitmap with bits set where the corresponding pixel should be visible. The format of the bitmap is as follows: Scanlines come in the usual top-down order. Each scanline consists of (width / 8) bytes, rounded up. The most significant bit of each byte represents the leftmost pixel.

Binds to C-function call in SDL_video.h:

void SDL_WM_SetIcon(SDL_Surface *icon, Uint8 *mask);
            

Example

SDL_WM_SetIcon(SDL_LoadBMP("icon.bmp"), NULL);
            

See Also

Sdl Class | Tao.Sdl Namespace | SDL_SetVideoMode | SDL_WM_SetCaption