Changeset 420

Show
Ignore:
Timestamp:
09/27/07 18:53:22 (1 year ago)
Author:
bjourne
Message:

Add an override that implements the PixbufDrawCache.get_method()
classmethod.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • pygtkimageview/src/gtkimageview.override

    r415 r420  
    180180    return 0; 
    181181} 
    182  
     182%% 
     183define GdkPixbufDrawCache.get_method kwargs classmethod 
     184static PyObject * 
     185_wrap_gdk_pixbuf_draw_cache_get_method (PyTypeObject *cls, 
     186                                        PyObject     *args, 
     187                                        PyObject     *kwargs) 
     188
     189    static char *kwlist[] = {"last_opts", "new_opts", NULL}; 
     190    PyGObject *py_last_opts, *py_new_opts; 
     191    GdkPixbufDrawOpts *last_opts, *new_opts; 
     192 
     193    if (!PyArg_ParseTupleAndKeywords (args, kwargs, 
     194                                      "O!O!:GdkPixbufDrawCache.get_method", 
     195                                      kwlist, 
     196                                      &PyGdkPixbufDrawOpts_Type, 
     197                                      &py_last_opts, 
     198                                      &PyGdkPixbufDrawOpts_Type, 
     199                                      &py_new_opts)) 
     200        return NULL; 
     201 
     202    last_opts = pyg_boxed_get (py_last_opts, GdkPixbufDrawOpts); 
     203    new_opts = pyg_boxed_get (py_new_opts, GdkPixbufDrawOpts); 
     204 
     205    GdkPixbufDrawMethod meth = gdk_pixbuf_draw_cache_get_method (last_opts, 
     206                                                                 new_opts); 
     207 
     208    return pyg_enum_from_gtype (GDK_TYPE_PIXBUF_DRAW_METHOD, meth); 
     209
    183210 
    184211