mirror of
https://github.com/gryf/wmaker.git
synced 2026-06-09 19:55:23 +02:00
changed indentation to use spaces only
This commit is contained in:
@@ -242,3 +242,4 @@ int main(int argc, char **argv)
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
+9
-4
@@ -19,13 +19,15 @@ static char *options[] = {
|
||||
};
|
||||
|
||||
|
||||
int numberOfRows(WMTableViewDelegate *self, WMTableView *table)
|
||||
int
|
||||
numberOfRows(WMTableViewDelegate *self, WMTableView *table)
|
||||
{
|
||||
return 20;
|
||||
}
|
||||
|
||||
|
||||
void *valueForCell(WMTableViewDelegate *self, WMTableColumn *column, int row)
|
||||
void*
|
||||
valueForCell(WMTableViewDelegate *self, WMTableColumn *column, int row)
|
||||
{
|
||||
/*WMTableView *table = (WMTableView*)WMGetTableColumnTableView(column);*/
|
||||
int i;
|
||||
@@ -46,7 +48,8 @@ void *valueForCell(WMTableViewDelegate *self, WMTableColumn *column, int row)
|
||||
}
|
||||
|
||||
|
||||
void setValueForCell(WMTableViewDelegate *self, WMTableColumn *column, int row,
|
||||
void
|
||||
setValueForCell(WMTableViewDelegate *self, WMTableColumn *column, int row,
|
||||
void *data)
|
||||
{
|
||||
if ((int)WMGetTableColumnId(column) == 1)
|
||||
@@ -65,7 +68,8 @@ static WMTableViewDelegate delegate = {
|
||||
|
||||
|
||||
|
||||
void clickedTable(WMWidget *w, void *self)
|
||||
void
|
||||
clickedTable(WMWidget *w, void *self)
|
||||
{
|
||||
int row = WMGetTableViewClickedRow((WMTableView*)self);
|
||||
|
||||
@@ -133,3 +137,4 @@ main(int argc, char **argv)
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -57,9 +57,9 @@ static char *SelectionColor = "#bbbbcc";
|
||||
|
||||
|
||||
|
||||
static void stringDraw(WMScreen *scr, Drawable d, GC gc, GC sgc,
|
||||
WMColor *textColor, WMFont *font, void *data,
|
||||
WMRect rect, Bool selected)
|
||||
static void
|
||||
stringDraw(WMScreen *scr, Drawable d, GC gc, GC sgc, WMColor *textColor,
|
||||
WMFont *font, void *data, WMRect rect, Bool selected)
|
||||
{
|
||||
int x, y;
|
||||
XRectangle rects[1];
|
||||
@@ -91,8 +91,9 @@ static void stringDraw(WMScreen *scr, Drawable d, GC gc, GC sgc,
|
||||
|
||||
|
||||
|
||||
static void pixmapDraw(WMScreen *scr, Drawable d, GC gc, GC sgc,
|
||||
WMPixmap *pixmap, WMRect rect, Bool selected)
|
||||
static void
|
||||
pixmapDraw(WMScreen *scr, Drawable d, GC gc, GC sgc, WMPixmap *pixmap,
|
||||
WMRect rect, Bool selected)
|
||||
{
|
||||
int x, y;
|
||||
XRectangle rects[1];
|
||||
@@ -135,8 +136,9 @@ static void pixmapDraw(WMScreen *scr, Drawable d, GC gc, GC sgc,
|
||||
|
||||
|
||||
|
||||
static void SECellPainter(WMTableColumnDelegate *self,
|
||||
WMTableColumn *column, int row, Drawable d)
|
||||
static void
|
||||
SECellPainter(WMTableColumnDelegate *self, WMTableColumn *column,
|
||||
int row, Drawable d)
|
||||
{
|
||||
StringEditorData *strdata = (StringEditorData*)self->data;
|
||||
WMTableView *table = WMGetTableColumnTableView(column);
|
||||
@@ -149,8 +151,9 @@ static void SECellPainter(WMTableColumnDelegate *self,
|
||||
}
|
||||
|
||||
|
||||
static void selectedSECellPainter(WMTableColumnDelegate *self,
|
||||
WMTableColumn *column, int row, Drawable d)
|
||||
static void
|
||||
selectedSECellPainter(WMTableColumnDelegate *self, WMTableColumn *column,
|
||||
int row, Drawable d)
|
||||
{
|
||||
StringEditorData *strdata = (StringEditorData*)self->data;
|
||||
WMTableView *table = WMGetTableColumnTableView(column);
|
||||
@@ -163,8 +166,8 @@ static void selectedSECellPainter(WMTableColumnDelegate *self,
|
||||
}
|
||||
|
||||
|
||||
static void beginSECellEdit(WMTableColumnDelegate *self,
|
||||
WMTableColumn *column, int row)
|
||||
static void
|
||||
beginSECellEdit(WMTableColumnDelegate *self, WMTableColumn *column, int row)
|
||||
{
|
||||
StringEditorData *strdata = (StringEditorData*)self->data;
|
||||
WMRect rect = WMTableViewRectForCell(strdata->table, column, row);
|
||||
@@ -178,8 +181,8 @@ static void beginSECellEdit(WMTableColumnDelegate *self,
|
||||
}
|
||||
|
||||
|
||||
static void endSECellEdit(WMTableColumnDelegate *self,
|
||||
WMTableColumn *column, int row)
|
||||
static void
|
||||
endSECellEdit(WMTableColumnDelegate *self, WMTableColumn *column, int row)
|
||||
{
|
||||
StringEditorData *strdata = (StringEditorData*)self->data;
|
||||
char *text;
|
||||
@@ -191,7 +194,8 @@ static void endSECellEdit(WMTableColumnDelegate *self,
|
||||
}
|
||||
|
||||
|
||||
WMTableColumnDelegate *WTCreateStringEditorDelegate(WMTableView *parent)
|
||||
WMTableColumnDelegate*
|
||||
WTCreateStringEditorDelegate(WMTableView *parent)
|
||||
{
|
||||
WMTableColumnDelegate *delegate = wmalloc(sizeof(WMTableColumnDelegate));
|
||||
WMScreen *scr = WMWidgetScreen(parent);
|
||||
@@ -221,8 +225,9 @@ WMTableColumnDelegate *WTCreateStringEditorDelegate(WMTableView *parent)
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
|
||||
static void ESCellPainter(WMTableColumnDelegate *self,
|
||||
WMTableColumn *column, int row, Drawable d)
|
||||
static void
|
||||
ESCellPainter(WMTableColumnDelegate *self, WMTableColumn *column,
|
||||
int row, Drawable d)
|
||||
{
|
||||
EnumSelectorData *strdata = (EnumSelectorData*)self->data;
|
||||
WMTableView *table = WMGetTableColumnTableView(column);
|
||||
@@ -236,8 +241,9 @@ static void ESCellPainter(WMTableColumnDelegate *self,
|
||||
}
|
||||
|
||||
|
||||
static void selectedESCellPainter(WMTableColumnDelegate *self,
|
||||
WMTableColumn *column, int row, Drawable d)
|
||||
static void
|
||||
selectedESCellPainter(WMTableColumnDelegate *self, WMTableColumn *column,
|
||||
int row, Drawable d)
|
||||
{
|
||||
EnumSelectorData *strdata = (EnumSelectorData*)self->data;
|
||||
WMTableView *table = WMGetTableColumnTableView(column);
|
||||
@@ -251,8 +257,8 @@ static void selectedESCellPainter(WMTableColumnDelegate *self,
|
||||
}
|
||||
|
||||
|
||||
static void beginESCellEdit(WMTableColumnDelegate *self,
|
||||
WMTableColumn *column, int row)
|
||||
static void
|
||||
beginESCellEdit(WMTableColumnDelegate *self, WMTableColumn *column, int row)
|
||||
{
|
||||
EnumSelectorData *strdata = (EnumSelectorData*)self->data;
|
||||
WMRect rect = WMTableViewRectForCell(strdata->table, column, row);
|
||||
@@ -269,8 +275,8 @@ static void beginESCellEdit(WMTableColumnDelegate *self,
|
||||
}
|
||||
|
||||
|
||||
static void endESCellEdit(WMTableColumnDelegate *self,
|
||||
WMTableColumn *column, int row)
|
||||
static void
|
||||
endESCellEdit(WMTableColumnDelegate *self, WMTableColumn *column, int row)
|
||||
{
|
||||
EnumSelectorData *strdata = (EnumSelectorData*)self->data;
|
||||
int option;
|
||||
@@ -282,7 +288,8 @@ static void endESCellEdit(WMTableColumnDelegate *self,
|
||||
}
|
||||
|
||||
|
||||
WMTableColumnDelegate *WTCreateEnumSelectorDelegate(WMTableView *parent)
|
||||
WMTableColumnDelegate*
|
||||
WTCreateEnumSelectorDelegate(WMTableView *parent)
|
||||
{
|
||||
WMTableColumnDelegate *delegate = wmalloc(sizeof(WMTableColumnDelegate));
|
||||
WMScreen *scr = WMWidgetScreen(parent);
|
||||
@@ -310,8 +317,9 @@ WMTableColumnDelegate *WTCreateEnumSelectorDelegate(WMTableView *parent)
|
||||
}
|
||||
|
||||
|
||||
void WTSetEnumSelectorOptions(WMTableColumnDelegate *delegate,
|
||||
char **options, int count)
|
||||
void
|
||||
WTSetEnumSelectorOptions(WMTableColumnDelegate *delegate, char **options,
|
||||
int count)
|
||||
{
|
||||
EnumSelectorData *data = (EnumSelectorData*)delegate->data;
|
||||
int i;
|
||||
@@ -334,8 +342,9 @@ void WTSetEnumSelectorOptions(WMTableColumnDelegate *delegate,
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
static void BSCellPainter(WMTableColumnDelegate *self,
|
||||
WMTableColumn *column, int row, Drawable d)
|
||||
static void
|
||||
BSCellPainter(WMTableColumnDelegate *self, WMTableColumn *column,
|
||||
int row, Drawable d)
|
||||
{
|
||||
BooleanSwitchData *strdata = (BooleanSwitchData*)self->data;
|
||||
WMTableView *table = WMGetTableColumnTableView(column);
|
||||
@@ -354,8 +363,9 @@ static void BSCellPainter(WMTableColumnDelegate *self,
|
||||
}
|
||||
|
||||
|
||||
static void selectedBSCellPainter(WMTableColumnDelegate *self,
|
||||
WMTableColumn *column, int row, Drawable d)
|
||||
static void
|
||||
selectedBSCellPainter(WMTableColumnDelegate *self, WMTableColumn *column,
|
||||
int row, Drawable d)
|
||||
{
|
||||
BooleanSwitchData *strdata = (BooleanSwitchData*)self->data;
|
||||
WMTableView *table = WMGetTableColumnTableView(column);
|
||||
@@ -375,8 +385,8 @@ static void selectedBSCellPainter(WMTableColumnDelegate *self,
|
||||
|
||||
|
||||
|
||||
static void beginBSCellEdit(WMTableColumnDelegate *self,
|
||||
WMTableColumn *column, int row)
|
||||
static void
|
||||
beginBSCellEdit(WMTableColumnDelegate *self, WMTableColumn *column, int row)
|
||||
{
|
||||
BooleanSwitchData *strdata = (BooleanSwitchData*)self->data;
|
||||
WMRect rect = WMTableViewRectForCell(strdata->table, column, row);
|
||||
@@ -390,8 +400,8 @@ static void beginBSCellEdit(WMTableColumnDelegate *self,
|
||||
}
|
||||
|
||||
|
||||
static void endBSCellEdit(WMTableColumnDelegate *self,
|
||||
WMTableColumn *column, int row)
|
||||
static void
|
||||
endBSCellEdit(WMTableColumnDelegate *self, WMTableColumn *column, int row)
|
||||
{
|
||||
BooleanSwitchData *strdata = (BooleanSwitchData*)self->data;
|
||||
int value;
|
||||
@@ -402,7 +412,8 @@ static void endBSCellEdit(WMTableColumnDelegate *self,
|
||||
}
|
||||
|
||||
|
||||
WMTableColumnDelegate *WTCreateBooleanSwitchDelegate(WMTableView *parent)
|
||||
WMTableColumnDelegate*
|
||||
WTCreateBooleanSwitchDelegate(WMTableView *parent)
|
||||
{
|
||||
WMTableColumnDelegate *delegate = wmalloc(sizeof(WMTableColumnDelegate));
|
||||
WMScreen *scr = WMWidgetScreen(parent);
|
||||
@@ -437,8 +448,9 @@ WMTableColumnDelegate *WTCreateBooleanSwitchDelegate(WMTableView *parent)
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
|
||||
static void SCellPainter(WMTableColumnDelegate *self,
|
||||
WMTableColumn *column, int row, Drawable d)
|
||||
static void
|
||||
SCellPainter(WMTableColumnDelegate *self, WMTableColumn *column,
|
||||
int row, Drawable d)
|
||||
{
|
||||
StringData *strdata = (StringData*)self->data;
|
||||
WMTableView *table = WMGetTableColumnTableView(column);
|
||||
@@ -451,8 +463,9 @@ static void SCellPainter(WMTableColumnDelegate *self,
|
||||
}
|
||||
|
||||
|
||||
static void selectedSCellPainter(WMTableColumnDelegate *self,
|
||||
WMTableColumn *column, int row, Drawable d)
|
||||
static void
|
||||
selectedSCellPainter(WMTableColumnDelegate *self, WMTableColumn *column,
|
||||
int row, Drawable d)
|
||||
{
|
||||
StringData *strdata = (StringData*)self->data;
|
||||
WMTableView *table = WMGetTableColumnTableView(column);
|
||||
@@ -465,7 +478,8 @@ static void selectedSCellPainter(WMTableColumnDelegate *self,
|
||||
}
|
||||
|
||||
|
||||
WMTableColumnDelegate *WTCreateStringDelegate(WMTableView *parent)
|
||||
WMTableColumnDelegate*
|
||||
WTCreateStringDelegate(WMTableView *parent)
|
||||
{
|
||||
WMTableColumnDelegate *delegate = wmalloc(sizeof(WMTableColumnDelegate));
|
||||
WMScreen *scr = WMWidgetScreen(parent);
|
||||
@@ -490,8 +504,9 @@ WMTableColumnDelegate *WTCreateStringDelegate(WMTableView *parent)
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
|
||||
static void PCellPainter(WMTableColumnDelegate *self,
|
||||
WMTableColumn *column, int row, Drawable d)
|
||||
static void
|
||||
PCellPainter(WMTableColumnDelegate *self, WMTableColumn *column,
|
||||
int row, Drawable d)
|
||||
{
|
||||
StringData *strdata = (StringData*)self->data;
|
||||
WMTableView *table = WMGetTableColumnTableView(column);
|
||||
@@ -504,8 +519,9 @@ static void PCellPainter(WMTableColumnDelegate *self,
|
||||
}
|
||||
|
||||
|
||||
static void selectedPCellPainter(WMTableColumnDelegate *self,
|
||||
WMTableColumn *column, int row, Drawable d)
|
||||
static void
|
||||
selectedPCellPainter(WMTableColumnDelegate *self, WMTableColumn *column,
|
||||
int row, Drawable d)
|
||||
{
|
||||
StringData *strdata = (StringData*)self->data;
|
||||
WMTableView *table = WMGetTableColumnTableView(column);
|
||||
@@ -518,7 +534,8 @@ static void selectedPCellPainter(WMTableColumnDelegate *self,
|
||||
}
|
||||
|
||||
|
||||
WMTableColumnDelegate *WTCreatePixmapDelegate(WMTableView *table)
|
||||
WMTableColumnDelegate*
|
||||
WTCreatePixmapDelegate(WMTableView *table)
|
||||
{
|
||||
WMTableColumnDelegate *delegate = wmalloc(sizeof(WMTableColumnDelegate));
|
||||
WMScreen *scr = WMWidgetScreen(table);
|
||||
@@ -541,8 +558,9 @@ WMTableColumnDelegate *WTCreatePixmapDelegate(WMTableView *table)
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
|
||||
static void drawPSCell(WMTableColumnDelegate *self, Drawable d,
|
||||
WMTableColumn *column, int row, Bool selected)
|
||||
static void
|
||||
drawPSCell(WMTableColumnDelegate *self, Drawable d, WMTableColumn *column,
|
||||
int row, Bool selected)
|
||||
{
|
||||
StringData *strdata = (StringData*)self->data;
|
||||
WMTableView *table = WMGetTableColumnTableView(column);
|
||||
@@ -579,21 +597,24 @@ static void drawPSCell(WMTableColumnDelegate *self, Drawable d,
|
||||
}
|
||||
|
||||
|
||||
static void PSCellPainter(WMTableColumnDelegate *self,
|
||||
WMTableColumn *column, int row, Drawable d)
|
||||
static void
|
||||
PSCellPainter(WMTableColumnDelegate *self, WMTableColumn *column,
|
||||
int row, Drawable d)
|
||||
{
|
||||
drawPSCell(self, d, column, row, False);
|
||||
}
|
||||
|
||||
|
||||
static void selectedPSCellPainter(WMTableColumnDelegate *self,
|
||||
WMTableColumn *column, int row, Drawable d)
|
||||
static void
|
||||
selectedPSCellPainter(WMTableColumnDelegate *self, WMTableColumn *column,
|
||||
int row, Drawable d)
|
||||
{
|
||||
drawPSCell(self, d, column, row, True);
|
||||
}
|
||||
|
||||
|
||||
WMTableColumnDelegate *WTCreatePixmapStringDelegate(WMTableView *parent)
|
||||
WMTableColumnDelegate*
|
||||
WTCreatePixmapStringDelegate(WMTableView *parent)
|
||||
{
|
||||
WMTableColumnDelegate *delegate = wmalloc(sizeof(WMTableColumnDelegate));
|
||||
WMScreen *scr = WMWidgetScreen(parent);
|
||||
|
||||
+105
-56
@@ -33,7 +33,8 @@ static void rearrangeHeader(WMTableView *table);
|
||||
static WMRange rowsInRect(WMTableView *table, WMRect rect);
|
||||
|
||||
|
||||
WMTableColumn *WMCreateTableColumn(char *title)
|
||||
WMTableColumn*
|
||||
WMCreateTableColumn(char *title)
|
||||
{
|
||||
WMTableColumn *col = wmalloc(sizeof(WMTableColumn));
|
||||
|
||||
@@ -56,19 +57,22 @@ WMTableColumn *WMCreateTableColumn(char *title)
|
||||
}
|
||||
|
||||
|
||||
void WMSetTableColumnId(WMTableColumn *column, void *id)
|
||||
void
|
||||
WMSetTableColumnId(WMTableColumn *column, void *id)
|
||||
{
|
||||
column->id = id;
|
||||
}
|
||||
|
||||
|
||||
void *WMGetTableColumnId(WMTableColumn *column)
|
||||
void*
|
||||
WMGetTableColumnId(WMTableColumn *column)
|
||||
{
|
||||
return column->id;
|
||||
}
|
||||
|
||||
|
||||
void WMSetTableColumnWidth(WMTableColumn *column, unsigned width)
|
||||
void
|
||||
WMSetTableColumnWidth(WMTableColumn *column, unsigned width)
|
||||
{
|
||||
if (column->maxWidth == 0)
|
||||
column->width = WMAX(column->minWidth, width);
|
||||
@@ -81,15 +85,16 @@ void WMSetTableColumnWidth(WMTableColumn *column, unsigned width)
|
||||
}
|
||||
|
||||
|
||||
void WMSetTableColumnDelegate(WMTableColumn *column,
|
||||
WMTableColumnDelegate *delegate)
|
||||
void
|
||||
WMSetTableColumnDelegate(WMTableColumn *column, WMTableColumnDelegate *delegate)
|
||||
{
|
||||
column->delegate = delegate;
|
||||
}
|
||||
|
||||
|
||||
void WMSetTableColumnConstraints(WMTableColumn *column,
|
||||
unsigned minWidth, unsigned maxWidth)
|
||||
void
|
||||
WMSetTableColumnConstraints(WMTableColumn *column, unsigned minWidth,
|
||||
unsigned maxWidth)
|
||||
{
|
||||
wassertr(maxWidth == 0 || minWidth <= maxWidth);
|
||||
|
||||
@@ -103,13 +108,15 @@ void WMSetTableColumnConstraints(WMTableColumn *column,
|
||||
}
|
||||
|
||||
|
||||
void WMSetTableColumnEditable(WMTableColumn *column, Bool flag)
|
||||
void
|
||||
WMSetTableColumnEditable(WMTableColumn *column, Bool flag)
|
||||
{
|
||||
column->editable = ((flag==0) ? 0 : 1);
|
||||
}
|
||||
|
||||
|
||||
WMTableView *WMGetTableColumnTableView(WMTableColumn *column)
|
||||
WMTableView*
|
||||
WMGetTableColumnTableView(WMTableColumn *column)
|
||||
{
|
||||
return column->table;
|
||||
}
|
||||
@@ -192,7 +199,8 @@ static void handleEvents(XEvent *event, void *data);
|
||||
static void handleTableEvents(XEvent *event, void *data);
|
||||
static void repaintTable(WMTableView *table);
|
||||
|
||||
static WMSize getTotalSize(WMTableView *table)
|
||||
static WMSize
|
||||
getTotalSize(WMTableView *table)
|
||||
{
|
||||
WMSize size;
|
||||
int i;
|
||||
@@ -214,7 +222,8 @@ static WMSize getTotalSize(WMTableView *table)
|
||||
}
|
||||
|
||||
|
||||
static WMRect getVisibleRect(WMTableView *table)
|
||||
static WMRect
|
||||
getVisibleRect(WMTableView *table)
|
||||
{
|
||||
WMSize size = getTotalSize(table);
|
||||
WMRect rect;
|
||||
@@ -239,7 +248,8 @@ static WMRect getVisibleRect(WMTableView *table)
|
||||
}
|
||||
|
||||
|
||||
static void scrollToPoint(WMTableView *table, int x, int y)
|
||||
static void
|
||||
scrollToPoint(WMTableView *table, int x, int y)
|
||||
{
|
||||
WMSize size = getTotalSize(table);
|
||||
int i;
|
||||
@@ -285,7 +295,8 @@ static void scrollToPoint(WMTableView *table, int x, int y)
|
||||
}
|
||||
|
||||
|
||||
static void adjustScrollers(WMTableView *table)
|
||||
static void
|
||||
adjustScrollers(WMTableView *table)
|
||||
{
|
||||
WMSize size = getTotalSize(table);
|
||||
WMSize vsize = WMGetViewSize(table->tableView);
|
||||
@@ -326,7 +337,8 @@ static void adjustScrollers(WMTableView *table)
|
||||
}
|
||||
|
||||
|
||||
static void doScroll(WMWidget *self, void *data)
|
||||
static void
|
||||
doScroll(WMWidget *self, void *data)
|
||||
{
|
||||
WMTableView *table = (WMTableView*)data;
|
||||
float value;
|
||||
@@ -485,13 +497,15 @@ splitterHandler(XEvent *event, void *data)
|
||||
}
|
||||
|
||||
|
||||
static void realizeTable(void *data, WMNotification *notif)
|
||||
static void
|
||||
realizeTable(void *data, WMNotification *notif)
|
||||
{
|
||||
repaintTable(data);
|
||||
}
|
||||
|
||||
|
||||
WMTableView *WMCreateTableView(WMWidget *parent)
|
||||
WMTableView*
|
||||
WMCreateTableView(WMWidget *parent)
|
||||
{
|
||||
WMTableView *table = wmalloc(sizeof(WMTableView));
|
||||
WMScreen *scr = WMWidgetScreen(parent);
|
||||
@@ -605,7 +619,8 @@ WMTableView *WMCreateTableView(WMWidget *parent)
|
||||
}
|
||||
|
||||
|
||||
void WMAddTableViewColumn(WMTableView *table, WMTableColumn *column)
|
||||
void
|
||||
WMAddTableViewColumn(WMTableView *table, WMTableColumn *column)
|
||||
{
|
||||
WMScreen *scr = WMWidgetScreen(table);
|
||||
|
||||
@@ -649,7 +664,8 @@ void WMAddTableViewColumn(WMTableView *table, WMTableColumn *column)
|
||||
}
|
||||
|
||||
|
||||
void WMSetTableViewHeaderHeight(WMTableView *table, unsigned height)
|
||||
void
|
||||
WMSetTableViewHeaderHeight(WMTableView *table, unsigned height)
|
||||
{
|
||||
table->headerHeight = height;
|
||||
|
||||
@@ -657,13 +673,15 @@ void WMSetTableViewHeaderHeight(WMTableView *table, unsigned height)
|
||||
}
|
||||
|
||||
|
||||
void WMSetTableViewDelegate(WMTableView *table, WMTableViewDelegate *delegate)
|
||||
void
|
||||
WMSetTableViewDelegate(WMTableView *table, WMTableViewDelegate *delegate)
|
||||
{
|
||||
table->delegate = delegate;
|
||||
}
|
||||
|
||||
|
||||
void WMSetTableViewAction(WMTableView *table, WMAction *action, void *clientData)
|
||||
void
|
||||
WMSetTableViewAction(WMTableView *table, WMAction *action, void *clientData)
|
||||
{
|
||||
table->action = action;
|
||||
|
||||
@@ -671,46 +689,51 @@ void WMSetTableViewAction(WMTableView *table, WMAction *action, void *clientData
|
||||
}
|
||||
|
||||
|
||||
void *WMGetTableViewClickedColumn(WMTableView *table)
|
||||
void*
|
||||
WMGetTableViewClickedColumn(WMTableView *table)
|
||||
{
|
||||
return table->clickedColumn;
|
||||
}
|
||||
|
||||
|
||||
int WMGetTableViewClickedRow(WMTableView *table)
|
||||
int
|
||||
WMGetTableViewClickedRow(WMTableView *table)
|
||||
{
|
||||
return table->clickedRow;
|
||||
}
|
||||
|
||||
|
||||
WMArray *WMGetTableViewSelectedRows(WMTableView *table)
|
||||
WMArray*
|
||||
WMGetTableViewSelectedRows(WMTableView *table)
|
||||
{
|
||||
return table->selectedRows;
|
||||
}
|
||||
|
||||
|
||||
WMView *WMGetTableViewDocumentView(WMTableView *table)
|
||||
WMView*
|
||||
WMGetTableViewDocumentView(WMTableView *table)
|
||||
{
|
||||
return table->tableView;
|
||||
}
|
||||
|
||||
|
||||
void *WMTableViewDataForCell(WMTableView *table, WMTableColumn *column,
|
||||
int row)
|
||||
void*
|
||||
WMTableViewDataForCell(WMTableView *table, WMTableColumn *column, int row)
|
||||
{
|
||||
return (*table->delegate->valueForCell)(table->delegate, column, row);
|
||||
}
|
||||
|
||||
|
||||
void WMSetTableViewDataForCell(WMTableView *table, WMTableColumn *column,
|
||||
int row, void *data)
|
||||
void
|
||||
WMSetTableViewDataForCell(WMTableView *table, WMTableColumn *column, int row,
|
||||
void *data)
|
||||
{
|
||||
(*table->delegate->setValueForCell)(table->delegate, column, row, data);
|
||||
}
|
||||
|
||||
|
||||
WMRect WMTableViewRectForCell(WMTableView *table, WMTableColumn *column,
|
||||
int row)
|
||||
WMRect
|
||||
WMTableViewRectForCell(WMTableView *table, WMTableColumn *column, int row)
|
||||
{
|
||||
WMRect rect;
|
||||
int i;
|
||||
@@ -742,20 +765,23 @@ WMRect WMTableViewRectForCell(WMTableView *table, WMTableColumn *column,
|
||||
}
|
||||
|
||||
|
||||
void WMSetTableViewDataSource(WMTableView *table, void *source)
|
||||
void
|
||||
WMSetTableViewDataSource(WMTableView *table, void *source)
|
||||
{
|
||||
table->dataSource = source;
|
||||
}
|
||||
|
||||
|
||||
void *WMGetTableViewDataSource(WMTableView *table)
|
||||
void*
|
||||
WMGetTableViewDataSource(WMTableView *table)
|
||||
{
|
||||
return table->dataSource;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void WMSetTableViewHasHorizontalScroller(WMTableView *tPtr, Bool flag)
|
||||
void
|
||||
WMSetTableViewHasHorizontalScroller(WMTableView *tPtr, Bool flag)
|
||||
{
|
||||
if (flag) {
|
||||
if (tPtr->hasHScroller)
|
||||
@@ -790,7 +816,8 @@ void WMSetTableViewHasHorizontalScroller(WMTableView *tPtr, Bool flag)
|
||||
|
||||
#if 0
|
||||
/* not supported by now */
|
||||
void WMSetTableViewHasVerticalScroller(WMTableView *tPtr, Bool flag)
|
||||
void
|
||||
WMSetTableViewHasVerticalScroller(WMTableView *tPtr, Bool flag)
|
||||
{
|
||||
if (flag) {
|
||||
if (tPtr->hasVScroller)
|
||||
@@ -824,7 +851,8 @@ void WMSetTableViewHasVerticalScroller(WMTableView *tPtr, Bool flag)
|
||||
}
|
||||
#endif
|
||||
|
||||
void WMSetTableViewBackgroundColor(WMTableView *table, WMColor *color)
|
||||
void
|
||||
WMSetTableViewBackgroundColor(WMTableView *table, WMColor *color)
|
||||
{
|
||||
W_SetViewBackgroundColor(table->tableView, color);
|
||||
|
||||
@@ -837,7 +865,8 @@ void WMSetTableViewBackgroundColor(WMTableView *table, WMColor *color)
|
||||
}
|
||||
|
||||
|
||||
void WMSetTableViewGridColor(WMTableView *table, WMColor *color)
|
||||
void
|
||||
WMSetTableViewGridColor(WMTableView *table, WMColor *color)
|
||||
{
|
||||
WMReleaseColor(table->gridColor);
|
||||
table->gridColor = WMRetainColor(color);
|
||||
@@ -848,7 +877,8 @@ void WMSetTableViewGridColor(WMTableView *table, WMColor *color)
|
||||
|
||||
|
||||
|
||||
void WMSetTableViewRowHeight(WMTableView *table, int height)
|
||||
void
|
||||
WMSetTableViewRowHeight(WMTableView *table, int height)
|
||||
{
|
||||
table->rowHeight = height;
|
||||
|
||||
@@ -856,7 +886,8 @@ void WMSetTableViewRowHeight(WMTableView *table, int height)
|
||||
}
|
||||
|
||||
|
||||
void WMScrollTableViewRowToVisible(WMTableView *table, int row)
|
||||
void
|
||||
WMScrollTableViewRowToVisible(WMTableView *table, int row)
|
||||
{
|
||||
WMScroller *scroller;
|
||||
WMRange range;
|
||||
@@ -883,7 +914,8 @@ void WMScrollTableViewRowToVisible(WMTableView *table, int row)
|
||||
|
||||
|
||||
|
||||
static void drawGrid(WMTableView *table, WMRect rect)
|
||||
static void
|
||||
drawGrid(WMTableView *table, WMRect rect)
|
||||
{
|
||||
WMScreen *scr = WMWidgetScreen(table);
|
||||
Display *dpy = WMScreenDisplay(scr);
|
||||
@@ -934,7 +966,8 @@ static void drawGrid(WMTableView *table, WMRect rect)
|
||||
}
|
||||
|
||||
|
||||
static WMRange columnsInRect(WMTableView *table, WMRect rect)
|
||||
static WMRange
|
||||
columnsInRect(WMTableView *table, WMRect rect)
|
||||
{
|
||||
WMTableColumn *column;
|
||||
int pos;
|
||||
@@ -965,7 +998,8 @@ static WMRange columnsInRect(WMTableView *table, WMRect rect)
|
||||
}
|
||||
|
||||
|
||||
static WMRange rowsInRect(WMTableView *table, WMRect rect)
|
||||
static WMRange
|
||||
rowsInRect(WMTableView *table, WMRect rect)
|
||||
{
|
||||
WMRange range;
|
||||
int rh = table->rowHeight;
|
||||
@@ -980,7 +1014,8 @@ static WMRange rowsInRect(WMTableView *table, WMRect rect)
|
||||
}
|
||||
|
||||
|
||||
static void drawRow(WMTableView *table, int row, WMRect clipRect)
|
||||
static void
|
||||
drawRow(WMTableView *table, int row, WMRect clipRect)
|
||||
{
|
||||
int i;
|
||||
WMRange cols = columnsInRect(table, clipRect);
|
||||
@@ -1002,7 +1037,8 @@ static void drawRow(WMTableView *table, int row, WMRect clipRect)
|
||||
|
||||
|
||||
#if 0
|
||||
static void drawFullRow(WMTableView *table, int row)
|
||||
static void
|
||||
drawFullRow(WMTableView *table, int row)
|
||||
{
|
||||
int i;
|
||||
WMTableColumn *column;
|
||||
@@ -1023,7 +1059,8 @@ static void drawFullRow(WMTableView *table, int row)
|
||||
#endif
|
||||
|
||||
|
||||
static void setRowSelected(WMTableView *table, unsigned row, Bool flag)
|
||||
static void
|
||||
setRowSelected(WMTableView *table, unsigned row, Bool flag)
|
||||
{
|
||||
int repaint = 0;
|
||||
|
||||
@@ -1045,7 +1082,8 @@ static void setRowSelected(WMTableView *table, unsigned row, Bool flag)
|
||||
}
|
||||
|
||||
|
||||
static void repaintTable(WMTableView *table)
|
||||
static void
|
||||
repaintTable(WMTableView *table)
|
||||
{
|
||||
WMRect rect;
|
||||
WMRange rows;
|
||||
@@ -1089,7 +1127,8 @@ static void repaintTable(WMTableView *table)
|
||||
}
|
||||
|
||||
|
||||
static void stopRowEdit(WMTableView *table, int row)
|
||||
static void
|
||||
stopRowEdit(WMTableView *table, int row)
|
||||
{
|
||||
int i;
|
||||
WMTableColumn *column;
|
||||
@@ -1105,7 +1144,8 @@ static void stopRowEdit(WMTableView *table, int row)
|
||||
|
||||
|
||||
|
||||
void WMEditTableViewRow(WMTableView *table, int row)
|
||||
void
|
||||
WMEditTableViewRow(WMTableView *table, int row)
|
||||
{
|
||||
int i;
|
||||
WMTableColumn *column;
|
||||
@@ -1128,7 +1168,8 @@ void WMEditTableViewRow(WMTableView *table, int row)
|
||||
}
|
||||
|
||||
|
||||
void WMSelectTableViewRow(WMTableView *table, int row)
|
||||
void
|
||||
WMSelectTableViewRow(WMTableView *table, int row)
|
||||
{
|
||||
if (table->clickedRow >= 0)
|
||||
setRowSelected(table, table->clickedRow, False);
|
||||
@@ -1147,7 +1188,8 @@ void WMSelectTableViewRow(WMTableView *table, int row)
|
||||
}
|
||||
|
||||
|
||||
void WMReloadTableView(WMTableView *table)
|
||||
void
|
||||
WMReloadTableView(WMTableView *table)
|
||||
{
|
||||
if (table->editingRow >= 0)
|
||||
stopRowEdit(table, table->editingRow);
|
||||
@@ -1180,13 +1222,15 @@ void WMReloadTableView(WMTableView *table)
|
||||
}
|
||||
|
||||
|
||||
void WMNoteTableViewNumberOfRowsChanged(WMTableView *table)
|
||||
void
|
||||
WMNoteTableViewNumberOfRowsChanged(WMTableView *table)
|
||||
{
|
||||
WMReloadTableView(table);
|
||||
}
|
||||
|
||||
|
||||
static void handleTableEvents(XEvent *event, void *data)
|
||||
static void
|
||||
handleTableEvents(XEvent *event, void *data)
|
||||
{
|
||||
WMTableView *table = (WMTableView*)data;
|
||||
int row;
|
||||
@@ -1234,7 +1278,8 @@ static void handleTableEvents(XEvent *event, void *data)
|
||||
}
|
||||
|
||||
|
||||
static void handleEvents(XEvent *event, void *data)
|
||||
static void
|
||||
handleEvents(XEvent *event, void *data)
|
||||
{
|
||||
WMTableView *table = (WMTableView*)data;
|
||||
WMScreen *scr = WMWidgetScreen(table);
|
||||
@@ -1249,13 +1294,15 @@ static void handleEvents(XEvent *event, void *data)
|
||||
}
|
||||
|
||||
|
||||
static void handleResize(W_ViewDelegate *self, WMView *view)
|
||||
static void
|
||||
handleResize(W_ViewDelegate *self, WMView *view)
|
||||
{
|
||||
reorganizeInterior(view->self);
|
||||
}
|
||||
|
||||
|
||||
static void reorganizeInterior(WMTableView *table)
|
||||
static void
|
||||
reorganizeInterior(WMTableView *table)
|
||||
{
|
||||
int width;
|
||||
int height;
|
||||
@@ -1309,7 +1356,8 @@ static void reorganizeInterior(WMTableView *table)
|
||||
}
|
||||
|
||||
|
||||
static void rearrangeHeader(WMTableView *table)
|
||||
static void
|
||||
rearrangeHeader(WMTableView *table)
|
||||
{
|
||||
int width;
|
||||
int count;
|
||||
@@ -1338,3 +1386,4 @@ static void rearrangeHeader(WMTableView *table)
|
||||
|
||||
handleResize(table->view->delegate, table->view);
|
||||
}
|
||||
|
||||
|
||||
@@ -49,3 +49,4 @@ int main(int argc, char **argv)
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -123,3 +123,4 @@ int main(int argc, char **argv)
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,8 @@ wAbort()
|
||||
|
||||
char *ProgName;
|
||||
|
||||
void usage(void)
|
||||
void
|
||||
usage(void)
|
||||
{
|
||||
fprintf(stderr,
|
||||
"usage:\n"
|
||||
@@ -44,7 +45,8 @@ void usage(void)
|
||||
exit(0);
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
Display *dpy = XOpenDisplay("");
|
||||
WMScreen *scr;
|
||||
@@ -98,3 +100,4 @@ int main(int argc, char **argv)
|
||||
printf("\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -1071,3 +1071,4 @@ main(int argc, char **argv)
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -464,6 +464,7 @@ typedef void WMAction2(void *self, void *clientData);
|
||||
typedef void WMListDrawProc(WMList *lPtr, int index, Drawable d, char *text,
|
||||
int state, WMRect *rect);
|
||||
|
||||
|
||||
/*
|
||||
typedef void WMSplitViewResizeSubviewsProc(WMSplitView *sPtr,
|
||||
unsigned int oldWidth,
|
||||
|
||||
@@ -649,3 +649,4 @@ void W_FreeViewXdndPart(WMView *view);
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* _WINGSP_H_ */
|
||||
|
||||
|
||||
+4
-2
@@ -65,11 +65,13 @@
|
||||
#endif
|
||||
|
||||
/* Stuff for setting the sockets into non-blocking mode. */
|
||||
/*#ifdef __POSIX_SOURCE
|
||||
/*
|
||||
#ifdef __POSIX_SOURCE
|
||||
# define NONBLOCK_OPT O_NONBLOCK
|
||||
#else
|
||||
# define NONBLOCK_OPT FNDELAY
|
||||
#endif*/
|
||||
#endif
|
||||
*/
|
||||
|
||||
#define NONBLOCK_OPT O_NONBLOCK
|
||||
|
||||
|
||||
@@ -272,3 +272,4 @@ W_FreeViewXdndPart(WMView *view)
|
||||
if (view->dragImage)
|
||||
WMReleasePixmap(view->dragImage);
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -60,7 +60,8 @@ static WMArray *inputHandler=NULL;
|
||||
|
||||
|
||||
static void
|
||||
rightNow(struct timeval *tv) {
|
||||
rightNow(struct timeval *tv)
|
||||
{
|
||||
X_GETTIMEOFDAY(tv);
|
||||
}
|
||||
|
||||
|
||||
@@ -935,3 +935,4 @@ int main (void)
|
||||
return 0;
|
||||
}
|
||||
#endif /* SNPRINTF_TEST */
|
||||
|
||||
|
||||
@@ -531,3 +531,4 @@ destroyBalloon(Balloon *bPtr)
|
||||
|
||||
wfree(bPtr);
|
||||
}
|
||||
|
||||
|
||||
@@ -1261,3 +1261,4 @@ createTruncatedString(WMFont *font, char *text, int *textLen, int width)
|
||||
}
|
||||
return textBuf;
|
||||
}
|
||||
|
||||
|
||||
@@ -3784,3 +3784,4 @@ getShift(unsigned char value)
|
||||
#undef SHAPE_WAS_DEFINED
|
||||
#define SHAPE
|
||||
#endif
|
||||
|
||||
|
||||
+1
-1
@@ -273,7 +273,7 @@ WMCreateFontWithFlags(WMScreen *scrPtr, char *fontName, WMFontFlags flags)
|
||||
multiByte = False;
|
||||
}
|
||||
|
||||
} else if (multiByte) {
|
||||
if (multiByte) {
|
||||
font = WMCreateFontSet(scrPtr, fontName);
|
||||
} else {
|
||||
font = WMCreateNormalFont(scrPtr, fontName);
|
||||
|
||||
@@ -275,3 +275,4 @@ destroyFrame(Frame *fPtr)
|
||||
|
||||
wfree(fPtr);
|
||||
}
|
||||
|
||||
|
||||
@@ -255,3 +255,5 @@ destroyLabel(Label *lPtr)
|
||||
|
||||
wfree(lPtr);
|
||||
}
|
||||
|
||||
|
||||
|
||||
+2
-2
@@ -271,7 +271,7 @@ WMGetMenuItemMixedStatePixmap(WMMenuItem *item)
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
#if 0
|
||||
void
|
||||
WMSetMenuItemSubmenu(WMMenuItem *item, WMMenu *submenu)
|
||||
{
|
||||
@@ -292,5 +292,5 @@ WMGetMenuItemHasSubmenu(WMMenuItem *item)
|
||||
{
|
||||
return item->submenu != NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
*/
|
||||
|
||||
@@ -264,3 +264,4 @@ WMDrawPixmap(WMPixmap *pixmap, Drawable d, int x, int y)
|
||||
XCopyArea(scr->display, pixmap->pixmap, d, scr->clipGC, 0, 0,
|
||||
pixmap->width, pixmap->height, x, y);
|
||||
}
|
||||
|
||||
|
||||
@@ -796,3 +796,5 @@ destroyPopUpButton(PopUpButton *bPtr)
|
||||
|
||||
wfree(bPtr);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -598,3 +598,4 @@ WMGetGrabbedRulerMargin(WMRuler * rPtr)
|
||||
return 0;
|
||||
return rPtr->flags.whichMarker;
|
||||
}
|
||||
|
||||
|
||||
@@ -869,3 +869,4 @@ WMSetSplitViewResizeSubviewsProc(WMSplitView *sPtr,
|
||||
sPtr->resizeSubviewsProc = proc;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1042,3 +1042,4 @@ WMDestroyTabViewItem(WMTabViewItem *item)
|
||||
|
||||
wfree(item);
|
||||
}
|
||||
|
||||
|
||||
+4
-2
@@ -215,8 +215,10 @@ static unsigned char STIPPLE_BITS[] = {
|
||||
|
||||
static char *default_bullet[] = {
|
||||
"6 6 4 1",
|
||||
" c None s None", ". c black",
|
||||
"X c white", "o c #808080",
|
||||
" c None s None",
|
||||
". c black",
|
||||
"X c white",
|
||||
"o c #808080",
|
||||
" ... ",
|
||||
".XX.. ",
|
||||
".XX..o",
|
||||
|
||||
@@ -168,7 +168,6 @@ createImages(WMScreen *scr, RContext *rc, RImage *xis, char *file,
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void
|
||||
createPanel(Panel *p)
|
||||
{
|
||||
@@ -533,3 +532,5 @@ InitConfigurations(WMScreen *scr, WMWidget *parent)
|
||||
|
||||
return panel;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -134,3 +134,4 @@ InitExpert(WMScreen *scr, WMWidget *parent)
|
||||
|
||||
return panel;
|
||||
}
|
||||
|
||||
|
||||
@@ -374,3 +374,4 @@ InitFocus(WMScreen *scr, WMWindow *win)
|
||||
|
||||
return panel;
|
||||
}
|
||||
|
||||
|
||||
@@ -356,3 +356,4 @@ InitIcons(WMScreen *scr, WMWidget *parent)
|
||||
|
||||
return panel;
|
||||
}
|
||||
|
||||
|
||||
@@ -182,3 +182,4 @@ InitKeyboardSettings(WMScreen *scr, WMWidget *parent)
|
||||
|
||||
return panel;
|
||||
}
|
||||
|
||||
|
||||
@@ -134,10 +134,7 @@ static char *keyOptions[] = {
|
||||
/* from Xlib */
|
||||
|
||||
static void
|
||||
XConvertCase(sym, lower, upper)
|
||||
register KeySym sym;
|
||||
KeySym *lower;
|
||||
KeySym *upper;
|
||||
XConvertCase(register KeySym sym, KeySym *lower, KeySym *upper)
|
||||
{
|
||||
*lower = sym;
|
||||
*upper = sym;
|
||||
@@ -654,3 +651,4 @@ InitKeyboardShortcuts(WMScreen *scr, WMWidget *parent)
|
||||
|
||||
return panel;
|
||||
}
|
||||
|
||||
|
||||
@@ -240,3 +240,4 @@ InitMenuPreferences(WMScreen *scr, WMWidget *parent)
|
||||
|
||||
return panel;
|
||||
}
|
||||
|
||||
|
||||
@@ -860,3 +860,4 @@ InitMouseSettings(WMScreen *scr, WMWidget *parent)
|
||||
|
||||
return panel;
|
||||
}
|
||||
|
||||
|
||||
@@ -348,3 +348,4 @@ InitPaths(WMScreen *scr, WMWidget *parent)
|
||||
|
||||
return panel;
|
||||
}
|
||||
|
||||
|
||||
@@ -359,3 +359,4 @@ InitPreferences(WMScreen *scr, WMWidget *parent)
|
||||
|
||||
return panel;
|
||||
}
|
||||
|
||||
|
||||
@@ -1619,17 +1619,21 @@ testOKButton(WMWidget *self, void *data)
|
||||
|
||||
}
|
||||
|
||||
void testCancelButton(WMWidget *self, void *data){
|
||||
void
|
||||
testCancelButton(WMWidget *self, void *data)
|
||||
{
|
||||
wwarning("Exiting test....");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
void wAbort()
|
||||
void
|
||||
wAbort()
|
||||
{
|
||||
exit(1);
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
TexturePanel *panel;
|
||||
|
||||
@@ -1661,3 +1665,4 @@ int main(int argc, char **argv)
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -258,3 +258,4 @@ InitThemes(WMScreen *scr, WMWidget *parent)
|
||||
|
||||
return panel;
|
||||
}
|
||||
|
||||
|
||||
@@ -460,3 +460,4 @@ InitWindowHandling(WMScreen *scr, WMWidget *parent)
|
||||
|
||||
return panel;
|
||||
}
|
||||
|
||||
|
||||
@@ -375,3 +375,4 @@ InitWorkspace(WMScreen *scr, WMWidget *parent)
|
||||
|
||||
return panel;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,3 +3,4 @@ typedef struct W_DoubleTest DoubleTest;
|
||||
|
||||
|
||||
DoubleTest *CreateDoubleTest(WMWidget *parent, char *text);
|
||||
|
||||
|
||||
@@ -185,3 +185,4 @@ main(int argc, char **argv)
|
||||
WMHandleEvent(&event);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -267,3 +267,5 @@ ModifierFromKey(Display *dpy, char *key)
|
||||
else
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -110,3 +110,4 @@ typedef struct {
|
||||
#define WMFHideApplication 12
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -514,3 +514,4 @@ extern const char *WMNWorkspaceNameChanged;
|
||||
|
||||
extern const char *WMNResetStacking;
|
||||
#endif
|
||||
|
||||
|
||||
@@ -70,3 +70,4 @@ void wUnfullscreenWindow(WWindow *wwin);
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -98,3 +98,4 @@ Bool wAppIconChangeImage(WAppIcon *icon, char *file);
|
||||
void wAppIconMove(WAppIcon *aicon, int x, int y);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -71,3 +71,4 @@ void wApplicationExtractDirPackIcon(WScreen *scr,char *path, char *wm_instance,
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -136,3 +136,4 @@ wColormapAllowClientInstallation(WScreen *scr, Bool starting)
|
||||
XSync(dpy, False);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -318,8 +318,8 @@ StartWindozeCycle(WWindow *wwin, XEvent *event, Bool next)
|
||||
/*
|
||||
* place window in center of current head
|
||||
*/
|
||||
WMPoint center = wGetPointToCenterRectInHead(scr,
|
||||
wGetHeadForPointerLocation(scr),
|
||||
WMPoint center =
|
||||
wGetPointToCenterRectInHead(scr, wGetHeadForPointerLocation(scr),
|
||||
0, 0);
|
||||
OpenSwitchMenu(scr, center.x, center.y, False);
|
||||
}
|
||||
|
||||
+4
-3
@@ -67,10 +67,10 @@
|
||||
extern WPreferences wPreferences;
|
||||
|
||||
|
||||
static WMPoint getCenter(WScreen *scr, int width, int height)
|
||||
static WMPoint
|
||||
getCenter(WScreen *scr, int width, int height)
|
||||
{
|
||||
return wGetPointToCenterRectInHead(scr,
|
||||
wGetHeadForPointerLocation(scr),
|
||||
return wGetPointToCenterRectInHead(scr, wGetHeadForPointerLocation(scr),
|
||||
width, height);
|
||||
}
|
||||
|
||||
@@ -2012,3 +2012,4 @@ wShowGNUstepPanel(WScreen *scr)
|
||||
|
||||
gnustepPanel = panel;
|
||||
}
|
||||
|
||||
|
||||
@@ -516,3 +516,4 @@ DestroyDockAppSettingsPanel(AppSettingsPanel *panel)
|
||||
|
||||
wfree(panel);
|
||||
}
|
||||
|
||||
|
||||
+8
-3
@@ -118,8 +118,10 @@ extern char WDelayedActionSet;
|
||||
|
||||
static void saveTimestamp(XEvent *event);
|
||||
static void handleColormapNotify();
|
||||
static void handleMapNotify(), handleUnmapNotify();
|
||||
static void handleButtonPress(), handleExpose();
|
||||
static void handleMapNotify();
|
||||
static void handleUnmapNotify();
|
||||
static void handleButtonPress();
|
||||
static void handleExpose();
|
||||
static void handleDestroyNotify();
|
||||
static void handleConfigureRequest();
|
||||
static void handleMapRequest();
|
||||
@@ -1790,7 +1792,8 @@ handleMotionNotify(XEvent *event)
|
||||
wMenuScroll(menu, event);
|
||||
}
|
||||
}
|
||||
#if 0
|
||||
|
||||
#if 0 // what is with this? -Dan
|
||||
if (event->xmotion.subwindow == None)
|
||||
return;
|
||||
|
||||
@@ -1851,3 +1854,5 @@ handleVisibilityNotify(XEvent *event)
|
||||
wwin->flags.obscured =
|
||||
(event->xvisibility.state == VisibilityFullyObscured);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -728,3 +728,4 @@ wsobserver(void *self, WMNotification *notif)
|
||||
|
||||
|
||||
#endif /* GNOME_STUFF */
|
||||
|
||||
|
||||
+1
-2
@@ -564,8 +564,7 @@ wIconStore(WIcon *icon)
|
||||
|
||||
|
||||
/*
|
||||
void
|
||||
wIconChangeIconWindow(WIcon *icon, Window new_window);
|
||||
void wIconChangeIconWindow(WIcon *icon, Window new_window);
|
||||
*/
|
||||
|
||||
static void
|
||||
|
||||
@@ -1846,9 +1846,8 @@ wKWMSelectRootRegion(WScreen *scr, int x, int y, int w, int h, Bool control)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
static void observer(void *self, WMNotification *notif)
|
||||
static void
|
||||
observer(void *self, WMNotification *notif)
|
||||
{
|
||||
WScreen *scr = (WScreen*)self;
|
||||
WWindow *wwin = (WWindow*)WMGetNotificationObject(notif);
|
||||
@@ -1924,7 +1923,8 @@ static void observer(void *self, WMNotification *notif)
|
||||
}
|
||||
|
||||
|
||||
static void wsobserver(void *self, WMNotification *notif)
|
||||
static void
|
||||
wsobserver(void *self, WMNotification *notif)
|
||||
{
|
||||
WScreen *scr = (WScreen*)WMGetNotificationObject(notif);
|
||||
const char *name = WMGetNotificationName(notif);
|
||||
@@ -1952,3 +1952,4 @@ static void wsobserver(void *self, WMNotification *notif)
|
||||
|
||||
|
||||
#endif /* KWM_HINTS */
|
||||
|
||||
|
||||
@@ -812,3 +812,4 @@ main(int argc, char **argv)
|
||||
EventLoop();
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
+31
-32
@@ -148,7 +148,8 @@ static char linebuf[LINESIZE];
|
||||
/* ---------- proplist ---------- */
|
||||
|
||||
|
||||
static WRootMenuData *pl_openMenuFile(WMPropList *pl)
|
||||
static WRootMenuData*
|
||||
pl_openMenuFile(WMPropList *pl)
|
||||
{
|
||||
PLRootMenuData *data = wmalloc(sizeof(PLRootMenuData));
|
||||
|
||||
@@ -165,21 +166,21 @@ static WRootMenuData *pl_openMenuFile(WMPropList *pl)
|
||||
}
|
||||
|
||||
|
||||
static Bool pl_hasMoreData(WRootMenuData *data)
|
||||
static Bool
|
||||
pl_hasMoreData(WRootMenuData *data)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
static Bool pl_nextCommand(WRootMenuData *data,
|
||||
char **title,
|
||||
char **command,
|
||||
char **parameter,
|
||||
char **shortcut)
|
||||
static Bool
|
||||
pl_nextCommand(WRootMenuData *data, char **title, char **command,
|
||||
char **parameter, char **shortcut)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
static void pl_closeMenuFile(WRootMenuData *data)
|
||||
static void
|
||||
pl_closeMenuFile(WRootMenuData *data)
|
||||
{
|
||||
if (data->submenu)
|
||||
wfree(data->submenu);
|
||||
@@ -195,7 +196,8 @@ static void pl_closeMenuFile(WRootMenuData *data)
|
||||
/* ---------- text ---------- */
|
||||
|
||||
|
||||
static WRootMenuData *text_openMenuFile(char *path)
|
||||
static WRootMenuData*
|
||||
text_openMenuFile(char *path)
|
||||
{
|
||||
TextMenuReaderData *data;
|
||||
|
||||
@@ -210,21 +212,21 @@ static WRootMenuData *text_openMenuFile(char *path)
|
||||
}
|
||||
|
||||
|
||||
static Bool text_hasMoreData(WRootMenuData *data)
|
||||
static Bool
|
||||
text_hasMoreData(WRootMenuData *data)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
static Bool text_nextCommand(WRootMenuData *data,
|
||||
char **title,
|
||||
char **command,
|
||||
char **parameter,
|
||||
char **shortcut)
|
||||
static Bool
|
||||
text_nextCommand(WRootMenuData *data, char **title, char **command,
|
||||
char **parameter, char **shortcut)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
static void text_closeMenuFile(WRootMenuData *data)
|
||||
static void
|
||||
text_closeMenuFile(WRootMenuData *data)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -232,7 +234,8 @@ static void text_closeMenuFile(WRootMenuData *data)
|
||||
/* ---------- directory ---------- */
|
||||
|
||||
|
||||
static WRootMenuData *dir_openMenuFile(char *paths, time_t *timestamp)
|
||||
static WRootMenuData*
|
||||
dir_openMenuFile(char *paths, time_t *timestamp)
|
||||
{
|
||||
DirMenuReaderData *data;
|
||||
char **dirs;
|
||||
@@ -292,27 +295,25 @@ static WRootMenuData *dir_openMenuFile(char *paths, time_t *timestamp)
|
||||
}
|
||||
|
||||
|
||||
static Bool dir_hasMoreData(WRootMenuData *data)
|
||||
static Bool
|
||||
dir_hasMoreData(WRootMenuData *data)
|
||||
{
|
||||
}
|
||||
|
||||
static Bool dir_nextCommand(WRootMenuData *data,
|
||||
char **title,
|
||||
char **command,
|
||||
char **parameter,
|
||||
char **shortcut)
|
||||
static Bool
|
||||
dir_nextCommand(WRootMenuData *data, char **title, char **command,
|
||||
char **parameter, char **shortcut)
|
||||
{
|
||||
}
|
||||
|
||||
static void dir_closeMenuFile(WRootMenuData *data)
|
||||
static void
|
||||
dir_closeMenuFile(WRootMenuData *data)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
WRootMenuData *OpenMenu(char *path, time_t *menuTime)
|
||||
WRootMenuData*
|
||||
OpenMenu(char *path, time_t *menuTime)
|
||||
{
|
||||
proplist pl;
|
||||
struct stat stat_buf;
|
||||
@@ -366,10 +367,8 @@ WRootMenuData *OpenMenu(char *path, time_t *menuTime)
|
||||
}
|
||||
|
||||
|
||||
|
||||
WRootMenuData *ReopenRootMenu(time_t *checkTime,
|
||||
char **menuPath,
|
||||
time_t *menuTimestamp)
|
||||
WRootMenuData*
|
||||
ReopenRootMenu(time_t *checkTime, char **menuPath, time_t *menuTimestamp)
|
||||
{
|
||||
proplist pl;
|
||||
struct stat stat_buf;
|
||||
|
||||
@@ -261,3 +261,4 @@ wMWMCheckClientHints(WWindow *wwin)
|
||||
|
||||
|
||||
#endif /* MWM_HINTS */
|
||||
|
||||
|
||||
@@ -2432,3 +2432,4 @@ InteractivePlaceWindow(WWindow *wwin, int *x_ret, int *y_ret,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -269,3 +269,4 @@ wPixmapDestroy(WPixmap *pix)
|
||||
wfree(pix);
|
||||
}
|
||||
|
||||
|
||||
|
||||
+1
-2
@@ -56,8 +56,7 @@ extern WPreferences wPreferences;
|
||||
* interactive window placement is in moveres.c
|
||||
*/
|
||||
|
||||
extern void
|
||||
InteractivePlaceWindow(WWindow *wwin, int *x_ret, int *y_ret,
|
||||
extern void InteractivePlaceWindow(WWindow *wwin, int *x_ret, int *y_ret,
|
||||
unsigned width, unsigned height);
|
||||
|
||||
|
||||
|
||||
@@ -62,3 +62,4 @@ wFreeColor(WScreen *scr, unsigned long pixel)
|
||||
XFreeColors(dpy, scr->w_colormap, colors, 1, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1888,3 +1888,4 @@ OpenRootMenu(WScreen *scr, int x, int y, int keyboard)
|
||||
}
|
||||
|
||||
#endif /* !LITE */
|
||||
|
||||
|
||||
@@ -1376,3 +1376,4 @@ wSessionIsManaged(void)
|
||||
}
|
||||
|
||||
#endif /* !XSMP_ENABLED */
|
||||
|
||||
|
||||
+3
-1
@@ -44,7 +44,8 @@ extern XContext wStackContext;
|
||||
extern WPreferences wPreferences;
|
||||
|
||||
|
||||
static void notifyStackChange(WCoreWindow *frame, char *detail)
|
||||
static void
|
||||
notifyStackChange(WCoreWindow *frame, char *detail)
|
||||
{
|
||||
WWindow *wwin = wWindowFor(frame->window);
|
||||
|
||||
@@ -613,3 +614,4 @@ ChangeStackingLevel(WCoreWindow *frame, int new_level)
|
||||
wLowerFrame(frame);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1175,4 +1175,3 @@ manageAllWindows(WScreen *scr, int crashRecovery)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -454,3 +454,4 @@ wsobserver(void *self, WMNotification *notif)
|
||||
|
||||
|
||||
#endif /* !LITE */
|
||||
|
||||
|
||||
+26
-26
@@ -1,4 +1,4 @@
|
||||
/********************************************************************\
|
||||
/********************************************************************
|
||||
* text.c -- a basic text field *
|
||||
* Copyright (C) 1997 Robin D. Clark *
|
||||
* *
|
||||
@@ -20,7 +20,7 @@
|
||||
* Internet: rclark@cs.hmc.edu *
|
||||
* Address: 609 8th Street *
|
||||
* Huntington Beach, CA 92648-4632 *
|
||||
\********************************************************************/
|
||||
********************************************************************/
|
||||
|
||||
#include "wconfig.h"
|
||||
|
||||
@@ -55,9 +55,9 @@
|
||||
|
||||
extern Cursor wCursor[WCUR_LAST];
|
||||
|
||||
/********************************************************************\
|
||||
/********************************************************************
|
||||
* The event handler for the text-field: *
|
||||
\********************************************************************/
|
||||
********************************************************************/
|
||||
static void textEventHandler( WObjDescriptor *desc, XEvent *event );
|
||||
|
||||
static void handleExpose( WObjDescriptor *desc, XEvent *event );
|
||||
@@ -67,7 +67,7 @@ static void textInsert( WTextInput *wtext, char *txt );
|
||||
static void blink(void *data);
|
||||
#endif
|
||||
|
||||
/********************************************************************\
|
||||
/********************************************************************
|
||||
* handleKeyPress *
|
||||
* handle cursor keys, regular keys, etc. Inserts characters in *
|
||||
* text field, at cursor position, if it is a "Normal" key. If *
|
||||
@@ -80,7 +80,7 @@ static void blink(void *data);
|
||||
* Return: True, unless the ksym is ignored *
|
||||
* Global: modifier - the bitfield that keeps track of the modifier *
|
||||
* keys that are down *
|
||||
\********************************************************************/
|
||||
********************************************************************/
|
||||
static int
|
||||
handleKeyPress( WTextInput *wtext, XKeyEvent *event )
|
||||
{
|
||||
@@ -169,10 +169,10 @@ handleKeyPress( WTextInput *wtext, XKeyEvent *event )
|
||||
|
||||
|
||||
|
||||
/********************************************************************\
|
||||
/********************************************************************
|
||||
* textXYtoPos *
|
||||
* given X coord, return position in array *
|
||||
\********************************************************************/
|
||||
********************************************************************/
|
||||
static int
|
||||
textXtoPos( WTextInput *wtext, int x )
|
||||
{
|
||||
@@ -190,14 +190,14 @@ textXtoPos( WTextInput *wtext, int x )
|
||||
return pos;
|
||||
}
|
||||
|
||||
/********************************************************************\
|
||||
/********************************************************************
|
||||
* wTextCreate *
|
||||
* create an instance of a text class *
|
||||
* *
|
||||
* Args: *
|
||||
* Return: *
|
||||
* Global: dpy - the display *
|
||||
\********************************************************************/
|
||||
********************************************************************/
|
||||
WTextInput *
|
||||
wTextCreate( WCoreWindow *core, int x, int y, int width, int height )
|
||||
{
|
||||
@@ -274,13 +274,13 @@ wTextCreate( WCoreWindow *core, int x, int y, int width, int height )
|
||||
return wtext;
|
||||
}
|
||||
|
||||
/********************************************************************\
|
||||
/********************************************************************
|
||||
* wTextDestroy *
|
||||
* *
|
||||
* Args: wtext - the text field *
|
||||
* Return: *
|
||||
* Global: dpy - the display *
|
||||
\********************************************************************/
|
||||
********************************************************************/
|
||||
void
|
||||
wTextDestroy( WTextInput *wtext )
|
||||
{
|
||||
@@ -311,7 +311,7 @@ wTextDestroy( WTextInput *wtext )
|
||||
* then call wTextRefresh to redraw the text-box */
|
||||
|
||||
|
||||
/********************************************************************\
|
||||
/********************************************************************
|
||||
* textRefresh *
|
||||
* Redraw the text field. Call this after messing with the text *
|
||||
* field. wTextRefresh re-draws the inside of the text field. If *
|
||||
@@ -321,7 +321,7 @@ wTextDestroy( WTextInput *wtext )
|
||||
* Args: wtext - the text field *
|
||||
* Return: none *
|
||||
* Global: dpy - the display *
|
||||
\********************************************************************/
|
||||
********************************************************************/
|
||||
static void
|
||||
textRefresh(WTextInput *wtext)
|
||||
{
|
||||
@@ -383,13 +383,13 @@ textRefresh(WTextInput *wtext)
|
||||
}
|
||||
|
||||
|
||||
/********************************************************************\
|
||||
/********************************************************************
|
||||
* wTextPaint *
|
||||
* *
|
||||
* Args: wtext - the text field *
|
||||
* Return: *
|
||||
* Global: dpy - the display *
|
||||
\********************************************************************/
|
||||
********************************************************************/
|
||||
void
|
||||
wTextPaint( WTextInput *wtext )
|
||||
{
|
||||
@@ -406,7 +406,7 @@ wTextPaint( WTextInput *wtext )
|
||||
}
|
||||
|
||||
|
||||
/********************************************************************\
|
||||
/********************************************************************
|
||||
* wTextGetText *
|
||||
* return the string in the text field wText. DO NOT FREE THE *
|
||||
* RETURNED STRING! *
|
||||
@@ -414,7 +414,7 @@ wTextPaint( WTextInput *wtext )
|
||||
* Args: wtext - the text field *
|
||||
* Return: the text in the text field (NULL terminated) *
|
||||
* Global: *
|
||||
\********************************************************************/
|
||||
********************************************************************/
|
||||
char *
|
||||
wTextGetText( WTextInput *wtext )
|
||||
{
|
||||
@@ -424,7 +424,7 @@ wTextGetText( WTextInput *wtext )
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/********************************************************************\
|
||||
/********************************************************************
|
||||
* wTextPutText *
|
||||
* Put the string txt in the text field wText. The text field *
|
||||
* needs to be explicitly refreshed after wTextPutText by calling *
|
||||
@@ -435,7 +435,7 @@ wTextGetText( WTextInput *wtext )
|
||||
* txt - the new text string... freed by the text field! *
|
||||
* Return: none *
|
||||
* Global: *
|
||||
\********************************************************************/
|
||||
********************************************************************/
|
||||
void
|
||||
wTextPutText( WTextInput *wtext, char *txt )
|
||||
{
|
||||
@@ -453,7 +453,7 @@ wTextPutText( WTextInput *wtext, char *txt )
|
||||
wtext->text.endPos = length;
|
||||
}
|
||||
|
||||
/********************************************************************\
|
||||
/********************************************************************
|
||||
* textInsert *
|
||||
* Insert some text at the cursor. (if startPos != endPos, *
|
||||
* replace the selected text, otherwise insert) *
|
||||
@@ -463,7 +463,7 @@ wTextPutText( WTextInput *wtext, char *txt )
|
||||
* txt - the new text string... freed by the text field! *
|
||||
* Return: none *
|
||||
* Global: *
|
||||
\********************************************************************/
|
||||
********************************************************************/
|
||||
static void
|
||||
textInsert( WTextInput *wtext, char *txt )
|
||||
{
|
||||
@@ -512,7 +512,7 @@ textInsert( WTextInput *wtext, char *txt )
|
||||
wtext->text.length = newLen-1;
|
||||
}
|
||||
|
||||
/********************************************************************\
|
||||
/********************************************************************
|
||||
* wTextSelect *
|
||||
* Select some text. If start == end, then the cursor is moved *
|
||||
* to that position. If end == -1, then the text from start to *
|
||||
@@ -525,7 +525,7 @@ textInsert( WTextInput *wtext, char *txt )
|
||||
* end - the end of the selected text *
|
||||
* Return: none *
|
||||
* Global: *
|
||||
\********************************************************************/
|
||||
********************************************************************/
|
||||
void
|
||||
wTextSelect( WTextInput *wtext, int start, int end )
|
||||
{
|
||||
@@ -561,14 +561,14 @@ blink(void *data)
|
||||
}
|
||||
#endif
|
||||
|
||||
/********************************************************************\
|
||||
/********************************************************************
|
||||
* textEventHandler -- handles and dispatches all the events that *
|
||||
* the text field class supports *
|
||||
* *
|
||||
* Args: desc - all we need to know about this object *
|
||||
* Return: none *
|
||||
* Global: *
|
||||
\********************************************************************/
|
||||
********************************************************************/
|
||||
static void
|
||||
textEventHandler( WObjDescriptor *desc, XEvent *event )
|
||||
{
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
/********************************************************************\
|
||||
/********************************************************************
|
||||
* text.h -- a basic text field *
|
||||
* Copyright (C) 1997 Robin D. Clark *
|
||||
* *
|
||||
@@ -20,7 +20,7 @@
|
||||
* Internet: rclark@cs.hmc.edu *
|
||||
* Address: 609 8th Street *
|
||||
* Huntington Beach, CA 92648-4632 *
|
||||
\********************************************************************/
|
||||
********************************************************************/
|
||||
|
||||
#ifndef __TEXT_H__
|
||||
#define __TEXT_H__
|
||||
|
||||
@@ -374,3 +374,4 @@ wUserMenuGet(WScreen *scr, WWindow *wwin)
|
||||
}
|
||||
|
||||
#endif /* USER_MENU */
|
||||
|
||||
|
||||
+2
-4
@@ -596,10 +596,7 @@ getBool(WMPropList *key, WMPropList *value)
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* WARNING: Do not free value returned by this!!
|
||||
*/
|
||||
/* WARNING: Do not free the value returned by this function!! */
|
||||
static char*
|
||||
getString(WMPropList *key, WMPropList *value)
|
||||
{
|
||||
@@ -611,3 +608,4 @@ getString(WMPropList *key, WMPropList *value)
|
||||
|
||||
return WMGetFromPLString(value);
|
||||
}
|
||||
|
||||
|
||||
@@ -3448,3 +3448,4 @@ windowIconifyClick(WCoreWindow *sender, void *data, XEvent *event)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+9
-3
@@ -39,7 +39,8 @@ Atom _XA_MOTIF_DRAG_AND_DROP_MESSAGE;
|
||||
|
||||
Atom atom_support;
|
||||
|
||||
void wXDNDInitializeAtoms()
|
||||
void
|
||||
wXDNDInitializeAtoms()
|
||||
{
|
||||
|
||||
_XA_XdndAware = XInternAtom(dpy, "XdndAware", False);
|
||||
@@ -60,7 +61,9 @@ void wXDNDInitializeAtoms()
|
||||
*/
|
||||
}
|
||||
|
||||
void wXDNDMakeAwareness(Window window) {
|
||||
void
|
||||
wXDNDMakeAwareness(Window window)
|
||||
{
|
||||
long int xdnd_version = 3;
|
||||
/*
|
||||
MotifDragReceiverInfo info;
|
||||
@@ -85,7 +88,9 @@ void wXDNDMakeAwareness(Window window) {
|
||||
*/
|
||||
}
|
||||
|
||||
void wXDNDClearAwareness(Window window) {
|
||||
void
|
||||
wXDNDClearAwareness(Window window)
|
||||
{
|
||||
//long int xdnd_version = 3;
|
||||
XDeleteProperty (dpy, window, _XA_XdndAware);
|
||||
}
|
||||
@@ -333,3 +338,4 @@ wXDNDProcessClientMessage(XClientMessageEvent *event)
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -296,3 +296,4 @@ wXModifierInitialize(void)
|
||||
{
|
||||
x_reset_modifier_mapping(dpy);
|
||||
}
|
||||
|
||||
|
||||
@@ -194,3 +194,4 @@ FormatXError(Display *dpy, XErrorEvent *error, char *buffer, int size)
|
||||
sprintf(buffer, " Error serial: %li\n", error->serial);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -33,7 +33,8 @@ hide(void *foo, int item, Time time)
|
||||
}
|
||||
|
||||
|
||||
int notify_print( int id, XEvent *event, void *data )
|
||||
int
|
||||
notify_print( int id, XEvent *event, void *data )
|
||||
{
|
||||
printf( "Got notification 0x%x, window 0x%lx, data '%s'\n",
|
||||
id, event->xclient.data.l[1], (char *) data );
|
||||
|
||||
@@ -806,3 +806,4 @@ readBlackBoxStyle(char *path)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
+2
-1
@@ -66,7 +66,8 @@ gethomedir()
|
||||
|
||||
|
||||
|
||||
void wAbort()
|
||||
void
|
||||
wAbort()
|
||||
{
|
||||
exit(0);
|
||||
}
|
||||
|
||||
+21
-12
@@ -88,7 +88,8 @@ wlog(const char *msg, ...)
|
||||
#endif
|
||||
|
||||
|
||||
void alert(const char *msg, ...)
|
||||
void
|
||||
alert(const char *msg, ...)
|
||||
{
|
||||
va_list args;
|
||||
char buffer[2048];
|
||||
@@ -104,9 +105,8 @@ void alert(const char *msg, ...)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Bool ask(char *title, char *yes, char *no, const char *msg, ...)
|
||||
Bool
|
||||
ask(char *title, char *yes, char *no, const char *msg, ...)
|
||||
{
|
||||
va_list args;
|
||||
char buffer[2048];
|
||||
@@ -122,7 +122,8 @@ Bool ask(char *title, char *yes, char *no, const char *msg, ...)
|
||||
}
|
||||
|
||||
|
||||
char *renameName(char *path)
|
||||
char*
|
||||
renameName(char *path)
|
||||
{
|
||||
char *buf = wmalloc(strlen(path)+8);
|
||||
int i;
|
||||
@@ -148,7 +149,8 @@ char *renameName(char *path)
|
||||
|
||||
|
||||
|
||||
void showFileError(int error, Bool directory, char *path)
|
||||
void
|
||||
showFileError(int error, Bool directory, char *path)
|
||||
{
|
||||
switch (error) {
|
||||
case EACCESS:
|
||||
@@ -181,7 +183,8 @@ void showFileError(int error, Bool directory, char *path)
|
||||
|
||||
|
||||
|
||||
Bool checkDir(char *path, Bool fatal)
|
||||
Bool
|
||||
checkDir(char *path, Bool fatal)
|
||||
{
|
||||
if (access(path, F_OK) < 0) {
|
||||
if (mkdir(path, 0775) < 0) {
|
||||
@@ -242,7 +245,8 @@ Bool checkDir(char *path, Bool fatal)
|
||||
|
||||
|
||||
|
||||
Bool checkFile(char *path)
|
||||
Bool
|
||||
checkFile(char *path)
|
||||
{
|
||||
if (access(path, F_OK|R_OK|W_OK) == 0) {
|
||||
return True;
|
||||
@@ -255,7 +259,8 @@ Bool checkFile(char *path)
|
||||
|
||||
|
||||
|
||||
Bool checkCurrentSetup(char *home)
|
||||
Bool
|
||||
checkCurrentSetup(char *home)
|
||||
{
|
||||
char path[1024];
|
||||
char *p;
|
||||
@@ -285,7 +290,8 @@ Bool checkCurrentSetup(char *home)
|
||||
|
||||
|
||||
|
||||
Bool copyAllFiles(char *gsdir)
|
||||
Bool
|
||||
copyAllFiles(char *gsdir)
|
||||
{
|
||||
FILE *f;
|
||||
char path[2048];
|
||||
@@ -338,7 +344,8 @@ Bool copyAllFiles(char *gsdir)
|
||||
|
||||
|
||||
|
||||
void showFinishSplash(char *gsdir)
|
||||
void
|
||||
showFinishSplash(char *gsdir)
|
||||
{
|
||||
#if 0
|
||||
WMWindow *win;
|
||||
@@ -348,7 +355,8 @@ void showFinishSplash(char *gsdir)
|
||||
}
|
||||
|
||||
|
||||
int main(int argc, char **argv)
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
Display *dpy;
|
||||
char *gsdir;
|
||||
@@ -413,3 +421,4 @@ int main(int argc, char **argv)
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -37,3 +37,4 @@ typedef struct _wmAppContext {
|
||||
} wmAppContext;
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -82,3 +82,4 @@ WMSetWindowAttributes(Display *dpy, Window window,
|
||||
(unsigned char *)attributes,
|
||||
sizeof(GNUstepWMAttributes)/sizeof(CARD32));
|
||||
}
|
||||
|
||||
|
||||
@@ -93,3 +93,4 @@ WMProcessEvent(WMAppContext *app, XEvent *event)
|
||||
}
|
||||
return proc;
|
||||
}
|
||||
|
||||
|
||||
@@ -72,3 +72,4 @@ enum {
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
+8
-16
@@ -67,8 +67,7 @@ Status XmuGetColormapAllocation(vinfo, property, red_max, green_max, blue_max)
|
||||
if (vinfo->colormap_size <= 2)
|
||||
return 0;
|
||||
|
||||
switch (property)
|
||||
{
|
||||
switch (property) {
|
||||
case XA_RGB_DEFAULT_MAP:
|
||||
status = default_allocation(vinfo, red_max, green_max, blue_max);
|
||||
break;
|
||||
@@ -205,8 +204,7 @@ static void best_allocation(vinfo, red, green, blue)
|
||||
unsigned long *red, *green, *blue;
|
||||
{
|
||||
|
||||
if (vinfo->class == DirectColor || vinfo->class == TrueColor)
|
||||
{
|
||||
if (vinfo->class == DirectColor || vinfo->class == TrueColor) {
|
||||
*red = vinfo->red_mask;
|
||||
while ((*red & 01) == 0)
|
||||
*red >>= 1;
|
||||
@@ -216,9 +214,7 @@ static void best_allocation(vinfo, red, green, blue)
|
||||
*blue = vinfo->blue_mask;
|
||||
while ((*blue & 01) == 0)
|
||||
*blue >>= 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
register int bits, n;
|
||||
|
||||
/* Determine n such that n is the least integral power of 2 which is
|
||||
@@ -226,8 +222,7 @@ static void best_allocation(vinfo, red, green, blue)
|
||||
*/
|
||||
n = 1;
|
||||
bits = 0;
|
||||
while (vinfo->colormap_size > n)
|
||||
{
|
||||
while (vinfo->colormap_size > n) {
|
||||
n = n << 1;
|
||||
bits++;
|
||||
}
|
||||
@@ -239,8 +234,7 @@ static void best_allocation(vinfo, red, green, blue)
|
||||
|
||||
* colormap entries.
|
||||
*/
|
||||
if (n == vinfo->colormap_size)
|
||||
{
|
||||
if (n == vinfo->colormap_size) {
|
||||
register int r, g, b;
|
||||
b = bits / 3;
|
||||
g = b + ((bits % 3) ? 1 : 0);
|
||||
@@ -248,9 +242,7 @@ static void best_allocation(vinfo, red, green, blue)
|
||||
*red = 1 << r;
|
||||
*green = 1 << g;
|
||||
*blue = 1 << b;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
*red = icbrt_with_bits(vinfo->colormap_size, bits);
|
||||
*blue = *red;
|
||||
*green = (vinfo->colormap_size / ((*red) * (*blue)));
|
||||
@@ -274,8 +266,7 @@ static int icbrt(a) /* integer cube root */
|
||||
register int bits = 0;
|
||||
register unsigned n = a;
|
||||
|
||||
while (n)
|
||||
{
|
||||
while (n) {
|
||||
bits++;
|
||||
n >>= 1;
|
||||
}
|
||||
@@ -333,3 +324,4 @@ static int icbrt_with_guess(a, guess)
|
||||
|
||||
return guess;
|
||||
}
|
||||
|
||||
|
||||
@@ -522,3 +522,4 @@ static Status readonly_map(dpy, vinfo, colormap)
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
+1
-2
@@ -49,8 +49,7 @@ void XmuDeleteStandardColormap(dpy, screen, property)
|
||||
int count = 0;
|
||||
|
||||
if (XGetRGBColormaps(dpy, RootWindow(dpy, screen), &stdcmaps, &count,
|
||||
property))
|
||||
{
|
||||
property)) {
|
||||
for (s=stdcmaps; count > 0; count--, s++) {
|
||||
if ((s->killid == ReleaseByFreeingColormap) &&
|
||||
(s->colormap != None) &&
|
||||
|
||||
@@ -310,3 +310,4 @@ static Status lookup(dpy, screen, visualid, property, new, replace)
|
||||
XFree((char *) stdcmaps);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -217,3 +217,4 @@ static Status valid_args(vinfo, red_max, green_max, blue_max, property)
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -47,16 +47,16 @@ cache_bench(int start)
|
||||
static int start_cycle;
|
||||
|
||||
if (start) {
|
||||
asm volatile(
|
||||
"movl $1,%%ecx \n\t"
|
||||
asm volatile
|
||||
("movl $1,%%ecx \n\t"
|
||||
"rdpmc \n\t"
|
||||
"movl %%eax,%0 \n\t"
|
||||
: "=m" (start_cycle));
|
||||
} else {
|
||||
int end;
|
||||
|
||||
asm volatile(
|
||||
"movl $1,%%ecx \n\t"
|
||||
asm volatile
|
||||
("movl $1,%%ecx \n\t"
|
||||
"rdpmc \n\t"
|
||||
"movl %%eax,%0"
|
||||
: "=m" (end));
|
||||
|
||||
@@ -132,3 +132,4 @@ RRGBtoHSV(RColor *rgb, RHSVColor *hsv)
|
||||
hsv->saturation = s;
|
||||
hsv->value = v;
|
||||
}
|
||||
|
||||
|
||||
@@ -803,3 +803,4 @@ bestContext(Display *dpy, int screen_number, RContext *context)
|
||||
else
|
||||
return True;
|
||||
}
|
||||
|
||||
|
||||
@@ -308,3 +308,4 @@ RSmoothImage(RImage *image)
|
||||
return True;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -229,3 +229,4 @@ did_not_get_any_errors:
|
||||
}
|
||||
|
||||
#endif /* USE_GIF */
|
||||
|
||||
|
||||
@@ -213,3 +213,4 @@ RLoadJPEG(RContext *context, char *file_name, int index)
|
||||
}
|
||||
|
||||
#endif /* USE_JPEG */
|
||||
|
||||
|
||||
@@ -216,3 +216,4 @@ RMessageForError(int errorCode)
|
||||
return "internal error";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -238,3 +238,4 @@ RLoadPNG(RContext *context, char *file, int index)
|
||||
}
|
||||
|
||||
#endif /* USE_PNG */
|
||||
|
||||
|
||||
@@ -557,3 +557,4 @@ RMakeCenteredImage(RImage *image, unsigned width, unsigned height, RColor *color
|
||||
|
||||
return tmp;
|
||||
}
|
||||
|
||||
|
||||
@@ -386,3 +386,4 @@ rotateImage(RImage *image, float angle)
|
||||
|
||||
return img;
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user