Go to the source code of this file.
Functions | |
int | key_mapping (Display *dpy, XKeyEvent *xkey) |
_key_mapping - modifier key's mapped to a integer value More... | |
void | destroy_widget (Widget_t *w, Xputty *main) |
destroy_widget - destroy a widget When a Widget_t receive a destroy_widget() call, it will propagate that to all childs in it's Childlist_t. So all childs get destroyed before the Widget_t itself close. More... | |
void | configure_event (void *w_, void *user_data) |
void | widget_reset_scale (Widget_t *w) |
widget_reset_scale - used to reset scaling mode after a image surface is drawn to the Widget_t surface with widget_set_scale() More... | |
void | widget_set_scale (Widget_t *w) |
widget_set_scale - set scaling mode to scale a image surface to the size of the Widget_t surface More... | |
Widget_t * | create_window (Xputty *app, Window win, int x, int y, int width, int height) |
*create_window - create a Window You need to create as least minimun one Window to get started. The first created Window is the top_level_widget() A Window could be created on the DefaultRootWindow() or embeded into a other XWindow More... | |
Widget_t * | create_widget (Xputty *app, Widget_t *parent, int x, int y, int width, int height) |
*create_widget - create a widget A Widget_t could only be created as child of a other Widget_t To create a Widget_t you need to create a Widget_t with create_window() before. More... | |
void | connect_func (void(**event)(), void(*handler)()) |
connect_func - connect a event with a handler without type check. For supported events see: Func_t More... | |
void | widget_set_title (Widget_t *w, const char *title) |
widget_set_title - set window title for a Widget_t More... | |
void | widget_show (Widget_t *w) |
widget_show - map/show widget More... | |
void | widget_hide (Widget_t *w) |
widget_hide - unmap/hide a Widget_t More... | |
void | widget_show_all (Widget_t *w) |
widget_show_all - map/show Widget_t with all childs More... | |
void | pop_widget_show_all (Widget_t *w) |
pop_widget_show_all - map/show popup widget with all it's childs More... | |
void | show_tooltip (Widget_t *wid) |
show_tooltip - check if a Widget_t have a tooltip, and show it, if a tooltip is available. More... | |
void | hide_tooltip (Widget_t *wid) |
hide_tooltip - check if a Widget_t have a tooltip, and hide it, if a tooltip is mapped. More... | |
Widget_t * | get_toplevel_widget (Xputty *main) |
*get_toplevel_widget - get pointer to the top level Widget_t More... | |
void | expose_widget (Widget_t *w) |
expose_widgets - send a expose event (EXPOSE) to a Widget_t More... | |
void | transparent_draw (void *w_, void *user_data) |
transparent_draw - copy parent surface to child surface you usaualy didn't need to call this, it's used automaticaly when a Widget_t have set the flag USE_TRANSPARENCY this is the default setting for Widget_t More... | |
void | widget_event_loop (void *w_, void *event, Xputty *main, void *user_data) |
widget_event_loop - the internal widget event loop More... | |
void | send_configure_event (Widget_t *w, int x, int y, int width, int height) |
send_configure_event - send a ConfigureNotify to Widget_t used to resize a Widget_t More... | |
void | send_button_press_event (Widget_t *w) |
send_button_press_event - send ButtonPress event to Widget_t simulate a BUTTON_PRESS Event More... | |
void | send_button_release_event (Widget_t *w) |
send_button_release_event - send ButtonRelease event to Widget_t simulate a BUTTON_RELEASE Event More... | |
void | send_systray_message (Widget_t *w) |
send_systray_message - request a systray icon for Widget_t currently not working More... | |
void | quit (Widget_t *w) |
quit - exit the main loop More... | |
void | quit_widget (Widget_t *w) |
quit_widget - remove a widget from the processing loop More... | |
void configure_event | ( | void * | w_, |
void * | user_data | ||
) |
Definition at line 114 of file xwidget.c.
References _resize_childs(), _resize_surface(), Widget_t::app, Resize_t::ascale, Func_t::configure_notify_callback, Resize_t::cscale_x, Resize_t::cscale_y, debug_print, Xputty::dpy, Widget_t::func, Widget_t::height, Resize_t::init_height, Resize_t::init_width, Resize_t::rcscale_x, Resize_t::rcscale_y, Widget_t::scale, Resize_t::scale_x, Resize_t::scale_y, Widget_t::widget, and Widget_t::width.
void connect_func | ( | void(**)() | event, |
void(*)() | handler | ||
) |
connect_func - connect a event with a handler without type check. For supported events see: Func_t
**event | - the event to connect |
*handler | - the handler to handle the event |
Definition at line 380 of file xwidget.c.
References debug_print.
*create_widget - create a widget
A Widget_t could only be created as child of a other Widget_t
To create a Widget_t you need to create a Widget_t with create_window() before.
*app | - pointer to the Xputty *main struct to use |
*parent | - pointer to the Parrent Widget_t |
x,y,width,height | - the position/geometry to create the widget |
Definition at line 268 of file xwidget.c.
References _dummy1_callback(), _dummy_callback(), Widget_t::adj, Func_t::adj_callback, Widget_t::adj_x, Widget_t::adj_y, Widget_t::app, Resize_t::ascale, Widget_t::buffer, Func_t::button_press_callback, Func_t::button_release_callback, CENTER, Xputty::childlist, Widget_t::childlist, childlist_add_child(), childlist_init(), Func_t::configure_callback, configure_event(), Func_t::configure_notify_callback, Widget_t::cr, Widget_t::crb, Resize_t::cscale_x, Resize_t::cscale_y, Widget_t::data, debug_print, Func_t::dialog_callback, Xputty::dpy, Func_t::enter_callback, Widget_t::event_callback, Func_t::expose_callback, FAST_REDRAW, Widget_t::flags, Widget_t::func, Resize_t::gravity, Widget_t::height, HIDE_ON_DELETE, Widget_t::image, Resize_t::init_height, Resize_t::init_width, Resize_t::init_x, Resize_t::init_y, Widget_t::input_label, IS_WIDGET, Func_t::key_press_callback, Func_t::key_release_callback, Widget_t::label, Func_t::leave_callback, Func_t::map_notify_callback, Func_t::mem_free_callback, Func_t::motion_callback, NO_AUTOREPEAT, NO_PROPAGATE, Widget_t::parent, Widget_t::parent_struct, Resize_t::rcscale_x, Resize_t::rcscale_y, REUSE_IMAGE, Widget_t::scale, Resize_t::scale_x, Resize_t::scale_y, Widget_t::state, Widget_t::surface, transparent_draw(), Func_t::unmap_notify_callback, USE_TRANSPARENCY, Func_t::user_callback, Func_t::value_changed_callback, Widget_t::widget, widget_event_loop(), Widget_t::width, Widget_t::x, Widget_t::xic, Widget_t::xim, and Widget_t::y.
*create_window - create a Window
You need to create as least minimun one Window to get started.
The first created Window is the top_level_widget()
A Window could be created on the DefaultRootWindow() or embeded into a other XWindow
*app | - pointer to the Xputty *main struct to use |
win | - pointer to the Parrent Window (may be Root) |
x,y,width,height | - the position/geometry to create the window |
Definition at line 145 of file xwidget.c.
References _dummy1_callback(), _dummy_callback(), Widget_t::adj, Func_t::adj_callback, Widget_t::adj_x, Widget_t::adj_y, Widget_t::app, Resize_t::ascale, Widget_t::buffer, Func_t::button_press_callback, Func_t::button_release_callback, CENTER, Xputty::childlist, Widget_t::childlist, childlist_add_child(), childlist_init(), Func_t::configure_callback, configure_event(), Func_t::configure_notify_callback, Widget_t::cr, Widget_t::crb, Resize_t::cscale_x, Resize_t::cscale_y, Widget_t::data, debug_print, Func_t::dialog_callback, Xputty::dpy, Func_t::enter_callback, Widget_t::event_callback, Func_t::expose_callback, FAST_REDRAW, Widget_t::flags, Widget_t::func, Resize_t::gravity, Widget_t::height, HIDE_ON_DELETE, Widget_t::image, Resize_t::init_height, Resize_t::init_width, Resize_t::init_x, Resize_t::init_y, Widget_t::input_label, IS_WINDOW, Func_t::key_press_callback, Func_t::key_release_callback, Widget_t::label, Func_t::leave_callback, Func_t::map_notify_callback, Func_t::mem_free_callback, Func_t::motion_callback, NO_AUTOREPEAT, NO_PROPAGATE, Widget_t::parent, Widget_t::parent_struct, Resize_t::rcscale_x, Resize_t::rcscale_y, REUSE_IMAGE, Widget_t::scale, Resize_t::scale_x, Resize_t::scale_y, Widget_t::state, Widget_t::surface, transparent_draw(), Func_t::unmap_notify_callback, Func_t::user_callback, Func_t::value_changed_callback, Widget_t::widget, widget_event_loop(), Widget_t::width, Widget_t::x, Widget_t::xic, Widget_t::xim, and Widget_t::y.
destroy_widget - destroy a widget
When a Widget_t receive a destroy_widget() call, it will propagate that to all childs in it's Childlist_t. So all childs get destroyed before the Widget_t itself close.
*w | - pointer to the Widget_t sending the request |
*main | - pointer to main struct |
Definition at line 71 of file xwidget.c.
References Widget_t::adj_x, Widget_t::adj_y, Widget_t::app, Widget_t::buffer, Xputty::childlist, Widget_t::childlist, childlist_destroy(), childlist_find_child(), childlist_has_child(), childlist_remove_child(), Childlist_t::childs, Widget_t::cr, Widget_t::crb, delete_adjustment(), Xputty::dpy, Widget_t::flags, Widget_t::func, HAS_MEM, Widget_t::image, IS_WIDGET, Func_t::mem_free_callback, Widget_t::parent, quit(), REUSE_IMAGE, Xputty::run, Widget_t::surface, Widget_t::widget, Widget_t::xic, and Widget_t::xim.
void expose_widget | ( | Widget_t * | w | ) |
expose_widgets - send a expose event (EXPOSE) to a Widget_t
w | - the Widget_t to send the event to |
Definition at line 461 of file xwidget.c.
References Widget_t::app, Xputty::dpy, and Widget_t::widget.
*get_toplevel_widget - get pointer to the top level Widget_t
*main | - pointer to the main Xputty struct |
Definition at line 457 of file xwidget.c.
References Xputty::childlist, and Childlist_t::childs.
void hide_tooltip | ( | Widget_t * | wid | ) |
hide_tooltip - check if a Widget_t have a tooltip, and hide it, if a tooltip is mapped.
*wid | - pointer to the Widget_t receiving the event |
Definition at line 446 of file xwidget.c.
References Widget_t::childlist, Childlist_t::childs, Childlist_t::elem, Widget_t::flags, IS_TOOLTIP, and widget_hide().
int key_mapping | ( | Display * | dpy, |
XKeyEvent * | xkey | ||
) |
void pop_widget_show_all | ( | Widget_t * | w | ) |
pop_widget_show_all - map/show popup widget with all it's childs
*w | - pointer to the Widget_t to map |
Definition at line 418 of file xwidget.c.
References Widget_t::app, Widget_t::childlist, Childlist_t::childs, Xputty::dpy, Childlist_t::elem, Widget_t::func, Func_t::map_notify_callback, and Widget_t::widget.
void quit | ( | Widget_t * | w | ) |
quit - exit the main loop
*w | - pointer to the Widget_t sending the request |
Definition at line 701 of file xwidget.c.
References Widget_t::app, Xputty::dpy, get_toplevel_widget(), and Widget_t::widget.
void quit_widget | ( | Widget_t * | w | ) |
quit_widget - remove a widget from the processing loop
*w | - pointer to the Widget_t sending the request |
Definition at line 713 of file xwidget.c.
References Widget_t::app, Xputty::dpy, and Widget_t::widget.
void send_button_press_event | ( | Widget_t * | w | ) |
send_button_press_event - send ButtonPress event to Widget_t
simulate a BUTTON_PRESS Event
*w | - pointer to the Widget_t to send the notify |
Definition at line 630 of file xwidget.c.
References Widget_t::app, Xputty::dpy, and Widget_t::widget.
void send_button_release_event | ( | Widget_t * | w | ) |
send_button_release_event - send ButtonRelease event to Widget_t
simulate a BUTTON_RELEASE Event
*w | - pointer to the Widget_t to send the notify |
Definition at line 649 of file xwidget.c.
References Widget_t::app, Xputty::dpy, and Widget_t::widget.
void send_configure_event | ( | Widget_t * | w, |
int | x, | ||
int | y, | ||
int | width, | ||
int | height | ||
) |
send_configure_event - send a ConfigureNotify to Widget_t
used to resize a Widget_t
*w | - pointer to the Widget_t to send the notify |
x,y | - the new Widget_t position |
width,height | - the new Widget_t size |
Definition at line 612 of file xwidget.c.
References Widget_t::app, Xputty::dpy, and Widget_t::widget.
void send_systray_message | ( | Widget_t * | w | ) |
send_systray_message - request a systray icon for Widget_t
currently not working
*w | - pointer to the Widget_t to send the notify |
Definition at line 668 of file xwidget.c.
References Widget_t::app, Xputty::dpy, SYSTEM_TRAY_REQUEST_DOCK, and Widget_t::widget.
void show_tooltip | ( | Widget_t * | wid | ) |
show_tooltip - check if a Widget_t have a tooltip, and show it, if a tooltip is available.
*wid | - pointer to the Widget_t receiving the event |
Definition at line 427 of file xwidget.c.
References Widget_t::app, Widget_t::childlist, Childlist_t::childs, Xputty::dpy, Childlist_t::elem, Widget_t::flags, IS_TOOLTIP, Widget_t::widget, and widget_show().
void transparent_draw | ( | void * | wid, |
void * | user_data | ||
) |
transparent_draw - copy parent surface to child surface
you usaualy didn't need to call this, it's used automaticaly when a Widget_t have set the flag USE_TRANSPARENCY
this is the default setting for Widget_t
*wid | - pointer to the Widget_t receiving the event |
*user_data | - void pointer to attached user_data |
Definition at line 469 of file xwidget.c.
References _propagate_child_expose(), Widget_t::app, Widget_t::buffer, Widget_t::cr, Widget_t::crb, debug_print, Xputty::dpy, Func_t::expose_callback, Widget_t::flags, Widget_t::func, Widget_t::parent, USE_TRANSPARENCY, and Widget_t::widget.
void widget_event_loop | ( | void * | w_, |
void * | event, | ||
Xputty * | main, | ||
void * | user_data | ||
) |
widget_event_loop - the internal widget event loop
*w | - void pointer to the Widget_t receiving the event |
*event | - void pointer to the XEvent |
*main | - void pointer to the Xputty *main struct running the event loop |
*user_data | - void pointer to attached user_data |
Definition at line 497 of file xwidget.c.
References _button_press(), _check_enum(), _check_grab(), _check_keymap(), _has_pointer(), _hide_all_tooltips(), adj_set_motion_state(), Widget_t::app, Func_t::button_release_callback, Widget_t::childlist, childlist_has_child(), Childlist_t::childs, Func_t::configure_callback, debug_print, destroy_widget(), Xputty::dpy, Func_t::enter_callback, Widget_t::flags, Widget_t::func, HAS_FOCUS, HAS_POINTER, HAS_TOOLTIP, hide_tooltip(), Func_t::key_press_callback, Func_t::key_release_callback, Func_t::leave_callback, Func_t::motion_callback, NO_AUTOREPEAT, quit_widget(), show_tooltip(), Widget_t::state, transparent_draw(), and Widget_t::x.
void widget_hide | ( | Widget_t * | w | ) |
widget_hide - unmap/hide a Widget_t
*w | - pointer to the Widget_t to unmap |
Definition at line 396 of file xwidget.c.
References Widget_t::app, Widget_t::childlist, Childlist_t::childs, Xputty::dpy, Childlist_t::elem, Widget_t::func, Func_t::unmap_notify_callback, and Widget_t::widget.
void widget_reset_scale | ( | Widget_t * | w | ) |
widget_reset_scale - used to reset scaling mode after a image surface is drawn to the Widget_t surface with widget_set_scale()
*w | - pointer to the Widget_t sending the request |
Definition at line 137 of file xwidget.c.
References Widget_t::crb, Resize_t::cscale_x, Resize_t::cscale_y, and Widget_t::scale.
void widget_set_scale | ( | Widget_t * | w | ) |
widget_set_scale - set scaling mode to scale a image surface to the size of the Widget_t surface
*w | - pointer to the Widget_t sending the request |
Definition at line 141 of file xwidget.c.
References Widget_t::crb, Resize_t::rcscale_x, Resize_t::rcscale_y, and Widget_t::scale.
void widget_set_title | ( | Widget_t * | w, |
const char * | title | ||
) |
widget_set_title - set window title for a Widget_t
*w | - pointer to the Widget_t to set the title |
*title | - the title to store |
Definition at line 387 of file xwidget.c.
References Widget_t::app, Xputty::dpy, and Widget_t::widget.
void widget_show | ( | Widget_t * | w | ) |
widget_show - map/show widget
*w | - pointer to the Widget_t to map |
Definition at line 391 of file xwidget.c.
References Widget_t::app, Xputty::dpy, Widget_t::func, Func_t::map_notify_callback, and Widget_t::widget.
void widget_show_all | ( | Widget_t * | w | ) |
widget_show_all - map/show Widget_t with all childs
*w | - pointer to the Widget_t to map |
Definition at line 405 of file xwidget.c.
References Widget_t::app, Widget_t::childlist, Childlist_t::childs, Xputty::dpy, Childlist_t::elem, Widget_t::flags, Widget_t::func, IS_POPUP, IS_TOOLTIP, Func_t::map_notify_callback, and Widget_t::widget.