wxc 0.90.0.4 → 0.90.1.0
raw patch · 17 files changed
+697/−177 lines, 17 filesdep ~wxdirectsetup-changednew-uploader
Dependency ranges changed: wxdirect
Files
- Setup.hs +175/−7
- src/cpp/apppath.cpp +25/−0
- src/cpp/eljdc.cpp +11/−0
- src/cpp/eljgrid.cpp +25/−1
- src/cpp/eljimage.cpp +2/−0
- src/cpp/eljpen.cpp +1/−1
- src/cpp/eljscrolledwindow.cpp +5/−0
- src/cpp/eljsplitterwindow.cpp +10/−0
- src/cpp/eljtglbtn.cpp +66/−0
- src/cpp/ewxw_main.cpp +6/−0
- src/cpp/extra.cpp +8/−0
- src/cpp/treectrl.cpp +3/−3
- src/cpp/wrapper.cpp +2/−3
- src/include/wxc.h +308/−155
- src/include/wxc_glue.h +35/−5
- src/include/wxc_types.h +11/−0
- wxc.cabal +4/−2
Setup.hs view
@@ -1,6 +1,10 @@+ +{-# LANGUAGE CPP #-} + import Control.Monad (mapM_, when) -import Data.List (foldl', intersperse, intercalate, nub, lookup, isPrefixOf) -import Data.Maybe (fromJust) +import Data.Functor ( (<$>) ) +import Data.List (foldl', intersperse, intercalate, nub, lookup, isPrefixOf, isInfixOf) +import Data.Maybe (fromJust, isNothing, isJust, listToMaybe) import Distribution.PackageDescription import Distribution.Simple import Distribution.Simple.InstallDirs (InstallDirs(..)) @@ -12,15 +16,32 @@ import Distribution.System (OS (..), Arch (..), buildOS, buildArch) import Distribution.Verbosity (normal, verbose) import System.Cmd (system) -import System.Directory (createDirectoryIfMissing, doesFileExist, getCurrentDirectory, getModificationTime) -import System.Environment (getEnv) -import System.Exit (ExitCode (..)) -import System.FilePath.Posix ((</>), (<.>), replaceExtension, takeFileName, dropFileName, addExtension) +import System.Directory ( createDirectoryIfMissing, doesFileExist + , findExecutable, getCurrentDirectory + , getDirectoryContents, getModificationTime + ) +import System.Environment (lookupEnv) +import System.Exit (ExitCode (..), exitFailure) +import System.FilePath ((</>), (<.>), replaceExtension, takeFileName, dropFileName, addExtension) +import System.IO (hPutStrLn, stderr) import System.IO.Unsafe (unsafePerformIO) -import System.Process (readProcess) +import qualified System.Process as Process +import qualified Control.Exception as E -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- +readProcess :: FilePath -> [String] -> String -> IO String +readProcess cmd args stdin = + Process.readProcess cmd args stdin + `E.catch` \(E.SomeException err) -> do + hPutStrLn stderr $ "readProcess failed: " ++ show err + E.throwIO err + + +whenM :: Monad m => m Bool -> m () -> m () +whenM mp e = mp >>= \p -> when p e + + main :: IO () main = defaultMainWithHooks simpleUserHooks { confHook = myConfHook, buildHook = myBuildHook, instHook = myInstHook } @@ -37,6 +58,14 @@ -- Comment out type signature because of a Cabal API change from 1.6 to 1.7 myConfHook (pkg0, pbi) flags = do + whenM (isNothing <$> findExecutable "wx-config") $ + do + putStrLn "Error: wx-config not found, please install wx-config before installing wxc" + exitFailure + + whenM bitnessMismatch + exitFailure + lbi <- confHook simpleUserHooks (pkg0, pbi) flags let lpd = localPkgDescr lbi let lib = fromJust (library lpd) @@ -58,6 +87,145 @@ let lpd' = lpd { library = Just lib' } return $ lbi { localPkgDescr = lpd' } + +-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + +data Bitness + = Bits32 + | Bits64 + | Universal + | Unknown + deriving Eq + + +instance Show Bitness where + show Bits32 = "32" + show Bits64 = "64" + show Universal = "Universal" + show Unknown = "Unknown" + + +data CheckResult + = OK + | NotOK Bitness Bitness + | NotChecked + deriving Eq + +{- + Extract bitness info from a dynamic library and compare to the + bitness of this program. + Preconditions (when buildArch == I386 || buildArch == X86_64): + - Command "file" must exist + - The specified file must exist +-} +checkBitness :: FilePath -> IO CheckResult +checkBitness file = + if thisBitness == Unknown + then return NotChecked + else compareBitness . readBitness <$> readProcess "file" [file] "" + where + compareBitness :: Bitness -> CheckResult + compareBitness thatBitness = + if thatBitness == Unknown + then NotChecked + else + if thisBitness == thatBitness || + thatBitness == Universal + then OK + else NotOK thisBitness thatBitness + + thisBitness = + case buildArch of + I386 -> Bits32 + X86_64 -> Bits64 + _ -> Unknown + + readBitness :: String -> Bitness + readBitness string + | anyInString [ " i386", " 80386" + , " 32-bit", "AMD386" ] = Bits32 + | anyInString [ " x86_64", " 64-bit" ] = Bits64 + | anyInString [ "universal binary" ] = Universal + | otherwise = Unknown + where + anyInString :: [String] -> Bool + anyInString strings = any (`isInfixOf` string) strings + +{- + Return True if this program is 32 bit and the wxWidgets dynamic + libraries are 64 bits or vice versa. Also, print a result message. + + If there is insufficient data, or the OS is not handled, return + False, to prevent unnecessary abortion of the install procedure + N.B. If the installation procedure is simplified, we cannot + use the file-command on Windows anymore, as it is part of MSYS + N.B. This does not work if we are cross-compiling +-} +bitnessMismatch :: IO Bool +bitnessMismatch = + case buildOS of + Windows -> + do + fileCommandPresent <- isJust <$> findExecutable "file" + if fileCommandPresent + then check + else + do + putStrLn "No file command present, bitness not checked" + return False -- No check on bitness, just continue installing + + Linux -> check + OSX -> check + _ -> return False -- Other OSes are not checked + where + check = + do + maybeWxwin <- lookupEnv "WXWIN" + maybeWxcfg <- lookupEnv "WXCFG" + if isNothing maybeWxwin || isNothing maybeWxcfg + then return False -- Insufficient data, just continue installing + else check2 (fromJust maybeWxwin) (fromJust maybeWxcfg) + + check2 wxwin wxcfg = + do + let path = normalisePath $ wxwin </> "lib" </> wxcfg </> ".." + maybeDynamicLibraryName <- getDynamicLibraryName path + case maybeDynamicLibraryName of + Nothing -> + putStrLn "Could not find a dynamic library to check bitness, continuing installation" >> + return False + Just dynamicLibraryName -> + check3 path dynamicLibraryName + + check3 path dynamicLibraryName = + do + bitnessCheckResult <- checkBitness $ path </> dynamicLibraryName + case bitnessCheckResult of + NotOK thisBitness thatBitness -> + do + putStrLn $ "Error: The bitness does not match," + ++ " wxHaskell is being compiled as " + ++ show thisBitness ++ " bit, the file " + ++ dynamicLibraryName ++ " is " + ++ show thatBitness ++ " bit." + return True + OK -> + do + putStrLn $ "The bitness is correct" + return False + NotChecked -> + do + putStrLn $ "The bitness is not checked" + return False + + getDynamicLibraryName :: FilePath -> IO (Maybe String) + getDynamicLibraryName path = + listToMaybe . filter isLibrary <$> getDirectoryContents path + `E.onException` return Nothing + where + isLibrary x = any (`isPrefixOf` x) ["libwx_base", "wxbase"] && + any (`isInfixOf` x) [".dll", ".dylib", ".so."] + -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
src/cpp/apppath.cpp view
@@ -3,6 +3,10 @@ # include <windows.h> #elif defined(__WXMAC__) # ifdef __DARWIN__+# if wxCHECK_VERSION(2,9,5)+# include <dlfcn.h> /* dlsym */+# include <limits.h> /* PATH_MAX */+# endif # include <mach-o/dyld.h> typedef int (*NSGetExecutablePathProcPtr)(char* buf, size_t* bufsize); # else@@ -31,6 +35,26 @@ wxString argv0; # ifdef __WXMAC__ +# if wxCHECK_VERSION(2,9,5)+ // NSAddressOfSymbol, NSIsSymbolNameDefined, NSLookupAndBindSymbol are deprecated+ // The dependence on WX 2.9.0.5 most likely can be relaxed as this is a longtime Darwin deprecation.+ void* addrOf_NSGetExecutablePath = dlsym(RTLD_DEFAULT, "_NSGetExecutablePath");+ if ( addrOf_NSGetExecutablePath != NULL )+ {+ char buf[PATH_MAX+1];+ size_t bufLen = PATH_MAX;+ buf[0] = 0;+ ((NSGetExecutablePathProcPtr) addrOf_NSGetExecutablePath)(buf, &bufLen);+ wxString strBuf = wxString();+ size_t actualBuflen = strlen(buf);+ if (actualBuflen > 0) {+ // FIXME: we *assume* that the NS stuff returns utf-8 encoded strings+ path = wxString(buf, wxConvUTF8);+ found=true;+ return path;+ }+ }+# else if (NSIsSymbolNameDefined("__NSGetExecutablePath")) { char buf[512];@@ -46,6 +70,7 @@ return path; } }+# endif # endif argv0 = wxTheApp->argv[0];
src/cpp/eljdc.cpp view
@@ -204,8 +204,19 @@ EWXWEXPORT(void,wxDC_SetClippingRegionFromRegion)(wxDC* self,wxRegion* region) { +# if wxCHECK_VERSION(2,9,5) + self->SetDeviceClippingRegion(*region); +# else self->SetClippingRegion(*region); +# endif } + +#if wxCHECK_VERSION(2,9,5) +EWXWEXPORT(void,wxDC_SetDeviceClippingRegion)(wxDC* self,wxRegion* region) +{ + self->SetDeviceClippingRegion(*region); +} +#endif EWXWEXPORT(void,wxDC_DestroyClippingRegion)(wxDC* self) {
src/cpp/eljgrid.cpp view
@@ -56,10 +56,17 @@ self->Show(show, (wxGridCellAttr*)attr); } +#if (wxVERSION_NUMBER >= 2905) +EWXWEXPORT(void,wxGridCellEditor_PaintBackground)(wxGridCellEditor* self,wxDC* dc,int x,int y,int w,int h,wxGridCellAttr* attr) +{ + self->PaintBackground(*dc, wxRect(x, y, w, h), *attr); +} +#else EWXWEXPORT(void,wxGridCellEditor_PaintBackground)(wxGridCellEditor* self,int x,int y,int w,int h,void* attr) { self->PaintBackground(wxRect(x, y, w, h), (wxGridCellAttr*)attr); } +#endif EWXWEXPORT(void,wxGridCellEditor_BeginEdit)(wxGridCellEditor* self,int row,int col,void* grid) { @@ -69,7 +76,7 @@ EWXWEXPORT(bool,wxGridCellEditor_EndEdit)(wxGridCellEditor* self,int row,int col,wxGrid* grid, wxString* oldCell, wxString* newCell) { #if (wxVERSION_NUMBER < 2900) - return self->EndEdit(row, col, grid); + return self->EndEdit(row, col, grid); #else return self->EndEdit(row, col, grid, *oldCell, newCell); #endif @@ -140,6 +147,17 @@ return (void*)new wxGridCellChoiceEditor (count, items, allowOthers); } +EWXWEXPORT(void*,wxGridCellNumberRenderer_Ctor)() +{ + return (void*)new wxGridCellNumberRenderer(); +} + +EWXWEXPORT(void*,wxGridCellAutoWrapStringRenderer_Ctor)() +{ + return (void*)new wxGridCellAutoWrapStringRenderer(); +} + + EWXWEXPORT(void*,wxGridCellAttr_Ctor)() { return (void*)new wxGridCellAttr(); @@ -1157,6 +1175,12 @@ return arr.GetCount(); } +EWXWEXPORT(void,wxGrid_GetCellSize)(wxGrid* self,int r, int c, int* sr, int* sc){ + self->GetCellSize(r,c,sr,sc); +} +EWXWEXPORT(void,wxGrid_SetCellSize)(wxGrid* self,int r, int c, int sr, int sc){ + self->SetCellSize(r,c,sr,sc); +} EWXWEXPORT(void*,ELJGridTable_Create)(void* self,void* _EifGetNumberRows,void* _EifGetNumberCols,void* _EifGetValue,void* _EifSetValue,void* _EifIsEmptyCell,void* _EifClear,void* _EifInsertRows,void* _EifAppendRows,void* _EifDeleteRows,void* _EifInsertCols,void* _EifAppendCols,void* _EifDeleteCols,void* _EifSetRowLabelValue,void* _EifSetColLabelValue,void* _EifGetRowLabelValue,void* _EifGetColLabelValue)
src/cpp/eljimage.cpp view
@@ -30,6 +30,7 @@ wxMemoryOutputStream out; self->SaveFile(out, type); size_t len = out.GetLength(); + if( !data ) return len; return out.CopyTo(data, len); } @@ -38,6 +39,7 @@ wxMemoryOutputStream out; self->SaveFile(out, type); size_t len = out.GetLength(); + if( !data ) return len; return out.CopyTo(data, len); }
src/cpp/eljpen.cpp view
@@ -156,7 +156,7 @@ EWXWEXPORT(void,wxPen_GetStipple)(void* self,wxBitmap* _ref) { #if defined(__WXGTK__) - *_ref = NULL; + *_ref = (GdkPixbuf*)NULL; #else *_ref = *(((wxPen*)self)->GetStipple()); #endif
src/cpp/eljscrolledwindow.cpp view
@@ -18,6 +18,11 @@ return (void*)((wxScrolledWindow*)self)->GetTargetWindow(); } +EWXWEXPORT(void,wxScrolledWindow_ShowScrollbars)(void* self,int showh,int showv) +{ + ((wxScrolledWindow*)self)->ShowScrollbars((wxScrollbarVisibility)showh,(wxScrollbarVisibility)showv); +} + EWXWEXPORT(void,wxScrolledWindow_SetScrollbars)(void* self,int pixelsPerUnitX,int pixelsPerUnitY,int noUnitsX,int noUnitsY,int xPos,int yPos,bool noRefresh) { ((wxScrolledWindow*)self)->SetScrollbars(pixelsPerUnitX, pixelsPerUnitY, noUnitsX, noUnitsY, xPos, yPos, noRefresh);
src/cpp/eljsplitterwindow.cpp view
@@ -97,5 +97,15 @@ { return ((wxSplitterWindow*)self)->GetMinimumPaneSize(); } + +EWXWEXPORT(double,wxSplitterWindow_GetSashGravity)(void* self) +{ + return ((wxSplitterWindow*)self)->GetSashGravity(); +} + +EWXWEXPORT(void,wxSplitterWindow_SetSashGravity)(void* self, double gravity) +{ + return ((wxSplitterWindow*)self)->SetSashGravity(gravity); +} }
+ src/cpp/eljtglbtn.cpp view
@@ -0,0 +1,66 @@+#include "wrapper.h" +#if wxVERSION_NUMBER >= 2400 +#include "wx/tglbtn.h" + +extern "C" +{ + +EWXWEXPORT(void*,wxToggleButton_Create)(wxWindow* parent,int id,wxString* label,int x,int y,int w,int h,int style) +{ + return (void*)new wxToggleButton(parent, (wxWindowID)id, *label, wxPoint(x, y), wxSize(w, h), (long)style); +} + +EWXWEXPORT(void,wxToggleButton_SetValue)(wxToggleButton* self,bool state) +{ + self->SetValue(state); +} + +EWXWEXPORT(bool,wxToggleButton_GetValue)(wxToggleButton* self) +{ + return self->GetValue(); +} + +EWXWEXPORT(void,wxToggleButton_SetLabel)(wxToggleButton* self,wxString* label) +{ + self->SetLabel(*label); +} + +EWXWEXPORT(bool,wxToggleButton_Enable)(wxToggleButton* self,bool enable) +{ + return self->Enable(enable); +} + +/* +EWXWEXPORT(int,expEVT_COMMAND_TOGGLEBUTTON_CLICKED)() +{ + return wxEVT_COMMAND_TOGGLEBUTTON_CLICKED; +} +*/ + +EWXWEXPORT(wxBitmapToggleButton*,wxBitmapToggleButton_Create)(wxWindow* _prt,int _id,wxBitmap* _bmp, int _lft, int _top, int _wdt, int _hgt, int _stl) +{ + return new wxBitmapToggleButton (_prt, _id, *_bmp, wxPoint(_lft, _top), wxSize(_wdt, _hgt), _stl, wxDefaultValidator); +} + +EWXWEXPORT(void,wxBitmapToggleButton_SetValue)(wxBitmapToggleButton* self,bool state) +{ + self->SetValue(state); +} + +EWXWEXPORT(bool,wxBitmapToggleButton_GetValue)(wxBitmapToggleButton* self) +{ + return self->GetValue(); +} + +EWXWEXPORT(bool,wxBitmapToggleButton_Enable)(wxBitmapToggleButton* self,bool enable) +{ + return self->Enable(enable); +} + +EWXWEXPORT(void,wxBitmapToggleButton_SetBitmapLabel)(wxBitmapToggleButton* self,wxBitmap* _bmp) +{ + self->SetBitmapLabel(*_bmp); +} + +} +#endif
src/cpp/ewxw_main.cpp view
@@ -10,6 +10,7 @@ #endif #include <windows.h>+#include <locale.h> #if wxCHECK_VERSION(2,5,0) #define wxHANDLE HINSTANCE@@ -25,6 +26,11 @@ { wxHANDLE wxhInstance = GetModuleHandle(NULL); + /*+ * Set the locale to "C",+ * to prevent a wxWidgets assert failure in intl.cpp+ */+ setlocale(LC_ALL, "C"); /* check memory leaks with visual C++ */ #if (defined(__WXDEBUG__) && defined(_MSC_VER))
src/cpp/extra.cpp view
@@ -18,18 +18,26 @@ BEGIN_DECLARE_EVENT_TYPES() DECLARE_LOCAL_EVENT_TYPE(wxEVT_DELETE, 1000)+#if (wxVERSION_NUMBER < 2905) DECLARE_LOCAL_EVENT_TYPE(wxEVT_HTML_CELL_CLICKED, 1001 )+#endif DECLARE_LOCAL_EVENT_TYPE(wxEVT_HTML_CELL_MOUSE_HOVER, 1002 )+#if (wxVERSION_NUMBER < 2905) DECLARE_LOCAL_EVENT_TYPE(wxEVT_HTML_LINK_CLICKED, 1003 )+#endif DECLARE_LOCAL_EVENT_TYPE(wxEVT_HTML_SET_TITLE, 1004 ) DECLARE_LOCAL_EVENT_TYPE(wxEVT_INPUT_SINK, 1005 ) DECLARE_LOCAL_EVENT_TYPE(wxEVT_SORT, 1006 ) END_DECLARE_EVENT_TYPES() DEFINE_LOCAL_EVENT_TYPE( wxEVT_DELETE )+#if (wxVERSION_NUMBER < 2905) DEFINE_LOCAL_EVENT_TYPE( wxEVT_HTML_CELL_CLICKED )+#endif DEFINE_LOCAL_EVENT_TYPE( wxEVT_HTML_CELL_MOUSE_HOVER )+#if (wxVERSION_NUMBER < 2905) DEFINE_LOCAL_EVENT_TYPE( wxEVT_HTML_LINK_CLICKED )+#endif DEFINE_LOCAL_EVENT_TYPE( wxEVT_HTML_SET_TITLE ) DEFINE_LOCAL_EVENT_TYPE( wxEVT_INPUT_SINK ) DEFINE_LOCAL_EVENT_TYPE( wxEVT_SORT )
src/cpp/treectrl.cpp view
@@ -74,7 +74,7 @@ // // So we must remove this function and replace treeItemId implementation in the // funture.-EWXWEXPORT(wxTreeItemId*,wxTreeItemId_CreateFromValue)(int value)+EWXWEXPORT(wxTreeItemId*,wxTreeItemId_CreateFromValue)(intptr_t value) { #if wxVERSION_NUMBER < 2800 return new wxTreeItemId( value );@@ -86,9 +86,9 @@ #endif } -EWXWEXPORT(int,wxTreeItemId_GetValue)(wxTreeItemId* self)+EWXWEXPORT(intptr_t,wxTreeItemId_GetValue)(wxTreeItemId* self) {- return (long)(self->m_pItem);+ return (intptr_t)(self->m_pItem); }
src/cpp/wrapper.cpp view
@@ -227,7 +227,7 @@ //set the global variable 'getCallback' so HandleEvent //knows we just want to know the closure. Unfortunately, this- //seems the cleanest way to retrieve the callback in wxWindows.+ //seems the cleanest way to retrieve the callback in wxWidgets. getCallback = &callback; // Bugfix: see www.mail-archive.com/wxhaskell-devel@lists.sourceforge.net/msg00577.html // On entry, Dynamic event table may have no bound events@@ -311,8 +311,7 @@ /*----------------------------------------------------------------------------- C interface to the application. -----------------------------------------------------------------------------*/-//int OnExit();-//virtual void OnFatalException();+ EWXWEXPORT(int,ELJApp_MainLoop)() { return wxGetApp().MainLoop();
src/include/wxc.h view
@@ -6,19 +6,30 @@ # undef _stdcall #endif -#define _stdcall +#define _stdcall+ #define EXPORT- -/*----------------------------------------------------------------------------- - Standard includes ------------------------------------------------------------------------------*/ +++/*-----------------------------------------------------------------------------++ Standard includes++-----------------------------------------------------------------------------*/+ #include "wxc_types.h"-#include "wxc_glue.h" - - -/*----------------------------------------------------------------------------- - Modular extra exports ------------------------------------------------------------------------------*/ +#include "wxc_glue.h"++++++/*-----------------------------------------------------------------------------++ Modular extra exports++-----------------------------------------------------------------------------*/+ #include "dragimage.h" #include "graphicscontext.h" #include "glcanvas.h"@@ -48,27 +59,41 @@ /** Get the reference data of an object as a closure: only works if properly initialized. Use 'closureGetData' to get to the actual data. */ TClass(wxClosure) wxObject_GetClientClosure( TSelf(wxObject) _obj );-/** Set the reference data of an object as a closure. The closure data contains the data while the function is called on deletion. Returns 'True' on success. Only works if the reference data is unused by wxWindows! */+/** Set the reference data of an object as a closure. The closure data contains the data while the function is called on deletion. Returns 'True' on success. Only works if the reference data is unused by wxWidgets! */ void wxObject_SetClientClosure( TSelf(wxObject) _obj, TClass(wxClosure) closure );- -/* extra class definitions for classInfo */ -TClassDefExtend(wxGauge95,wxGauge) -TClassDefExtend(wxGaugeMSW,wxGauge) -TClassDefExtend(wxSlider95,wxSlider) -TClassDefExtend(wxSliderMSW,wxSlider) - - -/* Object */ -void wxObject_Delete( TSelf(wxObject) obj ); ++/* extra class definitions for classInfo */++TClassDefExtend(wxGauge95,wxGauge)++TClassDefExtend(wxGaugeMSW,wxGauge)++TClassDefExtend(wxSlider95,wxSlider)++TClassDefExtend(wxSliderMSW,wxSlider)++++++/* Object */++void wxObject_Delete( TSelf(wxObject) obj );++ /* Frame */ TClass(wxString) wxFrame_GetTitle( TSelf(wxFrame) _obj ); void wxFrame_SetTitle( TSelf(wxFrame) _frame, TClass(wxString) _txt );-TBool wxFrame_SetShape( TSelf(wxFrame) self, TClass(wxRegion) region); -TBool wxFrame_ShowFullScreen( TSelf(wxFrame) self, TBool show, int style); -TBool wxFrame_IsFullScreen( TSelf(wxFrame) self ); -void wxFrame_Centre( TSelf(wxFrame) self, int orientation ); +TBool wxFrame_SetShape( TSelf(wxFrame) self, TClass(wxRegion) region); +TBool wxFrame_ShowFullScreen( TSelf(wxFrame) self, TBool show, int style);++TBool wxFrame_IsFullScreen( TSelf(wxFrame) self );++void wxFrame_Centre( TSelf(wxFrame) self, int orientation );++ /* Create/Delete */ void wxCursor_Delete( TSelf(wxCursor) _obj ); void wxDateTime_Delete(TSelf(wxDateTime) _obj);@@ -77,74 +102,135 @@ int wxMouseEvent_GetWheelDelta( TSelf(wxMouseEvent) _obj ); int wxMouseEvent_GetWheelRotation( TSelf(wxMouseEvent) _obj ); int wxMouseEvent_GetButton( TSelf(wxMouseEvent) _obj );- -TClass(wxPoint) wxcGetMousePosition( ); - - -/* wxDC */ -double wxDC_GetUserScaleX( TSelf(wxDC) dc ); -double wxDC_GetUserScaleY( TSelf(wxDC) dc ); ++TClass(wxPoint) wxcGetMousePosition( );++++++/* wxDC */++double wxDC_GetUserScaleX( TSelf(wxDC) dc );++double wxDC_GetUserScaleY( TSelf(wxDC) dc );++ /* wxWindow */-TClass(wxPoint) wxWindow_ConvertDialogToPixelsEx( TSelf(wxWindow) _obj ); -TClass(wxPoint) wxWindow_ConvertPixelsToDialogEx( TSelf(wxWindow) _obj ); -TClass(wxPoint) wxWindow_ScreenToClient2( TSelf(wxWindow) _obj, TPoint(x,y) ); - -/* wxString helpers */ -TClass(wxString) wxString_Create( TString buffer ); -TClass(wxString) wxString_CreateLen( TString buffer, int len ); -void wxString_Delete( TSelf(wxString) s ); -TStringLen wxString_GetString( TSelf(wxString) s, TStringOut buffer ); -size_t wxString_Length( TSelf(wxString) s ); +TClass(wxPoint) wxWindow_ConvertDialogToPixelsEx( TSelf(wxWindow) _obj ); +TClass(wxPoint) wxWindow_ConvertPixelsToDialogEx( TSelf(wxWindow) _obj ); +TClass(wxPoint) wxWindow_ScreenToClient2( TSelf(wxWindow) _obj, TPoint(x,y) );++++/* wxString helpers */++TClass(wxString) wxString_Create( TString buffer );++TClass(wxString) wxString_CreateLen( TString buffer, int len );++void wxString_Delete( TSelf(wxString) s );++TStringLen wxString_GetString( TSelf(wxString) s, TStringOut buffer );++size_t wxString_Length( TSelf(wxString) s );+++ /* menu */-TClass(wxMenuBar) wxMenu_GetMenuBar( TSelf(wxMenu) _obj ); -TClass(wxFrame) wxMenuBar_GetFrame( TSelf(wxMenuBar) _obj ); - -int wxListEvent_GetCacheFrom( TSelf(wxListEvent) _obj); -int wxListEvent_GetCacheTo( TSelf(wxListEvent) _obj); - -void wxListCtrl_AssignImageList( TSelf(wxListCtrl) _obj, TClass(wxImageList) images, int which ); -void wxListCtrl_GetColumn2( TSelf(wxListCtrl) _obj, int col, TClassRef(wxListItem) item); -void wxListCtrl_GetItem2( TSelf(wxListCtrl) _obj, TClassRef(wxListItem) info); -TClass(wxPoint) wxListCtrl_GetItemPosition2( TSelf(wxListCtrl) _obj, int item ); -/** Sort items in a list control. Takes a closure that is called with a 'CommandEvent' where the @Int@ is the item data of the first item and the @ExtraLong@ the item data of the second item. The event handler should set the @Int@ to 0 when the items are equal, -1 when the first is less, and 1 when the second is less. */ -TBool wxListCtrl_SortItems2(TSelf(wxListCtrl) _obj, TClass(wxClosure) closure ); - -/* tree ctrl */ -TClassDefExtend(wxcTreeItemData,wxTreeItemData) - -/** Create tree item data with a closure. The closure data contains the data while the function is called on deletion. */ -TClass(wxcTreeItemData) wxcTreeItemData_Create( TClass(wxClosure) closure ); -/** Get the client data in the form of a closure. Use 'closureGetData' to get to the actual data.*/ -TClass(wxClosure) wxcTreeItemData_GetClientClosure( TSelf(wxcTreeItemData) self ); -/** Set the tree item data with a closure. The closure data contains the data while the function is called on deletion. */ -void wxcTreeItemData_SetClientClosure( TSelf(wxcTreeItemData) self, TClass(wxClosure) closure ); - -TClass(wxTreeItemId) wxTreeItemId_Clone( TSelf(wxTreeItemId) _obj); -TClass(wxTreeItemId) wxTreeItemId_CreateFromValue(int value); -int wxTreeItemId_GetValue( TSelf(wxTreeItemId) _obj); - - -TClass(wxKeyEvent) wxTreeEvent_GetKeyEvent( TSelf(wxTreeEvent) _obj); -int wxTreeEvent_IsEditCancelled( TSelf(wxTreeEvent) _obj); -void wxTreeEvent_Allow( TSelf(wxTreeEvent) _obj); - -TClass(wxTreeCtrl) wxTreeCtrl_Create2( TClass(wxWindow) _prt, int _id, TRect(_lft,_top,_wdt,_hgt), int _stl ); -void wxTreeCtrl_InsertItem2( TSelf(wxTreeCtrl) _obj, TClass(wxWindow) parent, TClass(wxTreeItemId) idPrevious, TClass(wxString) text, int image, int selectedImage, TClass(wxClosure) closure, TClassRef(wxTreeItemId) _item ); -void wxTreeCtrl_InsertItemByIndex2( TSelf(wxTreeCtrl) _obj, TClass(wxWindow) parent, int index, TClass(wxString) text, int image, int selectedImage, TClass(wxClosure) closure, TClassRef(wxTreeItemId) _item ); -TClass(wxClosure) wxTreeCtrl_GetItemClientClosure( TSelf(wxTreeCtrl) _obj, TClass(wxTreeItemId) item ); -void wxTreeCtrl_SetItemClientClosure( TSelf(wxTreeCtrl) _obj, TClass(wxTreeItemId) item, TClass(wxClosure) closure ); -void wxTreeCtrl_AssignImageList(TSelf(wxTreeCtrl) _obj, TClass(wxImageList) imageList ); -void wxTreeCtrl_AssignStateImageList(TSelf(wxTreeCtrl) _obj, TClass(wxImageList) imageList ); - - -/* dc */ -/** Get the color of pixel. Note: this is not a portable method at the moment and its use is discouraged. */ -void wxDC_GetPixel2( TSelf(wxDC) _obj, TPoint(x,y), TClassRef(wxColour) col); +TClass(wxMenuBar) wxMenu_GetMenuBar( TSelf(wxMenu) _obj ); +TClass(wxFrame) wxMenuBar_GetFrame( TSelf(wxMenuBar) _obj ); +++int wxListEvent_GetCacheFrom( TSelf(wxListEvent) _obj);++int wxListEvent_GetCacheTo( TSelf(wxListEvent) _obj);++++void wxListCtrl_AssignImageList( TSelf(wxListCtrl) _obj, TClass(wxImageList) images, int which );++void wxListCtrl_GetColumn2( TSelf(wxListCtrl) _obj, int col, TClassRef(wxListItem) item);++void wxListCtrl_GetItem2( TSelf(wxListCtrl) _obj, TClassRef(wxListItem) info);++TClass(wxPoint) wxListCtrl_GetItemPosition2( TSelf(wxListCtrl) _obj, int item );++/** Sort items in a list control. Takes a closure that is called with a 'CommandEvent' where the @Int@ is the item data of the first item and the @ExtraLong@ the item data of the second item. The event handler should set the @Int@ to 0 when the items are equal, -1 when the first is less, and 1 when the second is less. */++TBool wxListCtrl_SortItems2(TSelf(wxListCtrl) _obj, TClass(wxClosure) closure );++++/* tree ctrl */++TClassDefExtend(wxcTreeItemData,wxTreeItemData)++++/** Create tree item data with a closure. The closure data contains the data while the function is called on deletion. */++TClass(wxcTreeItemData) wxcTreeItemData_Create( TClass(wxClosure) closure );++/** Get the client data in the form of a closure. Use 'closureGetData' to get to the actual data.*/++TClass(wxClosure) wxcTreeItemData_GetClientClosure( TSelf(wxcTreeItemData) self );++/** Set the tree item data with a closure. The closure data contains the data while the function is called on deletion. */++void wxcTreeItemData_SetClientClosure( TSelf(wxcTreeItemData) self, TClass(wxClosure) closure );++++TClass(wxTreeItemId) wxTreeItemId_Clone( TSelf(wxTreeItemId) _obj);++TClass(wxTreeItemId) wxTreeItemId_CreateFromValue(TIntPtr value);++TIntPtr wxTreeItemId_GetValue( TSelf(wxTreeItemId) _obj);++++++TClass(wxKeyEvent) wxTreeEvent_GetKeyEvent( TSelf(wxTreeEvent) _obj);++int wxTreeEvent_IsEditCancelled( TSelf(wxTreeEvent) _obj);++void wxTreeEvent_Allow( TSelf(wxTreeEvent) _obj);++++TClass(wxTreeCtrl) wxTreeCtrl_Create2( TClass(wxWindow) _prt, int _id, TRect(_lft,_top,_wdt,_hgt), int _stl );++void wxTreeCtrl_InsertItem2( TSelf(wxTreeCtrl) _obj, TClass(wxWindow) parent, TClass(wxTreeItemId) idPrevious, TClass(wxString) text, int image, int selectedImage, TClass(wxClosure) closure, TClassRef(wxTreeItemId) _item );++void wxTreeCtrl_InsertItemByIndex2( TSelf(wxTreeCtrl) _obj, TClass(wxWindow) parent, int index, TClass(wxString) text, int image, int selectedImage, TClass(wxClosure) closure, TClassRef(wxTreeItemId) _item );++TClass(wxClosure) wxTreeCtrl_GetItemClientClosure( TSelf(wxTreeCtrl) _obj, TClass(wxTreeItemId) item );++void wxTreeCtrl_SetItemClientClosure( TSelf(wxTreeCtrl) _obj, TClass(wxTreeItemId) item, TClass(wxClosure) closure );++void wxTreeCtrl_AssignImageList(TSelf(wxTreeCtrl) _obj, TClass(wxImageList) imageList );++void wxTreeCtrl_AssignStateImageList(TSelf(wxTreeCtrl) _obj, TClass(wxImageList) imageList );++++++/* dc */++/** Get the color of pixel. Note: this is not a portable method at the moment and its use is discouraged. */++void wxDC_GetPixel2( TSelf(wxDC) _obj, TPoint(x,y), TClassRef(wxColour) col);+++ /* scrolledwindow */ void wxScrolledWindow_SetScrollRate( TSelf(wxScrolledWindow) _obj, int xstep, int ystep ); @@ -174,24 +260,31 @@ TClass(wxTimerEx) wxTimerEx_Create( ); TClass(wxClosure) wxTimerEx_GetClosure( TSelf(wxTimerEx) _obj ); -/* Menu */ -void wxMenu_AppendRadioItem( TSelf(wxMenu) self, int id, TClass(wxString) text, TClass(wxString) help); - - +/* Menu */++void wxMenu_AppendRadioItem( TSelf(wxMenu) self, int id, TClass(wxString) text, TClass(wxString) help);+++++ /* Menu Item */ TClass(wxMenuItem) wxMenuItem_CreateSeparator(); TClass(wxMenuItem) wxMenuItem_CreateEx(int id, TClass(wxString) label, TClass(wxString) help, int itemkind, TClass(wxMenu) submenu);- -/* Toolbar */ -void wxToolBar_AddTool2( TSelf(wxToolBar) _obj, int toolId, TClass(wxString) label, TClass(wxBitmap) bmp, TClass(wxBitmap) bmpDisabled, int itemKind, TClass(wxString) shortHelp, TClass(wxString) longHelp ); ++/* Toolbar */++void wxToolBar_AddTool2( TSelf(wxToolBar) _obj, int toolId, TClass(wxString) label, TClass(wxBitmap) bmp, TClass(wxBitmap) bmpDisabled, int itemKind, TClass(wxString) shortHelp, TClass(wxString) longHelp );++ /* Progress dialog */ TClass(wxProgressDialog) wxProgressDialog_Create( TClass(wxString) title, TClass(wxString) message, int max, TClass(wxWindow) parent, int style ); TBool wxProgressDialog_Update(TSelf(wxProgressDialog) obj, int value ); TBool wxProgressDialog_UpdateWithMessage( TSelf(wxProgressDialog) obj, int value, TClass(wxString) message ); void wxProgressDialog_Resume( TSelf(wxProgressDialog) obj ); -/** Get the version number of wxWindows as a number composed of the major version times 1000, minor version times 100, and the release number. For example, release 2.1.15 becomes 2115. */+/** Get the version number of wxWidgets as a number composed of the major version times 1000, minor version times 100, and the release number. For example, release 2.1.15 becomes 2115. */ int wxVersionNumber(); /** Check if a preprocessor macro is defined. For example, @wxIsDefined("__WXGTK__")@ or @wxIsDefined("wxUSE_GIF")@. */ TBoolInt wxIsDefined( TString s );@@ -221,9 +314,12 @@ TClassDefExtend(wxcHtmlEvent,wxCommandEvent) TClass(wxMouseEvent) wxcHtmlEvent_GetMouseEvent( TSelf(wxcHtmlEvent) self );-TClass(wxHtmlCell) wxcHtmlEvent_GetHtmlCell( TSelf(wxcHtmlEvent) self ); -/** Return the /id/ attribute of the associated html cell (if applicable) */ -TClass(wxString) wxcHtmlEvent_GetHtmlCellId( TSelf(wxcHtmlEvent) self ); +TClass(wxHtmlCell) wxcHtmlEvent_GetHtmlCell( TSelf(wxcHtmlEvent) self );++/** Return the /id/ attribute of the associated html cell (if applicable) */++TClass(wxString) wxcHtmlEvent_GetHtmlCellId( TSelf(wxcHtmlEvent) self );+ /** Return the /href/ attribute of the associated html anchor (if applicable) */ TClass(wxString) wxcHtmlEvent_GetHref( TSelf(wxcHtmlEvent) self ); TClass(wxString) wxcHtmlEvent_GetTarget( TSelf(wxcHtmlEvent) self );@@ -254,10 +350,14 @@ void wxHtmlWindow_SetRelatedStatusBar( TSelf(wxHtmlWindow) _obj, int bar); void wxHtmlWindow_WriteCustomization( TSelf(wxHtmlWindow) _obj, TClass(wxConfigBase) cfg, TClass(wxString) path ); -/* wxGridCellTextEnterEditor */ -TClassDefExtend(wxGridCellTextEnterEditor,wxGridCellTextEditor) -TClass(wxGridCellTextEnterEditor) wxGridCellTextEnterEditor_Ctor(); - +/* wxGridCellTextEnterEditor */++TClassDefExtend(wxGridCellTextEnterEditor,wxGridCellTextEditor)++TClass(wxGridCellTextEnterEditor) wxGridCellTextEnterEditor_Ctor();+++ /* logger */ TClass(wxLogStderr) wxLogStderr_Create(); TClass(wxLogStderr) wxLogStderr_CreateStdOut();@@ -342,59 +442,112 @@ void wxTextAttr_SetTextColour(TSelf(wxTextAttr) _obj, TClass(wxColour) colour ); void wxTextAttr_SetBackgroundColour(TSelf(wxTextAttr) _obj, TClass(wxColour) colour ); void wxTextAttr_SetFont(TSelf(wxTextAttr) _obj, TClass(wxFont) font );- -/* ConfigBase */ -TClassDefExtend(wxFileConfig,wxConfigBase) - -TClass(wxConfigBase) wxConfigBase_Get(); -void wxConfigBase_Set( TClass(wxConfigBase) self ); -TClass(wxFileConfig) wxFileConfig_Create( TClass(wxInputStream) inp ); - -/* Image.cpp */ -TClass(wxBitmap) wxBitmap_CreateFromImage( TClass(wxImage) image, int depth ); -TClass(wxImage) wxImage_CreateFromDataEx( TSize(width,height), void* data, TBoolInt isStaticData); -void wxImage_Delete( TSelf(wxImage) image ); - -/** Create from rgb int. */ -TClass(wxColour) wxColour_CreateFromInt(int rgb); -/** Return colors as an rgb int. */ -int wxColour_GetInt( TSelf(wxColour) colour); -/** Create from rgba unsigned int. */ -TClass(wxColour) wxColour_CreateFromUnsignedInt(TUInt rgba); -/** Return colors as an rgba unsigned int. */ -TUInt wxColour_GetUnsignedInt( TSelf(wxColour) colour); - -/** Create from system colour. */ -TClass(wxColour) wxcSystemSettingsGetColour( int systemColour ); - - -/* basic pixel manipulation */ -void wxcSetPixelRGB( TUInt8* buffer, int width, TPoint(x,y), int rgb ); -int wxcGetPixelRGB( TUInt8* buffer, int width, TPoint(x,y) ); -void wxcSetPixelRowRGB( TUInt8* buffer, int width, TPoint(x,y), int rgbStart, int rgbEnd, int count ); -void wxcInitPixelsRGB( TUInt8* buffer, TSize(width,height), int rgba ); -void wxcSetPixelRGBA( TUInt8* buffer, int width, TPoint(x,y), TUInt rgba ); -TUInt wxcGetPixelRGBA( TUInt8* buffer, int width, TPoint(x,y) ); -void wxcSetPixelRowRGBA( TUInt8* buffer, int width, TPoint(x,y), int rgbaStart, int rgbEnd, TUInt count ); -void wxcInitPixelsRGBA( TUInt8* buffer, TSize(width,height), TUInt rgba ); - -/* malloc/free */ -void* wxcMalloc(int size ); -void wxcFree( void* p ); - -/* wakeup idle */ -void wxcWakeUpIdle(); - -/* application directory */ -/** Return the directory of the application. On unix systems (except MacOS X), it is not always possible to determine this correctly. Therefore, the APPDIR environment variable is returned first if it is defined. */ -TClass(wxString) wxGetApplicationDir(); -/** Return the full path of the application. On unix systems (except MacOS X), it is not always possible to determine this correctly. */ -TClass(wxString) wxGetApplicationPath(); - +++/* ConfigBase */++TClassDefExtend(wxFileConfig,wxConfigBase)++++TClass(wxConfigBase) wxConfigBase_Get();++void wxConfigBase_Set( TClass(wxConfigBase) self );++TClass(wxFileConfig) wxFileConfig_Create( TClass(wxInputStream) inp );++++/* Image.cpp */++TClass(wxBitmap) wxBitmap_CreateFromImage( TClass(wxImage) image, int depth );++TClass(wxImage) wxImage_CreateFromDataEx( TSize(width,height), void* data, TBoolInt isStaticData);++void wxImage_Delete( TSelf(wxImage) image );++++/** Create from rgb int. */++TClass(wxColour) wxColour_CreateFromInt(int rgb);++/** Return colors as an rgb int. */++int wxColour_GetInt( TSelf(wxColour) colour);++/** Create from rgba unsigned int. */++TClass(wxColour) wxColour_CreateFromUnsignedInt(TUInt rgba);++/** Return colors as an rgba unsigned int. */++TUInt wxColour_GetUnsignedInt( TSelf(wxColour) colour);++++/** Create from system colour. */++TClass(wxColour) wxcSystemSettingsGetColour( int systemColour );++++++/* basic pixel manipulation */++void wxcSetPixelRGB( TUInt8* buffer, int width, TPoint(x,y), int rgb );++int wxcGetPixelRGB( TUInt8* buffer, int width, TPoint(x,y) );++void wxcSetPixelRowRGB( TUInt8* buffer, int width, TPoint(x,y), int rgbStart, int rgbEnd, int count );++void wxcInitPixelsRGB( TUInt8* buffer, TSize(width,height), int rgba );++void wxcSetPixelRGBA( TUInt8* buffer, int width, TPoint(x,y), TUInt rgba );++TUInt wxcGetPixelRGBA( TUInt8* buffer, int width, TPoint(x,y) );++void wxcSetPixelRowRGBA( TUInt8* buffer, int width, TPoint(x,y), int rgbaStart, int rgbEnd, TUInt count );++void wxcInitPixelsRGBA( TUInt8* buffer, TSize(width,height), TUInt rgba );++++/* malloc/free */++void* wxcMalloc(int size );++void wxcFree( void* p );++++/* wakeup idle */++void wxcWakeUpIdle();++++/* application directory */++/** Return the directory of the application. On unix systems (except MacOS X), it is not always possible to determine this correctly. Therefore, the APPDIR environment variable is returned first if it is defined. */++TClass(wxString) wxGetApplicationDir();++/** Return the full path of the application. On unix systems (except MacOS X), it is not always possible to determine this correctly. */++TClass(wxString) wxGetApplicationPath();+++ /* ELJApp */-void ELJApp_InitializeC( TClass(wxClosure) closure, int _argc, TChar** _argv ); -int ELJApp_GetIdleInterval(); -void ELJApp_SetIdleInterval( int interval ); - +void ELJApp_InitializeC( TClass(wxClosure) closure, int _argc, TChar** _argv );++int ELJApp_GetIdleInterval();++void ELJApp_SetIdleInterval( int interval );+++ #endif /* wxc_h */
src/include/wxc_glue.h view
@@ -2,6 +2,9 @@ #define WXC_GLUE_H /* $Id: wxc_glue.h,v 1.23 2005/02/25 11:14:58 dleijen Exp $ */ ++/* wx/version.h must be included for preprocessing by wxdirect */+#include "wx/version.h" /* Null */ TClass(wxAcceleratorTable) Null_AcceleratorTable( ); @@ -75,8 +78,6 @@ int expEVT_COMMAND_DATAVIEW_ITEM_DROP(); int expEVT_DATE_CHANGED(); int expEVT_WINDOW_MODAL_DIALOG_CLOSED(); -//int expEVT_DIALUP_CONNECTED(); -//int expEVT_DIALUP_DISCONNECTED(); int expEVT_COMMAND_BUTTON_CLICKED(); int expEVT_COMMAND_CHECKBOX_CLICKED(); int expEVT_COMMAND_CHOICE_SELECTED(); @@ -1119,6 +1120,14 @@ void wxBitmapButton_SetBitmapSelected( TSelf(wxBitmapButton) _obj, TClass(wxBitmap) sel ); void wxBitmapButton_SetMargins( TSelf(wxBitmapButton) _obj, TPoint(x,y) ); +/* wxBitmapToggleButton */ +TClassDefExtend(wxBitmapToggleButton,wxToggleButton) +TClass(wxBitmapToggleButton) wxBitmapToggleButton_Create( TClass(wxWindow) parent, int id, TClass(wxBitmap) _bmp, TRect(x,y,w,h), int style ); +TBool wxBitmapToggleButton_Enable( TSelf(wxBitmapToggleButton) _obj, TBool enable ); +TBool wxBitmapToggleButton_GetValue( TSelf(wxBitmapToggleButton) _obj ); +void wxBitmapToggleButton_SetValue( TSelf(wxBitmapToggleButton) _obj, TBool state ); +void wxBitmapToggleButton_SetBitmapLabel( TSelf(wxBitmapToggleButton) _obj, TClass(wxBitmap) _bmp ); + /* wxBitmapDataObject */ TClassDefExtend(wxBitmapDataObject,wxDataObjectSimple) TClass(wxBitmapDataObject) BitmapDataObject_Create( TClass(wxBitmap) _bmp ); @@ -1625,6 +1634,9 @@ void wxDC_SetBrush( TSelf(wxDC) _obj, TClass(wxBrush) brush ); void wxDC_SetClippingRegion( TSelf(wxDC) _obj, TRect(x,y,width,height) ); void wxDC_SetClippingRegionFromRegion( TSelf(wxDC) _obj, TClass(wxRegion) region ); +#if wxCHECK_VERSION(2,9,5) +void wxDC_SetDeviceClippingRegion( TSelf(wxDC) _obj, TClass(wxRegion) region ); +#endif void wxDC_SetDeviceOrigin( TSelf(wxDC) _obj, TPoint(x,y) ); void wxDC_SetFont( TSelf(wxDC) _obj, TClass(wxFont) font ); void wxDC_SetLogicalFunction( TSelf(wxDC) _obj, int function ); @@ -2482,6 +2494,8 @@ void wxGrid_GetSelectionBlockBottomRight(TSelf(wxGrid) _obj, TClassRef(wxGridCellCoordsArray) _arr); TArrayLen wxGrid_GetSelectedRows(TSelf(wxGrid) _obj, TArrayIntOutVoid _arr); TArrayLen wxGrid_GetSelectedCols(TSelf(wxGrid) _obj, TArrayIntOutVoid _arr); +void wxGrid_GetCellSize(TSelf(wxGrid) _obj, int row, int col, TSizeOut(srow,scol)); +void wxGrid_SetCellSize(TSelf(wxGrid) _obj, int row, int col, TSize(srow,scol)); /* wxGridCellAttr */ TClassDef(wxGridCellAttr) @@ -2538,7 +2552,13 @@ void wxGridCellEditor_HandleReturn( TSelf(wxGridCellEditor) _obj, TClass(wxEvent) event ); TBool wxGridCellEditor_IsAcceptedKey( TSelf(wxGridCellEditor) _obj, TClass(wxEvent) event ); TBool wxGridCellEditor_IsCreated( TSelf(wxGridCellEditor) _obj ); ++#if (wxVERSION_NUMBER >= 2905) +void wxGridCellEditor_PaintBackground( TSelf(wxGridCellEditor) _obj, TClass(wxDC) dc, TRect(x,y,w,h), TClass(wxGridCellAttr) attr ); +#else void wxGridCellEditor_PaintBackground( TSelf(wxGridCellEditor) _obj, TRect(x,y,w,h), TClass(wxGridCellAttr) attr ); +#endif+ void wxGridCellEditor_Reset( TSelf(wxGridCellEditor) _obj ); void wxGridCellEditor_SetControl( TSelf(wxGridCellEditor) _obj, TClass(wxControl) control ); void wxGridCellEditor_SetParameters( TSelf(wxGridCellEditor) _obj, TClass(wxString) params ); @@ -2560,7 +2580,12 @@ /* wxGridCellNumberRenderer */ TClassDefExtend(wxGridCellNumberRenderer,wxGridCellStringRenderer) +TClass(wxGridCellNumberRenderer) wxGridCellNumberRenderer_Ctor(); +/* wxGridCellAutoWrapStringRenderer */ +TClassDefExtend(wxGridCellAutoWrapStringRenderer,wxGridCellStringRenderer) +TClass(wxGridCellAutoWrapStringRenderer) wxGridCellAutoWrapStringRenderer_Ctor(); + /* wxGridCellRenderer */ TClassDefExtend(wxGridCellRenderer,wxGridCellWorker) @@ -4174,6 +4199,7 @@ void wxScrolledWindow_SetScale( TSelf(wxScrolledWindow) _obj, double xs, double ys ); void wxScrolledWindow_SetScrollPageSize( TSelf(wxScrolledWindow) _obj, int orient, int pageSize ); void wxScrolledWindow_SetScrollbars( TSelf(wxScrolledWindow) _obj, int pixelsPerUnitX, int pixelsPerUnitY, int noUnitsX, int noUnitsY, int xPos, int yPos, TBool noRefresh ); +void wxScrolledWindow_ShowScrollbars( TSelf(wxScrolledWindow) _obj, int showh, int showv ); void wxScrolledWindow_SetTargetWindow( TSelf(wxScrolledWindow) _obj, TClass(wxWindow) target ); void wxScrolledWindow_ViewStart( TSelf(wxScrolledWindow) _obj, TPointOutVoid(_x,_y) ); @@ -4236,8 +4262,10 @@ TClass(wxSize) wxSizer_CalcMin( TSelf(wxSizer) _obj ); void wxSizer_Fit( TSelf(wxSizer) _obj, TClass(wxWindow) window ); int wxSizer_GetChildren( TSelf(wxSizer) _obj, void* _res, int _cnt ); -TClass(wxSize) wxSizer_GetMinSize( TSelf(wxSizer) _obj ); -TClass(wxPoint) wxSizer_GetPosition( TSelf(wxSizer) _obj ); +TClass(wxSize) wxSizer_GetMinSize( TSelf(wxSizer) _obj ); + +TClass(wxPoint) wxSizer_GetPosition( TSelf(wxSizer) _obj ); + TClass(wxSize) wxSizer_GetSize( TSelf(wxSizer) _obj ); void wxSizer_Insert( TSelf(wxSizer) _obj, int before, TSize(width,height), int option, int flag, int border, void* userData ); void wxSizer_InsertSizer( TSelf(wxSizer) _obj, int before, TClass(wxSizer) sizer, int option, int flag, int border, void* userData ); @@ -4417,6 +4445,8 @@ TBool wxSplitterWindow_SplitHorizontally( TSelf(wxSplitterWindow) _obj, TClass(wxWindow) window1, TClass(wxWindow) window2, int sashPosition ); TBool wxSplitterWindow_SplitVertically( TSelf(wxSplitterWindow) _obj, TClass(wxWindow) window1, TClass(wxWindow) window2, int sashPosition ); TBool wxSplitterWindow_Unsplit( TSelf(wxSplitterWindow) _obj, TClass(wxWindow) toRemove ); +double wxSplitterWindow_GetSashGravity( TSelf(wxSplitterWindow) _obj ); +void wxSplitterWindow_SetSashGravity( TSelf(wxSplitterWindow) _obj, double gravity ); /* wxStaticBitmap */ TClassDefExtend(wxStaticBitmap,wxControl) @@ -4785,7 +4815,7 @@ void wxTreeCtrl_GetPrevVisible( TSelf(wxTreeCtrl) _obj, TClass(wxTreeItemId) item, TClassRef(wxTreeItemId) _item ); void wxTreeCtrl_GetRootItem( TSelf(wxTreeCtrl) _obj, TClassRef(wxTreeItemId) _item ); void wxTreeCtrl_GetSelection( TSelf(wxTreeCtrl) _obj, TClassRef(wxTreeItemId) _item ); -TArrayLen wxTreeCtrl_GetSelections( TSelf(wxTreeCtrl) _obj, TArrayIntOutVoid selections ); +TArrayLen wxTreeCtrl_GetSelections( TSelf(wxTreeCtrl) _obj, TArrayIntPtrOutVoid selections ); int wxTreeCtrl_GetSpacing( TSelf(wxTreeCtrl) _obj ); TClass(wxImageList) wxTreeCtrl_GetStateImageList( TSelf(wxTreeCtrl) _obj ); void wxTreeCtrl_HitTest( TSelf(wxTreeCtrl) _obj, TPoint(_x,_y), int* flags, TClassRef(wxTreeItemId) _item );
src/include/wxc_types.h view
@@ -15,6 +15,7 @@ #undef TChar #undef TUInt8 #undef TInt64 +#undef TIntPtr #undef TBool #undef TBoolInt #undef TClass @@ -41,10 +42,13 @@ #undef TRectOutVoid #undef TArrayString #undef TArrayInt +#undef TArrayIntPtr #undef TArrayObject #undef TArrayLen #undef TArrayIntOut #undef TArrayIntOutVoid +#undef TArrayIntPtrOut +#undef TArrayIntPtrOutVoid #undef TArrayStringOut #undef TArrayStringOutVoid #undef TArrayObjectOut @@ -73,6 +77,9 @@ #define TChar char #endif +/* integer which can hold a pointer */ +#define TIntPtr intptr_t + /* 64 bit integer */ #define TInt64 int64_t @@ -121,11 +128,13 @@ /* arrays */ #define TArrayLen int #define TArrayIntOut intptr_t* +#define TArrayIntPtrOut intptr_t* #define TArrayStringOut TString* #define TArrayObjectOut(tp) TClass(tp)* #define TArrayString(n,p) int n, TString* p #define TArrayInt(n,p) int n, int* p +#define TArrayIntPtr(n,p) int n, intptr_t* p #define TArrayObject(n,tp,p) int n, TClass(tp)* p /* Define "Void" variants for void* declared signatures. @@ -138,6 +147,7 @@ # define TSizeOutVoid(w,h) TSizeOut(w,h) # define TRectOutVoid(x,y,w,h) TRectOut(x,y,w,h) # define TArrayIntOutVoid TArrayIntOut +# define TArrayIntPtrOutVoid TArrayIntPtrOut # define TArrayStringOutVoid TArrayStringOut # define TArrayObjectOutVoid(tp) TArrayObjectOut(tp) #else @@ -148,6 +158,7 @@ # define TSizeOutVoid(w,h) void* w, void* h # define TRectOutVoid(x,y,w,h) void* x, void* y, void* w, void* h # define TArrayIntOutVoid void* +# define TArrayIntPtrOutVoid void* # define TArrayStringOutVoid void* # define TArrayObjectOutVoid(tp) void* #endif
wxc.cabal view
@@ -1,5 +1,5 @@ name: wxc-version: 0.90.0.4+version: 0.90.1.0 license: OtherLicense license-file: LICENSE maintainer: wxhaskell-devel@lists.sourceforge.net@@ -107,6 +107,7 @@ src/cpp/eljtextctrl.cpp src/cpp/eljtimer.cpp src/cpp/eljtipwnd.cpp+ src/cpp/eljtglbtn.cpp src/cpp/eljtoolbar.cpp src/cpp/eljvalidator.cpp src/cpp/eljwindow.cpp@@ -158,7 +159,7 @@ build-depends: base >= 4 && < 5,- wxdirect >= 0.90+ wxdirect >= 0.90.1.0 x-dll-sources: src/cpp/apppath.cpp@@ -246,6 +247,7 @@ src/cpp/eljtextctrl.cpp src/cpp/eljtimer.cpp src/cpp/eljtipwnd.cpp+ src/cpp/eljtglbtn.cpp src/cpp/eljtoolbar.cpp src/cpp/eljvalidator.cpp src/cpp/eljwindow.cpp