26#include <mint/osbind.h>
45#include "atari/gemtk/gemtk.h"
58 size_t len = 1 + ((warning != NULL) ? strlen(
messages_get(warning)) :
59 0) + ((detail != 0) ? strlen(detail) : 0);
63 printf(
"%s\n", message);
64 gemtk_msg_box_show(GEMTK_MSG_BOX_ALERT, message);
69void die(
const char *error)
71 printf(
"%s\n", error);
72 gemtk_msg_box_show(GEMTK_MSG_BOX_ALERT, error);
88 && gemtk_wm_get_handle(gw->
root->
win) == handle) {
106 if (( dir = opendir(
"U:/kern")) == NULL)
109 while ((de = readdir( dir)) != NULL) {
110 dirname = de->d_name;
112 if( dirname[0] !=
'1' && dirname[0] !=
'2' && dirname[0] !=
'3' && dirname[0] !=
'4' && dirname[0] !=
'5'
113 && dirname[0] !=
'6' && dirname[0] !=
'7' && dirname[0] !=
'8' && dirname[0] !=
'9')
120 if (cb(pid, data)<0) {
140 sprintf(fnamepath,
"U:\\kern\\%d\\fname", pid);
141 printf(
"checking: %s\n", fnamepath);
143 fp = fopen(fnamepath,
"r");
147 nread = fread(buf, 1,
PATH_MAX-1, fp);
154 char *lastslash = strrchr(buf,
'/');
156 if(lastslash == NULL)
157 lastslash = strrchr(buf,
'\\');
164 if(strcasecmp(lastslash, data->
fname)==0){
166 sprintf(fnamepath,
"U:\\kern\\%d\\status", pid);
167 fp = fopen(fnamepath,
"r");
169 nread = fread(buf, 1,
PATH_MAX-1, fp);
175 if (strstr(buf,
"zombie")==NULL) {
192 return( (data.
found==1) ?
true :
false );
198 static unsigned char flags = 255;
199 static int number = 255;
200 if( flags == cursor->
flags && number == cursor->
number )
203 gemtk_obj_mouse_sprite(cursor->
tree, cursor->
number);
205 graf_mouse(cursor->
number, NULL );
208 flags = cursor->
flags;
215 unsigned char ascii = (nkc & 0xFF);
222 nkc = (nkc & (NKF_CTRL|NKF_SHIFT|0xFF));
225 if( ((nkc & NKF_CTRL) == NKF_CTRL) && ((nkc & (NKF_SHIFT))!=0) ) {
229 else if( (nkc & NKF_CTRL) == NKF_CTRL ) {
252 else if( (nkc & NKF_SHIFT) != 0 ) {
348 if( ik == 0 && ( (nkc & NKF_CTRL)==0) ) {
368 char * use_title = (
char*)title;
370 if( strlen(name)>254)
373 strcpy(tmpname, name);
375 if( use_title == NULL ){
376 use_title = (
char*)
"";
379 if (select_file(
path, tmpname, (
char*)
"*", use_title, NULL)) {
381 return((
const char*)&fullname);
390 printf(
"%s: x: %d, y: %d, w: %d, h: %d (x2: %d, y2: %d)\n", str,
391 r->g_x, r->g_y, r->g_w, r->g_h, r->g_x + r->g_w, r->g_y + r->g_h);
396 printf(
"%s: x: %d, y: %d, w: %d, h: %d\n", str,
397 pxy[0], pxy[1], pxy[2], pxy[3] );
402 printf(
"%s: x0: %d, y0: %d, x1: %d, y1: %d (w: %d, h: %d)\n", str,
403 pxy[0], pxy[1], pxy[2], pxy[3],
static struct MinList * window_list
#define MFORM_EX_FLAG_USERFORM
void die(const char *error)
Cause an abnormal program termination.
void dbg_pxy(const char *str, short *pxy)
static int proc_running_callback(int pid, void *arg)
void dbg_grect(const char *str, GRECT *r)
const char * file_select(const char *title, const char *name)
Show default file selector.
bool is_process_running(const char *name)
void gem_set_cursor(MFORM_EX *cursor)
nserror atari_warn_user(const char *warning, const char *detail)
Warn the user of an event.
void dbg_rect(const char *str, int *pxy)
long nkc_to_input_key(short nkc, long *ucs4_out)
Convert NKC to netsurf input key code and/or to ucs4 (depends on keycode).
struct gui_window * find_guiwin_by_aes_handle(short handle)
static int scan_process_list(scan_process_callback cb, void *data)
static uint32_t count(const http_directive *list, lwc_string *key)
Content handling interface.
Cookie Manager (interface).
directory traversal and entry
int atari_to_ucs4(unsigned char atari)
nserror
Enumeration of error codes.
int(* scan_process_callback)(int pid, void *data)
High-level resource cache interface.
Core mouse and pointer states.
Interface to key press operations.
const char * messages_get(const char *key)
Fast lookup of a message by key from the standard Messages hash.
Localised message support (interface).
Interface to utility string handling.
first entry in window list
struct gui_window * next
list for cleanup
struct s_gui_win_root * root
Default operations table for files.
Option reading and saving interface.
Interface to a number of general purpose functionality.
static nserror path(const struct redraw_context *ctx, const plot_style_t *pstyle, const float *p, unsigned int n, const float transform[6])
Plots a path.