Esempio n. 1
0
NemoFileUndoManagerState
nemo_file_undo_manager_get_state (void)
{
    NemoFileUndoManager *self = get_singleton ();

    return self->priv->state;
}
Esempio n. 2
0
NemoFileUndoInfo *
nemo_file_undo_manager_get_action (void)
{
    NemoFileUndoManager *self = get_singleton ();

    return self->priv->info;
}
Esempio n. 3
0
void
nemo_file_undo_manager_push_flag ()
{
    NemoFileUndoManager *self = get_singleton ();
    NemoFileUndoManagerPrivate *priv = self->priv;

    priv->undo_redo_flag = TRUE;
}
Esempio n. 4
0
void sound_player::on_channel_finished(int iChannel)
{
    sound_player *pThis = get_singleton();
    if(pThis == nullptr)
        return;

    pThis->release_channel(iChannel);
}
Esempio n. 5
0
void
nemo_file_undo_manager_undo (GtkWindow *parent_window)
{
    NemoFileUndoManager *self = get_singleton ();

    if (self->priv->state != NEMO_FILE_UNDO_MANAGER_STATE_UNDO) {
        g_warning ("Called undo, but state is %s!", self->priv->state == 0 ?
                   "none" : "redo");
        return;
    }

    do_undo_redo (self, parent_window);
}
Esempio n. 6
0
gboolean
nemo_file_undo_manager_pop_flag ()
{
    NemoFileUndoManager *self = get_singleton ();
    NemoFileUndoManagerPrivate *priv = self->priv;
    gboolean retval = FALSE;

    if (priv->undo_redo_flag) {
        retval = TRUE;
    }

    priv->undo_redo_flag = FALSE;
    return retval;
}
Esempio n. 7
0
  v8::Local<v8::Function> Null::get_constructor() {
    Nan::EscapableHandleScope scope;
    v8::Local<v8::Function> conslocal;
    if (constructor.IsEmpty()) {
      v8::Local<v8::FunctionTemplate> tpl = Nan::New<v8::FunctionTemplate>(New);

      tpl->SetClassName(Nan::New("SassNull").ToLocalChecked());
      tpl->InstanceTemplate()->SetInternalFieldCount(1);

      conslocal = Nan::GetFunction(tpl).ToLocalChecked();
      constructor.Reset(conslocal);

      get_singleton().js_object.Reset(Nan::NewInstance(conslocal).ToLocalChecked());
      Nan::SetInternalFieldPointer(Nan::New(get_singleton().js_object), 0, &get_singleton());
      Nan::Set(conslocal, Nan::New("NULL").ToLocalChecked(), Nan::New(get_singleton().js_object));

      constructor_locked = true;
    } else {
      conslocal = Nan::New(constructor);
    }

    return scope.Escape(conslocal);
  }
Esempio n. 8
0
void
nemo_file_undo_manager_set_action (NemoFileUndoInfo *info)
{
    NemoFileUndoManager *self = get_singleton ();

    DEBUG ("Setting undo information %p", info);

    file_undo_manager_clear (self);

    if (info != NULL) {
        self->priv->info = g_object_ref (info);
        self->priv->state = NEMO_FILE_UNDO_MANAGER_STATE_UNDO;
        self->priv->last_state = NEMO_FILE_UNDO_MANAGER_STATE_NONE;
    }

    g_signal_emit (self, signals[SIGNAL_UNDO_CHANGED], 0);
}
Esempio n. 9
0
  Handle<Function> Boolean::get_constructor() {
    if (constructor.IsEmpty()) {
      Local<FunctionTemplate> tpl = NanNew<FunctionTemplate>(New);

      tpl->SetClassName(NanNew("SassBoolean"));
      tpl->InstanceTemplate()->SetInternalFieldCount(1);
      tpl->PrototypeTemplate()->Set(NanNew("getValue"), NanNew<FunctionTemplate>(GetValue)->GetFunction());

      NanAssignPersistent(constructor, tpl->GetFunction());

      NanAssignPersistent(get_singleton(false).js_object, NanNew(constructor)->NewInstance());
      NanSetInternalFieldPointer(NanNew(get_singleton(false).js_object), 0, &get_singleton(false));
      NanNew(constructor)->Set(NanNew("FALSE"), NanNew(get_singleton(false).js_object));

      NanAssignPersistent(get_singleton(true).js_object, NanNew(constructor)->NewInstance());
      NanSetInternalFieldPointer(NanNew(get_singleton(true).js_object), 0, &get_singleton(true));
      NanNew(constructor)->Set(NanNew("TRUE"), NanNew(get_singleton(true).js_object));

      constructor_locked = true;
    }

    return NanNew(constructor);
  }
Esempio n. 10
0
NemoFileUndoManager *
nemo_file_undo_manager_get ()
{
    return get_singleton ();
}
	static void create_new_data_network( const std::string &udmFileName ) {
		get_singleton().createNewDataNetwork( udmFileName );
	}
	static SFC::Project get_root( void ) {
		return get_singleton().getRoot();
	}
	static void close_with_update( void ) {
		get_singleton().closeWithUpdate();
	}
	static void commit_edit_sequence( void ) {
		get_singleton().commitEditSequence();
	}
	static void open_existing( const std::string &udmFileName, const std::string &metaLocator ) {
		get_singleton().openExisting( udmFileName, metaLocator );
	}