+/*
+ * Copyright (C) 2009 Andy Spencer <spenceal@rose-hulman.edu>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
#include <glib.h>
#include "aweather-view.h"
enum {
SIG_TIME_CHANGED,
SIG_LOCATION_CHANGED,
+ SIG_REFRESH,
NUM_SIGNALS,
};
G_TYPE_NONE,
1,
G_TYPE_STRING);
+ signals[SIG_REFRESH] = g_signal_new(
+ "refresh",
+ G_TYPE_FROM_CLASS(gobject_class),
+ G_SIGNAL_RUN_LAST,
+ 0,
+ NULL,
+ NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE,
+ 0);
}
{
g_assert(AWEATHER_IS_VIEW(view));
//g_message("aweather_view:set_time: setting time to %s", time);
+ g_free(view->time);
view->time = g_strdup(time);
g_signal_emit(view, signals[SIG_TIME_CHANGED], 0, time);
}
//g_message("aweather_view_get_location");
return view->location;
}
+
+void aweather_view_refresh(AWeatherView *view)
+{
+ g_message("aweather_view_refresh: ..");
+ g_signal_emit(view, signals[SIG_REFRESH], 0);
+}
+
+void aweather_view_zoomin(AWeatherView *view)
+{
+ g_message("aweather_view_zoomin: ..");
+}
+
+void aweather_view_zoomout(AWeatherView *view)
+{
+ g_message("aweather_view_zoomout: ..");
+}