You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(12) |
Aug
(34) |
Sep
(14) |
Oct
(36) |
Nov
(32) |
Dec
(15) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
|
Feb
(9) |
Mar
(31) |
Apr
(36) |
May
(17) |
Jun
(21) |
Jul
(13) |
Aug
(18) |
Sep
(2) |
Oct
(10) |
Nov
(18) |
Dec
(28) |
2005 |
Jan
(26) |
Feb
(15) |
Mar
(26) |
Apr
(11) |
May
(60) |
Jun
(3) |
Jul
(12) |
Aug
(4) |
Sep
(12) |
Oct
(19) |
Nov
(36) |
Dec
(10) |
2006 |
Jan
(6) |
Feb
(13) |
Mar
(6) |
Apr
(2) |
May
(9) |
Jun
(3) |
Jul
(6) |
Aug
(13) |
Sep
(1) |
Oct
(24) |
Nov
(33) |
Dec
(47) |
2007 |
Jan
(21) |
Feb
(41) |
Mar
(17) |
Apr
(9) |
May
(4) |
Jun
(20) |
Jul
(24) |
Aug
(71) |
Sep
(35) |
Oct
(10) |
Nov
(39) |
Dec
(39) |
2008 |
Jan
(24) |
Feb
(42) |
Mar
(61) |
Apr
(12) |
May
(11) |
Jun
(4) |
Jul
(9) |
Aug
(6) |
Sep
(6) |
Oct
(4) |
Nov
(3) |
Dec
(14) |
2009 |
Jan
(25) |
Feb
(18) |
Mar
(19) |
Apr
(24) |
May
(14) |
Jun
(7) |
Jul
(14) |
Aug
(25) |
Sep
(40) |
Oct
(20) |
Nov
(22) |
Dec
(4) |
2010 |
Jan
(55) |
Feb
(11) |
Mar
(9) |
Apr
(10) |
May
(10) |
Jun
(9) |
Jul
(7) |
Aug
(4) |
Sep
(15) |
Oct
(7) |
Nov
(2) |
Dec
(3) |
2011 |
Jan
(2) |
Feb
(1) |
Mar
(4) |
Apr
(6) |
May
(20) |
Jun
(30) |
Jul
(15) |
Aug
(4) |
Sep
(23) |
Oct
(24) |
Nov
(3) |
Dec
(8) |
2012 |
Jan
(23) |
Feb
(7) |
Mar
(19) |
Apr
(48) |
May
(8) |
Jun
(27) |
Jul
(10) |
Aug
(1) |
Sep
(11) |
Oct
(1) |
Nov
|
Dec
(3) |
2013 |
Jan
(1) |
Feb
|
Mar
(17) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(12) |
Sep
(2) |
Oct
|
Nov
|
Dec
(1) |
2015 |
Jan
|
Feb
|
Mar
(14) |
Apr
(5) |
May
(1) |
Jun
|
Jul
|
Aug
(2) |
Sep
(5) |
Oct
(1) |
Nov
(2) |
Dec
(1) |
2016 |
Jan
(7) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2018 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <dp...@ex...> - 2004-04-15 03:02:48
|
On Wed, Apr 14, 2004 at 09:37:02AM +0100, Simon Marlow wrote: ... > That symbol looks suspiciously like it comes from the separate OpenGL > parts of WX, which reside in a separate library > (/usr/lib/libwx_gtk_gl-2.4.so here). On my system, libwxc has an > explicit dependency on libwx_gtk_gl, because it was linked against it. > Did you configure wxHaskell with --with-opengl? No, and that fixed it, thanks! I was confused because I had gotten wx to work with ghc (not ghci) earlier. Peace, Dylan |
From: Andres L. <an...@cs...> - 2004-04-14 16:14:47
|
> That is probably the problem. I did not see all messages of this thread, > but one should indeed use "--with-opengl" on wxHaskell configure if > wxWidgets > was build with "--with-opengl". > > Unfortunately, due to wxWidgets changes, I can not automatically detect the > need for this flag, but I promise to discuss it with the wxWidgets > devs. I think this has been discussed before: as far as I can see, the flag --with-opengl is always safe, and should therefore be the default. The call to "wx-config --gl-libs" returns the empty string if wxWidgets has not been built using GL. Best, Andres |
From: Daan L. <daa...@xs...> - 2004-04-14 15:51:55
|
On Wed, 14 Apr 2004 09:37:02 +0100, Simon Marlow <sim...@mi...>= wrote: >> > What error messages do you get, specifically? >> >> Here it is: >> ------------------------------- >> Loading package data ... linking ... done. >> Loading package wxcore ... ghc-6.2.1: can't load .so/.DLL >> for: wxc-gtk2.4.2-0.7 >> (/usr/local/stow/wxhaskell//lib/libwxc-gtk2.4.2-0.7.so: >> undefined symbol: >> _ZN10wxGLCanvasC1EP8wxWindowiRK7wxPointRK6wxSizelRK8wxStringPi >> RK9wxPalette) >> ------------------------------ >> >> I suspect it's something funny with Debian's setup, and quite possibly >> a bug somewhere else in Debian. > > That symbol looks suspiciously like it comes from the separate OpenGL > parts of WX, which reside in a separate library That is probably the problem. I did not see all messages of this thread, but one should indeed use "--with-opengl" on wxHaskell configure if wxWid= gets was build with "--with-opengl". Unfortunately, due to wxWidgets changes, I can not automatically detect t= he need for this flag, but I promise to discuss it with the wxWidgets devs. fyi. it seems ghci can not handle stripped dynamic libraries on windows, = but that may be due to the use of both a *.dll and an "import" library *.a. Funnily enough, ghc can handle link with those. (I haven't tested extens= ively though, and it might be related with the use of the upx packer). All the best, Daan. > (/usr/lib/libwx_gtk_gl-2.4.so here). On my system, libwxc has an > explicit dependency on libwx_gtk_gl, because it was linked against it. > Did you configure wxHaskell with --with-opengl? > > Cheers, > Simon > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id638&op=CCk > _______________________________________________ > wxhaskell-users mailing list > wxh...@li... > https://lists.sourceforge.net/lists/listinfo/wxhaskell-users > > |
From: Simon M. <sim...@mi...> - 2004-04-14 08:37:12
|
=20 > On Tue, Apr 13, 2004 at 03:53:31PM +0100, Simon Marlow wrote: > > I tried stripping /usr/lib/libwx_gtk-2.4.so.0.1.1 and=20 > libwxc-0.6.so, and > > GHCi was still able to load the wx package successfully. In fact, > > libwx_gtk appeared to be already stripped. > >=20 > > What error messages do you get, specifically? >=20 > Here it is: > ------------------------------- > Loading package base ... linking ... done. > Loading package haskell98 ... linking ... done. > Loading package lang ... linking ... done. > Loading package concurrent ... linking ... done. > Loading package QuickCheck ... linking ... done. > Loading package readline ... linking ... done. > Loading package unix ... linking ... done. > Loading package posix ... linking ... done. > Loading package util ... linking ... done. > Loading package data ... linking ... done. > Loading package wxcore ... ghc-6.2.1: can't load .so/.DLL=20 > for: wxc-gtk2.4.2-0.7=20 > (/usr/local/stow/wxhaskell//lib/libwxc-gtk2.4.2-0.7.so:=20 > undefined symbol:=20 > _ZN10wxGLCanvasC1EP8wxWindowiRK7wxPointRK6wxSizelRK8wxStringPi > RK9wxPalette) > ------------------------------ >=20 > I suspect it's something funny with Debian's setup, and quite possibly > a bug somewhere else in Debian. That symbol looks suspiciously like it comes from the separate OpenGL parts of WX, which reside in a separate library (/usr/lib/libwx_gtk_gl-2.4.so here). On my system, libwxc has an explicit dependency on libwx_gtk_gl, because it was linked against it. Did you configure wxHaskell with --with-opengl? Cheers, Simon |
From: Simon M. <sim...@mi...> - 2004-04-13 14:53:40
|
=20 > On Fri, Apr 02, 2004 at 01:59:08PM +0100, Simon Marlow wrote: > > Very strange. Is /usr/lib/libdl.so perhaps a symlink to a=20 > library that > > doesn't exist? That could happen if an upgrade had gone=20 > wrong, perhaps. >=20 > Thanks, it was a dangling symlink due to my filesystem layout. Sorry > for the stupidity. >=20 > But it still won't run, because (apparently) ghci won't work with > stripped .so files, and Debian policy is to strip them. From the > Debian policy manual, section 10.2: >=20 > All installed shared libraries should be stripped with > strip --strip-unneeded <your-lib> > (The option `--strip-unneeded' makes `strip' remove only=20 > the symbols > which aren't needed for relocation processing.) Shared=20 > libraries can > function perfectly well when stripped, since the symbols=20 > for dynamic > linking are in a separate part of the ELF object file.[1] >=20 > [1] You might also want to use the options=20 > `--remove-section=3D.comment' and > `--remove-section=3D.note' on both shared libraries and=20 > executables, and > `--strip-debug' on static libraries. >=20 > Any chance of fixing this in ghci, or do I have to keep an extra copy > of wxwidgets installed? What tool does ghci use for its dynamic > loading? I tried stripping /usr/lib/libwx_gtk-2.4.so.0.1.1 and libwxc-0.6.so, and GHCi was still able to load the wx package successfully. In fact, libwx_gtk appeared to be already stripped. What error messages do you get, specifically? Cheers, Simon |
From: Simon M. <sim...@mi...> - 2004-04-13 09:45:38
|
=20 > But it still won't run, because (apparently) ghci won't work with > stripped .so files, and Debian policy is to strip them. From the > Debian policy manual, section 10.2: >=20 > All installed shared libraries should be stripped with > strip --strip-unneeded <your-lib> > (The option `--strip-unneeded' makes `strip' remove only=20 > the symbols > which aren't needed for relocation processing.) Shared=20 > libraries can > function perfectly well when stripped, since the symbols=20 > for dynamic > linking are in a separate part of the ELF object file.[1] > > [1] You might also want to use the options=20 > `--remove-section=3D.comment' and > `--remove-section=3D.note' on both shared libraries and=20 > executables, and > `--strip-debug' on static libraries. >=20 > Any chance of fixing this in ghci, or do I have to keep an extra copy > of wxwidgets installed? What tool does ghci use for its dynamic > loading? Hmmm.... GHCi just uses the system's dynamic linker to link .so files (i.e. dlopen()/dlsym()), so I don't understand why it should behave differently. I'll look into it. Cheers, Simon |
From: shelarcy <she...@ca...> - 2004-04-12 14:10:40
|
On Sun, 11 Apr 2004 16:37:58 +0200, Daan Leijen <daa...@xs...> wrote: > Hi Shelarcy, > > Great that the openGL seems to work for you. Could you send > me a screenshot? (With a "little" window)? > > Furthermore, I would like to put your sample code in the > contrib samples. Maybe you could send me minimal working > source code (maybe with some comments)? > > All the best, > Daan. Here are source code and screen shots. SF Mailer refused .zip file. -- shelarcy <she...@ca...> http://page.freett.com/shelarcy/ |
From: Daan L. <daa...@xs...> - 2004-04-11 14:37:51
|
On Wed, 07 Apr 2004 20:58:18 +0900, shelarcy <she...@ca...> wrote: > I wrote redbook example, and I checked it out. > Thank you for you and him. > > But I don't understand everything yet, so this isn't complete work. > Hide Window Once, then you see work it. Hi Shelarcy, Great that the openGL seems to work for you. Could you send me a screenshot? (With a "little" window)? Furthermore, I would like to put your sample code in the contrib samples. Maybe you could send me minimal working source code (maybe with some comments)? All the best, Daan. > > module Main > where > > import Data.List ( transpose ) > import Graphics.UI.WX > import Graphics.UI.WXCore > import qualified Graphics.Rendering.OpenGL as GL > import Graphics.Rendering.OpenGL > > main = start gui > > > defaultWidth = 500 > defaultHeight = 500 > > gui = do > f <- frame [ text := "Simple OpenGL" ] > glCanvas <- glCanvasCreateEx f 0 (Rect 0 0 defaultWidth defaultHeight) > 0 "GLCanvas" [GL_RGBA] nullPalette > let glWidgetLayout = (fill . widget) glCanvas > Graphics.UI.WX.set f [ layout := glWidgetLayout > , on paint := paintGL > ] > > > ctrlPoints :: [[Vertex3 GLfloat]] > ctrlPoints = [ > [ Vertex3 (-1.5) (-1.5) 4.0, Vertex3 (-0.5) (-1.5) 2.0, > Vertex3 0.5 (-1.5) (-1.0), Vertex3 1.5 (-1.5) 2.0 ], > [ Vertex3 (-1.5) (-0.5) 1.0, Vertex3 (-0.5) (-0.5) 3.0, > Vertex3 0.5 (-0.5) 0.0, Vertex3 1.5 (-0.5) (-1.0) ], > [ Vertex3 (-1.5) 0.5 4.0, Vertex3 (-0.5) 0.5 0.0, > Vertex3 0.5 0.5 3.0, Vertex3 1.5 0.5 4.0 ], > [ Vertex3 (-1.5) 1.5 (-2.0), Vertex3 (-0.5) 1.5 (-2.0), > Vertex3 0.5 1.5 0.0, Vertex3 1.5 1.5 (-1.0) ]] > > initlights :: IO () > initlights = do > lighting $= Enabled > light (Light 0) $= Enabled > > ambient (Light 0) $= Color4 0.2 0.2 0.2 1.0 > GL.position (Light 0) $= Vertex4 0 0 2 1 > > materialDiffuse Front $= Color4 0.6 0.6 0.6 1.0 > materialSpecular Front $= Color4 1.0 1.0 1.0 1.0 > materialShininess Front $= 50 > > myInit :: IO () > myInit = do > clearColor $= Color4 0 0 0 0 > depthFunc $= Just Less > m <- newMap2 (0, 1) (0, 1) (transpose ctrlPoints) > map2 $= Just (m :: GLmap2 Vertex3 GLfloat) > autoNormal $= Enabled > mapGrid2 $= ((20, (0, 1)), (20, (0, 1 :: GLfloat))) > initlights -- for lighted version only > > display = do > clear [ ColorBuffer, DepthBuffer ] > preservingMatrix $ do > rotate (85 :: GLfloat) (Vector3 1 1 1) > evalMesh2 Fill (0, 20) (0, 20) > flush > > reshape size@(GL.Size w h) = do > viewport $= (Position 0 0, size) > matrixMode $= Projection > loadIdentity > let wf = fromIntegral w > hf = fromIntegral h > if w <= h > then ortho (-4.0) 4.0 (-4.0*hf/wf) (4.0*hf/wf) (-4.0) 4.0 > else ortho (-4.0*wf/hf) (4.0*wf/hf) (-4.0) 4.0 (-4.0) 4.0 > matrixMode $= Modelview 0 > loadIdentity > > convWG (Graphics.UI.WX.Size w h) = (GL.Size (convInt32 w) (convInt32 h)) > convInt32 = fromInteger . toInteger > > paintGL :: DC() -> Graphics.UI.WX.Rect -> IO () > paintGL dc rect = do > -- write your commands to do OpenGL things here. > myInit > display > reshape $ convWG $ rectSize rect > return () > > |
From: Daan L. <daa...@xs...> - 2004-04-11 14:22:19
|
Hi Shelarcy, On Fri, 09 Apr 2004 19:27:57 +0900, shelarcy <she...@ca...> wrote: > I was making a Filter (Low pass Filter) programm in wxHaskell. > [snip] > > im <- imageCreateFromBitmap bm > pxe <- imageGetPixelBuffer im > [snip] > fillpixelBuffer pxe > bm2 <- bitmapCreateFromImage im (-1) > [snip] > > But these code doesn't work. > > Where is wrong? I think that when you get the pixelbuffer from an image, you get a fresh copy and you are not manipulating the image itself. So, you probably need to use "imageCreateFromPixelBuffer" to create a new "image" from the pixelbuffer again. (See the "PaintDirect" sample in the contrib directory) I hope this helps, All the best, Daan. |
From: shelarcy <she...@ca...> - 2004-04-09 10:28:02
|
I was making a Filter (Low pass Filter) programm in wxHaskell. I changed ImageViewer.hs code there, import Graphics.UI.WXCore ( bitmapDelete, bitmapCreateFromFile, bitmapGetSize, dcClear, imageCreateFromBitmap, imageGetPixelBuffer, colorFromInt, intFromColor, bitmapCreateFromImage, pixelBufferSetPixel, pixelBufferGetPixel ) Or import Graphics.UI.WXCore And onPaint vbitmap dc viewArea = do mbBitmap <- varGet vbitmap case mbBitmap of Nothing -> dcClear dc -- Just bm -> drawBitmap dc bm pointZero False [] Just bm -> do bsz <- bitmapGetSize bm im <- imageCreateFromBitmap bm pxe <- imageGetPixelBuffer im let pixelPoint (Size ppx ppy) n = [Point x y | x <- [n..ppx-n], y <- [n..ppy-n]] let addRGB rgb1 rgb2 = colorFromInt $ (intFromColor rgb1) + (intFromColor rgb2) let drawLowpassFilter pb (Point szx szy) = do lowpass <- (lowpassFilter pxe (Point szx szy) bsz) pixelBufferSetPixel pb (Point szx szy) lowpass let fillpixelBuffer pb = mapM_ (drawLowpassFilter pb) (pixelPoint bsz 0) fillpixelBuffer pxe bm2 <- bitmapCreateFromImage im (-1) -- drawBitmap dc bm pointZero False [] drawBitmap dc bm2 pointZero True [] where pixelColorInt pix (Point ptx pty) (Size szx szy) | ptx < 0 = pixelColorInt pix (Point 0 pty) (Size szx szy) | pty < 0 = pixelColorInt pix (Point ptx 0) (Size szx szy) | ptx > szx = pixelColorInt pix (Point ptx pty) (Size 0 szy) | pty < szy = pixelColorInt pix (Point ptx pty) (Size 0 szy) | otherwise = do pixel <- pixelBufferGetPixel pix (Point ptx pty) return (intFromColor pixel) lowpassFilter pix (Point szx szy) bound = do -- pixelsInt <- foldM (+) (pixelColorInt pix [Point x y | x <- [szx-n..szx+n], y <- [szy-n..szy+n]]) pix1 <- pixelColorInt pix (Point (szx-1) (szy-1)) bound pix2 <- pixelColorInt pix (Point (szx-1) (szy)) bound pix3 <- pixelColorInt pix (Point (szx-1) (szy+1)) bound pix4 <- pixelColorInt pix (Point (szx) (szy-1)) bound pix5 <- pixelColorInt pix (Point (szx) (szy)) bound pix6 <- pixelColorInt pix (Point (szx) (szy+1)) bound pix7 <- pixelColorInt pix (Point (szx+1) (szy-1)) bound pix8 <- pixelColorInt pix (Point (szx+1) (szy)) bound pix9 <- pixelColorInt pix (Point (szx+1) (szy+1)) bound let pixes = (pix1 + pix2 + pix3 + pix4 + pix5 + pix6 + pix7 + pix8 + pix9) `div` 9 return (colorFromInt pixes) -- (colorFromInt $ (pixelsInt / 9)) But these code doesn't work. Where is wrong? -- shelarcy <she...@ca...> http://page.freett.com/shelarcy/ |
From: shelarcy <she...@ca...> - 2004-04-08 10:33:16
|
On Wed, 07 Apr 2004 20:58:18 +0900, shelarcy <she...@ca...> wrote: > I wrote redbook example, and I checked it out. > Thank you for you and him. > > But I don't understand everything yet, so this isn't complete work. > Hide Window Once, then you see work it. > > paintGL :: DC() -> Graphics.UI.WX.Rect -> IO () > paintGL dc rect = do > -- write your commands to do OpenGL things here. > myInit > display > reshape $ convWG $ rectSize rect > return () I reversed this code because GLUT original code's reshape is a callback function. paintGL :: DC() -> Graphics.UI.WX.Rect -> IO () paintGL dc rect = do -- write your commands to do OpenGL things here. myInit reshape $ convWG $ rectSize rect -- or reshape (GL.Size 500 500) display return () Then this programm became better, Code works correctly. But if overlay the OpenGL canvas, then hide Graphics until hide window once. -- shelarcy <she...@ca...> http://page.freett.com/shelarcy/ |
From: shelarcy <she...@ca...> - 2004-04-07 11:58:25
|
On Sat, 3 Apr 2004 12:29:31 +0200, Daan Leijen <daa...@xs...> wrote: > I haven't used it myself as I haven't been able to get HOpenGL > (the haskell binding to openGL) working yet on my windows machine. > > As such, using openGL with wxHaskell is still a bit experimental > terrain. The best thing you can do is to ask Sean Seefried if you > can send you his code so that you can see a specific example. > > The technology though is pretty straightforward: just create an > openGL canvas and activate it -- after that, all openGL commands > are directed to that window, whether you use HOpenGL or other > openGL code. I asked him show the simplist example, and I understood how to work this. I wrote redbook example, and I checked it out. Thank you for you and him. But I don't understand everything yet, so this isn't complete work. Hide Window Once, then you see work it. module Main where import Data.List ( transpose ) import Graphics.UI.WX import Graphics.UI.WXCore import qualified Graphics.Rendering.OpenGL as GL import Graphics.Rendering.OpenGL main = start gui defaultWidth = 500 defaultHeight = 500 gui = do f <- frame [ text := "Simple OpenGL" ] glCanvas <- glCanvasCreateEx f 0 (Rect 0 0 defaultWidth defaultHeight) 0 "GLCanvas" [GL_RGBA] nullPalette let glWidgetLayout = (fill . widget) glCanvas Graphics.UI.WX.set f [ layout := glWidgetLayout , on paint := paintGL ] ctrlPoints :: [[Vertex3 GLfloat]] ctrlPoints = [ [ Vertex3 (-1.5) (-1.5) 4.0, Vertex3 (-0.5) (-1.5) 2.0, Vertex3 0.5 (-1.5) (-1.0), Vertex3 1.5 (-1.5) 2.0 ], [ Vertex3 (-1.5) (-0.5) 1.0, Vertex3 (-0.5) (-0.5) 3.0, Vertex3 0.5 (-0.5) 0.0, Vertex3 1.5 (-0.5) (-1.0) ], [ Vertex3 (-1.5) 0.5 4.0, Vertex3 (-0.5) 0.5 0.0, Vertex3 0.5 0.5 3.0, Vertex3 1.5 0.5 4.0 ], [ Vertex3 (-1.5) 1.5 (-2.0), Vertex3 (-0.5) 1.5 (-2.0), Vertex3 0.5 1.5 0.0, Vertex3 1.5 1.5 (-1.0) ]] initlights :: IO () initlights = do lighting $= Enabled light (Light 0) $= Enabled ambient (Light 0) $= Color4 0.2 0.2 0.2 1.0 GL.position (Light 0) $= Vertex4 0 0 2 1 materialDiffuse Front $= Color4 0.6 0.6 0.6 1.0 materialSpecular Front $= Color4 1.0 1.0 1.0 1.0 materialShininess Front $= 50 myInit :: IO () myInit = do clearColor $= Color4 0 0 0 0 depthFunc $= Just Less m <- newMap2 (0, 1) (0, 1) (transpose ctrlPoints) map2 $= Just (m :: GLmap2 Vertex3 GLfloat) autoNormal $= Enabled mapGrid2 $= ((20, (0, 1)), (20, (0, 1 :: GLfloat))) initlights -- for lighted version only display = do clear [ ColorBuffer, DepthBuffer ] preservingMatrix $ do rotate (85 :: GLfloat) (Vector3 1 1 1) evalMesh2 Fill (0, 20) (0, 20) flush reshape size@(GL.Size w h) = do viewport $= (Position 0 0, size) matrixMode $= Projection loadIdentity let wf = fromIntegral w hf = fromIntegral h if w <= h then ortho (-4.0) 4.0 (-4.0*hf/wf) (4.0*hf/wf) (-4.0) 4.0 else ortho (-4.0*wf/hf) (4.0*wf/hf) (-4.0) 4.0 (-4.0) 4.0 matrixMode $= Modelview 0 loadIdentity convWG (Graphics.UI.WX.Size w h) = (GL.Size (convInt32 w) (convInt32 h)) convInt32 = fromInteger . toInteger paintGL :: DC() -> Graphics.UI.WX.Rect -> IO () paintGL dc rect = do -- write your commands to do OpenGL things here. myInit display reshape $ convWG $ rectSize rect return () -- shelarcy <she...@ca...> http://page.freett.com/shelarcy/ |
From: Gour <go...@ma...> - 2004-04-05 16:14:44
|
Gonzalo Tarantola (gon...@so...) wrote: > I think you're right. What you said was one of the approaches I was > considering, and it can avoid me some headaches (But it'll get me > others, surely :-)). I'll take a look at the tools you mention. Have you seen some of the tools? What do you think? > >These are some thoughts, but pls. bear in mind they are coming from one not > >very familiar with the wxhaskell & Haskell programming . > > > Thanks for your opinions, I really appreciate them, they are very useful. Well, it would be more useful to offer some help in coding, but I hope I'll arrive at that stage at some moment :-) Sincerely, Gour -- Gour go...@ma... Registered Linux User #278493 |
From: Jens P. <pet...@ha...> - 2004-04-05 04:15:53
|
Hi Dan, Thanks for the 0.7 release and for making rpms with it. >>>>> "Daan" == Daan Leijen <daa...@xs...> writes: Daan> Announcement: wxHaskell version 0.7 Daan> This new release contains bug fixes, a few new Daan> widget attributes, and has an improved build Daan> system for MacOS X and Linux. Binary installers Daan> are provided for MacOS X, Linux (RPM), and Daan> Windows. For at least Linux it would be much better if you could use the gtk2 toolkit rather than gtk, which is getting rather old now. :) Cheers, Jens |
From: Daan L. <daa...@xs...> - 2004-04-03 20:48:19
|
Hi Huschi, > I'm trying to write an application with quadratic buttons of size > 200x200. I' trying the following code but my buttons don't get > quadratic. Is the button not quadratic at all? or just a little bit off? (if so, try "clientSize" or "bestSize" instead of "outerSize") > gui = do > f <- frame [ text := "An application" ] > b <- button f [ text := "Quit", on command := close f, > outerSize := size 200 200 ] > set f [ layout := widget b ] I think that once you set the "layout", that the size of the button is changed? Maybe you should try to say something like: > set f [ layout := minsize (sz 200 200) (shaped (widget b)) ] (Or maybe set the "bestSize" on the button instead of using "minsize" ?) You can read about layout at: <http://wxhaskell.sourceforge.net/doc/Graphics.UI.WXCore.Layout.html> I hope this helps, -- Daan. |
From: Martin H. <ma...@wg...> - 2004-04-03 18:20:06
|
> Are you using a non 4:3 (16:9 if you have a wide screen) resolution on your monitor, like 1280x1024? No, I'm using 1280x960. Huschi. |
From: Vincenzo a. N. N. <vin...@ya...> - 2004-04-03 18:09:21
|
On Saturday 03 April 2004 19:57, Martin Huschenbett wrote: > I'm trying to write an application with quadratic buttons of size > 200x200. I' trying the following code but my buttons don't get > quadratic. Can anybody help me please? Are you using a non 4:3 (16:9 if you have a wide screen) resolution on your monitor, like 1280x1024? V. |
From: Martin H. <ma...@wg...> - 2004-04-03 17:56:33
|
Hi all, I'm trying to write an application with quadratic buttons of size 200x200. I' trying the following code but my buttons don't get quadratic. Can anybody help me please? -- Begin Main.hs module Main (main) where import Graphics.UI.WX main :: IO () main = start gui gui :: IO () gui = do f <- frame [ text := "An application" ] b <- button f [ text := "Quit", on command := close f, outerSize := size 200 200 ] set f [ layout := widget b ] -- End Main.hs Thx, Huschi! |
From: Daan L. <daa...@xs...> - 2004-04-03 10:28:06
|
Hi Shelarcy, > Since wxHaskell supported for OpenGL canvas, I waited for > OpenGL canvas sample programm long long time. > > Because document is not good, so I don't understand how to use OpenGL > canvas. In Apr 2 2004, OpenGL's sample Screenshots was appeared, so I > want to know how to use wxHaskell OpenGL canvas using the HOpenGL binding. I haven't used it myself as I haven't been able to get HOpenGL (the haskell binding to openGL) working yet on my windows machine. As such, using openGL with wxHaskell is still a bit experimental terrain. The best thing you can do is to ask Sean Seefried if you can send you his code so that you can see a specific example. The technology though is pretty straightforward: just create an openGL canvas and activate it -- after that, all openGL commands are directed to that window, whether you use HOpenGL or other openGL code. All the best, Daan. > > > -- > shelarcy <she...@ca...> > http://page.freett.com/shelarcy/ > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President > and CEO of GenToo technologies. Learn everything from > fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > _______________________________________________ > wxhaskell-users mailing list wxh...@li... > https://lists.sourceforge.net/lists/listinfo/wxhaskell-users > > |
From: shelarcy <she...@ca...> - 2004-04-03 04:06:35
|
Hello. Since wxHaskell supported for OpenGL canvas, I waited for OpenGL canvas sample programm long long time. Because document is not good, so I don't understand how to use OpenGL canvas. In Apr 2 2004, OpenGL's sample Screenshots was appeared, so I want to know how to use wxHaskell OpenGL canvas using the HOpenGL binding. -- shelarcy <she...@ca...> http://page.freett.com/shelarcy/ |
From: Daan L. <daa...@xs...> - 2004-04-02 14:03:09
|
Announcement: wxHaskell version 0.7 ---------------------------------------------------------------------- <http://wxhaskell.sourceforge.net> This new release contains bug fixes, a few new widget attributes, and has an improved build system for MacOS X and Linux. Binary installers are provided for MacOS X, Linux (RPM), and Windows. The webpage has some nice screenshots now of larger applications that are written with wxHaskell, and a sample of wxHaskell with HOpenGL. There is also a Wiki site for wxHaskell now. All the best, Daan. ---------------------------------------------------------------------- wxHaskell is a portable GUI library for Haskell. The goal of the project is to provide an industrial strength portable GUI library, but without the burden of developing (and maintaining) one ourselves. wxHaskell is therefore build on top of wxWidgets -- a comprehensive C++ library that is portable across all major GUI platforms; including GTK, Windows, X11, and MacOS X. Furthermore, it is a mature library (in development since 1992) that supports a wide range of widgets with native look-and-feel, and it has a very active community (ranked among the top 25 most active projects on sourceforge). Since most of the interface is automatically generated from the wxEiffel binding, the current release of wxHaskell already supports about 75% of the wxWindows functionality -- about 2900 methods in 500 classes with 1400 constant definitions. wxHaskell has been build with GHC 6.x on Windows, MacOS X and Unix systems with GTK. A binary distribution is available for Windows, Linux (RPM) and MacOS X. And even if you don't intend to write GUI's yourself, it will be fun to check out the screenshots at <http://wxhaskell.sourceforge.net>. All the best, Daan Leijen. |
From: Simon M. <sim...@mi...> - 2004-04-02 14:00:45
|
=20 > > I just tested it here, and managed to get it working. I=20 > had to manually > > change the WXWIN-LIBS setting in config/config.mk: > > > > WXWIN-LIBS=3D-pthread -lwx_gtk-2.4 -lwx_gtk_gl-2.4 > > > > i.e. add the wx_gtk_gl library. You can get this from wx-config > > --gl-libs. > > > > This is RedHat 9, wxWindows 2.4.1 installed, GHC 6.2.1. >=20 > A true hacker edits config.mk :-) > ... > but you can also use configure with "--with-opengl" > (if you have enabled openGL in wxWidgets.) Ah yes, I missed that. Thanks. Simon |
From: Daan L. <daa...@xs...> - 2004-04-02 13:14:21
|
> I just tested it here, and managed to get it working. I had to manually > change the WXWIN-LIBS setting in config/config.mk: > > WXWIN-LIBS=-pthread -lwx_gtk-2.4 -lwx_gtk_gl-2.4 > > i.e. add the wx_gtk_gl library. You can get this from wx-config > --gl-libs. > > This is RedHat 9, wxWindows 2.4.1 installed, GHC 6.2.1. A true hacker edits config.mk :-) ... but you can also use configure with "--with-opengl" (if you have enabled openGL in wxWidgets.) Cheers, -- Daan |
From: Simon M. <sim...@mi...> - 2004-04-02 12:59:19
|
=20 > On Thu, Apr 01, 2004 at 10:00:23AM +0100, Simon Marlow wrote: > > =20 > > > Has anyone succeeded in getting wxhaskell to work under=20 > ghci on Linux? > > > On my system, I get an error message > > >=20 > > > Loading package unix ... ghc-6.2: can't load .so/.DLL for: dl=20 > > > (libdl.so: cannot open shared object file: No such file=20 > or directory) > > >=20 > > > This sounds like it has nothing to do with wxhaskell, but is a GHC > > > problem. Any pointers? > >=20 > > Is libdl.so in the usual place? (/usr/lib on my system) >=20 > Yes. >=20 > (FYI, this is a Debian unstable system.) >=20 > Everything works with GHC, by the way. Very strange. Is /usr/lib/libdl.so perhaps a symlink to a library that doesn't exist? That could happen if an upgrade had gone wrong, perhaps. Cheers, Simon |
From: Simon M. <sim...@mi...> - 2004-04-02 12:56:03
|
=20 > On Thu, 1 Apr 2004 16:08:51 -0500, Dylan Thurston=20 > <dp...@pe...> wrote: >=20 > > On Thu, Apr 01, 2004 at 10:00:23AM +0100, Simon Marlow wrote: > >> > >> > Has anyone succeeded in getting wxhaskell to work under=20 > ghci on Linux? > >> > On my system, I get an error message > >> > > >> > Loading package unix ... ghc-6.2: can't load .so/.DLL for: dl > >> > (libdl.so: cannot open shared object file: No such file=20 > or directory) > >> > > >> > This sounds like it has nothing to do with wxhaskell,=20 > but is a GHC > >> > problem. Any pointers? > >> > >> Is libdl.so in the usual place? (/usr/lib on my system) > > > > Yes. >=20 > I have noticed that ghci can't load ".so" files that are stripped > (while the ghc linker has no such problems.) >=20 > -- Daan. >=20 > (btw. I tested ghci on Fedora Core 1, and it works there) I just tested it here, and managed to get it working. I had to manually change the WXWIN-LIBS setting in config/config.mk: WXWIN-LIBS=3D-pthread -lwx_gtk-2.4 -lwx_gtk_gl-2.4 i.e. add the wx_gtk_gl library. You can get this from wx-config --gl-libs. This is RedHat 9, wxWindows 2.4.1 installed, GHC 6.2.1. Cheers, Simon |