windowck.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. /* $Id$
  2. *
  3. * This program is free software; you can redistribute it and/or modify
  4. * it under the terms of the GNU General Public License as published by
  5. * the Free Software Foundation; either version 3 of the License, or
  6. * (at your option) any later version.
  7. *
  8. * This program is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU General Public License for more details.
  12. *
  13. * You should have received a copy of the GNU General Public License along
  14. * with this program; if not, write to the Free Software Foundation, Inc.,
  15. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  16. *
  17. * Copyright (C) 2013 Alessio Piccoli <alepic@geckoblu.net>
  18. * Cedric Leporcq <cedl38@gmail.com>
  19. *
  20. */
  21. #ifndef __WINDOWCK_H__
  22. #define __WINDOWCK_H__
  23. #ifdef HAVE_CONFIG_H
  24. #include <config.h>
  25. #endif
  26. #ifdef HAVE_STRING_H
  27. #include <string.h>
  28. #endif
  29. #include <gtk/gtk.h>
  30. #include <common/wck-utils.h>
  31. G_BEGIN_DECLS
  32. typedef enum Alignment
  33. {
  34. LEFT = 0, CENTER = 5, RIGHT = 10
  35. } Alignment;
  36. typedef enum SizeMode
  37. {
  38. SHRINK = 1, FIXE = 2, EXPAND = 3
  39. } SizeMode;
  40. typedef struct {
  41. GtkEventBox *eventbox;
  42. GtkWidget *image;
  43. gushort size;
  44. } WindowIcon;
  45. typedef struct {
  46. gboolean only_maximized; // [T/F] Only track maximized windows
  47. gboolean show_on_desktop; // [T/F] Show the plugin on desktop
  48. //gboolean hide_icon; // [T/F] Hide the icon
  49. gboolean hide_title; // [T/F] Hide the title
  50. gboolean show_icon; // [T/F] Show the window icon
  51. gboolean icon_on_right; // [T/F] Place icon on the right
  52. //gboolean show_window_menu; // [T/F] Show window action menu on right click
  53. gboolean show_tooltips; // [T/F] Show tooltips
  54. SizeMode size_mode; // Size mode : Length=[MINIMAL,FIXE,EXPAND]
  55. gint title_size; // Title size in chars
  56. gint title_padding; // Title padding
  57. gboolean custom_font; // [T/F] Use custom font
  58. gchar *title_font; // Custom title font
  59. gchar *active_text_color; // active text color
  60. gchar *inactive_text_color; // inactive text color
  61. gint title_alignment; // Title alignment [0=left, 5=center, 10=right]
  62. } WCKPreferences;
  63. /* plugin structure */
  64. typedef struct {
  65. XfcePanelPlugin *plugin;
  66. /* Widgets */
  67. GtkWidget *ebox;
  68. GtkWidget *hvbox;
  69. GtkWidget *alignment;
  70. GtkLabel *title;
  71. WindowIcon *icon; // Icon widget
  72. WCKPreferences *prefs;
  73. WckUtils *win;
  74. gulong cnh; // controled window name handler id
  75. gulong cih; // controled window icon handler id
  76. } WindowckPlugin;
  77. void windowck_save(XfcePanelPlugin *plugin, WindowckPlugin *wckp);
  78. G_END_DECLS
  79. #endif /* !__WINDOWCK_H__ */