From e2464101265898f23ece45ed96ac00a42b791fe5 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Wed, 9 Apr 2008 19:41:28 +0200 Subject: [PATCH] [swindow] Rename SimpleWindow to simple_window_t Signed-off-by: Julien Danjou --- awesome-menu.c | 2 +- awesome-message.c | 2 +- common/swindow.c | 24 ++++++++++++------------ common/swindow.h | 16 ++++++++-------- mouse.c | 10 +++++----- structs.h | 4 ++-- titlebar.c | 2 +- 7 files changed, 30 insertions(+), 30 deletions(-) diff --git a/awesome-menu.c b/awesome-menu.c index 9b3154ed..f50566b3 100644 --- a/awesome-menu.c +++ b/awesome-menu.c @@ -101,7 +101,7 @@ typedef struct /** Default screen number */ int default_screen; /** The window */ - SimpleWindow *sw; + simple_window_t *sw; /** The draw contet */ DrawCtx *ctx; /** Colors */ diff --git a/awesome-message.c b/awesome-message.c index 169dd8a4..9fd0bfe3 100644 --- a/awesome-message.c +++ b/awesome-message.c @@ -121,7 +121,7 @@ exit_on_signal(int sig __attribute__ ((unused))) int main(int argc, char **argv) { - SimpleWindow *sw; + simple_window_t *sw; DrawCtx *ctx; xcb_generic_event_t *ev; area_t geometry = { 0, 0, 200, 50, NULL, NULL }, diff --git a/common/swindow.c b/common/swindow.c index 1bebc037..2444e881 100644 --- a/common/swindow.c +++ b/common/swindow.c @@ -32,14 +32,14 @@ * \param w width * \param h height * \param border_width window's border width - * \return pointer to a SimpleWindow + * \return pointer to a simple_window_t */ -SimpleWindow * +simple_window_t * simplewindow_new(xcb_connection_t *conn, int phys_screen, int x, int y, unsigned int w, unsigned int h, unsigned int border_width) { - SimpleWindow *sw; + simple_window_t *sw; xcb_screen_t *s = xcb_aux_get_screen(conn, phys_screen); uint32_t create_win_val[3]; const uint32_t gc_mask = XCB_GC_FOREGROUND | XCB_GC_BACKGROUND; @@ -48,7 +48,7 @@ simplewindow_new(xcb_connection_t *conn, int phys_screen, int x, int y, * window */ xcb_drawable_t gc_draw = s->root; - sw = p_new(SimpleWindow, 1); + sw = p_new(simple_window_t, 1); sw->geometry.x = x; sw->geometry.y = y; @@ -80,10 +80,10 @@ simplewindow_new(xcb_connection_t *conn, int phys_screen, int x, int y, } /** Destroy a simple window and all its resources - * \param sw the SimpleWindow to delete + * \param sw the simple_window_t to delete */ void -simplewindow_delete(SimpleWindow **sw) +simplewindow_delete(simple_window_t **sw) { xcb_destroy_window((*sw)->connection, (*sw)->window); xcb_free_pixmap((*sw)->connection, (*sw)->drawable); @@ -91,12 +91,12 @@ simplewindow_delete(SimpleWindow **sw) } /** Move a simple window - * \param sw the SimpleWindow to move + * \param sw the simple_window_t to move * \param x x coordinate * \param y y coordinate */ void -simplewindow_move(SimpleWindow *sw, int x, int y) +simplewindow_move(simple_window_t *sw, int x, int y) { const uint32_t move_win_vals[] = { x, y }; @@ -108,12 +108,12 @@ simplewindow_move(SimpleWindow *sw, int x, int y) } /** Resize a simple window - * \param sw the SimpleWindow to resize + * \param sw the simple_window_t to resize * \param w new width * \param h new height */ void -simplewindow_resize(SimpleWindow *sw, unsigned int w, unsigned int h) +simplewindow_resize(simple_window_t *sw, unsigned int w, unsigned int h) { xcb_screen_t *s = xcb_aux_get_screen(sw->connection, sw->phys_screen); const uint32_t resize_win_vals[] = { w, h }; @@ -129,11 +129,11 @@ simplewindow_resize(SimpleWindow *sw, unsigned int w, unsigned int h) } /** Refresh the window content - * \param sw the SimpleWindow to refresh + * \param sw the simple_window_t to refresh * \param phys_screen physical screen id */ void -simplewindow_refresh_drawable(SimpleWindow *sw) +simplewindow_refresh_drawable(simple_window_t *sw) { xcb_copy_area(sw->connection, sw->drawable, sw->window, sw->gc, 0, 0, 0, 0, diff --git a/common/swindow.h b/common/swindow.h index 4f555978..9221b540 100644 --- a/common/swindow.h +++ b/common/swindow.h @@ -25,7 +25,7 @@ #include "common/draw.h" /** A simple window */ -typedef struct SimpleWindow +typedef struct simple_window_t { xcb_connection_t *connection; int phys_screen; @@ -33,16 +33,16 @@ typedef struct SimpleWindow xcb_drawable_t drawable; xcb_gcontext_t gc; area_t geometry; -} SimpleWindow; +} simple_window_t; -SimpleWindow * simplewindow_new(xcb_connection_t *, int, int, int, unsigned int, unsigned int, unsigned int); -void simplewindow_delete(SimpleWindow **); -void simplewindow_move(SimpleWindow *, int, int); -void simplewindow_resize(SimpleWindow *, unsigned int, unsigned int); -void simplewindow_refresh_drawable(SimpleWindow *); +simple_window_t * simplewindow_new(xcb_connection_t *, int, int, int, unsigned int, unsigned int, unsigned int); +void simplewindow_delete(simple_window_t **); +void simplewindow_move(simple_window_t *, int, int); +void simplewindow_resize(simple_window_t *, unsigned int, unsigned int); +void simplewindow_refresh_drawable(simple_window_t *); static inline void -simplewindow_move_resize(SimpleWindow *sw, int x, int y, +simplewindow_move_resize(simple_window_t *sw, int x, int y, unsigned int w, unsigned int h) { simplewindow_move(sw, x, y); diff --git a/mouse.c b/mouse.c index 9bbfc34d..39e2b68b 100644 --- a/mouse.c +++ b/mouse.c @@ -138,7 +138,7 @@ mouse_snapclient(Client *c, area_t geometry) * \param border the client border size */ static void -mouse_resizebar_draw(DrawCtx *ctx, style_t style, SimpleWindow *sw, area_t geometry, int border) +mouse_resizebar_draw(DrawCtx *ctx, style_t style, simple_window_t *sw, area_t geometry, int border) { area_t draw_geometry = { 0, 0, ctx->width, ctx->height, NULL, NULL }; char size[32]; @@ -159,10 +159,10 @@ mouse_resizebar_draw(DrawCtx *ctx, style_t style, SimpleWindow *sw, area_t geome * \param style style used to draw * \param ctx drawctx to create */ -static SimpleWindow * +static simple_window_t * mouse_resizebar_new(int phys_screen, int border, area_t geometry, style_t style, DrawCtx **ctx) { - SimpleWindow *sw; + simple_window_t *sw; area_t geom; geom.width = draw_textwidth(globalconf.connection, @@ -199,7 +199,7 @@ uicb_client_movemouse(int screen, char *arg __attribute__ ((unused))) area_t geometry; Client *c = globalconf.focus->client, *target; Layout *layout = layout_get_current(screen); - SimpleWindow *sw = NULL; + simple_window_t *sw = NULL; DrawCtx *ctx; style_t style; xcb_generic_event_t *ev = NULL; @@ -329,7 +329,7 @@ uicb_client_resizemouse(int screen, char *arg __attribute__ ((unused))) Layout *layout = curtags[0]->layout; area_t area = { 0, 0, 0, 0, NULL, NULL }, geometry = { 0, 0, 0, 0, NULL, NULL }; double mwfact; - SimpleWindow *sw = NULL; + simple_window_t *sw = NULL; DrawCtx *ctx = NULL; style_t style; xcb_grab_pointer_cookie_t grab_pointer_c; diff --git a/structs.h b/structs.h index c3df4c3b..c193ca04 100644 --- a/structs.h +++ b/structs.h @@ -55,7 +55,7 @@ enum typedef struct { - SimpleWindow *sw; + simple_window_t *sw; Position position; Position dposition; Alignment align; @@ -166,7 +166,7 @@ struct Widget struct Statusbar { /** Window */ - SimpleWindow *sw; + simple_window_t *sw; /** Statusbar name */ char *name; /** Bar width */ diff --git a/titlebar.c b/titlebar.c index 57f16cff..00108ca9 100644 --- a/titlebar.c +++ b/titlebar.c @@ -30,7 +30,7 @@ extern AwesomeConf globalconf; -/** Initialize a titlebar: create the SimpleWindow. +/** Initialize a titlebar: create the simple_window_t. * We still need to update its geometry to have it placed correctly. * \param c the client */