diff options
-rw-r--r-- | ChangeLog | 18 | ||||
-rw-r--r-- | NEWS | 12 | ||||
-rw-r--r-- | configure.in | 2 | ||||
-rw-r--r-- | gtk.py | 3 | ||||
-rw-r--r-- | gtkmodule.c | 31 | ||||
-rw-r--r-- | pygtk.spec | 2 |
6 files changed, 66 insertions, 2 deletions
@@ -1,3 +1,21 @@ +1999-04-22 James Henstridge <james@daa.com.au> + + * NEWS: added a summary of the new features. + + * pygtk.spec: upped version number. + + * configure.in: upped version number to 0.6.0. I think thread support + is a big enough feature to bump it up to 0.6. + +1999-04-21 James Henstridge <james@daa.com.au> + + * gtk.py (create_bitmap_from_data): added new wrapper. + + * gtkmodule.c: added gdk_bitmap_create_from_data function. Also + export PyGtk_BlockThreads and PyGtk_UnblockThreads through the + _private dictionary, so they can be used from within other modules + (gnome-python in particular). + 1999-04-20 James Henstridge <james@daa.com.au> * pygtk.spec: updated package version number. @@ -1,3 +1,14 @@ +pygtk-0.6.0: 22-April-1999 + - updated for gtk+-1.2.1. + - You can now write multithreaded programs in python (if python was + compiled with thread support enabled, of course). This feature + is thanks to Duncan Grisby <dgrisby@uk.research.att.com>. + To use the multithreading, write your program as normal, but + before calling any GTK routines from outside the GTK thread (ie. + not from a signal handler or timeout/idle func), call threads_enter() + before hand, and threads_leave() after. + - Various bug fixes. + pygtk-0.5.11: 24-February-1999 - Updated for gtk+-1.1.16 - Changes to the style code, so that you can now write to the @@ -8,6 +19,7 @@ pygtk-0.5.11: 24-February-1999 argument. - Added a file MAPPING that describes the mapping of GTK onto python. - Various bug fixes. + - Pyglade XML parser made more robust. pygtk-0.5.10: 9-February-1999 - Updated for gtk+-1.1.14/15. diff --git a/configure.in b/configure.in index 2ffd3c41..c9379322 100644 --- a/configure.in +++ b/configure.in @@ -2,7 +2,7 @@ AC_INIT dnl for gnome-python: -AM_INIT_AUTOMAKE(pygtk, 0.5.13) +AM_INIT_AUTOMAKE(pygtk, 0.6.0) AM_PATH_PYTHON AM_INIT_PYEXEC_MOD @@ -2571,6 +2571,9 @@ def create_pixmap(window, width, height, depth=-1): window = window.get_window() return _gtk.gdk_pixmap_new(window, width, height, depth) +def create_bitmap_from_data(window, data, width, height): + return _gtk.gdk_bitmap_create_from_data(window, data, width, height) + # drawing functions... def draw_point(drawable, gc, x, y): _gtk.gdk_draw_point(drawable, gc, x, y) diff --git a/gtkmodule.c b/gtkmodule.c index 64b6491b..837fb445 100644 --- a/gtkmodule.c +++ b/gtkmodule.c @@ -46,6 +46,9 @@ static int _blockcount = 1; # define PyGTK_UNBLOCK_THREADS #endif +static void PyGtk_BlockThreads(void) { PyGTK_BLOCK_THREADS } +static void PyGtk_UnblockThreads(void) { PyGTK_UNBLOCK_THREADS } + static gboolean PyGtk_FatalExceptions = FALSE; typedef struct { @@ -4803,6 +4806,27 @@ static PyObject *_wrap_gdk_pixmap_colormap_create_from_xpm_d(PyObject *self, PyO return ret; } +static PyObject *_wrap_gdk_bitmap_create_from_data(PyObject *self, PyObject *args) { + PyObject *window; + char *data; + int length, width, height; + GdkBitmap *bitmap; + + if (!PyArg_ParseTuple(args, "O!s#ii:gdk_bitmap_create_from_data", + &PyGdkWindow_Type, &window, &data, &length, + &width, &height)) + return NULL; + bitmap = gdk_bitmap_create_from_data(PyGdkWindow_Get(window), data, width, + height); + if (bitmap) { + PyObject *ret = PyGdkWindow_New(bitmap); + gdk_bitmap_unref(bitmap); + return ret; + } + Py_INCREF(Py_None); + return Py_None; +} + static PyObject *_wrap_gdk_font_load(PyObject *self, PyObject *args) { gchar *name; GdkFont *font; @@ -5646,6 +5670,7 @@ static PyMethodDef _gtkmoduleMethods[] = { { "gdk_pixmap_create_from_xpm_d", _wrap_gdk_pixmap_create_from_xpm_d, 1 }, { "gdk_pixmap_colormap_create_from_xpm", _wrap_gdk_pixmap_colormap_create_from_xpm, 1 }, { "gdk_pixmap_colormap_create_from_xpm_d", _wrap_gdk_pixmap_colormap_create_from_xpm_d, 1 }, + { "gdk_bitmap_create_from_data", _wrap_gdk_bitmap_create_from_data, 1 }, { "gdk_font_load", _wrap_gdk_font_load, 1 }, { "gdk_fontset_load", _wrap_gdk_fontset_load, 1 }, { "gdk_draw_polygon", _wrap_gdk_draw_polygon, 1 }, @@ -5767,6 +5792,12 @@ void init_gtk() { PyDict_SetItemString(private, "PyGtk_RegisterBoxed", d=PyCObject_FromVoidPtr(PyGtk_RegisterBoxed, NULL)); Py_DECREF(d); + PyDict_SetItemString(private, "PyGtk_BlockThreads", + d=PyCObject_FromVoidPtr(PyGtk_BlockThreads, NULL)); + Py_DECREF(d); + PyDict_SetItemString(private, "PyGtk_UnblockThreads", + d=PyCObject_FromVoidPtr(PyGtk_UnblockThreads, NULL)); + Py_DECREF(d); m = PyImport_ImportModule("os"); if (m == NULL) { @@ -1,7 +1,7 @@ %define py_prefix /usr # py_ver should only be 3 characters (1.5.1 == 1.5) %define py_ver 1.5 -%define ver 0.5.13 +%define ver 0.6.0 Summary: Python bindings for the GTK+ widget set. Name: pygtk |