• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ put_status函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中put_status函数的典型用法代码示例。如果您正苦于以下问题:C++ put_status函数的具体用法?C++ put_status怎么用?C++ put_status使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了put_status函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: remove_monitor

void remove_monitor(monitor_t *m)
{
	PRINTF("remove monitor %s (0x%X)\n", m->name, m->id);
	put_status(SBSC_MASK_MONITOR_REMOVE, "monitor_remove %s\n", m->name);

	while (m->desk_head != NULL)
		remove_desktop(m, m->desk_head);
	monitor_t *prev = m->prev;
	monitor_t *next = m->next;
	monitor_t *last_mon = history_get_monitor(m);
	if (prev != NULL)
		prev->next = next;
	if (next != NULL)
		next->prev = prev;
	if (mon_head == m)
		mon_head = next;
	if (mon_tail == m)
		mon_tail = prev;
	if (pri_mon == m)
		pri_mon = NULL;
	if (mon == m) {
		mon = (last_mon == NULL ? (prev == NULL ? next : prev) : last_mon);
		if (mon != NULL && mon->desk != NULL)
			update_current();
	}
	xcb_destroy_window(dpy, m->root);
	free(m);
	num_monitors--;
	put_status(SBSC_MASK_REPORT);
}
开发者ID:chasefarthing,项目名称:bspwm,代码行数:30,代码来源:monitor.c


示例2: remove_desktop

void remove_desktop(monitor_t *m, desktop_t *d)
{
	put_status(SBSC_MASK_DESKTOP_REMOVE, "desktop_remove %s %s\n", m->name, d->name);

	bool was_focused = (mon != NULL && d == mon->desk);
	bool was_active = (d == m->desk);
	history_remove(d, NULL, false);
	unlink_desktop(m, d);
	empty_desktop(m, d);
	free(d);

	ewmh_update_current_desktop();
	ewmh_update_number_of_desktops();
	ewmh_update_desktop_names();

	if (mon != NULL && m->desk != NULL) {
		if (was_focused) {
			update_focused();
		} else if (was_active) {
			activate_node(m, m->desk, m->desk->focus);
		}
	}

	put_status(SBSC_MASK_REPORT);
}
开发者ID:Dissonant-Tech,项目名称:bspwm,代码行数:25,代码来源:desktop.c


示例3: put_status

int internel_decoder::findandopencodec(AVCodecContext *pCodecCtx){


 AVCodec *codec;
codec=avcodec_find_decoder(pCodecCtx->codec_id);
cout <<"Codec:"<<codec->name<<endl;
if(codec==NULL) {
cout <<"Error Unsupported Codec..."<<endl;
   // sc->status = MP_ERROR;
   put_status(MP_ERROR,sc); 
  return -1; 
}

//avcodec_get_context_defaults3(pCodecCtx,codec);  

int ret;
pthread_mutex_lock(&sc->codec_open_lock);
ret = avcodec_open2(pCodecCtx, codec,NULL);
pthread_mutex_unlock(&sc->codec_open_lock); 
if(ret < 0){
  cout <<"Error Opening Codec..."<<endl;
 put_status(MP_ERROR,sc); 
  return -1;   
}

//sleep(1);
cout <<"Codec Opened..."<<endl; 
return 0;  
}
开发者ID:safiuddinkhan,项目名称:videoplayer,代码行数:29,代码来源:internels.cpp


示例4: add_monitor

void add_monitor(monitor_t *m)
{
	xcb_rectangle_t r = m->rectangle;

	if (mon == NULL) {
		mon = m;
		mon_head = m;
		mon_tail = m;
	} else {
		monitor_t *a = mon_head;
		while (a != NULL && rect_cmp(m->rectangle, a->rectangle) > 0) {
			a = a->next;
		}
		if (a != NULL) {
			monitor_t *b = a->prev;
			if (b != NULL) {
				b->next = m;
			} else {
				mon_head = m;
			}
			m->prev = b;
			m->next = a;
			a->prev = m;
		} else {
			mon_tail->next = m;
			m->prev = mon_tail;
			mon_tail = m;
		}
	}

	put_status(SBSC_MASK_MONITOR_ADD, "monitor_add 0x%08X %s %ux%u+%i+%i\n", m->id, m->name, r.width, r.height, r.x, r.y);

	put_status(SBSC_MASK_REPORT);
}
开发者ID:dj95,项目名称:bspwm,代码行数:34,代码来源:monitor.c


示例5: rename_monitor

void rename_monitor(monitor_t *m, const char *name)
{
	put_status(SBSC_MASK_MONITOR_RENAME, "monitor_rename 0x%08X %s %s\n", m->id, m->name, name);

	snprintf(m->name, sizeof(m->name), "%s", name);

	put_status(SBSC_MASK_REPORT);
}
开发者ID:dj95,项目名称:bspwm,代码行数:8,代码来源:monitor.c


示例6: rename_monitor

void rename_monitor(monitor_t *m, const char *name)
{
	put_status(SBSC_MASK_MONITOR_RENAME, "monitor_rename 0x%08X %s %s\n", m->id, m->name, name);

	snprintf(m->name, sizeof(m->name), "%s", name);
	xcb_icccm_set_wm_name(dpy, m->root, XCB_ATOM_STRING, 8, strlen(m->name), m->name);

	put_status(SBSC_MASK_REPORT);
}
开发者ID:gatulezal,项目名称:bspwm,代码行数:9,代码来源:monitor.c


示例7: do_show_variable

void do_show_variable(EditState *s, const char *name)
{
    char buf[MAX_FILENAME_SIZE];

    if (qe_get_variable(s, name, buf, sizeof(buf), NULL, 1) == VAR_UNKNOWN)
        put_status(s, "No variable %s", name);
    else
        put_status(s, "%s -> %s", name, buf);
}
开发者ID:Ivan1234,项目名称:qemacs,代码行数:9,代码来源:variables.c


示例8: rename_desktop

void rename_desktop(monitor_t *m, desktop_t *d, const char *name)
{

	put_status(SBSC_MASK_DESKTOP_RENAME, "desktop_rename 0x%08X 0x%08X %s %s\n", m->id, d->id, d->name, name);

	snprintf(d->name, sizeof(d->name), "%s", name);

	put_status(SBSC_MASK_REPORT);
	ewmh_update_desktop_names();
}
开发者ID:nas30,项目名称:bspwm,代码行数:10,代码来源:desktop.c


示例9: add_desktop

void add_desktop(monitor_t *m, desktop_t *d)
{
	put_status(SBSC_MASK_DESKTOP_ADD, "desktop_add %s %s\n", m->name, d->name);

	insert_desktop(m, d);
	ewmh_update_number_of_desktops();
	ewmh_update_desktop_names();
	ewmh_update_wm_desktops();
	put_status(SBSC_MASK_REPORT);
}
开发者ID:Dissonant-Tech,项目名称:bspwm,代码行数:10,代码来源:desktop.c


示例10: change_layout

void change_layout(monitor_t *m, desktop_t *d, layout_t l)
{
	d->layout = l;
	arrange(m, d);

	put_status(SBSC_MASK_DESKTOP_LAYOUT, "desktop_layout %s %s %s\n", m->name, d->name, l==LAYOUT_TILED?"tiled":"monocle");

	if (d == m->desk) {
		put_status(SBSC_MASK_REPORT);
	}
}
开发者ID:Dissonant-Tech,项目名称:bspwm,代码行数:11,代码来源:desktop.c


示例11: grab_pointer

bool grab_pointer(pointer_action_t pac)
{
	xcb_window_t win = XCB_NONE;
	xcb_point_t pos;

	query_pointer(&win, &pos);

	coordinates_t loc;

	if (!locate_window(win, &loc)) {
		if (pac == ACTION_FOCUS) {
			monitor_t *m = monitor_from_point(pos);
			if (m != NULL && m != mon && (win == XCB_NONE || win == m->root)) {
				focus_node(m, m->desk, m->desk->focus);
				return true;
			}
		}
		return false;
	}

	if (pac == ACTION_FOCUS) {
		if (loc.node != mon->desk->focus) {
			focus_node(loc.monitor, loc.desktop, loc.node);
			return true;
		} else if (focus_follows_pointer) {
			stack(loc.desktop, loc.node, true);
		}
		return false;
	}

	if (loc.node->client->state == STATE_FULLSCREEN) {
		return true;
	}

	xcb_grab_pointer_reply_t *reply = xcb_grab_pointer_reply(dpy, xcb_grab_pointer(dpy, 0, root, XCB_EVENT_MASK_BUTTON_RELEASE|XCB_EVENT_MASK_BUTTON_MOTION, XCB_GRAB_MODE_ASYNC, XCB_GRAB_MODE_ASYNC, XCB_NONE, XCB_NONE, XCB_CURRENT_TIME), NULL);

	if (reply == NULL || reply->status != XCB_GRAB_STATUS_SUCCESS) {
		free(reply);
		return true;
	}
	free(reply);

	if (pac == ACTION_MOVE) {
		put_status(SBSC_MASK_POINTER_ACTION, "pointer_action 0x%08X 0x%08X 0x%08X move begin\n", loc.monitor->id, loc.desktop->id, loc.node->id);
	} else if (pac == ACTION_RESIZE_CORNER) {
		put_status(SBSC_MASK_POINTER_ACTION, "pointer_action 0x%08X 0x%08X 0x%08X resize_corner begin\n", loc.monitor->id, loc.desktop->id, loc.node->id);
	} else if (pac == ACTION_RESIZE_SIDE) {
		put_status(SBSC_MASK_POINTER_ACTION, "pointer_action 0x%08X 0x%08X 0x%08X resize_side begin\n", loc.monitor->id, loc.desktop->id, loc.node->id);
	}

	track_pointer(loc, pac, pos);

	return true;
}
开发者ID:gyroninja,项目名称:bspwm,代码行数:54,代码来源:pointer.c


示例12: add_desktop

void add_desktop(monitor_t *m, desktop_t *d)
{
	put_status(SBSC_MASK_DESKTOP_ADD, "desktop_add 0x%08X %s 0x%08X\n", d->id, d->name, m->id);

	d->border_width = m->border_width;
	d->window_gap = m->window_gap;
	insert_desktop(m, d);
	ewmh_update_number_of_desktops();
	ewmh_update_desktop_names();
	ewmh_update_wm_desktops();
	put_status(SBSC_MASK_REPORT);
}
开发者ID:nas30,项目名称:bspwm,代码行数:12,代码来源:desktop.c


示例13: transfer_desktop

bool transfer_desktop(monitor_t *ms, monitor_t *md, desktop_t *d)
{
	if (ms == NULL || md == NULL || d == NULL || ms == md) {
		return false;
	}

	bool was_active = (d == ms->desk);

	unlink_desktop(ms, d);

	if (md->desk != NULL) {
		hide_desktop(d);
	}

	insert_desktop(md, d);
	history_transfer_desktop(md, d);

	if (was_active) {
		if (mon == ms) {
			focus_node(ms, NULL, NULL);
		} else {
			activate_node(ms, NULL, NULL);
		}
	}

	if (ms->sticky_count > 0 && was_active) {
		sticky_still = false;
		transfer_sticky_nodes(ms, d, ms->desk, d->root);
		sticky_still = true;
	}

	adapt_geometry(&ms->rectangle, &md->rectangle, d->root);
	arrange(md, d);

	if (md->desk == d) {
		if (mon == md) {
			focus_node(md, d, d->focus);
		} else {
			activate_node(md, d, d->focus);
		}
	}

	ewmh_update_wm_desktops();
	ewmh_update_desktop_names();
	ewmh_update_current_desktop();

	put_status(SBSC_MASK_DESKTOP_TRANSFER, "desktop_transfer 0x%08X 0x%08X 0x%08X\n", ms->id, d->id, md->id);
	put_status(SBSC_MASK_REPORT);

	return true;
}
开发者ID:nas30,项目名称:bspwm,代码行数:51,代码来源:desktop.c


示例14: activate_desktop

void activate_desktop(monitor_t *m, desktop_t *d)
{
	if (d == m->desk) {
		return;
	}

	show_desktop(d);
	hide_desktop(m->desk);

	m->desk = d;

	put_status(SBSC_MASK_DESKTOP_ACTIVATE, "desktop_activate %s %s\n", m->name, d->name);
	put_status(SBSC_MASK_REPORT);
}
开发者ID:Dissonant-Tech,项目名称:bspwm,代码行数:14,代码来源:desktop.c


示例15: swap_monitors

bool swap_monitors(monitor_t *m1, monitor_t *m2)
{
	if (m1 == NULL || m2 == NULL || m1 == m2) {
		return false;
	}

	put_status(SBSC_MASK_MONITOR_SWAP, "monitor_swap 0x%08X 0x%08X\n", m1->id, m2->id);

	if (mon_head == m1) {
		mon_head = m2;
	} else if (mon_head == m2) {
		mon_head = m1;
	}
	if (mon_tail == m1) {
		mon_tail = m2;
	} else if (mon_tail == m2) {
		mon_tail = m1;
	}

	monitor_t *p1 = m1->prev;
	monitor_t *n1 = m1->next;
	monitor_t *p2 = m2->prev;
	monitor_t *n2 = m2->next;

	if (p1 != NULL && p1 != m2) {
		p1->next = m2;
	}
	if (n1 != NULL && n1 != m2) {
		n1->prev = m2;
	}
	if (p2 != NULL && p2 != m1) {
		p2->next = m1;
	}
	if (n2 != NULL && n2 != m1) {
		n2->prev = m1;
	}

	m1->prev = p2 == m1 ? m2 : p2;
	m1->next = n2 == m1 ? m2 : n2;
	m2->prev = p1 == m2 ? m1 : p1;
	m2->next = n1 == m2 ? m1 : n1;

	ewmh_update_wm_desktops();
	ewmh_update_desktop_names();
	ewmh_update_desktop_viewport();
	ewmh_update_current_desktop();

	put_status(SBSC_MASK_REPORT);
	return true;
}
开发者ID:gatulezal,项目名称:bspwm,代码行数:50,代码来源:monitor.c


示例16: key_button_event

void key_button_event(xcb_generic_event_t *evt, uint8_t event_type)
{
	xcb_keysym_t keysym = XCB_NO_SYMBOL;
	xcb_button_t button = XCB_NONE;
	bool replay_event = false;
	uint16_t modfield = 0;
	uint16_t lockfield = num_lock | caps_lock | scroll_lock;
	parse_event(evt, event_type, &keysym, &button, &modfield);
	modfield &= ~lockfield & MOD_STATE_FIELD;
	if (keysym != XCB_NO_SYMBOL || button != XCB_NONE) {
		hotkey_t *hk = find_hotkey(keysym, button, modfield, event_type, &replay_event);
		if (hk != NULL) {
			run(hk->command, hk->sync);
			if (status_fifo != NULL)
				put_status(COMMAND_PREFIX, hk->command);
		}
	}
	switch (event_type) {
		case XCB_BUTTON_PRESS:
		case XCB_BUTTON_RELEASE:
			if (replay_event)
				xcb_allow_events(dpy, XCB_ALLOW_REPLAY_POINTER, XCB_CURRENT_TIME);
			else
				xcb_allow_events(dpy, XCB_ALLOW_SYNC_POINTER, XCB_CURRENT_TIME);
			break;
		case XCB_KEY_PRESS:
		case XCB_KEY_RELEASE:
			if (replay_event)
				xcb_allow_events(dpy, XCB_ALLOW_REPLAY_KEYBOARD, XCB_CURRENT_TIME);
			else
				xcb_allow_events(dpy, XCB_ALLOW_SYNC_KEYBOARD, XCB_CURRENT_TIME);
			break;
	}
	xcb_flush(dpy);
}
开发者ID:lernisto,项目名称:sxhkd,代码行数:35,代码来源:sxhkd.c


示例17: do_org_promote_subtree

static void do_org_promote_subtree(EditState *s, int dir)
{
    int offset, level, level1;

    if (check_read_only(s))
        return;

    offset = org_find_heading(s, s->offset, &level, 0);
    if (offset < 0)
        return;

    for (;;) {
        if (dir < 0) {
            eb_insert_uchar(s->b, offset, '*');
        } else
        if (dir > 0) {
            if (level > 1) {
                eb_delete_uchar(s->b, offset);
            } else {
                put_status(s, "Cannot promote to level 0");
                return;
            }
        }
        offset = org_next_heading(s, offset, MAX_LEVEL, &level1);
        if (level1 <= level)
            break;
    }
}
开发者ID:Ivan1234,项目名称:qemacs,代码行数:28,代码来源:orgmode.c


示例18: update_root

void update_root(monitor_t *m, xcb_rectangle_t *rect)
{
	xcb_rectangle_t last_rect = m->rectangle;
	m->rectangle = *rect;
	if (m->root == XCB_NONE) {
		uint32_t values[] = {XCB_EVENT_MASK_ENTER_WINDOW};
		m->root = xcb_generate_id(dpy);
		xcb_create_window(dpy, XCB_COPY_FROM_PARENT, m->root, root,
		                  rect->x, rect->y, rect->width, rect->height, 0,
		                  XCB_WINDOW_CLASS_INPUT_ONLY, XCB_COPY_FROM_PARENT, XCB_CW_EVENT_MASK, values);
		xcb_icccm_set_wm_class(dpy, m->root, sizeof(ROOT_WINDOW_IC), ROOT_WINDOW_IC);
		window_lower(m->root);
		if (focus_follows_pointer) {
			window_show(m->root);
		}
	} else {
		window_move_resize(m->root, rect->x, rect->y, rect->width, rect->height);
		put_status(SBSC_MASK_MONITOR_GEOMETRY, "monitor_geometry 0x%08X %ux%u+%i+%i\n",
		           m->id, rect->width, rect->height, rect->x, rect->y);
	}
	for (desktop_t *d = m->desk_head; d != NULL; d = d->next) {
		for (node_t *n = first_extrema(d->root); n != NULL; n = next_leaf(n, d->root)) {
			if (n->client == NULL) {
				continue;
			}
			adapt_geometry(&last_rect, rect, n);
		}
		arrange(m, d);
	}
}
开发者ID:dj95,项目名称:bspwm,代码行数:30,代码来源:monitor.c


示例19: select_desktop

void select_desktop(desktop_t *d)
{
    if (d == NULL || d == mon->desk)
        return;

    PRINTF("select desktop %s\n", d->name);

    if (visible) {
        node_t *n = first_extrema(d->root);

        while (n != NULL) {
            window_show(n->client->window);
            n = next_leaf(n);
        }

        n = first_extrema(mon->desk->root);

        while (n != NULL) {
            window_hide(n->client->window);
            n = next_leaf(n);
        }
    }

    mon->last_desk = mon->desk;
    mon->desk = d;

    update_current();
    ewmh_update_current_desktop();
    put_status();
}
开发者ID:ThomasAdam,项目名称:bspwm,代码行数:30,代码来源:tree.c


示例20: org_find_heading

static int org_find_heading(EditState *s, int offset, int *level, int silent)
{
    int offset1, nb, c;

    offset = eb_goto_bol(s->b, offset);
    for (;;) {
        /* Find line starting with '*' */
        /* XXX: should ignore blocks using colorstate */
        if (eb_nextc(s->b, offset, &offset1) == '*') {
            for (nb = 1; (c = eb_nextc(s->b, offset1, &offset1)) == '*'; nb++)
                continue;
            if (c == ' ') {
                *level = nb;
                return offset;
            }
        }
        if (offset == 0)
            break;
        offset = eb_prev_line(s->b, offset);
    }
    if (!silent)
        put_status(s, "Before first heading");

    return -1;
}
开发者ID:Ivan1234,项目名称:qemacs,代码行数:25,代码来源:orgmode.c



注:本文中的put_status函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ put_str函数代码示例发布时间:2022-05-30
下一篇:
C++ put_signal_struct函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap