X-Git-Url: http://git.maemo.org/git/?p=pkg-perl;a=blobdiff_plain;f=deb-src%2Flibwx-perl%2Flibwx-perl-0.96%2FXS%2FWindow.xsp;fp=deb-src%2Flibwx-perl%2Flibwx-perl-0.96%2FXS%2FWindow.xsp;h=6a960fe5d64a4c6cb4c85b63e7e8fe6e148b9856;hp=0000000000000000000000000000000000000000;hb=338ce2df3c50fea0b4148c5ef073e0a101744b67;hpb=3ffacac381f8f5d701cefbffd60f4a9235ea6e06 diff --git a/deb-src/libwx-perl/libwx-perl-0.96/XS/Window.xsp b/deb-src/libwx-perl/libwx-perl-0.96/XS/Window.xsp new file mode 100644 index 0000000..6a960fe --- /dev/null +++ b/deb-src/libwx-perl/libwx-perl-0.96/XS/Window.xsp @@ -0,0 +1,170 @@ +############################################################################# +## Name: XS/Window.xsp +## Purpose: XS++ for Wx::PlWindow +## Author: Mattia Barbon +## Modified by: +## Created: 23/05/2004 +## RCS-ID: $Id: Window.xsp 2556 2009-05-11 10:18:47Z mbarbon $ +## Copyright: (c) 2000-2002, 2004-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}; + +%typemap{wxWindowVariant}{simple}; +%typemap{wxMenu&}{reference}; + +%name{Wx::Window} class wxWindow { +#if WXPERL_W_VERSION_GE( 2, 9, 0 ) + void AlwaysShowScrollbars( bool horz = true, bool vert = true ); +#endif + + bool AcceptsFocus() const; + bool AcceptsFocusFromKeyboard() const; + + bool DestroyChildren(); + bool IsBeingDeleted(); + +#if WXPERL_W_VERSION_GE( 2, 9, 0 ) +%{ +void +wxWindow::GetPopupMenuSelectionFromUser( ... ) + PPCODE: + BEGIN_OVERLOAD() + MATCH_REDISP( wxPliOvl_wmen_wpoi, GetPopupMenuSelectionFromUserPoint ) + MATCH_REDISP( wxPliOvl_wmen_n_n, GetPopupMenuSelectionFromUserXY ) + END_OVERLOAD( Wx::Window::GetPopupMenuSelectionFromUser ) +%} + + %name{GetPopupMenuSelectionFromUserPoint} + int GetPopupMenuSelectionFromUser( wxMenu& menu, wxPoint point ); + + %name{GetPopupMenuSelectionFromUserXY} + int GetPopupMenuSelectionFromUser( wxMenu& menu, int x, int y ); +#endif + +#if WXPERL_W_VERSION_LT( 2, 7, 0 ) + wxSize GetAdjustedBestSize() const; +#endif +#if WXPERL_W_VERSION_GE( 2, 7, 2 ) + wxSize GetEffectiveMinSize() const; +#endif + const wxCursor& GetCursor() const; +#if WXPERL_W_VERSION_GE( 2, 9, 0 ) + wxWindow* GetPrevSibling() const; + wxWindow* GetNextSibling() const; +#endif + + wxSize GetVirtualSize() const; +%{ +void +wxWindow::GetVirtualSizeWH() + PPCODE: + int x, y; + THIS->GetVirtualSize( &x, &y ); + wxPli_push_2ints( x, y ); +%} + +#if WXPERL_W_VERSION_GE( 2, 7, 2 ) + wxPoint* GetScreenPosition() const + %code{% RETVAL = new wxPoint( THIS->GetScreenPosition() ); %}; + +%{ +void +wxWindow::GetScreenPositionXY() + PPCODE: + int x, y; + THIS->GetPosition( &x, &y ); + EXTEND( SP, 2 ); + PUSHs( sv_2mortal( newSViv( (IV) x ) ) ); + PUSHs( sv_2mortal( newSViv( (IV) y ) ) ); +%} + const wxRect& GetScreenRect() const; +#endif + + bool HasFlag( int flag ) const; +#if WXPERL_W_VERSION_GE( 2, 9, 0 ) + bool HasExtraStyle( int exFlag ) const; +#endif + bool HasCapture() const; +#if WXPERL_W_VERSION_GE( 2, 6, 0 ) + bool HasTransparentBackground(); +#endif + bool HasScrollbar( int orient ) const; +#if WXPERL_W_VERSION_GE( 2, 9, 0 ) + bool IsScrollbarAlwaysShown( int orient ); +#endif + bool LineUp(); + bool LineDown(); + bool PageUp(); + bool PageDown(); + void SetBackgroundColour( const wxColour& colour ); + void SetOwnBackgroundColour( const wxColour& colour ); +## protected void SetInitialBestSize( wxSize size = wxDefaultSize ); +#if WXPERL_W_VERSION_GE( 2, 9, 0 ) + void SetCanFocus( bool canFocus ); +#endif + void SetForegroundColour( const wxColour& colour ); + void SetOwnForegroundColour( const wxColour& colour ); + void SetFont( const wxFont& font ); + void SetCursor( const wxCursor& cursor ); + void SetOwnFont( const wxFont& font ); + wxWindowVariant GetWindowVariant() const; + void SetWindowVariant( wxWindowVariant variant ); +#if WXPERL_W_VERSION_GE( 2, 8, 0 ) + bool ToggleWindowStyle( int flag ); +#endif +}; + +#if WXPERL_W_VERSION_GE( 2, 9, 0 ) + +%typemap{wxEventBlocker*}{simple}; + +%name{Wx::EventBlocker} class wxEventBlocker +{ + wxEventBlocker( wxWindow* win, wxEventType type = wxEVT_ANY ); + +%{ +static void +wxEventBlocker::CLONE() + CODE: + wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); +%} + + ## // thread OK + ~wxEventBlocker() + %code%{ wxPli_thread_sv_unregister( aTHX_ "Wx::EventBlocker", THIS, ST(0) ); + delete THIS; + %}; + + void Block( wxEventType eventType ); +}; + +#endif + +#if WXPERL_W_VERSION_GE( 2, 7, 2 ) + +#include + +%typemap{wxWindowUpdateLocker*}{simple}; + +%name{Wx::WindowUpdateLocker} class wxWindowUpdateLocker +{ + wxWindowUpdateLocker( wxWindow* win ); + +%{ +static void +wxWindowUpdateLocker::CLONE() + CODE: + wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object ); +%} + + ## // thread OK + ~wxWindowUpdateLocker() + %code%{ wxPli_thread_sv_unregister( aTHX_ "Wx::WindowUpdateLocker", THIS, ST(0) ); + delete THIS; + %}; +}; + +#endif