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


C++ HList::remove方法代码示例

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


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

示例1: ActivateWindow

static void ActivateWindow(guiserver_window* w)
{
    if (activeWindow != NULL) {
        if (Message::send(activeWindow->ThreadID, MSG_GUISERVER_DEACTIVATE, activeWindow->Handle) != M_OK) {
            monapi_warn("can't activate  window(%x), ignored.", w);
            if (w != NULL) {
                DisposeWindow(w->Handle);
            }
            return;
        }
    }
    if (w != NULL) {
        if (Message::send(w->ThreadID, MSG_GUISERVER_ACTIVATED, w->Handle) != M_OK) {
            DisposeWindow(w->Handle);
            monapi_warn("can't activate  window(%x), ignored. message failed", w);
            return;
        }
    }
    activeWindow = w;
    if (w == NULL) return;

    windows.remove(w);
    windows.add(w);
    if (w->Protocol == 0) DrawWindow(w);
}
开发者ID:Nirlendu,项目名称:mona,代码行数:25,代码来源:window.cpp

示例2: __mlibc_filelist_remove_by_element

    int __mlibc_filelist_remove_by_element(void *p, FILE* f)
    {
        HList<FILE*>* list;

        if( p == NULL ) p = __mlibc_filelist_initializer(p);
        list = (HList<FILE*>*)p;
        if( !list->hasElement(f) ) return 0;
        list->remove(f);
        return 1;
    }
开发者ID:higepon,项目名称:mona,代码行数:10,代码来源:filelist.cpp

示例3: unRegisterClient

 void unRegisterClient(uint32_t id)
 {
     clients_.remove(id);
 }
开发者ID:s50,项目名称:mona,代码行数:4,代码来源:main.cpp

示例4: WindowHandler

bool WindowHandler(MessageInfo* msg)
{
    switch (msg->header)
    {
        // ウィンドウ生成要求
        case MSG_GUISERVER_CREATEWINDOW:
        {
            guiserver_window* w = CreateWindow();
            w->ThreadID = msg->from;
            Message::reply(msg, w->Handle);
            break;
        }
        // ウィンドウ破棄要求
        case MSG_GUISERVER_DISPOSEWINDOW:
            DisposeWindow(msg->arg1);
            Message::reply(msg);
            break;
        // ウィンドウ描画要求
        case MSG_GUISERVER_DRAWWINDOW:
            if (msg->arg2 != 0 && msg->arg3 != 0) {
                // 部分描画
                DrawWindow(GetWindowPointer(msg->arg1),
                    GET_X_DWORD(msg->arg2), GET_Y_DWORD(msg->arg2),
                    GET_X_DWORD(msg->arg3), GET_Y_DWORD(msg->arg3), true);
            } else {
                DrawWindow(GetWindowPointer(msg->arg1), true);
            }
            Message::reply(msg);
            break;
        // ウィンドウ移動要求
        case MSG_GUISERVER_MOVEWINDOW:
            MoveWindow(GetWindowPointer(msg->arg1), (int)msg->arg2, (int)msg->arg3);
            Message::reply(msg);
            break;
        // ウィンドウ最前面移動要求
        case MSG_GUISERVER_WINDOWTOFRONTMOST:
        {
            guiserver_window* w = GetWindowPointer(msg->arg1);
            windows.remove(w);
            windows.add(w);
            if (msg->arg2 != 0) DrawWindow(w);
            Message::reply(msg);
            break;
        }
        // アクティブ化要求
        case MSG_GUISERVER_ACTIVATEWINDOW:
            ActivateWindow(GetWindowPointer(msg->arg1));
            Message::reply(msg);
            break;
        // ウィンドウ列挙要求
        case MSG_GUISERVER_ENUMWINDOWS:
        {
            int size = windows.size();
            int max_count = MESSAGE_INFO_MAX_STR_LENGTH / sizeof(uint32_t); // msg.str = 128 bytes
            int max_loop_count;
            if (size > max_count)
            {
                max_loop_count = max_count;
                printf("windows size over %d/%d  %s:%d\n", max_count, size, __FILE__, __LINE__);
            }
            else
            {

                max_loop_count = size;
            }
            int i;
            char str[128];
            for (i = 0; i < max_loop_count; i++)
            {
                guiserver_window* w = windows[i];
                *((uint32_t*)(&str[i * sizeof(uint32_t)])) = w->Handle;
            }
            Message::reply(msg, max_loop_count, NULL, str);
            break;
        }
        // タイトル情報
        case MSG_GUISERVER_GETTITLE:
    {
            guiserver_window* w = GetWindowPointer(msg->arg1);
            Message::reply(msg, NULL, NULL, w->name);
            break;
    }
        // マウス情報
        case MSG_MOUSE_INFO:
            ProcessMouseInfo(msg);
            break;
        // キー情報
        case MSG_KEY_VIRTUAL_CODE:
            if (msg->arg1 == MonAPI::Keys::Tab && msg->arg2 & KEY_MODIFIER_ALT) {
                RotateActiveWindow();
                break;
            }
            ProcessKeyInfo(msg);
            break;
        // キャプチャー要求
        case MSG_GUISERVER_MOUSECAPTURE:
        {
            guiserver_window* w = GetWindowPointer(msg->arg1);
            if (w != NULL)
            {
//.........这里部分代码省略.........
开发者ID:Nirlendu,项目名称:mona,代码行数:101,代码来源:window.cpp


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