Mercurial > pidgin.yaz
annotate finch/libgnt/pygnt/gntwidget.override @ 21904:9b299228431c
merge of '05319fdf1db00660d0c169657ed1b08ff621e5c7'
and 'a654aa0d3c35e43c2f23b266100bfdb4d98e2d73'
author | Will Thompson <will.thompson@collabora.co.uk> |
---|---|
date | Wed, 19 Dec 2007 11:31:37 +0000 |
parents | 44b4e8bd759b |
children |
rev | line source |
---|---|
18724
bfa12b00f54b
Export gnt_widget_get_size for pygnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
1 /** |
bfa12b00f54b
Export gnt_widget_get_size for pygnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
2 * pygnt- Python bindings for the GNT toolkit. |
bfa12b00f54b
Export gnt_widget_get_size for pygnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
3 * Copyright (C) 2007 Sadrul Habib Chowdhury <sadrul@pidgin.im> |
bfa12b00f54b
Export gnt_widget_get_size for pygnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
4 * |
bfa12b00f54b
Export gnt_widget_get_size for pygnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
5 * gntwidget.override: overrides for generic widgets. |
bfa12b00f54b
Export gnt_widget_get_size for pygnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
6 * |
bfa12b00f54b
Export gnt_widget_get_size for pygnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
7 * This library is free software; you can redistribute it and/or |
bfa12b00f54b
Export gnt_widget_get_size for pygnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
8 * modify it under the terms of the GNU Lesser General Public |
bfa12b00f54b
Export gnt_widget_get_size for pygnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
9 * License as published by the Free Software Foundation; either |
bfa12b00f54b
Export gnt_widget_get_size for pygnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
10 * version 2.1 of the License, or (at your option) any later version. |
bfa12b00f54b
Export gnt_widget_get_size for pygnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
11 * |
bfa12b00f54b
Export gnt_widget_get_size for pygnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
12 * This library is distributed in the hope that it will be useful, |
bfa12b00f54b
Export gnt_widget_get_size for pygnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
bfa12b00f54b
Export gnt_widget_get_size for pygnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
bfa12b00f54b
Export gnt_widget_get_size for pygnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
15 * Lesser General Public License for more details. |
bfa12b00f54b
Export gnt_widget_get_size for pygnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
16 * |
bfa12b00f54b
Export gnt_widget_get_size for pygnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
17 * You should have received a copy of the GNU Lesser General Public |
bfa12b00f54b
Export gnt_widget_get_size for pygnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
18 * License along with this library; if not, write to the Free Software |
19680
44b4e8bd759b
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
18724
diff
changeset
|
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 |
18724
bfa12b00f54b
Export gnt_widget_get_size for pygnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
20 * USA |
bfa12b00f54b
Export gnt_widget_get_size for pygnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
21 */ |
bfa12b00f54b
Export gnt_widget_get_size for pygnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
22 %% |
bfa12b00f54b
Export gnt_widget_get_size for pygnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
23 override gnt_widget_get_size args |
bfa12b00f54b
Export gnt_widget_get_size for pygnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
24 static PyObject * |
bfa12b00f54b
Export gnt_widget_get_size for pygnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
25 _wrap_gnt_widget_get_size(PyGObject *self) |
bfa12b00f54b
Export gnt_widget_get_size for pygnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
26 { |
bfa12b00f54b
Export gnt_widget_get_size for pygnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
27 PyObject *list = PyList_New(0); |
bfa12b00f54b
Export gnt_widget_get_size for pygnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
28 int x = 0, y = 0; |
bfa12b00f54b
Export gnt_widget_get_size for pygnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
29 |
bfa12b00f54b
Export gnt_widget_get_size for pygnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
30 gnt_widget_get_size(GNT_WIDGET(self->obj), &x, &y); |
bfa12b00f54b
Export gnt_widget_get_size for pygnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
31 PyList_Append(list, PyInt_FromLong((long)x)); |
bfa12b00f54b
Export gnt_widget_get_size for pygnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
32 PyList_Append(list, PyInt_FromLong((long)y)); |
bfa12b00f54b
Export gnt_widget_get_size for pygnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
33 |
bfa12b00f54b
Export gnt_widget_get_size for pygnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
34 return list; |
bfa12b00f54b
Export gnt_widget_get_size for pygnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
35 } |
bfa12b00f54b
Export gnt_widget_get_size for pygnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
36 |