aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/mx-gtk-light-switch.h
diff options
context:
space:
mode:
authorDanielle Madeley <danielle.madeley@collabora.co.uk>2011-03-14 17:26:23 +0800
committerEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2011-03-14 21:05:35 +0800
commit706b0ad396bd569224e28ed45090a3457e0634f8 (patch)
tree9f23f48eadf9c8872760f59d393c4255300bee7e /libempathy-gtk/mx-gtk-light-switch.h
parent706bdd3ad6d9c788015a5e8733046e653dcbbd21 (diff)
downloadgsoc2013-empathy-706b0ad396bd569224e28ed45090a3457e0634f8.tar
gsoc2013-empathy-706b0ad396bd569224e28ed45090a3457e0634f8.tar.gz
gsoc2013-empathy-706b0ad396bd569224e28ed45090a3457e0634f8.tar.bz2
gsoc2013-empathy-706b0ad396bd569224e28ed45090a3457e0634f8.tar.lz
gsoc2013-empathy-706b0ad396bd569224e28ed45090a3457e0634f8.tar.xz
gsoc2013-empathy-706b0ad396bd569224e28ed45090a3457e0634f8.tar.zst
gsoc2013-empathy-706b0ad396bd569224e28ed45090a3457e0634f8.zip
Import MxGtkLightSwitch from Mx
Available under the terms of the LGPL 2.1.
Diffstat (limited to 'libempathy-gtk/mx-gtk-light-switch.h')
-rw-r--r--libempathy-gtk/mx-gtk-light-switch.h71
1 files changed, 71 insertions, 0 deletions
diff --git a/libempathy-gtk/mx-gtk-light-switch.h b/libempathy-gtk/mx-gtk-light-switch.h
new file mode 100644
index 000000000..88fdf69e6
--- /dev/null
+++ b/libempathy-gtk/mx-gtk-light-switch.h
@@ -0,0 +1,71 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
+/*
+ * Copyright 2009 Intel Corporation.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU Lesser General Public License,
+ * version 2.1, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
+ * Boston, MA 02111-1307, USA.
+ *
+ */
+#ifndef _MX_GTK_LIGHT_SWITCH
+#define _MX_GTK_LIGHT_SWITCH
+
+#include <gtk/gtk.h>
+
+G_BEGIN_DECLS
+
+#define MX_GTK_TYPE_LIGHT_SWITCH mx_gtk_light_switch_get_type ()
+
+#define MX_GTK_LIGHT_SWITCH(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST ((obj), MX_GTK_TYPE_LIGHT_SWITCH, MxGtkLightSwitch))
+
+#define MX_GTK_LIGHT_SWITCH_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST ((klass), MX_GTK_TYPE_LIGHT_SWITCH, MxGtkLightSwitchClass))
+
+#define MX_GTK_IS_LIGHT_SWITCH(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MX_GTK_TYPE_LIGHT_SWITCH))
+
+#define MX_GTK_IS_LIGHT_SWITCH_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_TYPE ((klass), MX_GTK_TYPE_LIGHT_SWITCH))
+
+#define MX_GTK_LIGHT_SWITCH_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS ((obj), MX_GTK_TYPE_LIGHT_SWITCH, MxGtkLightSwitchClass))
+
+/**
+ * MxGtkLightSwitch:
+ *
+ * The contents of this structure are private and should only be accessed
+ * through the public API.
+ */
+typedef struct {
+ /*< private >*/
+ GtkDrawingArea parent;
+} MxGtkLightSwitch;
+
+typedef struct {
+ GtkDrawingAreaClass parent_class;
+
+ void (*switch_flipped) (MxGtkLightSwitch *lightswitch, gboolean state);
+} MxGtkLightSwitchClass;
+
+GType mx_gtk_light_switch_get_type (void);
+
+void mx_gtk_light_switch_set_active (MxGtkLightSwitch *lightswitch,
+ gboolean active);
+gboolean mx_gtk_light_switch_get_active (MxGtkLightSwitch *lightswitch);
+
+GtkWidget* mx_gtk_light_switch_new (void);
+
+G_END_DECLS
+
+#endif /* _MX_GTK_LIGHT_SWITCH */