This section describes the functions of the Oracle Forms Open API Object Library object.
d2folbcr_Create( d2fctx *pd2fctx, d2fob *parent, d2folb **ppd2folb, text *name );
This function creates an object library. You specify a pointer to the context in pd2fctx, a pointer to the parent of the new object library object in parent, a handle for the function to store the newly-created object in ppd2folb, and the name of the new object in name.
This function returns D2FS_SUCCESS if it is able to create a new object library in ppd2folb.
d2folbde_Destroy( d2fctx *pd2fctx, d2folb *pd2folb );
This function destroys the specified object library. You specify a pointer to the context in pd2fctx and a pointer to the object library you want to destroy in pd2folb.
d2folbdl_Delete( d2fctx *pd2fctx, text *name, boolean db );
This function deletes specified object library. You specify a pointer to the context in pd2fctx, a pointer to a text string for the name of the object library in name, and a boolean flag to indicate if the object library is to be deleted from a database (for example, an open library, a form module, or a menu module) in db.
If db is TRUE, the Forms API assumes that you want to delete the specified object library from a database; if db is FALSE, the Forms API searches the file system for the specified object library and then deletes it.
d2folbdu_Duplicate( d2fctx *pd2fctx, d2fob *new_parent, d2olb *pd2folb_src, d2folb **ppd2folb_dst, text *new_name );
This function duplicates the specified object library. You specify a pointer to the context in pd2fctx, a pointer to the new parent in new_parent, a pointer to the object library source in pd2folb_src, a handle for the function to store the destination in ppd2folb_dst, and a pointer for the name of the new object library (new_name).
This function returns D2FS_SUCCESS if it is able duplicate the specified object library and place it at the ppd2folb_dst location.
d2folbao_AddObj( d2fctx *pd2fctx, d2folb *pd2folb, d2folt *pd2folt, d2fob *pd2fob, d2fob **ppd2fob, boolean replace );
This function adds a copy of the specified object to an object library. You specify a pointer to the context in pd2fctx, a pointer to the object library in pd2folb, a pointer to the tab page object in pd2folt, a pointer to the object you want to add to the object library in pd2fob, a handle for the function to return the newly-created object in ppd2fob, and a boolean flag, replace, to indicate what the function should do in the event that an object already exists with this name.
If an object of the same name and type already exists and if you set replace to TRUE, the function replaces the existing object with the new object; if it is set to FALSE, the function returns an error (D2FS_OBJNOTUNIQUE).
d2folbro_RemoveObj( d2fctx *pd2fctx, d2folb *po2olb, d2fob *pd2fob );
This function removes the specified object from an object library. You specify a pointer to the context in pd2fctx, a pointer to the object library in pd2folb, and a pointer to the object you want to remove from the object library in pd2fob.
d2folbf2_Findobjbypos( d2fctx *pd2fctx, d2folb *pd2folb, number pos, d2fob **ppret_obj);
This function returns the specified object’s position within the object library. You specify a pointer to the context in pd2fctx, a pointer to an object library in pd2folb, the position of the object in the object library in pos, and a handle to the returned object in ppret_obj.
Note that there is a Forms API property called D2FP_OBJ_COUNT that you can use to retrieve the count of all associated objects for a specific object library.
d2folbld_Load( d2fctx *pd2fctx, d2folb **pd2folb, text *olibname, boolean db );
This function loads the specified object library. You specify the context (pd2fctx), a handle to a pointer for the function to use to store the object library (ppd2folb), the name of the object library (olibname), and a boolean flag (db) to indicate if the object library is in a database.
If you set db to TRUE, the Forms API searches for the specified object library in the database. Note that this assumes that you have connected to some database. You must call d2fctx_Connect() before you load a object library from a database.
d2folbfv_FileVersion( d2fctx *pd2fctx, text *olibname, boolean db, number *version );
This function returns the version of the file. You specify the context (pd2fctx), the object library name (olibname), a boolean flag (db) to indicate if the object library is in a database or the file system, and a pointer for the version returned by the function (version).
Note that you should call this function prior to calling the d2folbld_Load() function, since the file version will change once you load the object library.
d2folbgb_GetBoolProp( d2fctx *pd2fctx, d2folb *pd2folb, ub2 pnum, boolean *pprp );
This function retrieves a property of type boolean for the specified object library. You specify a pointer to the context in pd2fctx, the object library in pd2folb, the property number in pnum, and a pointer to pprp, to store the boolean value.
This function returns D2FS_SUCCESS if it stores the value of the boolean property in pprp.
d2folbgn_GetNumProp( d2fctx *pd2fctx, d2folb *pd2folb, ub2 pnum, number *pprp );
This function retrieves a property of type number (an actual scalar constant) for the specified object library. You specify a pointer to the context in pd2fctx, the object library in pd2folb, the property number in pnum, and a pointer to pprp, to store the numeric value.
This function returns D2FS_SUCCESS if it stores the value of the number property in pprp.
d2folbgt_GetTextProp( d2fctx *pd2fctx, d2folb *pd2folb, ub2 pnum, text **pprp );
This function retrieves a property of type text for the specified object library. You specify a pointer to the context in pd2fctx, the object library in pd2folb, the property number in pnum, and a handle to an array of characters in pprp for the function to store the text property value.
This function returns D2FS_SUCCESS if it fills the supplied array with a copy of the text property value for the specified object library in pprp.
Note that the client is responsible for freeing the text returned by this function.
d2folbgo_GetObjectProp( d2fctx *pd2fctx, d2folb *pd2folb, ub2 pnum, dvoid **pprp );
This function retrieves a property of type object of the specified object library. You specify a pointer to the context in pd2fctx, the object library in pd2folb, a property number in pnum, and a handle to pprp, for the function to store the object property value.
This function returns D2FS_SUCCESS if it stores a handle to the desired object property in pprp.
d2folbgp_GetBlobProp( d2fctx *pd2fctx, d2folb *pd2folb, ub2 pnum, dvoid **pprp );
This function retrieves the value from the client-specified handle. You specify a pointer to the context in pd2fctx, a pointer to the object library in pd2folb, a property number in pnum, and a handle to pprp, for the function to provide access to the client-specified value.
This function returns D2FS_SUCCESS if it stores a handle to the desired client-specified property in pprp.
d2folbsb_SetBoolProp( d2fctx *pd2fctx, d2folb *pd2folb, ub2 pnum, boolean prp );
This function sets the value of the specified object library boolean property. You specify a pointer to the context in pd2fctx, the object library in pd2folb, the property number in pnum, and the boolean value in prp.
This function returns D2FS_SUCCESS if it sets the boolean property with the value you specify in prp.
d2folbsn_SetNumProp( d2fctx *pd2fctx, d2folb *pd2folb, ub2 pnum, number prp );
This function sets the value of the specified object library number property. You specify a pointer to the context in pd2fctx, the object library in pd2folb, the property number in pnum, and the number value in prp.
This function returns D2FS_SUCCESS if it sets the number property with the value you specify in prp.
d2folbst_SetTextProp( d2fctx *pd2fctx, d2folb *pd2folb, ub2 pnum, text *prp );
This function sets the value of the specified object library text property. You specify a pointer to the context in pd2fctx, the object library in pd2folb, the property number in pnum, and a handle to the text value in prp.
This function returns D2FS_SUCCESS if it sets the specified text property with the value stored in prp.
d2folbso_SetObjectProp( d2fctx *pd2fctx, d2folb *pd2folb, ub2 pnum, dvoid *prp );
This function sets the object of the specified object library property. You specify a pointer to the context in pd2fctx, the object library in pd2folb, a property number in pnum, and a handle to the object property in prp.
This function returns D2FS_SUCCESS if it sets the specified object property with the value stored in prp.
d2folbsp_SetBlobProp( d2fctx *pd2fctx, d2folb *pd2folb, ub2 pnum, dvoid *prp );
This function sets the client-specified handle. You specify a pointer to the context in pd2fctx, a pointer to the specified object library in pd2folb, a property number in pnum, and a pointer to the client-specified value in prp.
This function returns D2FS_SUCCESS if it sets the client-specified handle with the value stored in prp.
d2folbhp_HasProp( d2fctx *pd2fctx, d2folb *pd2folb, ub2 pnum );
This function queries the specified object library for the specified property. You specify a pointer to the context in pd2fctx, the object library in pd2folb, and a property number in pnum.
If the function succeeds, it returns D2FS_YES or D2FS_NO, depending on whether the object has the specified property; otherwise, the function can return a number of possible return values, depending on the circumstances. For a complete list of the valid Open Forms API return values, refer to the "About Open API function return codes" section.
d2folbip_InheritProp( d2fctx *pd2fctx, d2folb *pd2folb, ub2 pnum );
This function enables the specified object library to inherit the specified property. You specify a pointer to the context in pd2fctx, a pointer to the object library in pd2folb, and the property number in pnum.
If the function succeeds, it returns D2FS_YES or D2FS_NO, depending on whether the object has been modified to inherit the specified property; otherwise, the function can return a number of possible return values, depending on the specific circumstances. For a complete list of the valid Open Forms API return values, refer to the "About Open API function return codes" section.
d2folbii_IspropInherited( d2fctx *pd2fctx, d2folb *pd2folb, ub2 pnum );
This function verifies that the specified object’s property is inherited, as is, from its parent object. You specify a pointer to the context in pd2fctx, a pointer to the object library object in pd2folb, and the property number in pnum.
If the function succeeds, it returns D2FS_YES or D2FS_NO, depending on whether the property is inherited from the specified object’s parent; otherwise, the function can return a number of possible return values, depending on the specific circumstances. For a complete list of the valid Open Forms API return values, refer to the "About Open API function return codes" section.
d2folbss_SetSmartclass( d2fctx *pd2fctx, d2folb *pd2folb, d2fob *pd2fob, boolean state);
This function sets the specified object library as a member of a smart class. You specify a pointer to the context in pd2fctx, a pointer to an object library object in pd2folb, a pointer to the object you want to become a smart class member in pd2fob, and a boolean toggle in state to indicate to the Forms API whether to set the specified object as a member of a smart class. If state is set to TRUE, the Forms API flags the specified object as a smart class member; if state is set to FALSE, the Forms API sets the object as a non-member of the smart class.
d2folbis_IsSmartclassed( d2fctx *pd2fctx, d2folb *pd2folb, d2fob *pd2fob );
This function returns D2FS_YES if the specified object (pd2fob) is a smart class. You specify a pointer to the context in pd2fctx, the object library in pd2folb, and the object in pd2fob.
d2folbsd_SetDesc ( d2fctx *pd2fctx, d2folb *pd2folb, d2fob *pd2fob, text *desc );
This function returns D2FS_SUCCESS if the Forms API sets the short description for the specified object. You specify a pointer to the context in pd2fctx, the object library in pd2folb, the object in pd2fob, and a pointer to the actual short description in desc.
d2folbgd_GetDesc ( d2fctx *pd2fctx, d2folb *pd2folb, d2fob *pd2fob, text **desc );
This function returns D2FS_SUCCESS if the Forms API retrieves the short description for the specified object. You specify a pointer to the context in pd2fctx, the object library in pd2folb, the object in pd2fob, and a handle for the function to return the short description in desc.
Creating modules using the Open API