/xfce4-power-manager-1.2.0/panel-plugins/brightness/brightness-plugin.c

# · C · 47 lines · 19 code · 9 blank · 19 comment · 0 complexity · 84aaa887a875e3bf7c5a7810fb21d5ac MD5 · raw file

  1. /*
  2. * * Copyright (C) 2009-2011 Ali <aliov@xfce.org>
  3. *
  4. * Licensed under the GNU General Public License Version 2
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program; if not, write to the Free Software
  18. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  19. */
  20. #ifdef HAVE_CONFIG_H
  21. #include <config.h>
  22. #endif
  23. #include <stdio.h>
  24. #include <stdlib.h>
  25. #include <string.h>
  26. #include <gtk/gtk.h>
  27. #include <glib.h>
  28. #include <libxfce4panel/libxfce4panel.h>
  29. #include <libxfce4panel/xfce-panel-plugin.h>
  30. #include "brightness-button.h"
  31. static void
  32. register_brightness_plugin (XfcePanelPlugin *plugin)
  33. {
  34. GtkWidget *button;
  35. button = brightness_button_new (plugin);
  36. brightness_button_show (BRIGHTNESS_BUTTON (button));
  37. }
  38. XFCE_PANEL_PLUGIN_REGISTER_EXTERNAL(register_brightness_plugin);