Thu, 15 Jan 2015 15:59:08 +0100
Implement a real Private Browsing Mode condition by changing the API/ABI;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.
michael@0 | 1 | /* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
michael@0 | 2 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 5 | |
michael@0 | 6 | /** |
michael@0 | 7 | * gtkdrawing.h: GTK widget rendering utilities |
michael@0 | 8 | * |
michael@0 | 9 | * gtkdrawing provides an API for rendering GTK widgets in the |
michael@0 | 10 | * current theme to a pixmap or window, without requiring an actual |
michael@0 | 11 | * widget instantiation, similar to the Macintosh Appearance Manager |
michael@0 | 12 | * or Windows XP's DrawThemeBackground() API. |
michael@0 | 13 | */ |
michael@0 | 14 | |
michael@0 | 15 | #ifndef _GTK_DRAWING_H_ |
michael@0 | 16 | #define _GTK_DRAWING_H_ |
michael@0 | 17 | |
michael@0 | 18 | #include <gdk/gdk.h> |
michael@0 | 19 | #include <gtk/gtk.h> |
michael@0 | 20 | |
michael@0 | 21 | #ifdef __cplusplus |
michael@0 | 22 | extern "C" { |
michael@0 | 23 | #endif /* __cplusplus */ |
michael@0 | 24 | |
michael@0 | 25 | /*** type definitions ***/ |
michael@0 | 26 | typedef struct { |
michael@0 | 27 | guint8 active; |
michael@0 | 28 | guint8 focused; |
michael@0 | 29 | guint8 inHover; |
michael@0 | 30 | guint8 disabled; |
michael@0 | 31 | guint8 isDefault; |
michael@0 | 32 | guint8 canDefault; |
michael@0 | 33 | /* The depressed state is for buttons which remain active for a longer period: |
michael@0 | 34 | * activated toggle buttons or buttons showing a popup menu. */ |
michael@0 | 35 | guint8 depressed; |
michael@0 | 36 | gint32 curpos; /* curpos and maxpos are used for scrollbars */ |
michael@0 | 37 | gint32 maxpos; |
michael@0 | 38 | } GtkWidgetState; |
michael@0 | 39 | |
michael@0 | 40 | typedef struct { |
michael@0 | 41 | gint slider_width; |
michael@0 | 42 | gint trough_border; |
michael@0 | 43 | gint stepper_size; |
michael@0 | 44 | gint stepper_spacing; |
michael@0 | 45 | gint min_slider_size; |
michael@0 | 46 | } MozGtkScrollbarMetrics; |
michael@0 | 47 | |
michael@0 | 48 | typedef enum { |
michael@0 | 49 | MOZ_GTK_STEPPER_DOWN = 1 << 0, |
michael@0 | 50 | MOZ_GTK_STEPPER_BOTTOM = 1 << 1, |
michael@0 | 51 | MOZ_GTK_STEPPER_VERTICAL = 1 << 2 |
michael@0 | 52 | } GtkScrollbarButtonFlags; |
michael@0 | 53 | |
michael@0 | 54 | /** flags for tab state **/ |
michael@0 | 55 | typedef enum { |
michael@0 | 56 | /* first eight bits are used to pass a margin */ |
michael@0 | 57 | MOZ_GTK_TAB_MARGIN_MASK = 0xFF, |
michael@0 | 58 | /* bottom tabs */ |
michael@0 | 59 | MOZ_GTK_TAB_BOTTOM = 1 << 8, |
michael@0 | 60 | /* the first tab in the group */ |
michael@0 | 61 | MOZ_GTK_TAB_FIRST = 1 << 9, |
michael@0 | 62 | /* the selected tab */ |
michael@0 | 63 | MOZ_GTK_TAB_SELECTED = 1 << 10 |
michael@0 | 64 | } GtkTabFlags; |
michael@0 | 65 | |
michael@0 | 66 | /** flags for menuitems **/ |
michael@0 | 67 | typedef enum { |
michael@0 | 68 | /* menuitem is part of the menubar */ |
michael@0 | 69 | MOZ_TOPLEVEL_MENU_ITEM = 1 << 0 |
michael@0 | 70 | } GtkMenuItemFlags; |
michael@0 | 71 | |
michael@0 | 72 | /* function type for moz_gtk_enable_style_props */ |
michael@0 | 73 | typedef gint (*style_prop_t)(GtkStyle*, const gchar*, gint); |
michael@0 | 74 | |
michael@0 | 75 | /*** result/error codes ***/ |
michael@0 | 76 | #define MOZ_GTK_SUCCESS 0 |
michael@0 | 77 | #define MOZ_GTK_UNKNOWN_WIDGET -1 |
michael@0 | 78 | #define MOZ_GTK_UNSAFE_THEME -2 |
michael@0 | 79 | |
michael@0 | 80 | /*** checkbox/radio flags ***/ |
michael@0 | 81 | #define MOZ_GTK_WIDGET_CHECKED 1 |
michael@0 | 82 | #define MOZ_GTK_WIDGET_INCONSISTENT (1 << 1) |
michael@0 | 83 | |
michael@0 | 84 | /*** widget type constants ***/ |
michael@0 | 85 | typedef enum { |
michael@0 | 86 | /* Paints a GtkButton. flags is a GtkReliefStyle. */ |
michael@0 | 87 | MOZ_GTK_BUTTON, |
michael@0 | 88 | /* Paints a GtkCheckButton. flags is a boolean, 1=checked, 0=not checked. */ |
michael@0 | 89 | MOZ_GTK_CHECKBUTTON, |
michael@0 | 90 | /* Paints a GtkRadioButton. flags is a boolean, 1=checked, 0=not checked. */ |
michael@0 | 91 | MOZ_GTK_RADIOBUTTON, |
michael@0 | 92 | /** |
michael@0 | 93 | * Paints the button of a GtkScrollbar. flags is a GtkArrowType giving |
michael@0 | 94 | * the arrow direction. |
michael@0 | 95 | */ |
michael@0 | 96 | MOZ_GTK_SCROLLBAR_BUTTON, |
michael@0 | 97 | /* Paints the trough (track) of a GtkScrollbar. */ |
michael@0 | 98 | MOZ_GTK_SCROLLBAR_TRACK_HORIZONTAL, |
michael@0 | 99 | MOZ_GTK_SCROLLBAR_TRACK_VERTICAL, |
michael@0 | 100 | /* Paints the slider (thumb) of a GtkScrollbar. */ |
michael@0 | 101 | MOZ_GTK_SCROLLBAR_THUMB_HORIZONTAL, |
michael@0 | 102 | MOZ_GTK_SCROLLBAR_THUMB_VERTICAL, |
michael@0 | 103 | /* Paints a GtkScale. */ |
michael@0 | 104 | MOZ_GTK_SCALE_HORIZONTAL, |
michael@0 | 105 | MOZ_GTK_SCALE_VERTICAL, |
michael@0 | 106 | /* Paints a GtkScale thumb. */ |
michael@0 | 107 | MOZ_GTK_SCALE_THUMB_HORIZONTAL, |
michael@0 | 108 | MOZ_GTK_SCALE_THUMB_VERTICAL, |
michael@0 | 109 | /* Paints a GtkSpinButton */ |
michael@0 | 110 | MOZ_GTK_SPINBUTTON, |
michael@0 | 111 | MOZ_GTK_SPINBUTTON_UP, |
michael@0 | 112 | MOZ_GTK_SPINBUTTON_DOWN, |
michael@0 | 113 | MOZ_GTK_SPINBUTTON_ENTRY, |
michael@0 | 114 | /* Paints the gripper of a GtkHandleBox. */ |
michael@0 | 115 | MOZ_GTK_GRIPPER, |
michael@0 | 116 | /* Paints a GtkEntry. */ |
michael@0 | 117 | MOZ_GTK_ENTRY, |
michael@0 | 118 | /* Paints a GtkOptionMenu. */ |
michael@0 | 119 | MOZ_GTK_DROPDOWN, |
michael@0 | 120 | /* Paints a dropdown arrow (a GtkButton containing a down GtkArrow). */ |
michael@0 | 121 | MOZ_GTK_DROPDOWN_ARROW, |
michael@0 | 122 | /* Paints an entry in an editable option menu */ |
michael@0 | 123 | MOZ_GTK_DROPDOWN_ENTRY, |
michael@0 | 124 | /* Paints the container part of a GtkCheckButton. */ |
michael@0 | 125 | MOZ_GTK_CHECKBUTTON_CONTAINER, |
michael@0 | 126 | /* Paints the container part of a GtkRadioButton. */ |
michael@0 | 127 | MOZ_GTK_RADIOBUTTON_CONTAINER, |
michael@0 | 128 | /* Paints the label of a GtkCheckButton (focus outline) */ |
michael@0 | 129 | MOZ_GTK_CHECKBUTTON_LABEL, |
michael@0 | 130 | /* Paints the label of a GtkRadioButton (focus outline) */ |
michael@0 | 131 | MOZ_GTK_RADIOBUTTON_LABEL, |
michael@0 | 132 | /* Paints the background of a GtkHandleBox. */ |
michael@0 | 133 | MOZ_GTK_TOOLBAR, |
michael@0 | 134 | /* Paints a toolbar separator */ |
michael@0 | 135 | MOZ_GTK_TOOLBAR_SEPARATOR, |
michael@0 | 136 | /* Paints a GtkToolTip */ |
michael@0 | 137 | MOZ_GTK_TOOLTIP, |
michael@0 | 138 | /* Paints a GtkFrame (e.g. a status bar panel). */ |
michael@0 | 139 | MOZ_GTK_FRAME, |
michael@0 | 140 | /* Paints a resize grip for a GtkWindow */ |
michael@0 | 141 | MOZ_GTK_RESIZER, |
michael@0 | 142 | /* Paints a GtkProgressBar. */ |
michael@0 | 143 | MOZ_GTK_PROGRESSBAR, |
michael@0 | 144 | /* Paints a progress chunk of a GtkProgressBar. */ |
michael@0 | 145 | MOZ_GTK_PROGRESS_CHUNK, |
michael@0 | 146 | /* Paints a progress chunk of an indeterminated GtkProgressBar. */ |
michael@0 | 147 | MOZ_GTK_PROGRESS_CHUNK_INDETERMINATE, |
michael@0 | 148 | /* Paints a progress chunk of a vertical indeterminated GtkProgressBar. */ |
michael@0 | 149 | MOZ_GTK_PROGRESS_CHUNK_VERTICAL_INDETERMINATE, |
michael@0 | 150 | /* Paints a tab of a GtkNotebook. flags is a GtkTabFlags, defined above. */ |
michael@0 | 151 | MOZ_GTK_TAB, |
michael@0 | 152 | /* Paints the background and border of a GtkNotebook. */ |
michael@0 | 153 | MOZ_GTK_TABPANELS, |
michael@0 | 154 | /* Paints a GtkArrow for a GtkNotebook. flags is a GtkArrowType. */ |
michael@0 | 155 | MOZ_GTK_TAB_SCROLLARROW, |
michael@0 | 156 | /* Paints the background and border of a GtkTreeView */ |
michael@0 | 157 | MOZ_GTK_TREEVIEW, |
michael@0 | 158 | /* Paints treeheader cells */ |
michael@0 | 159 | MOZ_GTK_TREE_HEADER_CELL, |
michael@0 | 160 | /* Paints sort arrows in treeheader cells */ |
michael@0 | 161 | MOZ_GTK_TREE_HEADER_SORTARROW, |
michael@0 | 162 | /* Paints an expander for a GtkTreeView */ |
michael@0 | 163 | MOZ_GTK_TREEVIEW_EXPANDER, |
michael@0 | 164 | /* Paints the background of the menu bar. */ |
michael@0 | 165 | MOZ_GTK_MENUBAR, |
michael@0 | 166 | /* Paints the background of menus, context menus. */ |
michael@0 | 167 | MOZ_GTK_MENUPOPUP, |
michael@0 | 168 | /* Paints the arrow of menuitems that contain submenus */ |
michael@0 | 169 | MOZ_GTK_MENUARROW, |
michael@0 | 170 | /* Paints an arrow in a toolbar button. flags is a GtkArrowType. */ |
michael@0 | 171 | MOZ_GTK_TOOLBARBUTTON_ARROW, |
michael@0 | 172 | /* Paints items of menubar and popups. */ |
michael@0 | 173 | MOZ_GTK_MENUITEM, |
michael@0 | 174 | MOZ_GTK_CHECKMENUITEM, |
michael@0 | 175 | MOZ_GTK_RADIOMENUITEM, |
michael@0 | 176 | MOZ_GTK_MENUSEPARATOR, |
michael@0 | 177 | /* Paints a GtkVPaned separator */ |
michael@0 | 178 | MOZ_GTK_SPLITTER_HORIZONTAL, |
michael@0 | 179 | /* Paints a GtkHPaned separator */ |
michael@0 | 180 | MOZ_GTK_SPLITTER_VERTICAL, |
michael@0 | 181 | /* Paints the background of a window, dialog or page. */ |
michael@0 | 182 | MOZ_GTK_WINDOW |
michael@0 | 183 | } GtkThemeWidgetType; |
michael@0 | 184 | |
michael@0 | 185 | /*** General library functions ***/ |
michael@0 | 186 | /** |
michael@0 | 187 | * Initializes the drawing library. You must call this function |
michael@0 | 188 | * prior to using any other functionality. |
michael@0 | 189 | * returns: MOZ_GTK_SUCCESS if there were no errors |
michael@0 | 190 | * MOZ_GTK_UNSAFE_THEME if the current theme engine is known |
michael@0 | 191 | * to crash with gtkdrawing. |
michael@0 | 192 | */ |
michael@0 | 193 | gint moz_gtk_init(); |
michael@0 | 194 | |
michael@0 | 195 | /** |
michael@0 | 196 | * Enable GTK+ 1.2.9+ theme enhancements. You must provide a pointer |
michael@0 | 197 | * to the GTK+ 1.2.9+ function "gtk_style_get_prop_experimental". |
michael@0 | 198 | * styleGetProp: pointer to gtk_style_get_prop_experimental |
michael@0 | 199 | * |
michael@0 | 200 | * returns: MOZ_GTK_SUCCESS if there was no error, an error code otherwise |
michael@0 | 201 | */ |
michael@0 | 202 | gint moz_gtk_enable_style_props(style_prop_t styleGetProp); |
michael@0 | 203 | |
michael@0 | 204 | /** |
michael@0 | 205 | * Perform cleanup of the drawing library. You should call this function |
michael@0 | 206 | * when your program exits, or you no longer need the library. |
michael@0 | 207 | * |
michael@0 | 208 | * returns: MOZ_GTK_SUCCESS if there was no error, an error code otherwise |
michael@0 | 209 | */ |
michael@0 | 210 | gint moz_gtk_shutdown(); |
michael@0 | 211 | |
michael@0 | 212 | #if (MOZ_WIDGET_GTK == 2) |
michael@0 | 213 | /** |
michael@0 | 214 | * Retrieves the colormap to use for drawables passed to moz_gtk_widget_paint. |
michael@0 | 215 | */ |
michael@0 | 216 | GdkColormap* moz_gtk_widget_get_colormap(); |
michael@0 | 217 | #endif |
michael@0 | 218 | |
michael@0 | 219 | /*** Widget drawing ***/ |
michael@0 | 220 | #if (MOZ_WIDGET_GTK == 2) |
michael@0 | 221 | /** |
michael@0 | 222 | * Paint a widget in the current theme. |
michael@0 | 223 | * widget: a constant giving the widget to paint |
michael@0 | 224 | * drawable: the drawable to paint to; |
michael@0 | 225 | * it's colormap must be moz_gtk_widget_get_colormap(). |
michael@0 | 226 | * rect: the bounding rectangle for the widget |
michael@0 | 227 | * cliprect: a clipprect rectangle for this painting operation |
michael@0 | 228 | * state: the state of the widget. ignored for some widgets. |
michael@0 | 229 | * flags: widget-dependant flags; see the GtkThemeWidgetType definition. |
michael@0 | 230 | * direction: the text direction, to draw the widget correctly LTR and RTL. |
michael@0 | 231 | */ |
michael@0 | 232 | gint |
michael@0 | 233 | moz_gtk_widget_paint(GtkThemeWidgetType widget, GdkDrawable* drawable, |
michael@0 | 234 | GdkRectangle* rect, GdkRectangle* cliprect, |
michael@0 | 235 | GtkWidgetState* state, gint flags, |
michael@0 | 236 | GtkTextDirection direction); |
michael@0 | 237 | #else |
michael@0 | 238 | gint |
michael@0 | 239 | moz_gtk_widget_paint(GtkThemeWidgetType widget, cairo_t *cr, |
michael@0 | 240 | GdkRectangle* rect, |
michael@0 | 241 | GtkWidgetState* state, gint flags, |
michael@0 | 242 | GtkTextDirection direction); |
michael@0 | 243 | #endif |
michael@0 | 244 | |
michael@0 | 245 | |
michael@0 | 246 | /*** Widget metrics ***/ |
michael@0 | 247 | /** |
michael@0 | 248 | * Get the border size of a widget |
michael@0 | 249 | * left/right: [OUT] the widget's left/right border |
michael@0 | 250 | * top/bottom: [OUT] the widget's top/bottom border |
michael@0 | 251 | * direction: the text direction for the widget |
michael@0 | 252 | * inhtml: boolean indicating whether this widget will be drawn as a HTML form control, |
michael@0 | 253 | * in order to workaround a size issue (MOZ_GTK_BUTTON only, ignored otherwise) |
michael@0 | 254 | * |
michael@0 | 255 | * returns: MOZ_GTK_SUCCESS if there was no error, an error code otherwise |
michael@0 | 256 | */ |
michael@0 | 257 | gint moz_gtk_get_widget_border(GtkThemeWidgetType widget, gint* left, gint* top, |
michael@0 | 258 | gint* right, gint* bottom, GtkTextDirection direction, |
michael@0 | 259 | gboolean inhtml); |
michael@0 | 260 | |
michael@0 | 261 | /** |
michael@0 | 262 | * Get the desired size of a GtkCheckButton |
michael@0 | 263 | * indicator_size: [OUT] the indicator size |
michael@0 | 264 | * indicator_spacing: [OUT] the spacing between the indicator and its |
michael@0 | 265 | * container |
michael@0 | 266 | * |
michael@0 | 267 | * returns: MOZ_GTK_SUCCESS if there was no error, an error code otherwise |
michael@0 | 268 | */ |
michael@0 | 269 | gint |
michael@0 | 270 | moz_gtk_checkbox_get_metrics(gint* indicator_size, gint* indicator_spacing); |
michael@0 | 271 | |
michael@0 | 272 | /** |
michael@0 | 273 | * Get the desired size of a GtkRadioButton |
michael@0 | 274 | * indicator_size: [OUT] the indicator size |
michael@0 | 275 | * indicator_spacing: [OUT] the spacing between the indicator and its |
michael@0 | 276 | * container |
michael@0 | 277 | * |
michael@0 | 278 | * returns: MOZ_GTK_SUCCESS if there was no error, an error code otherwise |
michael@0 | 279 | */ |
michael@0 | 280 | gint |
michael@0 | 281 | moz_gtk_radio_get_metrics(gint* indicator_size, gint* indicator_spacing); |
michael@0 | 282 | |
michael@0 | 283 | /** |
michael@0 | 284 | * Get the inner-border value for a GtkButton widget (button or tree header) |
michael@0 | 285 | * widget: [IN] the widget to get the border value for |
michael@0 | 286 | * inner_border: [OUT] the inner border |
michael@0 | 287 | * |
michael@0 | 288 | * returns: MOZ_GTK_SUCCESS if there was no error, an error code otherwise |
michael@0 | 289 | */ |
michael@0 | 290 | gint |
michael@0 | 291 | moz_gtk_button_get_inner_border(GtkWidget* widget, GtkBorder* inner_border); |
michael@0 | 292 | |
michael@0 | 293 | /** Get the focus metrics for a treeheadercell, button, checkbox, or radio button. |
michael@0 | 294 | * widget: [IN] the widget to get the focus metrics for |
michael@0 | 295 | * interior_focus: [OUT] whether the focus is drawn around the |
michael@0 | 296 | * label (TRUE) or around the whole container (FALSE) |
michael@0 | 297 | * focus_width: [OUT] the width of the focus line |
michael@0 | 298 | * focus_pad: [OUT] the padding between the focus line and children |
michael@0 | 299 | * |
michael@0 | 300 | * returns: MOZ_GTK_SUCCESS if there was no error, an error code otherwise |
michael@0 | 301 | */ |
michael@0 | 302 | gint |
michael@0 | 303 | moz_gtk_widget_get_focus(GtkWidget* widget, gboolean* interior_focus, |
michael@0 | 304 | gint* focus_width, gint* focus_pad); |
michael@0 | 305 | |
michael@0 | 306 | /** Get the horizontal padding for the menuitem widget or checkmenuitem widget. |
michael@0 | 307 | * horizontal_padding: [OUT] The left and right padding of the menuitem or checkmenuitem |
michael@0 | 308 | * |
michael@0 | 309 | * returns: MOZ_GTK_SUCCESS if there was no error, an error code otherwise |
michael@0 | 310 | */ |
michael@0 | 311 | gint |
michael@0 | 312 | moz_gtk_menuitem_get_horizontal_padding(gint* horizontal_padding); |
michael@0 | 313 | |
michael@0 | 314 | gint |
michael@0 | 315 | moz_gtk_checkmenuitem_get_horizontal_padding(gint* horizontal_padding); |
michael@0 | 316 | |
michael@0 | 317 | /** |
michael@0 | 318 | * Some GTK themes draw their indication for the default button outside |
michael@0 | 319 | * the button (e.g. the glow in New Wave). This gets the extra space necessary. |
michael@0 | 320 | * |
michael@0 | 321 | * border_top: [OUT] extra space to add above |
michael@0 | 322 | * border_left: [OUT] extra space to add to the left |
michael@0 | 323 | * border_bottom: [OUT] extra space to add underneath |
michael@0 | 324 | * border_right: [OUT] extra space to add to the right |
michael@0 | 325 | * |
michael@0 | 326 | * returns: MOZ_GTK_SUCCESS if there was no error, an error code otherwise |
michael@0 | 327 | */ |
michael@0 | 328 | gint |
michael@0 | 329 | moz_gtk_button_get_default_overflow(gint* border_top, gint* border_left, |
michael@0 | 330 | gint* border_bottom, gint* border_right); |
michael@0 | 331 | |
michael@0 | 332 | /** |
michael@0 | 333 | * Get the desired size of a GtkScale thumb |
michael@0 | 334 | * orient: [IN] the scale orientation |
michael@0 | 335 | * thumb_length: [OUT] the length of the thumb |
michael@0 | 336 | * thumb_height: [OUT] the height of the thumb |
michael@0 | 337 | * |
michael@0 | 338 | * returns: MOZ_GTK_SUCCESS if there was no error, an error code otherwise |
michael@0 | 339 | */ |
michael@0 | 340 | gint |
michael@0 | 341 | moz_gtk_get_scalethumb_metrics(GtkOrientation orient, gint* thumb_length, gint* thumb_height); |
michael@0 | 342 | |
michael@0 | 343 | /** |
michael@0 | 344 | * Get the desired metrics for a GtkScrollbar |
michael@0 | 345 | * metrics: [IN] struct which will contain the metrics |
michael@0 | 346 | * |
michael@0 | 347 | * returns: MOZ_GTK_SUCCESS if there was no error, an error code otherwise |
michael@0 | 348 | */ |
michael@0 | 349 | gint |
michael@0 | 350 | moz_gtk_get_scrollbar_metrics(MozGtkScrollbarMetrics* metrics); |
michael@0 | 351 | |
michael@0 | 352 | /** |
michael@0 | 353 | * Get the desired size of a dropdown arrow button |
michael@0 | 354 | * width: [OUT] the desired width |
michael@0 | 355 | * height: [OUT] the desired height |
michael@0 | 356 | * |
michael@0 | 357 | * returns: MOZ_GTK_SUCCESS if there was no error, an error code otherwise |
michael@0 | 358 | */ |
michael@0 | 359 | gint moz_gtk_get_combo_box_entry_button_size(gint* width, gint* height); |
michael@0 | 360 | |
michael@0 | 361 | /** |
michael@0 | 362 | * Get the desired size of a scroll arrow widget |
michael@0 | 363 | * width: [OUT] the desired width |
michael@0 | 364 | * height: [OUT] the desired height |
michael@0 | 365 | * |
michael@0 | 366 | * returns: MOZ_GTK_SUCCESS if there was no error, an error code otherwise |
michael@0 | 367 | */ |
michael@0 | 368 | gint moz_gtk_get_tab_scroll_arrow_size(gint* width, gint* height); |
michael@0 | 369 | |
michael@0 | 370 | /** |
michael@0 | 371 | * Get the desired size of an arrow in a button |
michael@0 | 372 | * width: [OUT] the desired width |
michael@0 | 373 | * height: [OUT] the desired height |
michael@0 | 374 | * |
michael@0 | 375 | * returns: MOZ_GTK_SUCCESS if there was no error, an error code otherwise |
michael@0 | 376 | */ |
michael@0 | 377 | gint moz_gtk_get_arrow_size(gint* width, gint* height); |
michael@0 | 378 | |
michael@0 | 379 | /** |
michael@0 | 380 | * Get the desired size of a toolbar separator |
michael@0 | 381 | * size: [OUT] the desired width |
michael@0 | 382 | * |
michael@0 | 383 | * returns: MOZ_GTK_SUCCESS if there was no error, an error code otherwise |
michael@0 | 384 | */ |
michael@0 | 385 | gint moz_gtk_get_toolbar_separator_width(gint* size); |
michael@0 | 386 | |
michael@0 | 387 | /** |
michael@0 | 388 | * Get the size of a regular GTK expander that shows/hides content |
michael@0 | 389 | * size: [OUT] the size of the GTK expander, size = width = height. |
michael@0 | 390 | * |
michael@0 | 391 | * returns: MOZ_GTK_SUCCESS if there was no error, an error code otherwise |
michael@0 | 392 | */ |
michael@0 | 393 | gint moz_gtk_get_expander_size(gint* size); |
michael@0 | 394 | |
michael@0 | 395 | /** |
michael@0 | 396 | * Get the size of a treeview's expander (we call them twisties) |
michael@0 | 397 | * size: [OUT] the size of the GTK expander, size = width = height. |
michael@0 | 398 | * |
michael@0 | 399 | * returns: MOZ_GTK_SUCCESS if there was no error, an error code otherwise |
michael@0 | 400 | */ |
michael@0 | 401 | gint moz_gtk_get_treeview_expander_size(gint* size); |
michael@0 | 402 | |
michael@0 | 403 | /** |
michael@0 | 404 | * Get the desired height of a menu separator |
michael@0 | 405 | * size: [OUT] the desired height |
michael@0 | 406 | * |
michael@0 | 407 | * returns: MOZ_GTK_SUCCESS if there was no error, an error code otherwise |
michael@0 | 408 | */ |
michael@0 | 409 | gint moz_gtk_get_menu_separator_height(gint* size); |
michael@0 | 410 | |
michael@0 | 411 | /** |
michael@0 | 412 | * Get the desired size of a splitter |
michael@0 | 413 | * orientation: [IN] GTK_ORIENTATION_HORIZONTAL or GTK_ORIENTATION_VERTICAL |
michael@0 | 414 | * size: [OUT] width or height of the splitter handle |
michael@0 | 415 | * |
michael@0 | 416 | * returns: MOZ_GTK_SUCCESS if there was no error, an error code otherwise |
michael@0 | 417 | */ |
michael@0 | 418 | gint moz_gtk_splitter_get_metrics(gint orientation, gint* size); |
michael@0 | 419 | |
michael@0 | 420 | /** |
michael@0 | 421 | * Retrieve an actual GTK scrollbar widget for style analysis. It will not |
michael@0 | 422 | * be modified. |
michael@0 | 423 | */ |
michael@0 | 424 | GtkWidget* moz_gtk_get_scrollbar_widget(void); |
michael@0 | 425 | |
michael@0 | 426 | /** |
michael@0 | 427 | * Get the YTHICKNESS of a tab (notebook extension). |
michael@0 | 428 | */ |
michael@0 | 429 | gint moz_gtk_get_tab_thickness(void); |
michael@0 | 430 | |
michael@0 | 431 | /** |
michael@0 | 432 | * Get a boolean which indicates whether or not to use images in menus. |
michael@0 | 433 | * If TRUE, use images in menus. |
michael@0 | 434 | */ |
michael@0 | 435 | gboolean moz_gtk_images_in_menus(void); |
michael@0 | 436 | |
michael@0 | 437 | /** |
michael@0 | 438 | * Get a boolean which indicates whether or not to use images in buttons. |
michael@0 | 439 | * If TRUE, use images in buttons. |
michael@0 | 440 | */ |
michael@0 | 441 | gboolean moz_gtk_images_in_buttons(void); |
michael@0 | 442 | |
michael@0 | 443 | #ifdef __cplusplus |
michael@0 | 444 | } |
michael@0 | 445 | #endif /* __cplusplus */ |
michael@0 | 446 | |
michael@0 | 447 | #endif |