这篇教程C++ xf86Msg函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中xf86Msg函数的典型用法代码示例。如果您正苦于以下问题:C++ xf86Msg函数的具体用法?C++ xf86Msg怎么用?C++ xf86Msg使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了xf86Msg函数的28个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: vuidMouseWheelInit/* * Initialize and enable the mouse wheel, if present. * * Returns 1 if mouse wheel was successfully enabled. * Returns 0 if an error occurred or if there is no mouse wheel. */static intvuidMouseWheelInit(InputInfoPtr pInfo){#ifdef HAVE_VUID_WHEEL wheel_state wstate; int nwheel = -1; int i; wstate.vers = VUID_WHEEL_STATE_VERS; wstate.id = 0; wstate.stateflags = (uint32_t) -1; SYSCALL(i = ioctl(pInfo->fd, VUIDGWHEELCOUNT, &nwheel)); if (i != 0) return (0); SYSCALL(i = ioctl(pInfo->fd, VUIDGWHEELSTATE, &wstate)); if (i != 0) { xf86Msg(X_WARNING, "%s: couldn't get wheel state/n", pInfo->name); return (0); } wstate.stateflags |= VUID_WHEEL_STATE_ENABLED; SYSCALL(i = ioctl(pInfo->fd, VUIDSWHEELSTATE, &wstate)); if (i != 0) { xf86Msg(X_WARNING, "%s: couldn't enable wheel/n", pInfo->name); return (0); } return (1);#else return (0);#endif}
开发者ID:ystk,项目名称:debian-xserver-xorg-input-mouse,代码行数:41,
示例2: xf86OSInitVidMemvoidxf86OSInitVidMem(VidMemInfoPtr pVidMem){ pVidMem->linearSupported = TRUE;#ifdef __alpha__ if (axpSystem == -1) { axpSystem = lnxGetAXP(); if ((needSparse = (_bus_base_sparse() > 0))) { hae_thresh = xf86AXPParams[axpSystem].hae_thresh; hae_mask = xf86AXPParams[axpSystem].hae_mask; } bus_base = _bus_base(); } if (needSparse) { xf86Msg(X_INFO,"Machine needs sparse mapping/n"); pVidMem->mapMem = mapVidMemSparse; pVidMem->unmapMem = unmapVidMemSparse; } else { xf86Msg(X_INFO,"Machine type has 8/16 bit access/n"); pVidMem->mapMem = mapVidMem; pVidMem->unmapMem = unmapVidMem; } #else pVidMem->mapMem = mapVidMem; pVidMem->unmapMem = unmapVidMem;#endif /* __alpha__ */#ifdef HAS_MTRR_SUPPORT pVidMem->setWC = setWC; pVidMem->undoWC = undoWC;#endif pVidMem->initialised = TRUE;}
开发者ID:fenghaitao,项目名称:xserver-with-gl-accelerated-xephyr,代码行数:34,
示例3: xf86EnableIOBoolxf86EnableIO(){ int fd; pointer base; if (ExtendedEnabled) return TRUE; if ((fd = open("/dev/ttyC0", O_RDWR)) >= 0) { /* Try to map a page at the pccons I/O space */ base = (pointer)mmap((caddr_t)0, 65536, PROT_READ | PROT_WRITE, MAP_FLAGS, fd, (off_t)0x0000); if (base != (pointer)-1) { IOPortBase = base; } else { xf86Msg(X_WARNING,"EnableIO: failed to mmap %s (%s)/n", "/dev/ttyC0", strerror(errno)); return FALSE; } } else { xf86Msg("EnableIO: failed to open %s (%s)/n", "/dev/ttyC0", strerror(errno)); return FALSE; } ExtendedEnabled = TRUE; return TRUE;}
开发者ID:L3oV1nc3,项目名称:VMGL,代码行数:33,
示例4: sunKbdSoundBell_X_HIDDEN voidsunKbdSoundBell(sunKbdPrivPtr priv, int loudness, int pitch, int duration){ int kbdCmd, i; if (loudness && pitch) {#ifdef AUDIO_BELL if (priv->audioDevName != NULL) { if (sunKbdAudioBell(priv, loudness, pitch, duration) == 0) { return; } }#endif kbdCmd = KBD_CMD_BELL; SYSCALL(i = ioctl (priv->kbdFD, KIOCCMD, &kbdCmd)); if (i < 0) { xf86Msg(X_ERROR, "%s: Failed to activate bell: %s/n", priv->devName, strerror(errno)); } usleep(duration * loudness * 20); kbdCmd = KBD_CMD_NOBELL; SYSCALL(i = ioctl (priv->kbdFD, KIOCCMD, &kbdCmd)); if (i < 0) { xf86Msg(X_ERROR, "%s: Failed to deactivate bell: %s/n", priv->devName, strerror(errno)); } }}
开发者ID:narenas,项目名称:nx-libs,代码行数:33,
示例5: XkbDDXPrivateintXkbDDXPrivate(DeviceIntPtr dev,KeyCode key,XkbAction *act){ XkbAnyAction *xf86act = &(act->any); char msgbuf[XkbAnyActionDataSize+1]; if (xf86act->type == XkbSA_XFree86Private) { memcpy(msgbuf, xf86act->data, XkbAnyActionDataSize); msgbuf[XkbAnyActionDataSize]= '/0'; if (strcasecmp(msgbuf, "-vmode")==0) xf86ProcessActionEvent(ACTION_PREV_MODE, NULL); else if (strcasecmp(msgbuf, "+vmode")==0) xf86ProcessActionEvent(ACTION_NEXT_MODE, NULL); else if (strcasecmp(msgbuf, "prgrbs")==0) { DeviceIntPtr tmp; xf86Msg(X_INFO, "Printing all currently active device grabs:/n"); for (tmp = inputInfo.devices; tmp; tmp = tmp->next) if (tmp->deviceGrab.grab) PrintDeviceGrabInfo(tmp); xf86Msg(X_INFO, "End list of active device grabs/n"); } else if (strcasecmp(msgbuf, "ungrab")==0) UngrabAllDevices(FALSE); else if (strcasecmp(msgbuf, "clsgrb")==0) UngrabAllDevices(TRUE); else if (strcasecmp(msgbuf, "prwins")==0) PrintWindowTree(); } return 0;}
开发者ID:4eremuxa,项目名称:xserver,代码行数:31,
示例6: xf86ReadBIOSintxf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf, int Len){ int fd;#ifdef __ia64__ if ((fd = open(DEV_MEM, O_RDONLY | O_SYNC)) < 0)#else if ((fd = open(DEV_MEM, O_RDONLY)) < 0)#endif { xf86Msg(X_WARNING, "xf86ReadBIOS: Failed to open %s (%s)/n", DEV_MEM, strerror(errno)); return(-1); } if (lseek(fd, (Base+Offset), SEEK_SET) < 0) { xf86Msg(X_WARNING, "xf86ReadBIOS: %s seek failed (%s)/n", DEV_MEM, strerror(errno)); close(fd); return(-1); } if (read(fd, Buf, Len) != Len) { xf86Msg(X_WARNING, "xf86ReadBIOS: %s read failed (%s)/n", DEV_MEM, strerror(errno)); close(fd); return(-1); } close(fd); return(Len);}
开发者ID:aosm,项目名称:X11,代码行数:34,
示例7: xf86ReadBIOSintxf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf, int Len){ int fd; unsigned char *ptr; int psize; int mlen; if ((fd = open(DEV_MEM, O_RDONLY)) < 0) { xf86Msg(X_WARNING, "xf86ReadBIOS: Failed to open %s (%s)/n", DEV_MEM, strerror(errno)); return -1; } psize = getpagesize(); Offset += Base & (psize - 1); Base &= ~(psize - 1); mlen = (Offset + Len + psize - 1) & ~(psize - 1); ptr = (unsigned char *)mmap((caddr_t)0, mlen, PROT_READ, MAP_SHARED, fd, (off_t)Base); if (ptr == MAP_FAILED) { xf86Msg(X_WARNING, "xf86ReadBIOS: %s mmap failed (%s)/n", DEV_MEM, strerror(errno)); close(fd); return -1; } DebugF("xf86ReadBIOS: BIOS at 0x%08x has signature 0x%04x/n", Base, ptr[0] | (ptr[1] << 8)); (void)memcpy(Buf, (void *)(ptr + Offset), Len); (void)munmap((caddr_t)ptr, mlen); (void)close(fd); return Len;}
开发者ID:AK47POMA,项目名称:xserver,代码行数:35,
示例8: linearVidMemstatic BoollinearVidMem(){#ifdef SVR4 return TRUE;#elif defined(HAS_SVR3_MMAPDRV) xf86MsgVerb(X_INFO, MMAP_DEBUG, "# xf86LinearVidMem: MMAP 2.2.2 called/n"); if(mmapFd >= 0) return TRUE; if ((mmapFd = open("/dev/mmap", O_RDWR)) != -1) { if(ioctl(mmapFd, GETVERSION) < 0x0222) { xf86Msg(X_WARNING, "xf86LinearVidMem: MMAP 2.2.2 or above required/n"); xf86ErrorF("/tlinear memory access disabled/n"); return FALSE; } return TRUE; } xf86Msg(X_WARNING, "xf86LinearVidMem: failed to open /dev/mmap (%s)/n", strerror(errno)); xf86ErrorF("/tlinear memory access disabled/n"); return FALSE;#endif}
开发者ID:Agnarr,项目名称:xserver,代码行数:27,
示例9: xf86CloseConsolevoidxf86CloseConsole(void){ struct vt_mode VT; if (ShareVTs) { close(xf86Info.consoleFd); return; } if (console_handler) { xf86RemoveGeneralHandler(console_handler); console_handler = NULL; }; /* Back to text mode ... */ if (ioctl(xf86Info.consoleFd, KDSETMODE, KD_TEXT) < 0) xf86Msg(X_WARNING, "xf86CloseConsole: KDSETMODE failed: %s/n", strerror(errno)); ioctl(xf86Info.consoleFd, KDSKBMODE, tty_mode); tcsetattr(xf86Info.consoleFd, TCSANOW, &tty_attr); if (ioctl(xf86Info.consoleFd, VT_GETMODE, &VT) < 0) xf86Msg(X_WARNING, "xf86CloseConsole: VT_GETMODE failed: %s/n", strerror(errno)); else { /* set dflt vt handling */ VT.mode = VT_AUTO; if (ioctl(xf86Info.consoleFd, VT_SETMODE, &VT) < 0) xf86Msg(X_WARNING, "xf86CloseConsole: VT_SETMODE failed: %s/n", strerror(errno)); } if (VTSwitch) { /* * Perform a switch back to the active VT when we were started */ if (activeVT >= 0) { if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, activeVT) < 0) xf86Msg(X_WARNING, "xf86CloseConsole: VT_ACTIVATE failed: %s/n", strerror(errno)); if (ioctl(xf86Info.consoleFd, VT_WAITACTIVE, activeVT) < 0) xf86Msg(X_WARNING, "xf86CloseConsole: VT_WAITACTIVE failed: %s/n", strerror(errno)); activeVT = -1; } } close(xf86Info.consoleFd); /* make the vt-manager happy */ restoreVtPerms(); /* restore the permissions */}
开发者ID:fenghaitao,项目名称:xserver-with-gl-accelerated-xephyr,代码行数:54,
示例10: error_callback_from_library/* callbacks from the library */int error_callback_from_library(TouchpadDevicePtr tdev, const char* string) { InputInfoPtr pInfo = tdev->parent; const char *name = "At Synaptix Initialization"; if (pInfo) name = pInfo->name; if (errno) xf86Msg(X_WARNING,"%s: %s(%s)", name, string, strerror(errno)); else xf86Msg(X_INFO,"%s: %s/n", name, string); return 0;}
开发者ID:Batchyx,项目名称:synaptix-xorg-driver,代码行数:12,
示例11: xf86OSInitVidMemvoidxf86OSInitVidMem(VidMemInfoPtr pVidMem){ checkDevMem(TRUE); if (has_bwx()) { xf86Msg(X_PROBED, "Machine type has 8/16 bit access/n"); } else { xf86Msg(X_PROBED, "Machine needs sparse mapping/n"); } pVidMem->initialised = TRUE;}
开发者ID:openbsd-unofficial,项目名称:openbsd-xenocara,代码行数:13,
示例12: xf86CloseConsolevoidxf86CloseConsole(void){ struct vt_mode VT; int ret; if (xf86Info.ShareVTs) { close(xf86Info.consoleFd); return; } /* * unregister the drain_console handler * - what to do if someone else changed it in the meantime? */ xf86SetConsoleHandler(NULL, NULL); /* Back to text mode ... */ SYSCALL(ret = ioctl(xf86Info.consoleFd, KDSETMODE, KD_TEXT)); if (ret < 0) xf86Msg(X_WARNING, "xf86CloseConsole: KDSETMODE failed: %s/n", strerror(errno)); SYSCALL(ioctl(xf86Info.consoleFd, KDSKBMUTE, 0)); SYSCALL(ioctl(xf86Info.consoleFd, KDSKBMODE, tty_mode)); tcsetattr(xf86Info.consoleFd, TCSANOW, &tty_attr); SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_GETMODE, &VT)); if (ret < 0) xf86Msg(X_WARNING, "xf86CloseConsole: VT_GETMODE failed: %s/n", strerror(errno)); else { /* set dflt vt handling */ VT.mode = VT_AUTO; SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_SETMODE, &VT)); if (ret < 0) xf86Msg(X_WARNING, "xf86CloseConsole: VT_SETMODE failed: %s/n", strerror(errno)); } if (xf86Info.autoVTSwitch) { /* * Perform a switch back to the active VT when we were started */ if (activeVT >= 0) { switch_to(activeVT, "xf86CloseConsole"); activeVT = -1; } } close(xf86Info.consoleFd); /* make the vt-manager happy */}
开发者ID:MrKepzie,项目名称:xserver,代码行数:51,
示例13: handle_gesturesstatic void handle_gestures(LocalDevicePtr local, struct Gestures* gs){ struct MTouch *mt = local->private; static bitmask_t buttons_prev = 0U; int i; if(mt->absolute_mode == FALSE){ if (mt->cfg.scroll_smooth){ /* Copy states from button_prev into current buttons state */ MODBIT(gs->buttons, 3, GETBIT(buttons_prev, 3)); MODBIT(gs->buttons, 4, GETBIT(buttons_prev, 4)); MODBIT(gs->buttons, 5, GETBIT(buttons_prev, 5)); MODBIT(gs->buttons, 6, GETBIT(buttons_prev, 6)); set_and_post_mask(mt, local->dev, timertoms(&gs->dt)); } else{ // mt->absolute_mode == FALSE if (gs->move_dx != 0 || gs->move_dy != 0) xf86PostMotionEvent(local->dev, 0, 0, 2, gs->move_dx, gs->move_dy); } } else{ /* Give the HW coordinates to Xserver as absolute coordinates, these coordinates * are not scaled, this is oke if the touchscreen has the same resolution as the display. */ xf86PostMotionEvent(local->dev, 1, 0, 2, mt->state.touch[0].x + get_cap_xmid(&mt->caps), mt->state.touch[0].y + get_cap_ymid(&mt->caps)); } for (i = 0; i < 32; i++) { if (GETBIT(gs->buttons, i) == GETBIT(buttons_prev, i)) continue; if (GETBIT(gs->buttons, i)) { xf86PostButtonEvent(local->dev, FALSE, i+1, 1, 0, 0);#define DEBUG_DRIVER 0#if DEBUG_DRIVER xf86Msg(X_INFO, "button %d down/n", i+1);#endif } else { xf86PostButtonEvent(local->dev, FALSE, i+1, 0, 0, 0);#if DEBUG_DRIVER xf86Msg(X_INFO, "button %d up/n", i+1);#endif#undef DEBUG_DRIVER } } buttons_prev = gs->buttons;}
开发者ID:wordofglass,项目名称:xf86-input-mtrack,代码行数:51,
示例14: xf86JoystickOnintxf86JoystickOn(char * name, int *timeout, int *centerX, int *centerY){ int status; int changed = 0; int timeinmicros; struct joystick js; #ifdef DEBUG ErrorF("xf86JoystickOn: %s/n", name);#endif if ((status = open(name, O_RDWR | O_NDELAY, 0)) < 0) { xf86Msg(X_WARNING, "xf86JoystickOn: Cannot open joystick '%s' (%s)/n", name, strerror(errno)); return -1; } if (*timeout <= 0) { /* Use the current setting */ ioctl(status, JOY_GETTIMEOUT, (char *)&timeinmicros); *timeout = timeinmicros / 1000; if (*timeout == 0) *timeout = 1; changed = 1; } /* Maximum allowed timeout in the FreeBSD driver is 10ms */ if (*timeout > 10) { *timeout = 10; changed = 1; } if (changed) xf86Msg(X_PROBED, "Joystick: timeout value = %d/n", *timeout); timeinmicros = *timeout * 1000; /* Assume the joystick is centred when this is called */ read(status, &js, JS_RETURN); if (*centerX < 0) { *centerX = js.x; xf86Msg(X_PROBED, "Joystick: CenterX set to %d/n", *centerX); } if (*centerY < 0) { *centerY = js.y; xf86Msg(X_PROBED, "Joystick: CenterY set to %d/n", *centerY); } return status;}
开发者ID:Magister,项目名称:x11rdp_xorg71,代码行数:51,
示例15: memory_basestatic unsigned longmemory_base(void){ if (abw_count < 0) init_abw(); if (abw_count > 0) { xf86Msg(X_INFO, "memory base = %#lx/n", abw[1].abw_abst.abst_sys_start); /* XXXX */ return abw[1].abw_abst.abst_sys_start; } else { xf86Msg(X_INFO, "no memory base/n"); /* XXXX */ return 0; }}
开发者ID:BackupTheBerlios,项目名称:dri-ex-svn,代码行数:15,
示例16: device_onstatic int device_on(InputInfoPtr local){ struct mtev_mtouch *mt = local->private; local->fd = xf86OpenSerial(local->options); if (local->fd < 0) { xf86Msg(X_ERROR, "mtev: cannot open device/n"); return !Success; } if (mtouch_open(mt, local->fd)) { xf86Msg(X_ERROR, "mtev: cannot grab device/n"); return !Success; } xf86AddEnabledDevice(local); return Success;}
开发者ID:vamanea,项目名称:xf86-input-mtev,代码行数:15,
示例17: xf86ProcessActionEvent/* * Handle keyboard events that cause some kind of "action" * (i.e., server termination, video mode changes, VT switches, etc.) */voidxf86ProcessActionEvent(ActionEvent action, void *arg){ DebugF("ProcessActionEvent(%d,%x)/n", (int) action, arg); switch (action) { case ACTION_TERMINATE: if (!xf86Info.dontZap) { xf86Msg(X_INFO, "Server zapped. Shutting down./n");#ifdef XFreeXDGA DGAShutdown();#endif GiveUp(0); } break; case ACTION_NEXT_MODE: if (!xf86Info.dontZoom) xf86ZoomViewport(xf86Info.currentScreen, 1); break; case ACTION_PREV_MODE: if (!xf86Info.dontZoom) xf86ZoomViewport(xf86Info.currentScreen, -1); break; case ACTION_SWITCHSCREEN: if (VTSwitchEnabled && !xf86Info.dontVTSwitch && arg) { int vtno = *((int *) arg); if (vtno != xf86Info.vtno) { if (!xf86VTActivate(vtno)) { ErrorF("Failed to switch from vt%02d to vt%02d: %s/n", xf86Info.vtno, vtno, strerror(errno)); } } } break; case ACTION_SWITCHSCREEN_NEXT: if (VTSwitchEnabled && !xf86Info.dontVTSwitch) { if (!xf86VTActivate(xf86Info.vtno + 1)) { /* If first try failed, assume this is the last VT and * try wrapping around to the first vt. */ if (!xf86VTActivate(1)) { ErrorF("Failed to switch from vt%02d to next vt: %s/n", xf86Info.vtno, strerror(errno)); } } } break; case ACTION_SWITCHSCREEN_PREV: if (VTSwitchEnabled && !xf86Info.dontVTSwitch && xf86Info.vtno > 0) { if (!xf86VTActivate(xf86Info.vtno - 1)) { /* Don't know what the maximum VT is, so can't wrap around */ ErrorF("Failed to switch from vt%02d to previous vt: %s/n", xf86Info.vtno, strerror(errno)); } } break; default: break; }}
开发者ID:cubanismo,项目名称:xserver,代码行数:64,
示例18: xf86CallDriverProbe/** * Call the driver's correct probe function. * * If the driver implements the /c DriverRec::PciProbe entry-point and an * appropriate PCI device (with matching Device section in the xorg.conf file) * is found, it is called. If /c DriverRec::PciProbe or no devices can be * successfully probed with it (e.g., only non-PCI devices are available), * the driver's /c DriverRec::Probe function is called. * * /param drv Driver to probe * * /return * If a device can be successfully probed by the driver, /c TRUE is * returned. Otherwise, /c FALSE is returned. */Boolxf86CallDriverProbe(DriverPtr drv, Bool detect_only){ Bool foundScreen = FALSE;#ifdef XSERVER_PLATFORM_BUS if (drv->platformProbe != NULL) { foundScreen = xf86platformProbeDev(drv); } if (ServerIsNotSeat0() && foundScreen) return foundScreen;#endif#ifdef XSERVER_LIBPCIACCESS if (!foundScreen && (drv->PciProbe != NULL)) { if (xf86DoConfigure && xf86DoConfigurePass1) { assert(detect_only); foundScreen = xf86PciAddMatchingDev(drv); } else { assert(!detect_only); foundScreen = xf86PciProbeDev(drv); } }#endif if (!foundScreen && (drv->Probe != NULL)) { xf86Msg(X_WARNING, "Falling back to old probe method for %s/n", drv->driverName); foundScreen = (*drv->Probe) (drv, (detect_only) ? PROBE_DETECT : PROBE_DEFAULT); } return foundScreen;}
开发者ID:AmesianX,项目名称:xorg-server,代码行数:49,
示例19: xf86SIGIO/* * SIGIO gives no way of discovering which fd signalled, select * to discover */static voidxf86SIGIO (int sig){ int i; fd_set ready; struct timeval to; int r; ready = xf86SigIOMask; to.tv_sec = 0; to.tv_usec = 0; SYSCALL (r = select (xf86SigIOMaxFd, &ready, 0, 0, &to)); for (i = 0; r > 0 && i < xf86SigIOMax; i++) if (xf86SigIOFuncs[i].f && FD_ISSET (xf86SigIOFuncs[i].fd, &ready)) { (*xf86SigIOFuncs[i].f)(xf86SigIOFuncs[i].fd, xf86SigIOFuncs[i].closure); r--; }#ifdef XFree86Server if (r > 0) { xf86Msg(X_ERROR, "SIGIO %d descriptors not handled/n", r); }#endif}
开发者ID:narenas,项目名称:nx-libs,代码行数:29,
示例20: bsdGetAXPaxpDevicebsdGetAXP(void){ int i; char sysname[64]; size_t len = sizeof(sysname); #ifdef __OpenBSD__ int mib[3]; int error; mib[0] = CTL_MACHDEP; mib[1] = CPU_CHIPSET; mib[2] = CPU_CHIPSET_TYPE; if ((error = sysctl(mib, 3, &sysname, &len, NULL, 0)) < 0)#else if ((sysctlbyname("hw.chipset.type", &sysname, &len, 0, 0)) < 0)#endif FatalError("bsdGetAXP: can't find machine type/n");#ifdef DEBUG xf86Msg(X_INFO,"AXP is a: %s/n",sysname);#endif for (i=0;;i++) { if (axpList[i].name == NULL) return NONE; if (!strcmp(sysname, axpList[i].name)) return axpList[i].type; }}
开发者ID:GrahamCobb,项目名称:maemo-xsisusb,代码行数:31,
示例21: glxSetupstatic pointerglxSetup(pointer module, pointer opts, int *errmaj, int *errmin){ static Bool setupDone = FALSE; __GLXprovider *provider; if (setupDone) { if (errmaj) *errmaj = LDR_ONCEONLY; return NULL; } setupDone = TRUE; xf86Msg(xf86Info.aiglxFrom, "AIGLX %s/n", xf86Info.aiglx ? "enabled" : "disabled"); if (xf86Info.aiglx) { provider = LoaderSymbol("__glXDRIProvider"); if (provider) GlxPushProvider(provider); provider = LoaderSymbol("__glXDRI2Provider"); if (provider) GlxPushProvider(provider); } LoadExtension(&GLXExt, FALSE); return module;}
开发者ID:RowanMSEResearchLab,项目名称:xserver,代码行数:29,
示例22: xf86ReadBIOS_X_EXPORT intxf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf, int Len){ unsigned char *ptr; int psize; int mlen; psize = xf86getpagesize(); Offset += Base & (psize - 1); Base &= ~(psize - 1); mlen = (Offset + Len + psize - 1) & ~(psize - 1); ptr = (unsigned char *)mmap_device_memory((caddr_t)0, mlen, PROT_READ, 0, (off_t)Base); if ((long)ptr == -1) { xf86Msg(X_WARNING, "xf86ReadBIOS: %s mmap[s=%x,a=%lx,o=%lx] failed (%s)/n", DEV_MEM, Len, Base, Offset, strerror(errno)); return(-1); }#ifdef DEBUG ErrorF("xf86ReadBIOS: BIOS at 0x%08x has signature 0x%04x/n", Base, ptr[0] | (ptr[1] << 8));#endif (void)memcpy(Buf, (void *)(ptr + Offset), Len); (void)munmap_device_memory((caddr_t)ptr, mlen);#ifdef DEBUG xf86MsgVerb(X_INFO, 3, "xf86ReadBIOS(%x, %x, Buf, %x)" "-> %02x %02x %02x %02x.../n", Base, Offset, Len, Buf[0], Buf[1], Buf[2], Buf[3]);#endif return(Len);}
开发者ID:vocho,项目名称:qnxpkgsrcmirror,代码行数:34,
示例23: sunKbdOpen_X_HIDDEN intsunKbdOpen(const char *devName, pointer options){ int kbdFD; const char *kbdPath = NULL; const char *defaultKbd = "/dev/kbd"; if (options != NULL) { kbdPath = xf86SetStrOption(options, "Device", NULL); } if (kbdPath == NULL) { kbdPath = defaultKbd; } kbdFD = open(kbdPath, O_RDONLY | O_NONBLOCK); if (kbdFD == -1) { xf86Msg(X_ERROR, "%s: cannot open /"%s/"/n", devName, kbdPath); } else { xf86MsgVerb(X_INFO, 3, "%s: Opened device /"%s/"/n", devName, kbdPath); } if ((kbdPath != NULL) && (kbdPath != defaultKbd)) { xfree(kbdPath); } return kbdFD;}
开发者ID:narenas,项目名称:nx-libs,代码行数:27,
示例24: xf86SetSerialSpeedintxf86SetSerialSpeed(int fd, int speed){ struct termios t; int baud, r; if (fd < 0) return -1; /* Don't try to set parameters for non-tty devices. */ if (!isatty(fd)) return 0; SYSCALL(tcgetattr(fd, &t)); if ((baud = GetBaud(speed))) { cfsetispeed(&t, baud); cfsetospeed(&t, baud); } else { xf86Msg(X_ERROR, "Invalid Option BaudRate value: %d/n", speed); return -1; } SYSCALL(r = tcsetattr(fd, TCSANOW, &t)); return r;}
开发者ID:XQuartz,项目名称:xorg-server,代码行数:27,
示例25: xf86SIGIO/* * SIGIO gives no way of discovering which fd signalled, select * to discover */static voidxf86SIGIO(int sig){ int i; fd_set ready; struct timeval to; int save_errno = errno; /* do not clobber the global errno */ int r; inSignalContext = TRUE; ready = xf86SigIOMask; to.tv_sec = 0; to.tv_usec = 0; SYSCALL(r = select(xf86SigIOMaxFd, &ready, 0, 0, &to)); for (i = 0; r > 0 && i < xf86SigIOMax; i++) if (xf86SigIOFuncs[i].f && FD_ISSET(xf86SigIOFuncs[i].fd, &ready)) { (*xf86SigIOFuncs[i].f) (xf86SigIOFuncs[i].fd, xf86SigIOFuncs[i].closure); r--; } if (r > 0) { xf86Msg(X_ERROR, "SIGIO %d descriptors not handled/n", r); } /* restore global errno */ errno = save_errno; inSignalContext = FALSE;}
开发者ID:Agnesa,项目名称:xserver,代码行数:33,
示例26: pciInit/* * pciInit - choose correct platform/OS specific PCI init routine */voidpciInit(){ if (pciInitialized) return; pciInitialized = 1; /* XXX */#if defined(DEBUGPCI) if (DEBUGPCI >= xf86Verbose) xf86Verbose = DEBUGPCI;#endif ARCH_PCI_INIT();#if defined(ARCH_PCI_OS_INIT) if (pciNumBuses <= 0) ARCH_PCI_OS_INIT();#endif if (xf86MaxPciDevs == 0) { xf86Msg(X_WARNING, "OS did not count PCI devices, guessing wildly/n"); xf86MaxPciDevs = MAX_PCI_DEVICES; } if (pci_devp) xfree(pci_devp); pci_devp = xnfcalloc(xf86MaxPciDevs + 1, sizeof(pciConfigPtr));}
开发者ID:mcr,项目名称:xorg-xvnc4,代码行数:31,
示例27: CheckVersionstatic BoolCheckVersion(const char *module, XF86ModuleVersionInfo * data, const XF86ModReqInfo * req){ int vercode[4]; char verstr[4]; long ver = data->xf86version; MessageType errtype; xf86Msg(X_INFO, "Module %s: vendor=/"%s/"/n", data->modname ? data->modname : "UNKNOWN!", data->vendor ? data->vendor : "UNKNOWN!"); if (ver > (4 << 24)) { /* 4.0.x and earlier */ verstr[1] = verstr[3] = 0; verstr[2] = (ver & 0x1f) ? (ver & 0x1f) + 'a' - 1 : 0; ver >>= 5; verstr[0] = (ver & 0x1f) ? (ver & 0x1f) + 'A' - 1 : 0; ver >>= 5; vercode[2] = ver & 0x7f; ver >>= 7; vercode[1] = ver & 0x7f; ver >>= 7; vercode[0] = ver; xf86ErrorF("/tcompiled for %d.%d", vercode[0], vercode[1]); if (vercode[2] != 0) xf86ErrorF(".%d", vercode[2]); xf86ErrorF("%s%s, module version = %d.%d.%d/n", verstr, verstr + 2, data->majorversion, data->minorversion, data->patchlevel); } else {
开发者ID:marioaugustorama,项目名称:tropix-xwindow,代码行数:31,
示例28: xf86OpenSerialint xf86OpenSerial (pointer options){ APIRET rc; HFILE fd, i; ULONG action; GLINECTL linectl; char* dev = xf86FindOptionValue (options, "Device"); xf86MarkOptionUsedByName (options, "Device"); if (!dev) { xf86Msg (X_ERROR, "xf86OpenSerial: No Device specified./n"); return -1; } rc = DosOpen(dev, &fd, &action, 0, FILE_NORMAL, FILE_OPEN, OPEN_ACCESS_READWRITE | OPEN_SHARE_DENYNONE, NULL); if (rc) { xf86Msg (X_ERROR, "xf86OpenSerial: Cannot open device %s, rc=%d./n", dev, rc); return -1; } /* check whether it is an async device */ if (_get_linectrl(fd,&linectl)) { xf86Msg (X_WARNING, "xf86OpenSerial: Specified device %s is not a tty/n", dev); DosClose(fd); return -1; } /* set up default port parameters */ _set_baudrate(fd, 9600); linectl.databits = 8; linectl.parity = 0; linectl.stopbits = 0; _set_linectl(fd, &linectl); if (xf86SetSerial (fd, options) == -1) { DosClose(fd); return -1; } return fd;}
开发者ID:BackupTheBerlios,项目名称:dri-ex-svn,代码行数:47,
注:本文中的xf86Msg函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ xf86ScreenToScrn函数代码示例 C++ xf86DrvMsg函数代码示例 |