File: NotificationMessage.xsp

package info (click to toggle)
libwx-perl 0.9702-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 3,240 kB
  • ctags: 1,812
  • sloc: cpp: 8,988; perl: 6,366; makefile: 38; ansic: 1
file content (92 lines) | stat: -rw-r--r-- 2,506 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#############################################################################
## Name:        XS/NotificationMessage.xsp
## Purpose:     XS++ for Wx::NotificationMessage
## Author:      Mattia Barbon
## Modified by:
## Created:     25/12/2007
## RCS-ID:      $Id: NotificationMessage.xsp 2563 2009-05-17 09:58:35Z mbarbon $
## Copyright:   (c) 2007, 2009 Mattia Barbon
## Licence:     This program is free software; you can redistribute it and/or
##              modify it under the same terms as Perl itself
#############################################################################

%module{Wx};

#if WXPERL_W_VERSION_GE( 2, 9, 0 )

#include <wx/notifmsg.h>

%typemap{wxNotificationMessage*}{simple};

%name{Wx::NotificationMessage} class wxNotificationMessage
{
%{
void
new( ... )
  PPCODE:
    BEGIN_OVERLOAD()
        MATCH_VOIDM_REDISP( newDefault )
        MATCH_ANY_REDISP( newFull )
    END_OVERLOAD( "Wx::NotificationMessage::new" )
%}
    %name{newDefault}
    wxNotificationMessage();

#ifdef __WXMSW__
    %name{newFull}
    wxNotificationMessage( const wxString& title,
                           const wxString& message = wxEmptyString,
                           wxWindow *parent = NULL,
                           int flags = wxICON_INFORMATION )
        %code{% RETVAL = new wxNotificationMessage( title, message, parent );
                %};
#else
    %name{newFull}
    wxNotificationMessage( const wxString& title,
                           const wxString& message = wxEmptyString,
                           wxWindow *parent = NULL,
                           int flags = wxICON_INFORMATION );
#endif

%{
static void
wxNotificationMessage::CLONE()
  CODE:
    wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object );
%}
    ## // thread OK
    ~wxNotificationMessage()
        %code{% wxPli_thread_sv_unregister( aTHX_ "Wx::NotificationMessage", THIS, ST(0) );
                delete THIS;
                %};

    bool Show( int timeout = -1 );
    bool Close();

    void SetFlags( int flags );
    void SetTitle( const wxString& title );
    void SetMessage( const wxString& message );
    void SetParent( wxWindow *parent );

#ifdef __WXMSW__

%{
wxTaskBarIcon*
UseTaskBarIcon( icon )
    wxTaskBarIcon* icon
  CODE:
    RETVAL = wxNotificationMessage::UseTaskBarIcon( icon );
  OUTPUT: RETVAL

void
AlwaysUseGeneric( alwaysUseGeneric )
    bool alwaysUseGeneric
  CODE:
    wxNotificationMessage::AlwaysUseGeneric( alwaysUseGeneric );
%}

#endif

};

#endif