macro in gtk
来源:互联网 发布:mac 将wma转换成mp3 编辑:程序博客网 时间:2024/06/07 11:31
GTK_WINDOW
is a macro that does the cast.
As seen here
#define GTK_WINDOW(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_WINDOW, GtkWindow))
Again
#define GTK_CHECK_CAST G_TYPE_CHECK_INSTANCE_CAST
and
#define G_TYPE_CHECK_INSTANCE_CAST(instance, g_type, c_type) (_G_TYPE_CIC ((instance), (g_type), c_type))
which is...
#define _G_TYPE_CIC(ip,gt,ct) \ ((ct*) g_type_check_instance_cast ((GTypeInstance*) ip, gt))
The code for g_type_check_instance_cast
can be found here
GTypeInstance*g_type_check_instance_cast (GTypeInstance *type_instance, GType iface_type){ if (type_instance) { if (type_instance->g_class) { TypeNode *node, *iface; gboolean is_instantiatable, check; node = lookup_type_node_I (type_instance->g_class->g_type); is_instantiatable = node && node->is_instantiatable; iface = lookup_type_node_I (iface_type); check = is_instantiatable && iface && type_node_conforms_to_U (node, iface, TRUE, FALSE); if (check) return type_instance; if (is_instantiatable) g_warning ("invalid cast from `%s' to `%s'", type_descriptive_name_I (type_instance->g_class->g_type), type_descriptive_name_I (iface_type)); else g_warning ("invalid uninstantiatable type `%s' in cast to `%s'", type_descriptive_name_I (type_instance->g_class->g_type), type_descriptive_name_I (iface_type)); } else g_warning ("invalid unclassed pointer in cast to `%s'", type_descriptive_name_I (iface_type)); } return type_instance;}
0 0
- macro in gtk
- Macro in MFC files
- comments macro in vs2008
- makefile in GTK
- Widgets in Gtk+
- macro
- macro
- macro
- How To Use Macro In Program.
- Macro expand in C programming language
- module and macro in Android.mk
- macro `AM_PROG_LIBTOOL’ not found in library
- 宏的用法(macro in C)
- macro `AM_PROG_LIBTOOL’ not found in library
- SAS Macro IN 操作: MINOPERATOR System Option
- Starting off in Glade/GTK+
- macro again, hehe, more details and in chinese
- warning: macro `AM_PATH_GLIB_2_0' not found in library 还有 ‘AM_PATH_LIBCRYT’
- Lucene学习总结之三:Lucene的索引文件格式(1)
- ios 调用短信接口发送指定内容的消息
- linux常用快捷键
- attrib命令介绍
- unity3d使用Log4.net进行日志记录
- macro in gtk
- UIBarItem UITabBarItem常用方法
- sublime写插件,插入时间
- ios 调用短信接口发送指定内容的消息
- 一步步学习SPD2010--第一章节--探索SPD2010(4)附--使用SharePoint Designer创建站点(命名URL最佳实践)
- Android程序:系统重启+开机自动运行+屏幕解锁
- 猜数字游戏
- Tomcat源码分析------ 一次完整请求的里里外外
- 解决163/sohu/sina不能够收到PHP MAIL函数发出邮件的问题