我不知道这个"功能"叫什么,所以我不能用谷歌搜索它,如果标题没有意义,我也很抱歉.我最近查看了Suckless DWM的源代码,并看到了以下代码:(来自dwm.c)
static int (*xerrorxlib)(Display *, XErrorEvent *);
还有这个:
static void (*handler[LASTEvent]) (XEvent *) = {
[ButtonPress] = buttonpress,
[ClientMessage] = clientmessage,
[ConfigureRequest] = configurerequest,
[ConfigureNotify] = configurenotify,
[DestroyNotify] = destroynotify,
[EnterNotify] = enternotify,
[Expose] = expose,
[FocusIn] = focusin,
[KeyPress] = keypress,
[KeyRelease] = keypress,
[MappingNotify] = mappingnotify,
[MapRequest] = maprequest,
[MotionNotify] = motionnotify,
[PropertyNotify] = propertynotify,
[UnmapNotify] = unmapnotify
};
void (*handler[LASTEvent]) (XEvent *)
是什么意思?它叫什么?为什么要用它?