aboutsummaryrefslogtreecommitdiffstats
path: root/legacy/ecore/src/lib/ecore_x/xcb/ecore_xcb_gc.c
diff options
context:
space:
mode:
Diffstat (limited to 'legacy/ecore/src/lib/ecore_x/xcb/ecore_xcb_gc.c')
-rw-r--r--legacy/ecore/src/lib/ecore_x/xcb/ecore_xcb_gc.c47
1 files changed, 37 insertions, 10 deletions
diff --git a/legacy/ecore/src/lib/ecore_x/xcb/ecore_xcb_gc.c b/legacy/ecore/src/lib/ecore_x/xcb/ecore_xcb_gc.c
index ae52e6f0a6..d811b54594 100644
--- a/legacy/ecore/src/lib/ecore_x/xcb/ecore_xcb_gc.c
+++ b/legacy/ecore/src/lib/ecore_x/xcb/ecore_xcb_gc.c
@@ -10,8 +10,10 @@
* same than the corresponding bitmaks.
* @return The new default graphics context.
*/
-EAPI Ecore_X_GC
-ecore_x_gc_new(Ecore_X_Drawable drawable, Ecore_X_GC_Value_Mask value_mask, const unsigned int *value_list)
+EAPI Ecore_X_GC
+ecore_x_gc_new(Ecore_X_Drawable drawable,
+ Ecore_X_GC_Value_Mask value_mask,
+ const unsigned int *value_list)
{
xcb_gcontext_t gc;
uint32_t vmask = 0;
@@ -22,76 +24,98 @@ ecore_x_gc_new(Ecore_X_Drawable drawable, Ecore_X_GC_Value_Mask value_mask, cons
if (!drawable) drawable = ((xcb_screen_t *)_ecore_xcb_screen)->root;
- for (i = 0, mask = 1; i <= 22; i++, mask <<= 1)
+ for (i = 0, mask = 1; i <= 22; i++, mask <<= 1)
{
- switch (mask & value_mask)
+ switch (mask & value_mask)
{
case ECORE_X_GC_VALUE_MASK_FUNCTION:
vmask |= XCB_GC_FUNCTION;
break;
+
case ECORE_X_GC_VALUE_MASK_PLANE_MASK:
vmask |= XCB_GC_PLANE_MASK;
break;
+
case ECORE_X_GC_VALUE_MASK_FOREGROUND:
vmask |= XCB_GC_FOREGROUND;
break;
+
case ECORE_X_GC_VALUE_MASK_BACKGROUND:
vmask |= XCB_GC_BACKGROUND;
break;
+
case ECORE_X_GC_VALUE_MASK_LINE_WIDTH:
vmask |= XCB_GC_LINE_WIDTH;
break;
+
case ECORE_X_GC_VALUE_MASK_LINE_STYLE:
vmask |= XCB_GC_LINE_STYLE;
break;
+
case ECORE_X_GC_VALUE_MASK_CAP_STYLE:
vmask |= XCB_GC_CAP_STYLE;
break;
+
case ECORE_X_GC_VALUE_MASK_JOIN_STYLE:
vmask |= XCB_GC_JOIN_STYLE;
break;
+
case ECORE_X_GC_VALUE_MASK_FILL_STYLE:
vmask |= XCB_GC_FILL_STYLE;
break;
+
case ECORE_X_GC_VALUE_MASK_FILL_RULE:
vmask |= XCB_GC_FILL_RULE;
break;
+
case ECORE_X_GC_VALUE_MASK_TILE:
vmask |= XCB_GC_TILE;
break;
+
case ECORE_X_GC_VALUE_MASK_STIPPLE:
vmask |= XCB_GC_STIPPLE;
break;
+
case ECORE_X_GC_VALUE_MASK_TILE_STIPPLE_ORIGIN_X:
vmask |= XCB_GC_TILE_STIPPLE_ORIGIN_X;
break;
+
case ECORE_X_GC_VALUE_MASK_TILE_STIPPLE_ORIGIN_Y:
vmask |= XCB_GC_TILE_STIPPLE_ORIGIN_Y;
break;
+
case ECORE_X_GC_VALUE_MASK_FONT:
vmask |= XCB_GC_FONT;
break;
+
case ECORE_X_GC_VALUE_MASK_SUBWINDOW_MODE:
vmask |= XCB_GC_SUBWINDOW_MODE;
break;
+
case ECORE_X_GC_VALUE_MASK_GRAPHICS_EXPOSURES:
vmask |= XCB_GC_GRAPHICS_EXPOSURES;
break;
+
case ECORE_X_GC_VALUE_MASK_CLIP_ORIGIN_X:
vmask |= XCB_GC_CLIP_ORIGIN_X;
break;
+
case ECORE_X_GC_VALUE_MASK_CLIP_ORIGIN_Y:
vmask |= XCB_GC_CLIP_ORIGIN_Y;
break;
+
case ECORE_X_GC_VALUE_MASK_CLIP_MASK:
vmask |= XCB_GC_CLIP_MASK;
break;
+
case ECORE_X_GC_VALUE_MASK_DASH_OFFSET:
vmask |= XCB_GC_DASH_OFFSET;
break;
+
case ECORE_X_GC_VALUE_MASK_DASH_LIST:
vmask |= XCB_GC_DASH_LIST;
break;
+
case ECORE_X_GC_VALUE_MASK_ARC_MODE:
vmask |= XCB_GC_ARC_MODE;
break;
@@ -109,8 +133,8 @@ ecore_x_gc_new(Ecore_X_Drawable drawable, Ecore_X_GC_Value_Mask value_mask, cons
* Deletes and frees the given graphics context.
* @param gc The given graphics context.
*/
-EAPI void
-ecore_x_gc_free(Ecore_X_GC gc)
+EAPI void
+ecore_x_gc_free(Ecore_X_GC gc)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
CHECK_XCB_CONN;
@@ -119,8 +143,9 @@ ecore_x_gc_free(Ecore_X_GC gc)
// ecore_x_flush();
}
-EAPI void
-ecore_x_gc_foreground_set(Ecore_X_GC gc, unsigned long foreground)
+EAPI void
+ecore_x_gc_foreground_set(Ecore_X_GC gc,
+ unsigned long foreground)
{
uint32_t list;
@@ -132,8 +157,9 @@ ecore_x_gc_foreground_set(Ecore_X_GC gc, unsigned long foreground)
// ecore_x_flush();
}
-EAPI void
-ecore_x_gc_background_set(Ecore_X_GC gc, unsigned long background)
+EAPI void
+ecore_x_gc_background_set(Ecore_X_GC gc,
+ unsigned long background)
{
uint32_t list;
@@ -144,3 +170,4 @@ ecore_x_gc_background_set(Ecore_X_GC gc, unsigned long background)
xcb_change_gc(_ecore_xcb_conn, gc, XCB_GC_BACKGROUND, &list);
// ecore_x_flush();
}
+