![]() |
libxputty 0.1
|
Go to the source code of this file.
Functions | |
void | create_cairo_context_and_buffer (Widget_t *w) |
const char * | widget_type_name (Widget_t *w) |
widget_type_name - textual representation of (Widget_t*)->widget_type | |
int | key_mapping (Display *dpy, XKeyEvent *xkey) |
_key_mapping - modifier key's mapped to a integer value | |
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. | |
void | configure_event (void *w_, void *user_data) |
void | resize_childs (Widget_t *w) |
resize_childs - intern check if child widgets needs resizing | |
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() | |
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 | |
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 | |
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. | |
void | connect_func (void(**event)(), void(*handler)()) |
connect_func - connect a event with a handler without type check. For supported events see: Func_t | |
void | widget_set_title (Widget_t *w, const char *title) |
widget_set_title - set window title for a Widget_t | |
void | widget_show (Widget_t *w) |
widget_show - map/show widget | |
void | widget_hide (Widget_t *w) |
widget_hide - unmap/hide a Widget_t | |
void | widget_hide_all (Widget_t *w) |
widget_hide_all - unmap/hide all Widget_t from app | |
void | widget_show_all (Widget_t *w) |
widget_show_all - map/show Widget_t with all childs | |
void | pop_widget_show_all (Widget_t *w) |
pop_widget_show_all - map/show popup widget with all it's childs | |
void | submenu_widget_show_all (Widget_t *w) |
submenu_widget_show_all - map/show submenu Widget_t with all childs | |
void | show_tooltip (Widget_t *wid) |
show_tooltip - check if a Widget_t have a tooltip, and show it, if a tooltip is available. | |
void | hide_tooltip (Widget_t *wid) |
hide_tooltip - check if a Widget_t have a tooltip, and hide it, if a tooltip is mapped. | |
Widget_t * | get_toplevel_widget (Xputty *main) |
*get_toplevel_widget - get pointer to the top level Widget_t | |
void | expose_widget (Widget_t *w) |
expose_widgets - send a expose event (EXPOSE) to a Widget_t | |
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 | |
void | widget_draw (void *w_, void *user_data) |
widget_draw - redraw only the widget,not the child widgets | |
void | widget_event_loop (void *w_, void *event, Xputty *main, void *user_data) |
widget_event_loop - the internal widget event loop | |
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 | |
void | send_button_press_event (Widget_t *w) |
send_button_press_event - send ButtonPress event to Widget_t simulate a BUTTON_PRESS Event | |
void | send_button_release_event (Widget_t *w) |
send_button_release_event - send ButtonRelease event to Widget_t simulate a BUTTON_RELEASE Event | |
void | send_systray_message (Widget_t *w) |
send_systray_message - request a systray icon for Widget_t currently not working | |
void | quit (Widget_t *w) |
quit - exit the main loop | |
void | quit_widget (Widget_t *w) |
quit_widget - remove a widget from the processing loop | |
void configure_event | ( | void * | w_, |
void * | user_data | ||
) |
Definition at line 128 of file xwidget.c.
References _resize_childs(), _resize_surface(), Resize_t::ascale, Func_t::configure_notify_callback, Resize_t::cscale_x, Resize_t::cscale_y, Widget_t::func, Metrics_t::height, Widget_t::height, Resize_t::init_height, Resize_t::init_width, os_get_window_metrics(), Resize_t::rcscale_x, Resize_t::rcscale_y, Widget_t::scale, Resize_t::scale_x, Resize_t::scale_y, Metrics_t::width, and Widget_t::width.
Referenced by create_widget(), and create_window().
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 352 of file xwidget.c.
void create_cairo_context_and_buffer | ( | Widget_t * | w | ) |
Definition at line 249 of file xwidget.c.
References Widget_t::buffer, Widget_t::cr, Widget_t::crb, Resize_t::init_height, Resize_t::init_width, Widget_t::scale, and Widget_t::surface.
Referenced by create_widget(), and create_window().
*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 |
*win | - pointer to the Parrent Widget_t |
x,y,width,height | - the position/geometry to create the widget |
Definition at line 265 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, Func_t::button_press_callback, Func_t::button_release_callback, CENTER, Xputty::childlist, Widget_t::childlist, childlist_add_child(), childlist_init(), Xputty::color_scheme, Widget_t::color_scheme, Func_t::configure_callback, configure_event(), Func_t::configure_notify_callback, create_cairo_context_and_buffer(), Resize_t::cscale_x, Resize_t::cscale_y, Widget_t::data, Func_t::dialog_callback, Func_t::dnd_notify_callback, Widget_t::double_click, Func_t::double_click_callback, Func_t::enter_callback, Widget_t::event_callback, Func_t::expose_callback, Widget_t::flags, Widget_t::func, Resize_t::gravity, Widget_t::height, 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, os_adjustment_callback(), os_create_widget_window_and_surface(), os_transparent_draw(), os_widget_event_loop(), Widget_t::parent, Widget_t::parent_struct, Widget_t::private_struct, Resize_t::rcscale_x, Resize_t::rcscale_y, Widget_t::scale, Resize_t::scale_x, Resize_t::scale_y, Widget_t::state, Func_t::unmap_notify_callback, USE_TRANSPARENCY, Func_t::user_callback, Func_t::value_changed_callback, Func_t::visibiliy_change_callback, Widget_t::width, Widget_t::x, Widget_t::xpaste_callback, and Widget_t::y.
Referenced by add_button(), add_check_box(), add_check_button(), add_combobox(), add_frame(), add_hmeter(), add_hslider(), add_image(), add_image_button(), add_image_knob(), add_image_toggle_button(), add_knob(), add_label(), add_listbox(), add_listview(), add_menu(), add_menubar(), add_midi_keyboard(), add_multi_listview(), add_on_off_button(), add_playhead(), add_popup_spinbox(), add_switch_image_button(), add_tabbox(), add_toggle_button(), add_tuner(), add_valuedisplay(), add_vmeter(), add_vslider(), add_waveview(), cmenu_add_submenu(), create_combobox_viewport(), create_hyperlink(), create_listbox_viewport(), create_listview_viewport(), create_multi_listview_viewport(), create_viewport(), listbox_add_entry(), menu_add_item(), menu_add_numeric_items(), menu_add_submenu(), menu_add_value_entry(), save_file_dialog(), and tabbox_add_tab().
*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 163 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, Func_t::button_press_callback, Func_t::button_release_callback, CENTER, Xputty::childlist, Widget_t::childlist, childlist_add_child(), childlist_init(), Xputty::color_scheme, Widget_t::color_scheme, Func_t::configure_callback, configure_event(), Func_t::configure_notify_callback, create_cairo_context_and_buffer(), Resize_t::cscale_x, Resize_t::cscale_y, Widget_t::data, Func_t::dialog_callback, Func_t::dnd_notify_callback, Widget_t::double_click, Func_t::double_click_callback, Func_t::enter_callback, Widget_t::event_callback, Func_t::expose_callback, Widget_t::flags, Widget_t::func, Resize_t::gravity, Widget_t::height, 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, os_adjustment_callback(), os_create_main_window_and_surface(), Widget_t::parent, Widget_t::parent_struct, Widget_t::private_struct, Resize_t::rcscale_x, Resize_t::rcscale_y, Widget_t::scale, Resize_t::scale_x, Resize_t::scale_y, Widget_t::state, Func_t::unmap_notify_callback, Func_t::user_callback, Func_t::value_changed_callback, Func_t::visibiliy_change_callback, widget_event_loop(), Widget_t::width, Widget_t::x, Widget_t::xpaste_callback, and Widget_t::y.
Referenced by add_popup_spinbox(), create_combobox_menu(), create_menu(), create_tooltip(), mk_open_midi_keyboard(), open_directory_dialog(), open_file_dialog(), open_message_dialog(), open_midi_keyboard(), and save_file_dialog().
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 86 of file xwidget.c.
References Widget_t::adj_x, Widget_t::adj_y, Widget_t::buffer, Xputty::childlist, Widget_t::childlist, childlist_destroy(), childlist_find_child(), childlist_has_child(), childlist_remove_child(), Childlist_t::childs, Widget_t::color_scheme, Widget_t::cr, Widget_t::crb, delete_adjustment(), destroy_widget(), Widget_t::flags, Widget_t::func, HAS_MEM, Widget_t::image, IS_WIDGET, Func_t::mem_free_callback, os_destroy_window(), Widget_t::parent, quit(), REUSE_IMAGE, Xputty::run, and Widget_t::surface.
Referenced by destroy_widget(), main_quit(), menu_remove_item(), os_main_run(), os_run_embedded(), os_widget_event_loop(), tabbox_remove_tab(), and WndProc().
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 445 of file xwidget.c.
References os_expose_widget().
Referenced by _buttons_released(), _combobox_motion(), _knob_released(), _leave_combobox(), _leave_list(), _leave_multi_list(), _listbox_entry_released(), _propagate_child_expose(), _set_combobox_menu_viewport(), _set_combobox_viewpoint(), _set_listview_viewpoint(), _set_listviewport(), _set_multi_listview_viewpoint(), _set_multi_listviewport(), _slider_released(), _tab_button_released(), _toggle_button_pressed(), _toggle_button_released(), _value_item_released(), multi_listview_set_item_size(), and update_waveview().
*get_toplevel_widget - get pointer to the top level Widget_t
*main | - pointer to the main Xputty struct |
Definition at line 441 of file xwidget.c.
References Xputty::childlist, and Childlist_t::childs.
Referenced by os_quit().
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 430 of file xwidget.c.
References Widget_t::childlist, Childlist_t::childs, Childlist_t::elem, Widget_t::flags, IS_TOOLTIP, and widget_hide().
Referenced by _draw_combobox_entrys(), _draw_list(), _draw_multi_list(), _list_motion(), _multi_list_motion(), _update_list_view(), _update_view(), os_widget_event_loop(), and WndProc().
_key_mapping - modifier key's mapped to a integer value
*dpy | - pointer to the Display in use |
*xkey | - the key to map |
Definition at line 37 of file xwidget.c.
References XEvent::keycode, and XEvent::state.
Referenced by _check_keymap(), _combobox_key_pressed(), _list_key_pressed(), and _multi_list_key_pressed().
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 400 of file xwidget.c.
References Widget_t::childlist, Childlist_t::childs, Childlist_t::elem, Widget_t::flags, Widget_t::func, IS_SUBMENU, Func_t::map_notify_callback, os_widget_show(), and pop_widget_show_all().
Referenced by _popup_spinbox(), pop_combobox_menu_show(), pop_menu_show(), and pop_widget_show_all().
void quit | ( | Widget_t * | w | ) |
quit - exit the main loop
*w | - pointer to the Widget_t sending the request |
Definition at line 526 of file xwidget.c.
References os_quit().
Referenced by destroy_widget().
void quit_widget | ( | Widget_t * | w | ) |
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 151 of file xwidget.c.
References _resize_childs().
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 514 of file xwidget.c.
References os_send_button_press_event().
Referenced by _check_keymap().
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 518 of file xwidget.c.
References os_send_button_release_event().
Referenced by _check_keymap().
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 510 of file xwidget.c.
References os_send_configure_event().
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 522 of file xwidget.c.
References os_send_systray_message().
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 419 of file xwidget.c.
References Widget_t::childlist, Childlist_t::childs, Childlist_t::elem, Widget_t::flags, IS_TOOLTIP, and os_show_tooltip().
Referenced by _draw_combobox_entrys(), _draw_list(), _draw_multi_list(), _update_list_view(), _update_view(), os_widget_event_loop(), and WndProc().
void submenu_widget_show_all | ( | Widget_t * | w | ) |
submenu_widget_show_all - map/show submenu Widget_t with all childs
*w | - pointer to the Widget_t to map |
Definition at line 410 of file xwidget.c.
References Widget_t::childlist, Childlist_t::childs, Childlist_t::elem, Widget_t::func, Func_t::map_notify_callback, os_widget_show(), and submenu_widget_show_all().
Referenced by pop_submenu_show(), and submenu_widget_show_all().
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 449 of file xwidget.c.
References _propagate_child_expose(), Widget_t::buffer, Widget_t::cr, Widget_t::crb, DONT_PROPAGATE, Func_t::expose_callback, Widget_t::flags, Widget_t::func, os_get_window_metrics(), Widget_t::parent, USE_TRANSPARENCY, Metrics_t::visible, Metrics_t::x, and Metrics_t::y.
Referenced by _propagate_child_expose(), create_hyperlink(), onPaint(), os_adjustment_callback(), os_transparent_draw(), and os_widget_event_loop().
void widget_draw | ( | void * | w_, |
void * | user_data | ||
) |
widget_draw - redraw only the widget,not the child widgets
*w_ | - pointer to the Widget_t receiving the event |
*user_data | - void pointer to attached user_data |
Definition at line 479 of file xwidget.c.
References Widget_t::buffer, Widget_t::cr, Widget_t::crb, Func_t::expose_callback, Widget_t::flags, Widget_t::func, os_get_window_metrics(), Widget_t::parent, USE_TRANSPARENCY, Metrics_t::x, and Metrics_t::y.
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 506 of file xwidget.c.
References os_widget_event_loop().
Referenced by create_window().
void widget_hide | ( | Widget_t * | w | ) |
widget_hide - unmap/hide a Widget_t
*w | - pointer to the Widget_t to unmap |
Definition at line 368 of file xwidget.c.
References Widget_t::childlist, Childlist_t::childs, Childlist_t::elem, Widget_t::func, os_widget_hide(), Func_t::unmap_notify_callback, and widget_hide().
Referenced by _check_grab(), _check_menu_state(), _check_submenu(), _draw_tabbox(), _enter_submenu(), _hide_all_tooltips(), _leave_submenu(), hide_tooltip(), os_main_run(), os_run_embedded(), pop_menu_show(), widget_hide(), widget_hide_all(), and WndProc().
void widget_hide_all | ( | Widget_t * | w | ) |
widget_hide_all - unmap/hide all Widget_t from app
*w | - pointer to the Widget_t which send the unmap request |
Definition at line 377 of file xwidget.c.
References Widget_t::app, Xputty::childlist, Childlist_t::childs, Childlist_t::elem, Widget_t::func, os_widget_hide(), Func_t::unmap_notify_callback, and widget_hide().
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 155 of file xwidget.c.
References Widget_t::crb, Resize_t::cscale_x, Resize_t::cscale_y, and Widget_t::scale.
Referenced by _draw_playhead().
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 159 of file xwidget.c.
References Widget_t::crb, Resize_t::rcscale_x, Resize_t::rcscale_y, and Widget_t::scale.
Referenced by _draw_playhead().
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 359 of file xwidget.c.
References os_set_title().
Referenced by mk_open_midi_keyboard(), open_directory_dialog(), open_file_dialog(), open_message_dialog(), and save_file_dialog().
void widget_show | ( | Widget_t * | w | ) |
widget_show - map/show widget
*w | - pointer to the Widget_t to map |
Definition at line 363 of file xwidget.c.
References Widget_t::func, Func_t::map_notify_callback, and os_widget_show().
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 386 of file xwidget.c.
References Widget_t::childlist, Childlist_t::childs, Childlist_t::elem, Widget_t::flags, Widget_t::func, IS_POPUP, IS_SUBMENU, IS_TOOLTIP, Func_t::map_notify_callback, os_widget_show(), and widget_show_all().
Referenced by _draw_tabbox(), open_directory_dialog(), open_file_dialog(), open_message_dialog(), save_file_dialog(), and widget_show_all().
const char * widget_type_name | ( | Widget_t * | w | ) |
widget_type_name - textual representation of (Widget_t*)->widget_type
w | - the Widget_t* to query (NULL is allowed) |
Definition at line 27 of file xwidget.c.
References Widget_t::widget_type.