annotate finch/libgnt/pygnt/gntwidget.override @ 22483:7a815907ba5a

merge of '6db190b488381b25d0ad373ee417bc219d49b6bf' and 'b3930a1430bfa8b0e784f0337ba5374066f6fc52'
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Sat, 15 Mar 2008 19:41:30 +0000
parents 44b4e8bd759b
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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