这篇教程C++ wine_tsx11_unlock函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中wine_tsx11_unlock函数的典型用法代码示例。如果您正苦于以下问题:C++ wine_tsx11_unlock函数的具体用法?C++ wine_tsx11_unlock怎么用?C++ wine_tsx11_unlock使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了wine_tsx11_unlock函数的28个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: X11DRV_XF86VM_GetGammaRampBOOL X11DRV_XF86VM_GetGammaRamp(LPDDGAMMARAMP ramp){#ifdef X_XF86VidModeSetGamma XF86VidModeGamma gamma; Bool ret; if (xf86vm_major < 2) return FALSE; /* no gamma control */#ifdef X_XF86VidModeSetGammaRamp else if (xf86vm_use_gammaramp) { Bool ret; wine_tsx11_lock(); ret = XF86VidModeGetGammaRamp(gdi_display, DefaultScreen(gdi_display), 256, ramp->red, ramp->green, ramp->blue); wine_tsx11_unlock(); return ret; }#endif else { wine_tsx11_lock(); ret = XF86VidModeGetGamma(gdi_display, DefaultScreen(gdi_display), &gamma); wine_tsx11_unlock(); if (ret) { GenerateRampFromGamma(ramp->red, gamma.red); GenerateRampFromGamma(ramp->green, gamma.green); GenerateRampFromGamma(ramp->blue, gamma.blue); return TRUE; } }#endif /* X_XF86VidModeSetGamma */ return FALSE;}
开发者ID:WASSUM,项目名称:longene_travel,代码行数:33,
示例2: set_window_cursor/*********************************************************************** * set_window_cursor */void set_window_cursor( struct x11drv_win_data *data, HCURSOR handle ){ Cursor cursor, prev; wine_tsx11_lock(); if (!handle) cursor = get_empty_cursor(); else if (!cursor_context || XFindContext( gdi_display, (XID)handle, cursor_context, (char **)&cursor )) { /* try to create it */ wine_tsx11_unlock(); if (!(cursor = create_cursor( handle ))) return; wine_tsx11_lock(); if (!cursor_context) cursor_context = XUniqueContext(); if (!XFindContext( gdi_display, (XID)handle, cursor_context, (char **)&prev )) { /* someone else was here first */ XFreeCursor( gdi_display, cursor ); cursor = prev; } else { XSaveContext( gdi_display, (XID)handle, cursor_context, (char *)cursor ); TRACE( "cursor %p created %lx/n", handle, cursor ); } } XDefineCursor( gdi_display, data->whole_window, cursor ); /* make the change take effect immediately */ XFlush( gdi_display ); data->cursor = handle; wine_tsx11_unlock();}
开发者ID:dvdhoo,项目名称:wine,代码行数:36,
示例3: process_events/*********************************************************************** * process_events */static int process_events( Display *display, ULONG_PTR mask ){ XEvent event; HWND hwnd; int count = 0; x11drv_event_handler handler; wine_tsx11_lock(); while (XCheckIfEvent( display, &event, filter_event, (char *)mask )) { count++; if (XFilterEvent( &event, None )) continue; /* filtered, ignore it */ if (!(handler = find_handler( event.type ))) { TRACE( "%s, ignoring/n", dbgstr_event( event.type )); continue; /* no handler, ignore it */ } if (XFindContext( display, event.xany.window, winContext, (char **)&hwnd ) != 0) hwnd = 0; /* not for a registered window */ if (!hwnd && event.xany.window == root_window) hwnd = GetDesktopWindow(); wine_tsx11_unlock(); TRACE( "%s for hwnd/window %p/%lx/n", dbgstr_event( event.type ), hwnd, event.xany.window ); handler( hwnd, &event ); wine_tsx11_lock(); } XFlush( gdi_display ); wine_tsx11_unlock(); if (count) TRACE( "processed %d events/n", count ); return count;}
开发者ID:howard5888,项目名称:wineT,代码行数:37,
示例4: X11DRV_XF86VM_SetGammaRampBOOL X11DRV_XF86VM_SetGammaRamp(LPDDGAMMARAMP ramp){#ifdef X_XF86VidModeSetGamma XF86VidModeGamma gamma; if (xf86vm_major < 2) return FALSE; /* no gamma control */#ifdef X_XF86VidModeSetGammaRamp else if (xf86vm_use_gammaramp) { Bool ret; wine_tsx11_lock(); ret = XF86VidModeSetGammaRamp(gdi_display, DefaultScreen(gdi_display), 256, ramp->red, ramp->green, ramp->blue); wine_tsx11_unlock(); return ret; }#endif else { if (ComputeGammaFromRamp(ramp->red, &gamma.red) && ComputeGammaFromRamp(ramp->green, &gamma.green) && ComputeGammaFromRamp(ramp->blue, &gamma.blue)) { Bool ret; wine_tsx11_lock(); ret = XF86VidModeSetGamma(gdi_display, DefaultScreen(gdi_display), &gamma); wine_tsx11_unlock(); return ret; } }#endif /* X_XF86VidModeSetGamma */ return FALSE;}
开发者ID:WASSUM,项目名称:longene_travel,代码行数:32,
|