X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fclient.h;h=04849b632e89fbb3b08593e6287c0076e702e0d2;hb=19b480058e869a588ea20be5e29017ae2052e967;hp=5942eb14db0d80fc1177d6895029e4c2646620da;hpb=740c5b2a20d5110435d0874f8cc6a4c9dfd14777;p=chaz%2Fopenbox diff --git a/openbox/client.h b/openbox/client.h index 5942eb14..04849b63 100644 --- a/openbox/client.h +++ b/openbox/client.h @@ -1,6 +1,7 @@ /* -*- indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*- client.h for the Openbox window manager + Copyright (c) 2006 Mikael Magnusson Copyright (c) 2003 Ben Jansens This program is free software; you can redistribute it and/or modify @@ -32,8 +33,9 @@ struct _ObFrame; struct _ObGroup; struct _ObSessionState; -typedef struct _ObClient ObClient; -typedef struct _ObClientIcon ObClientIcon; +typedef struct _ObClient ObClient; +typedef struct _ObClientIcon ObClientIcon; +typedef struct _ObAppSettings ObAppSettings; /* The value in client.transient_for indicating it is a transient for its group instead of for a single window */ @@ -201,14 +203,14 @@ struct _ObClient /*! True if the client supports the delete_window protocol */ gboolean delete_window; - /*! Was the window's position requested by the application? if not, we + /*! Was the window's position requested by the application or the user? + if by the application, we force it completely onscreen, if by the user + we only force it if it tries to go completely offscreen, if neither, we should place the window ourselves when it first appears */ - gboolean positioned; + guint positioned; /*! Can the window receive input focus? */ gboolean can_focus; - /*! Urgency flag */ - gboolean urgent; /*! Notify the window when it receives focus? */ gboolean focus_notify; @@ -239,6 +241,8 @@ struct _ObClient /*! The window should be underneath other windows of the same type. above takes priority over below. */ gboolean below; + /*! Demands attention flag */ + gboolean demands_attention; /*! The layer in which the window will be stacked, windows in lower layers are always below windows in higher layers. */ @@ -265,6 +269,34 @@ struct _ObClient ObClientIcon *icons; /*! The number of icons in icons */ guint nicons; + + guint32 user_time; +}; + +struct _ObAppSettings +{ + gchar *class; + gchar *name; + gchar *role; + + Point position; + gboolean center_x; + gboolean center_y; + gboolean pos_given; + + guint desktop; + gint shade; + gint decor; + gint focus; + gint head; + gint iconic; + gint skip_pager; + gint skip_taskbar; + gint max_horz; + gint max_vert; + gint fullscreen; + + gint layer; }; extern GList *client_list; @@ -324,11 +356,11 @@ gboolean client_focused(ObClient *self); @param h The height component of the new size for the client. @param user Specifies whether this is a user-requested change or a program requested change. For program requested changes, the - constraints are not checked. + constraints are not checked. @param final If user is true, then this should specify if this is a final configuration. e.g. Final should be FALSE if doing an - interactive move/resize, and then be TRUE for the last call - only. + interactive move/resize, and then be TRUE for the last call + only. @param force_reply Send a ConfigureNotify to the client regardless of if the position changed. */ @@ -399,6 +431,9 @@ void client_maximize(ObClient *self, gboolean max, gint dir, */ void client_shade(ObClient *self, gboolean shade); +/*! Hilite the window to make the user notice it */ +void client_hilite(ObClient *self, gboolean hilite); + /*! Request the client to close its window */ void client_close(ObClient *self); @@ -447,8 +482,12 @@ void client_unfocus(ObClient *self); when the user deliberately selects a window for use. @param here If true, then the client is brought to the current desktop; otherwise, the desktop is changed to where the client lives. + @param user If true, then a user action is what requested the activation; + otherwise, it means an application requested it on its own + @param timestamp The time at which the activate was requested. */ -void client_activate(ObClient *self, gboolean here); +void client_activate(ObClient *self, gboolean here, gboolean user, + Time timestamp); /*! Calculates the stacking layer for the client window */ void client_calc_layer(ObClient *self); @@ -484,7 +523,7 @@ void client_update_normal_hints(ObClient *self); /*! Updates the WMHints and adjusts things if they change @param initstate Whether to read the initial_state property from the WMHints. This should only be used during the mapping - process. + process. */ void client_update_wmhints(ObClient *self); /*! Updates the window's title and icon title */ @@ -495,6 +534,8 @@ void client_update_class(ObClient *self); void client_update_strut(ObClient *self); /*! Updates the window's icons */ void client_update_icons(ObClient *self); +/*! Updates the window's user time */ +void client_update_user_time(ObClient *self, gboolean new_event); /*! Set up what decor should be shown on the window and what functions should be allowed (ObClient::decorations and ObClient::functions). @@ -545,7 +586,7 @@ ObClient *client_search_transient(ObClient *self, ObClient *search); ObClient *client_find_directional(ObClient *c, ObDirection dir); /*! Return the closest edge in the given direction */ -gint client_directional_edge_search(ObClient *c, ObDirection dir); +gint client_directional_edge_search(ObClient *c, ObDirection dir, gboolean hang); /*! Set a client window to be above/below other clients. @layer < 0 indicates the client should be placed below other clients.