[swindow] Rename SimpleWindow to simple_window_t

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-04-09 19:41:28 +02:00
parent a04395ddc9
commit e246410126
7 changed files with 30 additions and 30 deletions

View File

@ -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 */

View File

@ -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 },

View File

@ -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,

View File

@ -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);

10
mouse.c
View File

@ -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;

View File

@ -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 */

View File

@ -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
*/