![]() |
libxputty 0.1
|
This file contains private function definitions used on all platforms. More...
Go to the source code of this file.
Functions | |
void | _scroll_event (Widget_t *wid, int direction) |
_scroll_event - internal check which Adjustment_t change it's value on a motion event (POINTER_MOTION) | |
void | _toggle_event (Widget_t *wid) |
_toggle_event - internal check which Adjustment_t change it's value on a Button press event (BUTTON_PRESS) | |
void | _check_enum (Widget_t *wid, XButtonEvent *xbutton) |
_check_enum - internal check if Adjustment_t is of type CL_ENUM and handle events acordingly | |
void | _button_press (Widget_t *wid, XButtonEvent *xbutton, void *user_data) |
_button_press - internal check which button is pressed (BUTTON_PRESS) | |
void | _check_grab (Widget_t *wid, XButtonEvent *xbutton, Xputty *main) |
_check_grab - internal check if a Widgt_t holds a grab when a BUTTON_PRESS event occur. If so, check if the button is pressed inside the grab Widget_t. If yes, handle the event. In any case destroy the grab | |
void | _check_submenu (Widget_t *wid, XButtonEvent *xbutton, Xputty *main) |
_check_submenu - internal check if a Widgt_t is a submenu when a BUTTON_PRESS event occur. If so, check if the button is pressed inside the submenu Widget_t. If yes, handle the event. In any case destroy the submenu | |
void | _propagate_child_expose (Widget_t *wid) |
_propagate_child_expose - send expose to any child Widget_t | |
void | _check_keymap (void *w_, XKeyEvent xkey) |
_check_keymap - check if key is in map, send requests if so | |
void | _hide_all_tooltips (Widget_t *wid) |
_hide_all_tooltips - hide all active tooltips | |
void | _has_pointer (Widget_t *w, XButtonEvent *button) |
_has_pointer - check if the widget has the pointer | |
void | _set_adj_value (void *w_, bool x, int direction) |
_set_adj_value - set value to adjustment from key event | |
void | _dummy1_callback (void *w_, void *_data, void *user_data) |
_dummy1_callback - default debuging callback for evfunc's | |
void | _dummy_callback (void *w_, void *user_data) |
_dummy1_callback - default debuging callback for xevfunc's | |
void | _resize_surface (Widget_t *wid, int width, int height) |
_resize_surface - intern check if a Widget_t surfaces needs resizing | |
void | _resize_childs (Widget_t *wid) |
_resize_childs - intern check if child widgets needs resizing | |
This file contains private function definitions used on all platforms.
Definition in file xwidget_private.h.
void _button_press | ( | Widget_t * | wid, |
XButtonEvent * | xbutton, | ||
void * | user_data | ||
) |
_button_press - internal check which button is pressed (BUTTON_PRESS)
*wid | - pointer to the Widget_t receiving a event |
*xbutton | - pointer to the XButtonEvent |
*user_data | - void pointer to attached user_data |
Definition at line 85 of file xwidget_private.c.
References _has_pointer(), _scroll_event(), _toggle_event(), Widget_t::app, XEvent::button, Func_t::button_press_callback, Widget_t::childlist, childlist_has_child(), Childlist_t::childs, Widget_t::func, Xputty::hold_grab, Xputty::is_grab, Xputty::key_snooper, Widget_t::pos_x, Widget_t::pos_y, Widget_t::state, Widget_t::widget, XEvent::window, XEvent::x, and XEvent::y.
Referenced by os_widget_event_loop(), and WndProc().
void _check_enum | ( | Widget_t * | wid, |
XButtonEvent * | xbutton | ||
) |
_check_enum - internal check if Adjustment_t is of type CL_ENUM and handle events acordingly
*wid | - pointer to the Widget_t receiving a event |
*xbutton | - pointer to the XButtonEvent |
Definition at line 68 of file xwidget_private.c.
References Widget_t::adj_x, Widget_t::adj_y, XEvent::button, check_value_changed(), CL_ENUM, Widget_t::flags, HAS_POINTER, Adjustment_t::max_value, Adjustment_t::min_value, Adjustment_t::type, and Adjustment_t::value.
Referenced by os_widget_event_loop(), and WndProc().
void _check_grab | ( | Widget_t * | wid, |
XButtonEvent * | xbutton, | ||
Xputty * | main | ||
) |
_check_grab - internal check if a Widgt_t holds a grab when a BUTTON_PRESS event occur. If so, check if the button is pressed inside the grab Widget_t. If yes, handle the event. In any case destroy the grab
*wid | - pointer to the Widget_t receiving a event |
*xbutton | - pointer to the XButtonEvent |
*main | - pointer to main struct |
Definition at line 127 of file xwidget_private.c.
References XEvent::button, Func_t::button_release_callback, Widget_t::childlist, childlist_has_child(), Childlist_t::childs, Xputty::dpy, Childlist_t::elem, Widget_t::flags, Widget_t::func, Xputty::hold_grab, Xputty::is_grab, IS_POPUP, Widget_t::label, Widget_t::widget, widget_hide(), and XEvent::window.
Referenced by os_widget_event_loop(), and WndProc().
void _check_keymap | ( | void * | w_, |
XKeyEvent | xkey | ||
) |
_check_keymap - check if key is in map, send requests if so
*w_ | - pointer to the Widget_t receiving the event |
xkey | - the XKeyEvent to check |
Definition at line 216 of file xwidget_private.c.
References _set_adj_value(), Widget_t::app, Widget_t::childlist, Childlist_t::childs, Xputty::dpy, Childlist_t::elem, Widget_t::flags, HAS_FOCUS, Xputty::hold_grab, key_mapping(), send_button_press_event(), send_button_release_event(), and Widget_t::state.
Referenced by os_widget_event_loop(), and WndProc().
void _check_submenu | ( | Widget_t * | wid, |
XButtonEvent * | xbutton, | ||
Xputty * | main | ||
) |
_check_submenu - internal check if a Widgt_t is a submenu when a BUTTON_PRESS event occur. If so, check if the button is pressed inside the submenu Widget_t. If yes, handle the event. In any case destroy the submenu
*wid | - pointer to the Widget_t receiving a event |
*xbutton | - pointer to the XButtonEvent |
*main | - pointer to main struct |
Definition at line 170 of file xwidget_private.c.
References _scroll_event(), XEvent::button, Func_t::button_release_callback, Widget_t::childlist, Childlist_t::childs, Childlist_t::elem, Widget_t::func, Widget_t::label, Xputty::submenu, Widget_t::widget, widget_hide(), and XEvent::window.
Referenced by os_widget_event_loop(), and WndProc().
void _dummy1_callback | ( | void * | w_, |
void * | _data, | ||
void * | user_data | ||
) |
_dummy1_callback - default debuging callback for evfunc's
*w_ | - pointer to the Widget_t receive the event |
_data | - void pointer to attached data |
user_data | - void pointer to attached user_data |
Definition at line 309 of file xwidget_private.c.
Referenced by create_widget(), and create_window().
void _dummy_callback | ( | void * | w_, |
void * | user_data | ||
) |
_dummy1_callback - default debuging callback for xevfunc's
*w_ | - pointer to the Widget_t receive the event |
user_data | - void pointer to attached user_data |
Definition at line 313 of file xwidget_private.c.
Referenced by create_widget(), and create_window().
void _has_pointer | ( | Widget_t * | w, |
XButtonEvent * | button | ||
) |
_has_pointer - check if the widget has the pointer
*w | - pointer to the Widget_t sending the request |
*button | - pointer to the XButtonEvent sending the notify |
Definition at line 272 of file xwidget_private.c.
References Widget_t::flags, HAS_POINTER, Metrics_t::height, os_get_window_metrics(), Metrics_t::width, XEvent::x, and XEvent::y.
Referenced by _button_press(), os_widget_event_loop(), and WndProc().
void _hide_all_tooltips | ( | Widget_t * | wid | ) |
_hide_all_tooltips - hide all active tooltips
*wid | - pointer to the Widget_t receiving the event |
Definition at line 262 of file xwidget_private.c.
References Widget_t::app, Xputty::childlist, Childlist_t::childs, Childlist_t::elem, Widget_t::flags, IS_TOOLTIP, and widget_hide().
Referenced by os_widget_event_loop(), and WndProc().
void _propagate_child_expose | ( | Widget_t * | wid | ) |
_propagate_child_expose - send expose to any child Widget_t
*wid | - pointer to the Widget_t send the event |
Definition at line 196 of file xwidget_private.c.
References Widget_t::childlist, childlist_has_child(), Childlist_t::childs, Childlist_t::elem, expose_widget(), FAST_REDRAW, Widget_t::flags, NO_PROPAGATE, transparent_draw(), and USE_TRANSPARENCY.
Referenced by transparent_draw().
void _resize_childs | ( | Widget_t * | wid | ) |
_resize_childs - intern check if child widgets needs resizing
*wid | - pointer to the Widget_t receive the event |
Definition at line 331 of file xwidget_private.c.
References Widget_t::app, Resize_t::ascale, ASPECT, CENTER, Widget_t::childlist, childlist_has_child(), Childlist_t::childs, Func_t::configure_notify_callback, Resize_t::cscale_x, Resize_t::cscale_y, Xputty::dpy, EASTNORTH, EASTSOUTH, EASTWEST, Childlist_t::elem, FIXEDSIZE, Widget_t::func, Resize_t::gravity, Widget_t::height, Resize_t::init_height, Resize_t::init_width, Resize_t::init_x, Resize_t::init_y, MENUITEM, NONE, NORTHEAST, NORTHWEST, os_move_window(), os_resize_window(), Widget_t::scale, Resize_t::scale_x, Resize_t::scale_y, SOUTHCENTER, SOUTHEAST, SOUTHWEST, WESTNORTH, WESTSOUTH, and Widget_t::width.
Referenced by configure_event(), and resize_childs().
void _resize_surface | ( | Widget_t * | wid, |
int | width, | ||
int | height | ||
) |
_resize_surface - intern check if a Widget_t surfaces needs resizing
*wid | - pointer to the Widget_t receive the event |
width | - the new width |
height | - the new height |
Definition at line 317 of file xwidget_private.c.
References Widget_t::buffer, Widget_t::crb, Widget_t::height, os_set_widget_surface_size(), Widget_t::surface, and Widget_t::width.
Referenced by configure_event().
void _scroll_event | ( | Widget_t * | wid, |
int | direction | ||
) |
_scroll_event - internal check which Adjustment_t change it's value on a motion event (POINTER_MOTION)
*wid | - pointer to the Widget_t receiving a event |
direction | - up/down scroll diretion |
Definition at line 24 of file xwidget_private.c.
References Widget_t::adj_x, Widget_t::adj_y, check_value_changed(), CL_CONTINUOS, CL_ENUM, CL_LOGARITHMIC, CL_LOGSCALE, CL_TOGGLE, CL_VIEWPORT, CL_VIEWPORTSLIDER, Adjustment_t::max_value, Adjustment_t::min_value, Adjustment_t::step, Adjustment_t::type, and Adjustment_t::value.
Referenced by _button_press(), and _check_submenu().
void _set_adj_value | ( | void * | w_, |
bool | x, | ||
int | direction | ||
) |
_set_adj_value - set value to adjustment from key event
*w_ | - pointer to the Widget_t receiving the event |
x | - use x or y-axis |
direction | - add or subtract Adjustment_t steps * direction |
Definition at line 284 of file xwidget_private.c.
References Widget_t::adj_x, Widget_t::adj_y, check_value_changed(), CL_VIEWPORT, CL_VIEWPORTSLIDER, Adjustment_t::max_value, Adjustment_t::min_value, Adjustment_t::step, Adjustment_t::type, and Adjustment_t::value.
Referenced by _check_keymap().
void _toggle_event | ( | Widget_t * | wid | ) |
_toggle_event - internal check which Adjustment_t change it's value on a Button press event (BUTTON_PRESS)
*wid | - pointer to the Widget_t receiving a event |
Definition at line 56 of file xwidget_private.c.
References adj_set_start_value(), Widget_t::adj_x, Widget_t::adj_y, CL_TOGGLE, and Adjustment_t::type.
Referenced by _button_press().