2002-10-29 06:19:52 +00:00
|
|
|
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
|
|
|
|
|
|
|
|
/* gnome-window-manager.h
|
|
|
|
* Copyright (C) 2002 Seth Nickell
|
|
|
|
* Copyright (C) 2002 Red Hat, Inc.
|
|
|
|
*
|
|
|
|
* Written by: Seth Nickell <snickell@stanford.edu>,
|
|
|
|
* Havoc Pennington <hp@redhat.com>
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2, or (at your option)
|
|
|
|
* any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
|
|
|
* 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
2002-05-15 00:57:00 +00:00
|
|
|
#ifndef GNOME_WINDOW_MANAGER_H
|
|
|
|
#define GNOME_WINDOW_MANAGER_H
|
|
|
|
|
|
|
|
#include <glib-object.h>
|
|
|
|
|
|
|
|
#include <libgnome/gnome-desktop-item.h>
|
|
|
|
|
2002-10-29 06:19:52 +00:00
|
|
|
/* Increment if backward-incompatible changes are made, so we get a clean
|
|
|
|
* error. In principle the libtool versioning handles this, but
|
|
|
|
* in combination with dlopen I don't quite trust that.
|
|
|
|
*/
|
|
|
|
#define GNOME_WINDOW_MANAGER_INTERFACE_VERSION 1
|
|
|
|
|
|
|
|
typedef GObject * (* GnomeWindowManagerNewFunc) (int expected_interface_version);
|
|
|
|
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
GNOME_WM_SETTING_FONT = 1 << 0,
|
|
|
|
GNOME_WM_SETTING_MOUSE_FOCUS = 1 << 1,
|
|
|
|
GNOME_WM_SETTING_AUTORAISE = 1 << 2,
|
|
|
|
GNOME_WM_SETTING_AUTORAISE_DELAY = 1 << 3,
|
|
|
|
GNOME_WM_SETTING_MOUSE_MOVE_MODIFIER = 1 << 4,
|
|
|
|
GNOME_WM_SETTING_THEME = 1 << 5,
|
|
|
|
GNOME_WM_SETTING_DOUBLE_CLICK_ACTION = 1 << 6,
|
|
|
|
GNOME_WM_SETTING_MASK =
|
|
|
|
GNOME_WM_SETTING_FONT |
|
|
|
|
GNOME_WM_SETTING_MOUSE_FOCUS |
|
|
|
|
GNOME_WM_SETTING_AUTORAISE |
|
|
|
|
GNOME_WM_SETTING_AUTORAISE_DELAY |
|
|
|
|
GNOME_WM_SETTING_MOUSE_MOVE_MODIFIER |
|
|
|
|
GNOME_WM_SETTING_THEME |
|
|
|
|
GNOME_WM_SETTING_DOUBLE_CLICK_ACTION
|
|
|
|
} GnomeWMSettingsFlags;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
int number;
|
|
|
|
const char *human_readable_name;
|
|
|
|
} GnomeWMDoubleClickAction;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
GnomeWMSettingsFlags flags; /* this allows us to expand the struct
|
|
|
|
* while remaining binary compatible
|
|
|
|
*/
|
|
|
|
const char *font;
|
|
|
|
int autoraise_delay;
|
|
|
|
/* One of the strings "Alt", "Control", "Super", "Hyper", "Meta" */
|
|
|
|
const char *mouse_move_modifier;
|
|
|
|
const char *theme;
|
|
|
|
int double_click_action;
|
|
|
|
|
|
|
|
guint focus_follows_mouse : 1;
|
|
|
|
guint autoraise : 1;
|
|
|
|
|
|
|
|
} GnomeWMSettings;
|
2002-05-15 00:57:00 +00:00
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
Update to deal with the .pc file that gets generated.
2002-06-02 Seth Nickell <snickell@stanford.edu>
* .cvsignore:
Update to deal with the .pc file that gets generated.
* Makefile.am:
Build a real library, not just a non-installed. This is to get around
problems dealing with GObject inheritance and static memory problems. We
have a run time loaded object deriving from the library, so it has to link it in. But then
the problem that occurs is that both the run-time loaded library and the
program that calls it statically link the .la in. Then they have different
memory spaces, and type registration goes to pot. Open to suggestions if there's
a way of doing this without making an installed library.
* gnome-window-manager.c: (gnome_window_manager_new),
(gnome_window_manager_get_name), (gnome_window_manager_set_theme),
(gnome_window_manager_get_theme_list),
(gnome_window_manager_set_font),
(gnome_window_manager_get_focus_follows_mouse),
(gnome_window_manager_set_focus_follows_mouse),
(gnome_window_manager_init), (gnome_window_manager_finalize),
(gnome_window_manager_class_init), (gnome_window_manager_get_type):
* gnome-window-manager.h:
Lots of formatting fixes, change some of the boilerplate.
* gnome-window-settings-2.0.pc.in:
Since we're installing a library, go the whole way. Its good to make this
easy to depend on for external window managers anyway, now that I think
of it.
* gnome-wm-manager.c: (gnome_wm_manager_init),
(gnome_wm_manager_get_list), (gnome_wm_manager_set_current),
(gnome_wm_manager_get_current),
(gnome_wm_manager_change_wm_to_settings), (restart_label_update),
(restart_dialog_raise), (restart_dialog_destroyed),
(show_restart_dialog), (hide_restart_dialog), (init_session),
(update_session), (init_callback), (restart_finalize),
(restart_failure), (show_restart_info), (restart_finish),
(restart_callback), (restart), (revert_callback),
(cancel_callback):
* gnome-wm-manager.h:
Add code for doing the window manager switch to the library,
snitched out of wm-properties. Its probably a little broken right now.
* wm-exec.c: (wm_is_running), (find_gnome_wm_window),
(find_wm_window_from_client), (window_has_wm_state),
(descendent_has_wm_state), (find_wm_window_from_hunt),
(find_wm_window), (start_timeout), (start_do), (kill_timeout),
(wm_restart), (wm_guess_current):
* wm-list.c: (is_blank), (wm_compare), (wm_free),
(wm_check_present), (wm_copy), (wm_list_find), (wm_list_find_exec),
(wm_list_find_files), (wm_list_read_dir), (wm_list_init),
(wm_list_save), (wm_list_revert), (wm_list_add), (wm_list_delete),
(wm_list_set_current), (wm_list_get_current), (wm_list_get_revert),
(wm_read_from_xml), (wm_list_read_from_xml), (wm_write_to_xml),
(wm_list_write_to_xml), (xml_read_bool), (xml_write_bool):
* wm-properties.h:
Take wm-switching code out of the capplet, move it here.
(Jacob, I did a make dist and build the resulting tarball, hope things
don't break for you this time ... )
2002-06-03 00:33:59 +00:00
|
|
|
#define GNOME_WINDOW_MANAGER(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, gnome_window_manager_get_type (), GnomeWindowManager)
|
|
|
|
#define GNOME_WINDOW_MANAGER_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, gnome_window_manager_get_type (), GnomeWindowManagerClass)
|
|
|
|
#define IS_GNOME_WINDOW_MANAGER(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, gnome_window_manager_get_type ())
|
|
|
|
#define GNOME_WINDOW_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), gnome_window_manager_get_type, GnomeWindowManagerClass))
|
2002-05-15 00:57:00 +00:00
|
|
|
|
|
|
|
typedef struct _GnomeWindowManager GnomeWindowManager;
|
|
|
|
typedef struct _GnomeWindowManagerClass GnomeWindowManagerClass;
|
Update to deal with the .pc file that gets generated.
2002-06-02 Seth Nickell <snickell@stanford.edu>
* .cvsignore:
Update to deal with the .pc file that gets generated.
* Makefile.am:
Build a real library, not just a non-installed. This is to get around
problems dealing with GObject inheritance and static memory problems. We
have a run time loaded object deriving from the library, so it has to link it in. But then
the problem that occurs is that both the run-time loaded library and the
program that calls it statically link the .la in. Then they have different
memory spaces, and type registration goes to pot. Open to suggestions if there's
a way of doing this without making an installed library.
* gnome-window-manager.c: (gnome_window_manager_new),
(gnome_window_manager_get_name), (gnome_window_manager_set_theme),
(gnome_window_manager_get_theme_list),
(gnome_window_manager_set_font),
(gnome_window_manager_get_focus_follows_mouse),
(gnome_window_manager_set_focus_follows_mouse),
(gnome_window_manager_init), (gnome_window_manager_finalize),
(gnome_window_manager_class_init), (gnome_window_manager_get_type):
* gnome-window-manager.h:
Lots of formatting fixes, change some of the boilerplate.
* gnome-window-settings-2.0.pc.in:
Since we're installing a library, go the whole way. Its good to make this
easy to depend on for external window managers anyway, now that I think
of it.
* gnome-wm-manager.c: (gnome_wm_manager_init),
(gnome_wm_manager_get_list), (gnome_wm_manager_set_current),
(gnome_wm_manager_get_current),
(gnome_wm_manager_change_wm_to_settings), (restart_label_update),
(restart_dialog_raise), (restart_dialog_destroyed),
(show_restart_dialog), (hide_restart_dialog), (init_session),
(update_session), (init_callback), (restart_finalize),
(restart_failure), (show_restart_info), (restart_finish),
(restart_callback), (restart), (revert_callback),
(cancel_callback):
* gnome-wm-manager.h:
Add code for doing the window manager switch to the library,
snitched out of wm-properties. Its probably a little broken right now.
* wm-exec.c: (wm_is_running), (find_gnome_wm_window),
(find_wm_window_from_client), (window_has_wm_state),
(descendent_has_wm_state), (find_wm_window_from_hunt),
(find_wm_window), (start_timeout), (start_do), (kill_timeout),
(wm_restart), (wm_guess_current):
* wm-list.c: (is_blank), (wm_compare), (wm_free),
(wm_check_present), (wm_copy), (wm_list_find), (wm_list_find_exec),
(wm_list_find_files), (wm_list_read_dir), (wm_list_init),
(wm_list_save), (wm_list_revert), (wm_list_add), (wm_list_delete),
(wm_list_set_current), (wm_list_get_current), (wm_list_get_revert),
(wm_read_from_xml), (wm_list_read_from_xml), (wm_write_to_xml),
(wm_list_write_to_xml), (xml_read_bool), (xml_write_bool):
* wm-properties.h:
Take wm-switching code out of the capplet, move it here.
(Jacob, I did a make dist and build the resulting tarball, hope things
don't break for you this time ... )
2002-06-03 00:33:59 +00:00
|
|
|
|
2002-05-15 00:57:00 +00:00
|
|
|
typedef struct _GnomeWindowManagerPrivate GnomeWindowManagerPrivate;
|
|
|
|
|
|
|
|
struct _GnomeWindowManager
|
|
|
|
{
|
2002-10-29 06:19:52 +00:00
|
|
|
GObject parent;
|
|
|
|
|
|
|
|
GnomeWindowManagerPrivate *p;
|
2002-05-15 00:57:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _GnomeWindowManagerClass
|
|
|
|
{
|
2002-10-29 06:19:52 +00:00
|
|
|
GObjectClass klass;
|
|
|
|
|
|
|
|
void (* settings_changed) (GnomeWindowManager *wm);
|
|
|
|
|
|
|
|
void (* change_settings) (GnomeWindowManager *wm,
|
|
|
|
const GnomeWMSettings *settings);
|
|
|
|
void (* get_settings) (GnomeWindowManager *wm,
|
|
|
|
GnomeWMSettings *settings);
|
|
|
|
|
|
|
|
GList * (* get_theme_list) (GnomeWindowManager *wm);
|
|
|
|
char * (* get_user_theme_folder) (GnomeWindowManager *wm);
|
|
|
|
|
|
|
|
int (* get_settings_mask) (GnomeWindowManager *wm);
|
|
|
|
|
|
|
|
void (* get_double_click_actions) (GnomeWindowManager *wm,
|
|
|
|
const GnomeWMDoubleClickAction **actions,
|
|
|
|
int *n_actions);
|
|
|
|
|
|
|
|
void (* padding_func_1) (GnomeWindowManager *wm);
|
|
|
|
void (* padding_func_2) (GnomeWindowManager *wm);
|
|
|
|
void (* padding_func_3) (GnomeWindowManager *wm);
|
|
|
|
void (* padding_func_4) (GnomeWindowManager *wm);
|
|
|
|
void (* padding_func_5) (GnomeWindowManager *wm);
|
|
|
|
void (* padding_func_6) (GnomeWindowManager *wm);
|
|
|
|
void (* padding_func_7) (GnomeWindowManager *wm);
|
|
|
|
void (* padding_func_8) (GnomeWindowManager *wm);
|
|
|
|
void (* padding_func_9) (GnomeWindowManager *wm);
|
|
|
|
void (* padding_func_10) (GnomeWindowManager *wm);
|
2002-05-15 00:57:00 +00:00
|
|
|
};
|
|
|
|
|
2002-10-29 06:19:52 +00:00
|
|
|
GObject * gnome_window_manager_new (GnomeDesktopItem *item);
|
|
|
|
GType gnome_window_manager_get_type (void);
|
|
|
|
const char * gnome_window_manager_get_name (GnomeWindowManager *wm);
|
|
|
|
GnomeDesktopItem *gnome_window_manager_get_ditem (GnomeWindowManager *wm);
|
2002-05-15 00:57:00 +00:00
|
|
|
|
2002-06-04 23:00:19 +00:00
|
|
|
/* GList of char *'s */
|
2002-10-29 06:19:52 +00:00
|
|
|
GList * gnome_window_manager_get_theme_list (GnomeWindowManager *wm);
|
|
|
|
char * gnome_window_manager_get_user_theme_folder (GnomeWindowManager *wm);
|
|
|
|
|
|
|
|
/* only uses fields with their flags set */
|
|
|
|
void gnome_window_manager_change_settings (GnomeWindowManager *wm,
|
|
|
|
const GnomeWMSettings *settings);
|
|
|
|
/* only gets fields with their flags set (and if it fails to get a field,
|
|
|
|
* it unsets that flag, so flags should be checked on return)
|
|
|
|
*/
|
|
|
|
void gnome_window_manager_get_settings (GnomeWindowManager *wm,
|
|
|
|
GnomeWMSettings *settings);
|
|
|
|
|
|
|
|
void gnome_window_manager_settings_changed (GnomeWindowManager *wm);
|
|
|
|
|
|
|
|
void gnome_window_manager_get_double_click_actions (GnomeWindowManager *wm,
|
|
|
|
const GnomeWMDoubleClickAction **actions,
|
|
|
|
int *n_actions);
|
|
|
|
|
2002-05-15 00:57:00 +00:00
|
|
|
|
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif /* GNOME_WINDOW_MANAGER_H */
|