Example #1
0
void run(const char *dir)
{
    {
        Application app_(dir);

        setApplication(&app_);

        Script *script = resMgr->load<Script>("resources/scripts/main.rkt");
        app->setNextScript(script);
        script->release();

        app->mainloop();
    }

    setApplication(nullptr);
}
LRESULT AVIPreview::onChangeMenu(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
{
	if (ctrlCommands.GetSelectedCount() == 1)
	{
		int sel = ctrlCommands.GetSelectedIndex();
		const auto pa = FavoriteManager::getInstance()->getPreviewApp(sel);
		if (pa)
		{
			PreviewDlg dlg;
			dlg.name = Text::toT(pa->getName());
			dlg.application = Text::toT(pa->getApplication());
			dlg.argument = Text::toT(pa->getArguments());
			dlg.extensions = Text::toT(pa->getExtension());
			
			if (dlg.DoModal() == IDOK)
			{
				pa->setName(Text::fromT(dlg.name));
				pa->setApplication(Text::fromT(dlg.application));
				pa->setArguments(Text::fromT(dlg.argument));
				pa->setExtension(Text::fromT(dlg.extensions));
				
				ctrlCommands.SetItemText(sel, 0, dlg.name.c_str());
				ctrlCommands.SetItemText(sel, 1, dlg.application.c_str());
				ctrlCommands.SetItemText(sel, 2, dlg.argument.c_str());
				ctrlCommands.SetItemText(sel, 3, dlg.extensions.c_str());
			}
		}
	}
	
	return 0;
}
Example #3
0
WineApplication::WineApplication(const QString & executable,
                                 const WineConfiguration & configuration)
    : d(new WineApplicationData)
{
    setApplication(executable);
    setWineConfiguration(configuration);
}
Example #4
0
HippoMenu::HippoMenu(void)
{
    refCount_ = 1;
    hippoLoadTypeInfo((WCHAR *)0, &IID_IHippoMenu, &ifaceTypeInfo_, NULL);

    desiredWidth_ = BASE_WIDTH;
    desiredHeight_ = BASE_HEIGHT;
    mouseX_ = 0;
    mouseY_ = 0;

    setUseParent(true);
    setClassName(L"HippoMenuClass");
    setClassStyle(CS_HREDRAW | CS_VREDRAW | CS_DROPSHADOW);
    setWindowStyle(WS_POPUP);
    setExtendedStyle(WS_EX_TOPMOST);
    setTitle(L"Hippo Menu");
    setApplication(this);
}
Example #5
0
HippoBubble::HippoBubble(void)
{
    idle_ = FALSE;
    screenSaverRunning_ = FALSE;
    haveMouse_ = FALSE;
    effectiveIdle_ = FALSE;
    shown_ = FALSE;
    desiredWidth_ = BASE_WIDTH;
    desiredHeight_ = BASE_HEIGHT;
    layerDC_ = NULL;
    oldBitmap_ = NULL;
    images_ = NULL;
 
    // Notes on animation
    // 
    // * Without our usage of UpdateLayeredWindow, it would fade the window in and
    // out using AnimateWindow, but you turn on fading in then you'll probably have difficulties 
    // the second time you show the window ... it appears that the web browser control has some 
    // bugs with WM_PRINTCLIENT; the first time the contents of the window are properly
    // initialized before fade-in, but on subsequent shows they are not. A crude
    // workaround might be to reembed a new control every time, but there are probably
    // less sledgehammer methods. Even without animation there are sometimes problems
    // with reshowing the window, which is why we turn on updateOnShow(). (This may
    // no longer be necessary with our usage of UpdateLayeredWindow())
    //
    // * AnimateWindow isn't compatible with UpdateLayeredWindow() ... when you start
    // animating the window, the shape is removed. This is presumably because AnimateWindow
    // internally uses SetLayeredWindowAttributes, which is exclusive with UpdateLayeredWindow
    // So to animate a shaped window, we'd have to fade the bits in and out ourselves.
    //
    setAnimate(false);
    setUseParent(true);
    setUpdateOnShow(true);
    setWindowStyle(WS_POPUP);
    setExtendedStyle(WS_EX_TOPMOST | WS_EX_LAYERED | WS_EX_NOACTIVATE);
    setClassName(L"HippoBubbleClass");
    setTitle(L"Hippo Notification");
    setApplication(this);
}
Example #6
0
int main(int argc, char **argv)
{
	setApplication();

	//glutInitWindowSize(400,400);		// Set window size
	//glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE | GLUT_DEPTH);		// Setup framebuffer
	glutInit(&argc, argv);
	
		// ---- Create windows ---- //
	initAppWindows();
	
	// For standalone application
   glutIdleFunc(sgGlutApp::cbIdle);

   // If have windows
   trackerConfigMenu::getInstance()->registerGlutIdle(sgGlutApp::cbIdle);
	trackerConfigMenu::getInstance()->setApp(theApp);

	//glutReshapeFunc(reshape);
	
	glutMainLoop();						// Will NEVER return.  just LOOPS
	return 0;							// ANSI C requires main to return int
}
CommandStop::CommandStop( ServerApplication * application ) :
        Command(kIdentifier) {
        setApplication(application);
}