Mercurial > sdl-ios-xcode
comparison include/SDL_video.h @ 2267:c785543d1843
Okay, still some bugs, but everything builds again...
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sat, 18 Aug 2007 05:39:09 +0000 |
parents | e61ad15a205f |
children | 12ea0fdc0df2 |
comparison
equal
deleted
inserted
replaced
2266:e61ad15a205f | 2267:c785543d1843 |
---|---|
263 | 263 |
264 | 264 |
265 /* These are the currently supported flags for the SDL_surface */ | 265 /* These are the currently supported flags for the SDL_surface */ |
266 /* Used internally (read-only) */ | 266 /* Used internally (read-only) */ |
267 #define SDL_PREALLOC 0x00000001 /* Surface uses preallocated memory */ | 267 #define SDL_PREALLOC 0x00000001 /* Surface uses preallocated memory */ |
268 #define SDL_RLEACCEL 0x00000001 /* Surface is RLE encoded */ | 268 #define SDL_RLEACCEL 0x00000002 /* Surface is RLE encoded */ |
269 | 269 |
270 /* Evaluates to true if the surface needs to be locked before access */ | 270 /* Evaluates to true if the surface needs to be locked before access */ |
271 #define SDL_MUSTLOCK(S) (((S)->flags & SDL_RLEACCEL) != 0) | 271 #define SDL_MUSTLOCK(S) (((S)->flags & SDL_RLEACCEL) != 0) |
272 | 272 |
273 /* This structure should be treated as read-only, except for 'pixels', | 273 /* This structure should be treated as read-only, except for 'pixels', |
1405 * \return 0 on success, or -1 if the surface is not valid | 1405 * \return 0 on success, or -1 if the surface is not valid |
1406 * | 1406 * |
1407 * \note If RLE is enabled, colorkey and alpha blending blits are much faster, | 1407 * \note If RLE is enabled, colorkey and alpha blending blits are much faster, |
1408 * but the surface must be locked before directly accessing the pixels. | 1408 * but the surface must be locked before directly accessing the pixels. |
1409 */ | 1409 */ |
1410 extern DECLSPEC int SDLCALL SDL_SetSurfaceRLE(SDL_Surface *surface, int flag); | 1410 extern DECLSPEC int SDLCALL SDL_SetSurfaceRLE(SDL_Surface * surface, |
1411 int flag); | |
1411 | 1412 |
1412 /* | 1413 /* |
1413 * \fn int SDL_SetColorKey(SDL_Surface *surface, Uint32 flag, Uint32 key) | 1414 * \fn int SDL_SetColorKey(SDL_Surface *surface, Uint32 flag, Uint32 key) |
1414 * | 1415 * |
1415 * \brief Sets the color key (transparent pixel) in a blittable surface. | 1416 * \brief Sets the color key (transparent pixel) in a blittable surface. |
1418 * \param flag Non-zero to enable colorkey and 0 to disable colorkey | 1419 * \param flag Non-zero to enable colorkey and 0 to disable colorkey |
1419 * \param key The transparent pixel in the native surface format | 1420 * \param key The transparent pixel in the native surface format |
1420 * | 1421 * |
1421 * \return 0 on success, or -1 if the surface is not valid | 1422 * \return 0 on success, or -1 if the surface is not valid |
1422 */ | 1423 */ |
1423 extern DECLSPEC int SDLCALL SDL_SetColorKey(SDL_Surface *surface, Uint32 flag, Uint32 key); | 1424 extern DECLSPEC int SDLCALL SDL_SetColorKey(SDL_Surface * surface, |
1425 Uint32 flag, Uint32 key); | |
1424 | 1426 |
1425 /** | 1427 /** |
1426 * \fn int SDL_SetSurfaceColorMod(SDL_Surface *surface, Uint8 r, Uint8 g, Uint8 b) | 1428 * \fn int SDL_SetSurfaceColorMod(SDL_Surface *surface, Uint8 r, Uint8 g, Uint8 b) |
1427 * | 1429 * |
1428 * \brief Set an additional color value used in blit operations | 1430 * \brief Set an additional color value used in blit operations |
1434 * | 1436 * |
1435 * \return 0 on success, or -1 if the surface is not valid | 1437 * \return 0 on success, or -1 if the surface is not valid |
1436 * | 1438 * |
1437 * \sa SDL_GetSurfaceColorMod() | 1439 * \sa SDL_GetSurfaceColorMod() |
1438 */ | 1440 */ |
1439 extern DECLSPEC int SDLCALL SDL_SetSurfaceColorMod(SDL_Surface *surface, | 1441 extern DECLSPEC int SDLCALL SDL_SetSurfaceColorMod(SDL_Surface * surface, |
1440 Uint8 r, Uint8 g, Uint8 b); | 1442 Uint8 r, Uint8 g, Uint8 b); |
1441 | 1443 |
1442 | 1444 |
1443 /** | 1445 /** |
1444 * \fn int SDL_GetSurfaceColorMod(SDL_Surface *surface, Uint8 *r, Uint8 *g, Uint8 *b) | 1446 * \fn int SDL_GetSurfaceColorMod(SDL_Surface *surface, Uint8 *r, Uint8 *g, Uint8 *b) |
1452 * | 1454 * |
1453 * \return 0 on success, or -1 if the surface is not valid | 1455 * \return 0 on success, or -1 if the surface is not valid |
1454 * | 1456 * |
1455 * \sa SDL_SetSurfaceColorMod() | 1457 * \sa SDL_SetSurfaceColorMod() |
1456 */ | 1458 */ |
1457 extern DECLSPEC int SDLCALL SDL_GetSurfaceColorMod(SDL_Surface *surface, | 1459 extern DECLSPEC int SDLCALL SDL_GetSurfaceColorMod(SDL_Surface * surface, |
1458 Uint8 * r, Uint8 * g, | 1460 Uint8 * r, Uint8 * g, |
1459 Uint8 * b); | 1461 Uint8 * b); |
1460 | 1462 |
1461 /** | 1463 /** |
1462 * \fn int SDL_SetSurfaceAlphaMod(SDL_Surface *surface, Uint8 alpha) | 1464 * \fn int SDL_SetSurfaceAlphaMod(SDL_Surface *surface, Uint8 alpha) |
1468 * | 1470 * |
1469 * \return 0 on success, or -1 if the surface is not valid | 1471 * \return 0 on success, or -1 if the surface is not valid |
1470 * | 1472 * |
1471 * \sa SDL_GetSurfaceAlphaMod() | 1473 * \sa SDL_GetSurfaceAlphaMod() |
1472 */ | 1474 */ |
1473 extern DECLSPEC int SDLCALL SDL_SetSurfaceAlphaMod(SDL_Surface *surface, | 1475 extern DECLSPEC int SDLCALL SDL_SetSurfaceAlphaMod(SDL_Surface * surface, |
1474 Uint8 alpha); | 1476 Uint8 alpha); |
1475 | 1477 |
1476 /** | 1478 /** |
1477 * \fn int SDL_GetSurfaceAlphaMod(SDL_Surface *surface, Uint8 *alpha) | 1479 * \fn int SDL_GetSurfaceAlphaMod(SDL_Surface *surface, Uint8 *alpha) |
1478 * | 1480 * |
1483 * | 1485 * |
1484 * \return 0 on success, or -1 if the surface is not valid | 1486 * \return 0 on success, or -1 if the surface is not valid |
1485 * | 1487 * |
1486 * \sa SDL_SetSurfaceAlphaMod() | 1488 * \sa SDL_SetSurfaceAlphaMod() |
1487 */ | 1489 */ |
1488 extern DECLSPEC int SDLCALL SDL_GetSurfaceAlphaMod(SDL_Surface *surface, | 1490 extern DECLSPEC int SDLCALL SDL_GetSurfaceAlphaMod(SDL_Surface * surface, |
1489 Uint8 * alpha); | 1491 Uint8 * alpha); |
1490 | 1492 |
1491 /** | 1493 /** |
1492 * \fn int SDL_SetSurfaceBlendMode(SDL_Surface *surface, int blendMode) | 1494 * \fn int SDL_SetSurfaceBlendMode(SDL_Surface *surface, int blendMode) |
1493 * | 1495 * |
1498 * | 1500 * |
1499 * \return 0 on success, or -1 if the parameters are not valid | 1501 * \return 0 on success, or -1 if the parameters are not valid |
1500 * | 1502 * |
1501 * \sa SDL_GetSurfaceBlendMode() | 1503 * \sa SDL_GetSurfaceBlendMode() |
1502 */ | 1504 */ |
1503 extern DECLSPEC int SDLCALL SDL_SetSurfaceBlendMode(SDL_Surface *surface, | 1505 extern DECLSPEC int SDLCALL SDL_SetSurfaceBlendMode(SDL_Surface * surface, |
1504 int blendMode); | 1506 int blendMode); |
1505 | 1507 |
1506 /** | 1508 /** |
1507 * \fn int SDL_GetSurfaceBlendMode(SDL_Surface *surface, int *blendMode) | 1509 * \fn int SDL_GetSurfaceBlendMode(SDL_Surface *surface, int *blendMode) |
1508 * | 1510 * |
1513 * | 1515 * |
1514 * \return 0 on success, or -1 if the surface is not valid | 1516 * \return 0 on success, or -1 if the surface is not valid |
1515 * | 1517 * |
1516 * \sa SDL_SetSurfaceBlendMode() | 1518 * \sa SDL_SetSurfaceBlendMode() |
1517 */ | 1519 */ |
1518 extern DECLSPEC int SDLCALL SDL_GetSurfaceBlendMode(SDL_Surface *surface, | 1520 extern DECLSPEC int SDLCALL SDL_GetSurfaceBlendMode(SDL_Surface * surface, |
1519 int *blendMode); | 1521 int *blendMode); |
1520 | 1522 |
1521 /** | 1523 /** |
1522 * \fn int SDL_SetSurfaceScaleMode(SDL_Surface *surface, int scaleMode) | 1524 * \fn int SDL_SetSurfaceScaleMode(SDL_Surface *surface, int scaleMode) |
1523 * | 1525 * |
1530 * | 1532 * |
1531 * \note If the scale mode is not supported, the closest supported mode is chosen. Currently only SDL_TEXTURESCALEMODE_FAST is supported on surfaces. | 1533 * \note If the scale mode is not supported, the closest supported mode is chosen. Currently only SDL_TEXTURESCALEMODE_FAST is supported on surfaces. |
1532 * | 1534 * |
1533 * \sa SDL_GetSurfaceScaleMode() | 1535 * \sa SDL_GetSurfaceScaleMode() |
1534 */ | 1536 */ |
1535 extern DECLSPEC int SDLCALL SDL_SetSurfaceScaleMode(SDL_Surface *surface, | 1537 extern DECLSPEC int SDLCALL SDL_SetSurfaceScaleMode(SDL_Surface * surface, |
1536 int scaleMode); | 1538 int scaleMode); |
1537 | 1539 |
1538 /** | 1540 /** |
1539 * \fn int SDL_GetSurfaceScaleMode(SDL_Surface *surface, int *scaleMode) | 1541 * \fn int SDL_GetSurfaceScaleMode(SDL_Surface *surface, int *scaleMode) |
1540 * | 1542 * |
1545 * | 1547 * |
1546 * \return 0 on success, or -1 if the surface is not valid | 1548 * \return 0 on success, or -1 if the surface is not valid |
1547 * | 1549 * |
1548 * \sa SDL_SetSurfaceScaleMode() | 1550 * \sa SDL_SetSurfaceScaleMode() |
1549 */ | 1551 */ |
1550 extern DECLSPEC int SDLCALL SDL_GetSurfaceScaleMode(SDL_Surface *surface, | 1552 extern DECLSPEC int SDLCALL SDL_GetSurfaceScaleMode(SDL_Surface * surface, |
1551 int *scaleMode); | 1553 int *scaleMode); |
1552 | 1554 |
1553 /* | 1555 /* |
1554 * Sets the clipping rectangle for the destination surface in a blit. | 1556 * Sets the clipping rectangle for the destination surface in a blit. |
1555 * | 1557 * |