![]() |
libxputty 0.1
|
This file contains definitions and structs used on all platforms. Platform specific definitions are located in xwidget-platform.h Xlib compatibility definitions for MSWindows are located in xputty-mswin.h. More...
Go to the source code of this file.
Data Structures | |
struct | Func_t |
Func_t - struct to hold all supported event callbacks. More... | |
struct | Resize_t |
Resize_t - struct used to resize child widgets. More... | |
struct | Widget_t |
Widget_t - struct to hold the basic Widget_t info. More... | |
Typedefs | |
typedef void(* | vfunc) (void *widget, void *event, Xputty *main, void *user_data) |
*vfunc - function pointer to connect Xevents from the main loop to Widget_t | |
typedef void(* | evfunc) (void *widget, void *event, void *user_data) |
*evfunc - function pointer to connect Xevents from a Widget_t to a event handler | |
typedef void(* | xevfunc) (void *widget, void *user_data) |
*xevfunc - function pointer to connect XEvents from a Widget_t to a event handler | |
Functions | |
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 *win, 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 | 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 | 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 | 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 | 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 | 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 | |
void | widget_draw (void *w_, void *user_data) |
widget_draw - redraw only the widget,not the child widgets | |
void | resize_childs (Widget_t *wid) |
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 | |
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 | 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 | expose_widget (Widget_t *w) |
expose_widgets - send a expose event (EXPOSE) to a Widget_t | |
int | key_mapping (Display *dpy, XKeyEvent *xkey) |
_key_mapping - modifier key's mapped to a integer value | |
const char * | widget_type_name (Widget_t *w) |
widget_type_name - textual representation of (Widget_t*)->widget_type | |
void | strdecode (char *target, const char *needle, const char *replacement) |
strdecode - replace string in char* | |
void | widget_set_dnd_aware (Widget_t *w) |
widget_set_dnd_aware - allow drag and drop for on Widget_t | |
void | widget_set_dnd_unaware (Widget_t *w) |
widget_set_dnd_unaware - disable drag and drop for on Widget_t | |
void | handle_drag_data (Widget_t *w, XEvent *event) |
handle_drag_data - handle recived drag data | |
void | handle_dnd_enter (Xputty *main, XEvent *event) |
handle_drag_enter - handle drag event enter the Widget_t | |
void | send_dnd_finished_event (Widget_t *w, XEvent *event) |
send_dnd_finished_event - notify the drag sender that the event is handled | |
void | send_dnd_status_event (Widget_t *w, XEvent *event) |
send_dnd_status_event - notify the drag sender that prepared to recive the event | |
void | copy_to_clipboard (Widget_t *w, char *text, int size) |
copy_to_clipboard - send textbuffer to clipboard | |
void | send_to_clipboard (Widget_t *w, XEvent *event) |
send_to_clipboard - send textbuffer to clipboard on request | |
int | have_paste (Widget_t *w) |
have_paste - check if clipboard contain a textbuffer | |
void | request_paste_from_clipboard (Widget_t *w) |
request_paste_from_clipboard - request textbuffer from clipboard | |
void | receive_paste_from_clipboard (Widget_t *w, XEvent *event) |
receive_paste_from_clipboard - receive textbuffer from clipboard | |
This file contains definitions and structs used on all platforms. Platform specific definitions are located in xwidget-platform.h Xlib compatibility definitions for MSWindows are located in xputty-mswin.h.
Definition in file xwidget.h.
typedef void(* evfunc) (void *widget, void *event, void *user_data) |
typedef void(* vfunc) (void *widget, void *event, Xputty *main, void *user_data) |
typedef void(* xevfunc) (void *widget, void *user_data) |
anonymous enum |
anonymous enum - flags to set Widget_t propertys
IS_WIDGET | - Widget_t is a sub widget |
IS_WINDOW | - Widget_t has no Widget_t parent |
IS_POPUP | - Widget_t is a pop up widget |
IS_RADIO | - Widget_t is part of a radio group |
USE_TRANSPARENCY | - Widget_t need transparent draw (buffer) |
HAS_FOCUS | - Mouse pointer is above Widget_t |
HAS_POINTER | - Mouse pointer is pressed on Widget_t |
HAS_TOOLTIP | - Widget_t have tooltip |
HAS_MEM | - Widget_t have mem to be released |
Enumerator | |
---|---|
IS_WIDGET | Widget_t is a sub widget |
IS_WINDOW | |
IS_POPUP | Widget_t is a pop up widget |
IS_RADIO | Widget_t is part of a radio group |
IS_TOOLTIP | Widget_t is a tooltip widget |
USE_TRANSPARENCY | Widget_t need transparent draw (buffer) |
HAS_FOCUS | Mouse pointer is above Widget_t |
HAS_POINTER | Mouse pointer is pressed on Widget_t |
HAS_TOOLTIP | Widget_t have tooltip |
HAS_MEM | Widget_t have mem to be released |
NO_AUTOREPEAT | Widget_t didn't receive autorepeated keys |
FAST_REDRAW | Widget_t need fast redrawing |
HIDE_ON_DELETE | Hide Widget_t instead delete on "WM_DELETE_WINDOW" |
REUSE_IMAGE | |
NO_PROPAGATE | Widget_t didn't receive redraw events on propagate |
IS_SUBMENU | |
DONT_PROPAGATE | Widget_t didn't send redraw events to child widgets |
Definition at line 386 of file xwidget.h.
enum EventType |
EventType - enum to hold identifier for all supported event callbacks
Events could be connected to a handler by using this identifier.
EXPOSE | - (xevfunc) expose_callback(void * widget, void user_data) |
CONFIGURE | - (xevfunc) configure_callback(void * widget, void user_data) |
ENTER | - (xevfunc) enter_callback(void * widget, void user_data) |
LEAVE | - (xevfunc) leave_callback(void * widget, void user_data) |
ADJ_INTERN | - (xevfunc) adj_callback(void * widget, void user_data) |
VALUE_CHANGED | - (xevfunc) value_changed_callback(void * widget, void user_data) |
USER | - (xevfunc) user_callback(void * widget, void user_data) |
MEM_FREE_CB | - (xevfunc) mem_free_callback(void * widget, void user_data) |
CONFIGURE_NOTIFY | - (xevfunc) configure_notify_callback(void * widget, void user_data) |
MAP_NOTIFY | - (xevfunc) map_notify_callback(void * widget, void user_data) |
UNMAP_NOTIFY | - (xevfunc) unmap_notify_callback(void * widget, void user_data) |
DIALOG_RESPONS | - (xevfunc) dialog_callback(void * widget, void user_data) |
BUTTON_PRESS | - (evfunc) button_press_callback(void * widget, void * event, void user_data) |
BUTTON_RELEASE | - (evfunc) button_release_callback(void * widget, void * event, void user_data) |
POINTER_MOTION | - (evfunc) motion_callback(void * widget, void * event, void user_data) |
KEY_PRESS | - (evfunc) key_press_callback(void * widget, void * event, void user_data) |
KEY_RELEASE | - (evfunc) key_release_callback(void * widget, void * event, void user_data) |
Definition at line 131 of file xwidget.h.
enum Gravity |
Gravity - enum to indicate how to resize a widget.
NORTHWEST | - Widget_t adjust nord/west |
NORTHEAST | - Widget_t adjust nord/east |
SOUTHWEST | - Widget_t adjust south/west |
SOUTHEAST | - Widget_t adjust south/east |
CENTER | - Widget_t adjust centered |
ASPECT | - Widget_t adjust in a aspect frame |
NONE | - Widget_t request no adjustment in frame |
Enumerator | |
---|---|
NORTHWEST | Widget_t adjust nord/west |
NORTHEAST | Widget_t adjust nord/east |
SOUTHWEST | Widget_t adjust south/west |
SOUTHEAST | Widget_t adjust south/east |
SOUTHCENTER | Widget_t adjust south/east |
EASTWEST | Widget_t adjust east/west |
EASTNORTH | Widget_t adjust east/north |
EASTSOUTH | Widget_t adjust east/south |
WESTNORTH | Widget_t adjust west/north |
WESTSOUTH | Widget_t adjust west/south |
CENTER | Widget_t adjust centered |
ASPECT | Widget_t adjust in a aspect frame |
FIXEDSIZE | Widget_t has fixed size |
MENUITEM | Widget_t adjust in a aspect frame |
NONE | Widget_t request no adjustment in frame |
enum WidgetType |
WidgetType - enum describing the kind of the widget (button, menu, ...)
The widget_type member can be used to identify the source widget e.g. in the messageloop.
WT_NONE | - (unitialized or error) |
WT_WINDOW | - create_window() |
WT_WIDGET | - create_widget() |
WT_BUTTON | - add_button() |
WT_ON_OFF_BUTTON | - add_on_off_button() |
WT_TOGGLE_BUTTON | - add_toggle_button() |
WT_IMAGE_TOGGLE_BUTTON | - add_image_toggle_button() |
WT_SWITCH_IMAGE_TOGGLE_BUTTON | - add_switch_image_button() |
WT_CHECK_BUTTON | - add_check_box() |
WT_CHECK_BOX | - add_check_box() |
WT_COMBOBOX | - add_combobox() |
WT_FILE_DIALOG | - open_file_dialog() |
WT_KNOB | - add_knob() |
WT_IMAGE_KNOB | - add_image_knob() |
WT_LABEL | - add_label() |
WT_LISTBOX | - add_listbox() |
WT_LISTBOX_VIEWPORT | - create_listbox_viewport() |
WT_LISTBOX_ENTRY | - listbox_add_entry() |
WT_LISTVIEW | - add_listview() |
WT_LISTVIEW_VIEWPORT | - create_listbox_viewport() |
WT_MENU | - create_menu(), used by WT_COMBOBOX |
WT_MENU_VIEWPORT | - create_viewport() |
WT_MENU_ITEM | - menu_add_item() |
WT_MENU_CHECK_ITEM | - menu_add_check_item() |
WT_MENU_RADIO_ITEM | - menu_add_radio_item() |
WT_MESSAGE_DIALOG | - open_message_dialog() |
WT_TEXT_ENTRY | - create_entry_box(), used by WT_MESSAGE_DIALOG |
WT_VMETER | - add_vmeter() |
WT_VMETER_SCALE | - add_vmeter() |
WT_HMETER | - add_hmeter() |
WT_HMETER_SCALE | - add_hmeter() |
WT_MIDI_KEYBOARD | - open_midi_keyboard() |
WT_PLAYHEAD | - add_playhead() |
WT_VSLIDER | - add_vslider() |
WT_HSLIDER | - add_hslider() |
WT_TOOLTIP | - add_tooltip() |
WT_TUNER | - add_tuner() |
WT_VALUEDISPLAY | - add_valuedisplay() |
Definition at line 195 of file xwidget.h.
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 copy_to_clipboard | ( | Widget_t * | w, |
char * | text, | ||
int | size | ||
) |
copy_to_clipboard - send textbuffer to clipboard
w | - the Widget_t to send the event |
text | - the text buffer to send to clipboard |
size | - the size of the buffer to send |
Definition at line 586 of file xwidget-linux.c.
References Widget_t::app, Xputty::csize, Xputty::ctext, Xputty::dpy, Xputty::selection, and Widget_t::widget.
*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().
handle_drag_enter - handle drag event enter the Widget_t
main | - pointer to the Xputty *main struct running |
event | - the drag event contain the drop data |
Definition at line 481 of file xwidget-linux.c.
References Xputty::dnd_source_window, Xputty::dnd_type, Xputty::dnd_type_text, Xputty::dnd_type_uri, Xputty::dnd_type_utf8, Xputty::dnd_version, Xputty::dpy, and Xputty::XdndTypeList.
Referenced by os_widget_event_loop().
handle_drag_data - handle recived drag data
w | - the Widget_t recive the event |
event | - the drag event contain the drop data |
Definition at line 455 of file xwidget-linux.c.
References Widget_t::app, Func_t::dnd_notify_callback, Xputty::dnd_source_window, Xputty::dnd_type, Xputty::dpy, Widget_t::func, send_dnd_finished_event(), strdecode(), strremove(), Widget_t::widget, and Xputty::XdndSelection.
Referenced by os_widget_event_loop().
int have_paste | ( | Widget_t * | w | ) |
have_paste - check if clipboard contain a textbuffer
w | - the Widget_t to send the request |
Definition at line 557 of file xwidget-linux.c.
References Widget_t::app, Xputty::dpy, and Xputty::selection.
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 | ) |
receive_paste_from_clipboard - receive textbuffer from clipboard
w | - the Widget_t which requested the buffer |
event | - the event contain the request |
Definition at line 566 of file xwidget-linux.c.
References Widget_t::app, Xputty::ctext, Xputty::UTF8, and Widget_t::xpaste_callback.
Referenced by os_widget_event_loop().
void request_paste_from_clipboard | ( | Widget_t * | w | ) |
request_paste_from_clipboard - request textbuffer from clipboard
w | - the Widget_t to send the request |
Definition at line 561 of file xwidget-linux.c.
References Widget_t::app, Xputty::dpy, Xputty::selection, Xputty::UTF8, and Widget_t::widget.
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().
send_dnd_finished_event - notify the drag sender that the event is handled
w | - the Widget_t handled the event |
event | - the drag event contain the drop data |
Definition at line 540 of file xwidget-linux.c.
References Widget_t::app, Xputty::dnd_source_window, Xputty::dnd_version, Xputty::dpy, XEvent::window, Xputty::XdndActionCopy, and Xputty::XdndFinished.
Referenced by handle_drag_data(), and os_widget_event_loop().
send_dnd_status_event - notify the drag sender that prepared to recive the event
w | - the Widget_t to recive the event |
event | - the drag event contain the drop data |
Definition at line 524 of file xwidget-linux.c.
References Widget_t::app, Xputty::dnd_source_window, Xputty::dnd_type, Xputty::dpy, XEvent::window, Xputty::XdndActionCopy, and Xputty::XdndStatus.
Referenced by os_widget_event_loop().
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().
send_to_clipboard - send textbuffer to clipboard on request
w | - the Widget_t to send the event |
event | - the event contain the request |
Definition at line 595 of file xwidget-linux.c.
References Widget_t::app, Xputty::csize, Xputty::ctext, Xputty::dpy, Xputty::targets_atom, Xputty::text_atom, and Xputty::UTF8.
Referenced by os_widget_event_loop().
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 strdecode | ( | char * | target, |
const char * | needle, | ||
const char * | replacement | ||
) |
strdecode - replace string in char*
*target | - the string to modify |
*needle | - the string to replace |
*replacement | - the replacement for the needle |
Definition at line 432 of file xwidget-linux.c.
Referenced by handle_drag_data().
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_dnd_aware | ( | Widget_t * | w | ) |
widget_set_dnd_aware - allow drag and drop for on Widget_t
w | - the Widget_t to send the event to |
Definition at line 409 of file xwidget-linux.c.
References Widget_t::app, Xputty::dpy, Widget_t::widget, and Xputty::XdndAware.
void widget_set_dnd_unaware | ( | Widget_t * | w | ) |
widget_set_dnd_unaware - disable drag and drop for on Widget_t
w | - the Widget_t to send the event to |
Definition at line 415 of file xwidget-linux.c.
References Widget_t::app, Xputty::dpy, Widget_t::widget, and Xputty::XdndAware.
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.