Add libwx-perl
[pkg-perl] / deb-src / libwx-perl / libwx-perl-0.96 / XS / DC.xs
1 #############################################################################
2 ## Name:        XS/DC.xs
3 ## Purpose:     XS for Wx::DC and derived classes
4 ## Author:      Mattia Barbon
5 ## Modified by:
6 ## Created:     29/10/2000
7 ## RCS-ID:      $Id: DC.xs 2561 2009-05-17 08:49:49Z mbarbon $
8 ## Copyright:   (c) 2000-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 %{
14 #include <wx/dc.h>
15 #include <wx/dcmemory.h>
16 #include <wx/dcclient.h>
17 #include <wx/dcscreen.h>
18 #include <wx/window.h>
19 #include <wx/dcbuffer.h>
20
21 #define wxNullBitmapPtr (wxBitmap*) &wxNullBitmap
22
23 MODULE=Wx PACKAGE=Wx::DC
24
25 static void
26 wxDC::CLONE()
27   CODE:
28     wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object );
29
30 ## // thread OK
31 void
32 wxDC::DESTROY()
33   CODE:
34     wxPli_thread_sv_unregister( aTHX_ wxPli_get_class( aTHX_ ST(0) ),
35                                 THIS, ST(0) );
36     if( wxPli_object_is_deleteable( aTHX_ ST(0) ) )
37         delete THIS;
38
39 #if WXPERL_W_VERSION_LT( 2, 7, 0 ) || WXWIN_COMPATIBILITY_2_6
40
41 void
42 wxDC::BeginDrawing()
43
44 #endif
45
46 bool
47 wxDC::Blit( xdest, ydest, width, height, source, xsrc, ysrc, logicalFunc = wxCOPY, useMask = false )
48     wxCoord xdest
49     wxCoord ydest
50     wxCoord width
51     wxCoord height
52     wxDC* source
53     wxCoord xsrc
54     wxCoord ysrc
55     wxRasterOperationMode logicalFunc
56     bool useMask
57
58 #if WXPERL_W_VERSION_GE( 2, 9, 0 )
59
60 bool
61 wxDC::StretchBlit( xdest, ydest, wdest, hdest, source, xsrc, ysrc, wsrc, hsrc, logicalFunc = wxCOPY, useMask = false, xsrcmask = -1, ysrcmask = -1 )
62     wxCoord xdest
63     wxCoord ydest
64     wxCoord wdest
65     wxCoord hdest
66     wxDC* source
67     wxCoord xsrc
68     wxCoord ysrc
69     wxCoord wsrc
70     wxCoord hsrc
71     wxRasterOperationMode logicalFunc
72     bool useMask
73     wxCoord xsrcmask
74     wxCoord ysrcmask
75
76 #endif
77
78 void
79 wxDC::CalcBoundingBox( x, y )
80     wxCoord x
81     wxCoord y
82
83 void
84 wxDC::Clear()
85
86 void
87 wxDC::CrossHair( x, y )
88     wxCoord x
89     wxCoord y
90
91 void
92 wxDC::DestroyClippingRegion()
93
94 wxCoord
95 wxDC::DeviceToLogicalX( x )
96     wxCoord x
97
98 wxCoord
99 wxDC::DeviceToLogicalXRel( x )
100     wxCoord x
101
102 wxCoord
103 wxDC::DeviceToLogicalY( y )
104     wxCoord y
105
106 wxCoord
107 wxDC::DeviceToLogicalYRel( y )
108     wxCoord y
109
110 void
111 wxDC::DrawArc( x1, y1, x2, y2, xc, yc )
112     wxCoord x1
113     wxCoord y1
114     wxCoord x2
115     wxCoord y2
116     wxCoord xc
117     wxCoord yc
118
119 void
120 wxDC::DrawBitmap( bitmap, x, y, transparent )
121     wxBitmap* bitmap
122     wxCoord x
123     wxCoord y
124     bool transparent
125   CODE:
126     THIS->DrawBitmap( *bitmap, x, y, transparent );
127
128 void
129 wxDC::DrawCheckMark( ... )
130   PPCODE:
131     BEGIN_OVERLOAD()
132         MATCH_REDISP( wxPliOvl_n_n_n_n, DrawCheckMarkXYWH )
133         MATCH_REDISP( wxPliOvl_wrec, DrawCheckMarkRect )
134     END_OVERLOAD( Wx::DC::DrawCheckMark )
135
136 void
137 wxDC::DrawCheckMarkXYWH( x, y, width, height )
138     wxCoord x
139     wxCoord y
140     wxCoord width
141     wxCoord height
142   CODE:
143     THIS->DrawCheckMark( x, y, width, height );
144
145 void
146 wxDC::DrawCheckMarkRect( rect )
147     wxRect* rect
148   CODE:
149     THIS->DrawCheckMark( *rect );
150
151 void
152 wxDC::DrawCircle( x, y, radius )
153     wxCoord x
154     wxCoord y
155     wxCoord radius
156
157 void
158 wxDC::DrawEllipse( x, y, width, height )
159     wxCoord x
160     wxCoord y
161     wxCoord width
162     wxCoord height
163
164 void
165 wxDC::DrawEllipticArc( x, y, width, height, start, end )
166     wxCoord x
167     wxCoord y
168     wxCoord width
169     wxCoord height
170     double start
171     double end
172
173 void
174 wxDC::DrawIcon( icon, x, y )
175     wxIcon* icon
176     wxCoord x
177     wxCoord y
178   CODE:
179     THIS->DrawIcon( *icon, x, y );
180
181 void
182 wxDC::DrawLine( x1, y1, x2, y2 )
183     wxCoord x1
184     wxCoord y1
185     wxCoord x2
186     wxCoord y2
187
188 void
189 wxDC::DrawLines( list, xoffset = 0, yoffset = 0 )
190     SV* list
191     wxCoord xoffset
192     wxCoord yoffset
193   PREINIT:
194 #if WXPERL_W_VERSION_GE( 2, 9, 0 )
195     wxPointList points;
196 #else
197     wxList points;
198 #endif
199     wxPliArrayGuard<wxPoint> pts;
200   CODE:
201     wxPli_av_2_pointlist( aTHX_ list, &points, pts.lvalue() );
202     THIS->DrawLines( &points, xoffset, yoffset );
203
204 void
205 wxDC::DrawPoint( x, y )
206     wxCoord x
207     wxCoord y
208
209 void
210 wxDC::DrawPolygon( list, xoffset, yoffset, fill_style = wxODDEVEN_RULE )
211     SV* list
212     wxCoord xoffset
213     wxCoord yoffset
214     wxPolygonFillMode fill_style
215   PREINIT:
216 #if WXPERL_W_VERSION_GE( 2, 9, 0 )
217     wxPointList points;
218 #else
219     wxList points;
220 #endif
221     wxPliArrayGuard<wxPoint> pts;
222   CODE:
223     wxPli_av_2_pointlist( aTHX_ list, &points, pts.lvalue() );
224     THIS->DrawPolygon( &points, xoffset, yoffset, fill_style );
225
226 void
227 wxDC::DrawRectangle( x, y, width, height )
228     wxCoord x
229     wxCoord y
230     wxCoord width
231     wxCoord height
232
233 void
234 wxDC::DrawRotatedText( text, x, y, angle )
235     wxString text
236     wxCoord x
237     wxCoord y
238     double angle
239
240 void
241 wxDC::DrawRoundedRectangle( x, y, width, height, radius = 20 )
242     wxCoord x
243     wxCoord y
244     wxCoord width
245     wxCoord height
246     wxCoord radius
247
248 void
249 wxDC::DrawSpline( list )
250     SV* list
251   PREINIT:
252 #if WXPERL_W_VERSION_GE( 2, 9, 0 )
253     wxPointList points;
254 #else
255     wxList points;
256 #endif
257     wxPliArrayGuard<wxPoint> pts;
258   CODE:
259     wxPli_av_2_pointlist( aTHX_ list, &points, pts.lvalue() );
260     THIS->DrawSpline( &points );
261
262 void
263 wxDC::DrawText( text, x, y )
264     wxString text
265     wxCoord x
266     wxCoord y
267
268 void
269 wxDC::EndDoc()
270
271 #if WXPERL_W_VERSION_LT( 2, 7, 0 ) || WXWIN_COMPATIBILITY_2_6
272
273 void
274 wxDC::EndDrawing()
275
276 #endif
277
278 void
279 wxDC::EndPage()
280
281 void
282 wxDC::FloodFill( x, y, colour, style =  wxFLOOD_SURFACE )
283     wxCoord x
284     wxCoord y
285     wxColour* colour
286     wxFloodFillStyle style
287   CODE:
288     THIS->FloodFill( x, y, *colour, style );
289
290 #if WXPERL_W_VERSION_GE( 2, 7, 2 )
291
292 wxBitmap*
293 wxDC::GetAsBitmap( wxRect* subrect = NULL )
294   CODE:
295     RETVAL = new wxBitmap( THIS->GetAsBitmap( subrect ) );
296   OUTPUT: RETVAL
297
298 #endif
299
300 wxBrush*
301 wxDC::GetBackground()
302   CODE:
303     RETVAL = new wxBrush( THIS->GetBackground() );
304   OUTPUT:
305     RETVAL
306
307 int
308 wxDC::GetBackgroundMode()
309
310 wxBrush*
311 wxDC::GetBrush()
312   CODE:
313     RETVAL = new wxBrush( THIS->GetBrush() );
314   OUTPUT:
315     RETVAL
316
317 wxCoord
318 wxDC::GetCharHeight()
319
320 wxCoord
321 wxDC::GetCharWidth()
322
323 void
324 wxDC::GetClippingBox()
325   PREINIT:
326     wxCoord x, y, width, height;
327   PPCODE:
328     THIS->GetClippingBox( &x, &y, &width, &height );
329     EXTEND( SP, 4 );
330     PUSHs( sv_2mortal( newSViv( x ) ) );
331     PUSHs( sv_2mortal( newSViv( y ) ) );
332     PUSHs( sv_2mortal( newSViv( width ) ) );
333     PUSHs( sv_2mortal( newSViv( height ) ) );
334
335 wxFont*
336 wxDC::GetFont()
337   CODE:
338     RETVAL = new wxFont( THIS->GetFont() );
339   OUTPUT:
340     RETVAL
341
342 wxRasterOperationMode
343 wxDC::GetLogicalFunction()
344
345 wxMappingMode
346 wxDC::GetMapMode()
347
348 #if !defined( __WXMAC__ ) && WXPERL_W_VERSION_LE( 2, 5, 3 )
349
350 bool
351 wxDC::GetOptimization()
352
353 #endif
354
355 wxPen*
356 wxDC::GetPen()
357   CODE:
358     RETVAL = new wxPen( THIS->GetPen() );
359   OUTPUT:
360     RETVAL
361
362 wxColour*
363 wxDC::GetPixel( x, y )
364     wxCoord x
365     wxCoord y
366   PREINIT:
367     wxColour c;
368   CODE:
369     THIS->GetPixel( x, y, &c );
370     RETVAL = new wxColour( c );
371   OUTPUT:
372     RETVAL
373
374 wxSize*
375 wxDC::GetSize()
376   CODE:
377     RETVAL = new wxSize( THIS->GetSize() );
378   OUTPUT:
379     RETVAL
380
381 void
382 wxDC::GetSizeWH()
383   PREINIT:
384     wxCoord x, y;
385   PPCODE:
386     THIS->GetSize( &x, &y );
387     EXTEND( SP, 2 );
388     PUSHs( sv_2mortal( newSViv( x ) ) );
389     PUSHs( sv_2mortal( newSViv( y ) ) );
390
391 wxSize*
392 wxDC::GetSizeMM()
393   CODE:
394     RETVAL = new wxSize( THIS->GetSizeMM() );
395   OUTPUT:
396     RETVAL
397
398 void
399 wxDC::GetSizeMMWH()
400   PREINIT:
401     wxCoord x, y;
402   PPCODE:
403     THIS->GetSizeMM( &x, &y );
404     EXTEND( SP, 2 );
405     PUSHs( sv_2mortal( newSViv( x ) ) );
406     PUSHs( sv_2mortal( newSViv( y ) ) );
407
408 wxSize*
409 wxDC::GetPPI()
410   CODE:
411     RETVAL = new wxSize( THIS->GetPPI() );
412   OUTPUT:
413     RETVAL
414
415 wxColour*
416 wxDC::GetTextBackground()
417   CODE:
418     RETVAL = new wxColour( THIS->GetTextBackground() );
419   OUTPUT:
420     RETVAL
421
422 void
423 wxDC::GetTextExtent( string, font = NULL )
424     wxString string
425     wxFont* font
426   PREINIT:
427     wxCoord x, y, descent, externalLeading;
428   PPCODE:
429     THIS->GetTextExtent( string, &x, &y, &descent, &externalLeading,
430         font );
431     EXTEND( SP, 4 );
432     PUSHs( sv_2mortal( newSViv( x ) ) );
433     PUSHs( sv_2mortal( newSViv( y ) ) );
434     PUSHs( sv_2mortal( newSViv( descent ) ) );
435     PUSHs( sv_2mortal( newSViv( externalLeading ) ) );
436
437 void
438 wxDC::GetPartialTextExtents( string )
439     wxString string
440   PREINIT:
441     wxArrayInt widths;
442   PPCODE:
443     bool ok = THIS->GetPartialTextExtents( string, widths );
444     if( ok ) {
445         PUTBACK;
446         wxPli_intarray_push( aTHX_ widths );
447         SPAGAIN;
448     } else
449         XSRETURN_EMPTY;
450
451 void
452 wxDC::GetMultiLineTextExtent( string, font = NULL )
453     wxString string
454     wxFont* font
455   PREINIT:
456     wxCoord w, h, hLine;
457   PPCODE:
458     THIS->GetMultiLineTextExtent( string, &w, &h, &hLine, font );
459     EXTEND( SP, 3 );
460     PUSHs( sv_2mortal( newSViv( w ) ) );
461     PUSHs( sv_2mortal( newSViv( h ) ) );
462     PUSHs( sv_2mortal( newSViv( hLine ) ) );
463
464 wxColour*
465 wxDC::GetTextForeground()
466   CODE:
467     RETVAL = new wxColour( THIS->GetTextForeground() );
468   OUTPUT:
469     RETVAL
470
471 void
472 wxDC::GetUserScale()
473   PREINIT:
474     double x, y;
475   PPCODE:
476     THIS->GetUserScale( &x, &y );
477     EXTEND( SP, 2 );
478     PUSHs( sv_2mortal( newSVnv( x ) ) );
479     PUSHs( sv_2mortal( newSVnv( y ) ) );
480
481 #if WXPERL_W_VERSION_GE( 2, 7, 2 )
482
483 void
484 wxDC::GradientFillLinear( rect, initialColour, destColour, direction = wxEAST )
485     wxRect* rect
486     wxColour initialColour
487     wxColour destColour
488     wxDirection direction
489   C_ARGS: *rect, initialColour, destColour, direction
490
491 #endif
492
493 wxCoord
494 wxDC::LogicalToDeviceX( x )
495     wxCoord x
496
497 wxCoord
498 wxDC::LogicalToDeviceXRel( x )
499     wxCoord x
500
501 wxCoord
502 wxDC::LogicalToDeviceY( y )
503     wxCoord y
504
505 wxCoord
506 wxDC::LogicalToDeviceYRel( y )
507     wxCoord y
508
509 wxCoord
510 wxDC::MaxX()
511
512 wxCoord
513 wxDC::MaxY()
514
515 wxCoord
516 wxDC::MinX()
517
518 wxCoord
519 wxDC::MinY()
520
521 #if WXPERL_W_VERSION_GE( 2, 8, 0 )
522
523 bool
524 wxDC::IsOk()
525
526 bool
527 wxDC::Ok()
528   CODE:
529     RETVAL = THIS->IsOk();
530   OUTPUT: RETVAL
531
532 #else
533
534 bool
535 wxDC::Ok()
536
537 #endif
538
539 void
540 wxDC::ResetBoundingBox()
541
542 void
543 wxDC::SetAxisOrientation( xLeftRight, yBottomUp )
544     bool xLeftRight
545     bool yBottomUp
546
547 int
548 wxDC::GetDepth()
549
550 wxPoint*
551 wxDC::GetDeviceOrigin()
552   CODE:
553     RETVAL = new wxPoint( THIS->GetDeviceOrigin() );
554   OUTPUT: RETVAL
555
556 void
557 wxDC::SetDeviceOrigin( x, y )
558     wxCoord x
559     wxCoord y
560
561 void
562 wxDC::SetBackground( brush )
563     wxBrush* brush
564   CODE:
565     THIS->SetBackground( *brush );
566
567 void
568 wxDC::SetBackgroundMode( mode )
569     int mode
570
571 void
572 wxDC::SetBrush( brush )
573     wxBrush* brush
574   CODE:
575     THIS->SetBrush( *brush );
576
577 void
578 wxDC::SetClippingRegion( ... )
579   PPCODE:
580     BEGIN_OVERLOAD()
581         MATCH_REDISP( wxPliOvl_n_n_n_n, SetClippingRegionXYWH )
582         MATCH_REDISP( wxPliOvl_wreg, SetClippingRegionRegion )
583     END_OVERLOAD( Wx::DC::SetClippingRegion )
584
585 void
586 wxDC::SetClippingRegionXYWH( x, y, w, h )
587     wxCoord x
588     wxCoord y
589     wxCoord w
590     wxCoord h
591   CODE:
592     THIS->SetClippingRegion( x, y, w, h );
593
594 void
595 wxDC::SetClippingRegionRegion( region )
596     wxRegion* region
597   CODE:
598     THIS->SetClippingRegion( *region );
599
600 void
601 wxDC::SetFont( font )
602     wxFont* font
603   CODE:
604     THIS->SetFont( *font );
605
606 void
607 wxDC::SetLogicalFunction( function )
608     wxRasterOperationMode function
609
610 void
611 wxDC::SetMapMode( mode )
612     wxMappingMode mode
613
614 #if !defined( __WXMAC__ ) && WXPERL_W_VERSION_LE( 2, 5, 3 )
615
616 void
617 wxDC::SetOptimization( optimize )
618     bool optimize
619
620 #endif 
621
622 void
623 wxDC::SetPalette( palette )
624     wxPalette* palette
625   CODE:
626     THIS->SetPalette( *palette );
627
628 void
629 wxDC::SetPen( pen )
630     wxPen* pen
631   CODE:
632     THIS->SetPen( *pen );
633
634 void
635 wxDC::SetTextBackground( colour )
636     wxColour* colour
637   CODE:
638     THIS->SetTextBackground( *colour );
639
640 void
641 wxDC::SetTextForeground( colour )
642     wxColour* colour
643   CODE:
644     THIS->SetTextForeground( *colour );
645
646 void
647 wxDC::SetUserScale( xScale, yScale )
648     double xScale
649     double yScale
650
651 bool
652 wxDC::StartDoc( message )
653     wxString message
654
655 void
656 wxDC::StartPage()
657
658 void
659 wxDC::GetLogicalScale()
660   PREINIT:
661     double x, y;
662   PPCODE:
663     THIS->GetLogicalScale( &x, &y );
664     EXTEND( SP, 2 );
665     PUSHs( sv_2mortal( newSVnv( x ) ) );
666     PUSHs( sv_2mortal( newSVnv( y ) ) );
667
668 void
669 wxDC::SetLogicalScale( double x, double y );
670
671 #if WXPERL_W_VERSION_GE( 2, 7, 1 )
672
673 wxLayoutDirection
674 wxDC::GetLayoutDirection()
675
676 void
677 wxDC::SetLayoutDirection( wxLayoutDirection dir )
678
679 #endif
680
681 MODULE=Wx PACKAGE=Wx::ScreenDC
682
683 wxScreenDC*
684 wxScreenDC::new()
685
686 bool
687 wxScreenDC::EndDrawingOnTop()
688
689 void
690 wxScreenDC::StartDrawingOnTop( ... )
691   PPCODE:
692     BEGIN_OVERLOAD()
693         MATCH_REDISP( wxPliOvl_wwin, StartDrawingOnTopWindow )
694         MATCH_REDISP( wxPliOvl_wrec, StartDrawingOnTopRect )
695     END_OVERLOAD( Wx::ScreenDC::StartDrawingOnTop )
696
697 bool
698 wxScreenDC::StartDrawingOnTopWindow( window )
699     wxWindow* window
700   CODE:
701     RETVAL = THIS->StartDrawingOnTop( window );
702   OUTPUT:
703     RETVAL
704
705 bool
706 wxScreenDC::StartDrawingOnTopRect( rect )
707     wxRect* rect
708   CODE:
709     RETVAL = THIS->StartDrawingOnTop( rect );
710   OUTPUT:
711     RETVAL
712
713 MODULE=Wx PACKAGE=Wx::WindowDC
714
715 wxWindowDC*
716 wxWindowDC::new( window )
717     wxWindow* window
718
719 MODULE=Wx PACKAGE=Wx::PaintDC
720
721 wxPaintDC*
722 wxPaintDC::new( window )
723     wxWindow* window
724
725 MODULE=Wx PACKAGE=Wx::MemoryDC
726
727 wxMemoryDC*
728 wxMemoryDC::new()
729
730 void
731 wxMemoryDC::SelectObject( bitmap )
732     wxBitmap* bitmap
733   C_ARGS: *bitmap
734
735 #if WXPERL_W_VERSION_GE( 2, 7, 2 )
736
737 void
738 wxMemoryDC::SelectObjectAsSource( bitmap )
739     wxBitmap* bitmap
740   C_ARGS: *bitmap
741
742 #endif
743
744 MODULE=Wx PACKAGE=Wx::ClientDC
745
746 wxClientDC*
747 wxClientDC::new( window )
748     wxWindow* window
749
750 %}
751
752 %module{Wx};
753
754 %typemap{wxBufferedDC*}{simple};
755 %typemap{wxBufferedPaintDC*}{simple};
756 %typemap{wxAutoBufferedPaintDC*}{simple};
757 %typemap{wxMirrorDC*}{simple};
758 %typemap{wxDCClipper*}{simple};
759
760 %name{Wx::BufferedDC} class wxBufferedDC
761 {
762     %name{newDefault} wxBufferedDC();
763 #if WXPERL_W_VERSION_GE( 2, 6, 0 )
764     %name{newBitmap} wxBufferedDC( wxDC *dc,
765                                    const wxBitmap &buffer = wxNullBitmapPtr,
766                                    int style = wxBUFFER_CLIENT_AREA );
767     %name{newSize} wxBufferedDC( wxDC *dc, const wxSize &area,
768                                  int style = wxBUFFER_CLIENT_AREA );
769     %name{InitBitmap} void Init( wxDC *dc,
770                                  const wxBitmap &buffer = wxNullBitmapPtr,
771                                  int style = wxBUFFER_CLIENT_AREA );
772     %name{InitSize} void Init( wxDC *dc, const wxSize &area,
773                                int style = wxBUFFER_CLIENT_AREA );
774 #else
775     %name{newBitmap} wxBufferedDC( wxDC *dc,
776                                    const wxBitmap &buffer = wxNullBitmapPtr );
777     %name{newSize} wxBufferedDC( wxDC *dc, const wxSize &area );
778     %name{InitBitmap} void Init( wxDC *dc,
779                                  const wxBitmap &buffer = wxNullBitmapPtr );
780     %name{InitSize} void Init( wxDC *dc, const wxSize &area );
781 #endif
782
783 %{
784 void
785 new( ... )
786   PPCODE:
787     BEGIN_OVERLOAD()
788         MATCH_VOIDM_REDISP( newDefault )
789         MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_wdc_wsiz_n, newSize, 2 )
790         MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_wdc_wbmp_n, newBitmap, 1 )
791     END_OVERLOAD( "Wx::BufferedDC::new" )
792
793 void
794 Init( ... )
795   PPCODE:
796     BEGIN_OVERLOAD()
797         MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_wdc_wsiz_n, InitSize, 2 )
798         MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_wdc_wbmp_n, InitBitmap, 1 )
799     END_OVERLOAD( "Wx::BufferedDC::Init" )
800 %}
801     void UnMask();
802
803 #if WXPERL_W_VERSION_GE( 2, 6, 0 )
804     void SetStyle( int style );
805     int GetStyle();
806 #endif
807 };
808
809 %name{Wx::BufferedPaintDC} class wxBufferedPaintDC
810 {
811 #if WXPERL_W_VERSION_GE( 2, 5, 5 )
812     %name{newBitmap} wxBufferedPaintDC( wxWindow* window,
813                                         const wxBitmap& buffer,
814                                         int style = wxBUFFER_CLIENT_AREA );
815     %name{newWindow} wxBufferedPaintDC( wxWindow* window,
816                                         int style = wxBUFFER_CLIENT_AREA );
817 #else
818     %name{newBitmap} wxBufferedPaintDC( wxWindow* window,
819                                         const wxBitmap& buffer );
820     %name{newWindow} wxBufferedPaintDC( wxWindow* window );
821 #endif
822 %{
823 void
824 new( ... )
825   PPCODE:
826     BEGIN_OVERLOAD()
827         MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_wdc_wbmp_n, newBitmap, 2 )
828         MATCH_REDISP_COUNT_ALLOWMORE( wxPliOvl_wdc_n, newBitmap, 1 )
829     END_OVERLOAD( "Wx::BufferedPaintDC::new" )
830 %}
831 };
832
833 #if WXPERL_W_VERSION_GE( 2, 7, 2 )
834
835 %name{Wx::AutoBufferedPaintDC} class wxAutoBufferedPaintDC
836 {
837     wxAutoBufferedPaintDC( wxWindow* win );
838 };
839
840 %{
841 MODULE=Wx PACKAGE=Wx PREFIX=wx
842 %}
843
844 wxDC* wxAutoBufferedPaintDCFactory( wxWindow* window );
845
846 #include <wx/dcmirror.h>
847
848 %name{Wx::MirrorDC} class wxMirrorDC
849 {
850     wxMirrorDCC( wxDC& dc, bool mirror );
851 };
852
853 # DECLARE_OVERLOAD( wrgn, Wx::Region )
854
855 %name{Wx::DCClipper} class wxDCClipper
856 {
857 %{
858 void
859 new( ... )
860   PPCODE:
861     BEGIN_OVERLOAD()
862         MATCH_REDISP( wxPliOvl_wdc_wrgn, newRegion )
863         MATCH_REDISP( wxPliOvl_wdc_wrec, newRect )
864         MATCH_REDISP( wxPliOvl_wdc_n_n_n_n, newXYWH )
865     END_OVERLOAD( Wx::DCClipper::new )
866 %}
867
868     %name{newRegion} wxDCClipper( wxDC& dc, const wxRegion& region );
869     %name{newRect} wxDCClipper( wxDC& dc, const wxRect& rect );
870     %name{newXYWH} wxDCClipper( wxDC& dc, int x, int y, int w, int h );
871
872 %{
873 static void
874 wxDCClipper::CLONE()
875   CODE:
876     wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object );
877 %}
878     ## // thread OK
879     ~wxDCClipper()
880         %code{% wxPli_thread_sv_unregister( aTHX_ "Wx::DCClipper", THIS, ST(0) );
881                 delete THIS;
882                 %};
883 };
884
885 #endif