Commit 48a9f44f authored by Owen Taylor's avatar Owen Taylor Committed by Owen Taylor

gdk/gdktypes.h gdk/gdkprivate.h gtk/gtk*.h gtk/Makefile.am gtk/makenums.pl

Mon Jun 15 16:29:45 1998  Owen Taylor  <otaylor@gtk.org>

	* gdk/gdktypes.h gdk/gdkprivate.h gtk/gtk*.h
	  gtk/Makefile.am gtk/makenums.pl

	Removed out the G_ENUM/FLAGS mechanism in favor
	of a perl script that parses the standard headers
	(with occasional /*< nick=foo >*/ style overrides)
	and extracts the enumerations.

	  gtk/maketypes.awk: Small improvments to the
	  translation of names. (Avoid splitting gc into
	  g_c_.)

Mon Jun 15 16:25:44 1998  Owen Taylor  <otaylor@gtk.org>

	* gtk/Makefile.am gtk/gtk.h gtk/gtkfontsel.[ch] gtk/testgtk.c:
	Damon Chaplin's <DAChaplin@email.msn.com> Font selection widget,
        and a simple example for testgtk.

Mon Jun 15 15:58:34 1998  Owen Taylor  <otaylor@gtk.org>

	* gtk/gtkentry.c:
	- Restored gtk_entry_adjust_scroll to static
	- Changed text positioning code so that we always
	  display as large a portion of the text as possible.

Mon Jun 15 15:42:12 1998  Owen Taylor  <otaylor@gtk.org>

	* gtk/gtktext.c (gtk_text_finalize): Free internal
	structures of text widget. Also, unreference pixmaps
	when unrealizing.

Sat Jun 13 19:14:39 1998  Owen Taylor  <otaylor@gtk.org>

	* gdk/gdkinputcommon.h (gdk_input_device_new): Change
	3.3.1 bug workaround to number keys starting at 1.

Sat Jun 13 11:56:57 1998  Owen Taylor  <otaylor@gtk.org>

	* docs/gtk_tut.sgml: Fixed urls for complete example
	source for scribble+widget-writing examples.
parent e144ff2b
Mon Jun 15 16:29:45 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdktypes.h gdk/gdkprivate.h gtk/gtk*.h
gtk/Makefile.am gtk/makenums.pl
Removed out the G_ENUM/FLAGS mechanism in favor
of a perl script that parses the standard headers
(with occasional /*< nick=foo >*/ style overrides)
and extracts the enumerations.
gtk/maketypes.awk: Small improvments to the
translation of names. (Avoid splitting gc into
g_c_.)
Mon Jun 15 16:25:44 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtk.h gtk/gtkfontsel.[ch]:
Damon Chaplin's <DAChaplin@email.msn.com> Font selection widget.
Mon Jun 15 15:58:34 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkentry.c:
- Restored gtk_entry_adjust_scroll to static
- Changed text positioning code so that we always
display as large a portion of the text as possible.
Mon Jun 15 15:42:12 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtktext.c (gtk_text_finalize): Free internal
structures of text widget. Also, unreference pixmaps
when unrealizing.
Sat Jun 13 19:14:39 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdkinputcommon.h (gdk_input_device_new): Change
3.3.1 bug workaround to number keys starting at 1.
Sat Jun 13 11:56:57 1998 Owen Taylor <otaylor@gtk.org>
* docs/gtk_tut.sgml: Fixed urls for complete example
source for scribble+widget-writing examples.
Sat Jun 13 11:48:26 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdkpixmap.c (gdk_pixmap_extract_color):
......
Mon Jun 15 16:29:45 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdktypes.h gdk/gdkprivate.h gtk/gtk*.h
gtk/Makefile.am gtk/makenums.pl
Removed out the G_ENUM/FLAGS mechanism in favor
of a perl script that parses the standard headers
(with occasional /*< nick=foo >*/ style overrides)
and extracts the enumerations.
gtk/maketypes.awk: Small improvments to the
translation of names. (Avoid splitting gc into
g_c_.)
Mon Jun 15 16:25:44 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtk.h gtk/gtkfontsel.[ch]:
Damon Chaplin's <DAChaplin@email.msn.com> Font selection widget.
Mon Jun 15 15:58:34 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkentry.c:
- Restored gtk_entry_adjust_scroll to static
- Changed text positioning code so that we always
display as large a portion of the text as possible.
Mon Jun 15 15:42:12 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtktext.c (gtk_text_finalize): Free internal
structures of text widget. Also, unreference pixmaps
when unrealizing.
Sat Jun 13 19:14:39 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdkinputcommon.h (gdk_input_device_new): Change
3.3.1 bug workaround to number keys starting at 1.
Sat Jun 13 11:56:57 1998 Owen Taylor <otaylor@gtk.org>
* docs/gtk_tut.sgml: Fixed urls for complete example
source for scribble+widget-writing examples.
Sat Jun 13 11:48:26 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdkpixmap.c (gdk_pixmap_extract_color):
......
Mon Jun 15 16:29:45 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdktypes.h gdk/gdkprivate.h gtk/gtk*.h
gtk/Makefile.am gtk/makenums.pl
Removed out the G_ENUM/FLAGS mechanism in favor
of a perl script that parses the standard headers
(with occasional /*< nick=foo >*/ style overrides)
and extracts the enumerations.
gtk/maketypes.awk: Small improvments to the
translation of names. (Avoid splitting gc into
g_c_.)
Mon Jun 15 16:25:44 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtk.h gtk/gtkfontsel.[ch]:
Damon Chaplin's <DAChaplin@email.msn.com> Font selection widget.
Mon Jun 15 15:58:34 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkentry.c:
- Restored gtk_entry_adjust_scroll to static
- Changed text positioning code so that we always
display as large a portion of the text as possible.
Mon Jun 15 15:42:12 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtktext.c (gtk_text_finalize): Free internal
structures of text widget. Also, unreference pixmaps
when unrealizing.
Sat Jun 13 19:14:39 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdkinputcommon.h (gdk_input_device_new): Change
3.3.1 bug workaround to number keys starting at 1.
Sat Jun 13 11:56:57 1998 Owen Taylor <otaylor@gtk.org>
* docs/gtk_tut.sgml: Fixed urls for complete example
source for scribble+widget-writing examples.
Sat Jun 13 11:48:26 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdkpixmap.c (gdk_pixmap_extract_color):
......
Mon Jun 15 16:29:45 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdktypes.h gdk/gdkprivate.h gtk/gtk*.h
gtk/Makefile.am gtk/makenums.pl
Removed out the G_ENUM/FLAGS mechanism in favor
of a perl script that parses the standard headers
(with occasional /*< nick=foo >*/ style overrides)
and extracts the enumerations.
gtk/maketypes.awk: Small improvments to the
translation of names. (Avoid splitting gc into
g_c_.)
Mon Jun 15 16:25:44 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtk.h gtk/gtkfontsel.[ch]:
Damon Chaplin's <DAChaplin@email.msn.com> Font selection widget.
Mon Jun 15 15:58:34 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkentry.c:
- Restored gtk_entry_adjust_scroll to static
- Changed text positioning code so that we always
display as large a portion of the text as possible.
Mon Jun 15 15:42:12 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtktext.c (gtk_text_finalize): Free internal
structures of text widget. Also, unreference pixmaps
when unrealizing.
Sat Jun 13 19:14:39 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdkinputcommon.h (gdk_input_device_new): Change
3.3.1 bug workaround to number keys starting at 1.
Sat Jun 13 11:56:57 1998 Owen Taylor <otaylor@gtk.org>
* docs/gtk_tut.sgml: Fixed urls for complete example
source for scribble+widget-writing examples.
Sat Jun 13 11:48:26 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdkpixmap.c (gdk_pixmap_extract_color):
......
Mon Jun 15 16:29:45 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdktypes.h gdk/gdkprivate.h gtk/gtk*.h
gtk/Makefile.am gtk/makenums.pl
Removed out the G_ENUM/FLAGS mechanism in favor
of a perl script that parses the standard headers
(with occasional /*< nick=foo >*/ style overrides)
and extracts the enumerations.
gtk/maketypes.awk: Small improvments to the
translation of names. (Avoid splitting gc into
g_c_.)
Mon Jun 15 16:25:44 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtk.h gtk/gtkfontsel.[ch]:
Damon Chaplin's <DAChaplin@email.msn.com> Font selection widget.
Mon Jun 15 15:58:34 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkentry.c:
- Restored gtk_entry_adjust_scroll to static
- Changed text positioning code so that we always
display as large a portion of the text as possible.
Mon Jun 15 15:42:12 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtktext.c (gtk_text_finalize): Free internal
structures of text widget. Also, unreference pixmaps
when unrealizing.
Sat Jun 13 19:14:39 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdkinputcommon.h (gdk_input_device_new): Change
3.3.1 bug workaround to number keys starting at 1.
Sat Jun 13 11:56:57 1998 Owen Taylor <otaylor@gtk.org>
* docs/gtk_tut.sgml: Fixed urls for complete example
source for scribble+widget-writing examples.
Sat Jun 13 11:48:26 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdkpixmap.c (gdk_pixmap_extract_color):
......
Mon Jun 15 16:29:45 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdktypes.h gdk/gdkprivate.h gtk/gtk*.h
gtk/Makefile.am gtk/makenums.pl
Removed out the G_ENUM/FLAGS mechanism in favor
of a perl script that parses the standard headers
(with occasional /*< nick=foo >*/ style overrides)
and extracts the enumerations.
gtk/maketypes.awk: Small improvments to the
translation of names. (Avoid splitting gc into
g_c_.)
Mon Jun 15 16:25:44 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtk.h gtk/gtkfontsel.[ch]:
Damon Chaplin's <DAChaplin@email.msn.com> Font selection widget.
Mon Jun 15 15:58:34 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkentry.c:
- Restored gtk_entry_adjust_scroll to static
- Changed text positioning code so that we always
display as large a portion of the text as possible.
Mon Jun 15 15:42:12 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtktext.c (gtk_text_finalize): Free internal
structures of text widget. Also, unreference pixmaps
when unrealizing.
Sat Jun 13 19:14:39 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdkinputcommon.h (gdk_input_device_new): Change
3.3.1 bug workaround to number keys starting at 1.
Sat Jun 13 11:56:57 1998 Owen Taylor <otaylor@gtk.org>
* docs/gtk_tut.sgml: Fixed urls for complete example
source for scribble+widget-writing examples.
Sat Jun 13 11:48:26 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdkpixmap.c (gdk_pixmap_extract_color):
......
Mon Jun 15 16:29:45 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdktypes.h gdk/gdkprivate.h gtk/gtk*.h
gtk/Makefile.am gtk/makenums.pl
Removed out the G_ENUM/FLAGS mechanism in favor
of a perl script that parses the standard headers
(with occasional /*< nick=foo >*/ style overrides)
and extracts the enumerations.
gtk/maketypes.awk: Small improvments to the
translation of names. (Avoid splitting gc into
g_c_.)
Mon Jun 15 16:25:44 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtk.h gtk/gtkfontsel.[ch]:
Damon Chaplin's <DAChaplin@email.msn.com> Font selection widget.
Mon Jun 15 15:58:34 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtkentry.c:
- Restored gtk_entry_adjust_scroll to static
- Changed text positioning code so that we always
display as large a portion of the text as possible.
Mon Jun 15 15:42:12 1998 Owen Taylor <otaylor@gtk.org>
* gtk/gtktext.c (gtk_text_finalize): Free internal
structures of text widget. Also, unreference pixmaps
when unrealizing.
Sat Jun 13 19:14:39 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdkinputcommon.h (gdk_input_device_new): Change
3.3.1 bug workaround to number keys starting at 1.
Sat Jun 13 11:56:57 1998 Owen Taylor <otaylor@gtk.org>
* docs/gtk_tut.sgml: Fixed urls for complete example
source for scribble+widget-writing examples.
Sat Jun 13 11:48:26 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdkpixmap.c (gdk_pixmap_extract_color):
......
......@@ -7593,8 +7593,8 @@ other people can benefit. The best place to do this is probably the
Complete sources for the example widgets are available at the place you
got this tutorial, or from:
<htmlurl url="http://www.msc.cornell.edu/~otaylor/gtk-gimp/tutorial"
name="http://www.msc.cornell.edu/~otaylor/gtk-gimp/tutorial">
<htmlurl url="http://www.gtk.org/~otaylor/gtk/tutorial/"
name="http://www.gtk.org/~otaylor/gtk/tutorial/">
<!-- ----------------------------------------------------------------- -->
......@@ -9465,8 +9465,8 @@ mundane details like creating the main window. The complete
source code is available from the location from which you got
this tutorial, or from:
<htmlurl url="http://www.msc.cornell.edu/~otaylor/gtk-gimp/tutorial"
name="http://www.msc.cornell.edu/~otaylor/gtk-gimp/tutorial">
<htmlurl url="http://www.gtk.org/~otaylor/gtk/tutorial/"
name="http://www.gtk.org/~otaylor/gtk/tutorial/">
<!-- ----------------------------------------------------------------- -->
......@@ -9799,8 +9799,8 @@ That completes the changes to ``XInputize'' our program. As with
the first version, the complete source is available at the location
from which you got this tutorial, or from:
<htmlurl url="http://www.msc.cornell.edu/~otaylor/gtk-gimp/tutorial"
name="http://www.msc.cornell.edu/~otaylor/gtk-gimp/tutorial">
<htmlurl url="http://www.gtk.org/~otaylor/gtk/tutorial/"
name="http://www.gtk.org/~otaylor/gtk/tutorial/">
<sect2> Further sophistications <label id="sec_Further_Sophistications">
......
......@@ -7593,8 +7593,8 @@ other people can benefit. The best place to do this is probably the
Complete sources for the example widgets are available at the place you
got this tutorial, or from:
<htmlurl url="http://www.msc.cornell.edu/~otaylor/gtk-gimp/tutorial"
name="http://www.msc.cornell.edu/~otaylor/gtk-gimp/tutorial">
<htmlurl url="http://www.gtk.org/~otaylor/gtk/tutorial/"
name="http://www.gtk.org/~otaylor/gtk/tutorial/">
<!-- ----------------------------------------------------------------- -->
......@@ -9465,8 +9465,8 @@ mundane details like creating the main window. The complete
source code is available from the location from which you got
this tutorial, or from:
<htmlurl url="http://www.msc.cornell.edu/~otaylor/gtk-gimp/tutorial"
name="http://www.msc.cornell.edu/~otaylor/gtk-gimp/tutorial">
<htmlurl url="http://www.gtk.org/~otaylor/gtk/tutorial/"
name="http://www.gtk.org/~otaylor/gtk/tutorial/">
<!-- ----------------------------------------------------------------- -->
......@@ -9799,8 +9799,8 @@ That completes the changes to ``XInputize'' our program. As with
the first version, the complete source is available at the location
from which you got this tutorial, or from:
<htmlurl url="http://www.msc.cornell.edu/~otaylor/gtk-gimp/tutorial"
name="http://www.msc.cornell.edu/~otaylor/gtk-gimp/tutorial">
<htmlurl url="http://www.gtk.org/~otaylor/gtk/tutorial/"
name="http://www.gtk.org/~otaylor/gtk/tutorial/">
<sect2> Further sophistications <label id="sec_Further_Sophistications">
......
......@@ -328,7 +328,7 @@ gdk_colors_store (GdkColormap *colormap,
gdk_colormap_change (colormap, ncolors);
}
gint
gboolean
gdk_colors_alloc (GdkColormap *colormap,
gint contiguous,
gulong *planes,
......@@ -467,13 +467,13 @@ gdk_color_black (GdkColormap *colormap,
return return_val;
}
gint
gboolean
gdk_color_parse (const gchar *spec,
GdkColor *color)
{
Colormap xcolormap;
XColor xcolor;
gint return_val;
gboolean return_val;
g_return_val_if_fail (spec != NULL, FALSE);
g_return_val_if_fail (color != NULL, FALSE);
......@@ -493,7 +493,7 @@ gdk_color_parse (const gchar *spec,
return return_val;
}
gint
gboolean
gdk_color_alloc (GdkColormap *colormap,
GdkColor *color)
{
......@@ -501,7 +501,7 @@ gdk_color_alloc (GdkColormap *colormap,
GdkVisual *visual;
XColor xcolor;
gchar *available = NULL;
gint return_val;
gboolean return_val;
gint i, index;
g_return_val_if_fail (colormap != NULL, FALSE);
......@@ -622,7 +622,7 @@ gdk_color_alloc (GdkColormap *colormap,
return return_val;
}
gint
gboolean
gdk_color_change (GdkColormap *colormap,
GdkColor *color)
{
......
......@@ -186,7 +186,7 @@ gdk_input_device_new(XDeviceInfo *device, gint include_core)
if ((xki->min_keycode == 8) && (xki->max_keycode == 32))
{
gdkdev->info.num_keys = 32;
gdkdev->min_keycode = 0;
gdkdev->min_keycode = 1;
}
else
{
......
......@@ -204,12 +204,12 @@ struct _GdkRegionPrivate
};
typedef enum {
G_NV (GDK_DEBUG_MISC, misc, 1 << 0),
G_NV (GDK_DEBUG_EVENTS, events, 1 << 1),
G_NV (GDK_DEBUG_DND, dnd, 1 << 2),
G_NV (GDK_DEBUG_COLOR_CONTEXT,color-context, 1 << 3),
G_NV (GDK_DEBUG_XIM, xim, 1 << 4)
} G_FLAGS (GdkDebugFlag);
GDK_DEBUG_MISC = 1 << 0,
GDK_DEBUG_EVENTS = 1 << 1,
GDK_DEBUG_DND = 1 << 2,
GDK_DEBUG_COLOR_CONTEXT = 1 << 3,
GDK_DEBUG_XIM = 1 << 4
} GdkDebugFlag;
void gdk_window_init (void);
void gdk_visual_init (void);
......
This diff is collapsed.
......@@ -328,7 +328,7 @@ gdk_colors_store (GdkColormap *colormap,
gdk_colormap_change (colormap, ncolors);
}
gint
gboolean
gdk_colors_alloc (GdkColormap *colormap,
gint contiguous,
gulong *planes,
......@@ -467,13 +467,13 @@ gdk_color_black (GdkColormap *colormap,
return return_val;
}
gint
gboolean
gdk_color_parse (const gchar *spec,
GdkColor *color)
{
Colormap xcolormap;
XColor xcolor;
gint return_val;
gboolean return_val;
g_return_val_if_fail (spec != NULL, FALSE);
g_return_val_if_fail (color != NULL, FALSE);
......@@ -493,7 +493,7 @@ gdk_color_parse (const gchar *spec,
return return_val;
}
gint
gboolean
gdk_color_alloc (GdkColormap *colormap,
GdkColor *color)
{
......@@ -501,7 +501,7 @@ gdk_color_alloc (GdkColormap *colormap,
GdkVisual *visual;
XColor xcolor;
gchar *available = NULL;
gint return_val;
gboolean return_val;
gint i, index;
g_return_val_if_fail (colormap != NULL, FALSE);
......@@ -622,7 +622,7 @@ gdk_color_alloc (GdkColormap *colormap,
return return_val;
}
gint
gboolean
gdk_color_change (GdkColormap *colormap,
GdkColor *color)
{
......
......@@ -186,7 +186,7 @@ gdk_input_device_new(XDeviceInfo *device, gint include_core)
if ((xki->min_keycode == 8) && (xki->max_keycode == 32))
{
gdkdev->info.num_keys = 32;
gdkdev->min_keycode = 0;
gdkdev->min_keycode = 1;
}
else
{
......
......@@ -32,6 +32,7 @@ libgtk_1_1_la_SOURCES = \
gtkeventbox.c \
gtkfilesel.c \
gtkfixed.c \
gtkfontsel.c \
gtkframe.c \
gtkgamma.c \
gtkgc.c \
......@@ -134,6 +135,7 @@ gtkinclude_HEADERS = \
gtkfeatures.h \
gtkfilesel.h \
gtkfixed.h \
gtkfontsel.h \
gtkframe.h \
gtkgamma.h \
gtkgc.h \
......@@ -212,9 +214,10 @@ auto-files:
make $(srcdir)/gtktypebuiltins.h
# generate gtk.defs file from gtk-boxed.defs and gcc -E
$(srcdir)/gtk.defs: @MAINT@ makeenums.awk makeenums.h gtk-boxed.defs
$(COMPILE) -E -DG_CODE_GENERATION $(srcdir)/makeenums.h $(CFLAGS) | \
awk -f $(srcdir)/makeenums.awk - defs > $@
$(srcdir)/gtk.defs: @MAINT@ makeenums.pl gtk-boxed.defs
srcdir=$(srcdir) \
perl $(srcdir)/makeenums.pl defs $(srcdir)/gtk*.h \
$(top_srcdir)/gdk/gdk*.h > $@
cat $(srcdir)/gtk-boxed.defs >> $@
# generate type identifier header (GTK_TYPE_WIDGET_FLAGS)
......@@ -229,10 +232,11 @@ $(srcdir)/gtktypebuiltins_vars.c: @MAINT@ $(srcdir)/gtk.defs maketypes.awk
$(srcdir)/gtktypebuiltins_ids.c: @MAINT@ $(srcdir)/gtk.defs maketypes.awk
awk -f $(srcdir)/maketypes.awk $(srcdir)/gtk.defs entries > $@
# generate enum value arrays from gcc -E
$(srcdir)/gtktypebuiltins_evals.c: @MAINT@ makeenums.awk makeenums.h $(srcdir)/gtk.defs
$(COMPILE) -E -DG_CODE_GENERATION $(srcdir)/makeenums.h $(CFLAGS) | \
awk -f $(srcdir)/makeenums.awk - arrays > $@
# generate enum value arrays
$(srcdir)/gtktypebuiltins_evals.c: @MAINT@ makeenums.pl $(srcdir)/gtk.defs
srcdir=$(srcdir) \
perl $(srcdir)/makeenums.pl arrays $(srcdir)/gtk*.h \
$(top_srcdir)/gdk/gdk*.h > $@
# special remake rules
#$(srcdir)/gtk.defs: @MAINT@ $(srcdir)/makeenums.awk
......
This diff is collapsed.
......@@ -50,6 +50,7 @@
#include <gtk/gtkfeatures.h>
#include <gtk/gtkfilesel.h>
#include <gtk/gtkfixed.h>
#include <gtk/gtkfontsel.h>
#include <gtk/gtkframe.h>
#include <gtk/gtkgamma.h>
#include <gtk/gtkgc.h>
......
......@@ -24,10 +24,10 @@ extern "C" {
#endif /* __cplusplus */
typedef enum {
G_NV (GTK_DEBUG_OBJECTS, objects, 1 << 0),
G_NV (GTK_DEBUG_MISC, misc, 1 << 1),
G_NV (GTK_DEBUG_SIGNALS, signals, 1 << 2)
} G_FLAGS (GtkDebugFlag);
GTK_DEBUG_OBJECTS = 1 << 0,
GTK_DEBUG_MISC = 1 << 1,
GTK_DEBUG_SIGNALS = 1 << 2
} GtkDebugFlag;
#ifdef G_ENABLE_DEBUG
......
......@@ -72,7 +72,7 @@ static void gtk_entry_queue_draw (GtkEntry *entry);
static gint gtk_entry_timer (gpointer data);
static gint gtk_entry_position (GtkEntry *entry,
gint x);
void gtk_entry_adjust_scroll (GtkEntry *entry);
static void gtk_entry_adjust_scroll (GtkEntry *entry);
static void gtk_entry_grow_text (GtkEntry *entry);
static void gtk_entry_insert_text (GtkEditable *editable,
const gchar *new_text,
......@@ -651,7 +651,6 @@ gtk_entry_size_allocate (GtkWidget *widget,
{
GtkEntry *entry;
GtkEditable *editable;
gint offset;
g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_ENTRY (widget));
......@@ -673,14 +672,6 @@ gtk_entry_size_allocate (GtkWidget *widget,
allocation->width - (widget->style->klass->xthickness + INNER_BORDER) * 2,
widget->requisition.height - (widget->style->klass->ythickness + INNER_BORDER) * 2);
/* Display as much text as we can */
offset = MAX(0, entry->char_offset[entry->nchars] -
(allocation->width -
(widget->style->klass->xthickness + INNER_BORDER) * 2));
if (entry->scroll_offset > offset)
entry->scroll_offset = offset;
/* And make sure the cursor is on screen */
gtk_entry_adjust_scroll (entry);
......@@ -1398,12 +1389,12 @@ gtk_entry_find_position (GtkEntry *entry,
gint end = entry->nchars;
gint half;
if (x <= 0)
return 0;
if (x >= entry->char_offset[end])
return end;
if (x < 0)
return 0;
/* invariant - char_pos[start] <= x < char_pos[end] */
/* invariant - char_offset[start] <= x < char_offset[end] */
while (start != end)
{
......@@ -1429,7 +1420,7 @@ gtk_entry_position (GtkEntry *entry,
void
gtk_entry_adjust_scroll (GtkEntry *entry)
{
gint xoffset;
gint xoffset, max_offset;
gint text_area_width;
g_return_if_fail (entry != NULL);
......@@ -1440,6 +1431,13 @@ gtk_entry_adjust_scroll (GtkEntry *entry)
gdk_window_get_size (entry->text_area, &text_area_width, NULL);
/* Display as much text as we can */
max_offset = MAX(0, entry->char_offset[entry->nchars] - text_area_width);
if (entry->scroll_offset > max_offset)
entry->scroll_offset = max_offset;
/* And make sure cursor is on screen */
xoffset = entry->char_offset[gtk_entry_find_char (entry, GTK_EDITABLE(entry)->current_pos)];
xoffset -= entry->scroll_offset;
......@@ -2155,6 +2153,7 @@ gtk_entry_style_set (GtkWidget *widget,
scroll_char = gtk_entry_find_position (entry, entry->scroll_offset);
gtk_entry_recompute_offsets (GTK_ENTRY (widget));
entry->scroll_offset = entry->char_offset[scroll_char];
gtk_entry_adjust_scroll (entry);
gdk_window_set_background (widget->window, &widget->style->base[GTK_STATE_NORMAL]);
gdk_window_set_background (entry->text_area, &widget->style->base[GTK_STATE_NORMAL]);
......
......@@ -8,7 +8,7 @@
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
......@@ -19,293 +19,282 @@
#ifndef __GTK_ENUMS_H__
#define __GTK_ENUMS_H__
#include <glib.h>
#ifdef __cplusplus
extern "C" {
#pragma }
#endif /* __cplusplus */
typedef enum
{
/* should the accelerator appear in
* the widget's display?
*/
G_NV (GTK_ACCEL_VISIBLE, visible, 1 << 0),
GTK_ACCEL_VISIBLE = 1 << 0,
/* should the signal associated with
* this accelerator be also visible?
*/
G_NV (GTK_ACCEL_SIGNAL_VISIBLE, signal-visible, 1 << 1),
GTK_ACCEL_SIGNAL_VISIBLE = 1 << 1,
/* may the accelerator be removed
* again?
*/
G_NV (GTK_ACCEL_LOCKED, locked, 1 << 2),
G_NV (GTK_ACCEL_MASK, mask, 0x07)
} G_FLAGS (GtkAccelFlags);
GTK_ACCEL_LOCKED = 1 << 2,
GTK_ACCEL_MASK = 0x07
} GtkAccelFlags;
/* Arrow types */
typedef enum
{
G_SV (GTK_ARROW_UP, up),
G_SV (GTK_ARROW_DOWN, down),
G_SV (GTK_ARROW_LEFT, left),
G_SV (GTK_ARROW_RIGHT, right)
} G_ENUM (GtkArrowType);
GTK_ARROW_UP,
GTK_ARROW_DOWN,
GTK_ARROW_LEFT,
GTK_ARROW_RIGHT
} GtkArrowType;
/* Attach options (for tables) */
typedef enum
{
G_NV (GTK_EXPAND, expand, 1 << 0),
G_NV (GTK_SHRINK, shrink, 1 << 1),
G_NV (GTK_FILL, fill, 1 << 2)
} G_FLAGS (GtkAttachOptions);
GTK_EXPAND = 1 << 0,
GTK_SHRINK = 1 << 1,
GTK_FILL = 1 << 2
} GtkAttachOptions;
/* button box styles */
typedef enum
/* Button box styles */
typedef enum
{
G_SV (GTK_BUTTONBOX_DEFAULT_STYLE, default),
G_SV (GTK_BUTTONBOX_SPREAD, spread),
G_SV (GTK_BUTTONBOX_EDGE, edge),
G_SV (GTK_BUTTONBOX_START, start),