Update of /cvsroot/htoolkit/port/src/cbits/GTK
In directory sc8-pr-cvs1:/tmp/cvs-serv28341/src/cbits/GTK
Modified Files:
Util.c
Log Message:
Make gActiveObjects, gDocumentInterface and gAppName variables common to Win32 and GTK
Index: Util.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/Util.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Util.c 10 Feb 2003 22:42:09 -0000 1.3
--- Util.c 3 Mar 2003 00:21:50 -0000 1.4
***************
*** 3,8 ****
--- 3,12 ----
#include "Types.h"
#include "Internals.h"
+ #include "Handlers_stub.h"
BOOL bInitialized = FALSE;
+ int gActiveObjects;
+ int gDocumentInterface;
+ char *gAppName;
void *rmalloc (unsigned long bytes)
***************
*** 28,53 ****
if (!bInitialized)
{
! int margc;
! char **margv;
! gtk_set_locale();
! getProgArgv(&margc, &margv);
! gtk_init(&margc,&margv);
! setProgArgv(margc, margv);
! bInitialized = TRUE;
}
};
- static gboolean running = 0;
-
void osStart()
{
! running = gtk_true();
! while (running)
{
handleMenusUpdate();
while (gtk_events_pending())
{
! if (!running)
return;
--- 32,58 ----
if (!bInitialized)
{
! int margc;
! char **margv;
! gtk_set_locale();
! getProgArgv(&margc, &margv);
! gtk_init(&margc,&margv);
! setProgArgv(margc, margv);
! bInitialized = TRUE;
!
! gActiveObjects = 0;
! gAppName = strdup(AppName);
! gDocumentInterface = DocumentInterface;
}
};
void osStart()
{
! while (gActiveObjects > 0)
{
handleMenusUpdate();
while (gtk_events_pending())
{
! if (gActiveObjects <= 0)
return;
***************
*** 55,59 ****
}
! if (!running)
return;
--- 60,64 ----
}
! if (gActiveObjects <= 0)
return;
***************
*** 66,70 ****
void osQuit()
{
! running = gtk_false();
}
--- 71,80 ----
void osQuit()
{
! if (gActiveObjects > 0)
! {
! printf("WARNING: There are still have active objects\n");
! }
!
! free(gAppName);
}
|