本文整理汇总了C++中D_函数的典型用法代码示例。如果您正苦于以下问题:C++ D_函数的具体用法?C++ D_怎么用?C++ D_使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了D_函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: coco_load
static int coco_load(struct module_data *m, FILE *f, const int start)
{
struct xmp_module *mod = &m->mod;
struct xmp_event *event;
int i, j;
int seq_ptr, pat_ptr, smp_ptr[100];
LOAD_INIT();
mod->chn = read8(f) & 0x3f;
read_title(f, mod->name, 20);
for (i = 0; i < 20; i++) {
if (mod->name[i] == 0x0d)
mod->name[i] = 0;
}
set_type(m, "Coconizer");
mod->ins = mod->smp = read8(f);
mod->len = read8(f);
mod->pat = read8(f);
mod->trk = mod->pat * mod->chn;
seq_ptr = read32l(f);
pat_ptr = read32l(f);
MODULE_INFO();
INSTRUMENT_INIT();
m->vol_table = (int *)arch_vol_table;
m->volbase = 0xff;
for (i = 0; i < mod->ins; i++) {
mod->xxi[i].sub = calloc(sizeof (struct xmp_subinstrument), 1);
smp_ptr[i] = read32l(f);
mod->xxs[i].len = read32l(f);
mod->xxi[i].sub[0].vol = 0xff - read32l(f);
mod->xxi[i].sub[0].pan = 0x80;
mod->xxs[i].lps = read32l(f);
mod->xxs[i].lpe = mod->xxs[i].lps + read32l(f);
if (mod->xxs[i].lpe)
mod->xxs[i].lpe -= 1;
mod->xxs[i].flg = mod->xxs[i].lps > 0 ? XMP_SAMPLE_LOOP : 0;
fread(mod->xxi[i].name, 1, 11, f);
for (j = 0; j < 11; j++) {
if (mod->xxi[i].name[j] == 0x0d)
mod->xxi[i].name[j] = 0;
}
read8(f); /* unused */
mod->xxi[i].nsm = !!mod->xxs[i].len;
mod->xxi[i].sub[0].sid = i;
D_(D_INFO "[%2X] %-10.10s %05x %05x %05x %c V%02x",
i, mod->xxi[i].name,
mod->xxs[i].len, mod->xxs[i].lps, mod->xxs[i].lpe,
mod->xxs[i].flg & XMP_SAMPLE_LOOP ? 'L' : ' ',
mod->xxi[i].sub[0].vol);
}
/* Sequence */
fseek(f, start + seq_ptr, SEEK_SET);
for (i = 0; ; i++) {
uint8 x = read8(f);
if (x == 0xff)
break;
mod->xxo[i] = x;
}
for (i++; i % 4; i++) /* for alignment */
read8(f);
/* Patterns */
PATTERN_INIT();
D_(D_INFO "Stored patterns: %d", mod->pat);
for (i = 0; i < mod->pat; i++) {
PATTERN_ALLOC (i);
mod->xxp[i]->rows = 64;
TRACK_ALLOC (i);
for (j = 0; j < (64 * mod->chn); j++) {
event = &EVENT (i, j % mod->chn, j / mod->chn);
event->fxp = read8(f);
event->fxt = read8(f);
event->ins = read8(f);
event->note = read8(f);
if (event->note)
event->note += 12;
fix_effect(event);
}
}
/* Read samples */
//.........这里部分代码省略.........
示例2: hsc_load
static int hsc_load(struct module_data *m, HIO_HANDLE *f, const int start)
{
struct xmp_module *mod = &m->mod;
int pat, i, r, c;
struct xmp_event *event;
uint8 *x, *sid, e[2], buf[128 * 12];
LOAD_INIT();
hio_read(buf, 1, 128 * 12, f);
x = buf;
for (i = 0; i < 128; i++, x += 12) {
if (x[9] & ~0x3 || x[10] & ~0x3) /* Test waveform register */
break;
if (x[8] & ~0xf) /* Test feedback & algorithm */
break;
}
mod->ins = i;
hio_seek(f, start + 0, SEEK_SET);
mod->chn = 9;
mod->bpm = 135;
mod->spd = 6;
mod->smp = mod->ins;
m->quirk |= QUIRK_LINEAR;
set_type(m, "HSC-Tracker");
MODULE_INFO();
/* Read instruments */
if (instrument_init(mod) < 0)
return -1;
hio_read (buf, 1, 128 * 12, f);
sid = buf;
for (i = 0; i < mod->ins; i++, sid += 12) {
if (subinstrument_alloc(mod, i, 1) < 0)
return -1;
mod->xxi[i].nsm = 1;
mod->xxi[i].sub[0].vol = 0x40;
mod->xxi[i].sub[0].fin = (int8)sid[11] / 4;
mod->xxi[i].sub[0].pan = 0x80;
mod->xxi[i].sub[0].xpo = 0;
mod->xxi[i].sub[0].sid = i;
mod->xxi[i].rls = LSN(sid[7]) * 32; /* carrier release */
if (load_sample(m, f, SAMPLE_FLAG_ADLIB | SAMPLE_FLAG_HSC,
&mod->xxs[i], (char *)sid) < 0)
return -1;
}
/* Read orders */
for (pat = i = 0; i < 51; i++) {
hio_read (&mod->xxo[i], 1, 1, f);
if (mod->xxo[i] & 0x80)
break; /* FIXME: jump line */
if (mod->xxo[i] > pat)
pat = mod->xxo[i];
}
hio_seek(f, 50 - i, SEEK_CUR);
mod->len = i;
mod->pat = pat + 1;
mod->trk = mod->pat * mod->chn;
D_(D_INFO "Module length: %d", mod->len);
D_(D_INFO "Instruments: %d", mod->ins);
D_(D_INFO "Stored patterns: %d", mod->pat);
if (pattern_init(mod) < 0)
return -1;
/* Read and convert patterns */
for (i = 0; i < mod->pat; i++) {
int ins[9] = { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
if (pattern_tracks_alloc(mod, i, 64) < 0)
return -1;
for (r = 0; r < mod->xxp[i]->rows; r++) {
for (c = 0; c < 9; c++) {
hio_read (e, 1, 2, f);
event = &EVENT (i, c, r);
if (e[0] & 0x80) {
ins[c] = e[1] + 1;
} else if (e[0] == 0x7f) {
event->note = XMP_KEY_OFF;
} else if (e[0] > 0) {
event->note = e[0] + 25;
event->ins = ins[c];
}
event->fxt = 0;
event->fxp = 0;
//.........这里部分代码省略.........
示例3: _gc_label
static const char *
_gc_label (const E_Gadcon_Client_Class *client_class)
{
return D_ ("Empris");
}
示例4: _mpdule_update_song
static void
_mpdule_update_song (Instance * inst)
{
mpd_Connection *mpd;
Evas_Object *mpdule;
Evas_Object *o_popup;
if (!inst->mpd)
return;
mpd = inst->mpd;
mpdule = inst->mpdule;
o_popup = inst->o_popup;
mpd_sendStatusCommand (mpd);
if (mpd->error == 0)
{
mpd_Status *status = mpd_getStatus (mpd);
if (status)
{
if (status->state == MPD_STATUS_STATE_UNKNOWN)
{
edje_object_part_text_set (mpdule, "mpdule.status",
D_ ("Unknown"));
edje_object_part_text_set (o_popup, "mpdule.status",
D_ ("Unknown"));
}
else if (status->state == MPD_STATUS_STATE_STOP)
{
edje_object_part_text_set (mpdule, "mpdule.status",
D_ ("Stopped"));
edje_object_part_text_set (o_popup, "mpdule.status",
D_ ("Stopped"));
}
else if (status->state == MPD_STATUS_STATE_PLAY)
{
edje_object_part_text_set (mpdule, "mpdule.status",
D_ ("Playing"));
edje_object_part_text_set (o_popup, "mpdule.status",
D_ ("Playing"));
}
else if (status->state == MPD_STATUS_STATE_PAUSE)
{
edje_object_part_text_set (mpdule, "mpdule.status",
D_ ("Paused"));
edje_object_part_text_set (o_popup, "mpdule.status",
D_ ("Paused"));
}
if (status->state > MPD_STATUS_STATE_STOP)
{
mpd_sendCurrentSongCommand (mpd);
mpd_InfoEntity *entity = NULL;
while ((entity = mpd_getNextInfoEntity (mpd)))
{
if (entity->type == MPD_INFO_ENTITY_TYPE_SONG &&
entity->info.song->id == status->songid)
{
mpd_Song *song = entity->info.song;
if (song->artist)
{
edje_object_part_text_set (mpdule, "mpdule.artist",
song->artist);
edje_object_part_text_set (o_popup, "mpdule.artist",
song->artist);
}
else
{
edje_object_part_text_set (mpdule, "mpdule.artist",
"");
edje_object_part_text_set (o_popup, "mpdule.artist",
"");
}
if (song->title)
{
edje_object_part_text_set (mpdule, "mpdule.title",
song->title);
edje_object_part_text_set (o_popup, "mpdule.title",
song->title);
}
else
{
edje_object_part_text_set (mpdule, "mpdule.title",
"");
edje_object_part_text_set (o_popup, "mpdule.title",
"");
}
if (song->album)
{
edje_object_part_text_set (mpdule, "mpdule.album",
song->album);
edje_object_part_text_set (o_popup, "mpdule.album",
song->album);
}
else
{
edje_object_part_text_set (mpdule, "mpdule.album",
"");
edje_object_part_text_set (o_popup, "mpdule.album",
//.........这里部分代码省略.........
示例5: __attribute__
void __attribute__((constructor)) swh_init() {
char **port_names;
LADSPA_PortDescriptor *port_descriptors;
LADSPA_PortRangeHint *port_range_hints;
#ifdef ENABLE_NLS
#define D_(s) dgettext(PACKAGE, s)
setlocale(LC_ALL, "");
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
#else
#define D_(s) (s)
#endif
impulse_fcDescriptor =
(LADSPA_Descriptor *)malloc(sizeof(LADSPA_Descriptor));
if (impulse_fcDescriptor) {
impulse_fcDescriptor->UniqueID = 1885;
impulse_fcDescriptor->Label = "impulse_fc";
impulse_fcDescriptor->Properties =
LADSPA_PROPERTY_HARD_RT_CAPABLE;
impulse_fcDescriptor->Name =
D_("Nonbandlimited single-sample impulses (Frequency: Control)");
impulse_fcDescriptor->Maker =
"Andy Wingo <wingo at pobox dot com>";
impulse_fcDescriptor->Copyright =
"GPL";
impulse_fcDescriptor->PortCount = 2;
port_descriptors = (LADSPA_PortDescriptor *)calloc(2,
sizeof(LADSPA_PortDescriptor));
impulse_fcDescriptor->PortDescriptors =
(const LADSPA_PortDescriptor *)port_descriptors;
port_range_hints = (LADSPA_PortRangeHint *)calloc(2,
sizeof(LADSPA_PortRangeHint));
impulse_fcDescriptor->PortRangeHints =
(const LADSPA_PortRangeHint *)port_range_hints;
port_names = (char **)calloc(2, sizeof(char*));
impulse_fcDescriptor->PortNames =
(const char **)port_names;
/* Parameters for Frequency (Hz) */
port_descriptors[IMPULSE_FC_FREQUENCY] =
LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL;
port_names[IMPULSE_FC_FREQUENCY] =
D_("Frequency (Hz)");
port_range_hints[IMPULSE_FC_FREQUENCY].HintDescriptor =
LADSPA_HINT_BOUNDED_BELOW;
port_range_hints[IMPULSE_FC_FREQUENCY].LowerBound = 0;
/* Parameters for Output */
port_descriptors[IMPULSE_FC_OUT] =
LADSPA_PORT_OUTPUT | LADSPA_PORT_AUDIO;
port_names[IMPULSE_FC_OUT] =
D_("Output");
port_range_hints[IMPULSE_FC_OUT].HintDescriptor = 0;
impulse_fcDescriptor->activate = activateImpulse_fc;
impulse_fcDescriptor->cleanup = cleanupImpulse_fc;
impulse_fcDescriptor->connect_port = connectPortImpulse_fc;
impulse_fcDescriptor->deactivate = NULL;
impulse_fcDescriptor->instantiate = instantiateImpulse_fc;
impulse_fcDescriptor->run = runImpulse_fc;
impulse_fcDescriptor->run_adding = runAddingImpulse_fc;
impulse_fcDescriptor->set_run_adding_gain = setRunAddingGainImpulse_fc;
}
}
示例6: ngi_border_menu_show
void
ngi_border_menu_show(Ngi_Box *box, E_Border *bd, Evas_Coord x, Evas_Coord y, int dir, Ecore_X_Time timestamp)
{
E_Menu *m;
E_Menu_Item *mi;
Ng *ng = box->ng;
if (bd->border_menu)
return;
m = e_menu_new();
e_menu_category_set(m,"border");
e_menu_category_data_set("border",bd);
e_object_data_set(E_OBJECT(m), bd);
bd->border_menu = m;
e_menu_post_deactivate_callback_set(m, _ng_border_cb_border_menu_end, ng); /* FIXME */
if ((!bd->lock_user_fullscreen) && (!bd->shaded))
{
mi = e_menu_item_new(m);
e_menu_item_label_set(mi, D_("Fullscreen"));
e_menu_item_check_set(mi, 1);
e_menu_item_toggle_set(mi, bd->fullscreen);
e_menu_item_callback_set(mi, _ng_border_menu_cb_fullscreen, bd);
e_menu_item_icon_edje_set(mi,
e_theme_edje_file_get("base/theme/borders",
"e/widgets/border/default/fullscreen"),
"e/widgets/border/default/fullscreen");
}
mi = e_menu_item_new(m);
e_menu_item_separator_set(mi, 1);
if (!bd->lock_close)
{
mi = e_menu_item_new(m);
e_menu_item_label_set(mi, D_("Close"));
e_menu_item_callback_set(mi, _ng_border_menu_cb_close, bd);
e_menu_item_icon_edje_set(mi,
e_theme_edje_file_get("base/theme/borders",
"e/widgets/border/default/close"),
"e/widgets/border/default/close");
}
if (!bd->internal)
{
mi = e_menu_item_new(m);
e_menu_item_separator_set(mi, 1);
if (!(((bd->client.icccm.min_w == bd->client.icccm.max_w) &&
(bd->client.icccm.min_h == bd->client.icccm.max_h)) ||
(bd->lock_user_maximize)))
{
if ((!bd->lock_user_maximize) && (!bd->shaded) &&
((bd->layer == 50) || (bd->layer == 100) || (bd->layer == 150)))
{
mi = e_menu_item_new(m);
e_menu_item_label_set(mi, D_("Maximized"));
e_menu_item_check_set(mi, 1);
e_menu_item_toggle_set(mi, (bd->maximized & E_MAXIMIZE_DIRECTION) == E_MAXIMIZE_BOTH);
if((bd->maximized & E_MAXIMIZE_DIRECTION) == E_MAXIMIZE_BOTH)
e_menu_item_callback_set(mi, _ng_border_menu_cb_unmaximize, bd);
else
e_menu_item_callback_set(mi, _ng_border_menu_cb_maximize, bd);
e_menu_item_icon_edje_set(mi,
e_theme_edje_file_get("base/theme/borders",
"e/widgets/border/default/maximize"),
"e/widgets/border/default/maximize");
}
}
}
if (!bd->lock_user_iconify)
{
mi = e_menu_item_new(m);
if(bd->iconic)
e_menu_item_label_set(mi, D_("Uniconify"));
else
e_menu_item_label_set(mi, D_("Iconify"));
e_menu_item_callback_set(mi, _ng_border_menu_cb_iconify, bd);
e_menu_item_icon_edje_set(mi,
e_theme_edje_file_get("base/theme/borders",
"e/widgets/border/default/minimize"),
"e/widgets/border/default/minimize");
}
e_menu_activate_mouse(m, ng->zone, ng->zone->x + x, ng->zone->y + y, 1, 1,
dir, timestamp);
}
示例7: _init
void _init() {
char **port_names;
LADSPA_PortDescriptor *port_descriptors;
LADSPA_PortRangeHint *port_range_hints;
#ifdef ENABLE_NLS
#define D_(s) dgettext(PACKAGE, s)
setlocale(LC_ALL, "");
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
#else
#define D_(s) (s)
#endif
bwxover_iirDescriptor =
(LADSPA_Descriptor *)malloc(sizeof(LADSPA_Descriptor));
if (bwxover_iirDescriptor) {
bwxover_iirDescriptor->UniqueID = 1902;
bwxover_iirDescriptor->Label = "bwxover_iir";
bwxover_iirDescriptor->Properties =
LADSPA_PROPERTY_HARD_RT_CAPABLE;
bwxover_iirDescriptor->Name =
D_("Glame Butterworth X-over Filter");
bwxover_iirDescriptor->Maker =
"Alexander Ehlert <[email protected]>";
bwxover_iirDescriptor->Copyright =
"GPL";
bwxover_iirDescriptor->PortCount = 5;
port_descriptors = (LADSPA_PortDescriptor *)calloc(5,
sizeof(LADSPA_PortDescriptor));
bwxover_iirDescriptor->PortDescriptors =
(const LADSPA_PortDescriptor *)port_descriptors;
port_range_hints = (LADSPA_PortRangeHint *)calloc(5,
sizeof(LADSPA_PortRangeHint));
bwxover_iirDescriptor->PortRangeHints =
(const LADSPA_PortRangeHint *)port_range_hints;
port_names = (char **)calloc(5, sizeof(char*));
bwxover_iirDescriptor->PortNames =
(const char **)port_names;
/* Parameters for Cutoff Frequency (Hz) */
port_descriptors[BWXOVER_IIR_CUTOFF] =
LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL;
port_names[BWXOVER_IIR_CUTOFF] =
D_("Cutoff Frequency (Hz)");
port_range_hints[BWXOVER_IIR_CUTOFF].HintDescriptor =
LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_DEFAULT_LOW | LADSPA_HINT_SAMPLE_RATE | LADSPA_HINT_LOGARITHMIC;
port_range_hints[BWXOVER_IIR_CUTOFF].LowerBound = 0.0001;
port_range_hints[BWXOVER_IIR_CUTOFF].UpperBound = 0.45;
/* Parameters for Resonance */
port_descriptors[BWXOVER_IIR_RESONANCE] =
LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL;
port_names[BWXOVER_IIR_RESONANCE] =
D_("Resonance");
port_range_hints[BWXOVER_IIR_RESONANCE].HintDescriptor =
LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_DEFAULT_MIDDLE;
port_range_hints[BWXOVER_IIR_RESONANCE].LowerBound = 0.1;
port_range_hints[BWXOVER_IIR_RESONANCE].UpperBound = 1.41;
/* Parameters for Input */
port_descriptors[BWXOVER_IIR_INPUT] =
LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO;
port_names[BWXOVER_IIR_INPUT] =
D_("Input");
port_range_hints[BWXOVER_IIR_INPUT].HintDescriptor = 0;
/* Parameters for LP-Output */
port_descriptors[BWXOVER_IIR_LPOUTPUT] =
LADSPA_PORT_OUTPUT | LADSPA_PORT_AUDIO;
port_names[BWXOVER_IIR_LPOUTPUT] =
D_("LP-Output");
port_range_hints[BWXOVER_IIR_LPOUTPUT].HintDescriptor = 0;
/* Parameters for HP-Output */
port_descriptors[BWXOVER_IIR_HPOUTPUT] =
LADSPA_PORT_OUTPUT | LADSPA_PORT_AUDIO;
port_names[BWXOVER_IIR_HPOUTPUT] =
D_("HP-Output");
port_range_hints[BWXOVER_IIR_HPOUTPUT].HintDescriptor = 0;
bwxover_iirDescriptor->activate = activateBwxover_iir;
bwxover_iirDescriptor->cleanup = cleanupBwxover_iir;
bwxover_iirDescriptor->connect_port = connectPortBwxover_iir;
bwxover_iirDescriptor->deactivate = NULL;
bwxover_iirDescriptor->instantiate = instantiateBwxover_iir;
bwxover_iirDescriptor->run = runBwxover_iir;
bwxover_iirDescriptor->run_adding = runAddingBwxover_iir;
bwxover_iirDescriptor->set_run_adding_gain = setRunAddingGainBwxover_iir;
}
buttlow_iirDescriptor =
(LADSPA_Descriptor *)malloc(sizeof(LADSPA_Descriptor));
if (buttlow_iirDescriptor) {
buttlow_iirDescriptor->UniqueID = 1903;
//.........这里部分代码省略.........
示例8: hmn_load
static int hmn_load(struct module_data *m, HIO_HANDLE * f, const int start)
{
struct xmp_module *mod = &m->mod;
int i, j;
struct xmp_event *event;
struct mod_header mh;
struct mupp mupp[31];
uint8 mod_event[4];
int mupp_index, num_mupp;
LOAD_INIT();
/*
* clr.b $1c(a6) ;prog on/off
* CMP.L #'Mupp',-$16(a3,d4.l)
* bne.s noprgo
* move.l a0,-(a7)
* move.b #1,$1c(a6) ;prog on
* move.l l697,a0
* lea $43c(a0),a0
* moveq #0,d2
* move.b -$16+$4(a3,d4.l),d2 ;pattno
* mulu #$400,d2
* lea (a0,d2.l),a0
* move.l a0,4(a6) ;proginstr data-start
* moveq #0,d2
* MOVE.B $3C0(A0),$12(A6)
* AND.B #$7F,$12(A6)
* move.b $380(a0),d2
* mulu #$20,d2
* lea (a0,d2.w),a0
* move.l a0,$a(a6) ;loopstartmempoi = startmempoi
* move.B $3(a3,d4.l),$13(a6) ;volume
* move.b -$16+$5(a3,d4.l),8(a6) ;dataloopstart
* move.b -$16+$6(a3,d4.l),9(a6) ;dataloopend
* move.w #$10,$e(a6) ;looplen
* move.l (a7)+,a0
* MOVE.W $12(A6),(A2)
* AND.W #$FF,(A2)
* BRA.S L505_LQ
*/
/*
* Wavetable structure is 22 * 32 byte waveforms and 32 byte
* wave control data with looping.
*/
memset(mupp, 0, 31 * sizeof (struct mupp));
hio_read(&mh.name, 20, 1, f);
num_mupp = 0;
for (i = 0; i < 31; i++) {
hio_read(&mh.ins[i].name, 22, 1, f); /* Instrument name */
if (memcmp(mh.ins[i].name, "Mupp", 4) == 0) {
mupp[i].prgon = 1;
mupp[i].pattno = mh.ins[i].name[4];
mupp[i].dataloopstart = mh.ins[i].name[5];
mupp[i].dataloopend = mh.ins[i].name[6];
num_mupp++;
}
mh.ins[i].size = hio_read16b(f);
mh.ins[i].finetune = hio_read8(f);
mh.ins[i].volume = hio_read8(f);
mh.ins[i].loop_start = hio_read16b(f);
mh.ins[i].loop_size = hio_read16b(f);
}
mh.len = hio_read8(f);
mh.restart = hio_read8(f);
hio_read(&mh.order, 128, 1, f);
hio_read(&mh.magic, 4, 1, f);
mod->chn = 4;
mod->ins = 31;
mod->smp = mod->ins + 28 * num_mupp;
mod->len = mh.len;
mod->rst = mh.restart;
memcpy(mod->xxo, mh.order, 128);
for (i = 0; i < 128; i++) {
if (mod->xxo[i] > mod->pat)
mod->pat = mod->xxo[i];
}
mod->pat++;
mod->trk = mod->chn * mod->pat;
if (hmn_new_module_extras(m) != 0)
return -1;
strncpy(mod->name, (char *)mh.name, 20);
set_type(m, "%s (%4.4s)", "His Master's Noise", mh.magic);
MODULE_INFO();
if (instrument_init(mod) < 0)
return -1;
for (i = 0; i < mod->ins; i++) {
if (mupp[i].prgon) {
mod->xxi[i].nsm = 28;
//.........这里部分代码省略.........
示例9: message_list_view_show
struct MessageListViewData *
message_list_view_show(struct Window *win, GHashTable * options)
{
g_debug("message_list_view_show()");
struct MessageListViewData *data =
g_slice_alloc0(sizeof(struct MessageListViewData));
data->win = win;
window_layout_set(win, MESSAGE_FILE, "list");
window_text_set(win, "title", D_("Inbox"));
data->bt1 = elm_button_add(window_evas_object_get(win));
elm_button_label_set(data->bt1, D_("New"));
evas_object_smart_callback_add(data->bt1, "clicked",
message_list_view_new_clicked, data);
window_swallow(win, "button_new", data->bt1);
evas_object_show(data->bt1);
// Options button with hover
data->hv = elm_hover_add(window_evas_object_get(win));
data->bt2 = elm_button_add(window_evas_object_get(win));
elm_button_label_set(data->bt2, D_("Options"));
evas_object_smart_callback_add(data->bt2, "clicked", my_hover_bt_1,
data->hv);
window_swallow(win, "button_options", data->bt2);
evas_object_show(data->bt2);
elm_hover_parent_set(data->hv, window_evas_object_get(win));
elm_hover_target_set(data->hv, data->bt2);
data->bx = elm_box_add(window_evas_object_get(win));
elm_box_horizontal_set(data->bx, 0);
elm_box_homogenous_set(data->bx, 1);
evas_object_show(data->bx);
data->button_answer = elm_button_add(window_evas_object_get(win));
elm_button_label_set(data->button_answer, D_("Answer"));
evas_object_size_hint_min_set(data->button_answer, 130, 80);
evas_object_smart_callback_add(data->button_answer, "clicked",
message_list_view_answer_clicked, data);
evas_object_show(data->button_answer);
elm_box_pack_end(data->bx, data->button_answer);
data->button_delete = elm_button_add(window_evas_object_get(win));
elm_button_label_set(data->button_delete, D_("Delete"));
evas_object_size_hint_min_set(data->button_delete, 130, 80);
evas_object_smart_callback_add(data->button_delete, "clicked",
message_list_view_delete_clicked, data);
evas_object_show(data->button_delete);
elm_box_pack_end(data->bx, data->button_delete);
elm_hover_content_set(data->hv, "top", data->bx);
data->bt3 = elm_button_add(window_evas_object_get(win));
elm_button_label_set(data->bt3, D_("Show"));
evas_object_smart_callback_add(data->bt3, "clicked",
message_list_view_show_clicked, data);
window_swallow(win, "button_show", data->bt3);
evas_object_show(data->bt3);
g_debug("tree init");
data->tree = etk_tree_new();
etk_tree_rows_height_set(ETK_TREE(data->tree), 80);
etk_tree_mode_set(ETK_TREE(data->tree), ETK_TREE_MODE_LIST);
etk_tree_headers_visible_set(ETK_TREE(data->tree), ETK_FALSE);
etk_tree_multiple_select_set(ETK_TREE(data->tree), ETK_FALSE);
data->col1 = etk_tree_col_new(ETK_TREE(data->tree), "Title", 300, 0.0);
etk_tree_col_model_add(data->col1,
etk_tree_model_edje_new(MESSAGE_FILE,
"message_row"));
etk_tree_build(ETK_TREE(data->tree));
Etk_Scrolled_View *scrolled_view =
etk_tree_scrolled_view_get(ETK_TREE(data->tree));
etk_scrolled_view_dragable_set(ETK_SCROLLED_VIEW(scrolled_view),
ETK_TRUE);
etk_scrolled_view_drag_bouncy_set(ETK_SCROLLED_VIEW(scrolled_view),
ETK_FALSE);
etk_scrolled_view_policy_set(ETK_SCROLLED_VIEW(scrolled_view),
ETK_POLICY_HIDE, ETK_POLICY_HIDE);
data->container =
etk_embed_new(evas_object_evas_get
(window_evas_object_get(win)));
etk_container_add(ETK_CONTAINER(data->container), data->tree);
etk_widget_show_all(data->container);
window_swallow(win, "list",
etk_embed_object_get(ETK_EMBED(data->container)));
ogsmd_sim_retrieve_messagebook("all", retrieve_messagebook_callback,
data);
window_show(win);
//.........这里部分代码省略.........
示例10: utils_slide_delete
void utils_slide_delete(List_Item *item)
{
int i = 0;
Eina_List *l;
List_Item *_item;
EINA_LIST_FOREACH(l_slides, l, _item)
{
if(item == _item)
break;
else
i++;
}
Evas_Object *lbl, *tb, *bt, *icon;
char buf[PATH_MAX];
snprintf(buf, sizeof(buf), "%s/theme.edj", PACKAGE_DATA_DIR);
_inwin_delete_slide = elm_win_inwin_add(win);
evas_object_show(_inwin_delete_slide);
elm_object_style_set(_inwin_delete_slide, "minimal");
tb = elm_table_add(win);
elm_win_inwin_content_set(_inwin_delete_slide, tb);
//icon
icon = edje_object_add(evas_object_evas_get(win));
edje_object_file_set(icon, buf, "list/slides/icon");
evas_object_size_hint_min_set(icon,1024*0.20,768*0.20);
evas_object_size_hint_max_set(icon,1024*0.20,768*0.20);
if(item->thumb)
{
int w = item->thumb->w;
int h = item->thumb->h;
int *image = calloc(w*h, sizeof(int));
memcpy(image, item->thumb->thumb, sizeof(int)*w*h);
const Evas_Object *o_image = edje_object_part_object_get(icon, "object.icon");
evas_object_image_filled_set((Evas_Object*)o_image,1);
evas_object_color_set((Evas_Object*)o_image,255,255,255,255);
evas_object_image_size_set((Evas_Object*)o_image, w, h);
evas_object_image_data_set((Evas_Object*)o_image, image);
edje_object_signal_emit(icon, "icon,show", "eyelight");
}
evas_object_show(icon);
elm_table_pack(tb, icon, 0, 0, 2, 1);
//
bt= elm_button_add(win);
elm_object_text_set(bt, "Invisible button to add a vertical space");
elm_table_pack(tb, bt, 0, 1, 1, 1);
lbl = elm_label_add(win);
elm_object_text_set(lbl, D_("Are you sure you want to delete this slide ?"));
elm_table_pack(tb, lbl, 0, 2, 2, 1);
evas_object_show(lbl);
bt= elm_button_add(win);
elm_object_text_set(bt, "Invisible button to add a vertical space");
elm_table_pack(tb, bt, 0, 3, 1, 1);
bt= elm_button_add(win);
elm_object_text_set(bt, D_("Yes, Delete the slide"));
evas_object_smart_callback_add(bt, "clicked", _utils_slide_delete_cb, item);
evas_object_color_set(bt, 255, 0, 0, 255);
elm_table_pack(tb, bt, 0, 4, 1, 1);
evas_object_show(bt);
bt= elm_button_add(win);
elm_object_text_set(bt, D_("No, do not delete the slide"));
evas_object_smart_callback_add(bt, "clicked", _utils_slide_delete_cancel_cb, item);
elm_table_pack(tb, bt, 1, 4, 1, 1);
evas_object_show(bt);
}
示例11: __attribute__
void __attribute__((constructor)) swh_init() {
char **port_names;
LADSPA_PortDescriptor *port_descriptors;
LADSPA_PortRangeHint *port_range_hints;
#ifdef ENABLE_NLS
#define D_(s) dgettext(PACKAGE, s)
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
#else
#define D_(s) (s)
#endif
pointerCastDistortionDescriptor =
(LADSPA_Descriptor *)malloc(sizeof(LADSPA_Descriptor));
if (pointerCastDistortionDescriptor) {
pointerCastDistortionDescriptor->UniqueID = 1910;
pointerCastDistortionDescriptor->Label = "pointerCastDistortion";
pointerCastDistortionDescriptor->Properties =
LADSPA_PROPERTY_HARD_RT_CAPABLE;
pointerCastDistortionDescriptor->Name =
D_("Pointer cast distortion");
pointerCastDistortionDescriptor->Maker =
"Steve Harris <[email protected]>";
pointerCastDistortionDescriptor->Copyright =
"GPL";
pointerCastDistortionDescriptor->PortCount = 4;
port_descriptors = (LADSPA_PortDescriptor *)calloc(4,
sizeof(LADSPA_PortDescriptor));
pointerCastDistortionDescriptor->PortDescriptors =
(const LADSPA_PortDescriptor *)port_descriptors;
port_range_hints = (LADSPA_PortRangeHint *)calloc(4,
sizeof(LADSPA_PortRangeHint));
pointerCastDistortionDescriptor->PortRangeHints =
(const LADSPA_PortRangeHint *)port_range_hints;
port_names = (char **)calloc(4, sizeof(char*));
pointerCastDistortionDescriptor->PortNames =
(const char **)port_names;
/* Parameters for Effect cutoff freq (Hz) */
port_descriptors[POINTERCASTDISTORTION_CUTOFF] =
LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL;
port_names[POINTERCASTDISTORTION_CUTOFF] =
D_("Effect cutoff freq (Hz)");
port_range_hints[POINTERCASTDISTORTION_CUTOFF].HintDescriptor =
LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_LOGARITHMIC | LADSPA_HINT_SAMPLE_RATE | LADSPA_HINT_DEFAULT_LOW;
port_range_hints[POINTERCASTDISTORTION_CUTOFF].LowerBound = 0.0001;
port_range_hints[POINTERCASTDISTORTION_CUTOFF].UpperBound = 0.3;
/* Parameters for Dry/wet mix */
port_descriptors[POINTERCASTDISTORTION_WET] =
LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL;
port_names[POINTERCASTDISTORTION_WET] =
D_("Dry/wet mix");
port_range_hints[POINTERCASTDISTORTION_WET].HintDescriptor =
LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_DEFAULT_0;
port_range_hints[POINTERCASTDISTORTION_WET].LowerBound = 0;
port_range_hints[POINTERCASTDISTORTION_WET].UpperBound = 1;
/* Parameters for Input */
port_descriptors[POINTERCASTDISTORTION_INPUT] =
LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO;
port_names[POINTERCASTDISTORTION_INPUT] =
D_("Input");
port_range_hints[POINTERCASTDISTORTION_INPUT].HintDescriptor = 0;
/* Parameters for Output */
port_descriptors[POINTERCASTDISTORTION_OUTPUT] =
LADSPA_PORT_OUTPUT | LADSPA_PORT_AUDIO;
port_names[POINTERCASTDISTORTION_OUTPUT] =
D_("Output");
port_range_hints[POINTERCASTDISTORTION_OUTPUT].HintDescriptor = 0;
pointerCastDistortionDescriptor->activate = activatePointerCastDistortion;
pointerCastDistortionDescriptor->cleanup = cleanupPointerCastDistortion;
pointerCastDistortionDescriptor->connect_port = connectPortPointerCastDistortion;
pointerCastDistortionDescriptor->deactivate = NULL;
pointerCastDistortionDescriptor->instantiate = instantiatePointerCastDistortion;
pointerCastDistortionDescriptor->run = runPointerCastDistortion;
pointerCastDistortionDescriptor->run_adding = runAddingPointerCastDistortion;
pointerCastDistortionDescriptor->set_run_adding_gain = setRunAddingGainPointerCastDistortion;
}
}
示例12: utils_edit_area_layout_stack_set
void utils_edit_area_layout_stack_set (void *data, Evas_Object *obj, void *event_info)
{
rightpanel_area_layout_set(D_("Stack"));
eyelight_edit_area_layout_set(_current_obj, "stack");
}
示例13: utils_edit_area_layout_horizontal_flow_set
void utils_edit_area_layout_horizontal_flow_set (void *data, Evas_Object *obj, void *event_info)
{
rightpanel_area_layout_set(D_("Horizontal flow"));
eyelight_edit_area_layout_set(_current_obj, "horizontal_flow");
}
示例14: utils_edit_area_layout_vertical_homogeneous_set
void utils_edit_area_layout_vertical_homogeneous_set (void *data, Evas_Object *obj, void *event_info)
{
rightpanel_area_layout_set(D_("Vertical homogeneous"));
eyelight_edit_area_layout_set(_current_obj, "vertical_homogeneous");
}
示例15: __attribute__
static void __attribute__((constructor)) swh_init() {
char **port_names;
LADSPA_PortDescriptor *port_descriptors;
LADSPA_PortRangeHint *port_range_hints;
#ifdef ENABLE_NLS
#define D_(s) dgettext(PACKAGE, s)
bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
#else
#define D_(s) (s)
#endif
rateShifterDescriptor =
(LADSPA_Descriptor *)malloc(sizeof(LADSPA_Descriptor));
if (rateShifterDescriptor) {
rateShifterDescriptor->UniqueID = 1417;
rateShifterDescriptor->Label = "rateShifter";
rateShifterDescriptor->Properties =
LADSPA_PROPERTY_HARD_RT_CAPABLE;
rateShifterDescriptor->Name =
D_("Rate shifter");
rateShifterDescriptor->Maker =
"Steve Harris <[email protected]>";
rateShifterDescriptor->Copyright =
"GPL";
rateShifterDescriptor->PortCount = 3;
port_descriptors = (LADSPA_PortDescriptor *)calloc(3,
sizeof(LADSPA_PortDescriptor));
rateShifterDescriptor->PortDescriptors =
(const LADSPA_PortDescriptor *)port_descriptors;
port_range_hints = (LADSPA_PortRangeHint *)calloc(3,
sizeof(LADSPA_PortRangeHint));
rateShifterDescriptor->PortRangeHints =
(const LADSPA_PortRangeHint *)port_range_hints;
port_names = (char **)calloc(3, sizeof(char*));
rateShifterDescriptor->PortNames =
(const char **)port_names;
/* Parameters for Rate */
port_descriptors[RATESHIFTER_RATE] =
LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL;
port_names[RATESHIFTER_RATE] =
D_("Rate");
port_range_hints[RATESHIFTER_RATE].HintDescriptor =
LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_DEFAULT_1;
port_range_hints[RATESHIFTER_RATE].LowerBound = -4;
port_range_hints[RATESHIFTER_RATE].UpperBound = 4;
/* Parameters for Input */
port_descriptors[RATESHIFTER_INPUT] =
LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO;
port_names[RATESHIFTER_INPUT] =
D_("Input");
port_range_hints[RATESHIFTER_INPUT].HintDescriptor = 0;
/* Parameters for Output */
port_descriptors[RATESHIFTER_OUTPUT] =
LADSPA_PORT_OUTPUT | LADSPA_PORT_AUDIO;
port_names[RATESHIFTER_OUTPUT] =
D_("Output");
port_range_hints[RATESHIFTER_OUTPUT].HintDescriptor = 0;
rateShifterDescriptor->activate = activateRateShifter;
rateShifterDescriptor->cleanup = cleanupRateShifter;
rateShifterDescriptor->connect_port = connectPortRateShifter;
rateShifterDescriptor->deactivate = NULL;
rateShifterDescriptor->instantiate = instantiateRateShifter;
rateShifterDescriptor->run = runRateShifter;
rateShifterDescriptor->run_adding = runAddingRateShifter;
rateShifterDescriptor->set_run_adding_gain = setRunAddingGainRateShifter;
}
}