Exemplo n.º 1
0
static unsigned __stdcall GuiThread(void* param)
{
    MSG msg;

    (void) param;

    if(!skinName) skinName = strdup("Blue");
    if(!mygui) mygui = create_gui(get_path("skins"), guiSetEvent);
    if(!mygui) exit_player(EXIT_ERROR);

    if(autosync && autosync != gtkAutoSync)
    {
       gtkAutoSyncOn = TRUE;
       gtkAutoSync = autosync;
    }

    while(GetMessage(&msg, NULL, 0, 0))
    {
        TranslateMessage(&msg);
        DispatchMessage(&msg);
    }
    fprintf(stderr, "[GUI] GUI thread terminated.\n");
    fflush(stderr);
    return 0;
}
Exemplo n.º 2
0
		ProgressBar::ProgressBar(QWidget *parent):
				QWidget(parent),
				m_updateEnabled(false),
				m_minimumTimeToUpdate(default_minumum_type) {
			create_gui();
			t.start();
		}
int main( int argc, char *argv[])
{
	gtk_init(&argc, &argv);
 	spike_pattern_generator_set_network(allocate_network(spike_pattern_generator_get_network()));   // deallocates previously allocated external network and brings a new one.	
	spike_pattern_generator_set_trial_stats(allocate_trial_stats( spike_pattern_generator_get_trial_stats()));
	spike_pattern_generator_set_current_patterns(allocate_current_patterns( spike_pattern_generator_get_network(), spike_pattern_generator_get_trial_stats(), spike_pattern_generator_get_current_patterns()));
	create_gui();
	gtk_main();
	return 0;
}
Exemplo n.º 4
0
static void *create_effect_plugin_data(const SoundPluginType *plugin_type, struct SoundPlugin *plugin, hash_t *state, float samplerate, int blocksize, bool is_loading){
  dsp *dsp = new CLASSNAME;
  dsp->instanceInit(samplerate);
  Data *data = create_effect_plugin_data2(samplerate, dsp);

#ifndef FAUST_SYSTEM_EFFECT
  if (plugin != NULL) { // plugin==NULL during instrument type initialization, when we create test data. (took a long time to hunt down this bug)
    data->qtgui_parent = FAUST_create_qdialog();
    create_gui(data->qtgui_parent, data, plugin);
  }
#endif
  
  return data;
}
Exemplo n.º 5
0
void init_editor() {
    hgeParticleSystemInfo psi;

    state.texBG = 0;
    state.sprBG = nullptr;

    char* bgName = hge->Ini_GetString("HGE", "Background", nullptr);
    if (bgName) {
        state.texBG = hge->Texture_Load(bgName);
        const auto bgw = hge->Texture_GetWidth(state.texBG, true);
        const auto bgh = hge->Texture_GetHeight(state.texBG, true);
        state.sprBG = new hgeSprite(state.texBG, 0, 0, static_cast<float>(bgw), 
                                    static_cast<float>(bgh));
        state.sprBG->SetHotSpot(static_cast<float>(bgw) / 2,
            static_cast<float>(bgh) / 2);
    }

    hge->Resource_AttachPack("particleed.paq");

    state.bIFace = true;
    state.bHelp = false;
    state.bBBox = false;
    state.nPreset = 0;

    texParticles = hge->Texture_Load("particles.png");
    sprParticles = new hgeAnimation(texParticles, 16, 1.0f, 0, 0, 32, 32);
    sprParticles->SetHotSpot(16, 16);
    memset(&psi, 0, sizeof(hgeParticleSystemInfo));
    psi.sprite = sprParticles;
    state.ps = new hgeParticleSystem(&psi);
    state.ps->TrackBoundingBox(true);
    state.ps->MoveTo(psx, psy);

    fnt = new hgeFont("font3.fnt");
    tex_gui = hge->Texture_Load("pgui.png");

    spr_cursor = new hgeSprite(tex_gui, 487, 181, 19, 26);
    sprColor = new hgeSprite(tex_gui, 466, 208, 14, 80);
    sprBBox = new hgeSprite(tex_gui, 337, 209, 128, 128);

    spr_left_pane1 = new hgeSprite(tex_gui, 0, 0, 168, 512);
    spr_left_pane2 = new hgeSprite(tex_gui, 336, 0, 168, 88);
    sprRightPane1 = new hgeSprite(tex_gui, 168, 0, 168, 512);
    sprRightPane2 = new hgeSprite(tex_gui, 336, 88, 168, 88);

    gui = new hgeGUI();
    create_gui();

    cmdLoadPreset(state.nPreset);
}
Exemplo n.º 6
0
static void
bubblemon_construct (XfcePanelPlugin *plugin)
{
  Bubblemon *base;

  xfce_textdomain( GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR, "UTF-8");

  base = create_gui(plugin);
  xfce_panel_plugin_menu_show_configure(plugin);

  g_signal_connect(plugin, "free-data", G_CALLBACK(plugin_destroy), base);
  g_signal_connect(plugin, "configure-plugin", G_CALLBACK(display_about_dialog), base);
  g_signal_connect(plugin, "size-changed", G_CALLBACK(plugin_reconfigure), base);
  g_signal_connect(plugin, "orientation-changed", G_CALLBACK(update_orientation), base);
}
Exemplo n.º 7
0
static void *create_instrument_plugin_data(const SoundPluginType *plugin_type, struct SoundPlugin *plugin, hash_t *state, float samplerate, int blocksize, bool is_loading){
  dsp *dsps[MAX_POLYPHONY];
  for(int i=0;i<MAX_POLYPHONY;i++){
    dsps[i] = new CLASSNAME;
    dsps[i]->instanceInit(samplerate);
  }

  Data *data = create_instrument_plugin_data2(samplerate, dsps);

  create_automation_values(data);

  data->qtgui_parent = FAUST_create_qdialog();

  create_gui(data->qtgui_parent, data, plugin);

  return data;
}
Exemplo n.º 8
0
static bool FAUST_handle_fff_reply(struct SoundPlugin *plugin, const FFF_Reply &reply, bool is_initializing){
  struct Patch *patch = (struct Patch*)plugin->patch;
  Devdata *devdata = (Devdata*)plugin->data;
  
  if (reply.data==NULL){    
    fprintf(stderr,"Error-message: -%s-\n", devdata->reply.error_message.toUtf8().constData());
    devdata->reply.error_message = reply.error_message;
    return false;
  }

  FFF_Reply old_reply = devdata->reply;

  // handle gui
  {
    if (devdata->qtgui_parent == NULL)
      devdata->qtgui_parent = FAUST_create_qdialog();
    
    if (old_reply.data != NULL && old_reply.data->qtgui!=NULL){
      old_reply.data->qtgui->stop();
      devdata->qtgui_parent->layout()->removeWidget(old_reply.data->qtgui);
    }

    create_gui(devdata->qtgui_parent, reply.data, plugin);

    if (devdata->qtgui_parent->isVisible())
      reply.data->qtgui->run();    
  }
  
  hash_t *effects_state = is_initializing ? NULL : PLUGIN_get_effects_state(plugin);

  PLAYER_lock();{
    devdata->reply = reply;
  }PLAYER_unlock();

  if (effects_state != NULL)
    PLUGIN_set_effects_from_state(plugin, effects_state);

  if (old_reply.data != NULL)
    PATCH_handle_fxs_when_fx_names_have_changed(patch);
  
  FFF_request_free(devdata->id, old_reply);

  return true;
}
Exemplo n.º 9
0
EAPI int
elm_main(int argc, char **argv)
{
    //const char *theme;

    //int ret;

    //get users home dir
    const char *name = "HOME";
    sprintf(home_dir, "%s", getenv(name));

    //adjust finger size
    elm_config_finger_size_set(55);

    //paroli theme fix - not required anymore
    //theme = "tasks";
    //elm_theme_overlay_add(theme);

    //set up win
    win = elm_win_add(NULL, "tasks", ELM_WIN_BASIC);
    elm_win_title_set(win, "Tasks");
    evas_object_smart_callback_add(win, "delete,request", my_win_del, NULL);

    //open database
    open_database();

    // show the window
    create_gui(win);
    evas_object_show(win);

    //restore state
    restore_state();

    occupy_cpu();

    elm_run();
    //clean up stuff
    //clean_up();
    ecore_main_loop_quit();
    elm_shutdown();

    return 0;
}
Exemplo n.º 10
0
static void
math_display_set_property(GObject      *object,
                          guint         prop_id,
                          const GValue *value,
                          GParamSpec   *pspec)
{
    MathDisplay *self;

    self = MATH_DISPLAY(object);

    switch (prop_id) {
    case PROP_EQUATION:
        self->priv->equation = g_value_get_object(value);
        create_gui(self);
        break;
    default:
        G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
        break;
    }
}
Exemplo n.º 11
0
static void
math_preferences_set_property(GObject      *object,
                              guint         prop_id,
                              const GValue *value,
                              GParamSpec   *pspec)
{
    MathPreferencesDialog *self;

    self = MATH_PREFERENCES(object);

    switch (prop_id) {
    case PROP_EQUATION:
        self->priv->equation = g_value_get_object(value);
        create_gui(self);
        break;
    default:
        G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
        break;
    }
}
int 
main (int argc, char **argv)
{
  gtk_init (&argc, &argv);

  create_gui ();

  client = xsettings_client_new (gdk_display, DefaultScreen (gdk_display),
				 notify_cb, watch_cb, NULL);
  if (!client)
    {
      fprintf (stderr, "Could not create client!");
      exit (1);
    }

  gtk_main ();

  xsettings_client_destroy (client);

  return 0;
}
Exemplo n.º 13
0
Arquivo: main.c Projeto: tadeboro/hip
int
main (int    argc,
      char **argv)
{
  AppData *data;

  gtk_init (&argc, &argv);

  data = g_slice_new0 (AppData);

  data->settings = load_settings ();
  create_gui (data);
  update_processor (data);

  /* Load input file */
  if (argc == 2)
    load_source (data, argv[1]);

  gtk_main ();

  return 0;
}
Exemplo n.º 14
0
int main(int argc, char *argv[])
{
	/* We store everything about this application in this struct. It
	 * contains several sub-structs. */
	struct application_info app;
	app.timer.gtimer = NULL;
	app.timer.state = TIMER_DEAD;

	/* Initialize Gtk. Must be done before we can do anything related to
	 * Gtk. */
	gtk_init(&argc, &argv);

	/* This program will read commands from stdin. As we're inside of a
	 * Gtk program, we must use GIO facilities for this job. */
	setup_watch_stdin(&app);

	/* Create all widgets, show them, connect signals, ... */
	create_gui(&app);

	gtk_main();
	exit(EXIT_SUCCESS);
}
Exemplo n.º 15
0
void
ConfigureKeys::on_enter()
{
#ifndef DISABLE_LIBSIGC
    Globals g;

    SDL_EnableKeyRepeat(g.values().get(VAL_MENU_KEYREPEAT_DELAY), g.values().get(VAL_MENU_KEYREPEAT_INTERVAL));

    create_key_map();
    create_gui();

    mb_grab_key = false;
    m_which_player = 0;

    m_bg = g.render().LoadTexture(g.images().background_random());

    m_anim_bomb.SetAnimation(ANI_BOMB);
    m_anim_bomb.Start();

    mp_keyconfig    = &g.keycfg();

    g.render().SetTextSizes(16, 16);
#endif // DISABLE_LIBSIGC
}
Exemplo n.º 16
0
    void init (element_properties* parent, CEGUI::Window* window) {
	m_window = window;
	m_parent = parent;
	create_gui ();
    }