Blame atk/atkutil.h

Packit d0bcc1
/* ATK -  Accessibility Toolkit
Packit d0bcc1
 * Copyright 2001 Sun Microsystems Inc.
Packit d0bcc1
 *
Packit d0bcc1
 * This library is free software; you can redistribute it and/or
Packit d0bcc1
 * modify it under the terms of the GNU Library General Public
Packit d0bcc1
 * License as published by the Free Software Foundation; either
Packit d0bcc1
 * version 2 of the License, or (at your option) any later version.
Packit d0bcc1
 *
Packit d0bcc1
 * This library is distributed in the hope that it will be useful,
Packit d0bcc1
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit d0bcc1
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit d0bcc1
 * Library General Public License for more details.
Packit d0bcc1
 *
Packit d0bcc1
 * You should have received a copy of the GNU Library General Public
Packit d0bcc1
 * License along with this library; if not, write to the
Packit d0bcc1
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Packit d0bcc1
 * Boston, MA 02111-1307, USA.
Packit d0bcc1
 */
Packit d0bcc1
Packit d0bcc1
#ifndef __ATK_UTIL_H__
Packit d0bcc1
#define __ATK_UTIL_H__
Packit d0bcc1
Packit d0bcc1
#if defined(ATK_DISABLE_SINGLE_INCLUDES) && !defined (__ATK_H_INSIDE__) && !defined (ATK_COMPILATION)
Packit d0bcc1
#error "Only <atk/atk.h> can be included directly."
Packit d0bcc1
#endif
Packit d0bcc1
Packit d0bcc1
#include <atk/atkobject.h>
Packit d0bcc1
Packit d0bcc1
G_BEGIN_DECLS
Packit d0bcc1
Packit d0bcc1
#define ATK_TYPE_UTIL                   (atk_util_get_type ())
Packit d0bcc1
#define ATK_IS_UTIL(obj)                G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATK_TYPE_UTIL)
Packit d0bcc1
#define ATK_UTIL(obj)                   G_TYPE_CHECK_INSTANCE_CAST ((obj), ATK_TYPE_UTIL, AtkUtil)
Packit d0bcc1
#define ATK_UTIL_CLASS(klass)                   (G_TYPE_CHECK_CLASS_CAST ((klass), ATK_TYPE_UTIL, AtkUtilClass))
Packit d0bcc1
#define ATK_IS_UTIL_CLASS(klass)                (G_TYPE_CHECK_CLASS_TYPE ((klass), ATK_TYPE_UTIL))
Packit d0bcc1
#define ATK_UTIL_GET_CLASS(obj)                 (G_TYPE_INSTANCE_GET_CLASS ((obj), ATK_TYPE_UTIL, AtkUtilClass))
Packit d0bcc1
Packit d0bcc1
Packit d0bcc1
#ifndef _TYPEDEF_ATK_UTIL_
Packit d0bcc1
#define _TYPEDEF_ATK_UTIL_
Packit d0bcc1
typedef struct _AtkUtil      AtkUtil;
Packit d0bcc1
typedef struct _AtkUtilClass AtkUtilClass;
Packit d0bcc1
typedef struct _AtkKeyEventStruct AtkKeyEventStruct;
Packit d0bcc1
#endif
Packit d0bcc1
Packit d0bcc1
/**
Packit d0bcc1
 * AtkEventListener: 
Packit d0bcc1
 * @obj: An #AtkObject instance for whom the callback will be called when
Packit d0bcc1
 * the specified event (e.g. 'focus:') takes place.
Packit d0bcc1
 *
Packit d0bcc1
 * A function which is called when an object emits a matching event,
Packit d0bcc1
 * as used in #atk_add_focus_tracker.
Packit d0bcc1
 * Currently the only events for which object-specific handlers are
Packit d0bcc1
 * supported are events of type "focus:".  Most clients of ATK will prefer to 
Packit d0bcc1
 * attach signal handlers for the various ATK signals instead.
Packit d0bcc1
 *
Packit d0bcc1
 * see atk_add_focus_tracker.
Packit d0bcc1
 **/
Packit d0bcc1
typedef void  (*AtkEventListener) (AtkObject* obj);
Packit d0bcc1
/**
Packit d0bcc1
 * AtkEventListenerInit:
Packit d0bcc1
 *
Packit d0bcc1
 * An #AtkEventListenerInit function is a special function that is
Packit d0bcc1
 * called in order to initialize the per-object event registration system
Packit d0bcc1
 * used by #AtkEventListener, if any preparation is required.  
Packit d0bcc1
 *
Packit d0bcc1
 * see atk_focus_tracker_init.
Packit d0bcc1
 **/
Packit d0bcc1
typedef void  (*AtkEventListenerInit) (void);
Packit d0bcc1
/**
Packit d0bcc1
 * AtkKeySnoopFunc:
Packit d0bcc1
 * @event: an AtkKeyEventStruct containing information about the key event for which
Packit d0bcc1
 * notification is being given.
Packit d0bcc1
 * @user_data: a block of data which will be passed to the event listener, on notification.
Packit d0bcc1
 *
Packit d0bcc1
 * An #AtkKeySnoopFunc is a type of callback which is called whenever a key event occurs, 
Packit d0bcc1
 * if registered via atk_add_key_event_listener.  It allows for pre-emptive 
Packit d0bcc1
 * interception of key events via the return code as described below.
Packit d0bcc1
 *
Packit d0bcc1
 * Returns: TRUE (nonzero) if the event emission should be stopped and the event 
Packit d0bcc1
 * discarded without being passed to the normal GUI recipient; FALSE (zero) if the 
Packit d0bcc1
 * event dispatch to the client application should proceed as normal.
Packit d0bcc1
 *
Packit d0bcc1
 * see atk_add_key_event_listener.
Packit d0bcc1
 **/
Packit d0bcc1
typedef gint  (*AtkKeySnoopFunc)  (AtkKeyEventStruct *event,
Packit d0bcc1
				   gpointer user_data);
Packit d0bcc1
Packit d0bcc1
/**
Packit d0bcc1
 * AtkKeyEventStruct:
Packit d0bcc1
 * @type: An AtkKeyEventType, generally one of ATK_KEY_EVENT_PRESS or ATK_KEY_EVENT_RELEASE
Packit d0bcc1
 * @state: A bitmask representing the state of the modifier keys immediately after the event takes place.   
Packit d0bcc1
 * The meaning of the bits is currently defined to match the bitmask used by GDK in
Packit d0bcc1
 * GdkEventType.state, see 
Packit d0bcc1
 * http://developer.gnome.org/doc/API/2.0/gdk/gdk-Event-Structures.html#GdkEventKey
Packit d0bcc1
 * @keyval: A guint representing a keysym value corresponding to those used by GDK and X11: see
Packit d0bcc1
 * /usr/X11/include/keysymdef.h.
Packit d0bcc1
 * @length: The length of member #string.
Packit d0bcc1
 * @string: A string containing one of the following: either a string approximating the text that would 
Packit d0bcc1
 * result from this keypress, if the key is a control or graphic character, or a symbolic name for this keypress.
Packit d0bcc1
 * Alphanumeric and printable keys will have the symbolic key name in this string member, for instance "A". "0", 
Packit d0bcc1
 * "semicolon", "aacute".  Keypad keys have the prefix "KP".
Packit d0bcc1
 * @keycode: The raw hardware code that generated the key event.  This field is raraly useful.
Packit d0bcc1
 * @timestamp: A timestamp in milliseconds indicating when the event occurred.  
Packit d0bcc1
 * These timestamps are relative to a starting point which should be considered arbitrary, 
Packit d0bcc1
 * and only used to compare the dispatch times of events to one another.
Packit d0bcc1
 *
Packit d0bcc1
 * Encapsulates information about a key event.
Packit d0bcc1
 **/
Packit d0bcc1
struct _AtkKeyEventStruct {
Packit d0bcc1
  gint type;
Packit d0bcc1
  guint state;
Packit d0bcc1
  guint keyval;
Packit d0bcc1
  gint length;
Packit d0bcc1
  gchar *string;
Packit d0bcc1
  guint16 keycode;
Packit d0bcc1
  guint32 timestamp;	
Packit d0bcc1
};
Packit d0bcc1
Packit d0bcc1
/**
Packit d0bcc1
 *AtkKeyEventType:
Packit d0bcc1
 *@ATK_KEY_EVENT_PRESS: specifies a key press event
Packit d0bcc1
 *@ATK_KEY_EVENT_RELEASE: specifies a key release event
Packit d0bcc1
 *@ATK_KEY_EVENT_LAST_DEFINED: Not a valid value; specifies end of enumeration
Packit d0bcc1
 *
Packit d0bcc1
 *Specifies the type of a keyboard evemt.
Packit d0bcc1
 **/
Packit d0bcc1
typedef enum
Packit d0bcc1
{
Packit d0bcc1
  ATK_KEY_EVENT_PRESS,
Packit d0bcc1
  ATK_KEY_EVENT_RELEASE,
Packit d0bcc1
  ATK_KEY_EVENT_LAST_DEFINED
Packit d0bcc1
} AtkKeyEventType;
Packit d0bcc1
Packit d0bcc1
struct _AtkUtil
Packit d0bcc1
{
Packit d0bcc1
  GObject parent;
Packit d0bcc1
};
Packit d0bcc1
Packit d0bcc1
/**
Packit d0bcc1
 * AtkUtilClass:
Packit d0bcc1
 * @add_global_event_listener: adds the specified function to the list
Packit d0bcc1
 *  of functions to be called when an ATK event occurs. ATK
Packit d0bcc1
 *  implementors are discouraged from reimplementing this method.
Packit d0bcc1
 * @remove_global_event_listener: removes the specified function to
Packit d0bcc1
 *  the list of functions to be called when an ATK event occurs. ATK
Packit d0bcc1
 *  implementors are discouraged from reimplementing this method.
Packit d0bcc1
 * @add_key_event_listener: adds the specified function to the list of
Packit d0bcc1
 *  functions to be called when a key event occurs.
Packit d0bcc1
 * @remove_key_event_listener: remove the specified function to the
Packit d0bcc1
 *  list of functions to be called when a key event occurs.
Packit d0bcc1
 * @get_root: gets the root accessible container for the current
Packit d0bcc1
 *  application.
Packit d0bcc1
 * @get_toolkit_name: gets name string for the GUI toolkit
Packit d0bcc1
 *  implementing ATK for this application.
Packit d0bcc1
 * @get_toolkit_version: gets version string for the GUI toolkit
Packit d0bcc1
 *  implementing ATK for this application.
Packit d0bcc1
 *
Packit d0bcc1
 */
Packit d0bcc1
struct _AtkUtilClass
Packit d0bcc1
{
Packit d0bcc1
   GObjectClass parent;
Packit d0bcc1
   guint        (* add_global_event_listener)    (GSignalEmissionHook listener,
Packit d0bcc1
						  const gchar        *event_type);
Packit d0bcc1
   void         (* remove_global_event_listener) (guint               listener_id);
Packit d0bcc1
   guint	(* add_key_event_listener) 	 (AtkKeySnoopFunc     listener,
Packit d0bcc1
						  gpointer data);
Packit d0bcc1
   void         (* remove_key_event_listener)    (guint               listener_id);
Packit d0bcc1
   AtkObject*   (* get_root)                     (void);
Packit d0bcc1
   const gchar* (* get_toolkit_name)             (void);
Packit d0bcc1
   const gchar* (* get_toolkit_version)          (void);
Packit d0bcc1
};
Packit d0bcc1
ATK_AVAILABLE_IN_ALL
Packit d0bcc1
GType atk_util_get_type (void);
Packit d0bcc1
Packit d0bcc1
/**
Packit d0bcc1
 *AtkCoordType:
Packit d0bcc1
 *@ATK_XY_SCREEN: specifies xy coordinates relative to the screen
Packit d0bcc1
 *@ATK_XY_WINDOW: specifies xy coordinates relative to the widget's 
Packit d0bcc1
 * top-level window
Packit d0bcc1
 *
Packit d0bcc1
 *Specifies how xy coordinates are to be interpreted. Used by functions such
Packit d0bcc1
 *as atk_component_get_position() and atk_text_get_character_extents() 
Packit d0bcc1
 **/
Packit d0bcc1
typedef enum {
Packit d0bcc1
  ATK_XY_SCREEN,
Packit d0bcc1
  ATK_XY_WINDOW
Packit d0bcc1
}AtkCoordType;
Packit d0bcc1
Packit d0bcc1
ATK_DEPRECATED_IN_2_10
Packit d0bcc1
guint    atk_add_focus_tracker     (AtkEventListener      focus_tracker);
Packit d0bcc1
ATK_DEPRECATED_IN_2_10
Packit d0bcc1
void     atk_remove_focus_tracker  (guint                tracker_id);
Packit d0bcc1
ATK_DEPRECATED_IN_2_10
Packit d0bcc1
void     atk_focus_tracker_init    (AtkEventListenerInit  init);
Packit d0bcc1
ATK_DEPRECATED_IN_2_10
Packit d0bcc1
void     atk_focus_tracker_notify  (AtkObject            *object);
Packit d0bcc1
ATK_AVAILABLE_IN_ALL
Packit d0bcc1
guint	atk_add_global_event_listener (GSignalEmissionHook listener,
Packit d0bcc1
				       const gchar        *event_type);
Packit d0bcc1
ATK_AVAILABLE_IN_ALL
Packit d0bcc1
void	atk_remove_global_event_listener (guint listener_id);
Packit d0bcc1
ATK_AVAILABLE_IN_ALL
Packit d0bcc1
guint	atk_add_key_event_listener (AtkKeySnoopFunc listener, gpointer data);
Packit d0bcc1
ATK_AVAILABLE_IN_ALL
Packit d0bcc1
void	atk_remove_key_event_listener (guint listener_id);
Packit d0bcc1
Packit d0bcc1
ATK_AVAILABLE_IN_ALL
Packit d0bcc1
AtkObject* atk_get_root(void);
Packit d0bcc1
ATK_AVAILABLE_IN_ALL
Packit d0bcc1
AtkObject* atk_get_focus_object (void);
Packit d0bcc1
Packit d0bcc1
ATK_AVAILABLE_IN_ALL
Packit d0bcc1
const gchar *atk_get_toolkit_name (void);
Packit d0bcc1
ATK_AVAILABLE_IN_ALL
Packit d0bcc1
const gchar *atk_get_toolkit_version (void);
Packit d0bcc1
ATK_AVAILABLE_IN_ALL
Packit d0bcc1
const gchar *atk_get_version (void);
Packit d0bcc1
Packit d0bcc1
/* --- GType boilerplate --- */
Packit d0bcc1
/* convenience macros for atk type implementations, which for a type GtkGadgetAccessible will:
Packit d0bcc1
 * - prototype: static void     gtk_gadget_accessible_class_init (GtkGadgetClass *klass);
Packit d0bcc1
 * - prototype: static void     gtk_gadget_accessible_init       (GtkGadget      *self);
Packit d0bcc1
 * - define:    static gpointer gtk_gadget_accessible_parent_class = NULL;
Packit d0bcc1
 *   gtk_gadget_accessible_parent_class is initialized prior to calling gtk_gadget_class_init()
Packit d0bcc1
 * - implement: GType           gtk_gadget_accessible_get_type (void) { ... }
Packit d0bcc1
 * - support custom code in gtk_gadget_accessible_get_type() after the type is registered.
Packit d0bcc1
 *
Packit d0bcc1
 * macro arguments: TypeName, type_name, TYPE_PARENT, CODE
Packit d0bcc1
 * example: ATK_DEFINE_TYPE_WITH_CODE (GtkGadgetAccessible, gtk_gadget_accessible, GTK_TYPE_GADGET,
Packit d0bcc1
 *                                     G_IMPLEMENT_INTERFACE (ATK_TYPE_TABLE, gtk_gadget_accessible_table_iface_init))
Packit d0bcc1
 */
Packit d0bcc1
Packit d0bcc1
/**
Packit d0bcc1
 * ATK_DEFINE_TYPE:
Packit d0bcc1
 * @TN: The name of the new type, in Camel case.
Packit d0bcc1
 * @t_n: The name of the new type, in lowercase, with words separated by '_'.
Packit d0bcc1
 * @T_P: The #GType of the parent type.
Packit d0bcc1
 *
Packit d0bcc1
 * A convenience macro for type ATK implementations, which declares a class
Packit d0bcc1
 * initialization function, an instance initialization function (see #GTypeInfo
Packit d0bcc1
 * for information about these) and a static variable named
Packit d0bcc1
 * @t_n _parent_class pointing to the parent class. Furthermore, it
Packit d0bcc1
 * defines a _get_type() function.
Packit d0bcc1
 *
Packit d0bcc1
 * Since: 1.22
Packit d0bcc1
 */
Packit d0bcc1
#define ATK_DEFINE_TYPE(TN, t_n, T_P)			       ATK_DEFINE_TYPE_EXTENDED (TN, t_n, T_P, 0, {})
Packit d0bcc1
Packit d0bcc1
/**
Packit d0bcc1
 * ATK_DEFINE_TYPE_WITH_CODE:
Packit d0bcc1
 * @TN: The name of the new type, in Camel case.
Packit d0bcc1
 * @t_n: The name of the new type in lowercase, with words separated by '_'.
Packit d0bcc1
 * @T_P: The #GType of the parent type.
Packit d0bcc1
 * @_C_: Custom code that gets inserted in the _get_type() function.
Packit d0bcc1
 *
Packit d0bcc1
 * A convenience macro for ATK type implementations.
Packit d0bcc1
 * Similar to ATK_DEFINE_TYPE(), but allows you to insert custom code into the
Packit d0bcc1
 * _get_type() function, e.g. interface implementations via G_IMPLEMENT_INTERFACE().
Packit d0bcc1
 *
Packit d0bcc1
 * Since: 1.22
Packit d0bcc1
 */
Packit d0bcc1
#define ATK_DEFINE_TYPE_WITH_CODE(TN, t_n, T_P, _C_)	      _ATK_DEFINE_TYPE_EXTENDED_BEGIN (TN, t_n, T_P, 0) {_C_;} _ATK_DEFINE_TYPE_EXTENDED_END()
Packit d0bcc1
Packit d0bcc1
/**
Packit d0bcc1
 * ATK_DEFINE_ABSTRACT_TYPE:
Packit d0bcc1
 * @TN: The name of the new type, in Camel case.
Packit d0bcc1
 * @t_n: The name of the new type, in lowercase, with words separated by '_'.
Packit d0bcc1
 * @T_P: The #GType of the parent type.
Packit d0bcc1
 *
Packit d0bcc1
 * A convenience macro for ATK type implementations.
Packit d0bcc1
 * Similar to ATK_DEFINE_TYPE(), but defines an abstract type.
Packit d0bcc1
 *
Packit d0bcc1
 * Since: 1.22
Packit d0bcc1
 */
Packit d0bcc1
#define ATK_DEFINE_ABSTRACT_TYPE(TN, t_n, T_P)		       ATK_DEFINE_TYPE_EXTENDED (TN, t_n, T_P, G_TYPE_FLAG_ABSTRACT, {})
Packit d0bcc1
Packit d0bcc1
/**
Packit d0bcc1
 * ATK_DEFINE_ABSTRACT_TYPE_WITH_CODE:
Packit d0bcc1
 * @TN: The name of the new type, in Camel case.
Packit d0bcc1
 * @t_n: The name of the new type, in lowercase, with words separated by '_'.
Packit d0bcc1
 * @T_P: The #GType of the parent type.
Packit d0bcc1
 * @_C_: Custom code that gets inserted in the _get_type() function.
Packit d0bcc1
 *
Packit d0bcc1
 * A convenience macro for ATK type implementations.
Packit d0bcc1
 * Similar to ATK_DEFINE_TYPE_WITH_CODE(), but defines an abstract type.
Packit d0bcc1
 *
Packit d0bcc1
 * Since: 1.22
Packit d0bcc1
 */
Packit d0bcc1
#define ATK_DEFINE_ABSTRACT_TYPE_WITH_CODE(TN, t_n, T_P, _C_) _ATK_DEFINE_TYPE_EXTENDED_BEGIN (TN, t_n, T_P, G_TYPE_FLAG_ABSTRACT) {_C_;} _ATK_DEFINE_TYPE_EXTENDED_END()
Packit d0bcc1
Packit d0bcc1
/**
Packit d0bcc1
 * ATK_DEFINE_TYPE_EXTENDED:
Packit d0bcc1
 * @TN: The name of the new type, in Camel case.
Packit d0bcc1
 * @t_n: The name of the new type, in lowercase, with words separated by '_'.
Packit d0bcc1
 * @T_P: The #GType of the parent type.
Packit d0bcc1
 * @_f_: #GTypeFlags to pass to g_type_register_static()
Packit d0bcc1
 * @_C_: Custom code that gets inserted in the _get_type() function.
Packit d0bcc1
 *
Packit d0bcc1
 * The most general convenience macro for ATK type implementations, on which
Packit d0bcc1
 * ATK_DEFINE_TYPE(), etc are based.
Packit d0bcc1
 *
Packit d0bcc1
 * Since: 1.22
Packit d0bcc1
 */
Packit d0bcc1
#define ATK_DEFINE_TYPE_EXTENDED(TN, t_n, T_P, _f_, _C_)      _ATK_DEFINE_TYPE_EXTENDED_BEGIN (TN, t_n, T_P, _f_) {_C_;} _ATK_DEFINE_TYPE_EXTENDED_END()
Packit d0bcc1
Packit d0bcc1
#define _ATK_DEFINE_TYPE_EXTENDED_BEGIN(TypeName, type_name, TYPE, flags) \
Packit d0bcc1
\
Packit d0bcc1
static void     type_name##_init              (TypeName        *self); \
Packit d0bcc1
static void     type_name##_class_init        (TypeName##Class *klass); \
Packit d0bcc1
static gpointer type_name##_parent_class = NULL; \
Packit d0bcc1
static void     type_name##_class_intern_init (gpointer klass) \
Packit d0bcc1
{ \
Packit d0bcc1
  type_name##_parent_class = g_type_class_peek_parent (klass); \
Packit d0bcc1
  type_name##_class_init ((TypeName##Class*) klass); \
Packit d0bcc1
} \
Packit d0bcc1
\
Packit d0bcc1
ATK_AVAILABLE_IN_ALL \
Packit d0bcc1
GType \
Packit d0bcc1
type_name##_get_type (void) \
Packit d0bcc1
{ \
Packit d0bcc1
  static volatile gsize g_define_type_id__volatile = 0; \
Packit d0bcc1
  if (g_once_init_enter (&g_define_type_id__volatile))  \
Packit d0bcc1
    { \
Packit d0bcc1
      AtkObjectFactory *factory; \
Packit d0bcc1
      GType derived_type; \
Packit d0bcc1
      GTypeQuery query; \
Packit d0bcc1
      GType derived_atk_type; \
Packit d0bcc1
      GType g_define_type_id; \
Packit d0bcc1
\
Packit d0bcc1
      /* Figure out the size of the class and instance we are deriving from */ \
Packit d0bcc1
      derived_type = g_type_parent (TYPE); \
Packit d0bcc1
      factory = atk_registry_get_factory (atk_get_default_registry (), \
Packit d0bcc1
                                          derived_type); \
Packit d0bcc1
      derived_atk_type = atk_object_factory_get_accessible_type (factory); \
Packit d0bcc1
      g_type_query (derived_atk_type, &query); \
Packit d0bcc1
\
Packit d0bcc1
      g_define_type_id = \
Packit d0bcc1
        g_type_register_static_simple (derived_atk_type, \
Packit d0bcc1
                                       g_intern_static_string (#TypeName), \
Packit d0bcc1
                                       query.class_size, \
Packit d0bcc1
                                       (GClassInitFunc) type_name##_class_intern_init, \
Packit d0bcc1
                                       query.instance_size, \
Packit d0bcc1
                                       (GInstanceInitFunc) type_name##_init, \
Packit d0bcc1
                                       (GTypeFlags) flags); \
Packit d0bcc1
      { /* custom code follows */
Packit d0bcc1
#define _ATK_DEFINE_TYPE_EXTENDED_END()	\
Packit d0bcc1
        /* following custom code */	\
Packit d0bcc1
      }					\
Packit d0bcc1
      g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); \
Packit d0bcc1
    }					\
Packit d0bcc1
  return g_define_type_id__volatile;	\
Packit d0bcc1
} /* closes type_name##_get_type() */
Packit d0bcc1
Packit d0bcc1
G_END_DECLS
Packit d0bcc1
Packit d0bcc1
#endif /* __ATK_UTIL_H__ */