Add libwx-perl
[pkg-perl] / deb-src / libwx-perl / libwx-perl-0.96 / ext / datetime / XS / DateSpan.xsp
1 #############################################################################
2 ## Name:        ext/datetime/XS/DateSpan.xsp
3 ## Purpose:     XS++ for Wx::DateSpan
4 ## Author:      Mattia Barbon
5 ## Modified by:
6 ## Created:     10/01/2005
7 ## RCS-ID:      $Id: DateSpan.xsp 2079 2007-07-08 21:18:04Z mbarbon $
8 ## Copyright:   (c) 2005-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 <wx/datetime.h>
14
15 %module{Wx};
16
17 %name{Wx::DateSpan} class wxDateSpan
18 {
19         #wxDateSpan();
20         #%name{newFromYMWD} wxDateSpan(
21         #~wxDateSpan();
22         wxDateSpan(
23                 int year = 0,
24         int month = 0,
25                 int week = 0,
26         int day = 0 );
27
28         # these statics return a DateSpan of according size
29         #Day();
30         #Days( int days );
31
32         int GetDays();
33         int GetMonths();
34         int GetTotalDays();
35         int GetWeeks();
36         int GetYears();
37
38         wxDateSpan& Add( wxDateSpan& ds );
39         wxDateSpan& Multiply( int factor );
40         #wxDateSpan Negate();
41         wxDateSpan& Neg();
42         wxDateSpan& SetDays( int n );
43         wxDateSpan& SetYears( int n );
44         wxDateSpan& SetMonths( int n );
45         wxDateSpan& SetWeeks( int n );
46         wxDateSpan& Subtract( wxDateSpan& ds );
47 #       operator==
48 #       operator!=
49
50 ##    bool operator==(const wxGBPosition& p) const; (sample)
51 };
52
53 #%{
54 #       static functions
55
56 #       wxDateSpan::Day
57 #       wxDateSpan::Days
58 #       wxDateSpan::Month
59 #       wxDateSpan::Months
60 #       wxDateSpan::Week
61 #       wxDateSpan::Weeks
62 #       wxDateSpan::Year
63 #       wxDateSpan::Years
64
65 #%}