mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-11-23 14:59:47 +03:00
added mode parameter to function find_gui_window
svn path=/trunk/netsurf/; revision=13278
This commit is contained in:
parent
3b8de08f60
commit
66f53b22e2
43
atari/misc.c
43
atari/misc.c
@ -99,25 +99,44 @@ bool path_add_part(char *path, int length, const char *newpart)
|
||||
strncat(path, newpart, length);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
// TBD: make use of this function or remove it...
|
||||
*/
|
||||
struct gui_window * find_gui_window( unsigned long handle, short mode ){
|
||||
|
||||
struct gui_window * find_gui_window( WINDOW * win ){
|
||||
|
||||
struct gui_window * gw;
|
||||
gw = window_list;
|
||||
|
||||
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 )
|
||||
{
|
||||
|
@ -21,6 +21,7 @@
|
||||
|
||||
#include "cflib.h"
|
||||
#include "desktop/textinput.h"
|
||||
#include "atari/gui.h"
|
||||
|
||||
#define SBUF8_TO_LBUF8(sbuf,lbuf)\
|
||||
lbuf[0] = (long)sbuf[0];\
|
||||
@ -32,8 +33,12 @@
|
||||
lbuf[6] = (long)sbuf[6];\
|
||||
lbuf[7] = (long)sbuf[7];
|
||||
|
||||
|
||||
/* Modes for find_gui_window: */
|
||||
#define BY_WINDOM_HANDLE 0x0
|
||||
#define BY_GEM_HANDLE 0x1
|
||||
|
||||
struct gui_window * find_gui_window( WINDOW * win );
|
||||
struct gui_window * find_gui_window( unsigned long, short mode );
|
||||
struct gui_window * find_cmp_window( COMPONENT * c );
|
||||
OBJECT *get_tree( int idx );
|
||||
char *get_rsc_string( int idx );
|
||||
|
Loading…
Reference in New Issue
Block a user