1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2024-10-27 05:23:18 -04:00
rofi/include/widgets/widget-internal.h

47 lines
1.5 KiB
C
Raw Normal View History

#ifndef WIDGET_INTERNAL_H
#define WIDGET_INTERNAL_H
2016-10-14 12:56:09 -04:00
/**
* Data structure holding the internal state of the Widget
*/
struct _widget
{
/** X position relative to parent */
short x;
/** Y position relative to parent */
short y;
/** Width of the widget */
short w;
/** Height of the widget */
short h;
/** enabled or not */
gboolean enabled;
2016-10-14 12:56:09 -04:00
/** Expand the widget when packed */
gboolean expand;
2016-10-14 12:56:09 -04:00
/** Place widget at end of parent */
gboolean end;
2016-10-14 12:56:09 -04:00
/** Parent widget */
struct _widget *parent;
/** Internal */
gboolean need_redraw;
2016-10-14 12:56:09 -04:00
/** get width of widget implementation function */
int ( *get_width )( struct _widget * );
2016-10-14 12:56:09 -04:00
/** get height of widget implementation function */
int ( *get_height )( struct _widget * );
2016-10-14 12:56:09 -04:00
/** draw widget implementation function */
void ( *draw )( struct _widget *widget, cairo_t *draw );
2016-10-14 12:56:09 -04:00
/** resize widget implementation function */
void ( *resize )( struct _widget *, short, short );
2016-10-14 12:56:09 -04:00
/** update widget implementation function */
void ( *update )( struct _widget * );
2016-10-14 12:56:09 -04:00
/** widget clicked callback */
widget_clicked_cb clicked;
2016-10-14 12:56:09 -04:00
/** user data for ::clicked callback */
void *clicked_cb_data;
2016-10-14 12:56:09 -04:00
/** Free widget callback */
void ( *free )( struct _widget *widget );
};
#endif // WIDGET_INTERNAL_H