|
Post by alexfish on May 8, 2023 22:36:02 GMT 1
final picky also did a stats for nerds on big buck bunny 64k: here keep other browsers out of the way , this meant Chromium on normal view dropped frames = 6.5% Next : post ? Attachments:
|
|
|
Post by alexfish on May 9, 2023 9:19:22 GMT 1
Code Short & Sweet win = WINDOW("HUG WEBKIT", 1280, 700) gtk_window_set_icon(win,buf) g_object_unref(buf)
NoteBook =NOTEBOOK("YouTube",1280,700) ATTACH(win,NoteBook,0,0)
page0 = PAGE(NoteBook,"Youtube") youtube = WEBVIEW(1280,670) SETURI(youtube,"https://www.youtube.com/watch?v=k9ynZnEBtvw") PAGESET(page0,youtube,0,0)
page1 = PAGE(NoteBook,"Amazon uk") amazon = WEBVIEW(1280,670) SETURI(amazon,"https://www.amazon.co.uk") PAGESET(page1,amazon,0,0)
'============================== page2 = PAGE(NoteBook,"Wiki") wiki = WEBVIEW(1280,670) SETURI(wiki,"https://www.wikipedia.org") PAGESET(page2,wiki,0,0) SETPAGE(NoteBook,0)
'============================== DISPLAY '==============================
Back Soon BR Alex Bacon Docs page3 = PAGE(NoteBook,"Bacon Docs") bacon = WEBVIEW(1280,670) SETURI(bacon,"file:///" & HOME$ & "/.bacon/doc_frame.html") PAGESET(page3,bacon,0,0) SETPAGE(NoteBook,0) Final Picky Attachments:
|
|
|
Post by alexfish on May 9, 2023 12:11:23 GMT 1
Q: libsoup = Proto compile pkgconfigs A: True, but can use EXEC$ as Posted Also Been looking at under used function Socket & Plug Q: What do you mean looking A:I expect you to look as well Also Possible To make a BaConSoup.so & test Q: Where A: HEREQ: Does it work in HUG3 Attachments:
|
|
|
Post by alexfish on May 9, 2023 12:41:17 GMT 1
SO SO : foo.so Attachments:
|
|
|
Post by alexfish on May 9, 2023 12:49:06 GMT 1
And SO to
The End of IMAGER and Beyond
Updates to the IMAGER hug3 *ver will be Posted at #1
Can still Post Your Findings or Bugs Beyond
HERE
Have Fun + BR Alex
|
|
|
Post by alexfish on May 12, 2023 19:07:40 GMT 1
Released
HUG352 hug3.5.2
First Post
Have Fun + BR Alex
|
|
|
Post by alexfish on May 22, 2023 0:32:32 GMT 1
BUGS BUGS Hi All Have fixed the opengl(GLAREA) , the api needed a complete overhaul this code applies the CANVAS GLAREA + add WIDGET GLAREA have added glViewport to the IMPORTS 2d mode: althought can't see the yellow circle receeding into the background but it does second picky is Peters Fractal and the difference is chalk and cheese BR Alex Progress:: have code clean the lib and will be released in about 2-days hug3.5.3 test code 'test gl.bac INCLUDE hug353.bac HUGOPTIONS("NOSCALING") HUGOPTIONS("CANVAS GLAREA")
INCLUDE gl.bac
DECLARE ptr
'============================================================================ SUB mydraw(hug_wiget,hug_gl) LOCAL glarea glarea = hug_widget_focus(STR$(hug_gl)) PRINT "here" glClear (GL_COLOR_BUFFER_BIT) LOCAL w_th,H_t w_th = WINDOW_GET_SIZE(win,0) PRINT "win width " ,w_th
INCR ptr, 10 SQUARE("#00FF00",0,0,400,400,1) CIRCLE("#FF0000",20,20,100,100,1) OUT("HUG GL CANVAS","#FF0000","#FFFFFF",120,10) LINE("#000000",0,0,300,300) PIXEL("#000000",300,50) PIXEL("#000000",300,51) PIXEL("#000000",301,51) PIXEL("#000000",301,50)
LOCAL angle,x,y TYPE double
gtk_gl_area_make_current(glarea) glClear (GL_COLOR_BUFFER_BIT) glMatrixMode(GL_PROJECTION) glLoadIdentity glViewport(ptr,300-ptr,100,100) glOrtho(0, ptr+200,ptr+200, 0, 0, 1) 'glOrtho(0, 200,200, 0, 0, 1) glMatrixMode(GL_MODELVIEW) glLoadIdentity 'glTranslatef(0.375, 0.375, 0) glColor3ub(255, 255, 0) glBegin(GL_POLYGON) FOR i = 1 TO 360 angle = 2 * PI * i / 360 x = (100/2)*COS(angle) y = (100/2)*SIN(angle) glVertex2i((100/2)+x,(100/2)+y) NEXT glEnd gtk_widget_queue_draw(glarea ) END SUB '============================================================================
SUB pop OUT("GLAREA CLICKED","#FF0000","#FFFFFF",120,30) END SUB '============================================================================ SUB motion OUT("GLAREA Ready Click Start","#FF0000","#FFFFFF",120,70) END SUB
'============================================================================ DEF FN GCONNECT = g_signal_connect_data
win = WINDOW("GL dem " ,400,400)
can = CANVAS(400,400)
ATTACH(win,can,0,30) can2 = GLAREA(400,400) ATTACH(win,can2,0,30) GCONNECT(can2, "button-press-event", pop, 10,0,0) GCONNECT(can2, "motion-notify-event", motion, 20,0,0) but = BUTTON("START",400,25) ATTACH(win,but,0,0) CALLBACKX(but,mydraw,can2) mydraw(1,can2) DISPLAY Attachments:
|
|
|
Post by alexfish on May 23, 2023 16:08:02 GMT 1
THE http soupget.bac for downloading is HERETHE youtube.bac :youtube Parser is HEREBR Alex
|
|
|
Post by alexfish on May 28, 2023 16:15:04 GMT 1
Lib 3.5.3 is complete GTK3 ::OPENGL AREA MARK has been updated to have a callback if href link present Update will Monday 28th May example of updated MARK ::CALLBACK FUNCTION & 'GETLINK INCLUDE "hug353.bac"
' GETLINK$ retrieve all text from label including href SUB test_label(NUMBER widget) LOCAL txt$ txt$ =GETLINK$(widget)
PRINT "label called" PRINT txt$
END SUB
win = WINDOW( "Link",300,200)
link1 = MARK("This label has a link to <a href='http://www.basic-converter.org/'> <span foreground='blue'>BaCon</span></a>",-1,-1)
ATTACH(win,link1,5,5) GLINK(link1, test_label) DISPLAY Demo for OPEN GL test will be done in tips & tricks for GTK3.5.3 and hug.bac 3D preview example INCLUDE hug353.bac HUGOPTIONS("CANVAS GLAREA") HUGOPTIONS("NOSCALING") INCLUDE gl.bac /* CONST GL_POINTS = 0x0000 CONST GL_LINES = 0x0001 CONST GL_LINE_LOOP = 0x0002 CONST GL_LINE_STRIP = 0x0003 CONST GL_TRIANGLES = 0x0004 CONST GL_TRIANGLE_STRIP = 0x0005 CONST GL_TRIANGLE_FAN = 0x0006 CONST GL_QUADS = 0x0007 CONST GL_QUAD_STRIP = 0x0008 CONST GL_POLYGON = 0x0009 */ LOCAL deg,xx,yy,zz,dim TYPE float SUB Draw3d INCR deg,5 LOCAL pix, ebox xx=0.6 yy =0.8 zz =1.0 REM Get the associated canvas pix = hug_gui_properties.canvas ebox = hug_widget_ebox(STR$(pix))
gtk_gl_area_make_current(hug_gui_properties.canvas) glEnable(GL_CULL_FACE) glEnable(GL_DEPTH_TEST) glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT) glMatrixMode(GL_PROJECTION) 'white rgba glClearColor(1.0, 1.0, 1.0, 1.0) glLoadIdentity 'use the Viewport to position and size 'x, y, width, height 'glViewport((800/2)-50, (350/2)-50, 100 , 100) glViewport(MOUSE(0)-50, (350-(MOUSE(1)))-50, 100 , 100) 'rotate all , in degrees, rotation,x,y,z 'rotate all -+deg clock/anti-clock,x,y,z 'glRotated(-deg,xx,yy,zz) 'glRotated(deg,xx,yy,zz) 'glRotated(-deg,0,0,1) 'glRotated(-deg,0,1,0) 'glRotated(-deg,1,0,0) glRotated(-deg,0,1,1) ' Draw Cube glBegin(GL_QUADS) 'glBegin( GL_LINE_LOOP) 'glColor4f(r,g,b,a) 'top green 1 glColor3f(0.0f, 1.0f, 0.0f) glVertex3f(0.375, 0.375, -0.375) glVertex3f(-0.375, 0.375, -0.375) glVertex3f(-0.375, 0.375, 0.375) glVertex3f(0.375, 0.375, 0.375)
'bottom face yellow 2 glColor3f(1.0f,1.0f, 0.0f) glVertex3f(0.375, -0.375, 0.375) glVertex3f(-0.375, -0.375, 0.375) glVertex3f(-0.375, -0.375, -0.375) glVertex3f(0.375, -0.375, -0.375)
'front red 3 glColor3f(1.0f, 0.0f, 0.0f) glVertex3f(0.375, 0.375, 0.375) glVertex3f(-0.375, 0.375, 0.375) glVertex3f(-0.375, -0.375, 0.375) glVertex3f(0.375, -0.375, 0.375)
'back red 4 glColor3f(1.0f, 0.0f, 0.0f) glVertex3f(0.375, -0.375, -0.375) glVertex3f(-0.375, -0.375, -0.375) glVertex3f(-0.375, 0.375, -0.375) glVertex3f(0.375, 0.375, -0.375)
'left blue 5 glColor3f(0.0f, 0.0f, 1.0f) glVertex3f(-0.375, 0.375, 0.375) glVertex3f(-0.375, 0.375, -0.375) glVertex3f(-0.375, -0.375, -0.375) glVertex3f(-0.375, -0.375, 0.375)
'right black 6 glColor3f(0.0f, 0.0f, 0.0f) glVertex3f(0.375, 0.375, -0.375) glVertex3f(0.375, 0.375, 0.375) glVertex3f(0.375, -0.375, 0.375) glVertex3f(0.375, -0.375, -0.375) glEnd()
'=UPDATE THE SCREEN ====================== gtk_widget_queue_draw(hug_widget_image(STR$(ebox)) ) '===================================== TIMEOUT(60,Draw3d) END SUB win =WINDOW ("GL - test",806,409)
but = BUTTON(" Draw " ,100,30) ATTACH(win,but,3,3) CALLBACK(but,Draw3d)
can = CANVAS(800,350) PRINT can ATTACH(win,can,3,36)
DISPLAY BASE BR Alex Attachments:
|
|
|
Post by alexfish on May 29, 2023 1:16:24 GMT 1
HUG353 RELEASED
First Post
BR Alex
|
|
|
Post by alexfish on Jun 1, 2023 17:46:21 GMT 1
Hug3.5.3
TO BE RE-RELEASED
:: Remove Bacon Record for storing huglibs : Reason :: Allow INIT,blah . as per original hug method How Soon :: ASP
BR Alex
|
|