int main (int argc, char *argv[]) { Gtk::Main kit(argc, argv); //HelloWorld helloworld; ////Shows the window and returns when it is closed. //Gtk::Main::run(helloworld); //Glib::RefPtr<Gtk::Window*> window; Gtk::Window* window; window = create_window1("vo.glade"); Gtk::Main::run(*window); return 0; }
int main(int argc, char *argv[]){ //Inicializamos el framework Gtk::Main kit(argc, argv); Gtk::CheckButton button("Checkbox button"); Gtk::Window window; window.set_default_size(400,400); window.add(button); window.show_all(); //Iniciamos el loop de eventos Gtk::Main::run(window); return 0; }
void GeolocationClient::requestPermission(WebCore::Geolocation* geolocation) { WebKitWebFrame* webFrame = kit(geolocation->frame()); GRefPtr<WebKitGeolocationPolicyDecision> policyDecision(adoptGRef(webkit_geolocation_policy_decision_new(webFrame, geolocation))); gboolean isHandled = FALSE; g_signal_emit_by_name(m_webView, "geolocation-policy-decision-requested", webFrame, policyDecision.get(), &isHandled); if (!isHandled) webkit_geolocation_policy_deny(policyDecision.get()); #if MODIFY(ENGINE) else webkit_geolocation_policy_allow(policyDecision.get()); #endif }
void FrameLoaderClient::didTransferChildFrameToNewDocument(WebCore::Page*) { ASSERT(m_frame); // Update the frame's webview to the new parent's webview. Frame* coreFrame = core(m_frame); WebKitWebView* webView = getViewFromFrame(m_frame); Frame* parentCoreFrame = coreFrame->tree()->parent(); WebKitWebFrame* parentKitFrame = kit(parentCoreFrame); WebKitWebView* parentWebView = getViewFromFrame(parentKitFrame); if (webView != parentWebView) m_frame->priv->webView = parentWebView; ASSERT(core(getViewFromFrame(m_frame)) == coreFrame->page()); }
int main(int argc, char** argv) { //----------Linux/Mac----------- //struct rlimit lim; //lim.rlim_cur = RLIM_INFINITY; //lim.rlim_max = RLIM_INFINITY; //setrlimit(RLIMIT_CPU,&lim); //----------Linux/Mac----------- Gtk::Main kit(argc,argv); nia::niaVersion = 8; Scanner s(argc, argv); Gtk::Main::run(s); return 0; }
int main(int argc, char** argv) { Terrain::CreateMountain("test.hm"); Gtk::Main kit(argc, argv); Gtk::GL::init(argc, argv); if (argc < 2) { std::cerr << "Usage: " << argv[0] << "l | t | w | f" << std::endl; } AppWindow window(argv[1][0]); Gtk::Main::run(window); return 0; }
int main(int argc, char* argv[]) { std::set_terminate(terminate_handler); Glib::add_exception_handler(sigc::ptr_fun(&terminate_handler)); Gtk::Main kit(argc, argv); Gst::init(argc, argv); setup_translation(); print_copyright(); Glib::RefPtr<gTox> application = gTox::create(); const int status = application->run(argc, argv); return status; }
int main (int argc, char **argv) { Glib::thread_init(); Gtk::Main kit(argc, argv); Glib::ustring ces = argv[0]; Glib::ustring::size_type vzd = ces.rfind("/"); ces = Glib::ustring(ces.c_str(), ces.c_str()+vzd); int a = chdir(ces.c_str()); if(a != 0){ std::cerr<<"ERROR chdir: "<<a<<std::endl; } Okno *Hl = new Okno(); delete Hl; return 0; }
int main (int argc, char **argv) { Gtk::Main kit(argc, argv); //Load the Glade file and instiate its widgets: Glib::RefPtr<Gnome::Glade::Xml> refXml; #ifdef GLIBMM_EXCEPTIONS_ENABLED try { refXml = Gnome::Glade::Xml::create("simple.glade"); } catch(const Gnome::Glade::XmlError& ex) { std::cerr << ex.what() << std::endl; return 1; } #else std::auto_ptr<Gnome::Glade::XmlError> error; refXml = Gnome::Glade::Xml::create("simple.glade", "", "", error); if(error.get()) { std::cerr << error->what() << std::endl; return 1; } #endif //Get the Glade-instantiated Dialog: refXml->get_widget("DialogBasic", pDialog); if(pDialog) { //Get the Glade-instantiated Button, and connect a signal handler: Gtk::Button* pButton = 0; refXml->get_widget("quit_button", pButton); if(pButton) { pButton->signal_clicked().connect( sigc::ptr_fun(on_button_clicked) ); } kit.run(*pDialog); delete pDialog; pDialog = 0; } return 0; }
int main(int argc, char *argv[]) { Gtk::Main kit(argc, argv); if (!BhClientApp::Instance().Init()) { return 0; } if (!BhClientApp::Instance().Run()) { return 0; } std::cin.get(); BhClientApp::Instance().Clear(); return 0; }
void ChromeClientEfl::exceededDatabaseQuota(Frame* frame, const String& databaseName) { uint64_t quota; SecurityOrigin* origin = frame->document()->securityOrigin(); DatabaseDetails details = DatabaseTracker::tracker().detailsForNameAndOrigin(databaseName, origin); quota = ewk_view_exceeded_database_quota(m_view, kit(frame), databaseName.utf8().data(), details.currentUsage(), details.expectedUsage()); /* if client did not set quota, and database is being created now, the * default quota is applied */ if (!quota && !DatabaseTracker::tracker().hasEntryForOrigin(origin)) quota = ewk_settings_web_database_default_quota_get(); DatabaseTracker::tracker().setQuota(origin, quota); }
Page* ChromeClient::createWindow(Frame* frame, const FrameLoadRequest& frameLoadRequest, const WindowFeatures& coreFeatures) { WebKitWebView* webView = 0; g_signal_emit_by_name(m_webView, "create-web-view", kit(frame), &webView); if (!webView) return 0; WebKitWebWindowFeatures* webWindowFeatures = webkit_web_window_features_new_from_core_features(coreFeatures); g_object_set(webView, "window-features", webWindowFeatures, NULL); g_object_unref(webWindowFeatures); if (!frameLoadRequest.isEmpty()) webkit_web_view_open(webView, frameLoadRequest.resourceRequest().url().string().utf8().data()); return core(webView); }
int main(int argc, char *argv[]) { //create objects Gtk::Main kit(argc, argv); DB::DBDriver* db = DB::DBDriver::getInstance(); SafeQueue<ChaTIN::IncomingMassage> toViewParserQueue; SafeQueue<EPtr> fromViewParserQueue; SafeQueue<Action> actionQueue; const Config config; ConferenceManager conferenceManager; AliasManager aliasManager( *db ); ToViewParser toViewParser( aliasManager, conferenceManager, toViewParserQueue, actionQueue); DialogManager dialogManager( toViewParser, aliasManager, conferenceManager, config); aliasManager.setDialogManager( dialogManager ); FromViewParser fromViewParser( dialogManager, aliasManager, conferenceManager, fromViewParserQueue, actionQueue ); ChatWindow win( fromViewParserQueue, actionQueue ); fromViewParser.setView( &win ); //create threads boost::thread dialogThread( dialogManager ); boost::thread toViewThread( toViewParser ); boost::thread fromViewThread( fromViewParser ); Gtk::Main::run(win); return 0; }
void Ladders::activate() { for(KeyLadderMap::iterator kit(ladderMap.begin()); kit!=ladderMap.end(); kit++) { if (kit->second.getLadderKey().getLadderTime()==ladder_time_active) { LadderList* activeLadder = &kit->second; LadderList* currentLadder = getLadderList(activeLadder->getLadderKey().getOpposingKey()); if (currentLadder == NULL){ eventlog(eventlog_level_error,__FUNCTION__,"found active ladder, but no matching current ladder"); continue; } activeLadder->activateFrom(currentLadder); } } update(); }
int main(int argc, char* argv[]) { Gtk::Main kit(argc, argv); if (!gdk_gl_query()) { std::cerr << "No OpenGL support" << std::endl; return -1; } Graal::level_editor::preferences prefs; boost::filesystem::path preferences_path; preferences_path = Glib::get_user_config_dir(); preferences_path = preferences_path / "gonstruct"; // Make sure all directories to this path exist boost::filesystem::create_directories(preferences_path); prefs.load(preferences_path / "preferences"); set_default_preferences(prefs); { // destroy window before preferences get serialised boost::scoped_ptr<Graal::level_editor::preferences_display> prefs_display; boost::scoped_ptr<Graal::level_editor::window> editor; if (!boost::filesystem::is_directory(prefs.graal_dir)) { prefs_display.reset(new Graal::level_editor::preferences_display(prefs)); prefs_display->signal_hide().connect( sigc::bind(&start_editor, argc, argv, sigc::ref(editor), sigc::ref(prefs))); prefs_display->show_all(); } else { Glib::signal_idle().connect( sigc::bind_return( sigc::bind(&start_editor, argc, argv, sigc::ref(editor), sigc::ref(prefs)), false)); } kit.run(); } prefs.save(preferences_path / "preferences"); return 0; }
int main(int argc, char *argv[]) { Gtk::Main kit(argc, argv); std::string db_path; { char current_directory[PATH_MAX]; getcwd(current_directory, PATH_MAX); db_path = current_directory; } db_path += "/ChefDep.db"; Principale principale; principale.Set_Chemin_Base(db_path); Gtk::Main::run(principale); return 0; }
int main(int argc, char** argv) { bindtextdomain(GETTEXT_PACKAGE, GST_DEBUGGER_LOCALEDIR); bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8"); textdomain(GETTEXT_PACKAGE); Gst::init(argc, argv); Gtk::Main kit(argc, argv); Glib::RefPtr<Gtk::Builder> builder = Gtk::Builder::create_from_resource("/eu/cookandcommit/gst-debugger/ui/gst-debugger.glade"); MainWindow* wnd_handler; builder->get_widget_derived("mainWindow", wnd_handler); std::shared_ptr<Controller> controller(new Controller(wnd_handler)); controller->run(argc, argv); return 0; }
JVMState* UncommonTrapCallGenerator::generate(JVMState* jvms, Parse* parent_parser) { GraphKit kit(jvms); // Take the trap with arguments pushed on the stack. (Cf. null_check_receiver). int nargs = method()->arg_size(); kit.inc_sp(nargs); assert(nargs <= kit.sp() && kit.sp() <= jvms->stk_size(), "sane sp w/ args pushed"); if (_reason == Deoptimization::Reason_class_check && _action == Deoptimization::Action_maybe_recompile) { // Temp fix for 6529811 // Don't allow uncommon_trap to override our decision to recompile in the event // of a class cast failure for a monomorphic call as it will never let us convert // the call to either bi-morphic or megamorphic and can lead to unc-trap loops bool keep_exact_action = true; kit.uncommon_trap(_reason, _action, NULL, "monomorphic vcall checkcast", false, keep_exact_action); } else { kit.uncommon_trap(_reason, _action); } return kit.transfer_exceptions_into_jvms(); }
void Ladders::load() { std::list<LadderList*> laddersToRebuild; for(KeyLadderMap::iterator kit(ladderMap.begin()); kit!=ladderMap.end(); kit++) { if (!kit->second.load()) { //loading failed, add to rebuild list laddersToRebuild.push_back(&kit->second); } } if (!laddersToRebuild.empty()) rebuild(laddersToRebuild); update(); save(); }
int main(int argc, char* argv[]) { Gtk::Main kit(argc, argv); Gtk::ComboBoxText combo; combo.append_text("asdfhbb"); combo.append_text("45ggdfdfs"); combo.append_text("avbbhrr"); combo.append_text("khjgh2"); combo.append_text("cxzeee"); combo.append_text("quieroaprobartaller"); BotonOrdenar boton(&combo); Gtk::VBox vbox; vbox.add(combo); vbox.add(boton); Gtk::Window v; v.add(vbox); v.show_all(); Gtk::Main::run(v); return 0; }
int main (int argc, char **argv) { Gtk::Main kit(argc, argv); Gtk::GL::init(argc, argv); // // Query OpenGL extension version. // int major, minor; Gdk::GL::query_version(major, minor); std::cout << "Tiuque::glx version::"<< major << "." << minor << std::endl; //Load the GtkBuilder file and instantiate its widgets: Glib::RefPtr<Gtk::Builder> refBuilder = Gtk::Builder::create(); #ifdef GLIBMM_EXCEPTIONS_ENABLED try{ refBuilder->add_from_file("tiuque.glade"); } catch(const Glib::FileError& ex){ std::cerr << "FileError: " << ex.what() << std::endl; return 1; } catch(const Gtk::BuilderError& ex){ std::cerr << "BuilderError: " << ex.what() << std::endl; return 1; } #else std::auto_ptr<Glib::Error> error; if (!refBuilder->add_from_file("tiuque.glade", error)){ std::cerr << error->what() << std::endl; return 1; } #endif /* !GLIBMM_EXCEPTIONS_ENABLED */ //Get the GtkBuilder-instantiated Dialog: Application* myApp; refBuilder->get_widget_derived("application", myApp); if(myApp){ myApp->init(); kit.run(*myApp); } return 0; }
int main (int argc, char** argv) { RTC::Manager* manager; #if defined(__linux) Gtk::Main kit(argc, argv); DialogWin dialogwin; Gtk::Main::run( dialogwin ); #elif defined(_WIN32) //HINSTANCE hInst = GetModuleHandle( NULL ); HWND hwnd = GetWindow( NULL, GW_OWNER ); OpenDiaog(hwnd,"Wave Files(*.wav)\0*.wav\0All Files(*.*)\0*.*\0\0", WaveFileName,OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST | OFN_HIDEREADONLY); printf("Wave File Name:%s\n", WaveFileName); #endif setlocale(LC_ALL, ""); bindtextdomain(PACKAGE, LOCALEDIR); textdomain(PACKAGE); manager = RTC::Manager::init(argc, argv); // Initialize manager manager->init(argc, argv); // Set module initialization proceduer // This procedure will be invoked in activateManager() function. manager->setModuleInitProc(MyModuleInit); // Activate manager and register to naming service manager->activateManager(); // run the manager in blocking mode // runManager(false) is the default. manager->runManager(); // If you want to run the manager in non-blocking mode, do like this // manager->runManager(true); return 0; }
int main(int argc, char** argv) { // Construct our main loop Gtk::Main kit( argc, argv ); // Initialize OpenGL Gtk::GL::init( argc, argv ); std::string filename = "puppet.lua"; if ( argc >= 2 ) { filename = argv[1]; } // Construct our (only) window, passing the input filename AppWindow window( filename ); // And run the application! Gtk::Main::run( window ); }
int main(int argc, char **argv) { #if USE_GTK Gtk::Main kit(argc, argv); Glib::thread_init(); // CalibrationWindow calwindow; // calwindow.show(); GazeTrackerGtk helloworld(argc, argv); helloworld.show(); Gtk::Main::run(helloworld); #else #warning implement me!! #endif return 0; }
int main(int argc, char **argv) { // if(!Glib::thread_supported()) { // Glib::thread_init(); // } bindtextdomain(GETTEXT_PACKAGE, GNOTE_LOCALEDIR); bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8"); textdomain(GETTEXT_PACKAGE); if(!g_thread_supported()) { g_thread_init(NULL); } gdk_threads_init(); Gtk::Main kit(argc, argv); gnote::Gnote *app = &gnote::Gnote::obj(); int retval = app->main(argc, argv); delete app; return retval; }
void DragClient::startDrag(DragImageRef image, const IntPoint& dragImageOrigin, const IntPoint& eventPos, Clipboard* clipboard, Frame* frame, bool linkDrag) { WebKitWebView* webView = webkit_web_frame_get_web_view(kit(frame)); RefPtr<DataObjectGtk> dataObject = clipboard->pasteboard().dataObject(); GRefPtr<GtkTargetList> targetList = adoptGRef(PasteboardHelper::defaultPasteboardHelper()->targetListForDataObject(dataObject.get())); GOwnPtr<GdkEvent> currentEvent(gtk_get_current_event()); GdkDragContext* context = gtk_drag_begin(GTK_WIDGET(m_webView), targetList.get(), dragOperationToGdkDragActions(clipboard->sourceOperation()), 1, currentEvent.get()); webView->priv->dragAndDropHelper.startedDrag(context, dataObject.get()); // A drag starting should prevent a double-click from happening. This might // happen if a drag is followed very quickly by another click (like in the DRT). webView->priv->clickCounter.reset(); if (image) { m_dragIcon.setImage(image); m_dragIcon.useForDrag(context, IntPoint(eventPos - dragImageOrigin)); } else gtk_drag_set_icon_default(context); }
int main(int argc, char *argv[]){ if(argc > 1){ strcpy(device,argv[1]); } Gtk::Main kit(argc,argv); std::thread audio_thread(audio_thread_func); mainwindow = new MainWindow; Gtk::Main::run(); quit_threads = true; audio_thread.join(); delete mainwindow; return 0; }
int main(int argc, char** argv) { // Construct our main loop Gtk::Main kit(argc, argv); // Initialize OpenGL Gtk::GL::init(argc, argv); std::string pcf = "pc.lua"; SceneNode* pc = import_lua(pcf); // Construct our (only) window AppWindow window; window.m_game->pc.scene = pc; window.run(); // And run the application! Gtk::Main::run(window); }
int main(int argc, char** argv) { // Construct our main loop Gtk::Main kit(argc, argv) ; // Initialize OpenGL Gtk::GL::init(argc, argv); std::string filename = "data/car.obj"; if (argc >= 2) { filename = argv[1]; } // This is how you might import a scene. car = import_object(filename); if (!car) { std::cerr << "Could not open " << filename << std::endl; return 1; } track = import_object("data/track.obj"); if(!track) { std::cerr<< "Could not open " << filename << std::endl; return 1; } innertrack = import_object("data/innertrack.obj"); outtertrack = import_object("data/outtertrack.obj"); pathpoints = import_object("data/path.obj"); // // std::cerr<<"sphere gen: "<<dl_sphere<<std::endl; // // Construct our (only) window AppWindow window; // // And run the application! Gtk::Main::run(window); }
JVMState* DirectCallGenerator::generate(JVMState* jvms) { GraphKit kit(jvms); kit.C->print_inlining_update(this); bool is_static = method()->is_static(); address target = is_static ? SharedRuntime::get_resolve_static_call_stub() : SharedRuntime::get_resolve_opt_virtual_call_stub(); if (kit.C->log() != NULL) { kit.C->log()->elem("direct_call bci='%d'", jvms->bci()); } CallStaticJavaNode *call = new CallStaticJavaNode(kit.C, tf(), target, method(), kit.bci()); if (is_inlined_mh_linker(jvms, method())) { // To be able to issue a direct call and skip a call to MH.linkTo*/invokeBasic adapter, // additional information about the method being invoked should be attached // to the call site to make resolution logic work // (see SharedRuntime::resolve_static_call_C). call->set_override_symbolic_info(true); } _call_node = call; // Save the call node in case we need it later if (!is_static) { // Make an explicit receiver null_check as part of this call. // Since we share a map with the caller, his JVMS gets adjusted. kit.null_check_receiver_before_call(method()); if (kit.stopped()) { // And dump it back to the caller, decorated with any exceptions: return kit.transfer_exceptions_into_jvms(); } // Mark the call node as virtual, sort of: call->set_optimized_virtual(true); if (method()->is_method_handle_intrinsic() || method()->is_compiled_lambda_form()) { call->set_method_handle_invoke(true); } } kit.set_arguments_for_java_call(call); kit.set_edges_for_java_call(call, false, _separate_io_proj); Node* ret = kit.set_results_for_java_call(call, _separate_io_proj); kit.push_node(method()->return_type()->basic_type(), ret); return kit.transfer_exceptions_into_jvms(); }