本文整理汇总了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());
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
示例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;
}
示例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);
}
示例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;
}
示例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;
}
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
}