summaryrefslogtreecommitdiff
path: root/atari/misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'atari/misc.c')
-rwxr-xr-xatari/misc.c43
1 files changed, 31 insertions, 12 deletions
diff --git a/atari/misc.c b/atari/misc.c
index e91c167de..06ef4e406 100755
--- a/atari/misc.c
+++ b/atari/misc.c
@@ -99,25 +99,44 @@ bool path_add_part(char *path, int length, const char *newpart)
strncat(path, newpart, length);
return true;
-}
-
-struct gui_window * find_gui_window( WINDOW * win ){
-
- struct gui_window * gw;
- gw = window_list;
+}
+
+/*
+ // TBD: make use of this function or remove it...
+*/
+struct gui_window * find_gui_window( unsigned long handle, short mode ){
- if( win == NULL )
- return( NULL );
+ struct gui_window * gw;
+ gw = window_list;
+ if( handle == 0 ){
+ return( NULL );
+ }
+ else if( mode == BY_WINDOM_HANDLE ){
+ WINDOW * win = (WINDOW*) handle;
while( gw != NULL) {
if( gw->root->handle == win ) {
- return( gw );
+ return( gw );
}
else
- gw = gw->next;
- }
+ gw = gw->next;
+ }
+ }
+ else if( mode == BY_GEM_HANDLE ){
+ short ghandle = (short)handle;
+ while( gw != NULL) {
+ if( gw->root->handle != NULL
+ && gw->root->handle->handle == ghandle ) {
+ return( gw );
+ }
+ else
+ gw = gw->next;
+ }
+ }
+
return( NULL );
-}
+}
+*/
struct gui_window * find_cmp_window( COMPONENT * c )
{