Mercurial > sdl-ios-xcode
comparison include/SDL_video.h @ 292:eadc0746dfaf
Added SDL_LockRect() and SDL_UnlockRect()
Incorporated XFree86 extension libraries into the source
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Tue, 05 Mar 2002 19:55:32 +0000 |
parents | b8688cfdc232 |
children | fab1ddc4d7bf |
comparison
equal
deleted
inserted
replaced
291:68a8a8237c09 | 292:eadc0746dfaf |
---|---|
528 * | 528 * |
529 * SDL_LockSurface() returns 0, or -1 if the surface couldn't be locked. | 529 * SDL_LockSurface() returns 0, or -1 if the surface couldn't be locked. |
530 */ | 530 */ |
531 extern DECLSPEC int SDL_LockSurface(SDL_Surface *surface); | 531 extern DECLSPEC int SDL_LockSurface(SDL_Surface *surface); |
532 extern DECLSPEC void SDL_UnlockSurface(SDL_Surface *surface); | 532 extern DECLSPEC void SDL_UnlockSurface(SDL_Surface *surface); |
533 | |
534 /* | |
535 * SDL_LockRect() locks a portion of the surface designated by the 'rect' | |
536 * parameter, and saves the resulting pixels and pitch in the arguments. | |
537 * The rect will be clipped if it extends beyond the bounds of the surface | |
538 * | |
539 * This may be more efficient than a full lock if you are using a hardware | |
540 * surface and plan to make a few changes to small areas in the surface. | |
541 * | |
542 * While a rectangle is locked, no other lock or blit call may be called | |
543 * on the surface. No operating system or library calls should be made | |
544 * between lock/unlock pairs, as critical system locks may be held during | |
545 * this time. | |
546 * | |
547 * After the surface is unlocked, the pixels pointer is no longer valid. | |
548 * | |
549 * SDL_LockRect() returns 0, or -1 if the surface couldn't be locked. | |
550 */ | |
551 extern DECLSPEC int SDL_LockRect(SDL_Surface *surface, SDL_Rect *rect, void **pixels, int *pitch); | |
552 extern DECLSPEC void SDL_UnlockRect(SDL_Surface *surface); | |
533 | 553 |
534 /* | 554 /* |
535 * Load a surface from a seekable SDL data source (memory or file.) | 555 * Load a surface from a seekable SDL data source (memory or file.) |
536 * If 'freesrc' is non-zero, the source will be closed after being read. | 556 * If 'freesrc' is non-zero, the source will be closed after being read. |
537 * Returns the new surface, or NULL if there was an error. | 557 * Returns the new surface, or NULL if there was an error. |