migrate ResizeEvent
Kartik Thakore [Mon, 9 Nov 2009 19:18:26 +0000 (14:18 -0500)]
Build.PL
src/Core/objects/Event.xs

index c4b605d..8535543 100644 (file)
--- a/Build.PL
+++ b/Build.PL
@@ -217,14 +217,6 @@ my %subsystems =
                },
                libraries => [qw( SDL )],
        },
-       ResizeEvent => {
-               file      => {
-                       from  => 'src/Core/objects/ResizeEvent.xs',
-                       to    => 'lib/SDL/ResizeEvent.xs',
-               },
-               libraries => [qw( SDL )],
-       },
-
        VideoInfo => {
                file      => {
                        from  => 'src/Core/objects/VideoInfo.xs',
index a8f3b1f..84bef79 100644 (file)
@@ -311,6 +311,45 @@ event_resize ( event, ... )
        OUTPUT:
                RETVAL
 
+Uint8
+event_resize_type ( event, ... )
+       SDL_Event *event
+       CODE: 
+               SDL_ResizeEvent * r = &(event->resize);
+               RETVAL = r->type;
+       OUTPUT:
+               RETVAL
+
+int
+event_resize_w ( event, ... )
+       SDL_Event *event
+       CODE: 
+               SDL_ResizeEvent * r = &(event->resize);
+               if( items > 1 )
+               {
+                       r->w = SvIV( ST(1) );
+
+               }
+
+               RETVAL = r->w;
+       OUTPUT:
+               RETVAL
+
+int
+event_resize_h ( event, ... )
+       SDL_Event *event
+       CODE: 
+                SDL_ResizeEvent * r = &(event->resize); 
+               if( items > 1 )
+               {
+                       r->h = SvIV( ST(1) );
+
+               }
+
+               RETVAL = r->h;
+       OUTPUT:
+               RETVAL
+
 SDL_ExposeEvent *
 event_expose ( event, ... )
        SDL_Event * event