1 /* 2 * Copyright (c) 2013 Andrzej Radecki <andrzejr@xfce.org> 3 * Copyright (c) 2017 Viktor Odintsev <ninetls@xfce.org> 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 of the License, or 8 * (at your option) 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 Library 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 */ 19 20 #ifndef __SN_CONFIG_H__ 21 #define __SN_CONFIG_H__ 22 23 #include <gtk/gtk.h> 24 25 G_BEGIN_DECLS 26 27 typedef struct _SnConfigClass SnConfigClass; 28 typedef struct _SnConfig SnConfig; 29 30 #define XFCE_TYPE_SN_CONFIG (sn_config_get_type ()) 31 #define XFCE_SN_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), XFCE_TYPE_SN_CONFIG, SnConfig)) 32 #define XFCE_SN_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), XFCE_TYPE_SN_CONFIG, SnConfigClass)) 33 #define XFCE_IS_SN_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XFCE_TYPE_SN_CONFIG)) 34 #define XFCE_IS_SN_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), XFCE_TYPE_SN_CONFIG)) 35 #define XFCE_SN_CONFIG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), XFCE_TYPE_SN_CONFIG, SnConfigClass)) 36 37 GType sn_config_get_type (void) G_GNUC_CONST; 38 39 SnConfig *sn_config_new (const gchar *property_base); 40 41 void sn_config_set_orientation (SnConfig *config, 42 GtkOrientation panel_orientation, 43 GtkOrientation orientation); 44 45 GtkOrientation sn_config_get_orientation (SnConfig *config); 46 47 GtkOrientation sn_config_get_panel_orientation (SnConfig *config); 48 49 void sn_config_set_size (SnConfig *config, 50 gint panel_size, 51 gint nrows, 52 gint icon_size); 53 54 gint sn_config_get_nrows (SnConfig *config); 55 56 gint sn_config_get_panel_size (SnConfig *config); 57 58 gboolean sn_config_get_single_row (SnConfig *config); 59 60 gboolean sn_config_get_square_icons (SnConfig *config); 61 62 gboolean sn_config_get_symbolic_icons (SnConfig *config); 63 64 gboolean sn_config_get_menu_is_primary (SnConfig *config); 65 66 gint sn_config_get_icon_size (SnConfig *config); 67 68 gboolean sn_config_get_icon_size_is_automatic (SnConfig *config); 69 70 void sn_config_get_dimensions (SnConfig *config, 71 gint *ret_icon_size, 72 gint *ret_n_rows, 73 gint *ret_row_size, 74 gint *ret_padding); 75 76 gboolean sn_config_is_hidden (SnConfig *config, 77 const gchar *name); 78 79 void sn_config_set_hidden (SnConfig *config, 80 const gchar *name, 81 gboolean filtered); 82 83 gboolean sn_config_is_legacy_hidden (SnConfig *config, 84 const gchar *name); 85 86 void sn_config_set_legacy_hidden (SnConfig *config, 87 const gchar *name, 88 gboolean filtered); 89 90 GList *sn_config_get_known_items (SnConfig *config); 91 92 void sn_config_add_known_item (SnConfig *config, 93 const gchar *name); 94 95 GList *sn_config_get_known_legacy_items (SnConfig *config); 96 GList *sn_config_get_hidden_legacy_items (SnConfig *config); 97 98 gboolean sn_config_add_known_legacy_item (SnConfig *config, 99 const gchar *name); 100 101 void sn_config_swap_known_items (SnConfig *config, 102 const gchar *name1, 103 const gchar *name2); 104 void sn_config_swap_known_legacy_items (SnConfig *config, 105 const gchar *name1, 106 const gchar *name2); 107 108 gboolean sn_config_items_clear (SnConfig *config); 109 gboolean sn_config_legacy_items_clear (SnConfig *config); 110 111 112 113 #define DEFAULT_ICON_SIZE 22 114 #define DEFAULT_SINGLE_ROW FALSE 115 #define DEFAULT_SQUARE_ICONS FALSE 116 #define DEFAULT_SYMBOLIC_ICONS FALSE 117 #define DEFAULT_MENU_IS_PRIMARY FALSE 118 #define DEFAULT_ORIENTATION GTK_ORIENTATION_HORIZONTAL 119 #define DEFAULT_PANEL_ORIENTATION GTK_ORIENTATION_HORIZONTAL 120 #define DEFAULT_PANEL_SIZE 28 121 #define DEFAULT_HIDE_NEW_ITEMS FALSE 122 123 124 125 G_END_DECLS 126 127 #endif /* !__SN_CONFIG_H__ */ 128