Tue, 06 Jan 2015 21:39:09 +0100
Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.
michael@0 | 1 | /* ATK - Accessibility Toolkit |
michael@0 | 2 | * Copyright 2001 Sun Microsystems Inc. |
michael@0 | 3 | * |
michael@0 | 4 | * This library is free software; you can redistribute it and/or |
michael@0 | 5 | * modify it under the terms of the GNU Library General Public |
michael@0 | 6 | * License as published by the Free Software Foundation; either |
michael@0 | 7 | * version 2 of the License, or (at your option) any later version. |
michael@0 | 8 | * |
michael@0 | 9 | * This library is distributed in the hope that it will be useful, |
michael@0 | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
michael@0 | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
michael@0 | 12 | * Library General Public License for more details. |
michael@0 | 13 | * |
michael@0 | 14 | * You should have received a copy of the GNU Library General Public |
michael@0 | 15 | * License along with this library; if not, write to the |
michael@0 | 16 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
michael@0 | 17 | * Boston, MA 02111-1307, USA. |
michael@0 | 18 | */ |
michael@0 | 19 | |
michael@0 | 20 | #ifndef __ATK_COMPONENT_H__ |
michael@0 | 21 | #define __ATK_COMPONENT_H__ |
michael@0 | 22 | |
michael@0 | 23 | #include <atk/atkobject.h> |
michael@0 | 24 | #include <atk/atkutil.h> |
michael@0 | 25 | |
michael@0 | 26 | #ifdef __cplusplus |
michael@0 | 27 | extern "C" { |
michael@0 | 28 | #endif /* __cplusplus */ |
michael@0 | 29 | |
michael@0 | 30 | /* |
michael@0 | 31 | * The AtkComponent interface should be supported by any object that is |
michael@0 | 32 | * rendered on the screen. The interface provides the standard mechanism |
michael@0 | 33 | * for an assistive technology to determine and set the graphical |
michael@0 | 34 | * representation of an object. |
michael@0 | 35 | */ |
michael@0 | 36 | |
michael@0 | 37 | #define ATK_TYPE_COMPONENT (atk_component_get_type ()) |
michael@0 | 38 | #define ATK_IS_COMPONENT(obj) G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATK_TYPE_COMPONENT) |
michael@0 | 39 | #define ATK_COMPONENT(obj) G_TYPE_CHECK_INSTANCE_CAST ((obj), ATK_TYPE_COMPONENT, AtkComponent) |
michael@0 | 40 | #define ATK_COMPONENT_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), ATK_TYPE_COMPONENT, AtkComponentIface)) |
michael@0 | 41 | |
michael@0 | 42 | #ifndef _TYPEDEF_ATK_COMPONENT_ |
michael@0 | 43 | #define _TYPEDEF_ATK_COMPONENT_ |
michael@0 | 44 | typedef struct _AtkComponent AtkComponent; |
michael@0 | 45 | #endif |
michael@0 | 46 | typedef struct _AtkComponentIface AtkComponentIface; |
michael@0 | 47 | |
michael@0 | 48 | typedef void (*AtkFocusHandler) (AtkObject*, gboolean); |
michael@0 | 49 | |
michael@0 | 50 | typedef struct _AtkRectangle AtkRectangle; |
michael@0 | 51 | |
michael@0 | 52 | struct _AtkRectangle |
michael@0 | 53 | { |
michael@0 | 54 | gint x; |
michael@0 | 55 | gint y; |
michael@0 | 56 | gint width; |
michael@0 | 57 | gint height; |
michael@0 | 58 | }; |
michael@0 | 59 | |
michael@0 | 60 | GType atk_rectangle_get_type (void); |
michael@0 | 61 | |
michael@0 | 62 | #define ATK_TYPE_RECTANGLE (atk_rectangle_get_type ()) |
michael@0 | 63 | struct _AtkComponentIface |
michael@0 | 64 | { |
michael@0 | 65 | GTypeInterface parent; |
michael@0 | 66 | |
michael@0 | 67 | guint (* add_focus_handler) (AtkComponent *component, |
michael@0 | 68 | AtkFocusHandler handler); |
michael@0 | 69 | |
michael@0 | 70 | gboolean (* contains) (AtkComponent *component, |
michael@0 | 71 | gint x, |
michael@0 | 72 | gint y, |
michael@0 | 73 | AtkCoordType coord_type); |
michael@0 | 74 | |
michael@0 | 75 | AtkObject* (* ref_accessible_at_point) (AtkComponent *component, |
michael@0 | 76 | gint x, |
michael@0 | 77 | gint y, |
michael@0 | 78 | AtkCoordType coord_type); |
michael@0 | 79 | void (* get_extents) (AtkComponent *component, |
michael@0 | 80 | gint *x, |
michael@0 | 81 | gint *y, |
michael@0 | 82 | gint *width, |
michael@0 | 83 | gint *height, |
michael@0 | 84 | AtkCoordType coord_type); |
michael@0 | 85 | void (* get_position) (AtkComponent *component, |
michael@0 | 86 | gint *x, |
michael@0 | 87 | gint *y, |
michael@0 | 88 | AtkCoordType coord_type); |
michael@0 | 89 | void (* get_size) (AtkComponent *component, |
michael@0 | 90 | gint *width, |
michael@0 | 91 | gint *height); |
michael@0 | 92 | gboolean (* grab_focus) (AtkComponent *component); |
michael@0 | 93 | void (* remove_focus_handler) (AtkComponent *component, |
michael@0 | 94 | guint handler_id); |
michael@0 | 95 | gboolean (* set_extents) (AtkComponent *component, |
michael@0 | 96 | gint x, |
michael@0 | 97 | gint y, |
michael@0 | 98 | gint width, |
michael@0 | 99 | gint height, |
michael@0 | 100 | AtkCoordType coord_type); |
michael@0 | 101 | gboolean (* set_position) (AtkComponent *component, |
michael@0 | 102 | gint x, |
michael@0 | 103 | gint y, |
michael@0 | 104 | AtkCoordType coord_type); |
michael@0 | 105 | gboolean (* set_size) (AtkComponent *component, |
michael@0 | 106 | gint width, |
michael@0 | 107 | gint height); |
michael@0 | 108 | |
michael@0 | 109 | AtkLayer (* get_layer) (AtkComponent *component); |
michael@0 | 110 | gint (* get_mdi_zorder) (AtkComponent *component); |
michael@0 | 111 | |
michael@0 | 112 | /* |
michael@0 | 113 | * signal handlers |
michael@0 | 114 | */ |
michael@0 | 115 | void (* bounds_changed) (AtkComponent *component, |
michael@0 | 116 | AtkRectangle *bounds); |
michael@0 | 117 | gdouble (* get_alpha) (AtkComponent *component); |
michael@0 | 118 | }; |
michael@0 | 119 | |
michael@0 | 120 | GType atk_component_get_type (void); |
michael@0 | 121 | |
michael@0 | 122 | /* convenience functions */ |
michael@0 | 123 | |
michael@0 | 124 | guint atk_component_add_focus_handler (AtkComponent *component, |
michael@0 | 125 | AtkFocusHandler handler); |
michael@0 | 126 | gboolean atk_component_contains (AtkComponent *component, |
michael@0 | 127 | gint x, |
michael@0 | 128 | gint y, |
michael@0 | 129 | AtkCoordType coord_type); |
michael@0 | 130 | AtkObject* atk_component_ref_accessible_at_point(AtkComponent *component, |
michael@0 | 131 | gint x, |
michael@0 | 132 | gint y, |
michael@0 | 133 | AtkCoordType coord_type); |
michael@0 | 134 | void atk_component_get_extents (AtkComponent *component, |
michael@0 | 135 | gint *x, |
michael@0 | 136 | gint *y, |
michael@0 | 137 | gint *width, |
michael@0 | 138 | gint *height, |
michael@0 | 139 | AtkCoordType coord_type); |
michael@0 | 140 | void atk_component_get_position (AtkComponent *component, |
michael@0 | 141 | gint *x, |
michael@0 | 142 | gint *y, |
michael@0 | 143 | AtkCoordType coord_type); |
michael@0 | 144 | void atk_component_get_size (AtkComponent *component, |
michael@0 | 145 | gint *width, |
michael@0 | 146 | gint *height); |
michael@0 | 147 | AtkLayer atk_component_get_layer (AtkComponent *component); |
michael@0 | 148 | gint atk_component_get_mdi_zorder (AtkComponent *component); |
michael@0 | 149 | gboolean atk_component_grab_focus (AtkComponent *component); |
michael@0 | 150 | void atk_component_remove_focus_handler (AtkComponent *component, |
michael@0 | 151 | guint handler_id); |
michael@0 | 152 | gboolean atk_component_set_extents (AtkComponent *component, |
michael@0 | 153 | gint x, |
michael@0 | 154 | gint y, |
michael@0 | 155 | gint width, |
michael@0 | 156 | gint height, |
michael@0 | 157 | AtkCoordType coord_type); |
michael@0 | 158 | gboolean atk_component_set_position (AtkComponent *component, |
michael@0 | 159 | gint x, |
michael@0 | 160 | gint y, |
michael@0 | 161 | AtkCoordType coord_type); |
michael@0 | 162 | gboolean atk_component_set_size (AtkComponent *component, |
michael@0 | 163 | gint width, |
michael@0 | 164 | gint height); |
michael@0 | 165 | gdouble atk_component_get_alpha (AtkComponent *component); |
michael@0 | 166 | #ifdef __cplusplus |
michael@0 | 167 | } |
michael@0 | 168 | #endif /* __cplusplus */ |
michael@0 | 169 | |
michael@0 | 170 | |
michael@0 | 171 | #endif /* __ATK_COMPONENT_H__ */ |