Exemple #1
0
/* ***Fenster �ffnen*** */
int open_window(void)
{
 wind_calc(WC_WORK, SWIGADGETS, deskx, desky, deskw, deskh, &wi.g_x, &wi.g_y, &wi.g_w, &wi.g_h);
 wi.g_w=wi.g_w&0xFFF0; wi.g_h=wi.g_h&0xFFF0;
 wind_calc(WC_BORDER, SWIGADGETS, wi.g_x, wi.g_y, wi.g_w, wi.g_h, &wi.g_x, &wi.g_y, &wi.g_w, &wi.g_h);
 wihndl=wind_create(SWIGADGETS, deskx, desky, wi.g_w, wi.g_h);
 if(wihndl<0)
  {
   form_alert(1, "[3][Could not create|the windows!][Cancel]");
   return(-1);
  }

 wind_set(wihndl, WF_NAME, "STED", 0L);
 wind_set(wihndl, WF_INFO, " Spielfeld editieren", 0L);

 wind_calc(WC_BORDER, SWIGADGETS, 32, 32, rww<<4, rwh<<4,
			&wi.g_x, &wi.g_y, &wi.g_w, &wi.g_h);
 wi.g_x=deskx+(deskw-wi.g_w)/2;
 wi.g_y=desky+(deskh-wi.g_h)/2;

 if(aesversion>=0x0300)
  {
   wind_set(wihndl, WF_BEVENT, 1, 0, 0L);
  }

 /* Fenster �ffnen: */
 wind_open(wihndl, wi.g_x, wi.g_y, wi.g_w, wi.g_h);
 wind_get(wihndl, WF_WORKXYWH, &wi.g_x, &wi.g_y, &wi.g_w, &wi.g_h);

 return(0);
}
Exemple #2
0
/* ---------------------
	 | Make oversampling |
	 --------------------- */
void do_oversam(void)
{
int i;

i = search_topsw();
if (i == -1)
	return;

switch (ovsm_typ)
	{
	case 2:
		overshift(samples[i]->data, samples[i]->len);
		break;

	case 1:
		oversamp3(samples[i]->data, samples[i]->len);
		break;

	case 0:
		oversamp2(samples[i]->data, samples[i]->len);
		break;
	}

samples[i]->len >>= 1;
samples[i] = realloc(samples[i], sizeof(SOUND) + samples[i]->len + 6L);
samples[i]->data = (char *)samples[i] + sizeof(SOUND);

strcpy(samples[i]->smp_info, " L„nge: ");
ltoa(samples[i]->len, samples[i]->smp_info + 8, 10);
wind_set(samples[i]->w_handle, WF_NAME, samples[i]->smp_name);
wind_set(samples[i]->w_handle, WF_INFO, samples[i]->smp_info);

force_wredraw(samples[i]->w_handle);
}
Exemple #3
0
/*---------------------------------------------------*/
void open_w()
{
wid=wind_create(NAME|MOVER|CLOSER|
(_GemParBlk.global[0]>0x400?SMALLER:0),0,0,cw,ch);
if (wid<0) {open_f=0;return;}
if (wind_open(wid,cx,cy,cw,ch)) open_f=1;
wind_set(wid,WF_NAME,(long) windowname);
wind_set(wid,24,1);
}
Exemple #4
0
VOID set_slsize(WORD w_handle, WORD h_size, WORD v_size)
{
	WORD	cur_size, foo;

	wind_get(w_handle, WF_HSLSIZE, &cur_size, &foo, &foo, &foo);
	if (cur_size != h_size)
		wind_set(w_handle, WF_HSLSIZE, h_size, 0, 0, 0);
	wind_get(w_handle, WF_VSLSIZE, &cur_size, &foo, &foo, &foo);
	if (cur_size != v_size)
		wind_set(w_handle, WF_VSLSIZE, v_size, 0, 0, 0);
}	
Exemple #5
0
VOID set_slpos(WORD w_handle, WORD h_pos, WORD v_pos)
{
	WORD	cur_pos, foo;

	wind_get(w_handle, WF_HSLIDE, &cur_pos, &foo, &foo, &foo);
	if (cur_pos != h_pos)
		wind_set(w_handle, WF_HSLIDE, h_pos, 0, 0, 0);
	wind_get(w_handle, WF_VSLIDE, &cur_pos, &foo, &foo, &foo);
	if (cur_pos != v_pos)
		wind_set(w_handle, WF_VSLIDE, v_pos, 0, 0, 0);
}
Exemple #6
0
/* open_window()
 *==========================================================================
 * Open the Xcontrol window
 *
 * IN:  VOID
 * OUT: BOOLEAN:	TRUE if window opening was success
 *
 * GLOBAL:  WINFO w:	window structure
 */
void
open_window( void )
{
    wind_set( w.id, WF_NAME, w.name );

    /* cjg - re-init window width and height every time we open */
    w.work.g_w = WIND_WIDTH;
    w.work.g_h = WIND_HEIGHT;

#if 0
   /* Convert to 3D if possible - ONLY if AES 0x0330 or Greater */
   if( AES_Version >= 0x0330 )
      w.work.g_h = WIND_HEIGHT + 4;
#endif

    wind_calc( 0, w.kind, w.work.g_x, w.work.g_y, w.work.g_w, w.work.g_h,
    		          &w.r.g_x, &w.r.g_y, &w.r.g_w, &w.r.g_h );
    w.r.g_x = max( desk.g_x, (desk.g_w - w.r.g_w )/2 );
    w.r.g_y = max( desk.g_y, (desk.g_h - w.r.g_h )/2 );
    wind_calc( 1, w.kind, w.r.g_x, w.r.g_y, w.r.g_w, w.r.g_h,
   			  &w.work.g_x, &w.work.g_y, &w.work.g_w, &w.work.g_h );
    GrowShrinkBox( GROWBOX );    
    
    Wind_open( w.id, &w.r );  

    wind_get( w.id, WF_WORKXYWH, &w.work.g_x,&w.work.g_y,&w.work.g_w,&w.work.g_h );
    wind_get( w.id, WF_CURRXYWH, &w.r.g_x,&w.r.g_y,&w.r.g_w,&w.r.g_h );
    
    ObX( FRONT ) = w.work.g_x;
    ObY( FRONT ) = w.work.g_y;
}
Exemple #7
0
/* acc_open()
 * =====================================================================
 * Accessory Open Messages
 * 
 * IN: int *msg: message buffer;
 * OUT: void
 *
 * GLOBAL: WINFO w:   window structure
 *         int   ctrl_id: application id
 */
void
acc_open( const int *msg )
{
    if( msg[4] == ctrl_id )
    {
      if( w.id == NO_WINDOW )
      {
        if( xres >= MIN_RESOLUTION )
	{
          if( Create_Window() )
          {
            ActiveTree( ad_front );
            initialize();
            open_window();
            Activity();
          }
          else
            form_alert( 1, alert13 );
	}
	else
            form_alert( 1, wider );
      }
      else
        wind_set( w.id, WF_TOP );
    }
}
Exemple #8
0
/* SetIntroWindow()
 * ================================================================
 * RETURN: if < 0, error
 */
int
SetIntroWindow( void )
{
   /* Open the Intro window */
   ad_tree = ad_intro;

   ActiveTree( ad_tree );
   FormCenter( ad_tree, &gl_work );
   ObX( ROOT ) = gl_work.g_x;
   ObY( ROOT ) = gl_work.g_y;

   wid = wind_create( MOVER | NAME | CLOSE, gl_full.g_x, gl_full.g_y,
		            		    gl_full.g_w, gl_full.g_h );

   if( wid > 0 )
   {
     wind_set( wid, WF_NAME, wtitle );
     wind_calc( WC_BORDER, MOVER | NAME | CLOSE,
	        gl_work.g_x, gl_work.g_y, gl_work.g_w, gl_work.g_h,
	        &gl_curr.g_x, &gl_curr.g_y, &gl_curr.g_w, &gl_curr.g_h );

     wind_open( wid, gl_curr.g_x, gl_curr.g_y, gl_curr.g_w, gl_curr.g_h );
   } else form_alert( 1, nowin );

   return( wid );
}
Exemple #9
0
/* do_window()
 * ================================================================
 */
void
do_window( int *msg, int *event )
{
    switch( msg[0] )
    {
      case WM_REDRAW:   do_redraw( msg );
			break;
	

      case WM_TOPPED:	/* make this the top window */
			if( msg[3] == wid )
			    wind_set( msg[3], WF_TOP );
			break;	

      case WM_CLOSED:   CheckExit();
			break;	

      case WM_ARROWED:
			break;	

      case WM_HSLID:
			break;	
      case WM_VSLID:
			break;	

      case WM_MOVED:    do_move( msg );
			break;	

      default:
		break;
    }
}
Exemple #10
0
/* open window and enter event loop */
void start_program (void) {
	struct win_data wd;
	int fullx, fully, fullw, fullh;

	graf_mouse (ARROW, 0L); /* ensure mouse is an arrow */

	/* 1. set up and open our window */
	wind_get (0, WF_WORKXYWH, &fullx, &fully, &fullw, &fullh);
	wd.handle = wind_create (NAME|CLOSER, fullx, fully, fullw, fullh);
	wind_set (wd.handle, WF_NAME, "Example: Version 1", 0, 0);
	wind_open (wd.handle, fullx, fully, 300, 200);

	/* create any application-specific data: the string to show, in this case */
	wd.text = "Hello";

	/* display content in window */
	draw_example (app_handle, &wd);

	/* 2. process events for our window */
	event_loop (&wd);

	/* 3. close and remove our window */
	wind_close (wd.handle);
	wind_delete (wd.handle);
}
Exemple #11
0
/* Alter vertical slider	*/
static
void
do_vslider(WORD handle,
           WORD position)
{
	wind_set(handle, WF_VSLIDE, position, 0, 0, 0);
}
void GEM_SetCaption(_THIS, const char *title, const char *icon)
{
	short parm[4];
	const char *new_name;

	new_name = NULL;

	if (title)
		GEM_title_name = title;

	if (icon)
		GEM_icon_name = icon;

	/* Is window iconified ? */
	parm[0]=0;
	if (GEM_wfeatures & (1<<WF_ICONIFY))
		wind_get(GEM_handle, WF_ICONIFY, &parm[0], &parm[1], &parm[2], &parm[3]);

	if (parm[0]==0) {
		/* Change window name */
		if (title)
			new_name = title;
	} else {
		/* Change icon name */
		if (icon)
			new_name = icon;
	}

	parm[0]= ((unsigned long) new_name)>>16;
	parm[1]= ((unsigned long) new_name) & 65535;

	if (new_name) {
		wind_set(GEM_handle, WF_NAME, parm[0], parm[1], 0, 0);
	}
}
Exemple #13
0
/*
 *  Rebuild window path and pflist
 */
void fun_rebld(WNODE *pwin)
{
    GRECT gr;
    BYTE *ptst;

    graf_mouse(HGLASS, NULL);

    /* set up path to check against all windows*/
    ptst = pwin->w_path->p_spec;

    /* check all wnodes     */
    for (pwin = G.g_wfirst; pwin; pwin = pwin->w_next)
    {
        /* if opened and same path then rebuild */
        if ( (pwin->w_id) && (strcmp(pwin->w_path->p_spec, ptst)==0) )
        {
            pn_active(pwin->w_path);
            desk_verify(pwin->w_id, TRUE);
            win_sinfo(pwin);
            wind_set(pwin->w_id, WF_INFO, pwin->w_info, 0, 0);
            wind_get_grect(pwin->w_id, WF_WXYWH, &gr);
            fun_msg(WM_REDRAW, pwin->w_id, gr.g_x, gr.g_y, gr.g_w, gr.g_h);
        } /* if */
    } /* for */

    graf_mouse(ARROW, NULL);
} /* fun_rebld */
Exemple #14
0
static int do_messages(_THIS, short *message)
{
	int quit, posted;

	quit=0;
	switch (message[0]) {
		case WM_CLOSED:
		case AP_TERM:    
			posted = SDL_PrivateQuit();
			quit=1;
			break;
		case WM_MOVED:
			wind_set(message[3],WF_CURRXYWH,message[4],message[5],message[6],message[7]);
			break;
		case WM_TOPPED:
			wind_set(message[3],WF_TOP,message[4],0,0,0);
			SDL_PrivateAppActive(1, SDL_APPINPUTFOCUS);
			break;
		case WM_REDRAW:
			GEM_wind_redraw(this, message[3],&message[4]);
			break;
		case WM_ICONIFY:
		case WM_ALLICONIFY:
			wind_set(message[3],WF_ICONIFY,message[4],message[5],message[6],message[7]);
			/* If we're active, make ourselves inactive */
			if ( SDL_GetAppState() & SDL_APPACTIVE ) {
				/* Send an internal deactivate event */
				SDL_PrivateAppActive(0, SDL_APPACTIVE|SDL_APPINPUTFOCUS);
			}
			/* Update window title */
			if (GEM_refresh_name && GEM_icon_name) {
				wind_set(GEM_handle,WF_NAME,(short)(((unsigned long)GEM_icon_name)>>16),(short)(((unsigned long)GEM_icon_name) & 0xffff),0,0);
				GEM_refresh_name = SDL_FALSE;
			}
			break;
		case WM_UNICONIFY:
			wind_set(message[3],WF_UNICONIFY,message[4],message[5],message[6],message[7]);
			/* If we're not active, make ourselves active */
			if ( !(SDL_GetAppState() & SDL_APPACTIVE) ) {
				/* Send an internal activate event */
				SDL_PrivateAppActive(1, SDL_APPACTIVE);
			}
			if (GEM_refresh_name && GEM_title_name) {
				wind_set(GEM_handle,WF_NAME,(short)(((unsigned long)GEM_title_name)>>16),(short)(((unsigned long)GEM_title_name) & 0xffff),0,0);
				GEM_refresh_name = SDL_FALSE;
			}
Exemple #15
0
/* Wm_Topped()
 *==========================================================================
 * Handle main event_multi window topped messages
 */
void
Wm_Topped( int *msg )
{
   if( msg[3] == w.id )
   {
         wind_set( w.id, WF_TOP );
   }         
}
Exemple #16
0
/* open_window()
 *==========================================================================
 * Open the Xcontrol window
 *
 * IN:  VOID
 * OUT: BOOLEAN:	TRUE if window opening was success
 *
 * GLOBAL:  WINFO w:	window structure
 */
BOOLEAN
open_window( void )
{
    OBJECT *tree = ( OBJECT *)rs_trindex[ XCONTROL ];
    
    clear_xconfig();
#if 0    
    /* cjg - re-init window width and height every time we open */
    w.work.g_w = WIND_WIDTH;
    w.work.g_h = WIND_HEIGHT;

   /* Convert to 3D if possible - ONLY if AES 0x0330 or Greater */
   if( AES_Version >= 0x0330 )
      w.work.g_h = WIND_HEIGHT + 3;
#endif    

    
    if( (w.id = Wind_create( w.kind, &desk )) < 0 )
    {
    	w.id = NO_WINDOW;
    	return( FALSE );
    }
    wind_set( w.id, WF_NAME, w.name );

    /* cjg - re-init window width and height every time we open */
    w.work.g_w = WIND_WIDTH;
    w.work.g_h = WIND_HEIGHT;

   /* Convert to 3D if possible - ONLY if AES 0x0330 or Greater */
   if( AES_Version >= 0x0330 )
      w.work.g_h = WIND_HEIGHT + 4;

    
    Wind_calc( 0, w.kind, &w.work, &w.r );
    w.r.g_x = max( desk.g_x, (desk.g_w - w.r.g_w )/2 );
    w.r.g_y = max( desk.g_y, (desk.g_h - w.r.g_h )/2 );
    Wind_calc( 1, w.kind, &w.r, &w.work );
/*    
    ObX( XCONTROL ) = w.work.g_x;
    ObY( XCONTROL ) = w.work.g_y;
    
    objc_offset( tree, XBASE, &w.phy.g_x, &w.phy.g_y );
 */
    GrowShrinkBox( GROWBOX );    
    Wind_open( w.id, &w.r );  

    Wind_get( w.id, WF_WORKXYWH, ( WARGS *)&w.work );
    Wind_get( w.id, WF_CURRXYWH, ( WARGS *)&w.r );
    ObX( XCONTROL ) = w.work.g_x;
    ObY( XCONTROL ) = w.work.g_y;
    
    objc_offset( tree, XBASE, &w.phy.g_x, &w.phy.g_y );


    return( TRUE );
    
}
Exemple #17
0
void drawvslid(void)
{
int32 blah;
blah=wn[cwin].scb;
blah=blah*1000;
blah=blah/(149-wn[cwin].hght);
blah=1000-blah;
wind_set(wn[cwin].hand,WF_VSLIDE,(short)blah,-1,-1,-1);
}
Exemple #18
0
/*
 * Get a single event, process it, and return.
 *
 */
domulti(){
    int event;
  
    event = evnt_multi(MU_MESAG,
			1,1,butdown,
			0,0,0,0,0,
			0,0,0,0,0,
			msgbuff,0,0,&mx,&my,&ret,&ret,&keycode,&ret);
  
    if (event & MU_MESAG)
        switch (msgbuff[0]) {
	    case WM_REDRAW:
		do_redraw(msgbuff[4],msgbuff[5],msgbuff[6],msgbuff[7]);
		break;
	
	    case WM_NEWTOP:
	    case WM_TOPPED:
		wind_set(wi_handle, WF_TOP, 0, 0, 0, 0);
		break;
	
	    case WM_CLOSED:
		running = FALSE;
		break;
	
	    case MN_SELECTED:
		graf_mouse(HOURGLASS, 0L);
		switch(msgbuff[3]) {
		    case MNDESK:
			if(msgbuff[4] == DEABOUT) {
			    strcpy((about[ABVERSN].ob_spec)->te_ptext, "6.00");
			    about[ABOK].ob_state = NORMAL;
			    execform(about);
			    }
			break;		/* "cannot happen" */

		    case MNFILE:
			switch (msgbuff[4]) {
			    case FIQUIT:	/* [QUIT] item */
				running = 0;
				break;

			    case FIINST:	/* [INSTALL] item */
				install();
				break;
		
			    case FIUNINST:	/* [UNINSTALL] item */
				uninstall();
				break;
			}
			break;
		}
		menu_tnormal(menubar, msgbuff[3], 1); /* back to normal */
        	graf_mouse(ARROW, 0L);	/* restore mouse */
		break;
	}
}
Exemple #19
0
/* Wm_Topped()
 *==========================================================================
 * Handle main event_multi window topped messages
 */
void
Wm_Topped( int *msg )
{
   if( msg[3] == w.id )
   {
         wind_set( w.id, WF_TOP );
         if( !IsCPXActive() )
             time_handle();
   }         
}
Exemple #20
0
void fg_init(WINDFORM *wind)
{
	form_center(wind->formtree,&wind->form.x,&wind->form.y,
		&wind->form.w,&wind->form.h);
	wind_calc(WC_BORDER,wind->windkind,wind->form.x,wind->form.y,
		wind->form.w,wind->form.h,&wind->wind.x,&wind->wind.y,
		&wind->wind.w,&wind->wind.h);
	wind->whandle=wind_create(wind->windkind,wind->wind.x,wind->wind.y,
		wind->wind.w,wind->wind.h);
	wind_set(wind->whandle,WF_NAME,wind->wind_title);

	if(wind == &windforms[WIND_CTRL])
		wind_set(wind->whandle,WF_BEVENT,1,0,0,0); /* untoppable */
	
	wind_calc(WC_WORK,wind->windkind,wind->wind.x,wind->wind.y,
		wind->wind.w,wind->wind.h,&wind->form.x,&wind->form.y,
		&wind->form.w,&wind->form.h);
	wind->formtree[wind->firstobj].ob_x=wind->form.x;
	wind->formtree[wind->firstobj].ob_y=wind->form.y;
	wind->formtree[wind->firstobj].ob_width=wind->form.w;
	wind->formtree[wind->firstobj].ob_height=wind->form.h;
}
Exemple #21
0
/* open_window()
 *==========================================================================
 * Open the Xcontrol window
 *
 * IN:  VOID
 * OUT: BOOLEAN:	TRUE if window opening was success
 *
 * GLOBAL:  WINFO w:	window structure
 */
void
open_window( void )
{
    wind_set( w.id, WF_NAME, w.name );
    Wind_calc( 0, w.kind, &w.work, &w.r );
    w.r.g_x = max( desk.g_x, (desk.g_w - w.r.g_w )/2 );
    w.r.g_y = max( desk.g_y, (desk.g_h - w.r.g_h )/2 );
    Wind_calc( 1, w.kind, &w.r, &w.work );
    
    ObX( PRINTER ) = w.work.g_x;
    ObY( PRINTER ) = w.work.g_y;
    GrowShrinkBox( GROWBOX );    
    Wind_open( w.id, &w.r );  
}
Exemple #22
0
int sbvslid(short newpos)
{
short bbb=0;
long blah,blah2;
if(wn[cwin].scb!=0)bbb=1;
wind_set(wn[cwin].hand,WF_VSLIDE,newpos,0,0,0);
blah2=1000-newpos;
blah=blah2*(149-wn[cwin].hght);blah=blah/1000;
wn[cwin].scb=(short)blah;
if(blah2!=0 && bbb==0)dowindinfo(cwin);
if(blah2==0 && bbb==1)dowindinfo(cwin);
initiateredraw(cwin,wn[cwin].wwa.g_x,wn[cwin].wwa.g_y,wn[cwin].wwa.g_w,wn[cwin].wwa.g_h-ith*2-VT);
return 0;
}
Exemple #23
0
void xw_set(WINDOW *w, int field,...)
{
	int p1, p2, p3, p4;
	RECT *r;
	va_list p;

	va_start(p, field);

	switch (field)
	{
	case WF_CURRXYWH:
		r = va_arg(p, RECT *);

		w->xw_size.x = r->x;
		w->xw_size.y = r->y;
		w->xw_size.w = r->w;
		w->xw_size.h = r->h;

		wind_set(w->xw_handle, WF_CURRXYWH, w->xw_size.x,
				 w->xw_size.y, w->xw_size.w, w->xw_size.h);
		wind_get(w->xw_handle, WF_WORKXYWH, &w->xw_work.x,
				 &w->xw_work.y, &w->xw_work.w, &w->xw_work.h);
		xw_set_barpos(w);
		break;
	case WF_TOP:
		xw_set_top(w);
		break;
	default:
		p1 = va_arg(p, int);
		p2 = va_arg(p, int);
		p3 = va_arg(p, int);
		p4 = va_arg(p, int);
		wind_set(w->xw_handle, field, p1, p2, p3, p4);
		break;
	}
	va_end(p);
}
Exemple #24
0
void OnMoveRTZoom(void *wind, int xywh[4])
{
  GEM_WINDOW *wnd = (GEM_WINDOW *) wind ;
  int mask = 0xFFFF ;
  int x, y, w, h ;

  if ( config.rt_optimizepos ) mask = 0xFFF0 ;
    wind_calc( WC_WORK, NAME | MOVER, xywh[0], xywh[1], xywh[2], xywh[3],
               &x, &y, &w, &h ) ;
  x &= mask ;
  wind_calc( WC_BORDER, NAME | MOVER, x, y, w, h,
             &xywh[0], &xywh[1], &xywh[2], &xywh[3] ) ;
  wind_set( wnd->window_handle, WF_CURRXYWH, xywh[0], xywh[1], xywh[2], xywh[3] ) ;
  wind_get( wnd->window_handle, WF_WORKXYWH, &rtx, &rty, &rtw, &rth ) ;
}
Exemple #25
0
/* ***Fenster anmelden + Dialog zeichnen*** */
int wdial_init(OBJECT *tree, char *title)
{
 short wx, wy, ww, wh;
 int dwhndl;

 form_center(tree, &wx, &wy, &ww, &wh);           /* Gr��e holen */
 wind_calc(WC_BORDER, NAME|MOVER, wx, wy, ww, wh, &wx, &wy, &ww, &wh);
 dwhndl=wind_create(NAME|MOVER, wx, wy, ww, wh);  /* Fenster anmelden */
 if(dwhndl<0)  return(NULL);
 wind_set(dwhndl, WF_NAME, title);                /* Name setzen */
 wind_open(dwhndl, wx, wy, ww, wh);               /* Fenster �ffnen */
 objc_draw(tree, ROOT, MAX_DEPTH, wx, wy, ww, wh);  /* Dialog zeichnen */

 return(dwhndl);
}
Exemple #26
0
void rtzoom_change_level(int new_level)
{
  char name[50] ;

  if ( new_level != config.rt_zoomlevel )
  {
    config.rt_zoomlevel = new_level ;
    init_fztab( new_level ) ;
    init_rtmemory() ;
    deltax = RTZoomSrc.fd_w / 2 ;
    smart_offx = ( RTZoomDst.fd_w - config.rt_width ) / 2 ;
    deltay = config.rt_height / config.rt_zoomlevel / 2 ;
    sprintf( name, msg[MSG_TITRERTZOOM], config.rt_zoomlevel ) ;
    wind_set( WndRTZoom->window_handle, WF_NAME, name ) ;
  }
}
Exemple #27
0
void  coup_mu_mesag( const short *message )
{
	GRECT *rect ;
	short dummy ;

	switch( message[0] )
	{
		case WM_REDRAW :
			form_redraw( message, &coup_form ) ;
			break ;
		case WM_MOVED :
			rect = (GRECT *) &(message[4]) ;
			wind_set( coup_form.fm_handle, WF_CURRXYWH, PTRS( rect ) ) ;
			coup_form.fm_box = *rect ;
			wind_calc( WC_WORK, wind_form_kind, ELTS( coup_form.fm_box ),
					&coup_form.fm_ptr[ROOT].ob_x, &coup_form.fm_ptr[ROOT].ob_y,
					&dummy, &dummy ) ;
			break ;
		case WM_TOPPED :
			if( message[3] == coup_form.fm_handle )
				wind_set( coup_form.fm_handle, WF_TOP ) ;
			break ;
		case WM_BOTTOM :
			wind_set( coup_form.fm_handle, WF_BOTTOM ) ;
			break ;
		case WM_CLOSED :
			save_couple( edit_coup_ref, edit_coup_block, edit_coup_cptr ) ;
			close_couple() ;
			break ;
		case WM_ALLICONIFY :
			iconify_all( coup_form.fm_box.g_x ) ;
			break ;
		case WM_ICONIFY :
			wind_set( coup_form.fm_handle, WF_UNICONIFYXYWH, ELTS( coup_form.fm_box ) ) ;
			coup_form.fm_box = *(GRECT *)&message[4] ;
			coup_form.iconified = TRUE ;
			wind_set( coup_form.fm_handle, WF_ICONIFY, ELTS( coup_form.fm_box ) ) ;
			wind_title( coup_form.fm_handle, coup_form.icon_title ) ;
			send_redraw_message( &coup_form.fm_box, coup_form.fm_handle ) ;
			break ;
		case WM_UNICONIFY :
			wind_get( coup_form.fm_handle, WF_UNICONIFY, REFS( coup_form.fm_box ) ) ;
			wind_calc( WC_WORK, wind_form_kind, ELTS( coup_form.fm_box ),
					&coup_form.fm_ptr[ROOT].ob_x, &coup_form.fm_ptr[ROOT].ob_y,
					&dummy, &dummy ) ;
			wind_set( coup_form.fm_handle, WF_UNICONIFY, ELTS( coup_form.fm_box ) ) ;
			wind_title( coup_form.fm_handle, coup_form.title_str ) ;
			coup_form.iconified = FALSE ;
			break ;
		default :
			break ;
	}
}
Exemple #28
0
launcher_main(void)
#endif
{
  OBJECT * desktop_bg;
  OBJECT * menu;
  
  int      ap_id;  

  /* Pdomain (1); FIXME decide where to put this */
  /* Get application id */
  ap_id = appl_init();

  /* Fix resource data */
  rsrc_rcfix(launch);

  /* Get address of desktop background */
  rsrc_gaddr(R_TREE, DESKBG, &desktop_bg);

  /* Set desktop background */
  wind_set(0,
           WF_NEWDESK,
           HI_WORD(desktop_bg),
           LO_WORD(desktop_bg),
           0,
           0);

  /* Get address of the menu */
  rsrc_gaddr(R_TREE, MENU, &menu);

  /* Install menu */
  menu_bar(menu, MENU_INSTALL);

  /* Register launcher as "oAESis" */
  menu_register(ap_id, "  oAESis");

  graf_mouse(ARROW, 0L);

  start_programs();

  updatewait();

  appl_exit();
        
  return 0;
}
Exemple #29
0
static void xw_set_top(WINDOW *w)
{
	wind_set(w->xw_handle, WF_TOP, w->xw_handle);

	if (w != windows)
	{
		if (w->xw_next != NULL)
			w->xw_next->xw_prev = w->xw_prev;
		w->xw_prev->xw_next = w->xw_next;
		windows->xw_prev = w;
		w->xw_prev = NULL;
		w->xw_next = windows;
		windows = w;

		if (w->xw_func->wd_top != 0L)
			w->xw_func->wd_top(w);
	}
}
Exemple #30
0
void update_time()
{
	long time;
	char tmp[64];
	
	if(count_dir)
		time = total_time - calc_time();
	else
		time = calc_time();
		
	sprintf(tmp,"%02ld:%02ld",time/60,time%60);
	if(strcmp(tmp,windforms[WIND_CTRL].wind_title))
	{
		strcpy(windforms[WIND_CTRL].wind_title,tmp);
		wind_set(windforms[WIND_CTRL].whandle,WF_NAME,
			windforms[WIND_CTRL].wind_title);
	}
}