forked from AuroraMiddleware/gtk
new gtk_main_level(). fixes to gtk_window_show() to prevent -1x-1 size on
window creation. some indentation fixes. this basically brings my tree back in sync with the repository again...
This commit is contained in:
parent
64fd713042
commit
8d073b0232
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
||||
Fri Nov 28 01:26:55 1997 Tim Janik <timj@psynet.net>
|
||||
|
||||
* gtk/gtkwindow.c (gtk_window_show): propagate a size_request before
|
||||
the initial window creations (prevents windows with size of -1x-1).
|
||||
|
||||
* gtk/gtkmain.c (gtk_main_level): new function to determine
|
||||
the current recursion level of gtkmain().
|
||||
(gtk_true) (gtk_false): new functions implemented as a convenience
|
||||
for signals that just need a handler with the appropriate return value.
|
||||
|
||||
Tue Nov 25 1997 Owen Taylor <owt1@cornell.edu>
|
||||
gdk.c: Fix so that "other_events" are actually generated
|
||||
|
||||
|
@ -1,3 +1,13 @@
|
||||
Fri Nov 28 01:26:55 1997 Tim Janik <timj@psynet.net>
|
||||
|
||||
* gtk/gtkwindow.c (gtk_window_show): propagate a size_request before
|
||||
the initial window creations (prevents windows with size of -1x-1).
|
||||
|
||||
* gtk/gtkmain.c (gtk_main_level): new function to determine
|
||||
the current recursion level of gtkmain().
|
||||
(gtk_true) (gtk_false): new functions implemented as a convenience
|
||||
for signals that just need a handler with the appropriate return value.
|
||||
|
||||
Tue Nov 25 1997 Owen Taylor <owt1@cornell.edu>
|
||||
gdk.c: Fix so that "other_events" are actually generated
|
||||
|
||||
|
@ -1,3 +1,13 @@
|
||||
Fri Nov 28 01:26:55 1997 Tim Janik <timj@psynet.net>
|
||||
|
||||
* gtk/gtkwindow.c (gtk_window_show): propagate a size_request before
|
||||
the initial window creations (prevents windows with size of -1x-1).
|
||||
|
||||
* gtk/gtkmain.c (gtk_main_level): new function to determine
|
||||
the current recursion level of gtkmain().
|
||||
(gtk_true) (gtk_false): new functions implemented as a convenience
|
||||
for signals that just need a handler with the appropriate return value.
|
||||
|
||||
Tue Nov 25 1997 Owen Taylor <owt1@cornell.edu>
|
||||
gdk.c: Fix so that "other_events" are actually generated
|
||||
|
||||
|
@ -1,3 +1,13 @@
|
||||
Fri Nov 28 01:26:55 1997 Tim Janik <timj@psynet.net>
|
||||
|
||||
* gtk/gtkwindow.c (gtk_window_show): propagate a size_request before
|
||||
the initial window creations (prevents windows with size of -1x-1).
|
||||
|
||||
* gtk/gtkmain.c (gtk_main_level): new function to determine
|
||||
the current recursion level of gtkmain().
|
||||
(gtk_true) (gtk_false): new functions implemented as a convenience
|
||||
for signals that just need a handler with the appropriate return value.
|
||||
|
||||
Tue Nov 25 1997 Owen Taylor <owt1@cornell.edu>
|
||||
gdk.c: Fix so that "other_events" are actually generated
|
||||
|
||||
|
@ -1,3 +1,13 @@
|
||||
Fri Nov 28 01:26:55 1997 Tim Janik <timj@psynet.net>
|
||||
|
||||
* gtk/gtkwindow.c (gtk_window_show): propagate a size_request before
|
||||
the initial window creations (prevents windows with size of -1x-1).
|
||||
|
||||
* gtk/gtkmain.c (gtk_main_level): new function to determine
|
||||
the current recursion level of gtkmain().
|
||||
(gtk_true) (gtk_false): new functions implemented as a convenience
|
||||
for signals that just need a handler with the appropriate return value.
|
||||
|
||||
Tue Nov 25 1997 Owen Taylor <owt1@cornell.edu>
|
||||
gdk.c: Fix so that "other_events" are actually generated
|
||||
|
||||
|
@ -1,3 +1,13 @@
|
||||
Fri Nov 28 01:26:55 1997 Tim Janik <timj@psynet.net>
|
||||
|
||||
* gtk/gtkwindow.c (gtk_window_show): propagate a size_request before
|
||||
the initial window creations (prevents windows with size of -1x-1).
|
||||
|
||||
* gtk/gtkmain.c (gtk_main_level): new function to determine
|
||||
the current recursion level of gtkmain().
|
||||
(gtk_true) (gtk_false): new functions implemented as a convenience
|
||||
for signals that just need a handler with the appropriate return value.
|
||||
|
||||
Tue Nov 25 1997 Owen Taylor <owt1@cornell.edu>
|
||||
gdk.c: Fix so that "other_events" are actually generated
|
||||
|
||||
|
@ -1,3 +1,13 @@
|
||||
Fri Nov 28 01:26:55 1997 Tim Janik <timj@psynet.net>
|
||||
|
||||
* gtk/gtkwindow.c (gtk_window_show): propagate a size_request before
|
||||
the initial window creations (prevents windows with size of -1x-1).
|
||||
|
||||
* gtk/gtkmain.c (gtk_main_level): new function to determine
|
||||
the current recursion level of gtkmain().
|
||||
(gtk_true) (gtk_false): new functions implemented as a convenience
|
||||
for signals that just need a handler with the appropriate return value.
|
||||
|
||||
Tue Nov 25 1997 Owen Taylor <owt1@cornell.edu>
|
||||
gdk.c: Fix so that "other_events" are actually generated
|
||||
|
||||
|
@ -41,10 +41,10 @@ struct _GtkAcceleratorTable
|
||||
/* Accelerator tables.
|
||||
*/
|
||||
GtkAcceleratorTable* gtk_accelerator_table_new (void);
|
||||
GtkAcceleratorTable* gtk_accelerator_table_find (GtkObject *object,
|
||||
const gchar *signal_name,
|
||||
guchar accelerator_key,
|
||||
guint8 accelerator_mods);
|
||||
GtkAcceleratorTable* gtk_accelerator_table_find (GtkObject *object,
|
||||
const gchar *signal_name,
|
||||
guchar accelerator_key,
|
||||
guint8 accelerator_mods);
|
||||
|
||||
void gtk_accelerator_table_destroy (GtkAcceleratorTable *table);
|
||||
GtkAcceleratorTable *gtk_accelerator_table_ref (GtkAcceleratorTable *table);
|
||||
|
@ -68,7 +68,8 @@ struct _GtkColorSelection
|
||||
|
||||
GtkWidget *wheel_area;
|
||||
GtkWidget *value_area;
|
||||
GtkWidget *sample_area, *sample_area_eb;
|
||||
GtkWidget *sample_area;
|
||||
GtkWidget *sample_area_eb;
|
||||
|
||||
GtkWidget *scales[8];
|
||||
GtkWidget *entries[8];
|
||||
|
130
gtk/gtkmain.c
130
gtk/gtkmain.c
@ -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
|
||||
@ -35,9 +35,9 @@
|
||||
|
||||
/* Private type definitions
|
||||
*/
|
||||
typedef struct _GtkInitFunction GtkInitFunction;
|
||||
typedef struct _GtkInitFunction GtkInitFunction;
|
||||
typedef struct _GtkTimeoutFunction GtkTimeoutFunction;
|
||||
typedef struct _GtkIdleFunction GtkIdleFunction;
|
||||
typedef struct _GtkIdleFunction GtkIdleFunction;
|
||||
|
||||
struct _GtkInitFunction
|
||||
{
|
||||
@ -67,41 +67,42 @@ struct _GtkIdleFunction
|
||||
};
|
||||
|
||||
|
||||
static void gtk_exit_func (void);
|
||||
static void gtk_timeout_insert (GtkTimeoutFunction *timeoutf);
|
||||
static void gtk_handle_current_timeouts (guint32 the_time);
|
||||
static void gtk_handle_current_idles ();
|
||||
static void gtk_handle_timeouts (void);
|
||||
static void gtk_handle_idle (void);
|
||||
static void gtk_handle_timer (void);
|
||||
static void gtk_propagate_event (GtkWidget *widget,
|
||||
GdkEvent *event);
|
||||
static void gtk_error (char *str);
|
||||
static void gtk_warning (char *str);
|
||||
static void gtk_message (char *str);
|
||||
static void gtk_print (char *str);
|
||||
static void gtk_exit_func (void);
|
||||
static void gtk_timeout_insert (GtkTimeoutFunction *timeoutf);
|
||||
static void gtk_handle_current_timeouts (guint32 the_time);
|
||||
static void gtk_handle_current_idles (void);
|
||||
static void gtk_handle_timeouts (void);
|
||||
static void gtk_handle_idle (void);
|
||||
static void gtk_handle_timer (void);
|
||||
static void gtk_propagate_event (GtkWidget *widget,
|
||||
GdkEvent *event);
|
||||
static void gtk_error (gchar *str);
|
||||
static void gtk_warning (gchar *str);
|
||||
static void gtk_message (gchar *str);
|
||||
static void gtk_print (gchar *str);
|
||||
|
||||
|
||||
static int done;
|
||||
static int initialized = FALSE;
|
||||
static gint done;
|
||||
static guint main_level = 0;
|
||||
static gint initialized = FALSE;
|
||||
static GdkEvent next_event;
|
||||
static GdkEvent current_event;
|
||||
static gint have_event = FALSE;
|
||||
static gint have_next_event = FALSE;
|
||||
|
||||
static GList *grabs = NULL; /* A list of grabs. The grabbing widget
|
||||
static GList *grabs = NULL; /* A list of grabs. The grabbing widget
|
||||
* is the first one on the list.
|
||||
*/
|
||||
static GList *init_functions = NULL; /* A list of init functions.
|
||||
static GList *init_functions = NULL; /* A list of init functions.
|
||||
*/
|
||||
static GList *timeout_functions = NULL; /* A list of timeout functions sorted by
|
||||
static GList *timeout_functions = NULL; /* A list of timeout functions sorted by
|
||||
* when the length of the time interval
|
||||
* remaining. Therefore, the first timeout
|
||||
* function to expire is at the head of
|
||||
* the list and the last to expire is at
|
||||
* the tail of the list.
|
||||
*/
|
||||
static GList *idle_functions = NULL; /* A list of idle functions.
|
||||
static GList *idle_functions = NULL; /* A list of idle functions.
|
||||
*/
|
||||
|
||||
static GList *current_idles = NULL;
|
||||
@ -109,16 +110,16 @@ static GList *current_timeouts = NULL;
|
||||
static GMemChunk *timeout_mem_chunk = NULL;
|
||||
static GMemChunk *idle_mem_chunk = NULL;
|
||||
|
||||
static GdkVisual *gtk_visual; /* The visual to be used in creating new
|
||||
static GdkVisual *gtk_visual; /* The visual to be used in creating new
|
||||
* widgets.
|
||||
*/
|
||||
static GdkColormap *gtk_colormap; /* The colormap to be used in creating new
|
||||
static GdkColormap *gtk_colormap; /* The colormap to be used in creating new
|
||||
* widgets.
|
||||
*/
|
||||
|
||||
|
||||
void
|
||||
gtk_init (int *argc,
|
||||
gtk_init (int *argc,
|
||||
char ***argv)
|
||||
{
|
||||
if (0)
|
||||
@ -159,8 +160,9 @@ gtk_exit (int errorcode)
|
||||
{
|
||||
/* Only if "gtk" has been initialized should we de-initialize.
|
||||
*/
|
||||
/* de-initialisation is done by the gtk_exit_funct(),
|
||||
no need to do this here (Alex J.) */
|
||||
/* de-initialisation is done by the gtk_exit_funct(),
|
||||
* no need to do this here (Alex J.)
|
||||
*/
|
||||
gdk_exit(errorcode);
|
||||
}
|
||||
|
||||
@ -178,6 +180,8 @@ gtk_main ()
|
||||
GtkInitFunction *init;
|
||||
int old_done;
|
||||
|
||||
main_level++;
|
||||
|
||||
tmp_list = functions = init_functions;
|
||||
init_functions = NULL;
|
||||
|
||||
@ -196,6 +200,14 @@ gtk_main ()
|
||||
while (!gtk_main_iteration ())
|
||||
;
|
||||
done = old_done;
|
||||
|
||||
main_level--;
|
||||
}
|
||||
|
||||
guint
|
||||
gtk_main_level (void)
|
||||
{
|
||||
return main_level;
|
||||
}
|
||||
|
||||
void
|
||||
@ -214,8 +226,9 @@ gtk_main_iteration ()
|
||||
done = FALSE;
|
||||
|
||||
/* If this is a recursive call, and there are pending timeouts or
|
||||
idles, finish them, then return immediately to avoid blocking
|
||||
in gdk_event_get() */
|
||||
* idles, finish them, then return immediately to avoid blocking
|
||||
* in gdk_event_get()
|
||||
*/
|
||||
if (current_timeouts)
|
||||
{
|
||||
gtk_handle_current_timeouts( gdk_time_get());
|
||||
@ -330,10 +343,11 @@ gtk_main_iteration ()
|
||||
|
||||
case GDK_PROPERTY_NOTIFY:
|
||||
/* To handle selection INCR transactions, we select
|
||||
PropertyNotify events on the requestor window and create
|
||||
a corresponding (fake) GdkWindow so that events get
|
||||
here. There won't be a widget though, so we have to handle
|
||||
them specially */
|
||||
* PropertyNotify events on the requestor window and create
|
||||
* a corresponding (fake) GdkWindow so that events get
|
||||
* here. There won't be a widget though, so we have to handle
|
||||
* them specially
|
||||
*/
|
||||
|
||||
if (event_widget == NULL)
|
||||
{
|
||||
@ -382,8 +396,8 @@ gtk_main_iteration ()
|
||||
}
|
||||
else
|
||||
{
|
||||
if (gdk_events_pending() == 0)
|
||||
gtk_handle_idle ();
|
||||
if (gdk_events_pending() == 0)
|
||||
gtk_handle_idle ();
|
||||
}
|
||||
|
||||
/* Handle a timeout functions that may have expired.
|
||||
@ -425,7 +439,7 @@ gtk_grab_remove (GtkWidget *widget)
|
||||
|
||||
void
|
||||
gtk_init_add (GtkFunction function,
|
||||
gpointer data)
|
||||
gpointer data)
|
||||
{
|
||||
GtkInitFunction *init;
|
||||
|
||||
@ -438,7 +452,7 @@ gtk_init_add (GtkFunction function,
|
||||
|
||||
static gint
|
||||
gtk_timeout_add_internal (guint32 interval,
|
||||
gint interp,
|
||||
gint interp,
|
||||
GtkFunction function,
|
||||
gpointer data,
|
||||
GtkDestroyNotify destroy)
|
||||
@ -486,14 +500,14 @@ gtk_timeout_add (guint32 interval,
|
||||
}
|
||||
|
||||
gint
|
||||
gtk_timeout_add_interp (guint32 interval,
|
||||
gtk_timeout_add_interp (guint32 interval,
|
||||
GtkCallbackMarshal function,
|
||||
gpointer data,
|
||||
gpointer data,
|
||||
GtkDestroyNotify destroy)
|
||||
{
|
||||
return gtk_timeout_add_internal (interval, TRUE,
|
||||
(GtkFunction) function,
|
||||
data, destroy);
|
||||
data, destroy);
|
||||
}
|
||||
|
||||
void
|
||||
@ -542,9 +556,9 @@ gtk_timeout_remove (gint tag)
|
||||
}
|
||||
|
||||
static gint
|
||||
gtk_idle_add_internal (gint interp,
|
||||
GtkFunction function,
|
||||
gpointer data,
|
||||
gtk_idle_add_internal (gint interp,
|
||||
GtkFunction function,
|
||||
gpointer data,
|
||||
GtkDestroyNotify destroy)
|
||||
{
|
||||
static gint idle_tag = 1;
|
||||
@ -577,15 +591,15 @@ gtk_idle_destroy (GtkIdleFunction *idlef)
|
||||
|
||||
gint
|
||||
gtk_idle_add (GtkFunction function,
|
||||
gpointer data)
|
||||
gpointer data)
|
||||
{
|
||||
return gtk_idle_add_internal (FALSE, function, data, NULL);
|
||||
}
|
||||
|
||||
gint
|
||||
gtk_idle_add_interp (GtkCallbackMarshal function,
|
||||
gpointer data,
|
||||
GtkDestroyNotify destroy)
|
||||
gpointer data,
|
||||
GtkDestroyNotify destroy)
|
||||
{
|
||||
return gtk_idle_add_internal (TRUE, (GtkFunction)function, data, destroy);
|
||||
}
|
||||
@ -998,25 +1012,25 @@ gtk_propagate_event (GtkWidget *widget,
|
||||
|
||||
|
||||
static void
|
||||
gtk_error (char *str)
|
||||
gtk_error (gchar *str)
|
||||
{
|
||||
gtk_print (str);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_warning (char *str)
|
||||
gtk_warning (gchar *str)
|
||||
{
|
||||
gtk_print (str);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_message (char *str)
|
||||
gtk_message (gchar *str)
|
||||
{
|
||||
gtk_print (str);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_print (char *str)
|
||||
gtk_print (gchar *str)
|
||||
{
|
||||
static GtkWidget *window = NULL;
|
||||
static GtkWidget *text;
|
||||
@ -1040,10 +1054,10 @@ gtk_print (char *str)
|
||||
{
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
/*
|
||||
gtk_signal_connect (GTK_OBJECT (window), "destroy",
|
||||
(GtkSignalFunc) gtk_widget_destroyed,
|
||||
&window);
|
||||
*/
|
||||
* gtk_signal_connect (GTK_OBJECT (window), "destroy",
|
||||
* (GtkSignalFunc) gtk_widget_destroyed,
|
||||
* &window);
|
||||
*/
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Messages");
|
||||
|
||||
box1 = gtk_vbox_new (FALSE, 0);
|
||||
@ -1071,12 +1085,12 @@ gtk_print (char *str)
|
||||
|
||||
hscrollbar = gtk_hscrollbar_new (GTK_TEXT (text)->hadj);
|
||||
gtk_table_attach (GTK_TABLE (table), hscrollbar, 0, 1, 1, 2,
|
||||
GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
|
||||
GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
|
||||
gtk_widget_show (hscrollbar);
|
||||
|
||||
vscrollbar = gtk_vscrollbar_new (GTK_TEXT (text)->vadj);
|
||||
gtk_table_attach (GTK_TABLE (table), vscrollbar, 1, 2, 0, 1,
|
||||
GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
|
||||
GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
|
||||
gtk_widget_show (vscrollbar);
|
||||
|
||||
separator = gtk_hseparator_new ();
|
||||
@ -1092,8 +1106,8 @@ gtk_print (char *str)
|
||||
|
||||
button = gtk_button_new_with_label ("close");
|
||||
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
|
||||
(GtkSignalFunc) gtk_widget_hide,
|
||||
GTK_OBJECT (window));
|
||||
(GtkSignalFunc) gtk_widget_hide,
|
||||
GTK_OBJECT (window));
|
||||
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
|
||||
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
|
||||
gtk_widget_grab_default (button);
|
||||
|
@ -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
|
||||
@ -30,42 +30,43 @@ extern "C" {
|
||||
|
||||
/* Initialization, exit, mainloop and miscellaneous routines
|
||||
*/
|
||||
void gtk_init (int *argc,
|
||||
char ***argv);
|
||||
void gtk_exit (gint error_code);
|
||||
gchar* gtk_set_locale (void);
|
||||
void gtk_main (void);
|
||||
void gtk_main_quit (void);
|
||||
gint gtk_main_iteration (void);
|
||||
void gtk_init (int *argc,
|
||||
char ***argv);
|
||||
void gtk_exit (gint error_code);
|
||||
gchar* gtk_set_locale (void);
|
||||
void gtk_main (void);
|
||||
guint gtk_main_level (void);
|
||||
void gtk_main_quit (void);
|
||||
gint gtk_main_iteration (void);
|
||||
|
||||
gint gtk_true (void);
|
||||
gint gtk_false (void);
|
||||
|
||||
void gtk_grab_add (GtkWidget *widget);
|
||||
void gtk_grab_remove (GtkWidget *widget);
|
||||
void gtk_grab_add (GtkWidget *widget);
|
||||
void gtk_grab_remove (GtkWidget *widget);
|
||||
|
||||
void gtk_init_add (GtkFunction function,
|
||||
gpointer data);
|
||||
void gtk_init_add (GtkFunction function,
|
||||
gpointer data);
|
||||
|
||||
gint gtk_timeout_add (guint32 interval,
|
||||
GtkFunction function,
|
||||
gpointer data);
|
||||
gint gtk_timeout_add_interp (guint32 interval,
|
||||
GtkCallbackMarshal function,
|
||||
gpointer data,
|
||||
GtkDestroyNotify notify);
|
||||
void gtk_timeout_remove (gint tag);
|
||||
gint gtk_timeout_add (guint32 interval,
|
||||
GtkFunction function,
|
||||
gpointer data);
|
||||
gint gtk_timeout_add_interp (guint32 interval,
|
||||
GtkCallbackMarshal function,
|
||||
gpointer data,
|
||||
GtkDestroyNotify notify);
|
||||
void gtk_timeout_remove (gint tag);
|
||||
|
||||
gint gtk_idle_add (GtkFunction function,
|
||||
gpointer data);
|
||||
gint gtk_idle_add_interp (GtkCallbackMarshal function,
|
||||
gpointer data,
|
||||
GtkDestroyNotify destroy);
|
||||
void gtk_idle_remove (gint tag);
|
||||
void gtk_idle_remove_by_data (gpointer data);
|
||||
gint gtk_idle_add (GtkFunction function,
|
||||
gpointer data);
|
||||
gint gtk_idle_add_interp (GtkCallbackMarshal function,
|
||||
gpointer data,
|
||||
GtkDestroyNotify destroy);
|
||||
void gtk_idle_remove (gint tag);
|
||||
void gtk_idle_remove_by_data (gpointer data);
|
||||
|
||||
void gtk_get_current_event (GdkEvent *event);
|
||||
GtkWidget* gtk_get_event_widget (GdkEvent *event);
|
||||
void gtk_get_current_event (GdkEvent *event);
|
||||
GtkWidget* gtk_get_event_widget (GdkEvent *event);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
283
gtk/gtkwidget.c
283
gtk/gtkwidget.c
@ -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
|
||||
@ -28,7 +28,7 @@
|
||||
#include "gdk/gdkx.h"
|
||||
|
||||
|
||||
#define WIDGET_CLASS(w) GTK_WIDGET_CLASS (GTK_OBJECT (w)->klass)
|
||||
#define WIDGET_CLASS(w) GTK_WIDGET_CLASS (GTK_OBJECT (w)->klass)
|
||||
|
||||
|
||||
enum {
|
||||
@ -84,8 +84,8 @@ typedef void (*GtkWidgetSignal1) (GtkObject *object,
|
||||
gpointer data);
|
||||
typedef gint (*GtkWidgetSignal2) (GtkObject *object,
|
||||
gpointer arg1,
|
||||
gchar arg2,
|
||||
gchar arg3,
|
||||
gchar arg2,
|
||||
gchar arg3,
|
||||
gpointer data);
|
||||
typedef void (*GtkWidgetSignal3) (GtkObject *object,
|
||||
gpointer arg1,
|
||||
@ -95,64 +95,64 @@ typedef gint (*GtkWidgetSignal4) (GtkObject *object,
|
||||
gpointer data);
|
||||
|
||||
|
||||
static void gtk_widget_marshal_signal_1 (GtkObject *object,
|
||||
GtkSignalFunc func,
|
||||
gpointer func_data,
|
||||
GtkArg *args);
|
||||
static void gtk_widget_marshal_signal_2 (GtkObject *object,
|
||||
GtkSignalFunc func,
|
||||
gpointer func_data,
|
||||
GtkArg *args);
|
||||
static void gtk_widget_marshal_signal_3 (GtkObject *object,
|
||||
GtkSignalFunc func,
|
||||
gpointer func_data,
|
||||
GtkArg *args);
|
||||
static void gtk_widget_marshal_signal_4 (GtkObject *object,
|
||||
GtkSignalFunc func,
|
||||
gpointer func_data,
|
||||
GtkArg *args);
|
||||
static void gtk_widget_marshal_signal_1 (GtkObject *object,
|
||||
GtkSignalFunc func,
|
||||
gpointer func_data,
|
||||
GtkArg *args);
|
||||
static void gtk_widget_marshal_signal_2 (GtkObject *object,
|
||||
GtkSignalFunc func,
|
||||
gpointer func_data,
|
||||
GtkArg *args);
|
||||
static void gtk_widget_marshal_signal_3 (GtkObject *object,
|
||||
GtkSignalFunc func,
|
||||
gpointer func_data,
|
||||
GtkArg *args);
|
||||
static void gtk_widget_marshal_signal_4 (GtkObject *object,
|
||||
GtkSignalFunc func,
|
||||
gpointer func_data,
|
||||
GtkArg *args);
|
||||
|
||||
static void gtk_widget_class_init (GtkWidgetClass *klass);
|
||||
static void gtk_widget_init (GtkWidget *widget);
|
||||
static void gtk_widget_arg (GtkWidget *widget,
|
||||
GtkArg *arg);
|
||||
static void gtk_real_widget_destroy (GtkObject *object);
|
||||
static void gtk_real_widget_show (GtkWidget *widget);
|
||||
static void gtk_real_widget_hide (GtkWidget *widget);
|
||||
static void gtk_real_widget_map (GtkWidget *widget);
|
||||
static void gtk_real_widget_unmap (GtkWidget *widget);
|
||||
static void gtk_real_widget_realize (GtkWidget *widget);
|
||||
static void gtk_real_widget_unrealize (GtkWidget *widget);
|
||||
static void gtk_real_widget_draw (GtkWidget *widget,
|
||||
GdkRectangle *area);
|
||||
static gint gtk_real_widget_queue_draw (GtkWidget *widget);
|
||||
static gint gtk_real_widget_queue_resize (GtkWidget *widget);
|
||||
static void gtk_real_widget_size_allocate (GtkWidget *widget,
|
||||
GtkAllocation *allocation);
|
||||
static void gtk_widget_class_init (GtkWidgetClass *klass);
|
||||
static void gtk_widget_init (GtkWidget *widget);
|
||||
static void gtk_widget_arg (GtkWidget *widget,
|
||||
GtkArg *arg);
|
||||
static void gtk_real_widget_destroy (GtkObject *object);
|
||||
static void gtk_real_widget_show (GtkWidget *widget);
|
||||
static void gtk_real_widget_hide (GtkWidget *widget);
|
||||
static void gtk_real_widget_map (GtkWidget *widget);
|
||||
static void gtk_real_widget_unmap (GtkWidget *widget);
|
||||
static void gtk_real_widget_realize (GtkWidget *widget);
|
||||
static void gtk_real_widget_unrealize (GtkWidget *widget);
|
||||
static void gtk_real_widget_draw (GtkWidget *widget,
|
||||
GdkRectangle *area);
|
||||
static gint gtk_real_widget_queue_draw (GtkWidget *widget);
|
||||
static gint gtk_real_widget_queue_resize (GtkWidget *widget);
|
||||
static void gtk_real_widget_size_allocate (GtkWidget *widget,
|
||||
GtkAllocation *allocation);
|
||||
|
||||
static GdkColormap* gtk_widget_peek_colormap (void);
|
||||
static GdkVisual* gtk_widget_peek_visual (void);
|
||||
static GtkStyle* gtk_widget_peek_style (void);
|
||||
|
||||
static void gtk_widget_set_parent_sensitive (GtkWidget *widget,
|
||||
gpointer client_data);
|
||||
gpointer client_data);
|
||||
static void gtk_widget_propagate_restore (GtkWidget *widget,
|
||||
gpointer client_data);
|
||||
static void gtk_widget_propagate_state (GtkWidget *widget,
|
||||
gpointer client_data);
|
||||
gpointer client_data);
|
||||
static void gtk_widget_propagate_state (GtkWidget *widget,
|
||||
gpointer client_data);
|
||||
static void gtk_widget_draw_children_recurse (GtkWidget *widget,
|
||||
gpointer client_data);
|
||||
gpointer client_data);
|
||||
static void gtk_widget_set_style_internal (GtkWidget *widget,
|
||||
GtkStyle *style);
|
||||
GtkStyle *style);
|
||||
static void gtk_widget_set_style_recurse (GtkWidget *widget,
|
||||
gpointer client_data);
|
||||
gpointer client_data);
|
||||
|
||||
extern GtkArg* gtk_object_collect_args (gint *nargs,
|
||||
va_list args1,
|
||||
va_list args2);
|
||||
extern GtkArg* gtk_object_collect_args (gint *nargs,
|
||||
va_list args1,
|
||||
va_list args2);
|
||||
|
||||
static GtkWidgetAuxInfo* gtk_widget_aux_info_new (void);
|
||||
static void gtk_widget_aux_info_destroy (GtkWidgetAuxInfo *aux_info);
|
||||
static void gtk_widget_aux_info_destroy (GtkWidgetAuxInfo *aux_info);
|
||||
|
||||
static GtkObjectClass *parent_class = NULL;
|
||||
static gint widget_signals[LAST_SIGNAL] = { 0 };
|
||||
@ -637,7 +637,7 @@ gtk_widget_class_init (GtkWidgetClass *klass)
|
||||
|
||||
static void
|
||||
gtk_widget_arg (GtkWidget *widget,
|
||||
GtkArg *arg)
|
||||
GtkArg *arg)
|
||||
{
|
||||
if (strcmp (arg->name, "x") == 0)
|
||||
{
|
||||
@ -658,9 +658,9 @@ gtk_widget_arg (GtkWidget *widget,
|
||||
else if (strcmp (arg->name, "visible") == 0)
|
||||
{
|
||||
if (GTK_VALUE_BOOL(*arg))
|
||||
gtk_widget_show (widget);
|
||||
gtk_widget_show (widget);
|
||||
else
|
||||
gtk_widget_hide (widget);
|
||||
gtk_widget_hide (widget);
|
||||
}
|
||||
else if (strcmp (arg->name, "sensitive") == 0)
|
||||
{
|
||||
@ -772,8 +772,8 @@ gtk_widget_new (guint type,
|
||||
*****************************************/
|
||||
|
||||
GtkWidget*
|
||||
gtk_widget_newv (guint type,
|
||||
gint nargs,
|
||||
gtk_widget_newv (guint type,
|
||||
gint nargs,
|
||||
GtkArg *args)
|
||||
{
|
||||
g_return_val_if_fail (gtk_type_is_a (type, gtk_widget_get_type ()), NULL);
|
||||
@ -821,8 +821,8 @@ gtk_widget_set (GtkWidget *widget,
|
||||
|
||||
void
|
||||
gtk_widget_setv (GtkWidget *widget,
|
||||
gint nargs,
|
||||
GtkArg *args)
|
||||
gint nargs,
|
||||
GtkArg *args)
|
||||
{
|
||||
gtk_object_setv (GTK_OBJECT (widget), nargs, args);
|
||||
}
|
||||
@ -866,22 +866,22 @@ gtk_widget_destroy (GtkWidget *widget)
|
||||
|
||||
tmp_list = resize_widgets;
|
||||
while (tmp_list)
|
||||
{
|
||||
GtkWidget *child;
|
||||
{
|
||||
GtkWidget *child;
|
||||
|
||||
child = tmp_list->data;
|
||||
tmp_list = tmp_list->next;
|
||||
child = tmp_list->data;
|
||||
tmp_list = tmp_list->next;
|
||||
|
||||
/* referencing needed? */
|
||||
GTK_WIDGET_UNSET_FLAGS (child, GTK_RESIZE_NEEDED);
|
||||
gtk_object_unref (GTK_OBJECT (child));
|
||||
}
|
||||
/* referencing needed? */
|
||||
GTK_WIDGET_UNSET_FLAGS (child, GTK_RESIZE_NEEDED);
|
||||
gtk_object_unref (GTK_OBJECT (child));
|
||||
}
|
||||
|
||||
if (resize_widgets)
|
||||
{
|
||||
gtk_object_set_data (GTK_OBJECT (widget), resize_widgets_key, NULL);
|
||||
g_slist_free (resize_widgets);
|
||||
}
|
||||
{
|
||||
gtk_object_set_data (GTK_OBJECT (widget), resize_widgets_key, NULL);
|
||||
g_slist_free (resize_widgets);
|
||||
}
|
||||
}
|
||||
|
||||
if (GTK_WIDGET_RESIZE_NEEDED (widget))
|
||||
@ -892,13 +892,13 @@ gtk_widget_destroy (GtkWidget *widget)
|
||||
resize_widgets = gtk_object_get_data (GTK_OBJECT (toplevel), resize_widgets_key);
|
||||
|
||||
if (resize_widgets)
|
||||
{
|
||||
resize_widgets = g_slist_remove (resize_widgets, widget);
|
||||
GTK_WIDGET_UNSET_FLAGS (widget, GTK_RESIZE_NEEDED);
|
||||
gtk_object_unref (GTK_OBJECT (widget));
|
||||
{
|
||||
resize_widgets = g_slist_remove (resize_widgets, widget);
|
||||
GTK_WIDGET_UNSET_FLAGS (widget, GTK_RESIZE_NEEDED);
|
||||
gtk_object_unref (GTK_OBJECT (widget));
|
||||
|
||||
gtk_object_set_data (GTK_OBJECT (toplevel), resize_widgets_key, resize_widgets);
|
||||
}
|
||||
gtk_object_set_data (GTK_OBJECT (toplevel), resize_widgets_key, resize_widgets);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -914,8 +914,8 @@ gtk_widget_destroy (GtkWidget *widget)
|
||||
|
||||
/*****************************************
|
||||
* gtk_widget_unparent: do any cleanup necessary necessary before
|
||||
* setting parent = NULL. In particular, remove
|
||||
* the focus properly.
|
||||
* setting parent = NULL. In particular, remove
|
||||
* the focus properly.
|
||||
*
|
||||
* arguments:
|
||||
*
|
||||
@ -1050,9 +1050,9 @@ gtk_widget_realize (GtkWidget *widget)
|
||||
if (!GTK_WIDGET_REALIZED (widget))
|
||||
{
|
||||
/*
|
||||
if (GTK_IS_CONTAINER (widget) && !GTK_WIDGET_NO_WINDOW (widget))
|
||||
g_print ("%s\n", gtk_type_name (GTK_WIDGET_TYPE (widget)));
|
||||
*/
|
||||
if (GTK_IS_CONTAINER (widget) && !GTK_WIDGET_NO_WINDOW (widget))
|
||||
g_print ("%s\n", gtk_type_name (GTK_WIDGET_TYPE (widget)));
|
||||
*/
|
||||
|
||||
if (widget->parent && !GTK_WIDGET_REALIZED (widget->parent))
|
||||
gtk_widget_realize (widget->parent);
|
||||
@ -1068,7 +1068,7 @@ gtk_widget_realize (GtkWidget *widget)
|
||||
|
||||
if (GTK_WIDGET_HAS_SHAPE_MASK(widget))
|
||||
{
|
||||
shape_info = gtk_object_get_data (GTK_OBJECT (widget),
|
||||
shape_info = gtk_object_get_data (GTK_OBJECT (widget),
|
||||
shape_info_key);
|
||||
g_assert (shape_info != 0);
|
||||
gdk_window_shape_combine_mask (widget->window,
|
||||
@ -1293,7 +1293,7 @@ gtk_widget_draw_children (GtkWidget *widget)
|
||||
*****************************************/
|
||||
|
||||
void
|
||||
gtk_widget_size_request (GtkWidget *widget,
|
||||
gtk_widget_size_request (GtkWidget *widget,
|
||||
GtkRequisition *requisition)
|
||||
{
|
||||
GtkWidgetAuxInfo *aux_info;
|
||||
@ -1322,7 +1322,7 @@ gtk_widget_size_request (GtkWidget *widget,
|
||||
*****************************************/
|
||||
|
||||
void
|
||||
gtk_widget_size_allocate (GtkWidget *widget,
|
||||
gtk_widget_size_allocate (GtkWidget *widget,
|
||||
GtkAllocation *allocation)
|
||||
{
|
||||
GtkWidgetAuxInfo *aux_info;
|
||||
@ -1353,11 +1353,11 @@ gtk_widget_size_allocate (GtkWidget *widget,
|
||||
*****************************************/
|
||||
|
||||
void
|
||||
gtk_widget_install_accelerator (GtkWidget *widget,
|
||||
gtk_widget_install_accelerator (GtkWidget *widget,
|
||||
GtkAcceleratorTable *table,
|
||||
const gchar *signal_name,
|
||||
gchar key,
|
||||
guint8 modifiers)
|
||||
const gchar *signal_name,
|
||||
gchar key,
|
||||
guint8 modifiers)
|
||||
{
|
||||
gint return_val;
|
||||
|
||||
@ -1378,9 +1378,9 @@ gtk_widget_install_accelerator (GtkWidget *widget,
|
||||
*****************************************/
|
||||
|
||||
void
|
||||
gtk_widget_remove_accelerator (GtkWidget *widget,
|
||||
gtk_widget_remove_accelerator (GtkWidget *widget,
|
||||
GtkAcceleratorTable *table,
|
||||
const gchar *signal_name)
|
||||
const gchar *signal_name)
|
||||
{
|
||||
g_return_if_fail (widget != NULL);
|
||||
|
||||
@ -1589,8 +1589,8 @@ gtk_widget_reparent (GtkWidget *widget,
|
||||
|
||||
void
|
||||
gtk_widget_popup (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y)
|
||||
gint x,
|
||||
gint y)
|
||||
{
|
||||
g_return_if_fail (widget != NULL);
|
||||
|
||||
@ -1613,7 +1613,7 @@ gtk_widget_popup (GtkWidget *widget,
|
||||
*****************************************/
|
||||
|
||||
gint
|
||||
gtk_widget_intersect (GtkWidget *widget,
|
||||
gtk_widget_intersect (GtkWidget *widget,
|
||||
GdkRectangle *area,
|
||||
GdkRectangle *intersection)
|
||||
{
|
||||
@ -1774,7 +1774,7 @@ gtk_widget_restore_state (GtkWidget *widget)
|
||||
*****************************************/
|
||||
|
||||
void
|
||||
gtk_widget_set_name (GtkWidget *widget,
|
||||
gtk_widget_set_name (GtkWidget *widget,
|
||||
const gchar *name)
|
||||
{
|
||||
GtkStyle *new_style;
|
||||
@ -1819,7 +1819,7 @@ gtk_widget_get_name (GtkWidget *widget)
|
||||
*****************************************/
|
||||
|
||||
void
|
||||
gtk_widget_set_state (GtkWidget *widget,
|
||||
gtk_widget_set_state (GtkWidget *widget,
|
||||
GtkStateType state)
|
||||
{
|
||||
g_return_if_fail (widget != NULL);
|
||||
@ -1849,7 +1849,7 @@ gtk_widget_set_state (GtkWidget *widget,
|
||||
|
||||
void
|
||||
gtk_widget_set_sensitive (GtkWidget *widget,
|
||||
gint sensitive)
|
||||
gint sensitive)
|
||||
{
|
||||
GtkWidget *window;
|
||||
gint old_val;
|
||||
@ -1941,7 +1941,7 @@ gtk_widget_set_parent (GtkWidget *widget,
|
||||
|
||||
void
|
||||
gtk_widget_set_style (GtkWidget *widget,
|
||||
GtkStyle *style)
|
||||
GtkStyle *style)
|
||||
{
|
||||
g_return_if_fail (widget != NULL);
|
||||
|
||||
@ -1959,8 +1959,8 @@ gtk_widget_set_style (GtkWidget *widget,
|
||||
|
||||
void
|
||||
gtk_widget_set_uposition (GtkWidget *widget,
|
||||
gint x,
|
||||
gint y)
|
||||
gint x,
|
||||
gint y)
|
||||
{
|
||||
GtkWidgetAuxInfo *aux_info;
|
||||
|
||||
@ -1999,8 +1999,8 @@ gtk_widget_set_uposition (GtkWidget *widget,
|
||||
|
||||
void
|
||||
gtk_widget_set_usize (GtkWidget *widget,
|
||||
gint width,
|
||||
gint height)
|
||||
gint width,
|
||||
gint height)
|
||||
{
|
||||
GtkWidgetAuxInfo *aux_info;
|
||||
|
||||
@ -2032,7 +2032,7 @@ gtk_widget_set_usize (GtkWidget *widget,
|
||||
|
||||
void
|
||||
gtk_widget_set_events (GtkWidget *widget,
|
||||
gint events)
|
||||
gint events)
|
||||
{
|
||||
gint *eventp;
|
||||
|
||||
@ -2114,7 +2114,7 @@ gtk_widget_get_toplevel (GtkWidget *widget)
|
||||
|
||||
GtkWidget*
|
||||
gtk_widget_get_ancestor (GtkWidget *widget,
|
||||
gint type)
|
||||
gint type)
|
||||
{
|
||||
g_return_val_if_fail (widget != NULL, NULL);
|
||||
|
||||
@ -2249,8 +2249,8 @@ gtk_widget_get_extension_events (GtkWidget *widget)
|
||||
|
||||
void
|
||||
gtk_widget_get_pointer (GtkWidget *widget,
|
||||
gint *x,
|
||||
gint *y)
|
||||
gint *x,
|
||||
gint *y)
|
||||
{
|
||||
g_return_if_fail (widget != NULL);
|
||||
|
||||
@ -2472,26 +2472,28 @@ gtk_widget_set_default_style (GtkStyle *style)
|
||||
}
|
||||
|
||||
/* Basically, send a message to all toplevel windows telling them
|
||||
that a new _GTK_STYLE_COLORS property is available on the root
|
||||
window */
|
||||
* that a new _GTK_STYLE_COLORS property is available on the root
|
||||
* window
|
||||
*/
|
||||
void
|
||||
gtk_widget_propagate_default_style(void)
|
||||
gtk_widget_propagate_default_style (void)
|
||||
{
|
||||
GdkEventClient sev;
|
||||
int i;
|
||||
|
||||
/* Set the property on the root window */
|
||||
gdk_property_change(GDK_ROOT_PARENT(),
|
||||
gdk_atom_intern("_GTK_DEFAULT_COLORS", FALSE),
|
||||
GDK_NONE, 8*sizeof(gushort),
|
||||
GDK_PROP_MODE_REPLACE,
|
||||
(guchar *)gtk_widget_get_default_style(),
|
||||
GTK_STYLE_NUM_STYLECOLORS() * sizeof(GdkColor));
|
||||
gdk_property_change (GDK_ROOT_PARENT(),
|
||||
gdk_atom_intern("_GTK_DEFAULT_COLORS", FALSE),
|
||||
GDK_NONE, 8*sizeof(gushort),
|
||||
GDK_PROP_MODE_REPLACE,
|
||||
(guchar *)gtk_widget_get_default_style(),
|
||||
GTK_STYLE_NUM_STYLECOLORS() * sizeof(GdkColor));
|
||||
|
||||
for(i = 0; i < 5; i++) sev.data.l[i] = 0;
|
||||
for (i = 0; i < 5; i++)
|
||||
sev.data.l[i] = 0;
|
||||
sev.data_format = 32;
|
||||
sev.message_type = gdk_atom_intern("_GTK_STYLE_CHANGED", FALSE);
|
||||
gdk_event_send_clientmessage_toall((GdkEvent *)&sev);
|
||||
sev.message_type = gdk_atom_intern ("_GTK_STYLE_CHANGED", FALSE);
|
||||
gdk_event_send_clientmessage_toall ((GdkEvent *) &sev);
|
||||
}
|
||||
|
||||
/*****************************************
|
||||
@ -2558,10 +2560,10 @@ gtk_widget_get_default_style ()
|
||||
*****************************************/
|
||||
|
||||
static void
|
||||
gtk_widget_marshal_signal_1 (GtkObject *object,
|
||||
gtk_widget_marshal_signal_1 (GtkObject *object,
|
||||
GtkSignalFunc func,
|
||||
gpointer func_data,
|
||||
GtkArg *args)
|
||||
gpointer func_data,
|
||||
GtkArg *args)
|
||||
{
|
||||
GtkWidgetSignal1 rfunc;
|
||||
|
||||
@ -2579,10 +2581,10 @@ gtk_widget_marshal_signal_1 (GtkObject *object,
|
||||
*****************************************/
|
||||
|
||||
static void
|
||||
gtk_widget_marshal_signal_2 (GtkObject *object,
|
||||
gtk_widget_marshal_signal_2 (GtkObject *object,
|
||||
GtkSignalFunc func,
|
||||
gpointer func_data,
|
||||
GtkArg *args)
|
||||
gpointer func_data,
|
||||
GtkArg *args)
|
||||
{
|
||||
GtkWidgetSignal2 rfunc;
|
||||
gint *return_val;
|
||||
@ -2604,10 +2606,10 @@ gtk_widget_marshal_signal_2 (GtkObject *object,
|
||||
*****************************************/
|
||||
|
||||
static void
|
||||
gtk_widget_marshal_signal_3 (GtkObject *object,
|
||||
gtk_widget_marshal_signal_3 (GtkObject *object,
|
||||
GtkSignalFunc func,
|
||||
gpointer func_data,
|
||||
GtkArg *args)
|
||||
gpointer func_data,
|
||||
GtkArg *args)
|
||||
{
|
||||
GtkWidgetSignal3 rfunc;
|
||||
|
||||
@ -2625,10 +2627,10 @@ gtk_widget_marshal_signal_3 (GtkObject *object,
|
||||
*****************************************/
|
||||
|
||||
static void
|
||||
gtk_widget_marshal_signal_4 (GtkObject *object,
|
||||
gtk_widget_marshal_signal_4 (GtkObject *object,
|
||||
GtkSignalFunc func,
|
||||
gpointer func_data,
|
||||
GtkArg *args)
|
||||
gpointer func_data,
|
||||
GtkArg *args)
|
||||
{
|
||||
GtkWidgetSignal4 rfunc;
|
||||
gint *return_val;
|
||||
@ -2859,7 +2861,7 @@ gtk_real_widget_unrealize (GtkWidget *widget)
|
||||
*****************************************/
|
||||
|
||||
static void
|
||||
gtk_real_widget_draw (GtkWidget *widget,
|
||||
gtk_real_widget_draw (GtkWidget *widget,
|
||||
GdkRectangle *area)
|
||||
{
|
||||
GdkEventExpose event;
|
||||
@ -3101,7 +3103,7 @@ gtk_widget_set_parent_sensitive (GtkWidget *widget,
|
||||
|
||||
static void
|
||||
gtk_widget_propagate_restore (GtkWidget *widget,
|
||||
gpointer client_data)
|
||||
gpointer client_data)
|
||||
{
|
||||
gtk_widget_restore_state (widget);
|
||||
}
|
||||
@ -3150,7 +3152,7 @@ gtk_widget_draw_children_recurse (GtkWidget *widget,
|
||||
|
||||
static void
|
||||
gtk_widget_set_style_internal (GtkWidget *widget,
|
||||
GtkStyle *style)
|
||||
GtkStyle *style)
|
||||
{
|
||||
GtkRequisition old_requisition;
|
||||
|
||||
@ -3193,7 +3195,7 @@ gtk_widget_set_style_internal (GtkWidget *widget,
|
||||
|
||||
static void
|
||||
gtk_widget_set_style_recurse (GtkWidget *widget,
|
||||
gpointer client_data)
|
||||
gpointer client_data)
|
||||
{
|
||||
GtkStyle *style;
|
||||
|
||||
@ -3264,8 +3266,8 @@ gtk_widget_aux_info_destroy (GtkWidgetAuxInfo *aux_info)
|
||||
void
|
||||
gtk_widget_shape_combine_mask (GtkWidget *widget,
|
||||
GdkBitmap *shape_mask,
|
||||
gint offset_x,
|
||||
gint offset_y)
|
||||
gint offset_x,
|
||||
gint offset_y)
|
||||
{
|
||||
GtkWidgetShapeInfo* shape_info;
|
||||
|
||||
@ -3326,9 +3328,9 @@ gtk_widget_dnd_drag_add (GtkWidget *widget)
|
||||
*****************************************/
|
||||
void
|
||||
gtk_widget_dnd_drag_set (GtkWidget *widget,
|
||||
guint8 drag_enable,
|
||||
gchar **type_accept_list,
|
||||
guint numtypes)
|
||||
guint8 drag_enable,
|
||||
gchar **type_accept_list,
|
||||
guint numtypes)
|
||||
{
|
||||
g_return_if_fail(widget != NULL);
|
||||
|
||||
@ -3351,10 +3353,10 @@ gtk_widget_dnd_drag_set (GtkWidget *widget,
|
||||
*****************************************/
|
||||
void
|
||||
gtk_widget_dnd_drop_set (GtkWidget *widget,
|
||||
guint8 drop_enable,
|
||||
gchar **type_accept_list,
|
||||
guint numtypes,
|
||||
guint8 is_destructive_operation)
|
||||
guint8 drop_enable,
|
||||
gchar **type_accept_list,
|
||||
guint numtypes,
|
||||
guint8 is_destructive_operation)
|
||||
{
|
||||
g_return_if_fail(widget != NULL);
|
||||
|
||||
@ -3380,11 +3382,10 @@ void
|
||||
gtk_widget_dnd_data_set (GtkWidget *widget,
|
||||
GdkEvent *event,
|
||||
gpointer data,
|
||||
gulong data_numbytes)
|
||||
gulong data_numbytes)
|
||||
{
|
||||
g_return_if_fail (widget != NULL);
|
||||
g_return_if_fail (widget->window != NULL);
|
||||
|
||||
gdk_window_dnd_data_set (widget->window, event, data, data_numbytes);
|
||||
}
|
||||
|
||||
|
@ -416,6 +416,7 @@ gtk_window_show (GtkWidget *widget)
|
||||
g_return_if_fail (GTK_IS_WINDOW (widget));
|
||||
|
||||
GTK_WIDGET_SET_FLAGS (widget, GTK_VISIBLE);
|
||||
gtk_container_need_resize (GTK_CONTAINER (widget));
|
||||
gtk_widget_map (widget);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user