コード例 #1
0
ファイル: llfloatergroups.cpp プロジェクト: jacek/imprudence
BOOL LLPanelGroups::postBuild()
{
    childSetCommitCallback("group list", onGroupList, this);

    childSetTextArg("groupcount", "[COUNT]", llformat("%d",gAgent.mGroups.count()));
    childSetTextArg("groupcount", "[MAX]", llformat("%d", gHippoLimits->getMaxAgentGroups()));

    const std::string none_text = getString("none");
    init_group_list(getChild<LLScrollListCtrl>("group list"), gAgent.getGroupID(), none_text);

    childSetAction("Activate", onBtnActivate, this);

    childSetAction("Info", onBtnInfo, this);

    childSetAction("IM", onBtnIM, this);

    childSetAction("Leave", onBtnLeave, this);

    childSetAction("Create", onBtnCreate, this);

    childSetAction("Search...", onBtnSearch, this);

    childSetAction("Invite...", onBtnInvite, this);

    childSetAction("Titles...", onBtnTitles, this);

    setDefaultBtn("IM");

    childSetDoubleClickCallback("group list", onBtnIM);
    childSetUserData("group list", this);

    reset();

    return TRUE;
}
コード例 #2
0
ファイル: llfloatergroups.cpp プロジェクト: Nora28/imprudence
BOOL LLPanelGroups::postBuild()
{
	childSetCommitCallback("group list", onGroupList, this);

	childSetTextArg("groupcount", "[COUNT]", llformat("%d",gAgent.mGroups.count()));
	childSetTextArg("groupcount", "[MAX]", llformat("%d",MAX_AGENT_GROUPS));

	init_group_list(getChild<LLScrollListCtrl>("group list"), gAgent.getGroupID());

	childSetAction("Activate", onBtnActivate, this);

	childSetAction("Info", onBtnInfo, this);

	childSetAction("IM", onBtnIM, this);

	childSetAction("Leave", onBtnLeave, this);

	childSetAction("Create", onBtnCreate, this);

	childSetAction("Search...", onBtnSearch, this);
	
	childSetAction("Invite...", onBtnInvite, this);

	setDefaultBtn("IM");

	childSetDoubleClickCallback("group list", onBtnIM);
	childSetUserData("group list", this);

	reset();

	return TRUE;
}
コード例 #3
0
/**
 * Initialize a threading library.
 * 
 * @note This must only be called once.
 * 
 * If any OS threads were created before calling this function, they must be attached using
 * hythread_attach before accessing any thread library functions. 
 * 
 * @param[in] lib pointer to the thread library to be initialized (non-NULL)
 * @return The thread library's initStatus will be set to 0 on success or 
 * a negative value on failure.
 */
void VMCALL hythread_init(hythread_library_t lib) {
    apr_status_t apr_status;
    IDATA status;
    hythread_monitor_t *mon;

    // Current implementation doesn't support more than one library instance.
    if (TM_LIBRARY == NULL) {
        TM_LIBRARY = lib;
    }
    assert(TM_LIBRARY == lib);

    if (hythread_library_state != TM_LIBRARY_STATUS_NOT_INITIALIZED)
        return;
    hythread_library_state = TM_LIBRARY_STATUS_INITIALIZED;
     
    apr_status = apr_initialize();
    assert(apr_status == APR_SUCCESS);
    // TM_POOL will be NULL if hythread_lib_create was not used to create the library
    if (TM_POOL == NULL) {
        apr_status = apr_pool_create(&TM_POOL, NULL);
        assert(apr_status == APR_SUCCESS);
    }

    apr_status = apr_threadkey_private_create(&TM_THREAD_KEY, NULL, TM_POOL);
    assert(apr_status == APR_SUCCESS);
    
    status = port_mutex_create(&lib->TM_LOCK, APR_THREAD_MUTEX_NESTED);
    assert(status == TM_ERROR_NONE);
    status = port_mutex_create(&TM_START_LOCK, APR_THREAD_MUTEX_NESTED);
    assert(status == TM_ERROR_NONE);
     
    status = init_group_list();
    assert(status == TM_ERROR_NONE);

    // Create default group - hosts any thread crated with NULL group
    status = hythread_group_create(&TM_DEFAULT_GROUP);
    assert(status == TM_ERROR_NONE);

    //nondaemon thread barrier
    ////
    lib->nondaemon_thread_count = 0;
    status = hycond_create(&lib->nondaemon_thread_cond);
    assert(status == TM_ERROR_NONE);
 
    // init global monitor
    status=hythread_monitor_init_with_name(&p_global_monitor, 0, "Thread Global Monitor");
    assert(status == TM_ERROR_NONE);

    mon = (hythread_monitor_t*)hythread_global(GLOBAL_MONITOR_NAME);
    *mon = p_global_monitor;
    assert(mon);
}
コード例 #4
0
ファイル: llfloatergroups.cpp プロジェクト: Nora28/imprudence
// clear the group list, and get a fresh set of info.
void LLPanelGroups::reset()
{
	LLCtrlListInterface *group_list = childGetListInterface("group list");
	if (group_list)
	{
		group_list->operateOnAll(LLCtrlListInterface::OP_DELETE);
	}
	childSetTextArg("groupcount", "[COUNT]", llformat("%d",gAgent.mGroups.count()));
	childSetTextArg("groupcount", "[MAX]", llformat("%d",MAX_AGENT_GROUPS));

	init_group_list(getChild<LLScrollListCtrl>("group list"), gAgent.getGroupID());
	enableButtons();
}
コード例 #5
0
ファイル: llfloatergroups.cpp プロジェクト: jacek/imprudence
// clear the group list, and get a fresh set of info.
void LLPanelGroups::reset()
{
    LLCtrlListInterface *group_list = childGetListInterface("group list");
    if (group_list)
    {
        group_list->operateOnAll(LLCtrlListInterface::OP_DELETE);
    }
    childSetTextArg("groupcount", "[COUNT]", llformat("%d",gAgent.mGroups.count()));
    childSetTextArg("groupcount", "[MAX]", llformat("%d", gHippoLimits->getMaxAgentGroups()));

    const std::string none_text = getString("none");
    init_group_list(getChild<LLScrollListCtrl>("group list"), gAgent.getGroupID(), none_text);
    enableButtons();
}
コード例 #6
0
ファイル: llfloatergroups.cpp プロジェクト: Nora28/imprudence
BOOL LLFloaterGroupPicker::postBuild()
{
	init_group_list(getChild<LLScrollListCtrl>("group list"), gAgent.getGroupID(), mPowersMask);

	childSetAction("OK", onBtnOK, this);

	childSetAction("Cancel", onBtnCancel, this);

	setDefaultBtn("OK");

	childSetDoubleClickCallback("group list", onBtnOK);
	childSetUserData("group list", this);

	childEnable("OK");

	return TRUE;
}
コード例 #7
0
BOOL LLPanelGroups::postBuild()
{
	childSetCommitCallback("group list", onGroupList, this);

	LLSearchEditor* group_search = getChild<LLSearchEditor>("group_search");
	if (group_search)
	{
		group_search->setSearchCallback(&onGroupSearchKeystroke, this);
	}

	childSetTextArg("groupcount", "[COUNT]", llformat("%d",gAgent.mGroups.count()));
	childSetTextArg("groupcount", "[MAX]", llformat("%d",MAX_AGENT_GROUPS));

	const std::string none_text = getString("none");
	init_group_list(getChild<LLScrollListCtrl>("group list"), gAgent.getGroupID(), none_text, false);

	childSetAction("Activate", onBtnActivate, this);

	childSetAction("Info", onBtnInfo, this);

	childSetAction("IM", onBtnIM, this);

	childSetAction("Leave", onBtnLeave, this);

	childSetAction("Create", onBtnCreate, this);

	childSetAction("Search...", onBtnSearch, this);
	
	childSetAction("Invite...", onBtnInvite, this);

	childSetAction("Titles...", onBtnTitles, this);

	setDefaultBtn("IM");

	childSetDoubleClickCallback("group list", onBtnIM);
	childSetUserData("group list", this);

	reset();

	return TRUE;
}