Mercurial > pidgin
annotate finch/libgnt/pygnt/gntwidget.override @ 20947:3c4d37b98c31
merge of '60c313e0859ab5b5106920e3133826ed0ec09703'
and '9af00415175d29e7e9227c383939d392ea0af499'
author | Casey Harkins <charkins@pidgin.im> |
---|---|
date | Mon, 15 Oct 2007 04:14:53 +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 |
19681
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 |