struct _ObtPaths;
typedef enum {
- OBT_LINK_TYPE_APPLICATION = 1,
- OBT_LINK_TYPE_URL = 2,
- OBT_LINK_TYPE_DIRECTORY = 3
+ OBT_LINK_TYPE_APPLICATION = 1,
+ OBT_LINK_TYPE_URL = 2,
+ OBT_LINK_TYPE_DIRECTORY = 3
} ObtLinkType;
typedef enum {
- OBT_LINK_APP_STARTUP_NO_SUPPORT,
- OBT_LINK_APP_STARTUP_PROTOCOL_SUPPORT,
- OBT_LINK_APP_STARTUP_LEGACY_SUPPORT
+ OBT_LINK_APP_STARTUP_NO_SUPPORT,
+ OBT_LINK_APP_STARTUP_PROTOCOL_SUPPORT,
+ OBT_LINK_APP_STARTUP_LEGACY_SUPPORT
} ObtLinkAppStartup;
/*! These bit flags are environments for links. Some links are used or not
} ObtLinkEnvFlags;
typedef enum {
- /*! The app can be launched with a single local file */
- OBT_LINK_APP_SINGLE_LOCAL = 1 << 0,
- /*! The app can be launched with multiple local files */
- OBT_LINK_APP_MULTI_LOCAL = 1 << 1,
- /*! The app can be launched with a single URL */
- OBT_LINK_APP_SINGLE_URL = 1 << 2,
- /*! The app can be launched with multiple URLs */
- OBT_LINK_APP_MULTI_URL = 1 << 3
+ /*! The app can be launched with a single local file */
+ OBT_LINK_APP_SINGLE_LOCAL = 1 << 0,
+ /*! The app can be launched with multiple local files */
+ OBT_LINK_APP_MULTI_LOCAL = 1 << 1,
+ /*! The app can be launched with a single URL */
+ OBT_LINK_APP_SINGLE_URL = 1 << 2,
+ /*! The app can be launched with multiple URLs */
+ OBT_LINK_APP_MULTI_URL = 1 << 3
} ObtLinkAppOpen;
typedef struct _ObtLink ObtLink;
ObtLinkType obt_link_type (ObtLink *e);
/*! Returns TRUE if the .desktop file should be displayed to users, given the
- current environment. If FALSE, the .desktop file should not be showed.
- This also uses the TryExec option if it is present.
+ current environment. If FALSE, the .desktop file should not be showed.
+ This also uses the TryExec option if it is present.
@env A semicolon-deliminated list of environemnts. Can be one or more of:
GNOME, KDE, ROX, XFCE. Other environments not listed here may also
be supported. This can be null also if not listing any environment. */
a = screen_physical_area_all_monitors();
switch (edge_warp_dir) {
- case OB_DIRECTION_NORTH:
- y = a->height - 1;
- break;
- case OB_DIRECTION_EAST:
- x = a->x;
- break;
- case OB_DIRECTION_SOUTH:
- y = a->y;
- break;
- case OB_DIRECTION_WEST:
- x = a->width - 1;
- break;
- default:
+ case OB_DIRECTION_NORTH:
+ y = a->height - 1;
+ break;
+ case OB_DIRECTION_EAST:
+ x = a->x;
+ break;
+ case OB_DIRECTION_SOUTH:
+ y = a->y;
+ break;
+ case OB_DIRECTION_WEST:
+ x = a->width - 1;
+ break;
+ default:
g_assert_not_reached();
}
int overlap = G_MAXINT;
int max_edges = 2 * (n_client_rects + 1);
- int x_edges[max_edges];
- int y_edges[max_edges];
- make_grid(client_rects, n_client_rects, bound,
- x_edges, y_edges, max_edges);
- int i;
- for (i = 0; i < max_edges; ++i) {
- if (x_edges[i] == G_MAXINT)
- break;
- int j;
- for (j = 0; j < max_edges; ++j) {
- if (y_edges[j] == G_MAXINT)
- break;
- Point grid_point = {.x = x_edges[i], .y = y_edges[j]};
- Point best_top_left;
- int this_overlap =
- best_direction(&grid_point, client_rects, n_client_rects,
- bound, req_size, &best_top_left);
- if (this_overlap < overlap) {
- overlap = this_overlap;
- *result = best_top_left;
- }
- if (overlap == 0)
- break;
- }
- if (overlap == 0)
- break;
- }
+ int x_edges[max_edges];
+ int y_edges[max_edges];
+ make_grid(client_rects, n_client_rects, bound,
+ x_edges, y_edges, max_edges);
+ int i;
+ for (i = 0; i < max_edges; ++i) {
+ if (x_edges[i] == G_MAXINT)
+ break;
+ int j;
+ for (j = 0; j < max_edges; ++j) {
+ if (y_edges[j] == G_MAXINT)
+ break;
+ Point grid_point = {.x = x_edges[i], .y = y_edges[j]};
+ Point best_top_left;
+ int this_overlap =
+ best_direction(&grid_point, client_rects, n_client_rects,
+ bound, req_size, &best_top_left);
+ if (this_overlap < overlap) {
+ overlap = this_overlap;
+ *result = best_top_left;
+ }
+ if (overlap == 0)
+ break;
+ }
+ if (overlap == 0)
+ break;
+ }
}
static int compare_ints(const void* a, const void* b)