Skip to content

Commit

Permalink
new sources files (shape), see #13
Browse files Browse the repository at this point in the history
  • Loading branch information
remicollet committed Dec 26, 2013
1 parent 94a1e98 commit 09f12a8
Show file tree
Hide file tree
Showing 5 changed files with 89 additions and 0 deletions.
1 change: 1 addition & 0 deletions config.m4
Expand Up @@ -57,6 +57,7 @@ power.c
rect.c
rwops.c
sdl.c
shape.c
surface.c
version.c
video.c
Expand Down
2 changes: 2 additions & 0 deletions package.xml
Expand Up @@ -86,6 +86,8 @@ http://pear.php.net/dtd/package-2.0.xsd">
<file role='src' name='rwops.h'/>
<file role='src' name='sdl.c'/>
<file role='src' name='sdl.h'/>
<file role='src' name='shape.c'/>
<file role='src' name='shape.h'/>
<file role='src' name='surface.c'/>
<file role='src' name='surface.h'/>
<file role='src' name='version.c'/>
Expand Down
2 changes: 2 additions & 0 deletions php_sdl.c
Expand Up @@ -39,6 +39,7 @@
#include "rect.h"
#include "rwops.h"
#include "sdl.h"
#include "shape.h"
#include "surface.h"
#include "version.h"
#include "video.h"
Expand Down Expand Up @@ -88,6 +89,7 @@ PHP_MINIT_FUNCTION(sdl)
&& SUCCESS == PHP_MINIT_CALL(sdl_rect)
&& SUCCESS == PHP_MINIT_CALL(sdl_rwops)
&& SUCCESS == PHP_MINIT_CALL(sdl_sdl)
&& SUCCESS == PHP_MINIT_CALL(sdl_shape)
&& SUCCESS == PHP_MINIT_CALL(sdl_surface)
&& SUCCESS == PHP_MINIT_CALL(sdl_version)
&& SUCCESS == PHP_MINIT_CALL(sdl_video)
Expand Down
48 changes: 48 additions & 0 deletions shape.c
@@ -0,0 +1,48 @@
/*
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2013 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |
| http://www.php.net/license/3_01.txt |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Santiago Lizardo <santiagolizardo@php.net> |
| Remi Collet <remi@php.net> |
+----------------------------------------------------------------------+
*/

/* $Id$ */

/*
+----------------------------------------------------------------------+
| wrapper for SDL2/SDL_shape.h (only SDL_Window) |
+----------------------------------------------------------------------+
| class SDL_WindowShapeMode |
+----------------------------------------------------------------------+
*/


#include "php_sdl.h"
#include "shape.h"
#include "window.h"


/* {{{ sdl_shape_functions[] */
zend_function_entry sdl_shape_functions[] = {
ZEND_FE_END
};
/* }}} */


/* {{{ MINIT */
PHP_MINIT_FUNCTION(sdl_shape)
{
return (zend_register_functions(NULL, sdl_shape_functions, NULL, MODULE_PERSISTENT TSRMLS_CC));
}
/* }}} */
36 changes: 36 additions & 0 deletions shape.h
@@ -0,0 +1,36 @@
/*
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2013 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |
| http://www.php.net/license/3_01.txt |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Santiago Lizardo <santiagolizardo@php.net> |
| Remi Collet <remi@php.net> |
+----------------------------------------------------------------------+
*/

/* $Id$ */

#ifndef PHP_SDL_SHAPE_H
#define PHP_SDL_SHAPE_H

#ifdef __cplusplus
extern "C" {
#endif

PHP_MINIT_FUNCTION(sdl_shape);

#ifdef __cplusplus
} // extern "C"
#endif

#endif /* PHP_SDL_SHAPE_H */

0 comments on commit 09f12a8

Please sign in to comment.