本文整理汇总了C++中IsFullScreen函数的典型用法代码示例。如果您正苦于以下问题:C++ IsFullScreen函数的具体用法?C++ IsFullScreen怎么用?C++ IsFullScreen使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了IsFullScreen函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
bool wxTopLevelWindowX11::ShowFullScreen(bool show, long style)
{
if (show)
{
if (IsFullScreen())
return false;
m_fsIsShowing = true;
m_fsStyle = style;
// TODO
return true;
}
else
{
if (!IsFullScreen())
return false;
m_fsIsShowing = false;
// TODO
return true;
}
}
示例2: Parent
void Panel::Show()
{
if (!GetModalMode())
{
const auto AnotherPanel = Parent()->GetAnotherPanel(this);
if (AnotherPanel->IsVisible())
{
if (SaveScr)
{
SaveScr->AppendArea(AnotherPanel->SaveScr.get());
}
if (AnotherPanel->IsFocused())
{
if (AnotherPanel->IsFullScreen())
{
SetVisible(true);
return;
}
if (GetType() == panel_type::FILE_PANEL && IsFullScreen())
{
ScreenObject::Show();
AnotherPanel->Show();
return;
}
}
}
}
ScreenObject::Show();
ShowScreensCount();
}
示例3: switch
void GX_BDirectWindow::MessageReceived(BMessage *msg)
{
switch(msg->what)
{
case MSG_SYSAPPLICATION_CLOSE:
printf("Close thread BDirectWindow\n");
g_pApp->Kill();
break;
case MSG_SYSAPPLICATION_OPEN:
printf("Resume thread BDirectWindow\n");
resume_thread(m_DrawThread);
break;
case MSG_SYSAPPLICATION_SWITCHFS:
printf("Toggle fullscreen BDirectWindow\n");
SetFullScreen(!IsFullScreen());
break;
default:
g_pApp->WindowMessage(msg);
BDirectWindow::MessageReceived(msg);
break;
}
}
示例4: SDL_ToggleFS
int PGE_Window::SDL_ToggleFS(SDL_Window *win)
{
if(!win)
win=window;
if (IsFullScreen(win))
{
// Swith to WINDOWED mode
if (SDL_SetWindowFullscreen(win, SDL_FALSE) < 0)
{
std::cout<<"Setting windowed failed : "<<SDL_GetError()<<std::endl;
return -1;
}
return 0;
}
// Swith to FULLSCREEN mode
if (SDL_SetWindowFullscreen(win, SDL_TRUE) < 0)
{
std::cout<<"Setting fullscreen failed : "<<SDL_GetError()<<std::endl;
return -1;
}
return 1;
}
示例5: switch
void GlSpectrumAnalyzerWindow::MessageReceived(BMessage *message)
{
switch(message->what)
{
case 'file':
{
const char *oldname = name;
const char *newname = message->FindString("name");
name = strdup(newname?newname:"");
free((void*)oldname);
}
break;
case GO_FULLSCREEN:
SetFullScreen( !IsFullScreen() );
// ResizeBy(0,0);
needResize = true;
break;
case B_KEY_DOWN:
{
const char *bytes = message->FindString( "bytes" );
if (bytes[0] == B_ESCAPE && bytes[1] == '\0')
PostMessage(B_QUIT_REQUESTED);
else
BDirectGLWindow::MessageReceived(message);
}
break;
default:
BDirectGLWindow::MessageReceived(message);
break;
}
}
示例6: SDL_ToggleFS
int PGE_Window::SDL_ToggleFS(SDL_Window *win)
{
if(!win)
win=window;
if (IsFullScreen(win))
{
//Show mouse cursor
if(showCursor)
SDL_ShowCursor(SDL_ENABLE);
// Swith to WINDOWED mode
if (SDL_SetWindowFullscreen(win, SDL_FALSE) < 0)
{
qDebug() <<"Setting windowed failed : "<<SDL_GetError();
return -1;
}
return 0;
}
// Swith to FULLSCREEN mode
if (SDL_SetWindowFullscreen(win, SDL_WINDOW_FULLSCREEN_DESKTOP) < 0)
{
//Hide mouse cursor in full screen mdoe
qDebug() <<"Setting fullscreen failed : "<<SDL_GetError();
return -1;
}
SDL_ShowCursor(SDL_DISABLE);
return 1;
}
示例7: OnUpdateTitle
void GSFrame::OnUpdateTitle( wxTimerEvent& evt )
{
#ifdef __linux__
// Important Linux note: When the title is set in fullscreen the window is redrawn. Unfortunately
// an intermediate white screen appears too which leads to a very annoying flickering.
if (IsFullScreen()) return;
#endif
AppConfig::UiTemplateOptions& templates = g_Conf->Templates;
double fps = wxGetApp().FpsManager.GetFramerate();
// The "not PAL" case covers both Region_NTSC and Region_NTSC_PROGRESSIVE
float per = gsRegionMode == Region_PAL ? (fps * 100) / EmuConfig.GS.FrameratePAL.ToFloat() : (fps * 100) / EmuConfig.GS.FramerateNTSC.ToFloat();
char gsDest[128];
gsDest[0] = 0; // No need to set whole array to NULL.
GSgetTitleInfo2( gsDest, sizeof(gsDest) );
wxString limiterStr = templates.LimiterUnlimited;
if( g_Conf->EmuOptions.GS.FrameLimitEnable )
{
switch( g_LimiterMode )
{
case Limit_Nominal: limiterStr = templates.LimiterNormal; break;
case Limit_Turbo: limiterStr = templates.LimiterTurbo; break;
case Limit_Slomo: limiterStr = templates.LimiterSlowmo; break;
}
}
FastFormatUnicode cpuUsage;
if (m_CpuUsage.IsImplemented()) {
m_CpuUsage.UpdateStats();
cpuUsage.Write(L"EE: %3d%%", m_CpuUsage.GetEEcorePct());
cpuUsage.Write(L" | GS: %3d%%", m_CpuUsage.GetGsPct());
if (THREAD_VU1)
cpuUsage.Write(L" | VU: %3d%%", m_CpuUsage.GetVUPct());
pxNonReleaseCode(cpuUsage.Write(L" | UI: %3d%%", m_CpuUsage.GetGuiPct()));
}
const u64& smode2 = *(u64*)PS2GS_BASE(GS_SMODE2);
wxString omodef = (smode2 & 2) ? templates.OutputFrame : templates.OutputField;
wxString omodei = (smode2 & 1) ? templates.OutputInterlaced : templates.OutputProgressive;
wxString title = templates.TitleTemplate;
title.Replace(L"${slot}", pxsFmt(L"%d", States_GetCurrentSlot()));
title.Replace(L"${limiter}", limiterStr);
title.Replace(L"${speed}", pxsFmt(L"%3d%%", lround(per)));
title.Replace(L"${vfps}", pxsFmt(L"%.02f", fps));
title.Replace(L"${cpuusage}", cpuUsage);
title.Replace(L"${omodef}", omodef);
title.Replace(L"${omodei}", omodei);
title.Replace(L"${gsdx}", fromUTF8(gsDest));
if (CoreThread.IsPaused())
title = templates.Paused + title;
SetTitle(title);
}
示例8: setFullScreen
int PGE_Window::setFullScreen(bool fs)
{
if(window==NULL) return -1;
if(fs != IsFullScreen(window))
{
if(fs)
{
// Swith to FULLSCREEN mode
if (SDL_SetWindowFullscreen(window, SDL_WINDOW_FULLSCREEN_DESKTOP) < 0)
{
//Hide mouse cursor in full screen mdoe
qDebug() <<"Setting fullscreen failed : "<<SDL_GetError();
return -1;
}
SDL_ShowCursor(SDL_DISABLE);
return 1;
}
else
{
//Show mouse cursor
if(showCursor)
SDL_ShowCursor(SDL_ENABLE);
// Swith to WINDOWED mode
if (SDL_SetWindowFullscreen(window, SDL_FALSE) < 0)
{
qDebug() <<"Setting windowed failed : "<<SDL_GetError();
return -1;
}
return 0;
}
}
return 0;
}
示例9: switch
/*****************************************************************************
* VideoWindow::_SetToSettings
*****************************************************************************/
void
VideoWindow::_SetToSettings()
{
// adjust dimensions
uint32_t mode = RESIZE_100;
switch (fSettings->VideoSize())
{
case VideoSettings::SIZE_50:
mode = RESIZE_50;
break;
case VideoSettings::SIZE_200:
mode = RESIZE_200;
break;
case VideoSettings::SIZE_100:
case VideoSettings::SIZE_OTHER:
default:
break;
}
bool fullscreen = IsFullScreen(); // remember settings
_SetVideoSize(mode); // because this will reset settings
// the fullscreen status is reflected in the settings,
// but not yet in the windows state
if (fullscreen)
SetFullScreen(true);
if (fSettings->HasFlags(VideoSettings::FLAG_ON_TOP_ALL))
fCachedFeel = B_FLOATING_ALL_WINDOW_FEEL;
else
fCachedFeel = B_NORMAL_WINDOW_FEEL;
SetFeel(fCachedFeel);
}
示例10: CorrectAspectRatio
/*****************************************************************************
* VideoWindow::FrameResized
*****************************************************************************/
void
VideoWindow::FrameResized( float width, float height )
{
int32_t useWidth = CorrectAspectRatio() ? i_width : fTrueWidth;
int32_t useHeight = CorrectAspectRatio() ? i_height : fTrueHeight;
float out_width, out_height;
float out_left, out_top;
float width_scale = width / useWidth;
float height_scale = height / useHeight;
if (width_scale <= height_scale)
{
out_width = (useWidth * width_scale);
out_height = (useHeight * width_scale);
out_left = 0;
out_top = (height - out_height) / 2;
}
else /* if the height is proportionally smaller */
{
out_width = (useWidth * height_scale);
out_height = (useHeight * height_scale);
out_top = 0;
out_left = (width - out_width) / 2;
}
view->MoveTo(out_left,out_top);
view->ResizeTo(out_width, out_height);
if (!IsFullScreen())
winSize = Frame();
}
示例11: Frame
/*****************************************************************************
* VideoWindow::FrameMoved
*****************************************************************************/
void
VideoWindow::FrameMoved(BPoint origin)
{
if (IsFullScreen())
return ;
winSize = Frame();
}
示例12: IsFullScreen
HRESULT FMPlayerDShow::Start()
{
HRESULT hr = E_FAIL;
CComQIPtr<IFilterGraph> pFilterGraph = m_FilterGraph;
if (pFilterGraph == NULL)
return E_FAIL;
m_MediaEvent = pFilterGraph;
m_pBV = pFilterGraph;
BOOL bIsFullScreen = IsFullScreen();
SetParentWnd(m_hWndParent);
if (bIsFullScreen)
SetFullScreen(TRUE);
if (m_MediaControl != NULL)
{
hr = SeekPosition(m_Offset);
m_Offset = 0;
}
return hr;
}
示例13: ToggleFullScreen
void VLCWindowsManager::ToggleFullScreen()
{
if( IsFullScreen() ) {
EndFullScreen();
} else {
StartFullScreen();
}
}
示例14: ShowFullScreen
void CMainFrame::OnFullScreen()
{
ShowFullScreen();
if (!IsFullScreen ())
{
AdjustClientArea ();
}
}
示例15: switch
void GSFrame::OnKeyDown(wxKeyEvent& event)
{
switch (event.GetKeyCode())
{
case WXK_RETURN: if (event.AltDown()) { OnFullScreen(); return; } break;
case WXK_ESCAPE: if (IsFullScreen()) { ShowFullScreen(false); return; } break;
}
event.Skip();
}