diff options
author | James Henstridge <james@daa.com.au> | 1999-04-22 02:17:30 +0000 |
---|---|---|
committer | James Henstridge <jamesh@src.gnome.org> | 1999-04-22 02:17:30 +0000 |
commit | 787acd1aac13ba8748e1563ae4376162f454b060 (patch) | |
tree | f5db9dec72b20ca707a57246b903674fcdfe5c6d /gtkmodule.c | |
parent | 938c63e50917fa48da6d3613aa1404d69eac9407 (diff) | |
download | pygtk-787acd1aac13ba8748e1563ae4376162f454b060.tar.gz |
added a summary of the new features.
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-22 James Henstridge <james@daa.com.au>
* NEWS: added some news items.
* configure.in: upped version number
* gnome-python.spec: upped versions, and included capplet and applet
modules.
* pygnome/gnomeuimodule.c: added calls to make gnomeuimodule act
correctly with the thread support in pygtk.
* pygnome/gnome/Makefile.am (gnome_PYTHON): conditionally install
applet.py and capplet.py.
* pygnome/gnome/capplet.py: a wrapper for CappletWidget.
1999-04-21 James Henstridge <james@daa.com.au>
* pygnome/gnome/applet.py: a wrapper for AppletWidget. This is what
most people will use.
* pygnome/Makefile.am, pygnome/generate/Makefile.am: made changes to
build _applet and _capplet modules if libraries are available.
* configure.in: added some tests to see if applets or capplets
libraries are installed. If so, set up a few conditionals for
building the python modules for them.
* pygnome/cappletmodule.c, pygnome/generate/capplet.defs: base module
for creating control center capplets in python. This module should
also work properly with the threading fixes for pygtk.
* pygnome/appletmodule.c, pygnome/generate/applet.defs: base module
for creating panel applets in python. This module should work
together with the threading fixes for pygtk.
1999-04-20 James Henstridge <james@daa.com.au>
* pygnome/gnome/uiconsts.py: added some more stock item constants.
* pygnome/gnomeuimodule.c (_wrap_gnome_canvas_get_item_at): this
function could return NULL, which could cause a problem.
* pygnome/gnomemodule.c (_wrap_gnome_config_{,private_}get_string):
moved implementation here, because these functions can return NULL.
Diffstat (limited to 'gtkmodule.c')
-rw-r--r-- | gtkmodule.c | 31 |
1 files changed, 31 insertions, 0 deletions
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) { |