Remove tests
[pkg-perl] / deb-src / libwx-perl / libwx-perl-0.96 / XS / NotificationMessage.xsp
1 #############################################################################
2 ## Name:        XS/NotificationMessage.xsp
3 ## Purpose:     XS++ for Wx::NotificationMessage
4 ## Author:      Mattia Barbon
5 ## Modified by:
6 ## Created:     25/12/2007
7 ## RCS-ID:      $Id: NotificationMessage.xsp 2563 2009-05-17 09:58:35Z mbarbon $
8 ## Copyright:   (c) 2007, 2009 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 %module{Wx};
14
15 #if WXPERL_W_VERSION_GE( 2, 9, 0 )
16
17 #include <wx/notifmsg.h>
18
19 %typemap{wxNotificationMessage*}{simple};
20
21 %name{Wx::NotificationMessage} class wxNotificationMessage
22 {
23 %{
24 void
25 new( ... )
26   PPCODE:
27     BEGIN_OVERLOAD()
28         MATCH_VOIDM_REDISP( newDefault )
29         MATCH_ANY_REDISP( newFull )
30     END_OVERLOAD( "Wx::NotificationMessage::new" )
31 %}
32     %name{newDefault}
33     wxNotificationMessage();
34
35 #ifdef __WXMSW__
36     %name{newFull}
37     wxNotificationMessage( const wxString& title,
38                            const wxString& message = wxEmptyString,
39                            wxWindow *parent = NULL,
40                            int flags = wxICON_INFORMATION )
41         %code{% RETVAL = new wxNotificationMessage( title, message, parent );
42                 %};
43 #else
44     %name{newFull}
45     wxNotificationMessage( const wxString& title,
46                            const wxString& message = wxEmptyString,
47                            wxWindow *parent = NULL,
48                            int flags = wxICON_INFORMATION );
49 #endif
50
51 %{
52 static void
53 wxNotificationMessage::CLONE()
54   CODE:
55     wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object );
56 %}
57     ## // thread OK
58     ~wxNotificationMessage()
59         %code{% wxPli_thread_sv_unregister( aTHX_ "Wx::NotificationMessage", THIS, ST(0) );
60                 delete THIS;
61                 %};
62
63     bool Show( int timeout = -1 );
64     bool Close();
65
66     void SetFlags( int flags );
67     void SetTitle( const wxString& title );
68     void SetMessage( const wxString& message );
69     void SetParent( wxWindow *parent );
70
71 #ifdef __WXMSW__
72
73 %{
74 wxTaskBarIcon*
75 UseTaskBarIcon( icon )
76     wxTaskBarIcon* icon
77   CODE:
78     RETVAL = wxNotificationMessage::UseTaskBarIcon( icon );
79   OUTPUT: RETVAL
80
81 void
82 AlwaysUseGeneric( alwaysUseGeneric )
83     bool alwaysUseGeneric
84   CODE:
85     wxNotificationMessage::AlwaysUseGeneric( alwaysUseGeneric );
86 %}
87
88 #endif
89
90 };
91
92 #endif