|
Post by rikky on Apr 23, 2021 6:29:43 GMT 1
This looks promising, but unfortunately there isn't a gtk4 in the raspberry repositories yet (as far as I can see) And I do not have the courage to compile it myself. Think I have to wait. Rik.
|
|
|
Post by vovchik on Apr 23, 2021 10:40:09 GMT 1
Dear Rik,
I have the same problem with my Pi4 running Buster/testing. And the same goes for Mint 19.
With kind regards, vovchik
|
|
|
Post by Pjot on Apr 24, 2021 17:59:07 GMT 1
Gents, I recently have installed Mageia 8.0 and the GTK4 libraries are available in their repo. That's how I found out that they have been released The GTK API is partly the same, though containers do not exist anymore. For BaCon, it means we have to check if a widget has a "child"-property. If so, we can define a widget as being a child of another widget (cq having a "parent"). The GtkBox layout does not have a "child" property. But previously, we could use GtkBox as a container, and I added a small fix to make this possible again in GTK4. Unfortunately, the OpenGL widget still does not support the 1.x and 2.x OpenGL API... So BaCon is prepared for the future, and I guess GTK4 support will be available on all platforms shortly. BR Peter
|
|
|
Post by Pjot on May 7, 2021 13:48:33 GMT 1
All, We can integrate VTE just as well (both GTK3 and GTK4). It also seems that the latest version has Sixel support. I had to download the source, enable the Sixel support feature and compile manually, but then it works We can use this feature in combination with the programs from Alex. This is the code: OPTION GUI TRUE PRAGMA GUI gtk3
' Using VTE PRAGMA INCLUDE <vte/vte.h> PRAGMA OPTIONS `pkg-config --cflags vte-2.91` PRAGMA LDFLAGS `pkg-config --libs vte-2.91`
' The GUI definition id = GUIDEFINE(" \ { type=WINDOW name=window callback=delete-event callback=key-press-event width-request=800 height-request=500 title=\"Sixel\" } \ { type=VTE_TYPE_TERMINAL name=terminal parent=window enable-sixel=1 }")
DECLARE mypty TYPE VtePty* DECLARE (*pty)() = vte_terminal_pty_new_sync TYPE VtePty*
mypty = GUIFN(id, "terminal", pty, VTE_PTY_DEFAULT, NULL, NULL) CALL vte_terminal_set_pty(VTE_TERMINAL(GUIWIDGET(id, "terminal")), mypty)
DECLARE command$[3] = { "cat", "space_station.six", NULL } CALL vte_pty_spawn_async(mypty, NULL, command$, NULL, 0, NULL, NULL, NULL, -1, NULL, NULL, NULL)
' Run event loop IF LEN(GUIEVENT$(id)) THEN END
BR Peter
Attachments:space_station.six (99.04 KB)
|
|
|
Post by bigbass on May 13, 2021 17:16:02 GMT 1
Hello vovchik
I went back and tested some of your latest code demos with 64 bit mint 20.1
they all compiled cleanly and ran correctly and of course they all look excellent!
thanks for your demos
clock-svg-animated-vov3-6-7-effects-bac.tar.gz (25.1 KB)
swatch-clock.tar.gz (4.21 KB)
Joe
P.S I am also waiting for an official Gtk4 package so that I can test the latest demos too
|
|
|
Post by vovchik on May 14, 2021 0:12:17 GMT 1
Dear Joe, Thanks for testing and the kind words. At least we know that Mint 20.1 runs BaCon fine - I am still on Mint 19.x, but will have to make the switch sooner or later, and I hope I can do it without too much configuration and fiddling. Swatch internet time is intriguing. I like the idea of universal time, irrespective of time zone, and the decimal nature of all units. I think it will have a future. I hope you are well and coping OK. I go for a second Pfizer injection next Monday. With kind regards, vovchik
|
|
|
Post by bigbass on May 14, 2021 17:27:45 GMT 1
Hello vovchik above all that is going on I am happy to hear that you are healthy happy and well I am well on another note I decided maybe out of taking a challenge to see what is needed for Gtk4 (since I am currently using 20.01 why not push it to 21.04 where Gtk4 is possible I read this to get the minimum setup www.ubuntubuzz.com/2021/04/setup-gtk4-development-tools-on-ubuntu-fedora-opensuse.htmlthen poked around looking for an iso for my box www.releases.ubuntu.com/21.04/I found this first but don't have a PI4 yet someone else may find it useful cdimage.ubuntu.com/ubuntu/releases/21.04/release/I posted this so that we could have more testers offering some feedback getting BaCon GTK4 ready for more people Joe hello Peter Gtk4 up and running on ubuntu 21.04 amd 64 both your Gtk4 demos compile cleanly and run correctly! bacon and bacongui-fltk too back on mint 20.1 *in less than a day ubuntu just isnt for me its too slow and seems best suited for a secretary
|
|
|
Post by alexfish on Aug 24, 2022 20:19:08 GMT 1
Hi All Whilst on with navigation 2 AKA `OSM` required libosmgpsmap-1.0-dev thought would try this lib with the new GUI feature OPTION GUI TRUE PRAGMA GUI gtk3
DECLARE text TYPE STRING DECLARE data TYPE FLOATING
PRAGMA LDFLAGS `pkg-config osmgpsmap-1.0 gobject-2.0 gthread-2.0 --libs` PRAGMA OPTIONS `pkg-config osmgpsmap-1.0 --cflags`
PRAGMA INCLUDE <osmgpsmap-1.0/osm-gps-map.h> PRAGMA INCLUDE <glib-2.0/glib.h>
gui = GUIDEFINE(" \ { type=WINDOW name=window callback=delete-event title=\"MAP VIEW\" width-request=300 height-request=300} \ { type=OSM_TYPE_GPS_MAP name=map_1 map-source=OSM_GPS_MAP_SOURCE_OPENSTREETMAP tile-cache=\"/tmp\" parent=window }")
REPEAT event$ = GUIEVENT$(gui)
UNTIL event$ = "window"
file are at "/tmp" , but can change what ever dir you like if want save them Please note at first osm will show errors , once the 'tile-cache' catches up they will disappear ADDED for Docs , they should be on your system IE Here have file:///usr/share/gtk-doc/html/libosmgpsmap/index.html or can try HERE Have Fun + BR Alex
|
|
|
Post by rikky on Aug 25, 2022 8:01:26 GMT 1
It works on a Rpi4 with openstreetmap. Very quickly. Changing 'map-source=OSM_GPS_MAP_SOURCE_OPENSTREETMAP' to 'map-source=OSM_GPS_MAP_SOURCE_OPENSEAMAP' did not work though. Could not figure out how to change to SEA map. Rik.
|
|
|
Post by alexfish on Aug 25, 2022 21:31:14 GMT 1
Hi Rik
looking into the map side of things , seamaps source is not supported
typedef enum { OSM_GPS_MAP_SOURCE_NULL, OSM_GPS_MAP_SOURCE_OPENSTREETMAP, OSM_GPS_MAP_SOURCE_OPENSTREETMAP_RENDERER, OSM_GPS_MAP_SOURCE_OPENAERIALMAP, OSM_GPS_MAP_SOURCE_MAPS_FOR_FREE, OSM_GPS_MAP_SOURCE_OPENCYCLEMAP, OSM_GPS_MAP_SOURCE_OSM_PUBLIC_TRANSPORT, OSM_GPS_MAP_SOURCE_GOOGLE_STREET, OSM_GPS_MAP_SOURCE_GOOGLE_SATELLITE, OSM_GPS_MAP_SOURCE_GOOGLE_HYBRID, OSM_GPS_MAP_SOURCE_VIRTUAL_EARTH_STREET, OSM_GPS_MAP_SOURCE_VIRTUAL_EARTH_SATELLITE, OSM_GPS_MAP_SOURCE_VIRTUAL_EARTH_HYBRID, OSM_GPS_MAP_SOURCE_OSMC_TRAILS,
OSM_GPS_MAP_SOURCE_LAST } OsmGpsMapSource_t;
support for OPEN_SEAMAPS , well , in the past one could download from the site, over last few months the click to download area does not work here there again those images are not png , they of of b.tile format , and need to be converted to png , this involves downloading a python app ,
anyway in short, new site is listed for openseamap/seamarks = "https://t1.openseamap.org/seamark/"
in some of my posts have done some testing , things of note
these are png the zoom matches the number schema is the same
the not to note not all map tiles exist as an actual picture , hence some of bits been posted. 'Testing'
to that end have an almost complete app which will download the matching openseamap marks , test for exist if exist then combine the two images and save back to the open_street map file , phew.
at this moment in time this is the only method I can trust. Reason have tried all ways to get "self repo" seamap/marks in osm lib to work , all = fail...
As mentioned this will be a separate app , It will be down to the user to make the choices , but will work.
BR Alex
|
|
|
Post by alexfish on Aug 27, 2022 11:45:35 GMT 1
Hi Rik & ALL found this link wiki.openstreetmap.org/wiki/DE:Locus#https://wiki.openstreetmap.org/wiki/DE:Locus#Offline-Kartenwill have to check which areas to apply. but downloads work , but be careful on the size of downloads can get the mbtile format . some where I posted the method to convert these to PNG , hence looking further and will update on the Appropriate Thread ADDED Link RE: MBTILE database converter HEREnow here added where the tiles are OPTION GUI TRUE PRAGMA GUI gtk3
DECLARE text TYPE STRING DECLARE data TYPE FLOATING
PRAGMA LDFLAGS `pkg-config osmgpsmap-1.0 gobject-2.0 gthread-2.0 --libs` PRAGMA OPTIONS `pkg-config osmgpsmap-1.0 --cflags`
PRAGMA INCLUDE <osmgpsmap-1.0/osm-gps-map.h> PRAGMA INCLUDE <glib-2.0/glib.h>
gui = GUIDEFINE(" \ { type=WINDOW name=window callback=delete-event title=\"MAP-VIEW\" width-request=300 height-request=300} \ { type=OSM_TYPE_GPS_MAP name=map_1 map-source=OSM_GPS_MAP_SOURCE_OPENSTREETMAP tile-cache=\"/home/pi/Downloads/mbutil/northsea\" parent=window }")
REPEAT event$ = GUIEVENT$(gui)
UNTIL event$ = "window" As mentioned , openseamaps RE: mbtile , not all zoom levels not supported , some openstreetmap (zoom) tiles are missing although libosm will fill in the missing bits as can see from the link , mostly Europe... hence the method I am Working on BR Alex Attachments:
|
|
|
Post by rikky on Aug 27, 2022 15:09:44 GMT 1
Well it works. Except I don't get a seamap but a streetmap Cannot figure out where your attachment pic gets the seamarks from It is possible though. Says the documentation Example 3. Map using custom CloudMade map and on screen display
int main (int argc, char **argv) { g_thread_init(NULL); gtk_init (&argc, &argv); const gchar *cloudmate = "http://a.tile.cloudmade.com/YOUR_API_KEY/1/256/#Z/#X/#Y.png";
GtkWidget *map = g_object_new (OSM_TYPE_GPS_MAP, "repo-uri", cloudmate, NULL); OsmGpsMapOsd *osd = osm_gps_map_osd_new (); GtkWidget *w = gtk_window_new (GTK_WINDOW_TOPLEVEL); osm_gps_map_layer_add (OSM_GPS_MAP(map), OSM_GPS_MAP_LAYER(osd)); gtk_container_add (GTK_CONTAINER(w), map); gtk_widget_show_all (w);
gtk_main (); return 0; }
But how to add this layer is a mistery to me. Well " a.tile.cloudmade.com/YOUR_API_KEY/1/256/#Z/#X/#Y.png" will become ' tiles.openseamap.org/seamark/#Z/#X/#Y.png" but other than that?
|
|
|
Post by alexfish on Aug 27, 2022 17:18:17 GMT 1
Hi Rik If can find a method then fine : RE OPENSEAMAPS method of openseamap mbtile conversions offers best way of getting offline png files , links for this arena already posted above From Here all info and updates etc will appear in the appropriate thread & or Links to a little on the macro string function in BaCon DEF FN myrepo(Z) = (#Z) PRINT "AUTO STRINGS" tilezoom = 30 B$ = myrepo(tilezoom) PRINT B$ B$ = myrepo(30) PRINT B$ HENCE OPTION GUI TRUE PRAGMA GUI gtk3
DECLARE text TYPE STRING DECLARE data TYPE FLOATING
PRAGMA LDFLAGS `pkg-config osmgpsmap-1.0 gobject-2.0 gthread-2.0 --libs` PRAGMA OPTIONS `pkg-config osmgpsmap-1.0 --cflags`
PRAGMA INCLUDE <osmgpsmap-1.0/osm-gps-map.h> PRAGMA INCLUDE <glib-2.0/glib.h>
gui = GUIDEFINE(" \ { type=WINDOW name=window callback=delete-event title=\"MAP VIEW\" width-request=300 height-request=300} \ { type=OSM_TYPE_GPS_MAP name=map_1 repo-uri=\"https://t1.openseamap.org/seamark/#Z/#X/#Y.png\" tile-cache=\"/tmp\" parent=window }")
REPEAT event$ = GUIEVENT$(gui)
UNTIL event$ = "window" can you see.... so here we have to intervene : Re DOCS The “repo-uri” property “repo-uri” gchar * A URI string which defines the location and format to fetch tiles for the map. The string is of the format "http://tile.openstreetmap.org/#Z/#X/#Y.png". Characters that begin with # are treated as tokens and replaced according to the following rules;
#X - X-tile, slippy map format
#Y - Y-tile, slippy map format, mercator projection
#Z - Zoom level, where min_zoom >= zoom <= max_zoom
#S - Zoom level, where -max_zoom >= (zoom-max_zoom) <= min_zoom
#Q - Quad tree format, set of "qrts"
#Q0 - Quad tree format, set of "0123"
#YS - Not Implemented
#R - Random integer in range [0,4] Now libosm uses the bounding box method here is a extract from openseamaps The files in here are extracts of the full-history OpenStreetMap dumps [1]. They contain multiple versions of an object. If you just want the map-data as it is currently, use the Geofabrik-Extracts [2]. The files in this folder are generated using MaZderMind's history splitter [3].
110418/: Extracts generated from [5] 110418/hardcut-bbox-xml/: Extracts generated using simple bboxes in hardcut mode, stored in xml, partitally compressed with bz2 110418/hardcut-bbox-pbf/: Extracts generated using simple bboxes in hardcut mode, stored in history-pbf-format
later, maybe, other files will be added, eg. cutted with polygons.
the files currently online are cutted in hardcut-mode. They have the following characteristics:
features: - ways are cropped at bbox boundaries - relations contain only members that exist in the extract - ways and relations are reference-complete - relations referring to relations that come later in the file are missing this references - ways that have only one node inside the bbox are missing from the output - only versions of an object that are inside the bboxes are in thr extract, some versions of an object may be missing
You can read more about the used algorithm by looking at the documentation at the top of the sourcecode [4].
Regarding reading the pbf-files, please read the Mailing-List Posting [6] which will guide you to the definition and the library used to create those files.
If you have questions or problems with the extracts, just drop a mail to <osm@mazdermind.de>.
[1] <http://planet.osm.org/full-experimental/> [2] <http://download.geofabrik.de/> [3] <https://github.com/MaZderMind/osm-history-splitter/> [4] <https://github.com/MaZderMind/osm-history-splitter/blob/master/hardcut.hpp> [5] <http://planet.osm.org/full-experimental/full-planet-110418-0000.osm.bz2> [6] <http://lists.openstreetmap.org/pipermail/dev/2011-May/022713.html> REFERENCE ftp.gwdg.de/pub/misc/openstreetmap/osm-full-history-extracts/and mbtiles Browes Directory ftp5.gwdg.de/pub/misc/openstreetmap/openseamap/charts/mbtiles/HAVE FUN + BR Alex
|
|