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

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

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

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

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

示例1: Q_XCB_CALL

void QXcbWindow::setGeometry(const QRect &rect){    QPlatformWindow::setGeometry(rect);    const quint32 mask = XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y | XCB_CONFIG_WINDOW_WIDTH | XCB_CONFIG_WINDOW_HEIGHT;    const quint32 values[] = { rect.x(), rect.y(), rect.width(), rect.height() };    Q_XCB_CALL(xcb_configure_window(xcb_connection(), m_window, mask, values));}
开发者ID:wpbest,项目名称:copperspice,代码行数:9,


示例2: qCDebug

void XWaylandManager::handleConfigureRequest(xcb_configure_request_event_t *event){    qCDebug(XWAYLAND_TRACE, "XCB_CONFIGURE_REQUEST (window %d) %d,%d @ %dx%d",            event->window, event->x, event->y, event->width, event->height);    if (!m_windowsMap.contains(event->window))        return;    XWaylandShellSurface *shellSurface = m_windowsMap[event->window];    if (!shellSurface->surface())        return;    if (shellSurface->fullscreen()) {        xcb_configure_notify_event_t notify;        notify.response_type = XCB_CONFIGURE_NOTIFY;        notify.pad0 = 0;        notify.event = event->window;        notify.window = event->window;        notify.above_sibling = XCB_WINDOW_NONE;        notify.x = event->x;        notify.y = event->y;        notify.width = event->width;        notify.height = event->height;        notify.border_width = 0;        notify.override_redirect = 0;        notify.pad1 = 0;        xcb_send_event(Xcb::connection(), 0, event->window, XCB_EVENT_MASK_STRUCTURE_NOTIFY, (char *) &notify);        return;    }    int x = 0, y = 0;    QSize size = shellSurface->surface()->size();    if (event->value_mask & XCB_CONFIG_WINDOW_WIDTH)        size.setWidth(event->width);    if (event->value_mask & XCB_CONFIG_WINDOW_HEIGHT)        size.setHeight(event->height);    quint32 i = 0, values[16];    values[i++] = x;    values[i++] = y;    values[i++] = size.width();    values[i++] = size.height();    values[i++] = 0;    quint32 mask = XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y |                   XCB_CONFIG_WINDOW_WIDTH | XCB_CONFIG_WINDOW_HEIGHT |                   XCB_CONFIG_WINDOW_BORDER_WIDTH;    if (event->value_mask & XCB_CONFIG_WINDOW_SIBLING) {        values[i++] = event->sibling;        mask |= XCB_CONFIG_WINDOW_SIBLING;    }    if (event->value_mask & XCB_CONFIG_WINDOW_STACK_MODE) {        values[i++] = event->stack_mode;        mask |= XCB_CONFIG_WINDOW_STACK_MODE;    }    xcb_configure_window(Xcb::connection(), event->window, mask, values);}
开发者ID:greenisland,项目名称:greenisland,代码行数:57,


示例3: window_stack

void window_stack(xcb_window_t w1, xcb_window_t w2, uint32_t mode){	if (w2 == XCB_NONE) {		return;	}	uint16_t mask = XCB_CONFIG_WINDOW_SIBLING | XCB_CONFIG_WINDOW_STACK_MODE;	uint32_t values[] = {w2, mode};	xcb_configure_window(dpy, w1, mask, values);}
开发者ID:Stebalien,项目名称:bspwm,代码行数:9,


示例4: luaA_systray

/** Update the systray * /param L The Lua VM state. * /return The number of elements pushed on stack. * /luastack * /lparam The drawin to display the systray in. * /lparam x X position for the systray. * /lparam y Y position for the systray. * /lparam base_size The size (width and height) each systray item gets. * /lparam horiz If true, the systray is horizontal, else vertical. * /lparam bg Color of the systray background. * /lparam revers If true, the systray icon order will be reversed, else default. * /lparam spacing The size of the spacing between icons. */intluaA_systray(lua_State *L){    systray_register();    if(lua_gettop(L) != 0)    {        size_t bg_len;        drawin_t *w = luaA_checkudata(L, 1, &drawin_class);        int x = luaL_checkinteger(L, 2);        int y = luaL_checkinteger(L, 3);        int base_size = luaL_checkinteger(L, 4);        bool horiz = lua_toboolean(L, 5);        const char *bg = luaL_checklstring(L, 6, &bg_len);        bool revers = lua_toboolean(L, 7);        int spacing = luaL_checkinteger(L, 8);        color_t bg_color;        if(color_init_reply(color_init_unchecked(&bg_color, bg, bg_len)))        {            uint32_t config_back[] = { bg_color.pixel };            xcb_change_window_attributes(globalconf.connection,                                         globalconf.systray.window,                                         XCB_CW_BACK_PIXEL, config_back);        }        if(globalconf.systray.parent != w)            xcb_reparent_window(globalconf.connection,                                globalconf.systray.window,                                w->window,                                x, y);        else        {            uint32_t config_vals[2] = { x, y };            xcb_configure_window(globalconf.connection,                                 globalconf.systray.window,                                 XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y,                                 config_vals);        }        globalconf.systray.parent = w;        if(globalconf.embedded.len != 0)        {            systray_update(base_size, horiz, revers, spacing);            xcb_map_window(globalconf.connection,                           globalconf.systray.window);        }        else            xcb_unmap_window(globalconf.connection,                             globalconf.systray.window);    }    lua_pushinteger(L, globalconf.embedded.len);    luaA_object_push(L, globalconf.systray.parent);    return 2;}
开发者ID:findkiko,项目名称:awesome,代码行数:70,


示例5: systray_update

static voidsystray_update(int base_size, bool horizontal, bool reverse, int spacing){    if(base_size <= 0)        return;    int embedded_len = globalconf.embedded.len + 1;    /* Give the systray window the correct size */    uint32_t config_vals[4] = { base_size, base_size, 0, 0 };    if(horizontal)        config_vals[0] = base_size * embedded_len + spacing * (embedded_len - 1);    else        config_vals[1] = base_size * embedded_len + spacing * (embedded_len - 1);    xcb_configure_window(globalconf.connection,                         globalconf.systray.window,                         XCB_CONFIG_WINDOW_WIDTH | XCB_CONFIG_WINDOW_HEIGHT,                         config_vals);    /* Now resize each embedded window */    config_vals[0] = config_vals[1] = 0;    config_vals[2] = config_vals[3] = base_size;    fprintf(stderr, "embedded len: %d /n", sizeof(globalconf.embedded.tab) / sizeof(globalconf.embedded.tab[0]));    for(int i = 0; i < embedded_len + 1; i++)    {        xembed_window_t *em;        if(reverse)            em = &globalconf.embedded.tab[(embedded_len - i - 1)];        else            em = &globalconf.embedded.tab[i];        xcb_configure_window(globalconf.connection, em->win,                             XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y | XCB_CONFIG_WINDOW_WIDTH | XCB_CONFIG_WINDOW_HEIGHT,                             config_vals);        xcb_map_window(globalconf.connection, em->win);        if(horizontal)            config_vals[0] += base_size + spacing;        else            config_vals[1] += base_size + spacing;    }}
开发者ID:mcm3c,项目名称:configs,代码行数:44,


示例6: vout_display_PlacePicture

/** * Return a direct buffer */static picture_pool_t *Pool (vout_display_t *vd, unsigned requested_count){    vout_display_sys_t *p_sys = vd->sys;    (void)requested_count;    if (!p_sys->pool)    {        vout_display_place_t place;        vout_display_PlacePicture (&place, &vd->source, vd->cfg, false);        /* */        const uint32_t values[] = { place.x, place.y, place.width, place.height };        xcb_configure_window (p_sys->conn, p_sys->window,                              XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y |                              XCB_CONFIG_WINDOW_WIDTH | XCB_CONFIG_WINDOW_HEIGHT,                              values);        picture_t *pic = picture_NewFromFormat (&vd->fmt);        if (!pic)            return NULL;        assert (pic->i_planes == 1);        memset (p_sys->resource, 0, sizeof(p_sys->resource));        unsigned count;        picture_t *pic_array[MAX_PICTURES];        for (count = 0; count < MAX_PICTURES; count++)        {            picture_resource_t *res = &p_sys->resource[count];            res->p->i_lines = pic->p->i_lines;            res->p->i_pitch = pic->p->i_pitch;            if (PictureResourceAlloc (vd, res, res->p->i_pitch * res->p->i_lines,                                      p_sys->conn, p_sys->shm))                break;            pic_array[count] = picture_NewFromResource (&vd->fmt, res);            if (!pic_array[count])            {                PictureResourceFree (res, p_sys->conn);                memset (res, 0, sizeof(*res));                break;            }        }        picture_Release (pic);        if (count == 0)            return NULL;        p_sys->pool = picture_pool_New (count, pic_array);        /* TODO release picture resources if NULL */        xcb_flush (p_sys->conn);    }    return p_sys->pool;}
开发者ID:paa,项目名称:vlc,代码行数:59,


示例7: assert

	void	Window::resize_to(uint32_t width, uint32_t height)	{		assert(width != 0);		assert(height != 0);				uint16_t	mask = XCB_CONFIG_WINDOW_WIDTH | XCB_CONFIG_WINDOW_HEIGHT;		uint32_t	values[] = {width, height};		xcb_configure_window(conn->xcb(), window, mask, values);	}
开发者ID:quadra,项目名称:manix,代码行数:10,


示例8: raise_window

static voidraise_window(xcb_connection_t *xcb_conn, xcb_window_t window){    const uint32_t values[] = {        XCB_STACK_MODE_ABOVE    };    xcb_configure_window(xcb_conn, window,                         XCB_CONFIG_WINDOW_STACK_MODE, values);}
开发者ID:kristiandelay,项目名称:rutabaga,代码行数:10,


示例9: open_fullscreen_window

xcb_window_t open_fullscreen_window(xcb_connection_t *conn, xcb_screen_t *scr, char *color, xcb_pixmap_t pixmap) {    uint32_t mask = 0;    uint32_t values[3];    xcb_window_t win = xcb_generate_id(conn);    if (pixmap == XCB_NONE) {        mask |= XCB_CW_BACK_PIXEL;        values[0] = get_colorpixel(color);    } else {        mask |= XCB_CW_BACK_PIXMAP;        values[0] = pixmap;    }    mask |= XCB_CW_OVERRIDE_REDIRECT;    values[1] = 1;    mask |= XCB_CW_EVENT_MASK;    values[2] = XCB_EVENT_MASK_EXPOSURE |                XCB_EVENT_MASK_KEY_PRESS |                XCB_EVENT_MASK_KEY_RELEASE |                XCB_EVENT_MASK_VISIBILITY_CHANGE |                XCB_EVENT_MASK_STRUCTURE_NOTIFY;    xcb_create_window(conn,                      XCB_COPY_FROM_PARENT,                      win, /* the window id */                      scr->root, /* parent == root */                      0, 0,                      scr->width_in_pixels,                      scr->height_in_pixels, /* dimensions */                      0, /* border = 0, we draw our own */                      XCB_WINDOW_CLASS_INPUT_OUTPUT,                      XCB_WINDOW_CLASS_COPY_FROM_PARENT, /* copy visual from parent */                      mask,                      values);    char *name = "i3lock";    xcb_change_property(conn,                        XCB_PROP_MODE_REPLACE,                        win,                        XCB_ATOM_WM_NAME,                        XCB_ATOM_STRING,                        8,                        strlen(name),                        name);    /* Map the window (= make it visible) */    xcb_map_window(conn, win);    /* Raise window (put it on top) */    values[0] = XCB_STACK_MODE_ABOVE;    xcb_configure_window(conn, win, XCB_CONFIG_WINDOW_STACK_MODE, values);    return win;}
开发者ID:jollheef,项目名称:i3lock-clock,代码行数:55,


示例10: xcb_configure_window

void Client::setRect(const Rect &rect){    mRect = rect;    xcb_connection_t* conn = WindowManager::instance()->connection();    const uint16_t mask = (XCB_CONFIG_WINDOW_X|XCB_CONFIG_WINDOW_Y                           |XCB_CONFIG_WINDOW_WIDTH|XCB_CONFIG_WINDOW_HEIGHT);    const uint32_t values[4] = { static_cast<uint32_t>(rect.x), static_cast<uint32_t>(rect.y),                                 static_cast<uint32_t>(rect.width), static_cast<uint32_t>(rect.height) };    xcb_configure_window(conn, mFrame, mask, values);}
开发者ID:jhanssen,项目名称:nwm,代码行数:11,


示例11: overlay_show

void overlay_show(struct overlay * overlay, int x, int y, int w, int h, int border) {    xcb_connection_t * connection = overlay->connection;    const uint32_t XYWH = XCB_CONFIG_WINDOW_X                        | XCB_CONFIG_WINDOW_Y                        | XCB_CONFIG_WINDOW_WIDTH                        | XCB_CONFIG_WINDOW_HEIGHT;    xcb_map_window(overlay->connection, overlay->top);    xcb_map_window(overlay->connection, overlay->left);    xcb_map_window(overlay->connection, overlay->right);    xcb_map_window(overlay->connection, overlay->bottom);    uint32_t xywh[4];    xywh[0] = x; xywh[1] = y; xywh[2] = w; xywh[3] = border;    xcb_configure_window(connection, overlay->top, XYWH, xywh);    xywh[0] = x; xywh[1] = y; xywh[2] = border; xywh[3] = h;    xcb_configure_window(connection, overlay->left, XYWH, xywh);    xywh[0] = x+w-border; xywh[1] = y; xywh[2] = border; xywh[3] = h;    xcb_configure_window(connection, overlay->right, XYWH, xywh);    xywh[0] = x; xywh[1] = y+h-border; xywh[2] = w; xywh[3] = border;    xcb_configure_window(connection, overlay->bottom, XYWH, xywh);    xcb_flush(overlay->connection);}
开发者ID:llandsmeer,项目名称:i3-focus-overlay,代码行数:21,


示例12: client_resize_client

void client_resize_client(Client *c, int x, int y, int w, int h) {	uint32_t values[] = { x, y, w, h, c->bw };	xcb_configure_window(conn, c->win, XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y | 		XCB_CONFIG_WINDOW_WIDTH | XCB_CONFIG_WINDOW_HEIGHT | XCB_CONFIG_WINDOW_BORDER_WIDTH,		values);	c->oldx = c->x; c->x = x;	c->oldy = c->y; c->y = y;	c->oldw = c->w; c->w = w;	c->oldh = c->h; c->h = h;	client_configure(c);	xcb_flush(conn);}
开发者ID:julian-goldsmith,项目名称:dwm-xcb,代码行数:12,


示例13: center_pointer

static voidcenter_pointer (xcb_window_t win) {	uint32_t values[1];	xcb_get_geometry_reply_t *geom;	geom = xcb_get_geometry_reply(conn, xcb_get_geometry(conn, win), NULL);	xcb_warp_pointer(conn, XCB_NONE, win, 0, 0, 0, 0,			(geom->width  + (BORDERWIDTH * 2)) / 2,			(geom->height + (BORDERWIDTH * 2)) / 2);	values[0] = XCB_STACK_MODE_ABOVE;	xcb_configure_window(conn, win, XCB_CONFIG_WINDOW_STACK_MODE, values);}
开发者ID:JuliusP,项目名称:swm,代码行数:13,


示例14: warning

void Client::move(const Point& point){    warning() << "move" << point << this;    mRect.x = point.x;    mRect.y = point.y;    if (!mFrame)        return;    xcb_connection_t* conn = WindowManager::instance()->connection();    const uint16_t mask = XCB_CONFIG_WINDOW_X|XCB_CONFIG_WINDOW_Y;    const uint32_t values[2] = { static_cast<uint32_t>(point.x), static_cast<uint32_t>(point.y) };    xcb_configure_window(conn, mFrame, mask, values);}
开发者ID:jhanssen,项目名称:nwm,代码行数:13,


示例15: systray_update

static voidsystray_update(int base_size, bool horizontal, bool reverse){    if(base_size <= 0)        return;    /* Give the systray window the correct size */    uint32_t config_vals[4] = { base_size, base_size, 0, 0 };    if(horizontal)        config_vals[0] = base_size * globalconf.embedded.len;    else        config_vals[1] = base_size * globalconf.embedded.len;    xcb_configure_window(globalconf.connection,                         globalconf.systray.window,                         XCB_CONFIG_WINDOW_WIDTH | XCB_CONFIG_WINDOW_HEIGHT,                         config_vals);    /* Now resize each embedded window */    config_vals[0] = config_vals[1] = 0;    config_vals[2] = config_vals[3] = base_size;    for(int i = 0; i < globalconf.embedded.len; i++)    {        xembed_window_t *em;        if(reverse)            em = &globalconf.embedded.tab[(globalconf.embedded.len - i - 1)];        else            em = &globalconf.embedded.tab[i];        xcb_configure_window(globalconf.connection, em->win,                             XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y | XCB_CONFIG_WINDOW_WIDTH | XCB_CONFIG_WINDOW_HEIGHT,                             config_vals);        xcb_map_window(globalconf.connection, em->win);        if(horizontal)            config_vals[0] += base_size;        else            config_vals[1] += base_size;    }}
开发者ID:tail,项目名称:awesome,代码行数:39,


示例16: printf

	void	RootWindow::onConfigureRequestEvent(		xcb_configure_request_event_t* event)	{		printf("configure_request on root: window=0x%08X x=%d y=%d width=%d height=%d/n",			event->window, event->x, event->y, event->width, event->height);		uint32_t			mask = { XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y | XCB_CONFIG_WINDOW_WIDTH | XCB_CONFIG_WINDOW_HEIGHT | XCB_CONFIG_WINDOW_BORDER_WIDTH };		uint32_t			values[5] = { event->x, event->y, event->width, event->height, event->border_width };		xcb_configure_window(mWindow.getConnection(), event->window, mask, values);		xcb_flush(mWindow.getConnection());	}
开发者ID:psamathos,项目名称:manix,代码行数:13,


示例17: drawin_moveresize

/** Move and/or resize a drawin * /param L The Lua VM state. * /param udx The index of the drawin. * /param geometry The new geometry. */static voiddrawin_moveresize(lua_State *L, int udx, area_t geometry){    drawin_t *w = luaA_checkudata(L, udx, &drawin_class);    int number_of_vals = 0;    uint32_t moveresize_win_vals[4], mask_vals = 0;    if(w->geometry.x != geometry.x)    {        w->geometry.x = moveresize_win_vals[number_of_vals++] = geometry.x;        mask_vals |= XCB_CONFIG_WINDOW_X;    }    if(w->geometry.y != geometry.y)    {        w->geometry.y = moveresize_win_vals[number_of_vals++] = geometry.y;        mask_vals |= XCB_CONFIG_WINDOW_Y;    }    if(geometry.width > 0 && w->geometry.width != geometry.width)    {        w->geometry.width = moveresize_win_vals[number_of_vals++] = geometry.width;        mask_vals |= XCB_CONFIG_WINDOW_WIDTH;    }    if(geometry.height > 0 && w->geometry.height != geometry.height)    {        w->geometry.height = moveresize_win_vals[number_of_vals++] = geometry.height;        mask_vals |= XCB_CONFIG_WINDOW_HEIGHT;    }    drawin_update_drawing(w, udx);    /* Activate BMA */    client_ignore_enterleave_events();    if(mask_vals)        xcb_configure_window(globalconf.connection, w->window, mask_vals, moveresize_win_vals);    /* Deactivate BMA */    client_restore_enterleave_events();    if(mask_vals & XCB_CONFIG_WINDOW_X)        luaA_object_emit_signal(L, udx, "property::x", 0);    if(mask_vals & XCB_CONFIG_WINDOW_Y)        luaA_object_emit_signal(L, udx, "property::y", 0);    if(mask_vals & XCB_CONFIG_WINDOW_WIDTH)        luaA_object_emit_signal(L, udx, "property::width", 0);    if(mask_vals & XCB_CONFIG_WINDOW_HEIGHT)        luaA_object_emit_signal(L, udx, "property::height", 0);}
开发者ID:awesomeWM,项目名称:awesomeWM.github.io,代码行数:56,


示例18: subscribe

static voidsubscribe(xcb_window_t win){	uint32_t values[2];	/* subscribe to events */	values[0] = XCB_EVENT_MASK_ENTER_WINDOW;	values[1] = XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY;	xcb_change_window_attributes(conn, win, XCB_CW_EVENT_MASK, values);	/* border width */	values[0] = BORDERWIDTH;	xcb_configure_window(conn, win, XCB_CONFIG_WINDOW_BORDER_WIDTH, values);}
开发者ID:Uladox,项目名称:.sxhkd.d,代码行数:14,


示例19: xcb_configure_window

    //_____________________________________________    void SizeGrip::updateActiveState( void )    {        #if OXYGEN_HAVE_X11        if( QX11Info::isPlatformX11() )        {            const quint32 value = XCB_STACK_MODE_ABOVE;            xcb_configure_window( QX11Info::connection(), winId(), XCB_CONFIG_WINDOW_STACK_MODE, &value );            xcb_map_window( QX11Info::connection(), winId() );        }        #endif        update();    }
开发者ID:badzso,项目名称:oxygen,代码行数:15,


示例20: simplewindow_move

/** Move a simple window. * /param sw The simple window to move. * /param x New x coordinate. * /param y New y coordinate. */voidsimplewindow_move(simple_window_t *sw, int x, int y){    const uint32_t move_win_vals[] = { x, y };    if(x != sw->geometry.x || y != sw->geometry.y)    {        sw->geometry.x = x;        sw->geometry.y = y;        xcb_configure_window(globalconf.connection, sw->window,                             XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y,                             move_win_vals);    }}
开发者ID:kanru,项目名称:awesome,代码行数:19,


示例21: init_bar

staticint init_bar() {    uint32_t vals[4];    xcb_void_cookie_t cookie;    xcb_generic_error_t *err;    /* create status bar window at the bottom */    bar_.w = nil_.scr->width_in_pixels;    bar_.h = nil_.font.ascent + nil_.font.descent + 2;    bar_.x = 0;    bar_.y = nil_.scr->height_in_pixels - bar_.h;    bar_.win = xcb_generate_id(nil_.con);    vals[0] = XCB_BACK_PIXMAP_PARENT_RELATIVE;    vals[1] = 1;    /* override_redirect */    vals[2] = XCB_EVENT_MASK_BUTTON_PRESS | XCB_EVENT_MASK_EXPOSURE;    vals[3] = nil_.cursor[CURSOR_NORMAL];    cookie = xcb_create_window_checked(nil_.con, nil_.scr->root_depth, bar_.win,        nil_.scr->root, bar_.x, bar_.y, bar_.w, bar_.h, 0, XCB_COPY_FROM_PARENT,        nil_.scr->root_visual, XCB_CW_BACK_PIXMAP | XCB_CW_OVERRIDE_REDIRECT        | XCB_CW_EVENT_MASK | XCB_CW_CURSOR, vals);    err = xcb_request_check(nil_.con, cookie);    if (err) {        NIL_ERR("create window %d", err->error_code);        return -1;    }    vals[0] = XCB_STACK_MODE_ABOVE;    xcb_configure_window(nil_.con, bar_.win, XCB_CONFIG_WINDOW_STACK_MODE, &vals[0]);    cookie = xcb_map_window_checked(nil_.con, bar_.win);    err = xcb_request_check(nil_.con, cookie);    if (err) {        NIL_ERR("map window %d", err->error_code);        return -1;    }    /* graphic context */    bar_.gc = xcb_generate_id(nil_.con);    vals[0] = nil_.color.bar_fg;    vals[1] = nil_.color.bar_bg;    vals[2] = nil_.font.id;    cookie = xcb_create_gc_checked(nil_.con, bar_.gc, bar_.win, XCB_GC_FOREGROUND        | XCB_GC_BACKGROUND | XCB_GC_FONT, vals);    err = xcb_request_check(nil_.con, cookie);    if (err) {        NIL_ERR("map window %d", err->error_code);        return -1;    }    return 0;}
开发者ID:nqv,项目名称:nilwm,代码行数:48,


示例22: gl_update

extern void gl_update(gs_device_t *device){	Display *display = device->plat->display;	xcb_window_t window = device->cur_swap->wi->window;	uint32_t values[] = {		device->cur_swap->info.cx,		device->cur_swap->info.cy	};	xcb_configure_window(		XGetXCBConnection(display), window,		XCB_CONFIG_WINDOW_WIDTH | XCB_CONFIG_WINDOW_HEIGHT,		values	);}
开发者ID:xmxiaoq,项目名称:obs-studio,代码行数:16,


示例23: position

    //_______________________________________________________________________________    void SizeGrip::updatePosition( void )    {        #if OXYGEN_HAVE_X11        if( !QX11Info::isPlatformX11() ) return;        auto c = m_decoration.data()->client().data();        QPoint position(            c->width() - GripSize - Offset,            c->height() - GripSize - Offset );        quint32 values[2] = { quint32(position.x()), quint32(position.y()) };        xcb_configure_window( QX11Info::connection(), winId(), XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y, values );        #endif    }
开发者ID:badzso,项目名称:oxygen,代码行数:17,


示例24: setup_win

static voidsetup_win (xcb_window_t win) {	uint32_t mask = 0, values[3];	values[0] = XCB_EVENT_MASK_ENTER_WINDOW;	values[1] = XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY;	xcb_change_window_attributes_checked(conn, win, XCB_CW_EVENT_MASK,			values);	/* border width */	values[0] = BORDERWIDTH;	values[1] = XCB_NONE;	mask = XCB_CONFIG_WINDOW_BORDER_WIDTH;	xcb_configure_window(conn, win, mask, values);}
开发者ID:JuliusP,项目名称:swm,代码行数:16,


示例25: teleport

static voidteleport (xcb_window_t win, int x, int y, int w, int h){	uint32_t values[4];	uint32_t mask =   XCB_CONFIG_WINDOW_X                        | XCB_CONFIG_WINDOW_Y                        | XCB_CONFIG_WINDOW_WIDTH	                | XCB_CONFIG_WINDOW_HEIGHT;	values[0] = x;	values[1] = y;	values[2] = w;	values[3] = h;	xcb_configure_window(conn, win, mask, values);}
开发者ID:danil,项目名称:core,代码行数:16,


示例26: _e_alert_button_move_resize

static void_e_alert_button_move_resize(xcb_window_t btn, int x, int y, int w, int h){   uint32_t list[4], mask;   if (!btn) return;   mask = (XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y |           XCB_CONFIG_WINDOW_WIDTH | XCB_CONFIG_WINDOW_HEIGHT);   list[0] = x;   list[1] = y;   list[2] = w;   list[3] = h;   xcb_configure_window(conn, btn, mask, (const uint32_t *)&list);}
开发者ID:nuclearcanary,项目名称:moksha,代码行数:16,


示例27: xcb_connect

void v_window::_initOSWindow() {    int screenNumber = 0;    _xcb_connection = xcb_connect(nullptr,&screenNumber);    const xcb_setup_t* setup = xcb_get_setup(_xcb_connection);    xcb_screen_iterator_t it = xcb_setup_roots_iterator(setup);    xcb_screen_t* screen = it.data;    _xcb_window = xcb_generate_id(_xcb_connection);    uint32_t value_mask, value_list[ 32 ];    int16_t x=0,y=0;    value_mask = XCB_CW_BACK_PIXEL | XCB_CW_EVENT_MASK;    value_list[0] = screen->black_pixel;    value_list[1] = XCB_EVENT_MASK_EXPOSURE | XCB_EVENT_MASK_KEY_RELEASE | XCB_EVENT_MASK_STRUCTURE_NOTIFY;   //需要接收的事件    xcb_create_window(_xcb_connection,                      XCB_COPY_FROM_PARENT,                      _xcb_window,                      screen->root,                      x,y,                      _width,_height,                      1,                      XCB_WINDOW_CLASS_INPUT_OUTPUT,                      screen->root_visual,                      value_mask,                      value_list);    /* Magic code that will send notification when window is destroyed */    xcb_intern_atom_cookie_t cookie = xcb_intern_atom( _xcb_connection, 1, 12, "WM_PROTOCOLS" );    xcb_intern_atom_reply_t *reply = xcb_intern_atom_reply( _xcb_connection, cookie, 0 );    xcb_intern_atom_cookie_t cookie2 = xcb_intern_atom( _xcb_connection, 0, 16, "WM_DELETE_WINDOW" );    _xcb_atom_window_reply = xcb_intern_atom_reply( _xcb_connection, cookie2, 0 );    xcb_change_property( _xcb_connection, XCB_PROP_MODE_REPLACE, _xcb_window,                         ( *reply ).atom, 4, 32, 1,                         &( *_xcb_atom_window_reply ).atom );    free( reply );    xcb_map_window(_xcb_connection,_xcb_window);    // Force the x/y coordinates to 100,100 results are identical in consecutive    const uint32_t coords[] = { 100, 100 };    xcb_configure_window( _xcb_connection, _xcb_window, XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y, coords );    xcb_flush(_xcb_connection);}
开发者ID:azjune,项目名称:vk_render,代码行数:47,


示例28: event_handle_configurerequest_configure_window

static voidevent_handle_configurerequest_configure_window(xcb_configure_request_event_t *ev){    uint16_t config_win_mask = 0;    uint32_t config_win_vals[7];    unsigned short i = 0;    if(ev->value_mask & XCB_CONFIG_WINDOW_X)    {        config_win_mask |= XCB_CONFIG_WINDOW_X;        config_win_vals[i++] = ev->x;    }    if(ev->value_mask & XCB_CONFIG_WINDOW_Y)    {        config_win_mask |= XCB_CONFIG_WINDOW_Y;        config_win_vals[i++] = ev->y;    }    if(ev->value_mask & XCB_CONFIG_WINDOW_WIDTH)    {        config_win_mask |= XCB_CONFIG_WINDOW_WIDTH;        config_win_vals[i++] = ev->width;    }    if(ev->value_mask & XCB_CONFIG_WINDOW_HEIGHT)    {        config_win_mask |= XCB_CONFIG_WINDOW_HEIGHT;        config_win_vals[i++] = ev->height;    }    if(ev->value_mask & XCB_CONFIG_WINDOW_BORDER_WIDTH)    {        config_win_mask |= XCB_CONFIG_WINDOW_BORDER_WIDTH;        config_win_vals[i++] = ev->border_width;    }    if(ev->value_mask & XCB_CONFIG_WINDOW_SIBLING)    {        config_win_mask |= XCB_CONFIG_WINDOW_SIBLING;        config_win_vals[i++] = ev->sibling;    }    if(ev->value_mask & XCB_CONFIG_WINDOW_STACK_MODE)    {        config_win_mask |= XCB_CONFIG_WINDOW_STACK_MODE;        config_win_vals[i++] = ev->stack_mode;    }    xcb_configure_window(globalconf.connection, ev->window, config_win_mask, config_win_vals);}
开发者ID:paul,项目名称:awesome,代码行数:45,



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


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