1997-11-24 22:37:52 +00:00
|
|
|
/* GDK - The GIMP Drawing Kit
|
|
|
|
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
1998-08-18 03:59:41 +00:00
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
1997-11-24 22:37:52 +00:00
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
1998-04-13 02:02:47 +00:00
|
|
|
* License along with this library; if not, write to the
|
|
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
* Boston, MA 02111-1307, USA.
|
1997-11-24 22:37:52 +00:00
|
|
|
*/
|
Removed DEFS "+=" mess that breaks recent automakes. INCLUDES is the
* gdk/Makefile.am, gtk/Makefile.am:
Removed DEFS "+=" mess that breaks recent automakes.
INCLUDES is the correct way to add to CFLAGS from Makefile.am.
* gdk/gdk.c, gdk/gdkglobals.c, gdk/gdkimage.c, gdk/gdkinput.c,
gdk/gdkpixmap.c, gdk/gdkthreads.c, gdk/gdkwindow.c,
gdk/gxid_lib.c, gtk/fnmatch.c, gtk/gtkclist.c, gtk/gtkmain.c,
gtk/testthreads.c:
Include "config.h" instead of "../config.h".
Now that DEFS works again, automake will automatically pass us
the location of config.h in -I.
1998-11-24 05:58:53 +00:00
|
|
|
#include "config.h"
|
1997-11-24 22:37:52 +00:00
|
|
|
|
|
|
|
#include <ctype.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <limits.h>
|
|
|
|
|
|
|
|
#ifdef HAVE_SYS_SELECT_H
|
|
|
|
#include <sys/select.h>
|
|
|
|
#endif /* HAVE_SYS_SELECT_H_ */
|
|
|
|
|
|
|
|
#define XLIB_ILLEGAL_ACCESS
|
|
|
|
#include <X11/Xatom.h>
|
|
|
|
#include <X11/Xlib.h>
|
|
|
|
#include <X11/Xos.h>
|
|
|
|
#include <X11/Xutil.h>
|
|
|
|
#include <X11/Xmu/WinUtil.h>
|
|
|
|
#include <X11/cursorfont.h>
|
|
|
|
#include "gdk.h"
|
|
|
|
#include "gdkprivate.h"
|
|
|
|
#include "gdkinput.h"
|
1997-11-27 04:16:39 +00:00
|
|
|
#include "gdkx.h"
|
1998-12-15 07:32:11 +00:00
|
|
|
#include "gdki18n.h"
|
1997-11-24 22:37:52 +00:00
|
|
|
|
|
|
|
#ifndef X_GETTIMEOFDAY
|
|
|
|
#define X_GETTIMEOFDAY(tv) gettimeofday (tv, NULL)
|
|
|
|
#endif /* X_GETTIMEOFDAY */
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct _GdkPredicate GdkPredicate;
|
1999-02-21 19:25:53 +00:00
|
|
|
typedef struct _GdkErrorTrap GdkErrorTrap;
|
1997-11-24 22:37:52 +00:00
|
|
|
|
|
|
|
struct _GdkPredicate
|
|
|
|
{
|
|
|
|
GdkEventFunc func;
|
|
|
|
gpointer data;
|
|
|
|
};
|
|
|
|
|
1999-02-21 19:25:53 +00:00
|
|
|
struct _GdkErrorTrap
|
|
|
|
{
|
|
|
|
gint error_warnings;
|
|
|
|
gint error_code;
|
|
|
|
};
|
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
/*
|
|
|
|
* Private function declarations
|
|
|
|
*/
|
1997-12-18 02:17:14 +00:00
|
|
|
|
1998-06-28 05:44:14 +00:00
|
|
|
#ifndef HAVE_XCONVERTCASE
|
1998-08-18 03:59:41 +00:00
|
|
|
static void gdkx_XConvertCase (KeySym symbol,
|
|
|
|
KeySym *lower,
|
|
|
|
KeySym *upper);
|
1998-06-28 05:44:14 +00:00
|
|
|
#define XConvertCase gdkx_XConvertCase
|
|
|
|
#endif
|
|
|
|
|
1998-08-18 03:59:41 +00:00
|
|
|
static void gdk_exit_func (void);
|
|
|
|
static int gdk_x_error (Display *display,
|
1997-11-24 22:37:52 +00:00
|
|
|
XErrorEvent *error);
|
1998-08-18 03:59:41 +00:00
|
|
|
static int gdk_x_io_error (Display *display);
|
1997-11-24 22:37:52 +00:00
|
|
|
|
Added a modular client-message-filter mechanism, that is used for the DND
Sun Oct 18 18:16:39 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdk.c gdkprivate.h: Added a modular client-message-filter
mechanism, that is used for the DND messages.
Removed all the old DND code.
* gdk/gdkcolormap.c gdk/gdkcolormap.h: Add a function to
get the visual of a given colormap.
* gtk/gtkcolorsel.c: Conversion to new DND, drag
a color-swatch.
* gdk/gdk.h gdk/gdkdnd.c: The low-level
X oriented portions of drag and drop protocols.
Sending and receiving client messages, and navigating
window trees.
* gdk/gdkimage.c: added a gdk_flush() when destroying
SHM images to hopefully make it more likely that
X will gracefully handle the segment being destroyed.
* gdk/gdkprivate.h gtk/gtkdebug.h: Add new
DND debugging flags.
* gtk/gtkeditable.[ch]: Updates for the selection handling
changes.
* gtk/gtkselection.[ch]: Added GtkTargetList, a
refcounted data structure for keeping track of lists
of GdkAtom + information. Removed selection_handler_add
in favor of a "drag_data_get" signal.
* gtk/gtkdnd.[ch] gtk/gtk.h: New files - highlevel (event loop
dependent) parts of the DND protocols, display of drag icons,
drag-under highlighting, and the "default handlers".
* gtk/gtkinvisible.[ch]: New widget - InputOnly offscreen
windows that are used for reliable pointer grabs and
selection handling in the DND code.
* gtk/testdnd.c: New test program for new DND. (Old
DND tests in testgtk still need to be converted.)
* gtk/testselection.c: Use the new selection API.
* docs/dnd_internals: Start at describing how
all the new code works inside.
* docs/Changes-1.2.txt: New file describing source-incompatible
changes in GTK+-1.2.
Sat Oct 17 22:50:34 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdkwindow.c (gdk_window_remove_filter): Free
the right list node.
* gdk/gdkwindow.c (gdk_window_init): Add gdk_root_parent
to the XID table so we can receive events on it.
Wed Oct 14 12:57:40 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.c gdk/gdk.h (gdk_event_get_time): New function
to get the timestamp from a generic event.
Fri Oct 9 13:16:04 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_add_events): Added function
that safely adds additional events to a widget's event
mask, even if the widget has previously been realized.
(We can do this, but not remove events from the event
mask).
Fri Oct 2 17:35:35 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_property_get): Allow type == 0,
for AnyPropertyType.
Fri Oct 2 10:32:21 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_atom_intern): Add client-local
hashing.
Thu Sep 24 20:33:54 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.c (gdk_event_send_clientmessage_toall): serial
isn't a timestamp.
Thu Sep 17 14:23:03 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.c (gdk_event_translate): Removed printing
of unknown window lookup warnings. (Made it
a GDK_NOTE) - they happen in many circumstances.
1998-10-18 22:51:24 +00:00
|
|
|
GdkFilterReturn gdk_wm_protocols_filter (GdkXEvent *xev,
|
|
|
|
GdkEvent *event,
|
|
|
|
gpointer data);
|
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
/* Private variable declarations
|
|
|
|
*/
|
1998-08-18 03:59:41 +00:00
|
|
|
static int gdk_initialized = 0; /* 1 if the library is initialized,
|
1997-11-24 22:37:52 +00:00
|
|
|
* 0 otherwise.
|
|
|
|
*/
|
|
|
|
|
1998-08-18 03:59:41 +00:00
|
|
|
static struct timeval start; /* The time at which the library was
|
|
|
|
* last initialized.
|
1997-11-24 22:37:52 +00:00
|
|
|
*/
|
1998-08-18 03:59:41 +00:00
|
|
|
static struct timeval timer; /* Timeout interval to use in the call
|
|
|
|
* to "select". This is used in
|
|
|
|
* conjunction with "timerp" to create
|
|
|
|
* a maximum time to wait for an event
|
|
|
|
* to arrive.
|
1997-11-24 22:37:52 +00:00
|
|
|
*/
|
1998-08-18 03:59:41 +00:00
|
|
|
static struct timeval *timerp; /* The actual timer passed to "select"
|
|
|
|
* This may be NULL, in which case
|
|
|
|
* "select" will block until an event
|
|
|
|
* arrives.
|
1997-11-24 22:37:52 +00:00
|
|
|
*/
|
1998-08-18 03:59:41 +00:00
|
|
|
static guint32 timer_val; /* The timeout length as specified by
|
|
|
|
* the user in milliseconds.
|
1997-11-24 22:37:52 +00:00
|
|
|
*/
|
|
|
|
static gint autorepeat;
|
|
|
|
|
1999-02-21 19:25:53 +00:00
|
|
|
static GSList *gdk_error_traps = NULL; /* List of error traps */
|
|
|
|
static GSList *gdk_error_trap_free_list = NULL; /* Free list */
|
|
|
|
|
1998-02-19 06:21:27 +00:00
|
|
|
#ifdef G_ENABLE_DEBUG
|
1998-11-30 19:07:15 +00:00
|
|
|
static const GDebugKey gdk_debug_keys[] = {
|
1998-08-18 03:59:41 +00:00
|
|
|
{"events", GDK_DEBUG_EVENTS},
|
|
|
|
{"misc", GDK_DEBUG_MISC},
|
|
|
|
{"dnd", GDK_DEBUG_DND},
|
1998-02-19 06:21:27 +00:00
|
|
|
{"color-context", GDK_DEBUG_COLOR_CONTEXT},
|
1998-08-18 03:59:41 +00:00
|
|
|
{"xim", GDK_DEBUG_XIM}
|
1998-02-19 06:21:27 +00:00
|
|
|
};
|
1998-02-19 18:02:03 +00:00
|
|
|
|
|
|
|
static const int gdk_ndebug_keys = sizeof(gdk_debug_keys)/sizeof(GDebugKey);
|
|
|
|
|
1998-02-19 06:21:27 +00:00
|
|
|
#endif /* G_ENABLE_DEBUG */
|
1997-11-24 22:37:52 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
*--------------------------------------------------------------
|
|
|
|
* gdk_init
|
|
|
|
*
|
|
|
|
* Initialize the library for use.
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* "argc" is the number of arguments.
|
|
|
|
* "argv" is an array of strings.
|
|
|
|
*
|
|
|
|
* Results:
|
|
|
|
* "argc" and "argv" are modified to reflect any arguments
|
|
|
|
* which were not handled. (Such arguments should either
|
|
|
|
* be handled by the application or dismissed).
|
|
|
|
*
|
|
|
|
* Side effects:
|
|
|
|
* The library is initialized.
|
|
|
|
*
|
|
|
|
*--------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
|
|
|
|
void
|
1998-08-18 03:59:41 +00:00
|
|
|
gdk_init (int *argc,
|
1997-11-24 22:37:52 +00:00
|
|
|
char ***argv)
|
|
|
|
{
|
|
|
|
XKeyboardState keyboard_state;
|
1998-03-08 03:32:05 +00:00
|
|
|
gint synchronize;
|
|
|
|
gint i, j, k;
|
1997-11-24 22:37:52 +00:00
|
|
|
XClassHint *class_hint;
|
1998-06-10 07:32:52 +00:00
|
|
|
gchar **argv_orig = NULL;
|
|
|
|
gint argc_orig = 0;
|
1998-08-18 03:59:41 +00:00
|
|
|
|
1998-06-10 07:32:52 +00:00
|
|
|
if (gdk_initialized)
|
|
|
|
return;
|
1998-08-18 03:59:41 +00:00
|
|
|
|
1998-12-16 20:09:30 +00:00
|
|
|
if (g_thread_supported ())
|
|
|
|
gdk_threads_mutex = g_mutex_new ();
|
|
|
|
|
1998-06-10 07:32:52 +00:00
|
|
|
if (argc && argv)
|
|
|
|
{
|
|
|
|
argc_orig = *argc;
|
|
|
|
|
|
|
|
argv_orig = g_malloc ((argc_orig + 1) * sizeof (char*));
|
|
|
|
for (i = 0; i < argc_orig; i++)
|
|
|
|
argv_orig[i] = g_strdup ((*argv)[i]);
|
|
|
|
argv_orig[argc_orig] = NULL;
|
|
|
|
}
|
1998-08-18 03:59:41 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
X_GETTIMEOFDAY (&start);
|
1998-08-18 03:59:41 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
gdk_display_name = NULL;
|
1998-08-18 03:59:41 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
XSetErrorHandler (gdk_x_error);
|
|
|
|
XSetIOErrorHandler (gdk_x_io_error);
|
1998-08-18 03:59:41 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
synchronize = FALSE;
|
1998-08-18 03:59:41 +00:00
|
|
|
|
1998-02-19 18:02:03 +00:00
|
|
|
#ifdef G_ENABLE_DEBUG
|
|
|
|
{
|
|
|
|
gchar *debug_string = getenv("GDK_DEBUG");
|
|
|
|
if (debug_string != NULL)
|
|
|
|
gdk_debug_flags = g_parse_debug_string (debug_string,
|
1999-01-02 03:16:07 +00:00
|
|
|
(GDebugKey *) gdk_debug_keys,
|
1998-02-19 18:02:03 +00:00
|
|
|
gdk_ndebug_keys);
|
|
|
|
}
|
|
|
|
#endif /* G_ENABLE_DEBUG */
|
1998-08-18 03:59:41 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
if (argc && argv)
|
|
|
|
{
|
|
|
|
if (*argc > 0)
|
1998-03-17 18:29:07 +00:00
|
|
|
{
|
|
|
|
gchar *d;
|
1998-08-18 03:59:41 +00:00
|
|
|
|
1998-03-17 18:29:07 +00:00
|
|
|
d = strrchr((*argv)[0],'/');
|
|
|
|
if (d != NULL)
|
1998-08-18 16:58:09 +00:00
|
|
|
g_set_prgname (d + 1);
|
1998-03-17 18:29:07 +00:00
|
|
|
else
|
1998-08-18 16:58:09 +00:00
|
|
|
g_set_prgname ((*argv)[0]);
|
1998-03-17 18:29:07 +00:00
|
|
|
}
|
1998-08-18 03:59:41 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
for (i = 1; i < *argc;)
|
|
|
|
{
|
1998-02-19 06:21:27 +00:00
|
|
|
#ifdef G_ENABLE_DEBUG
|
1998-04-04 01:56:54 +00:00
|
|
|
if ((strcmp ("--gdk-debug", (*argv)[i]) == 0) ||
|
|
|
|
(strncmp ("--gdk-debug=", (*argv)[i], 12) == 0))
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
1998-04-04 01:56:54 +00:00
|
|
|
gchar *equal_pos = strchr ((*argv)[i], '=');
|
|
|
|
|
|
|
|
if (equal_pos != NULL)
|
|
|
|
{
|
|
|
|
gdk_debug_flags |= g_parse_debug_string (equal_pos+1,
|
1999-01-02 03:16:07 +00:00
|
|
|
(GDebugKey *) gdk_debug_keys,
|
1998-04-04 01:56:54 +00:00
|
|
|
gdk_ndebug_keys);
|
|
|
|
}
|
|
|
|
else if ((i + 1) < *argc && (*argv)[i + 1])
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
1998-02-19 18:02:03 +00:00
|
|
|
gdk_debug_flags |= g_parse_debug_string ((*argv)[i+1],
|
1999-01-02 03:16:07 +00:00
|
|
|
(GDebugKey *) gdk_debug_keys,
|
1998-02-19 18:02:03 +00:00
|
|
|
gdk_ndebug_keys);
|
1998-04-04 01:56:54 +00:00
|
|
|
(*argv)[i] = NULL;
|
1998-02-19 18:02:03 +00:00
|
|
|
i += 1;
|
|
|
|
}
|
1998-04-04 01:56:54 +00:00
|
|
|
(*argv)[i] = NULL;
|
1998-02-19 18:02:03 +00:00
|
|
|
}
|
1998-04-04 01:56:54 +00:00
|
|
|
else if ((strcmp ("--gdk-no-debug", (*argv)[i]) == 0) ||
|
|
|
|
(strncmp ("--gdk-no-debug=", (*argv)[i], 15) == 0))
|
1998-02-19 18:02:03 +00:00
|
|
|
{
|
1998-04-04 01:56:54 +00:00
|
|
|
gchar *equal_pos = strchr ((*argv)[i], '=');
|
1998-08-18 03:59:41 +00:00
|
|
|
|
1998-04-04 01:56:54 +00:00
|
|
|
if (equal_pos != NULL)
|
|
|
|
{
|
|
|
|
gdk_debug_flags &= ~g_parse_debug_string (equal_pos+1,
|
1999-01-02 03:16:07 +00:00
|
|
|
(GDebugKey *) gdk_debug_keys,
|
1998-04-04 01:56:54 +00:00
|
|
|
gdk_ndebug_keys);
|
|
|
|
}
|
|
|
|
else if ((i + 1) < *argc && (*argv)[i + 1])
|
1998-02-19 18:02:03 +00:00
|
|
|
{
|
|
|
|
gdk_debug_flags &= ~g_parse_debug_string ((*argv)[i+1],
|
1999-01-02 03:16:07 +00:00
|
|
|
(GDebugKey *) gdk_debug_keys,
|
1998-02-19 18:02:03 +00:00
|
|
|
gdk_ndebug_keys);
|
1998-04-04 01:56:54 +00:00
|
|
|
(*argv)[i] = NULL;
|
1997-11-24 22:37:52 +00:00
|
|
|
i += 1;
|
|
|
|
}
|
1998-04-04 01:56:54 +00:00
|
|
|
(*argv)[i] = NULL;
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
1998-03-14 07:29:32 +00:00
|
|
|
else
|
1998-02-19 18:02:03 +00:00
|
|
|
#endif /* G_ENABLE_DEBUG */
|
1998-03-14 07:29:32 +00:00
|
|
|
if (strcmp ("--display", (*argv)[i]) == 0)
|
1998-08-18 03:59:41 +00:00
|
|
|
{
|
|
|
|
(*argv)[i] = NULL;
|
|
|
|
|
|
|
|
if ((i + 1) < *argc && (*argv)[i + 1])
|
|
|
|
{
|
|
|
|
gdk_display_name = g_strdup ((*argv)[i + 1]);
|
|
|
|
(*argv)[i + 1] = NULL;
|
|
|
|
i += 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (strcmp ("--sync", (*argv)[i]) == 0)
|
|
|
|
{
|
|
|
|
(*argv)[i] = NULL;
|
|
|
|
synchronize = TRUE;
|
|
|
|
}
|
|
|
|
else if (strcmp ("--no-xshm", (*argv)[i]) == 0)
|
|
|
|
{
|
|
|
|
(*argv)[i] = NULL;
|
|
|
|
gdk_use_xshm = FALSE;
|
|
|
|
}
|
|
|
|
else if (strcmp ("--name", (*argv)[i]) == 0)
|
|
|
|
{
|
|
|
|
if ((i + 1) < *argc && (*argv)[i + 1])
|
|
|
|
{
|
|
|
|
(*argv)[i++] = NULL;
|
1998-08-18 16:58:09 +00:00
|
|
|
g_set_prgname ((*argv)[i]);
|
1998-08-18 03:59:41 +00:00
|
|
|
(*argv)[i] = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (strcmp ("--class", (*argv)[i]) == 0)
|
|
|
|
{
|
|
|
|
if ((i + 1) < *argc && (*argv)[i + 1])
|
|
|
|
{
|
|
|
|
(*argv)[i++] = NULL;
|
|
|
|
gdk_progclass = (*argv)[i];
|
|
|
|
(*argv)[i] = NULL;
|
|
|
|
}
|
|
|
|
}
|
1997-11-24 22:37:52 +00:00
|
|
|
#ifdef XINPUT_GXI
|
1998-08-18 03:59:41 +00:00
|
|
|
else if (strcmp ("--gxid_host", (*argv)[i]) == 0)
|
|
|
|
{
|
|
|
|
if ((i + 1) < *argc && (*argv)[i + 1])
|
|
|
|
{
|
|
|
|
(*argv)[i++] = NULL;
|
|
|
|
gdk_input_gxid_host = ((*argv)[i]);
|
|
|
|
(*argv)[i] = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (strcmp ("--gxid_port", (*argv)[i]) == 0)
|
|
|
|
{
|
|
|
|
if ((i + 1) < *argc && (*argv)[i + 1])
|
|
|
|
{
|
|
|
|
(*argv)[i++] = NULL;
|
|
|
|
gdk_input_gxid_port = atoi ((*argv)[i]);
|
|
|
|
(*argv)[i] = NULL;
|
|
|
|
}
|
|
|
|
}
|
1997-11-24 22:37:52 +00:00
|
|
|
#endif
|
1997-11-27 04:16:39 +00:00
|
|
|
#ifdef USE_XIM
|
1998-08-18 03:59:41 +00:00
|
|
|
else if (strcmp ("--xim-preedit", (*argv)[i]) == 0)
|
|
|
|
{
|
|
|
|
if ((i + 1) < *argc && (*argv)[i + 1])
|
|
|
|
{
|
|
|
|
(*argv)[i++] = NULL;
|
|
|
|
if (strcmp ("none", (*argv)[i]) == 0)
|
1998-08-25 00:06:38 +00:00
|
|
|
gdk_im_set_best_style (GDK_IM_PREEDIT_NONE);
|
1998-08-18 03:59:41 +00:00
|
|
|
else if (strcmp ("nothing", (*argv)[i]) == 0)
|
1998-08-25 00:06:38 +00:00
|
|
|
gdk_im_set_best_style (GDK_IM_PREEDIT_NOTHING);
|
1998-08-18 03:59:41 +00:00
|
|
|
else if (strcmp ("area", (*argv)[i]) == 0)
|
1998-08-25 00:06:38 +00:00
|
|
|
gdk_im_set_best_style (GDK_IM_PREEDIT_AREA);
|
1998-08-18 03:59:41 +00:00
|
|
|
else if (strcmp ("position", (*argv)[i]) == 0)
|
1998-08-25 00:06:38 +00:00
|
|
|
gdk_im_set_best_style (GDK_IM_PREEDIT_POSITION);
|
1998-08-18 03:59:41 +00:00
|
|
|
else if (strcmp ("callbacks", (*argv)[i]) == 0)
|
1998-08-25 00:06:38 +00:00
|
|
|
gdk_im_set_best_style (GDK_IM_PREEDIT_CALLBACKS);
|
1998-08-18 03:59:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (strcmp ("--xim-status", (*argv)[i]) == 0)
|
|
|
|
{
|
|
|
|
if ((i + 1) < *argc && (*argv)[i + 1])
|
|
|
|
{
|
|
|
|
(*argv)[i++] = NULL;
|
|
|
|
if (strcmp ("none", (*argv)[i]) == 0)
|
1998-08-25 00:06:38 +00:00
|
|
|
gdk_im_set_best_style (GDK_IM_STATUS_NONE);
|
1998-08-18 03:59:41 +00:00
|
|
|
else if (strcmp ("nothing", (*argv)[i]) == 0)
|
1998-08-25 00:06:38 +00:00
|
|
|
gdk_im_set_best_style (GDK_IM_STATUS_NOTHING);
|
1998-08-18 03:59:41 +00:00
|
|
|
else if (strcmp ("area", (*argv)[i]) == 0)
|
1998-08-25 00:06:38 +00:00
|
|
|
gdk_im_set_best_style (GDK_IM_STATUS_AREA);
|
1998-08-18 03:59:41 +00:00
|
|
|
else if (strcmp ("callbacks", (*argv)[i]) == 0)
|
1998-08-25 00:06:38 +00:00
|
|
|
gdk_im_set_best_style (GDK_IM_STATUS_CALLBACKS);
|
1998-08-18 03:59:41 +00:00
|
|
|
}
|
|
|
|
}
|
1997-11-27 04:16:39 +00:00
|
|
|
#endif
|
1998-08-18 03:59:41 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
i += 1;
|
|
|
|
}
|
1998-08-18 03:59:41 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
for (i = 1; i < *argc; i++)
|
|
|
|
{
|
|
|
|
for (k = i; k < *argc; k++)
|
|
|
|
if ((*argv)[k] != NULL)
|
|
|
|
break;
|
1998-08-18 03:59:41 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
if (k > i)
|
|
|
|
{
|
|
|
|
k -= i;
|
|
|
|
for (j = i + k; j < *argc; j++)
|
|
|
|
(*argv)[j-k] = (*argv)[j];
|
|
|
|
*argc -= k;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
1998-08-18 16:58:09 +00:00
|
|
|
g_set_prgname ("<unknown>");
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
1998-08-18 03:59:41 +00:00
|
|
|
|
1998-08-18 16:58:09 +00:00
|
|
|
GDK_NOTE (MISC, g_message ("progname: \"%s\"", g_get_prgname ()));
|
1998-08-18 03:59:41 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
gdk_display = XOpenDisplay (gdk_display_name);
|
|
|
|
if (!gdk_display)
|
1997-12-05 23:14:41 +00:00
|
|
|
{
|
|
|
|
g_warning ("cannot open display: %s", XDisplayName (gdk_display_name));
|
|
|
|
exit(1);
|
|
|
|
}
|
1998-08-18 03:59:41 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
if (synchronize)
|
|
|
|
XSynchronize (gdk_display, True);
|
1998-08-18 03:59:41 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
gdk_screen = DefaultScreen (gdk_display);
|
|
|
|
gdk_root_window = RootWindow (gdk_display, gdk_screen);
|
1998-08-18 03:59:41 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
gdk_leader_window = XCreateSimpleWindow(gdk_display, gdk_root_window,
|
|
|
|
10, 10, 10, 10, 0, 0 , 0);
|
|
|
|
class_hint = XAllocClassHint();
|
1998-08-18 16:58:09 +00:00
|
|
|
class_hint->res_name = g_get_prgname ();
|
1997-12-11 08:39:21 +00:00
|
|
|
if (gdk_progclass == NULL)
|
|
|
|
{
|
1998-08-18 16:58:09 +00:00
|
|
|
gdk_progclass = g_strdup (g_get_prgname ());
|
1997-12-11 08:39:21 +00:00
|
|
|
gdk_progclass[0] = toupper (gdk_progclass[0]);
|
|
|
|
}
|
1997-11-24 22:37:52 +00:00
|
|
|
class_hint->res_class = gdk_progclass;
|
1999-01-17 22:58:59 +00:00
|
|
|
XmbSetWMProperties (gdk_display, gdk_leader_window,
|
|
|
|
NULL, NULL, argv_orig, argc_orig,
|
|
|
|
NULL, NULL, class_hint);
|
1997-11-24 22:37:52 +00:00
|
|
|
XFree (class_hint);
|
1998-03-08 03:32:05 +00:00
|
|
|
|
|
|
|
for (i = 0; i < argc_orig; i++)
|
|
|
|
g_free(argv_orig[i]);
|
|
|
|
g_free(argv_orig);
|
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
gdk_wm_delete_window = XInternAtom (gdk_display, "WM_DELETE_WINDOW", True);
|
|
|
|
gdk_wm_take_focus = XInternAtom (gdk_display, "WM_TAKE_FOCUS", True);
|
|
|
|
gdk_wm_protocols = XInternAtom (gdk_display, "WM_PROTOCOLS", True);
|
|
|
|
gdk_wm_window_protocols[0] = gdk_wm_delete_window;
|
|
|
|
gdk_wm_window_protocols[1] = gdk_wm_take_focus;
|
|
|
|
gdk_selection_property = XInternAtom (gdk_display, "GDK_SELECTION", False);
|
1998-08-18 03:59:41 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
XGetKeyboardControl (gdk_display, &keyboard_state);
|
|
|
|
autorepeat = keyboard_state.global_auto_repeat;
|
1998-08-18 03:59:41 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
timer.tv_sec = 0;
|
|
|
|
timer.tv_usec = 0;
|
|
|
|
timerp = NULL;
|
1998-08-18 03:59:41 +00:00
|
|
|
|
1998-09-08 04:08:17 +00:00
|
|
|
g_atexit (gdk_exit_func);
|
1998-08-18 03:59:41 +00:00
|
|
|
|
1998-12-15 07:32:11 +00:00
|
|
|
gdk_events_init ();
|
1997-11-24 22:37:52 +00:00
|
|
|
gdk_visual_init ();
|
|
|
|
gdk_window_init ();
|
|
|
|
gdk_image_init ();
|
|
|
|
gdk_input_init ();
|
Added a modular client-message-filter mechanism, that is used for the DND
Sun Oct 18 18:16:39 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdk.c gdkprivate.h: Added a modular client-message-filter
mechanism, that is used for the DND messages.
Removed all the old DND code.
* gdk/gdkcolormap.c gdk/gdkcolormap.h: Add a function to
get the visual of a given colormap.
* gtk/gtkcolorsel.c: Conversion to new DND, drag
a color-swatch.
* gdk/gdk.h gdk/gdkdnd.c: The low-level
X oriented portions of drag and drop protocols.
Sending and receiving client messages, and navigating
window trees.
* gdk/gdkimage.c: added a gdk_flush() when destroying
SHM images to hopefully make it more likely that
X will gracefully handle the segment being destroyed.
* gdk/gdkprivate.h gtk/gtkdebug.h: Add new
DND debugging flags.
* gtk/gtkeditable.[ch]: Updates for the selection handling
changes.
* gtk/gtkselection.[ch]: Added GtkTargetList, a
refcounted data structure for keeping track of lists
of GdkAtom + information. Removed selection_handler_add
in favor of a "drag_data_get" signal.
* gtk/gtkdnd.[ch] gtk/gtk.h: New files - highlevel (event loop
dependent) parts of the DND protocols, display of drag icons,
drag-under highlighting, and the "default handlers".
* gtk/gtkinvisible.[ch]: New widget - InputOnly offscreen
windows that are used for reliable pointer grabs and
selection handling in the DND code.
* gtk/testdnd.c: New test program for new DND. (Old
DND tests in testgtk still need to be converted.)
* gtk/testselection.c: Use the new selection API.
* docs/dnd_internals: Start at describing how
all the new code works inside.
* docs/Changes-1.2.txt: New file describing source-incompatible
changes in GTK+-1.2.
Sat Oct 17 22:50:34 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdkwindow.c (gdk_window_remove_filter): Free
the right list node.
* gdk/gdkwindow.c (gdk_window_init): Add gdk_root_parent
to the XID table so we can receive events on it.
Wed Oct 14 12:57:40 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.c gdk/gdk.h (gdk_event_get_time): New function
to get the timestamp from a generic event.
Fri Oct 9 13:16:04 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_add_events): Added function
that safely adds additional events to a widget's event
mask, even if the widget has previously been realized.
(We can do this, but not remove events from the event
mask).
Fri Oct 2 17:35:35 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_property_get): Allow type == 0,
for AnyPropertyType.
Fri Oct 2 10:32:21 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_atom_intern): Add client-local
hashing.
Thu Sep 24 20:33:54 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.c (gdk_event_send_clientmessage_toall): serial
isn't a timestamp.
Thu Sep 17 14:23:03 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.c (gdk_event_translate): Removed printing
of unknown window lookup warnings. (Made it
a GDK_NOTE) - they happen in many circumstances.
1998-10-18 22:51:24 +00:00
|
|
|
gdk_dnd_init ();
|
|
|
|
|
1997-11-27 04:16:39 +00:00
|
|
|
#ifdef USE_XIM
|
Destroy widgets _after_ propagating unrealize signals through the widget
Mon Dec 7 10:27:09 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c: Destroy widgets _after_ propagating unrealize
signals through the widget heirarchy. This is unpleasant, as it
causes more X traffic, but is necessary, because we have to clean
up our Input Contexts before destroying the X windows.
(from matsu-981109-0.patch)
Mon Dec 7 10:18:18 1998 Owen Taylor <otaylor@redhat.com>
Applied gtk-a-higuti-981202-0 :
[ a-higuti@math.sci.hokudai.ac.jp (Akira Higuchi) ]
* gdk/gdk.h gdk/gdk.c
(gdk_mbstowcs): New function. Nearly equals to mbstowcs, but
implemented by a combination of Xlib functions, so
it works even with X_LOCALE.
(gdk_wcstombs): New function.
(g_mbtowc): Removed. No longer needed.
* gdk/gdk.h gdk/gdkfont.c gdk/gdkdraw.c:
Added _wc() variants to gdk_text_width(),
gdk_char_width(), gdk_draw_text(),
* gdk/gdki18n.h
(mblen, mbtowc, wctomb, mbstowcs, wcstombs,
wcslen, wcscpy, wcsncpy):
Removed. No longer needed.
(iswalnum): Removed.
(gdk_iswalnum): New macro.
(gdk_iswspace): New macro.
* gdk/gdktype.h
(GdkWChar): New typedef.
* gtk/gtkentry.h, gtk/gtkentry.c
There are many changes according to the change of the
internal representation of text, from multibyte string
to wide characters.
* gtk/gtkprivate.h, gtk/gtkmain.c
Removed the variable gtk_use_mb and related codes.
* gtk/gtkspinbutton.c
Some changes according to the change of type of entry->text.
* gtk/gtktext.h, gtk/gtktext.c
Changed the internal representation of text. We use GdkWchar
if a fontset is supplied. If not, we use guchar to save
memory.
1998-12-09 06:36:57 +00:00
|
|
|
gdk_im_open ();
|
1997-11-27 04:16:39 +00:00
|
|
|
#endif
|
1998-08-18 03:59:41 +00:00
|
|
|
|
1998-06-10 07:32:52 +00:00
|
|
|
gdk_initialized = 1;
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
*--------------------------------------------------------------
|
|
|
|
* gdk_exit
|
|
|
|
*
|
|
|
|
* Restores the library to an un-itialized state and exits
|
|
|
|
* the program using the "exit" system call.
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* "errorcode" is the error value to pass to "exit".
|
|
|
|
*
|
|
|
|
* Results:
|
|
|
|
* Allocated structures are freed and the program exits
|
|
|
|
* cleanly.
|
|
|
|
*
|
|
|
|
* Side effects:
|
|
|
|
*
|
|
|
|
*--------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
|
|
|
|
void
|
|
|
|
gdk_exit (int errorcode)
|
|
|
|
{
|
1998-08-18 03:59:41 +00:00
|
|
|
/* de-initialisation is done by the gdk_exit_funct(),
|
|
|
|
no need to do this here (Alex J.) */
|
|
|
|
exit (errorcode);
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
|
|
|
|
1998-12-15 07:32:11 +00:00
|
|
|
void
|
|
|
|
gdk_set_use_xshm (gint use_xshm)
|
|
|
|
{
|
|
|
|
gdk_use_xshm = use_xshm;
|
|
|
|
}
|
|
|
|
|
|
|
|
gint
|
|
|
|
gdk_get_use_xshm (void)
|
|
|
|
{
|
|
|
|
return gdk_use_xshm;
|
|
|
|
}
|
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
/*
|
|
|
|
*--------------------------------------------------------------
|
1998-12-15 07:32:11 +00:00
|
|
|
* gdk_time_get
|
1997-11-24 22:37:52 +00:00
|
|
|
*
|
1998-12-15 07:32:11 +00:00
|
|
|
* Get the number of milliseconds since the library was
|
|
|
|
* initialized.
|
1997-11-24 22:37:52 +00:00
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
*
|
|
|
|
* Results:
|
1998-12-15 07:32:11 +00:00
|
|
|
* The time since the library was initialized is returned.
|
|
|
|
* This time value is accurate to milliseconds even though
|
|
|
|
* a more accurate time down to the microsecond could be
|
|
|
|
* returned.
|
1997-11-24 22:37:52 +00:00
|
|
|
*
|
|
|
|
* Side effects:
|
|
|
|
*
|
|
|
|
*--------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
|
1998-12-15 07:32:11 +00:00
|
|
|
guint32
|
|
|
|
gdk_time_get (void)
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
1998-12-15 07:32:11 +00:00
|
|
|
struct timeval end;
|
|
|
|
struct timeval elapsed;
|
|
|
|
guint32 milliseconds;
|
1998-08-18 03:59:41 +00:00
|
|
|
|
1998-12-15 07:32:11 +00:00
|
|
|
X_GETTIMEOFDAY (&end);
|
1998-08-18 03:59:41 +00:00
|
|
|
|
1998-12-15 07:32:11 +00:00
|
|
|
if (start.tv_usec > end.tv_usec)
|
1998-01-17 23:24:09 +00:00
|
|
|
{
|
1998-12-15 07:32:11 +00:00
|
|
|
end.tv_usec += 1000000;
|
|
|
|
end.tv_sec--;
|
1998-01-17 23:24:09 +00:00
|
|
|
}
|
1998-12-15 07:32:11 +00:00
|
|
|
elapsed.tv_sec = end.tv_sec - start.tv_sec;
|
|
|
|
elapsed.tv_usec = end.tv_usec - start.tv_usec;
|
1998-01-17 23:24:09 +00:00
|
|
|
|
1998-12-15 07:32:11 +00:00
|
|
|
milliseconds = (elapsed.tv_sec * 1000) + (elapsed.tv_usec / 1000);
|
|
|
|
|
|
|
|
return milliseconds;
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
|
|
|
|
1997-12-18 02:17:14 +00:00
|
|
|
/*
|
|
|
|
*--------------------------------------------------------------
|
1998-12-15 07:32:11 +00:00
|
|
|
* gdk_timer_get
|
1997-12-18 02:17:14 +00:00
|
|
|
*
|
1998-12-15 07:32:11 +00:00
|
|
|
* Returns the current timer.
|
1997-12-18 02:17:14 +00:00
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
*
|
1998-12-15 07:32:11 +00:00
|
|
|
* Results:
|
|
|
|
* Returns the current timer interval. This interval is
|
|
|
|
* in units of milliseconds.
|
1997-12-18 02:17:14 +00:00
|
|
|
*
|
|
|
|
* Side effects:
|
|
|
|
*
|
1998-12-15 07:32:11 +00:00
|
|
|
*--------------------------------------------------------------
|
1998-11-06 22:05:02 +00:00
|
|
|
*/
|
|
|
|
|
1998-12-15 07:32:11 +00:00
|
|
|
guint32
|
|
|
|
gdk_timer_get (void)
|
1998-11-06 22:05:02 +00:00
|
|
|
{
|
1998-12-15 07:32:11 +00:00
|
|
|
return timer_val;
|
1998-11-06 22:05:02 +00:00
|
|
|
}
|
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
/*
|
|
|
|
*--------------------------------------------------------------
|
1998-12-15 07:32:11 +00:00
|
|
|
* gdk_timer_set
|
1997-11-24 22:37:52 +00:00
|
|
|
*
|
1998-12-15 07:32:11 +00:00
|
|
|
* Sets the timer interval.
|
1997-11-24 22:37:52 +00:00
|
|
|
*
|
|
|
|
* Arguments:
|
1998-12-15 07:32:11 +00:00
|
|
|
* "milliseconds" is the new value for the timer.
|
1997-11-24 22:37:52 +00:00
|
|
|
*
|
|
|
|
* Results:
|
|
|
|
*
|
|
|
|
* Side effects:
|
1998-12-15 07:32:11 +00:00
|
|
|
* Calls to "gdk_event_get" will last for a maximum
|
|
|
|
* of time of "milliseconds". However, a value of 0
|
|
|
|
* milliseconds will cause "gdk_event_get" to block
|
|
|
|
* indefinately until an event is received.
|
1997-11-24 22:37:52 +00:00
|
|
|
*
|
|
|
|
*--------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
|
1998-12-15 07:32:11 +00:00
|
|
|
void
|
|
|
|
gdk_timer_set (guint32 milliseconds)
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
1998-12-15 07:32:11 +00:00
|
|
|
timer_val = milliseconds;
|
|
|
|
timer.tv_sec = milliseconds / 1000;
|
|
|
|
timer.tv_usec = (milliseconds % 1000) * 1000;
|
1998-08-18 03:59:41 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
1998-12-15 07:32:11 +00:00
|
|
|
gdk_timer_enable (void)
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
1998-12-15 07:32:11 +00:00
|
|
|
timerp = &timer;
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
gdk_timer_disable (void)
|
|
|
|
{
|
|
|
|
timerp = NULL;
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
*--------------------------------------------------------------
|
1998-12-15 07:32:11 +00:00
|
|
|
* gdk_pointer_grab
|
1997-11-24 22:37:52 +00:00
|
|
|
*
|
1998-12-15 07:32:11 +00:00
|
|
|
* Grabs the pointer to a specific window
|
1997-11-24 22:37:52 +00:00
|
|
|
*
|
|
|
|
* Arguments:
|
1998-12-15 07:32:11 +00:00
|
|
|
* "window" is the window which will receive the grab
|
|
|
|
* "owner_events" specifies whether events will be reported as is,
|
|
|
|
* or relative to "window"
|
|
|
|
* "event_mask" masks only interesting events
|
|
|
|
* "confine_to" limits the cursor movement to the specified window
|
|
|
|
* "cursor" changes the cursor for the duration of the grab
|
|
|
|
* "time" specifies the time
|
1997-11-24 22:37:52 +00:00
|
|
|
*
|
|
|
|
* Results:
|
|
|
|
*
|
|
|
|
* Side effects:
|
1998-12-15 07:32:11 +00:00
|
|
|
* requires a corresponding call to gdk_pointer_ungrab
|
1997-11-24 22:37:52 +00:00
|
|
|
*
|
|
|
|
*--------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
|
1998-12-15 07:32:11 +00:00
|
|
|
gint
|
|
|
|
gdk_pointer_grab (GdkWindow * window,
|
|
|
|
gint owner_events,
|
|
|
|
GdkEventMask event_mask,
|
|
|
|
GdkWindow * confine_to,
|
|
|
|
GdkCursor * cursor,
|
|
|
|
guint32 time)
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
1998-12-15 07:32:11 +00:00
|
|
|
/* From gdkwindow.c */
|
|
|
|
gint return_val;
|
|
|
|
GdkWindowPrivate *window_private;
|
|
|
|
GdkWindowPrivate *confine_to_private;
|
|
|
|
GdkCursorPrivate *cursor_private;
|
|
|
|
guint xevent_mask;
|
|
|
|
Window xwindow;
|
|
|
|
Window xconfine_to;
|
|
|
|
Cursor xcursor;
|
|
|
|
int i;
|
1997-11-24 22:37:52 +00:00
|
|
|
|
1998-12-15 07:32:11 +00:00
|
|
|
g_return_val_if_fail (window != NULL, 0);
|
1998-08-18 03:59:41 +00:00
|
|
|
|
1998-12-15 07:32:11 +00:00
|
|
|
window_private = (GdkWindowPrivate*) window;
|
|
|
|
confine_to_private = (GdkWindowPrivate*) confine_to;
|
|
|
|
cursor_private = (GdkCursorPrivate*) cursor;
|
1998-08-18 03:59:41 +00:00
|
|
|
|
1998-12-15 07:32:11 +00:00
|
|
|
xwindow = window_private->xwindow;
|
1997-12-18 02:17:14 +00:00
|
|
|
|
1998-12-15 07:32:11 +00:00
|
|
|
if (!confine_to || confine_to_private->destroyed)
|
|
|
|
xconfine_to = None;
|
|
|
|
else
|
|
|
|
xconfine_to = confine_to_private->xwindow;
|
1998-08-18 03:59:41 +00:00
|
|
|
|
1998-12-15 07:32:11 +00:00
|
|
|
if (!cursor)
|
|
|
|
xcursor = None;
|
|
|
|
else
|
|
|
|
xcursor = cursor_private->xcursor;
|
1998-08-18 03:59:41 +00:00
|
|
|
|
|
|
|
|
1998-12-15 07:32:11 +00:00
|
|
|
xevent_mask = 0;
|
|
|
|
for (i = 0; i < gdk_nevent_masks; i++)
|
1998-01-17 23:24:09 +00:00
|
|
|
{
|
1998-12-15 07:32:11 +00:00
|
|
|
if (event_mask & (1 << (i + 1)))
|
|
|
|
xevent_mask |= gdk_event_mask_table[i];
|
1998-01-17 23:24:09 +00:00
|
|
|
}
|
1998-08-18 03:59:41 +00:00
|
|
|
|
1998-12-15 07:32:11 +00:00
|
|
|
if (gdk_input_vtable.grab_pointer)
|
|
|
|
return_val = gdk_input_vtable.grab_pointer (window,
|
|
|
|
owner_events,
|
|
|
|
event_mask,
|
|
|
|
confine_to,
|
|
|
|
time);
|
1998-02-19 06:21:27 +00:00
|
|
|
else
|
1998-12-15 07:32:11 +00:00
|
|
|
return_val = Success;
|
1998-08-18 03:59:41 +00:00
|
|
|
|
1998-12-15 07:32:11 +00:00
|
|
|
if (return_val == Success)
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
1998-12-15 07:32:11 +00:00
|
|
|
if (!window_private->destroyed)
|
|
|
|
return_val = XGrabPointer (window_private->xdisplay,
|
|
|
|
xwindow,
|
|
|
|
owner_events,
|
|
|
|
xevent_mask,
|
|
|
|
GrabModeAsync, GrabModeAsync,
|
|
|
|
xconfine_to,
|
|
|
|
xcursor,
|
|
|
|
time);
|
|
|
|
else
|
|
|
|
return_val = AlreadyGrabbed;
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
1998-08-18 03:59:41 +00:00
|
|
|
|
1998-12-15 07:32:11 +00:00
|
|
|
if (return_val == GrabSuccess)
|
|
|
|
gdk_xgrab_window = window_private;
|
1998-08-18 03:59:41 +00:00
|
|
|
|
1998-12-15 07:32:11 +00:00
|
|
|
return return_val;
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
*--------------------------------------------------------------
|
1998-12-15 07:32:11 +00:00
|
|
|
* gdk_pointer_ungrab
|
1997-11-24 22:37:52 +00:00
|
|
|
*
|
1998-12-15 07:32:11 +00:00
|
|
|
* Releases any pointer grab
|
1997-11-24 22:37:52 +00:00
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
*
|
|
|
|
* Results:
|
|
|
|
*
|
|
|
|
* Side effects:
|
|
|
|
*
|
|
|
|
*--------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
|
1998-12-15 07:32:11 +00:00
|
|
|
void
|
|
|
|
gdk_pointer_ungrab (guint32 time)
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
1998-12-15 07:32:11 +00:00
|
|
|
if (gdk_input_vtable.ungrab_pointer)
|
|
|
|
gdk_input_vtable.ungrab_pointer (time);
|
|
|
|
|
|
|
|
XUngrabPointer (gdk_display, time);
|
|
|
|
gdk_xgrab_window = NULL;
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
*--------------------------------------------------------------
|
1998-12-15 07:32:11 +00:00
|
|
|
* gdk_pointer_is_grabbed
|
1997-11-24 22:37:52 +00:00
|
|
|
*
|
1998-12-15 07:32:11 +00:00
|
|
|
* Tell wether there is an active x pointer grab in effect
|
1997-11-24 22:37:52 +00:00
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
*
|
|
|
|
* Results:
|
|
|
|
*
|
|
|
|
* Side effects:
|
|
|
|
*
|
|
|
|
*--------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
|
1997-12-18 02:17:14 +00:00
|
|
|
gint
|
1998-12-15 07:32:11 +00:00
|
|
|
gdk_pointer_is_grabbed (void)
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
1998-12-15 07:32:11 +00:00
|
|
|
return gdk_xgrab_window != NULL;
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
*--------------------------------------------------------------
|
1998-12-15 07:32:11 +00:00
|
|
|
* gdk_keyboard_grab
|
1997-11-24 22:37:52 +00:00
|
|
|
*
|
1998-12-15 07:32:11 +00:00
|
|
|
* Grabs the keyboard to a specific window
|
1997-11-24 22:37:52 +00:00
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* "window" is the window which will receive the grab
|
|
|
|
* "owner_events" specifies whether events will be reported as is,
|
|
|
|
* or relative to "window"
|
|
|
|
* "time" specifies the time
|
|
|
|
*
|
|
|
|
* Results:
|
|
|
|
*
|
|
|
|
* Side effects:
|
1998-12-15 07:32:11 +00:00
|
|
|
* requires a corresponding call to gdk_keyboard_ungrab
|
1997-11-24 22:37:52 +00:00
|
|
|
*
|
1998-12-15 07:32:11 +00:00
|
|
|
*--------------------------------------------------------------
|
|
|
|
*/
|
1998-11-06 22:05:02 +00:00
|
|
|
|
1998-12-15 07:32:11 +00:00
|
|
|
gint
|
|
|
|
gdk_keyboard_grab (GdkWindow * window,
|
|
|
|
gint owner_events,
|
|
|
|
guint32 time)
|
|
|
|
{
|
|
|
|
GdkWindowPrivate *window_private;
|
|
|
|
Window xwindow;
|
1998-08-18 03:59:41 +00:00
|
|
|
|
1998-12-15 07:32:11 +00:00
|
|
|
g_return_val_if_fail (window != NULL, 0);
|
1998-08-18 03:59:41 +00:00
|
|
|
|
1998-12-15 07:32:11 +00:00
|
|
|
window_private = (GdkWindowPrivate*) window;
|
|
|
|
xwindow = window_private->xwindow;
|
1998-08-18 03:59:41 +00:00
|
|
|
|
1998-12-15 07:32:11 +00:00
|
|
|
if (!window_private->destroyed)
|
|
|
|
return XGrabKeyboard (window_private->xdisplay,
|
|
|
|
xwindow,
|
|
|
|
owner_events,
|
|
|
|
GrabModeAsync, GrabModeAsync,
|
|
|
|
time);
|
|
|
|
else
|
|
|
|
return AlreadyGrabbed;
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
|
|
|
|
1998-12-15 07:32:11 +00:00
|
|
|
/*
|
|
|
|
*--------------------------------------------------------------
|
|
|
|
* gdk_keyboard_ungrab
|
|
|
|
*
|
|
|
|
* Releases any keyboard grab
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
*
|
|
|
|
* Results:
|
|
|
|
*
|
|
|
|
* Side effects:
|
|
|
|
*
|
|
|
|
*--------------------------------------------------------------
|
|
|
|
*/
|
Added a modular client-message-filter mechanism, that is used for the DND
Sun Oct 18 18:16:39 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdk.c gdkprivate.h: Added a modular client-message-filter
mechanism, that is used for the DND messages.
Removed all the old DND code.
* gdk/gdkcolormap.c gdk/gdkcolormap.h: Add a function to
get the visual of a given colormap.
* gtk/gtkcolorsel.c: Conversion to new DND, drag
a color-swatch.
* gdk/gdk.h gdk/gdkdnd.c: The low-level
X oriented portions of drag and drop protocols.
Sending and receiving client messages, and navigating
window trees.
* gdk/gdkimage.c: added a gdk_flush() when destroying
SHM images to hopefully make it more likely that
X will gracefully handle the segment being destroyed.
* gdk/gdkprivate.h gtk/gtkdebug.h: Add new
DND debugging flags.
* gtk/gtkeditable.[ch]: Updates for the selection handling
changes.
* gtk/gtkselection.[ch]: Added GtkTargetList, a
refcounted data structure for keeping track of lists
of GdkAtom + information. Removed selection_handler_add
in favor of a "drag_data_get" signal.
* gtk/gtkdnd.[ch] gtk/gtk.h: New files - highlevel (event loop
dependent) parts of the DND protocols, display of drag icons,
drag-under highlighting, and the "default handlers".
* gtk/gtkinvisible.[ch]: New widget - InputOnly offscreen
windows that are used for reliable pointer grabs and
selection handling in the DND code.
* gtk/testdnd.c: New test program for new DND. (Old
DND tests in testgtk still need to be converted.)
* gtk/testselection.c: Use the new selection API.
* docs/dnd_internals: Start at describing how
all the new code works inside.
* docs/Changes-1.2.txt: New file describing source-incompatible
changes in GTK+-1.2.
Sat Oct 17 22:50:34 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdkwindow.c (gdk_window_remove_filter): Free
the right list node.
* gdk/gdkwindow.c (gdk_window_init): Add gdk_root_parent
to the XID table so we can receive events on it.
Wed Oct 14 12:57:40 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.c gdk/gdk.h (gdk_event_get_time): New function
to get the timestamp from a generic event.
Fri Oct 9 13:16:04 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_add_events): Added function
that safely adds additional events to a widget's event
mask, even if the widget has previously been realized.
(We can do this, but not remove events from the event
mask).
Fri Oct 2 17:35:35 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_property_get): Allow type == 0,
for AnyPropertyType.
Fri Oct 2 10:32:21 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_atom_intern): Add client-local
hashing.
Thu Sep 24 20:33:54 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.c (gdk_event_send_clientmessage_toall): serial
isn't a timestamp.
Thu Sep 17 14:23:03 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.c (gdk_event_translate): Removed printing
of unknown window lookup warnings. (Made it
a GDK_NOTE) - they happen in many circumstances.
1998-10-18 22:51:24 +00:00
|
|
|
|
1998-12-15 07:32:11 +00:00
|
|
|
void
|
|
|
|
gdk_keyboard_ungrab (guint32 time)
|
|
|
|
{
|
|
|
|
XUngrabKeyboard (gdk_display, time);
|
|
|
|
}
|
Added a modular client-message-filter mechanism, that is used for the DND
Sun Oct 18 18:16:39 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdk.c gdkprivate.h: Added a modular client-message-filter
mechanism, that is used for the DND messages.
Removed all the old DND code.
* gdk/gdkcolormap.c gdk/gdkcolormap.h: Add a function to
get the visual of a given colormap.
* gtk/gtkcolorsel.c: Conversion to new DND, drag
a color-swatch.
* gdk/gdk.h gdk/gdkdnd.c: The low-level
X oriented portions of drag and drop protocols.
Sending and receiving client messages, and navigating
window trees.
* gdk/gdkimage.c: added a gdk_flush() when destroying
SHM images to hopefully make it more likely that
X will gracefully handle the segment being destroyed.
* gdk/gdkprivate.h gtk/gtkdebug.h: Add new
DND debugging flags.
* gtk/gtkeditable.[ch]: Updates for the selection handling
changes.
* gtk/gtkselection.[ch]: Added GtkTargetList, a
refcounted data structure for keeping track of lists
of GdkAtom + information. Removed selection_handler_add
in favor of a "drag_data_get" signal.
* gtk/gtkdnd.[ch] gtk/gtk.h: New files - highlevel (event loop
dependent) parts of the DND protocols, display of drag icons,
drag-under highlighting, and the "default handlers".
* gtk/gtkinvisible.[ch]: New widget - InputOnly offscreen
windows that are used for reliable pointer grabs and
selection handling in the DND code.
* gtk/testdnd.c: New test program for new DND. (Old
DND tests in testgtk still need to be converted.)
* gtk/testselection.c: Use the new selection API.
* docs/dnd_internals: Start at describing how
all the new code works inside.
* docs/Changes-1.2.txt: New file describing source-incompatible
changes in GTK+-1.2.
Sat Oct 17 22:50:34 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdkwindow.c (gdk_window_remove_filter): Free
the right list node.
* gdk/gdkwindow.c (gdk_window_init): Add gdk_root_parent
to the XID table so we can receive events on it.
Wed Oct 14 12:57:40 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.c gdk/gdk.h (gdk_event_get_time): New function
to get the timestamp from a generic event.
Fri Oct 9 13:16:04 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_add_events): Added function
that safely adds additional events to a widget's event
mask, even if the widget has previously been realized.
(We can do this, but not remove events from the event
mask).
Fri Oct 2 17:35:35 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_property_get): Allow type == 0,
for AnyPropertyType.
Fri Oct 2 10:32:21 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_atom_intern): Add client-local
hashing.
Thu Sep 24 20:33:54 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.c (gdk_event_send_clientmessage_toall): serial
isn't a timestamp.
Thu Sep 17 14:23:03 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.c (gdk_event_translate): Removed printing
of unknown window lookup warnings. (Made it
a GDK_NOTE) - they happen in many circumstances.
1998-10-18 22:51:24 +00:00
|
|
|
|
1998-12-15 07:32:11 +00:00
|
|
|
/*
|
|
|
|
*--------------------------------------------------------------
|
|
|
|
* gdk_screen_width
|
|
|
|
*
|
|
|
|
* Return the width of the screen.
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
*
|
|
|
|
* Results:
|
|
|
|
*
|
|
|
|
* Side effects:
|
|
|
|
*
|
|
|
|
*--------------------------------------------------------------
|
|
|
|
*/
|
Added a modular client-message-filter mechanism, that is used for the DND
Sun Oct 18 18:16:39 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdk.c gdkprivate.h: Added a modular client-message-filter
mechanism, that is used for the DND messages.
Removed all the old DND code.
* gdk/gdkcolormap.c gdk/gdkcolormap.h: Add a function to
get the visual of a given colormap.
* gtk/gtkcolorsel.c: Conversion to new DND, drag
a color-swatch.
* gdk/gdk.h gdk/gdkdnd.c: The low-level
X oriented portions of drag and drop protocols.
Sending and receiving client messages, and navigating
window trees.
* gdk/gdkimage.c: added a gdk_flush() when destroying
SHM images to hopefully make it more likely that
X will gracefully handle the segment being destroyed.
* gdk/gdkprivate.h gtk/gtkdebug.h: Add new
DND debugging flags.
* gtk/gtkeditable.[ch]: Updates for the selection handling
changes.
* gtk/gtkselection.[ch]: Added GtkTargetList, a
refcounted data structure for keeping track of lists
of GdkAtom + information. Removed selection_handler_add
in favor of a "drag_data_get" signal.
* gtk/gtkdnd.[ch] gtk/gtk.h: New files - highlevel (event loop
dependent) parts of the DND protocols, display of drag icons,
drag-under highlighting, and the "default handlers".
* gtk/gtkinvisible.[ch]: New widget - InputOnly offscreen
windows that are used for reliable pointer grabs and
selection handling in the DND code.
* gtk/testdnd.c: New test program for new DND. (Old
DND tests in testgtk still need to be converted.)
* gtk/testselection.c: Use the new selection API.
* docs/dnd_internals: Start at describing how
all the new code works inside.
* docs/Changes-1.2.txt: New file describing source-incompatible
changes in GTK+-1.2.
Sat Oct 17 22:50:34 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdkwindow.c (gdk_window_remove_filter): Free
the right list node.
* gdk/gdkwindow.c (gdk_window_init): Add gdk_root_parent
to the XID table so we can receive events on it.
Wed Oct 14 12:57:40 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.c gdk/gdk.h (gdk_event_get_time): New function
to get the timestamp from a generic event.
Fri Oct 9 13:16:04 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_add_events): Added function
that safely adds additional events to a widget's event
mask, even if the widget has previously been realized.
(We can do this, but not remove events from the event
mask).
Fri Oct 2 17:35:35 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_property_get): Allow type == 0,
for AnyPropertyType.
Fri Oct 2 10:32:21 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_atom_intern): Add client-local
hashing.
Thu Sep 24 20:33:54 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.c (gdk_event_send_clientmessage_toall): serial
isn't a timestamp.
Thu Sep 17 14:23:03 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.c (gdk_event_translate): Removed printing
of unknown window lookup warnings. (Made it
a GDK_NOTE) - they happen in many circumstances.
1998-10-18 22:51:24 +00:00
|
|
|
|
1998-12-15 07:32:11 +00:00
|
|
|
gint
|
|
|
|
gdk_screen_width (void)
|
|
|
|
{
|
|
|
|
gint return_val;
|
|
|
|
|
|
|
|
return_val = DisplayWidth (gdk_display, gdk_screen);
|
|
|
|
|
|
|
|
return return_val;
|
Added a modular client-message-filter mechanism, that is used for the DND
Sun Oct 18 18:16:39 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdk.c gdkprivate.h: Added a modular client-message-filter
mechanism, that is used for the DND messages.
Removed all the old DND code.
* gdk/gdkcolormap.c gdk/gdkcolormap.h: Add a function to
get the visual of a given colormap.
* gtk/gtkcolorsel.c: Conversion to new DND, drag
a color-swatch.
* gdk/gdk.h gdk/gdkdnd.c: The low-level
X oriented portions of drag and drop protocols.
Sending and receiving client messages, and navigating
window trees.
* gdk/gdkimage.c: added a gdk_flush() when destroying
SHM images to hopefully make it more likely that
X will gracefully handle the segment being destroyed.
* gdk/gdkprivate.h gtk/gtkdebug.h: Add new
DND debugging flags.
* gtk/gtkeditable.[ch]: Updates for the selection handling
changes.
* gtk/gtkselection.[ch]: Added GtkTargetList, a
refcounted data structure for keeping track of lists
of GdkAtom + information. Removed selection_handler_add
in favor of a "drag_data_get" signal.
* gtk/gtkdnd.[ch] gtk/gtk.h: New files - highlevel (event loop
dependent) parts of the DND protocols, display of drag icons,
drag-under highlighting, and the "default handlers".
* gtk/gtkinvisible.[ch]: New widget - InputOnly offscreen
windows that are used for reliable pointer grabs and
selection handling in the DND code.
* gtk/testdnd.c: New test program for new DND. (Old
DND tests in testgtk still need to be converted.)
* gtk/testselection.c: Use the new selection API.
* docs/dnd_internals: Start at describing how
all the new code works inside.
* docs/Changes-1.2.txt: New file describing source-incompatible
changes in GTK+-1.2.
Sat Oct 17 22:50:34 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdkwindow.c (gdk_window_remove_filter): Free
the right list node.
* gdk/gdkwindow.c (gdk_window_init): Add gdk_root_parent
to the XID table so we can receive events on it.
Wed Oct 14 12:57:40 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.c gdk/gdk.h (gdk_event_get_time): New function
to get the timestamp from a generic event.
Fri Oct 9 13:16:04 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_add_events): Added function
that safely adds additional events to a widget's event
mask, even if the widget has previously been realized.
(We can do this, but not remove events from the event
mask).
Fri Oct 2 17:35:35 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_property_get): Allow type == 0,
for AnyPropertyType.
Fri Oct 2 10:32:21 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_atom_intern): Add client-local
hashing.
Thu Sep 24 20:33:54 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.c (gdk_event_send_clientmessage_toall): serial
isn't a timestamp.
Thu Sep 17 14:23:03 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.c (gdk_event_translate): Removed printing
of unknown window lookup warnings. (Made it
a GDK_NOTE) - they happen in many circumstances.
1998-10-18 22:51:24 +00:00
|
|
|
}
|
|
|
|
|
1998-12-15 07:32:11 +00:00
|
|
|
/*
|
|
|
|
*--------------------------------------------------------------
|
|
|
|
* gdk_screen_height
|
|
|
|
*
|
|
|
|
* Return the height of the screen.
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
*
|
|
|
|
* Results:
|
|
|
|
*
|
|
|
|
* Side effects:
|
|
|
|
*
|
|
|
|
*--------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
|
|
|
|
gint
|
|
|
|
gdk_screen_height (void)
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
1998-12-15 07:32:11 +00:00
|
|
|
gint return_val;
|
1998-08-18 03:59:41 +00:00
|
|
|
|
1998-12-15 07:32:11 +00:00
|
|
|
return_val = DisplayHeight (gdk_display, gdk_screen);
|
1998-08-18 03:59:41 +00:00
|
|
|
|
1998-12-15 07:32:11 +00:00
|
|
|
return return_val;
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
|
|
|
|
1998-12-15 07:32:11 +00:00
|
|
|
/*
|
|
|
|
*--------------------------------------------------------------
|
|
|
|
* gdk_screen_width_mm
|
|
|
|
*
|
|
|
|
* Return the width of the screen in millimeters.
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
*
|
|
|
|
* Results:
|
|
|
|
*
|
|
|
|
* Side effects:
|
|
|
|
*
|
|
|
|
*--------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
|
|
|
|
gint
|
|
|
|
gdk_screen_width_mm (void)
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
1998-12-15 07:32:11 +00:00
|
|
|
gint return_val;
|
|
|
|
|
|
|
|
return_val = DisplayWidthMM (gdk_display, gdk_screen);
|
1998-08-18 03:59:41 +00:00
|
|
|
|
1998-12-15 07:32:11 +00:00
|
|
|
return return_val;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
*--------------------------------------------------------------
|
|
|
|
* gdk_screen_height
|
|
|
|
*
|
|
|
|
* Return the height of the screen in millimeters.
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
*
|
|
|
|
* Results:
|
|
|
|
*
|
|
|
|
* Side effects:
|
|
|
|
*
|
|
|
|
*--------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
|
|
|
|
gint
|
|
|
|
gdk_screen_height_mm (void)
|
|
|
|
{
|
|
|
|
gint return_val;
|
1998-08-18 03:59:41 +00:00
|
|
|
|
1998-12-15 07:32:11 +00:00
|
|
|
return_val = DisplayHeightMM (gdk_display, gdk_screen);
|
1998-08-18 03:59:41 +00:00
|
|
|
|
1998-12-15 07:32:11 +00:00
|
|
|
return return_val;
|
|
|
|
}
|
|
|
|
|
1999-01-17 22:58:59 +00:00
|
|
|
/*
|
|
|
|
*--------------------------------------------------------------
|
|
|
|
* gdk_set_sm_client_id
|
|
|
|
*
|
|
|
|
* Set the SM_CLIENT_ID property on the WM_CLIENT_LEADER window
|
|
|
|
* so that the window manager can save our state using the
|
|
|
|
* X11R6 ICCCM session management protocol. A NULL value should
|
|
|
|
* be set following disconnection from the session manager to
|
|
|
|
* remove the SM_CLIENT_ID property.
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
*
|
|
|
|
* "sm_client_id" specifies the client id assigned to us by the
|
|
|
|
* session manager or NULL to remove the property.
|
|
|
|
*
|
|
|
|
* Results:
|
|
|
|
*
|
|
|
|
* Side effects:
|
|
|
|
*
|
|
|
|
*--------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
|
|
|
|
void
|
|
|
|
gdk_set_sm_client_id (const gchar* sm_client_id)
|
|
|
|
{
|
|
|
|
if (sm_client_id && strcmp (sm_client_id, ""))
|
|
|
|
{
|
|
|
|
XChangeProperty (gdk_display, gdk_leader_window,
|
|
|
|
gdk_atom_intern ("SM_CLIENT_ID", FALSE),
|
|
|
|
XA_STRING, 8, PropModeReplace,
|
|
|
|
sm_client_id, strlen(sm_client_id));
|
|
|
|
}
|
|
|
|
else
|
|
|
|
XDeleteProperty (gdk_display, gdk_leader_window,
|
|
|
|
gdk_atom_intern ("SM_CLIENT_ID", FALSE));
|
|
|
|
}
|
|
|
|
|
1998-12-15 07:32:11 +00:00
|
|
|
void
|
|
|
|
gdk_key_repeat_disable (void)
|
|
|
|
{
|
|
|
|
XAutoRepeatOff (gdk_display);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
gdk_key_repeat_restore (void)
|
|
|
|
{
|
|
|
|
if (autorepeat)
|
|
|
|
XAutoRepeatOn (gdk_display);
|
|
|
|
else
|
|
|
|
XAutoRepeatOff (gdk_display);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
gdk_beep (void)
|
|
|
|
{
|
|
|
|
XBell(gdk_display, 100);
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
*--------------------------------------------------------------
|
|
|
|
* gdk_exit_func
|
|
|
|
*
|
|
|
|
* This is the "atexit" function that makes sure the
|
|
|
|
* library gets a chance to cleanup.
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
*
|
|
|
|
* Results:
|
|
|
|
*
|
|
|
|
* Side effects:
|
|
|
|
* The library is un-initialized and the program exits.
|
|
|
|
*
|
|
|
|
*--------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
|
|
|
|
static void
|
1998-05-03 22:41:32 +00:00
|
|
|
gdk_exit_func (void)
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
1998-01-02 03:43:24 +00:00
|
|
|
static gboolean in_gdk_exit_func = FALSE;
|
1998-08-18 03:59:41 +00:00
|
|
|
|
1998-01-02 03:43:24 +00:00
|
|
|
/* This is to avoid an infinite loop if a program segfaults in
|
|
|
|
an atexit() handler (and yes, it does happen, especially if a program
|
1998-08-18 03:59:41 +00:00
|
|
|
has trounced over memory too badly for even g_message to work) */
|
1998-06-10 07:32:52 +00:00
|
|
|
if (in_gdk_exit_func == TRUE)
|
|
|
|
return;
|
1998-01-02 03:43:24 +00:00
|
|
|
in_gdk_exit_func = TRUE;
|
1998-08-18 03:59:41 +00:00
|
|
|
|
1998-06-10 07:32:52 +00:00
|
|
|
if (gdk_initialized)
|
1997-11-24 22:37:52 +00:00
|
|
|
{
|
1997-11-27 04:16:39 +00:00
|
|
|
#ifdef USE_XIM
|
|
|
|
/* cleanup IC */
|
|
|
|
gdk_ic_cleanup ();
|
|
|
|
/* close IM */
|
|
|
|
gdk_im_close ();
|
|
|
|
#endif
|
1997-11-24 22:37:52 +00:00
|
|
|
gdk_image_exit ();
|
|
|
|
gdk_input_exit ();
|
|
|
|
gdk_key_repeat_restore ();
|
1998-08-18 03:59:41 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
XCloseDisplay (gdk_display);
|
1998-06-10 07:32:52 +00:00
|
|
|
gdk_initialized = 0;
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
*--------------------------------------------------------------
|
|
|
|
* gdk_x_error
|
|
|
|
*
|
|
|
|
* The X error handling routine.
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* "display" is the X display the error orignated from.
|
|
|
|
* "error" is the XErrorEvent that we are handling.
|
|
|
|
*
|
|
|
|
* Results:
|
|
|
|
* Either we were expecting some sort of error to occur,
|
|
|
|
* in which case we set the "gdk_error_code" flag, or this
|
|
|
|
* error was unexpected, in which case we will print an
|
|
|
|
* error message and exit. (Since trying to continue will
|
|
|
|
* most likely simply lead to more errors).
|
|
|
|
*
|
|
|
|
* Side effects:
|
|
|
|
*
|
|
|
|
*--------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
|
|
|
|
static int
|
1998-08-18 03:59:41 +00:00
|
|
|
gdk_x_error (Display *display,
|
1997-11-24 22:37:52 +00:00
|
|
|
XErrorEvent *error)
|
|
|
|
{
|
|
|
|
char buf[64];
|
1998-08-18 03:59:41 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
if (gdk_error_warnings)
|
|
|
|
{
|
|
|
|
XGetErrorText (display, error->error_code, buf, 63);
|
1998-04-03 23:21:18 +00:00
|
|
|
g_error ("%s\n serial %ld error_code %d request_code %d minor_code %d\n",
|
|
|
|
buf,
|
|
|
|
error->serial,
|
|
|
|
error->error_code,
|
|
|
|
error->request_code,
|
|
|
|
error->minor_code);
|
1997-11-24 22:37:52 +00:00
|
|
|
}
|
1998-08-18 03:59:41 +00:00
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
gdk_error_code = -1;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
*--------------------------------------------------------------
|
|
|
|
* gdk_x_io_error
|
|
|
|
*
|
|
|
|
* The X I/O error handling routine.
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* "display" is the X display the error orignated from.
|
|
|
|
*
|
|
|
|
* Results:
|
|
|
|
* An X I/O error basically means we lost our connection
|
|
|
|
* to the X server. There is not much we can do to
|
|
|
|
* continue, so simply print an error message and exit.
|
|
|
|
*
|
|
|
|
* Side effects:
|
|
|
|
*
|
|
|
|
*--------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
|
|
|
|
static int
|
|
|
|
gdk_x_io_error (Display *display)
|
|
|
|
{
|
|
|
|
g_error ("an x io error occurred");
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
1997-12-17 22:40:07 +00:00
|
|
|
gchar *
|
1999-02-21 19:25:53 +00:00
|
|
|
gdk_get_display (void)
|
1997-12-17 22:40:07 +00:00
|
|
|
{
|
|
|
|
return (gchar *)XDisplayName (gdk_display_name);
|
|
|
|
}
|
1998-03-08 21:47:14 +00:00
|
|
|
|
1999-02-21 19:25:53 +00:00
|
|
|
/*************************************************************
|
|
|
|
* gdk_error_trap_push:
|
|
|
|
* Push an error trap. X errors will be trapped until
|
|
|
|
* the corresponding gdk_error_pop(), which will return
|
|
|
|
* the error code, if any.
|
|
|
|
* arguments:
|
|
|
|
*
|
|
|
|
* results:
|
|
|
|
*************************************************************/
|
|
|
|
|
|
|
|
void
|
|
|
|
gdk_error_trap_push (void)
|
|
|
|
{
|
|
|
|
GSList *node;
|
|
|
|
GdkErrorTrap *trap;
|
|
|
|
|
|
|
|
if (gdk_error_trap_free_list)
|
|
|
|
{
|
|
|
|
node = gdk_error_trap_free_list;
|
|
|
|
gdk_error_trap_free_list = gdk_error_trap_free_list->next;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
node = g_slist_alloc();
|
|
|
|
node->data = g_new (GdkErrorTrap, 1);
|
|
|
|
}
|
|
|
|
|
|
|
|
node->next = gdk_error_traps;
|
|
|
|
gdk_error_traps = node;
|
|
|
|
|
|
|
|
trap = node->data;
|
|
|
|
trap->error_code = gdk_error_code;
|
|
|
|
trap->error_warnings = gdk_error_warnings;
|
|
|
|
|
|
|
|
gdk_error_code = 0;
|
|
|
|
gdk_error_warnings = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************
|
|
|
|
* gdk_error_trap_pop:
|
|
|
|
* Pop an error trap added with gdk_error_push()
|
|
|
|
* arguments:
|
|
|
|
*
|
|
|
|
* results:
|
|
|
|
* 0, if no error occured, otherwise the error code.
|
|
|
|
*************************************************************/
|
|
|
|
|
|
|
|
gint
|
|
|
|
gdk_error_trap_pop (void)
|
|
|
|
{
|
|
|
|
GSList *node;
|
|
|
|
GdkErrorTrap *trap;
|
|
|
|
gint result;
|
|
|
|
|
|
|
|
g_return_val_if_fail (gdk_error_traps != NULL, 0);
|
|
|
|
|
|
|
|
node = gdk_error_traps;
|
|
|
|
gdk_error_traps = gdk_error_traps->next;
|
|
|
|
|
|
|
|
node->next = gdk_error_trap_free_list;
|
|
|
|
gdk_error_trap_free_list = node;
|
|
|
|
|
|
|
|
result = gdk_error_code;
|
|
|
|
|
|
|
|
trap = node->data;
|
|
|
|
gdk_error_code = trap->error_code;
|
|
|
|
gdk_error_warnings = trap->error_warnings;
|
|
|
|
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
1998-03-08 21:47:14 +00:00
|
|
|
gint
|
|
|
|
gdk_send_xevent (Window window, gboolean propagate, glong event_mask,
|
|
|
|
XEvent *event_send)
|
|
|
|
{
|
|
|
|
Status result;
|
Added a modular client-message-filter mechanism, that is used for the DND
Sun Oct 18 18:16:39 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdk.c gdkprivate.h: Added a modular client-message-filter
mechanism, that is used for the DND messages.
Removed all the old DND code.
* gdk/gdkcolormap.c gdk/gdkcolormap.h: Add a function to
get the visual of a given colormap.
* gtk/gtkcolorsel.c: Conversion to new DND, drag
a color-swatch.
* gdk/gdk.h gdk/gdkdnd.c: The low-level
X oriented portions of drag and drop protocols.
Sending and receiving client messages, and navigating
window trees.
* gdk/gdkimage.c: added a gdk_flush() when destroying
SHM images to hopefully make it more likely that
X will gracefully handle the segment being destroyed.
* gdk/gdkprivate.h gtk/gtkdebug.h: Add new
DND debugging flags.
* gtk/gtkeditable.[ch]: Updates for the selection handling
changes.
* gtk/gtkselection.[ch]: Added GtkTargetList, a
refcounted data structure for keeping track of lists
of GdkAtom + information. Removed selection_handler_add
in favor of a "drag_data_get" signal.
* gtk/gtkdnd.[ch] gtk/gtk.h: New files - highlevel (event loop
dependent) parts of the DND protocols, display of drag icons,
drag-under highlighting, and the "default handlers".
* gtk/gtkinvisible.[ch]: New widget - InputOnly offscreen
windows that are used for reliable pointer grabs and
selection handling in the DND code.
* gtk/testdnd.c: New test program for new DND. (Old
DND tests in testgtk still need to be converted.)
* gtk/testselection.c: Use the new selection API.
* docs/dnd_internals: Start at describing how
all the new code works inside.
* docs/Changes-1.2.txt: New file describing source-incompatible
changes in GTK+-1.2.
Sat Oct 17 22:50:34 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdkwindow.c (gdk_window_remove_filter): Free
the right list node.
* gdk/gdkwindow.c (gdk_window_init): Add gdk_root_parent
to the XID table so we can receive events on it.
Wed Oct 14 12:57:40 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.c gdk/gdk.h (gdk_event_get_time): New function
to get the timestamp from a generic event.
Fri Oct 9 13:16:04 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_add_events): Added function
that safely adds additional events to a widget's event
mask, even if the widget has previously been realized.
(We can do this, but not remove events from the event
mask).
Fri Oct 2 17:35:35 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_property_get): Allow type == 0,
for AnyPropertyType.
Fri Oct 2 10:32:21 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_atom_intern): Add client-local
hashing.
Thu Sep 24 20:33:54 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.c (gdk_event_send_clientmessage_toall): serial
isn't a timestamp.
Thu Sep 17 14:23:03 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.c (gdk_event_translate): Removed printing
of unknown window lookup warnings. (Made it
a GDK_NOTE) - they happen in many circumstances.
1998-10-18 22:51:24 +00:00
|
|
|
gint old_warnings = gdk_error_warnings;
|
1998-03-08 21:47:14 +00:00
|
|
|
|
|
|
|
gdk_error_code = 0;
|
|
|
|
|
|
|
|
gdk_error_warnings = 0;
|
|
|
|
result = XSendEvent (gdk_display, window, propagate, event_mask, event_send);
|
|
|
|
XSync (gdk_display, False);
|
Added a modular client-message-filter mechanism, that is used for the DND
Sun Oct 18 18:16:39 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdk.c gdkprivate.h: Added a modular client-message-filter
mechanism, that is used for the DND messages.
Removed all the old DND code.
* gdk/gdkcolormap.c gdk/gdkcolormap.h: Add a function to
get the visual of a given colormap.
* gtk/gtkcolorsel.c: Conversion to new DND, drag
a color-swatch.
* gdk/gdk.h gdk/gdkdnd.c: The low-level
X oriented portions of drag and drop protocols.
Sending and receiving client messages, and navigating
window trees.
* gdk/gdkimage.c: added a gdk_flush() when destroying
SHM images to hopefully make it more likely that
X will gracefully handle the segment being destroyed.
* gdk/gdkprivate.h gtk/gtkdebug.h: Add new
DND debugging flags.
* gtk/gtkeditable.[ch]: Updates for the selection handling
changes.
* gtk/gtkselection.[ch]: Added GtkTargetList, a
refcounted data structure for keeping track of lists
of GdkAtom + information. Removed selection_handler_add
in favor of a "drag_data_get" signal.
* gtk/gtkdnd.[ch] gtk/gtk.h: New files - highlevel (event loop
dependent) parts of the DND protocols, display of drag icons,
drag-under highlighting, and the "default handlers".
* gtk/gtkinvisible.[ch]: New widget - InputOnly offscreen
windows that are used for reliable pointer grabs and
selection handling in the DND code.
* gtk/testdnd.c: New test program for new DND. (Old
DND tests in testgtk still need to be converted.)
* gtk/testselection.c: Use the new selection API.
* docs/dnd_internals: Start at describing how
all the new code works inside.
* docs/Changes-1.2.txt: New file describing source-incompatible
changes in GTK+-1.2.
Sat Oct 17 22:50:34 1998 Owen Taylor <otaylor@gtk.org>
* gdk/gdkwindow.c (gdk_window_remove_filter): Free
the right list node.
* gdk/gdkwindow.c (gdk_window_init): Add gdk_root_parent
to the XID table so we can receive events on it.
Wed Oct 14 12:57:40 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.c gdk/gdk.h (gdk_event_get_time): New function
to get the timestamp from a generic event.
Fri Oct 9 13:16:04 1998 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_add_events): Added function
that safely adds additional events to a widget's event
mask, even if the widget has previously been realized.
(We can do this, but not remove events from the event
mask).
Fri Oct 2 17:35:35 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_property_get): Allow type == 0,
for AnyPropertyType.
Fri Oct 2 10:32:21 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdkproperty.c (gdk_atom_intern): Add client-local
hashing.
Thu Sep 24 20:33:54 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.c (gdk_event_send_clientmessage_toall): serial
isn't a timestamp.
Thu Sep 17 14:23:03 1998 Owen Taylor <otaylor@redhat.com>
* gdk/gdk.c (gdk_event_translate): Removed printing
of unknown window lookup warnings. (Made it
a GDK_NOTE) - they happen in many circumstances.
1998-10-18 22:51:24 +00:00
|
|
|
gdk_error_warnings = old_warnings;
|
1998-08-18 03:59:41 +00:00
|
|
|
|
1998-03-08 21:47:14 +00:00
|
|
|
return result && (gdk_error_code != -1);
|
|
|
|
}
|
fixed an assertment.
Sat Jun 6 06:01:24 1998 Tim Janik <timj@gtk.org>
* gtk/gtksignal.c (gtk_signal_emitv): fixed an assertment.
* gtk/makeenums.awk: a script to generate the GtkEnumValue arrays from,
this should eventually be done by gentypeinfo.el somewhen.
* gtk/gtkenumvalues.c: new generated file to hold GtkEnumValue arrays.
* gtk/gtktypeutils.h: new function gtk_enum_values() to retrive all the
enum values of an enum type.
* gtk/gtk.defs:
* gtk/gtkcurve.h:
* gtk/gtkobject.h:
* gtk/gtkprivate.h:
* gtk/gtkwidget.h:
* gtk/gtkenums.h:
brought enum/flags definitions in sync, added a few more enum
definitions for bindings and pattern matching.
* some more macro and GtkType fixups in various places.
* gdk/gdktypes.h (enum): added a new value GDK_AFTER_MASK, which is used
as a key-release modifier for the binding system.
Fri Jun 5 06:06:06 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmenu.h (struct _GtkMenu): removed GList*children, since it
was a stale list pointer that is already present in GtkMenuShell.
* gtk/gtkmenushell.h (struct _GtkMenuShellClass): added a signal
GtkMenuShell::selection_done which is emitted after the menu shell
poped down again and all possible menu items have been activated.
Thu Jun 4 02:20:42 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmenushell.c (gtk_menu_shell_button_release): flush the x-queue
before activation of the menuitem, so the menu is actually taken off the
screen prior to any menu item activation.
* gtk/gtkctree.c (gtk_ctree_get_row_data): allow function invokation
for NULL nodes.
* gtk/gtkwidget.h:
* gtk/gtkwidget.c: new function gtk_widget_stop_accelerator to stop
the emission of the "add-accelerator" signal on a widget. this is
usefull to prevent accelerator installation on certain widgets.
* gtk/gtknotebook.c (gtk_notebook_menu_item_create): keep the menu
labels left justified, by setting their alignment. stop accelerator
installation for the menu items, since we use dynamic menus.
Wed Jun 3 06:41:22 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmenufactory.c: adaptions to use the new accel groups. people
should *really* use GtkItemFactory. this is only for preserving source
compatibility where possible, use of GtkMenuFactory is deprecated as of
now.
* gtk/gtkobject.h (gtk_object_class_add_user_signal): new function
to create user signals of type GTK_RUN_NO_RECURSE. don't know why i
missed this possibility when i added gtk_object_class_add_user_signal
in late january.
* gtk/gtkmain.c (gtk_init): ignore subsequent function calls.
Sun May 31 07:31:09 1998 Tim Janik <timj@gtk.org>
* gtk/gtkaccelgroup.h:
* gtk/gtkaccelgroup.c: new implementation of the accelerator concept.
* gtk/gtkaccellabel.h:
* gtk/gtkaccellabel.c: new widget derived from GtkLabel whitch features
display of the accelerators associated with a certain widget.
* gtk/gtkitemfactory.h:
* gtk/gtkitemfactory.c: new widget, item factory with automatic rc
parsing and accelerator handling.
* gtk/gtkmenu.c (gtk_menu_reposition): new function to care for
positioning a menu.
(gtk_menu_map): removed the allocation code.
(gtk_menu_size_allocate): care for redrawing of children and resize
our widget->window correctly.
(gtk_menu_key_press): feature the new accelerator groups.
* gtk/gtkmenuitem.c (gtk_menu_item_size_allocate): reposition the
submenu if neccessary.
* gtk/gtkmenuitem.c:
* gtk/gtkcheckmenuitem.c:
* gtk/gtkradiomenuitem.c: use GtkAccelLabel in the *_new_with_label()
function variants.
* gdk/gdk.c:
(gdk_keyval_from_name):
(gdk_keyval_name): new functions for keyval<->key-name associations.
(gdk_keyval_to_upper):
(gdk_keyval_to_lower):
(gdk_keyval_is_upper):
(gdk_keyval_is_lower): new functions to check/translate keyvalues with
regards to their cases.
Wed May 27 00:48:10 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_class_path): new function to calculate a
widget's class path.
(gtk_widget_path): new function to calculate a widget's name path.
* gtk/gtkrc.c: newly introduced GtkPatternSpec structures to speed up
pattern matching, features reversed pattern matches.
1998-06-07 06:48:56 +00:00
|
|
|
|
1998-06-28 05:44:14 +00:00
|
|
|
#ifndef HAVE_XCONVERTCASE
|
1998-06-27 13:51:41 +00:00
|
|
|
/* compatibility function from X11R6.3, since XConvertCase is not
|
|
|
|
* supplied by X11R5.
|
|
|
|
*/
|
|
|
|
static void
|
|
|
|
gdkx_XConvertCase (KeySym symbol,
|
|
|
|
KeySym *lower,
|
|
|
|
KeySym *upper)
|
|
|
|
{
|
|
|
|
register KeySym sym = symbol;
|
1998-08-18 03:59:41 +00:00
|
|
|
|
1998-06-27 13:51:41 +00:00
|
|
|
g_return_if_fail (lower != NULL);
|
|
|
|
g_return_if_fail (upper != NULL);
|
1998-08-18 03:59:41 +00:00
|
|
|
|
1998-06-27 13:51:41 +00:00
|
|
|
*lower = sym;
|
|
|
|
*upper = sym;
|
1998-08-18 03:59:41 +00:00
|
|
|
|
1998-06-27 13:51:41 +00:00
|
|
|
switch (sym >> 8)
|
|
|
|
{
|
|
|
|
#if defined (GDK_A) && defined (GDK_Ooblique)
|
|
|
|
case 0: /* Latin 1 */
|
|
|
|
if ((sym >= GDK_A) && (sym <= GDK_Z))
|
|
|
|
*lower += (GDK_a - GDK_A);
|
|
|
|
else if ((sym >= GDK_a) && (sym <= GDK_z))
|
|
|
|
*upper -= (GDK_a - GDK_A);
|
|
|
|
else if ((sym >= GDK_Agrave) && (sym <= GDK_Odiaeresis))
|
|
|
|
*lower += (GDK_agrave - GDK_Agrave);
|
|
|
|
else if ((sym >= GDK_agrave) && (sym <= GDK_odiaeresis))
|
|
|
|
*upper -= (GDK_agrave - GDK_Agrave);
|
|
|
|
else if ((sym >= GDK_Ooblique) && (sym <= GDK_Thorn))
|
|
|
|
*lower += (GDK_oslash - GDK_Ooblique);
|
|
|
|
else if ((sym >= GDK_oslash) && (sym <= GDK_thorn))
|
|
|
|
*upper -= (GDK_oslash - GDK_Ooblique);
|
|
|
|
break;
|
|
|
|
#endif /* LATIN1 */
|
|
|
|
|
|
|
|
#if defined (GDK_Aogonek) && defined (GDK_tcedilla)
|
|
|
|
case 1: /* Latin 2 */
|
|
|
|
/* Assume the KeySym is a legal value (ignore discontinuities) */
|
|
|
|
if (sym == GDK_Aogonek)
|
|
|
|
*lower = GDK_aogonek;
|
|
|
|
else if (sym >= GDK_Lstroke && sym <= GDK_Sacute)
|
|
|
|
*lower += (GDK_lstroke - GDK_Lstroke);
|
|
|
|
else if (sym >= GDK_Scaron && sym <= GDK_Zacute)
|
|
|
|
*lower += (GDK_scaron - GDK_Scaron);
|
|
|
|
else if (sym >= GDK_Zcaron && sym <= GDK_Zabovedot)
|
|
|
|
*lower += (GDK_zcaron - GDK_Zcaron);
|
|
|
|
else if (sym == GDK_aogonek)
|
|
|
|
*upper = GDK_Aogonek;
|
|
|
|
else if (sym >= GDK_lstroke && sym <= GDK_sacute)
|
|
|
|
*upper -= (GDK_lstroke - GDK_Lstroke);
|
|
|
|
else if (sym >= GDK_scaron && sym <= GDK_zacute)
|
|
|
|
*upper -= (GDK_scaron - GDK_Scaron);
|
|
|
|
else if (sym >= GDK_zcaron && sym <= GDK_zabovedot)
|
|
|
|
*upper -= (GDK_zcaron - GDK_Zcaron);
|
|
|
|
else if (sym >= GDK_Racute && sym <= GDK_Tcedilla)
|
|
|
|
*lower += (GDK_racute - GDK_Racute);
|
|
|
|
else if (sym >= GDK_racute && sym <= GDK_tcedilla)
|
|
|
|
*upper -= (GDK_racute - GDK_Racute);
|
|
|
|
break;
|
|
|
|
#endif /* LATIN2 */
|
|
|
|
|
|
|
|
#if defined (GDK_Hstroke) && defined (GDK_Cabovedot)
|
|
|
|
case 2: /* Latin 3 */
|
|
|
|
/* Assume the KeySym is a legal value (ignore discontinuities) */
|
|
|
|
if (sym >= GDK_Hstroke && sym <= GDK_Hcircumflex)
|
|
|
|
*lower += (GDK_hstroke - GDK_Hstroke);
|
|
|
|
else if (sym >= GDK_Gbreve && sym <= GDK_Jcircumflex)
|
|
|
|
*lower += (GDK_gbreve - GDK_Gbreve);
|
|
|
|
else if (sym >= GDK_hstroke && sym <= GDK_hcircumflex)
|
|
|
|
*upper -= (GDK_hstroke - GDK_Hstroke);
|
|
|
|
else if (sym >= GDK_gbreve && sym <= GDK_jcircumflex)
|
|
|
|
*upper -= (GDK_gbreve - GDK_Gbreve);
|
|
|
|
else if (sym >= GDK_Cabovedot && sym <= GDK_Scircumflex)
|
|
|
|
*lower += (GDK_cabovedot - GDK_Cabovedot);
|
|
|
|
else if (sym >= GDK_cabovedot && sym <= GDK_scircumflex)
|
|
|
|
*upper -= (GDK_cabovedot - GDK_Cabovedot);
|
|
|
|
break;
|
|
|
|
#endif /* LATIN3 */
|
|
|
|
|
|
|
|
#if defined (GDK_Rcedilla) && defined (GDK_Amacron)
|
|
|
|
case 3: /* Latin 4 */
|
|
|
|
/* Assume the KeySym is a legal value (ignore discontinuities) */
|
|
|
|
if (sym >= GDK_Rcedilla && sym <= GDK_Tslash)
|
|
|
|
*lower += (GDK_rcedilla - GDK_Rcedilla);
|
|
|
|
else if (sym >= GDK_rcedilla && sym <= GDK_tslash)
|
|
|
|
*upper -= (GDK_rcedilla - GDK_Rcedilla);
|
|
|
|
else if (sym == GDK_ENG)
|
|
|
|
*lower = GDK_eng;
|
|
|
|
else if (sym == GDK_eng)
|
|
|
|
*upper = GDK_ENG;
|
|
|
|
else if (sym >= GDK_Amacron && sym <= GDK_Umacron)
|
|
|
|
*lower += (GDK_amacron - GDK_Amacron);
|
|
|
|
else if (sym >= GDK_amacron && sym <= GDK_umacron)
|
|
|
|
*upper -= (GDK_amacron - GDK_Amacron);
|
|
|
|
break;
|
|
|
|
#endif /* LATIN4 */
|
|
|
|
|
|
|
|
#if defined (GDK_Serbian_DJE) && defined (GDK_Cyrillic_yu)
|
|
|
|
case 6: /* Cyrillic */
|
|
|
|
/* Assume the KeySym is a legal value (ignore discontinuities) */
|
|
|
|
if (sym >= GDK_Serbian_DJE && sym <= GDK_Serbian_DZE)
|
|
|
|
*lower -= (GDK_Serbian_DJE - GDK_Serbian_dje);
|
|
|
|
else if (sym >= GDK_Serbian_dje && sym <= GDK_Serbian_dze)
|
|
|
|
*upper += (GDK_Serbian_DJE - GDK_Serbian_dje);
|
|
|
|
else if (sym >= GDK_Cyrillic_YU && sym <= GDK_Cyrillic_HARDSIGN)
|
|
|
|
*lower -= (GDK_Cyrillic_YU - GDK_Cyrillic_yu);
|
|
|
|
else if (sym >= GDK_Cyrillic_yu && sym <= GDK_Cyrillic_hardsign)
|
|
|
|
*upper += (GDK_Cyrillic_YU - GDK_Cyrillic_yu);
|
|
|
|
break;
|
|
|
|
#endif /* CYRILLIC */
|
1998-08-18 03:59:41 +00:00
|
|
|
|
1998-06-27 13:51:41 +00:00
|
|
|
#if defined (GDK_Greek_ALPHAaccent) && defined (GDK_Greek_finalsmallsigma)
|
|
|
|
case 7: /* Greek */
|
|
|
|
/* Assume the KeySym is a legal value (ignore discontinuities) */
|
|
|
|
if (sym >= GDK_Greek_ALPHAaccent && sym <= GDK_Greek_OMEGAaccent)
|
|
|
|
*lower += (GDK_Greek_alphaaccent - GDK_Greek_ALPHAaccent);
|
|
|
|
else if (sym >= GDK_Greek_alphaaccent && sym <= GDK_Greek_omegaaccent &&
|
|
|
|
sym != GDK_Greek_iotaaccentdieresis &&
|
|
|
|
sym != GDK_Greek_upsilonaccentdieresis)
|
|
|
|
*upper -= (GDK_Greek_alphaaccent - GDK_Greek_ALPHAaccent);
|
|
|
|
else if (sym >= GDK_Greek_ALPHA && sym <= GDK_Greek_OMEGA)
|
|
|
|
*lower += (GDK_Greek_alpha - GDK_Greek_ALPHA);
|
|
|
|
else if (sym >= GDK_Greek_alpha && sym <= GDK_Greek_omega &&
|
|
|
|
sym != GDK_Greek_finalsmallsigma)
|
|
|
|
*upper -= (GDK_Greek_alpha - GDK_Greek_ALPHA);
|
|
|
|
break;
|
|
|
|
#endif /* GREEK */
|
|
|
|
}
|
|
|
|
}
|
1998-06-28 05:44:14 +00:00
|
|
|
#endif
|
1998-06-27 13:51:41 +00:00
|
|
|
|
fixed an assertment.
Sat Jun 6 06:01:24 1998 Tim Janik <timj@gtk.org>
* gtk/gtksignal.c (gtk_signal_emitv): fixed an assertment.
* gtk/makeenums.awk: a script to generate the GtkEnumValue arrays from,
this should eventually be done by gentypeinfo.el somewhen.
* gtk/gtkenumvalues.c: new generated file to hold GtkEnumValue arrays.
* gtk/gtktypeutils.h: new function gtk_enum_values() to retrive all the
enum values of an enum type.
* gtk/gtk.defs:
* gtk/gtkcurve.h:
* gtk/gtkobject.h:
* gtk/gtkprivate.h:
* gtk/gtkwidget.h:
* gtk/gtkenums.h:
brought enum/flags definitions in sync, added a few more enum
definitions for bindings and pattern matching.
* some more macro and GtkType fixups in various places.
* gdk/gdktypes.h (enum): added a new value GDK_AFTER_MASK, which is used
as a key-release modifier for the binding system.
Fri Jun 5 06:06:06 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmenu.h (struct _GtkMenu): removed GList*children, since it
was a stale list pointer that is already present in GtkMenuShell.
* gtk/gtkmenushell.h (struct _GtkMenuShellClass): added a signal
GtkMenuShell::selection_done which is emitted after the menu shell
poped down again and all possible menu items have been activated.
Thu Jun 4 02:20:42 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmenushell.c (gtk_menu_shell_button_release): flush the x-queue
before activation of the menuitem, so the menu is actually taken off the
screen prior to any menu item activation.
* gtk/gtkctree.c (gtk_ctree_get_row_data): allow function invokation
for NULL nodes.
* gtk/gtkwidget.h:
* gtk/gtkwidget.c: new function gtk_widget_stop_accelerator to stop
the emission of the "add-accelerator" signal on a widget. this is
usefull to prevent accelerator installation on certain widgets.
* gtk/gtknotebook.c (gtk_notebook_menu_item_create): keep the menu
labels left justified, by setting their alignment. stop accelerator
installation for the menu items, since we use dynamic menus.
Wed Jun 3 06:41:22 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmenufactory.c: adaptions to use the new accel groups. people
should *really* use GtkItemFactory. this is only for preserving source
compatibility where possible, use of GtkMenuFactory is deprecated as of
now.
* gtk/gtkobject.h (gtk_object_class_add_user_signal): new function
to create user signals of type GTK_RUN_NO_RECURSE. don't know why i
missed this possibility when i added gtk_object_class_add_user_signal
in late january.
* gtk/gtkmain.c (gtk_init): ignore subsequent function calls.
Sun May 31 07:31:09 1998 Tim Janik <timj@gtk.org>
* gtk/gtkaccelgroup.h:
* gtk/gtkaccelgroup.c: new implementation of the accelerator concept.
* gtk/gtkaccellabel.h:
* gtk/gtkaccellabel.c: new widget derived from GtkLabel whitch features
display of the accelerators associated with a certain widget.
* gtk/gtkitemfactory.h:
* gtk/gtkitemfactory.c: new widget, item factory with automatic rc
parsing and accelerator handling.
* gtk/gtkmenu.c (gtk_menu_reposition): new function to care for
positioning a menu.
(gtk_menu_map): removed the allocation code.
(gtk_menu_size_allocate): care for redrawing of children and resize
our widget->window correctly.
(gtk_menu_key_press): feature the new accelerator groups.
* gtk/gtkmenuitem.c (gtk_menu_item_size_allocate): reposition the
submenu if neccessary.
* gtk/gtkmenuitem.c:
* gtk/gtkcheckmenuitem.c:
* gtk/gtkradiomenuitem.c: use GtkAccelLabel in the *_new_with_label()
function variants.
* gdk/gdk.c:
(gdk_keyval_from_name):
(gdk_keyval_name): new functions for keyval<->key-name associations.
(gdk_keyval_to_upper):
(gdk_keyval_to_lower):
(gdk_keyval_is_upper):
(gdk_keyval_is_lower): new functions to check/translate keyvalues with
regards to their cases.
Wed May 27 00:48:10 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_class_path): new function to calculate a
widget's class path.
(gtk_widget_path): new function to calculate a widget's name path.
* gtk/gtkrc.c: newly introduced GtkPatternSpec structures to speed up
pattern matching, features reversed pattern matches.
1998-06-07 06:48:56 +00:00
|
|
|
gchar*
|
1998-08-18 03:59:41 +00:00
|
|
|
gdk_keyval_name (guint keyval)
|
fixed an assertment.
Sat Jun 6 06:01:24 1998 Tim Janik <timj@gtk.org>
* gtk/gtksignal.c (gtk_signal_emitv): fixed an assertment.
* gtk/makeenums.awk: a script to generate the GtkEnumValue arrays from,
this should eventually be done by gentypeinfo.el somewhen.
* gtk/gtkenumvalues.c: new generated file to hold GtkEnumValue arrays.
* gtk/gtktypeutils.h: new function gtk_enum_values() to retrive all the
enum values of an enum type.
* gtk/gtk.defs:
* gtk/gtkcurve.h:
* gtk/gtkobject.h:
* gtk/gtkprivate.h:
* gtk/gtkwidget.h:
* gtk/gtkenums.h:
brought enum/flags definitions in sync, added a few more enum
definitions for bindings and pattern matching.
* some more macro and GtkType fixups in various places.
* gdk/gdktypes.h (enum): added a new value GDK_AFTER_MASK, which is used
as a key-release modifier for the binding system.
Fri Jun 5 06:06:06 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmenu.h (struct _GtkMenu): removed GList*children, since it
was a stale list pointer that is already present in GtkMenuShell.
* gtk/gtkmenushell.h (struct _GtkMenuShellClass): added a signal
GtkMenuShell::selection_done which is emitted after the menu shell
poped down again and all possible menu items have been activated.
Thu Jun 4 02:20:42 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmenushell.c (gtk_menu_shell_button_release): flush the x-queue
before activation of the menuitem, so the menu is actually taken off the
screen prior to any menu item activation.
* gtk/gtkctree.c (gtk_ctree_get_row_data): allow function invokation
for NULL nodes.
* gtk/gtkwidget.h:
* gtk/gtkwidget.c: new function gtk_widget_stop_accelerator to stop
the emission of the "add-accelerator" signal on a widget. this is
usefull to prevent accelerator installation on certain widgets.
* gtk/gtknotebook.c (gtk_notebook_menu_item_create): keep the menu
labels left justified, by setting their alignment. stop accelerator
installation for the menu items, since we use dynamic menus.
Wed Jun 3 06:41:22 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmenufactory.c: adaptions to use the new accel groups. people
should *really* use GtkItemFactory. this is only for preserving source
compatibility where possible, use of GtkMenuFactory is deprecated as of
now.
* gtk/gtkobject.h (gtk_object_class_add_user_signal): new function
to create user signals of type GTK_RUN_NO_RECURSE. don't know why i
missed this possibility when i added gtk_object_class_add_user_signal
in late january.
* gtk/gtkmain.c (gtk_init): ignore subsequent function calls.
Sun May 31 07:31:09 1998 Tim Janik <timj@gtk.org>
* gtk/gtkaccelgroup.h:
* gtk/gtkaccelgroup.c: new implementation of the accelerator concept.
* gtk/gtkaccellabel.h:
* gtk/gtkaccellabel.c: new widget derived from GtkLabel whitch features
display of the accelerators associated with a certain widget.
* gtk/gtkitemfactory.h:
* gtk/gtkitemfactory.c: new widget, item factory with automatic rc
parsing and accelerator handling.
* gtk/gtkmenu.c (gtk_menu_reposition): new function to care for
positioning a menu.
(gtk_menu_map): removed the allocation code.
(gtk_menu_size_allocate): care for redrawing of children and resize
our widget->window correctly.
(gtk_menu_key_press): feature the new accelerator groups.
* gtk/gtkmenuitem.c (gtk_menu_item_size_allocate): reposition the
submenu if neccessary.
* gtk/gtkmenuitem.c:
* gtk/gtkcheckmenuitem.c:
* gtk/gtkradiomenuitem.c: use GtkAccelLabel in the *_new_with_label()
function variants.
* gdk/gdk.c:
(gdk_keyval_from_name):
(gdk_keyval_name): new functions for keyval<->key-name associations.
(gdk_keyval_to_upper):
(gdk_keyval_to_lower):
(gdk_keyval_is_upper):
(gdk_keyval_is_lower): new functions to check/translate keyvalues with
regards to their cases.
Wed May 27 00:48:10 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_class_path): new function to calculate a
widget's class path.
(gtk_widget_path): new function to calculate a widget's name path.
* gtk/gtkrc.c: newly introduced GtkPatternSpec structures to speed up
pattern matching, features reversed pattern matches.
1998-06-07 06:48:56 +00:00
|
|
|
{
|
|
|
|
return XKeysymToString (keyval);
|
|
|
|
}
|
|
|
|
|
|
|
|
guint
|
|
|
|
gdk_keyval_from_name (const gchar *keyval_name)
|
|
|
|
{
|
|
|
|
g_return_val_if_fail (keyval_name != NULL, 0);
|
1998-08-18 03:59:41 +00:00
|
|
|
|
fixed an assertment.
Sat Jun 6 06:01:24 1998 Tim Janik <timj@gtk.org>
* gtk/gtksignal.c (gtk_signal_emitv): fixed an assertment.
* gtk/makeenums.awk: a script to generate the GtkEnumValue arrays from,
this should eventually be done by gentypeinfo.el somewhen.
* gtk/gtkenumvalues.c: new generated file to hold GtkEnumValue arrays.
* gtk/gtktypeutils.h: new function gtk_enum_values() to retrive all the
enum values of an enum type.
* gtk/gtk.defs:
* gtk/gtkcurve.h:
* gtk/gtkobject.h:
* gtk/gtkprivate.h:
* gtk/gtkwidget.h:
* gtk/gtkenums.h:
brought enum/flags definitions in sync, added a few more enum
definitions for bindings and pattern matching.
* some more macro and GtkType fixups in various places.
* gdk/gdktypes.h (enum): added a new value GDK_AFTER_MASK, which is used
as a key-release modifier for the binding system.
Fri Jun 5 06:06:06 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmenu.h (struct _GtkMenu): removed GList*children, since it
was a stale list pointer that is already present in GtkMenuShell.
* gtk/gtkmenushell.h (struct _GtkMenuShellClass): added a signal
GtkMenuShell::selection_done which is emitted after the menu shell
poped down again and all possible menu items have been activated.
Thu Jun 4 02:20:42 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmenushell.c (gtk_menu_shell_button_release): flush the x-queue
before activation of the menuitem, so the menu is actually taken off the
screen prior to any menu item activation.
* gtk/gtkctree.c (gtk_ctree_get_row_data): allow function invokation
for NULL nodes.
* gtk/gtkwidget.h:
* gtk/gtkwidget.c: new function gtk_widget_stop_accelerator to stop
the emission of the "add-accelerator" signal on a widget. this is
usefull to prevent accelerator installation on certain widgets.
* gtk/gtknotebook.c (gtk_notebook_menu_item_create): keep the menu
labels left justified, by setting their alignment. stop accelerator
installation for the menu items, since we use dynamic menus.
Wed Jun 3 06:41:22 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmenufactory.c: adaptions to use the new accel groups. people
should *really* use GtkItemFactory. this is only for preserving source
compatibility where possible, use of GtkMenuFactory is deprecated as of
now.
* gtk/gtkobject.h (gtk_object_class_add_user_signal): new function
to create user signals of type GTK_RUN_NO_RECURSE. don't know why i
missed this possibility when i added gtk_object_class_add_user_signal
in late january.
* gtk/gtkmain.c (gtk_init): ignore subsequent function calls.
Sun May 31 07:31:09 1998 Tim Janik <timj@gtk.org>
* gtk/gtkaccelgroup.h:
* gtk/gtkaccelgroup.c: new implementation of the accelerator concept.
* gtk/gtkaccellabel.h:
* gtk/gtkaccellabel.c: new widget derived from GtkLabel whitch features
display of the accelerators associated with a certain widget.
* gtk/gtkitemfactory.h:
* gtk/gtkitemfactory.c: new widget, item factory with automatic rc
parsing and accelerator handling.
* gtk/gtkmenu.c (gtk_menu_reposition): new function to care for
positioning a menu.
(gtk_menu_map): removed the allocation code.
(gtk_menu_size_allocate): care for redrawing of children and resize
our widget->window correctly.
(gtk_menu_key_press): feature the new accelerator groups.
* gtk/gtkmenuitem.c (gtk_menu_item_size_allocate): reposition the
submenu if neccessary.
* gtk/gtkmenuitem.c:
* gtk/gtkcheckmenuitem.c:
* gtk/gtkradiomenuitem.c: use GtkAccelLabel in the *_new_with_label()
function variants.
* gdk/gdk.c:
(gdk_keyval_from_name):
(gdk_keyval_name): new functions for keyval<->key-name associations.
(gdk_keyval_to_upper):
(gdk_keyval_to_lower):
(gdk_keyval_is_upper):
(gdk_keyval_is_lower): new functions to check/translate keyvalues with
regards to their cases.
Wed May 27 00:48:10 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_class_path): new function to calculate a
widget's class path.
(gtk_widget_path): new function to calculate a widget's name path.
* gtk/gtkrc.c: newly introduced GtkPatternSpec structures to speed up
pattern matching, features reversed pattern matches.
1998-06-07 06:48:56 +00:00
|
|
|
return XStringToKeysym (keyval_name);
|
|
|
|
}
|
|
|
|
|
|
|
|
guint
|
1998-08-18 03:59:41 +00:00
|
|
|
gdk_keyval_to_upper (guint keyval)
|
fixed an assertment.
Sat Jun 6 06:01:24 1998 Tim Janik <timj@gtk.org>
* gtk/gtksignal.c (gtk_signal_emitv): fixed an assertment.
* gtk/makeenums.awk: a script to generate the GtkEnumValue arrays from,
this should eventually be done by gentypeinfo.el somewhen.
* gtk/gtkenumvalues.c: new generated file to hold GtkEnumValue arrays.
* gtk/gtktypeutils.h: new function gtk_enum_values() to retrive all the
enum values of an enum type.
* gtk/gtk.defs:
* gtk/gtkcurve.h:
* gtk/gtkobject.h:
* gtk/gtkprivate.h:
* gtk/gtkwidget.h:
* gtk/gtkenums.h:
brought enum/flags definitions in sync, added a few more enum
definitions for bindings and pattern matching.
* some more macro and GtkType fixups in various places.
* gdk/gdktypes.h (enum): added a new value GDK_AFTER_MASK, which is used
as a key-release modifier for the binding system.
Fri Jun 5 06:06:06 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmenu.h (struct _GtkMenu): removed GList*children, since it
was a stale list pointer that is already present in GtkMenuShell.
* gtk/gtkmenushell.h (struct _GtkMenuShellClass): added a signal
GtkMenuShell::selection_done which is emitted after the menu shell
poped down again and all possible menu items have been activated.
Thu Jun 4 02:20:42 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmenushell.c (gtk_menu_shell_button_release): flush the x-queue
before activation of the menuitem, so the menu is actually taken off the
screen prior to any menu item activation.
* gtk/gtkctree.c (gtk_ctree_get_row_data): allow function invokation
for NULL nodes.
* gtk/gtkwidget.h:
* gtk/gtkwidget.c: new function gtk_widget_stop_accelerator to stop
the emission of the "add-accelerator" signal on a widget. this is
usefull to prevent accelerator installation on certain widgets.
* gtk/gtknotebook.c (gtk_notebook_menu_item_create): keep the menu
labels left justified, by setting their alignment. stop accelerator
installation for the menu items, since we use dynamic menus.
Wed Jun 3 06:41:22 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmenufactory.c: adaptions to use the new accel groups. people
should *really* use GtkItemFactory. this is only for preserving source
compatibility where possible, use of GtkMenuFactory is deprecated as of
now.
* gtk/gtkobject.h (gtk_object_class_add_user_signal): new function
to create user signals of type GTK_RUN_NO_RECURSE. don't know why i
missed this possibility when i added gtk_object_class_add_user_signal
in late january.
* gtk/gtkmain.c (gtk_init): ignore subsequent function calls.
Sun May 31 07:31:09 1998 Tim Janik <timj@gtk.org>
* gtk/gtkaccelgroup.h:
* gtk/gtkaccelgroup.c: new implementation of the accelerator concept.
* gtk/gtkaccellabel.h:
* gtk/gtkaccellabel.c: new widget derived from GtkLabel whitch features
display of the accelerators associated with a certain widget.
* gtk/gtkitemfactory.h:
* gtk/gtkitemfactory.c: new widget, item factory with automatic rc
parsing and accelerator handling.
* gtk/gtkmenu.c (gtk_menu_reposition): new function to care for
positioning a menu.
(gtk_menu_map): removed the allocation code.
(gtk_menu_size_allocate): care for redrawing of children and resize
our widget->window correctly.
(gtk_menu_key_press): feature the new accelerator groups.
* gtk/gtkmenuitem.c (gtk_menu_item_size_allocate): reposition the
submenu if neccessary.
* gtk/gtkmenuitem.c:
* gtk/gtkcheckmenuitem.c:
* gtk/gtkradiomenuitem.c: use GtkAccelLabel in the *_new_with_label()
function variants.
* gdk/gdk.c:
(gdk_keyval_from_name):
(gdk_keyval_name): new functions for keyval<->key-name associations.
(gdk_keyval_to_upper):
(gdk_keyval_to_lower):
(gdk_keyval_is_upper):
(gdk_keyval_is_lower): new functions to check/translate keyvalues with
regards to their cases.
Wed May 27 00:48:10 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_class_path): new function to calculate a
widget's class path.
(gtk_widget_path): new function to calculate a widget's name path.
* gtk/gtkrc.c: newly introduced GtkPatternSpec structures to speed up
pattern matching, features reversed pattern matches.
1998-06-07 06:48:56 +00:00
|
|
|
{
|
|
|
|
if (keyval)
|
|
|
|
{
|
|
|
|
KeySym lower_val = 0;
|
|
|
|
KeySym upper_val = 0;
|
1998-08-18 03:59:41 +00:00
|
|
|
|
1998-06-28 05:44:14 +00:00
|
|
|
XConvertCase (keyval, &lower_val, &upper_val);
|
fixed an assertment.
Sat Jun 6 06:01:24 1998 Tim Janik <timj@gtk.org>
* gtk/gtksignal.c (gtk_signal_emitv): fixed an assertment.
* gtk/makeenums.awk: a script to generate the GtkEnumValue arrays from,
this should eventually be done by gentypeinfo.el somewhen.
* gtk/gtkenumvalues.c: new generated file to hold GtkEnumValue arrays.
* gtk/gtktypeutils.h: new function gtk_enum_values() to retrive all the
enum values of an enum type.
* gtk/gtk.defs:
* gtk/gtkcurve.h:
* gtk/gtkobject.h:
* gtk/gtkprivate.h:
* gtk/gtkwidget.h:
* gtk/gtkenums.h:
brought enum/flags definitions in sync, added a few more enum
definitions for bindings and pattern matching.
* some more macro and GtkType fixups in various places.
* gdk/gdktypes.h (enum): added a new value GDK_AFTER_MASK, which is used
as a key-release modifier for the binding system.
Fri Jun 5 06:06:06 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmenu.h (struct _GtkMenu): removed GList*children, since it
was a stale list pointer that is already present in GtkMenuShell.
* gtk/gtkmenushell.h (struct _GtkMenuShellClass): added a signal
GtkMenuShell::selection_done which is emitted after the menu shell
poped down again and all possible menu items have been activated.
Thu Jun 4 02:20:42 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmenushell.c (gtk_menu_shell_button_release): flush the x-queue
before activation of the menuitem, so the menu is actually taken off the
screen prior to any menu item activation.
* gtk/gtkctree.c (gtk_ctree_get_row_data): allow function invokation
for NULL nodes.
* gtk/gtkwidget.h:
* gtk/gtkwidget.c: new function gtk_widget_stop_accelerator to stop
the emission of the "add-accelerator" signal on a widget. this is
usefull to prevent accelerator installation on certain widgets.
* gtk/gtknotebook.c (gtk_notebook_menu_item_create): keep the menu
labels left justified, by setting their alignment. stop accelerator
installation for the menu items, since we use dynamic menus.
Wed Jun 3 06:41:22 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmenufactory.c: adaptions to use the new accel groups. people
should *really* use GtkItemFactory. this is only for preserving source
compatibility where possible, use of GtkMenuFactory is deprecated as of
now.
* gtk/gtkobject.h (gtk_object_class_add_user_signal): new function
to create user signals of type GTK_RUN_NO_RECURSE. don't know why i
missed this possibility when i added gtk_object_class_add_user_signal
in late january.
* gtk/gtkmain.c (gtk_init): ignore subsequent function calls.
Sun May 31 07:31:09 1998 Tim Janik <timj@gtk.org>
* gtk/gtkaccelgroup.h:
* gtk/gtkaccelgroup.c: new implementation of the accelerator concept.
* gtk/gtkaccellabel.h:
* gtk/gtkaccellabel.c: new widget derived from GtkLabel whitch features
display of the accelerators associated with a certain widget.
* gtk/gtkitemfactory.h:
* gtk/gtkitemfactory.c: new widget, item factory with automatic rc
parsing and accelerator handling.
* gtk/gtkmenu.c (gtk_menu_reposition): new function to care for
positioning a menu.
(gtk_menu_map): removed the allocation code.
(gtk_menu_size_allocate): care for redrawing of children and resize
our widget->window correctly.
(gtk_menu_key_press): feature the new accelerator groups.
* gtk/gtkmenuitem.c (gtk_menu_item_size_allocate): reposition the
submenu if neccessary.
* gtk/gtkmenuitem.c:
* gtk/gtkcheckmenuitem.c:
* gtk/gtkradiomenuitem.c: use GtkAccelLabel in the *_new_with_label()
function variants.
* gdk/gdk.c:
(gdk_keyval_from_name):
(gdk_keyval_name): new functions for keyval<->key-name associations.
(gdk_keyval_to_upper):
(gdk_keyval_to_lower):
(gdk_keyval_is_upper):
(gdk_keyval_is_lower): new functions to check/translate keyvalues with
regards to their cases.
Wed May 27 00:48:10 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_class_path): new function to calculate a
widget's class path.
(gtk_widget_path): new function to calculate a widget's name path.
* gtk/gtkrc.c: newly introduced GtkPatternSpec structures to speed up
pattern matching, features reversed pattern matches.
1998-06-07 06:48:56 +00:00
|
|
|
return upper_val;
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
guint
|
1998-08-18 03:59:41 +00:00
|
|
|
gdk_keyval_to_lower (guint keyval)
|
fixed an assertment.
Sat Jun 6 06:01:24 1998 Tim Janik <timj@gtk.org>
* gtk/gtksignal.c (gtk_signal_emitv): fixed an assertment.
* gtk/makeenums.awk: a script to generate the GtkEnumValue arrays from,
this should eventually be done by gentypeinfo.el somewhen.
* gtk/gtkenumvalues.c: new generated file to hold GtkEnumValue arrays.
* gtk/gtktypeutils.h: new function gtk_enum_values() to retrive all the
enum values of an enum type.
* gtk/gtk.defs:
* gtk/gtkcurve.h:
* gtk/gtkobject.h:
* gtk/gtkprivate.h:
* gtk/gtkwidget.h:
* gtk/gtkenums.h:
brought enum/flags definitions in sync, added a few more enum
definitions for bindings and pattern matching.
* some more macro and GtkType fixups in various places.
* gdk/gdktypes.h (enum): added a new value GDK_AFTER_MASK, which is used
as a key-release modifier for the binding system.
Fri Jun 5 06:06:06 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmenu.h (struct _GtkMenu): removed GList*children, since it
was a stale list pointer that is already present in GtkMenuShell.
* gtk/gtkmenushell.h (struct _GtkMenuShellClass): added a signal
GtkMenuShell::selection_done which is emitted after the menu shell
poped down again and all possible menu items have been activated.
Thu Jun 4 02:20:42 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmenushell.c (gtk_menu_shell_button_release): flush the x-queue
before activation of the menuitem, so the menu is actually taken off the
screen prior to any menu item activation.
* gtk/gtkctree.c (gtk_ctree_get_row_data): allow function invokation
for NULL nodes.
* gtk/gtkwidget.h:
* gtk/gtkwidget.c: new function gtk_widget_stop_accelerator to stop
the emission of the "add-accelerator" signal on a widget. this is
usefull to prevent accelerator installation on certain widgets.
* gtk/gtknotebook.c (gtk_notebook_menu_item_create): keep the menu
labels left justified, by setting their alignment. stop accelerator
installation for the menu items, since we use dynamic menus.
Wed Jun 3 06:41:22 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmenufactory.c: adaptions to use the new accel groups. people
should *really* use GtkItemFactory. this is only for preserving source
compatibility where possible, use of GtkMenuFactory is deprecated as of
now.
* gtk/gtkobject.h (gtk_object_class_add_user_signal): new function
to create user signals of type GTK_RUN_NO_RECURSE. don't know why i
missed this possibility when i added gtk_object_class_add_user_signal
in late january.
* gtk/gtkmain.c (gtk_init): ignore subsequent function calls.
Sun May 31 07:31:09 1998 Tim Janik <timj@gtk.org>
* gtk/gtkaccelgroup.h:
* gtk/gtkaccelgroup.c: new implementation of the accelerator concept.
* gtk/gtkaccellabel.h:
* gtk/gtkaccellabel.c: new widget derived from GtkLabel whitch features
display of the accelerators associated with a certain widget.
* gtk/gtkitemfactory.h:
* gtk/gtkitemfactory.c: new widget, item factory with automatic rc
parsing and accelerator handling.
* gtk/gtkmenu.c (gtk_menu_reposition): new function to care for
positioning a menu.
(gtk_menu_map): removed the allocation code.
(gtk_menu_size_allocate): care for redrawing of children and resize
our widget->window correctly.
(gtk_menu_key_press): feature the new accelerator groups.
* gtk/gtkmenuitem.c (gtk_menu_item_size_allocate): reposition the
submenu if neccessary.
* gtk/gtkmenuitem.c:
* gtk/gtkcheckmenuitem.c:
* gtk/gtkradiomenuitem.c: use GtkAccelLabel in the *_new_with_label()
function variants.
* gdk/gdk.c:
(gdk_keyval_from_name):
(gdk_keyval_name): new functions for keyval<->key-name associations.
(gdk_keyval_to_upper):
(gdk_keyval_to_lower):
(gdk_keyval_is_upper):
(gdk_keyval_is_lower): new functions to check/translate keyvalues with
regards to their cases.
Wed May 27 00:48:10 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_class_path): new function to calculate a
widget's class path.
(gtk_widget_path): new function to calculate a widget's name path.
* gtk/gtkrc.c: newly introduced GtkPatternSpec structures to speed up
pattern matching, features reversed pattern matches.
1998-06-07 06:48:56 +00:00
|
|
|
{
|
|
|
|
if (keyval)
|
|
|
|
{
|
|
|
|
KeySym lower_val = 0;
|
|
|
|
KeySym upper_val = 0;
|
1998-08-18 03:59:41 +00:00
|
|
|
|
1998-06-28 05:44:14 +00:00
|
|
|
XConvertCase (keyval, &lower_val, &upper_val);
|
fixed an assertment.
Sat Jun 6 06:01:24 1998 Tim Janik <timj@gtk.org>
* gtk/gtksignal.c (gtk_signal_emitv): fixed an assertment.
* gtk/makeenums.awk: a script to generate the GtkEnumValue arrays from,
this should eventually be done by gentypeinfo.el somewhen.
* gtk/gtkenumvalues.c: new generated file to hold GtkEnumValue arrays.
* gtk/gtktypeutils.h: new function gtk_enum_values() to retrive all the
enum values of an enum type.
* gtk/gtk.defs:
* gtk/gtkcurve.h:
* gtk/gtkobject.h:
* gtk/gtkprivate.h:
* gtk/gtkwidget.h:
* gtk/gtkenums.h:
brought enum/flags definitions in sync, added a few more enum
definitions for bindings and pattern matching.
* some more macro and GtkType fixups in various places.
* gdk/gdktypes.h (enum): added a new value GDK_AFTER_MASK, which is used
as a key-release modifier for the binding system.
Fri Jun 5 06:06:06 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmenu.h (struct _GtkMenu): removed GList*children, since it
was a stale list pointer that is already present in GtkMenuShell.
* gtk/gtkmenushell.h (struct _GtkMenuShellClass): added a signal
GtkMenuShell::selection_done which is emitted after the menu shell
poped down again and all possible menu items have been activated.
Thu Jun 4 02:20:42 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmenushell.c (gtk_menu_shell_button_release): flush the x-queue
before activation of the menuitem, so the menu is actually taken off the
screen prior to any menu item activation.
* gtk/gtkctree.c (gtk_ctree_get_row_data): allow function invokation
for NULL nodes.
* gtk/gtkwidget.h:
* gtk/gtkwidget.c: new function gtk_widget_stop_accelerator to stop
the emission of the "add-accelerator" signal on a widget. this is
usefull to prevent accelerator installation on certain widgets.
* gtk/gtknotebook.c (gtk_notebook_menu_item_create): keep the menu
labels left justified, by setting their alignment. stop accelerator
installation for the menu items, since we use dynamic menus.
Wed Jun 3 06:41:22 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmenufactory.c: adaptions to use the new accel groups. people
should *really* use GtkItemFactory. this is only for preserving source
compatibility where possible, use of GtkMenuFactory is deprecated as of
now.
* gtk/gtkobject.h (gtk_object_class_add_user_signal): new function
to create user signals of type GTK_RUN_NO_RECURSE. don't know why i
missed this possibility when i added gtk_object_class_add_user_signal
in late january.
* gtk/gtkmain.c (gtk_init): ignore subsequent function calls.
Sun May 31 07:31:09 1998 Tim Janik <timj@gtk.org>
* gtk/gtkaccelgroup.h:
* gtk/gtkaccelgroup.c: new implementation of the accelerator concept.
* gtk/gtkaccellabel.h:
* gtk/gtkaccellabel.c: new widget derived from GtkLabel whitch features
display of the accelerators associated with a certain widget.
* gtk/gtkitemfactory.h:
* gtk/gtkitemfactory.c: new widget, item factory with automatic rc
parsing and accelerator handling.
* gtk/gtkmenu.c (gtk_menu_reposition): new function to care for
positioning a menu.
(gtk_menu_map): removed the allocation code.
(gtk_menu_size_allocate): care for redrawing of children and resize
our widget->window correctly.
(gtk_menu_key_press): feature the new accelerator groups.
* gtk/gtkmenuitem.c (gtk_menu_item_size_allocate): reposition the
submenu if neccessary.
* gtk/gtkmenuitem.c:
* gtk/gtkcheckmenuitem.c:
* gtk/gtkradiomenuitem.c: use GtkAccelLabel in the *_new_with_label()
function variants.
* gdk/gdk.c:
(gdk_keyval_from_name):
(gdk_keyval_name): new functions for keyval<->key-name associations.
(gdk_keyval_to_upper):
(gdk_keyval_to_lower):
(gdk_keyval_is_upper):
(gdk_keyval_is_lower): new functions to check/translate keyvalues with
regards to their cases.
Wed May 27 00:48:10 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_class_path): new function to calculate a
widget's class path.
(gtk_widget_path): new function to calculate a widget's name path.
* gtk/gtkrc.c: newly introduced GtkPatternSpec structures to speed up
pattern matching, features reversed pattern matches.
1998-06-07 06:48:56 +00:00
|
|
|
return lower_val;
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
gboolean
|
1998-08-18 03:59:41 +00:00
|
|
|
gdk_keyval_is_upper (guint keyval)
|
fixed an assertment.
Sat Jun 6 06:01:24 1998 Tim Janik <timj@gtk.org>
* gtk/gtksignal.c (gtk_signal_emitv): fixed an assertment.
* gtk/makeenums.awk: a script to generate the GtkEnumValue arrays from,
this should eventually be done by gentypeinfo.el somewhen.
* gtk/gtkenumvalues.c: new generated file to hold GtkEnumValue arrays.
* gtk/gtktypeutils.h: new function gtk_enum_values() to retrive all the
enum values of an enum type.
* gtk/gtk.defs:
* gtk/gtkcurve.h:
* gtk/gtkobject.h:
* gtk/gtkprivate.h:
* gtk/gtkwidget.h:
* gtk/gtkenums.h:
brought enum/flags definitions in sync, added a few more enum
definitions for bindings and pattern matching.
* some more macro and GtkType fixups in various places.
* gdk/gdktypes.h (enum): added a new value GDK_AFTER_MASK, which is used
as a key-release modifier for the binding system.
Fri Jun 5 06:06:06 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmenu.h (struct _GtkMenu): removed GList*children, since it
was a stale list pointer that is already present in GtkMenuShell.
* gtk/gtkmenushell.h (struct _GtkMenuShellClass): added a signal
GtkMenuShell::selection_done which is emitted after the menu shell
poped down again and all possible menu items have been activated.
Thu Jun 4 02:20:42 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmenushell.c (gtk_menu_shell_button_release): flush the x-queue
before activation of the menuitem, so the menu is actually taken off the
screen prior to any menu item activation.
* gtk/gtkctree.c (gtk_ctree_get_row_data): allow function invokation
for NULL nodes.
* gtk/gtkwidget.h:
* gtk/gtkwidget.c: new function gtk_widget_stop_accelerator to stop
the emission of the "add-accelerator" signal on a widget. this is
usefull to prevent accelerator installation on certain widgets.
* gtk/gtknotebook.c (gtk_notebook_menu_item_create): keep the menu
labels left justified, by setting their alignment. stop accelerator
installation for the menu items, since we use dynamic menus.
Wed Jun 3 06:41:22 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmenufactory.c: adaptions to use the new accel groups. people
should *really* use GtkItemFactory. this is only for preserving source
compatibility where possible, use of GtkMenuFactory is deprecated as of
now.
* gtk/gtkobject.h (gtk_object_class_add_user_signal): new function
to create user signals of type GTK_RUN_NO_RECURSE. don't know why i
missed this possibility when i added gtk_object_class_add_user_signal
in late january.
* gtk/gtkmain.c (gtk_init): ignore subsequent function calls.
Sun May 31 07:31:09 1998 Tim Janik <timj@gtk.org>
* gtk/gtkaccelgroup.h:
* gtk/gtkaccelgroup.c: new implementation of the accelerator concept.
* gtk/gtkaccellabel.h:
* gtk/gtkaccellabel.c: new widget derived from GtkLabel whitch features
display of the accelerators associated with a certain widget.
* gtk/gtkitemfactory.h:
* gtk/gtkitemfactory.c: new widget, item factory with automatic rc
parsing and accelerator handling.
* gtk/gtkmenu.c (gtk_menu_reposition): new function to care for
positioning a menu.
(gtk_menu_map): removed the allocation code.
(gtk_menu_size_allocate): care for redrawing of children and resize
our widget->window correctly.
(gtk_menu_key_press): feature the new accelerator groups.
* gtk/gtkmenuitem.c (gtk_menu_item_size_allocate): reposition the
submenu if neccessary.
* gtk/gtkmenuitem.c:
* gtk/gtkcheckmenuitem.c:
* gtk/gtkradiomenuitem.c: use GtkAccelLabel in the *_new_with_label()
function variants.
* gdk/gdk.c:
(gdk_keyval_from_name):
(gdk_keyval_name): new functions for keyval<->key-name associations.
(gdk_keyval_to_upper):
(gdk_keyval_to_lower):
(gdk_keyval_is_upper):
(gdk_keyval_is_lower): new functions to check/translate keyvalues with
regards to their cases.
Wed May 27 00:48:10 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_class_path): new function to calculate a
widget's class path.
(gtk_widget_path): new function to calculate a widget's name path.
* gtk/gtkrc.c: newly introduced GtkPatternSpec structures to speed up
pattern matching, features reversed pattern matches.
1998-06-07 06:48:56 +00:00
|
|
|
{
|
|
|
|
if (keyval)
|
|
|
|
{
|
|
|
|
KeySym lower_val = 0;
|
|
|
|
KeySym upper_val = 0;
|
1998-08-18 03:59:41 +00:00
|
|
|
|
1998-06-28 05:44:14 +00:00
|
|
|
XConvertCase (keyval, &lower_val, &upper_val);
|
fixed an assertment.
Sat Jun 6 06:01:24 1998 Tim Janik <timj@gtk.org>
* gtk/gtksignal.c (gtk_signal_emitv): fixed an assertment.
* gtk/makeenums.awk: a script to generate the GtkEnumValue arrays from,
this should eventually be done by gentypeinfo.el somewhen.
* gtk/gtkenumvalues.c: new generated file to hold GtkEnumValue arrays.
* gtk/gtktypeutils.h: new function gtk_enum_values() to retrive all the
enum values of an enum type.
* gtk/gtk.defs:
* gtk/gtkcurve.h:
* gtk/gtkobject.h:
* gtk/gtkprivate.h:
* gtk/gtkwidget.h:
* gtk/gtkenums.h:
brought enum/flags definitions in sync, added a few more enum
definitions for bindings and pattern matching.
* some more macro and GtkType fixups in various places.
* gdk/gdktypes.h (enum): added a new value GDK_AFTER_MASK, which is used
as a key-release modifier for the binding system.
Fri Jun 5 06:06:06 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmenu.h (struct _GtkMenu): removed GList*children, since it
was a stale list pointer that is already present in GtkMenuShell.
* gtk/gtkmenushell.h (struct _GtkMenuShellClass): added a signal
GtkMenuShell::selection_done which is emitted after the menu shell
poped down again and all possible menu items have been activated.
Thu Jun 4 02:20:42 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmenushell.c (gtk_menu_shell_button_release): flush the x-queue
before activation of the menuitem, so the menu is actually taken off the
screen prior to any menu item activation.
* gtk/gtkctree.c (gtk_ctree_get_row_data): allow function invokation
for NULL nodes.
* gtk/gtkwidget.h:
* gtk/gtkwidget.c: new function gtk_widget_stop_accelerator to stop
the emission of the "add-accelerator" signal on a widget. this is
usefull to prevent accelerator installation on certain widgets.
* gtk/gtknotebook.c (gtk_notebook_menu_item_create): keep the menu
labels left justified, by setting their alignment. stop accelerator
installation for the menu items, since we use dynamic menus.
Wed Jun 3 06:41:22 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmenufactory.c: adaptions to use the new accel groups. people
should *really* use GtkItemFactory. this is only for preserving source
compatibility where possible, use of GtkMenuFactory is deprecated as of
now.
* gtk/gtkobject.h (gtk_object_class_add_user_signal): new function
to create user signals of type GTK_RUN_NO_RECURSE. don't know why i
missed this possibility when i added gtk_object_class_add_user_signal
in late january.
* gtk/gtkmain.c (gtk_init): ignore subsequent function calls.
Sun May 31 07:31:09 1998 Tim Janik <timj@gtk.org>
* gtk/gtkaccelgroup.h:
* gtk/gtkaccelgroup.c: new implementation of the accelerator concept.
* gtk/gtkaccellabel.h:
* gtk/gtkaccellabel.c: new widget derived from GtkLabel whitch features
display of the accelerators associated with a certain widget.
* gtk/gtkitemfactory.h:
* gtk/gtkitemfactory.c: new widget, item factory with automatic rc
parsing and accelerator handling.
* gtk/gtkmenu.c (gtk_menu_reposition): new function to care for
positioning a menu.
(gtk_menu_map): removed the allocation code.
(gtk_menu_size_allocate): care for redrawing of children and resize
our widget->window correctly.
(gtk_menu_key_press): feature the new accelerator groups.
* gtk/gtkmenuitem.c (gtk_menu_item_size_allocate): reposition the
submenu if neccessary.
* gtk/gtkmenuitem.c:
* gtk/gtkcheckmenuitem.c:
* gtk/gtkradiomenuitem.c: use GtkAccelLabel in the *_new_with_label()
function variants.
* gdk/gdk.c:
(gdk_keyval_from_name):
(gdk_keyval_name): new functions for keyval<->key-name associations.
(gdk_keyval_to_upper):
(gdk_keyval_to_lower):
(gdk_keyval_is_upper):
(gdk_keyval_is_lower): new functions to check/translate keyvalues with
regards to their cases.
Wed May 27 00:48:10 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_class_path): new function to calculate a
widget's class path.
(gtk_widget_path): new function to calculate a widget's name path.
* gtk/gtkrc.c: newly introduced GtkPatternSpec structures to speed up
pattern matching, features reversed pattern matches.
1998-06-07 06:48:56 +00:00
|
|
|
return upper_val == keyval;
|
|
|
|
}
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
gboolean
|
1998-08-18 03:59:41 +00:00
|
|
|
gdk_keyval_is_lower (guint keyval)
|
fixed an assertment.
Sat Jun 6 06:01:24 1998 Tim Janik <timj@gtk.org>
* gtk/gtksignal.c (gtk_signal_emitv): fixed an assertment.
* gtk/makeenums.awk: a script to generate the GtkEnumValue arrays from,
this should eventually be done by gentypeinfo.el somewhen.
* gtk/gtkenumvalues.c: new generated file to hold GtkEnumValue arrays.
* gtk/gtktypeutils.h: new function gtk_enum_values() to retrive all the
enum values of an enum type.
* gtk/gtk.defs:
* gtk/gtkcurve.h:
* gtk/gtkobject.h:
* gtk/gtkprivate.h:
* gtk/gtkwidget.h:
* gtk/gtkenums.h:
brought enum/flags definitions in sync, added a few more enum
definitions for bindings and pattern matching.
* some more macro and GtkType fixups in various places.
* gdk/gdktypes.h (enum): added a new value GDK_AFTER_MASK, which is used
as a key-release modifier for the binding system.
Fri Jun 5 06:06:06 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmenu.h (struct _GtkMenu): removed GList*children, since it
was a stale list pointer that is already present in GtkMenuShell.
* gtk/gtkmenushell.h (struct _GtkMenuShellClass): added a signal
GtkMenuShell::selection_done which is emitted after the menu shell
poped down again and all possible menu items have been activated.
Thu Jun 4 02:20:42 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmenushell.c (gtk_menu_shell_button_release): flush the x-queue
before activation of the menuitem, so the menu is actually taken off the
screen prior to any menu item activation.
* gtk/gtkctree.c (gtk_ctree_get_row_data): allow function invokation
for NULL nodes.
* gtk/gtkwidget.h:
* gtk/gtkwidget.c: new function gtk_widget_stop_accelerator to stop
the emission of the "add-accelerator" signal on a widget. this is
usefull to prevent accelerator installation on certain widgets.
* gtk/gtknotebook.c (gtk_notebook_menu_item_create): keep the menu
labels left justified, by setting their alignment. stop accelerator
installation for the menu items, since we use dynamic menus.
Wed Jun 3 06:41:22 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmenufactory.c: adaptions to use the new accel groups. people
should *really* use GtkItemFactory. this is only for preserving source
compatibility where possible, use of GtkMenuFactory is deprecated as of
now.
* gtk/gtkobject.h (gtk_object_class_add_user_signal): new function
to create user signals of type GTK_RUN_NO_RECURSE. don't know why i
missed this possibility when i added gtk_object_class_add_user_signal
in late january.
* gtk/gtkmain.c (gtk_init): ignore subsequent function calls.
Sun May 31 07:31:09 1998 Tim Janik <timj@gtk.org>
* gtk/gtkaccelgroup.h:
* gtk/gtkaccelgroup.c: new implementation of the accelerator concept.
* gtk/gtkaccellabel.h:
* gtk/gtkaccellabel.c: new widget derived from GtkLabel whitch features
display of the accelerators associated with a certain widget.
* gtk/gtkitemfactory.h:
* gtk/gtkitemfactory.c: new widget, item factory with automatic rc
parsing and accelerator handling.
* gtk/gtkmenu.c (gtk_menu_reposition): new function to care for
positioning a menu.
(gtk_menu_map): removed the allocation code.
(gtk_menu_size_allocate): care for redrawing of children and resize
our widget->window correctly.
(gtk_menu_key_press): feature the new accelerator groups.
* gtk/gtkmenuitem.c (gtk_menu_item_size_allocate): reposition the
submenu if neccessary.
* gtk/gtkmenuitem.c:
* gtk/gtkcheckmenuitem.c:
* gtk/gtkradiomenuitem.c: use GtkAccelLabel in the *_new_with_label()
function variants.
* gdk/gdk.c:
(gdk_keyval_from_name):
(gdk_keyval_name): new functions for keyval<->key-name associations.
(gdk_keyval_to_upper):
(gdk_keyval_to_lower):
(gdk_keyval_is_upper):
(gdk_keyval_is_lower): new functions to check/translate keyvalues with
regards to their cases.
Wed May 27 00:48:10 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_class_path): new function to calculate a
widget's class path.
(gtk_widget_path): new function to calculate a widget's name path.
* gtk/gtkrc.c: newly introduced GtkPatternSpec structures to speed up
pattern matching, features reversed pattern matches.
1998-06-07 06:48:56 +00:00
|
|
|
{
|
|
|
|
if (keyval)
|
|
|
|
{
|
|
|
|
KeySym lower_val = 0;
|
|
|
|
KeySym upper_val = 0;
|
1998-08-18 03:59:41 +00:00
|
|
|
|
1998-06-28 05:44:14 +00:00
|
|
|
XConvertCase (keyval, &lower_val, &upper_val);
|
fixed an assertment.
Sat Jun 6 06:01:24 1998 Tim Janik <timj@gtk.org>
* gtk/gtksignal.c (gtk_signal_emitv): fixed an assertment.
* gtk/makeenums.awk: a script to generate the GtkEnumValue arrays from,
this should eventually be done by gentypeinfo.el somewhen.
* gtk/gtkenumvalues.c: new generated file to hold GtkEnumValue arrays.
* gtk/gtktypeutils.h: new function gtk_enum_values() to retrive all the
enum values of an enum type.
* gtk/gtk.defs:
* gtk/gtkcurve.h:
* gtk/gtkobject.h:
* gtk/gtkprivate.h:
* gtk/gtkwidget.h:
* gtk/gtkenums.h:
brought enum/flags definitions in sync, added a few more enum
definitions for bindings and pattern matching.
* some more macro and GtkType fixups in various places.
* gdk/gdktypes.h (enum): added a new value GDK_AFTER_MASK, which is used
as a key-release modifier for the binding system.
Fri Jun 5 06:06:06 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmenu.h (struct _GtkMenu): removed GList*children, since it
was a stale list pointer that is already present in GtkMenuShell.
* gtk/gtkmenushell.h (struct _GtkMenuShellClass): added a signal
GtkMenuShell::selection_done which is emitted after the menu shell
poped down again and all possible menu items have been activated.
Thu Jun 4 02:20:42 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmenushell.c (gtk_menu_shell_button_release): flush the x-queue
before activation of the menuitem, so the menu is actually taken off the
screen prior to any menu item activation.
* gtk/gtkctree.c (gtk_ctree_get_row_data): allow function invokation
for NULL nodes.
* gtk/gtkwidget.h:
* gtk/gtkwidget.c: new function gtk_widget_stop_accelerator to stop
the emission of the "add-accelerator" signal on a widget. this is
usefull to prevent accelerator installation on certain widgets.
* gtk/gtknotebook.c (gtk_notebook_menu_item_create): keep the menu
labels left justified, by setting their alignment. stop accelerator
installation for the menu items, since we use dynamic menus.
Wed Jun 3 06:41:22 1998 Tim Janik <timj@gtk.org>
* gtk/gtkmenufactory.c: adaptions to use the new accel groups. people
should *really* use GtkItemFactory. this is only for preserving source
compatibility where possible, use of GtkMenuFactory is deprecated as of
now.
* gtk/gtkobject.h (gtk_object_class_add_user_signal): new function
to create user signals of type GTK_RUN_NO_RECURSE. don't know why i
missed this possibility when i added gtk_object_class_add_user_signal
in late january.
* gtk/gtkmain.c (gtk_init): ignore subsequent function calls.
Sun May 31 07:31:09 1998 Tim Janik <timj@gtk.org>
* gtk/gtkaccelgroup.h:
* gtk/gtkaccelgroup.c: new implementation of the accelerator concept.
* gtk/gtkaccellabel.h:
* gtk/gtkaccellabel.c: new widget derived from GtkLabel whitch features
display of the accelerators associated with a certain widget.
* gtk/gtkitemfactory.h:
* gtk/gtkitemfactory.c: new widget, item factory with automatic rc
parsing and accelerator handling.
* gtk/gtkmenu.c (gtk_menu_reposition): new function to care for
positioning a menu.
(gtk_menu_map): removed the allocation code.
(gtk_menu_size_allocate): care for redrawing of children and resize
our widget->window correctly.
(gtk_menu_key_press): feature the new accelerator groups.
* gtk/gtkmenuitem.c (gtk_menu_item_size_allocate): reposition the
submenu if neccessary.
* gtk/gtkmenuitem.c:
* gtk/gtkcheckmenuitem.c:
* gtk/gtkradiomenuitem.c: use GtkAccelLabel in the *_new_with_label()
function variants.
* gdk/gdk.c:
(gdk_keyval_from_name):
(gdk_keyval_name): new functions for keyval<->key-name associations.
(gdk_keyval_to_upper):
(gdk_keyval_to_lower):
(gdk_keyval_is_upper):
(gdk_keyval_is_lower): new functions to check/translate keyvalues with
regards to their cases.
Wed May 27 00:48:10 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_class_path): new function to calculate a
widget's class path.
(gtk_widget_path): new function to calculate a widget's name path.
* gtk/gtkrc.c: newly introduced GtkPatternSpec structures to speed up
pattern matching, features reversed pattern matches.
1998-06-07 06:48:56 +00:00
|
|
|
return lower_val == keyval;
|
|
|
|
}
|
|
|
|
return TRUE;
|
|
|
|
}
|
1998-12-16 20:09:30 +00:00
|
|
|
|
|
|
|
void
|
|
|
|
gdk_threads_enter ()
|
|
|
|
{
|
|
|
|
GDK_THREADS_ENTER ();
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
gdk_threads_leave ()
|
|
|
|
{
|
|
|
|
GDK_THREADS_LEAVE ();
|
|
|
|
}
|
|
|
|
|