コード例 #1
0
ファイル: BMCPrivate.cpp プロジェクト: AmirAbrams/haiku
_BMCMenuBar_::_BMCMenuBar_(BMenuField* menuField)
	:
	BMenuBar("_mc_mb_", B_ITEMS_IN_ROW),
	fMenuField(menuField),
	fFixedSize(true),
	fShowPopUpMarker(true)
{
	_Init();
}
コード例 #2
0
ファイル: NTHelper.cpp プロジェクト: wang1986one/duipcmgr
	BOOL CNTProcess::QueryIOCounter( HANDLE hProcess,IO_COUNTERS& ioConter )
	{
		_Init();

		if (m_pfQuery==NULL)
			return FALSE;

		return (m_pfQuery(hProcess,ProcessIoCounters, &ioConter, sizeof(IO_COUNTERS),NULL) >= 0 );
	}
コード例 #3
0
ファイル: Node.cpp プロジェクト: mariuz/haiku
Node::Node(Volume* volume, uint64 blockIndex, const checksumfs_node& nodeData)
	:
	fVolume(volume),
	fBlockIndex(blockIndex),
	fNode(nodeData),
	fNodeDataDirty(false)
{
	_Init();
}
コード例 #4
0
ファイル: NTHelper.cpp プロジェクト: wang1986one/duipcmgr
	BOOL CNTProcess::QueryVMMemory( HANDLE hProcess,VM_COUNTERS& vmCounter )
	{
		_Init();

		if (m_pfQuery==NULL)
			return FALSE;

		return (m_pfQuery(hProcess,ProcessVmCounters, &vmCounter, sizeof(VM_COUNTERS),NULL) >= 0 );
	}
コード例 #5
0
void
TextDocumentLayout::SetTextDocument(const TextDocumentRef& document)
{
	if (fDocument != document) {
		fDocument = document;
		_Init();
		fLayoutValid = false;
	}
}
コード例 #6
0
/*********************************************************************\
	Function name    : CCustomElementSettings::SetData
	Description      :
	Created at       : 11.08.01, @ 23:18:59
	Created by       : Thomas Kunert
	Modified by      :
\*********************************************************************/
void CCustomElementSettings::SetData()
{
    _Init();

    CreateElementList();

    // fill the list view with the elements
    Int32 a = 0;
    while (m_wndListView.RemoveItem(a)) {
        a++;
    }


    if (!g_pCustomElements) return;
    Int32 lElementCount = g_pCustomElements->Entries();
    if (lElementCount == 0) return;

    CCustomElements* pFirst = g_pCustomElements->First();
    a = 0;

    while (pFirst)
    {
        BaseContainer data;
        data.SetString('name', pFirst->m_strName);
        data.SetString('resy', pFirst->m_pChResSym);
        data.SetString('ceid', String::IntToString(pFirst->m_lID));

        m_wndListView.SetItem(a, data);
        a++;
        pFirst = g_pCustomElements->Next(pFirst);
    }

    m_wndListView.DataChanged();

    AutoAlloc<BaseSelect> pSel;
    if (pSel)
    {
        pSel->Select(m_pElement->m_lElement);
        m_lLastID = -1;
        m_wndListView.SetSelection(pSel);
        m_wndListView.DataChanged();
    }

    // write the custom object properties
    if (g_pCustomElements && m_pElement->m_lElement >= 0 && m_pElement->m_lElement < g_pCustomElements->Entries())
    {
        CCustomElements* pElement = g_pCustomElements->GetItem(m_pElement->m_lElement);
        BasePlugin* pPlug = nullptr;
        if (pElement) pPlug = pElement->m_pPlug;
        if (pPlug)
        {
            CustomProperty *prop = CallCustomGuiCmd(pPlug, GetProperties)();
            m_wndSubDlg.Refresh(m_pSettingsDialog, prop, m_pElement);
        }
    }
}
コード例 #7
0
HdSt_TestDriver::HdSt_TestDriver()
 : _engine()
 , _renderDelegate()
 , _renderIndex(nullptr)
 , _sceneDelegate(nullptr)
 , _reprToken()
 , _geomPass()
 , _geomAndGuidePass()
 , _renderPassState(
    boost::dynamic_pointer_cast<HdStRenderPassState>(
        _renderDelegate.CreateRenderPassState()))
{
    if (TfGetenv("HD_ENABLE_SMOOTH_NORMALS", "CPU") == "CPU" ||
        TfGetenv("HD_ENABLE_SMOOTH_NORMALS", "CPU") == "GPU") {
        _Init(HdReprSelector(HdReprTokens->smoothHull));
    } else {
        _Init(HdReprSelector(HdReprTokens->hull));
    }
}
コード例 #8
0
/*********************************************************************
*
*       SEGGER_RTT_HasKey
*
*  Function description
*    Checks if at least one character for reading is available in the SEGGER RTT buffer.
*
*  Return values
*    0      No characters are available to read.
*    1      At least one character is available.
*
*  Notes
*    (1) This function is only specified for accesses to RTT buffer 0
*/
int32_t SEGGER_RTT_HasKey(void) {
  int32_t RdOff;

  _Init();
  RdOff = _SEGGER_RTT.aDown[0].RdOff;
  if (RdOff != _SEGGER_RTT.aDown[0].WrOff) {
    return 1;
  }
  return 0;
}
コード例 #9
0
ファイル: BarApp.cpp プロジェクト: kbjava/haiku
BarTeamInfo::BarTeamInfo(const BarTeamInfo &info)
	:
	teams(new BList(*info.teams)),
	flags(info.flags),
	sig(strdup(info.sig)),
	icon(new BBitmap(*info.icon)),
	name(strdup(info.name))
{
	_Init();
}
コード例 #10
0
// Returns true if init was successfull
// Safe to be called twice during startup
// Override if you want to add custom initialization
// before any other initialisation
//
bool VProcess::Init( VProcess::InitOptions inOptions)
{
	if (!fInitCalled)
	{
		fInitCalled = true;
		fInitOK = _Init( inOptions);
	}
	
	return fInitOK;
}
コード例 #11
0
TextDocumentLayout::TextDocumentLayout(const TextDocumentRef& document)
	:
	fWidth(0.0f),
	fLayoutValid(false),

	fDocument(document),
	fParagraphLayouts()
{
	_Init();
}
コード例 #12
0
ファイル: iwnd_stc.cpp プロジェクト: xuanya4202/ew_base
IWnd_stc::IWnd_stc(wxWindow* p,const WndPropertyEx& h,int w)
:basetype(p,h.id(),h,h,w,h.name())
{

	_Init();
	func.bind(&IWnd_stc::OnDocumentChanged,this);

	this->Connect(wxEVT_RIGHT_UP,wxMouseEventHandler(IWnd_controlT<IWnd_stc>::OnContextEditMenu));
	this->Connect(wxEVT_MENU,wxCommandEventHandler(IWnd_controlT<IWnd_stc>::OnCommandEditEvent));
}
コード例 #13
0
ファイル: ColorField.cpp プロジェクト: AmirAbrams/haiku
// constructor
ColorField::ColorField(BPoint offsetPoint, SelectedColorMode mode,
	float fixedValue, orientation orient, border_style border)
	: BControl(BRect(0.0, 0.0, MAX_X + 4.0, MAX_Y + 4.0)
			.OffsetToCopy(offsetPoint),
		"ColorField", "", new BMessage(MSG_COLOR_FIELD),
		B_FOLLOW_LEFT | B_FOLLOW_TOP, B_WILL_DRAW | B_FRAME_EVENTS)
{
	_Init(mode, fixedValue, orient, border);
	FrameResized(Bounds().Width(), Bounds().Height());
}
コード例 #14
0
ファイル: BMCPrivate.cpp プロジェクト: mylegacy/haiku
_BMCMenuBar_::_BMCMenuBar_(BRect frame, bool fixedSize, BMenuField* menuField)
	:
	BMenuBar(frame, "_mc_mb_", B_FOLLOW_LEFT | B_FOLLOW_TOP, B_ITEMS_IN_ROW,
		!fixedSize),
	fMenuField(menuField),
	fFixedSize(fixedSize),
	fShowPopUpMarker(true)
{
	_Init();
}
コード例 #15
0
ファイル: ParagraphLayout.cpp プロジェクト: naveedasmat/haiku
void
ParagraphLayout::SetParagraph(const Paragraph& paragraph)
{
	fTextSpans = paragraph.TextSpans();
	fParagraphStyle = paragraph.Style();

	_Init();

	fLayoutValid = false;
}
コード例 #16
0
ファイル: BlockerPool.cpp プロジェクト: SummerSnail2014/haiku
// constructor
BlockerPool::BlockerPool(int32 count)
	: Locker("blocker pool"),
	  fFreeBlockersSemaphore(-1),
	  fBlockers(NULL),
	  fInitStatus(B_NO_INIT)
{
	fInitStatus = _Init(count);
	if (fInitStatus != B_OK)
		_Unset();
}
コード例 #17
0
ファイル: BarApp.cpp プロジェクト: kbjava/haiku
BarTeamInfo::BarTeamInfo(BList* teams, uint32 flags, char* sig, BBitmap* icon,
	char* name)
	:
	teams(teams),
	flags(flags),
	sig(sig),
	icon(icon),
	name(name)
{
	_Init();
}
コード例 #18
0
ファイル: ToolBar.cpp プロジェクト: kodybrown/haiku
BToolBar::BToolBar(BRect frame, orientation ont)
	:
	BGroupView(ont),
	fOrientation(ont)
{
	_Init();

	MoveTo(frame.LeftTop());
	ResizeTo(frame.Width(), frame.Height());
	SetResizingMode(B_FOLLOW_LEFT_RIGHT | B_FOLLOW_TOP);
}
コード例 #19
0
ファイル: ACLStr.cpp プロジェクト: Fahrni/ACLLib
ACLStr::ACLStr(IN const BSTR bstr)
{
	_Init();
	if (bstr)
	{
		UINT nStrLen = ::SysStringLen(bstr);
		_Alloc(nStrLen);

		MakeLPTSTR(bstr);
	}
}	// ACLStr(IN BSTR)
コード例 #20
0
NetworkStatusView::NetworkStatusView(BMessage* archive)
	: BView(archive),
	fInDeskbar(false)
{
	app_info info;
	if (be_app->GetAppInfo(&info) == B_OK
		&& !strcasecmp(info.signature, "application/x-vnd.Be-TSKB"))
		fInDeskbar = true;

	_Init();
}
コード例 #21
0
ファイル: ACLStr.cpp プロジェクト: Fahrni/ACLLib
ACLStr::ACLStr(IN LPCTSTR str)
{
	_Init();

	if (str)
	{
		size_t len(STRLEN(str));
		_Alloc(len);
		STRNCPY_S(_string, _realLength, str, len); 
	}
}	// ACLStr(IN LPCTSTR)
コード例 #22
0
PowerStatusView::PowerStatusView(PowerStatusDriverInterface* interface,
	BRect frame, int32 resizingMode,  int batteryID, bool inDeskbar)
	:
	BView(frame, kDeskbarItemName, resizingMode,
		B_WILL_DRAW | B_FULL_UPDATE_ON_RESIZE),
	fDriverInterface(interface),
	fBatteryID(batteryID),
	fInDeskbar(inDeskbar)
{
	_Init();
}
コード例 #23
0
ファイル: hm_uiroot.cpp プロジェクト: rwang82/hmskin
hm_uiroot::hm_uiroot( hmskin_event_listener_base* pEventListener )
: m_pEventListener( pEventListener )
, m_pHWNDDespository( new hm_rs_hwnddepository() )
, m_pMsgSinkFactory( new msg_sink_factory_type() )
, m_pWndMark2CSIdTable( new hm_wmark_csid_table_type() )
, m_pCoordSysFactory( new hm_coordsys_factory_type() )
, m_pWndMark2MSIdTable( new hm_wmark_msid_table_type() )
, m_pKeelObjFactory( new hm_keel_obj_factory() )
, m_pWMPFactory( new hm_wmp_factory() )
{
	_Init();
}
コード例 #24
0
ファイル: unitTestHelper.cpp プロジェクト: rodeofx/USD
Hd_TestDriver::Hd_TestDriver(HdReprSelector const &reprSelector)
 : _engine()
 , _renderDelegate()
 , _renderIndex(nullptr)
 , _sceneDelegate(nullptr)
 , _reprSelector()
 , _geomPass()
 , _geomAndGuidePass()
 , _renderPassState(_renderDelegate.CreateRenderPassState())
{
    _Init(reprSelector);
}
コード例 #25
0
ファイル: DecorInfo.cpp プロジェクト: AmirAbrams/haiku
status_t
DecorInfo::SetTo(const entry_ref& ref)
{
	Unset();

	BPath path(&ref);
	fPath = path.Path();
	fRef = ref;
	_Init();

	return InitCheck();
}
コード例 #26
0
ファイル: BufferGroup.cpp プロジェクト: kodybrown/haiku
BBufferGroup::BBufferGroup(size_t size, int32 count, uint32 placement,
	uint32 lock)
{
	CALLED();
	fInitError = _Init();
	if (fInitError != B_OK)
		return;

	// This one is easy. We need to create "count" BBuffers,
	// each one "size" bytes large. They all go into one
	// area, with "placement" and "lock" attributes.
	// The BBuffers created will clone the area, and
	// then we delete our area. This way BBuffers are
	// independent from the BBufferGroup

	// don't allow all placement parameter values
	if (placement != B_ANY_ADDRESS && placement != B_ANY_KERNEL_ADDRESS) {
		ERROR("BBufferGroup: placement != B_ANY_ADDRESS "
			"&& placement != B_ANY_KERNEL_ADDRESS (0x%#" B_PRIx32 ")\n",
			placement);
		placement = B_ANY_ADDRESS;
	}

	// first we roundup for a better placement in memory
	size_t allocSize = (size + 63) & ~63;

	// now we create the area
	size_t areaSize
		= ((allocSize * count) + B_PAGE_SIZE - 1) & ~(B_PAGE_SIZE - 1);

	void* startAddress;
	area_id bufferArea = create_area("some buffers area", &startAddress,
		placement, areaSize, lock, B_READ_AREA | B_WRITE_AREA);
	if (bufferArea < 0) {
		ERROR("BBufferGroup: failed to allocate %ld bytes area\n", areaSize);
		fInitError = (status_t)bufferArea;
		return;
	}

	buffer_clone_info info;

	for (int32 i = 0; i < count; i++) {
		info.area = bufferArea;
		info.offset = i * allocSize;
		info.size = size;

		fInitError = AddBuffer(info);
		if (fInitError != B_OK)
			break;
	}

	delete_area(bufferArea);
}
コード例 #27
0
BString::BString(const BString& string)
	:
	fPrivateData(NULL)
{
	// check if source is sharable - if so, share else clone
	if (string._IsShareable()) {
		fPrivateData = string.fPrivateData;
		atomic_add(&_ReferenceCount(), 1);
			// string cannot go away right now
	} else
		_Init(string.String(), string.Length());
}
コード例 #28
0
VPictureData_GDIBitmap::VPictureData_GDIBitmap(HBITMAP inBitmap)
{
	_Init();
	fBitmap=inBitmap;
	if(fBitmap)
	{
		BITMAP bm;
		::GetObject(fBitmap,sizeof(BITMAP),&bm);
		fBounds.SetCoords(0,0,bm.bmWidth,bm.bmHeight);
	}
	_SetSafe();
}
コード例 #29
0
ファイル: PackageWriter.cpp プロジェクト: mmanley/Antares
status_t
PackageWriter::Init(const char* fileName)
{
	try {
		return _Init(fileName);
	} catch (status_t error) {
		return error;
	} catch (std::bad_alloc) {
		fprintf(stderr, "Out of memory!\n");
		return B_NO_MEMORY;
	}
}
コード例 #30
0
BMediaFile::BMediaFile(const BUrl& destination, const media_file_format* mfi,
	int32 flags)
{
	CALLED();
	_Init();
	fDeleteSource = true;
	_InitWriter(NULL, &destination, mfi, flags);
	// TODO: Implement streaming server support, it's
	// a pretty complex thing compared to client mode
	// and will require to expand the current BMediaFile
	// design to be aware of it.
}