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)
prop
Optional, a property_info structure, the property information.
value
Optional, 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, )
message
A Message; its what field should contain the command constant to search for.
wildcard_only
A 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_msg
A Message, unused at this time.
specifier
An integer specifier constant, the specifier to search for.
name
A 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