mirror of
https://github.com/brl/mutter.git
synced 2025-02-28 18:54:08 +00:00
window: Use g_object_class_install_properties
This commit is contained in:
parent
692acbd986
commit
4e4a6eb5d7
@ -158,9 +158,13 @@ enum {
|
|||||||
PROP_GTK_WINDOW_OBJECT_PATH,
|
PROP_GTK_WINDOW_OBJECT_PATH,
|
||||||
PROP_GTK_APP_MENU_OBJECT_PATH,
|
PROP_GTK_APP_MENU_OBJECT_PATH,
|
||||||
PROP_GTK_MENUBAR_OBJECT_PATH,
|
PROP_GTK_MENUBAR_OBJECT_PATH,
|
||||||
PROP_ON_ALL_WORKSPACES
|
PROP_ON_ALL_WORKSPACES,
|
||||||
|
|
||||||
|
LAST_PROP,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static GParamSpec *obj_props[LAST_PROP];
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
WORKSPACE_CHANGED,
|
WORKSPACE_CHANGED,
|
||||||
@ -393,205 +397,161 @@ meta_window_class_init (MetaWindowClass *klass)
|
|||||||
klass->update_struts = meta_window_real_update_struts;
|
klass->update_struts = meta_window_real_update_struts;
|
||||||
klass->get_default_skip_hints = meta_window_real_get_default_skip_hints;
|
klass->get_default_skip_hints = meta_window_real_get_default_skip_hints;
|
||||||
|
|
||||||
g_object_class_install_property (object_class,
|
obj_props[PROP_TITLE] =
|
||||||
PROP_TITLE,
|
|
||||||
g_param_spec_string ("title",
|
g_param_spec_string ("title",
|
||||||
"Title",
|
"Title",
|
||||||
"The title of the window",
|
"The title of the window",
|
||||||
NULL,
|
NULL,
|
||||||
G_PARAM_READABLE));
|
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
|
||||||
g_object_class_install_property (object_class,
|
obj_props[PROP_ICON] =
|
||||||
PROP_ICON,
|
|
||||||
g_param_spec_object ("icon",
|
g_param_spec_object ("icon",
|
||||||
"Icon",
|
"Icon",
|
||||||
"96 pixel sized icon",
|
"96 pixel sized icon",
|
||||||
GDK_TYPE_PIXBUF,
|
GDK_TYPE_PIXBUF,
|
||||||
G_PARAM_READABLE));
|
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
|
||||||
|
obj_props[PROP_MINI_ICON] =
|
||||||
g_object_class_install_property (object_class,
|
|
||||||
PROP_MINI_ICON,
|
|
||||||
g_param_spec_object ("mini-icon",
|
g_param_spec_object ("mini-icon",
|
||||||
"Mini Icon",
|
"Mini Icon",
|
||||||
"16 pixel sized icon",
|
"16 pixel sized icon",
|
||||||
GDK_TYPE_PIXBUF,
|
GDK_TYPE_PIXBUF,
|
||||||
G_PARAM_READABLE));
|
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
|
||||||
|
obj_props[PROP_DECORATED] =
|
||||||
g_object_class_install_property (object_class,
|
|
||||||
PROP_DECORATED,
|
|
||||||
g_param_spec_boolean ("decorated",
|
g_param_spec_boolean ("decorated",
|
||||||
"Decorated",
|
"Decorated",
|
||||||
"Whether window is decorated",
|
"Whether window is decorated",
|
||||||
TRUE,
|
TRUE,
|
||||||
G_PARAM_READABLE));
|
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
|
||||||
|
obj_props[PROP_FULLSCREEN] =
|
||||||
g_object_class_install_property (object_class,
|
|
||||||
PROP_FULLSCREEN,
|
|
||||||
g_param_spec_boolean ("fullscreen",
|
g_param_spec_boolean ("fullscreen",
|
||||||
"Fullscreen",
|
"Fullscreen",
|
||||||
"Whether window is fullscreened",
|
"Whether window is fullscreened",
|
||||||
FALSE,
|
FALSE,
|
||||||
G_PARAM_READABLE));
|
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
|
||||||
|
obj_props[PROP_MAXIMIZED_HORIZONTALLY] =
|
||||||
g_object_class_install_property (object_class,
|
|
||||||
PROP_MAXIMIZED_HORIZONTALLY,
|
|
||||||
g_param_spec_boolean ("maximized-horizontally",
|
g_param_spec_boolean ("maximized-horizontally",
|
||||||
"Maximized horizontally",
|
"Maximized horizontally",
|
||||||
"Whether window is maximized horizontally",
|
"Whether window is maximized horizontally",
|
||||||
FALSE,
|
FALSE,
|
||||||
G_PARAM_READABLE));
|
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
|
||||||
|
obj_props[PROP_MAXIMIZED_VERTICALLY] =
|
||||||
g_object_class_install_property (object_class,
|
|
||||||
PROP_MAXIMIZED_VERTICALLY,
|
|
||||||
g_param_spec_boolean ("maximized-vertically",
|
g_param_spec_boolean ("maximized-vertically",
|
||||||
"Maximizing vertically",
|
"Maximizing vertically",
|
||||||
"Whether window is maximized vertically",
|
"Whether window is maximized vertically",
|
||||||
FALSE,
|
FALSE,
|
||||||
G_PARAM_READABLE));
|
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
|
||||||
g_object_class_install_property (object_class,
|
obj_props[PROP_MINIMIZED] =
|
||||||
PROP_MINIMIZED,
|
|
||||||
g_param_spec_boolean ("minimized",
|
g_param_spec_boolean ("minimized",
|
||||||
"Minimizing",
|
"Minimizing",
|
||||||
"Whether window is minimized",
|
"Whether window is minimized",
|
||||||
FALSE,
|
FALSE,
|
||||||
G_PARAM_READABLE));
|
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
|
||||||
|
obj_props[PROP_WINDOW_TYPE] =
|
||||||
g_object_class_install_property (object_class,
|
|
||||||
PROP_WINDOW_TYPE,
|
|
||||||
g_param_spec_enum ("window-type",
|
g_param_spec_enum ("window-type",
|
||||||
"Window Type",
|
"Window Type",
|
||||||
"The type of the window",
|
"The type of the window",
|
||||||
META_TYPE_WINDOW_TYPE,
|
META_TYPE_WINDOW_TYPE,
|
||||||
META_WINDOW_NORMAL,
|
META_WINDOW_NORMAL,
|
||||||
G_PARAM_READABLE));
|
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
|
||||||
|
obj_props[PROP_USER_TIME] =
|
||||||
g_object_class_install_property (object_class,
|
|
||||||
PROP_USER_TIME,
|
|
||||||
g_param_spec_uint ("user-time",
|
g_param_spec_uint ("user-time",
|
||||||
"User time",
|
"User time",
|
||||||
"Timestamp of last user interaction",
|
"Timestamp of last user interaction",
|
||||||
0,
|
0,
|
||||||
G_MAXUINT,
|
G_MAXUINT,
|
||||||
0,
|
0,
|
||||||
G_PARAM_READABLE));
|
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
|
||||||
|
obj_props[PROP_DEMANDS_ATTENTION] =
|
||||||
g_object_class_install_property (object_class,
|
|
||||||
PROP_DEMANDS_ATTENTION,
|
|
||||||
g_param_spec_boolean ("demands-attention",
|
g_param_spec_boolean ("demands-attention",
|
||||||
"Demands Attention",
|
"Demands Attention",
|
||||||
"Whether the window has _NET_WM_STATE_DEMANDS_ATTENTION set",
|
"Whether the window has _NET_WM_STATE_DEMANDS_ATTENTION set",
|
||||||
FALSE,
|
FALSE,
|
||||||
G_PARAM_READABLE));
|
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
|
||||||
|
obj_props[PROP_URGENT] =
|
||||||
g_object_class_install_property (object_class,
|
|
||||||
PROP_URGENT,
|
|
||||||
g_param_spec_boolean ("urgent",
|
g_param_spec_boolean ("urgent",
|
||||||
"Urgent",
|
"Urgent",
|
||||||
"Whether the urgent flag of WM_HINTS is set",
|
"Whether the urgent flag of WM_HINTS is set",
|
||||||
FALSE,
|
FALSE,
|
||||||
G_PARAM_READABLE));
|
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
|
||||||
|
obj_props[PROP_SKIP_TASKBAR] =
|
||||||
g_object_class_install_property (object_class,
|
|
||||||
PROP_SKIP_TASKBAR,
|
|
||||||
g_param_spec_boolean ("skip-taskbar",
|
g_param_spec_boolean ("skip-taskbar",
|
||||||
"Skip taskbar",
|
"Skip taskbar",
|
||||||
"Whether the skip-taskbar flag of WM_HINTS is set",
|
"Whether the skip-taskbar flag of WM_HINTS is set",
|
||||||
FALSE,
|
FALSE,
|
||||||
G_PARAM_READABLE));
|
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
|
||||||
|
obj_props[PROP_MUTTER_HINTS] =
|
||||||
g_object_class_install_property (object_class,
|
|
||||||
PROP_MUTTER_HINTS,
|
|
||||||
g_param_spec_string ("mutter-hints",
|
g_param_spec_string ("mutter-hints",
|
||||||
"_MUTTER_HINTS",
|
"_MUTTER_HINTS",
|
||||||
"Contents of the _MUTTER_HINTS property of this window",
|
"Contents of the _MUTTER_HINTS property of this window",
|
||||||
NULL,
|
NULL,
|
||||||
G_PARAM_READABLE));
|
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
|
||||||
g_object_class_install_property (object_class,
|
obj_props[PROP_APPEARS_FOCUSED] =
|
||||||
PROP_APPEARS_FOCUSED,
|
|
||||||
g_param_spec_boolean ("appears-focused",
|
g_param_spec_boolean ("appears-focused",
|
||||||
"Appears focused",
|
"Appears focused",
|
||||||
"Whether the window is drawn as being focused",
|
"Whether the window is drawn as being focused",
|
||||||
FALSE,
|
FALSE,
|
||||||
G_PARAM_READABLE));
|
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
|
||||||
|
obj_props[PROP_RESIZEABLE] =
|
||||||
g_object_class_install_property (object_class,
|
|
||||||
PROP_RESIZEABLE,
|
|
||||||
g_param_spec_boolean ("resizeable",
|
g_param_spec_boolean ("resizeable",
|
||||||
"Resizeable",
|
"Resizeable",
|
||||||
"Whether the window can be resized",
|
"Whether the window can be resized",
|
||||||
FALSE,
|
FALSE,
|
||||||
G_PARAM_READABLE));
|
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
|
||||||
|
obj_props[PROP_ABOVE] =
|
||||||
g_object_class_install_property (object_class,
|
|
||||||
PROP_ABOVE,
|
|
||||||
g_param_spec_boolean ("above",
|
g_param_spec_boolean ("above",
|
||||||
"Above",
|
"Above",
|
||||||
"Whether the window is shown as always-on-top",
|
"Whether the window is shown as always-on-top",
|
||||||
FALSE,
|
FALSE,
|
||||||
G_PARAM_READABLE));
|
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
|
||||||
|
obj_props[PROP_WM_CLASS] =
|
||||||
g_object_class_install_property (object_class,
|
|
||||||
PROP_WM_CLASS,
|
|
||||||
g_param_spec_string ("wm-class",
|
g_param_spec_string ("wm-class",
|
||||||
"WM_CLASS",
|
"WM_CLASS",
|
||||||
"Contents of the WM_CLASS property of this window",
|
"Contents of the WM_CLASS property of this window",
|
||||||
NULL,
|
NULL,
|
||||||
G_PARAM_READABLE));
|
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
|
||||||
|
obj_props[PROP_GTK_APPLICATION_ID] =
|
||||||
g_object_class_install_property (object_class,
|
|
||||||
PROP_GTK_APPLICATION_ID,
|
|
||||||
g_param_spec_string ("gtk-application-id",
|
g_param_spec_string ("gtk-application-id",
|
||||||
"_GTK_APPLICATION_ID",
|
"_GTK_APPLICATION_ID",
|
||||||
"Contents of the _GTK_APPLICATION_ID property of this window",
|
"Contents of the _GTK_APPLICATION_ID property of this window",
|
||||||
NULL,
|
NULL,
|
||||||
G_PARAM_READABLE));
|
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
|
||||||
|
obj_props[PROP_GTK_UNIQUE_BUS_NAME] =
|
||||||
g_object_class_install_property (object_class,
|
|
||||||
PROP_GTK_UNIQUE_BUS_NAME,
|
|
||||||
g_param_spec_string ("gtk-unique-bus-name",
|
g_param_spec_string ("gtk-unique-bus-name",
|
||||||
"_GTK_UNIQUE_BUS_NAME",
|
"_GTK_UNIQUE_BUS_NAME",
|
||||||
"Contents of the _GTK_UNIQUE_BUS_NAME property of this window",
|
"Contents of the _GTK_UNIQUE_BUS_NAME property of this window",
|
||||||
NULL,
|
NULL,
|
||||||
G_PARAM_READABLE));
|
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
|
||||||
|
obj_props[PROP_GTK_APPLICATION_OBJECT_PATH] =
|
||||||
g_object_class_install_property (object_class,
|
|
||||||
PROP_GTK_APPLICATION_OBJECT_PATH,
|
|
||||||
g_param_spec_string ("gtk-application-object-path",
|
g_param_spec_string ("gtk-application-object-path",
|
||||||
"_GTK_APPLICATION_OBJECT_PATH",
|
"_GTK_APPLICATION_OBJECT_PATH",
|
||||||
"Contents of the _GTK_APPLICATION_OBJECT_PATH property of this window",
|
"Contents of the _GTK_APPLICATION_OBJECT_PATH property of this window",
|
||||||
NULL,
|
NULL,
|
||||||
G_PARAM_READABLE));
|
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
|
||||||
|
obj_props[PROP_GTK_WINDOW_OBJECT_PATH] =
|
||||||
g_object_class_install_property (object_class,
|
|
||||||
PROP_GTK_WINDOW_OBJECT_PATH,
|
|
||||||
g_param_spec_string ("gtk-window-object-path",
|
g_param_spec_string ("gtk-window-object-path",
|
||||||
"_GTK_WINDOW_OBJECT_PATH",
|
"_GTK_WINDOW_OBJECT_PATH",
|
||||||
"Contents of the _GTK_WINDOW_OBJECT_PATH property of this window",
|
"Contents of the _GTK_WINDOW_OBJECT_PATH property of this window",
|
||||||
NULL,
|
NULL,
|
||||||
G_PARAM_READABLE));
|
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
|
||||||
|
obj_props[PROP_GTK_APP_MENU_OBJECT_PATH] =
|
||||||
g_object_class_install_property (object_class,
|
|
||||||
PROP_GTK_APP_MENU_OBJECT_PATH,
|
|
||||||
g_param_spec_string ("gtk-app-menu-object-path",
|
g_param_spec_string ("gtk-app-menu-object-path",
|
||||||
"_GTK_APP_MENU_OBJECT_PATH",
|
"_GTK_APP_MENU_OBJECT_PATH",
|
||||||
"Contents of the _GTK_APP_MENU_OBJECT_PATH property of this window",
|
"Contents of the _GTK_APP_MENU_OBJECT_PATH property of this window",
|
||||||
NULL,
|
NULL,
|
||||||
G_PARAM_READABLE));
|
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
|
||||||
|
obj_props[PROP_GTK_MENUBAR_OBJECT_PATH] =
|
||||||
g_object_class_install_property (object_class,
|
|
||||||
PROP_GTK_MENUBAR_OBJECT_PATH,
|
|
||||||
g_param_spec_string ("gtk-menubar-object-path",
|
g_param_spec_string ("gtk-menubar-object-path",
|
||||||
"_GTK_MENUBAR_OBJECT_PATH",
|
"_GTK_MENUBAR_OBJECT_PATH",
|
||||||
"Contents of the _GTK_MENUBAR_OBJECT_PATH property of this window",
|
"Contents of the _GTK_MENUBAR_OBJECT_PATH property of this window",
|
||||||
NULL,
|
NULL,
|
||||||
G_PARAM_READABLE));
|
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
|
||||||
|
obj_props[PROP_ON_ALL_WORKSPACES] =
|
||||||
g_object_class_install_property (object_class,
|
|
||||||
PROP_ON_ALL_WORKSPACES,
|
|
||||||
g_param_spec_boolean ("on-all-workspaces",
|
g_param_spec_boolean ("on-all-workspaces",
|
||||||
"On all workspaces",
|
"On all workspaces",
|
||||||
"Whether the window is set to appear on all workspaces",
|
"Whether the window is set to appear on all workspaces",
|
||||||
FALSE,
|
FALSE,
|
||||||
G_PARAM_READABLE));
|
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
|
||||||
|
|
||||||
|
g_object_class_install_properties (object_class, LAST_PROP, obj_props);
|
||||||
|
|
||||||
window_signals[WORKSPACE_CHANGED] =
|
window_signals[WORKSPACE_CHANGED] =
|
||||||
g_signal_new ("workspace-changed",
|
g_signal_new ("workspace-changed",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user