api comments
This commit is contained in:
parent
f929180b05
commit
def04a9361
1 changed files with 7 additions and 2 deletions
|
|
@ -98,7 +98,8 @@ struct PGPL_GuiWidget {
|
||||||
double max_height);
|
double max_height);
|
||||||
/* This renders the content of the widget. Note that the margin, border,
|
/* This renders the content of the widget. Note that the margin, border,
|
||||||
* padding, background and offset of the widget must be accounted for BEFORE
|
* padding, background and offset of the widget must be accounted for BEFORE
|
||||||
* calling this function. For ease, you can use the
|
* calling this function. This includes any possible centering of the widget
|
||||||
|
* that may happen beforehand as well. For ease, you can use the
|
||||||
* pgpl_gui_widget_render_full function to automatically take care of all of
|
* pgpl_gui_widget_render_full function to automatically take care of all of
|
||||||
* those things for you. */
|
* those things for you. */
|
||||||
void (*render_content)(PGPL_GuiWidget *widget, PGPL_Renderer *renderer,
|
void (*render_content)(PGPL_GuiWidget *widget, PGPL_Renderer *renderer,
|
||||||
|
|
@ -106,7 +107,11 @@ struct PGPL_GuiWidget {
|
||||||
double max_width, double max_height);
|
double max_width, double max_height);
|
||||||
/* This should get called for every event that is not a render or close event.
|
/* This should get called for every event that is not a render or close event.
|
||||||
* Note that the x and y values should be called with the widgets offset
|
* Note that the x and y values should be called with the widgets offset
|
||||||
* pre-included. */
|
* pre-included, however the margin, padding and border should NOT be
|
||||||
|
* compensated for. This can be easily done inside of this method with the
|
||||||
|
* pgpl_gui_widget_adjust_event_params function, which adjusts the function
|
||||||
|
* parameters to match those that would have been passed to the render_content
|
||||||
|
* function. */
|
||||||
void (*event)(PGPL_GuiWidget *widget, PGPL_GuiTheme *theme, PGPL_Gui *gui,
|
void (*event)(PGPL_GuiWidget *widget, PGPL_GuiTheme *theme, PGPL_Gui *gui,
|
||||||
PGPL_WindowEventType event_type,
|
PGPL_WindowEventType event_type,
|
||||||
PGPL_WindowEventData *event_data, double x, double y,
|
PGPL_WindowEventData *event_data, double x, double y,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue