#ifndef MESGWIN_H #define MESGWIN_H #include "../include/osw-x.h" #include "../include/widget.h" typedef struct _mesgwin_struct mesgwin_struct; typedef struct _mesgwin_mesg_struct mesgwin_mesg_struct; /* * Message: */ struct _mesgwin_mesg_struct { char *message; int length; /* Length of allocation, not content */ int sel_start, sel_end; pixel_t pixel; }; /* * Message Window: */ struct _mesgwin_struct { bool_t map_state, has_focus; int x, y; unsigned int width, height; visibility_t visibility_state; win_t toplevel; pixmap_t toplevel_buf; scroll_bar_struct sb; shared_image_t *bkg; mesgwin_mesg_struct **message; int total_messages; int longest_line; /* Length of longest line */ bool_t sel_in_progress; int sel_start_x, sel_start_y; }; #define MESGWIN(p) ((mesgwin_struct *)(p)) extern void MesgWinAppend( mesgwin_struct *mw, const char *msg, pixel_t pix ); extern int MesgWinInit(mesgwin_struct *mw, int argc, char **argv); extern void MesgWinResize(mesgwin_struct *mw); extern void MesgWinQueueResize(mesgwin_struct *mw); extern void MesgWinDraw(mesgwin_struct *mw); extern void MesgWinQueueDraw(mesgwin_struct *mw); extern int MesgWinManage(mesgwin_struct *mw, event_t *event); extern void MesgWinMap(mesgwin_struct *mw); extern void MesgWinUnmap(mesgwin_struct *mw); extern void MesgWinDestroy(mesgwin_struct *mw); #endif /* MESGWIN_H */