<kbd id="afajh"><form id="afajh"></form></kbd>
<strong id="afajh"><dl id="afajh"></dl></strong>
    <del id="afajh"><form id="afajh"></form></del>
        1. <th id="afajh"><progress id="afajh"></progress></th>
          <b id="afajh"><abbr id="afajh"></abbr></b>
          <th id="afajh"><progress id="afajh"></progress></th>

          gotk3GTK+3 的 Go 綁定

          聯(lián)合創(chuàng)作 · 2023-09-28 06:42

          gotk3 提供 Go 綁定 GTK+3 和依賴的其他項目。每個組件都給出了用來導(dǎo)入包路徑的子目錄。以下是部分已經(jīng)實施的支持庫:

          • GTK+3 (3.6 and later)

          • GDK 3 (3.6 and later)

          • GLib 2 (2.36 and later)

          • Cairo (1.10 and later)

          已經(jīng)采取謹(jǐn)慎的內(nèi)存管理與Go的垃圾收集器無縫工作,而無需使用或理解圖形對象的浮動參考。

          簡單示例:

          package main
          import (
              "github.com/conformal/gotk3/gtk"
              "log"
          )
          func main() {
              // Initialize GTK without parsing any command line arguments.
              gtk.Init(nil)
              // Create a new toplevel window, set its title, and connect it to the
              // "destroy" signal to exit the GTK main loop when it is destroyed.
              win, err := gtk.WindowNew(gtk.WINDOW_TOPLEVEL)
              if err != nil {
                  log.Fatal("Unable to create window:", err)
              }
              win.SetTitle("Simple Example")
              win.Connect("destroy", func() {
                  gtk.MainQuit()
              })
              // Create a new label widget to show in the window.
              l, err := gtk.LabelNew("Hello, gotk3!")
              if err != nil {
                  log.Fatal("Unable to create label:", err)
              }
              // Add the label to the window.
              win.Add(l)
              // Set the default window size.
              win.SetDefaultSize(800, 600)
              // Recursively show all widgets contained in this window.
              win.ShowAll()
              // Begin executing the GTK main loop.  This blocks until
              // gtk.MainQuit() is run. 
              gtk.Main()
          }
          瀏覽 26
          點贊
          評論
          收藏
          分享

          手機掃一掃分享

          編輯 分享
          舉報
          評論
          圖片
          表情
          推薦
          點贊
          評論
          收藏
          分享

          手機掃一掃分享

          編輯 分享
          舉報
          <kbd id="afajh"><form id="afajh"></form></kbd>
          <strong id="afajh"><dl id="afajh"></dl></strong>
            <del id="afajh"><form id="afajh"></form></del>
                1. <th id="afajh"><progress id="afajh"></progress></th>
                  <b id="afajh"><abbr id="afajh"></abbr></b>
                  <th id="afajh"><progress id="afajh"></progress></th>
                  字幕一区二区三区四区五区在线看 | 2021av天堂网 | 色鬼综合网 | 操老逼网 | 成人黄色电影在线视频 |