本文整理汇总了C++中resizeWindow函数的典型用法代码示例。如果您正苦于以下问题:C++ resizeWindow函数的具体用法?C++ resizeWindow怎么用?C++ resizeWindow使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了resizeWindow函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: resizeWindow
void MaximizeState::finishMaximizingActiveWindow()
{
// set the active windows' size to the positive space
CardWindow* activeWin = m_wm->activeWindow();
if(activeWin){
activeWin->setMaxAndLoading(1);
}
if (activeWin && activeWin->addedToWindowManager()) {
// allow direct rendering if no one has requested it to be disabled - Do this only if the window is NOT a modal window
if(WindowType::Type_ModalChildWindowCard != activeWin->type()) {
const QRect& r = m_wm->targetPositiveSpace();
resizeWindow(activeWin, r.width(), r.height());
if (m_disableDirectRendering == 0) {
if(false == m_wm->isModalDismissed()) {
SystemUiController::instance()->setDirectRenderingForWindow(SystemUiController::CARD_WINDOW_MANAGER, activeWin, true);
}
else {
m_wm->setModalDismissed(false);
}
}
}
if (G_UNLIKELY(Settings::LunaSettings()->perfTesting)) {
// NOV-97107, hook for automated performance testing
g_message("SYSMGR PERF: STATE MAXIMIZED appid: %s, processid: %s, type: %s, time: %d",
activeWin->appId().c_str(),
activeWin->processId().c_str(),
activeWin->isHost() ? "host" : "card",
Time::curTimeMs());
}
}
}
示例2: main
int main(int argc, char **argv)
{
SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO);
SDL_CreateWindowAndRenderer(SCREEN_WIDTH+232, SCREEN_HEIGHT+16, 0, &displayWindow, &displayRenderer);
SDL_GetRendererInfo(displayRenderer, &displayRendererInfo);
SDL_SetRenderDrawBlendMode(displayRenderer, SDL_BLENDMODE_BLEND);
SCREEN_SHIFT_X = 8;
SCREEN_SHIFT_Y = 8;
#ifdef __EMSCRIPTEN__
emscripten_set_main_loop(null_loop_iter, 60, 1);
#endif
srand(time(NULL));
sound_init();
resizeWindow(SCREEN_WIDTH, SCREEN_HEIGHT);
load_resources();
last_time = clock();
#ifdef __EMSCRIPTEN__
emscripten_set_main_loop(loop_iter, 60, 1);
#else
while (!done)
{
loop_iter();
}
#endif
sound_exit();
Quit(0);
return (0);
}
示例3: QWidget
DetailWindow::DetailWindow(DiagramList* list, QWidget* parent) : QWidget(parent)
{
setupUi(this);
stationView->setRenderHints( QPainter::Antialiasing );
stationView->addGraph(list);
resizeWindow();
}
示例4: droid_Resize
static GF_Err droid_Resize(GF_VideoOutput *dr, u32 w, u32 h)
{
RAWCTX;
LOG( ANDROID_LOG_DEBUG, TAG, "Android Resize: %dx%d", w, h);
rc->width = w;
rc->height = h;
if ( rc->non_power_two )
{
rc->tex_width = rc->width;
rc->tex_height = rc->height;
}
else
{
rc->tex_width = find_pow_2(rc->width);
rc->tex_height = find_pow_2(rc->height);
}
resizeWindow(rc);
if ( rc->out_3d_type == 0 )
{
createTexture(rc);
#ifdef GLES_FRAMEBUFFER_TEST
createFrameBuffer(rc);
#endif
}
LOG( ANDROID_LOG_VERBOSE, TAG, "Android Resize DONE", w, h);
return GF_OK;
}
示例5: sdlInit
int sdlInit(int width, int height, int bpp, int debugmode){
if(debugmode) console_printf("DEBUG -- SDL window initializing \n");
if(SDL_Init(SDL_INIT_VIDEO)<0){
// fprintf(stderr, "ERROR -- SDL video init failed: %s \n", SDL_GetError());
console_printf("ERROR -- SDL video init failed: %s \n", SDL_GetError());
return FALSE;
}
videoInfo = SDL_GetVideoInfo();
videoFlags = SDL_OPENGL;
videoFlags |= SDL_GL_DOUBLEBUFFER;
videoFlags |= SDL_HWPALETTE;
videoFlags |= SDL_RESIZABLE;
if(videoInfo->hw_available) videoFlags |= SDL_HWSURFACE;
else videoFlags |= SDL_SWSURFACE;
if(videoInfo->blit_hw) videoFlags |= SDL_HWACCEL;
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
/* videoFlags = SDL_WINDOW_RESIZABLE | SDL_WINDOW_INPUT_FOCUS | SDL_WINDOW_MOUSE_FOCUS | SDL_WINDOW_OPENGL;
// SDL_CreateWindowAndRenderer(0, 0, videoFlags, &screen, &renderer);
screen = SDL_CreateWindow("enaengine", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, width, height, videoFlags);
glcontext = SDL_GL_CreateContext(screen);
// renderer = SDL_CreateRenderer(screen, -1, 0);
*/
// setMSAA(16);
return resizeWindow(width, height, bpp, debugmode);
}
示例6: showFullScreen
void MusicVideoPlayWidget::resizeWindow(bool resize)
{
if(resize)
{
showFullScreen();
}
else
{
showNormal();
setGeometry(250, 150, WINDOW_WIDTH, WINDOW_HEIGHT);
}
QSize s = size();
#ifdef Q_OS_UNIX
QDesktopWidget* desktopWidget = QApplication::desktop();
if(isFullScreen() && desktopWidget && desktopWidget->screen())
{
s = desktopWidget->screen()->size();
}
else
{
s = QSize(WINDOW_WIDTH, WINDOW_HEIGHT);
showNormal();
}
#endif
resizeWindow(s.width() - WINDOW_WIDTH, s.height() - WINDOW_HEIGHT);
}
示例7: tonen
void tonen(Mat image, String naam) // afbeelding tonen op scherm a.d.h.v. afbeelding en naam venster
{
namedWindow( naam, WINDOW_NORMAL );
resizeWindow(naam, 1200,800);
imshow( naam, image );
waitKey(0);
}
示例8: colour
void DetailWindow::addList(DiagramList* list)
{
GeoLib::Color* c = GeoLib::getRandomColor();
QColor colour((*c)[0], (*c)[1], (*c)[2]);
delete c;
this->addList(list, colour);
resizeWindow();
}
示例9: resizeWindow
void TestWindow::resizeEvent(QResizeEvent* ev) {
resizeWindow(ev->size());
float fov_degrees = 60.0f;
float aspect_ratio = (float)_size.width() / _size.height();
float near_clip = 0.1f;
float far_clip = 1000.0f;
_projectionMatrix = glm::perspective(glm::radians(fov_degrees), aspect_ratio, near_clip, far_clip);
}
示例10: resizeWindow
void GraphicManager::resizeVerify()
{
if(geiWindow->resized)
{
resizeWindow();
geiWindow->resized = false;
}
}
示例11: SDL_Init
EAGLView::EAGLView()
{
d = new PrivateData;
/* this holds some info about our display */
const SDL_VideoInfo *videoInfo;
SDL_Init( SDL_INIT_VIDEO );
d->surface = SDL_SetVideoMode(0, 0, 16, SDL_SWSURFACE | SDL_FULLSCREEN);
SDL_ShowCursor(0);
SDL_WM_SetCaption("HexGame", "HexGame");
SDL_GLES_Init(SDL_GLES_VERSION_1_1);
SDL_GLES_Context *context = SDL_GLES_CreateContext();
SDL_GLES_MakeCurrent(context);
/* Enable smooth shading */
glShadeModel( GL_SMOOTH );
/* Set the background black */
glClearColor( 0.0f, 0.0f, 0.0f, 0.0f );
/* Enables Depth Testing */
glEnable( GL_DEPTH_TEST );
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_BLEND_SRC);
glEnableClientState(GL_VERTEX_ARRAY);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
/* The Type Of Depth Test To Do */
glDepthFunc( GL_LEQUAL );
/* Really Nice Perspective Calculations */
glHint( GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST );
/* Use of vertex arrays is mandatory in GLES */
glEnableClientState(GL_VERTEX_ARRAY);
resizeWindow( 800, 480 );
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_TEXTURE_2D);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR );
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
TextureCatalog* catalog = TextureCatalog::instance();
catalog->addAndLoad("units", loadTexture("texmap.png"), 2);
catalog->addAndLoad("hexTiles", loadTexture("texmap_hex.png"), 2);
catalog->addAndLoad("actions", loadTexture("actions.png"), 4);
catalog->addAndLoad("icons", loadTexture("icons.png"), 4);
d->centralControl = CentralControl::instance();
}
示例12: setupPolygonVars
//--------------------------------------------------------------
void ofApp::setup(){
setupPolygonVars();
setupTriangleVars();
setupRectVars();
setupCircleVars();
resizeWindow();
}
示例13: while
void BaseGame::eventPoll()
{
sf::Event event;
while (window.pollEvent(event))
{
if (event.type == sf::Event::Closed) running = false;
else if (event.type == sf::Event::Resized) resizeWindow(event.size.width, event.size.height);
}
}
示例14: namedWindow
//检验是否有效
void findCircleParameter::checkVarify()
{
namedWindow(check_win_name, CV_WINDOW_NORMAL);
resizeWindow(check_win_name, width_disp_img, height_disp_img);
imshow(check_win_name, image);
setMouseCallback(check_win_name, onMouse);
waitKey();
cv::destroyWindow(check_win_name);
}
示例15: MYGUI_ASSERT
void Gui::initialise(const std::string& _core, const std::string& _logFileName)
{
// самый первый лог
LogManager::registerSection(MYGUI_LOG_SECTION, _logFileName);
MYGUI_ASSERT(!mIsInitialise, INSTANCE_TYPE_NAME << " initialised twice");
MYGUI_LOG(Info, "* Initialise: " << INSTANCE_TYPE_NAME);
MYGUI_LOG(Info, "* MyGUI version "
<< MYGUI_VERSION_MAJOR << "."
<< MYGUI_VERSION_MINOR << "."
<< MYGUI_VERSION_PATCH);
// создаем и инициализируем синглтоны
mResourceManager = new ResourceManager();
mLayerManager = new LayerManager();
mWidgetManager = new WidgetManager();
mInputManager = new InputManager();
mSubWidgetManager = new SubWidgetManager();
mSkinManager = new SkinManager();
mFontManager = new FontManager();
mControllerManager = new ControllerManager();
mPointerManager = new PointerManager();
mClipboardManager = new ClipboardManager();
mLayoutManager = new LayoutManager();
mDynLibManager = new DynLibManager();
mPluginManager = new PluginManager();
mLanguageManager = new LanguageManager();
mFactoryManager = new FactoryManager();
mResourceManager->initialise();
mLayerManager->initialise();
mWidgetManager->initialise();
mInputManager->initialise();
mSubWidgetManager->initialise();
mSkinManager->initialise();
mFontManager->initialise();
mControllerManager->initialise();
mPointerManager->initialise();
mClipboardManager->initialise();
mLayoutManager->initialise();
mDynLibManager->initialise();
mPluginManager->initialise();
mLanguageManager->initialise();
mFactoryManager->initialise();
WidgetManager::getInstance().registerUnlinker(this);
// загружаем дефолтные настройки если надо
if ( _core.empty() == false ) mResourceManager->load(_core);
mViewSize = RenderManager::getInstance().getViewSize();
resizeWindow(mViewSize);
MYGUI_LOG(Info, INSTANCE_TYPE_NAME << " successfully initialized");
mIsInitialise = true;
}