コード例 #1
0
ファイル: hotkeys.c プロジェクト: Tydus/deadbeef
}

int
action_toggle_stop_after_current_cb (struct DB_plugin_action_s *action, DB_playItem_t *it) {
    int var = deadbeef->conf_get_int ("playlist.stop_after_current", 0);
    var = 1 - var;
    deadbeef->conf_set_int ("playlist.stop_after_current", var);
    deadbeef->sendmessage (DB_EV_CONFIGCHANGED, 0, 0, 0);
    return 0;
}

static DB_plugin_action_t action_play = {
    .title = "Play",
    .name = "play",
    .flags = DB_ACTION_COMMON,
    .callback = DDB_ACTION_CALLBACK (action_play_cb),
    .next = NULL
};

static DB_plugin_action_t action_stop = {
    .title = "Stop",
    .name = "stop",
    .flags = DB_ACTION_COMMON,
    .callback = DDB_ACTION_CALLBACK(action_stop_cb),
    .next = &action_play
};

static DB_plugin_action_t action_prev = {
    .title = "Previous",
    .name = "prev",
    .flags = DB_ACTION_COMMON,
コード例 #2
0
ファイル: cdda.c プロジェクト: vadmium/deadbeef
    if (plt) {
        deadbeef->pl_add_files_begin (plt);
        deadbeef->plt_add_file (plt, "all.cda", NULL, NULL);
        deadbeef->pl_add_files_end ();
        deadbeef->plt_modified (plt);
        deadbeef->plt_unref (plt);
    }
    deadbeef->sendmessage (DB_EV_PLAYLISTCHANGED, 0, 0, 0);
    return 0;
}

static DB_plugin_action_t add_cd_action = {
    .name = "cd_add",
    .title = "File/Add Audio CD",
    .flags = DB_ACTION_COMMON,
    .callback = DDB_ACTION_CALLBACK(cda_action_add_cd),
    .next = NULL
};

static DB_plugin_action_t *
cda_get_actions (DB_playItem_t *unused)
{
    return &add_cd_action;
}

static const char *exts[] = { "cda", "nrg", NULL };
static const char settings_dlg[] =
    "property \"Use CDDB/FreeDB\" checkbox cdda.freedb.enable 1;\n"
    "property \"Prefer CD-Text over CDDB\" checkbox cdda.prefer_cdtext 1;\n"
    "property \"CDDB url (e.g. 'freedb.org')\" entry cdda.freedb.host freedb.org;\n"
    "property \"CDDB port number (e.g. '888')\" entry cdda.freedb.port 888;\n"
コード例 #3
0
ファイル: lastfm.c プロジェクト: vadmium/deadbeef
    free (command);
    return 0;
}

static int
lfm_action_love (DB_plugin_action_t *act, DB_playItem_t *it)
{
    printf ("Love starts here\n");
    return 0;
}

static DB_plugin_action_t love_action = {
    .title = "Love at Last.fm",
    .name = "lfm_love",
    .flags = DB_ACTION_SINGLE_TRACK,
    .callback = DDB_ACTION_CALLBACK(lfm_action_love),
    .next = NULL
};

static DB_plugin_action_t lookup_action = {
    .title = "Lookup on Last.fm",
    .name = "lfm_lookup",
    .flags = DB_ACTION_SINGLE_TRACK,
    .callback = DDB_ACTION_CALLBACK (lfm_action_lookup),
    .next = NULL// &love_action
};

static DB_plugin_action_t *
lfm_get_actions (DB_playItem_t *it)
{
    if (!it ||