diff options
author | Ole Loots <ole@monochrom.net> | 2011-12-15 23:04:31 +0000 |
---|---|---|
committer | Ole Loots <ole@monochrom.net> | 2011-12-15 23:04:31 +0000 |
commit | 66f53b22e21e7b8153b2065824f3c468d0065817 (patch) | |
tree | c13fcd763e072cda36ab6a0f1a17497d8ceeed40 /atari/misc.c | |
parent | 3b8de08f601c516b9a7831aeaa88ea678d8d54d4 (diff) | |
download | netsurf-66f53b22e21e7b8153b2065824f3c468d0065817.tar.gz netsurf-66f53b22e21e7b8153b2065824f3c468d0065817.tar.bz2 |
added mode parameter to function find_gui_window
svn path=/trunk/netsurf/; revision=13278
Diffstat (limited to 'atari/misc.c')
-rwxr-xr-x | atari/misc.c | 43 |
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 )
{
|