2 * CDE - Common Desktop Environment
4 * Copyright (c) 1993-2012, The Open Group. All rights reserved.
6 * These libraries and programs are free software; you can
7 * redistribute them and/or modify them under the terms of the GNU
8 * Lesser General Public License as published by the Free Software
9 * Foundation; either version 2 of the License, or (at your option)
12 * These libraries and programs are distributed in the hope that
13 * they will be useful, but WITHOUT ANY WARRANTY; without even the
14 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU Lesser General Public License for more
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with these libraries and programs; if not, write
20 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21 * Floor, Boston, MA 02110-1301 USA
25 * $XConsortium: obj_notifyP.h /main/3 1995/11/06 18:38:04 rswiston $
27 * @(#)obj_notifyP.h 1.24 02 Feb 1995
29 * RESTRICTED CONFIDENTIAL INFORMATION:
31 * The information in this document is subject to special
32 * restrictions in a confidential disclosure agreement between
33 * HP, IBM, Sun, USL, SCO and Univel. Do not distribute this
34 * document outside HP, IBM, Sun, USL, SCO, or Univel without
35 * Sun's specific written approval. This document and all copies
36 * and derivative works thereof must be returned or destroyed at
39 * Copyright 1993 Sun Microsystems, Inc. All rights reserved.
44 * obj_notifyP.h - object change notification
46 * Internal files - defines internal data structures, et cetera
48 #ifndef _ABOBJ_NOTIFYP_H
49 #define _ABOBJ_NOTIFYP_H_
51 #include "objP.h" /* include before obj.h! */
52 #include <ab_private/obj.h>
53 #include <ab_private/obj_notify.h>
56 * return codes (supplement to util_err.h)
58 #define OBJ_NOTIFY_BATCHED (100) /* not an error! */
64 OBJEV_ALLOW_GEOMETRY_CHANGE,
71 OBJEV_UPDATE_WITH_DATA,
72 OBJ_EVENT_TYPE_NUM_VALUES
76 typedef BYTE OBJ_EVENT_MODE;
77 #define OBJEV_MODE_SEND_NOTIFY_EVS ((OBJ_EVENT_MODE)0x01)
78 #define OBJEV_MODE_SEND_ALLOW_EVS ((OBJ_EVENT_MODE)0x02)
79 #define OBJEV_MODE_BATCH_NOTIFY_EVS ((OBJ_EVENT_MODE)0x04)
80 #define OBJEV_MODE_DISALLOW_ALL_EVS ((OBJ_EVENT_MODE)0x08)
81 #define OBJEV_MODE_NORMAL \
82 (OBJEV_MODE_SEND_NOTIFY_EVS | OBJEV_MODE_SEND_ALLOW_EVS)
86 OBJEV_ALLOW_GEOMETRY_CHANGE_INFO allow_geometry_change;
87 OBJEV_ALLOW_REPARENT_INFO allow_reparent;
88 OBJEV_ATT_CHANGE_INFO att_change;
89 OBJEV_CREATE_INFO create;
90 OBJEV_DESTROY_INFO destroy_info; /* destroy is C++ key*/
91 OBJEV_REPARENT_INFO reparent;
92 OBJEV_UPDATE_INFO update;
93 OBJEV_UPDATE_WITH_DATA_INFO update_with_data;
94 } OBJ_EVENT_EXTRA_INFO;
100 OBJ_EVENT_EXTRA_INFO info;
101 } OBJ_EVENT, *ObjEvent;
104 int objP_notify_push_mode(void); /* push current set of modes */
105 int objP_notify_set_mode(OBJ_EVENT_MODE); /* set a mode */
106 int objP_notify_clear_mode(OBJ_EVENT_MODE); /* clear a mode */
107 BOOL objP_notify_mode_is_set(OBJ_EVENT_MODE); /* query mode */
108 int objP_notify_pop_mode(void); /*pop to most-recently pushed*/
109 OBJ_EVENT_MODE objP_notify_get_mode(void);
110 int objP_notify_get_num_queued(void);
111 BOOL objP_notify_event_will_queue(void);
114 * These functions send or queue an event to be sent
116 int objP_notify_send_create(ABObj);
117 int objP_notify_send_destroy(ABObj);
118 int objP_notify_send_allow_geometry_change(ABObj,
119 int new_x, int new_y, int new_width, int new_height);
120 int objP_notify_send_allow_reparent(ABObj, ABObj new_parent);
121 int objP_notify_send_att_change(ABObj, OBJEV_ATT_FLAGS atts);
122 int objP_notify_send_geometry_change(ABObj,
123 int old_x, int old_y, int old_width, int old_height);
124 int objP_notify_send_rc_geometry_change(ABObj);
125 int objP_notify_send_name_change(ABObj, ISTRING old_name);
126 int objP_notify_send_reparent(ABObj, ABObj old_parent);
127 int objP_notify_send_selected_change(ABObj);
128 int objP_notify_send_update(ABObj, BOOL update_subtree);
130 int objP_notify_send_update_with_data(
135 UpdateDataFreeFunc update_data_free_func
139 /*************************************************************************
141 ** Inline implementation **
143 *************************************************************************/
145 #define objP_notify_mode_is_set(mode) ((objP_notify_get_mode() & (mode)) != 0)
147 #endif /* _ABOBJ_NOTIFYP_H_ */