Update of /cvsroot/htoolkit/port/src/cbits/GTK
In directory sc8-pr-cvs1:/tmp/cvs-serv30164a/src/cbits/GTK
Modified Files:
Bitmap.c Button.c Canvas.c CheckBox.c EditBox.c Font.c Label.c
ListBox.c PopUp.c RadioBox.c Timer.c Util.c Window.c
Log Message:
MDI/SDI interface for Windows
Index: Bitmap.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/Bitmap.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Bitmap.c 31 Jan 2003 23:25:37 -0000 1.3
--- Bitmap.c 10 Feb 2003 22:42:09 -0000 1.4
***************
*** 10,14 ****
GdkPixbuf *pixbuf;
- initGUI();
pixbuf = gdk_pixbuf_new_from_file(filename, &err);
--- 10,13 ----
***************
*** 104,109 ****
rectangle.width = bitmap->width;
rectangle.height = bitmap->height;
-
- initGUI();
sys_colormap = gdk_colormap_get_system();
--- 103,106 ----
Index: Button.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/Button.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Button.c 23 Jan 2003 20:19:32 -0000 1.2
--- Button.c 10 Feb 2003 22:42:09 -0000 1.3
***************
*** 8,13 ****
GtkWidget *button;
- initGUI();
-
button = gtk_button_new_with_mnemonic("");
gtk_signal_connect (GTK_OBJECT(button), "clicked",
--- 8,11 ----
Index: Canvas.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/Canvas.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** Canvas.c 3 Feb 2003 16:53:40 -0000 1.8
--- Canvas.c 10 Feb 2003 22:42:09 -0000 1.9
***************
*** 6,10 ****
int osMMtoVPixels(double mm)
{
- initGUI();
return (int) ((mm*gdk_screen_height())/gdk_screen_height_mm());
}
--- 6,9 ----
***************
*** 12,16 ****
int osMMtoHPixels(double mm)
{
- initGUI();
return (int) ((mm*gdk_screen_width())/gdk_screen_width_mm());
}
--- 11,14 ----
***************
*** 650,654 ****
CanvasHandle canvas;
- initGUI();
canvas = rmalloc(sizeof(*canvas));
memset(canvas, 0, sizeof(*canvas));
--- 648,651 ----
Index: CheckBox.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/CheckBox.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** CheckBox.c 23 Jan 2003 20:19:32 -0000 1.2
--- CheckBox.c 10 Feb 2003 22:42:09 -0000 1.3
***************
*** 8,13 ****
gchar *szText = toMnemonicString(title);
- initGUI();
-
check_btn = gtk_check_button_new_with_mnemonic(szText);
gtk_fixed_put(GTK_FIXED(GTK_BIN(GetSW(window)->child)->child), check_btn, 0, 0);
--- 8,11 ----
Index: EditBox.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/EditBox.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** EditBox.c 27 Jan 2003 22:02:44 -0000 1.3
--- EditBox.c 10 Feb 2003 22:42:09 -0000 1.4
***************
*** 7,12 ****
GtkWidget *entry;
- initGUI();
-
entry = gtk_entry_new();
gtk_fixed_put(GTK_FIXED(GTK_BIN(GetSW(window)->child)->child), entry, 0, 0);
--- 7,10 ----
Index: Font.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/Font.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Font.c 23 Jan 2003 20:19:32 -0000 1.2
--- Font.c 10 Feb 2003 22:42:09 -0000 1.3
***************
*** 10,15 ****
char *buffer, *p;
- initGUI();
-
display = GDK_DISPLAY_XDISPLAY(gdk_display_get_default());
fontmap = pango_x_font_map_for_display(display);
--- 10,13 ----
***************
*** 46,51 ****
gchar **xfontnames;
- initGUI();
-
display = GDK_DISPLAY_XDISPLAY(gdk_display_get_default());
fontmap = pango_x_font_map_for_display(display);
--- 44,47 ----
***************
*** 102,107 ****
PangoContext *pango_context;
PangoFont *pango_font;
-
- initGUI();
font = rmalloc(sizeof(*font));
--- 98,101 ----
Index: Label.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/Label.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Label.c 23 Jan 2003 20:19:32 -0000 1.2
--- Label.c 10 Feb 2003 22:42:09 -0000 1.3
***************
*** 9,14 ****
GtkWidget *text;
- initGUI();
-
text = gtk_label_new("");
gtk_label_set_line_wrap(GTK_LABEL(text), gtk_false());
--- 9,12 ----
Index: ListBox.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/ListBox.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** ListBox.c 23 Jan 2003 20:19:32 -0000 1.2
--- ListBox.c 10 Feb 2003 22:42:09 -0000 1.3
***************
*** 25,30 ****
GtkWidget *lbox;
- initGUI();
-
lbox = gtk_list_new();
if (!multisel)
--- 25,28 ----
Index: PopUp.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/PopUp.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** PopUp.c 23 Jan 2003 20:19:32 -0000 1.2
--- PopUp.c 10 Feb 2003 22:42:09 -0000 1.3
***************
*** 12,17 ****
GtkWidget *popup;
- initGUI();
-
popup = gtk_combo_new();
gtk_entry_set_editable (GTK_ENTRY(GTK_COMBO(popup)->entry), gtk_false());
--- 12,15 ----
Index: RadioBox.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/RadioBox.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** RadioBox.c 23 Jan 2003 20:19:32 -0000 1.2
--- RadioBox.c 10 Feb 2003 22:42:09 -0000 1.3
***************
*** 10,15 ****
gchar *szText = toMnemonicString(title);
- initGUI();
-
if (isFirst)
{
--- 10,13 ----
Index: Timer.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/Timer.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Timer.c 23 Jan 2003 20:19:32 -0000 1.2
--- Timer.c 10 Feb 2003 22:42:09 -0000 1.3
***************
*** 1,5 ****
#include "Timer.h"
- #include "Internals.h"
#include "Handlers_stub.h"
static gboolean osTimerProc( gpointer data )
--- 1,5 ----
#include "Timer.h"
#include "Handlers_stub.h"
+ #include "Internals.h"
static gboolean osTimerProc( gpointer data )
***************
*** 18,21 ****
--- 18,22 ----
*timer = timerid;
+ gActiveObjects++;
return timer;
}
***************
*** 27,30 ****
--- 28,32 ----
gtk_timeout_remove( *timer );
rfree(timer);
+ gActiveObjects--;
}
}
Index: Util.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/Util.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Util.c 23 Jan 2003 20:19:32 -0000 1.2
--- Util.c 10 Feb 2003 22:42:09 -0000 1.3
***************
*** 24,28 ****
}
! void initGUI()
{
if (!bInitialized)
--- 24,28 ----
}
! void osInit(char *AppName, int DocumentInterface)
{
if (!bInitialized)
***************
*** 60,63 ****
--- 60,65 ----
gtk_main_iteration();
}
+
+ handleDestroyProcess();
}
Index: Window.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/Window.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Window.c 23 Jan 2003 20:19:32 -0000 1.2
--- Window.c 10 Feb 2003 22:42:09 -0000 1.3
***************
*** 272,276 ****
static gboolean frame_delete_handler(GtkWidget *widget, GdkEvent *event, gpointer user_data)
{
! handleWindowClose(widget);
return gtk_true();
}
--- 272,276 ----
static gboolean frame_delete_handler(GtkWidget *widget, GdkEvent *event, gpointer user_data)
{
! handleWindowDismiss(widget);
return gtk_true();
}
***************
*** 367,372 ****
GtkWidget *window, *vbox, *fixed, *sw, *viewport;
- initGUI();
-
/* Create a toplevel */
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
--- 367,370 ----
***************
*** 453,461 ****
}
- WindowHandle osCreateMDIWindow(WindowHandle mdiWindow)
- {
- return NULL;
- }
-
void osSetWindowColor(WindowHandle window, int foreColor, int backColor, int hatchStyle, BitmapHandle hatchBitmap)
{
--- 451,454 ----
***************
*** 570,574 ****
void osShowWindow(WindowHandle window)
{
- initGUI();
gtk_widget_show(window);
};
--- 563,566 ----
|