749N/ACopyright 1989, 1994, 1998 The Open Group 749N/AThe above copyright notice and this permission notice shall be included in 749N/Aall copies or substantial portions of the Software. 749N/ATHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 749N/AIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 749N/AFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 749N/AOPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 749N/AAN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 749N/ACONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 749N/AExcept as contained in this notice, the name of The Open Group shall not be 749N/Aused in advertising or otherwise to promote the sale, use or other dealings 749N/Ain this Software without prior written authorization from The Open Group. 749N/A * Author: Chris Peterson, MIT X Consortium. 749N/A * Much code taken from X11R3 String and Disk Sources. 749N/A/**************************************************************** 749N/A * Full class record constant 749N/A ****************************************************************/ 749N/A /* class_name */ "TextSrc",
749N/A/* textSrc_class fields */ 749N/A * We don't need to check for null super since we'll get to TextSrc 749N/A/************************************************************ 749N/A * Class specific methods. 749N/A ************************************************************/ 749N/A * Description: This function reads the source. 749N/A * Arguments: w - the TextSrc Object. 749N/A * pos - position of the text to retreive. 749N/A * RETURNED text - text block that will contain returned text. 749N/A * length - maximum number of characters to read. 749N/A * Returns: The number of characters read into the buffer. 749N/A "TextSrc Object: No read function is defined.");
749N/A/* Function Name: Replace. 749N/A * Description: Replaces a block of text with new text. 749N/A * Arguments: src - the Text Source Object. 749N/A * startPos, endPos - ends of text that will be removed. 749N/A * text - new text to be inserted into buffer at startPos. 749N/A * Returns: XawEditError. 749N/A * Description: Scans the text source for the number and type 749N/A * Arguments: w - the TextSrc Object. 749N/A * position - the position to start scanning. 749N/A * type - type of thing to scan for. 749N/A * dir - direction to scan. 749N/A * count - which occurance if this thing to search for. 749N/A * include - whether or not to include the character found in 749N/A * the position that is returned. 749N/A * Returns: EXITS WITH AN ERROR MESSAGE. 749N/A "TextSrc Object: No SCAN function is defined.");
749N/A/* Function Name: Search 749N/A * Description: Searchs the text source for the text block passed 749N/A * Arguments: w - the TextSource Object. 749N/A * position - the position to start scanning. 749N/A * dir - direction to scan. 749N/A * text - the text block to search for. 749N/A * Returns: XawTextSearchError. 749N/A/* Function Name: ConvertSelection 749N/A * Description: Dummy selection converter. 749N/A * Arguments: w - the TextSrc object. 749N/A * selection - the current selection atom. 749N/A * target - the current target atom. 749N/A * type - the type to conver the selection to. 749N/A * RETURNED value, length - the return value that has been converted. 749N/A * RETURNED format - the format of the returned value. 749N/A * Returns: TRUE if the selection has been converted. 749N/A/* Function Name: SetSelection 749N/A * Description: allows special setting of the selection. 749N/A * Arguments: w - the TextSrc object. 749N/A * left, right - bounds of the selection. 749N/A * selection - the selection atom. 749N/A /* This space intentionally left blank. */ 749N/A/************************************************************ 749N/A ************************************************************/ 749N/A/* Function Name: XawTextSourceRead 749N/A * Description: This function reads the source. 749N/A * Arguments: w - the TextSrc Object. 749N/A * pos - position of the text to retreive. 749N/A * RETURNED text - text block that will contain returned text. 749N/A * length - maximum number of characters to read. 749N/A * Returns: The number of characters read into the buffer. 749N/A "XawTextSourceRead's 1st parameter must be subclass of asciiSrc.",
749N/A/* Function Name: XawTextSourceReplace. 749N/A * Description: Replaces a block of text with new text. 749N/A * Arguments: src - the Text Source Object. 749N/A * startPos, endPos - ends of text that will be removed. 749N/A * text - new text to be inserted into buffer at startPos. 749N/A * Returns: XawEditError or XawEditDone. 749N/A "XawTextSourceReplace's 1st parameter must be subclass of asciiSrc.",
749N/A/* Function Name: XawTextSourceScan 749N/A * Description: Scans the text source for the number and type 749N/A * Arguments: w - the TextSrc Object. 749N/A * position - the position to start scanning. 749N/A * type - type of thing to scan for. 749N/A * dir - direction to scan. 749N/A * count - which occurance if this thing to search for. 749N/A * include - whether or not to include the character found in 749N/A * the position that is returned. 749N/A * Returns: The position of the text. 749N/A "XawTextSourceScan's 1st parameter must be subclass of asciiSrc.",
749N/A/* Function Name: XawTextSourceSearch 749N/A * Description: Searchs the text source for the text block passed 749N/A * Arguments: w - the TextSource Object. 749N/A * position - the position to start scanning. 749N/A * dir - direction to scan. 749N/A * text - the text block to search for. 749N/A * Returns: The position of the text we are searching for or 749N/A "XawTextSourceSearch's 1st parameter must be subclass of asciiSrc.",
749N/A/* Function Name: XawTextSourceConvertSelection 749N/A * Description: Dummy selection converter. 749N/A * Arguments: w - the TextSrc object. 749N/A * selection - the current selection atom. 749N/A * target - the current target atom. 749N/A * type - the type to conver the selection to. 749N/A * RETURNED value, length - the return value that has been converted. 749N/A * RETURNED format - the format of the returned value. 749N/A * Returns: TRUE if the selection has been converted. 749N/A "XawTextSourceConvertSelectionXawTextSourceConvertSelection's 1st parameter must be subclass of asciiSrc.",
749N/A/* Function Name: XawTextSourceSetSelection 749N/A * Description: allows special setting of the selection. 749N/A * Arguments: w - the TextSrc object. 749N/A * left, right - bounds of the selection. 749N/A * selection - the selection atom. 749N/A "'s 1st parameter must be subclass of asciiSrc.",
749N/A/******************************************************************** 749N/A * External Functions for Multi Text. 749N/A ********************************************************************/ 749N/A * returns the format of text: FMT8BIT or FMTWIDE. 749N/A * convert the wchar string to external encoding. 749N/A * The caller is responsible for freeing both the source and ret string. 749N/A * wstr - source wchar string. 749N/A * len_in_out - lengh of string. 749N/A * As In, length of source wchar string, measured in wchar. 749N/A * As Out, length of returned string. 749N/A * convert the string to internal processing codeset WC. 749N/A * The caller is responsible for freeing both the source and ret string. 749N/A * len_in_out - lengh of string. 749N/A * As In, it is length of source string. 749N/A * As Out, it is length of returned string, measured in wchar. 749N/A return (
NULL);
/* The above function doesn't really return. */ 749N/A return (
NULL);
/* The above function doesn't really return. */