25 #include <sys/types.h>
28 #include <X11/Xutil.h>
29 #include <X11/Xatom.h>
117 typedef void (*MBTrayBackgroundCB)(
void *user_data ) ;
150 typedef void (*MBTrayAppContextCB)(
MBTrayApp *mb ) ;
317 MBTrayAppContextCB context_cb );
360 struct timeval *tv );
390 unsigned char *name);
400 unsigned char *info);
469 mb_tray_app_tray_is_vertical (
MBTrayApp *mb_tray_app );
632 int mb_tray_init(Display* dpy, Window win);
634 Window mb_tray_get_window(
void);
636 void mb_tray_init_session_info(Display *d, Window win,
char **argv,
int argc);
638 void mb_tray_handle_event(Display *dpy, Window win, XEvent *an_event);
640 void mb_tray_send_message(Display *d, Window win,
641 unsigned char* msg,
int timeout);
643 void mb_tray_map_window (Display* dpy, Window win);
646 mb_tray_bg_change_cb_set(MBTrayBackgroundCB bg_changed_cb,
void *user_data);
648 Bool mb_tray_get_bg_col(Display *dpy, XColor *xcol);
651 mb_tray_window_icon_set(Display *dpy, Window win_panel,
MBPixbufImage *img);
653 void mb_tray_unmap_window (Display* dpy, Window win);
void mb_tray_app_set_context_info(MBTrayApp *mb_tray_app, unsigned char *info)
Sets text for extra button in window message.
Bool mb_tray_app_get_session(MBTrayApp *mb_tray_app)
Get session state.
void mb_tray_app_set_context_callback(MBTrayApp *mb_tray_app, MBTrayAppContextCB context_cb)
Sets the 'context' callback.
void mb_tray_app_set_paint_callback(MBTrayApp *mb_tray_app, MBTrayAppPaintCB paint_cb)
Sets the callback function for panel app paint.
void mb_tray_app_set_resize_callback(MBTrayApp *mb_tray_app, MBTrayAppResizeCB resize_cb)
Sets the callback function to be notifed when the panel app is resized.
MBTrayApp * mb_tray_app_new(unsigned char *app_name, MBTrayAppResizeCB resize_cb, MBTrayAppPaintCB paint_cb, int *argc, char ***argv)
Constructs a new tray app instance.
void mb_tray_app_repaint(MBTrayApp *mb_tray_app)
Requests the app is repainted - the paint callback will get called.
Display * mb_tray_app_xdisplay(MBTrayApp *mb_tray_app)
Gets the tray apps X display.
struct MBPixbufImage MBPixbufImage
Type for representing an mbpixbuf image.
void mb_tray_app_set_poll_timeout(MBTrayApp *mb_tray_app, struct timeval *tv)
Set timing for any timeout callbacks.
void mb_tray_app_set_icon(MBTrayApp *mb_tray_app, MBPixbuf *pixbuf, MBPixbufImage *image)
Sets the tray app icon.
int mb_tray_app_xscreen(MBTrayApp *mb_tray_app)
Gets the tray app X screen.
void mb_tray_app_set_user_data(MBTrayApp *mb_tray_app, void *data)
Set any user data to be attached to the tray app instance.
void(* MBTrayAppThemeChangeCB)(MBTrayApp *mb_tray_app, char *theme_name)
Callback for a theme change.
void(* MBTrayAppButtonEventCB)(MBTrayApp *mb_tray_app, int x, int y, Bool is_release)
Callback for a button event.
MBTrayApp * mb_tray_app_new_with_display(unsigned char *app_name, MBTrayAppResizeCB resize_cb, MBTrayAppPaintCB paint_cb, int *argc, char ***argv, Display *display)
Constructs a new tray app instance.
void mb_tray_app_request_size(MBTrayApp *mb_tray_app, int width, int height)
Requests a new size for the application.
void mb_tray_app_set_session(MBTrayApp *mb_tray_app, Bool val)
Enable app to show session data so tray can 'remember it' for future sessions.
long mb_tray_app_get_xevent_mask(MBTrayApp *mb_tray_app)
Returns the current X Event mask used by the tray app.
int mb_tray_app_width(MBTrayApp *mb_tray_app)
Gets the tray width.
void(* MBTrayAppPaintCB)(MBTrayApp *mb, Drawable drawable)
Callback for a handling a 'paint' or expose event.
Window mb_tray_app_xwin(MBTrayApp *mb_tray_app)
Gets the tray app window.
void * mb_tray_app_get_user_data(MBTrayApp *mb_tray_app)
Gets any user data to be attached to the tray app instance.
void mb_tray_app_set_button_callback(MBTrayApp *mb_tray_app, MBTrayAppButtonEventCB button_cb)
Sets the callback function for a mouse button press/release.
void mb_tray_app_unhide(MBTrayApp *mb_tray_app)
Unhides ( redocks ) the tray app.
void mb_tray_app_main_init(MBTrayApp *mb_tray_app)
Inits the main loop.
void(* MBTrayAppPollCB)(MBTrayApp *mb_tray_app)
Callback for a Timeout event.
void mb_tray_app_set_theme_change_callback(MBTrayApp *mb_tray_app, MBTrayAppThemeChangeCB theme_cb)
Sets the callback function for a theme change.
int mb_tray_app_offset(MBTrayApp *mb_tray_app)
Gets the apps offset from the panels origin
void mb_tray_app_main(MBTrayApp *mb_tray_app)
Runs the tray app main loop until mb_tray_app_main_quit is called.
void(* MBTrayAppXEventCB)(MBTrayApp *mb_tray_app, XEvent *event)
Callback for an X event.
void mb_tray_app_set_timeout_callback(MBTrayApp *mb_tray_app, MBTrayAppPollCB poll_cb, struct timeval *tv)
Sets the callback function for a theme change.
MBPixbufImage * mb_tray_app_get_background(MBTrayApp *mb_tray_app, MBPixbuf *pixbuf)
Gets the panel background for the area covered by the tray app.
struct MBPixbuf MBPixbuf
Opaque structure used for all operations.
void mb_tray_app_set_name(MBTrayApp *mb_tray_app, unsigned char *name)
Sets the tray app name.
void mb_tray_app_hide(MBTrayApp *mb_tray_app)
Hides ( undocks ) the tray app.
Window mb_tray_app_xrootwin(MBTrayApp *mb_tray_app)
Gets the tray app root window.
void mb_tray_app_request_offset(MBTrayApp *mb_tray_app, int offset)
Requests the app positional offset in terms of the panels orientation from the origin of the tray.
void mb_tray_app_set_xevent_mask(MBTrayApp *mb_tray_app, long mask)
Safely sets the X Event mask used to select what events the xevent callback recieves.
void(* MBTrayAppResizeCB)(MBTrayApp *mb, int width, int height)
Callback for a resize.
void mb_tray_handle_xevent(MBTrayApp *mb_tray_app, XEvent *xevent)
Runs a single iteration of the mainloop.
int mb_tray_app_height(MBTrayApp *mb_tray_app)
Gets the tray height.
char * mb_tray_app_get_theme_name(MBTrayApp *mb_tray_app)
Returns the current theme.
void mb_tray_app_tray_send_message(MBTrayApp *mb_tray_app, unsigned char *msg, int timeout)
Sends a messsage to the tray, used to visually inform or notify the user.
void mb_tray_app_set_xevent_callback(MBTrayApp *mb_tray_app, MBTrayAppXEventCB xevent_cb)
Sets the callback function for any extra x event processing.
struct MBTrayApp MBTrayApp
Opaque structure used for representing a tray app.
Bool mb_tray_app_get_absolute_coords(MBTrayApp *mb_tray_app, int *x, int *y)
Gets the tray app co-ordinates relative to the root window.
void mb_tray_app_main_quit(MBTrayApp *mb_tray_app)
Stops mb_tray_app_main.