~ahmed-a-ammar/pigment-python/pigment-python-0.3-expose-set_from_system_buffer

« back to all changes in this revision

Viewing changes to pgm/pgmdrawable.override

  • Committer: loic
  • Date: 2008-12-11 17:34:36 UTC
  • Revision ID: svn-v4:cae8e947-ad21-0410-97f1-bb4c1f169aab:trunk/pigment-python:1356
        * pgm/pgm.defs:
        * pgm/pgmdrawable.override:
        * pgm/timing/implicit.py:
        Added support for the pgm_drawable_[get,set]_scale functions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
411
411
}
412
412
 
413
413
%%
 
414
override-attr PgmDrawable.s
 
415
static PyObject *
 
416
_wrap_pgm_drawable__get_s (PyGObject *self,
 
417
                           void *closure)
 
418
{
 
419
  gfloat s;
 
420
 
 
421
  pyg_begin_allow_threads;
 
422
  pgm_drawable_get_scale (PGM_DRAWABLE (self->obj), &s);
 
423
  pyg_end_allow_threads;
 
424
 
 
425
  return PyFloat_FromDouble (s);
 
426
}
 
427
 
 
428
static int
 
429
_wrap_pgm_drawable__set_s (PyGObject *self,
 
430
                           PyObject *value,
 
431
                           void *closure)
 
432
{
 
433
  gfloat s;
 
434
 
 
435
  s = (gfloat) PyFloat_AsDouble (value);
 
436
 
 
437
  if (PyErr_Occurred ())
 
438
    return -1;
 
439
 
 
440
  pyg_begin_allow_threads;
 
441
  pgm_drawable_set_scale (PGM_DRAWABLE (self->obj), s);
 
442
  pyg_end_allow_threads;
 
443
 
 
444
  return 0;
 
445
}
 
446
 
 
447
%%
414
448
override-attr PgmDrawable.fg_color
415
449
static PyObject *
416
450
_wrap_pgm_drawable__get_fg_color (PyGObject *self,
929
963
}
930
964
 
931
965
%%
 
966
override pgm_drawable_get_scale noargs
 
967
static PyObject *
 
968
_wrap_pgm_drawable_get_scale (PyGObject *self)
 
969
{
 
970
  gfloat scale;
 
971
 
 
972
  pyg_begin_allow_threads;
 
973
  pgm_drawable_get_scale (PGM_DRAWABLE (self->obj), &scale);
 
974
  pyg_end_allow_threads;
 
975
 
 
976
  return PyFloat_FromDouble (scale);
 
977
}
 
978
 
 
979
%%
932
980
override pgm_drawable_set_fg_color kwargs
933
981
static PyObject *
934
982
_wrap_pgm_drawable_set_fg_color (PyGObject *self,