当前位置: 首页>>代码示例>>C++>>正文


C++ AppleWMProcsPtr类代码示例

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


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

示例1: REQUEST

static int
ProcAppleWMFrameHitTest(
    register ClientPtr client
)
{
    xAppleWMFrameHitTestReply rep;
    BoxRec ir, or;
    int ret;
    REQUEST(xAppleWMFrameHitTestReq);

    REQUEST_SIZE_MATCH(xAppleWMFrameHitTestReq);
    rep.type = X_Reply;
    rep.length = 0;
    rep.sequenceNumber = client->sequence;

    ir = make_box (stuff->ix, stuff->iy, stuff->iw, stuff->ih);
    or = make_box (stuff->ox, stuff->oy, stuff->ow, stuff->oh);

    if (appleWMProcs->FrameHitTest(stuff->frame_class, stuff->px,
                                   stuff->py, &or, &ir, &ret) != Success)
    {
        return BadValue;
    }

    rep.ret = ret;

    WriteToClient(client, sizeof(xAppleWMFrameHitTestReply), (char *)&rep);
    return (client->noClientException);
}
开发者ID:hush-z,项目名称:VMGL,代码行数:29,代码来源:applewm.c

示例2: REQUEST

static int
ProcAppleWMFrameDraw(register ClientPtr client)
{
    BoxRec ir, or;
    unsigned int title_length, title_max;
    unsigned char *title_bytes;
    REQUEST(xAppleWMFrameDrawReq);
    WindowPtr pWin;

    REQUEST_AT_LEAST_SIZE(xAppleWMFrameDrawReq);

    if (Success != dixLookupWindow(&pWin, stuff->window, client,
                                   DixReadAccess))
        return BadValue;

    ir = make_box(stuff->ix, stuff->iy, stuff->iw, stuff->ih);
    or = make_box(stuff->ox, stuff->oy, stuff->ow, stuff->oh);

    title_length = stuff->title_length;
    title_max = (stuff->length << 2) - sizeof(xAppleWMFrameDrawReq);

    if (title_max < title_length)
        return BadValue;

    title_bytes = (unsigned char *)&stuff[1];

    errno = appleWMProcs->FrameDraw(pWin, stuff->frame_class,
                                    stuff->frame_attr, &or, &ir,
                                    title_length, title_bytes);
    if (errno != Success) {
        return errno;
    }

    return Success;
}
开发者ID:AmesianX,项目名称:xorg-server,代码行数:35,代码来源:applewm.c

示例3:

static int
ProcAppleWMReenableUpdate(register ClientPtr client)
{
    REQUEST_SIZE_MATCH(xAppleWMReenableUpdateReq);

    appleWMProcs->EnableUpdate();

    return Success;
}
开发者ID:AmesianX,项目名称:xorg-server,代码行数:9,代码来源:applewm.c

示例4: return

static int
ProcAppleWMReenableUpdate(
    register ClientPtr client
)
{
    REQUEST_SIZE_MATCH(xAppleWMReenableUpdateReq);

    appleWMProcs->EnableUpdate();

    return (client->noClientException);
}
开发者ID:hush-z,项目名称:VMGL,代码行数:11,代码来源:applewm.c


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