Gtk-Perl
view release on metacpan or search on metacpan
Gnome/xs/Gnome.xs view on Meta::CPAN
RETVAL = gnome_config_has_section (path);
else if (ix == 1)
RETVAL = gnome_config_private_has_section (path);
OUTPUT:
RETVAL
void
gnome_config_drop_all (Class)
SV * Class
ALIAS:
Gnome::Config::drop_all = 0
Gnome::Config::sync = 1
Gnome::Config::pop_prefix = 2
CODE:
switch (ix) {
case 0: gnome_config_drop_all(); break;
case 1: gnome_config_sync(); break;
case 2: gnome_config_pop_prefix(); break;
}
void
gnome_config_push_prefix (Class, path)
SV * Class
char * path
ALIAS:
Gnome::Config::push_prefix = 0
Gnome::Config::clean_section = 1
Gnome::Config::clean_key = 2
Gnome::Config::clean_file = 3
Gnome::Config::drop_file = 4
Gnome::Config::sync_file = 5
Gnome::Config::private_clean_section = 6
Gnome::Config::private_clean_key = 7
Gnome::Config::private_clean_file = 8
Gnome::Config::private_drop_file = 9
Gnome::Config::private_sync_file = 10
CODE:
switch (ix) {
case 0: gnome_config_push_prefix (path); break;
case 1: gnome_config_clean_section (path); break;
case 2: gnome_config_clean_key (path); break;
case 3: gnome_config_clean_file (path); break;
case 4: gnome_config_drop_file (path); break;
case 5: gnome_config_sync_file (path); break;
case 6: gnome_config_private_clean_section (path); break;
case 7: gnome_config_private_clean_key (path); break;
case 8: gnome_config_private_clean_file (path); break;
case 9: gnome_config_private_drop_file (path); break;
case 10: gnome_config_private_sync_file (path); break;
}
void
section_contents (Class, path)
SV * Class
char * path
ALIAS:
Gnome::Config::section_contents = 0
Gnome::Config::sections = 1
Gnome::Config::private_section_contents = 2
Gnome::Config::private_sections = 3
PPCODE:
{
void* iter = 0;
char *key = NULL, *val = NULL;
int sections = 0;
switch (ix) {
case 0: iter = gnome_config_init_iterator (path); break;
case 1: iter = gnome_config_init_iterator_sections(path); sections++; break;
case 2: iter = gnome_config_private_init_iterator (path); break;
case 3: iter = gnome_config_private_init_iterator_sections(path); sections++; break;
}
while ((iter=gnome_config_iterator_next (iter, &key, sections?NULL:&val))) {
EXTEND(SP, 1);
PUSHs(sv_2mortal(newSVpv(key, 0)));
if (!sections) {
EXTEND(SP, 1);
PUSHs(sv_2mortal(newSVpv(val?val:"", 0)));
}
}
}
MODULE = Gnome PACKAGE = Gnome::Paper PREFIX = gnome_paper_
void
name_list (Class)
SV * Class
PPCODE:
{
GList * p = gnome_paper_name_list ();
GList * tmp = p;
while (tmp) {
EXTEND(SP, 1);
PUSHs(sv_2mortal(newSVpv((char*)tmp->data, 0)));
tmp = tmp->next;
}
}
char*
with_size (Class, pswidth, psheight)
SV * Class
double pswidth
double psheight
CODE:
{
GnomePaper* p = gnome_paper_with_size (pswidth, psheight);
RETVAL = p ? gnome_paper_name(p) : NULL;
}
OUTPUT:
RETVAL
char*
name_default (Class)
SV * Class
CODE:
RETVAL = gnome_paper_name_default ();
OUTPUT:
RETVAL
double
pswidth (Class, paper)
SV * Class
char * paper
ALIAS:
Gnome::Paper::pswidth = 0
Gnome::Paper::psheight = 1
Gnome::Paper::lmargin = 2
Gnome::Paper::tmargin = 3
Gnome::Paper::rmargin = 4
Gnome::Paper::bmargin = 5
CODE:
{
GnomePaper *p = gnome_paper_with_name (paper);
RETVAL = 0;
if (p) {
switch (ix) {
case 0: RETVAL = gnome_paper_pswidth (p); break;
case 1: RETVAL = gnome_paper_psheight (p); break;
case 2: RETVAL = gnome_paper_lmargin (p); break;
case 3: RETVAL = gnome_paper_tmargin (p); break;
case 4: RETVAL = gnome_paper_rmargin (p); break;
case 5: RETVAL = gnome_paper_bmargin (p); break;
}
}
}
OUTPUT:
RETVAL
( run in 0.357 second using v1.01-cache-2.11-cpan-5511b514fd6 )