Mac-Carbon
view release on metacpan or search on metacpan
Components/Components.xs view on Meta::CPAN
Component aComponent
=item FindNextComponent ACOMPONENT, [COMPONENTTYPE, [COMPONENTSUBTYPE, [COMPONENTMANUFACTURER, [COMPONENTFLAGS, [COMPONENTFLAGSMASK]]]]]
The FindNextComponent function returns the component identifier of a component
that meets the search criteria. FindNextComponent returns a function result of 0
when there are no more matching components.
=cut
Component
FindNextComponent(aComponent, componentType = &PL_sv_undef, componentSubType = &PL_sv_undef, componentManufacturer = &PL_sv_undef, componentFlags = 0, componentFlagsMask = 0)
Component aComponent
SV * componentType
SV * componentSubType
SV * componentManufacturer
unsigned long componentFlags
unsigned long componentFlagsMask
CODE:
RETVAL =
FindNextComponent(
aComponent,
MakeComponentDesc(componentType, componentSubType, componentManufacturer, componentFlags, componentFlagsMask));
OUTPUT:
RETVAL
=item CountComponents [COMPONENTTYPE, [COMPONENTSUBTYPE, [COMPONENTMANUFACTURER, [COMPONENTFLAGS, [COMPONENTFLAGSMASK]]]]]
The CountComponents function returns a long integer containing the number of
components that meet the specified search criteria.
=cut
long
CountComponents(componentType = &PL_sv_undef, componentSubType = &PL_sv_undef, componentManufacturer = &PL_sv_undef, componentFlags = 0, componentFlagsMask = 0)
SV * componentType
SV * componentSubType
SV * componentManufacturer
unsigned long componentFlags
unsigned long componentFlagsMask
CODE:
RETVAL =
CountComponents(
MakeComponentDesc(componentType, componentSubType, componentManufacturer, componentFlags, componentFlagsMask));
OUTPUT:
RETVAL
=item GetComponentInfo ACOMPONENT
The GetComponentInfo function returns information about the specified component.
($type, $subtype, $manufacturer, $flags, $mask, $name, $info) =
GetComponentInfo($Component);
=cut
void
GetComponentInfo(aComponent)
Component aComponent
PREINIT:
ComponentDescription desc;
Handle name;
Handle info;
PPCODE:
name = NewEmptyHandle();
info = NewEmptyHandle();
gMacPerl_OSErr = GetComponentInfo(aComponent, &desc, name, info, nil);
HLock(name);
HLock(info);
if (!gMacPerl_OSErr)
if (GIMME != G_ARRAY) {
if (*name == NULL) {
XS_XPUSH(Str255, "");
} else {
XS_XPUSH(Str255, (StringPtr)*name);
}
} else {
XPUSHs(sv_2mortal(MakeOSSV(desc.componentType)));
XPUSHs(sv_2mortal(MakeOSSV(desc.componentSubType)));
XPUSHs(sv_2mortal(MakeOSSV(desc.componentManufacturer)));
XPUSHs(sv_2mortal(newSViv(desc.componentFlags)));
XPUSHs(sv_2mortal(newSViv(desc.componentFlagsMask)));
if (*name == NULL) {
XS_XPUSH(Str255, "");
} else {
XS_XPUSH(Str255, (StringPtr)*name);
}
if (*info == NULL) {
XS_XPUSH(Str255, "");
} else {
XS_XPUSH(Str255, (StringPtr)*info);
}
}
DisposeHandle(name);
DisposeHandle(info);
=item GetComponentListModSeed
The GetComponentListModSeed function allows you to determine if the list of
registered components has changed. This function returns the value of the
component registration seed number.
=cut
long
GetComponentListModSeed()
=item OpenComponent ACOMPONENT
The OpenComponent function allows your application to gain access to the services
provided by a component. Your application must open a component before it can
call any component functions. You specify the component with a component
identifier that your application previously obtained from the FindNextComponent
function.
Returns ComponentInstance.
=cut
ComponentInstance
OpenComponent(aComponent)
Component aComponent
=item CloseComponent ACOMPONENTINSTANCE
The CloseComponent function terminates your applicationÕs access to the services
provided by a component. Your application specifies the connection to be closed
( run in 0.758 second using v1.01-cache-2.11-cpan-5511b514fd6 )