FS#144 - Implement copy "constructors" in CSFML
git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1320 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
parent
da44e3d8e5
commit
bc6beac402
38 changed files with 379 additions and 48 deletions
|
@ -41,6 +41,16 @@
|
|||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfSound* sfSound_Create();
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Copy an existing sound
|
||||
///
|
||||
/// \param sound : Sound to copy
|
||||
///
|
||||
/// \return Copied object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfSound* sfSound_Copy(sfSound* sound);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Destroy an existing sound
|
||||
///
|
||||
|
|
|
@ -68,6 +68,16 @@ CSFML_API sfSoundBuffer* sfSoundBuffer_CreateFromMemory(const char* data, size_t
|
|||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfSoundBuffer* sfSoundBuffer_CreateFromSamples(const sfInt16* samples, size_t samplesCount, unsigned int channelsCount, unsigned int sampleRate);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Copy an existing sound buffer
|
||||
///
|
||||
/// \param soundBuffer : Sound buffer to copy
|
||||
///
|
||||
/// \return Copied object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfSoundBuffer* sfSoundBuffer_Copy(sfSoundBuffer* soundBuffer);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Destroy an existing sound buffer
|
||||
///
|
||||
|
|
|
@ -53,6 +53,16 @@ CSFML_API sfFont* sfFont_CreateFromFile(const char* filename);
|
|||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfFont* sfFont_CreateFromMemory(const char* data, size_t sizeInBytes);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Copy an existing font
|
||||
///
|
||||
/// \param font : Font to copy
|
||||
///
|
||||
/// \return Copied object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfFont* sfFont_Copy(sfFont* font);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Destroy an existing font
|
||||
///
|
||||
|
|
|
@ -87,6 +87,16 @@ CSFML_API sfImage* sfImage_CreateFromFile(const char* filename);
|
|||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfImage* sfImage_CreateFromMemory(const char* data, size_t sizeInBytes);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Copy an existing image
|
||||
///
|
||||
/// \param image : Image to copy
|
||||
///
|
||||
/// \return Copied object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfImage* sfImage_Copy(sfImage* image);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Destroy an existing image
|
||||
///
|
||||
|
@ -128,7 +138,7 @@ CSFML_API void sfImage_CreateMaskFromColor(sfImage* image, sfColor colorKey, sfU
|
|||
/// \param sourceRect : Sub-rectangle of the source image to copy
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfImage_Copy(sfImage* image, const sfImage* source, unsigned int destX, unsigned int destY, sfIntRect sourceRect);
|
||||
CSFML_API void sfImage_CopyImage(sfImage* image, const sfImage* source, unsigned int destX, unsigned int destY, sfIntRect sourceRect);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Create the image from the current contents of the
|
||||
|
|
|
@ -52,6 +52,16 @@ CSFML_API sfShader* sfShader_CreateFromFile(const char* filename);
|
|||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfShader* sfShader_CreateFromMemory(const char* effect);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Copy an existing shader
|
||||
///
|
||||
/// \param shader : Shader to copy
|
||||
///
|
||||
/// \return Copied object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfShader* sfShader_Copy(sfShader* shader);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Destroy an existing shader
|
||||
///
|
||||
|
|
|
@ -79,6 +79,16 @@ CSFML_API sfShape* sfShape_CreateRectangle(float p1x, float p1y, float p2x, floa
|
|||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfShape* sfShape_CreateCircle(float x, float y, float radius, sfColor color, float outline, sfColor outlineColor);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Copy an existing shape
|
||||
///
|
||||
/// \param shape : Shape to copy
|
||||
///
|
||||
/// \return Copied object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfShape* sfShape_Copy(sfShape* shape);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Destroy an existing Shape
|
||||
///
|
||||
|
|
|
@ -43,6 +43,16 @@
|
|||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfSprite* sfSprite_Create();
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Copy an existing sprite
|
||||
///
|
||||
/// \param sprite : Sprite to copy
|
||||
///
|
||||
/// \return Copied object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfSprite* sfSprite_Copy(sfSprite* sprite);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Destroy an existing sprite
|
||||
///
|
||||
|
|
|
@ -55,6 +55,16 @@ typedef enum
|
|||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfText* sfText_Create();
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Copy an existing text
|
||||
///
|
||||
/// \param text : Text to copy
|
||||
///
|
||||
/// \return Copied object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfText* sfText_Copy(sfText* text);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Destroy an existing text
|
||||
///
|
||||
|
|
|
@ -47,6 +47,16 @@ CSFML_API sfView* sfView_Create();
|
|||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfView* sfView_CreateFromRect(sfFloatRect rectangle);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Copy an existing view
|
||||
///
|
||||
/// \param view : View to copy
|
||||
///
|
||||
/// \return Copied object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfView* sfView_Copy(sfView* view);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Destroy an existing view
|
||||
///
|
||||
|
|
|
@ -40,6 +40,16 @@
|
|||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfPacket* sfPacket_Create();
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Copy an existing packet
|
||||
///
|
||||
/// \param packet : Packet to copy
|
||||
///
|
||||
/// \return Copied object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfPacket* sfPacket_Copy(sfPacket* packet);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Destroy an existing packet
|
||||
///
|
||||
|
|
|
@ -41,6 +41,17 @@
|
|||
CSFML_API sfSelectorTCP* sfSelectorTCP_Create();
|
||||
CSFML_API sfSelectorUDP* sfSelectorUDP_Create();
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Copy an existing selector
|
||||
///
|
||||
/// \param selector : Selector to copy
|
||||
///
|
||||
/// \return Copied object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfSelectorTCP* sfSelectorTCP_Copy(sfSelectorTCP* selector);
|
||||
CSFML_API sfSelectorUDP* sfSelectorUDP_Copy(sfSelectorUDP* selector);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Destroy an existing selector
|
||||
///
|
||||
|
|
|
@ -42,6 +42,16 @@
|
|||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfSocketTCP* sfSocketTCP_Create();
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Copy an existing TCP socket
|
||||
///
|
||||
/// \param socket : Socket to copy
|
||||
///
|
||||
/// \return Copied object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfSocketTCP* sfSocketTCP_Copy(sfSocketTCP* socket);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Destroy an existing TCP socket
|
||||
///
|
||||
|
|
|
@ -42,6 +42,16 @@
|
|||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfSocketUDP* sfSocketUDP_Create();
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Copy an existing UDP socket
|
||||
///
|
||||
/// \param socket : Socket to copy
|
||||
///
|
||||
/// \return Copied object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfSocketUDP* sfSocketUDP_Copy(sfSocketUDP* socket);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Destroy an existing UDP socket
|
||||
///
|
||||
|
|
|
@ -40,6 +40,16 @@
|
|||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfClock* sfClock_Create();
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Copy an existing clock
|
||||
///
|
||||
/// \param clock : Clock to copy
|
||||
///
|
||||
/// \return Copied object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfClock* sfClock_Copy(sfClock* clock);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Destroy an existing clock
|
||||
///
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue