Add libwx-perl
[pkg-perl] / deb-src / libwx-perl / libwx-perl-0.96 / ext / media / cpp / me_constants.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name:        ext/media/cpp/me_constants.cpp
3 // Purpose:     constants for wxMediaCtrl
4 // Author:      Mattia Barbon
5 // Modified by:
6 // Created:     04/03/2006
7 // RCS-ID:      $Id: me_constants.cpp 2057 2007-06-18 23:03:00Z mbarbon $
8 // Copyright:   (c) 2006 Mattia Barbon
9 // Licence:     This program is free software; you can redistribute it and/or
10 //              modify it under the same terms as Perl itself
11 /////////////////////////////////////////////////////////////////////////////
12
13 #include "cpp/constants.h"
14
15 #if wxUSE_MEDIACTRL
16
17 #include "wx/mediactrl.h"
18
19 double media_constant( const char* name, int arg )
20 {
21     // !package: Wx
22     // !parser: sub { $_[0] =~ m<^\s*r\w*\(\s*(\w+)\s*\);\s*(?://(.*))?$> }
23     // !tag: media
24 #define r( n ) \
25     if( strEQ( name, #n ) ) \
26         return n;
27
28     WX_PL_CONSTANT_INIT();
29
30     switch( fl )
31     {
32     case 'E':
33         r( wxEVT_MEDIA_FINISHED );
34         r( wxEVT_MEDIA_STOP );
35         r( wxEVT_MEDIA_LOADED );
36     case 'M':
37         r( wxMEDIASTATE_STOPPED );
38         r( wxMEDIASTATE_PAUSED );
39         r( wxMEDIASTATE_PLAYING );
40
41         r( wxMEDIACTRLPLAYERCONTROLS_NONE );
42         r( wxMEDIACTRLPLAYERCONTROLS_STEP );
43         r( wxMEDIACTRLPLAYERCONTROLS_VOLUME );
44         r( wxMEDIACTRLPLAYERCONTROLS_DEFAULT );
45         break;
46     }
47 #undef r
48
49     WX_PL_CONSTANT_CLEANUP();
50 }
51
52 wxPlConstants media_module( &media_constant );
53
54 #endif
55