Documentation | ApplicationKit | PropertyInfo
SYNOPSIS
Perl
use HaikuR1::PropertyInfo qw(B_COMMAND_KIND B_TYPE_CODE_KIND);
my $pinfo = PropertyInfo();
my $messenger = HaikuR1::Messenger->($target_application);
my $reply = $messenger->SendMessage(
message => $message,
synchronous => 1,
)
$reply->FindFlat('messages', $pinfo)
$pinfo->PrintToStream()
Python
from HaikuR1.ApplicationKit import PropertyInfo, B_COMMAND_KIND, B_TYPE_CODE_KIND
pinfo = PropertyInfo()
messenger = Messenger->(target_application)
reply = messenger.SendMessage(
message = message,
synchronous = 1,
)
reply.FindFlat('messages', pinfo)
pinfo.PrintToStream()
DESCRIPTION
Exposes the PropertyInfo object.
For more information on PropertyInfo, see the Be Book class description, the Be Book overview, and the Haiku Book class description.
METHODS
Constructor
Creates a PropertyInfo object.
Perl
HaikuR1::PropertyInfo->new($prop, $value);
Python
PropertyInfo(prop, value)
propOptional, a property_info structure, the property information.
valueOptional, a value_info structure, the value information.
CountProperties
Returns the number of properties in the object.
Perl
$propertyinfo->CountProperties();
Python
propertyinfo.CountProperties()
CountValues
Returns the number of values in the object.
Perl
$propertyinfo->CountValues();
Python
propertyinfo.CountValues()
FindMatch
Searches through the PropertyInfo object for a property_info structure
that matches. Returns two items: the index of the matched property and an
integer containing the value of the extra_data field in the property_info
structure.
Perl
$propertyinfo->FindMatch(
message => $message,
wildcard_only => $wildcard_only,
specifier_message => $specifier_message,
specifier => $specifier,
name => $name,
);
Python
propertyinfo.FindMatch(
message = message,
wildcard_only = wildcard_only,
specifier_message = specifier_message,
specifier = specifier,
name = name,
)
messageA Message; its what field should contain the command constant to search for.
wildcard_onlyA boolean; if true, only searches "wildcard" commands; else searches all commands. (In both cases, it will still match against "wildcard" commands; the difference is that if this parameter is true, it will stop after checking the wildcard.)
specifier_msgA Message, unused at this time.
specifierAn integer specifier constant, the specifier to search for.
nameA native string, the propery name to search for.
PrintToStream
Dumps the object's properties to standard out in a human-readable format.
Perl
$propertyinfo->PrintToStream();
Python
propertyinfo.PrintToStream()
Properties
Returns a list of property_info structures representing the object's properties.
Perl
$propertyinfo->Properties();
Python
propertyinfo.Properties()
Values
Returns a list of value_info structures representing the object's values.
Perl
$propertyinfo->Values();
Python
propertyinfo.Values()
FLATTENABLE INTERFACE
PropertyInfo inherits the methods and hooks of
Flattenable.
The following differ from the Flattenable versions:
IsFixedSize
Always return false.
TypeCode
Returns B_PROPERTY_INFO_TYPE.
AllowsTypeCode
Checks against B_PROPERTY_INFO_TYPE.
CONSTANTS
Value kinds
Used in the kind field of the value_info structure.
Perl
use HaikuR1::Message qw(:value_kind)
Python
Python does not support export tags.
- B_COMMAND_KIND
- B_TYPE_CODE_KIND