home *** CD-ROM | disk | FTP | other *** search
-
- /* iconmgr.h */
-
- #ifndef iconbar_manager_H
- #define iconbar_manager_H
-
- #include "OS:wimp.h"
-
- #include "gadget.h"
- #include "ibarpatch.h"
-
-
- /* Abstract structures used to delegate the task of arranging icons */
-
- typedef struct iconbar_arranger iconbar_arranger;
- typedef struct iconbar_arranger_add_info iconbar_arranger_add_info;
-
- /* This structure provides two functions, for adding and removing icons in
- a host window. The client can return a handle to be used when later
- removing the icon. */
- struct iconbar_arranger {
- void *(*add_icon)(iconbar_arranger *arranger, iconbar_gadget *gadget,
- const iconbar_arranger_add_info *info);
- void (*remove_icon)(iconbar_arranger *arranger, iconbar_gadget *gadget,
- void *handle);
- };
-
- /* This is passed to the add function above, with positional information
- about the icon in question. Taking note of this info is optional. */
- struct iconbar_arranger_add_info {
- /* Icon priority: negative numbers are on the left, positive (and zero)
- numbers are on the right; numbers closest to zero are nearest to the
- middle of the iconbar. */
- int priority;
- /* If the new icon has the same priority as another, setting this means the
- new icon should be on the higher priority side of the icon (ie. to the
- right of it). */
- unsigned tend_higher: 1;
- /* Handle of icon to create the new icon next to. May be 0. This should
- be used in preference to icon priority; tend_higher also still
- applies. */
- void *next_to;
- };
-
-
- /* Contents private */
- typedef struct iconbar_manager_task iconbar_manager_task;
-
- extern iconbar_manager_task *iconbar_manager_this_task;
-
- iconbar_manager_task *iconbar_manager_initialise(iconbar_arranger *arranger);
- void iconbar_manager_finalise(iconbar_manager_task *task);
-
- /* The arranger's method for informing that it is closing down. */
- void iconbar_manager_losing_icon(iconbar_manager_task *task,
- iconbar_gadget *gadget);
- /* Does wimp_get_pointer_info without fudging window handles, etc. */
- void iconbar_manager_get_pointer_info(iconbar_manager_task *task,
- wimp_pointer *pointer);
-
-
- #endif
-