diff options
author | Ole Loots <ole@monochrom.net> | 2012-11-18 23:22:43 +0100 |
---|---|---|
committer | Ole Loots <ole@monochrom.net> | 2012-11-18 23:22:43 +0100 |
commit | c415f9bf989f83c7ced6bb930e3421dab6f4093b (patch) | |
tree | 24c552b5f1d8194b518538d04587f8b2c556a2f0 /atari/misc.c | |
parent | e042008f2b7295243d2e6c72f948febe3cad0516 (diff) | |
download | netsurf-c415f9bf989f83c7ced6bb930e3421dab6f4093b.tar.gz netsurf-c415f9bf989f83c7ced6bb930e3421dab6f4093b.tar.bz2 |
Start to remove windom, wip.
- Refactored menu event handling.
- Load plain GEM resources.
- Refactored Event handling
Diffstat (limited to 'atari/misc.c')
-rwxr-xr-x | atari/misc.c | 56 |
1 files changed, 11 insertions, 45 deletions
diff --git a/atari/misc.c b/atari/misc.c index 8b745fd2f..575e96491 100755 --- a/atari/misc.c +++ b/atari/misc.c @@ -42,7 +42,7 @@ #include "atari/browser.h"
#include "atari/misc.h" #include "atari/encoding.h" -#include "atari/msgbox.h" +#include "atari/gemtk/gemtk.h" #include "cflib.h"
extern void * h_gem_rsrc;
@@ -111,10 +111,7 @@ bool path_add_part(char *path, int length, const char *newpart) 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_guiwin_by_aes_handle(short handle){
struct gui_window * gw;
gw = window_list;
@@ -122,29 +119,17 @@ struct gui_window * find_gui_window( unsigned long handle, short mode ){ 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 );
- }
- else
- 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;
- } + + while(gw != NULL) {
+ if( gw->root->handle != NULL + && gw->root->handle->handle == handle ) {
+ return(gw);
+ }
+ else
+ gw = gw->next;
}
- return( NULL );
+ return( NULL );
} @@ -260,25 +245,6 @@ bool is_process_running(const char * name) }
-/* -------------------------------------------------------------------------- */
-/* GEM Utillity functions: */
-/* -------------------------------------------------------------------------- */
-
-/* Return a string from resource file */
-char *get_rsc_string( int idx) {
- char *txt;
- RsrcGaddr( h_gem_rsrc, R_STRING, idx, &txt );
- return txt;
-}
-
-OBJECT *get_tree( int idx) {
- OBJECT *tree;
- RsrcGaddr( h_gem_rsrc, R_TREE, idx, &tree);
- return tree;
-} - - - /** * Callback for load_icon(). Should be removed once bitmaps get loaded directly * from disc |