examples don't build: change in *_bind_event args

Bug #1628970 reported by Franz Fellner
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libtickit
Fix Released
Undecided
Unassigned

Bug Description

There now is expected to pass TickitBindFlags.

Here is what I came up with to fix the issue:

=== modified file 'examples/demo-input.c'
--- examples/demo-input.c 2015-08-30 14:55:45 +0000
+++ examples/demo-input.c 2016-09-29 06:02:59 +0000
@@ -149,15 +149,15 @@
       .top = 2, .left = 2, .lines = 3, .cols = tickit_window_cols(root) - 4
     }, 0);

- tickit_window_bind_event(keywin, TICKIT_EV_EXPOSE, &render_key, NULL);
- tickit_window_bind_event(root, TICKIT_EV_KEY, &event_key, NULL);
+ tickit_window_bind_event(keywin, TICKIT_EV_EXPOSE, 0, &render_key, NULL);
+ tickit_window_bind_event(root, TICKIT_EV_KEY, 0, &event_key, NULL);

   mousewin = tickit_window_new(root, (TickitRect){
       .top = 8, .left = 2, .lines = 3, .cols = tickit_window_cols(root) - 4
     }, 0);

- tickit_window_bind_event(mousewin, TICKIT_EV_EXPOSE, &render_mouse, NULL);
- tickit_window_bind_event(root, TICKIT_EV_MOUSE, &event_mouse, NULL);
+ tickit_window_bind_event(mousewin, TICKIT_EV_EXPOSE, 0, &render_mouse, NULL);
+ tickit_window_bind_event(root, TICKIT_EV_MOUSE, 0, &event_mouse, NULL);

   tickit_window_take_focus(root);
   tickit_window_set_cursor_visible(root, false);

=== modified file 'examples/demo-pen.c'
--- examples/demo-pen.c 2015-08-30 08:02:23 +0000
+++ examples/demo-pen.c 2016-09-29 06:02:59 +0000
@@ -159,7 +159,7 @@
   tickit_term_clear(tt);

   TickitWindow *root = tickit_window_new_root(tt);
- tickit_window_bind_event(root, TICKIT_EV_EXPOSE, &on_expose, NULL);
+ tickit_window_bind_event(root, TICKIT_EV_EXPOSE, 0, &on_expose, NULL);

   signal(SIGINT, sigint);

=== modified file 'examples/demo-scroll.c'
--- examples/demo-scroll.c 2015-07-24 19:40:47 +0000
+++ examples/demo-scroll.c 2016-09-29 06:02:59 +0000
@@ -120,7 +120,7 @@
   tickit_term_setctl_int(tt, TICKIT_TERMCTL_MOUSE, TICKIT_TERM_MOUSEMODE_CLICK);
   tickit_term_clear(tt);

- tickit_term_bind_event(tt, TICKIT_EV_KEY|TICKIT_EV_MOUSE|TICKIT_EV_RESIZE, event, NULL);
+ tickit_term_bind_event(tt, TICKIT_EV_KEY|TICKIT_EV_MOUSE|TICKIT_EV_RESIZE, 0, event, NULL);

   signal(SIGINT, sigint);

=== modified file 'examples/demo-termctl.c'
--- examples/demo-termctl.c 2015-08-30 07:58:50 +0000
+++ examples/demo-termctl.c 2016-09-29 06:02:59 +0000
@@ -104,7 +104,7 @@
   tickit_term_setctl_int(tt, TICKIT_TERMCTL_MOUSE, TICKIT_TERM_MOUSEMODE_CLICK);
   tickit_term_clear(tt);

- tickit_term_bind_event(tt, TICKIT_EV_MOUSE, event, NULL);
+ tickit_term_bind_event(tt, TICKIT_EV_MOUSE, 0, event, NULL);

   modes.vis = 1;
   modes.blink = 1;

=== modified file 'examples/demo-timer.c'
--- examples/demo-timer.c 2015-08-30 14:19:05 +0000
+++ examples/demo-timer.c 2016-09-29 06:02:59 +0000
@@ -44,7 +44,7 @@
   int counter = 0;

   TickitWindow *root = tickit_window_new_root(tt);
- tickit_window_bind_event(root, TICKIT_EV_EXPOSE, &on_expose, &counter);
+ tickit_window_bind_event(root, TICKIT_EV_EXPOSE, 0, &on_expose, &counter);

   signal(SIGINT, sigint);

=== modified file 'examples/demo-xterm256.c'
--- examples/demo-xterm256.c 2015-08-30 14:57:11 +0000
+++ examples/demo-xterm256.c 2016-09-29 06:02:59 +0000
@@ -96,7 +96,7 @@
   tickit_term_clear(tt);

   TickitWindow *root = tickit_window_new_root(tt);
- tickit_window_bind_event(root, TICKIT_EV_EXPOSE, &on_expose, NULL);
+ tickit_window_bind_event(root, TICKIT_EV_EXPOSE, 0, &on_expose, NULL);

   signal(SIGINT, sigint);

Revision history for this message
Paul "LeoNerd" Evans (leonerd) wrote :

Ah oops. I should make a habit of building examples more often. Thanks

Revision history for this message
Paul "LeoNerd" Evans (leonerd) wrote :

Applied

442: Paul "LeoNerd" Evans 2016-09-29 Fix example demos for tickit_window_bind_event() signature change (thank...

Changed in libtickit:
status: New → Fix Committed
Changed in libtickit:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.