other-licenses/atk-1.0/atk/atkrelation.h

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

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.

     1 /* ATK -  Accessibility Toolkit
     2  * Copyright 2001 Sun Microsystems Inc.
     3  *
     4  * This library is free software; you can redistribute it and/or
     5  * modify it under the terms of the GNU Library General Public
     6  * License as published by the Free Software Foundation; either
     7  * version 2 of the License, or (at your option) any later version.
     8  *
     9  * This library is distributed in the hope that it will be useful,
    10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    12  * Library General Public License for more details.
    13  *
    14  * You should have received a copy of the GNU Library General Public
    15  * License along with this library; if not, write to the
    16  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    17  * Boston, MA 02111-1307, USA.
    18  */
    20 #ifndef __ATK_RELATION_H__
    21 #define __ATK_RELATION_H__
    23 #ifdef __cplusplus
    24 extern "C" {
    25 #endif /* __cplusplus */
    27 #include <glib-object.h>
    28 #include <atk/atkrelationtype.h>
    30 /*
    31  * An AtkRelation describes a relation between the object and one or more 
    32  * other objects. The actual relations that an object has with other objects
    33  * are defined as an AtkRelationSet, which is a set of AtkRelations. 
    34  */
    36 #define ATK_TYPE_RELATION                         (atk_relation_get_type ())
    37 #define ATK_RELATION(obj)                         (G_TYPE_CHECK_INSTANCE_CAST ((obj), ATK_TYPE_RELATION, AtkRelation))
    38 #define ATK_RELATION_CLASS(klass)                 (G_TYPE_CHECK_CLASS_CAST ((klass), ATK_TYPE_RELATION, AtkRelationClass))
    39 #define ATK_IS_RELATION(obj)                      (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATK_TYPE_RELATION))
    40 #define ATK_IS_RELATION_CLASS(klass)              (G_TYPE_CHECK_CLASS_TYPE ((klass), ATK_TYPE_RELATION))
    41 #define ATK_RELATION_GET_CLASS(obj)               (G_TYPE_INSTANCE_GET_CLASS ((obj), ATK_TYPE_RELATION, AtkRelationClass))
    43 typedef struct _AtkRelation            AtkRelation;
    44 typedef struct _AtkRelationClass       AtkRelationClass;
    46 struct _AtkRelation
    47 {
    48   GObject parent;
    50   GPtrArray       *target;
    51   AtkRelationType relationship;
    52 };
    54 struct _AtkRelationClass
    55 {
    56   GObjectClass parent;
    57 };
    59 GType atk_relation_get_type (void);
    61 AtkRelationType       atk_relation_type_register      (const gchar     *name);
    62 G_CONST_RETURN gchar* atk_relation_type_get_name      (AtkRelationType type);
    63 AtkRelationType       atk_relation_type_for_name      (const gchar     *name);
    65 /*
    66  * Create a new relation for the specified key and the specified list
    67  * of targets.
    68  */
    69 AtkRelation*          atk_relation_new                (AtkObject       **targets,
    70                                                        gint            n_targets,
    71                                                        AtkRelationType relationship);
    72 /*
    73  * Returns the type of a relation.
    74  */
    75 AtkRelationType       atk_relation_get_relation_type  (AtkRelation     *relation);
    76 /*
    77  * Returns the target list of a relation.
    78  */
    79 GPtrArray*            atk_relation_get_target         (AtkRelation     *relation);
    80 void                  atk_relation_add_target         (AtkRelation     *relation,
    81                                                        AtkObject       *target);
    84 #ifdef __cplusplus
    85 }
    86 #endif /* __cplusplus */
    88 #endif /* __ATK_RELATION_H__ */

mercurial