|
Post by vovchik on Jun 1, 2020 23:44:54 GMT 1
Dear Alex,
OMG! I hope Joe and Rik chime it. They are using radio on PI. Sorry, but they all work fine on my Pi4.
With kind regards, vovchik
|
|
|
Post by bigbass on Jun 2, 2020 2:09:04 GMT 1
Hello Alex and vovchik
I just tested the RPI version of the radios all is fine they all compile and run correctly
I suspect you are missing some support files if you already built from fossil then these should get things going
sudo apt-get install libxmu-dev
sudo apt-get install xfonts-100dpi xfonts-75dpi
Joe
|
|
|
Post by alexfish on Jun 2, 2020 8:10:39 GMT 1
hi Joe Installed fonts OK assuming there must be a other version out there. problem here is I downloaded xaw radio again from basic-converter.org/radio-xaw.bacand now get this. can remember doing some bits RE terminal sixel. and tried updating some bits>> think there where not indicative To RPI , so now trying to clean GTK3 I am assuming Peter is using GTK3 , he is bemoaning gtkGL , well it will not be to long be for that goes to Vulcan .. for me gtk3/4 is a Dead DuckBR Alex
|
|
|
Post by alexfish on Jun 2, 2020 11:22:52 GMT 1
Hi All
Reinstalled GTK3
Still no smoke , Peter's and Vovchik's versions not compiling, Err messages are the same
think here Possible 'Version 'is the bit I be looking at as in number
Mine is
3.14.5-1+deb8u1rpi1rpi1g
BR Alex
|
|
|
Post by alexfish on Jun 2, 2020 11:48:33 GMT 1
Back to original demo xaw Joes version works on PI OPTION GUI TRUE PRAGMA GUI
PRAGMA LDFLAGS Xaw3d PRAGMA LDFLAGS Xmu
id = GUIDEFINE( "{ type=window name=window resources=\"*text.AsciiSink.foreground:blue\",\"*text.AsciiSink.font:lucidasans-italic-18\" XtNtitle=\"This is a BaCon app\" XtNwidth=500 XtNheight=300 } \ { type=formWidgetClass name=form parent=window } \ { type=menuButtonWidgetClass name=menuButton parent=form XtNwidth=70 XtNlabel=\"File\" XtNshapeStyle=XmuShapeRoundedRectangle XtNleft=XawChainLeft XtNright=XawChainLeft XtNtop=XawChainTop XtNbottom=XawChainTop } \ { type=simpleMenuWidgetClass name=menu parent=menuButton } \ { type=smeBSBObjectClass name=item1 parent=menu callback=XtNcallback XtNlabel=\"Open\" } \ { type=smeBSBObjectClass name=item2 parent=menu callback=XtNcallback XtNlabel=\"Close\" } \ { type=smeLineObjectClass name=line1 parent=menu } \ { type=smeBSBObjectClass name=item3 parent=menu callback=XtNcallback XtNlabel=\"Exit\" } \ { type=asciiTextWidgetClass name=text parent=form XtNfromVert=menuButton XtNeditType=XawtextEdit XtNwidth=500 XtNheight=200 XtNscrollVertical=XawtextScrollWhenNeeded XtNwrap=XawtextWrapWord XtNleft=XawChainLeft XtNright=XawChainRight XtNtop=XawChainTop XtNbottom=XawChainBottom } \ { type=commandWidgetClass name=button parent=form callback=XtNcallback XtNfromVert=text XtNfromHoriz=NULL XtNwidth=120 XtNheight=40 XtNlabel=\"Click me\" XtNleft=XawChainLeft XtNright=XawChainLeft XtNtop=XawChainBottom XtNbottom=XawChainBottom } \ { type=commandWidgetClass name=exit_b parent=form callback=XtNcallback XtNfromVert=text XtNfromHoriz=button XtNhorizDistance=260 XtNwidth=120 XtNheight=40 XtNlabel=\"Exit\" XtNleft=XawChainRight XtNright=XawChainRight XtNtop=XawChainBottom XtNbottom=XawChainBottom } " )
LOCAL txt$
CALL GUISET(id, "text", XtVaTypedArg, XtNbackground, XtRString, "yellow", 7) CALL GUISET(id, "text", XtNstring, "Hello world")
CALL GUISET(id, "button", XtVaTypedArg, XtNbackground, XtRString, "green", 6) CALL GUISET(id, "button", XtVaTypedArg, XtNforeground, XtRString, "yellow", 7)
WHILE TRUE event$ = GUIEVENT$(id) SELECT event$ CASE "button" CALL GUIGET(id, "text", XtNstring, &txt$) PRINT "Did you type: '", txt$, "'?" CASE "item1" PRINT "Open a file!" CASE "item2" PRINT "Close a file!" CASE "exit_b", "item3" END ENDSELECT WEND
Now looking further at the header bits BR Alex And OOps , exiting the gui and My 'Desktop' has Vanished again, now need to switch the pi off and reboot .
|
|
|
Post by alexfish on Jun 2, 2020 12:17:42 GMT 1
though it may have been launching the app through xterm
that is not the case,
try again launch
the Mouse cursor freezes for about 3 seconds , the Desktop starts to flicker , then the gui start to shows
then the Desktop vanishes.. Wow.
BR Alex
|
|
|
Post by Pjot on Jun 2, 2020 17:07:15 GMT 1
Peter's and Vovchik's versions not compiling Hi Alex, We already know that Debian based distributions (Mint, RPI) use a very old version of the Xaw3d library (see my post here), so you have to delete the following line from the radio-xaw.bac program, at the top: PRAGMA GUI Xaw3d
If you delete this line then the radio program will compile for Xaw only. This also will take care of the 'XmuWidgetNode' error. It really should work on your system because Xaw is part of X11 and maintained on every server using X11. For the other problems, the GTK version uses functions available in GTK 3.22 (like gtk_menu_popup_at_pointer) so please make sure your system his this version or newer. HTH Peter
|
|
|
Post by Pjot on Jun 2, 2020 19:07:18 GMT 1
Gents, For fun, I have ported my OpenGL fractal program to the new set of GUI commands. I am using the GtkDrawingArea widget together with the Cairo API to create my picture. What I like about this program is how few lines of code we need to setup a GUI, so we can focus on the important part (drawing the fractal) BR Peter
OPTION GUI TRUE PRAGMA GUI gtk3
' Some fractal related values CONST XSize = 400 CONST YSize = 400 CONST MaxIters = 60 CONST Left = -2.0 CONST Right = 0.5 CONST Top = 1.0 CONST Bottom = -1.0
id = GUIDEFINE(" \ { type=WINDOW name=window callback=delete-event title=\"DrawingArea demo\" } \ { type=BOX name=box parent=window orientation=GTK_ORIENTATION_VERTICAL } \ { type=DRAWING_AREA name=drawing parent=box callback=draw,draw width-request=XSize height-request=YSize } \ { type=BUTTON_BOX name=bbox parent=box layout-style=GTK_BUTTONBOX_END } \ { type=BUTTON name=button parent=bbox callback=clicked label=\"Exit\" }")
WHILE TRUE event$ = GUIEVENT$(id) SELECT event$ CASE "window" BREAK CASE "button" BREAK CASE "draw" CALL Draw ENDSELECT WEND
SUB Draw
LOCAL context TYPE GdkDrawingContext* LOCAL cr TYPE cairo_t* LOCAL gdk TYPE GdkWindow* LOCAL x, y, count, idx LOCAL zr, zi, crr, ci, rsquared, isquared TYPE FLOATING
CALL GUIGET(id, "drawing", "window", &gdk)
' Setup drawing context context = gdk_window_begin_draw_frame(gdk, gdk_window_get_clip_region(gdk))
' Get cairo context cr = gdk_drawing_context_get_cairo_context(context)
' Fractal calculation FOR y = 0 TO YSize FOR x = 0 TO XSize zr = 0.0 : zi = 0.0 crr = Left + x * (Right - Left) / XSize ci = Top + y * (Bottom - Top) / YSize rsquared = zr * zr isquared = zi * zi FOR count = 0 TO MaxIters zi = zr * zi * 2 zi = zi + ci zr = rsquared - isquared zr = zr + crr rsquared = zr * zr isquared = zi * zi NEXT IF rsquared + isquared <= 4.0 THEN idx = INT((rsquared + isquared)*4) CALL cairo_set_source_rgb(cr, MOD(idx*32, 256)/256.0, MOD(idx*64, 256)/256.0, MOD(idx*96, 256)/256.0) CALL cairo_rectangle(cr, x, y, 1, 1) CALL cairo_fill(cr) END IF NEXT NEXT
' Finish drawing CALL gdk_window_end_draw_frame(gdk, context)
ENDSUB
Attachments:
|
|
|
Post by vovchik on Jun 2, 2020 21:00:30 GMT 1
Dear Peter,
Great work! Works fine on My Mint and Pi4. For Pi4, I added:
PRAGMA OPTIONS -Wno-deprecated-declarations PRAGMA OPTIONS -Wno-write-strings -Wno-deprecated
Wih kind regards, vovchik
|
|
|
Post by alexfish on Jun 2, 2020 21:00:53 GMT 1
Hi Peter
got the gui up ,Desk top OK, but now back to the fonts issue
Warning: Missing charsets in String to FontSet conversion
they are on rpi. but any idea where the need to be for Xaw
I am going to opt out of the GTK3 bits.
BR Alex
|
|
|
Post by bigbass on Jun 2, 2020 22:07:35 GMT 1
Hello Alex most of the problems with fonts were solved here basic-converter.proboards.com/post/12962/threadand I tested on the RPI3 to be working except for a few that needed some pragma changes that are in that same thread (and the reasons why) from Peter Apr 23, 2020 at 6:37am down walk through the demos starting there and they should work I had the same problemsJoe
|
|
|
Post by bigbass on Jun 3, 2020 4:26:32 GMT 1
Hello Peter working on the RPI3 as is with no changes! this shows that the RPI can handle the drawing the cpu jumped up to 28% max about 2 seconds then settled down quickly that's pretty good even when running on a credit card sized computer Joe
|
|
|
Post by alexfish on Jun 3, 2020 14:51:34 GMT 1
Hi All No smoking cigar as yet Re Xaw , the text widget works but label and buttons prove a problem + the DE keeps Vanishing , looks like it be a Conflict there. thinks first step will be to resolve this first. however :: browsing xaw raspberry pi revealed xaw-madness rpi on Reddit, [reddit url="https://www.reddit.com/r/unixporn/comments/fl8ngz/vtwm_xaw_madness_on_rapsberry_pi3/"] so looking further BR Alex
|
|
|
Post by bigbass on Jun 3, 2020 15:36:39 GMT 1
Hello Alex since I am using the RPI3 also and tried all of the demos posted this is an investigation of what was installed
you still may be missing support files (dependencies)
here they are listed when they were installed and the version numbers make sure you at least installed these
Note:We are using different versions and have different packages already installed but this should still be a better guide of what packages were needed
gtk3 is another monster but that is working well (casting on 32 bit has always been a problem but it has gotten much better over the years) And Peter has improved the bacon code for us when we report the errors
Joe
2020-04-23 xfonts-75dpi 1:1.0.4+nmu1 2020-04-23 xfonts-base 1:1.0.5
2020-04-22 libmotif-dev 2.3.8-2 2020-04-22 uil 2.3.8-2 2020-04-22 libuil4 2.3.8-2 2020-04-22 libmrm4 2.3.8-2 2020-04-22 libxm4 2.3.8-2 2020-04-22 libmotif-common 2.3.8-2 2020-04-19 libxaw3dxft8-dev 1.6.2e-2 2020-04-19 libxaw3dxft8 1.6.2e-2
2020-04-18 xaw3dg-dev 1.5+E-18.3 2020-04-18 xutils-dev 1:7.7+5 2020-04-18 xaw3dg 1.5+E-18.3 2020-04-18 libxaw7-dev 2:1.0.13-1+b2 2020-04-18 libxpm-dev 1:3.5.12-1 2020-04-18 libxaw-doc 2:1.0.13-1 2020-04-18 libxmu-dev 2:1.1.2-2+b3 2020-04-18 libxmuu-dev 2:1.1.2-2+b3 2020-04-18 libxmu-headers 2:1.1.2-2
|
|
|
Post by alexfish on Jun 3, 2020 22:05:49 GMT 1
Hi Joe have got as far as getting dict to work, radio not sure of as yet , since the DE disappeared again and did a reboot / switch off pi prior to that only just notice something of xauth and x files needed updating:: did that ? anyway the DE disappeared on the Dict ::: So now sure that this be a RPI3 os issue . I say as in 'I think' time for time out .. and some deep thinking BR Alex
|
|