diff options
author | James Henstridge <james@daa.com.au> | 1999-04-25 01:13:25 +0000 |
---|---|---|
committer | James Henstridge <jamesh@src.gnome.org> | 1999-04-25 01:13:25 +0000 |
commit | 4f1011fca3830688f6b986951c778a84467c857c (patch) | |
tree | a9cfff94ec7d1c65752f74e8126db56873eb6afa /gtkmodule.c | |
parent | 787acd1aac13ba8748e1563ae4376162f454b060 (diff) | |
download | pygtk-GNOME_PYTHON_1_0_2.tar.gz |
a wrapper for the new function.PYGTK_0_6_0GNOME_PYTHON_1_0_2
1999-04-25 James Henstridge <james@daa.com.au>
* gtk.py (GtkWidget.get_allocation): a wrapper for the new function.
* gtkmodule.c: added a routine for getting the allocation of a widget.
1999-04-25 James Henstridge <james@daa.com.au>
* pygnome/Makefile.am (EXTRA_DIST): added bookmarks-applet.py
* pygnome/examples/bookmarks-applet.py: added another sample applet
that demonstrates setting up context menu items. It basically
reads in your Netscape 4.x bookmarks file, and puts the bookmarks
into the context menu heirachy. It then uses gnome.url.show() to
display the bookmark in the browser of the user's choice.
Diffstat (limited to 'gtkmodule.c')
-rw-r--r-- | gtkmodule.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gtkmodule.c b/gtkmodule.c index 837fb445..74b68874 100644 --- a/gtkmodule.c +++ b/gtkmodule.c @@ -3522,6 +3522,18 @@ static PyObject *_wrap_gtk_widget_get_window(PyObject *self, PyObject *args) { return PyGdkWindow_New(win); } +static PyObject *_wrap_gtk_widget_get_allocation(PyObject *self, PyObject *args) { + GtkAllocation allocation; + PyObject *obj; + + if (!PyArg_ParseTuple(args, "O!:gtk_widget_get_allocation", &PyGtk_Type, + &obj)) + return NULL; + allocation = GTK_WIDGET(PyGtk_Get(obj))->allocation; + return Py_BuildValue("(iiii)", (int)allocation.x, (int)allocation.y, + (int)allocation.width, (int)allocation.height); +} + static PyObject *_wrap_gtk_widget_draw(PyObject *self, PyObject *args) { GdkRectangle rect; PyObject *obj; @@ -5587,6 +5599,7 @@ static PyMethodDef _gtkmoduleMethods[] = { { "gtk_object_get_data", _wrap_gtk_object_get_data, 1 }, { "gtk_object_remove_data", _wrap_gtk_object_remove_data, 1 }, { "gtk_widget_get_window", _wrap_gtk_widget_get_window, 1 }, + { "gtk_widget_get_allocation", _wrap_gtk_widget_get_allocation, 1 }, { "gtk_widget_draw", _wrap_gtk_widget_draw, 1 }, { "gtk_widget_size_request", _wrap_gtk_widget_size_request, 1 }, { "gtk_widget_size_allocate", _wrap_gtk_widget_size_allocate, 1 }, |