この GTK_WINDOW() の部分は何のためにやってあるんですか? これ無くして直で書いても問題なく動作しているように見えます ヘッダーを見ても #define GTK_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_WINDOW, GtkWindow)) よく解りません 0400デフォルトの名無しさん2019/01/08(火) 13:47:44.29ID:5nGknQDd GTKは糞 0401デフォルトの名無しさん2019/01/08(火) 13:57:27.89ID:apChm6zE ヘッダーよりググッてリファレンスを見るべき、読めないなら翻訳にぶちこむ https://developer.gnome.org/gtk3/stable/gtk-getting-started.html A window title is set using gtk_window_set_title(). This function takes a GtkWindow* pointer and a string as input. As our window pointer is a GtkWidget pointer, we need to cast it to GtkWindow*. But instead of casting window via (GtkWindow*), window can be cast using the macro GTK_WINDOW(). GTK_WINDOW() will check if the pointer is an instance of the GtkWindow class, before casting, and emit a warning if the check fails. More information about this convention can be found here.
https://developer.gnome.org/gobject/stable/gobject-Type-Information.html#G-TYPE-CHECK-INSTANCE-CAST:CAPS #define G_TYPE_CHECK_INSTANCE_CAST(instance, g_type, c_type) (_G_TYPE_CIC ((instance), (g_type), c_type)) Checks that instance is an instance of the type identified by g_type and issues a warning if this is not the case. Returns instance casted to a pointer to c_type . No warning will be issued if instance is NULL, and NULL will be returned. This macro should only be used in type implementations. 0402デフォルトの名無しさん2019/01/08(火) 17:17:04.43ID:4yndLLJo もう2019年だというのに何が悲しくて今更Gtkなんてやるの...? 0403デフォルトの名無しさん2019/01/12(土) 12:12:40.39ID:GHU4ZnZa 2019年だと何をやるのが楽しいのさ? 0404デフォルトの名無しさん2019/01/13(日) 11:40:45.46ID:tXzbQf9x Win32API 0405デフォルトの名無しさん2019/01/13(日) 11:58:27.83ID:Cy6afJKh Gtk は、Windows でも動くのか? 初めて知った
GUI は、HTML, CSS, JavaScript。 Electron (Node.js + Chromium)を使った、VSCode のような感じ