14642e01fSmrg/* x-hook.h -- lists of function,data pairs to call. 235c4bbdfSmrg * 335c4bbdfSmrg * Copyright (c) 2003-2012 Apple Inc. All rights reserved. 435c4bbdfSmrg * 535c4bbdfSmrg * Permission is hereby granted, free of charge, to any person 635c4bbdfSmrg * obtaining a copy of this software and associated documentation files 735c4bbdfSmrg * (the "Software"), to deal in the Software without restriction, 835c4bbdfSmrg * including without limitation the rights to use, copy, modify, merge, 935c4bbdfSmrg * publish, distribute, sublicense, and/or sell copies of the Software, 1035c4bbdfSmrg * and to permit persons to whom the Software is furnished to do so, 1135c4bbdfSmrg * subject to the following conditions: 1235c4bbdfSmrg * 1335c4bbdfSmrg * The above copyright notice and this permission notice shall be 1435c4bbdfSmrg * included in all copies or substantial portions of the Software. 1535c4bbdfSmrg * 1635c4bbdfSmrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 1735c4bbdfSmrg * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 1835c4bbdfSmrg * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 1935c4bbdfSmrg * NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT 2035c4bbdfSmrg * HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 2135c4bbdfSmrg * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 2235c4bbdfSmrg * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 2335c4bbdfSmrg * DEALINGS IN THE SOFTWARE. 2435c4bbdfSmrg * 2535c4bbdfSmrg * Except as contained in this notice, the name(s) of the above 2635c4bbdfSmrg * copyright holders shall not be used in advertising or otherwise to 2735c4bbdfSmrg * promote the sale, use or other dealings in this Software without 2835c4bbdfSmrg * prior written authorization. 2935c4bbdfSmrg */ 304642e01fSmrg 314642e01fSmrg#ifndef X_HOOK_H 324642e01fSmrg#define X_HOOK_H 1 334642e01fSmrg 344642e01fSmrg#include "x-list.h" 354642e01fSmrg 364642e01fSmrgtypedef void x_hook_function (void *arg, void *data); 374642e01fSmrg 3835c4bbdfSmrgX_EXTERN x_list *X_PFX(hook_add) (x_list * lst, x_hook_function * fun, 3935c4bbdfSmrg void *data); 4035c4bbdfSmrgX_EXTERN x_list *X_PFX(hook_remove) (x_list * lst, x_hook_function * fun, 4135c4bbdfSmrg void *data); 4235c4bbdfSmrgX_EXTERN void X_PFX(hook_run) (x_list * lst, void *arg); 4335c4bbdfSmrgX_EXTERN void X_PFX(hook_free) (x_list * lst); 444642e01fSmrg 454642e01fSmrg#endif /* X_HOOK_H */ 46