1 /* 2 * Copyright (C) 2006-2007 Jasper Huijsmans <jasper@xfce.org> 3 * Copyright (C) 2008-2010 Nick Schermer <nick@xfce.org> 4 * 5 * This library is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU Lesser General Public 7 * License as published by the Free Software Foundation; either 8 * version 2.1 of the License, or (at your option) any later version. 9 * 10 * This library 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 GNU 13 * Lesser General Public License for more details. 14 * 15 * You should have received a copy of the GNU Lesser General Public 16 * License along with this library; if not, write to the Free Software 17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 */ 19 20 21 22 #ifndef __LIBXFCE4PANEL_ENUMS_H__ 23 #define __LIBXFCE4PANEL_ENUMS_H__ 24 25 #include <glib-object.h> 26 27 G_BEGIN_DECLS 28 29 /** 30 * SECTION: enums 31 * @title: Standard Enumerations 32 * @short_description: Standard enumerations used by the Xfce Panel. 33 * @include: libxfce4panel/libxfce4panel.h 34 * 35 * Currently only contains the definition of #XfceScreenPosition. 36 **/ 37 38 /** 39 * XfcePanelPluginMode 40 * @XFCE_PANEL_PLUGIN_MODE_HORIZONTAL : Horizontal panel and plugins 41 * @XFCE_PANEL_PLUGIN_MODE_VERTICAL : Vertical rotated panel and plugins 42 * @XFCE_PANEL_PLUGIN_MODE_DESKBAR : Vertical panel with horizontal plugins 43 * 44 * Orientation of the plugin in the panel. 45 * 46 * Since: 4.10 47 **/ 48 typedef enum /*<enum,prefix=XFCE_PANEL_PLUGIN_MODE >*/ 49 { 50 XFCE_PANEL_PLUGIN_MODE_HORIZONTAL, 51 XFCE_PANEL_PLUGIN_MODE_VERTICAL, 52 XFCE_PANEL_PLUGIN_MODE_DESKBAR 53 } 54 XfcePanelPluginMode; 55 56 /** 57 * XfceScreenPosition 58 * @XFCE_SCREEN_POSITION_NONE : No position has been set. 59 * @XFCE_SCREEN_POSITION_NW_H : North West Horizontal 60 * @XFCE_SCREEN_POSITION_N : North 61 * @XFCE_SCREEN_POSITION_NE_H : North East Horizontal 62 * @XFCE_SCREEN_POSITION_NW_V : North West Vertical 63 * @XFCE_SCREEN_POSITION_W : West 64 * @XFCE_SCREEN_POSITION_SW_V : South West Vertical 65 * @XFCE_SCREEN_POSITION_NE_V : North East Vertical 66 * @XFCE_SCREEN_POSITION_E : East 67 * @XFCE_SCREEN_POSITION_SE_V : South East Vertical 68 * @XFCE_SCREEN_POSITION_SW_H : South West Horizontal 69 * @XFCE_SCREEN_POSITION_S : South 70 * @XFCE_SCREEN_POSITION_SE_H : South East Horizontal 71 * @XFCE_SCREEN_POSITION_FLOATING_H : Floating Horizontal 72 * @XFCE_SCREEN_POSITION_FLOATING_V : Floating Vertical 73 * 74 * There are three screen positions for each side of the screen: 75 * LEFT/TOP, CENTER and RIGHT/BOTTOM. The XfceScreenPosition is expressed 76 * as navigational direction, with possible addition of H or V to denote 77 * horizontal and vertical orientation. Additionally there are two floating 78 * positions, horizontal and vertical. 79 **/ 80 typedef enum /*<enum,prefix=XFCE_SCREEN_POSITION >*/ 81 { 82 XFCE_SCREEN_POSITION_NONE, 83 84 /* top */ 85 XFCE_SCREEN_POSITION_NW_H, /* North West Horizontal */ 86 XFCE_SCREEN_POSITION_N, /* North */ 87 XFCE_SCREEN_POSITION_NE_H, /* North East Horizontal */ 88 89 /* left */ 90 XFCE_SCREEN_POSITION_NW_V, /* North West Vertical */ 91 XFCE_SCREEN_POSITION_W, /* West */ 92 XFCE_SCREEN_POSITION_SW_V, /* South West Vertical */ 93 94 /* right */ 95 XFCE_SCREEN_POSITION_NE_V, /* North East Vertical */ 96 XFCE_SCREEN_POSITION_E, /* East */ 97 XFCE_SCREEN_POSITION_SE_V, /* South East Vertical */ 98 99 /* bottom */ 100 XFCE_SCREEN_POSITION_SW_H, /* South West Horizontal */ 101 XFCE_SCREEN_POSITION_S, /* South */ 102 XFCE_SCREEN_POSITION_SE_H, /* South East Horizontal */ 103 104 /* floating */ 105 XFCE_SCREEN_POSITION_FLOATING_H, /* Floating Horizontal */ 106 XFCE_SCREEN_POSITION_FLOATING_V /* Floating Vertical */ 107 } 108 XfceScreenPosition; 109 110 /** 111 * xfce_screen_position_is_horizontal: 112 * @position : the #XfceScreenPosition 113 * 114 * Whether the current #XfceScreenPosition is horizontal. 115 * 116 * Returns: %TRUE if horizontal, %FALSE otherwise 117 **/ 118 #define xfce_screen_position_is_horizontal(position) \ 119 (position <= XFCE_SCREEN_POSITION_NE_H || \ 120 (position >= XFCE_SCREEN_POSITION_SW_H && \ 121 position <= XFCE_SCREEN_POSITION_FLOATING_H)) 122 123 /** 124 * xfce_screen_position_get_orientation: 125 * @position : the #XfceScreenPosition 126 * 127 * Converts the current #XfceScreenPosition into a #GtkOrientation. 128 * 129 * Returns: the #GtkOrientation corresponding to @position. 130 **/ 131 #define xfce_screen_position_get_orientation(position) \ 132 (xfce_screen_position_is_horizontal (position) ? \ 133 GTK_ORIENTATION_HORIZONTAL : GTK_ORIENTATION_VERTICAL) 134 135 /** 136 * xfce_screen_position_is_floating: 137 * @position : the #XfceScreenPosition 138 * 139 * Whether the current #XfceScreenPosition is floating on the screen. 140 * 141 * Returns: %TRUE if floating, %FALSE otherwise. 142 **/ 143 #define xfce_screen_position_is_floating(position) \ 144 (position >= XFCE_SCREEN_POSITION_FLOATING_H || \ 145 position == XFCE_SCREEN_POSITION_NONE) 146 147 /** 148 * xfce_screen_position_is_top: 149 * @position : the #XfceScreenPosition 150 * 151 * Whether the current #XfceScreenPosition is above of the center of 152 * the screen. 153 * 154 * Returns: %TRUE if on the top of the screen, %FALSE otherwise 155 **/ 156 #define xfce_screen_position_is_top(position) \ 157 (position >= XFCE_SCREEN_POSITION_NW_H && \ 158 position <= XFCE_SCREEN_POSITION_NE_H) 159 160 /** 161 * xfce_screen_position_is_left: 162 * @position : the #XfceScreenPosition 163 * 164 * Whether the current #XfceScreenPosition is left of the center of 165 * the screen. 166 * 167 * Returns: %TRUE if on the left of the screen, %FALSE otherwise 168 **/ 169 #define xfce_screen_position_is_left(position) \ 170 (position >= XFCE_SCREEN_POSITION_NW_V && \ 171 position <= XFCE_SCREEN_POSITION_SW_V) 172 173 /** 174 * xfce_screen_position_is_right: 175 * @position : the #XfceScreenPosition 176 * 177 * Whether the current #XfceScreenPosition is right of the center of 178 * the screen. 179 * 180 * Returns: %TRUE if on the right of the screen, %FALSE otherwise 181 **/ 182 #define xfce_screen_position_is_right(position) \ 183 (position >= XFCE_SCREEN_POSITION_NE_V && \ 184 position <= XFCE_SCREEN_POSITION_SE_V) 185 186 /** 187 * xfce_screen_position_is_bottom: 188 * @position : the #XfceScreenPosition 189 * 190 * Whether the current #XfceScreenPosition is below of the center of 191 * the screen. 192 * 193 * Returns: %TRUE if on the bottom of the screen, %FALSE otherwise 194 **/ 195 #define xfce_screen_position_is_bottom(position) \ 196 (position >= XFCE_SCREEN_POSITION_SW_H && \ 197 position <= XFCE_SCREEN_POSITION_SE_H) 198 199 G_END_DECLS 200 201 #endif /* !__LIBXFCE4PANEL_ENUMS_H__ */ 202