当前位置: 首页>>代码示例>>C++>>正文


C++ Looper函数代码示例

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


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

示例1: Looper

status_t TVideoEditorText::Archive(BMessage* data, bool deep) const
{

	status_t myErr;

	Looper()->Lock();

	// Start by calling inherited archive
	myErr = BView::Archive(data, deep);

	if (myErr == B_OK) {
		// Add our class name to the archive
		data->AddString("class", "TVideoEditorText");

		// Add our member variables to the BMessage
		data->AddInt32("MessageID", fMessageID);
		data->AddFloat("TextSize", fTextSize);
		data->AddData("Font", B_ANY_TYPE, &fFont, sizeof(BFont) );
		data->AddData("Color", B_RGB_COLOR_TYPE, &fColor, sizeof(rgb_color) );
	}

	Looper()->Unlock();

	return myErr;
}
开发者ID:Barrett17,项目名称:UltraDV,代码行数:25,代码来源:TVideoEditorText.cpp

示例2: Looper

status_t TStageWindow::Archive(BMessage *data, bool deep) const
{		
	status_t myErr;
	
	Looper()->Lock();
	
	// Start by calling inherited archive
	myErr = BWindow::Archive(data, deep);
						
	if (myErr == B_OK)
	{					
		// Add our class name to the archive
		data->AddString("class", "TStageWindow");
		
		// Add our member variables to the archive		
				
		// Add attached views
		if (deep)
		{					
			//	StageView			
			if (m_StageView)
			{		
				BMessage childArchive;				
				if ( m_StageView->Archive(&childArchive, deep) == B_OK )
					data->AddMessage("StageView", &childArchive);
			}			
		}		
	}
	
	Looper()->Unlock();
	
	return myErr;
	
}	
开发者ID:ModeenF,项目名称:UltraDV,代码行数:34,代码来源:TStageWindow.cpp

示例3: Looper

void
BTitleView::MouseMoved(BPoint where, uint32 code, const BMessage *message)
{
	if (fTrackingState != NULL) {
		int32 buttons = 0;
		if (Looper() != NULL && Looper()->CurrentMessage() != NULL)
			Looper()->CurrentMessage()->FindInt32("buttons", &buttons);
		fTrackingState->MouseMoved(where, buttons);
		return;
	}

	switch (code) {
		default:
			if (InColumnResizeArea(where) && Window()->IsActive())
				SetViewCursor(&fHorizontalResizeCursor);
			else
				SetViewCursor(B_CURSOR_SYSTEM_DEFAULT);
			break;
			
		case B_EXITED_VIEW:
			SetViewCursor(B_CURSOR_SYSTEM_DEFAULT);
			break;
	}
	_inherited::MouseMoved(where, code, message);
}
开发者ID:mmadia,项目名称:Haiku-services-branch,代码行数:25,代码来源:TitleView.cpp

示例4: Looper

/*!	Since we have set a mouse event mask, we don't want to forward all
	mouse downs to the slider - instead, we only invoke it, which causes a
	message to our target. Within the VolumeWindow, this will actually
	cause the window to close.
	Also, we need to mask out the dragger in this case, or else dragging
	us will also cause a volume update.
*/
void
VolumeControl::MouseDown(BPoint where)
{
	// Ignore clicks on the dragger
	int32 viewToken;
	if (Bounds().Contains(where) && Looper()->CurrentMessage() != NULL
		&& Looper()->CurrentMessage()->FindInt32("_view_token",
				&viewToken) == B_OK
		&& viewToken != _get_object_token_(this))
		return;

	// TODO: investigate why this does not work as expected (the dragger
	// frame seems to be off)
#if 0
	if (BView* dragger = ChildAt(0)) {
		if (!dragger->IsHidden() && dragger->Frame().Contains(where))
			return;
	}
#endif

	if (!IsEnabled() || !Bounds().Contains(where)) {
		Invoke();
		return;
	}

	BSlider::MouseDown(where);
}
开发者ID:yunxiaoxiao110,项目名称:haiku,代码行数:34,代码来源:VolumeControl.cpp

示例5: Looper

status_t TCueSheetTimeView::Archive(BMessage *data, bool deep) const
{
		
	status_t myErr;
	
	Looper()->Lock();
	
	// Start by calling inherited archive
	myErr = BView::Archive(data, deep);
						
	if (myErr == B_OK)
	{					
		// Add our class name to the archive
		data->AddString("class", "TCueSheetTimeView");
		
		// Add our member variables to the archive		
				
		// Add attached views
		if (deep)
		{		
		
		}		
	}
	
	Looper()->Unlock();	
	
	return myErr;
}
开发者ID:ModeenF,项目名称:UltraDV,代码行数:28,代码来源:TCueSheetTimeView.cpp

示例6: BEntry

status_t TaskFS::Load(void)
{
	status_t err = B_OK;
	BEntry *tmpEntry = new BEntry();
	TaskList	*newTaskList	= NULL;
	Task		*newTask		= NULL;
	tasks->MakeEmpty();
	taskLists->MakeEmpty();
	while (tasksDir.GetNextEntry(tmpEntry, false) == B_OK) {
		if (tmpEntry->IsDirectory()){
			newTaskList = DirectoryToList(tmpEntry);
			if (newTaskList != NULL){
				BMessage *msg = new BMessage();
				msg->AddPointer("tasklist",newTaskList);
				Looper()->SendNotices(ADD_TASK_LIST,msg);
				taskLists->AddItem(newTaskList);
			}
		}
	}
	while (tasksDir.GetNextEntry(tmpEntry, false) == B_OK) {
		if (tmpEntry->IsDirectory()){
			newTaskList = DirectoryToList(tmpEntry);
			if (newTaskList != NULL){
				BMessage *msg = new BMessage();
				msg->AddPointer("tasklist",newTaskList);
				Looper()->SendNotices(ADD_TASK_LIST,msg);
				taskLists->AddItem(newTaskList);
			}
		}
	}
	tasksDir.Rewind();
	return err;
}
开发者ID:Paradoxianer,项目名称:Tasks,代码行数:33,代码来源:TaskFS.cpp

示例7: Looper

status_t TExportZone::Archive(BMessage *data, bool deep) const
{
		
	status_t myErr;
	
	Looper()->Lock();
	
	// Start by calling inherited archive
	myErr = BView::Archive(data, deep);
						
	if (myErr == B_OK)
	{					
		// Add our class name to the archive
		data->AddString("class", "TExportZone");
		
		// Add our member variables to the archive		
		data->AddRect("ExportChannel", m_ExportChannel);
		data->AddRect("InRect", m_InRect);
		data->AddRect("OutRect", m_OutRect);

		// Add attached views
		if (deep)
		{		
		
		}		
	}
	
	Looper()->Unlock();	
	
	return myErr;
}
开发者ID:ModeenF,项目名称:UltraDV,代码行数:31,代码来源:TExportZone.cpp

示例8: sprintf

void TVideoEditorText::SetText(char* theText)
{
	sprintf(fText, theText);
	Looper()->Lock();
	Invalidate();
	Looper()->Unlock();
}
开发者ID:Barrett17,项目名称:UltraDV,代码行数:7,代码来源:TVideoEditorText.cpp

示例9: looper

void NetPrefsServerView::SetNetworkData(BMessage* msg)
{
	// this shouldn't theoretically be able to happen but better safe than sorry
	BLooper* looper(Looper());
	if (looper == NULL) return;

	BAutolock lock(Looper());
	if (!lock.IsLocked()) return;
	// clear previous servers (if any)
	while (fServerList->CountRows() > 0) {
		BRow* row(fServerList->RowAt(0));
		fServerList->RemoveRow(row);
		delete row;
	}

	BString netString(S_PREFSERVER_SEL_STRING);
	netString += msg->FindString("name");
	netString += ":";
	type_code type;
	int32 count;
	ssize_t size;
	const ServerData* data;
	msg->GetInfo("server", &type, &count);
	for (int32 i = 0; i < count; i++) {
		msg->FindData("server", B_ANY_TYPE, i, reinterpret_cast<const void**>(&data), &size);
		AddServer(data);
	}
	fActiveNetwork = msg;
	fSelectTitleString->SetText(netString.String());
	fSelectTitleString->ResizeToPreferred();
}
开发者ID:carriercomm,项目名称:Vision,代码行数:31,代码来源:NetPrefsServerView.cpp

示例10: Looper

status_t TCueSheetWindow::Archive(BMessage* data, bool deep) const
{

	status_t myErr;

	Looper()->Lock();

	// Start by calling inherited archive
	myErr = BWindow::Archive(data, deep);

	if (myErr == B_OK) {
		// Add our class name to the archive
		data->AddString("class", "TCueSheetWindow");

		// Add our member variables to the archive

		// Add attached views
		if (deep) {
			//	Archive StageWindow
			BMessage stageArchive;
			fStageWindow->Archive(&stageArchive, true);
			data->AddMessage("StageWindow", &stageArchive);

		}
	}


	Looper()->Unlock();

	return myErr;
}
开发者ID:Barrett17,项目名称:UltraDV,代码行数:31,代码来源:TCueSheetWindow.cpp

示例11: Looper

void FSPanel::CheckCB()
{
	F83_RB->SetEnabled(GetISO9660());
	F31_RB->SetEnabled(GetISO9660());
	F37_RB->SetEnabled(GetISO9660());

	Joliet_CB->SetEnabled(GetISO9660());
	RockRidge_CB->SetEnabled(GetISO9660());
	HFS_CB->SetEnabled(GetISO9660());
	mappingCB->SetEnabled((HFS_CB->Value() == B_CONTROL_ON) && (HFS_CB->IsEnabled()));

	Looper()->PostMessage(JOLIET_CB_MSG, this);
	Looper()->PostMessage(ROCKRIDGE_CB_MSG, this);
	Looper()->PostMessage(MAPPING_CB_MSG, this);

	if (UDF_CB->IsEnabled()) {
		UDFDef_RB->SetEnabled(GetUDF());
		UDFDVD_RB->SetEnabled(GetUDF());
	} else {
		UDFDef_RB->SetEnabled(false);
		UDFDVD_RB->SetEnabled(false);
	}

	if (ISO9660_CB->Value() == B_CONTROL_OFF && UDF_CB->Value() == B_CONTROL_OFF &&
		BFS_CB->Value() == B_CONTROL_OFF) {

		BFS_CB->SetValue(B_CONTROL_ON);
		CheckCB();
	}
}
开发者ID:HaikuArchives,项目名称:Helios,代码行数:30,代码来源:FSPanel.cpp

示例12: switch

void
ClipView::KeyDown(const char* bytes, int32 numBytes)
{
	switch (bytes[0]) {
		case B_DELETE:
		{
			ClipItem* currentClip
				= dynamic_cast<ClipItem *>(ItemAt(CurrentSelection()));
			BMessage message(DELETE);
			message.AddPointer("clip", currentClip);
			Looper()->PostMessage(&message);
			break;
		}
		case B_LEFT_ARROW:
		case B_RIGHT_ARROW:
		{
			BMessage message(SWITCHLIST);
			message.AddInt32("listview", (int32)0);
			Looper()->PostMessage(&message);
			break;
		}
		default:
		{
			BListView::KeyDown(bytes, numBytes);
			break;
		}
	}
}
开发者ID:humdingerb,项目名称:clipdinger,代码行数:28,代码来源:ClipView.cpp

示例13: printf

status_t VBoxClipboardService::_ServiceThread()
{
    printf("VBoxClipboardService::%s()\n", __FUNCTION__);

    /* The thread waits for incoming messages from the host. */
    for (;;)
    {
        uint32_t u32Msg;
        uint32_t u32Formats;
        int rc = VbglR3ClipboardGetHostMsg(fClientId, &u32Msg, &u32Formats);
        if (RT_SUCCESS(rc))
        {
            switch (u32Msg)
            {
                case VBOX_SHARED_CLIPBOARD_HOST_MSG_FORMATS:
                {
                    /*
                     * The host has announced available clipboard formats. Forward
                     * the information to the handler.
                     */
                    LogRelFlowFunc(("VBOX_SHARED_CLIPBOARD_HOST_MSG_FORMATS u32Formats=%x\n", u32Formats));
                    BMessage msg(VBOX_GUEST_CLIPBOARD_HOST_MSG_FORMATS);
                    msg.AddInt32("Formats", (uint32)u32Formats);
                    Looper()->PostMessage(&msg, this);
                    break;
                }

                case VBOX_SHARED_CLIPBOARD_HOST_MSG_READ_DATA:
                {
                    /* The host needs data in the specified format. */
                    LogRelFlowFunc(("VBOX_SHARED_CLIPBOARD_HOST_MSG_READ_DATA u32Formats=%x\n", u32Formats));
                    BMessage msg(VBOX_GUEST_CLIPBOARD_HOST_MSG_READ_DATA);
                    msg.AddInt32("Formats", (uint32)u32Formats);
                    Looper()->PostMessage(&msg, this);
                    break;
                }

                case VBOX_SHARED_CLIPBOARD_HOST_MSG_QUIT:
                {
                    /* The host is terminating. */
                    LogRelFlowFunc(("VBOX_SHARED_CLIPBOARD_HOST_MSG_QUIT\n"));
                    fExiting = true;
                    return VERR_INTERRUPTED;
                }

                default:
                    Log(("VBoxClipboardService::%s: Unsupported message from host! Message = %u\n", __FUNCTION__, u32Msg));
            }
        }
        else
            fExiting = true;

        LogRelFlow(("processed host event rc = %d\n", rc));

        if (fExiting)
            break;
    }
    return 0;
}
开发者ID:MadHacker217,项目名称:VirtualBox-OSE,代码行数:59,代码来源:VBoxClipboard.cpp

示例14: MouseDownComponent

void TTextControlComponent::MouseDown(BPoint point)
{
	if (Looper()->Lock())
	{
		MouseDownComponent("Component",DRAG_COMPONENT,this,point);
		Looper()->Unlock();
	}
}
开发者ID:HaikuArchives,项目名称:BeBuilder,代码行数:8,代码来源:TextControlComponent.cpp

示例15: MouseDownComponent

void TRadioButtonComponent::MouseDown(BPoint point)
{
	if (Looper()->Lock())
	{
		MouseDownComponent("Component",DRAG_COMPONENT,this,point);
		Looper()->Unlock();
	}
}
开发者ID:HaikuArchives,项目名称:BeBuilder,代码行数:8,代码来源:RadioButtonComponent.cpp


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