Add libwx-perl
[pkg-perl] / deb-src / libwx-perl / libwx-perl-0.96 / ext / html / XS / HtmlTag.xsp
1 #############################################################################
2 ## Name:        ext/html/XS/HtmlTag.xsp
3 ## Purpose:     XS for Wx::HtmlTag
4 ## Author:      Mattia Barbon
5 ## Modified by:
6 ## Created:     30/11/2003
7 ## RCS-ID:      $Id: HtmlTag.xsp 2234 2007-09-30 20:34:36Z mbarbon $
8 ## Copyright:   (c) 2003-2004, 2007 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 %{
16 #include <wx/html/htmltag.h>
17 %}
18
19 %name{Wx::HtmlTag} class wxHtmlTag
20 {
21     wxHtmlTag *GetParent() const;
22     wxHtmlTag *GetFirstSibling() const;
23     wxHtmlTag *GetLastSibling() const;
24     wxHtmlTag *GetChildren() const;
25     wxHtmlTag *GetPreviousSibling() const;
26     wxHtmlTag *GetNextSibling() const;
27     wxHtmlTag *GetNextTag() const;
28
29     wxString GetName() const;
30
31     bool HasParam(const wxString& par) const;
32
33     wxString GetParam(const wxString& par, bool with_commas = false) const;
34
35 ##    int ScanParam(const wxString& par, const wxChar *format,
36 ##                  void *param) const;
37
38     wxString GetAllParams() const;
39
40     bool HasEnding() const;
41
42 #if WXPERL_W_VERSION_LT( 2, 9, 0 )
43     int GetBeginPos() const;
44     int GetEndPos1() const;
45     int GetEndPos2() const;
46 #endif
47 };
48
49 %{
50
51 void
52 wxHtmlTag::GetParamAsColour( wxString par )
53   PPCODE:
54     wxColour col;
55     bool ret = THIS->GetParamAsColour( par, &col );
56
57     EXTEND( SP, 2 );
58     XPUSHs( newSViv( ret ) );
59     XPUSHs( wxPli_non_object_2_sv( aTHX_ sv_newmortal(),
60                                    ( ret ? new wxColour( col ) : NULL ),
61                                    "Wx::Colour" ) );
62
63 void
64 wxHtmlTag::GetParamAsInt(wxString par)
65   PPCODE:
66     int val;
67     bool ret = THIS->GetParamAsInt( par, &val );
68
69     EXTEND( SP, 2 );
70     XPUSHs( newSViv( ret ) );
71     XPUSHs( newSViv( val ) );
72
73 %}