~ubuntu-branches/ubuntu/jaunty/gimp/jaunty-security

« back to all changes in this revision

Viewing changes to plug-ins/pygimp/gimpthumbmodule.c

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2007-05-02 16:33:03 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20070502163303-bvzhjzbpw8qglc4y
Tags: 2.3.16-1ubuntu1
* Resynchronized with Debian, remaining Ubuntu changes:
  - debian/rules: i18n magic.
* debian/control.in:
  - Maintainer: Ubuntu Core Developers <ubuntu-devel@lists.ubuntu.com>
* debian/patches/02_help-message.patch,
  debian/patches/03_gimp.desktop.in.in.patch,
  debian/patches/10_dont_show_wizard.patch: updated.
* debian/patches/04_composite-signedness.patch,
  debian/patches/05_add-letter-spacing.patch: dropped, used upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- Mode: C; c-basic-offset: 4 -*-
 
2
    Gimp-Python - allows the writing of Gimp plugins in Python.
 
3
    Copyright (C) 2005-2006  Manish Singh <yosh@gimp.org>
 
4
 
 
5
    This program is free software; you can redistribute it and/or modify
 
6
    it under the terms of the GNU General Public License as published by
 
7
    the Free Software Foundation; either version 2 of the License, or
 
8
    (at your option) any later version.
 
9
 
 
10
    This program is distributed in the hope that it will be useful,
 
11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
13
    GNU General Public License for more details.
 
14
 
 
15
    You should have received a copy of the GNU General Public License
 
16
    along with this program; if not, write to the Free Software
 
17
    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
18
    02111-1307, USA.
 
19
 */
 
20
 
 
21
#ifdef HAVE_CONFIG_H
 
22
#  include <config.h>
 
23
#endif
 
24
 
 
25
#include <Python.h>
 
26
 
 
27
#include <pygobject.h>
 
28
 
 
29
#include <gdk-pixbuf/gdk-pixbuf.h>
 
30
 
 
31
#include <libgimpthumb/gimpthumb.h>
 
32
 
 
33
#include "pygimp-util.h"
 
34
 
 
35
 
 
36
void gimpthumb_register_classes(PyObject *d); 
 
37
void gimpthumb_add_constants(PyObject *module, const gchar *strip_prefix);
 
38
extern PyMethodDef gimpthumb_functions[];
 
39
 
 
40
 
 
41
static char gimpthumb_doc[] = 
 
42
"This module provides interfaces to allow you to write gimp plugins"
 
43
;
 
44
 
 
45
DL_EXPORT(void)
 
46
initgimpthumb(void)
 
47
{
 
48
    PyObject *m, *d;
 
49
    
 
50
    pygimp_init_pygobject();
 
51
 
 
52
    m = Py_InitModule3("gimpthumb", gimpthumb_functions, gimpthumb_doc);
 
53
    d = PyModule_GetDict(m);
 
54
 
 
55
    gimpthumb_register_classes(d);
 
56
    gimpthumb_add_constants(m, "GIMP_THUMB_");
 
57
 
 
58
    if (PyErr_Occurred())
 
59
        Py_FatalError("can't initialize module gimpthumb");
 
60
}