1 /* statusicon.h 2 * 3 * Copyright (C) 2016 Dmytro Poltavchenko <dmytro.poltavchenko@gmail.com> 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; either version 2, or (at your option) 8 * any later version. 9 * 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License 16 * along with this program; if not, write to the Free Software 17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 */ 19 20 #ifndef _GXKB_STATUSICON_H_ 21 #define _GXKB_STATUSICON_H_ 22 23 #ifdef HAVE_CONFIG_H 24 #include "config.h" 25 #endif 26 27 #ifdef HAVE_APPINDICATOR 28 #include <libayatana-appindicator/app-indicator.h> 29 #endif 30 31 #include "gettext.h" 32 #include <glib/gstdio.h> 33 #include <gtk/gtk.h> 34 35 #include "xkb-callbacks.h" 36 #include "xkb-util.h" 37 38 typedef enum { SYSTRAY, APPINDICATOR } statusicon_type; 39 40 void statusicon_new(void); 41 42 void gtk_status_icon_clicked(GtkStatusIcon *status_icon, gpointer data); 43 44 gboolean gtk_status_icon_scrolled(GtkStatusIcon *status_icon, 45 GdkEventScroll *event, gpointer data); 46 47 void gtk_status_icon_popup_menu(GtkStatusIcon *status_icon, guint button, 48 guint activate_time, gpointer data); 49 50 void statusicon_set_group(GtkWidget *item, gpointer data); 51 52 void statusicon_update_current_image(void); 53 54 void statusicon_update_menu(void); 55 56 void statusicon_destroy_menu(GtkWidget *menu); 57 58 void statusicon_free(void); 59 60 #ifdef HAVE_APPINDICATOR 61 GtkStatusIcon *appindicator_fallback(AppIndicator *indicator); 62 63 void appindicator_unfallback(AppIndicator *indicator, 64 GtkStatusIcon *status_icon); 65 66 void appindicator_icon_scrolled(AppIndicator *indicator, gint delta, 67 GdkScrollDirection direction, 68 gpointer user_data); 69 #endif 70 71 #endif 72