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


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

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


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

示例1: DisposeWindowFromThreadID

void DisposeWindowFromThreadID(uint32_t tid)
{
    for (int i = 0; i < captures.size(); i++)
    {
        if (captures[i]->ThreadID == tid)
        {
            captures.removeAt(i);
            i--;
        }
    }
    for (int i = 0; i < windows.size(); i++)
    {
        guiserver_window* w = windows[i];
        if (w->ThreadID == tid)
        {
            if (prevWindow == w) prevWindow = NULL;
            if (activeWindow == w) {
                activeWindow = NULL;
//                ActivateWindow(NULL);
            }
            if (w->FormBufferHandle != 0)
            {
                w->Visible = false;
                DrawWindow(w);
            }
            windows.removeAt(i);
            MemoryMap::unmap(w->Handle);
            i--;
        }
    }
    if (activeWindow == NULL) ActivateWindow(GetFrontWindow());
}
开发者ID:Nirlendu,项目名称:mona,代码行数:32,代码来源:window.cpp

示例2: GetTargetWindow

guiserver_window* GetTargetWindow(int x, int y)
{
    int size = captures.size();
    if (size > 0)
    {
        return captures[size - 1];
    }

    for (int i = windows.size() - 1; i >= 0; i--)
    {
        guiserver_window* w = windows[i];
        if (w->Parent != 0 || (w->Flags & WINDOWFLAGS_TOPMOST) == 0) continue;
        if (IsInWindow(w, x, y)) return w;
    }
    for (int i = windows.size() - 1; i >= 0; i--)
    {
        guiserver_window* w = windows[i];
        if (w->Parent != 0 || (w->Flags & WINDOWFLAGS_TOPMOST) != 0 || (w->Flags & WINDOWFLAGS_BOTTOMMOST) != 0) continue;
        if (IsInWindow(w, x, y)) return w;
    }
    for (int i = windows.size() - 1; i >= 0; i--)
    {
        guiserver_window* w = windows[i];
        if (w->Parent != 0 || (w->Flags & WINDOWFLAGS_TOPMOST) != 0 || (w->Flags & WINDOWFLAGS_BOTTOMMOST) == 0) continue;
        if (IsInWindow(w, x, y)) return w;
    }

    return NULL;
}
开发者ID:Nirlendu,项目名称:mona,代码行数:29,代码来源:window.cpp

示例3: DisposeWindow

bool DisposeWindow(uint32_t handle)
{
    if (prevWindow != NULL && prevWindow->Handle == handle) prevWindow = NULL;
    if (activeWindow != NULL && activeWindow->Handle == handle) ActivateWindow(NULL);

    int size_c = captures.size();
    for (int i = 0; i < size_c; i++)
    {
        if (captures[i]->Handle == handle)
        {
            captures.removeAt(i);
            break;
        }
    }
    int size_w = windows.size();
    for (int i = 0; i < size_w; i++)
    {
        guiserver_window* w = windows[i];
        if (w->Handle == handle)
        {
            if (w->__internal2) DestructionEffect(w);
            windows.removeAt(i);
            MemoryMap::unmap(handle);
            if (activeWindow == NULL) ActivateWindow(GetFrontWindow());
            return true;
        }
    }
    return false;
}
开发者ID:Nirlendu,项目名称:mona,代码行数:29,代码来源:window.cpp

示例4: GetFrontWindow

static guiserver_window* GetFrontWindow()
{
    for (int i = windows.size() - 1; i >= 0; i--)
    {
        guiserver_window* w = windows[i];
        if (w->Parent == 0 && (w->Flags & WINDOWFLAGS_BOTTOMMOST) == 0) return w;
    }
    for (int i = windows.size() - 1; i >= 0; i--)
    {
        guiserver_window* w = windows[i];
        if (w->Parent == 0 && (w->Flags & WINDOWFLAGS_BOTTOMMOST) != 0) return w;
    }
    return NULL;
}
开发者ID:Nirlendu,项目名称:mona,代码行数:14,代码来源:window.cpp

示例5: ParseConfig

void Monitor::ParseConfig(CString content)
{
    _A<CString> lines = content.split_lines();

    FOREACH(CString, line, lines)
    {
        if (!line.startsWith("SERVER=")) continue;

        _A<CString> p = line.split("=");
        if (p.get_Length() < 2) continue;

        CString path = p[p.get_Length() - 1];

        _A<CString> q = path.split("/");

        CString name = q[q.get_Length() - 1];

        this->paths.add(path);
        this->servers.add(name);
    }
    END_FOREACH

    alive = new bool[servers.size()];

    return;
}
开发者ID:ShotaroTsuji,项目名称:mona,代码行数:26,代码来源:main.cpp

示例6: __mlibc_filelist_get

    FILE* __mlibc_filelist_get(void *p, int n)
    {
        HList<FILE*>* list;

        if( p == NULL ) p = __mlibc_filelist_initializer(p);
        list = (HList<FILE*>*)p;
        if( list->size() <= n ) return NULL;
        return list->get(n);
    }
开发者ID:higepon,项目名称:mona,代码行数:9,代码来源:filelist.cpp

示例7: GetBitmapPointer

guiserver_bitmap* GetBitmapPointer(uint32_t handle)
{
	int size = bitmaps.size();
	for (int i = 0; i < size; i++)
	{
		if (bitmaps[i]->Handle == handle) return bitmaps[i];
	}
	return NULL;
}
开发者ID:Nirlendu,项目名称:mona,代码行数:9,代码来源:image.cpp

示例8: registerReceiver

static void registerReceiver(uint32_t tid)
{
    int size = receivers.size();
    for (int i = 0; i < size; i++)
    {
        if (receivers[i] == tid) return;
    }
    receivers.add(tid);
}
开发者ID:mumurik,项目名称:mona,代码行数:9,代码来源:ProcessManager.cpp

示例9: GetWindowPointer

guiserver_window* GetWindowPointer(uint32_t handle)
{
    int size = windows.size();
    for (int i = 0; i < size; i++)
    {
        guiserver_window* w = windows[i];
        if (w->Handle == handle) return w;
    }
    return NULL;
}
开发者ID:Nirlendu,项目名称:mona,代码行数:10,代码来源:window.cpp

示例10: unregisterReceiver

static void unregisterReceiver(uint32_t tid)
{
    int size = receivers.size();
    for (int i = 0; i < size; i++)
    {
        if (receivers[i] != tid) continue;
        receivers.removeAt(i);
        return;
    }
}
开发者ID:mumurik,项目名称:mona,代码行数:10,代码来源:ProcessManager.cpp

示例11: GetPEData

static PEData* GetPEData(const CString& path)
{
    int size = cache.size();
    for (int i = 0; i < size; i++)
    {
        PEData* pe = cache[i];
        if (pe->Path == path) return pe;
    }
    return NULL;
}
开发者ID:ShotaroTsuji,项目名称:mona,代码行数:10,代码来源:main.cpp

示例12: __mlibc_filelist_remove_by_index

    int __mlibc_filelist_remove_by_index(void *p, int n)
    {
        HList<FILE*>* list;

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

示例13: __mlibc_filelist_add

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

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

示例14: GetChild

static guiserver_window* GetChild(guiserver_window* parent, int x, int y)
{
    x -= parent->X + parent->OffsetX;
    y -= parent->Y + parent->OffsetY;
    for (int i = windows.size() - 1; i >= 0; i--)
    {
        guiserver_window* w = windows[i];
        if (w->Parent == parent->Handle && IsInWindow(w, x, y)) return GetChild(w, x, y);
    }
    return parent;
}
开发者ID:Nirlendu,项目名称:mona,代码行数:11,代码来源:window.cpp

示例15: DisposeAllWindow

void DisposeAllWindow()
{
    for (int i = 0; i < windows.size(); i++)
    {
        guiserver_window* w = windows[i];
        if (Message::sendReceive(NULL, w->ThreadID, MSG_GUISERVER_DISPOSEWINDOW) != M_OK) {
            printf("Error %s:%d\n", __FILE__, __LINE__);
            exit(-1);
        }
        syscall_kill_thread(w->ThreadID);
    }
}
开发者ID:Nirlendu,项目名称:mona,代码行数:12,代码来源:window.cpp


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