HaxeFoundation / neko

The Neko Virtual Machine
https://nekovm.org
Other
554 stars 107 forks source link

Port from GTK 2 to GTK 3 #220

Closed xyproto closed 1 year ago

xyproto commented 3 years ago

Hi,

I'm maintaining the Neko package for Arch Linux.

GTK 2 has reached its end of life: https://blog.gtk.org/2020/12/16/gtk-4-0/

This patch changes the Neko sources from depending on GTK 2 to depending on GTK 3.

The only code change is calling gdk_threads_add_timeout instead of calling gtk_timeout_add.

The changes were tested with this simple Neko program, and appears to be working:

var ui_loop = $loader.loadprim("ui@ui_loop", 0)
var ui_stop_loop = $loader.loadprim("ui@ui_stop_loop", 0)
var ui_is_main = $loader.loadprim("ui@ui_is_main", 0)
var ui_sync = $loader.loadprim("ui@ui_sync", 1)

ui_sync(function() {
  $print("UI is main? ", ui_is_main(), "\n")
  $print("Stopping UI loop\n")
  ui_stop_loop()
})

$print("Starting UI loop\n")
ui_loop()
$print("DONE\n")
xyproto commented 3 years ago

The Azure pipeline error is unrelated to this pull request:

-- Using src='https://downloads.mariadb.org/f/connector-c-3.0.9/mariadb-connector-c-3.0.9-src.tar.gz'
CMake Error at MariaDBConnector-stamp/download-MariaDBConnector.cmake:170 (message):
  Each download failed!

    error: downloading 'https://downloads.mariadb.org/f/connector-c-3.0.9/mariadb-connector-c-3.0.9-src.tar.gz' failed
          status_code: 22
          status_string: "HTTP response code said error"
          log:
Simn commented 1 year ago

@tobil4sk Could you check if we want to merge this (after resolving conflicts)? It makes sense to not depend on EOL versions if it can be helped.

tobil4sk commented 1 year ago

@tobil4sk Could you check if we want to merge this (after resolving conflicts)? It makes sense to not depend on EOL versions if it can be helped.

Yes, we definitely want to merge this. The sample file from above still runs fine.

@xyproto Thanks for resolving all conflicts, looks good to me now.

xyproto commented 1 year ago

Thanks for reviewing, and for maintaining Neko!