Example #1
0
static int hero3_event_notify(activity *act, enum im_evnet_category_t e_category,
                                    int event, void* value)
{
    assert(e_category == EC_RKE);
    enum update_request_action_t pact = (enum update_request_action_t) event;
    if (pact == UR_CBS) {
        switch_ui();
    }
    else if (pact == UR_CODING) {
        /* Language changed */
        setup_labels();
        switch_ui();
    }
    return 0;
}
Example #2
0
static int onCreate(int mode, activity *act) {
    if( onCreateSanityCheck(act) != MKD_OK ) {
        return MKD_ERR;
    }
    //Start to construct the window
    loadWindow(act);

    //Set event notify
    getInfoManager()->register_event_notify(act, EC_RKE, UR_CBS | UR_CODING, hero3_event_notify);

    setup_labels();
    switch_ui();
    return MKD_OK;
}
Example #3
0
static void
linux_global_eventsink(void *opaque, event_t *e)
{
    if(event_is_action(e, ACTION_SWITCH_UI))
        switch_ui();
}