aboutsummaryrefslogtreecommitdiff
path: root/src/frame.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/frame.c')
-rw-r--r--src/frame.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/frame.c b/src/frame.c
index 2ff8f16..3c4451d 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -480,11 +480,11 @@ Paragraph *insert_paragraph(struct frame *fr, int pos)
}
-void add_callback_para(struct frame *fr, SCBlock *bl, SCBlock *rbl,
- double w, double h,
- SCCallbackDrawFunc draw_func,
- SCCallbackClickFunc click_func, void *bvp,
- void *vp)
+Paragraph *add_callback_para(struct frame *fr, SCBlock *bl, SCBlock *rbl,
+ double w, double h,
+ SCCallbackDrawFunc draw_func,
+ SCCallbackClickFunc click_func, void *bvp,
+ void *vp)
{
Paragraph *pnew;
@@ -494,7 +494,7 @@ void add_callback_para(struct frame *fr, SCBlock *bl, SCBlock *rbl,
pnew = create_paragraph(fr, bl, rbl);
if ( pnew == NULL ) {
fprintf(stderr, "Failed to add callback paragraph\n");
- return;
+ return NULL;
}
}
@@ -509,6 +509,8 @@ void add_callback_para(struct frame *fr, SCBlock *bl, SCBlock *rbl,
pnew->vp = vp;
pnew->height = h;
pnew->empty = 0;
+
+ return pnew;
}