Gtkプログラミング on Windows!!!at TECH
Gtkプログラミング on Windows!!! - 暇つぶし2ch403:デフォルトの名無しさん
19/01/08 13:57:27.89 apChm6zE.net
ヘッダーよりググッてリファレンスを見るべき、読めないなら翻訳にぶちこむ
URLリンク(developer.gnome.org)
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.
URLリンク(developer.gnome.org)
#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.


次ページ
続きを表示
1を表示
最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch