本文整理汇总了C++中JXWindow::GetXWindow方法的典型用法代码示例。如果您正苦于以下问题:C++ JXWindow::GetXWindow方法的具体用法?C++ JXWindow::GetXWindow怎么用?C++ JXWindow::GetXWindow使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JXWindow
的用法示例。
在下文中一共展示了JXWindow::GetXWindow方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
JBoolean
JXDockWidget::CloseAll()
{
if (itsWindowList != NULL)
{
JXDisplay* display = GetDisplay();
Display* xDisplay = display->GetXDisplay();
const JSize count = itsWindowList->GetElementCount();
for (JIndex i=count; i>=1; i--)
{
JXWindow* w = itsWindowList->NthElement(i);
StopListening(w);
Window xWindow = w->GetXWindow();
if (w->Close())
{
if (JXDisplay::WindowExists(display, xDisplay, xWindow))
{
w->Undock();
}
else if ((JXGetApplication())->DisplayExists(xDisplay))
{
itsTabGroup->DeleteTab(i);
itsWindowList->RemoveElement(i);
}
else
{
return kJFalse;
}
}
else
{
UpdateMinSize();
return kJFalse;
}
}
delete itsWindowList;
itsWindowList = NULL;
UpdateMinSize();
}
return kJTrue;
}
示例2: if
JBoolean
JXApplication::HandleOneEventForWindow
(
JXWindow* window,
const JBoolean origAllowSleep,
const JBoolean do_tasks
)
{
const JBoolean origHadBlockingWindowFlag = itsHadBlockingWindowFlag;
itsHasBlockingWindowFlag = kJTrue;
itsHadBlockingWindowFlag = kJFalse; // req'd by JXWindow
if (itsIdleTaskStack->IsEmpty())
{
PushIdleTaskStack();
}
UpdateCurrentTime();
const JBoolean allowSleep =
JI2B(origAllowSleep && HandleCustomEventWhileBlocking());
UpdateCurrentTime();
JBoolean windowHasEvents = kJFalse;
const JXDisplay* uiDisplay = window->GetDisplay();
Window eventWindow [ kEventWindowCount ];
eventWindow[0] = window->GetXWindow();
JPtrArrayIterator<JXDisplay> iter(itsDisplayList);
JXDisplay* display;
JIndex displayIndex = 0;
while (iter.Next(&display))
{
JXMenuManager* menuMgr = display->GetMenuManager();
if (!origHadBlockingWindowFlag)
{
menuMgr->CloseCurrentMenus();
}
JXWindow* mouseContainer;
displayIndex++;
itsCurrDisplayIndex = displayIndex; // itsCurrDisplayIndex might change during event
if (XPending(*display) != 0)
{
// get mouse and keyboard grabbers -- for menus inside blocking window
eventWindow[1] = eventWindow[2] = None;
JXWindow* grabber;
if (display == uiDisplay && display->GetMouseGrabber(&grabber) &&
menuMgr->IsMenuForWindow(grabber, window))
{
eventWindow[1] = grabber->GetXWindow();
}
if (display == uiDisplay && display->GetKeyboardGrabber(&grabber) &&
menuMgr->IsMenuForWindow(grabber, window))
{
eventWindow[2] = grabber->GetXWindow();
}
// process one event
XEvent xEvent;
if (display == uiDisplay &&
XCheckIfEvent(*display, &xEvent, GetNextWindowEvent,
reinterpret_cast<char*>(eventWindow)))
{
windowHasEvents = kJTrue;
if (xEvent.type != MotionNotify)
{
itsLastIdleTime = itsCurrentTime;
}
display->HandleEvent(xEvent, itsCurrentTime);
}
#if 0
// cd: background event check is now done as part of window event check
// to give better update responsiveness when dragging a window
else if (XCheckIfEvent(*display, &xEvent, GetNextBkgdEvent, NULL))
{
display->HandleEvent(xEvent, itsCurrentTime);
}
#endif
else if (display == uiDisplay &&
display->GetMouseContainer(&mouseContainer) &&
mouseContainer == window)
{
display->Idle(itsCurrentTime);
}
else
{
display->Update();
}
// discard mouse and keyboard events
DiscardEventInfo discardInfo(display, NULL);
if (display == uiDisplay)
//.........这里部分代码省略.........