您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ xcb_free_pixmap函数代码示例

51自学网 2021-06-03 10:16:07
  C++
这篇教程C++ xcb_free_pixmap函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中xcb_free_pixmap函数的典型用法代码示例。如果您正苦于以下问题:C++ xcb_free_pixmap函数的具体用法?C++ xcb_free_pixmap怎么用?C++ xcb_free_pixmap使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了xcb_free_pixmap函数的27个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: xcbosd_resize

void xcbosd_resize(xcbosd *osd, int width, int height){  assert (osd);  assert (width);  assert (height);  lprintf("resize old:%dx%d new:%dx%d/n", osd->width, osd->height, width, height );  osd->width = width;  osd->height = height;  xcb_free_pixmap(osd->connection, osd->bitmap);  switch(osd->mode) {    case XCBOSD_SHAPED: {      unsigned int window_config[] = { osd->width, osd->height };      xcb_configure_window(osd->connection, osd->u.shaped.window, XCB_CONFIG_WINDOW_WIDTH | XCB_CONFIG_WINDOW_HEIGHT, window_config);      xcb_free_pixmap(osd->connection, osd->u.shaped.mask_bitmap);      osd->u.shaped.mask_bitmap = xcb_generate_id(osd->connection);      xcb_create_pixmap(osd->connection, 1, osd->u.shaped.mask_bitmap, osd->u.shaped.window, osd->width, osd->height);      osd->bitmap = xcb_generate_id(osd->connection);      xcb_create_pixmap(osd->connection, osd->depth, osd->bitmap, osd->u.shaped.window, osd->width, osd->height);      break;      }    case XCBOSD_COLORKEY:      osd->bitmap = xcb_generate_id(osd->connection);      xcb_create_pixmap(osd->connection, osd->depth, osd->bitmap, osd->window, osd->width, osd->height);      break;  }  osd->clean = UNDEFINED;  xcbosd_clear(osd);}
开发者ID:Caught,项目名称:openpliPC,代码行数:32,


示例2: xcb_free_pixmap

x_client_icon::~x_client_icon(void){  m_c.detach(XCB_PROPERTY_NOTIFY, this);  xcb_free_pixmap(m_c(), m_net_wm_icon);  xcb_free_pixmap(m_c(), m_wm_hints_icon);  xcb_free_pixmap(m_c(), m_default_icon);}
开发者ID:holtrop,项目名称:x-choyce,代码行数:7,


示例3: foreach

 //______________________________________________ void ShadowHelper::reset( void ) {     #if OXYGEN_HAVE_X11     if( _helper.isX11() )     {         // round pixmaps         foreach( const quint32& value, _pixmaps  ) xcb_free_pixmap( _helper.connection(), value );         foreach( const quint32& value, _dockPixmaps  ) xcb_free_pixmap( _helper.connection(), value );     }
开发者ID:badzso,项目名称:oxygen,代码行数:10,


示例4: DeleteBuffers

static void DeleteBuffers(vout_display_t *vd){    vout_display_sys_t *sys = vd->sys;    xcb_connection_t *conn = sys->conn;    xcb_render_free_picture(conn, sys->picture.scale);    xcb_render_free_picture(conn, sys->picture.crop);    xcb_free_pixmap(conn, sys->drawable.scale);    xcb_free_pixmap(conn, sys->drawable.crop);}
开发者ID:mstorsjo,项目名称:vlc,代码行数:10,


示例5: xcb_generate_id

void X11WindowedBackend::createCursor(const QImage &img, const QPoint &hotspot){    const xcb_pixmap_t pix = xcb_generate_id(m_connection);    const xcb_gcontext_t gc = xcb_generate_id(m_connection);    const xcb_cursor_t cid = xcb_generate_id(m_connection);    xcb_create_pixmap(m_connection, 32, pix, m_screen->root, img.width(), img.height());    xcb_create_gc(m_connection, gc, pix, 0, nullptr);    xcb_put_image(m_connection, XCB_IMAGE_FORMAT_Z_PIXMAP, pix, gc, img.width(), img.height(), 0, 0, 0, 32, img.byteCount(), img.constBits());    XRenderPicture pic(pix, 32);    xcb_render_create_cursor(m_connection, cid, pic, hotspot.x(), hotspot.y());    for (auto it = m_windows.constBegin(); it != m_windows.constEnd(); ++it) {        xcb_change_window_attributes(m_connection, (*it).window, XCB_CW_CURSOR, &cid);    }    xcb_free_pixmap(m_connection, pix);    xcb_free_gc(m_connection, gc);    if (m_cursor) {        xcb_free_cursor(m_connection, m_cursor);    }    m_cursor = cid;    xcb_flush(m_connection);    markCursorAsRendered();}
开发者ID:shadeslayer,项目名称:kwin,代码行数:26,


示例6: dri2_destroy_surface

static EGLBooleandri2_destroy_surface(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf){   struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);   struct dri2_egl_surface *dri2_surf = dri2_egl_surface(surf);   (void) drv;   if (!_eglPutSurface(surf))      return EGL_TRUE;   (*dri2_dpy->core->destroyDrawable)(dri2_surf->dri_drawable);      if (dri2_dpy->dri2) {      xcb_dri2_destroy_drawable (dri2_dpy->conn, dri2_surf->drawable);   } else {      assert(dri2_dpy->swrast);      swrastDestroyDrawable(dri2_dpy, dri2_surf);   }   if (surf->Type == EGL_PBUFFER_BIT)      xcb_free_pixmap (dri2_dpy->conn, dri2_surf->drawable);   free(surf);   return EGL_TRUE;}
开发者ID:DirectFB,项目名称:mesa,代码行数:27,


示例7: drawin_update_drawing

static voiddrawin_update_drawing(drawin_t *w){    /* If this drawin isn't visible, we don't need an up-to-date cairo surface     * for it. (drawin_map() will later make sure we are called again) */    if(!w->visible)        return;    /* Clean up old stuff */    if(w->surface)    {        /* In case lua still got a reference to the surface, it still won't be         * able to do anything with it because we finish it. */        cairo_surface_finish(w->surface);        cairo_surface_destroy(w->surface);    }    if(w->pixmap)        xcb_free_pixmap(globalconf.connection, w->pixmap);    /* Create a pixmap */    xcb_screen_t *s = globalconf.screen;    w->pixmap = xcb_generate_id(globalconf.connection);    xcb_create_pixmap(globalconf.connection, globalconf.default_depth, w->pixmap, s->root,                      w->geometry.width, w->geometry.height);    /* and create a surface for that pixmap */    w->surface = cairo_xcb_surface_create(globalconf.connection,                                          w->pixmap, globalconf.visual,                                          w->geometry.width, w->geometry.height);    /* Make sure the pixmap doesn't contain garbage by filling it with black */    cairo_t *cr = cairo_create(w->surface);    cairo_set_operator(cr, CAIRO_OPERATOR_CLEAR);    cairo_paint(cr);    cairo_destroy(cr);}
开发者ID:raedwulf,项目名称:awesome,代码行数:33,


示例8: _cairo_boilerplate_xcb_cleanup

static void_cairo_boilerplate_xcb_cleanup (void *closure){    xcb_target_closure_t *xtc = closure;    cairo_status_t status;    cairo_surface_finish (xtc->surface);    if (xtc->is_pixmap)	xcb_free_pixmap (xtc->c, xtc->drawable);    else	xcb_destroy_window (xtc->c, xtc->drawable);    cairo_surface_destroy (xtc->surface);    cairo_device_finish (xtc->device);    cairo_device_destroy (xtc->device);    /* First synchronize with the X server to make sure there are no more errors     * in-flight which we would miss otherwise */    _cairo_boilerplate_xcb_sync_server (xtc);    status = _cairo_boilerplate_xcb_handle_errors (xtc);    assert (status == CAIRO_STATUS_SUCCESS);    xcb_disconnect (xtc->c);    free (xtc);}
开发者ID:GuoCheng111,项目名称:WinCairoRequirements,代码行数:26,


示例9: _destroy_similar

static void _destroy_similar (void *closure){    struct similar *similar = closure;    xcb_free_pixmap (similar->connection, similar->pixmap);    free (similar);}
开发者ID:GuoCheng111,项目名称:WinCairoRequirements,代码行数:7,


示例10: drawin_wipe

static voiddrawin_wipe(drawin_t *w){    /* The drawin must already be unmapped, else it     * couldn't be garbage collected -> no unmap needed */    p_delete(&w->cursor);    if(w->surface)    {        /* Make sure that cairo knows that this surface can't be unused anymore.         * This is needed since lua could still have a reference to it. */        cairo_surface_finish(w->surface);        cairo_surface_destroy(w->surface);        w->surface = NULL;    }    if(w->window)    {        /* Activate BMA */        client_ignore_enterleave_events();        /* Make sure we don't accidentally kill the systray window */        drawin_systray_kickout(w);        xcb_destroy_window(globalconf.connection, w->window);        /* Deactivate BMA */        client_restore_enterleave_events();        w->window = XCB_NONE;    }    if(w->pixmap)    {        xcb_free_pixmap(globalconf.connection, w->pixmap);        w->pixmap = XCB_NONE;    }}
开发者ID:raedwulf,项目名称:awesome,代码行数:31,


示例11: _cairo_xcb_connection_free_pixmap

void_cairo_xcb_connection_free_pixmap (cairo_xcb_connection_t *connection,				   xcb_pixmap_t pixmap){    xcb_free_pixmap (connection->xcb_connection, pixmap);    _cairo_xcb_connection_put_xid (connection, pixmap);}
开发者ID:AntonioModer,项目名称:lua-files,代码行数:7,


示例12: redraw_screen

/* * Calls draw_image on a new pixmap and swaps that with the current pixmap * */void redraw_screen(void) {    /* avoid drawing if monitor state is not on */    if (dpms_capable) {        xcb_dpms_info_reply_t *dpms_info =            xcb_dpms_info_reply(conn,xcb_dpms_info(conn), NULL);        if (dpms_info) {            /* monitor is off when DPMS state is enabled and power level is not             * DPMS_MODE_ON */            uint8_t monitor_off = dpms_info->state                && dpms_info->power_level != XCB_DPMS_DPMS_MODE_ON;            free(dpms_info);            if (monitor_off)                return;        }    }    xcb_pixmap_t bg_pixmap = draw_image(last_resolution);    xcb_change_window_attributes(conn, win, XCB_CW_BACK_PIXMAP, (uint32_t[1]){ bg_pixmap });    /* XXX: Possible optimization: Only update the area in the middle of the     * screen instead of the whole screen. */    xcb_clear_area(conn, 0, win, 0, 0, last_resolution[0], last_resolution[1]);    xcb_free_pixmap(conn, bg_pixmap);    xcb_flush(conn);}
开发者ID:jlesquembre,项目名称:i3lock-blur,代码行数:29,


示例13: xcbosd_destroy

void xcbosd_destroy(xcbosd *osd){  assert (osd);  xcb_free_gc(osd->connection, osd->gc);  xcb_free_pixmap(osd->connection, osd->bitmap);  xcb_free_colormap(osd->connection, osd->cmap);  if(osd->mode==XCBOSD_SHAPED) {    xcb_free_gc(osd->connection, osd->u.shaped.mask_gc);    xcb_free_gc(osd->connection, osd->u.shaped.mask_gc_back);    xcb_free_pixmap(osd->connection, osd->u.shaped.mask_bitmap);    xcb_destroy_window(osd->connection, osd->u.shaped.window);  }  free (osd);}
开发者ID:Caught,项目名称:openpliPC,代码行数:17,


示例14: _cairo_boilerplate_xcb_cleanup

void_cairo_boilerplate_xcb_cleanup (void *closure){    xcb_target_closure_t *xtc = closure;    xcb_free_pixmap (xtc->c, xtc->pixmap);    xcb_disconnect (xtc->c);    free (xtc);}
开发者ID:Czerrr,项目名称:ISeeBrowser,代码行数:9,


示例15: _xcwm_window_composite_pixmap_release

static void_xcwm_window_composite_pixmap_release(xcwm_window_t *window){  if (window->composite_pixmap_id)    {      xcb_free_pixmap(window->context->conn, window->composite_pixmap_id);      window->composite_pixmap_id = 0;    }}
开发者ID:jon-turney,项目名称:libxcwm,代码行数:9,


示例16: ecore_x_pixmap_free

/** * Deletes the reference to the given pixmap. * * If no other clients have a reference to the given pixmap, the server * will destroy it. * * @param   pmap The given pixmap. * @ingroup Ecore_X_Pixmap_Group */EAPI voidecore_x_pixmap_free(Ecore_X_Pixmap pmap){   LOGFN(__FILE__, __LINE__, __FUNCTION__);   CHECK_XCB_CONN;   xcb_free_pixmap(_ecore_xcb_conn, pmap);//   ecore_x_flush();}
开发者ID:Limsik,项目名称:e17,代码行数:18,


示例17: xcb_connection

xcb_cursor_t QXcbCursor::createBitmapCursor(QCursor *cursor){    xcb_connection_t *conn = xcb_connection();    QPoint spot = cursor->hotSpot();    xcb_cursor_t c = XCB_NONE;    if (cursor->pixmap().depth() > 1)        c = qt_xcb_createCursorXRender(m_screen, cursor->pixmap().toImage(), spot);    if (!c) {        xcb_pixmap_t cp = qt_xcb_XPixmapFromBitmap(m_screen, cursor->bitmap()->toImage());        xcb_pixmap_t mp = qt_xcb_XPixmapFromBitmap(m_screen, cursor->mask()->toImage());        c = xcb_generate_id(conn);        xcb_create_cursor(conn, c, cp, mp, 0, 0, 0, 0xFFFF, 0xFFFF, 0xFFFF,                          spot.x(), spot.y());        xcb_free_pixmap(conn, cp);        xcb_free_pixmap(conn, mp);    }    return c;}
开发者ID:Drakey83,项目名称:steamlink-sdk,代码行数:18,


示例18: xcb_generate_id

void X11XRenderBackend::createBuffer(){    xcb_pixmap_t pixmap = xcb_generate_id(connection());    xcb_create_pixmap(connection(), Xcb::defaultDepth(), pixmap, rootWindow(), displayWidth(), displayHeight());    xcb_render_picture_t b = xcb_generate_id(connection());    xcb_render_create_picture(connection(), b, pixmap, m_format, 0, NULL);    xcb_free_pixmap(connection(), pixmap);   // The picture owns the pixmap now    setBuffer(b);}
开发者ID:8l,项目名称:kwin,代码行数:9,


示例19: redraw_screen

/* * Calls draw_image on a new pixmap and swaps that with the current pixmap * */void redraw_screen(void) {    xcb_pixmap_t bg_pixmap = draw_image(last_resolution);    xcb_change_window_attributes(conn, win, XCB_CW_BACK_PIXMAP, (uint32_t[1]){bg_pixmap});    /* XXX: Possible optimization: Only update the area in the middle of the     * screen instead of the whole screen. */    xcb_clear_area(conn, 0, win, 0, 0, last_resolution[0], last_resolution[1]);    xcb_free_pixmap(conn, bg_pixmap);    xcb_flush(conn);}
开发者ID:NathanHarrington,项目名称:i3lock-svg,代码行数:13,


示例20: xcb_render_free_picture

// Create the compositing buffer. The root window is not double-buffered,// so it is done manually using this buffer,void SceneXrender::createBuffer(){    if (buffer != XCB_RENDER_PICTURE_NONE)        xcb_render_free_picture(connection(), buffer);    xcb_pixmap_t pixmap = xcb_generate_id(connection());    xcb_create_pixmap(connection(), Xcb::defaultDepth(), pixmap, rootWindow(), displayWidth(), displayHeight());    buffer = xcb_generate_id(connection());    xcb_render_create_picture(connection(), buffer, pixmap, format, 0, NULL);    xcb_free_pixmap(connection(), pixmap);   // The picture owns the pixmap now}
开发者ID:walac,项目名称:kde-workspace,代码行数:12,


示例21: _xre_xcb_font_surface_free

void_xre_xcb_font_surface_free(XR_Font_Surface *fs){   if (!fs) return;   eina_hash_foreach(_xr_fg_pool, _xre_xcb_font_pool_cb, fs);   xcb_free_pixmap(fs->xinf->x11.connection, fs->draw);   xcb_render_free_picture(fs->xinf->x11.connection, fs->pic);   _xr_xcb_image_info_free(fs->xinf);   free(fs);}
开发者ID:OpenInkpot-archive,项目名称:iplinux-evas,代码行数:10,


示例22: dri3_free_back_buffer

static voiddri3_free_back_buffer(struct vl_dri3_screen *scrn,                        struct vl_dri3_buffer *buffer){   xcb_free_pixmap(scrn->conn, buffer->pixmap);   xcb_sync_destroy_fence(scrn->conn, buffer->sync_fence);   xshmfence_unmap_shm(buffer->shm_fence);   pipe_resource_reference(&buffer->texture, NULL);   FREE(buffer);}
开发者ID:BNieuwenhuizen,项目名称:mesa,代码行数:10,


示例23: towel_window_hide_cursor

static voidtowel_window_hide_cursor(towel_window_t *win){  xcb_cursor_t cur = xcb_generate_id (win->conn);  xcb_pixmap_t pix = xcb_generate_id (win->conn);  xcb_create_pixmap(win->conn, 1, pix, win->screen->root, 1, 1);  xcb_create_cursor(win->conn, cur, pix, pix, 0, 0, 0, 0, 0, 0, 0, 0);  xcb_change_window_attributes(win->conn, win->id,                               XCB_CW_CURSOR, &(uint32_t){cur});  xcb_free_pixmap(win->conn, pix);}
开发者ID:kanru,项目名称:towel,代码行数:11,


示例24: drawable_unset_surface

static voiddrawable_unset_surface(drawable_t *d){    cairo_surface_finish(d->surface);    cairo_surface_destroy(d->surface);    if (d->pixmap)        xcb_free_pixmap(globalconf.connection, d->pixmap);    d->refreshed = false;    d->surface = NULL;    d->pixmap = XCB_NONE;}
开发者ID:nil84,项目名称:awesome,代码行数:11,


示例25: cleanup

static voidcleanup (void *data){    struct closure *arg = data;    cairo_device_finish (arg->device);    cairo_device_destroy (arg->device);    xcb_free_pixmap (arg->connection, arg->pixmap);    xcb_disconnect (arg->connection);    free (arg);}
开发者ID:ghub,项目名称:NVprSDK,代码行数:13,


示例26: dri3_free_render_buffer

/** dri3_free_render_buffer * * Free everything associated with one render buffer including pixmap, fence * stuff and the driver image */static voiddri3_free_render_buffer(struct loader_dri3_drawable *draw,                        struct loader_dri3_buffer *buffer){   if (buffer->own_pixmap)      xcb_free_pixmap(draw->conn, buffer->pixmap);   xcb_sync_destroy_fence(draw->conn, buffer->sync_fence);   xshmfence_unmap_shm(buffer->shm_fence);   (draw->ext->image->destroyImage)(buffer->image);   if (buffer->linear_buffer)      (draw->ext->image->destroyImage)(buffer->linear_buffer);   free(buffer);}
开发者ID:BNieuwenhuizen,项目名称:mesa,代码行数:18,


示例27: _clean_scene

/* Free client side and server size resources. */static void _clean_scene(void *p) {    _exposed_win_t *next_ew, *free_ew = _this.bottom;    while (free_ew != NULL) {        next_ew = free_ew->next;        free(free_ew);        free_ew = next_ew;    }    _this.state = _IDLE;    fwm_composite_release_effects_window();    xcb_render_free_picture(gd.conn, _this.win_buffer_pic);    xcb_free_pixmap(gd.conn, _this.win_buffer);    xcb_flush(gd.conn);}
开发者ID:comick,项目名称:finalcm,代码行数:14,



注:本文中的xcb_free_pixmap函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ xcb_get_geometry函数代码示例
C++ xcb_flush函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。