File: Colour.xs

package info (click to toggle)
libwx-perl 1%3A0.9909-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 3,912 kB
  • sloc: cpp: 9,728; perl: 8,182; ansic: 626; makefile: 41
file content (122 lines) | stat: -rw-r--r-- 2,368 bytes parent folder | download | duplicates (7)
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
#############################################################################
## Name:        XS/Colour.xs
## Purpose:     XS for Wx::Colour
## Author:      Mattia Barbon
## Modified by:
## Created:     29/10/2000
## RCS-ID:      $Id: Colour.xs 2285 2007-11-11 21:31:54Z mbarbon $
## Copyright:   (c) 2000-2002, 2004, 2006-2007 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 PACKAGE=Wx::Colour

void
wxColour::new( ... )
  PPCODE:
    BEGIN_OVERLOAD()
        MATCH_REDISP( wxPliOvl_n_n_n_n, newRGBA )
        MATCH_REDISP( wxPliOvl_n_n_n, newRGB )
        MATCH_REDISP( wxPliOvl_s, newName )
    END_OVERLOAD( Wx::Colour::new )

#if WXPERL_W_VERSION_GE( 2, 7, 1 )

wxColour*
newRGBA( CLASS, red, green, blue, alpha = wxALPHA_OPAQUE )
    SV* CLASS
    unsigned char red
    unsigned char green
    unsigned char blue
    unsigned char alpha
  CODE:
    RETVAL = new wxColour( red, green, blue, alpha );
  OUTPUT: RETVAL

#endif

wxColour*
newRGB( CLASS, red, green, blue )
    SV* CLASS
    unsigned char red
    unsigned char green
    unsigned char blue
  CODE:
    RETVAL = new wxColour( red, green, blue );
  OUTPUT: RETVAL

wxColour*
newName( CLASS, name )
    SV* CLASS
    wxString name
  CODE:
    RETVAL = new wxColour( name );
  OUTPUT: RETVAL

static void
wxColour::CLONE()
  CODE:
    wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object );

## // thread OK
void
wxColour::DESTROY()
  CODE:
    wxPli_thread_sv_unregister( aTHX_ "Wx::Colour", THIS, ST(0) );
    delete THIS;

unsigned char
wxColour::Blue()

unsigned char
wxColour::Green()

bool
wxColour::Ok()

#if WXPERL_W_VERSION_GE( 2, 8, 0 )

bool
wxColour::IsOk()

#endif

unsigned char
wxColour::Red()

#if WXPERL_W_VERSION_GE( 2, 7, 1 )

unsigned char
wxColour::Alpha()

void
wxColour::Set( red, green, blue, alpha )
    unsigned char red
    unsigned char green
    unsigned char blue
    unsigned char alpha

#else

void
wxColour::Set( red, green, blue )
    unsigned char red
    unsigned char green
    unsigned char blue

#endif

#if WXPERL_W_VERSION_GE( 2, 7, 2 )

wxString
wxColour::GetAsString( long flags )

#endif

#if !defined(__WXMAC__)

long
wxColour::GetPixel()

#endif