Machine Vision Camera SDK (C) Developer Guide
>SpecialInfo.stGigEInfo.chUserDefinedName);
}
else if (pstMVDevInfo->nTLayerType == MV_USB_DEVICE)
{
printf("UserDefinedName:%s\n\n", pstMVDevInfo-
>SpecialInfo.stUsb3VInfo.chUserDefinedName);
}
else
{
printf("Not support.\n");
}
return true;
}
int main()
{
Window w;
Display *dpy;
memset(&w, 0, sizeof(Window));
dpy = NULL;
printf("%d\n", sizeof(Window));
// Create the window
dpy = XOpenDisplay(NIL);
int whiteColor = WhitePixel(dpy, DefaultScreen(dpy));
w = XCreateSimpleWindow(dpy, DefaultRootWindow(dpy), 0, 0,752, 480, 0,
0xffff00ff, 0xff00ffff);
// We want to get MapNotify events
XSelectInput(dpy, w, StructureNotifyMask);
// "Map" the window (that is, make it appear on the screen)
XMapWindow(dpy, w);
// Create a "Graphics Context"
GC gc = XCreateGC(dpy, w, 0, NIL);
// Tell the GC we draw using the white color
XSetForeground(dpy, gc, whiteColor);
// Wait for the MapNotify event
for(;;)
{
XEvent e;
XNextEvent(dpy, &e);
if (e.type == MapNotify)
{
break;
}
137
    "