示例#1
0
static void dropdown_video_onselect(uint16_t i, const DROPDOWN* dm) {
    if (i == 1) {
        desktopgrab(1);
    } else {
        postmessage_utoxav(UTOXAV_SET_VIDEO_IN, i, 0, NULL);
    }
}
示例#2
0
static void dropdown_video_onselect(uint16_t i, const DROPDOWN* dm)
{
    DROP_ELEMENT *e = &((DROP_ELEMENT*) dm->userdata)[i];
    void *handle = e->handle;
    if(!handle && video_preview) {
        // if no device is selected while previewing, close the preview window
        video_end(0);
        video_preview = 0;
    } else if((size_t)handle == 1) {
        desktopgrab(1);
        return;
    }
    postmessage_utoxav(VIDEO_SET, 0, 0, handle);
}
示例#3
0
文件: ui_dropdown.c 项目: Boerde/uTox
static void dropdown_video_onselect(uint16_t i, const DROPDOWN* dm)
{
    DROP_ELEMENT *e = &((DROP_ELEMENT*) dm->userdata)[i];
    void *handle = e->handle;
    uint16_t b = 0;
    if(!handle && video_preview) {
        video_end(0);
        video_preview = 0;
        b = 1; //tell video thread to stop preview too
    } else if((size_t)handle == 1) {
        desktopgrab(1);
        return;
    }

    toxvideo_postmessage(VIDEO_SET, b, 0, handle);
}
示例#4
0
文件: ui_buttons.c 项目: Chuongv/uTox
static void button_send_screenshot_onpress(void) {
    FRIEND *f = selected_item->data;
    if (f->online) {
        desktopgrab(0);
    }
}