Add GdkEventSetting event for notification of changes to system settings,
Mon Apr 2 18:18:07 2001 Owen Taylor <otaylor@redhat.com> * gdk/gdkevents.h: Add GdkEventSetting event for notification of changes to system settings, gdk_setting_get() to retrieve a single system setting. * gdk/x11/gdkevents-x11.c: Bridge gdk_setting_get() and GdkEventSetting to the draft XSETTINGS mechanism. * gdk/x11/xsettings-{common,client}.[ch]: Sample-implementation of XSETTINGS. * gtk/gtkmain.c gtk/gtksettings.[ch]: Propagate notification of GDK settings changes to the GtkSettings object. * gdk/gdkevents.[ch] gdk/gtk/gtksettings.c: Hook up the double-click-timeout property to GDK. * gdk/gdkcolor.[ch] gdk/gdkvisual.h gdk/gdkevent.[ch] gdk/gdkfont.[ch]: Define GDK boxed types here. * gdk/Makefile.am gdk/makeenums.pl: Generate source files gdk/gdkenumtypes.[ch] for enum definitions. * gtk/gtkcompat.h: Add defines for GTK_TYPE_GDK_* * gtk/gtk-boxed.defs: Comment out GDK types * gtk/gtktypeutils.h: Remove GDK types * gtk/Makefile.am: No longer scan GDK headers for enumerataions
This commit is contained in:
		
							
								
								
									
										68
									
								
								gdk/x11/xsettings-client.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										68
									
								
								gdk/x11/xsettings-client.h
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,68 @@ | ||||
| /* | ||||
|  * Copyright © 2001 Red Hat, Inc. | ||||
|  * | ||||
|  * Permission to use, copy, modify, distribute, and sell this software and its | ||||
|  * documentation for any purpose is hereby granted without fee, provided that | ||||
|  * the above copyright notice appear in all copies and that both that | ||||
|  * copyright notice and this permission notice appear in supporting | ||||
|  * documentation, and that the name of Red Hat not be used in advertising or | ||||
|  * publicity pertaining to distribution of the software without specific, | ||||
|  * written prior permission.  Red Hat makes no representations about the | ||||
|  * suitability of this software for any purpose.  It is provided "as is" | ||||
|  * without express or implied warranty. | ||||
|  * | ||||
|  * RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL | ||||
|  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL RED HAT | ||||
|  * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||||
|  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION | ||||
|  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN  | ||||
|  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||||
|  * | ||||
|  * Author:  Owen Taylor, Red Hat, Inc. | ||||
|  */ | ||||
| #ifndef XSETTINGS_CLIENT_H | ||||
| #define XSETTINGS_CLIENT_H | ||||
|  | ||||
| #include <X11/Xlib.h> | ||||
| #include "xsettings-common.h" | ||||
|  | ||||
| #ifdef __cplusplus | ||||
| extern "C" { | ||||
| #endif /* __cplusplus */ | ||||
|  | ||||
| typedef struct _XSettingsClient XSettingsClient; | ||||
|  | ||||
| typedef enum  | ||||
| { | ||||
|   XSETTINGS_ACTION_NEW, | ||||
|   XSETTINGS_ACTION_CHANGED, | ||||
|   XSETTINGS_ACTION_DELETED, | ||||
| } XSettingsAction; | ||||
|  | ||||
| typedef void (*XSettingsNotifyFunc) (const char       *name, | ||||
| 				     XSettingsAction   action, | ||||
| 				     XSettingsSetting *setting, | ||||
| 				     void             *cb_data); | ||||
| typedef void (*XSettingsWatchFunc)  (Window            window, | ||||
| 				     Bool              is_start, | ||||
| 				     long              mask, | ||||
| 				     void             *cb_data); | ||||
|  | ||||
| XSettingsClient *xsettings_client_new           (Display             *display, | ||||
| 						 int                  screen, | ||||
| 						 XSettingsNotifyFunc  notify, | ||||
| 						 XSettingsWatchFunc   watch, | ||||
| 						 void                *cb_data); | ||||
| void             xsettings_client_destroy       (XSettingsClient     *client); | ||||
| Bool             xsettings_client_process_event (XSettingsClient     *client, | ||||
| 						 XEvent              *xev); | ||||
|  | ||||
| XSettingsResult xsettings_client_get_setting (XSettingsClient   *client, | ||||
| 					      const char        *name, | ||||
| 					      XSettingsSetting **setting); | ||||
|  | ||||
| #ifdef __cplusplus | ||||
| } | ||||
| #endif /* __cplusplus */ | ||||
|  | ||||
| #endif /* XSETTINGS_CLIENT_H */ | ||||
		Reference in New Issue
	
	Block a user
	 Owen Taylor
					Owen Taylor