* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the Free
- * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
*/
#ifndef __GTK_TYPE_UTILS_H__
#define __GTK_TYPE_UTILS_H__
#ifdef __cplusplus
extern "C" {
+#pragma }
#endif /* __cplusplus */
-/* Fundamental Types */
-
+/* Fundamental Types
+ */
typedef enum
{
GTK_TYPE_INVALID,
GTK_TYPE_FOREIGN,
GTK_TYPE_CALLBACK,
GTK_TYPE_ARGS,
-
+
GTK_TYPE_POINTER,
-
- /* it'd be great if the next two could be removed eventually */
+
+ /* It'd be great if the next two could be removed eventually
+ */
GTK_TYPE_SIGNAL,
GTK_TYPE_C_CALLBACK,
-
+
GTK_TYPE_OBJECT
-
+
} GtkFundamentalType;
typedef guint GtkType;
-/* Builtin Types */
-
+/* Builtin Types
+ */
extern GtkType gtk_type_builtins[];
#include <gtk/gtktypebuiltins.h>
-/* General Types */
-
-#define GTK_TYPE_MAKE(ft, seqno) (((seqno)<<8)|ft)
-#define GTK_FUNDAMENTAL_TYPE(t) ((GtkFundamentalType)((t)&0xFF))
-#define GTK_TYPE_SEQNO(t) ((t)>0xFF? (t)>>8:(t))
+/* Macros
+ */
+#define GTK_TYPE_MAKE(parent_t, seqno) (((seqno) << 8) | GTK_FUNDAMENTAL_TYPE (parent_t))
+#define GTK_FUNDAMENTAL_TYPE(type) ((GtkFundamentalType) ((type) & 0xFF))
+#define GTK_TYPE_SEQNO(type) ((type) > 0xFF ? (type) >> 8 : (type))
typedef struct _GtkArg GtkArg;
typedef struct _GtkObject GtkObject; /* forward declaration of object type */
typedef void (*GtkArgGetFunc) (GtkObject *object, GtkArg *arg, guint arg_id);
typedef void (*GtkArgSetFunc) (GtkObject *object, GtkArg *arg, guint arg_id);
typedef gint (*GtkFunction) (gpointer data);
-typedef void (*GtkRemoveFunction) (gpointer data);
typedef void (*GtkCallbackMarshal) (GtkObject *object,
gpointer data,
- int n_args,
+ guint n_args,
GtkArg *args);
typedef void (*GtkDestroyNotify) (gpointer data);
void gtk_type_init (void);
GtkType gtk_type_unique (guint parent_type,
GtkTypeInfo *type_info);
+void gtk_type_set_chunk_alloc (GtkType type,
+ guint n_chunks);
gchar* gtk_type_name (guint type);
GtkType gtk_type_from_name (const gchar *name);
GtkType gtk_type_parent (GtkType type);
gpointer gtk_type_class (GtkType type);
+gpointer gtk_type_parent_class (GtkType type);
gpointer gtk_type_new (GtkType type);
+void gtk_type_free (GtkType type,
+ gpointer mem);
void gtk_type_describe_heritage (GtkType type);
void gtk_type_describe_tree (GtkType type,
gint show_size);