| 176 | | me->current_page_m); |
| | 183 | me->current_page_m); |
| | 184 | |
| | 185 | ClutterBindingPool *binding_pool; |
| | 186 | std::cerr << G_OBJECT_TYPE_NAME(me->the_stage_m) << std::endl; |
| | 187 | binding_pool = clutter_binding_pool_new(G_OBJECT_TYPE_NAME(me->the_stage_m)); |
| | 188 | |
| | 189 | clutter_binding_pool_install_action(binding_pool, |
| | 190 | "move-up", |
| | 191 | CLUTTER_Up, (ClutterModifierType)0, |
| | 192 | G_CALLBACK(pdfcube::app::action_move_up), |
| | 193 | me, |
| | 194 | NULL); |
| | 195 | |
| | 196 | clutter_binding_pool_install_action(binding_pool, |
| | 197 | "move-up", |
| | 198 | CLUTTER_KP_Up, (ClutterModifierType)0, |
| | 199 | G_CALLBACK(pdfcube::app::action_move_up), |
| | 200 | me, |
| | 201 | NULL); |
| | 202 | |
| | 239 | ////////////////////////////////////////////////////////////////////// |
| | 240 | // |
| | 241 | // Callbacks |
| | 242 | // |
| | 243 | static gboolean keypress_event(ClutterActor* actor, |
| | 244 | ClutterEvent* evt, |
| | 245 | gpointer data) |
| | 246 | { |
| | 247 | pdfcube::app* self = (pdfcube::app*)data; |
| | 248 | ClutterKeyEvent* key_evt = (ClutterKeyEvent*)evt; |
| | 249 | ClutterBindingPool *pool = NULL; |
| | 250 | |
| | 251 | std::cerr << " * " << G_OBJECT_TYPE_NAME(actor) << std::endl; |
| | 252 | /* retrieve the binding pool for the type of the actor */ |
| | 253 | pool = clutter_binding_pool_find(G_OBJECT_TYPE_NAME(actor)); |
| | 254 | |
| | 255 | assert(pool); |
| | 256 | /* activate any callback matching the key symbol and modifiers |
| | 257 | * mask of the key event. the returned value can be directly |
| | 258 | * used to signal that the actor has handled the event. |
| | 259 | */ |
| | 260 | return clutter_binding_pool_activate (pool, |
| | 261 | (guint)key_evt->keyval, |
| | 262 | (ClutterModifierType)key_evt->modifier_state, |
| | 263 | G_OBJECT(actor)); |
| | 264 | |
| | 265 | } |
| | 266 | |
| | 267 | static gboolean action_move_up(GObject *instance, |
| | 268 | const gchar *action_name, |
| | 269 | guint key_val, |
| | 270 | ClutterModifierType modifiers, |
| | 271 | gpointer user_data) |
| | 272 | { |
| | 273 | std::cerr << "move-up" << std::endl; |
| | 274 | } |
| | 275 | |
| | 276 | |
| | 277 | |