The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Private Attributes | List of all members
surface_lock Struct Reference

Helper class for pinning SDL surfaces into memory. More...

#include <utils.hpp>

Public Member Functions

 surface_lock (surface &surf)
 
 ~surface_lock ()
 
Uint32 * pixels ()
 

Private Attributes

surfacesurface_
 
bool locked_
 

Detailed Description

Helper class for pinning SDL surfaces into memory.

Note
This class should be used only with neutral surfaces, so that the pointer returned by pixels is meaningful.

Definition at line 439 of file utils.hpp.

Constructor & Destructor Documentation

surface_lock::surface_lock ( surface surf)

Definition at line 39 of file utils.cpp.

References locked_, and surface_.

surface_lock::~surface_lock ( )

Definition at line 45 of file utils.cpp.

References locked_, and surface_.

Member Function Documentation

Uint32* surface_lock::pixels ( )
inline

Member Data Documentation

bool surface_lock::locked_
private

Definition at line 447 of file utils.hpp.

Referenced by surface_lock(), and ~surface_lock().

surface& surface_lock::surface_
private

Definition at line 446 of file utils.hpp.

Referenced by pixels(), surface_lock(), and ~surface_lock().


The documentation for this struct was generated from the following files: