Commit Graph

73 Commits

Author SHA1 Message Date
Matthias Clasen
5486bfb14f Minor documentation formatting fixes 2013-05-27 15:26:59 -04:00
Benjamin Otte
01c810b4d7 gdk: Remove new gdk_display_manager_peek() API
It's not necessary anymore because gdk_display_manager_get() always
succeeds and the value is independant of when it was called as it's no
longer backend specific.
2013-05-02 16:27:47 +02:00
Benjamin Otte
f7ee5450e1 displaymanager: Remove GInitable implementation
This is not needed anymore, as only one type exists and that type can
always be instantiated.
2013-05-02 16:17:30 +02:00
Benjamin Otte
d67880bf72 broadway: Remove displaymanager implementation
This is an API break, but the broadway backend is unsupported, so we can
get away with it.
2013-05-02 16:15:22 +02:00
Benjamin Otte
7470a280da wayland: Remove displaymanager implementation
This is an API break, but the wayland backend is unsupported, so we can
get away with it.
2013-05-02 16:14:59 +02:00
Benjamin Otte
7c027d51d8 displaymanager: Don't create backend-specific display managers
Just create a backend-agnostic displaymanager. Creating the displays
later on determines the backend in use.
2013-05-02 16:12:04 +02:00
Benjamin Otte
632ee007a4 displaymanager: Copy logic to display creation
Use the same logic for display creation in
gdk_display_manager_open_display() that is used for displaymanager
creation.
2013-05-02 16:06:21 +02:00
Matthias Clasen
e30d5acc60 Avoid an accidental export 2013-05-01 08:46:50 -04:00
John Ralls
e58b19db04 gdk: Temporarily add -xobjective-c to CFLAGS
To enable compiling the quartz backend after a6a4428
2013-04-22 15:48:34 -07:00
Benjamin Otte
a6a4428f23 gdk: Unvfuncify gdk_display_manager_open_display()
This looks like a pretty stupid patch, but it's only a step towards the
ultimate end goal: Get rid of all the displaymanagers.
2013-04-19 16:23:43 -04:00
Benjamin Otte
f345051d36 displaymanager: Emit display-opened directly
Instead of letting every backend do it manually.
2013-04-19 16:18:25 -04:00
Benjamin Otte
1fa29835a7 gdk: Refactor function
Split out a GdkBackend type and iterate over it.
2013-04-19 16:18:25 -04:00
Benjamin Otte
0990c11a83 gdk: Unvfuncify generic key functions
This makes Wayland and X11 no longer call into XKB and libX11 for these
functions but use GDK's own copy of these functions, just like the
win32, quartz and broadway backends.
2013-04-16 15:30:14 +02:00
Benjamin Otte
441359b0a8 gdk: Refactor gdk_keyval_convert_case()
... so it doesn't export the function anymore.
2013-04-16 15:30:14 +02:00
Benjamin Otte
aa9e974c86 gdk: Make atoms handled generically
This is another step towards making GdkDisplayManager backend-agnostic.

Most of the backends profit from this as their atom implementations
where generic anyway - x11 needed that to allow multiple X displays and
broadway, quartz and wayland don't have the concept of displays.

The X11 backend still did things, so I only #if 0'd some code but did
not actually update anything.
2013-04-15 15:43:27 +02:00
Benjamin Otte
7ef508ff4a displaymanager: Handle list of displays in base class
This moves the add/remove_display() functions from the subclasses to
GdkDisplay and GdkDisplayManager. It also gets rid of the list_displays
vfunc.
2013-04-15 15:43:26 +02:00
Benjamin Otte
f7c0b025b9 displaymanager: Move set_default_display vfunc
... to GdkDisplayClass.make_default. It's only implemented by X11
anyway.
2013-04-15 15:43:26 +02:00
Benjamin Otte
839f402191 displaymanager: Handle the default display
... instead of having every backend do it on their own.
2013-04-15 15:43:26 +02:00
Matthias Clasen
c5d7871eda Add gdk_display_manager_peek
Instead of failing with an error if no GDK backend is found like
gdk_display_manager_get(), the new peek function silently returns
NULL.
2013-03-23 19:39:58 -04:00
Colin Walters
d6b4e84957 gdkkeys: Avoid instantiating a display manager if none exists
For introspection scanning which ends up calling class_init() which in
turn calls into the keybindings code, we can just use the fallback
keyval conversion code.

https://bugzilla.gnome.org/show_bug.cgi?id=696457
2013-03-23 17:07:15 -04:00
Matthias Clasen
ce7c6d58c2 Add gdk_set_allowed_backends
This new function allows programmatic control over the
GDK backends that will be used at runtime.
2013-03-23 00:48:26 -04:00
Thomas Wood
09d0d32af0 wayland: implement GInitable and check the connection to the display server
Add GInitable implementation and fail the initialisation if it is not
possible to connect to the display server.

https://bugzilla.gnome.org/show_bug.cgi?id=694465
2013-03-22 22:25:32 -04:00
Thomas Wood
3a9de35a6c gdk: Implement GInitable on GdkDisplayManager
Add GInitable interface with a default implementation that always
succeeds. This allows backends to override the GInitable implementation
and add their own checks to determine if the backend can be loaded.  If
a backend cannot be loaded, GDK can attempt to load the next available
backend.

Since backends may need to read any relevant options (such as the
display flag) to determine if they can be created successfully, this
patch also removes calls that attempt to create the display manager
before the options have been parsed.

https://bugzilla.gnome.org/show_bug.cgi?id=694465
2013-03-22 22:23:39 -04:00
Kristian Høgsberg
ea78bcb7c5 wayland: Prefer X11 backend over Wayland
https://bugzilla.gnome.org/show_bug.cgi?id=674102
2012-04-16 18:53:54 +02:00
Javier Jardón
9d0febc9a6 Change FSF Address 2012-02-27 17:06:11 +00:00
Michael Natterer
5b74ee38e8 gdk: fix gdk_keyval_to_lower/upper() for Quartz, Win32 and Broadway
In 2.x, the !HAVE_XCONVERTCASE fallback of keyval_convert_case() was
implicitly used as implementation for all !X11 backends.

In 3.x, when this function was virtualized in GdkDisplayManager,
this fallback was moved to the X11 backend and the other backends
"equipped" with /* FIXME implement */ implementations of
keyval_convert_case() which don't convert anything.

Move the fallback code back to gdk/ as default implementation
of GdkDisplayManager::keyval_convert_case() and remove its
implementations is all backends but X11. Also remove the
implementation in Wayland which was a plain copy of what
is now the default implementation.
(cherry picked from commit f46c1b76d8)
2011-10-07 16:19:41 +02:00
Kristian Høgsberg
c7514e8f0d Merge branch 'gdk-backend-wayland'
Conflicts:
	Makefile.am
	configure.ac
	gdk/Makefile.am
	gtk/gtksettings.c
	gtk/gtkwindow.c
2011-04-12 09:52:44 -04:00
Alexander Larsson
4765f37484 Merge branch 'gtk-3-0' into broadway
Conflicts:
	gdk/gdkdisplaymanager.c
2011-03-10 10:51:04 +01:00
Kristian Høgsberg
287d91e5f9 Merge remote-tracking branch 'origin/master' into gdk-backend-wayland
Conflicts:
	gdk/gdkdisplaymanager.c
2011-02-26 14:44:29 -05:00
Benjamin Otte
33a46dd553 gdk: Select the X11 backend a the last possible backend
On Windows and OS X we want to prefer the native backends over the X11
backend.
On Linux, nothing changes as nobody is going to enable those backends
(and if they do, they'll know what they get).
2011-02-12 22:09:58 +01:00
Alexander Larsson
d4add8cefa Merge branch 'master' into broadway 2011-02-11 15:27:54 +01:00
Matthias Clasen
1f4bb70bac Give the GDK docs some love
Reorganize some sections, drop the largely redundant multihead
section, add some more information about multiple backends.
2011-02-09 01:32:24 -05:00
Kristian Høgsberg
590f3dfa1f Add Wayland backend 2011-02-05 16:11:54 -05:00
Pavel Holejsovsky
2f0d40335b [GI] Add missing (transfer) annotations 2011-01-20 13:57:18 +01:00
Alexander Larsson
07db0e38b0 [broadway] Make broadway build with new gdk-backend setup
Convert all global functions to vtable calls, etc.
2011-01-19 19:52:51 +01:00
Hans Breuer
1d838f586c win32: gdk3 resurrection
There are sure regressions but basic stuff seems to be working
again after all the API breakage done with comments like
"Win32 and Quartz need to be ported still."
2011-01-02 13:33:04 +01:00
Matthias Clasen
5bc0cf1a19 Fix some more typos 2010-12-25 00:29:23 -05:00
Matthias Clasen
27ce9421d0 Fix up GDK docs 2010-12-25 00:02:39 -05:00
Kristian Rietveld
caa9794af8 quartz: Clean up header files, use same arrangement as X11 backend 2010-12-23 14:17:41 +01:00
Kristian Rietveld
e5695de12b GdkDisplayManager: register Quartz backend when applicable 2010-12-22 17:47:04 +01:00
Matthias Clasen
3973ef760e Mention GDK_BACKEND in the docs 2010-12-22 01:32:18 -05:00
Matthias Clasen
146fd989d6 Rename GdkDisplayManagerX11 to GdkX11DisplayManager
And add a gdkx11displaymanager.h header file.
2010-12-21 12:07:09 -05:00
Matthias Clasen
28abd0c75f Add vfuncs for atoms 2010-12-21 12:07:02 -05:00
Matthias Clasen
ea96e5e16f Explode gdkinternals.h into per-class private headers
At the same time, move some more class and instance structs
out of public headers.
2010-12-21 12:06:58 -05:00
Matthias Clasen
ec9c97752d Work toward turning GdkDisplayManager into a backend singleton
This commit hides the GdkDisplayManager instance and class structs,
adds vfuncs for listing displays, opening displays, and getting and
setting the default display. The X11 backend has a derived
GdkDisplayManagerX11.

The gdk_display_manager_get() function is responsible for deciding on
which of the compiled in backends to use. Currently, it consults the
GDK_BACKEND environment variable and falls back to x11.
2010-12-21 12:06:57 -05:00
Javier Jardón
1a1c4be6c3 docs: Move documentation to inline comments: gdkdisplaymanager 2010-11-16 16:20:47 +09:00
Matthias Clasen
bda1f35585 Inclusion cleanups in sources
Try to do inclusions in the same sequence, more or less.
2010-10-14 22:09:36 -04:00
Javier Jardón
404e7d0e00 gdk/: fully remove gdkalias hacks
https://bugzilla.gnome.org/show_bug.cgi?id=623845
2010-07-10 02:21:31 +02:00
Tomeu Vizoso
eae60c34d2 Annotate gdk_display_manager_list_displays return value
https://bugzilla.gnome.org/show_bug.cgi?id=623307
2010-07-02 10:51:45 +02:00
Colin Walters
18dc96caf8 Merge in Gdk-custom.c introspection annotations
The Gdk-custom.c file in gir-repository contained a number of
introspection annotations.  Merge those into the GDK source files.

Some documentation was moved from the tmpl/ files to accomodate
the addition of annotations.

https://bugzilla.gnome.org/show_bug.cgi?id=592279
2009-12-16 17:22:01 -02:00