Commit Graph

87 Commits

Author SHA1 Message Date
Benjamin Otte
04d1459fca x11: Move remaining APIs into gdkx11utils.h
Now gdkx.h is a clean header equivalent to gdk.h.
2010-12-21 12:07:07 -05:00
Benjamin Otte
dd177b5201 x11: Move atom API into gdkx11property.h 2010-12-21 12:07:07 -05:00
Benjamin Otte
ebe46e6f9d x11: Move selection-specific API into gdkx11selection.h 2010-12-21 12:07:07 -05:00
Benjamin Otte
7949073dd5 x11: Move display-specific APIs into gdkx11display.h 2010-12-21 12:07:06 -05:00
Benjamin Otte
6dfa90f57c x11: Move screen-specific API into gdkx11screen.h 2010-12-21 12:07:06 -05:00
Benjamin Otte
0ca6a7ab20 x11: Move visual-specific API into gdkx11visual.h 2010-12-21 12:07:06 -05:00
Benjamin Otte
55f3451754 x11: Move cursor API into gdkx11cursor.h 2010-12-21 12:07:06 -05:00
Benjamin Otte
124cf96850 x11: Split out public window API into gdkx11window.h 2010-12-21 12:07:06 -05:00
Matthias Clasen
572bb20011 Deal with property encoding functions
Move everything dealing with compound text to be X11 specific
Only gdk_text_property_to_utf8_list and gdk_utf8_to_string_target
are kept across backends, so add vfuncs for these.

Also, remove the non-multihead-safe variants of all these.
2010-12-21 12:07:03 -05:00
Matthias Clasen
55e1031e84 Remove gdk_net_wm_supports
This function is totally misnamed, only operates on the default
screen, and has a perfectly fine replacement in
gdk_x11_screen_supports_net_wm_hint.
2010-12-21 12:07:02 -05:00
Matthias Clasen
214342eac5 Clean up gdkx.h a bit
Moving the direct-access redefinitions of various macros
to gdkprivate-x11.h and use that header throughout in x11/.

Also remove a workaround for a long-fixed X server bug.
2010-12-21 12:07:01 -05:00
Matthias Clasen
19cf9309a5 Drop gdkx_visual_get
The function is badly named, not multihead-safe, basically unused,
and has a better replacement with gdk_x11_screen_lookup_visual.
2010-12-21 12:07:01 -05:00
Matthias Clasen
985eb14469 Multiple changes to reduce the amount of unprefixed symbols
The X11 backend exports a number of symbols which are _-prefixed
(so don't become part of the gdk api), but are not named in a
way to prevent accidental clashes between backends.

The one API change here is that the gdk_xid_table functions
have been removed - they did not server an purpose, since the
xid table only stores windows anyway, and we already have a
lookup-by-xid function for windows.
2010-12-21 12:07:00 -05:00
Matthias Clasen
2d7583c0e3 Make gdk_window_{lookup,foreign_new}_for_display backend specific
At the same time, make GDK_IS_DISPLAY_X11 available in gdkx.h, and
add some exemplaric ifdefs to GTK+ code.
2010-12-21 12:06:59 -05:00
Matthias Clasen
4a74060d63 Make gdk_set_sm_client_id X11-specific
This is really not a cross-platform API
2010-12-21 12:06:58 -05:00
Matthias Clasen
17e2c5391c Fix up parameter mismatches in the docs
And other minor gdk doc fixes.
2010-12-03 09:07:06 -05:00
Benjamin Otte
b3e8504111 x11: Don't include gdkprivate.h in gdkx.h
It's private, mkay?
And include it directly where we need it anyway.
2010-12-02 20:21:05 +01:00
Benjamin Otte
2408936bb5 x11: Remove duplicate definition of GDK_WINDOW_XID
Now, where did that come from?
2010-12-02 20:21:03 +01:00
Benjamin Otte
1bb6f48bb3 gdk: Rename GdkWindowObject to GdkWindow
... and remove most of the casting that used to be necessary.
2010-12-02 20:21:03 +01:00
Benjamin Otte
e724054d19 API: Remove GDK_WINDOW_XWINDOW() macro
Use GDK_WINDOW_XID() instead.

THis was done using sed, so there might be issues resulting to that.
Feel free to fix.
2010-12-02 20:20:56 +01:00
Benjamin Otte
1c7f58fdb6 x11: Move xid member from GdkDrawableImplX11 to GdkWindowImplX11 2010-12-02 20:17:27 +01:00
Benjamin Otte
5139eecc75 API: x11: Remove GDK_DRAWABLE_XID and GDK_DRAWABLE_XDISPLAY
Window equivalents exist and drawables are on their way out.
2010-12-02 20:17:27 +01:00
Benjamin Otte
91679c384a API: Remove gdk_x11_drawable_get_xdisplay()
No need for the function. Macros exist to do the same thing.
2010-12-02 20:17:27 +01:00
Benjamin Otte
3af4432c6f API: x11: Remove gdk_x11_window_get_drawable_impl()
It's not used anymore
2010-12-02 20:17:27 +01:00
Benjamin Otte
deffc9e39f API: x11: Change GDK_WINDOW_XDISPLAY() macro
Instead of lots of magic, we can go the usual way of requesting the
XDisplay of the window's display. So we do that.
2010-12-02 20:17:27 +01:00
Benjamin Otte
cf51750bf4 API: x11: gdk_drawable_get_xid => gdk_window_get_xid
Also moves the function implementations to gtkwindow-x11.c.
2010-12-02 20:17:27 +01:00
Javier Jardón
e2cfecf813 docs: Move documentation to inline comments: x_interaction 2010-11-15 21:06:35 +01:00
Ryan Lortie
8cca398a2f Gdk X11: Add setter for startup notify ID
For launch requests coming in over DBus.
2010-10-18 17:21:22 +02:00
Matthias Clasen
88ef199ed7 Inclusion cleanups in headers 2010-10-14 22:08:53 -04:00
Benjamin Otte
e624656c20 API: Remove GdkColormap 2010-09-26 15:11:34 +02:00
Benjamin Otte
47ee996198 x11: Use G_DEFINE_TYPE() to define GdkVisual
Also add a priv pointer to GdkVisual and use it for the GdkVisualPrivate
structure. Then Make GdkVisualPrivate actually private to
gdkvisual-x11.c and make other callers use proper function calls to
access it.
2010-09-26 15:11:33 +02:00
Benjamin Otte
f74f9b2766 gdk: Remove GdkPixmap
All iusers of it are gone, so it's now time to let go.
cairo_surface_t is a full replacement, combined with
gdk_window_create_similar_surface().
2010-09-26 15:11:30 +02:00
Havoc Pennington
b837ef5a6d Revamp and modernize X error traps
* add per-display gdk_x11_display_error_trap_push()
  (X11-specific because gdk_error_trap_push() probably
  should have been)
* make gdk_error_trap_push() handle only GDK displays
  not displays opened without a GDK wrapper
* make gdk_error_trap_pop() and gdk_x11_display_error_trap_pop()
  automatically sync only if needed, so manual gdk_flush() is not
  required
* add gdk_error_trap_pop_ignored() which just asynchronously
  ignores errors, so never needs to sync
* add G_GNUC_WARN_UNUSED_RESULT to plain pop(), because
  if you use plain pop() and don't need the return value,
  the async gdk_error_trap_pop_ignored() should be used
  instead. This results in lots of warnings to clean
  up in a later patch.

The main objective here was to avoid the need to sync just
to ignore an error. Now, syncing is automatic, and only
happens when we need to know the error code.

https://bugzilla.gnome.org/show_bug.cgi?id=629608
2010-09-18 18:19:27 -04:00
Matthias Clasen
0dcaad3a85 Drop the gdk_display variable from gdk
This was the last exported variable; it wasn't multihead safe,
and there's easy replacement with gdk_display_get_default().
Also drop the GDK_DISPLAY() macro which was just a wrapper around
the variable.
2010-09-09 19:46:41 -04:00
Benjamin Otte
6a48a042c7 API: remove GdkGC
XXX: Some traces in the win32 code are left. I suppose they'd best be
replaced using Cairo.
2010-08-10 21:02:29 +02:00
Benjamin Otte
14fe04ec89 API: remove GdkImage
It was unused and buggy.
2010-08-10 21:02:26 +02:00
Javier Jardón
c1affa4f3c Remove deprecated code from X interaction 2010-06-28 23:38:03 +02:00
Javier Jardón
47f8beb0a6 Remove gdkx_colormap_get() deprecated function 2010-06-07 04:37:06 +02:00
Alexander Larsson
d0ac27fe5f Add function accessors for x11 window/pixmap impl 2009-09-04 17:59:17 +02:00
Michael Natterer
791ac426d7 define __GDK_H_INSIDE__ around including all other headers.
2008-05-28  Michael Natterer  <mitch@imendio.com>

	* gdk/gdk.h: define __GDK_H_INSIDE__ around including all other
	headers.

	* gdk/gdkenumtypes.h.template
	* gdk/gdk*.h: add single-include guards that #error out if
	GTK_DISABLE_SINGLE_INCLUDES is defined and any of these files is
	included individually. Also removed some redundant includes and
	did some tiny trailing whitespace removal that's not worth to
	commit separately.

	* gdk/gdkprivate.h: include <gdk/gdk.h> instead of individual
	files.

	* gdk/win32/gdkwin32.h
	* gdk/x11/gdkx.h: only include <gdk/gdkprivate.h> and remove all
	other includes.


svn path=/trunk/; revision=20217
2008-05-28 14:01:57 +00:00
Søren Sandmann
053cbe6daf Add RandR 1.2 support
Thu Dec 13 13:14:50 2007  Søren Sandmann  <sandmann@redhat.com>

        * Add RandR 1.2 support

        - New monitors_changed signal - New API to get width/height of
          monitors, and the name of the plug



svn path=/trunk/; revision=19173
2007-12-13 18:27:05 +00:00
Dan Winship
0d2678417c New method to marshall and send a Startup Notification message. (from
* gdk/x11/gdkdisplay-x11.c
	(gdk_x11_display_broadcast_startup_message): New method to
	marshall and send a Startup Notification message. (from #415070)
	(gdk_notify_startup_complete_with_id): Use that

svn path=/trunk/; revision=17710
2007-04-29 18:13:42 +00:00
Emmanuele Bassi
87c28d778a Apply patch by Vytautas Liuolia for changing the startup notification id
2007-03-13  Emmanuele Bassi  <ebassi@gnome.org>

	Apply patch by Vytautas Liuolia for changing the startup
	notification id on a window in the X11 backend. (#347375)

	* gdk/gdk.h:
	* gdk/gdkx.h:
	* gdk/x11/gdkdisplay-x11.c: Add gdk_notify_startup_complete_wit_id()
	and gdk_x11_display_get_startup_notification_id().

	* gdk/gdkwindow.h:
	* gdk/x11/gdkwindow-x11.c: Add gdk_window_set_startup_id().

	* gtk/gtkwindow.h:
	* gtk/gtkwindow.c: Add gtk_window_set_startup_id(), used to
	change the startup notification id.
	
	(gtk_window_class_init), (gtk_window_init),
	(gtk_window_set_property): Add write-only "startup-id" property
	to GtkWindow.

	(gtk_window_realize): Set the startup notification id
	on a GtkWindow if it's valid.

	(gtk_window_map): If we have another valid startup notification
	id then finish the notification process.

svn path=/trunk/; revision=17508
2007-03-13 17:03:54 +00:00
Matthias Clasen
b1d1801875 When looking up a font XID, add the XID_FONT_BIT. (#348001)
2006-07-19  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkx.h (gdk_font_lookup_for_display): When looking
	up a font XID, add the XID_FONT_BIT.  (#348001)
2006-07-19 13:36:52 +00:00
Matthias Clasen
e5f444e9a8 Make gdk_window_present() move the window to the current desktop, instead
2005-07-11  Matthias Clasen  <mclasen@redhat.com>

	Make gdk_window_present() move the window to the current
	desktop, instead of letting the WM change the current
	desktop to where the window is.  (#166379, Elijah Newren)

	* gdk/gdk.symbols:
	* gdk/x11/gdkx.h:
	* gdk/x11/gdkwindow-x11.c (gdk_x11_window_move_to_current_desktop):
	New function to move a window to the current desktop.

	* gtk/gtkwindow.c (gtk_window_present_with_time): Move the
	window to the current desktop before giving it focus.
2005-07-11 18:28:23 +00:00
Matthias Clasen
3c96358fd1 Keep a reference to the GdkCursor and add a private getter for it, so that
2005-06-15  Matthias Clasen  <mclasen@redhat.com>

	* gdk/x11/gdkwindow-x11.[hc]: Keep a reference to the
	GdkCursor and add a private getter for it, so that we can
	update the cursor when the cursor theme changes.

	* gdk/gdk.symbols:
	* gdk/x11/gdkx.h:
	* gdk/x11/gdkcursor-x11.c (gdk_x11_display_set_cursor_theme):
	New function to change the cursor theme.
2005-06-15 18:37:18 +00:00
Matthias Clasen
56e0ee04fc Add a function to obtain the last user interaction time. (#163119, Elijah
2005-01-19  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdk.symbols:
	* gdk/x11/gdkx.h:
	* gdk/x11/gdkdisplay-x11.c (gdk_x11_display_get_user_time):
	Add a function to obtain the last user interaction
	time.  (#163119, Elijah Newren)
2005-01-19 14:37:56 +00:00
Matthias Clasen
0eb44bad4a GDK documentation fixes. 2004-10-09 03:31:50 +00:00
Matthias Clasen
1014c413c5 Rename from _gdk_x11_register_event_type(), added API docs.
Sun Dec 14 01:28:23 2003  Matthias Clasen  <maclas@gmx.de>

	* gdk/x11/gdkprivate-x11.h:
	* gdk/x11/gdkx.h:
	* gdk/x11/gdkevents-x11.c (gdk_x11_register_standard_event_type):
	Rename from _gdk_x11_register_event_type(), added API docs.
	* gdk/x11/gdkinput-x11.c (_gdk_input_common_init):
	* gdk/x11/gdkimage-x11.c (_gdk_windowing_image_init): Adjust
	all callers.  (#121471, Bill Haneman)
2003-12-14 00:28:57 +00:00
Manish Singh
89fd6ad3de add -DGDK_DISABLE_DEPRECATED
Sun Nov 17 13:45:08 2002  Manish Singh  <yosh@gimp.org>

        * gdk/Makefile.am: add -DGDK_DISABLE_DEPRECATED

        * gdk/gdk.c (gdk_exit): remove obsolete comment

        * gdk/gdk.h: declare gdk_input_add_full if GTK_COMPILATION for
        gtk_input_add_full

        * gdk/gdkcolor.c (gdk_color_white, gdk_color_black): use
        gdk_colormap_alloc_color instead of gdk_color_alloc

        * gdk/gdkcolor.h: declare gdk_colormap_change if GDK_COMPILATION for
        gdk_colors_store. Also, gdk_colors_{alloc,free} for
        gdk_rgb_try_colormap

        * gdk/gdkdrawable.h: declare gdk_draw_string if GTK_COMPILATION for
        gtk_default_draw_string. Also, gdk_draw_text and gdk_draw_text_wc
        if GDK_COMPILATION for the respective gdk_window_ and gdk_pixmap_
        functions.

        * gdk/gdkfont.c: #undef GDK_DISABLE_DEPRECATED, completely compat
        code here

        * gdk/gdkfont.h: allow the GdkFont structure and a few gdk_font_
        functions for compat code in GDK_COMPILATION and GTK_COMPILATION.

        * gdk/gdkrgb.c (gdk_rgb_cmap_fail, gdk_rgb_try_colormap): use
        gdk_colormap_free_colors instead of gdk_colors_free.

        * gdk/gdkrgb.c (gdk_draw_rgb_image_core): no need to set fg/bg
        for own_gc, unused.

        * gdk/gdkwindow.h: declare gdk_window_get_deskrelative_origin if
        GTK_COMPILATION for gtk_handle_box_button_changed.

        * gdk/x11/Makefile.am: add -DGDK_DISABLE_DEPRECATED, renmae
        -DINSIDE_GDK_X11 to -DGDK_COMPILATION

        * gdk/x11/gdkcolor-x11.c: remove duplicate doc string for
        gdk_colormap_alloc_colors.

        * gdk/x11/gdkfont-x11.c:  #undef GDK_DISABLE_DEPRECATED, completely
        compat code here

        * gdk/x11/gdkx.h: use GDK_COMPILATION instead of INSIDE_GDK_X11,
        allow a few gdk_x11_font_ functions if GDK_COMPILATION for compat
        code

        * gtk/Makefile.am: add -DGDK_DISABLE_DEPRECATED

        * gtk/gtkclist.c
        * gtk/gtkctree.c
        * gtk/gtkpixmap.c
        * gtk/gtkpreview.c
        * gtk/gtktext.c: #undef GDK_DISABLE_DEPRECATED, deprecated widget

        * gtk/gtkhandlebox.c (gtk_handle_box_motion): use
        gdk_window_set_geometry_hints instead of gdk_window_set_hints.

        * gtk/gtkmain.c (gtk_exit): call exit directly

        * gtktipsquery.c (gtk_tips_query_real_start_query)
        * gtk/gtktreeitem.c (gtk_tree_item_add_pixmaps): remove some
        deprecated GDK usage.
2002-11-17 22:04:03 +00:00