summaryrefslogtreecommitdiff
path: root/python/mateweather.override
diff options
context:
space:
mode:
authormonsta <[email protected]>2016-12-13 11:27:19 +0300
committermonsta <[email protected]>2016-12-13 11:27:19 +0300
commitb4ddcc1d1f7635d19db4b015a54b45dca63e2c88 (patch)
tree97697bcc3131c21603cfda03a65fa3d22ef7b801 /python/mateweather.override
parentbfa1740cce3269373d055b5fb9f5f6867d63d0cb (diff)
downloadlibmateweather-b4ddcc1d1f7635d19db4b015a54b45dca63e2c88.tar.bz2
libmateweather-b4ddcc1d1f7635d19db4b015a54b45dca63e2c88.tar.xz
drop Python bindings and --enable-python build option
it requires PyGTK so won't even build with GTK+3
Diffstat (limited to 'python/mateweather.override')
-rw-r--r--python/mateweather.override104
1 files changed, 0 insertions, 104 deletions
diff --git a/python/mateweather.override b/python/mateweather.override
deleted file mode 100644
index 16ce1e0..0000000
--- a/python/mateweather.override
+++ /dev/null
@@ -1,104 +0,0 @@
-/* -*- Mode: C; c-basic-offset: 4 -*-
- *
- * mateweather.override: overrides for mateweather
- */
-%%
-headers
-#define NO_IMPORT_PYGOBJECT
-#include "pygobject.h"
-
-#define MATEWEATHER_I_KNOW_THIS_IS_UNSTABLE
-#include <libmateweather/mateweather-location.h>
-#include <libmateweather/mateweather-timezone.h>
-#include <libmateweather/location-entry.h>
-#include <libmateweather/timezone-menu.h>
-#include <libmateweather/mateweather-enum-types.h>
-
-%%
-modulename mateweather
-%%
-import gtk.Entry as PyGtkEntry_Type
-import gtk.ComboBox as PyGtkComboBox_Type
-%%
-ignore
- mateweather_location_get_weather
- mateweather_location_free_children
- mateweather_location_free_timezones
-%%
-ignore-glob
- *_get_type
- *_ref
- *_unref
-%%
-override mateweather_location_get_children
-static PyObject *
-_wrap_mateweather_location_get_children (PyGObject *self, PyObject *args)
-{
- MateWeatherLocation *loc, **children;
- int i;
- PyObject *pychildren, *pychild;
-
- loc = pyg_boxed_get (self, MateWeatherLocation);
- children = mateweather_location_get_children (loc);
- for (i = 0; children[i]; i++)
- ;
-
- pychildren = PyList_New (i);
- for (i = 0; children[i]; i++) {
- pychild = pyg_boxed_new (MATEWEATHER_TYPE_LOCATION, children[i], TRUE, TRUE);
- PyList_SetItem (pychildren, i, pychild);
- }
-
- mateweather_location_free_children (loc, children);
- return pychildren;
-}
-%%
-override mateweather_location_get_timezones
-static PyObject *
-_wrap_mateweather_location_get_timezones (PyGObject *self, PyObject *args)
-{
- MateWeatherLocation *loc;
- MateWeatherTimezone **zones;
- int i;
- PyObject *pyzones, *pyzone;
-
- loc = pyg_boxed_get (self, MateWeatherLocation);
- zones = mateweather_location_get_timezones (loc);
- for (i = 0; zones[i]; i++)
- ;
-
- pyzones = PyList_New (i);
- for (i = 0; zones[i]; i++) {
- pyzone = pyg_boxed_new (MATEWEATHER_TYPE_TIMEZONE, zones[i], TRUE, TRUE);
- PyList_SetItem (pyzones, i, pyzone);
- }
-
- mateweather_location_free_timezones (loc, zones);
- return pyzones;
-}
-%%
-override mateweather_location_get_coords
-static PyObject *
-_wrap_mateweather_location_get_coords (PyGObject *self, PyObject *args)
-{
- MateWeatherLocation *loc;
- double latitude, longitude;
- PyObject *ret;
-
- loc = pyg_boxed_get (self, MateWeatherLocation);
- if (!mateweather_location_has_coords (loc)) {
- Py_INCREF (Py_None);
- return Py_None;
- }
-
- mateweather_location_get_coords (loc, &latitude, &longitude);
- ret = PyTuple_New (2);
- PyTuple_SetItem (ret, 0, PyFloat_FromDouble (latitude));
- PyTuple_SetItem (ret, 1, PyFloat_FromDouble (longitude));
- return ret;
-}
-%%
-new-constructor MATEWEATHER_TYPE_LOCATION_ENTRY
-%%
-new-constructor MATEWEATHER_TYPE_TIMEZONE_MENU
-%%