home *** CD-ROM | disk | FTP | other *** search
- /*
- #### # # # #
- # # # # # The FreeWare C library for
- # # ## ### # # # # ### RISC OS machines
- # # # # # # # # # # # ___________________________________
- # # #### ### ## # # # #
- # # # # # # # # # # Please refer to the accompanying
- #### ### #### # # ##### # ### documentation for conditions of use
- ________________________________________________________________________
-
- File: Window.ParentName.c
- Author: Copyright © 1992 Jason Williams
- Version: 1.00 (19 Mar 1992)
- Purpose: High-level window management functions: Return template window
- was created from (if known)
- */
-
-
- #include "LinkList.h"
- #include "Window.h"
-
- #include "WindowDefs.h"
-
- #include <stdlib.h>
- #include "string.h"
-
- extern linklist_header window_listanchor;
-
-
-
- extern void Window_ParentName(window_handle window, char *windowname)
- {
- windowrec *record;
-
- if (window < 0)
- {
- strcpy(windowname, "iconbar");
- return;
- }
-
- windowname[0] = '\0'; /* in case window not found, ensure valid output */
-
- record = (windowrec *) window_listanchor.next;
- while (record != NULL)
- {
- if (window == record->window)
- break;
- record = (windowrec *) record->header.next;
- }
-
- if (record != NULL)
- strncpy(windowname, record->templatename, 8);
- }
-