Jump to content

GpiQueryInitialSegmentAttrs

From EDM2
Revision as of 22:58, 6 April 2025 by Iturbide (talk | contribs) (Created page with "This function returns the current value of a particular initial segment attribute. ==Syntax== GpiQueryInitialSegmentAttrs(hps, lAttribute) ==Parameters== ; hps (HPS) - input : Presentation-space handle. ; lAttribute (LONG) - input : Attribute to be queried. : Identifies the attribute to be returned by this function: :; ATTR_DETECTABLE :: Detectability :; ATTR_VISIBLE :: Visibility :; ATTR_CHAINED :: Chained :; ATTR_DYNAMIC :: Dynamic :; ATTR_FASTCHAIN :: Fast...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This function returns the current value of a particular initial segment attribute.

Syntax

GpiQueryInitialSegmentAttrs(hps, lAttribute)

Parameters

hps (HPS) - input
Presentation-space handle.
lAttribute (LONG) - input
Attribute to be queried.
Identifies the attribute to be returned by this function:
ATTR_DETECTABLE
Detectability
ATTR_VISIBLE
Visibility
ATTR_CHAINED
Chained
ATTR_DYNAMIC
Dynamic
ATTR_FASTCHAIN
Fast chaining
ATTR_PROP_DETECTABLE
Propagate detectability
ATTR_PROP_VISIBLE
Propagate visibility.

Return Value

lValue (LONG) - returns
Current initial attribute value.
ATTR_ON
On/yes
ATTR_OFF
Off/no
ATTR_ERROR
Error.

Remarks

Initial segment attributes are modal settings used to determine the initial attributes of new segments as those new segments are created; see GpiSetInitialSegmentAttrs.

Errors

Possible returns from WinGetLastError:

PMERR_INV_HPS (0x207F)
An invalid presentation-space handle was specified.
PMERR_PS_BUSY (0x20F4)
An attempt was made to access the presentation space from more than one thread simultaneously.
PMERR_INV_SEG_ATTR (0x20C5)
An invalid attribute parameter was specified with GpiSetSegmentAttrs, GpiQuerySegmentAttrs, GpiSetInitialSegmentAttrs, or GpiQueryInitialSegmentAttrs.
PMERR_INV_MICROPS_FUNCTION (0x20A1)
An attempt was made to issue a function that is invalid in a micro presentation space.

Example Code

#define INCL_GPISEGMENTS /* Or use INCL_GPI, INCL_PM, */
#include <os2.h>

HPS  hps;        /* Presentation-space handle. */
LONG lAttribute; /* Attribute to be queried. */
LONG lValue;     /* Current initial attribute value. */

lValue = GpiQueryInitialSegmentAttrs(hps, lAttribute);

This example uses GpiQueryInitialSegmentAttrs to queries the current state of the dynamic segment attribute.

#define INCL_GPISEGMENTS /* Segment functions */
#include <os2.h>

LONG lValue; /* current element pointer */
HPS hps; /* Presentation-space handle */
LONG lAttribute; /* attribute to query */

/* query the dynamic attribute */
lAttribute = ATTR_DYNAMIC;
lValue = GpiQueryInitialSegmentAttrs(hps, lAttribute);

Related Functions