+2000-06-18 Elliot Lee <sopwith@redhat.com>
+
+ * gtk/gtkwindow.c: Don't allow creation of a window bigger than the screen.
+
+ * gtk/gtkrange.c: Fix the mega-jumpy-with-lagged-events scrollbar
+ problem by calculating event position relative to the trough
+ rather than the slider.
+ * gtk/gtkdnd.c, gtk/gtkcolorsel.c: Include FB headers if appropriate.
+
+ * gdk/gdkgc.h: Add GDK_NOR.
+
+ * configure.in, Makefile.am: Add modules top level dir
+ * configure.in: Only use pangox library if building x11 target.
+ * gdk/gdkdnd.h: Add GDK_DRAG_PROTO_LOCAL enum for future intra-app use.
+
Fri Jun 16 22:24:22 2000 Christopher Blizzard <blizzard@redhat.com>
* gtk/gtkcolorsel.c: Change private class member to be named
+2000-06-18 Elliot Lee <sopwith@redhat.com>
+
+ * gtk/gtkwindow.c: Don't allow creation of a window bigger than the screen.
+
+ * gtk/gtkrange.c: Fix the mega-jumpy-with-lagged-events scrollbar
+ problem by calculating event position relative to the trough
+ rather than the slider.
+ * gtk/gtkdnd.c, gtk/gtkcolorsel.c: Include FB headers if appropriate.
+
+ * gdk/gdkgc.h: Add GDK_NOR.
+
+ * configure.in, Makefile.am: Add modules top level dir
+ * configure.in: Only use pangox library if building x11 target.
+ * gdk/gdkdnd.h: Add GDK_DRAG_PROTO_LOCAL enum for future intra-app use.
+
Fri Jun 16 22:24:22 2000 Christopher Blizzard <blizzard@redhat.com>
* gtk/gtkcolorsel.c: Change private class member to be named
+2000-06-18 Elliot Lee <sopwith@redhat.com>
+
+ * gtk/gtkwindow.c: Don't allow creation of a window bigger than the screen.
+
+ * gtk/gtkrange.c: Fix the mega-jumpy-with-lagged-events scrollbar
+ problem by calculating event position relative to the trough
+ rather than the slider.
+ * gtk/gtkdnd.c, gtk/gtkcolorsel.c: Include FB headers if appropriate.
+
+ * gdk/gdkgc.h: Add GDK_NOR.
+
+ * configure.in, Makefile.am: Add modules top level dir
+ * configure.in: Only use pangox library if building x11 target.
+ * gdk/gdkdnd.h: Add GDK_DRAG_PROTO_LOCAL enum for future intra-app use.
+
Fri Jun 16 22:24:22 2000 Christopher Blizzard <blizzard@redhat.com>
* gtk/gtkcolorsel.c: Change private class member to be named
+2000-06-18 Elliot Lee <sopwith@redhat.com>
+
+ * gtk/gtkwindow.c: Don't allow creation of a window bigger than the screen.
+
+ * gtk/gtkrange.c: Fix the mega-jumpy-with-lagged-events scrollbar
+ problem by calculating event position relative to the trough
+ rather than the slider.
+ * gtk/gtkdnd.c, gtk/gtkcolorsel.c: Include FB headers if appropriate.
+
+ * gdk/gdkgc.h: Add GDK_NOR.
+
+ * configure.in, Makefile.am: Add modules top level dir
+ * configure.in: Only use pangox library if building x11 target.
+ * gdk/gdkdnd.h: Add GDK_DRAG_PROTO_LOCAL enum for future intra-app use.
+
Fri Jun 16 22:24:22 2000 Christopher Blizzard <blizzard@redhat.com>
* gtk/gtkcolorsel.c: Change private class member to be named
+2000-06-18 Elliot Lee <sopwith@redhat.com>
+
+ * gtk/gtkwindow.c: Don't allow creation of a window bigger than the screen.
+
+ * gtk/gtkrange.c: Fix the mega-jumpy-with-lagged-events scrollbar
+ problem by calculating event position relative to the trough
+ rather than the slider.
+ * gtk/gtkdnd.c, gtk/gtkcolorsel.c: Include FB headers if appropriate.
+
+ * gdk/gdkgc.h: Add GDK_NOR.
+
+ * configure.in, Makefile.am: Add modules top level dir
+ * configure.in: Only use pangox library if building x11 target.
+ * gdk/gdkdnd.h: Add GDK_DRAG_PROTO_LOCAL enum for future intra-app use.
+
Fri Jun 16 22:24:22 2000 Christopher Blizzard <blizzard@redhat.com>
* gtk/gtkcolorsel.c: Change private class member to be named
+2000-06-18 Elliot Lee <sopwith@redhat.com>
+
+ * gtk/gtkwindow.c: Don't allow creation of a window bigger than the screen.
+
+ * gtk/gtkrange.c: Fix the mega-jumpy-with-lagged-events scrollbar
+ problem by calculating event position relative to the trough
+ rather than the slider.
+ * gtk/gtkdnd.c, gtk/gtkcolorsel.c: Include FB headers if appropriate.
+
+ * gdk/gdkgc.h: Add GDK_NOR.
+
+ * configure.in, Makefile.am: Add modules top level dir
+ * configure.in: Only use pangox library if building x11 target.
+ * gdk/gdkdnd.h: Add GDK_DRAG_PROTO_LOCAL enum for future intra-app use.
+
Fri Jun 16 22:24:22 2000 Christopher Blizzard <blizzard@redhat.com>
* gtk/gtkcolorsel.c: Change private class member to be named
+2000-06-18 Elliot Lee <sopwith@redhat.com>
+
+ * gtk/gtkwindow.c: Don't allow creation of a window bigger than the screen.
+
+ * gtk/gtkrange.c: Fix the mega-jumpy-with-lagged-events scrollbar
+ problem by calculating event position relative to the trough
+ rather than the slider.
+ * gtk/gtkdnd.c, gtk/gtkcolorsel.c: Include FB headers if appropriate.
+
+ * gdk/gdkgc.h: Add GDK_NOR.
+
+ * configure.in, Makefile.am: Add modules top level dir
+ * configure.in: Only use pangox library if building x11 target.
+ * gdk/gdkdnd.h: Add GDK_DRAG_PROTO_LOCAL enum for future intra-app use.
+
Fri Jun 16 22:24:22 2000 Christopher Blizzard <blizzard@redhat.com>
* gtk/gtkcolorsel.c: Change private class member to be named
## Makefile.am for GTK+
-SRC_SUBDIRS = gdk gtk
+SRC_SUBDIRS = gdk modules gtk
SUBDIRS = po $(SRC_SUBDIRS) docs
bin_SCRIPTS = gtk-config
if test x$PANGO_CONFIG = xno ; then
AC_MSG_ERROR([*** pango-config not found])
fi
-PANGO_CFLAGS="`$PANGO_CONFIG --cflags pangox`"
+
+if test "x$gdktarget" = "xx11"; then
+ PANGO_CFLAGS="`$PANGO_CONFIG --cflags pangox`"
+ PANGO_LIBS="`$PANGO_CONFIG --libs pangox`"
+else
+ PANGO_CFLAGS="`$PANGO_CONFIG --cflags pango`"
+ PANGO_LIBS="`$PANGO_CONFIG --libs pango`"
+fi
CFLAGS="$CFLAGS $PANGO_CFLAGS"
-PANGO_LIBS="`$PANGO_CONFIG --libs pangox`"
AC_SUBST(PANGO_LIBS)
AC_SUBST(PANGO_CFLAGS)
#define GDK_WINDOWING_NANOX'
elif test "x$gdktarget" = "xlinux-fb" ; then
gdk_windowing='
-#define GDK_WINDOWING_FB'
+#define GDK_WINDOWING_FB
+#define GDK_NATIVE_WINDOW_POINTER'
fi
if test x$gdk_wchar_h = xyes; then
gtk/Makefile
gtk/gtkfeatures.h
gtk/gtkcompat.h
+modules/Makefile
+modules/linux-fb/Makefile
], [chmod +x gtk-config])
-DGTK_DATA_PREFIX=\"$(prefix)\" \
-DGTK_SYSCONFDIR=\"$(sysconfdir)\" \
-DGTK_LOCALEDIR=\"$(gtklocaledir)\" \
+ -DTESTGTK_RCFILE=\"`pwd`/$(srcdir)/testgtkrc\" \
-I$(top_srcdir) -I../gdk \
-I$(top_srcdir)/gdk \
- -I$(top_srcdir)/gdk/x11 \
@GTK_DEBUG_FLAGS@ \
@GTK_XIM_FLAGS@ \
@GTK_LOCALE_FLAGS@ \
@more_libs@ \
-lm \
@STRIP_END@
+
# $(top_builddir)/gdk/libgdk.la
# test programs, not to be installed
#
noinst_PROGRAMS = testgtk testcalendar testinput testselection testrgb testdnd testtext simple testtextbuffer # testthreads
-DEPS = libgtk-x11.la $(top_builddir)/gdk/libgdk-x11.la
+DEPS = @gtktargetlib@ $(top_builddir)/gdk/@gdktargetlib@
LDADDS = @STRIP_BEGIN@ \
- libgtk-x11.la \
- $(top_builddir)/gdk/libgdk-x11.la \
- @x_ldflags@ \
- @x_libs@ \
+ @gtktargetlib@ \
+ $(top_builddir)/gdk/@gdktargetlib@ \
+ @more_ldflags@ \
+ @more_libs@ \
@GDK_WLIBS@ \
@PANGO_LIBS@ \
@GLIB_LIBS@ \
y -= 1;
width += 2;
height += 2;
-
+
gtk_paint_focus (widget->style, widget->window,
area, widget, "button",
x, y, width - 1, height - 1);
#include "win32/gdkwin32.h"
#elif defined (GDK_WINDOWING_NANOX)
#include "nanox/gdkprivate-nanox.h"
+#elif defined (GDK_WINDOWING_FB)
+#include "linux-fb/gdkprivate-fb.h"
#endif
#include "gdk/gdkkeysyms.h"
#include "gtkcolorsel.h"
gc = drawing_area->style->black_gc;
else
gc = drawing_area->style->white_gc;
-
+
gdk_draw_rectangle (drawing_area->window,
gc, FALSE, 0, 0,
drawing_area->allocation.width - 1,
#include "x11/gdkx.h"
#elif defined (GDK_WINDOWING_WIN32)
#include "win32/gdkwin32.h"
+#elif defined(GDK_WINDOWING_FB)
+#include "linux-fb/gdkfb.h"
#elif defined (GDK_WINDOWING_NANOX)
#include "nanox/gdkprivate-nanox.h"
#endif
gdk_draw_layout (widget->window, widget->style->fg_gc [widget->state], x, y, label->layout);
- gdk_gc_set_clip_mask (widget->style->white_gc, NULL);
- gdk_gc_set_clip_mask (widget->style->fg_gc[widget->state], NULL);
+ gdk_gc_set_clip_rectangle (widget->style->white_gc, NULL);
+ gdk_gc_set_clip_rectangle (widget->style->fg_gc[widget->state], NULL);
}
return TRUE;
*/
#include "gdkconfig.h"
+#include "gdkprivate.h"
#if defined (GDK_WINDOWING_X11)
#include "x11/gdkx.h"
#include "win32/gdkwin32.h"
#elif defined (GDK_WINDOWING_NANOX)
#include "nanox/gdkprivate-nanox.h"
+#elif defined (GDK_WINDOWING_FB)
+#include "linux-fb/gdkfb.h"
#endif
#include "gdk/gdkkeysyms.h"
/* From Tk */
#define EMBEDDED_APP_WANTS_FOCUS NotifyNormal+20
-
static GtkWindowClass *parent_class = NULL;
}
void
-gtk_plug_construct (GtkPlug *plug, guint32 socket_id)
+gtk_plug_construct (GtkPlug *plug, GdkNativeWindow socket_id)
{
plug->socket_window = gdk_window_lookup (socket_id);
plug->same_app = TRUE;
}
GtkWidget*
-gtk_plug_new (guint32 socket_id)
+gtk_plug_new (GdkNativeWindow socket_id)
{
GtkPlug *plug;
#include "gtkrange.h"
#include "gtksignal.h"
-
#define SCROLL_TIMER_LENGTH 20
#define SCROLL_INITIAL_DELAY 100
#define SCROLL_DELAY_LENGTH 300
GdkEventMotion *event)
{
GtkRange *range;
- GdkModifierType mods;
- gint x, y, mask;
g_return_val_if_fail (GTK_IS_RANGE (widget), FALSE);
g_return_val_if_fail (event != NULL, FALSE);
if (range->click_child == RANGE_CLASS (range)->slider)
{
- x = event->x;
- y = event->y;
+ GdkModifierType mods;
+ gint x, y, mask, x2, y2;
- if (event->is_hint || (event->window != range->slider))
- gdk_window_get_pointer (range->slider, &x, &y, &mods);
- else
- mods = event->state;
+ gdk_window_get_pointer (range->trough, &x, &y, &mods);
+ gdk_window_get_position (range->slider, &x2, &y2);
+
+ x -= x2;
+ y -= y2;
switch (range->button)
{
/* Create GdkWindow structure for the requestor */
+#if defined(GDK_WINDOWING_WIN32) || defined(GDK_WINDOWING_X11)
info->requestor = gdk_window_lookup (event->requestor);
if (!info->requestor)
info->requestor = gdk_window_foreign_new (event->requestor);
+#else
+ info->requestor = NULL;
+#endif
/* Determine conversions we need to perform */
g_return_val_if_fail (widget != NULL, FALSE);
g_return_val_if_fail (event != NULL, FALSE);
+#if defined(GDK_WINDOWING_WIN32) || defined(GDK_WINDOWING_X11)
if ((event->state != GDK_PROPERTY_NEW_VALUE) || /* property was deleted */
(event->atom != gdk_selection_property)) /* not the right property */
+#endif
return FALSE;
#ifdef DEBUG_SELECTION
#include "x11/gdkx.h"
#elif defined (GDK_WINDOWING_WIN32)
#include "win32/gdkwin32.h"
+#elif defined(GDK_WINDOWING_FB)
+#include "linux-fb/gdkfb.h"
#endif
#include "gdk/gdkkeysyms.h"
}
void
-gtk_socket_steal (GtkSocket *socket, guint32 id)
+gtk_socket_steal (GtkSocket *socket, GdkNativeWindow id)
{
GtkWidget *widget;
}
static void
-gtk_socket_add_window (GtkSocket *socket, guint32 xid)
+gtk_socket_add_window (GtkSocket *socket, GdkNativeWindow xid)
{
socket->plug_window = gdk_window_lookup (xid);
socket->same_app = TRUE;
return return_val;
}
-#elif defined (GDK_WINDOWING_WIN32)
+#else
GtkType
gtk_socket_get_type (void)
}
void
-gtk_socket_steal (GtkSocket *socket, guint32 id)
+gtk_socket_steal (GtkSocket *socket, GdkNativeWindow id)
{
g_error ("GtkSocket not implemented");
}
style = g_new0 (GtkStyle, 1);
style->font_desc = pango_font_description_from_string ("Sans 10");
-
+
if (!default_font)
{
default_font = gdk_font_from_description (style->font_desc);
- if (!default_font)
- default_font = gdk_font_load ("fixed");
if (!default_font)
g_error ("Unable to load default font.");
}
style->font = default_font;
gdk_font_ref (style->font);
-
+
style->ref_count = 1;
style->attach_count = 0;
style->colormap = NULL;
#include "x11/gdkx.h"
#elif defined (GDK_WINDOWING_WIN32)
#include "win32/gdkwin32.h"
+#elif defined (GDK_WINDOWING_FB)
+#include "linux-fb/gdkfb.h"
#elif defined (GDK_WINDOWING_NANOX)
#include "nanox/gdkprivate-nanox.h"
#endif
*width = info->width > 0 ? info->width : *width;
*height = info->height > 0 ? info->height : *height;
}
+
+ *width = MIN(*width, gdk_screen_width());
+ *height = MIN(*width, gdk_screen_height());
}
/* Constrain a window size to obey the hints passed in geometry
gtk_text_freeze (GTK_TEXT (text));
- font = gdk_font_load ("-adobe-courier-medium-r-normal--*-120-*-*-*-*-*-*");
+ font = NULL;
for (i=0; i<ntext_colors; i++)
{
gtk_main_quit ();
}
-void
+GtkWidget *
create_main_window (void)
{
struct {
for (i = 0; i < nbuttons; i++)
{
button = gtk_button_new_with_label (buttons[i].label);
+ gtk_widget_set_name(button, buttons[i].label);
if (buttons[i].func)
gtk_signal_connect (GTK_OBJECT (button),
"clicked",
gtk_widget_grab_default (button);
gtk_widget_show_all (window);
+
+ return window;
}
int
"debug_msg",
1,
GTK_TYPE_STRING, "GtkWidgetClass <ctrl><release>9 test");
-
create_main_window ();
-
gtk_main ();
return 0;
gtk_text_freeze (GTK_TEXT (text));
- font = gdk_font_load ("-adobe-courier-medium-r-normal--*-120-*-*-*-*-*-*");
+ font = NULL;
for (i=0; i<ntext_colors; i++)
{
gtk_main_quit ();
}
-void
+GtkWidget *
create_main_window (void)
{
struct {
for (i = 0; i < nbuttons; i++)
{
button = gtk_button_new_with_label (buttons[i].label);
+ gtk_widget_set_name(button, buttons[i].label);
if (buttons[i].func)
gtk_signal_connect (GTK_OBJECT (button),
"clicked",
gtk_widget_grab_default (button);
gtk_widget_show_all (window);
+
+ return window;
}
int
"debug_msg",
1,
GTK_TYPE_STRING, "GtkWidgetClass <ctrl><release>9 test");
-
create_main_window ();
-
gtk_main ();
return 0;