home *** CD-ROM | disk | FTP | other *** search
-
- /* ibarpatch.h */
-
- #ifndef ibarpatch_H
- #define ibarpatch_H
-
- #include "OS:wimp.h"
-
-
- /* Structures and defines */
-
- /* These are the structures used by the IconbarPatch module, so any change
- here must naturally be mirrored by a change in the module. */
-
- typedef struct ibarpatch_block ibarpatch_block;
- typedef struct ibarpatch_list ibarpatch_list;
- typedef struct ibarpatch_element ibarpatch_element;
- typedef struct ibarpatch_add_info ibarpatch_add_info;
-
- /* The add icon event */
-
- struct ibarpatch_add_info {
- int icon_handle;
- wimp_t task; /* Task handle of icon creator */
- union {
- int priority, /* Priority of icon */
- next_to; /* Icon to create next to (-1 means extreme left/right) */
- } extra;
- wimp_w position; /* The `window handle' used to create icon with */
- wimp_icon_flags flags;
- wimp_icon_data data;
- };
-
- /* Queue element */
-
- #define ibarpatch_add_type 0
- #define ibarpatch_remove_type 1
- #define ibarpatch_update_type 2
-
- struct ibarpatch_element {
- ibarpatch_element *next;
- int type;
-
- union {
- ibarpatch_add_info add;
- struct {
- int icon_handle;
- } remove;
- struct {
- int bic, eor, icon_handle;
- } update;
- } data;
- };
-
- /* A list of elements (gives list beginning, end, and number of elements) */
-
- struct ibarpatch_list {
- ibarpatch_element *begin, **end;
- int count;
- };
-
- /* IconbarPatch's main workspace block */
-
- #define ibarpatch_remove_title (1<<0)
- #define ibarpatch_y_absolute (1<<1)
-
- struct ibarpatch_block {
- int usage_count; /* Module's usage count. */
- /* The list of events to handle, and record of old events. */
- ibarpatch_list list, list_keep;
- // ibarpatch_element *list_begin, **list_end,
- // *list_keep_begin, **list_keep_end;
- /* These control how menus are opened. */
- int x_offset, y_offset, flags;
- /* IconbarPatch's internal handle count and debug file handle. */
- int icon_count, debug_file;
- /* Whether iconbar can start on Service_StartWimp. */
- int start_flag;
- /* Data to fiddle Wimp_GetPointerInfo and Wimp_SendMessage with. */
- wimp_w window;
- int pointer_icon;
- wimp_t pointer_task;
- /* What to return for Wimp_GetWindowState on the iconbar. */
- wimp_window_state iconbar_state;
- };
-
-
- /* Functions and structures (in hacky.c) */
-
- #include "gadget.h"
-
- /* These are independent of IconbarPatch. */
-
- typedef struct ibarpatch_icon_properties ibarpatch_icon_properties;
- struct ibarpatch_icon_properties {
- char *text;
- sprite_details sprite;
- };
-
- ibarpatch_icon_properties *ibarpatch_extract_info(wimp_t task,
- wimp_icon_flags flags, const wimp_icon_data *data);
- void ibarpatch_free_info(ibarpatch_icon_properties *info);
-
-
- #endif
-