packages feed

wxc 0.92.1.1 → 0.92.2.0

raw patch · 13 files changed

+291/−11 lines, 13 filessetup-changed

Files

Setup.hs view
@@ -17,7 +17,7 @@ import Distribution.Simple.Setup ( BuildFlags, ConfigFlags
                                  , CopyDest(..), CopyFlags, copyVerbosity
                                  , InstallFlags, installVerbosity
-                                 , fromFlag
+                                 , fromFlag, fromFlagOrDefault, copyDest
                                  )
 import Distribution.Simple.Utils (installOrdinaryFile, rawSystemExitWithEnv, rawSystemStdInOut, die)
 import Distribution.System (OS (..), Arch (..), buildOS, buildArch)
@@ -624,16 +624,17 @@                 otherwise -> error "Couldn't execute ldconfig, ensure it is on your path"
 
 myCopyHook :: PackageDescription -> LocalBuildInfo -> UserHooks -> CopyFlags -> IO ()
-myCopyHook = hookHelper (fromFlag . copyVerbosity) (copyHook simpleUserHooks)
+myCopyHook = hookHelper (fromFlag . copyVerbosity) (fromFlagOrDefault NoCopyDest . copyDest) (copyHook simpleUserHooks)
 
 myInstHook :: PackageDescription -> LocalBuildInfo -> UserHooks -> InstallFlags -> IO ()
-myInstHook = hookHelper (fromFlag . installVerbosity) (instHook simpleUserHooks)
+myInstHook = hookHelper (fromFlag . installVerbosity) (const NoCopyDest) (instHook simpleUserHooks)
 
 hookHelper ::
     (a -> Verbosity) ->
+    (a -> CopyDest) ->
     (PackageDescription -> LocalBuildInfo -> UserHooks -> a -> IO ()) ->
     PackageDescription -> LocalBuildInfo -> UserHooks -> a -> IO ()
-hookHelper verbosity origHook pkg_descr local_bld_info user_hooks flags =
+hookHelper verbosity copydest origHook pkg_descr local_bld_info user_hooks flags =
     do
     -- Perform simpleUserHooks (copyHook/instHook => to copy installIncludes)
     origHook pkg_descr local_bld_info user_hooks flags
@@ -648,7 +649,7 @@         dll_name = fromJust (lookup "x-dll-name" custom_bi)
         lib_name = sharedLibName ver dll_name
 
-        inst_lib_dir = libdir $ absoluteInstallDirs pkg_descr local_bld_info NoCopyDest
+        inst_lib_dir = libdir $ absoluteInstallDirs pkg_descr local_bld_info (copydest flags)
 
     installOrdinaryFile (verbosity flags) (bld_dir </> lib_name) (inst_lib_dir </> lib_name)
     ldconfig inst_lib_dir
src/cpp/eljcombobox.cpp view
@@ -91,6 +91,12 @@ {
 	return new wxString(self->GetValue());
 }
+
+EWXWEXPORT(void,wxComboBox_SetValue)(wxComboBox* self,wxString* value)
+{
+	self->SetValue(*value);
+}
+
 	
 EWXWEXPORT(void,wxComboBox_Append)(wxComboBox* self,wxString* item)
 {
src/cpp/eljimage.cpp view
@@ -3,6 +3,11 @@ extern "C"
 {
 
+EWXWEXPORT(void,wxImage_Copy)(wxImage *self, wxImage* image)
+{
+	*image = self->Copy();
+}
+
 EWXWEXPORT(wxImage*,wxImage_CreateDefault)()
 {
 	return new wxImage();
@@ -76,12 +81,22 @@ {
 	self->Destroy();
 }
-	
+
 EWXWEXPORT(void,wxImage_GetSubImage)(wxImage* self,int x,int y,int w,int h,wxImage* image)
 {
 	*image = self->GetSubImage(wxRect(x, y, w, h));
 }
-	
+
+EWXWEXPORT(int,wxImage_GetType)(wxImage* self)
+{
+	return self->GetType();
+}
+
+EWXWEXPORT(void,wxImage_SetType)(wxImage* self,int type)
+{
+	self->SetType((wxBitmapType) type);
+}
+
 EWXWEXPORT(void,wxImage_Paste)(wxImage* self,wxImage* image,int x,int y)
 {
 	self->Paste(*image, x, y);
@@ -91,11 +106,21 @@ {
 	*image = self->Scale(width, height);
 }
+
+EWXWEXPORT(void,wxImage_ScaleEx)(wxImage* self,int width,int height,int quality,wxImage* image)
+{
+	*image = self->Scale(width, height,(wxImageResizeQuality) quality);
+}
 	
 EWXWEXPORT(void,wxImage_Rescale)(wxImage* self,int width,int height)
 {
 	self->Rescale(width, height);
 }
+
+EWXWEXPORT(void,wxImage_RescaleEx)(wxImage* self,int width,int height,int quality)
+{
+	self->Rescale(width, height,(wxImageResizeQuality) quality);
+}
 	
 EWXWEXPORT(void,wxImage_Rotate)(wxImage* self,double angle,int c_x,int c_y,bool interpolating,void* offset_after_rotation,wxImage* image)
 {
@@ -146,10 +171,20 @@ {
 	return self->LoadFile(*name, type);
 }
+
+EWXWEXPORT(bool, wxImage_LoadStream)(wxImage *self, wxInputStream *stream, wxBitmapType type, int index)
+{
+	return self->LoadFile(*stream, type, index);
+}
 	
 EWXWEXPORT(bool, wxImage_SaveFile)(wxImage *self, wxString *name, wxBitmapType type)
 {
 	return self->SaveFile(*name, type);
+}
+
+EWXWEXPORT(bool, wxImage_SaveStream)(wxImage *self, wxOutputStream *stream, wxBitmapType type)
+{
+	return self->SaveFile(*stream, type);
 }
 	
 EWXWEXPORT(bool,wxImage_IsOk)(wxImage* self)
+ src/cpp/hyperlinkctrl.cpp view
@@ -0,0 +1,64 @@+#include "wrapper.h"
+#include <wx/hyperlink.h>
+
+extern "C"
+{
+
+EWXWEXPORT(wxHyperlinkCtrl*,wxHyperlinkCtrl_Create)(wxWindow* parent,int id,const wxString& label,const wxString &url, int x, int y, int w, int h, int style)
+{
+	return new wxHyperlinkCtrl(parent, id, label, url, wxPoint(x, y), wxSize(w, h), style);
+}
+
+EWXWEXPORT(wxColour,wxHyperlinkCtrl_GetHoverColour)(wxHyperlinkCtrl* self)
+{
+	return self->GetHoverColour();
+}
+
+EWXWEXPORT(wxColour,wxHyperlinkCtrl_GetNormalColour)(wxHyperlinkCtrl* self)
+{
+	return self->GetNormalColour();
+}
+
+EWXWEXPORT(wxString,wxHyperlinkCtrl_GetURL)(wxHyperlinkCtrl* self)
+{
+	return self->GetURL();
+}
+
+EWXWEXPORT(bool,wxHyperlinkCtrl_GetVisited)(wxHyperlinkCtrl* self)
+{
+	return self->GetVisited();
+}
+
+EWXWEXPORT(wxColour,wxHyperlinkCtrl_GetVisitedColour)(wxHyperlinkCtrl* self)
+{
+	return self->GetVisitedColour();
+}
+
+EWXWEXPORT(void,wxHyperlinkCtrl_SetHoverColour)(wxHyperlinkCtrl* self,const wxColour &colour)
+{
+	self->SetHoverColour(colour);
+}
+
+EWXWEXPORT(void,wxHyperlinkCtrl_SetNormalColour)(wxHyperlinkCtrl* self,const wxColour &colour)
+{
+	self->SetNormalColour(colour);
+}
+
+EWXWEXPORT(void,wxHyperlinkCtrl_SetURL)(wxHyperlinkCtrl* self,const wxString &url)
+{
+	self->SetURL(url);
+}
+
+EWXWEXPORT(void,wxHyperlinkCtrl_SetVisited)(wxHyperlinkCtrl* self,bool visited)
+{
+	self->SetVisited(visited);
+}
+
+EWXWEXPORT(void,wxHyperlinkCtrl_SetVisitedColour)(wxHyperlinkCtrl* self,const wxColour &colour)
+{
+	self->SetVisitedColour(colour);
+}
+
+} 
+
+
+ src/cpp/pickerctrl.cpp view
@@ -0,0 +1,24 @@+#include "wrapper.h"
+#include <wx/clrpicker.h>
+
+
+extern "C"
+{
+
+EWXWEXPORT( wxColourPickerCtrl*,wxColorPickerCtrl_Create)(wxWindow* parent,int id,const wxColour& colour, int x, int y, int w, int h, int style)
+{
+	return new wxColourPickerCtrl(parent, id, colour, wxPoint(x, y), wxSize(w, h), style);
+}
+
+EWXWEXPORT( void,wxColorPickerCtrl_GetColour)(wxColourPickerCtrl* self, wxColour* colour)
+{
+	*colour = self->GetColour();
+}
+ 
+EWXWEXPORT( void,wxColorPickerCtrl_SetColour)(wxColourPickerCtrl* self,const wxColour &colour)
+{
+	self->SetColour(colour);
+}
+
+} 
+
src/cpp/std.cpp view
@@ -3,9 +3,9 @@ /*-----------------------------------------------------------------------------
   License: BSD-style (BSD3)
 
-  We sometimes want to use standard C++ types, containers and algorithms, for
+  We sometimes want to use standard C++ types, containers and algorithms, to
   clean-up our code. Unfortunately, most platorms' FFI just support C language,
-  not support C++ and its libraries. So, we define C-function to use standard
+  not support C++ and its libraries. So, we define C-functions to use standard
   C++ types, containers and algorithms in this place.
 -----------------------------------------------------------------------------*/
 
+ src/cpp/stream.cpp view
@@ -0,0 +1,59 @@+#include "wrapper.h"
+#include <wx/wfstream.h>
+
+extern "C"
+{
+
+/*-----------------------------------------------------------------------------
+  Memory Input stream
+-----------------------------------------------------------------------------*/
+
+EWXWEXPORT( wxMemoryInputStream*, wxMemoryInputStream_Create)(void* data,int len)
+{
+  return new wxMemoryInputStream((unsigned char*) data,len);
+}
+
+EWXWEXPORT( void, wxMemoryInputStream_Delete)(wxMemoryInputStream* self)
+{
+  if (self) delete self;
+}
+
+/*-----------------------------------------------------------------------------
+  File Input stream
+-----------------------------------------------------------------------------*/
+
+EWXWEXPORT( wxFileInputStream*, wxFileInputStream_Create)(wxString* ofileName)
+{
+  return new wxFileInputStream(*ofileName);
+}
+
+EWXWEXPORT( void, wxFileInputStream_Delete)(wxFileInputStream* self)
+{
+  if (self) delete self;
+}
+
+EWXWEXPORT( bool, wxFileInputStream_IsOk)(wxFileInputStream* self)
+{
+  return self->IsOk();
+}
+
+/*-----------------------------------------------------------------------------
+  File Output stream
+-----------------------------------------------------------------------------*/
+
+EWXWEXPORT( wxFileOutputStream*, wxFileOutputStream_Create)(wxString* ofileName)
+{
+  return new wxFileOutputStream(*ofileName);
+}
+
+EWXWEXPORT( void, wxFileOutputStream_Delete)(wxFileOutputStream* self)
+{
+  if (self) delete self;
+}
+
+EWXWEXPORT( bool, wxFileOutputStream_IsOk)(wxFileOutputStream* self)
+{
+  return self->IsOk();
+}
+
+}
+ src/include/hyperlinkctrl.h view
@@ -0,0 +1,22 @@+/*-----------------------------------------------------------------------------
+  HyperlinkCtrl
+-----------------------------------------------------------------------------*/
+
+TClassDefExtend(wxHyperlinkCtrl,wxControl);
+
+
+TClass(wxHyperlinkCtrl) wxHyperlinkCtrl_Create( TClass(wxWindow) parent, int id, TClass(wxString) label,TClass(wxString) url, TRect(x,y,w,h), int style);
+TClass(wxColour)        wxHyperlinkCtrl_GetHoverColour( TSelf(wxHyperlinkCtrl) self);
+TClass(wxColour)        wxHyperlinkCtrl_GetNormalColour( TSelf(wxHyperlinkCtrl) self);
+TClass(wxString)        wxHyperlinkCtrl_GetURL( TSelf(wxHyperlinkCtrl) self);
+TBool                   wxHyperlinkCtrl_GetVisited( TSelf(wxHyperlinkCtrl) self);
+TClass(wxColour)        wxHyperlinkCtrl_GetVisitedColour( TSelf(wxHyperlinkCtrl) self);
+void                    wxHyperlinkCtrl_SetHoverColour( TSelf(wxHyperlinkCtrl) self, TClass(wxColour) colour);
+void                    wxHyperlinkCtrl_SetNormalColour( TSelf(wxHyperlinkCtrl) self, TClass(wxColour) colour);
+void                    wxHyperlinkCtrl_SetURL( TSelf(wxHyperlinkCtrl) self, TClass(wxString) url);
+void                    wxHyperlinkCtrl_SetVisited( TSelf(wxHyperlinkCtrl) self, TBool visited);
+void                    wxHyperlinkCtrl_SetVisitedColour( TSelf(wxHyperlinkCtrl) self, TClass(wxColour) colour);
+
+
+
+
+ src/include/pickerctrl.h view
@@ -0,0 +1,18 @@+/*-----------------------------------------------------------------------------
+   PickerBase
+-----------------------------------------------------------------------------*/
+
+TClassDefExtend( wxPickerBase,wxControl);
+
+/*-----------------------------------------------------------------------------
+  ColourPickerCtrl
+-----------------------------------------------------------------------------*/
+
+TClassDefExtend( wxColourPickerCtrl,wxPickerBase);
+
+// wxdirect ignore wxColour.. -> wxColorPickerCtrl_.. without u
+TClass(wxColourPickerCtrl) wxColorPickerCtrl_Create( TClass(wxWindow) parent, int id, TClass(wxColour) colour, TRect(x,y,w,h), int style);
+void                       wxColorPickerCtrl_GetColour( TSelf(wxColourPickerCtrl) self,TClassRef(wxColour) colour);
+void                       wxColorPickerCtrl_SetColour( TSelf(wxColourPickerCtrl) self, TClass(wxColour) colour);
+
+
+ src/include/stream.h view
@@ -0,0 +1,27 @@+#ifndef FILESTEAM_H
+#define FILESTEAM_H
+
+/*-----------------------------------------------------------------------------
+  Memory Input stream
+-----------------------------------------------------------------------------*/
+
+TClass(wxMemoryInputStream) wxMemoryInputStream_Create(void* data,int len);
+void wxMemoryInputStream_Delete( TSelf(wxMemoryInputStream) self );
+
+/*-----------------------------------------------------------------------------
+  File Input stream
+-----------------------------------------------------------------------------*/
+
+TClass(wxFileInputStream) wxFileInputStream_Create(TClass(wxString) ofileName);
+void wxFileInputStream_Delete( TSelf(wxFileInputStream) self );
+TBool wxFileInputStream_IsOk( TSelf(wxFileInputStream) self);
+
+/*-----------------------------------------------------------------------------
+  File Output stream
+-----------------------------------------------------------------------------*/
+
+TClass(wxFileOutputStream) wxFileOutputStream_Create(TClass(wxString) ofileName);
+void wxFileOutputStream_Delete( TSelf(wxFileOutputStream) self );
+TBool wxFileOutputStream_IsOk( TSelf(wxFileOutputStream) self);
+
+#endif /* FILESTEAM_H */
src/include/wxc.h view
@@ -39,6 +39,9 @@ #include "previewframe.h"
 #include "printout.h"
 #include "textstream.h"
+#include "stream.h"
+#include "hyperlinkctrl.h"
+#include "pickerctrl.h"
 #include "stc.h"
 
 /*-----------------------------------------------------------------------------
src/include/wxc_glue.h view
@@ -1983,6 +1983,7 @@ TClass(wxString) wxComboBox_GetString( TSelf(wxComboBox) _obj, int n );
 TClass(wxString) wxComboBox_GetStringSelection( TSelf(wxComboBox) _obj );
 TClass(wxString) wxComboBox_GetValue( TSelf(wxComboBox) _obj );
+void       wxComboBox_SetValue( TSelf(wxComboBox) _obj, TClass(wxString) value);
 void       wxComboBox_Paste( TSelf(wxComboBox) _obj );
 void       wxComboBox_Remove( TSelf(wxComboBox) _obj, int from, int to );
 void       wxComboBox_Replace( TSelf(wxComboBox) _obj, int from, int to, TClass(wxString) value );
@@ -3400,6 +3401,7 @@ TByteStringLen wxImage_ConvertToByteString( TSelf(wxImage) _obj, int type, TByteStringOut data  );
 TByteStringLen wxImage_ConvertToLazyByteString( TSelf(wxImage) _obj, int type, TByteStringLazyOut data );
 int        wxImage_CountColours( TSelf(wxImage) _obj, int stopafter );
+void       wxImage_Copy( TSelf(wxImage) _obj, TClassRef(wxImage) image );
 TClass(wxImage) wxImage_CreateDefault(  );
 TClass(wxImage) wxImage_CreateFromBitmap( TClass(wxBitmap) bitmap );
 // TClass(wxImage) wxImage_CreateFromByteString( TByteString(data,length), int type );
@@ -3419,6 +3421,8 @@ TChar      wxImage_GetMaskRed( TSelf(wxImage) _obj );
 TChar      wxImage_GetRed( TSelf(wxImage) _obj, TPoint(x,y) );
 void       wxImage_GetSubImage( TSelf(wxImage) _obj, TRect(x,y,w,h), TClassRef(wxImage) image );
+int        wxImage_GetType( TSelf(wxImage) _obj );
+void       wxImage_SetType( TSelf(wxImage) _obj ,int type);
 int        wxImage_GetWidth( TSelf(wxImage) _obj );
 TBool      wxImage_HasMask( TSelf(wxImage) _obj );
 TClass(wxString) wxImage_GetOption( TSelf(wxImage) _obj, TClass(wxString) name );
@@ -3427,14 +3431,18 @@ void       wxImage_Initialize( TSelf(wxImage) _obj, TSize(width,height) );
 void       wxImage_InitializeFromData( TSelf(wxImage) _obj, TSize(width,height), void* data );
 TBool      wxImage_LoadFile( TSelf(wxImage) _obj, TClass(wxString) name, int type );
+TBool      wxImage_LoadStream( TSelf(wxImage) _obj, TClass(wxInputStream) name, int type, int index );
 void       wxImage_Mirror( TSelf(wxImage) _obj, TBoolInt horizontally, TClassRef(wxImage) image );
 TBool      wxImage_IsOk( TSelf(wxImage) _obj );
 void       wxImage_Paste( TSelf(wxImage) _obj, TClass(wxImage) image, TPoint(x,y) );
 void       wxImage_Replace( TSelf(wxImage) _obj, TColorRGB(r1,g1,b1), TColorRGB(r2,g2,b2) );
 void       wxImage_Rescale( TSelf(wxImage) _obj, TSize(width,height) );
+void       wxImage_RescaleEx( TSelf(wxImage) _obj, TSize(width,height), int quality);
 void       wxImage_Rotate( TSelf(wxImage) _obj, double angle, TPoint(c_x,c_y), TBoolInt interpolating, void* offset_after_rotation, TClassRef(wxImage) image );
 void       wxImage_Rotate90( TSelf(wxImage) _obj, TBoolInt clockwise, TClassRef(wxImage) image );
 TBool      wxImage_SaveFile( TSelf(wxImage) _obj, TClass(wxString) name, int type );
+TBool      wxImage_SaveStream( TSelf(wxImage) _obj, TClass(wxOutputStream) stream, int type );
+void       wxImage_ScaleEx( TSelf(wxImage) _obj, TSize(width,height),int quality, TClassRef(wxImage) image );
 void       wxImage_Scale( TSelf(wxImage) _obj, TSize(width,height), TClassRef(wxImage) image );
 void       wxImage_SetData( TSelf(wxImage) _obj, void* data );
 void       wxImage_SetDataAndSize( TSelf(wxImage) _obj, void* data, TSize(new_width,new_height) );
wxc.cabal view
@@ -1,5 +1,5 @@ name:         wxc
-version:      0.92.1.1
+version:      0.92.2.0
 license:      OtherLicense
 license-file: LICENSE
 maintainer:   wxhaskell-devel@lists.sourceforge.net
@@ -16,7 +16,8 @@   exception allowing binary distribution of proprietary software.
   This is the same license as wxWidgets itself uses.
 
-homepage:     https://wiki.haskell.org/WxHaskell
+homepage:      https://wiki.haskell.org/WxHaskell
+bug-reports:   http://sourceforge.net/p/wxhaskell/bugs/
 
 cabal-version: >= 1.2
 build-type:    Custom
@@ -116,11 +117,14 @@     src/cpp/eljwizard.cpp
     src/cpp/ewxw_main.cpp
     src/cpp/extra.cpp
+    src/cpp/stream.cpp
     src/cpp/glcanvas.cpp
     src/cpp/graphicscontext.cpp
+    src/cpp/hyperlinkctrl.cpp
     src/cpp/image.cpp
     src/cpp/managed.cpp
     src/cpp/mediactrl.cpp
+    src/cpp/pickerctrl.cpp
     src/cpp/previewframe.cpp
     src/cpp/printout.cpp
     src/cpp/sckaddr.cpp
@@ -147,10 +151,13 @@     dragimage.h
     eljgrid.h
     ewxw_def.h
+    stream.h
     graphicscontext.h
     glcanvas.h
+    hyperlinkctrl.h
     managed.h
     mediactrl.h
+    pickerctrl.h
     previewframe.h
     printout.h
     sound.h
@@ -263,11 +270,14 @@     src/cpp/eljwizard.cpp
     src/cpp/ewxw_main.cpp
     src/cpp/extra.cpp
+    src/cpp/stream.cpp
     src/cpp/glcanvas.cpp
     src/cpp/graphicscontext.cpp
+    src/cpp/hyperlinkctrl.cpp
     src/cpp/image.cpp
     src/cpp/managed.cpp
     src/cpp/mediactrl.cpp
+    src/cpp/pickerctrl.cpp
     src/cpp/previewframe.cpp
     src/cpp/printout.cpp
     src/cpp/sckaddr.cpp
@@ -280,6 +290,9 @@     src/cpp/treectrl.cpp
     src/cpp/wrapper.cpp
 
+  if impl(ghc > 7.10.2)
+    cc-options: "-std=gnu++11" -Wno-deprecated-declarations
+    
   x-dll-name: wxc
 
   x-dll-extra-libraries: