1 /* workspace object */ 2 /* vim: set sw=2 et: */ 3 4 /* 5 * Copyright (C) 2001 Havoc Pennington 6 * Copyright (C) 2006-2007 Vincent Untz 7 * 8 * This library is free software; you can redistribute it and/or 9 * modify it under the terms of the GNU Library General Public 10 * License as published by the Free Software Foundation; either 11 * version 2 of the License, or (at your option) any later version. 12 * 13 * This library is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 * Library General Public License for more details. 17 * 18 * You should have received a copy of the GNU Library General Public 19 * License along with this library; if not, write to the 20 * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 21 * Boston, MA 02111-1307, USA. 22 */ 23 24 #ifndef WNCK_WORKSPACE_H 25 #define WNCK_WORKSPACE_H 26 27 #include <glib-object.h> 28 #include <libwnck/screen.h> 29 30 G_BEGIN_DECLS 31 32 #define WNCK_TYPE_WORKSPACE (wnck_workspace_get_type ()) 33 #define WNCK_WORKSPACE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), WNCK_TYPE_WORKSPACE, WnckWorkspace)) 34 #define WNCK_WORKSPACE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WNCK_TYPE_WORKSPACE, WnckWorkspaceClass)) 35 #define WNCK_IS_WORKSPACE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), WNCK_TYPE_WORKSPACE)) 36 #define WNCK_IS_WORKSPACE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WNCK_TYPE_WORKSPACE)) 37 #define WNCK_WORKSPACE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WNCK_TYPE_WORKSPACE, WnckWorkspaceClass)) 38 39 typedef struct _WnckWorkspaceClass WnckWorkspaceClass; 40 typedef struct _WnckWorkspacePrivate WnckWorkspacePrivate; 41 42 /** 43 * WnckWorkspace: 44 * 45 * The #WnckWorkspace struct contains only private fields and should not be 46 * directly accessed. 47 */ 48 struct _WnckWorkspace 49 { 50 GObject parent_instance; 51 52 WnckWorkspacePrivate *priv; 53 }; 54 55 struct _WnckWorkspaceClass 56 { 57 GObjectClass parent_class; 58 59 void (* name_changed) (WnckWorkspace *space); 60 61 /* Padding for future expansion */ 62 void (* pad1) (void); 63 void (* pad2) (void); 64 void (* pad3) (void); 65 void (* pad4) (void); 66 }; 67 68 GType wnck_workspace_get_type (void) G_GNUC_CONST; 69 70 int wnck_workspace_get_number (WnckWorkspace *space); 71 const char* wnck_workspace_get_name (WnckWorkspace *space); 72 void wnck_workspace_change_name (WnckWorkspace *space, 73 const char *name); 74 WnckScreen* wnck_workspace_get_screen (WnckWorkspace *space); 75 void wnck_workspace_activate (WnckWorkspace *space, 76 guint32 timestamp); 77 int wnck_workspace_get_width (WnckWorkspace *space); 78 int wnck_workspace_get_height (WnckWorkspace *space); 79 int wnck_workspace_get_viewport_x (WnckWorkspace *space); 80 int wnck_workspace_get_viewport_y (WnckWorkspace *space); 81 gboolean wnck_workspace_is_virtual (WnckWorkspace *space); 82 83 84 int wnck_workspace_get_layout_row (WnckWorkspace *space); 85 int wnck_workspace_get_layout_column (WnckWorkspace *space); 86 WnckWorkspace* wnck_workspace_get_neighbor (WnckWorkspace *space, 87 WnckMotionDirection direction); 88 89 G_END_DECLS 90 91 #endif /* WNCK_WORKSPACE_H */ 92